From bab36eb4bd780aa1c319f1785fe84374969221e5 Mon Sep 17 00:00:00 2001 From: pe7er Date: Tue, 8 Dec 2015 17:12:25 +0100 Subject: [PATCH 001/294] modify category form field for free input --- .../models/fields/categoryedit.php | 81 +++++++++++++++++++ .../com_content/models/forms/article.xml | 8 +- .../com_content/views/article/tmpl/edit.php | 2 +- administrator/language/en-GB/en-GB.ini | 3 + 4 files changed, 91 insertions(+), 3 deletions(-) diff --git a/administrator/components/com_categories/models/fields/categoryedit.php b/administrator/components/com_categories/models/fields/categoryedit.php index cf6f558a9d493..c781628211d1f 100644 --- a/administrator/components/com_categories/models/fields/categoryedit.php +++ b/administrator/components/com_categories/models/fields/categoryedit.php @@ -229,4 +229,85 @@ protected function getOptions() // Merge any additional options in the XML definition. return array_merge(parent::getOptions(), $options); } + + /** + * Method to get the field input markup for a generic list. + * Use the multiple attribute to enable multiselect. + * + * @return string The field input markup. + * + * @since 3.6 + */ + protected function getInput() + { + $html = array(); + $class = array(); + $attr = ''; + + // Initialize some field attributes. + $class[] = !empty($this->class) ? $this->class : ''; + + if ($this->element["allowAdd"]) + { + $customGroupText = JText::_('JGLOBAL_CUSTOM_CATEGORY'); + + $class[] = 'chzn-custom-value'; + $attr .= ' data-custom_group_text="' . $customGroupText . '" ' + . 'data-no_results_text="' . JText::_('JGLOBAL_ADD_CUSTOM_CATEGORY') . '" ' + . 'data-placeholder="' . JText::_('JGLOBAL_TYPE_OR_SELECT_CATEGORY') . '" '; + } + + if ($class) + { + $attr .= 'class="' . implode(' ', $class) . '"'; + } + + $attr .= !empty($this->size) ? ' size="' . $this->size . '"' : ''; + $attr .= $this->multiple ? ' multiple' : ''; + $attr .= $this->required ? ' required aria-required="true"' : ''; + $attr .= $this->autofocus ? ' autofocus' : ''; + + // To avoid user's confusion, readonly="true" should imply disabled="true". + if ((string) $this->readonly == '1' || (string) $this->readonly == 'true' || (string) $this->disabled == '1'|| (string) $this->disabled == 'true') + { + $attr .= ' disabled="disabled"'; + } + + // Initialize JavaScript field attributes. + $attr .= $this->onchange ? ' onchange="' . $this->onchange . '"' : ''; + + // Get the field options. + $options = (array) $this->getOptions(); + + // Create a read-only list (no name) with hidden input(s) to store the value(s). + if ((string) $this->readonly == '1' || (string) $this->readonly == 'true') + { + $html[] = JHtml::_('select.genericlist', $options, '', trim($attr), 'value', 'text', $this->value, $this->id); + + // E.g. form field type tag sends $this->value as array + if ($this->multiple && is_array($this->value)) + { + if (!count($this->value)) + { + $this->value[] = ''; + } + + foreach ($this->value as $value) + { + $html[] = ''; + } + } + else + { + $html[] = ''; + } + } + else + // Create a regular list. + { + $html[] = JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id); + } + + return implode($html); + } } diff --git a/administrator/components/com_content/models/forms/article.xml b/administrator/components/com_content/models/forms/article.xml index 1ed973d17fd30..056ec2d6739b9 100644 --- a/administrator/components/com_content/models/forms/article.xml +++ b/administrator/components/com_content/models/forms/article.xml @@ -42,9 +42,13 @@ JTRASHED - diff --git a/administrator/components/com_content/views/article/tmpl/edit.php b/administrator/components/com_content/views/article/tmpl/edit.php index ef414b960983d..a4d57b4df4e33 100644 --- a/administrator/components/com_content/views/article/tmpl/edit.php +++ b/administrator/components/com_content/views/article/tmpl/edit.php @@ -14,7 +14,7 @@ JHtml::_('behavior.formvalidator'); JHtml::_('behavior.keepalive'); -JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('formbehavior.chosen', 'select', null, array('disable_search_threshold' => 0 )); $this->configFieldsets = array('editorConfig'); $this->hiddenFieldsets = array('basic-limited'); diff --git a/administrator/language/en-GB/en-GB.ini b/administrator/language/en-GB/en-GB.ini index 49c527a4c3005..63e23be828c06 100644 --- a/administrator/language/en-GB/en-GB.ini +++ b/administrator/language/en-GB/en-GB.ini @@ -242,6 +242,7 @@ JFIELD_XREFERENCE_LABEL="External Reference" JGLOBAL_ACROSS="Across" JGLOBAL_ACTION_PERMISSIONS_LABEL="Permissions" JGLOBAL_ACTION_PERMISSIONS_DESCRIPTION="Set the action permissions for this asset" +JGLOBAL_ADD_CUSTOM_CATEGORY="Add new Category" JGLOBAL_ALL_ARTICLE="Max Levels Articles" JGLOBAL_ALL_LIST="Max Levels as List" JGLOBAL_ALLOW_COMMENTS_DESC="If Yes, viewers will be able to add and view comments for the article." @@ -301,6 +302,7 @@ JGLOBAL_CLICK_TO_TOGGLE_STATE="Select icon to toggle state." JGLOBAL_COPY="(copy)" JGLOBAL_CREATED="Created" JGLOBAL_CREATED_DATE="Created Date" +JGLOBAL_CUSTOM_CATEGORY="New Categories" JGLOBAL_DATE_FORMAT_DESC="Optional format string for showing the date. If left blank, it uses DATE_FORMAT_LC1 from your language file (for example, D M Y for day month year or you can use d-m-y for a short version eg. 10-07-10. See http://www.php.net/manual/en/function.date.php)." JGLOBAL_DATE_FORMAT_LABEL="Date Format" JGLOBAL_DESCRIPTION="Description" @@ -556,6 +558,7 @@ JGLOBAL_TITLE_REVERSE_ALPHABETICAL="Title Reverse Alphabetical" JGLOBAL_TOGGLE_FEATURED="Toggle featured status." JGLOBAL_TOP="Top" JGLOBAL_TPL_CPANEL_LINK_TEXT="Return to Control Panel" +JGLOBAL_TYPE_OR_SELECT_CATEGORY="Type or Select a Category" JGLOBAL_USE_GLOBAL="Use Global" JGLOBAL_USERNAME="Username" JGLOBAL_VALIDATION_FORM_FAILED="Invalid form" From a94e7524846a72930dc23d16d0ba401a3d28d89c Mon Sep 17 00:00:00 2001 From: pe7er Date: Tue, 8 Dec 2015 19:02:59 +0100 Subject: [PATCH 002/294] create new table --- .../components/com_content/models/article.php | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_content/models/article.php b/administrator/components/com_content/models/article.php index 75e401854f7ae..e40ee94c60249 100644 --- a/administrator/components/com_content/models/article.php +++ b/administrator/components/com_content/models/article.php @@ -487,6 +487,26 @@ public function save($data) $data['images'] = (string) $registry; } + // Save New Category + if ((int) $data['catid'] == 0) + { + require_once JPATH_ADMINISTRATOR . '/components/com_categories/models/category.php'; + require_once JPATH_ADMINISTRATOR . '/components/com_categories/tables/category.php'; + + $categoryModel = JModelLegacy::getInstance('Category', 'CategoriesModel'); + + $catData["title"] = $data['catid']; + $catData["parent_id"] = 1; + $catData["extension"] ="com_content"; + $catData["language"] = $data['language']; + $catData["published"] = 1; + + $categoryModel->save($catData); + + //todo retrieve id of new category + //$data['catid'] = $this->getState($this->getName() . '.id'); + } + if (isset($data['urls']) && is_array($data['urls'])) { $check = $input->post->get('jform', array(), 'array'); @@ -551,9 +571,9 @@ public function save($data) $data['alias'] = JFilterOutput::stringURLSafe($data['title']); } - $table = JTable::getInstance('Content', 'JTable'); + $catData = JTable::getInstance('Content', 'JTable'); - if ($table->load(array('alias' => $data['alias'], 'catid' => $data['catid']))) + if ($catData->load(array('alias' => $data['alias'], 'catid' => $data['catid']))) { $msg = JText::_('COM_CONTENT_SAVE_WARNING'); } From c2b41339074e4d5c727492a641df875270c89276 Mon Sep 17 00:00:00 2001 From: pe7er Date: Tue, 8 Dec 2015 23:48:18 +0100 Subject: [PATCH 003/294] get new catid and save with article --- administrator/components/com_content/models/article.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_content/models/article.php b/administrator/components/com_content/models/article.php index e40ee94c60249..e81072cc0c856 100644 --- a/administrator/components/com_content/models/article.php +++ b/administrator/components/com_content/models/article.php @@ -503,8 +503,8 @@ public function save($data) $categoryModel->save($catData); - //todo retrieve id of new category - //$data['catid'] = $this->getState($this->getName() . '.id'); + // Get the category id of the new category we have just created. + $data['catid'] = $categoryModel->getState("category.id"); } if (isset($data['urls']) && is_array($data['urls'])) From 706ce9b5ae26237353d19e659a3f04db283e78f7 Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 00:25:53 +0100 Subject: [PATCH 004/294] fixed code style issue --- administrator/components/com_content/models/article.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_content/models/article.php b/administrator/components/com_content/models/article.php index e81072cc0c856..c88b2f98aa3c5 100644 --- a/administrator/components/com_content/models/article.php +++ b/administrator/components/com_content/models/article.php @@ -495,9 +495,9 @@ public function save($data) $categoryModel = JModelLegacy::getInstance('Category', 'CategoriesModel'); - $catData["title"] = $data['catid']; + $catData["title"] = $data['catid']; $catData["parent_id"] = 1; - $catData["extension"] ="com_content"; + $catData["extension"] = "com_content"; $catData["language"] = $data['language']; $catData["published"] = 1; From dbe68152de3f536791104a734d52679a921719a3 Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 10:31:44 +0100 Subject: [PATCH 005/294] moved category-create-on-the-fly code to category helper --- .../com_categories/helpers/categories.php | 20 ++++++++++++++ .../models/fields/categoryedit.php | 2 +- .../components/com_content/models/article.php | 26 ++++++++----------- libraries/joomla/form/field.php | 12 ++++++++- 4 files changed, 43 insertions(+), 17 deletions(-) diff --git a/administrator/components/com_categories/helpers/categories.php b/administrator/components/com_categories/helpers/categories.php index 4e4d603c3411e..5b50601a33193 100644 --- a/administrator/components/com_categories/helpers/categories.php +++ b/administrator/components/com_categories/helpers/categories.php @@ -137,4 +137,24 @@ public static function getAssociations($pk, $extension = 'com_content') return $associations; } + + /** + * Create new Category from within item view. + * + * @param array $data Array of data for new category. + * + * @return integer. + */ + public static function createCategory($data) + { + JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_categories/models'); + JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_categories/tables'); + + $categoryModel = JModelLegacy::getInstance('Category', 'CategoriesModel'); + $categoryModel->save($data); + + $catid = $categoryModel->getState('category.id'); + + return $catid; + } } diff --git a/administrator/components/com_categories/models/fields/categoryedit.php b/administrator/components/com_categories/models/fields/categoryedit.php index c781628211d1f..fa23ffda033ce 100644 --- a/administrator/components/com_categories/models/fields/categoryedit.php +++ b/administrator/components/com_categories/models/fields/categoryedit.php @@ -247,7 +247,7 @@ protected function getInput() // Initialize some field attributes. $class[] = !empty($this->class) ? $this->class : ''; - if ($this->element["allowAdd"]) + if ($this->allowAdd) { $customGroupText = JText::_('JGLOBAL_CUSTOM_CATEGORY'); diff --git a/administrator/components/com_content/models/article.php b/administrator/components/com_content/models/article.php index c88b2f98aa3c5..d11a4bd110ccf 100644 --- a/administrator/components/com_content/models/article.php +++ b/administrator/components/com_content/models/article.php @@ -490,21 +490,17 @@ public function save($data) // Save New Category if ((int) $data['catid'] == 0) { - require_once JPATH_ADMINISTRATOR . '/components/com_categories/models/category.php'; - require_once JPATH_ADMINISTRATOR . '/components/com_categories/tables/category.php'; + require_once JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'; - $categoryModel = JModelLegacy::getInstance('Category', 'CategoriesModel'); + $category = array(); + $category['title'] = $data['catid']; + $category['parent_id'] = 1; + $category['extension'] = 'com_content'; + $category['language'] = $data['language']; + $category['published'] = 1; - $catData["title"] = $data['catid']; - $catData["parent_id"] = 1; - $catData["extension"] = "com_content"; - $catData["language"] = $data['language']; - $catData["published"] = 1; - - $categoryModel->save($catData); - - // Get the category id of the new category we have just created. - $data['catid'] = $categoryModel->getState("category.id"); + // Create new category and get catid back + $data['catid'] = CategoriesHelper::createCategory($category); } if (isset($data['urls']) && is_array($data['urls'])) @@ -571,9 +567,9 @@ public function save($data) $data['alias'] = JFilterOutput::stringURLSafe($data['title']); } - $catData = JTable::getInstance('Content', 'JTable'); + $category = JTable::getInstance('Content', 'JTable'); - if ($catData->load(array('alias' => $data['alias'], 'catid' => $data['catid']))) + if ($category->load(array('alias' => $data['alias'], 'catid' => $data['catid']))) { $msg = JText::_('COM_CONTENT_SAVE_WARNING'); } diff --git a/libraries/joomla/form/field.php b/libraries/joomla/form/field.php index f1223bc0c6943..895aa3cb22eb4 100644 --- a/libraries/joomla/form/field.php +++ b/libraries/joomla/form/field.php @@ -286,6 +286,14 @@ abstract class JFormField */ protected $onclick; + /** + * To allow creation of new categories. + * + * @var int + * @since 3.6 + */ + protected $allowAdd; + /** * The count value for generated name field * @@ -393,6 +401,7 @@ public function __get($name) case 'autofocus': case 'autocomplete': case 'spellcheck': + case 'allowAdd': return $this->$name; case 'input': @@ -475,6 +484,7 @@ public function __set($name, $value) case 'readonly': case 'autofocus': case 'hidden': + case 'allowAdd': $value = (string) $value; $this->$name = ($value === 'true' || $value === $name || $value === '1'); break; @@ -569,7 +579,7 @@ public function setup(SimpleXMLElement $element, $value, $group = null) $attributes = array( 'multiple', 'name', 'id', 'hint', 'class', 'description', 'labelclass', 'onchange', - 'onclick', 'validate', 'pattern', 'default', 'required', + 'onclick', 'validate', 'pattern', 'default', 'required', 'allowAdd', 'disabled', 'readonly', 'autofocus', 'hidden', 'autocomplete', 'spellcheck', 'translateHint', 'translateLabel','translate_label', 'translateDescription', 'translate_description' ,'size'); From 9517e73ff064ff22ef4cdcc352271ad573754a61 Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 10:46:43 +0100 Subject: [PATCH 006/294] fixed codestyle --- administrator/components/com_categories/helpers/categories.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_categories/helpers/categories.php b/administrator/components/com_categories/helpers/categories.php index 5b50601a33193..645458e9401cf 100644 --- a/administrator/components/com_categories/helpers/categories.php +++ b/administrator/components/com_categories/helpers/categories.php @@ -141,7 +141,7 @@ public static function getAssociations($pk, $extension = 'com_content') /** * Create new Category from within item view. * - * @param array $data Array of data for new category. + * @param array $data Array of data for new category. * * @return integer. */ From 1a820f9776c5665536f86a46127430621359cac5 Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 10:51:03 +0100 Subject: [PATCH 007/294] changed tooltip text --- administrator/language/en-GB/en-GB.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/language/en-GB/en-GB.ini b/administrator/language/en-GB/en-GB.ini index 63e23be828c06..4d56506796281 100644 --- a/administrator/language/en-GB/en-GB.ini +++ b/administrator/language/en-GB/en-GB.ini @@ -187,7 +187,7 @@ JFIELD_BASIS_LOGOUT_DESCRIPTION_DESC="Text for logout page." JFIELD_BASIS_LOGOUT_DESCRIPTION_LABEL="Logout Description Text" JFIELD_BASIS_LOGOUT_DESCRIPTION_SHOW_DESC="Show or hide logout description." JFIELD_BASIS_LOGOUT_DESCRIPTION_SHOW_LABEL="Logout Text" -JFIELD_CATEGORY_DESC="The category that this item is assigned to." +JFIELD_CATEGORY_DESC="The category that this item is assigned to. You may select an existing category or enter your own category by typing the name in the field and pressing enter." JFIELD_ENABLED_DESC="The enabled status of this item." JFIELD_KEY_REFERENCE_DESC="Used to store information referring to an external resource." JFIELD_KEY_REFERENCE_LABEL="Key Reference" From 67230adc6e47ef440b9ee6413235d2124871b3f6 Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 11:13:58 +0100 Subject: [PATCH 008/294] added Create Category on-the-fly in front-end article edit --- components/com_content/models/forms/article.xml | 5 ++++- language/en-GB/en-GB.ini | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/com_content/models/forms/article.xml b/components/com_content/models/forms/article.xml index 7b2a5808e6b60..499bded9e68d6 100644 --- a/components/com_content/models/forms/article.xml +++ b/components/com_content/models/forms/article.xml @@ -98,7 +98,10 @@ label="JCATEGORY" description="JFIELD_CATEGORY_DESC" class="inputbox" - required="true"> + required="true" + allowAdd="true" + default="" + > Date: Wed, 9 Dec 2015 13:18:49 +0100 Subject: [PATCH 009/294] added check for existing category when using 'INT name' --- .../com_categories/helpers/categories.php | 26 +++++++++++++++++++ .../components/com_content/models/article.php | 15 ++++++++--- administrator/language/en-GB/en-GB.ini | 2 +- language/en-GB/en-GB.ini | 2 +- 4 files changed, 40 insertions(+), 5 deletions(-) diff --git a/administrator/components/com_categories/helpers/categories.php b/administrator/components/com_categories/helpers/categories.php index 645458e9401cf..f758dde6b5be6 100644 --- a/administrator/components/com_categories/helpers/categories.php +++ b/administrator/components/com_categories/helpers/categories.php @@ -138,6 +138,32 @@ public static function getAssociations($pk, $extension = 'com_content') return $associations; } + /** + * Check if Category ID exists otherwise assign to ROOT category. + * + * @param mixed $catid Name or ID of category. + * @param string $extension Extension that triggers this function + * + * @return int $catid Category ID. + */ + public static function validateCategoryId($catid, $extension) + { + JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_categories/tables'); + + $categoryTable = JTable::getInstance('Category'); + + $data = array(); + $data['id'] = $catid; + $data['extension'] = $extension; + + if (!$categoryTable->load($data)) + { + $catid = 0; + } + + return (int) $catid; + } + /** * Create new Category from within item view. * diff --git a/administrator/components/com_content/models/article.php b/administrator/components/com_content/models/article.php index d11a4bd110ccf..0b52429ad47e8 100644 --- a/administrator/components/com_content/models/article.php +++ b/administrator/components/com_content/models/article.php @@ -487,11 +487,20 @@ public function save($data) $data['images'] = (string) $registry; } - // Save New Category - if ((int) $data['catid'] == 0) + require_once JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'; + + // Cast catid to integer for comparison + $catid = (int) $data['catid']; + + // Check if New Category exists + if ($catid > 0) { - require_once JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'; + $catid = CategoriesHelper::validateCategoryId($data['catid'], 'com_content'); + } + // Save New Category + if ($catid == 0) + { $category = array(); $category['title'] = $data['catid']; $category['parent_id'] = 1; diff --git a/administrator/language/en-GB/en-GB.ini b/administrator/language/en-GB/en-GB.ini index 4d56506796281..70473b670f8af 100644 --- a/administrator/language/en-GB/en-GB.ini +++ b/administrator/language/en-GB/en-GB.ini @@ -187,7 +187,7 @@ JFIELD_BASIS_LOGOUT_DESCRIPTION_DESC="Text for logout page." JFIELD_BASIS_LOGOUT_DESCRIPTION_LABEL="Logout Description Text" JFIELD_BASIS_LOGOUT_DESCRIPTION_SHOW_DESC="Show or hide logout description." JFIELD_BASIS_LOGOUT_DESCRIPTION_SHOW_LABEL="Logout Text" -JFIELD_CATEGORY_DESC="The category that this item is assigned to. You may select an existing category or enter your own category by typing the name in the field and pressing enter." +JFIELD_CATEGORY_DESC="The category that this item is assigned to. You may select an existing category or enter a NEW category by typing the name in the field and pressing enter." JFIELD_ENABLED_DESC="The enabled status of this item." JFIELD_KEY_REFERENCE_DESC="Used to store information referring to an external resource." JFIELD_KEY_REFERENCE_LABEL="Key Reference" diff --git a/language/en-GB/en-GB.ini b/language/en-GB/en-GB.ini index c2a7d41cf8374..728d7614191db 100644 --- a/language/en-GB/en-GB.ini +++ b/language/en-GB/en-GB.ini @@ -147,8 +147,8 @@ JFIELD_ORDERING_LABEL="Ordering" JFIELD_PUBLISHED_DESC="Set publication status." JFIELD_TITLE_DESC="Title for the article." -JGLOBAL_ARTICLES="Articles" JGLOBAL_ADD_CUSTOM_CATEGORY="Add new Category" +JGLOBAL_ARTICLES="Articles" JGLOBAL_AUTH_ACCESS_DENIED="Access Denied" JGLOBAL_AUTH_ACCESS_GRANTED="Access Granted" JGLOBAL_AUTH_BIND_FAILED="Failed binding to LDAP server" From 6c4866ecef92493b85fadad9e9c1b3099e4a66a3 Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 14:13:00 +0100 Subject: [PATCH 010/294] restructured code from field to categoryedit --- .../models/fields/categoryedit.php | 80 +++++++++++++++++++ .../components/com_content/models/article.php | 18 ++--- libraries/joomla/form/field.php | 13 +-- 3 files changed, 90 insertions(+), 21 deletions(-) diff --git a/administrator/components/com_categories/models/fields/categoryedit.php b/administrator/components/com_categories/models/fields/categoryedit.php index fa23ffda033ce..dbb963639dc23 100644 --- a/administrator/components/com_categories/models/fields/categoryedit.php +++ b/administrator/components/com_categories/models/fields/categoryedit.php @@ -20,6 +20,14 @@ */ class JFormFieldCategoryEdit extends JFormFieldList { + /** + * To allow creation of new categories. + * + * @var int + * @since 3.6 + */ + protected $allowAdd; + /** * A flexible category list that respects access controls * @@ -28,6 +36,78 @@ class JFormFieldCategoryEdit extends JFormFieldList */ public $type = 'CategoryEdit'; + /** + * Method to attach a JForm object to the field. + * + * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. + * @param mixed $value The form field value to validate. + * @param string $group The field name group control value. This acts as as an array container for the field. + * For example if the field has name="foo" and the group value is set to "bar" then the + * full field name would end up being "bar[foo]". + * + * @return boolean True on success. + * + * @see JFormField::setup() + * @since 3.2 + */ + public function setup(SimpleXMLElement $element, $value, $group = null) + { + $return = parent::setup($element, $value, $group); + + if ($return) + { + $this->allowAdd = isset($this->element['allowAdd']) ? $this->element['allowAdd'] : ''; + } + + return $return; + } + + + /** + * Method to get certain otherwise inaccessible properties from the form field object. + * + * @param string $name The property name for which to the the value. + * + * @return mixed The property value or null. + * + * @since 3.6 + */ + public function __get($name) + { + switch ($name) + { + case 'allowAdd': + return $this->$name; + } + + return parent::__get($name); + } + + /** + * Method to set certain otherwise inaccessible properties of the form field object. + * + * @param string $name The property name for which to the the value. + * @param mixed $value The value of the property. + * + * @return void + * + * @since 3.6 + */ + public function __set($name, $value) + { + $value = (string) $value; + + switch ($name) + { + case 'allowAdd': + $value = (string) $value; + $this->$name = ($value === 'true' || $value === $name || $value === '1'); + break; + default: + parent::__set($name, $value); + } + } + /** * Method to get a list of categories that respects access controls and can be used for * either category assignment or parent category assignment in edit screens. diff --git a/administrator/components/com_content/models/article.php b/administrator/components/com_content/models/article.php index 0b52429ad47e8..7652cd58ebffe 100644 --- a/administrator/components/com_content/models/article.php +++ b/administrator/components/com_content/models/article.php @@ -501,15 +501,15 @@ public function save($data) // Save New Category if ($catid == 0) { - $category = array(); - $category['title'] = $data['catid']; - $category['parent_id'] = 1; - $category['extension'] = 'com_content'; - $category['language'] = $data['language']; - $category['published'] = 1; + $table = array(); + $table['title'] = $data['catid']; + $table['parent_id'] = 1; + $table['extension'] = 'com_content'; + $table['language'] = $data['language']; + $table['published'] = 1; // Create new category and get catid back - $data['catid'] = CategoriesHelper::createCategory($category); + $data['catid'] = CategoriesHelper::createCategory($table); } if (isset($data['urls']) && is_array($data['urls'])) @@ -576,9 +576,9 @@ public function save($data) $data['alias'] = JFilterOutput::stringURLSafe($data['title']); } - $category = JTable::getInstance('Content', 'JTable'); + $table = JTable::getInstance('Content', 'JTable'); - if ($category->load(array('alias' => $data['alias'], 'catid' => $data['catid']))) + if ($table->load(array('alias' => $data['alias'], 'catid' => $data['catid']))) { $msg = JText::_('COM_CONTENT_SAVE_WARNING'); } diff --git a/libraries/joomla/form/field.php b/libraries/joomla/form/field.php index 895aa3cb22eb4..ceaadc195fb9a 100644 --- a/libraries/joomla/form/field.php +++ b/libraries/joomla/form/field.php @@ -286,14 +286,6 @@ abstract class JFormField */ protected $onclick; - /** - * To allow creation of new categories. - * - * @var int - * @since 3.6 - */ - protected $allowAdd; - /** * The count value for generated name field * @@ -401,8 +393,6 @@ public function __get($name) case 'autofocus': case 'autocomplete': case 'spellcheck': - case 'allowAdd': - return $this->$name; case 'input': // If the input hasn't yet been generated, generate it. @@ -484,7 +474,6 @@ public function __set($name, $value) case 'readonly': case 'autofocus': case 'hidden': - case 'allowAdd': $value = (string) $value; $this->$name = ($value === 'true' || $value === $name || $value === '1'); break; @@ -579,7 +568,7 @@ public function setup(SimpleXMLElement $element, $value, $group = null) $attributes = array( 'multiple', 'name', 'id', 'hint', 'class', 'description', 'labelclass', 'onchange', - 'onclick', 'validate', 'pattern', 'default', 'required', 'allowAdd', + 'onclick', 'validate', 'pattern', 'default', 'required', 'disabled', 'readonly', 'autofocus', 'hidden', 'autocomplete', 'spellcheck', 'translateHint', 'translateLabel','translate_label', 'translateDescription', 'translate_description' ,'size'); From b493f59023e2ded22005c237517890b74dbd722f Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 14:16:50 +0100 Subject: [PATCH 011/294] lowercase correction --- administrator/language/en-GB/en-GB.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/language/en-GB/en-GB.ini b/administrator/language/en-GB/en-GB.ini index 70473b670f8af..9322082cf59b4 100644 --- a/administrator/language/en-GB/en-GB.ini +++ b/administrator/language/en-GB/en-GB.ini @@ -187,7 +187,7 @@ JFIELD_BASIS_LOGOUT_DESCRIPTION_DESC="Text for logout page." JFIELD_BASIS_LOGOUT_DESCRIPTION_LABEL="Logout Description Text" JFIELD_BASIS_LOGOUT_DESCRIPTION_SHOW_DESC="Show or hide logout description." JFIELD_BASIS_LOGOUT_DESCRIPTION_SHOW_LABEL="Logout Text" -JFIELD_CATEGORY_DESC="The category that this item is assigned to. You may select an existing category or enter a NEW category by typing the name in the field and pressing enter." +JFIELD_CATEGORY_DESC="The category that this item is assigned to. You may select an existing category or enter a new category by typing the name in the field and pressing enter." JFIELD_ENABLED_DESC="The enabled status of this item." JFIELD_KEY_REFERENCE_DESC="Used to store information referring to an external resource." JFIELD_KEY_REFERENCE_LABEL="Key Reference" From 3bd9330e34948a619a09b253f141fac8776d0305 Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 14:39:08 +0100 Subject: [PATCH 012/294] code fix --- libraries/joomla/form/field.php | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/joomla/form/field.php b/libraries/joomla/form/field.php index ceaadc195fb9a..f1223bc0c6943 100644 --- a/libraries/joomla/form/field.php +++ b/libraries/joomla/form/field.php @@ -393,6 +393,7 @@ public function __get($name) case 'autofocus': case 'autocomplete': case 'spellcheck': + return $this->$name; case 'input': // If the input hasn't yet been generated, generate it. From 3f1f9622fd90869f628a6b4937ca3af5c1352cef Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 15:00:49 +0100 Subject: [PATCH 013/294] create Categories on-the-fly on Banner edit form --- .../components/com_banners/models/banner.php | 25 +++++++++++++++++++ .../com_banners/models/forms/banner.xml | 5 +++- .../com_banners/views/banner/tmpl/edit.php | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_banners/models/banner.php b/administrator/components/com_banners/models/banner.php index 57cd7d93ca485..c2130870d57af 100644 --- a/administrator/components/com_banners/models/banner.php +++ b/administrator/components/com_banners/models/banner.php @@ -486,6 +486,31 @@ public function save($data) { $input = JFactory::getApplication()->input; + require_once JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'; + + // Cast catid to integer for comparison + $catid = (int) $data['catid']; + + // Check if New Category exists + if ($catid > 0) + { + $catid = CategoriesHelper::validateCategoryId($data['catid'], 'com_banners'); + } + + // Save New Category + if ($catid == 0) + { + $table = array(); + $table['title'] = $data['catid']; + $table['parent_id'] = 1; + $table['extension'] = 'com_banners'; + $table['language'] = $data['language']; + $table['published'] = 1; + + // Create new category and get catid back + $data['catid'] = CategoriesHelper::createCategory($table); + } + // Alter the name for save as copy if ($input->get('task') == 'save2copy') { diff --git a/administrator/components/com_banners/models/forms/banner.xml b/administrator/components/com_banners/models/forms/banner.xml index 51b66530d3abd..9386b525838b5 100644 --- a/administrator/components/com_banners/models/forms/banner.xml +++ b/administrator/components/com_banners/models/forms/banner.xml @@ -20,7 +20,10 @@ + addfieldpath="/administrator/components/com_categories/models/fields" + allowAdd="true" + default="" + /> 0 )); JFactory::getDocument()->addScriptDeclaration(' Joomla.submitbutton = function(task) From a7ef632ce49dea3d95547810f831be8cbfd20b7d Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 16:23:25 +0100 Subject: [PATCH 014/294] codestyle fix --- .../components/com_categories/models/fields/categoryedit.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/administrator/components/com_categories/models/fields/categoryedit.php b/administrator/components/com_categories/models/fields/categoryedit.php index dbb963639dc23..3e96fee391709 100644 --- a/administrator/components/com_categories/models/fields/categoryedit.php +++ b/administrator/components/com_categories/models/fields/categoryedit.php @@ -61,8 +61,7 @@ public function setup(SimpleXMLElement $element, $value, $group = null) return $return; } - - + /** * Method to get certain otherwise inaccessible properties from the form field object. * From 8b37390ab00f1f20dc6753de43a76c76c5a958fc Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 16:37:00 +0100 Subject: [PATCH 015/294] Create Categories on-the-fly on Contact edit form --- .../components/com_contact/models/contact.php | 25 +++++++++++++++++++ .../com_contact/models/forms/contact.xml | 2 ++ 2 files changed, 27 insertions(+) diff --git a/administrator/components/com_contact/models/contact.php b/administrator/components/com_contact/models/contact.php index b06c723933c3a..50e4688cc91ea 100644 --- a/administrator/components/com_contact/models/contact.php +++ b/administrator/components/com_contact/models/contact.php @@ -384,6 +384,31 @@ public function save($data) { $input = JFactory::getApplication()->input; + require_once JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'; + + // Cast catid to integer for comparison + $catid = (int) $data['catid']; + + // Check if New Category exists + if ($catid > 0) + { + $catid = CategoriesHelper::validateCategoryId($data['catid'], 'com_contact'); + } + + // Save New Category + if ($catid == 0) + { + $table = array(); + $table['title'] = $data['catid']; + $table['parent_id'] = 1; + $table['extension'] = 'com_contact'; + $table['language'] = $data['language']; + $table['published'] = 1; + + // Create new category and get catid back + $data['catid'] = CategoriesHelper::createCategory($table); + } + // Alter the name for save as copy if ($input->get('task') == 'save2copy') { diff --git a/administrator/components/com_contact/models/forms/contact.xml b/administrator/components/com_contact/models/forms/contact.xml index 726ef91c12b17..2dc780a6a5c3f 100644 --- a/administrator/components/com_contact/models/forms/contact.xml +++ b/administrator/components/com_contact/models/forms/contact.xml @@ -69,6 +69,8 @@ label="JCATEGORY" description="JFIELD_CATEGORY_DESC" required="true" + allowAdd="true" + default="" /> Date: Wed, 9 Dec 2015 16:52:35 +0100 Subject: [PATCH 016/294] changed require_once to JLoader::register + codestyle fix --- .../components/com_categories/models/fields/categoryedit.php | 2 +- administrator/components/com_content/models/article.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_categories/models/fields/categoryedit.php b/administrator/components/com_categories/models/fields/categoryedit.php index 3e96fee391709..01db332a5a6dd 100644 --- a/administrator/components/com_categories/models/fields/categoryedit.php +++ b/administrator/components/com_categories/models/fields/categoryedit.php @@ -61,7 +61,7 @@ public function setup(SimpleXMLElement $element, $value, $group = null) return $return; } - + /** * Method to get certain otherwise inaccessible properties from the form field object. * diff --git a/administrator/components/com_content/models/article.php b/administrator/components/com_content/models/article.php index 7652cd58ebffe..43589296b8507 100644 --- a/administrator/components/com_content/models/article.php +++ b/administrator/components/com_content/models/article.php @@ -487,7 +487,7 @@ public function save($data) $data['images'] = (string) $registry; } - require_once JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'; + JLoader::register('CategoriesHelper', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'); // Cast catid to integer for comparison $catid = (int) $data['catid']; From e57d2eebb56df22bb47168244d158f7b758e9e2b Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 16:54:40 +0100 Subject: [PATCH 017/294] changed require_once to JLoader::register --- administrator/components/com_banners/models/banner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_banners/models/banner.php b/administrator/components/com_banners/models/banner.php index c2130870d57af..0bde063ae459c 100644 --- a/administrator/components/com_banners/models/banner.php +++ b/administrator/components/com_banners/models/banner.php @@ -486,7 +486,7 @@ public function save($data) { $input = JFactory::getApplication()->input; - require_once JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'; + JLoader::register('CategoriesHelper', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'); // Cast catid to integer for comparison $catid = (int) $data['catid']; From c3997c0c98896229f362b51ada26dcc78c02c0aa Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 16:58:06 +0100 Subject: [PATCH 018/294] changed require_once to JLoader::register --- administrator/components/com_contact/models/contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_contact/models/contact.php b/administrator/components/com_contact/models/contact.php index 50e4688cc91ea..90162f7fece7c 100644 --- a/administrator/components/com_contact/models/contact.php +++ b/administrator/components/com_contact/models/contact.php @@ -384,7 +384,7 @@ public function save($data) { $input = JFactory::getApplication()->input; - require_once JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'; + JLoader::register('CategoriesHelper', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'); // Cast catid to integer for comparison $catid = (int) $data['catid']; From 0d3eda7855485eed2482d36bfa4afe13695a6d4f Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 17:16:49 +0100 Subject: [PATCH 019/294] Create Categories on-the-fly on Newsfeed edit form --- .../com_newsfeeds/models/forms/newsfeed.xml | 11 +++++--- .../com_newsfeeds/models/newsfeed.php | 25 +++++++++++++++++++ .../views/newsfeed/tmpl/edit.php | 2 +- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/administrator/components/com_newsfeeds/models/forms/newsfeed.xml b/administrator/components/com_newsfeeds/models/forms/newsfeed.xml index 01ded7187560e..cfdb942087047 100644 --- a/administrator/components/com_newsfeeds/models/forms/newsfeed.xml +++ b/administrator/components/com_newsfeeds/models/forms/newsfeed.xml @@ -30,9 +30,14 @@ JTRASHED - diff --git a/administrator/components/com_newsfeeds/models/newsfeed.php b/administrator/components/com_newsfeeds/models/newsfeed.php index 006adadc79c30..9b952f091b7c8 100644 --- a/administrator/components/com_newsfeeds/models/newsfeed.php +++ b/administrator/components/com_newsfeeds/models/newsfeed.php @@ -302,6 +302,31 @@ public function save($data) { $input = JFactory::getApplication()->input; + JLoader::register('CategoriesHelper', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php'); + + // Cast catid to integer for comparison + $catid = (int) $data['catid']; + + // Check if New Category exists + if ($catid > 0) + { + $catid = CategoriesHelper::validateCategoryId($data['catid'], 'com_newsfeeds'); + } + + // Save New Category + if ($catid == 0) + { + $table = array(); + $table['title'] = $data['catid']; + $table['parent_id'] = 1; + $table['extension'] = 'com_newsfeeds'; + $table['language'] = $data['language']; + $table['published'] = 1; + + // Create new category and get catid back + $data['catid'] = CategoriesHelper::createCategory($table); + } + // Alter the name for save as copy if ($input->get('task') == 'save2copy') { diff --git a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php index 179fe6ae80569..3b85de4d59a59 100644 --- a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php +++ b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php @@ -14,7 +14,7 @@ JHtml::_('behavior.formvalidator'); JHtml::_('behavior.keepalive'); -JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('formbehavior.chosen', 'select', null, array('disable_search_threshold' => 0 )); $app = JFactory::getApplication(); $input = $app->input; From cf87097eba9f67ce155aca71bc643d1f63375bbe Mon Sep 17 00:00:00 2001 From: pe7er Date: Wed, 9 Dec 2015 17:49:14 +0100 Subject: [PATCH 020/294] codestyle fix --- administrator/components/com_categories/helpers/categories.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_categories/helpers/categories.php b/administrator/components/com_categories/helpers/categories.php index f758dde6b5be6..5f263761acf6c 100644 --- a/administrator/components/com_categories/helpers/categories.php +++ b/administrator/components/com_categories/helpers/categories.php @@ -141,7 +141,7 @@ public static function getAssociations($pk, $extension = 'com_content') /** * Check if Category ID exists otherwise assign to ROOT category. * - * @param mixed $catid Name or ID of category. + * @param mixed $catid Name or ID of category. * @param string $extension Extension that triggers this function * * @return int $catid Category ID. From c05537939099d815ec49fb9676c955ec18d61e85 Mon Sep 17 00:00:00 2001 From: pe7er Date: Sat, 12 Dec 2015 12:57:25 +0100 Subject: [PATCH 021/294] removed front-end category creation in article edit --- components/com_content/models/forms/article.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/com_content/models/forms/article.xml b/components/com_content/models/forms/article.xml index 499bded9e68d6..3708ed76454e5 100644 --- a/components/com_content/models/forms/article.xml +++ b/components/com_content/models/forms/article.xml @@ -99,8 +99,6 @@ description="JFIELD_CATEGORY_DESC" class="inputbox" required="true" - allowAdd="true" - default="" > From b8f060a63a2d1faefbb7157b42adbe4cbbae1511 Mon Sep 17 00:00:00 2001 From: Chris Davenport Date: Wed, 16 Dec 2015 20:58:44 +0000 Subject: [PATCH 022/294] Add extendWhere, orWhere and andWhere methods to database query class. --- libraries/joomla/database/query.php | 65 +++++++ libraries/joomla/database/query/element.php | 16 ++ .../joomla/database/JDatabaseQueryTest.php | 159 ++++++++++++++++++ 3 files changed, 240 insertions(+) diff --git a/libraries/joomla/database/query.php b/libraries/joomla/database/query.php index fe1c33b4598de..f77563bd6c9a7 100644 --- a/libraries/joomla/database/query.php +++ b/libraries/joomla/database/query.php @@ -1385,6 +1385,71 @@ public function where($conditions, $glue = 'AND') return $this; } + /** + * Extend the WHERE clause with a single condition or an array of conditions, with a potentially + * different logical operator from the one in the current WHERE clause. + * + * Usage: + * $query->where(array('a = 1', 'b = 2'))->extendWhere('XOR', array('c = 3', 'd = 4')); + * will produce: WHERE ((a = 1 AND b = 2) XOR (c = 3 AND d = 4) + * + * @param string $outerGlue The glue by which to join the conditions to the current WHERE conditions. + * @param mixed $conditions A string or array of WHERE conditions. + * @param string $innerGlue The glue by which to join the conditions. Defaults to AND. + * + * @return JDatabaseQuery Returns this object to allow chaining. + * + * @since 3.5 + */ + public function extendWhere($outerGlue, $conditions, $innerGlue = 'AND') + { + // Replace the current WHERE with a new one which has the old one as an unnamed child. + $this->where = new JDatabaseQueryElement('WHERE', $this->where->setName('()'), " $outerGlue "); + + // Append the new conditions as a new unnamed child. + $this->where->append(new JDatabaseQueryElement('()', $conditions, " $innerGlue ")); + + return $this; + } + + /** + * Extend the WHERE clause with an OR and a single condition or an array of conditions. + * + * Usage: + * $query->where(array('a = 1', 'b = 2'))->orWhere(array('c = 3', 'd = 4')); + * will produce: WHERE ((a = 1 AND b = 2) OR (c = 3 AND d = 4) + * + * @param mixed $conditions A string or array of WHERE conditions. + * @param string $glue The glue by which to join the conditions. Defaults to AND. + * + * @return JDatabaseQuery Returns this object to allow chaining. + * + * @since 3.5 + */ + public function orWhere($conditions, $glue = 'AND') + { + return $this->extendWhere('OR', $conditions, $glue); + } + + /** + * Extend the WHERE clause with an AND and a single condition or an array of conditions. + * + * Usage: + * $query->where(array('a = 1', 'b = 2'))->andWhere(array('c = 3', 'd = 4')); + * will produce: WHERE ((a = 1 AND b = 2) AND (c = 3 OR d = 4) + * + * @param mixed $conditions A string or array of WHERE conditions. + * @param string $glue The glue by which to join the conditions. Defaults to OR. + * + * @return JDatabaseQuery Returns this object to allow chaining. + * + * @since 3.5 + */ + public function andWhere($conditions, $glue = 'OR') + { + return $this->extendWhere('AND', $conditions, $glue); + } + /** * Method to provide deep copy support to nested objects and * arrays when cloning. diff --git a/libraries/joomla/database/query/element.php b/libraries/joomla/database/query/element.php index bcbe262ccf508..2024281b36cf2 100644 --- a/libraries/joomla/database/query/element.php +++ b/libraries/joomla/database/query/element.php @@ -108,6 +108,22 @@ public function getElements() return $this->elements; } + /** + * Sets the name of this element. + * + * @param string $name Name of the element. + * + * @return JDatabaseQueryElement Returns this object to allow chaining. + * + * @since 3.5 + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + /** * Method to provide deep copy support to nested objects and arrays * when cloning. diff --git a/tests/unit/suites/libraries/joomla/database/JDatabaseQueryTest.php b/tests/unit/suites/libraries/joomla/database/JDatabaseQueryTest.php index 445ea73d15c91..184b1aef24ffc 100644 --- a/tests/unit/suites/libraries/joomla/database/JDatabaseQueryTest.php +++ b/tests/unit/suites/libraries/joomla/database/JDatabaseQueryTest.php @@ -1451,6 +1451,15 @@ public function testWhere() 'Tests rendered value after second use and array input.' ); + // Add more columns but specify different glue. + // Note that the change of glue is ignored. + $this->_instance->where(array('faz = 4', 'gaz = 5'), 'OR'); + $this->assertThat( + trim(TestReflection::getValue($this->_instance, 'where')), + $this->equalTo('WHERE foo = 1 AND bar = 2 AND goo = 3 AND faz = 4 AND gaz = 5'), + 'Tests rendered value after third use, array input and different glue.' + ); + // Clear the where TestReflection::setValue($this->_instance, 'where', null); $this->_instance->where(array('bar = 2', 'goo = 3'), 'OR'); @@ -1462,6 +1471,156 @@ public function testWhere() ); } + /** + * Tests the JDatabaseQuery::extendWhere method. + * + * @return void + * + * @since 3.5 + */ + public function testExtendWhere() + { + $this->assertThat( + $this->_instance->where('foo = 1')->extendWhere('ABC', 'bar = 2'), + $this->identicalTo($this->_instance), + 'Tests chaining.' + ); + + $this->assertThat( + trim(TestReflection::getValue($this->_instance, 'where')), + $this->equalTo('WHERE ' + . PHP_EOL . '(foo = 1) ABC ' + . PHP_EOL . '(bar = 2)'), + 'Tests rendered value.' + ); + + // Add another set of where conditions. + $this->_instance->extendWhere('XYZ', array('baz = 3', 'goo = 4')); + $this->assertThat( + trim(TestReflection::getValue($this->_instance, 'where')), + $this->equalTo('WHERE ' + . PHP_EOL . '(' + . PHP_EOL . '(foo = 1) ABC ' + . PHP_EOL . '(bar = 2)) XYZ ' + . PHP_EOL . '(baz = 3 AND goo = 4)'), + 'Tests rendered value after second use and array input.' + ); + + // Add another set of where conditions with some different glue. + $this->_instance->extendWhere('STU', array('faz = 5', 'gaz = 6'), 'VWX'); + $this->assertThat( + trim(TestReflection::getValue($this->_instance, 'where')), + $this->equalTo('WHERE ' + . PHP_EOL . '(' + . PHP_EOL . '(' + . PHP_EOL . '(foo = 1) ABC ' + . PHP_EOL . '(bar = 2)) XYZ ' + . PHP_EOL . '(baz = 3 AND goo = 4)) STU ' + . PHP_EOL . '(faz = 5 VWX gaz = 6)'), + 'Tests rendered value after third use, array input and different glue.' + ); + } + + /** + * Tests the JDatabaseQuery::orWhere method. + * + * @return void + * + * @since 3.5 + */ + public function testOrWhere() + { + $this->assertThat( + $this->_instance->where('foo = 1')->orWhere('bar = 2'), + $this->identicalTo($this->_instance), + 'Tests chaining.' + ); + + $this->assertThat( + trim(TestReflection::getValue($this->_instance, 'where')), + $this->equalTo('WHERE ' + . PHP_EOL . '(foo = 1) OR ' + . PHP_EOL . '(bar = 2)'), + 'Tests rendered value.' + ); + + // Add another set of where conditions. + $this->_instance->orWhere(array('baz = 3', 'goo = 4')); + $this->assertThat( + trim(TestReflection::getValue($this->_instance, 'where')), + $this->equalTo('WHERE ' + . PHP_EOL . '(' + . PHP_EOL . '(foo = 1) OR ' + . PHP_EOL . '(bar = 2)) OR ' + . PHP_EOL . '(baz = 3 AND goo = 4)'), + 'Tests rendered value after second use and array input.' + ); + + // Add another set of where conditions with some different glue. + $this->_instance->orWhere(array('faz = 5', 'gaz = 6'), 'XOR'); + $this->assertThat( + trim(TestReflection::getValue($this->_instance, 'where')), + $this->equalTo('WHERE ' + . PHP_EOL . '(' + . PHP_EOL . '(' + . PHP_EOL . '(foo = 1) OR ' + . PHP_EOL . '(bar = 2)) OR ' + . PHP_EOL . '(baz = 3 AND goo = 4)) OR ' + . PHP_EOL . '(faz = 5 XOR gaz = 6)'), + 'Tests rendered value after third use, array input and different glue.' + ); + } + + /** + * Tests the JDatabaseQuery::andWhere method. + * + * @return void + * + * @since 3.5 + */ + public function testAndWhere() + { + $this->assertThat( + $this->_instance->where('foo = 1')->andWhere('bar = 2'), + $this->identicalTo($this->_instance), + 'Tests chaining.' + ); + + $this->assertThat( + trim(TestReflection::getValue($this->_instance, 'where')), + $this->equalTo('WHERE ' + . PHP_EOL . '(foo = 1) AND ' + . PHP_EOL . '(bar = 2)'), + 'Tests rendered value.' + ); + + // Add another set of where conditions. + $this->_instance->andWhere(array('baz = 3', 'goo = 4')); + $this->assertThat( + trim(TestReflection::getValue($this->_instance, 'where')), + $this->equalTo('WHERE ' + . PHP_EOL . '(' + . PHP_EOL . '(foo = 1) AND ' + . PHP_EOL . '(bar = 2)) AND ' + . PHP_EOL . '(baz = 3 OR goo = 4)'), + 'Tests rendered value after second use and array input.' + ); + + // Add another set of where conditions with some different glue. + $this->_instance->andWhere(array('faz = 5', 'gaz = 6'), 'XOR'); + $this->assertThat( + trim(TestReflection::getValue($this->_instance, 'where')), + $this->equalTo('WHERE ' + . PHP_EOL . '(' + . PHP_EOL . '(' + . PHP_EOL . '(foo = 1) AND ' + . PHP_EOL . '(bar = 2)) AND ' + . PHP_EOL . '(baz = 3 OR goo = 4)) AND ' + . PHP_EOL . '(faz = 5 XOR gaz = 6)'), + 'Tests rendered value after third use, array input and different glue.' + ); + } + /** * Tests the JDatabaseQuery::__clone method properly clones an array. * From 7cefbf23d165d87a22bf24c56efb682cd1a4faa5 Mon Sep 17 00:00:00 2001 From: Chris Davenport Date: Sat, 19 Dec 2015 19:06:14 +0000 Subject: [PATCH 023/294] Changed @since tags to 3.6. --- libraries/joomla/database/query.php | 6 +++--- libraries/joomla/database/query/element.php | 2 +- .../suites/libraries/joomla/database/JDatabaseQueryTest.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/joomla/database/query.php b/libraries/joomla/database/query.php index f77563bd6c9a7..e8a9202352b13 100644 --- a/libraries/joomla/database/query.php +++ b/libraries/joomla/database/query.php @@ -1399,7 +1399,7 @@ public function where($conditions, $glue = 'AND') * * @return JDatabaseQuery Returns this object to allow chaining. * - * @since 3.5 + * @since 3.6 */ public function extendWhere($outerGlue, $conditions, $innerGlue = 'AND') { @@ -1424,7 +1424,7 @@ public function extendWhere($outerGlue, $conditions, $innerGlue = 'AND') * * @return JDatabaseQuery Returns this object to allow chaining. * - * @since 3.5 + * @since 3.6 */ public function orWhere($conditions, $glue = 'AND') { @@ -1443,7 +1443,7 @@ public function orWhere($conditions, $glue = 'AND') * * @return JDatabaseQuery Returns this object to allow chaining. * - * @since 3.5 + * @since 3.6 */ public function andWhere($conditions, $glue = 'OR') { diff --git a/libraries/joomla/database/query/element.php b/libraries/joomla/database/query/element.php index 2024281b36cf2..404ff00a278fd 100644 --- a/libraries/joomla/database/query/element.php +++ b/libraries/joomla/database/query/element.php @@ -115,7 +115,7 @@ public function getElements() * * @return JDatabaseQueryElement Returns this object to allow chaining. * - * @since 3.5 + * @since 3.6 */ public function setName($name) { diff --git a/tests/unit/suites/libraries/joomla/database/JDatabaseQueryTest.php b/tests/unit/suites/libraries/joomla/database/JDatabaseQueryTest.php index 184b1aef24ffc..476cdeee0dcac 100644 --- a/tests/unit/suites/libraries/joomla/database/JDatabaseQueryTest.php +++ b/tests/unit/suites/libraries/joomla/database/JDatabaseQueryTest.php @@ -1476,7 +1476,7 @@ public function testWhere() * * @return void * - * @since 3.5 + * @since 3.6 */ public function testExtendWhere() { @@ -1526,7 +1526,7 @@ public function testExtendWhere() * * @return void * - * @since 3.5 + * @since 3.6 */ public function testOrWhere() { @@ -1576,7 +1576,7 @@ public function testOrWhere() * * @return void * - * @since 3.5 + * @since 3.6 */ public function testAndWhere() { From baf3f1ea935754c968e1fd4f3751eeaeb82d9762 Mon Sep 17 00:00:00 2001 From: Hannes Papenberg Date: Wed, 24 Feb 2016 17:07:07 +0100 Subject: [PATCH 024/294] Improving JTableNested::delete() --- libraries/joomla/table/nested.php | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/libraries/joomla/table/nested.php b/libraries/joomla/table/nested.php index 42d0b68569770..4b9132ce0fb15 100644 --- a/libraries/joomla/table/nested.php +++ b/libraries/joomla/table/nested.php @@ -591,18 +591,12 @@ public function delete($pk = null, $children = true) ->where('lft BETWEEN ' . (int) $node->lft . ' AND ' . (int) $node->rgt); $this->_runQuery($query, 'JLIB_DATABASE_ERROR_DELETE_FAILED'); - // Compress the left values. + // Compress the left and right values. $query->clear() ->update($this->_tbl) ->set('lft = lft - ' . (int) $node->width) - ->where('lft > ' . (int) $node->rgt); - $this->_runQuery($query, 'JLIB_DATABASE_ERROR_DELETE_FAILED'); - - // Compress the right values. - $query->clear() - ->update($this->_tbl) ->set('rgt = rgt - ' . (int) $node->width) - ->where('rgt > ' . (int) $node->rgt); + ->where('lft > ' . (int) $node->rgt); $this->_runQuery($query, 'JLIB_DATABASE_ERROR_DELETE_FAILED'); } // Leave the children and move them up a level. @@ -630,18 +624,12 @@ public function delete($pk = null, $children = true) ->where('parent_id = ' . (int) $node->$k); $this->_runQuery($query, 'JLIB_DATABASE_ERROR_DELETE_FAILED'); - // Shift all of the left values that are right of the node. + // Shift all of the left and right values that are right of the node. $query->clear() ->update($this->_tbl) ->set('lft = lft - 2') - ->where('lft > ' . (int) $node->rgt); - $this->_runQuery($query, 'JLIB_DATABASE_ERROR_DELETE_FAILED'); - - // Shift all of the right values that are right of the node. - $query->clear() - ->update($this->_tbl) ->set('rgt = rgt - 2') - ->where('rgt > ' . (int) $node->rgt); + ->where('lft > ' . (int) $node->rgt); $this->_runQuery($query, 'JLIB_DATABASE_ERROR_DELETE_FAILED'); } From 0ba9244938d98537fb3408af73822647adf2292e Mon Sep 17 00:00:00 2001 From: dgt41 Date: Thu, 7 Apr 2016 23:57:06 +0300 Subject: [PATCH 025/294] init --- administrator/components/com_plugins/models/plugin.php | 3 +++ plugins/editors/tinymce/{fields => field}/skins.php | 0 plugins/editors/tinymce/tinymce.xml | 2 +- plugins/system/stats/stats.xml | 2 +- plugins/user/profile/{fields => field}/dob.php | 0 plugins/user/profile/{fields => field}/tos.php | 0 plugins/user/profile/profile.xml | 2 +- 7 files changed, 6 insertions(+), 3 deletions(-) rename plugins/editors/tinymce/{fields => field}/skins.php (100%) rename plugins/user/profile/{fields => field}/dob.php (100%) rename plugins/user/profile/{fields => field}/tos.php (100%) diff --git a/administrator/components/com_plugins/models/plugin.php b/administrator/components/com_plugins/models/plugin.php index e1d76df586ed9..8acc1e79d34f8 100644 --- a/administrator/components/com_plugins/models/plugin.php +++ b/administrator/components/com_plugins/models/plugin.php @@ -81,6 +81,9 @@ public function getForm($data = array(), $loadData = true) $element = JArrayHelper::getValue($data, 'element', '', 'cmd'); } + // Add the default fields directory + JForm::addFieldPath(JPATH_PLUGINS . '/' . $folder . '/' . $element . '/field'); + // These variables are used to add data from the plugin XML files. $this->setState('item.folder', $folder); $this->setState('item.element', $element); diff --git a/plugins/editors/tinymce/fields/skins.php b/plugins/editors/tinymce/field/skins.php similarity index 100% rename from plugins/editors/tinymce/fields/skins.php rename to plugins/editors/tinymce/field/skins.php diff --git a/plugins/editors/tinymce/tinymce.xml b/plugins/editors/tinymce/tinymce.xml index eeb993717ddb8..080f61dbbe9f0 100644 --- a/plugins/editors/tinymce/tinymce.xml +++ b/plugins/editors/tinymce/tinymce.xml @@ -22,7 +22,7 @@ -
+
en-GB/en-GB.plg_system_stats.sys.ini - +
-
+
Date: Fri, 8 Apr 2016 00:07:57 +0300 Subject: [PATCH 026/294] init --- administrator/components/com_modules/models/module.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/administrator/components/com_modules/models/module.php b/administrator/components/com_modules/models/module.php index 06d3f152be9b0..6409cc4af8694 100644 --- a/administrator/components/com_modules/models/module.php +++ b/administrator/components/com_modules/models/module.php @@ -534,6 +534,10 @@ public function getForm($data = array(), $loadData = true) $id = JArrayHelper::getValue($data, 'id'); } + // Add the default fields directory + $baseFolder = ($clientId) ? JPATH_ADMINISTRATOR : JPATH_SITE; + JForm::addFieldPath($baseFolder . '/modules' . '/' . $module . '/field'); + // These variables are used to add data from the plugin XML files. $this->setState('item.client_id', $clientId); $this->setState('item.module', $module); From 6408672426853275535e98d38c0c8581e35715dc Mon Sep 17 00:00:00 2001 From: dgt41 Date: Thu, 7 Apr 2016 23:27:45 +0300 Subject: [PATCH 027/294] init --- administrator/components/com_templates/models/style.php | 4 ++++ libraries/joomla/form/helper.php | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/administrator/components/com_templates/models/style.php b/administrator/components/com_templates/models/style.php index 261b21fab6a1c..422f15661d0f5 100644 --- a/administrator/components/com_templates/models/style.php +++ b/administrator/components/com_templates/models/style.php @@ -268,6 +268,10 @@ public function getForm($data = array(), $loadData = true) $template = JArrayHelper::getValue($data, 'template'); } + // Add the default fields directory + $baseFolder = ($clientId) ? JPATH_ADMINISTRATOR : JPATH_SITE; + JForm::addFieldPath($baseFolder . '/templates/' . $template . '/field'); + // These variables are used to add data from the plugin XML files. $this->setState('item.client_id', $clientId); $this->setState('item.template', $template); diff --git a/libraries/joomla/form/helper.php b/libraries/joomla/form/helper.php index 27866f838ff7f..e93152bf5123f 100644 --- a/libraries/joomla/form/helper.php +++ b/libraries/joomla/form/helper.php @@ -305,6 +305,11 @@ protected static function addPath($entity, $new = null) { array_unshift($paths, trim($path)); } + + if (!is_dir($path)) + { + array_unshift($paths, trim($path)); + } } return $paths; From 7bcedf1ec2b41b118d9fa631daadbd5ed7218a2e Mon Sep 17 00:00:00 2001 From: dgt41 Date: Fri, 8 Apr 2016 00:23:48 +0300 Subject: [PATCH 028/294] not this one --- plugins/user/profile/profile.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/user/profile/profile.xml b/plugins/user/profile/profile.xml index 2998e27f8578c..d9aa77f733307 100644 --- a/plugins/user/profile/profile.xml +++ b/plugins/user/profile/profile.xml @@ -20,7 +20,7 @@ -
+
Date: Fri, 8 Apr 2016 01:21:17 +0300 Subject: [PATCH 029/294] not needed anymore --- plugins/user/profile/profile.php | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/user/profile/profile.php b/plugins/user/profile/profile.php index 7d45e2208f9d0..c5db9c9ada90b 100644 --- a/plugins/user/profile/profile.php +++ b/plugins/user/profile/profile.php @@ -43,7 +43,6 @@ class PlgUserProfile extends JPlugin public function __construct(& $subject, $config) { parent::__construct($subject, $config); - JFormHelper::addFieldPath(__DIR__ . '/fields'); } /** From b8c532c828477635d23fbf7d7e9a3e4bad69bbec Mon Sep 17 00:00:00 2001 From: Fedir Zinchuk Date: Tue, 10 May 2016 11:06:21 +0300 Subject: [PATCH 030/294] Update copyright in the subform field (#10375) --- layouts/joomla/form/field/subform/default.php | 2 +- layouts/joomla/form/field/subform/repeatable-table.php | 2 +- .../form/field/subform/repeatable-table/section-byfieldsets.php | 2 +- layouts/joomla/form/field/subform/repeatable-table/section.php | 2 +- layouts/joomla/form/field/subform/repeatable.php | 2 +- .../form/field/subform/repeatable/section-byfieldsets.php | 2 +- layouts/joomla/form/field/subform/repeatable/section.php | 2 +- libraries/joomla/form/fields/subform.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/layouts/joomla/form/field/subform/default.php b/layouts/joomla/form/field/subform/default.php index ae5908de372cc..9c645ce9bbe35 100644 --- a/layouts/joomla/form/field/subform/default.php +++ b/layouts/joomla/form/field/subform/default.php @@ -3,7 +3,7 @@ * @package Joomla.Site * @subpackage Layout * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/layouts/joomla/form/field/subform/repeatable-table.php b/layouts/joomla/form/field/subform/repeatable-table.php index 938aaf27c9d63..8d368a975feff 100644 --- a/layouts/joomla/form/field/subform/repeatable-table.php +++ b/layouts/joomla/form/field/subform/repeatable-table.php @@ -3,7 +3,7 @@ * @package Joomla.Site * @subpackage Layout * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/layouts/joomla/form/field/subform/repeatable-table/section-byfieldsets.php b/layouts/joomla/form/field/subform/repeatable-table/section-byfieldsets.php index 8386cc2e0dd89..353c10adf37a0 100644 --- a/layouts/joomla/form/field/subform/repeatable-table/section-byfieldsets.php +++ b/layouts/joomla/form/field/subform/repeatable-table/section-byfieldsets.php @@ -3,7 +3,7 @@ * @package Joomla.Site * @subpackage Layout * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/layouts/joomla/form/field/subform/repeatable-table/section.php b/layouts/joomla/form/field/subform/repeatable-table/section.php index 3769d41366b86..10c40a38f74c0 100644 --- a/layouts/joomla/form/field/subform/repeatable-table/section.php +++ b/layouts/joomla/form/field/subform/repeatable-table/section.php @@ -3,7 +3,7 @@ * @package Joomla.Site * @subpackage Layout * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/layouts/joomla/form/field/subform/repeatable.php b/layouts/joomla/form/field/subform/repeatable.php index a15fe26be9190..ae5bd369edb37 100644 --- a/layouts/joomla/form/field/subform/repeatable.php +++ b/layouts/joomla/form/field/subform/repeatable.php @@ -3,7 +3,7 @@ * @package Joomla.Site * @subpackage Layout * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/layouts/joomla/form/field/subform/repeatable/section-byfieldsets.php b/layouts/joomla/form/field/subform/repeatable/section-byfieldsets.php index 980c81f285d4b..90e6cd4051b69 100644 --- a/layouts/joomla/form/field/subform/repeatable/section-byfieldsets.php +++ b/layouts/joomla/form/field/subform/repeatable/section-byfieldsets.php @@ -3,7 +3,7 @@ * @package Joomla.Site * @subpackage Layout * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/layouts/joomla/form/field/subform/repeatable/section.php b/layouts/joomla/form/field/subform/repeatable/section.php index 1a6962e865285..6f14ffc22fe11 100644 --- a/layouts/joomla/form/field/subform/repeatable/section.php +++ b/layouts/joomla/form/field/subform/repeatable/section.php @@ -3,7 +3,7 @@ * @package Joomla.Site * @subpackage Layout * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/libraries/joomla/form/fields/subform.php b/libraries/joomla/form/fields/subform.php index d9338849c0329..3cb9001ec40d0 100644 --- a/libraries/joomla/form/fields/subform.php +++ b/libraries/joomla/form/fields/subform.php @@ -3,7 +3,7 @@ * @package Joomla.Platform * @subpackage Form * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ From 222124589156d8314a365e5f06d8f2ffb5ac59c0 Mon Sep 17 00:00:00 2001 From: nsrsr Date: Tue, 10 May 2016 11:36:06 +0200 Subject: [PATCH 031/294] dbo fix (#10369) --- administrator/components/com_tags/tables/tag.php | 2 +- libraries/joomla/table/language.php | 2 +- libraries/joomla/table/nested.php | 2 +- libraries/legacy/table/content.php | 2 +- libraries/legacy/table/menu/type.php | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/administrator/components/com_tags/tables/tag.php b/administrator/components/com_tags/tables/tag.php index 57933449fecb0..be25d4a525dd2 100644 --- a/administrator/components/com_tags/tables/tag.php +++ b/administrator/components/com_tags/tables/tag.php @@ -242,7 +242,7 @@ public function store($updateNulls = false) } // Verify that the alias is unique - $table = JTable::getInstance('Tag', 'TagsTable'); + $table = JTable::getInstance('Tag', 'TagsTable', array('dbo' => $this->_db)); if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0)) { diff --git a/libraries/joomla/table/language.php b/libraries/joomla/table/language.php index e5ada6c1a25e7..3ff2b2ed97db2 100644 --- a/libraries/joomla/table/language.php +++ b/libraries/joomla/table/language.php @@ -59,7 +59,7 @@ public function check() public function store($updateNulls = false) { // Verify that the sef field is unique - $table = JTable::getInstance('Language', 'JTable', array('dbo', $this->getDbo())); + $table = JTable::getInstance('Language', 'JTable', array('dbo' => $this->getDbo())); if ($table->load(array('sef' => $this->sef)) && ($table->lang_id != $this->lang_id || $this->lang_id == 0)) { diff --git a/libraries/joomla/table/nested.php b/libraries/joomla/table/nested.php index 42d0b68569770..a8465fa72acd2 100644 --- a/libraries/joomla/table/nested.php +++ b/libraries/joomla/table/nested.php @@ -538,7 +538,7 @@ public function delete($pk = null, $children = true) if ($this->_trackAssets) { $name = $this->_getAssetName(); - $asset = JTable::getInstance('Asset', 'JTable', array('dbo', $this->getDbo())); + $asset = JTable::getInstance('Asset', 'JTable', array('dbo' => $this->getDbo())); // Lock the table for writing. if (!$asset->_lock()) diff --git a/libraries/legacy/table/content.php b/libraries/legacy/table/content.php index 86acc2ccd5e1c..c7635a4cb842f 100644 --- a/libraries/legacy/table/content.php +++ b/libraries/legacy/table/content.php @@ -334,7 +334,7 @@ public function store($updateNulls = false) } // Verify that the alias is unique - $table = JTable::getInstance('Content', 'JTable', array('dbo', $this->getDbo())); + $table = JTable::getInstance('Content', 'JTable', array('dbo' => $this->getDbo())); if ($table->load(array('alias' => $this->alias, 'catid' => $this->catid)) && ($table->id != $this->id || $this->id == 0)) { diff --git a/libraries/legacy/table/menu/type.php b/libraries/legacy/table/menu/type.php index 8f3b5c1a4a6c8..7f5a7812b8cb8 100644 --- a/libraries/legacy/table/menu/type.php +++ b/libraries/legacy/table/menu/type.php @@ -93,7 +93,7 @@ public function store($updateNulls = false) $userId = JFactory::getUser()->id; // Get the old value of the table - $table = JTable::getInstance('Menutype', 'JTable', array('dbo', $this->getDbo())); + $table = JTable::getInstance('Menutype', 'JTable', array('dbo' => $this->getDbo())); $table->load($this->id); // Verify that no items are checked out @@ -179,7 +179,7 @@ public function delete($pk = null) $userId = JFactory::getUser()->id; // Get the old value of the table - $table = JTable::getInstance('Menutype', 'JTable', array('dbo', $this->getDbo())); + $table = JTable::getInstance('Menutype', 'JTable', array('dbo' => $this->getDbo())); $table->load($pk); // Verify that no items are checked out From 532d415fe220e0572f0f9c8e7b4d33f5e948c08e Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Tue, 10 May 2016 10:37:29 +0100 Subject: [PATCH 032/294] Fix grammar and copy paste error in comments (#10378) * commen * copy paste typo * commit * copypaste * commit * commit * reverse --- administrator/components/com_admin/script.php | 4 ++-- .../components/com_admin/views/help/view.html.php | 2 +- .../com_admin/views/profile/view.html.php | 2 +- .../com_admin/views/sysinfo/view.html.php | 2 +- .../com_admin/views/sysinfo/view.json.php | 2 +- .../com_admin/views/sysinfo/view.text.php | 2 +- .../com_banners/views/banner/view.html.php | 2 +- .../com_banners/views/client/view.html.php | 2 +- .../com_banners/views/clients/view.html.php | 2 +- .../com_banners/views/download/view.html.php | 2 +- .../com_banners/views/tracks/view.html.php | 2 +- .../components/com_cache/views/cache/view.html.php | 2 +- .../components/com_cache/views/purge/view.html.php | 2 +- .../com_categories/views/categories/view.html.php | 2 +- .../com_categories/views/category/view.html.php | 2 +- .../com_content/views/article/view.html.php | 2 +- .../com_cpanel/views/cpanel/view.html.php | 2 +- .../com_finder/controllers/indexer.json.php | 2 +- .../com_finder/helpers/indexer/adapter.php | 2 +- .../components/com_installer/models/languages.php | 2 +- .../com_joomlaupdate/views/default/view.html.php | 2 +- .../com_media/views/images/view.html.php | 2 +- .../com_media/views/imageslist/view.html.php | 2 +- .../components/com_media/views/media/view.html.php | 4 ++-- .../com_media/views/medialist/view.html.php | 2 +- .../components/com_menus/controllers/menus.php | 2 +- .../com_messages/views/config/view.html.php | 2 +- .../com_messages/views/message/view.html.php | 2 +- .../com_messages/views/messages/view.html.php | 2 +- .../com_modules/views/modules/view.html.php | 2 +- .../com_newsfeeds/views/newsfeed/view.html.php | 2 +- .../com_newsfeeds/views/newsfeeds/view.html.php | 2 +- .../com_plugins/views/plugin/view.html.php | 2 +- .../com_plugins/views/plugins/view.html.php | 2 +- .../com_search/views/searches/view.html.php | 2 +- .../components/com_tags/views/tag/view.html.php | 2 +- .../components/com_tags/views/tags/view.html.php | 2 +- .../components/com_templates/models/template.php | 2 +- .../com_templates/views/style/view.html.php | 2 +- .../com_templates/views/style/view.json.php | 2 +- .../com_templates/views/styles/view.html.php | 2 +- .../com_templates/views/template/view.html.php | 4 ++-- .../com_templates/views/templates/view.html.php | 2 +- .../WhiteSpace/SuperfluousWhitespaceSniff.php | 2 +- components/com_contact/helpers/route.php | 2 +- .../com_contact/views/category/view.html.php | 2 +- components/com_contact/views/contact/view.html.php | 2 +- components/com_contact/views/contact/view.vcf.php | 2 +- components/com_content/controllers/article.php | 2 +- components/com_content/views/archive/view.html.php | 2 +- components/com_content/views/article/view.html.php | 2 +- .../com_content/views/category/view.html.php | 2 +- .../com_content/views/featured/view.feed.php | 2 +- .../com_content/views/featured/view.html.php | 2 +- components/com_content/views/form/view.html.php | 2 +- components/com_mailto/views/mailto/view.html.php | 2 +- .../com_newsfeeds/views/category/view.html.php | 2 +- .../com_newsfeeds/views/newsfeed/view.html.php | 2 +- components/com_search/views/search/view.html.php | 2 +- .../com_search/views/search/view.opensearch.php | 2 +- components/com_tags/views/tag/view.feed.php | 2 +- components/com_tags/views/tag/view.html.php | 2 +- components/com_tags/views/tags/view.feed.php | 2 +- components/com_tags/views/tags/view.html.php | 2 +- components/com_users/views/login/view.html.php | 2 +- components/com_users/views/profile/view.html.php | 2 +- components/com_wrapper/views/wrapper/view.html.php | 2 +- installation/application/web.php | 2 +- installation/controller/removefolder.php | 2 +- installation/controller/setdefaultlanguage.php | 4 ++-- installation/model/database.php | 10 +++++----- installation/model/ftp.php | 4 ++-- installation/model/languages.php | 2 +- libraries/cms/component/router/rules/interface.php | 2 +- libraries/cms/html/html.php | 4 ++-- libraries/cms/html/jgrid.php | 6 +++--- libraries/fof/utils/array/array.php | 2 +- libraries/joomla/application/base.php | 2 +- libraries/joomla/application/cli.php | 2 +- libraries/joomla/application/web.php | 4 ++-- libraries/joomla/database/driver/mysql.php | 2 +- libraries/joomla/database/driver/mysqli.php | 2 +- libraries/joomla/database/driver/postgresql.php | 2 +- libraries/joomla/database/query.php | 2 +- libraries/joomla/facebook/event.php | 2 +- libraries/joomla/factory.php | 4 ++-- libraries/joomla/feed/factory.php | 2 +- libraries/joomla/language/language.php | 2 +- libraries/joomla/uri/uri.php | 2 +- libraries/joomla/user/authentication.php | 2 +- libraries/joomla/utilities/arrayhelper.php | 2 +- libraries/legacy/application/application.php | 2 +- libraries/legacy/controller/form.php | 4 ++-- libraries/legacy/table/content.php | 2 +- libraries/legacy/table/session.php | 2 +- libraries/legacy/view/categories.php | 2 +- libraries/legacy/view/category.php | 2 +- libraries/legacy/view/categoryfeed.php | 2 +- libraries/legacy/view/legacy.php | 2 +- .../joomla/application/src/AbstractApplication.php | 2 +- .../application/src/AbstractCliApplication.php | 2 +- .../application/src/AbstractDaemonApplication.php | 2 +- .../application/src/AbstractWebApplication.php | 2 +- libraries/vendor/joomla/registry/src/Factory.php | 2 +- libraries/vendor/joomla/registry/src/Registry.php | 2 +- .../joomla/string/src/phputf8/utils/unicode.php | 2 +- libraries/vendor/joomla/uri/src/AbstractUri.php | 2 +- libraries/vendor/joomla/uri/src/UriHelper.php | 2 +- .../vendor/joomla/utilities/src/ArrayHelper.php | 4 ++-- plugins/authentication/cookie/cookie.php | 2 +- plugins/system/redirect/redirect.php | 2 +- plugins/user/profile/profile.php | 2 +- .../webdriver/Pages/Content/ArticleManagerPage.php | 6 +++--- .../Pages/Extensions/PluginManagerPage.php | 2 +- .../Pages/SiteContent/SiteContentFeaturedPage.php | 2 +- tests/unit/core/case/case.php | 2 +- tests/unit/core/case/database.php | 2 +- tests/unit/core/mock/input.php | 2 +- .../includes/JAdministratorHelperTest.php | 4 ++-- .../cms/installer/JInstallerAdapterTest.php | 14 +++++++------- .../suites/libraries/joomla/access/JAccessTest.php | 2 +- .../suites/libraries/joomla/image/JImageTest.php | 12 ++++++------ .../filter/JImageFilterBackgroundfillTest.php | 4 ++-- .../image/filter/JImageFilterBrightnessTest.php | 4 ++-- .../image/filter/JImageFilterContrastTest.php | 4 ++-- .../image/filter/JImageFilterEdgedetectTest.php | 2 +- .../unit/suites/libraries/joomla/log/JLogTest.php | 2 +- .../legacy/model/stubs/listmodelexceptiontest.php | 2 +- 128 files changed, 161 insertions(+), 161 deletions(-) diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 8587aabb7179f..d1e9c5b31d1e9 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -1632,8 +1632,8 @@ public function flushSessions() $session = JFactory::getSession(); /** - * Restarting the Session require a new login for the current user so lets check if we have a active session - * and only if not restart it. + * Restarting the Session require a new login for the current user so lets check if we have an active session + * and only restart it if not. * For B/C reasons we need to use getState as isActive is not available in 2.5 */ if ($session->getState() !== 'active') diff --git a/administrator/components/com_admin/views/help/view.html.php b/administrator/components/com_admin/views/help/view.html.php index ea30135a52781..c24445530c572 100644 --- a/administrator/components/com_admin/views/help/view.html.php +++ b/administrator/components/com_admin/views/help/view.html.php @@ -69,7 +69,7 @@ class AdminViewHelp extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/administrator/components/com_admin/views/profile/view.html.php b/administrator/components/com_admin/views/profile/view.html.php index 88a556cfaaba5..1599098639c75 100644 --- a/administrator/components/com_admin/views/profile/view.html.php +++ b/administrator/components/com_admin/views/profile/view.html.php @@ -45,7 +45,7 @@ class AdminViewProfile extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/administrator/components/com_admin/views/sysinfo/view.html.php b/administrator/components/com_admin/views/sysinfo/view.html.php index ea3f5d2b0a4dc..ca49f48397087 100644 --- a/administrator/components/com_admin/views/sysinfo/view.html.php +++ b/administrator/components/com_admin/views/sysinfo/view.html.php @@ -61,7 +61,7 @@ class AdminViewSysinfo extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/administrator/components/com_admin/views/sysinfo/view.json.php b/administrator/components/com_admin/views/sysinfo/view.json.php index ac787f1bb206d..f13a8f766bf25 100644 --- a/administrator/components/com_admin/views/sysinfo/view.json.php +++ b/administrator/components/com_admin/views/sysinfo/view.json.php @@ -21,7 +21,7 @@ class AdminViewSysinfo extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 3.5 */ diff --git a/administrator/components/com_admin/views/sysinfo/view.text.php b/administrator/components/com_admin/views/sysinfo/view.text.php index e71c9bf622f81..bab9fcdc3baae 100644 --- a/administrator/components/com_admin/views/sysinfo/view.text.php +++ b/administrator/components/com_admin/views/sysinfo/view.text.php @@ -21,7 +21,7 @@ class AdminViewSysinfo extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 3.5 */ diff --git a/administrator/components/com_banners/views/banner/view.html.php b/administrator/components/com_banners/views/banner/view.html.php index e6c289e23ff14..3c522f4369a66 100644 --- a/administrator/components/com_banners/views/banner/view.html.php +++ b/administrator/components/com_banners/views/banner/view.html.php @@ -44,7 +44,7 @@ class BannersViewBanner extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_banners/views/client/view.html.php b/administrator/components/com_banners/views/client/view.html.php index cc3e9f6b730e6..2d03c7b037198 100644 --- a/administrator/components/com_banners/views/client/view.html.php +++ b/administrator/components/com_banners/views/client/view.html.php @@ -51,7 +51,7 @@ class BannersViewClient extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_banners/views/clients/view.html.php b/administrator/components/com_banners/views/clients/view.html.php index c5f7e0e3a3154..295aa03a86358 100644 --- a/administrator/components/com_banners/views/clients/view.html.php +++ b/administrator/components/com_banners/views/clients/view.html.php @@ -44,7 +44,7 @@ class BannersViewClients extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_banners/views/download/view.html.php b/administrator/components/com_banners/views/download/view.html.php index 3066e0c9660ba..407370c0d524e 100644 --- a/administrator/components/com_banners/views/download/view.html.php +++ b/administrator/components/com_banners/views/download/view.html.php @@ -28,7 +28,7 @@ class BannersViewDownload extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_banners/views/tracks/view.html.php b/administrator/components/com_banners/views/tracks/view.html.php index 77dbf721a159a..f623d70ac5af1 100644 --- a/administrator/components/com_banners/views/tracks/view.html.php +++ b/administrator/components/com_banners/views/tracks/view.html.php @@ -44,7 +44,7 @@ class BannersViewTracks extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_cache/views/cache/view.html.php b/administrator/components/com_cache/views/cache/view.html.php index 021e284c92d73..c995c4b8ec762 100644 --- a/administrator/components/com_cache/views/cache/view.html.php +++ b/administrator/components/com_cache/views/cache/view.html.php @@ -33,7 +33,7 @@ class CacheViewCache extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_cache/views/purge/view.html.php b/administrator/components/com_cache/views/purge/view.html.php index b6b3fcc65c086..2075833e91dd7 100644 --- a/administrator/components/com_cache/views/purge/view.html.php +++ b/administrator/components/com_cache/views/purge/view.html.php @@ -21,7 +21,7 @@ class CacheViewPurge extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_categories/views/categories/view.html.php b/administrator/components/com_categories/views/categories/view.html.php index 986deb245d30f..98539bb2750ae 100644 --- a/administrator/components/com_categories/views/categories/view.html.php +++ b/administrator/components/com_categories/views/categories/view.html.php @@ -70,7 +70,7 @@ class CategoriesViewCategories extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_categories/views/category/view.html.php b/administrator/components/com_categories/views/category/view.html.php index 8afb511250e7a..37fe2c8fb2910 100644 --- a/administrator/components/com_categories/views/category/view.html.php +++ b/administrator/components/com_categories/views/category/view.html.php @@ -56,7 +56,7 @@ class CategoriesViewCategory extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_content/views/article/view.html.php b/administrator/components/com_content/views/article/view.html.php index 8dc74b058cd63..9f58183127379 100644 --- a/administrator/components/com_content/views/article/view.html.php +++ b/administrator/components/com_content/views/article/view.html.php @@ -27,7 +27,7 @@ class ContentViewArticle extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/administrator/components/com_cpanel/views/cpanel/view.html.php b/administrator/components/com_cpanel/views/cpanel/view.html.php index e69ca447112db..189ec63c6d47a 100644 --- a/administrator/components/com_cpanel/views/cpanel/view.html.php +++ b/administrator/components/com_cpanel/views/cpanel/view.html.php @@ -28,7 +28,7 @@ class CpanelViewCpanel extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_finder/controllers/indexer.json.php b/administrator/components/com_finder/controllers/indexer.json.php index 59691469f8dde..31e8215a632b5 100644 --- a/administrator/components/com_finder/controllers/indexer.json.php +++ b/administrator/components/com_finder/controllers/indexer.json.php @@ -251,7 +251,7 @@ public function optimize() /** * Method to handle a send a JSON response. The body parameter - * can be a Exception object for when an error has occurred or + * can be an Exception object for when an error has occurred or * a JObject for a good response. * * @param mixed $data JObject on success, Exception on error. [optional] diff --git a/administrator/components/com_finder/helpers/indexer/adapter.php b/administrator/components/com_finder/helpers/indexer/adapter.php index cd97c1beefd27..c822d30343ada 100644 --- a/administrator/components/com_finder/helpers/indexer/adapter.php +++ b/administrator/components/com_finder/helpers/indexer/adapter.php @@ -923,7 +923,7 @@ protected function translateState($item, $category = null) case 2: return 1; - // All other states should return a unpublished state + // All other states should return an unpublished state default: case 0: return 0; diff --git a/administrator/components/com_installer/models/languages.php b/administrator/components/com_installer/models/languages.php index 773db0a500cd7..f4a5f9cd9ccdb 100644 --- a/administrator/components/com_installer/models/languages.php +++ b/administrator/components/com_installer/models/languages.php @@ -318,7 +318,7 @@ public function install($lids) } /** - * Gets the manifest file of a selected language from a the language list in a update server. + * Gets the manifest file of a selected language from a the language list in an update server. * * @param int $uid the id of the language in the #__updates table * diff --git a/administrator/components/com_joomlaupdate/views/default/view.html.php b/administrator/components/com_joomlaupdate/views/default/view.html.php index 5a5bb359ec500..a498dccad8224 100644 --- a/administrator/components/com_joomlaupdate/views/default/view.html.php +++ b/administrator/components/com_joomlaupdate/views/default/view.html.php @@ -87,7 +87,7 @@ public function display($tpl = null) if (!is_null($this->updateInfo['object'])) { - // Show the message if a update is found. + // Show the message if an update is found. JFactory::getApplication()->enqueueMessage(JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATE_NOTICE'), 'notice'); } diff --git a/administrator/components/com_media/views/images/view.html.php b/administrator/components/com_media/views/images/view.html.php index 248bd9b5d6865..cb8fd825213a4 100644 --- a/administrator/components/com_media/views/images/view.html.php +++ b/administrator/components/com_media/views/images/view.html.php @@ -21,7 +21,7 @@ class MediaViewImages extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.0 */ diff --git a/administrator/components/com_media/views/imageslist/view.html.php b/administrator/components/com_media/views/imageslist/view.html.php index 5ced441d84818..e46e8e14e5941 100644 --- a/administrator/components/com_media/views/imageslist/view.html.php +++ b/administrator/components/com_media/views/imageslist/view.html.php @@ -21,7 +21,7 @@ class MediaViewImagesList extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.0 */ diff --git a/administrator/components/com_media/views/media/view.html.php b/administrator/components/com_media/views/media/view.html.php index e39372fcf966d..1011e75d27eb9 100644 --- a/administrator/components/com_media/views/media/view.html.php +++ b/administrator/components/com_media/views/media/view.html.php @@ -21,7 +21,7 @@ class MediaViewMedia extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.0 */ @@ -74,7 +74,7 @@ protected function addToolbar() // Set the titlebar text JToolbarHelper::title(JText::_('COM_MEDIA'), 'images mediamanager'); - // Add a upload button + // Add an upload button if ($user->authorise('core.create', 'com_media')) { // Instantiate a new JLayoutFile instance and render the layout diff --git a/administrator/components/com_media/views/medialist/view.html.php b/administrator/components/com_media/views/medialist/view.html.php index 80c1c1a9c88f6..ae897dcd061c8 100644 --- a/administrator/components/com_media/views/medialist/view.html.php +++ b/administrator/components/com_media/views/medialist/view.html.php @@ -21,7 +21,7 @@ class MediaViewMediaList extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.0 */ diff --git a/administrator/components/com_menus/controllers/menus.php b/administrator/components/com_menus/controllers/menus.php index 79a76bb56cc5a..d2020e731816b 100644 --- a/administrator/components/com_menus/controllers/menus.php +++ b/administrator/components/com_menus/controllers/menus.php @@ -49,7 +49,7 @@ public function getModel($name = 'Menu', $prefix = 'MenusModel', $config = array } /** - * Remove a item. + * Remove an item. * * @return void * diff --git a/administrator/components/com_messages/views/config/view.html.php b/administrator/components/com_messages/views/config/view.html.php index b80d054fb6580..78ee13df486ab 100644 --- a/administrator/components/com_messages/views/config/view.html.php +++ b/administrator/components/com_messages/views/config/view.html.php @@ -27,7 +27,7 @@ class MessagesViewConfig extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/administrator/components/com_messages/views/message/view.html.php b/administrator/components/com_messages/views/message/view.html.php index a35bb3c6d34bd..91e6104df3d2a 100644 --- a/administrator/components/com_messages/views/message/view.html.php +++ b/administrator/components/com_messages/views/message/view.html.php @@ -27,7 +27,7 @@ class MessagesViewMessage extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/administrator/components/com_messages/views/messages/view.html.php b/administrator/components/com_messages/views/messages/view.html.php index 21f11321af087..9efdece2f3958 100644 --- a/administrator/components/com_messages/views/messages/view.html.php +++ b/administrator/components/com_messages/views/messages/view.html.php @@ -27,7 +27,7 @@ class MessagesViewMessages extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/administrator/components/com_modules/views/modules/view.html.php b/administrator/components/com_modules/views/modules/view.html.php index 4a79311c8e772..36fe5b63b633a 100644 --- a/administrator/components/com_modules/views/modules/view.html.php +++ b/administrator/components/com_modules/views/modules/view.html.php @@ -27,7 +27,7 @@ class ModulesViewModules extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/administrator/components/com_newsfeeds/views/newsfeed/view.html.php b/administrator/components/com_newsfeeds/views/newsfeed/view.html.php index a7346b64f1ee4..9e94b7e558f7c 100644 --- a/administrator/components/com_newsfeeds/views/newsfeed/view.html.php +++ b/administrator/components/com_newsfeeds/views/newsfeed/view.html.php @@ -45,7 +45,7 @@ class NewsfeedsViewNewsfeed extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/administrator/components/com_newsfeeds/views/newsfeeds/view.html.php b/administrator/components/com_newsfeeds/views/newsfeeds/view.html.php index 203c4dcef13ec..8cf3e3bbe101d 100644 --- a/administrator/components/com_newsfeeds/views/newsfeeds/view.html.php +++ b/administrator/components/com_newsfeeds/views/newsfeeds/view.html.php @@ -45,7 +45,7 @@ class NewsfeedsViewNewsfeeds extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/administrator/components/com_plugins/views/plugin/view.html.php b/administrator/components/com_plugins/views/plugin/view.html.php index 4d146d18b4d57..2b62ea4adae98 100644 --- a/administrator/components/com_plugins/views/plugin/view.html.php +++ b/administrator/components/com_plugins/views/plugin/view.html.php @@ -27,7 +27,7 @@ class PluginsViewPlugin extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_plugins/views/plugins/view.html.php b/administrator/components/com_plugins/views/plugins/view.html.php index e1f996e926d20..c05dd7915f0d8 100644 --- a/administrator/components/com_plugins/views/plugins/view.html.php +++ b/administrator/components/com_plugins/views/plugins/view.html.php @@ -27,7 +27,7 @@ class PluginsViewPlugins extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_search/views/searches/view.html.php b/administrator/components/com_search/views/searches/view.html.php index f9994c4082fb8..7faf547589bcd 100644 --- a/administrator/components/com_search/views/searches/view.html.php +++ b/administrator/components/com_search/views/searches/view.html.php @@ -29,7 +29,7 @@ class SearchViewSearches extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_tags/views/tag/view.html.php b/administrator/components/com_tags/views/tag/view.html.php index 75169cc5c9c88..7cc5411f91c81 100644 --- a/administrator/components/com_tags/views/tag/view.html.php +++ b/administrator/components/com_tags/views/tag/view.html.php @@ -29,7 +29,7 @@ class TagsViewTag extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_tags/views/tags/view.html.php b/administrator/components/com_tags/views/tags/view.html.php index 18e2990e5796b..f230249185fce 100644 --- a/administrator/components/com_tags/views/tags/view.html.php +++ b/administrator/components/com_tags/views/tags/view.html.php @@ -27,7 +27,7 @@ class TagsViewTags extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_templates/models/template.php b/administrator/components/com_templates/models/template.php index aa4a4285fad8e..582d4f478f58d 100644 --- a/administrator/components/com_templates/models/template.php +++ b/administrator/components/com_templates/models/template.php @@ -1332,7 +1332,7 @@ public function getArchive() } /** - * Extract contents of a archive file. + * Extract contents of an archive file. * * @param string $file The name and location of the file * diff --git a/administrator/components/com_templates/views/style/view.html.php b/administrator/components/com_templates/views/style/view.html.php index aa157a8a635c3..e49858eca1575 100644 --- a/administrator/components/com_templates/views/style/view.html.php +++ b/administrator/components/com_templates/views/style/view.html.php @@ -42,7 +42,7 @@ class TemplatesViewStyle extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/administrator/components/com_templates/views/style/view.json.php b/administrator/components/com_templates/views/style/view.json.php index 15d93b36b0dac..7712d6ae6f0d9 100644 --- a/administrator/components/com_templates/views/style/view.json.php +++ b/administrator/components/com_templates/views/style/view.json.php @@ -42,7 +42,7 @@ class TemplatesViewStyle extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/administrator/components/com_templates/views/styles/view.html.php b/administrator/components/com_templates/views/styles/view.html.php index 7d7c754d35bd8..ed7e006ca03ee 100644 --- a/administrator/components/com_templates/views/styles/view.html.php +++ b/administrator/components/com_templates/views/styles/view.html.php @@ -27,7 +27,7 @@ class TemplatesViewStyles extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/administrator/components/com_templates/views/template/view.html.php b/administrator/components/com_templates/views/template/view.html.php index 900480947ca7b..637723aa0343b 100644 --- a/administrator/components/com_templates/views/template/view.html.php +++ b/administrator/components/com_templates/views/template/view.html.php @@ -91,7 +91,7 @@ class TemplatesViewTemplate extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { @@ -185,7 +185,7 @@ protected function addToolbar() // Only show file edit buttons for global SuperUser if ($isSuperUser) { - // Add a Apply and save button + // Add an Apply and save button if ($this->type == 'file') { JToolbarHelper::apply('template.apply'); diff --git a/administrator/components/com_templates/views/templates/view.html.php b/administrator/components/com_templates/views/templates/view.html.php index ecf8bb6357069..84583f75219c2 100644 --- a/administrator/components/com_templates/views/templates/view.html.php +++ b/administrator/components/com_templates/views/templates/view.html.php @@ -45,7 +45,7 @@ class TemplatesViewTemplates extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/build/phpcs/Joomla/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php b/build/phpcs/Joomla/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php index b4771824bc855..d590104597c3d 100644 --- a/build/phpcs/Joomla/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php +++ b/build/phpcs/Joomla/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php @@ -22,7 +22,7 @@ *
  • No whitespace proceeds the first content of the file.
  • *
  • No whitespace resides after content on any line.
  • *
  • There are not two or more empty lines in functions and classes.
  • - *
  • There is a exactly one empty line after the last content of the file.
  • + *
  • There is exactly one empty line after the last content of the file.
  • * * * @category PHP diff --git a/components/com_contact/helpers/route.php b/components/com_contact/helpers/route.php index 40861e2376db3..6b3f210238c14 100644 --- a/components/com_contact/helpers/route.php +++ b/components/com_contact/helpers/route.php @@ -71,7 +71,7 @@ public static function getContactRoute($id, $catid, $language = 0) /** * Get the URL route for a contact category from a contact category ID and language * - * @param mixed $catid The id of the contact's category either an integer id or a instance of JCategoryNode + * @param mixed $catid The id of the contact's category either an integer id or an instance of JCategoryNode * @param mixed $language The id of the language being used. * * @return string The link to the contact diff --git a/components/com_contact/views/category/view.html.php b/components/com_contact/views/category/view.html.php index 6ccff13489c8f..1dde9a62c0988 100644 --- a/components/com_contact/views/category/view.html.php +++ b/components/com_contact/views/category/view.html.php @@ -49,7 +49,7 @@ class ContactViewCategory extends JViewCategory * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_contact/views/contact/view.html.php b/components/com_contact/views/contact/view.html.php index c2118db7d85a0..eba83e7f4bb6d 100644 --- a/components/com_contact/views/contact/view.html.php +++ b/components/com_contact/views/contact/view.html.php @@ -56,7 +56,7 @@ class ContactViewContact extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_contact/views/contact/view.vcf.php b/components/com_contact/views/contact/view.vcf.php index a933db9486ad9..835512a0ab3a1 100644 --- a/components/com_contact/views/contact/view.vcf.php +++ b/components/com_contact/views/contact/view.vcf.php @@ -36,7 +36,7 @@ class ContactViewContact extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_content/controllers/article.php b/components/com_content/controllers/article.php index 740ddfefa2bdf..b7b76bb395c26 100644 --- a/components/com_content/controllers/article.php +++ b/components/com_content/controllers/article.php @@ -43,7 +43,7 @@ class ContentControllerArticle extends JControllerForm /** * Method to add a new record. * - * @return mixed True if the record can be added, a error object if not. + * @return mixed True if the record can be added, an error object if not. * * @since 1.6 */ diff --git a/components/com_content/views/archive/view.html.php b/components/com_content/views/archive/view.html.php index 72ac0b72983fd..fba1f4b064596 100644 --- a/components/com_content/views/archive/view.html.php +++ b/components/com_content/views/archive/view.html.php @@ -31,7 +31,7 @@ class ContentViewArchive extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_content/views/article/view.html.php b/components/com_content/views/article/view.html.php index 6b09a9330e69b..d5caf988879ed 100644 --- a/components/com_content/views/article/view.html.php +++ b/components/com_content/views/article/view.html.php @@ -31,7 +31,7 @@ class ContentViewArticle extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_content/views/category/view.html.php b/components/com_content/views/category/view.html.php index 2f03fedf05a81..4b65b92a0e292 100644 --- a/components/com_content/views/category/view.html.php +++ b/components/com_content/views/category/view.html.php @@ -65,7 +65,7 @@ class ContentViewCategory extends JViewCategory * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_content/views/featured/view.feed.php b/components/com_content/views/featured/view.feed.php index 9e5daea5a037a..e01bb49335e65 100644 --- a/components/com_content/views/featured/view.feed.php +++ b/components/com_content/views/featured/view.feed.php @@ -21,7 +21,7 @@ class ContentViewFeatured extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_content/views/featured/view.html.php b/components/com_content/views/featured/view.html.php index d4ce82d42939e..77037b3b2ede7 100644 --- a/components/com_content/views/featured/view.html.php +++ b/components/com_content/views/featured/view.html.php @@ -37,7 +37,7 @@ class ContentViewFeatured extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_content/views/form/view.html.php b/components/com_content/views/form/view.html.php index e321aa3536d80..ee55e577a3223 100644 --- a/components/com_content/views/form/view.html.php +++ b/components/com_content/views/form/view.html.php @@ -29,7 +29,7 @@ class ContentViewForm extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_mailto/views/mailto/view.html.php b/components/com_mailto/views/mailto/view.html.php index 1236e426f714a..5773c2ec82a8d 100644 --- a/components/com_mailto/views/mailto/view.html.php +++ b/components/com_mailto/views/mailto/view.html.php @@ -21,7 +21,7 @@ class MailtoViewMailto extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.5 */ diff --git a/components/com_newsfeeds/views/category/view.html.php b/components/com_newsfeeds/views/category/view.html.php index a2d75dc9fde0d..1fbd85f4d6771 100644 --- a/components/com_newsfeeds/views/category/view.html.php +++ b/components/com_newsfeeds/views/category/view.html.php @@ -41,7 +41,7 @@ class NewsfeedsViewCategory extends JViewCategory * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_newsfeeds/views/newsfeed/view.html.php b/components/com_newsfeeds/views/newsfeed/view.html.php index ed59d500e706a..f11d73dcb68b9 100644 --- a/components/com_newsfeeds/views/newsfeed/view.html.php +++ b/components/com_newsfeeds/views/newsfeed/view.html.php @@ -41,7 +41,7 @@ class NewsfeedsViewNewsfeed extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/components/com_search/views/search/view.html.php b/components/com_search/views/search/view.html.php index 38f2d7fc7938d..1556490a688d7 100644 --- a/components/com_search/views/search/view.html.php +++ b/components/com_search/views/search/view.html.php @@ -23,7 +23,7 @@ class SearchViewSearch extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_search/views/search/view.opensearch.php b/components/com_search/views/search/view.opensearch.php index a388d2ca55a43..580bc8de9158c 100644 --- a/components/com_search/views/search/view.opensearch.php +++ b/components/com_search/views/search/view.opensearch.php @@ -22,7 +22,7 @@ class SearchViewSearch extends JViewLegacy * @param string $tpl name of the template * * @throws Exception - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) diff --git a/components/com_tags/views/tag/view.feed.php b/components/com_tags/views/tag/view.feed.php index 9375eaf0c9a90..b4788a061adbe 100644 --- a/components/com_tags/views/tag/view.feed.php +++ b/components/com_tags/views/tag/view.feed.php @@ -21,7 +21,7 @@ class TagsViewTag extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_tags/views/tag/view.html.php b/components/com_tags/views/tag/view.html.php index cf50a7c3b3f52..a1a08487354e6 100644 --- a/components/com_tags/views/tag/view.html.php +++ b/components/com_tags/views/tag/view.html.php @@ -37,7 +37,7 @@ class TagsViewTag extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 3.1 */ diff --git a/components/com_tags/views/tags/view.feed.php b/components/com_tags/views/tags/view.feed.php index f0ad7081aad59..c1adf9cc9dda6 100644 --- a/components/com_tags/views/tags/view.feed.php +++ b/components/com_tags/views/tags/view.feed.php @@ -21,7 +21,7 @@ class TagsViewTags extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_tags/views/tags/view.html.php b/components/com_tags/views/tags/view.html.php index 2c40e2c4ad6e4..2a828390f21fa 100644 --- a/components/com_tags/views/tags/view.html.php +++ b/components/com_tags/views/tags/view.html.php @@ -33,7 +33,7 @@ class TagsViewTags extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { diff --git a/components/com_users/views/login/view.html.php b/components/com_users/views/login/view.html.php index 4bb35cbf1f201..82c9ec3f6bea4 100644 --- a/components/com_users/views/login/view.html.php +++ b/components/com_users/views/login/view.html.php @@ -29,7 +29,7 @@ class UsersViewLogin extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.5 */ diff --git a/components/com_users/views/profile/view.html.php b/components/com_users/views/profile/view.html.php index 9a33a90d9a2de..4a755fb9bf4b9 100644 --- a/components/com_users/views/profile/view.html.php +++ b/components/com_users/views/profile/view.html.php @@ -29,7 +29,7 @@ class UsersViewProfile extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ diff --git a/components/com_wrapper/views/wrapper/view.html.php b/components/com_wrapper/views/wrapper/view.html.php index b956ade255164..312ac1e6fd99a 100644 --- a/components/com_wrapper/views/wrapper/view.html.php +++ b/components/com_wrapper/views/wrapper/view.html.php @@ -21,7 +21,7 @@ class WrapperViewWrapper extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 1.5 */ diff --git a/installation/application/web.php b/installation/application/web.php index 816d74f12840b..138e457ee9088 100644 --- a/installation/application/web.php +++ b/installation/application/web.php @@ -577,7 +577,7 @@ public function render() /** * Method to send a JSON response. The data parameter - * can be a Exception object for when an error has occurred or + * can be an Exception object for when an error has occurred or * a stdClass for a good response. * * @param mixed $response stdClass on success, Exception on failure. diff --git a/installation/controller/removefolder.php b/installation/controller/removefolder.php index cd2be3c5d8dff..8134fe749c52b 100644 --- a/installation/controller/removefolder.php +++ b/installation/controller/removefolder.php @@ -133,7 +133,7 @@ public function execute() /** * Method to send a JSON response. The data parameter - * can be a Exception object for when an error has occurred or + * can be an Exception object for when an error has occurred or * a stdClass for a good response. * * @param mixed $response stdClass on success, Exception on failure. diff --git a/installation/controller/setdefaultlanguage.php b/installation/controller/setdefaultlanguage.php index cfc37903bb411..52e68157215df 100644 --- a/installation/controller/setdefaultlanguage.php +++ b/installation/controller/setdefaultlanguage.php @@ -61,7 +61,7 @@ public function execute() // Attempt to set the default administrator language if (!$model->setDefault($admin_lang, 'administrator')) { - // Create a error response message. + // Create an error response message. $app->enqueueMessage(JText::_('INSTL_DEFAULTLANGUAGE_ADMIN_COULDNT_SET_DEFAULT'), 'error'); } else @@ -82,7 +82,7 @@ public function execute() // Attempt to set the default site language if (!$model->setDefault($frontend_lang, 'site')) { - // Create a error response message. + // Create an error response message. $app->enqueueMessage(JText::_('INSTL_DEFAULTLANGUAGE_FRONTEND_COULDNT_SET_DEFAULT'), 'error'); } else diff --git a/installation/model/database.php b/installation/model/database.php index 24830d0e1be67..94dfb89a33b73 100644 --- a/installation/model/database.php +++ b/installation/model/database.php @@ -92,7 +92,7 @@ public function initialise($options) /* @var InstallationApplicationWeb $app */ $app = JFactory::getApplication(); - // Get the options as a object for easier handling. + // Get the options as an object for easier handling. $options = JArrayHelper::toObject($options); // Load the back-end language files so that the DB error messages work. @@ -213,7 +213,7 @@ public function createDatabase($options) return false; } - // Get the options as a object for easier handling. + // Get the options as an object for easier handling. $options = JArrayHelper::toObject($options); // Check database version. @@ -427,7 +427,7 @@ public function handleOldDatabase($options) return false; } - // Get the options as a object for easier handling. + // Get the options as an object for easier handling. $options = JArrayHelper::toObject($options); // Set the character set to UTF-8 for pre-existing databases. @@ -480,7 +480,7 @@ public function createTables($options) return false; } - // Get the options as a object for easier handling. + // Get the options as an object for easier handling. $options = JArrayHelper::toObject($options); // Check database type. @@ -723,7 +723,7 @@ public function installSampleData($options) return false; } - // Get the options as a object for easier handling. + // Get the options as an object for easier handling. $options = JArrayHelper::toObject($options); // Build the path to the sample data file. diff --git a/installation/model/ftp.php b/installation/model/ftp.php index 90f88861d7887..ae9b905e62ced 100644 --- a/installation/model/ftp.php +++ b/installation/model/ftp.php @@ -31,7 +31,7 @@ public function detectFtpRoot($options) /* @var InstallationApplicationWeb $app */ $app = JFactory::getApplication(); - // Get the options as a object for easier handling. + // Get the options as an object for easier handling. $options = JArrayHelper::toObject($options); // Connect and login to the FTP server. @@ -150,7 +150,7 @@ public function verifyFtpSettings($options) /* @var InstallationApplicationWeb $app */ $app = JFactory::getApplication(); - // Get the options as a object for easier handling. + // Get the options as an object for easier handling. $options = JArrayHelper::toObject($options); // Connect and login to the FTP server. diff --git a/installation/model/languages.php b/installation/model/languages.php index 9416a3493c9e9..f3edbe50b0236 100644 --- a/installation/model/languages.php +++ b/installation/model/languages.php @@ -201,7 +201,7 @@ public function install($lids) } /** - * Gets the manifest file of a selected language from a the language list in a update server. + * Gets the manifest file of a selected language from a the language list in an update server. * * @param integer $uid The id of the language in the #__updates table. * diff --git a/libraries/cms/component/router/rules/interface.php b/libraries/cms/component/router/rules/interface.php index a9120caa08806..439829d6d9af3 100644 --- a/libraries/cms/component/router/rules/interface.php +++ b/libraries/cms/component/router/rules/interface.php @@ -29,7 +29,7 @@ interface JComponentRouterRulesInterface public function preprocess(&$query); /** - * Parses an URI to retrieve informations for the right route through + * Parses a URI to retrieve informations for the right route through * the component. * This method should retrieve all its input from its method arguments. * diff --git a/libraries/cms/html/html.php b/libraries/cms/html/html.php index 8e16f14a5a6bb..d3b3202dc9fad 100644 --- a/libraries/cms/html/html.php +++ b/libraries/cms/html/html.php @@ -403,7 +403,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec break; } - // Try to deal with classical file in a a media subfolder called element + // Try to deal with classical file in a media subfolder called element $path = JPATH_ROOT . "/media/$extension/$folder/$element/$file"; if (file_exists($path)) @@ -811,7 +811,7 @@ public static function date($input = 'now', $format = null, $tz = true, $gregori * {'title','image','text','href','alt'} and values corresponding to parameters of the same name. * @param string $image The image for the tip, if no text is provided. * @param string $text The text for the tip. - * @param string $href An URL that will be used to create the link. + * @param string $href A URL that will be used to create the link. * @param string $alt The alt attribute for img tag. * @param string $class CSS class for the tool tip. * diff --git a/libraries/cms/html/jgrid.php b/libraries/cms/html/jgrid.php index 420127d4d5a34..ab9ae74a3cfb6 100644 --- a/libraries/cms/html/jgrid.php +++ b/libraries/cms/html/jgrid.php @@ -232,7 +232,7 @@ public static function published($value, $i, $prefix = '', $enabled = true, $che } /** - * Returns a isDefault state on a grid + * Returns an isDefault state on a grid * * @param integer $value The state value. * @param integer $i The row index @@ -345,7 +345,7 @@ public static function checkedout($i, $editorName, $time, $prefix = '', $enabled } /** - * Creates a order-up action icon. + * Creates an order-up action icon. * * @param integer $i The row index. * @param string $task An optional task to fire. @@ -373,7 +373,7 @@ public static function orderUp($i, $task = 'orderup', $prefix = '', $text = 'JLI } /** - * Creates a order-down action icon. + * Creates an order-down action icon. * * @param integer $i The row index. * @param string $task An optional task to fire. diff --git a/libraries/fof/utils/array/array.php b/libraries/fof/utils/array/array.php index 9f5b2808b382e..4cfb26d28594f 100644 --- a/libraries/fof/utils/array/array.php +++ b/libraries/fof/utils/array/array.php @@ -461,7 +461,7 @@ public static function pivot($source, $key = null) * Utility function to sort an array of objects on a given field * * @param array &$a An array of objects - * @param mixed $k The key (string) or a array of key to sort on + * @param mixed $k The key (string) or an array of keys to sort on * @param mixed $direction Direction (integer) or an array of direction to sort in [1 = Ascending] [-1 = Descending] * @param mixed $caseSensitive Boolean or array of booleans to let sort occur case sensitive or insensitive * @param mixed $locale Boolean or array of booleans to let sort occur using the locale language or not diff --git a/libraries/joomla/application/base.php b/libraries/joomla/application/base.php index cdc6ed1d022bc..efddc8f32f49e 100644 --- a/libraries/joomla/application/base.php +++ b/libraries/joomla/application/base.php @@ -73,7 +73,7 @@ public function getIdentity() * Registers a handler to a particular event group. * * @param string $event The event name. - * @param callable $handler The handler, a function or an instance of a event object. + * @param callable $handler The handler, a function or an instance of an event object. * * @return JApplicationBase The application to allow chaining. * diff --git a/libraries/joomla/application/cli.php b/libraries/joomla/application/cli.php index c689b8146a26e..5b7ccc3661d78 100644 --- a/libraries/joomla/application/cli.php +++ b/libraries/joomla/application/cli.php @@ -58,7 +58,7 @@ public function __construct(JInputCli $input = null, Registry $config = null, JE } // @codeCoverageIgnoreEnd - // If a input object is given use it. + // If an input object is given use it. if ($input instanceof JInput) { $this->input = $input; diff --git a/libraries/joomla/application/web.php b/libraries/joomla/application/web.php index 72929d17f6464..30f89d9e6d258 100644 --- a/libraries/joomla/application/web.php +++ b/libraries/joomla/application/web.php @@ -109,7 +109,7 @@ class JApplicationWeb extends JApplicationBase */ public function __construct(JInput $input = null, Registry $config = null, JApplicationWebClient $client = null) { - // If a input object is given use it. + // If an input object is given use it. if ($input instanceof JInput) { $this->input = $input; @@ -545,7 +545,7 @@ public function redirect($url, $status = 303) } // Now check if we have an integer status code that maps to a valid redirect. If we don't then set a 303 - // @deprecated 4.0 From 4.0 if no valid status code is given a InvalidArgumentException will be thrown + // @deprecated 4.0 From 4.0 if no valid status code is given an InvalidArgumentException will be thrown if (!is_int($status) || is_int($status) && !isset($this->responseMap[$status])) { $status = 303; diff --git a/libraries/joomla/database/driver/mysql.php b/libraries/joomla/database/driver/mysql.php index 393a1986cb2e5..f5c6c1ddd51fe 100644 --- a/libraries/joomla/database/driver/mysql.php +++ b/libraries/joomla/database/driver/mysql.php @@ -206,7 +206,7 @@ public function getAffectedRows() /** * Get the number of returned rows for the previous executed SQL statement. * This command is only valid for statements like SELECT or SHOW that return an actual result set. - * To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or DELETE query, use getAffectedRows(). + * To retrieve the number of rows affected by an INSERT, UPDATE, REPLACE or DELETE query, use getAffectedRows(). * * @param resource $cursor An optional database cursor resource to extract the row count from. * diff --git a/libraries/joomla/database/driver/mysqli.php b/libraries/joomla/database/driver/mysqli.php index d3ed8aabd6dd4..edd34a2bd566c 100644 --- a/libraries/joomla/database/driver/mysqli.php +++ b/libraries/joomla/database/driver/mysqli.php @@ -373,7 +373,7 @@ public function getConnectionCollation() /** * Get the number of returned rows for the previous executed SQL statement. * This command is only valid for statements like SELECT or SHOW that return an actual result set. - * To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or DELETE query, use getAffectedRows(). + * To retrieve the number of rows affected by an INSERT, UPDATE, REPLACE or DELETE query, use getAffectedRows(). * * @param resource $cursor An optional database cursor resource to extract the row count from. * diff --git a/libraries/joomla/database/driver/postgresql.php b/libraries/joomla/database/driver/postgresql.php index 7d5a507ce9b14..2f71c9a06dfa8 100644 --- a/libraries/joomla/database/driver/postgresql.php +++ b/libraries/joomla/database/driver/postgresql.php @@ -287,7 +287,7 @@ public function getConnectionCollation() /** * Get the number of returned rows for the previous executed SQL statement. * This command is only valid for statements like SELECT or SHOW that return an actual result set. - * To retrieve the number of rows affected by a INSERT, UPDATE, REPLACE or DELETE query, use getAffectedRows(). + * To retrieve the number of rows affected by an INSERT, UPDATE, REPLACE or DELETE query, use getAffectedRows(). * * @param resource $cur An optional database cursor resource to extract the row count from. * diff --git a/libraries/joomla/database/query.php b/libraries/joomla/database/query.php index 06f56eff7df8a..01b75c44a6b08 100644 --- a/libraries/joomla/database/query.php +++ b/libraries/joomla/database/query.php @@ -1095,7 +1095,7 @@ public function nullDate($quoted = true) } /** - * Add a ordering column to the ORDER clause of the query. + * Add an ordering column to the ORDER clause of the query. * * Usage: * $query->order('foo')->order('bar'); diff --git a/libraries/joomla/facebook/event.php b/libraries/joomla/facebook/event.php index 6a7404edf1720..6604433674672 100644 --- a/libraries/joomla/facebook/event.php +++ b/libraries/joomla/facebook/event.php @@ -217,7 +217,7 @@ public function createInvite($event, $users) } /** - * Method to delete a invitation. Note: you can only delete the invite if the current user is the event admin. + * Method to delete an invitation. Note: you can only delete the invite if the current user is the event admin. * Requires authentication and rsvp_event permission. * * @param string $event The event id. diff --git a/libraries/joomla/factory.php b/libraries/joomla/factory.php index 7ac9b6f9b4d9a..bee833037ab48 100644 --- a/libraries/joomla/factory.php +++ b/libraries/joomla/factory.php @@ -99,7 +99,7 @@ abstract class JFactory public static $mailer = null; /** - * Get a application object. + * Get an application object. * * Returns the global {@link JApplicationCms} object, only creating it if it doesn't already exist. * @@ -220,7 +220,7 @@ public static function getDocument() } /** - * Get an user object. + * Get a user object. * * Returns the global {@link JUser} object, only creating it if it doesn't already exist. * diff --git a/libraries/joomla/feed/factory.php b/libraries/joomla/feed/factory.php index 212e24b10d817..c7516ce5dabec 100644 --- a/libraries/joomla/feed/factory.php +++ b/libraries/joomla/feed/factory.php @@ -43,7 +43,7 @@ public function getFeed($uri) { // Retry with JHttpFactory that allow using CURL and Sockets as alternative method when available - // Adding a valid user agent string, otherwise some feed-servers returning a error + // Adding a valid user agent string, otherwise some feed-servers returning an error $options = new \joomla\Registry\Registry; $options->set('userAgent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'); diff --git a/libraries/joomla/language/language.php b/libraries/joomla/language/language.php index ef23b65087328..26818d314cab3 100644 --- a/libraries/joomla/language/language.php +++ b/libraries/joomla/language/language.php @@ -1168,7 +1168,7 @@ public function hasKey($string) } /** - * Returns a associative array holding the metadata. + * Returns an associative array holding the metadata. * * @param string $lang The name of the language. * diff --git a/libraries/joomla/uri/uri.php b/libraries/joomla/uri/uri.php index 381f61e812b29..decf5c9b0c399 100644 --- a/libraries/joomla/uri/uri.php +++ b/libraries/joomla/uri/uri.php @@ -281,7 +281,7 @@ public static function isInternal($url) } /** - * Build a query from a array (reverse of the PHP parse_str()). + * Build a query from an array (reverse of the PHP parse_str()). * * @param array $params The array of key => value pairs to return as a query string. * diff --git a/libraries/joomla/user/authentication.php b/libraries/joomla/user/authentication.php index e1efb24ef1591..84993ed90fad5 100644 --- a/libraries/joomla/user/authentication.php +++ b/libraries/joomla/user/authentication.php @@ -406,7 +406,7 @@ class JAuthenticationResponse * value MUST always be 10. If the End User user does not want to reveal any particular * component of this value, it MUST be set to zero. * - * For instance, if a End User wants to specify that his date of birth is in 1980, but + * For instance, if an End User wants to specify that his date of birth is in 1980, but * not the month or day, the value returned SHALL be "1980-00-00". * * @var string diff --git a/libraries/joomla/utilities/arrayhelper.php b/libraries/joomla/utilities/arrayhelper.php index 53d84e9839bc1..3e6e421b1cfa7 100644 --- a/libraries/joomla/utilities/arrayhelper.php +++ b/libraries/joomla/utilities/arrayhelper.php @@ -393,7 +393,7 @@ public static function pivot($source, $key = null) * Utility function to sort an array of objects on a given field * * @param array &$a An array of objects - * @param mixed $k The key (string) or a array of key to sort on + * @param mixed $k The key (string) or an array of keys to sort on * @param mixed $direction Direction (integer) or an array of direction to sort in [1 = Ascending] [-1 = Descending] * @param mixed $caseSensitive Boolean or array of booleans to let sort occur case sensitive or insensitive * @param mixed $locale Boolean or array of booleans to let sort occur using the locale language or not diff --git a/libraries/legacy/application/application.php b/libraries/legacy/application/application.php index 14940278a861f..793ebcca66af2 100644 --- a/libraries/legacy/application/application.php +++ b/libraries/legacy/application/application.php @@ -830,7 +830,7 @@ public static function getRouter($name = null, array $options = array()) } /** - * This method transliterates a string into an URL + * This method transliterates a string into a URL * safe string or returns a URL safe UTF-8 string * based on the global configuration * diff --git a/libraries/legacy/controller/form.php b/libraries/legacy/controller/form.php index 458bee915fff7..4830473f06985 100644 --- a/libraries/legacy/controller/form.php +++ b/libraries/legacy/controller/form.php @@ -137,7 +137,7 @@ public function __construct($config = array()) /** * Method to add a new record. * - * @return mixed True if the record can be added, a error object if not. + * @return mixed True if the record can be added, an error object if not. * * @since 12.2 */ @@ -527,7 +527,7 @@ protected function postSaveHook(JModelLegacy $model, $validData = array()) /** * Method to load a row from version history * - * @return mixed True if the record can be added, a error object if not. + * @return mixed True if the record can be added, an error object if not. * * @since 3.2 */ diff --git a/libraries/legacy/table/content.php b/libraries/legacy/table/content.php index c7635a4cb842f..963d88a571a32 100644 --- a/libraries/legacy/table/content.php +++ b/libraries/legacy/table/content.php @@ -79,7 +79,7 @@ protected function _getAssetParentId(JTable $table = null, $id = null) { $assetId = null; - // This is a article under a category. + // This is an article under a category. if ($this->catid) { // Build the query to get the asset id for the parent category. diff --git a/libraries/legacy/table/session.php b/libraries/legacy/table/session.php index 760ebb33e43c3..468372997e579 100644 --- a/libraries/legacy/table/session.php +++ b/libraries/legacy/table/session.php @@ -145,7 +145,7 @@ public function purge($maxLifetime = 1440) } /** - * Find out if a user has a one or more active sessions + * Find out if a user has one or more active sessions * * @param integer $userid The identifier of the user * diff --git a/libraries/legacy/view/categories.php b/libraries/legacy/view/categories.php index 55389ffa0f775..c18fee79f8da2 100644 --- a/libraries/legacy/view/categories.php +++ b/libraries/legacy/view/categories.php @@ -45,7 +45,7 @@ class JViewCategories extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 3.2 */ diff --git a/libraries/legacy/view/category.php b/libraries/legacy/view/category.php index 45cf04f32fbef..70c7b65fb1d6b 100644 --- a/libraries/legacy/view/category.php +++ b/libraries/legacy/view/category.php @@ -222,7 +222,7 @@ public function commonCategoryDisplay() * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 3.2 */ diff --git a/libraries/legacy/view/categoryfeed.php b/libraries/legacy/view/categoryfeed.php index 4f6093d5653d6..f93007a32c960 100644 --- a/libraries/legacy/view/categoryfeed.php +++ b/libraries/legacy/view/categoryfeed.php @@ -21,7 +21,7 @@ class JViewCategoryfeed extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @since 3.2 */ diff --git a/libraries/legacy/view/legacy.php b/libraries/legacy/view/legacy.php index 95e67d78e0ba9..65580a240e671 100644 --- a/libraries/legacy/view/legacy.php +++ b/libraries/legacy/view/legacy.php @@ -199,7 +199,7 @@ public function __construct($config = array()) * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return mixed A string if successful, otherwise a Error object. + * @return mixed A string if successful, otherwise an Error object. * * @see JViewLegacy::loadTemplate() * @since 12.2 diff --git a/libraries/vendor/joomla/application/src/AbstractApplication.php b/libraries/vendor/joomla/application/src/AbstractApplication.php index b0e1a7e423a7c..464301fd3bb64 100644 --- a/libraries/vendor/joomla/application/src/AbstractApplication.php +++ b/libraries/vendor/joomla/application/src/AbstractApplication.php @@ -49,7 +49,7 @@ abstract class AbstractApplication implements LoggerAwareInterface * Class constructor. * * @param Input $input An optional argument to provide dependency injection for the application's - * input object. If the argument is a InputCli object that object will become + * input object. If the argument is an InputCli object that object will become * the application's input object, otherwise a default input object is created. * @param Registry $config An optional argument to provide dependency injection for the application's * config object. If the argument is a Registry object that object will become diff --git a/libraries/vendor/joomla/application/src/AbstractCliApplication.php b/libraries/vendor/joomla/application/src/AbstractCliApplication.php index a1eecfe3d4fcc..ff278bb5b5a8b 100644 --- a/libraries/vendor/joomla/application/src/AbstractCliApplication.php +++ b/libraries/vendor/joomla/application/src/AbstractCliApplication.php @@ -38,7 +38,7 @@ abstract class AbstractCliApplication extends AbstractApplication * Class constructor. * * @param Input\Cli $input An optional argument to provide dependency injection for the application's - * input object. If the argument is a InputCli object that object will become + * input object. If the argument is an InputCli object that object will become * the application's input object, otherwise a default input object is created. * @param Registry $config An optional argument to provide dependency injection for the application's * config object. If the argument is a Registry object that object will become diff --git a/libraries/vendor/joomla/application/src/AbstractDaemonApplication.php b/libraries/vendor/joomla/application/src/AbstractDaemonApplication.php index 48aac6871343e..34c553dfb50e7 100644 --- a/libraries/vendor/joomla/application/src/AbstractDaemonApplication.php +++ b/libraries/vendor/joomla/application/src/AbstractDaemonApplication.php @@ -93,7 +93,7 @@ abstract class AbstractDaemonApplication extends AbstractCliApplication implemen * Class constructor. * * @param Cli $input An optional argument to provide dependency injection for the application's - * input object. If the argument is a InputCli object that object will become + * input object. If the argument is an InputCli object that object will become * the application's input object, otherwise a default input object is created. * @param Registry $config An optional argument to provide dependency injection for the application's * config object. If the argument is a Registry object that object will become diff --git a/libraries/vendor/joomla/application/src/AbstractWebApplication.php b/libraries/vendor/joomla/application/src/AbstractWebApplication.php index b58a6bf3084ef..ed768e50a727a 100644 --- a/libraries/vendor/joomla/application/src/AbstractWebApplication.php +++ b/libraries/vendor/joomla/application/src/AbstractWebApplication.php @@ -91,7 +91,7 @@ abstract class AbstractWebApplication extends AbstractApplication * Class constructor. * * @param Input $input An optional argument to provide dependency injection for the application's - * input object. If the argument is a Input object that object will become + * input object. If the argument is an Input object that object will become * the application's input object, otherwise a default input object is created. * @param Registry $config An optional argument to provide dependency injection for the application's * config object. If the argument is a Registry object that object will become diff --git a/libraries/vendor/joomla/registry/src/Factory.php b/libraries/vendor/joomla/registry/src/Factory.php index 79e68e2eeb5ae..7300c335413cf 100644 --- a/libraries/vendor/joomla/registry/src/Factory.php +++ b/libraries/vendor/joomla/registry/src/Factory.php @@ -25,7 +25,7 @@ class Factory protected static $formatInstances = array(); /** - * Returns a AbstractRegistryFormat object, only creating it if it doesn't already exist. + * Returns an AbstractRegistryFormat object, only creating it if it doesn't already exist. * * @param string $type The format to load * @param array $options Additional options to configure the object diff --git a/libraries/vendor/joomla/registry/src/Registry.php b/libraries/vendor/joomla/registry/src/Registry.php index 9c21cb0c687f6..7ce6f45e42d88 100644 --- a/libraries/vendor/joomla/registry/src/Registry.php +++ b/libraries/vendor/joomla/registry/src/Registry.php @@ -278,7 +278,7 @@ public function getIterator() } /** - * Load a associative array of values into the default namespace + * Load an associative array of values into the default namespace * * @param array $array Associative array of value to load * @param boolean $flattened Load from a one-dimensional array diff --git a/libraries/vendor/joomla/string/src/phputf8/utils/unicode.php b/libraries/vendor/joomla/string/src/phputf8/utils/unicode.php index 2d561f3c2c451..c550d6363b997 100644 --- a/libraries/vendor/joomla/string/src/phputf8/utils/unicode.php +++ b/libraries/vendor/joomla/string/src/phputf8/utils/unicode.php @@ -16,7 +16,7 @@ //-------------------------------------------------------------------- /** -* Takes an UTF-8 string and returns an array of ints representing the +* Takes a UTF-8 string and returns an array of ints representing the * Unicode characters. Astral planes are supported ie. the ints in the * output can be > 0xFFFF. Occurrances of the BOM are ignored. Surrogates * are not allowed. diff --git a/libraries/vendor/joomla/uri/src/AbstractUri.php b/libraries/vendor/joomla/uri/src/AbstractUri.php index d8077fecfdae1..a81a8a143be7a 100644 --- a/libraries/vendor/joomla/uri/src/AbstractUri.php +++ b/libraries/vendor/joomla/uri/src/AbstractUri.php @@ -296,7 +296,7 @@ public function isSSL() } /** - * Build a query from a array (reverse of the PHP parse_str()). + * Build a query from an array (reverse of the PHP parse_str()). * * @param array $params The array of key => value pairs to return as a query string. * diff --git a/libraries/vendor/joomla/uri/src/UriHelper.php b/libraries/vendor/joomla/uri/src/UriHelper.php index 564b03fb094ed..3a5c83bc3c06d 100644 --- a/libraries/vendor/joomla/uri/src/UriHelper.php +++ b/libraries/vendor/joomla/uri/src/UriHelper.php @@ -11,7 +11,7 @@ /** * Uri Helper * - * This class provides an UTF-8 safe version of parse_url(). + * This class provides a UTF-8 safe version of parse_url(). * * @since 1.0 */ diff --git a/libraries/vendor/joomla/utilities/src/ArrayHelper.php b/libraries/vendor/joomla/utilities/src/ArrayHelper.php index 8f84353fc85e3..9e7987c39a235 100644 --- a/libraries/vendor/joomla/utilities/src/ArrayHelper.php +++ b/libraries/vendor/joomla/utilities/src/ArrayHelper.php @@ -257,7 +257,7 @@ public static function getValue($array, $name, $default = null, $type = '') { if (!is_array($array) && !($array instanceof \ArrayAccess)) { - throw new \InvalidArgumentException('The object must be an array or a object that implements ArrayAccess'); + throw new \InvalidArgumentException('The object must be an array or an object that implements ArrayAccess'); } $result = null; @@ -474,7 +474,7 @@ public static function pivot(array $source, $key = null) * Utility function to sort an array of objects on a given field * * @param array $a An array of objects - * @param mixed $k The key (string) or a array of key to sort on + * @param mixed $k The key (string) or an array of keys to sort on * @param mixed $direction Direction (integer) or an array of direction to sort in [1 = Ascending] [-1 = Descending] * @param mixed $caseSensitive Boolean or array of booleans to let sort occur case sensitive or insensitive * @param mixed $locale Boolean or array of booleans to let sort occur using the locale language or not diff --git a/plugins/authentication/cookie/cookie.php b/plugins/authentication/cookie/cookie.php index 66a8927c2603f..d56fa8249cfcb 100644 --- a/plugins/authentication/cookie/cookie.php +++ b/plugins/authentication/cookie/cookie.php @@ -235,7 +235,7 @@ public function onUserAfterLogin($options) // Remember checkbox is set $cookieName = JUserHelper::getShortHashedUserAgent(); - // Create an unique series which will be used over the lifespan of the cookie + // Create a unique series which will be used over the lifespan of the cookie $unique = false; $errorCount = 0; diff --git a/plugins/system/redirect/redirect.php b/plugins/system/redirect/redirect.php index 1468e88ee019a..9403a261e11ad 100644 --- a/plugins/system/redirect/redirect.php +++ b/plugins/system/redirect/redirect.php @@ -83,7 +83,7 @@ public static function handleException($exception) if (!($exception instanceof Throwable) && !($exception instanceof Exception)) { throw new InvalidArgumentException( - sprintf('The error handler requires a Exception or Throwable object, a "%s" object was given instead.', get_class($exception)) + sprintf('The error handler requires an Exception or Throwable object, a "%s" object was given instead.', get_class($exception)) ); } diff --git a/plugins/user/profile/profile.php b/plugins/user/profile/profile.php index f2251a0686bf9..7a3aa22d78e3a 100644 --- a/plugins/user/profile/profile.php +++ b/plugins/user/profile/profile.php @@ -131,7 +131,7 @@ public function onContentPrepareData($context, $data) } /** - * Returns a anchor tag generated from a given value + * Returns an anchor tag generated from a given value * * @param string $value url to use * diff --git a/tests/system/webdriver/Pages/Content/ArticleManagerPage.php b/tests/system/webdriver/Pages/Content/ArticleManagerPage.php index f070a9601ac1a..c8439cb57dc1f 100644 --- a/tests/system/webdriver/Pages/Content/ArticleManagerPage.php +++ b/tests/system/webdriver/Pages/Content/ArticleManagerPage.php @@ -108,7 +108,7 @@ public function addArticle($name = 'Testing Articles', $category = 'Sample Data- } /** - * Edit a Article item in the Article Manager: Article Manager Screen. + * Edit an Article item in the Article Manager: Article Manager Screen. * * @param string $name Title field * @param array $fields associative array of fields in the form label => value. @@ -126,7 +126,7 @@ public function editArticle($name, $fields = array()) } /** - * Get state of a Article in Article Manager Screen: Article Manager. + * Get state of an Article in Article Manager Screen: Article Manager. * * @param string $name Article Title field * @@ -163,7 +163,7 @@ public function getState($name) } /** - * Change state of a Article Item in Article Manager Screen + * Change state of an Article Item in Article Manager Screen * * @param string $name Article Title field * @param string $state State of the Article diff --git a/tests/system/webdriver/Pages/Extensions/PluginManagerPage.php b/tests/system/webdriver/Pages/Extensions/PluginManagerPage.php index 04dbc33c91847..ac84d6253befe 100644 --- a/tests/system/webdriver/Pages/Extensions/PluginManagerPage.php +++ b/tests/system/webdriver/Pages/Extensions/PluginManagerPage.php @@ -154,7 +154,7 @@ public function getPluginType($name) * Edit a Plugin item in the Plugin Manager: Plugin Manager Edit Screen. * * @param string $name Name of the Plugin - * @param string $fields Input Fields that are to be changed in the form of a array + * @param string $fields Input Fields that are to be changed in the form of an array * * @return void */ diff --git a/tests/system/webdriver/Pages/SiteContent/SiteContentFeaturedPage.php b/tests/system/webdriver/Pages/SiteContent/SiteContentFeaturedPage.php index aa28a54272324..ca48512fa2b9c 100644 --- a/tests/system/webdriver/Pages/SiteContent/SiteContentFeaturedPage.php +++ b/tests/system/webdriver/Pages/SiteContent/SiteContentFeaturedPage.php @@ -129,7 +129,7 @@ public function isEditPresent() } /** - * Function to check if the unpublished tag is present for a article or not + * Function to check if the unpublished tag is present for an article or not * * @param string $articleTitle stores the name of the article * diff --git a/tests/unit/core/case/case.php b/tests/unit/core/case/case.php index dc4015aff101d..270a79675ca59 100644 --- a/tests/unit/core/case/case.php +++ b/tests/unit/core/case/case.php @@ -252,7 +252,7 @@ class_exists('JDocument'); /** * Gets a mock input object. * - * @param array $options A associative array of options to configure the mock. + * @param array $options An associative array of options to configure the mock. * * methods => an array of additional methods to mock * * @return JInput diff --git a/tests/unit/core/case/database.php b/tests/unit/core/case/database.php index 5a1dc357862f8..7fa3ea1d78679 100644 --- a/tests/unit/core/case/database.php +++ b/tests/unit/core/case/database.php @@ -280,7 +280,7 @@ class_exists('JDocument'); /** * Gets a mock input object. * - * @param array $options A associative array of options to configure the mock. + * @param array $options An associative array of options to configure the mock. * * methods => an array of additional methods to mock * * @return JInput diff --git a/tests/unit/core/mock/input.php b/tests/unit/core/mock/input.php index 3e8049349f5fa..333dc4413b6e4 100644 --- a/tests/unit/core/mock/input.php +++ b/tests/unit/core/mock/input.php @@ -44,7 +44,7 @@ public function __construct(PHPUnit_Framework_TestCase $test) /** * Creates an instance of a mock JInput object. * - * @param array $options A associative array of options to configure the mock. + * @param array $options An associative array of options to configure the mock. * * methods => an array of additional methods to mock * * @return PHPUnit_Framework_MockObject_MockObject diff --git a/tests/unit/suites/administrator/includes/JAdministratorHelperTest.php b/tests/unit/suites/administrator/includes/JAdministratorHelperTest.php index 2e8ac0d500c41..fcf76b36e2049 100644 --- a/tests/unit/suites/administrator/includes/JAdministratorHelperTest.php +++ b/tests/unit/suites/administrator/includes/JAdministratorHelperTest.php @@ -75,7 +75,7 @@ public function testFindOptionGuest() } /** - * Tests the findOption() method simulating an user without login admin permissions. + * Tests the findOption() method simulating a user without login admin permissions. */ public function testFindOptionCanNotLoginAdmin() { @@ -101,7 +101,7 @@ public function testFindOptionCanNotLoginAdmin() } /** - * Tests the findOption() method simulating an user who is able to log in to admin. + * Tests the findOption() method simulating a user who is able to log in to admin. */ public function testFindOptionCanLoginAdmin() { diff --git a/tests/unit/suites/libraries/cms/installer/JInstallerAdapterTest.php b/tests/unit/suites/libraries/cms/installer/JInstallerAdapterTest.php index edcba1ab8fec5..75432b96a70cb 100644 --- a/tests/unit/suites/libraries/cms/installer/JInstallerAdapterTest.php +++ b/tests/unit/suites/libraries/cms/installer/JInstallerAdapterTest.php @@ -248,7 +248,7 @@ public function testCheckExtensionInFilesystem() 'install', 'route', $object, - 'JInstallerAdapter::checkExtensionInFilesystem() should not update the route unless a extension ID has been set' + 'JInstallerAdapter::checkExtensionInFilesystem() should not update the route unless an extension ID has been set' ); $this->assertTrue( @@ -1410,7 +1410,7 @@ public function casesTestTriggerManifestScript() } /** - * @testdox Test triggering the manifest script for a installer where results are true + * @testdox Test triggering the manifest script for an installer where results are true * * @param string $method The method to run * @@ -1452,7 +1452,7 @@ public function casesTestTriggerManifestScriptFlights() } /** - * @testdox Test triggering the manifest script for a installer where results are true + * @testdox Test triggering the manifest script for an installer where results are true * * @param string $method The method to run * @@ -1484,7 +1484,7 @@ public function testTriggerManifestScriptForMethodsTakingInstallerObjectAndRoute } /** - * @testdox Test a exception is thrown when the preflight method returns false + * @testdox Test an exception is thrown when the preflight method returns false * * @expectedException RuntimeException * @covers JInstallerAdapter::triggerManifestScript @@ -1525,7 +1525,7 @@ public function casesTestTriggerManifestException() } /** - * @testdox Test a exception is thrown when the install or update methods return false + * @testdox Test an exception is thrown when the install or update methods return false * * @param string $method The method to run * @@ -1555,7 +1555,7 @@ public function testTriggerManifestScriptInstallOrUpdateReturningFalseThrowsExce } /** - * @testdox Test a exception isn't thrown when the uninstall method returns false + * @testdox Test an exception isn't thrown when the uninstall method returns false * * @covers JInstallerAdapter::triggerManifestScript */ @@ -1583,7 +1583,7 @@ public function testTriggerManifestScriptUninstallReturningFalseDoesNotThrowAnEx } /** - * @testdox Test a exception isn't thrown when the postflight method returns false + * @testdox Test an exception isn't thrown when the postflight method returns false * * @covers JInstallerAdapter::triggerManifestScript */ diff --git a/tests/unit/suites/libraries/joomla/access/JAccessTest.php b/tests/unit/suites/libraries/joomla/access/JAccessTest.php index a8063004e465b..f39b2a98ef365 100644 --- a/tests/unit/suites/libraries/joomla/access/JAccessTest.php +++ b/tests/unit/suites/libraries/joomla/access/JAccessTest.php @@ -367,7 +367,7 @@ public function casesGetActionsFromData() ', "/access/section[@name='unexisting']/", array(), - 'Unable to get actions from an unexiting section.'), + 'Unable to get actions from an unexisting section.'), array( 'setExpectedException('RuntimeException'); JLog::setInstance(null); diff --git a/tests/unit/suites/libraries/legacy/model/stubs/listmodelexceptiontest.php b/tests/unit/suites/libraries/legacy/model/stubs/listmodelexceptiontest.php index 974beb8b51da7..832ca7ddf5057 100644 --- a/tests/unit/suites/libraries/legacy/model/stubs/listmodelexceptiontest.php +++ b/tests/unit/suites/libraries/legacy/model/stubs/listmodelexceptiontest.php @@ -18,7 +18,7 @@ class ListModelExceptionTest extends JModelList { /** - * throws a Exception for testing purposes + * throws an Exception for testing purposes * * @param string $query The query. * @param integer $limitstart Offset. From 89dc19db4448f9769e2987cb7a9a7393f7bf74ca Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Tue, 10 May 2016 10:49:30 +0100 Subject: [PATCH 033/294] missed (#10380) --- libraries/cms/application/helper.php | 2 +- libraries/joomla/document/opensearch.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/cms/application/helper.php b/libraries/cms/application/helper.php index 9c9e70264d4cc..2136e1c1fa3b9 100644 --- a/libraries/cms/application/helper.php +++ b/libraries/cms/application/helper.php @@ -70,7 +70,7 @@ public static function getHash($seed) } /** - * This method transliterates a string into an URL + * This method transliterates a string into a URL * safe string or returns a URL safe UTF-8 string * based on the global configuration * diff --git a/libraries/joomla/document/opensearch.php b/libraries/joomla/document/opensearch.php index 9ab2f70079c31..ed77e397a5b8e 100644 --- a/libraries/joomla/document/opensearch.php +++ b/libraries/joomla/document/opensearch.php @@ -193,7 +193,7 @@ public function setShortName($name) } /** - * Adds an URL to the OpenSearch description. + * Adds a URL to the OpenSearch description. * * @param JOpenSearchUrl $url The url to add to the description. * From 9aa3d3eb6d3e056f8ec1dee8117192709e8cad2e Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Tue, 10 May 2016 10:49:54 +0100 Subject: [PATCH 034/294] fix typo (#10379) --- installation/sql/mysql/sample_learn.sql | 2 +- installation/sql/mysql/sample_testing.sql | 2 +- installation/sql/postgresql/sample_learn.sql | 2 +- installation/sql/postgresql/sample_testing.sql | 2 +- installation/sql/sqlazure/sample_learn.sql | 2 +- installation/sql/sqlazure/sample_testing.sql | 2 +- tests/unit/stubs/database/jos_content.csv | 2 +- tests/unit/stubs/database/jos_finder_links.csv | 2 +- tests/unit/stubs/database/jos_ucm_content.csv | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/installation/sql/mysql/sample_learn.sql b/installation/sql/mysql/sample_learn.sql index 699968a3c9fcb..22d0e9f145f9e 100644 --- a/installation/sql/mysql/sample_learn.sql +++ b/installation/sql/mysql/sample_learn.sql @@ -322,7 +322,7 @@ INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `introtext` (57, 155, 'Wobbegone', 'wobbegone', '

    ', '

    ', 1, 72, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '{"image_intro":"images\\/sampledata\\/parks\\/animals\\/180px_wobbegong.jpg","float_intro":"","image_intro_alt":"Wobbegon","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/parks\\/animals\\/800px_wobbegong.jpg","float_fulltext":"","image_fulltext_alt":"Wobbegon","image_fulltext_caption":"Source: https:\\/\\/en.wikipedia.org\\/wiki\\/File:Wobbegong.jpg Author: Richard Ling Rights: GNU Free Documentation License v 1.2 or later"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (58, 156, 'Wonderful Watermelon', 'wonderful-watermelon', '

    Watermelon is a wonderful and healthy treat. We grow the world''s sweetest watermelon. We have the largest watermelon patch in our country.

    ', '', 1, 30, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''), (59, 157, 'Wrapper Module', 'wrapper-module', '

    This module shows an iFrame window to specified location. Help

    {loadmodule wrapper,Wrapper}
    ', '', 1, 67, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''), -(60, 158, 'News Feeds', 'news-feeds', '

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You an use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ', '', 1, 21, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), +(60, 158, 'News Feeds', 'news-feeds', '

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You can use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ', '', 1, 21, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (61, 159, 'Breadcrumbs Module', 'breadcrumbs-module', '

    Breadcrumbs provide a pathway for users to navigate through the site. Help

    {loadmodule breadcrumbs,breadcrumbs}
    ', '', 1, 75, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (62, 160, 'Content', 'content-plugins', '

    Content plugins run when specific kinds of pages are loaded. They do things ranging from protecting email addresses from harvesters to creating page breaks.

    Default on:

    ', '', 1, 25, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 7, '', '', 1, 0, '', 0, '*', ''), (64, 162, 'Blue Mountain Rain Forest', 'blue-mountain-rain-forest', '

    ', '

    ', 1, 73, '2011-01-01 00:00:01', 123, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '{"image_intro":"images\\/sampledata\\/parks\\/landscape\\/120px_rainforest_bluemountainsnsw.jpg","float_intro":"none","image_intro_alt":"Rain Forest Blue Mountains","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/parks\\/landscape\\/727px_rainforest_bluemountainsnsw.jpg","float_fulltext":"","image_fulltext_alt":"Rain Forest Blue Mountains","image_fulltext_caption":"Source: https:\\/\\/commons.wikimedia.org\\/wiki\\/File:Rainforest,bluemountainsNSW.jpg Author: Adam J.W.C. License: GNU Free Documentation License"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), diff --git a/installation/sql/mysql/sample_testing.sql b/installation/sql/mysql/sample_testing.sql index 8b2f6be264f63..062743d7025cf 100644 --- a/installation/sql/mysql/sample_testing.sql +++ b/installation/sql/mysql/sample_testing.sql @@ -325,7 +325,7 @@ INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `introtext` (57, 155, 'Wobbegone', 'wobbegone', '

    ', '

    ', 1, 72, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '{"image_intro":"images\\/sampledata\\/parks\\/animals\\/180px_wobbegong.jpg","float_intro":"","image_intro_alt":"Wobbegon","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/parks\\/animals\\/800px_wobbegong.jpg","float_fulltext":"","image_fulltext_alt":"Wobbegon","image_fulltext_caption":"Source: https:\\/\\/en.wikipedia.org\\/wiki\\/File:Wobbegong.jpg Author: Richard Ling Rights: GNU Free Documentation License v 1.2 or later"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (58, 156, 'Wonderful Watermelon', 'wonderful-watermelon', '

    Watermelon is a wonderful and healthy treat. We grow the world''s sweetest watermelon. We have the largest watermelon patch in our country.

    ', '', 1, 30, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''), (59, 157, 'Wrapper Module', 'wrapper-module', '

    This module shows an iFrame window to specified location. Help

    {loadmodule wrapper,Wrapper}
    ', '', 1, 67, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''), -(60, 158, 'News Feeds', 'news-feeds', '

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You an use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ', '', 1, 21, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), +(60, 158, 'News Feeds', 'news-feeds', '

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You can use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ', '', 1, 21, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (61, 159, 'Breadcrumbs Module', 'breadcrumbs-module', '

    Breadcrumbs provide a pathway for users to navigate through the site. Help

    {loadmodule breadcrumbs,breadcrumbs}
    ', '', 1, 75, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (62, 160, 'Content', 'content-plugins', '

    Content plugins run when specific kinds of pages are loaded. They do things ranging from protecting email addresses from harvesters to creating page breaks.

    Default on:

    ', '', 1, 25, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 7, '', '', 1, 0, '', 0, '*', ''), (64, 162, 'Blue Mountain Rain Forest', 'blue-mountain-rain-forest', '

    ', '

    ', 1, 73, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '{"image_intro":"images\\/sampledata\\/parks\\/landscape\\/120px_rainforest_bluemountainsnsw.jpg","float_intro":"none","image_intro_alt":"Rain Forest Blue Mountains","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/parks\\/landscape\\/727px_rainforest_bluemountainsnsw.jpg","float_fulltext":"","image_fulltext_alt":"Rain Forest Blue Mountains","image_fulltext_caption":"Source: https:\\/\\/commons.wikimedia.org\\/wiki\\/File:Rainforest,bluemountainsNSW.jpg Author: Adam J.W.C. License: GNU Free Documentation License"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), diff --git a/installation/sql/postgresql/sample_learn.sql b/installation/sql/postgresql/sample_learn.sql index 1d596d7ef7c2b..feb025d50372f 100644 --- a/installation/sql/postgresql/sample_learn.sql +++ b/installation/sql/postgresql/sample_learn.sql @@ -340,7 +340,7 @@ INSERT INTO "#__content" VALUES (57,155,'Wobbegone','wobbegone','

    ','

    ',1,72,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"images\\/sampledata\\/parks\\/animals\\/180px_wobbegong.jpg","float_intro":"","image_intro_alt":"Wobbegon","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/parks\\/animals\\/800px_wobbegong.jpg","float_fulltext":"","image_fulltext_alt":"Wobbegon","image_fulltext_caption":"Source: https:\\/\\/en.wikipedia.org\\/wiki\\/File:Wobbegong.jpg Author: Richard Ling Rights: GNU Free Documentation License v 1.2 or later"}','{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',1,1,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (58,156,'Wonderful Watermelon','wonderful-watermelon','

    Watermelon is a wonderful and healthy treat. We grow the world\'s sweetest watermelon. We have the largest watermelon patch in our country.

    ','',1,30,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,1,'','',1,0,'',0,'*',''), (59,157,'Wrapper Module','wrapper-module','

    This module shows an iFrame window to specified location. Help

    {loadmodule wrapper,Wrapper}
    ','',1,67,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,1,'','',1,0,'',0,'*',''), -(60,158,'News Feeds','news-feeds','

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You an use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ','',1,21,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',1,4,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), +(60,158,'News Feeds','news-feeds','

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You can use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ','',1,21,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',1,4,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (61,159,'Breadcrumbs Module','breadcrumbs-module','

    Breadcrumbs provide a pathway for users to navigate through the site. Help

    {loadmodule breadcrumbs,breadcrumbs}
    ','',1,75,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":""}',1,2,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (62,160,'Content','content-plugins','

    Content plugins run when specific kinds of pages are loaded. They do things ranging from protecting email addresses from harvesters to creating page breaks.

    Default on:

    ','',1,25,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,7,'','',1,0,'',0,'*',''), (64,162,'Blue Mountain Rain Forest','blue-mountain-rain-forest','

    ','

    ',1,73,'2011-01-01 00:00:01',123,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"images\\/sampledata\\/parks\\/landscape\\/120px_rainforest_bluemountainsnsw.jpg","float_intro":"none","image_intro_alt":"Rain Forest Blue Mountains","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/parks\\/landscape\\/727px_rainforest_bluemountainsnsw.jpg","float_fulltext":"","image_fulltext_alt":"Rain Forest Blue Mountains","image_fulltext_caption":"Source: https:\\/\\/commons.wikimedia.org\\/wiki\\/File:Rainforest,bluemountainsNSW.jpg Author: Adam J.W.C. License: GNU Free Documentation License"}','{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',1,2,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), diff --git a/installation/sql/postgresql/sample_testing.sql b/installation/sql/postgresql/sample_testing.sql index 580734c51230a..d0128e2936bcf 100644 --- a/installation/sql/postgresql/sample_testing.sql +++ b/installation/sql/postgresql/sample_testing.sql @@ -341,7 +341,7 @@ INSERT INTO "#__content" VALUES (57,155,'Wobbegone','wobbegone','

    ','

    ',1,72,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"images\\/sampledata\\/parks\\/animals\\/180px_wobbegong.jpg","float_intro":"","image_intro_alt":"Wobbegon","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/parks\\/animals\\/800px_wobbegong.jpg","float_fulltext":"","image_fulltext_alt":"Wobbegon","image_fulltext_caption":"Source: https:\\/\\/en.wikipedia.org\\/wiki\\/File:Wobbegong.jpg Author: Richard Ling Rights: GNU Free Documentation License v 1.2 or later"}','{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',1,1,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (58,156,'Wonderful Watermelon','wonderful-watermelon','

    Watermelon is a wonderful and healthy treat. We grow the world''s sweetest watermelon. We have the largest watermelon patch in our country.

    ','',1,30,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,1,'','',1,0,'',0,'*',''), (59,157,'Wrapper Module','wrapper-module','

    This module shows an iFrame window to specified location. Help

    {loadmodule wrapper,Wrapper}
    ','',1,67,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,1,'','',1,0,'',0,'*',''), -(60,158,'News Feeds','news-feeds','

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You an use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ','',1,21,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',1,4,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), +(60,158,'News Feeds','news-feeds','

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You can use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ','',1,21,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',1,4,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (61,159,'Breadcrumbs Module','breadcrumbs-module','

    Breadcrumbs provide a pathway for users to navigate through the site. Help

    {loadmodule breadcrumbs,breadcrumbs}
    ','',1,75,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":""}',1,2,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), (62,160,'Content','content-plugins','

    Content plugins run when specific kinds of pages are loaded. They do things ranging from protecting email addresses from harvesters to creating page breaks.

    Default on:

    ','',1,25,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','','','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}',1,7,'','',1,0,'',0,'*',''), (64,162,'Blue Mountain Rain Forest','blue-mountain-rain-forest','

    ','

    ',1,73,'2011-01-01 00:00:01',42,'Joomla','1970-01-01 00:00:00',0,0,'1970-01-01 00:00:00','2011-01-01 00:00:01','1970-01-01 00:00:00','{"image_intro":"images\\/sampledata\\/parks\\/landscape\\/120px_rainforest_bluemountainsnsw.jpg","float_intro":"none","image_intro_alt":"Rain Forest Blue Mountains","image_intro_caption":"","image_fulltext":"images\\/sampledata\\/parks\\/landscape\\/727px_rainforest_bluemountainsnsw.jpg","float_fulltext":"","image_fulltext_alt":"Rain Forest Blue Mountains","image_fulltext_caption":"Source: https:\\/\\/commons.wikimedia.org\\/wiki\\/File:Rainforest,bluemountainsNSW.jpg Author: Adam J.W.C. License: GNU Free Documentation License"}','{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}',1,2,'','',1,0,'{"robots":"","author":"","rights":"","xreference":""}',0,'*',''), diff --git a/installation/sql/sqlazure/sample_learn.sql b/installation/sql/sqlazure/sample_learn.sql index bb63ab1fd6750..fa2ec71fc2d7d 100644 --- a/installation/sql/sqlazure/sample_learn.sql +++ b/installation/sql/sqlazure/sample_learn.sql @@ -567,7 +567,7 @@ INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext] INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (58, 156, 'Wonderful Watermelon', 'wonderful-watermelon', '

    Watermelon is a wonderful and healthy treat. We grow the world''s sweetest watermelon. We have the largest watermelon patch in our country.

    ', '', 1, 30, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (59, 157, 'Wrapper Module', 'wrapper-module', '

    This module shows an iFrame window to specified location. Help

    {loadmodule wrapper,Wrapper}
    ', '', 1, 67, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''); -INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (60, 158, 'News Feeds', 'news-feeds', '

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You an use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ', '', 1, 21, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); +INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (60, 158, 'News Feeds', 'news-feeds', '

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You can use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ', '', 1, 21, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (61, 159, 'Breadcrumbs Module', 'breadcrumbs-module', '

    Breadcrumbs provide a pathway for users to navigate through the site. Help

    {loadmodule breadcrumbs,breadcrumbs}
    ', '', 1, 75, '2011-01-01 00:00:01', 726, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:01', '1900-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (62, 160, 'Content', 'content-plugins', '

    Content plugins run when specific kinds of pages are loaded. They do things ranging from protecting email addresses from harvesters to creating page breaks.

    diff --git a/installation/sql/sqlazure/sample_testing.sql b/installation/sql/sqlazure/sample_testing.sql index 3d0d464f2ad6e..73c27fa09900f 100644 --- a/installation/sql/sqlazure/sample_testing.sql +++ b/installation/sql/sqlazure/sample_testing.sql @@ -637,7 +637,7 @@ INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext] INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (58, 156, 'Wonderful Watermelon', 'wonderful-watermelon', '

    Watermelon is a wonderful and healthy treat. We grow the world''s sweetest watermelon. We have the largest watermelon patch in our country.

    ', '', 1, 30, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (59, 157, 'Wrapper Module', 'wrapper-module', '

    This module shows an iFrame window to specified location. Help

    {loadmodule wrapper,Wrapper}
    ', '', 1, 67, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''); -INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (60, 158, 'News Feeds', 'news-feeds', '

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You an use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ', '', 1, 21, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); +INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (60, 158, 'News Feeds', 'news-feeds', '

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You can use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ', '', 1, 21, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (61, 159, 'Breadcrumbs Module', 'breadcrumbs-module', '

    Breadcrumbs provide a pathway for users to navigate through the site. Help

    {loadmodule breadcrumbs,breadcrumbs}
    ', '', 1, 75, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (62, 160, 'Content', 'content-plugins', '

    Content plugins run when specific kinds of pages are loaded. They do things ranging from protecting email addresses from harvesters to creating page breaks.

    diff --git a/tests/unit/stubs/database/jos_content.csv b/tests/unit/stubs/database/jos_content.csv index c15dd9c01abaf..5f442f1672a56 100644 --- a/tests/unit/stubs/database/jos_content.csv +++ b/tests/unit/stubs/database/jos_content.csv @@ -264,7 +264,7 @@ '58','156','Wonderful Watermelon','wonderful-watermelon','

    Watermelon is a wonderful and healthy treat. We grow the world\'s sweetest watermelon. We have the largest watermelon patch in our country.

    ',,'1','30','2011-01-01 00:00:01','100','Joomla','0000-00-00 00:00:00','0','0','0000-00-00 00:00:00','2011-01-01 00:00:01','0000-00-00 00:00:00',,,'{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}','1','1',,,'1','0',,'0','*', '59','157','Wrapper Module','wrapper-module','

    This module shows an iFrame window to specified location. Help

    {loadmodule wrapper,Wrapper}
    ',,'1','67','2011-01-01 00:00:01','100','Joomla','0000-00-00 00:00:00','0','0','0000-00-00 00:00:00','2011-01-01 00:00:01','0000-00-00 00:00:00',,,'{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}','1','1',,,'1','0',,'0','*', -'60','158','News Feeds','news-feeds','

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You an use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ',,'1','21','2011-01-01 00:00:01','100','Joomla','0000-00-00 00:00:00','0','0','0000-00-00 00:00:00','2011-01-01 00:00:01','0000-00-00 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}','1','4',,,'1','0','{"robots":"","author":"","rights":"","xreference":""}','0','*', +'60','158','News Feeds','news-feeds','

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You can use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ',,'1','21','2011-01-01 00:00:01','100','Joomla','0000-00-00 00:00:00','0','0','0000-00-00 00:00:00','2011-01-01 00:00:01','0000-00-00 00:00:00','{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}','{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}','{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}','1','4',,,'1','0','{"robots":"","author":"","rights":"","xreference":""}','0','*', '61','159','Breadcrumbs Module','breadcrumbs-module','

    Breadcrumbs provide a pathway for users to navigate through the site. Help

    {loadmodule breadcrumbs,breadcrumbs}
    ',,'1','75','2011-01-01 00:00:01','100','Joomla','0000-00-00 00:00:00','0','0','0000-00-00 00:00:00','2011-01-01 00:00:01','0000-00-00 00:00:00',,,'{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":""}','1','2',,,'1','0','{"robots":"","author":"","rights":"","xreference":""}','0','*', '62','160','Content','content-plugins','

    Content plugins run when specific kinds of pages are loaded. They do things ranging from protecting email addresses from harvesters to creating page breaks.

    diff --git a/tests/unit/stubs/database/jos_finder_links.csv b/tests/unit/stubs/database/jos_finder_links.csv index 223ce5d6b1485..8c92b4b5018b0 100644 --- a/tests/unit/stubs/database/jos_finder_links.csv +++ b/tests/unit/stubs/database/jos_finder_links.csv @@ -374,7 +374,7 @@ Source:http://commons.wikimedia.org/wiki/File:Koeh-134.jpg";s:16:"created_by_ali '132','index.php?option=com_content&view=article&id=58','index.php?option=com_content&view=article&id=58:wonderful-watermelon&catid=30:growers&Itemid=431','Wonderful Watermelon','Watermelon is a wonderful and healthy treat. We grow the world\'s sweetest watermelon. We have the largest watermelon patch in our country.','2013-06-02 17:41:39','5d6478cc7cd40d3f161ae8400ea62b4d','1','1','1','en-GB','2011-01-01 00:00:01','0000-00-00 00:00:00','2011-01-01 00:00:01','0000-00-00 00:00:00','0','0','4','O:19:"FinderIndexerResult":19:{s:11:"�*�elements";a:25:{s:2:"id";s:2:"58";s:5:"alias";s:20:"wonderful-watermelon";s:7:"summary";s:145:"

    Watermelon is a wonderful and healthy treat. We grow the world\'s sweetest watermelon. We have the largest watermelon patch in our country.

    ";s:4:"body";s:0:"";s:5:"catid";s:2:"30";s:10:"created_by";s:3:"100";s:16:"created_by_alias";s:6:"Joomla";s:8:"modified";s:19:"0000-00-00 00:00:00";s:11:"modified_by";s:1:"0";s:6:"params";O:9:"JRegistry":1:{s:7:"�*�data";O:8:"stdClass":67:{s:14:"article_layout";s:9:"_:default";s:10:"show_title";s:1:"1";s:11:"link_titles";s:1:"1";s:10:"show_intro";s:1:"1";s:13:"show_category";s:1:"1";s:13:"link_category";s:1:"1";s:20:"show_parent_category";s:1:"0";s:20:"link_parent_category";s:1:"0";s:11:"show_author";s:1:"1";s:11:"link_author";s:1:"0";s:16:"show_create_date";s:1:"0";s:16:"show_modify_date";s:1:"0";s:17:"show_publish_date";s:1:"1";s:20:"show_item_navigation";s:1:"1";s:9:"show_vote";s:1:"0";s:13:"show_readmore";s:1:"1";s:19:"show_readmore_title";s:1:"1";s:14:"readmore_limit";s:3:"100";s:10:"show_icons";s:1:"1";s:15:"show_print_icon";s:1:"1";s:15:"show_email_icon";s:1:"1";s:9:"show_hits";s:1:"1";s:11:"show_noauth";s:1:"0";s:23:"show_publishing_options";s:1:"1";s:20:"show_article_options";s:1:"1";s:25:"show_urls_images_frontend";s:1:"0";s:24:"show_urls_images_backend";s:1:"1";s:7:"targeta";i:0;s:7:"targetb";i:0;s:7:"targetc";i:0;s:11:"float_intro";s:4:"left";s:14:"float_fulltext";s:4:"left";s:15:"category_layout";s:6:"_:blog";s:19:"show_category_title";s:1:"0";s:16:"show_description";s:1:"0";s:22:"show_description_image";s:1:"0";s:8:"maxLevel";s:1:"1";s:21:"show_empty_categories";s:1:"0";s:16:"show_no_articles";s:1:"1";s:16:"show_subcat_desc";s:1:"1";s:21:"show_cat_num_articles";s:1:"0";s:21:"show_base_description";s:1:"1";s:11:"maxLevelcat";s:2:"-1";s:25:"show_empty_categories_cat";s:1:"0";s:20:"show_subcat_desc_cat";s:1:"1";s:25:"show_cat_num_articles_cat";s:1:"1";s:20:"num_leading_articles";s:1:"1";s:18:"num_intro_articles";s:1:"4";s:11:"num_columns";s:1:"2";s:9:"num_links";s:1:"4";s:18:"multi_column_order";s:1:"0";s:24:"show_subcategory_content";s:1:"0";s:21:"show_pagination_limit";s:1:"1";s:12:"filter_field";s:4:"hide";s:13:"show_headings";s:1:"1";s:14:"list_show_date";s:1:"0";s:11:"date_format";s:0:"";s:14:"list_show_hits";s:1:"1";s:16:"list_show_author";s:1:"1";s:11:"orderby_pri";s:5:"order";s:11:"orderby_sec";s:5:"rdate";s:10:"order_date";s:9:"published";s:15:"show_pagination";s:1:"2";s:23:"show_pagination_results";s:1:"1";s:14:"show_feed_link";s:1:"1";s:12:"feed_summary";s:1:"0";s:19:"info_block_position";s:1:"0";}}s:7:"metakey";s:0:"";s:8:"metadesc";s:0:"";s:8:"metadata";O:9:"JRegistry":1:{s:7:"�*�data";O:8:"stdClass":0:{}}s:7:"version";s:1:"1";s:8:"ordering";s:1:"1";s:8:"category";s:7:"Growers";s:9:"cat_state";s:1:"1";s:10:"cat_access";s:1:"1";s:4:"slug";s:23:"58:wonderful-watermelon";s:7:"catslug";s:10:"30:growers";s:6:"author";s:10:"Super User";s:4:"mime";N;s:6:"layout";s:7:"article";s:4:"path";s:89:"index.php/growers/30-sample-data-articles/fruit-shop-site/growers/58-wonderful-watermelon";s:10:"metaauthor";N;}s:15:"�*�instructions";a:5:{i:1;a:3:{i:0;s:5:"title";i:1;s:8:"subtitle";i:2;s:2:"id";}i:2;a:2:{i:0;s:7:"summary";i:1;s:4:"body";}i:3;a:8:{i:0;s:4:"meta";i:1;s:10:"list_price";i:2;s:10:"sale_price";i:3;s:7:"metakey";i:4;s:8:"metadesc";i:5;s:10:"metaauthor";i:6;s:6:"author";i:7;s:16:"created_by_alias";}i:4;a:2:{i:0;s:4:"path";i:1;s:5:"alias";}i:5;a:1:{i:0;s:8:"comments";}}s:11:"�*�taxonomy";a:4:{s:4:"Type";a:1:{s:7:"Article";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:7:"Article";s:5:"state";i:1;s:6:"access";i:1;}}s:6:"Author";a:1:{s:6:"Joomla";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:6:"Joomla";s:5:"state";i:1;s:6:"access";i:1;}}s:8:"Category";a:1:{s:7:"Growers";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:7:"Growers";s:5:"state";i:1;s:6:"access";i:1;}}s:8:"Language";a:1:{s:5:"en-GB";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:5:"en-GB";s:5:"state";i:1;s:6:"access";i:1;}}}s:3:"url";s:47:"index.php?option=com_content&view=article&id=58";s:5:"route";s:96:"index.php?option=com_content&view=article&id=58:wonderful-watermelon&catid=30:growers&Itemid=431";s:5:"title";s:20:"Wonderful Watermelon";s:11:"description";s:138:"Watermelon is a wonderful and healthy treat. We grow the world\'s sweetest watermelon. We have the largest watermelon patch in our country.";s:9:"published";N;s:5:"state";i:1;s:6:"access";s:1:"1";s:8:"language";s:5:"en-GB";s:18:"publish_start_date";s:19:"2011-01-01 00:00:01";s:16:"publish_end_date";s:19:"0000-00-00 00:00:00";s:10:"start_date";s:19:"2011-01-01 00:00:01";s:8:"end_date";s:19:"0000-00-00 00:00:00";s:10:"list_price";N;s:10:"sale_price";N;s:7:"type_id";i:4;s:15:"defaultLanguage";s:5:"en-GB";}' '133','index.php?option=com_content&view=article&id=59','index.php?option=com_content&view=article&id=59:wrapper-module&catid=67:utility-modules&Itemid=313','Wrapper Module','This module shows an iFrame window to specified location. Help {loadmodule wrapper,Wrapper}','2013-06-02 17:41:39','19dd34e2a557a7b8eafaf7defcc14a40','1','1','1','en-GB','2011-01-01 00:00:01','0000-00-00 00:00:00','2011-01-01 00:00:01','0000-00-00 00:00:00','0','0','4','O:19:"FinderIndexerResult":19:{s:11:"�*�elements";a:25:{s:2:"id";s:2:"59";s:5:"alias";s:14:"wrapper-module";s:7:"summary";s:276:"

    This module shows an iFrame window to specified location. Help

    {loadmodule wrapper,Wrapper}
    ";s:4:"body";s:0:"";s:5:"catid";s:2:"67";s:10:"created_by";s:3:"100";s:16:"created_by_alias";s:6:"Joomla";s:8:"modified";s:19:"0000-00-00 00:00:00";s:11:"modified_by";s:1:"0";s:6:"params";O:9:"JRegistry":1:{s:7:"�*�data";O:8:"stdClass":67:{s:14:"article_layout";s:9:"_:default";s:10:"show_title";s:1:"1";s:11:"link_titles";s:1:"1";s:10:"show_intro";s:1:"1";s:13:"show_category";s:1:"1";s:13:"link_category";s:1:"1";s:20:"show_parent_category";s:1:"0";s:20:"link_parent_category";s:1:"0";s:11:"show_author";s:1:"1";s:11:"link_author";s:1:"0";s:16:"show_create_date";s:1:"0";s:16:"show_modify_date";s:1:"0";s:17:"show_publish_date";s:1:"1";s:20:"show_item_navigation";s:1:"1";s:9:"show_vote";s:1:"0";s:13:"show_readmore";s:1:"1";s:19:"show_readmore_title";s:1:"1";s:14:"readmore_limit";s:3:"100";s:10:"show_icons";s:1:"1";s:15:"show_print_icon";s:1:"1";s:15:"show_email_icon";s:1:"1";s:9:"show_hits";s:1:"1";s:11:"show_noauth";s:1:"0";s:23:"show_publishing_options";s:1:"1";s:20:"show_article_options";s:1:"1";s:25:"show_urls_images_frontend";s:1:"0";s:24:"show_urls_images_backend";s:1:"1";s:7:"targeta";i:0;s:7:"targetb";i:0;s:7:"targetc";i:0;s:11:"float_intro";s:4:"left";s:14:"float_fulltext";s:4:"left";s:15:"category_layout";s:6:"_:blog";s:19:"show_category_title";s:1:"0";s:16:"show_description";s:1:"0";s:22:"show_description_image";s:1:"0";s:8:"maxLevel";s:1:"1";s:21:"show_empty_categories";s:1:"0";s:16:"show_no_articles";s:1:"1";s:16:"show_subcat_desc";s:1:"1";s:21:"show_cat_num_articles";s:1:"0";s:21:"show_base_description";s:1:"1";s:11:"maxLevelcat";s:2:"-1";s:25:"show_empty_categories_cat";s:1:"0";s:20:"show_subcat_desc_cat";s:1:"1";s:25:"show_cat_num_articles_cat";s:1:"1";s:20:"num_leading_articles";s:1:"1";s:18:"num_intro_articles";s:1:"4";s:11:"num_columns";s:1:"2";s:9:"num_links";s:1:"4";s:18:"multi_column_order";s:1:"0";s:24:"show_subcategory_content";s:1:"0";s:21:"show_pagination_limit";s:1:"1";s:12:"filter_field";s:4:"hide";s:13:"show_headings";s:1:"1";s:14:"list_show_date";s:1:"0";s:11:"date_format";s:0:"";s:14:"list_show_hits";s:1:"1";s:16:"list_show_author";s:1:"1";s:11:"orderby_pri";s:5:"order";s:11:"orderby_sec";s:5:"rdate";s:10:"order_date";s:9:"published";s:15:"show_pagination";s:1:"2";s:23:"show_pagination_results";s:1:"1";s:14:"show_feed_link";s:1:"1";s:12:"feed_summary";s:1:"0";s:19:"info_block_position";s:1:"0";}}s:7:"metakey";s:0:"";s:8:"metadesc";s:0:"";s:8:"metadata";O:9:"JRegistry":1:{s:7:"�*�data";O:8:"stdClass":0:{}}s:7:"version";s:1:"1";s:8:"ordering";s:1:"1";s:8:"category";s:15:"Utility Modules";s:9:"cat_state";s:1:"1";s:10:"cat_access";s:1:"1";s:4:"slug";s:17:"59:wrapper-module";s:7:"catslug";s:18:"67:utility-modules";s:6:"author";s:10:"Super User";s:4:"mime";N;s:6:"layout";s:7:"article";s:4:"path";s:149:"index.php/using-joomla/extensions/modules/utility-modules/wrapper/67-sample-data-articles/joomla/extensions/modules/utility-modules/59-wrapper-module";s:10:"metaauthor";N;}s:15:"�*�instructions";a:5:{i:1;a:3:{i:0;s:5:"title";i:1;s:8:"subtitle";i:2;s:2:"id";}i:2;a:2:{i:0;s:7:"summary";i:1;s:4:"body";}i:3;a:8:{i:0;s:4:"meta";i:1;s:10:"list_price";i:2;s:10:"sale_price";i:3;s:7:"metakey";i:4;s:8:"metadesc";i:5;s:10:"metaauthor";i:6;s:6:"author";i:7;s:16:"created_by_alias";}i:4;a:2:{i:0;s:4:"path";i:1;s:5:"alias";}i:5;a:1:{i:0;s:8:"comments";}}s:11:"�*�taxonomy";a:4:{s:4:"Type";a:1:{s:7:"Article";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:7:"Article";s:5:"state";i:1;s:6:"access";i:1;}}s:6:"Author";a:1:{s:6:"Joomla";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:6:"Joomla";s:5:"state";i:1;s:6:"access";i:1;}}s:8:"Category";a:1:{s:15:"Utility Modules";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:15:"Utility Modules";s:5:"state";i:1;s:6:"access";i:1;}}s:8:"Language";a:1:{s:5:"en-GB";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:5:"en-GB";s:5:"state";i:1;s:6:"access";i:1;}}}s:3:"url";s:47:"index.php?option=com_content&view=article&id=59";s:5:"route";s:98:"index.php?option=com_content&view=article&id=59:wrapper-module&catid=67:utility-modules&Itemid=313";s:5:"title";s:14:"Wrapper Module";s:11:"description";s:91:"This module shows an iFrame window to specified location. Help {loadmodule wrapper,Wrapper}";s:9:"published";N;s:5:"state";i:1;s:6:"access";s:1:"1";s:8:"language";s:5:"en-GB";s:18:"publish_start_date";s:19:"2011-01-01 00:00:01";s:16:"publish_end_date";s:19:"0000-00-00 00:00:00";s:10:"start_date";s:19:"2011-01-01 00:00:01";s:8:"end_date";s:19:"0000-00-00 00:00:00";s:10:"list_price";N;s:10:"sale_price";N;s:7:"type_id";i:4;s:15:"defaultLanguage";s:5:"en-GB";}' -'134','index.php?option=com_content&view=article&id=60','index.php?option=com_content&view=article&id=60:news-feeds&catid=21:components&Itemid=267','Newsfeeds Categories View ','News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. Y','2013-06-02 17:41:39','6277a6f28266e29996c9e6e0cb8ea652','1','1','1','en-GB','2011-01-01 00:00:01','0000-00-00 00:00:00','2011-01-01 00:00:01','0000-00-00 00:00:00','0','0','4','O:19:"FinderIndexerResult":19:{s:11:"�*�elements";a:25:{s:2:"id";s:2:"60";s:5:"alias";s:10:"news-feeds";s:7:"summary";s:487:"

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You an use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ";s:4:"body";s:0:"";s:5:"catid";s:2:"21";s:10:"created_by";s:3:"100";s:16:"created_by_alias";s:6:"Joomla";s:8:"modified";s:19:"0000-00-00 00:00:00";s:11:"modified_by";s:1:"0";s:6:"params";O:9:"JRegistry":1:{s:7:"�*�data";O:8:"stdClass":67:{s:14:"article_layout";s:9:"_:default";s:10:"show_title";s:1:"1";s:11:"link_titles";s:1:"1";s:10:"show_intro";s:1:"1";s:13:"show_category";s:1:"1";s:13:"link_category";s:1:"1";s:20:"show_parent_category";s:1:"0";s:20:"link_parent_category";s:1:"0";s:11:"show_author";s:1:"1";s:11:"link_author";s:1:"0";s:16:"show_create_date";s:1:"0";s:16:"show_modify_date";s:1:"0";s:17:"show_publish_date";s:1:"1";s:20:"show_item_navigation";s:1:"1";s:9:"show_vote";s:1:"0";s:13:"show_readmore";s:1:"1";s:19:"show_readmore_title";s:1:"1";s:14:"readmore_limit";s:3:"100";s:10:"show_icons";s:1:"1";s:15:"show_print_icon";s:1:"1";s:15:"show_email_icon";s:1:"1";s:9:"show_hits";s:1:"1";s:11:"show_noauth";s:1:"0";s:23:"show_publishing_options";s:1:"1";s:20:"show_article_options";s:1:"1";s:25:"show_urls_images_frontend";s:1:"0";s:24:"show_urls_images_backend";s:1:"1";s:7:"targeta";i:0;s:7:"targetb";i:0;s:7:"targetc";i:0;s:11:"float_intro";s:4:"left";s:14:"float_fulltext";s:4:"left";s:15:"category_layout";s:6:"_:blog";s:19:"show_category_title";s:1:"0";s:16:"show_description";s:1:"0";s:22:"show_description_image";s:1:"0";s:8:"maxLevel";s:1:"1";s:21:"show_empty_categories";s:1:"0";s:16:"show_no_articles";s:1:"1";s:16:"show_subcat_desc";s:1:"1";s:21:"show_cat_num_articles";s:1:"0";s:21:"show_base_description";s:1:"1";s:11:"maxLevelcat";s:2:"-1";s:25:"show_empty_categories_cat";s:1:"0";s:20:"show_subcat_desc_cat";s:1:"1";s:25:"show_cat_num_articles_cat";s:1:"1";s:20:"num_leading_articles";s:1:"1";s:18:"num_intro_articles";s:1:"4";s:11:"num_columns";s:1:"2";s:9:"num_links";s:1:"4";s:18:"multi_column_order";s:1:"0";s:24:"show_subcategory_content";s:1:"0";s:21:"show_pagination_limit";s:1:"1";s:12:"filter_field";s:4:"hide";s:13:"show_headings";s:1:"1";s:14:"list_show_date";s:1:"0";s:11:"date_format";s:0:"";s:14:"list_show_hits";s:1:"1";s:16:"list_show_author";s:1:"1";s:11:"orderby_pri";s:5:"order";s:11:"orderby_sec";s:5:"rdate";s:10:"order_date";s:9:"published";s:15:"show_pagination";s:1:"2";s:23:"show_pagination_results";s:1:"1";s:14:"show_feed_link";s:1:"1";s:12:"feed_summary";s:1:"0";s:19:"info_block_position";s:1:"0";}}s:7:"metakey";s:0:"";s:8:"metadesc";s:0:"";s:8:"metadata";O:9:"JRegistry":1:{s:7:"�*�data";O:8:"stdClass":4:{s:6:"robots";s:0:"";s:6:"author";s:0:"";s:6:"rights";s:0:"";s:10:"xreference";s:0:"";}}s:7:"version";s:1:"1";s:8:"ordering";s:1:"4";s:8:"category";s:10:"Components";s:9:"cat_state";s:1:"1";s:10:"cat_access";s:1:"1";s:4:"slug";s:13:"60:news-feeds";s:7:"catslug";s:13:"21:components";s:6:"author";s:10:"Super User";s:4:"mime";N;s:6:"layout";s:7:"article";s:4:"path";s:132:"index.php/using-joomla/extensions/components/news-feeds-component/21-sample-data-articles/joomla/extensions/components/60-news-feeds";s:10:"metaauthor";N;}s:15:"�*�instructions";a:5:{i:1;a:3:{i:0;s:5:"title";i:1;s:8:"subtitle";i:2;s:2:"id";}i:2;a:2:{i:0;s:7:"summary";i:1;s:4:"body";}i:3;a:8:{i:0;s:4:"meta";i:1;s:10:"list_price";i:2;s:10:"sale_price";i:3;s:7:"metakey";i:4;s:8:"metadesc";i:5;s:10:"metaauthor";i:6;s:6:"author";i:7;s:16:"created_by_alias";}i:4;a:2:{i:0;s:4:"path";i:1;s:5:"alias";}i:5;a:1:{i:0;s:8:"comments";}}s:11:"�*�taxonomy";a:4:{s:4:"Type";a:1:{s:7:"Article";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:7:"Article";s:5:"state";i:1;s:6:"access";i:1;}}s:6:"Author";a:1:{s:6:"Joomla";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:6:"Joomla";s:5:"state";i:1;s:6:"access";i:1;}}s:8:"Category";a:1:{s:10:"Components";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:10:"Components";s:5:"state";i:1;s:6:"access";i:1;}}s:8:"Language";a:1:{s:5:"en-GB";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:5:"en-GB";s:5:"state";i:1;s:6:"access";i:1;}}}s:3:"url";s:47:"index.php?option=com_content&view=article&id=60";s:5:"route";s:89:"index.php?option=com_content&view=article&id=60:news-feeds&catid=21:components&Itemid=267";s:5:"title";s:26:"Newsfeeds Categories View ";s:11:"description";s:366:"News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You an use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help";s:9:"published";N;s:5:"state";i:1;s:6:"access";s:1:"1";s:8:"language";s:5:"en-GB";s:18:"publish_start_date";s:19:"2011-01-01 00:00:01";s:16:"publish_end_date";s:19:"0000-00-00 00:00:00";s:10:"start_date";s:19:"2011-01-01 00:00:01";s:8:"end_date";s:19:"0000-00-00 00:00:00";s:10:"list_price";N;s:10:"sale_price";N;s:7:"type_id";i:4;s:15:"defaultLanguage";s:5:"en-GB";}' +'134','index.php?option=com_content&view=article&id=60','index.php?option=com_content&view=article&id=60:news-feeds&catid=21:components&Itemid=267','Newsfeeds Categories View ','News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. Y','2013-06-02 17:41:39','6277a6f28266e29996c9e6e0cb8ea652','1','1','1','en-GB','2011-01-01 00:00:01','0000-00-00 00:00:00','2011-01-01 00:00:01','0000-00-00 00:00:00','0','0','4','O:19:"FinderIndexerResult":19:{s:11:"�*�elements";a:25:{s:2:"id";s:2:"60";s:5:"alias";s:10:"news-feeds";s:7:"summary";s:487:"

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You can use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ";s:4:"body";s:0:"";s:5:"catid";s:2:"21";s:10:"created_by";s:3:"100";s:16:"created_by_alias";s:6:"Joomla";s:8:"modified";s:19:"0000-00-00 00:00:00";s:11:"modified_by";s:1:"0";s:6:"params";O:9:"JRegistry":1:{s:7:"�*�data";O:8:"stdClass":67:{s:14:"article_layout";s:9:"_:default";s:10:"show_title";s:1:"1";s:11:"link_titles";s:1:"1";s:10:"show_intro";s:1:"1";s:13:"show_category";s:1:"1";s:13:"link_category";s:1:"1";s:20:"show_parent_category";s:1:"0";s:20:"link_parent_category";s:1:"0";s:11:"show_author";s:1:"1";s:11:"link_author";s:1:"0";s:16:"show_create_date";s:1:"0";s:16:"show_modify_date";s:1:"0";s:17:"show_publish_date";s:1:"1";s:20:"show_item_navigation";s:1:"1";s:9:"show_vote";s:1:"0";s:13:"show_readmore";s:1:"1";s:19:"show_readmore_title";s:1:"1";s:14:"readmore_limit";s:3:"100";s:10:"show_icons";s:1:"1";s:15:"show_print_icon";s:1:"1";s:15:"show_email_icon";s:1:"1";s:9:"show_hits";s:1:"1";s:11:"show_noauth";s:1:"0";s:23:"show_publishing_options";s:1:"1";s:20:"show_article_options";s:1:"1";s:25:"show_urls_images_frontend";s:1:"0";s:24:"show_urls_images_backend";s:1:"1";s:7:"targeta";i:0;s:7:"targetb";i:0;s:7:"targetc";i:0;s:11:"float_intro";s:4:"left";s:14:"float_fulltext";s:4:"left";s:15:"category_layout";s:6:"_:blog";s:19:"show_category_title";s:1:"0";s:16:"show_description";s:1:"0";s:22:"show_description_image";s:1:"0";s:8:"maxLevel";s:1:"1";s:21:"show_empty_categories";s:1:"0";s:16:"show_no_articles";s:1:"1";s:16:"show_subcat_desc";s:1:"1";s:21:"show_cat_num_articles";s:1:"0";s:21:"show_base_description";s:1:"1";s:11:"maxLevelcat";s:2:"-1";s:25:"show_empty_categories_cat";s:1:"0";s:20:"show_subcat_desc_cat";s:1:"1";s:25:"show_cat_num_articles_cat";s:1:"1";s:20:"num_leading_articles";s:1:"1";s:18:"num_intro_articles";s:1:"4";s:11:"num_columns";s:1:"2";s:9:"num_links";s:1:"4";s:18:"multi_column_order";s:1:"0";s:24:"show_subcategory_content";s:1:"0";s:21:"show_pagination_limit";s:1:"1";s:12:"filter_field";s:4:"hide";s:13:"show_headings";s:1:"1";s:14:"list_show_date";s:1:"0";s:11:"date_format";s:0:"";s:14:"list_show_hits";s:1:"1";s:16:"list_show_author";s:1:"1";s:11:"orderby_pri";s:5:"order";s:11:"orderby_sec";s:5:"rdate";s:10:"order_date";s:9:"published";s:15:"show_pagination";s:1:"2";s:23:"show_pagination_results";s:1:"1";s:14:"show_feed_link";s:1:"1";s:12:"feed_summary";s:1:"0";s:19:"info_block_position";s:1:"0";}}s:7:"metakey";s:0:"";s:8:"metadesc";s:0:"";s:8:"metadata";O:9:"JRegistry":1:{s:7:"�*�data";O:8:"stdClass":4:{s:6:"robots";s:0:"";s:6:"author";s:0:"";s:6:"rights";s:0:"";s:10:"xreference";s:0:"";}}s:7:"version";s:1:"1";s:8:"ordering";s:1:"4";s:8:"category";s:10:"Components";s:9:"cat_state";s:1:"1";s:10:"cat_access";s:1:"1";s:4:"slug";s:13:"60:news-feeds";s:7:"catslug";s:13:"21:components";s:6:"author";s:10:"Super User";s:4:"mime";N;s:6:"layout";s:7:"article";s:4:"path";s:132:"index.php/using-joomla/extensions/components/news-feeds-component/21-sample-data-articles/joomla/extensions/components/60-news-feeds";s:10:"metaauthor";N;}s:15:"�*�instructions";a:5:{i:1;a:3:{i:0;s:5:"title";i:1;s:8:"subtitle";i:2;s:2:"id";}i:2;a:2:{i:0;s:7:"summary";i:1;s:4:"body";}i:3;a:8:{i:0;s:4:"meta";i:1;s:10:"list_price";i:2;s:10:"sale_price";i:3;s:7:"metakey";i:4;s:8:"metadesc";i:5;s:10:"metaauthor";i:6;s:6:"author";i:7;s:16:"created_by_alias";}i:4;a:2:{i:0;s:4:"path";i:1;s:5:"alias";}i:5;a:1:{i:0;s:8:"comments";}}s:11:"�*�taxonomy";a:4:{s:4:"Type";a:1:{s:7:"Article";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:7:"Article";s:5:"state";i:1;s:6:"access";i:1;}}s:6:"Author";a:1:{s:6:"Joomla";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:6:"Joomla";s:5:"state";i:1;s:6:"access";i:1;}}s:8:"Category";a:1:{s:10:"Components";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:10:"Components";s:5:"state";i:1;s:6:"access";i:1;}}s:8:"Language";a:1:{s:5:"en-GB";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:5:"en-GB";s:5:"state";i:1;s:6:"access";i:1;}}}s:3:"url";s:47:"index.php?option=com_content&view=article&id=60";s:5:"route";s:89:"index.php?option=com_content&view=article&id=60:news-feeds&catid=21:components&Itemid=267";s:5:"title";s:26:"Newsfeeds Categories View ";s:11:"description";s:366:"News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You can use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help";s:9:"published";N;s:5:"state";i:1;s:6:"access";s:1:"1";s:8:"language";s:5:"en-GB";s:18:"publish_start_date";s:19:"2011-01-01 00:00:01";s:16:"publish_end_date";s:19:"0000-00-00 00:00:00";s:10:"start_date";s:19:"2011-01-01 00:00:01";s:8:"end_date";s:19:"0000-00-00 00:00:00";s:10:"list_price";N;s:10:"sale_price";N;s:7:"type_id";i:4;s:15:"defaultLanguage";s:5:"en-GB";}' '135','index.php?option=com_content&view=article&id=61','index.php?option=com_content&view=article&id=61:breadcrumbs-module&catid=75:navigation-modules&Itemid=416','Breadcrumbs Module','Breadcrumbs provide a pathway for users to navigate through the site. Help {loadmodule breadcrumbs,breadcrumbs}','2013-06-02 17:41:40','8098f7575c1dd1dac6ccc38520f78a57','1','1','1','en-GB','2011-01-01 00:00:01','0000-00-00 00:00:00','2011-01-01 00:00:01','0000-00-00 00:00:00','0','0','4','O:19:"FinderIndexerResult":19:{s:11:"�*�elements";a:25:{s:2:"id";s:2:"61";s:5:"alias";s:18:"breadcrumbs-module";s:7:"summary";s:303:"

    Breadcrumbs provide a pathway for users to navigate through the site. Help

    {loadmodule breadcrumbs,breadcrumbs}
    ";s:4:"body";s:0:"";s:5:"catid";s:2:"75";s:10:"created_by";s:3:"100";s:16:"created_by_alias";s:6:"Joomla";s:8:"modified";s:19:"0000-00-00 00:00:00";s:11:"modified_by";s:1:"0";s:6:"params";O:9:"JRegistry":1:{s:7:"�*�data";O:8:"stdClass":67:{s:14:"article_layout";s:9:"_:default";s:10:"show_title";s:1:"1";s:11:"link_titles";s:1:"1";s:10:"show_intro";s:1:"1";s:13:"show_category";s:1:"1";s:13:"link_category";s:1:"1";s:20:"show_parent_category";s:1:"0";s:20:"link_parent_category";s:1:"0";s:11:"show_author";s:1:"1";s:11:"link_author";s:1:"0";s:16:"show_create_date";s:1:"0";s:16:"show_modify_date";s:1:"0";s:17:"show_publish_date";s:1:"1";s:20:"show_item_navigation";s:1:"1";s:9:"show_vote";s:1:"0";s:13:"show_readmore";s:1:"1";s:19:"show_readmore_title";s:1:"1";s:14:"readmore_limit";s:3:"100";s:10:"show_icons";s:1:"1";s:15:"show_print_icon";s:1:"1";s:15:"show_email_icon";s:1:"1";s:9:"show_hits";s:1:"1";s:11:"show_noauth";s:1:"0";s:23:"show_publishing_options";s:1:"1";s:20:"show_article_options";s:1:"1";s:25:"show_urls_images_frontend";s:1:"0";s:24:"show_urls_images_backend";s:1:"1";s:7:"targeta";i:0;s:7:"targetb";i:0;s:7:"targetc";i:0;s:11:"float_intro";s:4:"left";s:14:"float_fulltext";s:4:"left";s:15:"category_layout";s:6:"_:blog";s:19:"show_category_title";s:1:"0";s:16:"show_description";s:1:"0";s:22:"show_description_image";s:1:"0";s:8:"maxLevel";s:1:"1";s:21:"show_empty_categories";s:1:"0";s:16:"show_no_articles";s:1:"1";s:16:"show_subcat_desc";s:1:"1";s:21:"show_cat_num_articles";s:1:"0";s:21:"show_base_description";s:1:"1";s:11:"maxLevelcat";s:2:"-1";s:25:"show_empty_categories_cat";s:1:"0";s:20:"show_subcat_desc_cat";s:1:"1";s:25:"show_cat_num_articles_cat";s:1:"1";s:20:"num_leading_articles";s:1:"1";s:18:"num_intro_articles";s:1:"4";s:11:"num_columns";s:1:"2";s:9:"num_links";s:1:"4";s:18:"multi_column_order";s:1:"0";s:24:"show_subcategory_content";s:1:"0";s:21:"show_pagination_limit";s:1:"1";s:12:"filter_field";s:4:"hide";s:13:"show_headings";s:1:"1";s:14:"list_show_date";s:1:"0";s:11:"date_format";s:0:"";s:14:"list_show_hits";s:1:"1";s:16:"list_show_author";s:1:"1";s:11:"orderby_pri";s:5:"order";s:11:"orderby_sec";s:5:"rdate";s:10:"order_date";s:9:"published";s:15:"show_pagination";s:1:"2";s:23:"show_pagination_results";s:1:"1";s:14:"show_feed_link";s:1:"1";s:12:"feed_summary";s:1:"0";s:19:"info_block_position";s:1:"0";}}s:7:"metakey";s:0:"";s:8:"metadesc";s:0:"";s:8:"metadata";O:9:"JRegistry":1:{s:7:"�*�data";O:8:"stdClass":4:{s:6:"robots";s:0:"";s:6:"author";s:0:"";s:6:"rights";s:0:"";s:10:"xreference";s:0:"";}}s:7:"version";s:1:"1";s:8:"ordering";s:1:"2";s:8:"category";s:18:"Navigation Modules";s:9:"cat_state";s:1:"1";s:10:"cat_access";s:1:"1";s:4:"slug";s:21:"61:breadcrumbs-module";s:7:"catslug";s:21:"75:navigation-modules";s:6:"author";s:10:"Super User";s:4:"mime";N;s:6:"layout";s:7:"article";s:4:"path";s:163:"index.php/using-joomla/extensions/modules/navigation-modules/breadcrumbs/75-sample-data-articles/joomla/extensions/modules/navigation-modules/61-breadcrumbs-module";s:10:"metaauthor";N;}s:15:"�*�instructions";a:5:{i:1;a:3:{i:0;s:5:"title";i:1;s:8:"subtitle";i:2;s:2:"id";}i:2;a:2:{i:0;s:7:"summary";i:1;s:4:"body";}i:3;a:8:{i:0;s:4:"meta";i:1;s:10:"list_price";i:2;s:10:"sale_price";i:3;s:7:"metakey";i:4;s:8:"metadesc";i:5;s:10:"metaauthor";i:6;s:6:"author";i:7;s:16:"created_by_alias";}i:4;a:2:{i:0;s:4:"path";i:1;s:5:"alias";}i:5;a:1:{i:0;s:8:"comments";}}s:11:"�*�taxonomy";a:4:{s:4:"Type";a:1:{s:7:"Article";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:7:"Article";s:5:"state";i:1;s:6:"access";i:1;}}s:6:"Author";a:1:{s:6:"Joomla";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:6:"Joomla";s:5:"state";i:1;s:6:"access";i:1;}}s:8:"Category";a:1:{s:18:"Navigation Modules";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:18:"Navigation Modules";s:5:"state";i:1;s:6:"access";i:1;}}s:8:"Language";a:1:{s:5:"en-GB";O:7:"JObject":4:{s:10:"�*�_errors";a:0:{}s:5:"title";s:5:"en-GB";s:5:"state";i:1;s:6:"access";i:1;}}}s:3:"url";s:47:"index.php?option=com_content&view=article&id=61";s:5:"route";s:105:"index.php?option=com_content&view=article&id=61:breadcrumbs-module&catid=75:navigation-modules&Itemid=416";s:5:"title";s:18:"Breadcrumbs Module";s:11:"description";s:111:"Breadcrumbs provide a pathway for users to navigate through the site. Help {loadmodule breadcrumbs,breadcrumbs}";s:9:"published";N;s:5:"state";i:1;s:6:"access";s:1:"1";s:8:"language";s:5:"en-GB";s:18:"publish_start_date";s:19:"2011-01-01 00:00:01";s:16:"publish_end_date";s:19:"0000-00-00 00:00:00";s:10:"start_date";s:19:"2011-01-01 00:00:01";s:8:"end_date";s:19:"0000-00-00 00:00:00";s:10:"list_price";N;s:10:"sale_price";N;s:7:"type_id";i:4;s:15:"defaultLanguage";s:5:"en-GB";}' '136','index.php?option=com_content&view=article&id=62','index.php?option=com_content&view=article&id=62:content-plugins&catid=25:plugins&Itemid=319','Content','Content plugins run when specific kinds of pages are loaded. They do things ranging from protecting email addresses from harvesters to creating page breaks. Default on: Email Cloaking Help Load Module Help Page Break Help Page Navigation Help Vote Help','2013-06-02 17:41:40','a4a66900b0ce617eb4f0ce92f0ec072b','1','1','1','en-GB','2011-01-01 00:00:01','0000-00-00 00:00:00','2011-01-01 00:00:01','0000-00-00 00:00:00','0','0','4','O:19:"FinderIndexerResult":19:{s:11:"�*�elements";a:25:{s:2:"id";s:2:"62";s:5:"alias";s:15:"content-plugins";s:7:"summary";s:1051:"

    Content plugins run when specific kinds of pages are loaded. They do things ranging from protecting email addresses from harvesters to creating page breaks.

    diff --git a/tests/unit/stubs/database/jos_ucm_content.csv b/tests/unit/stubs/database/jos_ucm_content.csv index fa3ac51731a2a..bbf38b619ab95 100644 --- a/tests/unit/stubs/database/jos_ucm_content.csv +++ b/tests/unit/stubs/database/jos_ucm_content.csv @@ -163,7 +163,7 @@
    {loadmodule mod_menu,Menu Example}
    ','1',,'0','1',,'0',,'0',,'2011-01-01 00:00:01','0','0000-00-00 00:00:00','*','2011-01-01 00:00:01','0000-00-00 00:00:00','29','127',,,'0','1','1',,,'75',,'1' '34','com_content.article','Most Read Content','most-read-content','

    This module shows a list of the currently published Articles which have the highest number of page views. Help

    {loadmodule articles_popular,Articles Most Read}
    ','1',,'0','1',,'0',,'0',,'2011-01-01 00:00:01','0','0000-00-00 00:00:00','*','2011-01-01 00:00:01','0000-00-00 00:00:00','30','128',,,'0','1','2','modules, content',,'64',,'1' -'35','com_content.article','News Feeds','news-feeds','

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You an use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ','1',,'0','1',,'0',,'0',,'2011-01-01 00:00:01','0','0000-00-00 00:00:00','*','2011-01-01 00:00:01','0000-00-00 00:00:00','60','158',,,'0','1','4',,,'21',,'1' +'35','com_content.article','News Feeds','news-feeds','

    News Feeds (com_newsfeeds) provides a way to organize and present news feeds. News feeds are a way that you present information from another site on your site. For example, the joomla.org website has numerous feeds that you can incorporate on your site. You can use menus to present a single feed, a list of feeds in a category, or a list of all feed categories. Help

    ','1',,'0','1',,'0',,'0',,'2011-01-01 00:00:01','0','0000-00-00 00:00:00','*','2011-01-01 00:00:01','0000-00-00 00:00:00','60','158',,,'0','1','4',,,'21',,'1' '36','com_content.article','News Flash','news-flash','

    Displays a set number of articles from a category based on date or random selection. Help

    {loadmodule articles_news,News Flash}
    ','1',,'0','1',,'0',,'0',,'2011-01-01 00:00:01','0','0000-00-00 00:00:00','*','2011-01-01 00:00:01','0000-00-00 00:00:00','31','129',,,'0','1','3','modules, content',,'64',,'1' '37','com_content.article','Options','options','

    As you make your Joomla! site you will control the details of the display using options also referred to as parameters. Options control everything from whether the author\'s name is displayed to who can view what to the number of items shown on a list.

    From 0eafccc4fcc70958d5b0062f40962cc739610d82 Mon Sep 17 00:00:00 2001 From: Walt Sorensen Date: Tue, 10 May 2016 07:32:34 -0600 Subject: [PATCH 035/294] redis is valid for hhvm (#10384) fixes unit test failure ```php JCacheStorageTest::testGetInstance with data set "defaultredis" ('redis', array(null, 'en-GB', true, null, 1462454997), 'JCacheStorageRedis') Undefined variable: connection /tests/unit/core/helper/helper.php:52 /libraries/joomla/cache/storage/redis.php:105 /libraries/joomla/cache/storage/redis.php:48 /libraries/joomla/cache/storage.php:169 /tests/unit/suites/libraries/joomla/cache/JCacheStorageTest.php:238 ``` --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6404dce960496..b84dde4227f32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,8 @@ matrix: services: - mysql - postgresql - env: INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no" INSTALL_REDIS="no" # Disabled items that currently do not work in travis-ci hhvm + - redis-server + env: INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no" # Disabled items that currently do not work in travis-ci hhvm allow_failures: - php: hhvm @@ -64,7 +65,8 @@ before_script: - if [[ $INSTALL_APCU == "yes" && $TRAVIS_PHP_VERSION = 5.* ]]; then printf "\n" | pecl install apcu-4.0.10 && phpenv config-add build/travis/phpenv/apcu-$TRAVIS_PHP_VERSION.ini; fi - if [[ $INSTALL_APCU == "yes" && $TRAVIS_PHP_VERSION = 7.* ]]; then printf "\n" | pecl install apcu-beta && phpenv config-add build/travis/phpenv/apcu-$TRAVIS_PHP_VERSION.ini; fi - if [[ $INSTALL_APCU_BC_BETA == "yes" ]]; then printf "\n" | pecl install apcu_bc-beta; fi - - if [[ $INSTALL_REDIS == "yes" ]]; then phpenv config-add build/travis/phpenv/redis.ini; fi + - if [[ $INSTALL_REDIS == "yes" && $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-add build/travis/phpenv/redis.ini; fi + - if [[ $INSTALL_REDIS == "yes" && $TRAVIS_PHP_VERSION = hhvm ]]; then cat build/travis/phpenv/redis.ini >> /etc/hhvm/php.ini; fi script: - libraries/vendor/bin/phpunit --configuration travisci-phpunit.xml From d5332676e6e6f3bd775dda08958d4ca456fbc0a0 Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Tue, 10 May 2016 14:34:40 +0100 Subject: [PATCH 036/294] Update Tinymce to 3.4.11 (#10383) * Update to 4.3.11 * permissions * update version for tinymce --- media/editors/tinymce/changelog.txt | 651 +++--------------- .../tinymce/plugins/codesample/plugin.min.js | 2 +- .../tinymce/plugins/textcolor/plugin.min.js | 2 +- .../tinymce/themes/modern/theme.min.js | 2 +- media/editors/tinymce/tinymce.min.js | 26 +- plugins/editors/tinymce/tinymce.xml | 2 +- 6 files changed, 94 insertions(+), 591 deletions(-) diff --git a/media/editors/tinymce/changelog.txt b/media/editors/tinymce/changelog.txt index a8c0be5701a63..2216253b56a32 100644 --- a/media/editors/tinymce/changelog.txt +++ b/media/editors/tinymce/changelog.txt @@ -1,3 +1,80 @@ +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. @@ -359,577 +436,3 @@ Version 4.1.0 (2014-06-18) 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. -Version 4.0.28 (2014-05-27) - Fixed critical issue with empty urls producing an exception when converted into absolute urls due to resent bug fix in tinymce.util.URI. -Version 4.0.27 (2014-05-27) - Added support for definition lists to lists plugin and enter key logic. This can now created by the format menu. - Added cmd option for the style_formats menu enables you to toggle commands on/off using the formats menu for example lists. - Added definition lists to visualblocks plugin so these are properly visualized like other list elements. - Added new paste_merge_formats option that reduces the number of nested text format elements produced on paste. Enabled by default. - Added better support for nested link_list/image_list menu items each item can now have a "menu" item with subitems. - Added "Add to Dictionary" support to spellchecker plugin when the backend tells that this feature is available. - Added new table_default_attributes/table_default_styles options patch contributed by Dan Villiom Podlaski Christiansen. - Added new table_class_list/table_cell_class_list/table_row_class_list options to table plugin. - Added new invalid_styles/valid_classes options to better control what gets returned for the style/class attribute. - Added new file_browser_callback_types option that allows you to specify where to display the picker based on dialog type. - Fixed so the selected state is properly handled on nested menu items in listboxes patch contributed by Jelle Kralt. - Fixed so the invisiblity css value for TinyMCE gets set to inherit instead of visible to better support dialog scripts like reveal. - Fixed bug where Gecko would remove anchors when pasting since the their default built in logic removes empty nodes. - Fixed bug where it wasn't possible to paste on Chrome Andoid since it doesn't properly support the Clipboard API yet. - Fixed bug where user defined type attribute value of text/javascript didn't get properly serialized. - Fixed bug where space in span elements would removed when the element was considered empty. - Fixed bug where the undo/redo button states didn't change if you removed all undo levels using undoManager.clear. - Fixed bug where unencoded links inside query strings or hash values would get processed by the relative urls logic. - Fixed bug where contextmenu would automatically close in inline editing mode on Firefox running on Mac. - Fixed bug where Gecko/IE would produce multiple BR elements when forced_root_block was set to false and a table was the last child of body. - Fixed bug where custom queryCommandState handlers didn't properly handle boolean states. - Fixed bug where auto closing float panels link menus wasn't automatically closed when the window was resized. - Fixed bug where the image plugin wouldn't update image dimensions when the current image was changed using the image_list select box. - Fixed bug with paste plugin not properly removing paste bin on Safari Mac when using the cmd+shift+v keyboard command. - Fixed bug where the paste plugin wouln't properly strip trailing br elements under very specific scenarios. - Fixed bug where enter key wouldn't properly place the caret on Gecko when pressing enter in a text block with a br ended line inside. - Fixed bug where Safari Mac shortcuts like Cmd+Opt+L didn't get passed through to the browser due to a Quirks fix. - Fixed so plain text mode works better when it converts rich text to plain text when pasting from for example Word. - Fixed so numeric keycodes can be used in the shortcut format enabling support for any key to be specified. - Fixed so table cells can be navigated with tab key and new rows gets automatically added when you are at the last cell. - Fixed bug where formatting before cursor gets removed when toggled off for continued content. -Version 4.0.26 (2014-05-06) - Fixed bug in media plugin where changing existing url did not use media regex patterns to create protocol neutral url. - Fixed bug where selection wasn't properly restored on IE 11 due to a browser bug with Element.contains. -Version 4.0.25 (2014-04-30) - Fixed bug where it wasn't possible to submit forms with editor instances on WebKit/Blink. -Version 4.0.24 (2014-04-30) - Added new event_root setting for inline editors. Lets you bind all editor events on a parent container. - Fixed bug where show/hide/isHidden didn't work properly for inline editor instances. - Fixed bug where preview plugin dialog didn't handle relative urls properly. - Fixed bug where the autolink plugin would remove the trailing space after an inserted link. - Fixed bug in paste plugin where pasting in a page with scrollbars would scroll to top of page in webkit browsers. - Fixed bug where the paste plugin on WebKit would remove styles from pasted source code with style attributes. - Fixed so image_list/link_list can be a function that allows custom async calls to populate these lists. -Version 4.0.23 (2014-04-24) - Added isSameOrigin method to tinymce.util.URI it handles default protocol port numbers better. Patch contributed by Matt Whelan. - Fixed bug where IE 11 would add br elements to the end of the editor body element each time it was shown/hidden. - Fixed bug where the autolink plugin would produce an index out of range exception for some very specific HTML. - Fixed bug where the charmap plugin wouldn't properly insert non breaking space characters when selected. - Fixed bug where pasting from Excel 2011 on Mac didn't produce a proper table when using the paste plugin. - Fixed bug where drag/dropping inside a table wouldn't properly end the table cell selection. - Fixed bug where drag/dropping images within tables on Safari on Mac wouldn't work properly. - Fixed bug where editors couldn't be re-initialized if they where externally destroyed. - Fixed bug where inline editors would produce a range index exception when clicking on buttons like bold. - Fixed bug where the preview plugin wouldn't properly handle non encoded upper UTF-8 characters. - Fixed so document.currentScript is used when detecting the current script location. Patch contributed by Mickael Desgranges. - Fixed issue with the paste_webkit_styles option so is disabled by default since it might produce a lot of extra styles. -Version 4.0.22 (2014-04-16) - Added lastLevel to BeforeAddUndo level event so it's easier to block undo level creation based. - Fixed so multiple list elements can be indented properly. Patch contributed by Dan Villiom Podlaski Christiansen. - Fixed bug where the selection would be at the wrong location sometimes for inline editor instances. - Fixed bug where drag/dropping content into an inline editor would fail on WebKit/Blink. - Fixed bug where table grid wouldn't work properly when the UI was rendered in for RTL mode. - Fixed bug where range normalization wouldn't handle mixed contentEditable nodes properly. - Fixed so the media plugin doesn't override the existing element rules you now need to manually whitelist non standard attributes. - Fixed so old language packs get properly loaded when the new longer language code format is used. - Fixed so all track changes junk such as comments, deletes etc gets removed when pasting from Word. - Fixed so non image data urls is blocked by default since they might contain scripts. - Fixed so it's possible to import styles from the current page stylesheets into an inline editor by using the importcss_file_filter. - Fixed bug where the spellchecker plugin wouldn't add undo levels for each suggestion replacement. - Reworked the default spellchecker RPC API to match the new PHP Spellchecker package. Fallback documented in the TinyMCE docs. -Version 4.0.21 (2014-04-01) - Added new getCssText method to formatter to get the preview css text value for a format to be used in UI. - Added new table_grid option that allows you to disable the table grid and use a dialog. - Added new image_description, image_dimensions options to image plugin. Patch contributed by Pat O'Neill. - Added new media_alt_source, media_poster, media_dimensions options to media plugin. Patch contributed by Pat O'Neill. - Added new ability to specify high/low dpi versions custom button images for retina displays. - Added new getWindows method to WindowManager makes it easier to control the currently opened windows. - Added new paste_webkit_styles option to paste plugin to control the styles that gets retained on WebKit. - Added preview of classes for the selectboxes used by the link_class_list/image_class_list options. - Added support for Sauce Labs browser testing using the new saucelabs-tests build target. - Added title input field to link dialog for a11y reasons can be disabled by using the link_title option. - Fixed so the toolbar option handles an array as input for multiple toolbar rows. - Fixed so the editor renders in XHTML mode apparently some people still use this rendering mode. - Fixed so icons gets rendered better on Firefox on Mac OS X by applying -moz-osx-font-smoothing. - Fixed so the auto detected external media sources produced protocol relative urls. Patch contributed by Pat O'Neill. - Fixed so it's possible to update the text of a button after it's been rendered to page DOM. - Fixed bug where iOS 7.1 Safari would open linked when images where inserted into links. - Fixed bug where IE 11 would scroll to the top of inline editable elements when applying formatting. - Fixed bug where tabindex on elements within the editor contents would cause issues on some browsers. - Fixed bug where link text wouldn't be properly updated in gecko if you changed an existing link. - Fixed bug where it wasn't possible to close dialogs with the escape key if the focus was inside a textbox. - Fixed bug where Gecko wouldn't paste rich text contents from Word or other similar word processors. - Fixed bug where binding events after the control had been rendered could fail to produce a valid delegate. - Fixed bug where IE 8 would throw and error when removing editors with a cross domain content_css setting. - Fixed bug where IE 9 wouldn't be able to select text after an editor instance with caret focus was removed. - Fixed bug where the autoresize plugin wouldn't resize the editor if you inserted huge images. - Fixed bug where multiple calls to the same init would produce extra editor instances. - Fixed bug where fullscreen toggle while having the autoresize plugin enabled wouldn't produce scrollbars. - Fixed so screen readers use a dialog instead of the grid for inserting tables. - Fixed so Office 365 Word contents gets filtered the same way as content from desktop Office. - Fixed so it's possible to override the root container for UI elements defaults to document.body. - Fixed bug where tabIndex is set to -1 on inline editable elements. It now keeps the existing tabIndex intact. - Fixed issue where the UndoManager transact method couldn't be nested since it only had one lock. - Fixed issue where headings/heading where labeled incorrectly as headers/header. -Version 4.0.20 (2014-03-18) - Fixed so all unit tests can be executed in a headless phantomjs instance for CI testing. - Fixed so directionality setting gets applied to the preview dialog as well as the editor body element. - Fixed a performance issue with the "is" method in DOMUtils. Patch contributed by Paul Bosselaar. - Fixed bug where paste plugin wouldn't paste plain text properly when pasting using browser menus. - Fixed bug where focusable SVG elements would throw an error since className isn't a proper string. - Fixed bug where the preview plugin didn't properly support the document_base_url setting. - Fixed bug where the focusedEditor wouldn't be set to null when that editor was removed. - Fixed bug where Gecko would throw an exception when editors where removed. - Fixed bug where the FocusManager wouldn't handle selection restoration properly on older IE versions. - Fixed bug where the searchreplace plugin would produce an exception on very specific multiple searches. - Fixed bug where some events wasn't properly unbound when all editors where removed from page. - Fixed bug where tapping links on iOS 7.1 would open the link instead of placing the caret inside. - Fixed bug where holding the finger down on iOS 7.1 would open the link/image callout menu. - Fixed so the jQuery plugin returns null when getting the tinymce instance of an element before it's initialized. - Fixed so selection normalization gets executed more often to reduce incorrect UI states on Gecko. - Fixed so the default action of closing the window on a form submission can be prevented using "preventDefault". -Version 4.0.19 (2014-03-11) - Added support for CSS selector expressions in object_resizing option. Allows you to control what to resize. - Added addToTop compatibility to compat3x plugin enables more legacy 3.x plugins to work properly. - Fixed bug on IE where it wasn't possible to align images when they where floated left. - Fixed bug where the indent/outdent buttons was enabled though readonly mode was enabled. - Fixed bug where the nodeChanged event was fired when readonly mode was enabled. - Fixed bug where events like blur could be fired to editor instances that where manually removed on IE 11. - Fixed bug where IE 11 would move focus to menubar/toolbar when using the tab key in a form with an editor. - Fixed bug where drag/drop in Safari on Mac didn't work properly due to lack of support for modern dataTransfer object. - Fixed bug where the remove event wasn't properly executed when the editor instances where removed. - Fixed bug where the selection change handler on inline editors would fail if the editor instance was removed. -Version 4.0.18 (2014-02-27) - Fixed bug where images would get class false/undefined when initially created. -Version 4.0.17 (2014-02-26) - Added much better wai-aria accessibility support when it comes to keyboard navigation of complex UI controls. - Added dfn,code,samp,kbd,var,cite,mark,q elements to the default remove formats list. Patch contributed by Naim Hammadi. - Added var,cite,dfn,code,mark,q,sup,sub to the list of elements that gets cloned on enter. Patch contributed by Naim Hammadi. - Added new visual_anchor_class option to specify a custom class for inline anchors. Patch contributed by Naim Hammadi. - Added support for paste_data_images on WebKit/Blink when the user pastes image data. - Added support for highlighting the video icon when a video is added that produces an iframe. Patch contributed by monkeydiane. - Added image_class_list/link_class_list options to image/link dialogs to let the user select classes. - Fixed bug where the ObjectResizeStart event didn't get fired properly by the ControlSelection class. - Fixed bug where the autolink plugin would steal focus when loaded on IE 9+. - Fixed bug where the editor save method would remove the current selection when called on an inline editor. - Fixed bug where the formatter would merge span elements with parent bookmarks if an id format was used. - Fixed bug where WebKit/Blink browsers would scroll to the top of the editor when pasting into an empty element. - Fixed bug where removing the editor would cause an error about wrong document on IE 11 under specific circumstances. - Fixed bug where Gecko would place the caret at an incorrect location when using backspace. - Fixed bug where Gecko would throw "Wrong Document Error" for ranges that pointing to removed nodes. - Fixed bug where it wasn't possible to properly update the title and encoding properties in the fullpage plugin. - Fixed bug where paste plugin would produce an extra undo level on IE. - Fixed bug where the formatter would apply inline formatting outside the current word in if the selection was collapsed. - Fixed bug where it wasn't possible to delete tables on Chrome if you placed the selection within all the contents of the table. - Fixed bug where older IE versions wouldn't properly insert contents into table cells when editor focus was lost. - Fixed bug where older IE versions would fire focus/blur events even though the editor focus didn't change. - Fixed bug where IE 11 would add two trailing BR elements to the editor iframe body if the editor was hidden. - Fixed bug where the visualchars plugin wouldn't display non breaking spaces if they where inserted while the state was enabled. - Fixed bug where the wordcount plugin would be very slow some HTML where to much backtracking occurred. - Fixed so pagebreak elements in the editor breaks pages when printing. Patch contributed by penc. - Fixed so UndoManager events pass though the original event that created the undo level such as a keydown, blur etc. - Fixed so the inserttime button is callsed insertdatetime the same as the menu item and plugin name. - Fixed so the word count plugin handles counting properly on most languages on the planet. - Fixed bug where the auroreize plugin would throw an error if the editor was manually removed within a few seconds. - Fixed bug where the image dialog would get stuck if the src was removed. Patch contribued by monkeydiane. - Fixed bug where there is an extra br tag for IE 9/10 that isn't needed. Patch contributed by monkeydiane. - Fixed bug where drag/drop in a scrolled editor would fail since it didn't use clientX/clientY cordinates. Patch contributed by annettem. -Version 4.0.16 (2014-01-31) - Fixed bug where the editor wouldn't be properly rendered on IE 10 depending on the document.readyState. -Version 4.0.15 (2014-01-31) - Fixed bug where paste in inline mode would produce an exception if the contents was pasted inside non overflow element. -Version 4.0.14 (2014-01-30) - Fixed a bug in the image plugin where images couldn't be inserted if the image_advtab option wasn't set to true. -Version 4.0.13 (2014-01-30) - Added language selection menu to spellchecker button similar to the 3.x functionality. Patch contributed by threebytesfull. - Added new style_formats_merge option that enables you to append to the default formats instead of replaceing them. Patch contributed by PacificMorrowind. - Fixed bug where the DOMUtils getPos API function didn't properly handle the location of the root element. Patch contributed by Andrew Ozz. - Fixed bug where the spellchecker wouldn't properly place the spellchecker suggestions menu. Patch contributed by Andrew Ozz. - Fixed bug where the tabfocus plugin would prevent the user from suing Ctrl+Tab, Patch contributed by Andrew Ozz. - Fixed bug where table resize handles could sometimes be added to elements out side the editable inline element. - Fixed bug where the inline mode editor UI would render incorrectly when the stylesheets didn't finish loading on Chrome. - Fixed bug where IE 8 would insert the image outside the editor unless it was focused first. - Fixed bug where older IE versions would throw an exception on drag/drop since they don't support modern dataTransfer API. - Fixed bug where the blockquote button text wasn't properly translated since it had the wrong English key. - Fixed bug where the importcss plugin didn't import a.class rules properly as selector formats. - Fixed bug where the combobox control couldn't be disabled or set to a specific character size initially. - Fixed bug where the FormItem didn't inherit the disabled state from the control to be wrapped. - Fixed bug where adding a TinyMCE instance within a TinyMCE dialog wouldn't properly delegate the events. - Fixed bug where any overflow parent containers would automatically scroll to the left when pasting in Chrome. - Fixed bug where IE could throw an error when search/replacing contents due to an invalid selection being returned. - Fixed bug where WebKit would fire focus/blur events incorrectly if the editor was empty due to a WebKit focus bug. - Fixed bug where WebKit/Blink would scroll to the top of editor if the height was more than the viewport height. - Fixed bug where blurring and removing the editor could cause an exteption to be thrown by the FocusManager. - Fixed bug where the media plugin would override specified dimensions for url pattern matches. Patch contributed by penc. - Fixed bug where the autoresize plugin wouldn't take margins into account when calculating the body size. Patch contributed by lepoltj. - Fixed bug where the image plugin would throw errors some times on IE 8 when it preloaded the image to get it's dimensions. - Fixed bug where the image plugin wouldn't update the style if the user closed the dialog before focusing out. Patch contributed by jonparrott. - Fixed bug where bindOnReady in EventUtils wouldn't work properly for some edge cases on older IE versions. Patch contributed by Godefroy. - Fixed bug where image selector formats wasn't properly handled by the importcss plugin. - Fixed bug where the dirty state of the editor wasn't set when editing an existing link URL. - Fixed bug where it wasn't possible to prevent paste from happening by blocking the default behavior when the paste plugin was enabled. - Fixed bug where text to display in the insert/edit link dialog wouldn't be properly entity encoded. - Fixed bug where Safari 7 on Mac OS X would delete contents if you pressed Cmd+C since it passes out a charCode for the event. - Fixed bug where bound drop events inside inline editors would get fired on all editor instances instead of the specific instance. - Fixed bug where images outlined selection border would be clipped when the autoresize plugin was enabled. - Fixed bug where image dimension constrains proportions wouldn't work properly if you altered a value and immediately clicked the submit button. - Fixed so you don't need to set language option to false when specifying a custom language_url. - Fixed so the link dialog "text to display" field gets automatically hidden if the selection isn't text contents. Patch contributed by Godefroy. - Fixed so the none option for the target field in the link dialog gets excluded when specifying the target_list config option. - Fixed so outline styles are displayed by default in the formats preview. Patch contributed by nhammadi. - Fixed so the max characters for width/height is more than 3 in the media and image dialogs. - Fixed so the old mceSpellCheck command toggles the spellchecker on/off. - Fixed so the setupeditor event is fired before the setup callback setting to ease up compatibility with 3.x. - Fixed so auto url link creation in IE 9+ is disabled by default and re-enabled by the autolink plugin. - Removed the custom scrollbars for WebKit since the default browser scrollbars looks a lot better now days. -Version 4.0.12 (2013-12-18) - Added new media_scripts option to the media plugin. This makes it possible to embed videos using script elements. - Fixed bug where WebKit/Blink would produce random span elements and styles when deleting contents inside the editor. - Fixed bug where WebKit/Blink would produce span elements out of link elements when they where removed by the unlink command. - Fixed bug where div block formats in inline mode where applied to all paragraphs within the editor. - Fixed bug where div blocks where marked as an active format in inline mode when doing non collapsed selections. - Fixed bug where the importcss plugin wouldn't append styles if the style_formats option was configured. - Fixed bug where the importcss plugin would import styles into groups multiple times for different format menus. - Fixed bug where the paste plugin wouldn't properly remove the paste bin element on IE if a tried to paste a file. - Fixed bug where selection normalization wouldn't properly handle cases where a range point was after a element node. - Fixed bug where the default time format for the inserttime split button wasn't the first item in the list. - Fixed bug where the default text for the formatselect control wasn't properly translated by the language pack. - Fixed bug where links would be inserted incorrectly when auto detecting absolute urls/emails links in inline mode. - Fixed bug where IE 11 would insert contents in the wrong order due to focus/blur async problems. - Fixed bug where pasting contents on IE sometimes would place the contents at the end of the editor. - Fixed so drag/drop on non IE browsers gets filtered by the paste plugin. IE doesn't have the necessary APIs. - Fixed so the paste plugin better detects Word 2007 contents not marked with -mso junk. - Fixed so image button isn't set to an active state when selecting control/media placeholder items. -Version 4.0.11 (2013-11-20) - Added the possibility to update button icon after it's been rendered. - Added new autosave_prefix option allows you to set the prefix for the local storage keys. - Added new pagebreak_split_block option to make it easier to split block elements with a page break. - Fixed bug where IE would some times produce font elements when typing out side the body root blocks. - Fixed bug where IE wouldn't properly use the configured root block element but instead use the a paragraph. - Fixed bug where IE would throw a stack overflow if control selections non images was made in inline mode. - Fixed bug where IE 8 would render an extra enter element if the contents of the editor was empty. - Fixed bug where the caret wasn't moved to the first suitable element when updating the source. - Fixed bug where protocol relative urls would be forced into http protocol. - Fixed bug where internal images with data urls such as video elements would be removed by the paste_data_images option. - Fixed bug where the autoresize plugin wouldn't properly resize the editor to initial contents some times. - Fixed bug where the templates dialog wouldn't be properly rendered on IE 7. - Fixed bug where updating styles in the advanced tab under the image dialog would remove the style attribute on cancel. - Fixed bug where tinymce.full.min.js bundle script wasn't detected when looking for the tinymce root path. - Fixed bug where the SaxParser would throw a malformed URI sequence for inproperly encoded uris. - Fixed bug where enabling table caption wouldn't properly render the caption element on IE 10 and below. - Fixed bug where the scrollbar would be placed to the left and on top of the text of menu items in RTL mode. - Fixed bug where Firefox on Mac OS X would navigate forward/backward on CMD+Arrow keys. - Fixed bug where fullscreen toggle on fixed sized editors wouldn't be properly full screened. - Fixed bug where the unlink button would remove all links from the body element in inline mode under running in IE. - Fixed bug where iOS wasn't able to place the caret inside an empty editor when clicking below the first line. - Fixed so internal document anchors in Word documents are retained when pasting using the paste from word feature. - Fixed so menu shortcuts gets rendered with the Apple command icon patch contributed by Andy Keller. - Fixed so the CSS compression of styles like "border" is a bit better for mixed values. - Fixed so the template_popup_width/template_popup_height option works properly in the template plugin. - Fixed so the languages parameter for AddOnManager.requireLangPack works the same way as for 3.x. - Fixed so the autosave plugin uses the current page path, query string and editor id as it's default prefix. - Fixed so the fullpage plugin adds/removes any link style sheets to the current iframe document. -Version 4.0.10 (2013-10-28) - Added new forced_root_block_attrs option that allows you to specify attributes for the root block. - Fixed bug where the custom resize handles didn't work properly on IE 11. - Fixed bug where the code plugin would select all contents in IE when content was updated. - Fixed bug where the scroll position wouldn't get applied to floating toolbars. - Fixed bug where focusing in/out of the editor would move the caret to the top of the editor on IE 11. - Fixed bug where the listboxes for link and image lists wasn't updated when the url/src was changed. - Fixed bug where selection bookmark elements would be visible in the elements path list. -Version 4.0.9 (2013-10-24) - Added support for external template files to template plugin just set the templates option to a URL with JSON data. - Added new allow_script_urls option. Enabled by default, trims all script urls from attributes. - Fixed bug where IE would sometimes throw a "Permission denied" error unless the Sizzle doc was properly removed. - Fixed bug where lists plugin would remove outer list items if inline editable element was within a LI parent. - Fixed bug where insert table grid widget would insert a table on item to large when using a RTL language pack. - Fixed bug where fullscreen mode wasn't rendering properly on IE 7. - Fixed bug where resize handlers wasn't moved correctly when scrolling inline editable elements. - Fixed bug where it wasn't possible to paste from Excel and possible other applications due to Clipboard API bugs in browsers. - Fixed bug where Shift+Ctrl+V didn't produce a plain text paste on IE. - Fixed bug where IE would sometimes move the selection to the a previous location. - Fixed bug where the editor wasn't properly scrolled to the content insert location in inline mode. - Fixed bug where some comments would be parsed as HTML by the SaxParser. - Fixed bug where WebKit/Blink would render tables incorrectly if unapplying formats when having multiple table cells selected. - Fixed bug where the paste_data_images option wouldn't strip all kinds of data images. - Fixed bug where the GridLayout didn't render items correctly if the contents overflowed the layout container. - Fixed bug where the Window wasn't properly positioned if the size of the button bar or title bar was wider than the contents. - Fixed bug where pseudo selectors for finding UI controls didn't work properly. - Fixed bug where resized splitbuttons would throw an exception if it didn't contain an icon. - Fixed bug where setContent would move focus into the editor even though it wasn't active. - Fixed bug where IE 11 would sometimes throw an "Invalid function" error when calling setActive on the body element. - Fixed bug where the importcss plugin would import styles from CSS files not present in the content_css array. - Fixed bug where the jQuery plugin will initialize the editors twice if the core was loaded using the script_url option. - Fixed various bugs and issues related to indentation of OL/UL list elements. - Fixed so IE 7 renders the classic mode buttons the same size as other browsers. - Fixed so document.readyState is checked when loading and initializing TinyMCE manually after page load. -Version 4.0.8 (2013-10-10) - Added RTL support so all of the UI is rendered right to left if a language pack has a _dir property set to rtl. - Fixed bug where layout managers wouldn't handle subpixel values properly. When for example the browser was zoomed in. - Fixed bug where the importcss plugin wouldn't import classes from local stylesheets with remote @import rules on Gecko. - Fixed bug where Arabic characters wouldn't be properly counted in wordcount plugin. - Fixed bug where submit event would still fire even if it was unbound on IE 10. Now the event is simply ignored. - Fixed bug where IE 11 would return border-image: none when getting style attributes with borders in them. - Fixed various UI rendering issues on older IE versions. - Fixed so readonly option renderes the editor in inline mode with all UI elements disabled and all events blocked. -Version 4.0.7 (2013-10-02) - Added new importcss_selector_filter option to importcss plugin. Makes it easier to select specific classes to import. - Added new importcss_groups option to importcss plugin. Enables you separate classes into menu groups based on filters. - Added new PastePreProcess/PastePostProcess events and reintroduced paste_preprocess/paste_postprocess paste options. - Added new paste_word_valid_elements option lets you control what elements gets pasted when pasting from Word. - Fixed so panelbutton is easier to use. It's now possible to set the panel contents to any container type. - Fixed so editor.destroy calls editor.remove so that both destroy and remove can be used to remove an editor instance. - Fixed so the searchreplace plugin doesn't move focus into the editor until you close the dialog. - Fixed so the searchreplace plugin search for next item if you hit enter inside the dialog. - Fixed so importcss_selector_converter callback is executed with the scope set to importcss plugin instance. - Fixed so the default selector converter function is exposed in importcss plugin. - Fixed issue with the tabpanel not expanding properly when the tabs where wider than the body of the panel. - Fixed issue with the menubar option producing a JS exception if set to true. - Fixed bug where closing a dialog with an opened listbox would cause errors if new dialogs where opened. - Fixed bug where hidden input elements wasn't removed when inline editor instances where removed. - Fixed bug where editors wouldn't initialize some times due to event logic not working correctly. - Fixed bug where pre elements would cause searchreplace and spellchecker plugins to mark incorrect locations. - Fixed bug where embed elements wouldn't be properly resized if they where configured in using the video_template_callback. - Fixed bug where paste from word would remove all BR elements since it was missing in the default paste_word_valid_elements. - Fixed bug where paste filtering wouldn't work properly on old WebKit installations pre Clipboard API. - Fixed bug where linebreaks would be removed by paste plugin on IE since it didn't properly detect Word contents. - Fixed bug where paste plugin would convert some Word paragraphs that looked like lists into lists. - Fixed bug where editors wasn't properly initialized if the document.domain is set to the same as the current domain on IE. - Fixed bug where an exception was thrown when removing an editor after opening the context menu multiple times. - Fixed bug where paste as plain text on Gecko would add extra BR elements when pasting paragraphs. -Version 4.0.6 (2013-09-12) - Added new compat3x plugin that makes it possible to load most 3.x plugins. Only available in the development package. - Added new skin_url option enables you to load local skins when using the CDN version. - Added new theme_url option enables you to load local themes when using the CDN version. - Added new importcss_file_filter option to importcss to enable users to specify what files to import from. - Added new template_preview_replace_values option to template plugin to add example data for variables. - Added image option support for addMenuItem calls. Enables you to provide a custom image for menu items. - Fixed bug where editor.insertContent wouldn't set format and selection type on events. - Fixed bug where inserting BR elements on IE 8 would thrown an exception when the range is at a empty text node. - Fixed bug where outdent of single LI element within another LI would produce an empty list element OL/UL. - Fixed bug where the bullist/numlist buttons wouldn't be deselected when deleting all contents. - Fixed bug where toggling an empty list item off wouldn't produce a new empty block element. - Fixed bug where it wasn't possible to apply lists to mixed text blocks and br lines. - Fixed bug where it wasn't possible to paste contents on iOS when the paste plugin was enabled. - Fixed bug where it wasn't possible to delete HR elements on Gecko. - Fixed bug where scrolling and refocusing using the mouse would place the caret incorrectly on IE. - Fixed bug where you needed to hit the empty paragraph to get editor focus in IE 11. - Fixed bug where activeEditor wasn't set to the correct editor when opening windows. - Fixed bug where dirty state wasn't set to false when undoing to the first undo level. - Fixed bug where pasting in inline mode on Safari on Mac wouldn't work properly. - Fixed bug where content_css wasn't loaded into the insert template dialog. - Fixed bug where setting the contents of the editor to non text contents would produce an incorrect selection range. - Fixed so code dialog height gets smaller that the viewport height if it doesn't fit. - Fixed so inline editable regions scroll when pressing enter/return. - Fixed so inline toolbar gets positioned correctly when inline element is within a scrollable container. - Fixed various memory leaks when removing editor instances dynamically. - Removed CSS for BR elements in visualblocks due to problems with Chrome and IE. -Version 4.0.5 (2013-08-27) - Added visuals for UL, LI and BR to visualblocks plugin. Patch contributed by Dan Ransom. - Added new autosave_restore_when_empty option to autosave plugin. Enabled by default. - Fixed bug where an exception was thrown when inserting images if valid_elements didn't include an ID for the image. - Fixed bug where the advlist plugin wouldn't properly render the splitbutton controls. - Fixed bug where visual blocks menu item wouldn't be marked checked when using the visualblocks_default_state option. - Fixed bug where save button in save plugin wouldn't get properly enabled when contents was changed. - Fixed bug where it was possible to insert images without any value for it's source attribute. - Fixed bug where altering image attributes wouldn't add a new undo level. - Fixed bug where import rules in CSS files wouldn't be properly imported by the importcss plugin. - Fixed bug where selectors could be imported multiple times. Producing duplicate formats. - Fixed bug where IE would throw exception if selection was changed while the editor was hidden. - Fixed so complex rules like .class:before doesn't get imported by default in the importcss plugin. - Fixed so it's possible to remove images by setting the src attribute to a blank value. - Fixed so the save_enablewhendirty setting in the save plugin is enabled by default. - Fixed so block formats drop down for classic mode can be translated properly using language packs. - Fixed so hr menu item and toolbar button gets the same translation string. - Fixed so bullet list toolbar button gets the correct translation from language packs. - Fixed issue with Chrome logging CSS warning about border styling for combo boxes. - Fixed issue with Chrome logging warnings about deprecated keyLocation property. - Fixed issue where custom_elements would not remove the some of the default rules when cloning rules from div and span. -Version 4.0.4 (2013-08-21) - Added new importcss plugin. Lets you auto import classes from CSS files similar to the 3.x behavior. - Fixed bug where resize handles would be positioned incorrectly when inline element parent was using position: relative. - Fixed bug where IE 8 would throw Unknown runtime error if the editor was placed within a P tag. - Fixed bug where removing empty lists wouldn't produce blocks or brs where the old list was in the DOM. - Fixed bug where IE 10 wouldn't properly initialize template dialog due to async loading issues. - Fixed bug where autosave wouldn't properly display the warning about content not being saved due to isDirty changes. - Fixed bug where it wouldn't be possible to type if a touchstart event was bound to the parent document. - Fixed bug where code dialog in code plugin wouldn't wouldn't add a proper undo level. - Fixed issue where resizing the editor in vertical mode would set the iframe width to a pixel value. - Fixed issue with naming of insertdatetime settings. All are now prefixed with the plugin name. - Fixed so an initial change event is fired when the user types the first character into the editor. - Fixed so swf gets mapped to object element in media plugin. Enables embedding of flash with alternative poster. -Version 4.0.3 (2013-08-08) - Added new code_dialog_width/code_dialog_height options to control code dialog size. - Added missing pastetext button that works the same way as the pastetext menu item. - Added missing smaller browse button for the classical smaller toolbars. - Fixed bug where input method would produce new lines when inserting contents to an empty editor. - Fixed bug where pasting single indented list items from Word would cause a JS exception. - Fixed bug where applying block formats inside list elements in inline mode would apply them to whole document. - Fixed bug where link editing in inline mode would cause exception on IE/WebKit. - Fixed bug where IE 10 wouldn't render the last button group properly in inline mode due to wrapping. - Fixed bug where localStorage initialization would fail on Firefox/Chrome with disabled support. - Fixed bug where image elements would get an __mce id when undo/redo:ing to a level with image changes. - Fixed bug where too long template names wouldn't fit the listbox in template plugin. - Fixed bug where alignment format options would be marked disabled when forced_root_block was set to false. - Fixed bug where UI listboxes such as fontsize, fontfamily wouldn't update properly when switching editors in inline mode. - Fixed bug where the formats select box would mark the editable container DIV as a applied format in inline mode. - Fixed bug where IE 7/8 would scroll to empty editors when initialized. - Fixed bug where IE 7/8 wouldn't display previews of format options. - Fixed bug where UI states wasn't properly updated after code was changed in the code dialog. - Fixed bug with setting contents in IE would select all contents within the editor. - Fixed so the undoManages transact function disables any other undo levels from being added while within the transaction. - Fixed so sub/sup elements gets removed when the Clear formatting action is executed. - Fixed so text/javascript type value get removed by default from script elements to match the HTML5 spec. -Version 4.0.2 (2013-07-18) - Fixed bug where formatting using menus or toolbars wasn't possible on Opera 12.15. - Fixed bug where IE 8 keyboard input would break after paste using the paste plugin. - Fixed bug where IE 8 would throw an error when populating image size in image dialog. - Fixed bug where image resizing wouldn't work properly on latest IE 10.0.9 version. - Fixed bug where focus wasn't moved to the hovered menu button in a menubar container. - Fixed bug where paste would produce an extra uneeded undo level on IE and Gecko. - Fixed so anchors gets listed in the link dialog as they where in TinyMCE 3.x. - Fixed so sub, sup and strike though gets passed through when pasting from Word. - Fixed so Ctrl+P can be used to print the current document. Patch contributed by jashua212. -Version 4.0.1 (2013-06-26) - Added new paste_as_text config option to force paste as plaintext mode. - Added new pastetext menu item that lets you toggle paste as plain text mode on/off. - Added new insertdatetime_element option to insertdatetime plugin. Enables HTML5 time element support. - Added new spellchecker_wordchar_pattern option to allow configuration of language specific characters. - Added new marker to formats menu displaying the formats used at the current selection/caret location. - Fixed bug where the position of the text color picker would be wrong if you switched to fullscreen. - Fixed bug where the link plugin would ask to add the mailto: prefix multiple times. - Fixed bug where list outdent operation could produce empty list elements on specific selections. - Fixed bug where element path wouldn't properly select parent elements on IE. - Fixed bug where IE would sometimes throw an exception when extrancting the current selection range. - Fixed bug where line feeds wasn't properly rendered in source view on IE. - Fixed bug where word count wouldn't be properly rendered on IE 7. - Fixed bug where menubuttons/listboxes would have an incorrect height on IE 7. - Fixed bug where browser spellchecking was enabled while editing inline on IE 10. - Fixed bug where spellchecker wouldn't properly find non English words. - Fixed bug where deactivating inline editor instances would force padding-top: 0 on page body. - Fixed bug where jQuery would initialize editors multiple times since it didn't check if the editor already existed. - Fixed bug where it wasn't possible to paste contents on IE 10 in modern UI mode when paste filtering was enabled. - Fixed bug where tabfocus plugin wouldn't work properly on inline editor instances. - Fixed bug where fullpage plugin would clear the existing HTML head if contents where inserted into the editor. - Fixed bug where deleting all table rows/columns in a table would cause an exception to be thrown on IE. - Fixed so color button panels gets toggled on/off when activated/deactivated. - Fixed so format menu items that can't be applied to the current selection gets disabled. - Fixed so the icon parameter for addButton isn't automatically filled if a button text is provided. - Fixed so image size fields gets updated when selecting a new image in the image dialog. - Fixed so it doesn't load any language pack if the language option is set to "en". - Fixed so ctrl+shift+z works as an alternative redo shortcut to match a common Mac OS X shortcut. - Fixed so it's not possible to drag/drop in images in Gecko by default when paste plugin is enabled. - Fixed so format menu item texts gets translated using the specified language pack. - Fixed so the image dialog title is the same as the insert/edit image button text. - Fixed so paste as plain text produces BR:s in PRE block and when forced_root_block is disabled. -Version 4.0 (2013-06-13) - Added new insertdate_dateformat, insertdate_timeformat and insertdate_formats options to insertdatetime. - Added new font_formats, fontsize_formats and block_formats options to configure fontselect, fontsizeselect and formatselect. - Added new table_clone_elements option to table plugin. Enables you to specify what elements to clone when adding columns/rows. - Added new auto detect logic for site and email urls in link plugin to match the logic found in 3.x. - Added new getParams/setParams to WindowManager to make it easier to handle params to iframe based dialogs. Contributed by Ryan Demmer. - Added new textcolor options that enables you to specify the colors you want to display. Contributed by Jennifer Arsenault. - Added new external file support for link_list and image_list options. The file format is a simple JSON file. - Added new "both" mode for the resize option. Enables resizing in both width and height. - Added new paste_data_images option that allows you to enable/disable paste of data images. - Added new fixed_toolbar_container option that allows you to add a fixed container for the inline toolbar. - Fixed so font name, font size and block format select boxes gets updated with the current format. - Fixed so the resizeTo/resizeBy methods for the theme are exposed as it as in 3.x. - Fixed so the textcolor controls are splitbuttons as in 3.x. Patch contributed by toxalot/jashua212. - Fixed bug where the theme content css wasn't loaded into the preview dialog. - Fixed bug where the template description in template dialog wouldn't display the text correctly. - Fixed bug where various UI elements wasn't properly removed when an editor instance was removed. - Fixed bug where editing links in inline mode would fail on WebKit. - Fixed bug where the pagebreak_separator option in the pagebreak plugin wasn't working properly. - Fixed bug where the child panels of the float panel in inline mode wasn't properly placed. - Fixed bug where the float panel children of windows wasn't position fixed. - Fixed bug where the size of the ok button was hardcoded, caused issues with i18n. - Fixed bug where single comment in editor would cause exceptions due to resolve path logic not detecting elements only. - Fixed bug where switching alignment of tables in dialogs wouldn't properly remove existing alignments. - Fixed bug where the table properties dialog would show columns/rows textboxes. - Fixed bug where jQuery wasn't used instead of Sizzle in the jQuery version of TinyMCE. - Fixed bug where setting resize option to false whouldn't properly render the word count. - Fixed bug where table row type change would produce multiple table section elements. - Fixed bug where table row type change on multiple rows would add them in incorrect order. - Fixed bug where fullscreen plugin would maximize the editor on resize after toggling it off. - Fixed bug where context menu would be position at an incorrect coordinate in inline mode. - Fixed bug where inserting lists in inline mode on IE would produce errors since the body would be converted. - Fixed bug where the body couldn't be styled properly in custom content_css files. - Fixed bug where template plugins menu item would override the image menu item. - Fixed bug where IE 7-8 would render the text inside inputs at the wrong vertical location. - Fixed bug where IE configured to IE 7 compatibility mode wouldn't render the icons properly. - Fixed bug where editor.focus wouldn't properly fire the focusin event on WebKit. - Fixed bug where some keyboard shortcuts wouldn't work on IE 8. - Fixed bug where the undo state wasn't updated until the end of a typing level. - Fixed bug where keyboard shortcuts on Mac OS wasn't working correctly. - Fixed bug where empty inline elements would be created when toggling formatting of in empty block. - Fixed bug where applying styles on WebKit would fail in inline mode if the user released the mouse button outside the body. - Fixed bug where the visual aids menu item wasn't selected if the editor was empty. - Fixed so the isDirty/isNotDirty states gets updated to true/false on save() and change events. - Fixed so skins have separate CSS files for inline and iframe mode. - Fixed so menus and tool tips gets constrained to the current viewport. - Fixed so an error is thrown if users load jQuery after the jQuery version of TinyMCE. - Fixed so the filetype for media dialog passes out media instead of image as file type. - Fixed so it's possible to disable the toolbar by setting it to false. - Fixed so autoresize plugin isn't initialized when the editor is in inline mode. - Fixed so the inline editing toolbar will be rendered below elements if it doesn't fit above it. -Version 4.0b3 (2013-05-15) - Added new optional advanced tab for image dialog with hspace, vspace, border and style. - Added new change event that gets fired when undo levels are added to editor instances. - Added new removed_menuitems option enables you to list menu items to remove from menus. - Added new external_plugins option enables you to specify external locations for plugins. - Added new language_url option enables you to specify an external location for the language pack. - Added new table toolbar control that displays a menu for inserting/editing menus. - Fixed bug where IE 10 wouldn't load files properly from cache. - Fixed bug where image dialog wouldn't properly remove width/height if blanked. - Fixed bug where all events wasn't properly unbound when editor instances where removed. - Fixed bug where data- attributes wasn't working properly in the SaxParser. - Fixed bug where Gecko wouldn't properly render broken images. - Fixed bug where Gecko wouldn't produce the same error dialog on paste as other browsers. - Fixed bug where is wasn't possible to prevent execCommands in beforeExecCommand event. - Fixed bug where the fullpage_hide_in_source_view option wasn't working in the fullpage plugin. - Fixed bug where the WindowManager close method wouldn't properly close the top most window. - Fixed bug where it wasn't possible to paste in IE 10 due to JS exception. - Fixed bug where tab key didn't move to the right child control in tabpanels. - Fixed bug where enter inside a form would focus the first button like control in TinyMCE. - Fixed bug where it would match scripts that looked like the tinymce base directory incorrectly. - Fixed bug where the spellchecker wouldn't properly toggle off the spellcheck mode if no errors where found. - Fixed bug in searchreplace plugin where it would remove all spans instead of the marker spans. - Fixed issue where selector wouldn't disable existing mode setting. - Fixed so it's easier to configure the menu and menubar. - Fixed so bodyId/bodyClass is applied to preview as it's done to the editor iframe. -Version 4.0b2 (2013-04-24) - Added new rel_list option to link plugin. Enables you to specify values for a rel drop down. - Added new target_list option to link plugin. Enables you to add to or disable the link targets. - Added new link_list option to link plugin. Enables you to specify a list of links to pick from. - Added new image_list option to image pluigin. Enables you to specify a list of images to pick from. - Added new textcolor plugin. This plugin holds the text color and text background color buttons. - Fixed bug where alignment of images wasn't working properly on Firefox. - Fixed bug where IE 8 would throw error when inserting a table. - Fixed bug where IE 8 wouldn't render the element path properly. - Fixed bug where old IE versions would render a red focus border. - Fixed bug where old IE versions would render a frameborder for iframes. - Fixed bug where WebKit wouldn't properly open the cell properties dialog on edge case selection. - Fixed bug where charmap wouldn't correctly render all characters in grid. - Fixed bug where link dialog wouldn't update the link text properly. - Fixed bug where the focus/blur states on inline editors wasn't handled correctly on IE. - Fixed bug where IE would throw "unknown error" exception sometimes in ForceBlocks logic. - Fixed bug where IE would't properly render disabled buttons in button groups. - Fixed bug where tab key wouldn't properly move to next input field in dialogs. - Fixed bug where resize handles for tables and images would appear at wrong positions on IE 8. - Fixed bug where dialogs would produce stack overflow if title was wider than content. - Fixed bug with table cell/row menu items being enabled even if no cell was selected. - Fixed so the text to display is after the URL field in the link dialog. - Fixed so the width setting applies to the editor panel in modern theme. - Fixed so it's easier to make custom icons for buttons using plain old images. -Version 4.0b1 (2013-04-11) - Added new node.js based build process used uglify, amdlc, jake etc. - Added new package.json to enable easy installation of dependent npm packages used for building. - Added new link, image, charmap, anchor, code, hr plugins since these are now moved out of the theme. - Rewrote all plugins and themes from scratch so they match the new UI framework. - Replaced all events to use the more common .on/off() methods instead of ..add/remove. - Rewrote the TinyMCE core to use AMD style modules. Gets compiled to an inline library using amdlc. - Rewrote all core logic to pass jshint rules. Each file has specific jshint rules. - Removed all IE6 specific logic since 4.x will no longer support such an old browser. - Reworked the file names and directory structure of the whole project to be more similar to other JS projects. - Replaced tinymce.util.Cookie with tinymce.util.LocalStorage. Fallback to userData for IE 7 native localStorage for the rest. - Replaced the old 3.x UI with a new modern UI framework. - Removed "simple" theme and added new "modern" theme. - Removed advhr, advimage, advlink, iespell, inlinepopups, xhtmlxtras and style plugins. - Updated Sizzle to the latest version. diff --git a/media/editors/tinymce/plugins/codesample/plugin.min.js b/media/editors/tinymce/plugins/codesample/plugin.min.js index 574fe6b9c4fab..fc2fa2adbbcd3 100644 --- a/media/editors/tinymce/plugins/codesample/plugin.min.js +++ b/media/editors/tinymce/plugins/codesample/plugin.min.js @@ -1 +1 @@ -!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;fa.length)break a;if(!(q instanceof e)){k.lastIndex=0;var r=k.exec(q);if(r){m&&(n=r[1].length);var s=r.index-1+n,r=r[0].slice(n),t=r.length,u=s+t,v=q.slice(0,s+1),w=q.slice(u+1),x=[p,1];v&&x.push(v);var y=new e(h,l?c.tokenize(r,l):r,o);x.push(y),w&&x.push(w),Array.prototype.splice.apply(f,x)}}}}}return f},hooks:{all:{},add:function(a,b){var d=c.hooks.all;d[a]=d[a]||[],d[a].push(b)},run:function(a,b){var d=c.hooks.all[a];if(d&&d.length)for(var e,f=0;e=d[f++];)e(b)}}},d=c.Token=function(a,b,c){this.type=a,this.content=b,this.alias=c};return d.stringify=function(a,b,e){if("string"==typeof a)return a;if("Array"===c.util.type(a))return a.map(function(c){return d.stringify(c,b,a)}).join("");var f={type:a.type,content:d.stringify(a.content,b,e),tag:"span",classes:["token",a.type],attributes:{},language:b,parent:e};if("comment"==f.type&&(f.attributes.spellcheck="true"),a.alias){var g="Array"===c.util.type(a.alias)?a.alias:[a.alias];Array.prototype.push.apply(f.classes,g)}c.hooks.run("wrap",f);var h="";for(var i in f.attributes)h+=(h?" ":"")+i+'="'+(f.attributes[i]||"")+'"';return"<"+f.tag+' class="'+f.classes.join(" ")+'" '+h+">"+f.content+""},b.document?void 0:b.addEventListener?(b.addEventListener("message",function(a){var d=JSON.parse(a.data),e=d.language,f=d.code,g=d.immediateClose;b.postMessage(c.highlight(f,c.languages[e],e)),g&&b.close()},!1),b.Prism):b.Prism}();return"undefined"!=typeof module&&module.exports&&(module.exports=c),"undefined"!=typeof global&&(global.Prism=c),c.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://,cdata://i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},c.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),c.languages.xml=c.languages.markup,c.languages.html=c.languages.markup,c.languages.mathml=c.languages.markup,c.languages.svg=c.languages.markup,c.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},c.languages.css.atrule.inside.rest=c.util.clone(c.languages.css),c.languages.markup&&(c.languages.insertBefore("markup","tag",{style:{pattern:/[\w\W]*?<\/style>/i,inside:{tag:{pattern:/|<\/style>/i,inside:c.languages.markup.tag.inside},rest:c.languages.css},alias:"language-css"}}),c.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:c.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:c.languages.css}},alias:"language-css"}},c.languages.markup.tag)),c.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/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":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},c.languages.javascript=c.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|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|true|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),c.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),c.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:c.languages.javascript}},string:/[\s\S]+/}}}),c.languages.markup&&c.languages.insertBefore("markup","tag",{script:{pattern:/[\w\W]*?<\/script>/i,inside:{tag:{pattern:/|<\/script>/i,inside:c.languages.markup.tag.inside},rest:c.languages.javascript},alias:"language-javascript"}}),c.languages.js=c.languages.javascript,c.languages.c=c.languages.extend("clike",{keyword:/\b(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:/\-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),c.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0}}}}),delete c.languages.c["class-name"],delete c.languages.c["boolean"],c.languages.csharp=c.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+)\b/i}),c.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0}}),c.languages.cpp=c.languages.extend("c",{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|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/,"boolean":/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),c.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}}),c.languages.java=c.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),c.languages.php=c.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0}}),c.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),c.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),c.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),c.languages.markup&&(c.hooks.add("before-highlight",function(a){"php"===a.language&&(a.tokenStack=[],a.backupCode=a.code,a.code=a.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,function(b){return a.tokenStack.push(b),"{{{PHP"+a.tokenStack.length+"}}}"}))}),c.hooks.add("before-insert",function(a){"php"===a.language&&(a.code=a.backupCode,delete a.backupCode)}),c.hooks.add("after-highlight",function(a){if("php"===a.language){for(var b,d=0;b=a.tokenStack[d];d++)a.highlightedCode=a.highlightedCode.replace("{{{PHP"+(d+1)+"}}}",c.highlight(b,a.grammar,"php").replace(/\$/g,"$$$$"));a.element.innerHTML=a.highlightedCode}}),c.hooks.add("wrap",function(a){"php"===a.language&&"markup"===a.type&&(a.content=a.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'$1'))}),c.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:c.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})),c.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/},function(a){a.languages.ruby=a.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var b={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:a.util.clone(a.languages.ruby)}};a.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:b}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:b}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:b}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:b}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:b}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),a.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|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][a-zA-Z_0-9]*(?:[?!]|\b)/}),a.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:b}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:b}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:b}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:b}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:b}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:b}}]}(c),c}),d("tinymce/codesampleplugin/Utils",[],function(){function a(a){return a&&"PRE"==a.nodeName&&-1!==a.className.indexOf("language-")}function b(a){return function(b,c){return a(c)}}return{isCodeSample:a,trimArg:b}}),d("tinymce/codesampleplugin/Dialog",["tinymce/dom/DOMUtils","tinymce/codesampleplugin/Utils","tinymce/codesampleplugin/Prism"],function(a,b,c){function d(a,b,d){a.undoManager.transact(function(){var f=e(a);d=h.encode(d),f?(a.dom.setAttrib(f,"class","language-"+b),f.innerHTML=d,c.highlightElement(f),a.selection.select(f)):(a.insertContent('
    '+d+"
    "),a.selection.select(a.$("#__new").removeAttr("id")[0]))})}function e(a){var c=a.selection.getNode();return b.isCodeSample(c)?c:null}function f(a){var b=e(a);return b?b.textContent:""}function g(a){var b,c=e(a);return c?(b=c.className.match(/language-(\w+)/),b?b[1]:""):""}var h=a.DOM,i=[{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"}];return{open:function(a){a.windowManager.open({title:"Insert/Edit code sample",minWidth:Math.min(h.getViewPort().w,800),minHeight:Math.min(h.getViewPort().h,650),layout:"fit",body:[{type:"listbox",name:"language",label:"Language",maxWidth:200,value:g(a),values:i},{type:"textbox",name:"code",multiline:!0,spellcheck:!1,ariaLabel:"Code view",flex:1,style:"direction: ltr; text-align: left",classes:"monospace",value:f(a)}],onSubmit:function(b){d(a,b.data.language,b.data.code)}})}}}),d("tinymce/codesampleplugin/Plugin",["tinymce/Env","tinymce/PluginManager","tinymce/codesampleplugin/Prism","tinymce/codesampleplugin/Dialog","tinymce/codesampleplugin/Utils"],function(a,b,c,d,e){var f,g=e.trimArg;b.add("codesample",function(b,h){function i(){var a;f||(f=!0,a=b.dom.create("link",{rel:"stylesheet",href:h+"/css/prism.css"}),b.getDoc().getElementsByTagName("head")[0].appendChild(a))}var j=b.$;a.ceFalse&&(b.on("PreProcess",function(a){j("pre[contenteditable=false]",a.node).filter(g(e.isCodeSample)).each(function(a,b){var c=j(b),d=b.textContent;c.attr("class",j.trim(c.attr("class"))),c.removeAttr("contentEditable"),c.empty().append(j("").each(function(){this.textContent=d}))})}),b.on("SetContent",function(){var a=j("pre").filter(g(e.isCodeSample)).filter(function(a,b){return"false"!==b.contentEditable});a.length&&b.undoManager.transact(function(){a.each(function(a,d){j(d).find("br").each(function(a,c){c.parentNode.replaceChild(b.getDoc().createTextNode("\n"),c)}),d.contentEditable=!1,d.innerHTML=b.dom.encode(d.textContent),c.highlightElement(d),d.className=j.trim(d.className)})})}),b.addCommand("codesample",function(){d.open(b)}),b.addButton("codesample",{cmd:"codesample",title:"Insert/Edit code sample"}),b.on("init",i))})}),f(["tinymce/codesampleplugin/Prism","tinymce/codesampleplugin/Utils","tinymce/codesampleplugin/Dialog","tinymce/codesampleplugin/Plugin"])}(this); \ No newline at end of file +!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;fa.length)break a;if(!(q instanceof e)){k.lastIndex=0;var r=k.exec(q);if(r){m&&(n=r[1].length);var s=r.index-1+n,r=r[0].slice(n),t=r.length,u=s+t,v=q.slice(0,s+1),w=q.slice(u+1),x=[p,1];v&&x.push(v);var y=new e(h,l?c.tokenize(r,l):r,o);x.push(y),w&&x.push(w),Array.prototype.splice.apply(f,x)}}}}}return f},hooks:{all:{},add:function(a,b){var d=c.hooks.all;d[a]=d[a]||[],d[a].push(b)},run:function(a,b){var d=c.hooks.all[a];if(d&&d.length)for(var e,f=0;e=d[f++];)e(b)}}},d=c.Token=function(a,b,c){this.type=a,this.content=b,this.alias=c};return d.stringify=function(a,b,e){if("string"==typeof a)return a;if("Array"===c.util.type(a))return a.map(function(c){return d.stringify(c,b,a)}).join("");var f={type:a.type,content:d.stringify(a.content,b,e),tag:"span",classes:["token",a.type],attributes:{},language:b,parent:e};if("comment"==f.type&&(f.attributes.spellcheck="true"),a.alias){var g="Array"===c.util.type(a.alias)?a.alias:[a.alias];Array.prototype.push.apply(f.classes,g)}c.hooks.run("wrap",f);var h="";for(var i in f.attributes)h+=(h?" ":"")+i+'="'+(f.attributes[i]||"")+'"';return"<"+f.tag+' class="'+f.classes.join(" ")+'" '+h+">"+f.content+""},b.document?void 0:b.addEventListener?(b.addEventListener("message",function(a){var d=JSON.parse(a.data),e=d.language,f=d.code,g=d.immediateClose;b.postMessage(c.highlight(f,c.languages[e],e)),g&&b.close()},!1),b.Prism):b.Prism}();return"undefined"!=typeof module&&module.exports&&(module.exports=c),"undefined"!=typeof global&&(global.Prism=c),c.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://,cdata://i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},c.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),c.languages.xml=c.languages.markup,c.languages.html=c.languages.markup,c.languages.mathml=c.languages.markup,c.languages.svg=c.languages.markup,c.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},c.languages.css.atrule.inside.rest=c.util.clone(c.languages.css),c.languages.markup&&(c.languages.insertBefore("markup","tag",{style:{pattern:/[\w\W]*?<\/style>/i,inside:{tag:{pattern:/|<\/style>/i,inside:c.languages.markup.tag.inside},rest:c.languages.css},alias:"language-css"}}),c.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:c.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:c.languages.css}},alias:"language-css"}},c.languages.markup.tag)),c.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/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":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},c.languages.javascript=c.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|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|true|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),c.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),c.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:c.languages.javascript}},string:/[\s\S]+/}}}),c.languages.markup&&c.languages.insertBefore("markup","tag",{script:{pattern:/[\w\W]*?<\/script>/i,inside:{tag:{pattern:/|<\/script>/i,inside:c.languages.markup.tag.inside},rest:c.languages.javascript},alias:"language-javascript"}}),c.languages.js=c.languages.javascript,c.languages.c=c.languages.extend("clike",{keyword:/\b(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:/\-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),c.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0}}}}),delete c.languages.c["class-name"],delete c.languages.c["boolean"],c.languages.csharp=c.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+)\b/i}),c.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0}}),c.languages.cpp=c.languages.extend("c",{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|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/,"boolean":/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),c.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}}),c.languages.java=c.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),c.languages.php=c.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0}}),c.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),c.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),c.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),c.languages.markup&&(c.hooks.add("before-highlight",function(a){"php"===a.language&&(a.tokenStack=[],a.backupCode=a.code,a.code=a.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,function(b){return a.tokenStack.push(b),"{{{PHP"+a.tokenStack.length+"}}}"}))}),c.hooks.add("before-insert",function(a){"php"===a.language&&(a.code=a.backupCode,delete a.backupCode)}),c.hooks.add("after-highlight",function(a){if("php"===a.language){for(var b,d=0;b=a.tokenStack[d];d++)a.highlightedCode=a.highlightedCode.replace("{{{PHP"+(d+1)+"}}}",c.highlight(b,a.grammar,"php").replace(/\$/g,"$$$$"));a.element.innerHTML=a.highlightedCode}}),c.hooks.add("wrap",function(a){"php"===a.language&&"markup"===a.type&&(a.content=a.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'$1'))}),c.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:c.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})),c.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/},function(a){a.languages.ruby=a.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var b={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:a.util.clone(a.languages.ruby)}};a.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:b}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:b}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:b}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:b}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:b}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),a.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|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][a-zA-Z_0-9]*(?:[?!]|\b)/}),a.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:b}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:b}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:b}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:b}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:b}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:b}}]}(c),c}),d("tinymce/codesampleplugin/Utils",[],function(){function a(a){return a&&"PRE"==a.nodeName&&-1!==a.className.indexOf("language-")}function b(a){return function(b,c){return a(c)}}return{isCodeSample:a,trimArg:b}}),d("tinymce/codesampleplugin/Dialog",["tinymce/dom/DOMUtils","tinymce/codesampleplugin/Utils","tinymce/codesampleplugin/Prism"],function(a,b,c){function d(a,b,d){a.undoManager.transact(function(){var f=e(a);d=h.encode(d),f?(a.dom.setAttrib(f,"class","language-"+b),f.innerHTML=d,c.highlightElement(f),a.selection.select(f)):(a.insertContent('
    '+d+"
    "),a.selection.select(a.$("#__new").removeAttr("id")[0]))})}function e(a){var c=a.selection.getNode();return b.isCodeSample(c)?c:null}function f(a){var b=e(a);return b?b.textContent:""}function g(a){var b,c=e(a);return c?(b=c.className.match(/language-(\w+)/),b?b[1]:""):""}var h=a.DOM,i=[{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"}];return{open:function(a){a.windowManager.open({title:"Insert/Edit code sample",minWidth:Math.min(h.getViewPort().w,800),minHeight:Math.min(h.getViewPort().h,650),layout:"fit",body:[{type:"listbox",name:"language",label:"Language",maxWidth:200,value:g(a),values:i},{type:"textbox",name:"code",multiline:!0,spellcheck:!1,ariaLabel:"Code view",flex:1,style:"direction: ltr; text-align: left",classes:"monospace",value:f(a),autofocus:!0}],onSubmit:function(b){d(a,b.data.language,b.data.code)}})}}}),d("tinymce/codesampleplugin/Plugin",["tinymce/Env","tinymce/PluginManager","tinymce/codesampleplugin/Prism","tinymce/codesampleplugin/Dialog","tinymce/codesampleplugin/Utils"],function(a,b,c,d,e){var f,g=e.trimArg;b.add("codesample",function(b,h){function i(){var a;b.inline&&f||!b.inline&&j||(b.inline?f=!0:j=!0,a=b.dom.create("link",{rel:"stylesheet",href:h+"/css/prism.css"}),b.getDoc().getElementsByTagName("head")[0].appendChild(a))}var j,k=b.$;a.ceFalse&&(b.on("PreProcess",function(a){k("pre[contenteditable=false]",a.node).filter(g(e.isCodeSample)).each(function(a,b){var c=k(b),d=b.textContent;c.attr("class",k.trim(c.attr("class"))),c.removeAttr("contentEditable"),c.empty().append(k("").each(function(){this.textContent=d}))})}),b.on("SetContent",function(){var a=k("pre").filter(g(e.isCodeSample)).filter(function(a,b){return"false"!==b.contentEditable});a.length&&b.undoManager.transact(function(){a.each(function(a,d){k(d).find("br").each(function(a,c){c.parentNode.replaceChild(b.getDoc().createTextNode("\n"),c)}),d.contentEditable=!1,d.innerHTML=b.dom.encode(d.textContent),c.highlightElement(d),d.className=k.trim(d.className)})})}),b.addCommand("codesample",function(){d.open(b)}),b.addButton("codesample",{cmd:"codesample",title:"Insert/Edit code sample"}),b.on("init",i))})}),f(["tinymce/codesampleplugin/Prism","tinymce/codesampleplugin/Utils","tinymce/codesampleplugin/Dialog","tinymce/codesampleplugin/Plugin"])}(this); \ No newline at end of file diff --git a/media/editors/tinymce/plugins/textcolor/plugin.min.js b/media/editors/tinymce/plugins/textcolor/plugin.min.js index e546081d9ddec..889c5c40d1cda 100644 --- a/media/editors/tinymce/plugins/textcolor/plugin.min.js +++ b/media/editors/tinymce/plugins/textcolor/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("textcolor",function(a){function b(b){var c;return a.dom.getParents(a.selection.getStart(),function(a){var d;(d=a.style["forecolor"==b?"color":"background-color"])&&(c=d)}),c}function c(b){var c,d,e=[];for(d=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],d=a.settings.textcolor_map||d,d=a.settings[b+"_map"]||d,c=0;c
    '+(c?"×":"")+"
    "}var d,e,f,g,h,k,l,m,n=this,o=n._id,p=0;for(m=n.settings.origin,d=c(m),d.push({text:tinymce.translate("No color"),color:"transparent"}),f='',g=d.length-1,k=0;k",h=0;hg?f+="":(e=d[l],f+=b(e.color,e.text));f+=""}if(a.settings.color_picker_callback){for(f+='",f+="",h=0;h
    '+(c?"×":"")+"
    "}var d,e,f,g,h,k,l,m,n=this,o=n._id,p=0;for(m=n.settings.origin,d=c(m),d.push({text:tinymce.translate("No color"),color:"transparent"}),f='
    ',g=d.length-1,k=0;k",h=0;hg?f+="":(e=d[l],f+=b(e.color,e.text));f+=""}if(a.settings.color_picker_callback){for(f+='",f+="",h=0;h li",c("UL")),"numlist"==g&&d.selectorChanged("ol > li",c("OL")),b.settings.stateSelector&&d.selectorChanged(b.settings.stateSelector,function(a){b.active(a)},!0),b.settings.disabledStateSelector&&d.selectorChanged(b.settings.disabledStateSelector,function(a){b.disabled(a)})}var g;"|"==b?d=null:n.has(b)?(b={type:b,size:c},e.push(b),d=null):(d||(d={type:"buttongroup",items:[]},e.push(d)),a.buttons[b]&&(g=b,b=a.buttons[g],"function"==typeof b&&(b=b()),b.type=b.type||"button",b.size=c,b=n.create(b),d.items.push(b),a.initialized?f():a.on("init",f)))}),{type:"toolbar",layout:"flow",items:e}}function c(a){function c(c){return c?(d.push(b(c,a)),!0):void 0}var d=[];if(tinymce.isArray(m.toolbar)){if(0===m.toolbar.length)return;tinymce.each(m.toolbar,function(a,b){m["toolbar"+(b+1)]=a}),delete m.toolbar}for(var e=1;10>e&&c(m["toolbar"+e]);e++);return d.length||m.toolbar===!1||c(m.toolbar||t),d.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:d}:void 0}function d(){function b(b){var c;return"|"==b?{text:"|"}:c=a.menuItems[b]}function c(c){var d,e,f,g,h;if(h=tinymce.makeMap((m.removed_menuitems||"").split(/[ ,]/)),m.menu?(e=m.menu[c],g=!0):e=s[c],e){d={text:e.title},f=[],o((e.items||"").split(/[ ,]/),function(a){var c=b(a);c&&!h[a]&&f.push(b(a))}),g||o(a.menuItems,function(a){a.context==c&&("before"==a.separator&&f.push({text:"|"}),a.prependToContext?f.unshift(a):f.push(a),"after"==a.separator&&f.push({text:"|"}))});for(var i=0;i40)&&a===b})}}function k(){function b(){a.selection&&j(s(a.selection.getNode()))}tinymce.util.Delay.requestAnimationFrame(b)}function l(){t||(t=a.selection.getScrollContainer()||a.getWin(),tinymce.$(t).on("scroll",k),a.on("remove",function(){tinymce.$(t).off("scroll")}))}function p(c){var d;return c.toolbar.panel?(c.toolbar.panel.show(),void j(c)):(l(),d=n.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:b(c.toolbar.items),oncancel:function(){a.focus()}}),c.toolbar.panel=d,d.renderTo(document.body).reflow(),void j(c))}function r(){tinymce.each(c(),function(a){a.panel&&a.panel.hide()})}function s(b){var d,e,f,g=c();for(f=a.$(b).parents().add(b),d=f.length-1;d>=0;d--)for(e=g.length-1;e>=0;e--)if(g[e].predicate(f[d]))return{toolbar:g[e],element:f[d]};return null}var t;a.on("click keyup setContent",function(b){("setcontent"!=b.type||b.selection)&&tinymce.util.Delay.setEditorTimeout(a,function(){var b;b=s(a.selection.getNode()),b?(r(),p(b)):r()})}),a.on("blur hide",r),a.on("ObjectResizeStart",function(){var b=s(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.hide()}),a.on("nodeChange ResizeEditor ResizeWindow",k),a.on("remove",function(){tinymce.each(c(),function(a){a.panel&&a.panel.remove()}),a.contextToolbars={}}),a.shortcuts.add("ctrl+alt+e > ctrl+alt+p","",function(){var b=s(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.items()[0].focus()})}function i(a){return function(){a.initialized?a.fire("SkinLoaded"):a.on("init",function(){a.fire("SkinLoaded")})}}function j(b){function f(){if(o&&o.moveRel&&o.visible()&&!o._fixed){var b=a.selection.getScrollContainer(),c=a.getBody(),d=0,e=0;if(b){var f=p.getPos(c),g=p.getPos(b);d=Math.max(0,g.x-f.x),e=Math.max(0,g.y-f.y)}o.fixed(!1).moveRel(c,a.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(d,e)}}function g(){o&&(o.show(),f(),p.addClass(a.getBody(),"mce-edit-focus"))}function j(){o&&(o.hide(),r.hideAll(),p.removeClass(a.getBody(),"mce-edit-focus"))}function k(){return o?void(o.visible()||g()):(o=l.panel=n.create({type:q?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!q,border:1,items:[m.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(m.toolbar_items_size)]}),a.fire("BeforeRenderUI"),o.renderTo(q||document.body).reflow(),e(o),g(),h(),a.on("nodeChange",f),a.on("activate",g),a.on("deactivate",j),void a.nodeChanged())}var o,q;return m.fixed_toolbar_container&&(q=p.select(m.fixed_toolbar_container)[0]),m.content_editable=!0,a.on("focus",function(){b.skinUiCss?tinymce.DOM.styleSheetLoader.load(b.skinUiCss,k,k):k()}),a.on("blur hide",j),a.on("remove",function(){o&&(o.remove(),o=null)}),b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss,i(a)),{}}function k(b){function g(){return function(a){"readonly"==a.mode?j.find("*").disabled(!0):j.find("*").disabled(!1)}}var j,k,o;return b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss,i(a)),j=l.panel=n.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[m.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(m.toolbar_items_size),{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",html:"",border:"1 0 0 0"}]}),m.resize!==!1&&(k={type:"resizehandle",direction:m.resize,onResizeStart:function(){var b=a.getContentAreaContainer().firstChild;o={width:b.clientWidth,height:b.clientHeight}},onResize:function(a){"both"==m.resize?f(o.width+a.deltaX,o.height+a.deltaY):f(null,o.height+a.deltaY)}}),m.statusbar!==!1&&j.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath"},k]}),a.fire("BeforeRenderUI"),a.on("SwitchMode",g()),j.renderBefore(b.targetNode).reflow(),m.readonly&&a.setMode("readonly"),m.width&&tinymce.DOM.setStyle(j.getEl(),"width",m.width),a.on("remove",function(){j.remove(),j=null}),e(j),h(),{iframeContainer:j.find("#iframe")[0].getEl(),editorContainer:j.getEl()}}var l=this,m=a.settings,n=tinymce.ui.Factory,o=tinymce.each,p=tinymce.DOM,q=tinymce.geom.Rect,r=tinymce.ui.FloatPanel,s={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},t="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";l.renderUI=function(b){var c=m.skin!==!1?m.skin||"lightgray":!1;if(c){var d=m.skin_url;d=d?a.documentBaseURI.toAbsolute(d):tinymce.baseURL+"/skins/"+c,tinymce.Env.documentMode<=7?b.skinUiCss=d+"/skin.ie7.min.css":b.skinUiCss=d+"/skin.min.css",a.contentCSS.push(d+"/content"+(a.inline?".inline":"")+".min.css")}return a.on("ProgressState",function(a){l.throbber=l.throbber||new tinymce.ui.Throbber(l.panel.getEl("body")),a.state?l.throbber.show(a.time):l.throbber.hide()}),m.inline?j(b):k(b)},l.resizeTo=f,l.resizeBy=g}); \ No newline at end of file +tinymce.ThemeManager.add("modern",function(a){function b(b,c){var d,e=[];if(b)return o(b.split(/[ ,]/),function(b){function f(){function c(a){return function(c,d){for(var e,f=d.parents.length;f--&&(e=d.parents[f].nodeName,"OL"!=e&&"UL"!=e););b.active(c&&e==a)}}var d=a.selection;"bullist"==g&&d.selectorChanged("ul > li",c("UL")),"numlist"==g&&d.selectorChanged("ol > li",c("OL")),b.settings.stateSelector&&d.selectorChanged(b.settings.stateSelector,function(a){b.active(a)},!0),b.settings.disabledStateSelector&&d.selectorChanged(b.settings.disabledStateSelector,function(a){b.disabled(a)})}var g;"|"==b?d=null:n.has(b)?(b={type:b,size:c},e.push(b),d=null):(d||(d={type:"buttongroup",items:[]},e.push(d)),a.buttons[b]&&(g=b,b=a.buttons[g],"function"==typeof b&&(b=b()),b.type=b.type||"button",b.size=c,b=n.create(b),d.items.push(b),a.initialized?f():a.on("init",f)))}),{type:"toolbar",layout:"flow",items:e}}function c(a){function c(c){return c?(d.push(b(c,a)),!0):void 0}var d=[];if(tinymce.isArray(m.toolbar)){if(0===m.toolbar.length)return;tinymce.each(m.toolbar,function(a,b){m["toolbar"+(b+1)]=a}),delete m.toolbar}for(var e=1;10>e&&c(m["toolbar"+e]);e++);return d.length||m.toolbar===!1||c(m.toolbar||t),d.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:d}:void 0}function d(){function b(b){var c;return"|"==b?{text:"|"}:c=a.menuItems[b]}function c(c){var d,e,f,g,h;if(h=tinymce.makeMap((m.removed_menuitems||"").split(/[ ,]/)),m.menu?(e=m.menu[c],g=!0):e=s[c],e){d={text:e.title},f=[],o((e.items||"").split(/[ ,]/),function(a){var c=b(a);c&&!h[a]&&f.push(b(a))}),g||o(a.menuItems,function(a){a.context==c&&("before"==a.separator&&f.push({text:"|"}),a.prependToContext?f.unshift(a):f.push(a),"after"==a.separator&&f.push({text:"|"}))});for(var i=0;i40)&&a===b})}}function k(){function b(){a.selection&&j(s(a.selection.getNode()))}tinymce.util.Delay.requestAnimationFrame(b)}function l(){t||(t=a.selection.getScrollContainer()||a.getWin(),tinymce.$(t).on("scroll",k),a.on("remove",function(){tinymce.$(t).off("scroll")}))}function p(c){var d;return c.toolbar.panel?(c.toolbar.panel.show(),void j(c)):(l(),d=n.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:b(c.toolbar.items),oncancel:function(){a.focus()}}),c.toolbar.panel=d,d.renderTo(document.body).reflow(),void j(c))}function r(){tinymce.each(c(),function(a){a.panel&&a.panel.hide()})}function s(b){var d,e,f,g=c();for(f=a.$(b).parents().add(b),d=f.length-1;d>=0;d--)for(e=g.length-1;e>=0;e--)if(g[e].predicate(f[d]))return{toolbar:g[e],element:f[d]};return null}var t;a.on("click keyup setContent",function(b){("setcontent"!=b.type||b.selection)&&tinymce.util.Delay.setEditorTimeout(a,function(){var b;b=s(a.selection.getNode()),b?(r(),p(b)):r()})}),a.on("blur hide",r),a.on("ObjectResizeStart",function(){var b=s(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.hide()}),a.on("nodeChange ResizeEditor ResizeWindow",k),a.on("remove",function(){tinymce.each(c(),function(a){a.panel&&a.panel.remove()}),a.contextToolbars={}}),a.shortcuts.add("ctrl+shift+e > ctrl+shift+p","",function(){var b=s(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.items()[0].focus()})}function i(a){return function(){a.initialized?a.fire("SkinLoaded"):a.on("init",function(){a.fire("SkinLoaded")})}}function j(b){function f(){if(o&&o.moveRel&&o.visible()&&!o._fixed){var b=a.selection.getScrollContainer(),c=a.getBody(),d=0,e=0;if(b){var f=p.getPos(c),g=p.getPos(b);d=Math.max(0,g.x-f.x),e=Math.max(0,g.y-f.y)}o.fixed(!1).moveRel(c,a.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(d,e)}}function g(){o&&(o.show(),f(),p.addClass(a.getBody(),"mce-edit-focus"))}function j(){o&&(o.hide(),r.hideAll(),p.removeClass(a.getBody(),"mce-edit-focus"))}function k(){return o?void(o.visible()||g()):(o=l.panel=n.create({type:q?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!q,border:1,items:[m.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(m.toolbar_items_size)]}),a.fire("BeforeRenderUI"),o.renderTo(q||document.body).reflow(),e(o),g(),h(),a.on("nodeChange",f),a.on("activate",g),a.on("deactivate",j),void a.nodeChanged())}var o,q;return m.fixed_toolbar_container&&(q=p.select(m.fixed_toolbar_container)[0]),m.content_editable=!0,a.on("focus",function(){b.skinUiCss?tinymce.DOM.styleSheetLoader.load(b.skinUiCss,k,k):k()}),a.on("blur hide",j),a.on("remove",function(){o&&(o.remove(),o=null)}),b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss,i(a)),{}}function k(b){function g(){return function(a){"readonly"==a.mode?j.find("*").disabled(!0):j.find("*").disabled(!1)}}var j,k,o;return b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss,i(a)),j=l.panel=n.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[m.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(m.toolbar_items_size),{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",html:"",border:"1 0 0 0"}]}),m.resize!==!1&&(k={type:"resizehandle",direction:m.resize,onResizeStart:function(){var b=a.getContentAreaContainer().firstChild;o={width:b.clientWidth,height:b.clientHeight}},onResize:function(a){"both"==m.resize?f(o.width+a.deltaX,o.height+a.deltaY):f(null,o.height+a.deltaY)}}),m.statusbar!==!1&&j.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath"},k]}),a.fire("BeforeRenderUI"),a.on("SwitchMode",g()),j.renderBefore(b.targetNode).reflow(),m.readonly&&a.setMode("readonly"),m.width&&tinymce.DOM.setStyle(j.getEl(),"width",m.width),a.on("remove",function(){j.remove(),j=null}),e(j),h(),{iframeContainer:j.find("#iframe")[0].getEl(),editorContainer:j.getEl()}}var l=this,m=a.settings,n=tinymce.ui.Factory,o=tinymce.each,p=tinymce.DOM,q=tinymce.geom.Rect,r=tinymce.ui.FloatPanel,s={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},t="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";l.renderUI=function(b){var c=m.skin!==!1?m.skin||"lightgray":!1;if(c){var d=m.skin_url;d=d?a.documentBaseURI.toAbsolute(d):tinymce.baseURL+"/skins/"+c,tinymce.Env.documentMode<=7?b.skinUiCss=d+"/skin.ie7.min.css":b.skinUiCss=d+"/skin.min.css",a.contentCSS.push(d+"/content"+(a.inline?".inline":"")+".min.css")}return a.on("ProgressState",function(a){l.throbber=l.throbber||new tinymce.ui.Throbber(l.panel.getEl("body")),a.state?l.throbber.show(a.time):l.throbber.hide()}),m.inline?j(b):k(b)},l.resizeTo=f,l.resizeBy=g}); \ No newline at end of file diff --git a/media/editors/tinymce/tinymce.min.js b/media/editors/tinymce/tinymce.min.js index 1eeac3683df16..cfa5b4297189e 100644 --- a/media/editors/tinymce/tinymce.min.js +++ b/media/editors/tinymce/tinymce.min.js @@ -1,13 +1,13 @@ -// 4.3.10 (2016-04-12) -!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i=r.x&&o.x+o.w<=r.w+r.x&&o.y>=r.y&&o.y+o.h<=r.h+r.y)return i[a];return null}function n(e,t,n){return o(e.x-t,e.y-n,e.w+2*t,e.h+2*n)}function r(e,t){var n,r,i,a;return n=l(e.x,t.x),r=l(e.y,t.y),i=s(e.x+e.w,t.x+t.w),a=s(e.y+e.h,t.y+t.h),0>i-n||0>a-r?null:o(n,r,i-n,a-r)}function i(e,t,n){var r,i,a,s,c,u,d,f,h,p;return c=e.x,u=e.y,d=e.x+e.w,f=e.y+e.h,h=t.x+t.w,p=t.y+t.h,r=l(0,t.x-c),i=l(0,t.y-u),a=l(0,d-h),s=l(0,f-p),c+=r,u+=i,n&&(d+=r,f+=i,c-=a,u-=s),d-=a,f-=s,o(c,u,d-c,f-u)}function o(e,t,n,r){return{x:e,y:t,w:n,h:r}}function a(e){return o(e.left,e.top,e.width,e.height)}var s=Math.min,l=Math.max,c=Math.round;return{inflate:n,relativePosition:e,findBestRelativePosition:t,intersect:r,clamp:i,create:o,fromClientRect:a}}),r(c,[],function(){function e(e,t){return function(){e.apply(t,arguments)}}function t(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=[],s(t,e(r,this),e(i,this))}function n(e){var t=this;return null===this._state?void this._deferreds.push(e):void l(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=n(t._value)}catch(i){return void e.reject(i)}e.resolve(r)})}function r(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 s(e(n,t),e(r,this),e(i,this))}this._state=!0,this._value=t,o.call(this)}catch(a){i.call(this,a)}}function i(e){this._state=!1,this._value=e,o.call(this)}function o(){for(var e=0,t=this._deferreds.length;t>e;e++)n.call(this,this._deferreds[e]);this._deferreds=null}function a(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 s(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(i){if(r)return;r=!0,n(i)}}if(window.Promise)return window.Promise;var l=t.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)},c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,r){var i=this;return new t(function(t,o){n.call(i,new a(e,r,t,o))})},t.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&c(arguments[0])?arguments[0]:arguments);return new t(function(t,n){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(o,e)},n)}e[o]=a,0===--i&&t(e)}catch(l){n(l)}}if(0===e.length)return t([]);for(var i=e.length,o=0;or;r++)e[r].then(t,n)})},t}),r(u,[c],function(e){function t(e,t){function n(e){window.setTimeout(e,0)}var r,i=window.requestAnimationFrame,o=["ms","moz","webkit"];for(r=0;rr;r++)if(o=n[r],o&&o.func.call(o.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var o=this,s={},l,c,u,d,f;c=a+(+new Date).toString(32),d="onmouseenter"in document.documentElement,u="onfocusin"in document.documentElement,f={mouseenter:"mouseover",mouseleave:"mouseout"},l=1,o.domLoaded=!1,o.events=s,o.bind=function(n,a,h,p){function m(t){e(r(t||E.event),g)}var g,v,y,b,C,x,w,E=window;if(n&&3!==n.nodeType&&8!==n.nodeType){for(n[c]?g=n[c]:(g=l++,n[c]=g,s[g]={}),p=p||n,a=a.split(" "),y=a.length;y--;)b=a[y],x=m,C=w=!1,"DOMContentLoaded"===b&&(b="ready"),o.domLoaded&&"ready"===b&&"complete"==n.readyState?h.call(p,r({type:b})):(d||(C=f[b],C&&(x=function(t){var n,i;if(n=t.currentTarget,i=t.relatedTarget,i&&n.contains)i=n.contains(i);else for(;i&&i!==n;)i=i.parentNode;i||(t=r(t||E.event),t.type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=n,e(t,g))})),u||"focusin"!==b&&"focusout"!==b||(w=!0,C="focusin"===b?"focus":"blur",x=function(t){t=r(t||E.event),t.type="focus"===t.type?"focusin":"focusout",e(t,g)}),v=s[g][b],v?"ready"===b&&o.domLoaded?h({type:b}):v.push({func:h,scope:p}):(s[g][b]=v=[{func:h,scope:p}],v.fakeName=C,v.capture=w,v.nativeHandler=x,"ready"===b?i(n,x,o):t(n,C||b,x,w)));return n=v=0,h}},o.unbind=function(e,t,r){var i,a,l,u,d,f;if(!e||3===e.nodeType||8===e.nodeType)return o;if(i=e[c]){if(f=s[i],t){for(t=t.split(" "),l=t.length;l--;)if(d=t[l],a=f[d]){if(r)for(u=a.length;u--;)if(a[u].func===r){var h=a.nativeHandler,p=a.fakeName,m=a.capture;a=a.slice(0,u).concat(a.slice(u+1)),a.nativeHandler=h,a.fakeName=p,a.capture=m,f[d]=a}r&&0!==a.length||(delete f[d],n(e,a.fakeName||d,a.nativeHandler,a.capture))}}else{for(d in f)a=f[d],n(e,a.fakeName||d,a.nativeHandler,a.capture);f={}}for(d in f)return o;delete s[i];try{delete e[c]}catch(g){e[c]=null}}return o},o.fire=function(t,n,i){var a;if(!t||3===t.nodeType||8===t.nodeType)return o;i=r(null,i),i.type=n,i.target=t;do a=t[c],a&&e(i,a),t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow;while(t&&!i.isPropagationStopped());return o},o.clean=function(e){var t,n,r=o.unbind;if(!e||3===e.nodeType||8===e.nodeType)return o;if(e[c]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),n=e.getElementsByTagName("*"),t=n.length;t--;)e=n[t],e[c]&&r(e);return o},o.destroy=function(){s={}},o.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var a="mce-data-",s=/^(?:mouse|contextmenu)|click/,l={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1};return o.Event=new o,o.Event.bind(window,"ready",function(){}),o}),r(f,[],function(){function e(e,t,n,r){var i,o,a,s,l,c,d,h,p,m;if((t?t.ownerDocument||t:z)!==D&&B(t),t=t||D,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(L&&!r){if(i=ve.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&I(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&x.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(x.qsa&&(!P||!P.test(e))){if(h=d=F,p=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=_(e),(d=t.getAttribute("id"))?h=d.replace(be,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=c.length;l--;)c[l]=h+f(c[l]);p=ye.test(e)&&u(t.parentNode)||t,m=c.join(",")}if(m)try{return Z.apply(n,p.querySelectorAll(m)),n}catch(g){}finally{d||t.removeAttribute("id")}}}return k(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[F]=!0,e}function i(e){var t=D.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&typeof e.getElementsByTagName!==Y&&e}function d(){}function f(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=V++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c=[W,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[F]||(t[F]={}),(s=l[r])&&s[0]===W&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(t,n,r){for(var i=0,o=n.length;o>i;i++)e(t,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),c&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[F]&&(i=v(i)),o&&!o[F]&&(o=v(o,a)),r(function(r,a,s,l){var c,u,d,f=[],h=[],p=a.length,v=r||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,f,e,s,l),b=n?o||(r?e:p||i)?[]:a:y;if(n&&n(y,b,s,l),i)for(c=g(b,h),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[h[u]]=!(y[h[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(y[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?te.call(r,d):f[u])>-1&&(r[c]=!(a[c]=d))}}else b=g(b===a?b.splice(p,b.length):b),o?o(null,a,b,l):Z.apply(a,b)})}function y(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),c=h(function(e){return te.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==T)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=w.relative[e[s].type])u=[h(p(u),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[F]){for(r=++s;i>r&&!w.relative[e[r].type];r++);return v(s>1&&p(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&f(e))}u.push(n)}return p(u)}function b(t,n){var i=n.length>0,o=t.length>0,a=function(r,a,s,l,c){var u,d,f,h=0,p="0",m=r&&[],v=[],y=T,b=r||o&&w.find.TAG("*",c),C=W+=null==y?1:Math.random()||.1,x=b.length;for(c&&(T=a!==D&&a);p!==x&&null!=(u=b[p]);p++){if(o&&u){for(d=0;f=t[d++];)if(f(u,a,s)){l.push(u);break}c&&(W=C)}i&&((u=!f&&u)&&h--,r&&m.push(u))}if(h+=p,i&&p!==h){for(d=0;f=n[d++];)f(m,v,a,s);if(r){if(h>0)for(;p--;)m[p]||v[p]||(v[p]=J.call(l));v=g(v)}Z.apply(l,v),c&&!r&&v.length>0&&h+n.length>1&&e.uniqueSort(l)}return c&&(W=C,T=y),m};return i?r(a):a}var C,x,w,E,N,_,S,k,T,R,A,B,D,M,L,P,H,O,I,F="sizzle"+-new Date,z=window.document,W=0,V=0,U=n(),$=n(),q=n(),j=function(e,t){return e===t&&(A=!0),0},Y=typeof t,X=1<<31,K={}.hasOwnProperty,G=[],J=G.pop,Q=G.push,Z=G.push,ee=G.slice,te=G.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",re="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+re+"*("+ie+")(?:"+re+"*([*^$|!~]?=)"+re+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+re+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp("^"+re+"+|((?:^|[^\\\\])(?:\\\\.)*)"+re+"+$","g"),le=new RegExp("^"+re+"*,"+re+"*"),ce=new RegExp("^"+re+"*([>+~]|"+re+")"+re+"*"),ue=new RegExp("="+re+"*([^\\]'\"]*?)"+re+"*\\]","g"),de=new RegExp(ae),fe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+re+"*(even|odd|(([+-]|)(\\d*)n|)"+re+"*(?:([+-]|)"+re+"*(\\d+)|))"+re+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+re+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+re+"*((?:-\\d)?\\d*)"+re+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,Ce=new RegExp("\\\\([\\da-f]{1,6}"+re+"?|("+re+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Z.apply(G=ee.call(z.childNodes),z.childNodes),G[z.childNodes.length].nodeType}catch(we){Z={apply:G.length?function(e,t){Q.apply(e,ee.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=e.support={},N=e.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},B=e.setDocument=function(e){function t(e){try{return e.top}catch(t){}return null}var n,r=e?e.ownerDocument||e:z,o=r.defaultView;return r!==D&&9===r.nodeType&&r.documentElement?(D=r,M=r.documentElement,L=!N(r),o&&o!==t(o)&&(o.addEventListener?o.addEventListener("unload",function(){B()},!1):o.attachEvent&&o.attachEvent("onunload",function(){B()})),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ge.test(r.getElementsByClassName),x.getById=i(function(e){return M.appendChild(e).id=F,!r.getElementsByName||!r.getElementsByName(F).length}),x.getById?(w.find.ID=function(e,t){if(typeof t.getElementById!==Y&&L){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){var n=typeof e.getAttributeNode!==Y&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=x.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==Y?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=x.getElementsByClassName&&function(e,t){return L?t.getElementsByClassName(e):void 0},H=[],P=[],(x.qsa=ge.test(r.querySelectorAll))&&(i(function(e){e.innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+re+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+re+"*(?:value|"+ne+")"),e.querySelectorAll(":checked").length||P.push(":checked")}),i(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+re+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(x.matchesSelector=ge.test(O=M.matches||M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&i(function(e){x.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),H.push("!=",ae)}),P=P.length&&new RegExp(P.join("|")),H=H.length&&new RegExp(H.join("|")),n=ge.test(M.compareDocumentPosition),I=n||ge.test(M.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},j=n?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===z&&I(z,e)?-1:t===r||t.ownerDocument===z&&I(z,t)?1:R?te.call(R,e)-te.call(R,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===r?-1:t===r?1:o?-1:s?1:R?te.call(R,e)-te.call(R,t):0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===z?-1:c[i]===z?1:0},r):D},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==D&&B(t),n=n.replace(ue,"='$1']"),x.matchesSelector&&L&&(!H||!H.test(n))&&(!P||!P.test(n)))try{var r=O.call(t,n);if(r||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(i){}return e(n,D,null,[t]).length>0},e.contains=function(e,t){return(e.ownerDocument||e)!==D&&B(e),I(e,t)},e.attr=function(e,n){(e.ownerDocument||e)!==D&&B(e);var r=w.attrHandle[n.toLowerCase()],i=r&&K.call(w.attrHandle,n.toLowerCase())?r(e,n,!L):t;return i!==t?i:x.attributes||!L?e.getAttribute(n):(i=e.getAttributeNode(n))&&i.specified?i.value:null},e.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},e.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!x.detectDuplicates,R=!x.sortStable&&e.slice(0),e.sort(j),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return R=null,e},E=e.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=E(t);return n},w=e.selectors={cacheLength:50,createPseudo:r,match:he,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(Ce,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(Ce,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=_(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(Ce,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+re+")"+e+"("+re+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Y&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,h,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(u=g[F]||(g[F]={}),c=u[e]||[],h=c[0]===W&&c[1],f=c[0]===W&&c[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(f=h=0)||p.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[W,h,f];break}}else if(y&&(c=(t[F]||(t[F]={}))[e])&&c[0]===W)f=c[1];else for(;(d=++h&&d&&d[m]||(f=h=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[F]||(d[F]={}))[e]=[W,f]),d!==t)););return f-=i,f===r||f%r===0&&f/r>=0}}},PSEUDO:function(t,n){var i,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(n):o.length>1?(i=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=te.call(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(se,"$1"));return i[F]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(e){return e=e.replace(Ce,xe),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:r(function(t){return fe.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(Ce,xe).toLowerCase(),function(e){var n;do if(n=L?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===M},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},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,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.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:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&L&&w.relative[o[1].type]){if(t=(w.find.ID(a.matches[0].replace(Ce,xe),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((l=w.find[s])&&(r=l(a.matches[0].replace(Ce,xe),ye.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return Z.apply(n,r),n;break}}return(c||S(e,d))(r,t,!L,n,ye.test(e)&&u(t.parentNode)||t),n},x.sortStable=F.split("").sort(j).join("")===F,x.detectDuplicates=!!A,B(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ne,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),e}),r(h,[],function(){function e(e){return"matchMedia"in window?matchMedia(e).matches:!1}var t=navigator,n=t.userAgent,r,i,o,a,s,l,c,u,d,f,h,p,m;r=window.opera&&window.opera.buildNumber,d=/Android/.test(n),i=/WebKit/.test(n),o=!i&&!r&&/MSIE/gi.test(n)&&/Explorer/gi.test(t.appName), -o=o&&/MSIE (\w+)\./.exec(n)[1],a=-1==n.indexOf("Trident/")||-1==n.indexOf("rv:")&&-1==t.appName.indexOf("Netscape")?!1:11,s=-1==n.indexOf("Edge/")||o||a?!1:12,o=o||a||s,l=!i&&!a&&/Gecko/.test(n),c=-1!=n.indexOf("Mac"),u=/(iPad|iPhone)/.test(n),f="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,h=e("only screen and (max-device-width: 480px)")&&(d||u),p=e("only screen and (min-width: 800px)")&&(d||u),m=-1!=n.indexOf("Windows Phone"),s&&(i=!1);var g=!u||f||n.match(/AppleWebKit\/(\d*)/)[1]>=534;return{opera:r,webkit:i,ie:o,gecko:l,mac:c,iOS:u,android:d,contentEditable:g,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=o,range:window.getSelection&&"Range"in window,documentMode:o&&!s?document.documentMode||7:10,fileApi:f,ceFalse:o===!1||o>8,desktop:!h&&!p,windowsPhone:m}}),r(p,[],function(){function e(e){var t=e,n,r;if(!u(e))for(t=[],n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function n(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;o>i;i++)if(n.call(r,e[i],i,e)===!1)return 0}else for(i in e)if(e.hasOwnProperty(i)&&n.call(r,e[i],i,e)===!1)return 0;return 1}function r(e,t){var r=[];return n(e,function(n,i){r.push(t(n,i,e))}),r}function i(e,t){var r=[];return n(e,function(n,i){t&&!t(n,i,e)||r.push(n)}),r}function o(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function a(e,t,n,r){var i=0;for(arguments.length<3&&(n=e[0]);ir;r++)if(t.call(n,e[r],r,e))return r;return-1}function l(e,n,r){var i=s(e,n,r);return-1!==i?e[i]:t}function c(e){return e[e.length-1]}var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{isArray:u,toArray:e,each:n,map:r,filter:i,indexOf:o,reduce:a,findIndex:s,find:l,last:c}}),r(m,[h,p],function(e,n){function r(e){return null===e||e===t?"":(""+e).replace(h,"")}function i(e,r){return r?"array"==r&&n.isArray(e)?!0:typeof e==r:e!==t}function o(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function a(e,t,n){var r=this,i,o,a,s,l,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),a=e[3].match(/(^|\.)(\w+)$/i)[2],o=r.createNS(e[3].replace(/\.\w+$/,""),n),!o[a]){if("static"==e[2])return o[a]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[a]));t[a]||(t[a]=function(){},c=1),o[a]=t[a],r.extend(o[a].prototype,t),e[5]&&(i=r.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],l=o[a],c?o[a]=function(){return i[s].apply(this,arguments)}:o[a]=function(){return this.parent=i[s],l.apply(this,arguments)},o[a].prototype[a]=o[a],r.each(i,function(e,t){o[a].prototype[t]=i[t]}),r.each(t,function(e,t){i[t]?o[a].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=a&&(o[a].prototype[t]=e)})),r.each(t["static"],function(e,t){o[a][t]=e})}}function s(e,n){var r,i,o,a=arguments,s;for(r=1,i=a.length;i>r;r++){n=a[r];for(o in n)n.hasOwnProperty(o)&&(s=n[o],s!==t&&(e[o]=s))}return e}function l(e,t,r,i){i=i||this,e&&(r&&(e=e[r]),n.each(e,function(e,n){return t.call(i,e,n,r)===!1?!1:void l(e,t,r,i)}))}function c(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;nn&&(t=t[e[n]],t);n++);return t}function d(e,t){return!e||i(e,"array")?e:n.map(e.split(t||","),r)}function f(t){var n=e.cacheSuffix;return n&&(t+=(-1===t.indexOf("?")?"?":"&")+n),t}var h=/^\s*|\s*$/g;return{trim:r,isArray:n.isArray,is:i,toArray:n.toArray,makeMap:o,each:n.each,map:n.map,grep:n.filter,inArray:n.indexOf,extend:s,create:a,walk:l,createNS:c,resolve:u,explode:d,_addCacheSuffix:f}}),r(g,[d,f,m,h],function(e,n,r,i){function o(e){return"undefined"!=typeof e}function a(e){return"string"==typeof e}function s(e){return e&&e==e.window}function l(e,t){var n,r,i;for(t=t||w,i=t.createElement("div"),n=t.createDocumentFragment(),i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return n}function c(e,t,n,r){var i;if(a(t))t=l(t,v(e[0]));else if(t.length&&!t.nodeType){if(t=f.makeArray(t),r)for(i=t.length-1;i>=0;i--)c(e,t[i],n,r);else for(i=0;ii&&(a=e[i],t.call(a,i,a)!==!1);i++);return e}function g(e,t){var n=[];return m(e,function(e,r){t(r,e)&&n.push(r)}),n}function v(e){return e?9==e.nodeType?e:e.ownerDocument:w}function y(e,n,r){var i=[],o=e[n];for("string"!=typeof r&&r instanceof f&&(r=r[0]);o&&9!==o.nodeType;){if(r!==t){if(o===r)break;if("string"==typeof r&&f(o).is(r))break}1===o.nodeType&&i.push(o),o=o[n]}return i}function b(e,n,r,i){var o=[];for(i instanceof f&&(i=i[0]);e;e=e[n])if(!r||e.nodeType===r){if(i!==t){if(e===i)break;if("string"==typeof i&&f(e).is(i))break}o.push(e)}return o}function C(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType==n)return e;return null}function x(e,t,n){m(n,function(n,r){e[n]=e[n]||{},e[n][t]=r})}var w=document,E=Array.prototype.push,N=Array.prototype.slice,_=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,S=e.Event,k,T=r.makeMap("children,contents,next,prev"),R=r.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),A=r.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),B={"for":"htmlFor","class":"className",readonly:"readOnly"},D={"float":"cssFloat"},M={},L={},P=/^\s*|\s*$/g;return f.fn=f.prototype={constructor:f,selector:"",context:null,length:0,init:function(e,t){var n=this,r,i;if(!e)return n;if(e.nodeType)return n.context=n[0]=e,n.length=1,n;if(t&&t.nodeType)n.context=t;else{if(t)return f(e).attr(t);n.context=t=document}if(a(e)){if(n.selector=e,r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:_.exec(e),!r)return f(t).find(e);if(r[1])for(i=l(e,v(t)).firstChild;i;)E.call(n,i),i=i.nextSibling;else{if(i=v(t).getElementById(r[2]),!i)return n;if(i.id!==r[2])return n.find(e);n.length=1,n[0]=i}}else this.add(e,!1);return n},toArray:function(){return r.toArray(this)},add:function(e,t){var n=this,r,i;if(a(e))return n.add(f(e));if(t!==!1)for(r=f.unique(n.toArray().concat(f.makeArray(e))),n.length=r.length,i=0;it;t++)f.find(e,this[t],r);return f(r)},filter:function(e){return f("function"==typeof e?g(this.toArray(),function(t,n){return e(n,t)}):f.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof f&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&f(r).is(e)){t.push(r);break}if(r==e){t.push(r);break}r=r.parentNode}}),f(t)},offset:function(e){var t,n,r,i=0,o=0,a;return e?this.css(e):(t=this[0],t&&(n=t.ownerDocument,r=n.documentElement,t.getBoundingClientRect&&(a=t.getBoundingClientRect(),i=a.left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,o=a.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:o})},push:E,sort:[].sort,splice:[].splice},r.extend(f,{extend:r.extend,makeArray:function(e){return s(e)||e.nodeType?[e]:r.toArray(e)},inArray:h,isArray:r.isArray,each:m,trim:p,grep:g,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,contains:n.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?f.find.matchesSelector(t[0],e)?[t[0]]:[]:f.find.matches(e,t)}}),m({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return y(e,"parentNode")},next:function(e){return C(e,"nextSibling",1)},prev:function(e){return C(e,"previousSibling",1)},children:function(e){return b(e.firstChild,"nextSibling",1)},contents:function(e){return r.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){f.fn[e]=function(n){var r=this,i=[];return r.each(function(){var e=t.call(i,this,n,i);e&&(f.isArray(e)?i.push.apply(i,e):i.push(e))}),this.length>1&&(T[e]||(i=f.unique(i)),0===e.indexOf("parents")&&(i=i.reverse())),i=f(i),n?i.filter(n):i}}),m({parentsUntil:function(e,t){return y(e,"parentNode",t)},nextUntil:function(e,t){return b(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return b(e,"previousSibling",1,t).slice(1)}},function(e,t){f.fn[e]=function(n,r){var i=this,o=[];return i.each(function(){var e=t.call(o,this,n,o);e&&(f.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=f.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse())),o=f(o),r?o.filter(r):o}}),f.fn.is=function(e){return!!e&&this.filter(e).length>0},f.fn.init.prototype=f.fn,f.overrideDefaults=function(e){function t(r,i){return n=n||e(),0===arguments.length&&(r=n.element),i||(i=n.context),new t.fn.init(r,i)}var n;return f.extend(t,this),t},i.ie&&i.ie<8&&(x(M,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?k:t},size:function(e){var t=e.size;return 20===t?k:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?k:t}}),x(M,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),i.ie&&i.ie<9&&(D["float"]="styleFloat",x(L,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),f.attrHooks=M,f.cssHooks=L,f}),r(v,[],function(){return function(e,t){function n(e,t,n,r){function i(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+i(t)+i(n)+i(r)}var r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,s,l,c={},u,d,f,h="\ufeff";for(e=e||{},t&&(d=t.getValidStyles(),f=t.getInvalidStyles()),u=("\\\" \\' \\; \\: ; : "+h).split(" "),l=0;l-1&&n||(m[e+t]=-1==l?s[0]:s.join(" "),delete m[e+"-top"+t],delete m[e+"-right"+t],delete m[e+"-bottom"+t],delete m[e+"-left"+t])}}function u(e){var t=m[e],n;if(t){for(t=t.split(" "),n=t.length;n--;)if(t[n]!==t[0])return!1;return m[e]=t[0],!0}}function d(e,t,n,r){u(t)&&u(n)&&u(r)&&(m[e]=m[t]+" "+m[n]+" "+m[r],delete m[t],delete m[n],delete m[r])}function f(e){return b=!0,c[e]}function h(e,t){return b&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function p(t,n,r,i,o,a){if(o=o||a)return o=h(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=h(n||r||i),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return C&&(n=C.call(x,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var m={},g,v,y,b,C=e.url_converter,x=e.url_converter_scope||this;if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,f).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,f)});g=o.exec(t);){if(v=g[1].replace(a,"").toLowerCase(),y=g[2].replace(a,""),y=y.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),v&&y.length>0){if(!e.allow_script_urls&&("behavior"==v||/expression\s*\(|\/\*|\*\//.test(y)))continue;"font-weight"===v&&"700"===y?y="bold":"color"!==v&&"background-color"!==v||(y=y.toLowerCase()),y=y.replace(r,n),y=y.replace(i,p),m[v]=b?h(y,!0):y}o.lastIndex=g.index+g[0].length}s("border","",!0),s("border","-width"),s("border","-color"),s("border","-style"),s("padding",""),s("margin",""),d("border","border-width","border-style","border-color"),"medium none"===m.border&&delete m.border,"none"===m["border-image"]&&delete m["border-image"]}return m},serialize:function(e,t){function n(t){var n,r,o,a;if(n=d[t])for(r=0,o=n.length;o>r;r++)t=n[r],a=e[t],a!==s&&a.length>0&&(i+=(i.length>0?" ":"")+t+": "+a+";")}function r(e,t){var n;return n=f["*"],n&&n[e]?!1:(n=f[t],!n||!n[e])}var i="",o,a;if(t&&d)n("*"),n(t);else for(o in e)a=e[o],a!==s&&a.length>0&&(f&&!r(o,t)||(i+=(i.length>0?" ":"")+o+": "+a+";"));return i}}}}),r(y,[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}function r(e,n,r,i){var o,a,s;if(e){if(o=e[r],t&&o===t)return;if(o){if(!i)for(s=o[n];s;s=s[n])if(!s[n])return s;return o}if(a=e.parentNode,a&&a!==t)return a}}var i=e;this.current=function(){return i},this.next=function(e){return i=n(i,"firstChild","nextSibling",e)},this.prev=function(e){return i=n(i,"lastChild","previousSibling",e)},this.prev2=function(e){return i=r(i,"lastChild","previousSibling",e)}}}),r(b,[m],function(e){function t(n){function r(){return P.createDocumentFragment()}function i(e,t){E(F,e,t)}function o(e,t){E(z,e,t)}function a(e){i(e.parentNode,j(e))}function s(e){i(e.parentNode,j(e)+1)}function l(e){o(e.parentNode,j(e))}function c(e){o(e.parentNode,j(e)+1)}function u(e){e?(L[U]=L[V],L[$]=L[W]):(L[V]=L[U],L[W]=L[$]),L.collapsed=F}function d(e){a(e),c(e)}function f(e){i(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function h(e,t){var n=L[V],r=L[W],i=L[U],o=L[$],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?w(n,r,a,s):1===e?w(i,o,a,s):2===e?w(i,o,l,c):3===e?w(n,r,l,c):void 0}function p(){N(I)}function m(){return N(H)}function g(){return N(O)}function v(e){var t=this[V],r=this[W],i,o;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(o=t.childNodes[r]),o?t.insertBefore(e,o):3==t.nodeType?n.insertAfter(e,t):t.appendChild(e)):r?r>=t.nodeValue.length?n.insertAfter(e,t):(i=t.splitText(r),t.parentNode.insertBefore(e,i)):t.parentNode.insertBefore(e,t)}function y(e){var t=L.extractContents();L.insertNode(e),e.appendChild(t),L.selectNode(e)}function b(){return q(new t(n),{startContainer:L[V],startOffset:L[W],endContainer:L[U],endOffset:L[$],collapsed:L.collapsed,commonAncestorContainer:L.commonAncestorContainer})}function C(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function x(){return L[V]==L[U]&&L[W]==L[$]}function w(e,t,r,i){var o,a,s,l,c,u;if(e==r)return t==i?0:i>t?-1:1;for(o=r;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&t>a;)a++,s=s.nextSibling;return a>=t?-1:1}for(o=e;o&&o.parentNode!=r;)o=o.parentNode;if(o){for(a=0,s=r.firstChild;s!=o&&i>a;)a++,s=s.nextSibling;return i>a?-1:1}for(l=n.findCommonAncestor(e,r),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=r;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function E(e,t,r){var i,o;for(e?(L[V]=t,L[W]=r):(L[U]=t,L[$]=r),i=L[U];i.parentNode;)i=i.parentNode;for(o=L[V];o.parentNode;)o=o.parentNode;o==i?w(L[V],L[W],L[U],L[$])>0&&L.collapse(e):L.collapse(e),L.collapsed=x(),L.commonAncestorContainer=n.findCommonAncestor(L[V],L[U])}function N(e){var t,n=0,r=0,i,o,a,s,l,c;if(L[V]==L[U])return _(e);for(t=L[U],i=t.parentNode;i;t=i,i=i.parentNode){if(i==L[V])return S(t,e);++n}for(t=L[V],i=t.parentNode;i;t=i,i=i.parentNode){if(i==L[U])return k(t,e);++r}for(o=r-n,a=L[V];o>0;)a=a.parentNode,o--;for(s=L[U];0>o;)s=s.parentNode,o++;for(l=a.parentNode,c=s.parentNode;l!=c;l=l.parentNode,c=c.parentNode)a=l,s=c;return T(a,s,e)}function _(e){var t,n,i,o,a,s,l,c,u;if(e!=I&&(t=r()),L[W]==L[$])return t;if(3==L[V].nodeType){if(n=L[V].nodeValue,i=n.substring(L[W],L[$]),e!=O&&(o=L[V],c=L[W],u=L[$]-L[W],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),L.collapse(F)),e==I)return;return i.length>0&&t.appendChild(P.createTextNode(i)),t}for(o=C(L[V],L[W]),a=L[$]-L[W];o&&a>0;)s=o.nextSibling,l=D(o,e),t&&t.appendChild(l),--a,o=s;return e!=O&&L.collapse(F),t}function S(e,t){var n,i,o,a,s,l;if(t!=I&&(n=r()),i=R(e,t),n&&n.appendChild(i),o=j(e),a=o-L[W],0>=a)return t!=O&&(L.setEndBefore(e),L.collapse(z)),n;for(i=e.previousSibling;a>0;)s=i.previousSibling,l=D(i,t),n&&n.insertBefore(l,n.firstChild),--a,i=s;return t!=O&&(L.setEndBefore(e),L.collapse(z)),n}function k(e,t){var n,i,o,a,s,l;for(t!=I&&(n=r()),o=A(e,t),n&&n.appendChild(o),i=j(e),++i,a=L[$]-i,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=D(o,t),n&&n.appendChild(l),--a,o=s;return t!=O&&(L.setStartAfter(e),L.collapse(F)),n}function T(e,t,n){var i,o,a,s,l,c,u;for(n!=I&&(o=r()),i=A(e,n),o&&o.appendChild(i),a=j(e),s=j(t),++a,l=s-a,c=e.nextSibling;l>0;)u=c.nextSibling,i=D(c,n),o&&o.appendChild(i),c=u,--l;return i=R(t,n),o&&o.appendChild(i),n!=O&&(L.setStartAfter(e),L.collapse(F)),o}function R(e,t){var n=C(L[U],L[$]-1),r,i,o,a,s,l=n!=L[U];if(n==e)return B(n,l,z,t);for(r=n.parentNode,i=B(r,z,z,t);r;){for(;n;)o=n.previousSibling,a=B(n,l,z,t),t!=I&&i.insertBefore(a,i.firstChild),l=F,n=o;if(r==e)return i;n=r.previousSibling,r=r.parentNode,s=B(r,z,z,t),t!=I&&s.appendChild(i),i=s}}function A(e,t){var n=C(L[V],L[W]),r=n!=L[V],i,o,a,s,l;if(n==e)return B(n,r,F,t);for(i=n.parentNode,o=B(i,z,F,t);i;){for(;n;)a=n.nextSibling,s=B(n,r,F,t),t!=I&&o.appendChild(s),r=F,n=a;if(i==e)return o;n=i.nextSibling,i=i.parentNode,l=B(i,z,F,t),t!=I&&l.appendChild(o),o=l}}function B(e,t,r,i){var o,a,s,l,c;if(t)return D(e,i);if(3==e.nodeType){if(o=e.nodeValue,r?(l=L[W],a=o.substring(l),s=o.substring(0,l)):(l=L[$],a=o.substring(0,l),s=o.substring(l)),i!=O&&(e.nodeValue=s),i==I)return;return c=n.clone(e,z),c.nodeValue=a,c}if(i!=I)return n.clone(e,z)}function D(e,t){return t!=I?t==O?n.clone(e,F):e:void e.parentNode.removeChild(e)}function M(){return n.create("body",null,g()).outerText}var L=this,P=n.doc,H=0,O=1,I=2,F=!0,z=!1,W="startOffset",V="startContainer",U="endContainer",$="endOffset",q=e.extend,j=n.nodeIndex;return q(L,{startContainer:P,startOffset:0,endContainer:P,endOffset:0,collapsed:F,commonAncestorContainer:P,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:i,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:h,deleteContents:p,extractContents:m,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:M}),L}return t.prototype.toString=function(){return this.toStringIE()},t}),r(C,[m],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,d={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"};o={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},a={"<":"<",">":">","&":"&",""":'"',"'":"'"},i=n("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 f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return o[e]||n[e]||e})},getEncodeFunc:function(e,t){function a(e,n){return e.replace(n?s:l,function(e){return o[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||i,e=r(e.replace(/\+/g,",")),e.named&&e.numeric?a:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n){return n?(n="x"===n.charAt(0).toLowerCase()?parseInt(n.substr(1),16):parseInt(n,10),n>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n))):d[n]||String.fromCharCode(n)):a[e]||i[e]||t(e)})}};return f}),r(x,[m,u],function(e,t){return function(n,r){function i(e){n.getElementsByTagName("head")[0].appendChild(e)}function o(r,o,c){function u(){for(var e=b.passed,t=e.length;t--;)e[t]();b.status=2,b.passed=[],b.failed=[]}function d(){for(var e=b.failed,t=e.length;t--;)e[t]();b.status=3,b.passed=[],b.failed=[]}function f(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function h(e,n){e()||((new Date).getTime()-y0)return v=n.createElement("style"),v.textContent='@import "'+r+'"',m(),void i(v);p()}i(g),g.href=r}}var a=0,s={},l;r=r||{},l=r.maxLoadTime||5e3,this.load=o}}),r(w,[f,g,v,d,y,b,C,h,m,x],function(e,n,r,i,o,a,s,l,c,u){function d(e,t){var n={},r=t.keep_values,i;return i={set:function(n,r,i){t.url_converter&&(r=t.url_converter.call(t.url_converter_scope||e,r,i,n[0])),n.attr("data-mce-"+i,r).attr(i,r)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},n={style:{set:function(e,t){return null!==t&&"object"==typeof t?void e.css(t):(r&&e.attr("data-mce-style",t),void e.attr("style",t))},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serializeStyle(e.parseStyle(n),t[0].nodeName)}}},r&&(n.href=n.src=i),n}function f(e,t){var n=t.attr("style");n=e.serializeStyle(e.parseStyle(n),t[0].nodeName),n||(n=null),t.attr("data-mce-style",n)}function h(e,t){var n=0,r,i;if(e)for(r=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=r&&e.nodeValue.length)&&(n++,r=i);return n}function p(e,t){var o=this,a;o.doc=e,o.win=window,o.files={},o.counter=0,o.stdMode=!b||e.documentMode>=8,o.boxModel=!b||"CSS1Compat"==e.compatMode||o.stdMode,o.styleSheetLoader=new u(e),o.boundEvents=[],o.settings=t=t||{},o.schema=t.schema,o.styles=new r({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),o.fixDoc(e),o.events=t.ownEvents?new i(t.proxy):i.Event,o.attrHooks=d(o,t),a=t.schema?t.schema.getBlockElements():{},o.$=n.overrideDefaults(function(){return{context:e,element:o.getRoot()}}),o.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!a[e.nodeName]):!!a[e]}}var m=c.each,g=c.is,v=c.grep,y=c.trim,b=l.ie,C=/^([a-z0-9],?)+$/i,x=/^[ \t\r\n]*$/;return p.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(e){var t=this.settings,n;if(b&&t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(n in t.schema.getCustomElements())e.createElement(n)}},clone:function(e,t){var n=this,r,i;return!b||1!==e.nodeType||t?e.cloneNode(t):(i=n.doc,t?r.firstChild:(r=i.createElement(e.nodeName),m(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),r))},getRoot:function(){var e=this;return e.settings.root_element||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t=this,n,r;return e=t.get(e),n=t.getPos(e),r=t.getSize(e),{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;return e=t.get(e),n=t.getStyle(e,"width"),r=t.getStyle(e,"height"),-1===n.indexOf("px")&&(n=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(n,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o=this,a,s=[];for(e=o.get(e),i=i===t,r=r||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),g(n,"string")&&(a=n,n="*"===n?function(e){return 1==e.nodeType}:function(e){return o.is(e,a)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e), -e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.settings.root_element||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(C.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(r,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=g(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r="",i;r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&"undefined"!=typeof t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return"undefined"!=typeof n?r+">"+n+"":r+" />"},createFragment:function(e){var t,n,r=this.doc,i;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),e.length>1?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&f(this,e)},getStyle:function(e,n,r){return e=this.$$(e),r?e.css(n):(n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==n&&(n=l.ie&&l.ie<12?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[n]:t)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&f(this,e)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r=this,i,o,a=r.settings;""===n&&(n=null),e=r.$$(e),i=e.attr(t),e.length&&(o=r.attrHooks[t],o&&o.set?o.set(e,n,t):e.attr(t,n),i!=n&&a.onSetAttrib&&a.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var n=this;n.$$(e).each(function(e,r){m(t,function(e,t){n.setAttrib(r,t,e)})})},getAttrib:function(e,t,n){var r=this,i,o;return e=r.$$(e),e.length&&(i=r.attrHooks[t],o=i&&i.get?i.get(e,t):e.attr(t)),"undefined"==typeof o&&(o=n||""),o},getPos:function(e,t){var r=this,i=0,o=0,a,s=r.doc,l=s.body,c;if(e=r.get(e),t=t||l,e){if(t===l&&e.getBoundingClientRect&&"static"===n(l).css("position"))return c=e.getBoundingClientRect(),t=r.boxModel?s.documentElement:l,i=c.left+(s.documentElement.scrollLeft||l.scrollLeft)-t.clientLeft,o=c.top+(s.documentElement.scrollTop||l.scrollTop)-t.clientTop,{x:i,y:o};for(a=e;a&&a!=t&&a.nodeType;)i+=a.offsetLeft||0,o+=a.offsetTop||0,a=a.offsetParent;for(a=e.parentNode;a&&a!=t&&a.nodeType;)i-=a.scrollLeft||0,o-=a.scrollTop||0,a=a.parentNode}return{x:i,y:o}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t=this,n=t.doc,r,i;if(t!==p.DOM&&n===document){var o=p.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,p.DOM.addedStyles=o}i=n.getElementById("mceDefaultStyles"),i||(i=n.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=n.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(n.createTextNode(e))},loadCSS:function(e){var t=this,n=t.doc,r;return t!==p.DOM&&n===document?void p.DOM.loadCSS(e):(e||(e=""),r=n.getElementsByTagName("head")[0],void m(e.split(","),function(e){var i;e=c._addCacheSuffix(e),t.files[e]||(t.files[e]=!0,i=t.create("link",{rel:"stylesheet",href:e}),b&&n.documentMode&&n.recalc&&(i.onload=function(){n.recalc&&n.recalc(),i.onload=null}),r.appendChild(i))}))},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,r){this.$$(e).toggleClass(t,r).each(function(){""===this.className&&n(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(e,t){e=this.$$(e),b?e.each(function(e,r){if(r.canHaveHTML!==!1){for(;r.firstChild;)r.removeChild(r.firstChild);try{r.innerHTML="
    "+t,r.removeChild(r.firstChild)}catch(i){n("
    ").html("
    "+t).contents().slice(1).appendTo(r)}return t}}):e.html(t)},getOuterHTML:function(e){return e=this.get(e),1==e.nodeType&&"outerHTML"in e?e.outerHTML:n("
    ").append(n(e).clone()).html()},setOuterHTML:function(e,t){var r=this;r.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}r.remove(n(this).html(t),!0)})},decode:s.decode,encode:s.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return g(t,"array")&&(e=e.cloneNode(!0)),n&&m(v(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),m(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncestor:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(c.trim(e))},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],m(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(b){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n=this,r,i,a,s,l,c=0;if(e=e.firstChild){s=new o(e,e.parentNode),t=t||(n.schema?n.schema.getNonEmptyElements():null);do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue}return!1}for(i=n.getAttribs(e),r=i.length;r--;)if(l=i[r].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==a)return!1;if(3===a&&!x.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new a(this)},nodeIndex:h,split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=o.length-1;n>=0;n--)r(o[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=y(e.nodeValue).length;if(!i.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(o=e.childNodes,1==o.length&&o[0]&&1==o[0].nodeType&&"bookmark"==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;i.remove(e)}return e}}var i=this,o=i.createRng(),a,s,l;return e&&t?(o.setStart(e.parentNode,i.nodeIndex(e)),o.setEnd(t.parentNode,i.nodeIndex(t)),a=o.extractContents(),o=i.createRng(),o.setStart(t.parentNode,i.nodeIndex(t)+1),o.setEnd(e.parentNode,i.nodeIndex(e)+1),s=o.extractContents(),l=e.parentNode,l.insertBefore(r(a),e),n?l.insertBefore(n,e):l.insertBefore(t,e),l.insertBefore(r(s),e),i.remove(e),n||t):void 0},bind:function(e,t,n,r){var i=this;if(c.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(c.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null):null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&(n=this.getContentEditable(e),null===n);e=e.parentNode);return n},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n];this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},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},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},p.DOM=new p(document),p.nodeIndex=h,p}),r(E,[w,m],function(e,t){function n(){function e(e,n){function i(){a.remove(l),s&&(s.onreadystatechange=s.onload=s=null),n()}function o(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var a=r,s,l;l=a.uniqueId(),s=document.createElement("script"),s.id=l,s.type="text/javascript",s.src=t._addCacheSuffix(e),"onreadystatechange"in s?s.onreadystatechange=function(){/loaded|complete/.test(s.readyState)&&i()}:s.onload=i,s.onerror=o,(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}var n=0,a=1,s=2,l={},c=[],u={},d=[],f=0,h;this.isDone=function(e){return l[e]==s},this.markDone=function(e){l[e]=s},this.add=this.load=function(e,t,r){var i=l[e];i==h&&(c.push(e),l[e]=n),t&&(u[e]||(u[e]=[]),u[e].push({func:t,scope:r||this}))},this.loadQueue=function(e,t){this.loadScripts(c,e,t)},this.loadScripts=function(t,n,r){function c(e){i(u[e],function(e){e.func.call(e.scope)}),u[e]=h}var p;d.push({func:n,scope:r||this}),(p=function(){var n=o(t);t.length=0,i(n,function(t){return l[t]==s?void c(t):void(l[t]!=a&&(l[t]=a,f++,e(t,function(){l[t]=s,f--,c(t),p()})))}),f||(i(d,function(e){e.func.call(e.scope)}),d.length=0)})()}}var r=e.DOM,i=t.each,o=t.grep;return n.ScriptLoader=new n,n}),r(N,[E,m],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var i=r.language;if(i&&r.languageLoad!==!1){if(n)if(n=","+n+",",-1!=n.indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1==n.indexOf(","+i+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+i+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){function l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&(s?a.call(s):a.call(e))}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=r.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(_,[],function(){function e(e){return function(t){return!!t&&t.nodeType==e}}function t(e){return e=e.toLowerCase().split(" "),function(t){var n,r;if(t&&t.nodeType)for(r=t.nodeName.toLowerCase(),n=0;nn.length-1?t=n.length-1:0>t&&(t=0),n[t]||e}function o(e){this.walk=function(t,n){function r(e){var t;return t=e[0],3===t.nodeType&&t===c&&u>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===f&&e.length>0&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e}function o(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function a(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function l(e,t,i){var a=i?"nextSibling":"previousSibling";for(g=e,v=g.parentNode;g&&g!=t;g=v)v=g.parentNode,y=o(g==e?g:g[a],a),y.length&&(i||y.reverse(),n(r(y)))}var c=t.startContainer,u=t.startOffset,d=t.endContainer,f=t.endOffset,h,p,m,g,v,y,b;if(b=e.select("td[data-mce-selected],th[data-mce-selected]"),b.length>0)return void s(b,function(e){n([e])});if(1==c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[u]),1==d.nodeType&&d.hasChildNodes()&&(d=i(d,f)),c==d)return n(r([c]));for(h=e.findCommonAncestor(c,d),g=c;g;g=g.parentNode){if(g===d)return l(c,h,!0);if(g===h)break}for(g=d;g;g=g.parentNode){if(g===c)return l(d,h);if(g===h)break}p=a(c,h)||c,m=a(d,h)||d,l(c,p,!0),y=o(p==c?p:p.nextSibling,"nextSibling",m==d?m.nextSibling:m),y.length&&n(r(y)),l(d,m)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&rr?(o-=r,n=i=t(i,o).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&r0&&o0)return h=v,p=n?v.nodeValue.length:0,void(i=!0);if(e.isBlock(v)||y[v.nodeName.toLowerCase()])return;s=v}o&&s&&(h=s,i=!0,p=0)}var h,p,m,g=e.getRoot(),v,y,b,C;if(h=n[(r?"start":"end")+"Container"],p=n[(r?"start":"end")+"Offset"],C=1==h.nodeType&&p===h.childNodes.length,y=e.schema.getNonEmptyElements(),b=r,!c(h)){if(1==h.nodeType&&p>h.childNodes.length-1&&(b=!1),9===h.nodeType&&(h=e.getRoot(),p=0),h===g){if(b&&(v=h.childNodes[p>0?p-1:0])){if(c(v))return;if(y[v.nodeName]||"TABLE"==v.nodeName)return}if(h.hasChildNodes()){if(p=Math.min(!b&&p>0?p-1:p,h.childNodes.length-1),h=h.childNodes[p],p=0,u(h)||c(h))return;if(h.hasChildNodes()&&!/TABLE/.test(h.nodeName)){v=h,m=new t(h,g);do{if(l(v)||c(v)){i=!1;break}if(3===v.nodeType&&v.nodeValue.length>0){p=b?0:v.nodeValue.length,h=v,i=!0;break}if(y[v.nodeName.toLowerCase()]&&!a(v)){p=e.nodeIndex(v),h=v.parentNode,"IMG"!=v.nodeName||b||p++,i=!0;break}}while(v=b?m.next():m.prev())}}}o&&(3===h.nodeType&&0===p&&f(!0),1===h.nodeType&&(v=h.childNodes[p],v||(v=h.childNodes[p-1]),!v||"BR"!==v.nodeName||d(v,"A")||s(v)||s(v,!0)||f(!0,v))),b&&!o&&3===h.nodeType&&p===h.nodeValue.length&&f(!1),i&&n["set"+(r?"Start":"End")](h,p)}}var i,o;return o=n.collapsed,r(!0),o||r(),i&&o&&n.collapse(!0),i}}function a(t,n,r){var i,o,a;if(i=r.elementFromPoint(t,n),o=r.body.createTextRange(),"HTML"==i.tagName&&(i=r.body),o.moveToElementText(i),a=e.toArray(o.getClientRects()),a=a.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)),e-t}),a.length>0){n=(a[0].bottom+a[0].top)/2;try{return o.moveToPoint(t,n),o.collapse(!0),o}catch(s){}}return null}var s=e.each,l=n.isContentEditableFalse,c=r.isCaretContainer;return o.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},o.getCaretRangeFromPoint=function(e,t,n){var r,i;if(n.caretPositionFromPoint)i=n.caretPositionFromPoint(e,t),r=n.createRange(),r.setStart(i.offsetNode,i.offset),r.collapse(!0);else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(n.body.createTextRange){r=n.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(o){r=a(e,t,n)}}return r},o.getSelectedNode=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset==n+1?t.childNodes[n]:null},o.getNode=function(e,t){return 1==e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},o}),r(R,[T,h,u],function(e,t,n){return function(r){function i(e){var t,n;if(n=r.$(e).parentsUntil(r.getBody()).add(e),n.length===a.length){for(t=n.length;t>=0&&n[t]===a[t];t--);if(-1===t)return a=n,!0}return a=n,!1}var o,a=[];"onselectionchange"in r.getDoc()||r.on("NodeChange Click MouseUp KeyUp Focus",function(t){var n,i;n=r.selection.getRng(),i={startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset},"nodechange"!=t.type&&e.compareRanges(i,o)||r.fire("SelectionChange"),o=i}),r.on("contextmenu",function(){r.fire("SelectionChange")}),r.on("SelectionChange",function(){var e=r.selection.getStart(!0);!t.range&&r.selection.isCollapsed()||!i(e)&&r.dom.isChildOf(e,r.getBody())&&r.nodeChanged({selectionChange:!0})}),r.on("MouseUp",function(e){e.isDefaultPrevented()||("IMG"==r.selection.getNode().nodeName?n.setEditorTimeout(r,function(){r.nodeChanged()}):r.nodeChanged())}),this.nodeChanged=function(e){var t=r.selection,n,i,o;r.initialized&&t&&!r.settings.disable_nodechange&&!r.readonly&&(o=r.getBody(),n=t.getStart()||o,n=n.ownerDocument!=r.getDoc()?r.getBody():n,"IMG"==n.nodeName&&t.isCollapsed()&&(n=n.parentNode),i=[],r.dom.getParent(n,function(e){return e===o?!0:void i.push(e)}),e=e||{},e.element=n,e.parents=i,r.fire("NodeChange",e))}}}),r(A,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i].name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(B,[m],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e,t){var n={},r,i;for(r=0,i=e.length;i>r;r++)n[e[r]]=t||{};return n}var s,c,u,d=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),c=3;co;o++)i.attributes[n[o]]={},i.attributesOrder.push(n[o])}var a={},l,c,u,d,f,h;return i[e]?i[e]:(l=t("id accesskey class dir lang style tabindex title"),c=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),u=t("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&&(l.push.apply(l,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),c.push.apply(c,t("article aside details dialog figure header footer hgroup section nav")),u.push.apply(u,t("audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"))),"html5-strict"!=e&&(l.push("xml:lang"),h=t("acronym applet basefont big font strike tt"),u.push.apply(u,h),s(h,function(e){n(e,"",u)}),f=t("center dir isindex noframes"),c.push.apply(c,f),d=[].concat(c,u),s(f,function(e){n(e,"",d)})),d=d||[].concat(c,u),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",d),n("address dt dd div caption","",d),n("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","",u),n("blockquote","cite",d),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",d),n("dl","","dt dd"),n("a","href target rel media hreflang type",u),n("q","cite",u),n("ins del","cite datetime",d),n("img","src sizes srcset alt usemap ismap width height"),n("iframe","src name width height",d),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",d,"param"),n("param","name value"),n("map","name",d,"area"),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",d),n("th","colspan rowspan headers scope abbr",d),n("form","accept-charset action autocomplete enctype method name novalidate target",d),n("fieldset","disabled form name",d,"legend"),n("label","form for",u),n("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"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?d:u),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",d,"li"),n("noscript","",d),"html4"!=e&&(n("wbr"),n("ruby","",u,"rt rp"),n("figcaption","",d),n("mark rt rp summary bdi","",u),n("canvas","width height",d),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",d,"track source"),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",d,"track source"),n("picture","","img source"),n("source","src srcset type media sizes"),n("track","kind src srclang label default"),n("datalist","",u,"option"),n("article section nav aside header footer","",d),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",d,"figcaption"),n("time","datetime",u),n("dialog","open",d),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",u),n("progress","value max",u),n("meter","value min max low high optimum",u),n("details","open",d,"summary"),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(r("script","language xml:space"),r("style","xml:space"),r("object","declare classid code codebase codetype archive standby align border hspace vspace"),r("embed","align name hspace vspace"),r("param","valuetype type"),r("a","charset name rev shape coords"),r("br","clear"),r("applet","codebase archive code object alt name width height align hspace vspace"),r("img","name longdesc align border hspace vspace"),r("iframe","longdesc frameborder marginwidth marginheight scrolling align"),r("font basefont","size color face"),r("input","usemap align"),r("select","onchange"),r("textarea"),r("h1 h2 h3 h4 h5 h6 div p legend caption","align"),r("ul","type compact"),r("li","type"),r("ol dl menu dir","compact"),r("pre","width xml:space"),r("hr","align noshade size width"),r("isindex","prompt"),r("table","summary width frame rules cellspacing cellpadding align bgcolor"),r("col","width align char charoff valign"),r("colgroup","width align char charoff valign"),r("thead","align char charoff valign"),r("tr","align char charoff valign bgcolor"),r("th","axis align char charoff valign nowrap bgcolor width height"),r("form","accept"),r("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),r("tfoot","align char charoff valign"),r("tbody","align char charoff valign"),r("area","nohref"),r("body","background bgcolor text link vlink alink")),"html4"!=e&&(r("input button select textarea","autofocus"),r("input textarea","placeholder"),r("a","download"),r("link script img","crossorigin"),r("iframe","sandbox seamless allowfullscreen")),s(t("a form meter progress dfn"),function(e){a[e]&&delete a[e].children[e]}),delete a.caption.children.table,delete a.script,i[e]=a,a)}function r(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),s(e,function(e,r){n[r]=n[r.toUpperCase()]="map"==t?a(e,/[, ]/):c(e,/[, ]/)})),n}var i={},o={},a=e.makeMap,s=e.each,l=e.extend,c=e.explode,u=e.inArray;return function(e){function o(t,n,r){var o=e[t];return o?o=a(o,/[, ]/,a(o.toUpperCase(),/[, ]/)):(o=i[t],o||(o=a(n," ",a(n.toUpperCase()," ")),o=l(o,r),i[t]=o)),o}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function f(e){var n,r,i,o,s,l,c,f,h,p,m,g,v,b,x,w,E,N,_,S=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,k=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(e)for(e=t(e,","),y["@"]&&(w=y["@"].attributes,E=y["@"].attributesOrder),n=0,r=e.length;r>n;n++)if(s=S.exec(e[n])){if(b=s[1],h=s[2],x=s[3],f=s[5],g={},v=[],l={attributes:g,attributesOrder:v},"#"===b&&(l.paddEmpty=!0),"-"===b&&(l.removeEmpty=!0),"!"===s[4]&&(l.removeEmptyAttrs=!0),w){for(N in w)g[N]=w[N];v.push.apply(v,E)}if(f)for(f=t(f,"|"),i=0,o=f.length;o>i;i++)if(s=k.exec(f[i])){if(c={},m=s[1],p=s[2].replace(/::/g,":"),b=s[3],_=s[4],"!"===m&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(p),c.required=!0),"-"===m){delete g[p],v.splice(u(v,p),1);continue}b&&("="===b&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:p,value:_}),c.defaultValue=_),":"===b&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:p,value:_}),c.forcedValue=_),"<"===b&&(c.validValues=a(_,"?"))),T.test(p)?(l.attributePatterns=l.attributePatterns||[],c.pattern=d(p),l.attributePatterns.push(c)):(g[p]||v.push(p),g[p]=c)}w||"@"!=h||(w=g,E=v),x&&(l.outputName=h,y[x]=l),T.test(h)?(l.pattern=d(h),C.push(l)):y[h]=l}}function h(e){y={},C=[],f(e),s(E,function(e,t){b[t]=e.children})}function p(e){var n=/^(~)?(.+)$/;e&&(i.text_block_elements=i.block_elements=null,s(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",o=t[2];if(b[o]=b[i],L[o]=i,r||(R[o.toUpperCase()]={},R[o]={}),!y[o]){var a=y[i]; -a=l({},a),delete a.removeEmptyAttrs,delete a.removeEmpty,y[o]=a}s(b,function(e,t){e[i]&&(b[t]=e=l({},b[t]),e[o]=e[i])})}))}function m(n){var r=/^([+\-]?)(\w+)\[([^\]]+)\]$/;i[e.schema]=null,n&&s(t(n,","),function(e){var n=r.exec(e),i,o;n&&(o=n[1],i=o?b[n[2]]:b[n[2]]={"#comment":{}},i=b[n[2]],s(t(n[3],"|"),function(e){"-"===o?delete i[e]:i[e]={}}))})}function g(e){var t=y[e],n;if(t)return t;for(n=C.length;n--;)if(t=C[n],t.pattern.test(e))return t}var v=this,y={},b={},C=[],x,w,E,N,_,S,k,T,R,A,B,D,M,L={},P={};e=e||{},E=n(e.schema),e.verify_html===!1&&(e.valid_elements="*[*]"),x=r(e.valid_styles),w=r(e.invalid_styles,"map"),T=r(e.valid_classes,"map"),N=o("whitespace_elements","pre script noscript style textarea video audio iframe object"),_=o("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),S=o("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),k=o("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),A=o("non_empty_elements","td th iframe video audio object script",S),B=o("move_caret_before_on_enter_elements","table",A),D=o("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),R=o("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",D),M=o("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),s((e.special||"script noscript style textarea").split(" "),function(e){P[e]=new RegExp("]*>","gi")}),e.valid_elements?h(e.valid_elements):(s(E,function(e,t){y[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},b[t]=e.children}),"html5"!=e.schema&&s(t("strong/b em/i"),function(e){e=t(e,"/"),y[e[1]].outputName=e[0]}),s(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){y[e]&&(y[e].removeEmpty=!0)}),s(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){y[e].paddEmpty=!0}),s(t("span"),function(e){y[e].removeEmptyAttrs=!0})),p(e.custom_elements),m(e.valid_children),f(e.extended_valid_elements),m("+ol[ul|ol],+ul[ul|ol]"),e.invalid_elements&&s(c(e.invalid_elements),function(e){y[e]&&delete y[e]}),g("span")||f("span[!data-mce-type|*]"),v.children=b,v.getValidStyles=function(){return x},v.getInvalidStyles=function(){return w},v.getValidClasses=function(){return T},v.getBoolAttrs=function(){return k},v.getBlockElements=function(){return R},v.getTextBlockElements=function(){return D},v.getTextInlineElements=function(){return M},v.getShortEndedElements=function(){return S},v.getSelfClosingElements=function(){return _},v.getNonEmptyElements=function(){return A},v.getMoveCaretBeforeOnEnterElements=function(){return B},v.getWhiteSpaceElements=function(){return N},v.getSpecialElements=function(){return P},v.isValidChild=function(e,t){var n=b[e];return!(!n||!n[t])},v.isValid=function(e,t){var n,r,i=g(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},v.getElementRule=g,v.getCustomElements=function(){return L},v.addValidElements=f,v.setValidElements=h,v.addCustomElements=p,v.addValidChildren=m,v.elements=y}}),r(D,[B,C,m],function(e,t,n){function r(e,t,n){var r=1,i,o,a,s;for(s=e.getShortEndedElements(),a=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,a.lastIndex=i=n;o=a.exec(t);){if(i=a.lastIndex,"/"===o[1])r--;else if(!o[1]){if(o[2]in s)continue;r++}if(0===r)break}return i}function i(i,a){function s(){}var l=this;i=i||{},l.schema=a=a||new e,i.fix_self_closing!==!1&&(i.fix_self_closing=!0),o("comment cdata text start end pi doctype".split(" "),function(e){e&&(l[e]=i[e]||s)}),l.parse=function(e){function o(e){var t,n;for(t=h.length;t--&&h[t].name!==e;);if(t>=0){for(n=h.length-1;n>=t;n--)e=h[n],e.valid&&l.end(e.name);h.length=t}}function s(e,t,n,r,o){var a,s,l=/[\s\u0000-\u001F]+/g;if(t=t.toLowerCase(),n=t in x?t:z(n||r||o||""),E&&!y&&0!==t.indexOf("data-")){if(a=T[t],!a&&R){for(s=R.length;s--&&(a=R[s],!a.pattern.test(t)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(V[t]&&!i.allow_script_urls){var c=n.replace(l,"");try{c=decodeURIComponent(c)}catch(u){c=unescape(c)}if(U.test(c))return;if(!i.allow_html_data_urls&&$.test(c)&&!/^data:image\//i.test(c))return}p.map[t]=n,p.push({name:t,value:n})}var l=this,c,u=0,d,f,h=[],p,m,g,v,y,b,C,x,w,E,N,_,S,k,T,R,A,B,D,M,L,P,H,O,I,F=0,z=t.decode,W,V=n.makeMap("src,href,data,background,formaction,poster"),U=/((java|vb)script|mhtml):/i,$=/^data:/i;for(P=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),H=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,C=a.getShortEndedElements(),L=i.self_closing_elements||a.getSelfClosingElements(),x=a.getBoolAttrs(),E=i.validate,b=i.remove_internals,W=i.fix_self_closing,O=a.getSpecialElements();c=P.exec(e);){if(u0&&h[h.length-1].name===d&&o(d),!E||(N=a.getElementRule(d))){if(_=!0,E&&(T=N.attributes,R=N.attributePatterns),(k=c[8])?(y=-1!==k.indexOf("data-mce-type"),y&&b&&(_=!1),p=[],p.map={},k.replace(H,s)):(p=[],p.map={}),E&&!y){if(A=N.attributesRequired,B=N.attributesDefault,D=N.attributesForced,M=N.removeEmptyAttrs,M&&!p.length&&(_=!1),D)for(m=D.length;m--;)S=D[m],v=S.name,I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I});if(B)for(m=B.length;m--;)S=B[m],v=S.name,v in p.map||(I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I}));if(A){for(m=A.length;m--&&!(A[m]in p.map););-1===m&&(_=!1)}if(S=p.map["data-mce-bogus"]){if("all"===S){u=r(a,e,P.lastIndex),P.lastIndex=u;continue}_=!1}}_&&l.start(d,p,w)}else _=!1;if(f=O[d]){f.lastIndex=u=c.index+c[0].length,(c=f.exec(e))?(_&&(g=e.substr(u,c.index-u)),u=c.index+c[0].length):(g=e.substr(u),u=e.length),_&&(g.length>0&&l.text(g,!0),l.end(d)),P.lastIndex=u;continue}w||(k&&k.indexOf("/")==k.length-1?_&&l.end(d):h.push({name:d,valid:_}))}else(d=c[1])?(">"===d.charAt(0)&&(d=" "+d),i.allow_conditional_comments||"[if"!==d.substr(0,3)||(d=" "+d),l.comment(d)):(d=c[2])?l.cdata(d):(d=c[3])?l.doctype(d):(d=c[4])&&l.pi(d,c[5]);u=c.index+c[0].length}for(u=0;m--)d=h[m],d.valid&&l.end(d.name)}}var o=n.each;return i.findEndTag=r,i}),r(M,[A,B,D,m],function(e,t,n,r){var i=r.makeMap,o=r.each,a=r.explode,s=r.extend;return function(r,l){function c(t){var n,r,o,a,s,c,d,f,h,p,m,g,v,y,b;for(m=i("tr,td,th,tbody,thead,tfoot,table"),p=l.getNonEmptyElements(),g=l.getTextBlockElements(),v=l.getSpecialElements(),n=0;n1){for(a.reverse(),s=c=u.filterNode(a[0].clone()),h=0;h0)return void(t.value=r);if(n=t.next){if(3==n.type&&n.value.length){t=t.prev;continue}if(!o[n.name]&&"script"!=n.name&&"style"!=n.name){t=t.prev;continue}}i=t.prev,t.remove(),t=i}}function g(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var v,y,b,C,x,w,E,N,_,S,k,T,R,A=[],B,D,M,L,P,H,O,I;if(o=o||{},h={},p={},T=s(i("script,style,head,html,body,title,meta,param"),l.getBlockElements()),O=l.getNonEmptyElements(),H=l.children,k=r.validate,I="forced_root_block"in o?o.forced_root_block:r.forced_root_block,P=l.getWhiteSpaceElements(),R=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,M=/[ \t\r\n]+/g,L=/^[ \t\r\n]+$/,v=new n({validate:k,allow_script_urls:r.allow_script_urls,allow_conditional_comments:r.allow_conditional_comments,self_closing_elements:g(l.getSelfClosingElements()),cdata:function(e){b.append(u("#cdata",4)).value=e},text:function(e,t){var n;B||(e=e.replace(M," "),b.lastChild&&T[b.lastChild.name]&&(e=e.replace(R,""))),0!==e.length&&(n=u("#text",3),n.raw=!!t,b.append(n).value=e)},comment:function(e){b.append(u("#comment",8)).value=e},pi:function(e,t){b.append(u(e,7)).value=t,m(b)},doctype:function(e){var t;t=b.append(u("#doctype",10)),t.value=e,m(b)},start:function(e,t,n){var r,i,o,a,s;if(o=k?l.getElementRule(e):{}){for(r=u(o.outputName||e,1),r.attributes=t,r.shortEnded=n,b.append(r),s=H[b.name],s&&H[r.name]&&!s[r.name]&&A.push(r),i=f.length;i--;)a=f[i].name,a in t.map&&(_=p[a],_?_.push(r):p[a]=[r]);T[e]&&m(r),n||(b=r),!B&&P[e]&&(B=!0)}},end:function(t){var n,r,i,o,a;if(r=k?l.getElementRule(t):{}){if(T[t]&&!B){if(n=b.firstChild,n&&3===n.type)if(i=n.value.replace(R,""),i.length>0)n.value=i,n=n.next;else for(o=n.next,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.next,(0===i.length||L.test(i))&&(n.remove(),n=o),n=o;if(n=b.lastChild,n&&3===n.type)if(i=n.value.replace(D,""),i.length>0)n.value=i,n=n.prev;else for(o=n.prev,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.prev,(0===i.length||L.test(i))&&(n.remove(),n=o),n=o}if(B&&P[t]&&(B=!1),(r.removeEmpty||r.paddEmpty)&&b.isEmpty(O))if(r.paddEmpty)b.empty().append(new e("#text","3")).value="\xa0";else if(!b.attributes.map.name&&!b.attributes.map.id)return a=b.parent,T[b.name]?b.empty().remove():b.unwrap(),void(b=a);b=b.parent}}},l),y=b=new e(o.context||r.root_name,11),v.parse(t),k&&A.length&&(o.context?o.invalid=!0:c(A)),I&&("body"==y.name||o.isRootContent)&&a(),!o.invalid){for(S in h){for(_=d[S],C=h[S],E=C.length;E--;)C[E].parent||C.splice(E,1);for(x=0,w=_.length;w>x;x++)_[x](C,S,o)}for(x=0,w=f.length;w>x;x++)if(_=f[x],_.name in p){for(C=p[_.name],E=C.length;E--;)C[E].parent||C.splice(E,1);for(E=0,N=_.callbacks.length;N>E;E++)_.callbacks[E](C,_.name,o)}}return y},r.remove_trailing_brs&&u.addNodeFilter("br",function(t){var n,r=t.length,i,o=s({},l.getBlockElements()),a=l.getNonEmptyElements(),c,u,d,f,h,p;for(o.body=1,n=0;r>n;n++)if(i=t[n],c=i.parent,o[i.parent.name]&&i===c.lastChild){for(d=i.prev;d;){if(f=d.name,"span"!==f||"bookmark"!==d.attr("data-mce-type")){if("br"!==f)break;if("br"===f){i=null;break}}d=d.prev}i&&(i.remove(),c.isEmpty(a)&&(h=l.getElementRule(c.name),h&&(h.removeEmpty?c.remove():h.paddEmpty&&(c.empty().append(new e("#text",3)).value="\xa0"))))}else{for(u=i;c&&c.firstChild===u&&c.lastChild===u&&(u=c,!o[c.name]);)c=c.parent;u===c&&(p=new e("#text",3),p.value="\xa0",i.replace(p))}}),r.allow_html_in_named_anchor||u.addAttributeFilter("id,name",function(e){for(var t=e.length,n,r,i,o;t--;)if(o=e[t],"a"===o.name&&o.firstChild&&!o.attr("href")){i=o.parent,n=o.lastChild;do r=n.prev,i.insert(n,o),n=r;while(n)}}),r.validate&&l.getValidClasses()&&u.addAttributeFilter("class",function(e){for(var t=e.length,n,r,i,o,a,s=l.getValidClasses(),c,u;t--;){for(n=e[t],r=n.attr("class").split(" "),a="",i=0;i0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n")),r.push("<",e),t)for(c=0,u=t.length;u>c;c++)d=t[c],r.push(" ",d.name,'="',s(d.value,!0),'"');!n||l?r[r.length]=">":r[r.length]=" />",n&&i&&a[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n"))},end:function(e){var t;r.push(""),i&&a[e]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(e,t){e.length>0&&(r[r.length]=t?e:s(e))},cdata:function(e){r.push("")},comment:function(e){r.push("")},pi:function(e,t){t?r.push(""):r.push(""),i&&r.push("\n")},doctype:function(e){r.push("",i?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),r(P,[L,B],function(e,t){return function(n,r){var i=this,o=new e(n);n=n||{},n.validate="validate"in n?n.validate:!0,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n=i[e.type],s,l,c,u,d,f,h,p,m;if(n)n(e);else{if(s=e.name,l=e.shortEnded,c=e.attributes,a&&c&&c.length>1&&(f=[],f.map={},m=r.getElementRule(e.name))){for(h=0,p=m.attributesOrder.length;p>h;h++)u=m.attributesOrder[h],u in c.map&&(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));for(h=0,p=c.length;p>h;h++)u=c[h].name,u in f.map||(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));c=f}if(o.start(e.name,c,l),!l){if(e=e.firstChild)do t(e);while(e=e.next);o.end(s)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do t(e);while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r(H,[w,M,D,C,P,A,B,h,m,S],function(e,t,n,r,i,o,a,s,l,c){function u(e){function t(e){return e&&"br"===e.name}var n,r;n=e.lastChild,t(n)&&(r=n.prev,t(r)&&(n.remove(),r.remove()))}var d=l.each,f=l.trim,h=e.DOM,p=["data-mce-selected"];return function(e,o){function m(e){var t=new RegExp(["]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>","\\s?("+p.join("|")+')="[^"]+"'].join("|"),"gi");return e=c.trim(e.replace(t,""))}function g(){var e=o.getBody().innerHTML,t=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,r,i,a,s,l,c=o.schema;for(e=m(e),l=c.getShortEndedElements();s=t.exec(e);)i=t.lastIndex,a=s[0].length,r=l[s[1]]?i:n.findEndTag(c,e,i),e=e.substring(0,i-a)+e.substring(r),t.lastIndex=i-a;return f(e)}function v(e){-1===l.inArray(p,e)&&(C.addAttributeFilter(e,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),p.push(e))}var y,b,C;return o&&(y=o.dom,b=o.schema),y=y||h,b=b||new a(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0,C=new t(e,b),C.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length,r;n--;)r=e[n],r.attr("tabindex",r.attributes.map["data-mce-tabindex"]),r.attr(t,null)}),C.addAttributeFilter("src,href,style",function(t,n){for(var r=t.length,i,o,a="data-mce-"+n,s=e.url_converter,l=e.url_converter_scope,c;r--;)i=t[r],o=i.attributes.map[a],o!==c?(i.attr(n,o.length>0?o:null),i.attr(a,null)):(o=i.attributes.map[n],"style"===n?o=y.serializeStyle(y.parseStyle(o),i.name):s&&(o=s.call(l,o,n,i.name)),i.attr(n,o.length>0?o:null))}),C.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class"),r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}),C.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length,i;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),C.addNodeFilter("noscript",function(e){for(var t=e.length,n;t--;)n=e[t].firstChild,n&&(n.value=r.decode(n.value))}),C.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r=e.length,i,o,a;r--;)i=e[r],o=i.firstChild?i.firstChild.value:"","script"===t?(a=i.attr("type"),a&&i.attr("type","mce-no/type"==a?null:a.replace(/^mce\-/,"")),o.length>0&&(i.firstChild.value="// ")):o.length>0&&(i.firstChild.value="")}),C.addNodeFilter("#comment",function(e){for(var t=e.length,n;t--;)n=e[t],0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}),C.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length,r;n--;)r=e[n],7===r.type?r.remove():1===r.type&&("input"!==t||"type"in r.attributes.map||r.attr("type","text"))}),e.fix_list_elements&&C.addNodeFilter("ul,ol",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.parent,"ul"!==r.name&&"ol"!==r.name||n.prev&&"li"===n.prev.name&&n.prev.append(n)}),C.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:b,addNodeFilter:C.addNodeFilter,addAttributeFilter:C.addAttributeFilter,serialize:function(t,n){var r=this,o,a,l,h,p,m;return s.ie&&y.select("script,style,select,map").length>0?(p=t.innerHTML,t=t.cloneNode(!1),y.setHTML(t,p)):t=t.cloneNode(!0),o=t.ownerDocument.implementation,o.createHTMLDocument&&(a=o.createHTMLDocument(""),d("BODY"==t.nodeName?t.childNodes:[t],function(e){a.body.appendChild(a.importNode(e,!0))}),t="BODY"!=t.nodeName?a.body.firstChild:a.body,l=y.doc,y.doc=a),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,r.onPreProcess(n)),m=C.parse(f(n.getInner?t.innerHTML:y.getOuterHTML(t)),n),u(m),h=new i(e,b),n.content=h.serialize(m),n.cleanup||(n.content=c.trim(n.content),n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||r.onPostProcess(n),l&&(y.doc=l),n.node=null,n.content},addRules:function(e){b.addValidElements(e)},setRules:function(e){b.setValidElements(e)},onPreProcess:function(e){o&&o.fire("PreProcess",e)},onPostProcess:function(e){o&&o.fire("PostProcess",e)},addTempAttr:v,trimHtml:m,getTrimmedContent:g}}}),r(O,[],function(){function e(e){function t(t,n){var r,i=0,o,a,s,l,c,u,d=-1,f;if(r=t.duplicate(),r.collapse(n),f=r.parentElement(),f.ownerDocument===e.dom.doc){for(;"false"===f.contentEditable;)f=f.parentNode;if(!f.hasChildNodes())return{node:f,inside:1};for(s=f.children,o=s.length-1;o>=i;)if(u=Math.floor((i+o)/2),l=s[u],r.moveToElementText(l),d=r.compareEndPoints(n?"StartToStart":"EndToEnd",t),d>0)o=u-1;else{if(!(0>d))return{node:l};i=u+1}if(0>d)for(l?r.collapse(!1):(r.moveToElementText(f),r.collapse(!0),l=f,a=!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&f==r.parentElement();)c++;else for(r.collapse(!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&f==r.parentElement();)c++;return{node:l,position:d,offset:c,inside:a}}}function n(){function n(e){var n=t(o,e),r,i,s=0,l,c,u;if(r=n.node,i=n.offset,n.inside&&!r.hasChildNodes())return void a[e?"setStart":"setEnd"](r,0);if(i===c)return void a[e?"setStartBefore":"setEndAfter"](r);if(n.position<0){if(l=n.inside?r.firstChild:r.nextSibling,!l)return void a[e?"setStartAfter":"setEndAfter"](r);if(!i)return void(3==l.nodeType?a[e?"setStart":"setEnd"](l,0):a[e?"setStartBefore":"setEndBefore"](l));for(;l;){if(3==l.nodeType&&(u=l.nodeValue,s+=u.length,s>=i)){r=l,s-=i,s=u.length-s;break}l=l.nextSibling}}else{if(l=r.previousSibling,!l)return a[e?"setStartBefore":"setEndBefore"](r);if(!i)return void(3==r.nodeType?a[e?"setStart":"setEnd"](l,r.nodeValue.length):a[e?"setStartAfter":"setEndAfter"](l));for(;l;){if(3==l.nodeType&&(s+=l.nodeValue.length,s>=i)){r=l,s-=i;break}l=l.previousSibling}}a[e?"setStart":"setEnd"](r,s)}var o=e.getRng(),a=i.createRng(),s,l,c,u,d;if(s=o.item?o.item(0):o.parentElement(),s.ownerDocument!=i.doc)return a;if(l=e.isCollapsed(),o.item)return a.setStart(s.parentNode,i.nodeIndex(s)),a.setEnd(a.startContainer,a.startOffset+1),a;try{n(!0),l||n()}catch(f){if(-2147024809!=f.number)throw f;d=r.getBookmark(2),c=o.duplicate(),c.collapse(!0),s=c.parentElement(),l||(c=o.duplicate(),c.collapse(!1),u=c.parentElement(),u.innerHTML=u.innerHTML),s.innerHTML=s.innerHTML,r.moveToBookmark(d),o=e.getRng(),n(!0),l||n()}return a}var r=this,i=e.dom,o=!1;this.getBookmark=function(n){function r(e){var t,n,r,o,a=[];for(t=e.parentNode,n=i.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=t.children,o=r.length;o--;)if(e===r[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;return n=t(a,e),n?{position:n.position,offset:n.offset,indexes:r(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:r(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,r,o;for(t=i.getRoot(),n=e.length-1;n>=0;n--)o=t.children,r=e[n],r<=o.length-1&&(t=o[r]);return t}function n(n){var i=e[n?"start":"end"],a,s,l,c;i&&(a=i.position>0,s=o.createTextRange(),s.moveToElementText(t(i.indexes)),c=i.offset,c!==l?(s.collapse(i.inside||a),s.moveStart("character",a?-c:c)):s.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",s),n&&r.collapse(!0))}var r,o=i.doc.body;e.start&&(e.start.ctrl?(r=o.createControlRange(),r.addElement(t(e.start.indexes)),r.select()):(r=o.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(t){function n(e){var t,n,a,d,p;a=i.create("a"),t=e?s:c,n=e?l:u,d=r.duplicate(),t!=f&&t!=f.documentElement||(t=h,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),d.moveToElementText(a),d.moveStart("character",n),i.remove(a),r.setEndPoint(e?"StartToStart":"EndToEnd",d)):(p=t.childNodes,p.length?(n>=p.length?i.insertAfter(a,p[p.length-1]):t.insertBefore(a,p[n]),d.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="",a=t.firstChild,d.moveToElementText(a),d.collapse(o)),r.setEndPoint(e?"StartToStart":"EndToEnd",d),i.remove(a))}var r,a,s,l,c,u,d,f=e.dom.doc,h=f.body,p,m;if(s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,r=h.createTextRange(),s==c&&1==s.nodeType){if(l==u&&!s.hasChildNodes()){if(s.canHaveHTML)return d=s.previousSibling,d&&!d.hasChildNodes()&&i.isBlock(d)?d.innerHTML="":d=null,s.innerHTML="",r.moveToElementText(s.lastChild),r.select(),i.doc.selection.clear(),s.innerHTML="",void(d&&(d.innerHTML=""));l=i.nodeIndex(s),s=s.parentNode}if(l==u-1)try{if(m=s.childNodes[l],a=h.createControlRange(),a.addElement(m),a.select(),p=e.getRng(),p.item&&m===p.item(0))return}catch(g){}}n(!0),n(),r.select()},this.getRangeAt=n}return e}),r(I,[h],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(t){return e.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),r(F,[I,m,u,h,_],function(e,t,n,r,i){var o=i.isContentEditableFalse;return function(i,a){function s(e){var t=a.settings.object_resizing;return t===!1||r.iOS?!1:("string"!=typeof t&&(t="table,img,div"),"false"===e.getAttribute("data-mce-resize")?!1:e==a.getBody()?!1:a.dom.is(e,t))}function l(t){var n,r,i,o,s;n=t.screenX-B,r=t.screenY-D,F=n*R[2]+P,z=r*R[3]+H,F=5>F?5:F,z=5>z?5:z,i="IMG"==_.nodeName&&a.settings.resize_img_proportional!==!1?!e.modifierPressed(t):e.modifierPressed(t)||"IMG"==_.nodeName&&R[2]*R[3]!==0,i&&($(n)>$(r)?(z=q(F*O),F=q(z/O)):(F=q(z/O),z=q(F*O))),E.setStyles(S,{width:F,height:z}),o=R.startPos.x+n,s=R.startPos.y+r,o=o>0?o:0,s=s>0?s:0,E.setStyles(k,{left:o,top:s,display:"block"}),k.innerHTML=F+" × "+z,R[2]<0&&S.clientWidth<=F&&E.setStyle(S,"left",M+(P-F)),R[3]<0&&S.clientHeight<=z&&E.setStyle(S,"top",L+(H-z)),n=j.scrollWidth-Y,r=j.scrollHeight-X,n+r!==0&&E.setStyles(k,{left:o-n,top:s-r}),I||(a.fire("ObjectResizeStart",{target:_,width:P,height:H}),I=!0)}function c(){function e(e,t){t&&(_.style[e]||!a.schema.isValid(_.nodeName.toLowerCase(),e)?E.setStyle(_,e,t):E.setAttrib(_,e,t))}I=!1,e("width",F),e("height",z),E.unbind(W,"mousemove",l),E.unbind(W,"mouseup",c),V!=W&&(E.unbind(V,"mousemove",l),E.unbind(V,"mouseup",c)),E.remove(S),E.remove(k),U&&"TABLE"!=_.nodeName||u(_),a.fire("ObjectResized",{target:_,width:F,height:z}),E.setAttrib(_,"style",E.getAttrib(_,"style")),a.nodeChanged()}function u(e,t,n){var i,o,u,f,h;d(),b(),i=E.getPos(e,j),M=i.x,L=i.y,h=e.getBoundingClientRect(),o=h.width||h.right-h.left,u=h.height||h.bottom-h.top,_!=e&&(y(),_=e,F=z=0),f=a.fire("ObjectSelected",{target:e}),s(e)&&!f.isDefaultPrevented()?N(T,function(e,i){function a(t){B=t.screenX,D=t.screenY,P=_.clientWidth,H=_.clientHeight,O=H/P,R=e,e.startPos={x:o*e[0]+M,y:u*e[1]+L},Y=j.scrollWidth,X=j.scrollHeight,S=_.cloneNode(!0),E.addClass(S,"mce-clonedresizable"),E.setAttrib(S,"data-mce-bogus","all"),S.contentEditable=!1,S.unSelectabe=!0,E.setStyles(S,{left:M,top:L,margin:0}),S.removeAttribute("data-mce-selected"),j.appendChild(S),E.bind(W,"mousemove",l),E.bind(W,"mouseup",c),V!=W&&(E.bind(V,"mousemove",l),E.bind(V,"mouseup",c)),k=E.add(j,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},P+" × "+H)}var s;return t?void(i==t&&a(n)):(s=E.get("mceResizeHandle"+i),s&&E.remove(s),s=E.add(j,"div",{id:"mceResizeHandle"+i,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+i+"-resize; margin:0; padding:0"}),r.ie&&(s.contentEditable=!1),E.bind(s,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),a(e)}),e.elm=s,void E.setStyles(s,{left:o*e[0]+M-s.offsetWidth/2,top:u*e[1]+L-s.offsetHeight/2}))}):d(),_.setAttribute("data-mce-selected","1")}function d(){var e,t;b(),_&&_.removeAttribute("data-mce-selected");for(e in T)t=E.get("mceResizeHandle"+e),t&&(E.unbind(t),E.remove(t))}function f(e){function t(e,t){if(e)do if(e===t)return!0;while(e=e.parentNode)}var n,r;if(!I&&!a.removed)return N(E.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"==e.type?e.target:i.getNode(),r=E.$(r).closest(U?"table":"table,img,hr")[0],t(r,j)&&(C(),n=i.getStart(!0),t(n,r)&&t(i.getEnd(!0),r)&&(!U||r!=n&&"IMG"!==n.nodeName))?void u(r):void d()}function h(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function p(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function m(e){var t=e.srcElement,n,r,i,o,s,l,c;n=t.getBoundingClientRect(),l=A.clientX-n.left,c=A.clientY-n.top;for(r in T)if(i=T[r],o=t.offsetWidth*i[0],s=t.offsetHeight*i[1],$(o-l)<8&&$(s-c)<8){R=i;break}I=!0,a.fire("ObjectResizeStart",{target:_,width:_.clientWidth,height:_.clientHeight}),a.getDoc().selection.empty(),u(t,r,A)}function g(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function v(e){var t=e.srcElement;if(o(t))return void g(e);if(t!=_){if(a.fire("ObjectSelected",{target:t}),y(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);"IMG"!=t.nodeName&&"TABLE"!=t.nodeName||(d(),_=t,h(t,"resizestart",m))}}function y(){p(_,"resizestart",m)}function b(){for(var e in T){var t=T[e];t.elm&&(E.unbind(t.elm),delete t.elm)}}function C(){try{a.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function x(e){var t;if(U){t=W.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function w(){_=S=null,U&&(y(),p(j,"controlselect",v))}var E=a.dom,N=t.each,_,S,k,T,R,A,B,D,M,L,P,H,O,I,F,z,W=a.getDoc(),V=document,U=r.ie&&r.ie<11,$=Math.abs,q=Math.round,j=a.getBody(),Y,X;T={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var K=".mce-content-body";return a.contentStyles.push(K+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: box-sizing;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+K+" .mce-resizehandle:hover {background: #000}"+K+" img[data-mce-selected],"+K+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+K+" .mce-clonedresizable {position: absolute;"+(r.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+K+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),a.on("init",function(){U?(a.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(d(),x(e.target))}),h(j,"controlselect",v),a.on("mousedown",function(e){A=e})):(C(),r.ie>=11&&(a.on("mousedown click",function(e){var t=e.target.nodeName;!I&&/^(TABLE|IMG|HR)$/.test(t)&&(a.selection.select(e.target,"TABLE"==t),"mousedown"==e.type&&a.nodeChanged())}),a.dom.bind(j,"mscontrolselect",function(e){function t(e){n.setEditorTimeout(a,function(){a.selection.select(e)})}return o(e.target)?(e.preventDefault(),void t(e.target)):void(/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&t(e.target)))})));var e=n.throttle(f);a.on("nodechange ResizeEditor ResizeWindow drop",function(t){a.composing||e(t)}),a.on("keydown keyup compositionend",function(t){_&&"TABLE"==_.nodeName&&!a.composing&&e(t)}),a.on("hide blur",d)}),a.on("remove",b),{isResizable:s,showResizeRect:u,hideResizeRect:d,updateResizeRect:f,controlSelect:x,destroy:w}}}),r(z,[],function(){function e(e){return function(){return e}}function t(e){return function(t){return!e(t)}}function n(e,t){return function(n){return e(t(n))}}function r(){var e=a.call(arguments);return function(t){for(var n=0;n=e.length?e.apply(this,t.slice(1)):function(){var e=t.concat([].slice.call(arguments));return o.apply(this,e)}}var a=[].slice;return{constant:e,negate:t,and:i,or:r,curry:o,compose:n}}),r(W,[_,p,k],function(e,t,n){function r(e){return m(e)?!1:d(e)?!f(e.parentNode):h(e)||u(e)||p(e)||c(e)}function i(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode){if(c(e))return!1;if(l(e))return!0}return!0}function o(e){return c(e)?t.reduce(e.getElementsByTagName("*"),function(e,t){return e||l(t); -},!1)!==!0:!1}function a(e){return h(e)||o(e)}function s(e,t){return r(e)&&i(e,t)}var l=e.isContentEditableTrue,c=e.isContentEditableFalse,u=e.isBr,d=e.isText,f=e.matchNodeNames("script style textarea"),h=e.matchNodeNames("img input textarea hr iframe video audio object"),p=e.matchNodeNames("table"),m=n.isCaretContainer;return{isCaretCandidate:r,isInEditable:i,isAtomic:a,isEditableCaretCandidate:s}}),r(V,[],function(){function e(e){return e?{left:u(e.left),top:u(e.top),bottom:u(e.bottom),right:u(e.right),width:u(e.width),height:u(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function t(t,n){return t=e(t),n?t.right=t.left:(t.left=t.left+t.width,t.right=t.left),t.width=0,t}function n(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right}function r(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2}function i(e,t){return e.bottomt.bottom?!1:r(t.top-e.bottom,e,t)}function o(e,t){return e.top>t.bottom?!0:e.bottomt.right}function l(e,t){return i(e,t)?-1:o(e,t)?1:a(e,t)?-1:s(e,t)?1:0}function c(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}var u=Math.round;return{clone:e,collapse:t,isEqual:n,isAbove:i,isBelow:o,isLeft:a,isRight:s,compare:l,containsXY:c}}),r(U,[],function(){function e(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&t.test(e)}var t=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]");return{isExtendingChar:e}}),r($,[z,_,w,T,W,V,U],function(e,t,n,r,i,o,a){function s(e){return e&&/[\r\n\t ]/.test(e)}function l(e){var t=e.startContainer,n=e.startOffset,r;return!!(s(e.toString())&&g(t.parentNode)&&(r=t.data,s(r[n-1])||s(r[n+1])))}function c(e){function t(e){var t=e.ownerDocument,n=t.createRange(),r=t.createTextNode("\xa0"),i=e.parentNode,a;return i.insertBefore(r,e),n.setStart(r,0),n.setEnd(r,1),a=o.clone(n.getBoundingClientRect()),i.removeChild(r),a}function n(e){var n,r;return r=e.getClientRects(),n=r.length>0?o.clone(r[0]):o.clone(e.getBoundingClientRect()),y(e)&&0===n.left?t(e):n}function r(e,t){return e=o.collapse(e,t),e.width=1,e.right=e.left+1,e}function i(e){0!==e.height&&(c.length>0&&o.isEqual(e,c[c.length-1])||c.push(e))}function s(e,t){var o=e.ownerDocument.createRange();if(t0&&(o.setStart(e,t-1),o.setEnd(e,t),l(o)||i(r(n(o),!1))),t=t.data.length:n>=t.childNodes.length}function a(){var e;return e=t.ownerDocument.createRange(),e.setStart(t,n),e.setEnd(t,n),e}function s(){return r||(r=c(new u(t,n))),r}function l(){return s().length>0}function d(e){return e&&t===e.container()&&n===e.offset()}function f(e){return C(t,e?n-1:n)}return{container:e.constant(t),offset:e.constant(n),toRange:a,getClientRects:s,isVisible:l,isAtStart:i,isAtEnd:o,isEqual:d,getNode:f}}var d=t.isElement,f=i.isCaretCandidate,h=t.matchStyleValues("display","block table"),p=t.matchStyleValues("float","left right"),m=e.and(d,f,e.negate(p)),g=e.negate(t.matchStyleValues("white-space","pre pre-line pre-wrap")),v=t.isText,y=t.isBr,b=n.nodeIndex,C=r.getNode;return u.fromRangeStart=function(e){return new u(e.startContainer,e.startOffset)},u.fromRangeEnd=function(e){return new u(e.endContainer,e.endOffset)},u.after=function(e){return new u(e.parentNode,b(e)+1)},u.before=function(e){return new u(e.parentNode,b(e))},u}),r(q,[_,w,z,p,$],function(e,t,n,r,i){function o(e){var t=e.parentNode;return v(t)?o(t):t}function a(e){return e?r.reduce(e.childNodes,function(e,t){return v(t)&&"BR"!=t.nodeName?e=e.concat(a(t)):e.push(t),e},[]):[]}function s(e,t){for(;(e=e.previousSibling)&&g(e);)t+=e.data.length;return t}function l(e){return function(t){return e===t}}function c(t){var n,i,s;return n=a(o(t)),i=r.findIndex(n,l(t),t),n=n.slice(0,i+1),s=r.reduce(n,function(e,t,r){return g(t)&&g(n[r-1])&&e++,e},0),n=r.filter(n,e.matchNodeNames(t.nodeName)),i=r.findIndex(n,l(t),t),i-s}function u(e){var t;return t=g(e)?"text()":e.nodeName.toLowerCase(),t+"["+c(e)+"]"}function d(e,t,n){var r=[];for(t=t.parentNode;t!=e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}function f(t,i){var o,a,l=[],c,f,h;return o=i.container(),a=i.offset(),g(o)?c=s(o,a):(f=o.childNodes,a>=f.length?(c="after",a=f.length-1):c="before",o=f[a]),l.push(u(o)),h=d(t,o),h=r.filter(h,n.negate(e.isBogus)),l=l.concat(r.map(h,function(e){return u(e)})),l.reverse().join("/")+","+c}function h(t,n,i){var o=a(t);return o=r.filter(o,function(e,t){return!g(e)||!g(o[t-1])}),o=r.filter(o,e.matchNodeNames(n)),o[i]}function p(e,t){for(var n=e,r=0,o;g(n);){if(o=n.data.length,t>=r&&r+o>=t){e=n,t-=r;break}if(!g(n.nextSibling)){e=n,t=o;break}r+=o,n=n.nextSibling}return t>e.data.length&&(t=e.data.length),new i(e,t)}function m(e,t){var n,o,a;return t?(n=t.split(","),t=n[0].split("/"),a=n.length>1?n[1]:"before",o=r.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),h(e,t[1],parseInt(t[2],10))):null},e),o?g(o)?p(o,parseInt(a,10)):(a="after"===a?y(o)+1:y(o),new i(o.parentNode,a)):null):null}var g=e.isText,v=e.isBogus,y=t.nodeIndex;return{create:f,resolve:m}}),r(j,[h,m,k,q,$,_],function(e,t,n,r,i,o){function a(a){var l=a.dom;this.getBookmark=function(e,c){function u(e,n){var r=0;return t.each(l.select(e),function(e){return"all"!==e.getAttribute("data-mce-bogus")?e==n?!1:void r++:void 0}),r}function d(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function f(e){function t(e,t){var r=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"],o=[],a,s,u=0;if(3==r.nodeType){if(c)for(a=r.previousSibling;a&&3==a.nodeType;a=a.previousSibling)i+=a.nodeValue.length;o.push(i)}else s=r.childNodes,i>=s.length&&s.length&&(u=1,i=Math.max(0,s.length-1)),o.push(l.nodeIndex(s[i],c)+u);for(;r&&r!=n;r=r.parentNode)o.push(l.nodeIndex(r,c));return o}var n=l.getRoot(),r={};return r.start=t(e,!0),a.isCollapsed()||(r.end=t(e)),r}function h(e){function t(e){var t;if(n.isCaretContainer(e)){if(o.isText(e)&&n.isCaretContainerBlock(e)&&(e=e.parentNode),t=e.previousSibling,s(t))return t;if(t=e.nextSibling,s(t))return t}}return t(e.startContainer)||t(e.endContainer)}var p,m,g,v,y,b,C="",x;if(2==e)return b=a.getNode(),y=b?b.nodeName:null,p=a.getRng(),s(b)||"IMG"==y?{name:y,index:u(y,b)}:a.tridentSel?a.tridentSel.getBookmark(e):(b=h(p),b?(y=b.tagName,{name:y,index:u(y,b)}):f(p));if(3==e)return p=a.getRng(),{start:r.create(l.getRoot(),i.fromRangeStart(p)),end:r.create(l.getRoot(),i.fromRangeEnd(p))};if(e)return{rng:a.getRng()};if(p=a.getRng(),g=l.uniqueId(),v=a.isCollapsed(),x="overflow:hidden;line-height:0px",p.duplicate||p.item){if(p.item)return b=p.item(0),y=b.nodeName,{name:y,index:u(y,b)};m=p.duplicate();try{p.collapse(),p.pasteHTML(''+C+""),v||(m.collapse(!1),p.moveToElementText(m.parentElement()),0===p.compareEndPoints("StartToEnd",m)&&m.move("character",-1),m.pasteHTML(''+C+""))}catch(w){return null}}else{if(b=a.getNode(),y=b.nodeName,"IMG"==y)return{name:y,index:u(y,b)};m=d(p.cloneRange()),v||(m.collapse(!1),m.insertNode(l.create("span",{"data-mce-type":"bookmark",id:g+"_end",style:x},C))),p=d(p),p.collapse(!0),p.insertNode(l.create("span",{"data-mce-type":"bookmark",id:g+"_start",style:x},C))}return a.moveToBookmark({id:g,keep:1}),{id:g}},this.moveToBookmark=function(n){function i(e){var t=n[e?"start":"end"],r,i,o,a;if(t){for(o=t[0],i=d,r=t.length-1;r>=1;r--){if(a=i.childNodes,t[r]>a.length-1)return;i=a[t[r]]}3===i.nodeType&&(o=Math.min(t[0],i.nodeValue.length)),1===i.nodeType&&(o=Math.min(t[0],i.childNodes.length)),e?u.setStart(i,o):u.setEnd(i,o)}return!0}function o(r){var i=l.get(n.id+"_"+r),o,a,s,c,u=n.keep;if(i&&(o=i.parentNode,"start"==r?(u?(o=i.firstChild,a=1):a=l.nodeIndex(i),f=h=o,p=m=a):(u?(o=i.firstChild,a=1):a=l.nodeIndex(i),h=o,m=a),!u)){for(c=i.previousSibling,s=i.nextSibling,t.each(t.grep(i.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});i=l.get(n.id+"_"+r);)l.remove(i,1);c&&s&&c.nodeType==s.nodeType&&3==c.nodeType&&!e.opera&&(a=c.nodeValue.length,c.appendData(s.nodeValue),l.remove(s),"start"==r?(f=h=c,p=m=a):(h=c,m=a))}}function s(t){return!l.isBlock(t)||t.innerHTML||e.ie||(t.innerHTML='
    '),t}function c(){var e,t;return e=l.createRng(),t=r.resolve(l.getRoot(),n.start),e.setStart(t.container(),t.offset()),t=r.resolve(l.getRoot(),n.end),e.setEnd(t.container(),t.offset()),e}var u,d,f,h,p,m;if(n)if(t.isArray(n.start)){if(u=l.createRng(),d=l.getRoot(),a.tridentSel)return a.tridentSel.moveToBookmark(n);i(!0)&&i()&&a.setRng(u)}else"string"==typeof n.start?a.setRng(c(n)):n.id?(o("start"),o("end"),f&&(u=l.createRng(),u.setStart(s(f),p),u.setEnd(s(h),m),a.setRng(u))):n.name?a.select(l.select(n.name)[n.index]):n.rng&&a.setRng(n.rng)}}var s=o.isContentEditableFalse;return a.isBookmarkNode=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},a}),r(Y,[y,O,F,T,j,_,h,m],function(e,n,r,i,o,a,s,l){function c(e,t,i,a){var s=this;s.dom=e,s.win=t,s.serializer=i,s.editor=a,s.bookmarkManager=new o(s),s.controlSelection=new r(s,a),s.win.getSelection||(s.tridentSel=new n(s))}var u=l.each,d=l.trim,f=s.ie;return c.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();e?(r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)):(n._moveEndPoint(r,n.editor.getBody(),!0),n.setRng(r))},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body"),o=n.getSel(),a,s,l;return e=e||{},a=s="",e.get=!0,e.format=e.format||"html",e.selection=!0,n.editor.fire("BeforeGetContent",e),"text"==e.format?n.isCollapsed()?"":r.text||(o.toString?o.toString():""):(r.cloneContents?(l=r.cloneContents(),l&&i.appendChild(l)):r.item!==t||r.htmlText!==t?(i.innerHTML="
    "+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=r.toString(),/^\s/.test(i.innerHTML)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='_',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('_'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(e){var t=this,n=t.getRng(),r,i,o,a;if(n.duplicate||n.item){if(n.item)return n.item(0);for(o=n.duplicate(),o.collapse(1),r=o.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),i=a=n.parentElement();a=a.parentNode;)if(a==r){r=i;break}return r}return r=n.startContainer,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[Math.min(r.childNodes.length-1,n.startOffset)])),r&&3==r.nodeType?r.parentNode:r},getEnd:function(e){var t=this,n=t.getRng(),r,i;return n.duplicate||n.item?n.item?n.item(0):(n=n.duplicate(),n.collapse(0),r=n.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),r&&"BODY"==r.nodeName?r.lastChild||r:r):(r=n.endContainer,i=n.endOffset,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[i>0?i-1:i])),r&&3==r.nodeType?r.parentNode:r)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),o;if(n.lastFocusBookmark=null,e){if(!t&&n.controlSelection.controlSelect(e))return;o=r.nodeIndex(e),i.setStart(e.parentNode,o),i.setEnd(e.parentNode,o+1),t&&(n._moveEndPoint(i,e,!0),n._moveEndPoint(i,e)),n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var n=this,r,i,o,a,s,l;if(!n.win)return null;if(a=n.win.document,!e&&n.lastFocusBookmark){var c=n.lastFocusBookmark;return c.startContainer?(i=a.createRange(),i.setStart(c.startContainer,c.startOffset),i.setEnd(c.endContainer,c.endOffset)):i=c,i}if(e&&n.tridentSel)return n.tridentSel.getRangeAt(0);try{(r=n.getSel())&&(i=r.rangeCount>0?r.getRangeAt(0):r.createRange?r.createRange():a.createRange())}catch(u){}if(l=n.editor.fire("GetSelectionRange",{range:i}),l.range!==i)return l.range;if(f&&i&&i.setStart&&a.selection){try{s=a.selection.createRange()}catch(u){}s&&s.item&&(o=s.item(0),i=a.createRange(),i.setStartBefore(o),i.setEndAfter(o))}return i||(i=a.createRange?a.createRange():a.body.createTextRange()),i.setStart&&9===i.startContainer.nodeType&&i.collapsed&&(o=n.dom.getRoot(),i.setStart(o,0),i.setEnd(o,0)),n.selectedRange&&n.explicitRange&&(0===t(i.START_TO_START,i,n.selectedRange)&&0===t(i.END_TO_END,i,n.selectedRange)?i=n.explicitRange:(n.selectedRange=null,n.explicitRange=null)),i},setRng:function(e,t){var n=this,r,i,o;if(e)if(e.select){n.explicitRange=null;try{e.select()}catch(a){}}else if(n.tridentSel){if(e.cloneRange)try{n.tridentSel.addRange(e)}catch(a){}}else{if(r=n.getSel(),o=n.editor.fire("SetSelectionRange",{range:e}),e=o.range,r){n.explicitRange=e;try{r.removeAllRanges(),r.addRange(e)}catch(a){}t===!1&&r.extend&&(r.collapse(e.endContainer,e.endOffset),r.extend(e.startContainer,e.startOffset)),n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}e.collapsed||e.startContainer!=e.endContainer||!r.setBaseAndExtent||s.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(i=e.startContainer.childNodes[e.startOffset],i&&"IMG"==i.tagName&&n.getSel().setBaseAndExtent(i,0,i,1))}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i,o,a,s,l=t.dom.getRoot();return n?(i=n.startContainer,o=n.endContainer,a=n.startOffset,s=n.endOffset,n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):(r=n.item?n.item(0):n.parentElement(),r.ownerDocument!==t.win.document&&(r=l),r)):l},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a,s=[];if(a=i.getRoot(),t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&t!=a&&s.push(t),t&&n&&t!=n){o=t;for(var l=new e(t,a);(o=l.next())&&o!=n;)i.isBlock(o)&&s.push(o)}return n&&t!=n&&n!=a&&s.push(n),s},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0):!0},normalize:function(){var e=this,t=e.getRng();return s.range&&new i(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n=this,r;return n.selectorChangedData||(n.selectorChangedData={},r={},n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,o=i.getParents(t,null,i.getRoot()),a={};u(n.selectorChangedData,function(e,t){u(o,function(n){return i.is(n,t)?(r[t]||(u(e,function(e){e(!0,{node:n,selector:t,parents:o})}),r[t]=e),a[t]=e,!1):void 0})}),u(r,function(e,n){a[n]||(delete r[n],u(e,function(e){e(!1,{node:t,selector:n,parents:o})}))})})),n.selectorChangedData[e]||(n.selectorChangedData[e]=[]),n.selectorChangedData[e].push(t),n},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){function n(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var r,i,o=this,s=o.dom,l=s.getRoot(),c,u,d=0;if(a.isElement(e)){if(t===!1&&(d=e.offsetHeight),"BODY"!=l.nodeName){var f=o.getScrollContainer();if(f)return r=n(e).y-n(f).y+d,u=f.clientHeight,c=f.scrollTop,void((c>r||r+25>c+u)&&(f.scrollTop=c>r?r:r-u+25))}i=s.getViewPort(o.editor.getWin()),r=s.getPos(e).y+d,c=i.y,u=i.h,(rc+u)&&o.editor.getWin().scrollTo(0,c>r?r:r-u+25)}},placeCaretAt:function(e,t){this.setRng(i.getCaretRangeFromPoint(e,t,this.editor.getDoc()))},_moveEndPoint:function(t,n,r){var i=n,o=new e(n,i),a=this.dom.schema.getNonEmptyElements();do{if(3==n.nodeType&&0!==d(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));if(s.ie&&s.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?o.next():o.prev());"BODY"==i.nodeName&&(r?t.setStart(i,0):t.setEnd(i,i.childNodes.length))},destroy:function(){this.win=null,this.controlSelection.destroy()}},c}),r(X,[j,m],function(e,t){function n(t){this.compare=function(n,i){function o(e){var n={};return r(t.getAttribs(e),function(r){var i=r.nodeName.toLowerCase();0!==i.indexOf("_")&&"style"!==i&&"data-mce-style"!==i&&(n[i]=t.getAttrib(e,i))}),n}function a(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(n=t[r],"undefined"==typeof n)return!1;if(e[r]!=n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0}return n.nodeName!=i.nodeName?!1:a(o(n),o(i))&&a(t.parseStyle(t.getAttrib(n,"style")),t.parseStyle(t.getAttrib(i,"style")))?!e.isBookmarkNode(n)&&!e.isBookmarkNode(i):!1}}var r=t.each;return n}),r(K,[m],function(e){function t(e,t){function r(e){return e.replace(/%(\w+)/g,"")}var i,o,a=e.dom,s="",l,c;if(c=e.settings.preview_styles,c===!1)return"";if(c||(c="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof t){if(t=e.formatter.get(t),!t)return;t=t[0]}return i=t.block||t.inline||"span",o=a.create(i),n(t.styles,function(e,t){e=r(e),e&&a.setStyle(o,t,e)}),n(t.attributes,function(e,t){e=r(e),e&&a.setAttrib(o,t,e)}),n(t.classes,function(e){e=r(e),a.hasClass(o,e)||a.addClass(o,e)}),e.fire("PreviewFormats"),a.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),l=a.getStyle(e.getBody(),"fontSize",!0),l=/px$/.test(l)?parseInt(l,10):0,n(c.split(" "),function(t){var n=a.getStyle(o,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=a.getStyle(e.getBody(),t,!0),"#ffffff"==a.toHex(n).toLowerCase())||"color"==t&&"#000000"==a.toHex(n).toLowerCase())){if("font-size"==t&&/em|%$/.test(n)){if(0===l)return;n=parseFloat(n,10)/(/%$/.test(n)?100:1),n=n*l+"px"}"border"==t&&n&&(s+="padding:0 2px;"),s+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),a.remove(o),s}var n=e.each;return{getCssText:t}}),r(G,[p,_,g],function(e,t,n){function r(e,t){var n=o[e];n||(o[e]=n=[]),o[e].push(t)}function i(e,t){s(o[e],function(e){e(t)})}var o=[],a=e.filter,s=e.each;return r("pre",function(r){function i(t){return c(t.previousSibling)&&-1!=e.indexOf(u,t.previousSibling)}function o(e,t){n(t).remove(),n(e).append("

    ").append(t.childNodes)}var l=r.selection.getRng(),c,u;c=t.matchNodeNames("pre"),l.collapsed||(u=r.selection.getSelectedBlocks(),s(a(a(u,c),i),function(e){o(e.previousSibling,e)}))}),{postProcess:i}}),r(J,[y,T,j,X,m,K,G],function(e,t,n,r,i,o,a){return function(s){function l(e){return e.nodeType&&(e=e.nodeName),!!s.schema.getTextBlockElements()[e.toLowerCase()]}function c(e){return/^(TH|TD)$/.test(e.nodeName)}function u(e){return e&&/^(IMG)$/.test(e.nodeName)}function d(e,t){return Y.getParents(e,t,Y.getRoot())}function f(e){return 1===e.nodeType&&"_mce_caret"===e.id}function h(){g({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},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,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(e,t,n){ue(n,function(t,n){Y.setAttrib(e,n,t)})}},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}]}),ue("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){g(e,{block:e,remove:"all"})}),g(s.settings.formats)}function p(){s.addShortcut("meta+b","bold_desc","Bold"),s.addShortcut("meta+i","italic_desc","Italic"),s.addShortcut("meta+u","underline_desc","Underline");for(var e=1;6>=e;e++)s.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);s.addShortcut("access+7","",["FormatBlock",!1,"p"]),s.addShortcut("access+8","",["FormatBlock",!1,"div"]),s.addShortcut("access+9","",["FormatBlock",!1,"address"])}function m(e){return e?j[e]:j}function g(e,t){e&&("string"!=typeof e?ue(e,function(e,t){g(t,e)}):(t=t.length?t:[t],ue(t,function(e){e.deep===oe&&(e.deep=!e.selector),e.split===oe&&(e.split=!e.selector||e.inline),e.remove===oe&&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+/))}),j[e]=t))}function v(e){return e&&j[e]&&delete j[e],j}function y(e,t){var n=m(t);if(n)for(var r=0;r0)return r;if(r.childNodes.length>1||r==t||"BR"==r.tagName)return r}}var n=s.selection.getRng(),i=n.startContainer,o=n.endContainer;if(i!=o&&0===n.endOffset){var a=t(i,o),l=3==a.nodeType?a.data.length:a.childNodes.length;n.setEnd(a,l)}return n}function c(e,r,o){var a=[],s,c,h=!0;s=d.inline||d.block,c=Y.create(s),i(c),K.walk(e,function(e){function r(e){var m,v,y,b,C;return C=h,m=e.nodeName.toLowerCase(),v=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&ae(e)&&(C=h,h="true"===ae(e),b=!0),B(m,"br")?(p=0,void(d.block&&Y.remove(e))):d.wrapper&&N(e,t,n)?void(p=0):h&&!b&&d.block&&!d.wrapper&&l(m)&&G(v,s)?(e=Y.rename(e,s),i(e),a.push(e),void(p=0)):d.selector&&(ue(u,function(t){return"collapsed"in t&&t.collapsed!==g?void 0:Y.is(e,t.selector)&&!f(e)?(i(e,t),y=!0,!1):void 0}),!d.inline||y)?void(p=0):void(!h||b||!G(s,m)||!G(v,s)||!o&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||f(e)||d.inline&&J(e)?(p=0,ue(de(e.childNodes),r),b&&(h=C),p=0):(p||(p=Y.clone(c,ne),e.parentNode.insertBefore(p,e),a.push(p)),p.appendChild(e)))}var p;ue(e,r)}),d.links===!0&&ue(a,function(e){function t(e){"A"===e.nodeName&&i(e,d),ue(de(e.childNodes),t)}t(e)}),ue(a,function(e){function r(e){var t=0;return ue(e.childNodes,function(e){P(e)||ce(e)||t++}),t}function o(e){var t,n;return ue(e.childNodes,function(e){return 1!=e.nodeType||ce(e)||f(e)?void 0:(t=e,ne)}),t&&!ce(t)&&A(t,d)&&(n=Y.clone(t,ne),i(n),Y.replace(n,e,re),Y.remove(t,1)),n||e}var s;if(s=r(e),(a.length>1||!J(e))&&0===s)return void Y.remove(e,1);if(d.inline||d.wrapper){if(d.exact||1!==s||(e=o(e)),ue(u,function(t){ue(Y.select(t.inline,e),function(e){ce(e)||F(t,n,e,t.exact?e:null)})}),N(e.parentNode,t,n))return Y.remove(e,1),e=0,re;d.merge_with_parents&&Y.getParent(e.parentNode,function(r){return N(r,t,n)?(Y.remove(e,1),e=0,re):void 0}),e&&d.merge_siblings!==!1&&(e=V(W(e),e),e=V(e,W(e,re)))}})}var u=m(t),d=u[0],h,p,g=!r&&X.isCollapsed();if("false"!==ae(X.getNode())){if(d){if(r)r.nodeType?(p=Y.createRng(),p.setStartBefore(r),p.setEndAfter(r),c(O(p,u),null,!0)):c(r,null,!0);else if(g&&d.inline&&!Y.select("td[data-mce-selected],th[data-mce-selected]").length)$("apply",t,n);else{var v=s.selection.getNode();Q||!u[0].defaultBlock||Y.getParent(v,Y.isBlock)||x(u[0].defaultBlock),s.selection.setRng(o()),h=X.getBookmark(),c(O(X.getRng(re),u),h),d.styles&&(d.styles.color||d.styles.textDecoration)&&(fe(v,C,"childNodes"),C(v)),X.moveToBookmark(h),q(X.getRng(re)),s.nodeChanged()}a.postProcess(t,s)}}else{r=X.getNode();for(var y=0,b=u.length;b>y;y++)if(u[y].ceFalseOverride&&Y.is(r,u[y].selector))return void i(r,u[y])}}function w(e,t,n,r){function i(e){var n,r,o,a,s;if(1===e.nodeType&&ae(e)&&(a=y,y="true"===ae(e),s=!0),n=de(e.childNodes),y&&!s)for(r=0,o=h.length;o>r&&!F(h[r],t,e,e);r++);if(p.deep&&n.length){for(r=0,o=n.length;o>r;r++)i(n[r]);s&&(y=a)}}function o(n){var i;return ue(d(n.parentNode).reverse(),function(n){var o;i||"_start"==n.id||"_end"==n.id||(o=N(n,e,t,r),o&&o.split!==!1&&(i=n))}),i}function a(e,n,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=n.parentNode;o&&o!=u;o=o.parentNode){for(a=Y.clone(o,ne),c=0;cC&&(!h[C].ceFalseOverride||!F(h[C],t,n,n));C++);}}function E(e,t,n){var r=m(e);!_(e,t,n)||"toggle"in r[0]&&!r[0].toggle?x(e,t,n):w(e,t,n)}function N(e,t,n,r){function i(e,t,i){var o,a,s=t[i],l;if(t.onmatch)return t.onmatch(e,t,i);if(s)if(s.length===oe){for(o in s)if(s.hasOwnProperty(o)){if(a="attributes"===i?Y.getAttrib(e,o):D(e,o),r&&!a&&!t.exact)return;if((!r||t.exact)&&!B(a,M(L(s[o],n),o)))return}}else for(l=0;l=0;o--){if(a=t[o].selector,!a||t[o].defaultBlock)return re;for(i=r.length-1;i>=0;i--)if(Y.is(r[i],a))return re}return ne}function T(e,t,n){var r;return ie||(ie={},r={},s.on("NodeChange",function(e){var t=d(e.element),n={};t=i.grep(t,function(e){return 1==e.nodeType&&!e.getAttribute("data-mce-bogus")}),ue(ie,function(e,i){ue(t,function(o){return N(o,i,{},e.similar)?(r[i]||(ue(e,function(e){e(!0,{node:o,format:i,parents:t})}),r[i]=e),n[i]=e,!1):y(o,i)?!1:void 0})}),ue(r,function(i,o){n[o]||(delete r[o],ue(i,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),ue(e.split(","),function(e){ie[e]||(ie[e]=[],ie[e].similar=n),ie[e].push(t)}),this}function R(e){return o.getCssText(s,e)}function A(e,t){return B(e,t.inline)?re:B(e,t.block)?re:t.selector?1==e.nodeType&&Y.is(e,t.selector):void 0}function B(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function D(e,t){return M(Y.getStyle(e,t),t)}function M(e,t){return"color"!=t&&"backgroundColor"!=t||(e=Y.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function L(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function P(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function H(e,t,n){var r=Y.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function O(t,n,r){function i(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var r,i,o,a,s;if(r=i=e?g:y,a=e?"previousSibling":"nextSibling",s=Y.getRoot(),3==r.nodeType&&!P(r)&&(e?v>0:bo?n:o,-1===n||r||n++):(n=a.indexOf(" ",t),o=a.indexOf("\xa0",t),n=-1!==n&&(-1===o||o>n)?n:o),n}var a,l,c,u;if(3===t.nodeType){if(c=o(t,n),-1!==c)return{container:t,offset:c};u=t}for(a=new e(t,Y.getParent(t,J)||s.getBody());l=a[i?"prev":"next"]();)if(3===l.nodeType){if(u=l,c=o(l),-1!==c)return{container:l,offset:c}}else if(J(l))break;return u?(n=i?0:u.length,{container:u,offset:n}):void 0}function u(e,r){var i,o,a,s;for(3==e.nodeType&&0===e.nodeValue.length&&e[r]&&(e=e[r]),i=d(e),o=0;oh?h:v],3==g.nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(h=y.childNodes.length-1,y=y.childNodes[b>h?h:b-1],3==y.nodeType&&(b=y.nodeValue.length)),g=a(g),y=a(y),(ce(g.parentNode)||ce(g))&&(g=ce(g)?g:g.parentNode,g=g.nextSibling||g,3==g.nodeType&&(v=0)),(ce(y.parentNode)||ce(y))&&(y=ce(y)?y:y.parentNode,y=y.previousSibling||y,3==y.nodeType&&(b=y.length)),n[0].inline&&(t.collapsed&&(m=c(g,v,!0),m&&(g=m.container,v=m.offset),m=c(y,b),m&&(y=m.container,b=m.offset)),p=o(y,b),p.node)){for(;p.node&&0===p.offset&&p.node.previousSibling;)p=o(p.node.previousSibling);p.node&&p.offset>0&&3===p.node.nodeType&&" "===p.node.nodeValue.charAt(p.offset-1)&&p.offset>1&&(y=p.node,y.splitText(p.offset-1))}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=i(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=i())),n[0].selector&&n[0].expand!==ne&&!n[0].inline&&(g=u(g,"previousSibling"),y=u(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=f(g,"previousSibling"),y=f(y,"nextSibling"),n[0].block&&(J(g)||(g=i(!0)),J(y)||(y=i()))),1==g.nodeType&&(v=Z(g),g=g.parentNode),1==y.nodeType&&(b=Z(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function I(e,t){return t.links&&"A"==e.tagName}function F(e,t,n,r){var i,o,a;if(!A(n,e)&&!I(n,e))return ne;if("all"!=e.remove)for(ue(e.styles,function(i,o){i=M(L(i,t),o),"number"==typeof o&&(o=i,r=0),(e.remove_similar||!r||B(D(r,o),i))&&Y.setStyle(n,o,""),a=1}),a&&""===Y.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),ue(e.attributes,function(e,i){var o;if(e=L(e,t),"number"==typeof i&&(i=e,r=0),!r||B(Y.getAttrib(r,i),e)){if("class"==i&&(e=Y.getAttrib(n,i),e&&(o="",ue(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(o+=(o?" ":"")+e)}),o)))return void Y.setAttrib(n,i,o);"class"==i&&n.removeAttribute("className"),te.test(i)&&n.removeAttribute("data-mce-"+i),n.removeAttribute(i)}}),ue(e.classes,function(e){e=L(e,t),r&&!Y.hasClass(r,e)||Y.removeClass(n,e)}),o=Y.getAttribs(n),i=0;io?o:i]),3===r.nodeType&&n&&i>=r.nodeValue.length&&(r=new e(r,s.getBody()).next()||r),3!==r.nodeType||n||0!==i||(r=new e(r,s.getBody()).prev()||r),r}function $(t,n,r,i){function o(e){var t=Y.create("span",{id:g,"data-mce-bogus":!0,style:v?"color:red":""});return e&&t.appendChild(s.getDoc().createTextNode(ee)),t}function a(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==ee||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function c(e){for(;e;){if(e.id===g)return e;e=e.parentNode}}function u(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function d(e,t){var n,r;if(e)r=X.getRng(!0),a(e)?(t!==!1&&(r.setStartBefore(e),r.setEndBefore(e)),Y.remove(e)):(n=u(e),n.nodeValue.charAt(0)===ee&&(n.deleteData(0,1),r.startContainer==n&&r.startOffset>0&&r.setStart(n,r.startOffset-1),r.endContainer==n&&r.endOffset>0&&r.setEnd(n,r.endOffset-1)),Y.remove(e,1)),X.setRng(r);else if(e=c(X.getStart()),!e)for(;e=Y.get(g);)d(e,!1)}function f(){var e,t,i,a,s,l,d;e=X.getRng(!0),a=e.startOffset,l=e.startContainer,d=l.nodeValue,t=c(X.getStart()),t&&(i=u(t)),d&&a>0&&a=0;h--)u.appendChild(Y.clone(f[h],!1)),u=u.firstChild;u.appendChild(Y.doc.createTextNode(ee)),u=u.firstChild;var g=Y.getParent(d,l);g&&Y.isEmpty(g)?d.parentNode.replaceChild(p,d):Y.insertAfter(p,d),X.setCursorLocation(u,1),Y.isEmpty(d)&&Y.remove(d)}}function p(){var e;e=c(X.getStart()),e&&!Y.isEmpty(e)&&fe(e,function(e){1!=e.nodeType||e.id===g||Y.isEmpty(e)||Y.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var g="_mce_caret",v=s.settings.caret_debug;s._hasCaretEvents||(le=function(){var e=[],t;if(a(c(X.getStart()),e))for(t=e.length;t--;)Y.setAttrib(e[t],"data-mce-bogus","1")},se=function(e){var t=e.keyCode;d(),8==t&&X.isCollapsed()&&X.getStart().innerHTML==ee&&d(c(X.getStart())),37!=t&&39!=t||d(c(X.getStart())),p()},s.on("SetContent",function(e){e.selection&&p()}),s._hasCaretEvents=!0),"apply"==t?f():h()}function q(t){var n=t.startContainer,r=t.startOffset,i,o,a,s,l;if((t.startContainer!=t.endContainer||!u(t.startContainer.childNodes[t.startOffset]))&&(3==n.nodeType&&r>=n.nodeValue.length&&(r=Z(n),n=n.parentNode,i=!0),1==n.nodeType))for(s=n.childNodes,n=s[Math.min(r,s.length-1)],o=new e(n,Y.getParent(n,Y.isBlock)),(r>s.length-1||i)&&o.next(),a=o.current();a;a=o.next())if(3==a.nodeType&&!P(a))return l=Y.create("a",{"data-mce-bogus":"all"},ee),a.parentNode.insertBefore(l,a),t.setStart(a,0),X.setRng(t),void Y.remove(l)}var j={},Y=s.dom,X=s.selection,K=new t(Y),G=s.schema.isValidChild,J=Y.isBlock,Q=s.settings.forced_root_block,Z=Y.nodeIndex,ee="\ufeff",te=/^(src|href|style)$/,ne=!1,re=!0,ie,oe,ae=Y.getContentEditable,se,le,ce=n.isBookmarkNode,ue=i.each,de=i.grep,fe=i.walk,he=i.extend;he(this,{get:m,register:g,unregister:v,apply:x,remove:w,toggle:E,match:_,matchAll:S,matchNode:N,canApply:k,formatChanged:T,getCssText:R}),h(),p(),s.on("BeforeGetContent",function(e){le&&"raw"!=e.format&&le()}),s.on("mouseup keydown",function(e){se&&se(e)})}}),r(Q,[I,h],function(e,t){return function(e){function n(){return e.serializer.getTrimmedContent()}function r(t){e.setDirty(t)}function i(e){o.typing=!1,o.add({},e)}var o=this,a=0,s=[],l,c,u=0;return e.on("init",function(){o.add()}),e.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&o.beforeChange()}),e.on("ExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&i(e)}),e.on("ObjectResizeStart Cut",function(){o.beforeChange()}),e.on("SaveContent ObjectResized blur",i),e.on("DragEnd",i),e.on("KeyUp",function(a){var l=a.keyCode;a.isDefaultPrevented()||((l>=33&&36>=l||l>=37&&40>=l||45==l||13==l||a.ctrlKey)&&(i(),e.nodeChanged()),(46==l||8==l||t.mac&&(91==l||93==l))&&e.nodeChanged(),c&&o.typing&&(e.isDirty()||(r(s[0]&&n()!=s[0].content),e.isDirty()&&e.fire("change",{level:s[0],lastLevel:null})),e.fire("TypingUndo"),c=!1,e.nodeChanged()))}),e.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented()){if(t>=33&&36>=t||t>=37&&40>=t||45==t)return void(o.typing&&i(e));var n=e.ctrlKey&&!e.altKey||e.metaKey;!(16>t||t>20)||224==t||91==t||o.typing||n||(o.beforeChange(),o.typing=!0,o.add({},e),c=!0)}}),e.on("MouseDown",function(e){o.typing&&i(e)}),e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()}),o={data:s,typing:!1,beforeChange:function(){u||(l=e.selection.getBookmark(2,!0))},add:function(t,i){var o,c=e.settings,d;if(t=t||{},t.content=n(),u||e.removed)return null;if(d=s[a],e.fire("BeforeAddUndo",{level:t,lastLevel:d,originalEvent:i}).isDefaultPrevented())return null;if(d&&d.content==t.content)return null;if(s[a]&&(s[a].beforeBookmark=l),c.custom_undo_redo_levels&&s.length>c.custom_undo_redo_levels){for(o=0;o0&&(r(!0),e.fire("change",f)),t},undo:function(){var t;return o.typing&&(o.add(),o.typing=!1),a>0&&(t=s[--a],e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(t.beforeBookmark),r(!0),e.fire("undo",{level:t})),t},redo:function(){var t;return a0||o.typing&&s[0]&&n()!=s[0].content},hasRedo:function(){return aP)&&(u=a.create("br"),t.parentNode.insertBefore(u,t)),l.setStartBefore(t),l.setEndBefore(t)):(l.setStartAfter(t),l.setEndAfter(t)):(l.setStart(t,0),l.setEnd(t,0));s.setRng(l),a.remove(u),s.scrollIntoView(t)}}function y(e){var t=l.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&a.setAttribs(e,l.forced_root_block_attrs)}function b(e){e.innerHTML=r?"":'
    '}function C(e){var t=D,n,i,o,s=u.getTextInlineElements();if(e||"TABLE"==z?(n=a.create(e||V),y(n)):n=L.cloneNode(!1),o=n,l.keep_styles!==!1)do if(s[t.nodeName]){if("_mce_caret"==t.id)continue;i=t.cloneNode(!1),a.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(o=i,n.appendChild(i))}while((t=t.parentNode)&&t!=B);return r||(o.innerHTML='
    '),n}function x(t){var n,r,i;if(3==D.nodeType&&(t?M>0:MD.childNodes.length-1,D=D.childNodes[Math.min(M,D.childNodes.length-1)]||D,M=U&&3==D.nodeType?D.nodeValue.length:0),B=S(D)){if(c.beforeChange(),!a.isBlock(B)&&B!=a.getRoot())return void(V&&!H||N());if((V&&!H||!V&&H)&&(D=w(D,M)),L=a.getParent(D,a.isBlock),F=L?a.getParent(L.parentNode,a.isBlock):null,z=L?L.nodeName.toUpperCase():"",W=F?F.nodeName.toUpperCase():"","LI"!=W||o.ctrlKey||(L=F,z=W),/^(LI|DT|DD)$/.test(z)){if(!V&&H)return void N();if(a.isEmpty(L))return void E()}if("PRE"==z&&l.br_in_pre!==!1){if(!H)return void N()}else if(!V&&!H&&"LI"!=z||V&&H)return void N();V&&L===i.getBody()||(V=V||"P",x()?T():x(!0)?(O=L.parentNode.insertBefore(C(),L),m(O),v(L)):(A=R.cloneRange(),A.setEndAfter(L),I=A.extractContents(),_(I),O=I.firstChild,a.insertAfter(I,L),g(O),k(L),a.isEmpty(L)&&b(L),O.normalize(),a.isEmpty(O)?(a.remove(O),T()):v(O)),a.setAttrib(O,"id",""),i.fire("NewBlock",{newBlock:O}),c.add())}}}var a=i.dom,s=i.selection,l=i.settings,c=i.undoManager,u=i.schema,d=u.getNonEmptyElements(),f=u.getMoveCaretBeforeOnEnterElements();i.on("keydown",function(e){13==e.keyCode&&o(e)!==!1&&e.preventDefault()})}}),r(ee,[],function(){return function(e){function t(){var t=i.getStart(),s=e.getBody(),l,c,u,d,f,h,p,m=-16777215,g,v,y,b,C;if(C=n.forced_root_block,t&&1===t.nodeType&&C){for(;t&&t!=s;){if(a[t.nodeName])return;t=t.parentNode}if(l=i.getRng(),l.setStart){c=l.startContainer,u=l.startOffset,d=l.endContainer,f=l.endOffset;try{v=e.getDoc().activeElement===s}catch(x){}}else l.item&&(t=l.item(0),l=e.getDoc().body.createTextRange(),l.moveToElementText(t)),v=l.parentElement().ownerDocument===e.getDoc(),y=l.duplicate(),y.collapse(!0),u=-1*y.move("character",m),y.collapsed||(y=l.duplicate(),y.collapse(!1),f=-1*y.move("character",m)-u);for(t=s.firstChild,b=s.nodeName.toLowerCase();t;)if((3===t.nodeType||1==t.nodeType&&!a[t.nodeName])&&o.isValidChild(b,C.toLowerCase())){if(3===t.nodeType&&0===t.nodeValue.length){p=t,t=t.nextSibling,r.remove(p);continue}h||(h=r.create(C,e.settings.forced_root_block_attrs),t.parentNode.insertBefore(h,t),g=!0),p=t,t=t.nextSibling,h.appendChild(p)}else h=null,t=t.nextSibling;if(g&&v){if(l.setStart)l.setStart(c,u),l.setEnd(d,f),i.setRng(l);else try{l=e.getDoc().body.createTextRange(),l.moveToElementText(s),l.collapse(!0),l.moveStart("character",u),f>0&&l.moveEnd("character",f),l.select()}catch(x){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),r(te,[z,y,_,$,k,W],function(e,t,n,r,i,o){function a(e){return e>0}function s(e){return 0>e}function l(e,n,r,i,o){var l=new t(e,i);if(s(n)){if(C(e)&&(e=l.prev(!0),r(e)))return e;for(;e=l.prev(o);)if(r(e))return e}if(a(n)){if(C(e)&&(e=l.next(!0),r(e)))return e;for(;e=l.next(o);)if(r(e))return e}return null}function c(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode)if(b(e))return e;return t}function u(e,t){for(;e&&e!=t;){if(x(e))return e;e=e.parentNode}return null}function d(e,t,n){return u(e.container(),n)==u(t.container(),n)}function f(e,t,n){return c(e.container(),n)==c(t.container(),n)}function h(e,t){var n,r;return t?(n=t.container(),r=t.offset(),N(n)?n.childNodes[r+e]:null):null}function p(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function m(e,t,n){return u(t,e)==u(n,e)}function g(e,t,n){var r,i;for(i=e?"previousSibling":"nextSibling";n&&n!=t;){if(r=n[i],w(r)&&(r=r[i]),C(r)){if(m(t,r,n))return r;break}if(_(r))break;n=n.parentNode}return null}function v(e,t,r){var o,a,s,l,c=E(g,!0,t),u=E(g,!1,t);if(a=r.startContainer,s=r.startOffset,i.isCaretContainerBlock(a)){if(N(a)||(a=a.parentNode),l=a.getAttribute("data-mce-caret"),"before"==l&&(o=a.nextSibling,C(o)))return S(o);if("after"==l&&(o=a.previousSibling,C(o)))return k(o)}if(!r.collapsed)return r;if(n.isText(a)){if(w(a)){if(1===e){if(o=u(a))return S(o);if(o=c(a))return k(o)}if(-1===e){if(o=c(a))return k(o);if(o=u(a))return S(o)}return r}if(i.endsWithCaretContainer(a)&&s>=a.data.length-1)return 1===e&&(o=u(a))?S(o):r;if(i.startsWithCaretContainer(a)&&1>=s)return-1===e&&(o=c(a))?k(o):r;if(s===a.data.length)return o=u(a),o?S(o):r;if(0===s)return o=c(a),o?k(o):r}return r}function y(e,t){return C(h(e,t))}var b=n.isContentEditableTrue,C=n.isContentEditableFalse,x=n.matchStyleValues("display","block table table-cell table-caption"),w=i.isCaretContainer,E=e.curry,N=n.isElement,_=o.isCaretCandidate,S=E(p,!0),k=E(p,!1);return{isForwards:a,isBackwards:s,findNode:l,getEditingHost:c,getParentBlock:u,isInSameBlock:d,isInSameEditingHost:f,isBeforeContentEditableFalse:E(y,0),isAfterContentEditableFalse:E(y,-1),normalizeRange:v}}),r(ne,[_,W,$,te,p,z],function(e,t,n,r,i,o){function a(e,t){for(var n=[];e&&e!=t;)n.push(e),e=e.parentNode;return n}function s(e,t){return e.hasChildNodes()&&t0)return n(y,--b);if(h(e)&&b0&&(x=s(y,b-1),m(x)))return!g(x)&&(w=r.findNode(x,e,v,x))?d(w)?n(w,w.data.length):n.after(w):d(x)?n(x,x.data.length):n.before(x);if(h(e)&&b=1&&7>=n&&(i=p(O.font_size_style_values),r=p(O.font_size_classes),n=r?r[n-1]||n:i[n-1]||n),A(e,n)},RemoveFormat:function(e){P.remove(e)},mceBlockQuote:function(){A("blockquote")},FormatBlock:function(e,t,n){return A(n||"p")},mceCleanup:function(){var e=L.getBookmark();r.setContent(r.getContent({cleanup:v}),{cleanup:v}),L.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var i=n||L.getNode();i!=r.getBody()&&(B(),r.dom.remove(i,v),D())},mceSelectNodeDepth:function(e,t,n){var i=0;M.getParent(L.getNode(),function(e){return 1==e.nodeType&&i++==n?(L.select(e),y):void 0},r.getBody())},mceSelectNode:function(e,t,n){L.select(n)},mceInsertContent:function(t,n,o){function a(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=L.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^ /," "):t("previousSibling")||(e=e.replace(/^ /," ")),i|)$/," "):t("nextSibling")||(e=e.replace(/( | )(
    |)$/," "))),e}function c(){var e,t,n;e=L.getRng(!0),t=e.startContainer,n=e.startOffset,3==t.nodeType&&e.collapsed&&("\xa0"===t.data[n]?(t.deleteData(n,1),/[\u00a0| ]$/.test(o)||(o+=" ")):"\xa0"===t.data[n-1]&&(t.deleteData(n-1,1),/[\u00a0| ]$/.test(o)||(o=" "+o)))}function d(e){if(T)for(_=e.firstChild;_;_=_.walk(!0))A[_.name]&&_.attr("data-mce-new","true")}function f(){if(T){var e=r.getBody(),t=new i(M);u(M.select("*[data-mce-new]"),function(n){n.removeAttribute("data-mce-new");for(var r=n.parentNode;r&&r!=e;r=r.parentNode)t.compare(r,n)&&M.remove(n,!0)})}}function h(e){return e&&!r.schema.getShortEndedElements()[e.nodeName]}function p(e){function t(e){for(var t=r.getBody();e&&e!==t;e=e.parentNode)if("false"===r.dom.getContentEditable(e))return e;return null}function n(e){var t=l.fromRangeStart(e),n=new s(r.getBody());return t=n.next(t),t?t.toRange():void 0}var i,o,a;if(e){if(L.scrollIntoView(e),i=t(e))return M.remove(e),void L.select(i);N=M.createRng(),_=e.previousSibling,_&&3==_.nodeType?(N.setStart(_,_.nodeValue.length),m||(S=e.nextSibling,S&&3==S.nodeType&&(_.appendData(S.data),S.parentNode.removeChild(S)))):(N.setStartBefore(e),N.setEndBefore(e)),o=M.getParent(e,M.isBlock),M.remove(e),o&&M.isEmpty(o)&&(r.$(o).empty(),N.setStart(o,0),N.setEnd(o,0), -!b(o)&&(a=n(N))?(N=a,M.remove(o)):M.add(o,M.create("br",{"data-mce-bogus":"1"}))),L.setRng(N)}}var g,v,y,C,x,w,E,N,_,S,k,T,R,A=r.schema.getTextInlineElements();"string"!=typeof o&&(T=o.merge,R=o.data,o=o.content),/^ | $/.test(o)&&(o=a(o)),g=r.parser,v=new e({validate:O.validate},r.schema),k='​',w={content:o,format:"html",selection:!0},r.fire("BeforeSetContent",w),o=w.content,-1==o.indexOf("{$caret}")&&(o+="{$caret}"),o=o.replace(/\{\$caret\}/,k),N=L.getRng();var B=N.startContainer||(N.parentElement?N.parentElement():null),D=r.getBody();B===D&&L.isCollapsed()&&M.isBlock(D.firstChild)&&h(D.firstChild)&&M.isEmpty(D.firstChild)&&(N=M.createRng(),N.setStart(D.firstChild,0),N.setEnd(D.firstChild,0),L.setRng(N)),L.isCollapsed()||(r.selection.setRng(r.selection.getRng()),r.getDoc().execCommand("Delete",!1,null),c()),y=L.getNode();var P={context:y.nodeName.toLowerCase(),data:R};if(x=g.parse(o,P),d(x),_=x.lastChild,"mce_marker"==_.attr("id"))for(E=_,_=_.prev;_;_=_.walk(!0))if(3==_.type||!M.isBlock(_.name)){r.schema.isValidChild(_.parent.name,"span")&&_.parent.insert(E,_,"br"===_.name);break}if(r._selectionOverrides.showBlockCaretContainer(y),P.invalid){for(L.setContent(k),y=L.getNode(),C=r.getBody(),9==y.nodeType?y=_=C:_=y;_!==C;)y=_,_=_.parentNode;o=y==C?C.innerHTML:M.getOuterHTML(y),o=v.serialize(g.parse(o.replace(//i,function(){return v.serialize(x)}))),y==C?M.setHTML(C,o):M.setOuterHTML(y,o)}else o=v.serialize(x),_=y.firstChild,S=y.lastChild,!_||_===S&&"BR"===_.nodeName?M.setHTML(y,o):L.setContent(o);f(),p(M.get("mce_marker")),r.fire("SetContent",w),r.addVisual()},mceInsertRawHTML:function(e,t,n){L.setContent("tiny_mce_marker"),r.setContent(r.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){A(n)},mceSetContent:function(e,t,n){r.setContent(n)},"Indent,Outdent":function(e){var t,n,i;t=O.indentation,n=/[a-z%]+$/i.exec(t),t=parseInt(t,10),C("InsertUnorderedList")||C("InsertOrderedList")?T(e):(O.forced_root_block||M.getParent(L.getNode(),M.isBlock)||P.apply("div"),u(L.getSelectedBlocks(),function(o){if("false"!==M.getContentEditable(o)&&"LI"!=o.nodeName){var a=r.getParam("indent_use_margin",!1)?"margin":"padding";a+="rtl"==M.getStyle(o,"direction",!0)?"Right":"Left","outdent"==e?(i=Math.max(0,parseInt(o.style[a]||0,10)-t),M.setStyle(o,a,i?i+n:"")):(i=parseInt(o.style[a]||0,10)+t+n,M.setStyle(o,a,i))}}))},mceRepaint:function(){},InsertHorizontalRule:function(){r.execCommand("mceInsertContent",!1,"
    ")},mceToggleVisualAid:function(){r.hasVisual=!r.hasVisual,r.addVisual()},mceReplaceContent:function(e,t,n){r.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,L.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=M.getParent(L.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||P.remove("link"),n.href&&P.apply("link",n,r)},selectAll:function(){var e=M.getRoot(),t;L.getRng().setStart?(t=M.createRng(),t.setStart(e,0),t.setEnd(e,e.childNodes.length),L.setRng(t)):(t=L.getRng(),t.item||(t.moveToElementText(e),t.select()))},"delete":function(){T("Delete");var e=r.getBody();M.isEmpty(e)&&(r.setContent(""),e.firstChild&&M.isBlock(e.firstChild)?r.selection.setCursorLocation(e.firstChild,0):r.selection.setCursorLocation(e,0))},mceNewDocument:function(){r.setContent("")},InsertLineBreak:function(e,t,n){function i(){for(var e=new a(h,m),t,n=r.schema.getNonEmptyElements();t=e.next();)if(n[t.nodeName.toLowerCase()]||t.length>0)return!0}var s=n,l,c,u,d=L.getRng(!0);new o(M).normalize(d);var f=d.startOffset,h=d.startContainer;if(1==h.nodeType&&h.hasChildNodes()){var p=f>h.childNodes.length-1;h=h.childNodes[Math.min(f,h.childNodes.length-1)]||h,f=p&&3==h.nodeType?h.nodeValue.length:0}var m=M.getParent(h,M.isBlock),y=m?m.nodeName.toUpperCase():"",b=m?M.getParent(m.parentNode,M.isBlock):null,C=b?b.nodeName.toUpperCase():"",x=s&&s.ctrlKey;"LI"!=C||x||(m=b,y=C),h&&3==h.nodeType&&f>=h.nodeValue.length&&(g||i()||(l=M.create("br"),d.insertNode(l),d.setStartAfter(l),d.setEndAfter(l),c=!0)),l=M.create("br"),d.insertNode(l);var w=M.doc.documentMode;return g&&"PRE"==y&&(!w||8>w)&&l.parentNode.insertBefore(M.doc.createTextNode("\r"),l),u=M.create("span",{}," "),l.parentNode.insertBefore(u,l),L.scrollIntoView(u),M.remove(u),c?(d.setStartBefore(l),d.setEndBefore(l)):(d.setStartAfter(l),d.setEndAfter(l)),L.setRng(d),r.undoManager.add(),v}}),w({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=L.isCollapsed()?[M.getParent(L.getNode(),M.isBlock)]:L.getSelectedBlocks(),r=f(n,function(e){return!!P.matchNode(e,t)});return-1!==h(r,v)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return R(e)},mceBlockQuote:function(){return R("blockquote")},Outdent:function(){var e;if(O.inline_styles){if((e=M.getParent(L.getStart(),M.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return v;if((e=M.getParent(L.getEnd(),M.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return v}return C("InsertUnorderedList")||C("InsertOrderedList")||!O.inline_styles&&!!M.getParent(L.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=M.getParent(L.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),w({"FontSize,FontName":function(e){var t=0,n;return(n=M.getParent(L.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),w({Undo:function(){r.undoManager.undo()},Redo:function(){r.undoManager.redo()}})}}),r(ie,[m],function(e){function t(e,o){var a=this,s,l;if(e=r(e),o=a.settings=o||{},s=o.base_uri,/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(a.source=e);var c=0===e.indexOf("//");0!==e.indexOf("/")||c||(e=(s?s.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(l=o.base_uri?o.base_uri.path:new t(location.href).directory,""===o.base_uri.protocol?e="//mce_host"+a.toAbsPath(l,e):(e=/([^#?]*)([#?]?.*)/.exec(e),e=(s&&s.protocol||"http")+"://mce_host"+a.toAbsPath(l,e[1])+e[2])),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(i,function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),a[t]=r}),s&&(a.protocol||(a.protocol=s.protocol),a.userInfo||(a.userInfo=s.userInfo),a.port||"mce_host"!==a.host||(a.port=s.port),a.host&&"mce_host"!==a.host||(a.host=s.host),a.source=""),c&&(a.protocol="")}var n=e.each,r=e.trim,i="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),o={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n=this,r;if("./"===e)return e;if(e=new t(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=n.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=n.toRelPath(n.path,e.path),e.query&&(r+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,n){return e=new t(e,{base_uri:this}),e.getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=o[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.lengtho;o++)if(o>=e.length||e[o]!=n[o]){r=o+1;break}if(1===r)return t;for(o=0,a=e.length-(r-1);a>o;o++)i+="../";for(o=r-1,a=n.length;a>o;o++)i+=o!=r-1?"/"+n[o]:n[o];return i},toAbsPath:function(e,t){var r,i=0,o=[],a,s;for(a=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),n(e,function(e){e&&o.push(e)}),e=o,r=t.length-1,o=[];r>=0;r--)0!==t[r].length&&"."!==t[r]&&(".."!==t[r]?i>0?i--:o.push(t[r]):i++);return r=e.length-i,s=0>=r?o.reverse().join("/"):e.slice(0,r).join("/")+"/"+o.reverse().join("/"),0!==s.indexOf("/")&&(s="/"+s),a&&s.lastIndexOf("/")!==s.length-1&&(s+=a),s},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(t+=n.protocol?n.protocol+"://":"//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}},t.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},t}),r(oe,[m],function(e){function t(){}var n=e.each,r=e.extend,i,o;return t.extend=i=function(e){function t(){var e,t,n,r=this;if(!o&&(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)}function a(){return this}function s(e,t){return function(){var n=this,r=n._super,i;return n._super=c[e],i=t.apply(n,arguments),n._super=r,i}}var l=this,c=l.prototype,u,d,f;o=!0,u=new l,o=!1,e.Mixins&&(n(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),c.Mixins&&(e.Mixins=c.Mixins.concat(e.Mixins))),e.Methods&&n(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&n(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;return e!==r?(t[n]=e,t):t[n]}}),e.Statics&&n(e.Statics,function(e,n){t[n]=e}),e.Defaults&&c.Defaults&&(e.Defaults=r({},c.Defaults,e.Defaults));for(d in e)f=e[d],"function"==typeof f&&c[d]?u[d]=s(d,f):u[d]=f;return t.prototype=u,t.constructor=t,t.extend=i,t},t}),r(ae,[m],function(e){function t(t){function n(){return!1}function r(){return!0}function i(e,i){var o,s,l,c;if(e=e.toLowerCase(),i=i||{},i.type=e,i.target||(i.target=u),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=r},i.stopPropagation=function(){i.isPropagationStopped=r},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=r},i.isDefaultPrevented=n,i.isPropagationStopped=n,i.isImmediatePropagationStopped=n),t.beforeFire&&t.beforeFire(i),o=d[e])for(s=0,l=o.length;l>s;s++){if(c=o[s],c.once&&a(e,c.func),i.isImmediatePropagationStopped())return i.stopPropagation(),i;if(c.func.call(u,i)===!1)return i.preventDefault(),i}return i}function o(t,r,i,o){var a,s,l;if(r===!1&&(r=n),r)for(r={func:r},o&&e.extend(r,o),s=t.toLowerCase().split(" "),l=s.length;l--;)t=s[l],a=d[t],a||(a=d[t]=[],f(t,!0)),i?a.unshift(r):a.push(r);return c}function a(e,t){var n,r,i,o,a;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],r=d[e],!e){for(i in d)f(i,!1),delete d[i];return c}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),d[e]=r);else r.length=0;r.length||(f(e,!1),delete d[e])}}else{for(e in d)f(e,!1);d={}}return c}function s(e,t,n){return o(e,t,n,{once:!0})}function l(e){return e=e.toLowerCase(),!(!d[e]||0===d[e].length)}var c=this,u,d={},f;t=t||{},u=t.scope||c,f=t.toggleEvent||n,c.fire=i,c.on=o,c.off=a,c.once=s,c.has=l}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchend"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),r(se,[],function(){function e(e){this.create=e.create}return e.create=function(t,n){return new e({create:function(e,r){function i(t){e.set(r,t.value)}function o(e){t.set(n,e.value)}var a;return e.on("change:"+r,o),t.on("change:"+n,i),a=e._bindings,a||(a=e._bindings=[],e.on("destroy",function(){for(var e=a.length;e--;)a[e]()})),a.push(function(){t.off("change:"+n,i)}),t.get(n)}})},e}),r(le,[ae],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,r){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,r)}})),t._eventDispatcher}return{fire:function(e,n,r){var i=this;if(i.removed&&"remove"!==e)return n;if(n=t(i).fire(e,n,r),r!==!1&&i.parent)for(var o=i.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,r){return t(this).on(e,n,r)},off:function(e,n){return t(this).off(e,n)},once:function(e,n){return t(this).once(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),r(ce,[se,le,oe,m],function(e,t,n,r){function i(e){return e.nodeType>0}function o(e,t){var n,a;if(e===t)return!0;if(null===e||null===t)return e===t;if("object"!=typeof e||"object"!=typeof t)return e===t;if(r.isArray(t)){if(e.length!==t.length)return!1;for(n=e.length;n--;)if(!o(e[n],t[n]))return!1}if(i(e)||i(t))return e===t;a={};for(n in t){if(!o(e[n],t[n]))return!1;a[n]=!0}for(n in e)if(!a[n]&&!o(e[n],t[n]))return!1;return!0}return n.extend({Mixins:[t],init:function(t){var n,r;t=t||{};for(n in t)r=t[n],r instanceof e&&(t[n]=r.create(this,n));this.data=t},set:function(t,n){var r,i,a=this.data[t];if(n instanceof e&&(n=n.create(this,t)),"object"==typeof t){for(r in t)this.set(r,t[r]);return this}return o(a,n)||(this.data[t]=n,i={target:this,name:t,value:n,oldValue:a},this.fire("change:"+t,i),this.fire("change",i)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(t){return e.create(this,t)},destroy:function(){this.fire("destroy")}})}),r(ue,[oe],function(e){function t(e){for(var t=[],n=e.length,r;n--;)r=e[n],r.__checked||(t.push(r),r.__checked=1);for(n=t.length;n--;)delete t[n].__checked;return t}var n=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=/^\s*|\s*$/g,o,a=e.extend({init:function(e){function t(e){return e?(e=e.toLowerCase(),function(t){return"*"===e||t.type===e}):void 0}function o(e){return e?function(t){return t._name===e}:void 0}function a(e){return e?(e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.classes.contains(e[n]))return!1;return!0}):void 0}function s(e,t,n){return e?function(r){var i=r[e]?r[e]():"";return t?"="===t?i===n:"*="===t?i.indexOf(n)>=0:"~="===t?(" "+i+" ").indexOf(" "+n+" ")>=0:"!="===t?i!=n:"^="===t?0===i.indexOf(n):"$="===t?i.substr(i.length-n.length)===n:!1:!!n}:void 0}function l(e){var t;return e?(e=/(?:not\((.+)\))|(.+)/i.exec(e),e[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2===0:"odd"===e?n%2===1:t[e]?t[e]():!1})):void 0}function c(e,r,c){function u(e){e&&r.push(e)}var d;return d=n.exec(e.replace(i,"")),u(t(d[1])),u(o(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),r.pseudo=!!d[7],r.direct=c,r}function u(e,t){var n=[],i,o,a;do if(r.exec(""),o=r.exec(e),o&&(e=o[3],n.push(o[1]),o[2])){i=o[3];break}while(o);for(i&&u(i,t),e=[],a=0;a"!=n[a]&&e.push(c(n[a],[],">"===n[a-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,r,i,o,a,s,l,c,u,d,f,h,p;for(t=t||this._selectors,n=0,r=t.length;r>n;n++){for(a=t[n],o=a.length,p=e,h=0,i=o-1;i>=0;i--)for(c=a[i];p;){if(c.pseudo)for(f=p.parent().items(),u=d=f.length;u--&&f[u]!==p;);for(s=0,l=c.length;l>s;s++)if(!c[s](p,u,d)){s=l+1;break}if(s===l){h++;break}if(i===o-1)break;p=p.parent()}if(h===o)return!0}return!1},find:function(e){function n(e,t,i){var o,a,s,l,c,u=t[i];for(o=0,a=e.length;a>o;o++){for(c=e[o],s=0,l=u.length;l>s;s++)if(!u[s](c,o,a)){s=l+1;break}if(s===l)i==t.length-1?r.push(c):c.items&&n(c.items(),t,i+1);else if(u.direct)return;c.items&&n(c.items(),t,i)}}var r=[],i,s,l=this._selectors;if(e.items){for(i=0,s=l.length;s>i;i++)n(e.items(),l[i],0);s>1&&(r=t(r))}return o||(o=a.Collection),new o(r)}});return a}),r(de,[m,ue,oe],function(e,t,n){var r,i,o=Array.prototype.push,a=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof r?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t=this,n=t.length,r;for(t.length=0,t.add(e),r=t.length;n>r;r++)delete t[r];return t},filter:function(e){var n=this,i,o,a=[],s,l;for("string"==typeof e?(e=new t(e),l=function(t){return e.match(t)}):l=e,i=0,o=n.length;o>i;i++)s=n[i],l(s)&&a.push(s);return new r(a)},slice:function(){return new r(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].classes.contains(e):!1},prop:function(e,t){var n=this,r,i;return t!==r?(n.each(function(n){n[e]&&n[e](t)}),n):(i=n[0],i&&i[e]?i[e]():void 0)},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(e){return this.each(function(t){t.classes.add(e)})},removeClass:function(e){return this.each(function(t){t.classes.remove(e)})}},e.each("fire on off show hide append prepend before after reflow".split(" "),function(t){i[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){i[e]=function(t){return this.prop(e,t)}}),r=n.extend(i),t.Collection=r,r}),r(fe,[m,w],function(e,t){var n=0;return{id:function(){return"mceu_"+n++},create:function(n,r,i){var o=document.createElement(n);return t.DOM.setAttribs(o,r),"string"==typeof i?o.innerHTML=i:e.each(i,function(e){e.nodeType&&o.appendChild(e)}),o},createFragment:function(e){return t.DOM.createFragment(e)},getWindowSize:function(){return t.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,n){return t.DOM.getPos(e,n)},getViewPort:function(e){return t.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,n){return t.DOM.addClass(e,n)},removeClass:function(e,n){return t.DOM.removeClass(e,n)},hasClass:function(e,n){return t.DOM.hasClass(e,n)},toggleClass:function(e,n,r){return t.DOM.toggleClass(e,n,r)},css:function(e,n,r){return t.DOM.setStyle(e,n,r)},getRuntimeStyle:function(e,n){return t.DOM.getStyle(e,n,!0)},on:function(e,n,r,i){return t.DOM.bind(e,n,r,i)},off:function(e,n,r){return t.DOM.unbind(e,n,r)},fire:function(e,n,r){return t.DOM.fire(e,n,r)},innerHtml:function(e,n){t.DOM.setHTML(e,n)}}}),r(he,[],function(){return{parseBox:function(e){var t,n=10;if(e)return"number"==typeof e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}}}}),r(pe,[m],function(e){function t(){}function n(e){this.cls=[],this.cls._map={},this.onchange=e||t,this.prefix=""}return e.extend(n.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){for(var t=0;t0&&(e+=" "),e+=this.prefix+this.cls[t];return e},n}),r(me,[u],function(e){var t={},n;return{add:function(r){var i=r.parent();if(i){if(!i._layout||i._layout.isNative())return;t[i._id]||(t[i._id]=i),n||(n=!0,e.requestAnimationFrame(function(){var e,r;n=!1;for(e in t)r=t[e],r.state.get("rendered")&&r.reflow();t={}},document.body))}},remove:function(e){t[e._id]&&delete t[e._id]}}}),r(ge,[oe,m,ae,ce,de,fe,g,he,pe,me],function(e,t,n,r,i,o,a,s,l,c){function u(e){return e._eventDispatcher||(e._eventDispatcher=new n({scope:e,toggleEvent:function(t,r){r&&n.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e.state.get("rendered")&&d(e))}})),e._eventDispatcher}function d(e){function t(t){var n=e.getParentCtrl(t.target);n&&n.fire(t.type,t)}function n(){var e=c._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),c._lastHoverCtrl=null)}function r(t){var n=e.getParentCtrl(t.target),r=c._lastHoverCtrl,i=0,o,a,s;if(n!==r){if(c._lastHoverCtrl=n,a=n.parents().toArray().reverse(),a.push(n),r){for(s=r.parents().toArray().reverse(),s.push(r),i=0;i=i;o--)r=s[o],r.fire("mouseleave",{target:r.getEl()})}for(o=i;oo;o++)c=l[o]._eventsRoot;for(c||(c=l[l.length-1]||e),e._eventsRoot=c,s=o,o=0;s>o;o++)l[o]._eventsRoot=c;var p=c._delegates;p||(p=c._delegates={});for(d in u){if(!u)return!1;"wheel"!==d||h?("mouseenter"===d||"mouseleave"===d?c._hasMouseEnter||(a(c.getEl()).on("mouseleave",n).on("mouseover",r),c._hasMouseEnter=1):p[d]||(a(c.getEl()).on(d,t),p[d]=!0),u[d]=!1):f?a(e.getEl()).on("mousewheel",i):a(e.getEl()).on("DOMMouseScroll",i)}}}var f="onmousewheel"in document,h=!1,p="mce-",m,g=0,v={Statics:{classPrefix:p},isRtl:function(){return m.rtl},classPrefix:p,init:function(e){function n(e){var t;for(e=e.split(" "),t=0;tn.maxW?n.maxW:i,n.w=i,n.innerW=i-o),i=e.h,i!==s&&(i=in.maxH?n.maxH:i,n.h=i,n.innerH=i-a),i=e.innerW,i!==s&&(i=in.maxW-o?n.maxW-o:i,n.innerW=i,n.w=i+o),i=e.innerH,i!==s&&(i=in.maxH-a?n.maxH-a:i,n.innerH=i,n.h=i+a),e.contentW!==s&&(n.contentW=e.contentW),e.contentH!==s&&(n.contentH=e.contentH),r=t._lastLayoutRect,r.x===n.x&&r.y===n.y&&r.w===n.w&&r.h===n.h||(l=m.repaintControls,l&&l.map&&!l.map[t._id]&&(l.push(t),l.map[t._id]=!0),r.x=n.x,r.y=n.y,r.w=n.w,r.h=n.h),t):n},repaint:function(){var e=this,t,n,r,i,o,a,s,l,c,u;c=document.createRange?function(e){return e}:Math.round,t=e.getEl().style,i=e._layoutRect,l=e._lastRepaintRect||{},o=e.borderBox,a=o.left+o.right,s=o.top+o.bottom,i.x!==l.x&&(t.left=c(i.x)+"px",l.x=i.x),i.y!==l.y&&(t.top=c(i.y)+"px",l.y=i.y),i.w!==l.w&&(u=c(i.w-a),t.width=(u>=0?u:0)+"px",l.w=i.w),i.h!==l.h&&(u=c(i.h-s),t.height=(u>=0?u:0)+"px",l.h=i.h),e._hasBody&&i.innerW!==l.innerW&&(u=c(i.innerW),r=e.getEl("body"),r&&(n=r.style,n.width=(u>=0?u:0)+"px"),l.innerW=i.innerW),e._hasBody&&i.innerH!==l.innerH&&(u=c(i.innerH),r=r||e.getEl("body"),r&&(n=n||r.style,n.height=(u>=0?u:0)+"px"),l.innerH=i.innerH),e._lastRepaintRect=l,e.fire("repaint",{},!1)},updateLayoutRect:function(){var e=this;e.parent()._lastRect=null,o.css(e.getEl(),{width:"",height:""}),e._layoutRect=e._lastRepaintRect=e._lastLayoutRect=null,e.initLayoutRect()},on:function(e,t){function n(e){var t,n;return"string"!=typeof e?e:function(i){return t||r.parentsAndSelf().each(function(r){var i=r.settings.callbacks;return i&&(t=i[e])?(n=r,!1):void 0}),t?t.call(n,i):(i.action=e,void this.fire("execute",i))}}var r=this;return u(r).on(e,n(t)),r},off:function(e,t){return u(this).off(e,t),this},fire:function(e,t,n){var r=this;if(t=t||{},t.control||(t.control=r),t=u(r).fire(e,t),n!==!1&&r.parent)for(var i=r.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return u(this).has(e)},parents:function(e){var t=this,n,r=new i;for(n=t.parent();n;n=n.parent())r.add(n);return e&&(r=r.filter(e)),r},parentsAndSelf:function(e){return new i(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=a("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,r=n.getEl(n.ariaTarget);return"undefined"==typeof t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&r.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){return t!==!1&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return m.translate?m.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),r,i;if(e.items){var o=e.items().toArray();for(i=o.length;i--;)o[i].remove()}n&&n.items&&(r=[],n.items().each(function(t){t!==e&&r.push(t)}),n.items().set(r),n._lastRect=null),e._eventsRoot&&e._eventsRoot==e&&a(t).off();var s=e.getRoot().controlIdLookup;return s&&delete s[e._id],t&&t.parentNode&&t.parentNode.removeChild(t),e.state.set("rendered",!1),e.state.destroy(),e.fire("remove"),e},renderBefore:function(e){return a(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return a(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'
    '},postRender:function(){var e=this,t=e.settings,n,r,i,o,s;e.$el=a(e.getEl()),e.state.set("rendered",!0);for(o in t)0===o.indexOf("on")&&e.on(o.substr(2),t[o]);if(e._eventsRoot){for(i=e.parent();!s&&i;i=i.parent())s=i._eventsRoot;if(s)for(o in s._nativeEvents)e._nativeEvents[o]=!0}d(e),t.style&&(n=e.getEl(),n&&(n.setAttribute("style",t.style),n.style.cssText=t.style)),e.settings.border&&(r=e.borderBox,e.$el.css({"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left}));var l=e.getRoot();l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[e._id]=e;for(var u in e._aria)e.aria(u,e._aria[u]);e.state.get("visible")===!1&&(e.getEl().style.display="none"),e.bindStates(),e.state.on("change:visible",function(t){var n=t.value,r;e.state.get("rendered")&&(e.getEl().style.display=n===!1?"none":"",e.getEl().getBoundingClientRect()),r=e.parent(),r&&(r._lastRect=null),e.fire(n?"show":"hide"),c.add(e)}),e.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n=this.getEl(),r=n.parentNode,i,o,a,s,l,c,u=t(n,r);return i=u.x,o=u.y,a=n.offsetWidth,s=n.offsetHeight,l=r.clientWidth,c=r.clientHeight,"end"==e?(i-=l-a,o-=c-s):"center"==e&&(i-=l/2-a/2,o-=c/2-s/2),r.scrollLeft=i,r.scrollTop=o,this},getRoot:function(){for(var e=this,t,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),t=e,e=e.parent()}t||(t=this);for(var r=n.length;r--;)n[r].rootControl=t;return t},reflow:function(){c.remove(this);var e=this.parent();return e._layout&&!e._layout.isNative()&&e.reflow(),this}};return t.each("text title visible disabled active value".split(" "),function(e){v[e]=function(t){return 0===arguments.length?this.state.get(e):("undefined"!=typeof t&&this.state.set(e,t),this)}}),m=e.extend(v)}),r(ve,[],function(){var e={},t;return{add:function(t,n){e[t.toLowerCase()]=n},has:function(t){return!!e[t.toLowerCase()]},create:function(n,r){var i,o,a;if(!t){a=tinymce.ui;for(o in a)e[o.toLowerCase()]=a[o];t=!0}if("string"==typeof n?(r=r||{},r.type=n):(r=n,n=r.type),n=n.toLowerCase(),i=e[n],!i)throw new Error("Could not find control by type: "+n);return i=new i(r),i.type=n,i}}}),r(ye,[],function(){return function(e){function t(e){return e&&1===e.nodeType}function n(e){return e=e||C,t(e)?e.getAttribute("role"):null}function r(e){for(var t,r=e||C;r=r.parentNode;)if(t=n(r))return t}function i(e){var n=C;return t(n)?n.getAttribute("aria-"+e):void 0}function o(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t||"SELECT"==t}function a(e){return o(e)&&!e.hidden?!0:!!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(n(e))}function s(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display){a(e)&&n.push(e);for(var r=0;re?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function d(e,t){var n=-1,r=l();t=t||s(r.getEl());for(var i=0;i=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),n=e.getEl(),n&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n=this,i,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),i=o.extend({},n.settings.defaults,t),t.type=i.type=i.type||t.type||n.settings.defaultType||(i.defaults?i.defaults.type:null),t=r.create(i)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r;t.parent(e),t.state.get("rendered")||(r=e.getEl("body"),r.hasChildNodes()&&n<=r.childNodes.length-1?a(r.childNodes[n]).before(t.renderHtml()):a(r).append(t.renderHtml()),t.postRender(),l.add(t))}),e._layout.applyClasses(e.items().filter(":visible")),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r=this,i,o,a;return e=r.create(e),i=r.items(),!n&&t=0&&t
    '+(e.settings.html||"")+t.renderHtml(e)+"
    "},postRender:function(){var e=this,t;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e.state.set("rendered",!0),e.settings.style&&e.$el.css(e.settings.style),e.settings.border&&(t=e.borderBox,e.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=new i({root:e})),e},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;return n&&n.w==t.w&&n.h==t.h?void 0:(e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0)},reflow:function(){var t;if(l.remove(this),this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r(Ce,[g],function(e){function t(e){var t,n,r,i,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,r=c(t.scrollWidth,n.scrollWidth),i=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:o>r?i:r,height:l>a?s:a}}function n(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n").css({position:"absolute",top:0,left:0,width:c.width,height:c.height,zIndex:2147483647,opacity:1e-4,cursor:m}).appendTo(s.body),e(s).on("mousemove touchmove",d).on("mouseup touchend",u),i.start(r)},d=function(e){return n(e),e.button!==l?u(e):(e.deltaX=e.screenX-f,e.deltaY=e.screenY-h,e.preventDefault(),void i.drag(e))},u=function(t){n(t),e(s).off("mousemove touchmove",d).off("mouseup touchend",u),a.remove(),i.stop&&i.stop(t)},this.destroy=function(){e(o()).off()},e(o()).on("mousedown touchstart",c)}}),r(xe,[g,Ce],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,h,p,m,g,v,y,b;if(f=i.getEl("scroll"+t)){if(y=a.toLowerCase(),b=s.toLowerCase(),e(i.getEl("absend")).css(y,i.layoutRect()[l]-1),!c)return void e(f).css("display","none");e(f).css("display","block"),d=i.getEl("body"),h=i.getEl("scroll"+t+"t"),p=d["client"+s]-2*o,p-=n&&r?f["client"+u]:0,m=d["scroll"+s],g=p/m,v={},v[y]=d["offset"+a]+o,v[b]=p,e(f).css(v),v={},v[y]=d["scroll"+a]*g,v[b]=p*g,e(h).css(v)}}var n,r,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,r=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",r,"Width")}function r(){function n(n,r,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;e(i.getEl()).append('
    '),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+r],e("#"+u).addClass(d+"active")},drag:function(e){var t,u,d,f,h=i.layoutRect();u=h.contentW>h.innerW,d=h.contentH>h.innerH,f=i.getEl("body")["client"+a]-2*o,f-=u&&d?i.getEl("scroll"+n)["client"+l]:0,t=f/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+r]=c+e["delta"+s]/t},stop:function(){e("#"+u).removeClass(d+"active")}})}i.classes.add("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}var i=this,o=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,r(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e(i.getEl("body")).on("scroll",n)),n())}}}),r(we,[be,xe],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),"undefined"==typeof n?n='
    '+t.renderHtml(e)+"
    ":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'
    '+(e._preBodyHtml||"")+n+"
    "}})}),r(Ee,[fe],function(e){function t(t,n,r){var i,o,a,s,l,c,u,d,f,h;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t.state.get("fixed")&&"static"==e.getRuntimeStyle(document.body,"position")&&(a-=f.x,s-=f.y),i=t.getEl(),h=e.getSize(i),l=h.width,c=h.height,h=e.getSize(n),u=h.width,d=h.height,r=(r||"").split(""),"b"===r[0]&&(s+=d),"r"===r[1]&&(a+=u),"c"===r[0]&&(s+=Math.round(d/2)),"c"===r[1]&&(a+=Math.round(u/2)),"b"===r[3]&&(s-=c),"r"===r[4]&&(a-=l),"c"===r[3]&&(s-=Math.round(c/2)),"c"===r[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,r){for(var i=e.getViewPort(),o=0;o0&&a.x+a.w0&&a.y+a.hi.x&&a.x+a.wi.y&&a.y+a.he?0:e+n>t?(e=t-n,0>e?0:e):e}var i=this;if(i.settings.constrainToViewport){var o=e.getViewPort(window),a=i.layoutRect();t=r(t,o.w+o.x,a.w),n=r(n,o.h+o.y,a.h)}return i.state.get("rendered")?i.layoutRect({x:t,y:n}).repaint():(i.settings.x=t,i.settings.y=n),i.fire("move",{x:t,y:n}),i}}}),r(Ne,[fe],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(1>=t||1>=n){var r=e.getWindowSize();t=1>=t?t*r.w:t,n=1>=n?n*r.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r(_e,[we,Ee,Ne,fe,g,u],function(e,t,n,r,i,o){function a(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}function s(e){for(var t=v.length;t--;){var n=v[t],r=n.getParentCtrl(e.target);if(n.settings.autohide){if(r&&(a(r,n)||n.parent()===r))continue;e=n.fire("autohide",{target:e.target}),e.isDefaultPrevented()||n.hide()}}}function l(){p||(p=function(e){2!=e.button&&s(e)},i(document).on("click touchstart",p))}function c(){m||(m=function(){var e;for(e=v.length;e--;)d(v[e])},i(window).on("scroll",m))}function u(){if(!g){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;g=function(){document.all&&t==e.clientWidth&&n==e.clientHeight||(t=e.clientWidth,n=e.clientHeight,C.hideAll())},i(window).on("resize",g)}}function d(e){function t(t,n){for(var r,i=0;in&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY
    ').appendTo(t.getContainerElm())),o.setTimeout(function(){n.addClass(r+"in"),i(t.getEl()).addClass(r+"in")}),b=!0),f(!0,t)}}),t.on("show",function(){t.parents().each(function(e){return e.state.get("fixed")?(t.fixed(!0),!1):void 0})}),e.popover&&(t._preBodyHtml='
    ',t.classes.add("popover").add("bottom").add(t.isRtl()?"end":"start")),t.aria("label",e.ariaLabel),t.aria("labelledby",t._id),t.aria("describedby",t.describedBy||t._id+"-none")},fixed:function(e){var t=this;if(t.state.get("fixed")!=e){if(t.state.get("rendered")){var n=r.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e=this,t,n=e._super();for(t=v.length;t--&&v[t]!==e;);return-1===t&&v.push(e),n},hide:function(){return h(this),f(!1,this),this._super()},hideAll:function(){C.hideAll()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||(e.remove(),f(!1,e)),e},remove:function(){h(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return C.hideAll=function(){for(var e=v.length;e--;){var t=v[e];t&&t.settings.autohide&&(t.hide(),v.splice(e,1))}},C}),r(Se,[_e,we,fe,g,Ce,he,h,u],function(e,t,n,r,i,o,a,s){function l(e){var t="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0",n=r("meta[name=viewport]")[0],i;a.overrideViewPort!==!1&&(n||(n=document.createElement("meta"),n.setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),i=n.getAttribute("content"),i&&"undefined"!=typeof f&&(f=i),n.setAttribute("content",e?t:f))}function c(e){for(var t=0;tr.w&&(o=r.x-Math.max(0,i/2),e.layoutRect({w:i,x:o}),a=!0)),t&&(t.layoutRect({w:e.layoutRect().innerW}).recalc(),i=t.layoutRect().minW+r.deltaW,i>r.w&&(o=r.x-Math.max(0,i-r.w),e.layoutRect({w:i,x:o}),a=!0)),a&&e.recalc()},initLayoutRect:function(){var e=this,t=e._super(),r=0,i;if(e.settings.title&&!e._fullscreen){i=e.getEl("head");var o=n.getSize(i);t.headerW=o.width,t.headerH=o.height,r+=t.headerH}e.statusbar&&(r+=e.statusbar.layoutRect().h),t.deltaH+=r,t.minH+=r,t.h+=r;var a=n.getWindowSize();return t.x=e.settings.x||Math.max(0,a.w/2-t.w/2),t.y=e.settings.y||Math.max(0,a.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o='
    '+e.encode(i.title)+'
    '),i.url&&(s=''),"undefined"==typeof s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'
    '+o+'
    '+s+"
    "+a+"
    "},fullscreen:function(e){var t=this,i=document.documentElement,a,l=t.classPrefix,c;if(e!=t._fullscreen)if(r(window).on("resize",function(){var e;if(t._fullscreen)if(a)t._timer||(t._timer=s.setTimeout(function(){var e=n.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h),t._timer=0},50));else{e=(new Date).getTime();var r=n.getWindowSize();t.moveTo(0,0).resizeTo(r.w,r.h),(new Date).getTime()-e>50&&(a=!0)}}),c=t.layoutRect(),t._fullscreen=e,e){t._initial={x:c.x,y:c.y,w:c.w,h:c.h},t.borderBox=o.parseBox("0"),t.getEl("head").style.display="none",c.deltaH-=c.headerH+2,r([i,document.body]).addClass(l+"fullscreen"),t.classes.add("fullscreen");var u=n.getWindowSize();t.moveTo(0,0).resizeTo(u.w,u.h)}else t.borderBox=o.parseBox(t.settings.border),t.getEl("head").style.display="",c.deltaH+=c.headerH,r([i,document.body]).removeClass(l+"fullscreen"),t.classes.remove("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h);return t.reflow()},postRender:function(){var e=this,t;setTimeout(function(){e.classes.add("in"),e.fire("open")},0),e._super(),e.statusbar&&e.statusbar.postRender(),e.focus(),this.dragHelper=new i(e._id+"-dragh",{start:function(){t={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(n){e.moveTo(t.x+n.deltaX,t.y+n.deltaY)}}),e.on("submit",function(t){t.isDefaultPrevented()||e.close()}),d.push(e),l(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this,t;for(e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),t=d.length;t--;)d[t]===e&&d.splice(t,1);l(d.length>0),c(e.classPrefix)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return u(),h}),r(ke,[Se],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){function r(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),o(t)}}}var i,o=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:i=[r("Ok",!0,!0),r("Cancel",!1)];break;case t.YES_NO:case t.YES_NO_CANCEL:i=[r("Yes",1,!0),r("No",0)],n.buttons==t.YES_NO_CANCEL&&i.push(r("Cancel",-1));break;default:i=[r("Ok",!0,!0)]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:i,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){o(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r(Te,[Se,ke],function(e,t){return function(n){function r(){return s.length?s[s.length-1]:void 0}function i(e){n.fire("OpenWindow",{win:e})}function o(e){n.fire("CloseWindow",{win:e})}var a=this,s=[];a.windows=s,n.on("remove",function(){for(var e=s.length;e--;)s[e].close()}),a.open=function(t,r){var a;return n.editorManager.setActive(n),t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body,data:t.data,callbacks:t.commands}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){a.find("form")[0].submit()}},{text:"Cancel",onclick:function(){a.close()}}]),a=new e(t),s.push(a),a.on("close",function(){for(var e=s.length;e--;)s[e]===a&&s.splice(e,1);s.length||n.focus(),o(a)}),t.data&&a.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),a.features=t||{},a.params=r||{},1===s.length&&n.nodeChanged(),a=a.renderTo().reflow(),i(a),a},a.alert=function(e,r,a){var s;s=t.alert(e,function(){r?r.call(a||this):n.focus()}),s.on("close",function(){o(s)}),i(s)},a.confirm=function(e,n,r){var a;a=t.confirm(e,function(e){n.call(r||this,e)}),a.on("close",function(){o(a)}),i(a)},a.close=function(){r()&&r().close()},a.getParams=function(){return r()?r().params:null},a.setParams=function(e){r()&&(r().params=e)},a.getWindows=function(){return s}}}),r(Re,[ge,Ee],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this,t=e.classPrefix;return'"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(Ae,[ge,Re],function(e,t){var n,r=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&r.tooltips!==!1&&(t.on("mouseenter",function(n){var r=t.tooltip().moveTo(-65535);if(n.control==t){var i=r.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);r.classes.toggle("tooltip-n","bc-tc"==i),r.classes.toggle("tooltip-nw","bc-tl"==i),r.classes.toggle("tooltip-ne","bc-tr"==i),r.moveRel(t.getEl(),i)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"}),n.renderTo()),n},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){function e(e){n.aria("disabled",e),n.classes.toggle("disabled",e)}function t(e){n.aria("pressed",e),n.classes.toggle("active",e)}var n=this;return n.state.on("change:disabled",function(t){e(t.value)}),n.state.on("change:active",function(e){t(e.value)}),n.state.get("disabled")&&e(!0),n.state.get("active")&&t(!0),n._super()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return r}),r(Be,[Ae],function(e){return e.extend({Defaults:{value:0},init:function(e){var t=this;t._super(e),t.classes.add("progress"),t.settings.filter||(t.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this,t=e._id,n=this.classPrefix;return'
    0%
    '},postRender:function(){var e=this;return e._super(),e.value(e.settings.value),e},bindStates:function(){function e(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}var t=this;return t.state.on("change:value",function(t){e(t.value)}),e(t.state.get("value")),t._super()}})}),r(De,[ge,Ee,Be,u],function(e,t,n,r){return e.extend({Mixins:[t],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||e.timeout>0)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new n),t.on("click",function(e){-1!=e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e=this,t=e.classPrefix,n="",r="",i="",o="";return e.icon&&(n=''),e.color&&(o=' style="background-color: '+e.color+'"'),e.closeButton&&(r=''),e.progressBar&&(i=e.progressBar.renderHtml()),'"},postRender:function(){var e=this;return r.setTimeout(function(){e.$el.addClass(e.classPrefix+"in")}),e._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().childNodes[1].innerHTML=t.value}),e.progressBar&&e.progressBar.bindStates(),e._super()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||e.remove(),e},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(Me,[De,u],function(e,t){return function(n){function r(){return l.length?l[l.length-1]:void 0}function i(){t.requestAnimationFrame(function(){o(),a()})}function o(){for(var e=0;e0){var e=l.slice(0,1)[0],t=n.inline?n.getElement():n.getContentAreaContainer();if(e.moveRel(t,"tc-tc"),l.length>1)for(var r=1;r0&&(r.timer=setTimeout(function(){r.close()},t.timeout)),r.on("close",function(){var e=l.length;for(r.timer&&n.getWin().clearTimeout(r.timer);e--;)l[e]===r&&l.splice(e,1);a()}),r.renderTo(),a(),r},s.close=function(){r()&&r().close()},s.getNotifications=function(){return l},n.on("SkinLoaded",function(){var e=n.settings.service_message;e&&n.notificationManager.open({text:e,type:"warning",timeout:0,icon:""})})}}),r(Le,[w],function(e){function t(t,n,r){for(var i=[];n&&n!=t;n=n.parentNode)i.push(e.nodeIndex(n,r));return i}function n(e,t){var n,r,i;for(r=e,n=t.length-1;n>=0;n--){if(i=r.childNodes,t[n]>i.length-1)return null;r=i[t[n]]}return r}return{create:t,resolve:n}}),r(Pe,[I,T,y,Le,A,C,h,m,u,k],function(e,t,n,r,i,o,a,s,l,c){return function(u){function d(e,t){try{u.getDoc().execCommand(e,!1,t)}catch(n){}}function f(){var e=u.getDoc().documentMode;return e?e:6}function h(e){return e.isDefaultPrevented()}function p(e){var t,n;e.dataTransfer&&(u.selection.isCollapsed()&&"IMG"==e.target.tagName&&ee.select(e.target),t=u.selection.getContent(),t.length>0&&(n=se+escape(u.id)+","+escape(t),e.dataTransfer.setData(le,n)))}function m(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(le),t&&t.indexOf(se)>=0)?(t=t.substr(se.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}function g(e){u.queryCommandSupported("mceInsertClipboardContent")?u.execCommand("mceInsertClipboardContent",!1,{content:e}):u.execCommand("mceInsertContent",!1,e)}function v(){function i(e){var t=C.schema.getBlockElements(),n=u.getBody();if("BR"!=e.nodeName)return!1;for(;e!=n&&!t[e.nodeName];e=e.parentNode)if(e.nextSibling)return!1;return!0}function o(e,t){var n;for(n=e.nextSibling;n&&n!=t;n=n.nextSibling)if((3!=n.nodeType||0!==G.trim(n.data).length)&&n!==t)return!1;return n===t}function a(e,t,r){var o,a,s;for(s=C.schema.getNonEmptyElements(),o=new n(r||e,e);a=o[t?"next":"prev"]();){if(s[a.nodeName]&&!i(a))return a;if(3==a.nodeType&&a.data.length>0)return a}}function c(e){var n,r,i,o,s;if(!e.collapsed&&(n=C.getParent(t.getNode(e.startContainer,e.startOffset),C.isBlock),r=C.getParent(t.getNode(e.endContainer,e.endOffset),C.isBlock),s=u.schema.getTextBlockElements(),n!=r&&s[n.nodeName]&&s[r.nodeName]&&"false"!==C.getContentEditable(n)&&"false"!==C.getContentEditable(r)))return e.deleteContents(),i=a(n,!1),o=a(r,!0),C.isEmpty(r)||G(n).append(r.childNodes),G(r).remove(),i?1==i.nodeType?"BR"==i.nodeName?(e.setStartBefore(i),e.setEndBefore(i)):(e.setStartAfter(i),e.setEndAfter(i)):(e.setStart(i,i.data.length),e.setEnd(i,i.data.length)):o&&(1==o.nodeType?(e.setStartBefore(o),e.setEndBefore(o)):(e.setStart(o,0),e.setEnd(o,0))),x.setRng(e),!0}function d(e,n){var r,i,s,l,c,d;if(!e.collapsed)return e;if(c=e.startContainer,d=e.startOffset,3==c.nodeType)if(n){if(d0)return e;if(r=t.getNode(e.startContainer,e.startOffset),s=C.getParent(r,C.isBlock),i=a(u.getBody(),n,r),l=C.getParent(i,C.isBlock),!r||!i)return e;if(l&&s!=l)if(n){if(!o(s,l))return e;1==r.nodeType?"BR"==r.nodeName?e.setStartBefore(r):e.setStartAfter(r):e.setStart(r,r.data.length),1==i.nodeType?e.setEnd(i,0):e.setEndBefore(i)}else{if(!o(l,s))return e;1==i.nodeType?"BR"==i.nodeName?e.setStartBefore(i):e.setStartAfter(i):e.setStart(i,i.data.length),1==r.nodeType?e.setEnd(r,0):e.setEndBefore(r)}return e}function f(e){var t=x.getRng();return t=d(t,e),c(t)?!0:void 0}function v(e,t){function n(e,n){return m=G(n).parents().filter(function(e,t){return!!u.schema.getTextInlineElements()[t.nodeName]}),l=e.cloneNode(!1),m=s.map(m,function(e){return e=e.cloneNode(!1),l.hasChildNodes()?(e.appendChild(l.firstChild),l.appendChild(e)):l.appendChild(e),l.appendChild(e),e}),m.length?(p=C.create("br"),m[0].appendChild(p),C.replace(l,e),t.setStartBefore(p),t.setEndBefore(p),u.selection.setRng(t),p):null}function i(e){return e&&u.schema.getTextBlockElements()[e.tagName]}var o,a,l,c,d,f,h,p,m;if(t.collapsed&&(f=t.startContainer,h=t.startOffset,a=C.getParent(f,C.isBlock),i(a)))if(1==f.nodeType){if(f=f.childNodes[h],f&&"BR"!=f.tagName)return;if(d=e?a.nextSibling:a.previousSibling,C.isEmpty(a)&&i(d)&&C.isEmpty(d)&&n(a,f))return C.remove(d),!0}else if(3==f.nodeType){if(o=r.create(a,f),c=a.cloneNode(!0),f=r.resolve(c,o),e){if(h>=f.data.length)return;f.deleteData(h,1)}else{if(0>=h)return;f.deleteData(h-1,1)}if(C.isEmpty(c))return n(a,f)}}function y(e){var t,n,r;f(e)||(s.each(u.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&u.dom.setAttrib(e,"style",u.dom.getAttrib(e,"style"))}),t=new w(function(){}),t.observe(u.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),u.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),n=u.selection.getRng(),r=n.startContainer.parentNode,s.each(t.takeRecords(),function(e){if(C.isChildOf(e.target,u.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}s.each(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,i;e==r&&(t=n.startOffset,i=e.firstChild),C.remove(e,!0),i&&(n.setStart(i,t),n.setEnd(i,t),u.selection.setRng(n))}})}}),t.disconnect(),s.each(u.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")}))}var b=u.getDoc(),C=u.dom,x=u.selection,w=window.MutationObserver,E,N;w||(E=!0,w=function(){function e(e){var t=e.relatedNode||e.target;n.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;n.push({target:t,attributeName:e.attrName})}var n=[],r;this.observe=function(n){r=n,r.addEventListener("DOMSubtreeModified",e,!1),r.addEventListener("DOMNodeInsertedIntoDocument",e,!1),r.addEventListener("DOMNodeInserted",e,!1), -r.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){r.removeEventListener("DOMSubtreeModified",e,!1),r.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),r.removeEventListener("DOMNodeInserted",e,!1),r.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return n}}),u.on("keydown",function(e){var t=e.keyCode==Q,n=e.ctrlKey||e.metaKey;if(!h(e)&&(t||e.keyCode==J)){var r=u.selection.getRng(),i=r.startContainer,o=r.startOffset;if(t&&e.shiftKey)return;if(v(t,r))return void e.preventDefault();if(!n&&r.collapsed&&3==i.nodeType&&(t?o0))return;e.preventDefault(),n&&u.selection.getSel().modify("extend",t?"forward":"backward",e.metaKey?"lineboundary":"word"),y(t)}}),u.on("keypress",function(t){if(!h(t)&&!x.isCollapsed()&&t.charCode>31&&!e.metaKeyPressed(t)){var n,r,i,o,a,s;n=u.selection.getRng(),s=String.fromCharCode(t.charCode),t.preventDefault(),r=G(n.startContainer).parents().filter(function(e,t){return!!u.schema.getTextInlineElements()[t.nodeName]}),y(!0),r=r.filter(function(e,t){return!G.contains(u.getBody(),t)}),r.length?(i=C.createFragment(),r.each(function(e,t){t=t.cloneNode(!1),i.hasChildNodes()?(t.appendChild(i.firstChild),i.appendChild(t)):(a=t,i.appendChild(t)),i.appendChild(t)}),a.appendChild(u.getDoc().createTextNode(s)),o=C.getParent(n.startContainer,C.isBlock),C.isEmpty(o)?G(o).empty().append(i):n.insertNode(i),n.setStart(a.firstChild,1),n.setEnd(a.firstChild,1),u.selection.setRng(n)):u.selection.setContent(s)}}),u.addCommand("Delete",function(){y()}),u.addCommand("ForwardDelete",function(){y(!0)}),E||(u.on("dragstart",function(e){N=x.getRng(),p(e)}),u.on("drop",function(e){if(!h(e)){var n=m(e);n&&(e.preventDefault(),l.setEditorTimeout(u,function(){var r=t.getCaretRangeFromPoint(e.x,e.y,b);N&&(x.setRng(N),N=null),y(),x.setRng(r),g(n.html)}))}}),u.on("cut",function(e){h(e)||!e.clipboardData||u.selection.isCollapsed()||(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",u.selection.getContent()),e.clipboardData.setData("text/plain",u.selection.getContent({format:"text"})),l.setEditorTimeout(u,function(){y(!0)}))}))}function y(){function e(e){var t=Z.create("body"),n=e.cloneContents();return t.appendChild(n),ee.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var r=n.duplicate();return r.moveToElementText(u.getBody()),t.compareRanges(n,r)}var i=e(n),o=Z.createRng();o.selectNode(u.getBody());var a=e(o);return i===a}u.on("keydown",function(e){var t=e.keyCode,r,i;if(!h(e)&&(t==Q||t==J)){if(r=u.selection.isCollapsed(),i=u.getBody(),r&&!Z.isEmpty(i))return;if(!r&&!n(u.selection.getRng()))return;e.preventDefault(),u.setContent(""),i.firstChild&&Z.isBlock(i.firstChild)?u.selection.setCursorLocation(i.firstChild,0):u.selection.setCursorLocation(i,0),u.nodeChanged()}})}function b(){u.shortcuts.add("meta+a",null,"SelectAll")}function C(){u.settings.content_editable||Z.bind(u.getDoc(),"mousedown mouseup",function(e){var t;if(e.target==u.getDoc().documentElement)if(t=ee.getRng(),u.getBody().focus(),"mousedown"==e.type){if(c.isCaretContainer(t.startContainer))return;ee.placeCaretAt(e.clientX,e.clientY)}else ee.setRng(t)})}function x(){u.on("keydown",function(e){if(!h(e)&&e.keyCode===J){if(!u.getBody().getElementsByTagName("hr").length)return;if(ee.isCollapsed()&&0===ee.getRng(!0).startOffset){var t=ee.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return Z.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(Z.remove(n),e.preventDefault())}}})}function w(){window.Range.prototype.getClientRects||u.on("mousedown",function(e){if(!h(e)&&"HTML"===e.target.nodeName){var t=u.getBody();t.blur(),l.setEditorTimeout(u,function(){t.focus()})}})}function E(){u.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==Z.getContentEditableParent(t)&&(e.preventDefault(),ee.getSel().setBaseAndExtent(t,0,t,1),u.nodeChanged()),"A"==t.nodeName&&Z.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),ee.select(t))})}function N(){function e(){var e=Z.getAttribs(ee.getStart().cloneNode(!1));return function(){var t=ee.getStart();t!==u.getBody()&&(Z.setAttrib(t,"style",null),K(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!ee.isCollapsed()&&Z.getParent(ee.getStart(),Z.isBlock)!=Z.getParent(ee.getEnd(),Z.isBlock)}u.on("keypress",function(n){var r;return h(n)||8!=n.keyCode&&46!=n.keyCode||!t()?void 0:(r=e(),u.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1)}),Z.bind(u.getDoc(),"cut",function(n){var r;!h(n)&&t()&&(r=e(),l.setEditorTimeout(u,function(){r()}))})}function _(){document.body.setAttribute("role","application")}function S(){u.on("keydown",function(e){if(!h(e)&&e.keyCode===J&&ee.isCollapsed()&&0===ee.getRng(!0).startOffset){var t=ee.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function k(){f()>7||(d("RespectVisibilityInDesign",!0),u.contentStyles.push(".mceHideBrInPre pre br {display: none}"),Z.addClass(u.getBody(),"mceHideBrInPre"),ne.addNodeFilter("pre",function(e){for(var t=e.length,n,r,o,a;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)o=n[r],a=o.prev,a&&3===a.type&&"\n"!=a.value.charAt(a.value-1)?a.value+="\n":o.parent.insert(new i("#text",3),o,!0).value="\n"}),re.addNodeFilter("pre",function(e){for(var t=e.length,n,r,i,o;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)i=n[r],o=i.prev,o&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,""))}))}function T(){Z.bind(u.getBody(),"mouseup",function(){var e,t=ee.getNode();"IMG"==t.nodeName&&((e=Z.getStyle(t,"width"))&&(Z.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),Z.setStyle(t,"width","")),(e=Z.getStyle(t,"height"))&&(Z.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),Z.setStyle(t,"height","")))})}function R(){u.on("keydown",function(t){var n,r,i,o,a;if(!h(t)&&t.keyCode==e.BACKSPACE&&(n=ee.getRng(),r=n.startContainer,i=n.startOffset,o=Z.getRoot(),a=r,n.collapsed&&0===i)){for(;a&&a.parentNode&&a.parentNode.firstChild==a&&a.parentNode!=o;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(u.formatter.toggle("blockquote",null,a),n=Z.createRng(),n.setStart(r,0),n.setEnd(r,0),ee.setRng(n))}})}function A(){function e(){Y(),d("StyleWithCSS",!1),d("enableInlineTableEditing",!1),te.object_resizing||d("enableObjectResizing",!1)}te.readonly||u.on("BeforeExecCommand MouseDown",e)}function B(){function e(){K(Z.select("a"),function(e){var t=e.parentNode,n=Z.getRoot();if(t.lastChild===e){for(;t&&!Z.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}Z.add(t,"br",{"data-mce-bogus":1})}})}u.on("SetContent ExecCommand",function(t){"setcontent"!=t.type&&"mceInsertLink"!==t.command||e()})}function D(){te.forced_root_block&&u.on("init",function(){d("DefaultParagraphSeparator",te.forced_root_block)})}function M(){u.on("keydown",function(e){var t;h(e)||e.keyCode!=J||(t=u.getDoc().selection.createRange(),t&&t.item&&(e.preventDefault(),u.undoManager.beforeChange(),Z.remove(t.item(0)),u.undoManager.add()))})}function L(){var e;f()>=10&&(e="",K("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),u.contentStyles.push(e+"{padding-right: 1px !important}"))}function P(){f()<9&&(ne.addNodeFilter("noscript",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.firstChild,r&&n.attr("data-mce-innertext",r.value)}),re.addNodeFilter("noscript",function(e){for(var t=e.length,n,r,a;t--;)n=e[t],r=e[t].firstChild,r?r.value=o.decode(r.value):(a=n.attributes.map["data-mce-innertext"],a&&(n.attr("data-mce-innertext",null),r=new i("#text",3),r.value=a,r.raw=!0,n.append(r)))}))}function H(){function e(e,t){var n=i.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}return n}function t(t){var r;t.button?(r=e(t.x,t.y),r&&(r.compareEndPoints("StartToStart",a)>0?r.setEndPoint("StartToStart",a):r.setEndPoint("EndToEnd",a),r.select())):n()}function n(){var e=r.selection.createRange();a&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&a.select(),Z.unbind(r,"mouseup",n),Z.unbind(r,"mousemove",t),a=o=0}var r=Z.doc,i=r.body,o,a,s;r.documentElement.unselectable=!0,Z.bind(r,"mousedown contextmenu",function(i){if("HTML"===i.target.nodeName){if(o&&n(),s=r.documentElement,s.scrollHeight>s.clientHeight)return;o=1,a=e(i.x,i.y),a&&(Z.bind(r,"mouseup",n),Z.bind(r,"mousemove",t),Z.getRoot().focus(),a.select())}})}function O(){u.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||ee.normalize()},!0)}function I(){u.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function F(){u.inline||u.on("keydown",function(){document.activeElement==document.body&&u.getWin().focus()})}function z(){u.inline||(u.contentStyles.push("body {min-height: 150px}"),u.on("click",function(e){var t;if("HTML"==e.target.nodeName){if(a.ie>11)return void u.getBody().focus();t=u.selection.getRng(),u.getBody().focus(),u.selection.setRng(t),u.selection.normalize(),u.nodeChanged()}}))}function W(){a.mac&&u.on("keydown",function(t){!e.metaKeyPressed(t)||t.shiftKey||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),u.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","lineboundary"))})}function V(){d("AutoUrlDetect",!1)}function U(){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}")}function $(){u.on("init",function(){u.dom.bind(u.getBody(),"submit",function(e){e.preventDefault()})})}function q(){ne.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()})}function j(){u.on("dragstart",function(e){p(e)}),u.on("drop",function(e){if(!h(e)){var n=m(e);if(n&&n.id!=u.id){e.preventDefault();var r=t.getCaretRangeFromPoint(e.x,e.y,u.getDoc());ee.setRng(r),g(n.html)}}})}function Y(){var e,t;X()&&(e=u.getBody(),t=e.parentNode,t.removeChild(e),t.appendChild(e),e.focus())}function X(){var e;return ie?(e=u.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}var K=s.each,G=u.$,J=e.BACKSPACE,Q=e.DELETE,Z=u.dom,ee=u.selection,te=u.settings,ne=u.parser,re=u.serializer,ie=a.gecko,oe=a.ie,ae=a.webkit,se="data:text/mce-internal,",le=oe?"Text":"URL";return R(),y(),a.windowsPhone||O(),ae&&(v(),C(),E(),D(),$(),S(),q(),a.iOS?(F(),z(),U()):b()),oe&&a.ie<11&&(x(),_(),k(),T(),M(),L(),P(),H()),a.ie>=11&&(z(),S()),a.ie&&(b(),V(),j()),ie&&(x(),w(),N(),A(),B(),I(),W(),S()),{refreshContentEditable:Y,isHidden:X}}}),r(He,[le,w,m],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=o.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function i(e,t){function n(e){return!e.hidden&&!e.readonly}var i=r(e,t),s;if(e.delegates||(e.delegates={}),!e.delegates[t])if(e.settings.event_root){if(a||(a={},e.editorManager.on("removeEditor",function(){var t;if(!e.editorManager.activeEditor&&a){for(t in a)e.dom.unbind(r(e,t));a=null}})),a[t])return;s=function(r){for(var i=r.target,a=e.editorManager.editors,s=a.length;s--;){var l=a[s].getBody();(l===i||o.isChildOf(i,l))&&n(a[s])&&a[s].fire(t,r)}},a[t]=s,o.bind(i,t,s)}else s=function(r){n(e)&&e.fire(t,r)},o.bind(i,t,s),e.delegates[t]=s}var o=t.DOM,a,s={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){i(e,t)})},toggleNativeEvent:function(e,t){var n=this;"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(r(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e=this,t;if(e.delegates){for(t in e.delegates)e.dom.unbind(r(e,t),t,e.delegates[t]);delete e.delegates}e.inline||(e.getBody().onload=null,e.dom.unbind(e.getWin()),e.dom.unbind(e.getDoc())),e.dom.unbind(e.getBody()),e.dom.unbind(e.getContainer())}};return s=n.extend({},e,s)}),r(Oe,[],function(){function e(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}}function t(e){var t,n;return t=e.getBody(),n=function(t){e.dom.getParents(t.target,"a").length>0&&t.preventDefault()},e.dom.bind(t,"click",n),{unbind:function(){e.dom.unbind(t,"click",n)}}}function n(n,r){n._clickBlocker&&(n._clickBlocker.unbind(),n._clickBlocker=null),r?(n._clickBlocker=t(n),n.selection.controlSelection.hideResizeRect(),n.readonly=!0,n.getBody().contentEditable=!1):(n.readonly=!1,n.getBody().contentEditable=!0,e(n,"StyleWithCSS",!1),e(n,"enableInlineTableEditing",!1),e(n,"enableObjectResizing",!1),n.focus(),n.nodeChanged())}function r(e,t){var r=e.readonly?"readonly":"design";t!=r&&(e.initialized?n(e,"readonly"==t):e.on("init",function(){n(e,"readonly"==t)}),e.fire("SwitchMode",{mode:t}))}return{setMode:r}}),r(Ie,[m,h],function(e,t){var n=e.each,r=e.explode,i={f9:120,f10:121,f11:122},o=e.makeMap("alt,ctrl,shift,meta,access");return function(a){function s(e){var a,s,l={};n(r(e,"+"),function(e){e in o?l[e]=!0:/^[0-9]{2,}$/.test(e)?l.keyCode=parseInt(e,10):(l.charCode=e.charCodeAt(0),l.keyCode=i[e]||e.toUpperCase().charCodeAt(0))}),a=[l.keyCode];for(s in o)l[s]?a.push(s):l[s]=!1;return l.id=a.join(","),l.access&&(l.alt=!0,t.mac?l.ctrl=!0:l.shift=!0),l.meta&&(t.mac?l.meta=!0:(l.ctrl=!0,l.meta=!1)),l}function l(t,n,i,o){var l;return l=e.map(r(t,">"),s),l[l.length-1]=e.extend(l[l.length-1],{func:i,scope:o||a}),e.extend(l[0],{desc:a.translate(n),subpatterns:l.slice(1)})}function c(e){return e.altKey||e.ctrlKey||e.metaKey}function u(e){return e.keyCode>=112&&e.keyCode<=123}function d(e,t){return t?t.ctrl!=e.ctrlKey||t.meta!=e.metaKey?!1:t.alt!=e.altKey||t.shift!=e.shiftKey?!1:e.keyCode==t.keyCode||e.charCode&&e.charCode==t.charCode?(e.preventDefault(),!0):!1:!1}function f(e){return e.func?e.func.call(e.scope):null}var h=this,p={},m=[];a.on("keyup keypress keydown",function(e){!c(e)&&!u(e)||e.isDefaultPrevented()||(n(p,function(t){return d(e,t)?(m=t.subpatterns.slice(0),"keydown"==e.type&&f(t),!0):void 0}),d(e,m[0])&&(1===m.length&&"keydown"==e.type&&f(m[0]),m.shift()))}),h.add=function(t,i,o,s){var c;return c=o,"string"==typeof o?o=function(){a.execCommand(c,!1,null)}:e.isArray(c)&&(o=function(){a.execCommand(c[0],c[1],c[2])}),n(r(e.trim(t.toLowerCase())),function(e){var t=l(e,i,o,s);p[t.id]=t}),!0},h.remove=function(e){var t=l(e);return p[t.id]?(delete p[t.id],!0):!1}}}),r(Fe,[c,m,z],function(e,t,n){return function(r){function i(e){var t,n;return n={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"},t=n[e.blob().type.toLowerCase()]||"dat",e.id()+"."+t}function o(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t}function a(e){return{id:e.id,blob:e.blob,base64:e.base64,filename:n.constant(i(e))}}function s(e,t,n,a){var s,l,c;s=new XMLHttpRequest,s.open("POST",r.url),s.withCredentials=r.credentials,c=a(),s.upload.onprogress=function(e){var t=Math.round(e.loaded/e.total*100);c.progressBar.value(t)},s.onerror=function(){c.close(),n("Image upload failed due to a XHR Transport error. Code: "+s.status)},s.onload=function(){var e;return c.close(),200!=s.status?void n("HTTP Error: "+s.status):(e=JSON.parse(s.responseText),e&&"string"==typeof e.location?void t(o(r.basePath,e.location)):void n("Invalid JSON: "+s.responseText))},l=new FormData,l.append("file",e.blob(),i(e)),s.send(l)}function l(){return new e(function(e){e([])})}function c(e){return e.then(function(e){return e})["catch"](function(e){return e})}function u(e,t,n){var r=e(n),i=c(r);return delete p[t],p[t]=i,i}function d(e,n){return t.map(e,function(e){var t=e.id();return p[t]?p[t]:u(n,t,e)})}function f(t,n){function i(t){return new e(function(e){var i=r.handler;try{i(a(t),function(n){e({url:n,blobInfo:t,status:!0})},function(n){e({url:"",blobInfo:t,status:!1,error:n})},n)}catch(o){e({url:"",blobInfo:t,status:!1,error:o.message})}})}var o=d(t,i);return e.all(o)}function h(e,t){return r.url||r.handler!==s?f(e,t):l()}var p={};return r=t.extend({credentials:!1,handler:s},r),{upload:h}}}),r(ze,[c],function(e){function t(t){return new e(function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200==this.status&&e(this.response)},n.send()})}function n(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}}function r(t){return new e(function(e){var r,i,o;t=n(t);try{r=atob(t.data)}catch(a){return void e(new Blob([]))}for(i=new Uint8Array(r.length),o=0;o0&&(n&&(l*=-1),r.left+=l,r.right+=l),r}function l(){var n,r,o,a,s;for(n=i("*[contentEditable=false]",t),a=0;a').css(l).appendTo(t),o&&m.addClass("mce-visual-caret-before"),d(),c=a.ownerDocument.createRange(),f=g.firstChild,c.setStart(f,0),c.setEnd(f,1),c):(g=e.insertInline(a,o),c=a.ownerDocument.createRange(),s(g.nextSibling)?(c.setStart(g,0),c.setEnd(g,0)):(c.setStart(g,1),c.setEnd(g,1)),c)}function u(){l(),g&&(e.remove(g),g=null),m&&(m.remove(),m=null),clearInterval(p)}function d(){p=a.setInterval(function(){i("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden")},500)}function f(){a.clearInterval(p)}function h(){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;}"}var p,m,g;return{show:c,hide:u,getCss:h,destroy:f}}}),r(qe,[p,_,V],function(e,t,n){function r(i){function o(t){return e.map(t,function(e){return e=n.clone(e),e.node=i,e})}if(e.isArray(i))return e.reduce(i,function(e,t){return e.concat(r(t))},[]);if(t.isElement(i))return o(i.getClientRects());if(t.isText(i)){var a=i.ownerDocument.createRange();return a.setStart(i,0),a.setEnd(i,i.data.length),o(a.getClientRects())}}return{getClientRects:r}}),r(je,[z,p,qe,W,te,ne,$,V],function(e,t,n,r,i,o,a,s){function l(e,t,n,o){for(;o=i.findNode(o,e,r.isEditableCaretCandidate,t);)if(n(o))return}function c(e,r,i,o,a,s){function c(o){var s,l,c;for(c=n.getClientRects(o),-1==e&&(c=c.reverse()),s=0;s0&&r(l,t.last(f))&&u++,l.line=u,a(l))return!0;f.push(l)}}var u=0,d,f=[],h;return(h=t.last(s.getClientRects()))?(d=s.getNode(),c(d),l(e,o,c,d),f):f}function u(e,t){return t.line>e}function d(e,t){return t.line===e}function f(e,n,r,i){function l(n){return 1==e?t.last(n.getClientRects()):t.last(n.getClientRects())}var c=new o(n),u,d,f,h,p=[],m=0,g,v;1==e?(u=c.next,d=s.isBelow,f=s.isAbove,h=a.after(i)):(u=c.prev,d=s.isAbove,f=s.isBelow,h=a.before(i)),v=l(h);do if(h.isVisible()&&(g=l(h),!f(g,v))){if(p.length>0&&d(g,t.last(p))&&m++,g=s.clone(g),g.position=h,g.line=m,r(g))return p;p.push(g)}while(h=u(h));return p}var h=e.curry,p=h(c,-1,s.isAbove,s.isBelow),m=h(c,1,s.isBelow,s.isAbove);return{upUntil:p,downUntil:m,positionsUntil:f,isAboveLine:h(u),isLine:h(d)}}),r(Ye,[z,p,_,qe,V,te,W],function(e,t,n,r,i,o,a){function s(e,t){return Math.abs(e.left-t)}function l(e,t){return Math.abs(e.right-t)}function c(e,n){function r(e,t){return e>=t.left&&e<=t.right}return t.reduce(e,function(e,t){var i,o;return i=Math.min(s(e,n),l(e,n)),o=Math.min(s(t,n),l(t,n)),r(n,t)?t:r(n,e)?e:o==i&&m(t.node)?t:i>o?t:e})}function u(e,t,n,r){for(;r=g(r,e,a.isEditableCaretCandidate,t);)if(n(r))return}function d(e,n){function o(e,i){var o;return o=t.filter(r.getClientRects(i),function(t){return!e(t,n)}),a=a.concat(o),0===o.length}var a=[];return a.push(n),u(-1,e,v(o,i.isAbove),n.node),u(1,e,v(o,i.isBelow),n.node),a}function f(e){return t.filter(t.toArray(e.getElementsByTagName("*")),m)}function h(e,t){return{node:e.node,before:s(e,t)=e.top&&i<=e.bottom}),a=c(o,n),a&&(a=c(d(e,a),n),a&&m(a.node))?h(a,n):null}var m=n.isContentEditableFalse,g=o.findNode,v=e.curry;return{findClosestClientRect:c,findLineNodeRects:d,closestCaret:p}}),r(Xe,[_,p,z],function(e,t,n){function r(e){function r(e){return i(e)}function a(t){f(e.getBody()).css("cursor",t)}function s(t){return t==g.element||e.dom.isChildOf(t,g.element)?!1:!i(t)}function l(t){var n,r,i,o,s=0,l=0,c,u,d,h;0===t.button&&(n=t.screenX-g.screenX,r=t.screenY-g.screenY,c=Math.max(Math.abs(n),Math.abs(r)),!g.dragging&&c>10&&(g.dragging=!0,a("default"),g.clone=g.element.cloneNode(!0),i=m.getPos(g.element),g.relX=g.clientX-i.x,g.relY=g.clientY-i.y,g.width=g.element.offsetWidth,g.height=g.element.offsetHeight,f(g.clone).css({width:g.width,height:g.height}).removeAttr("data-mce-selected"),g.ghost=f("
    ").css({position:"absolute",opacity:.5,overflow:"hidden",width:g.width,height:g.height}).attr({"data-mce-bogus":"all",unselectable:"on",contenteditable:"false"}).addClass("mce-drag-container mce-reset").append(g.clone).appendTo(e.getBody())[0],o=e.dom.getViewPort(e.getWin()),g.maxX=o.w,g.maxY=o.h),g.dragging&&(e.selection.placeCaretAt(t.clientX,t.clientY),u=g.clientX+n-g.relX,d=g.clientY+r+5,u+g.width>g.maxX&&(s=u+g.width-g.maxX),d+g.height>g.maxY&&(l=d+g.height-g.maxY),h="BODY"!=e.getBody().nodeName?e.getBody().getBoundingClientRect():{left:0,top:0},f(g.ghost).css({left:u-h.left,top:d-h.top,width:g.width-s,height:g.height-l})))}function c(){var t;if(g.dragging&&(e.selection.setRng(e.selection.getSel().getRangeAt(0)),s(e.selection.getNode()))){var n=g.element;if(t=e.fire("drop",{targetClone:n}),t.isDefaultPrevented())return;n=t.targetClone,e.undoManager.transact(function(){e.insertContent(m.getOuterHTML(n)),f(g.element).remove()})}d()}function u(a){var s,u;if(d(),0===a.button&&(s=t.find(e.dom.getParents(a.target),n.or(i,o)),r(s))){if(u=e.fire("dragstart",{target:s}),u.isDefaultPrevented())return;e.on("mousemove",l),e.on("mouseup",c),h!=p&&(m.bind(h,"mousemove",l),m.bind(h,"mouseup",c)),g={screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY,element:s}}}function d(){f(g.ghost).remove(),a(null),e.off("mousemove",l),e.off("mouseup",d),h!=p&&(m.unbind(h,"mousemove",l),m.unbind(h,"mouseup",d)),g={}}var f=e.$,h=document,p=e.getDoc(),m=e.dom,g={};e.on("mousedown",u),e.on("drop",function(t){var n=e.getDoc().elementFromPoint(t.clientX,t.clientY);(i(n)||i(e.dom.getContentEditableParent(n)))&&t.preventDefault()})}var i=e.isContentEditableFalse,o=e.isContentEditableTrue;return{init:r}}),r(Ke,[h,ne,$,k,te,$e,je,Ye,_,T,V,I,z,p,u,Xe,S],function(e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g){function v(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}function y(c){function y(e){return c.dom.isBlock(e)}function S(e){e&&c.selection.setRng(e)}function k(){return c.selection.getRng()}function T(e,t){c.selection.scrollIntoView(e,t)}function R(e,t,n){var r;return r=c.fire("ShowCaret",{target:t,direction:e,before:n}),r.isDefaultPrevented()?null:(T(t,-1===e),ne.show(n,t))}function A(e){var t;return ne.hide(),t=c.fire("BeforeObjectSelected",{target:e}),t.isDefaultPrevented()?null:B(e)}function B(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}function D(e,t){var n=i.isInSameBlock(e,t);return!n&&l.isBr(e.getNode())?!0:n}function M(e,t){return t=i.normalizeRange(e,Q,t),-1==e?n.fromRangeStart(t):n.fromRangeEnd(t)}function L(e){return r.isCaretContainerBlock(e.startContainer)}function P(e,t,n,r){var i,o,a,s;return!r.collapsed&&(i=_(r),x(i))?R(e,i,-1==e):(s=L(r),o=M(e,r),n(o)?A(o.getNode(-1==e)):(o=t(o))?n(o)?R(e,o.getNode(-1==e),1==e):(a=t(o),n(a)&&D(o,a)?R(e,a.getNode(-1==e),1==e):s?U(o.toRange()):null):s?r:null)}function H(e,t,n){var r,i,o,l,c,u,d,f,p;if(p=_(n),r=M(e,n),i=t(Q,a.isAboveLine(1),r),o=h.filter(i,a.isLine(1)),c=h.last(r.getClientRects()),N(r)&&(p=r.getNode()),E(r)&&(p=r.getNode(!0)),!c)return null;if(u=c.left,l=s.findClosestClientRect(o,u),l&&x(l.node))return d=Math.abs(u-l.left),f=Math.abs(u-l.right),R(e,l.node,f>d);if(p){var m=a.positionsUntil(e,Q,a.isAboveLine(1),p);if(l=s.findClosestClientRect(h.filter(m,a.isLine(1)),u))return U(l.position.toRange());if(l=h.last(h.filter(m,a.isLine(0))))return U(l.position.toRange())}}function O(t,r){function i(){var t=c.dom.create(c.settings.forced_root_block);return(!e.ie||e.ie>=11)&&(t.innerHTML='
    '),t}var o,a,s;if(r.collapsed&&c.settings.forced_root_block){if(o=c.dom.getParent(r.startContainer,"PRE"),!o)return;a=1==t?ee(n.fromRangeStart(r)):te(n.fromRangeStart(r)),a||(s=i(),1==t?c.$(o).after(s):c.$(o).before(s),c.selection.select(s,!0),c.selection.collapse())}}function I(e,t,n,r){var i;return(i=P(e,t,n,r))?i:(i=O(e,r),i?i:null)}function F(e,t,n){var r;return(r=H(e,t,n))?r:(r=O(e,n),r?r:null)}function z(){return oe("*[data-mce-caret]")[0]}function W(e){e=oe(e),e.attr("data-mce-caret")&&(ne.hide(),e.removeAttr("data-mce-caret"),e.removeAttr("data-mce-bogus"),e.removeAttr("style"),S(k()),T(e[0]))}function V(e){var t,r;return e=i.normalizeRange(1,Q,e),t=n.fromRangeStart(e),x(t.getNode())?R(1,t.getNode(),!t.isAtEnd()):x(t.getNode(!0))?R(1,t.getNode(!0),!1):(r=c.dom.getParent(t.getNode(),f.or(x,C)),x(r)?R(1,r,!1):(ne.hide(),null))}function U(e){var t;return e&&e.collapsed?(t=V(e),t?t:e):e}function $(e){var t,i,o,a;return x(e)?(x(e.previousSibling)&&(o=e.previousSibling),i=te(n.before(e)),i||(t=ee(n.after(e))),t&&w(t.getNode())&&(a=t.getNode()),r.remove(e.previousSibling),r.remove(e.nextSibling),c.dom.remove(e),G(),c.dom.isEmpty(c.getBody())?(c.setContent(""),void c.focus()):o?n.after(o).toRange():a?n.before(a).toRange():i?i.toRange():t?t.toRange():null):null}function q(e,t,n){var r,i;return!n.collapsed&&(r=_(n),x(r))?U($(r)):(i=M(e,n),t(i)?U($(i.getNode(-1==e))):void 0)}function j(){function e(e,t){var n=t(k());n&&!e.isDefaultPrevented()&&(e.preventDefault(),S(n))}function t(e){for(var t=c.getBody();e&&e!=t;){if(C(e)||x(e))return e;e=e.parentNode}return null}function r(e,t,n){return n.collapsed?!1:h.reduce(n.getClientRects(),function(n,r){return n||u.containsXY(r,e,t)},!1)}function i(){var e,r=t(c.selection.getNode());C(r)&&y(r)&&c.dom.isEmpty(r)&&(e=c.dom.create("br",{"data-mce-bogus":"1"}),c.$(r).empty().append(e),c.selection.setRng(n.before(e).toRange()))}function o(e){var t=z();if(t)return"compositionstart"==e.type?(e.preventDefault(),e.stopPropagation(),void W(t)):void(" "!=t.innerHTML&&W(t))}function l(e){var t;switch(e.keyCode){case d.DELETE:t=i();break;case d.BACKSPACE:t=i()}t&&e.preventDefault()}var f=b(I,1,ee,N),g=b(I,-1,te,E),v=b(q,1,N),w=b(q,-1,E),_=b(F,-1,a.upUntil),T=b(F,1,a.downUntil);c.on("mouseup",function(){var e=k();e.collapsed&&S(V(e))}),c.on("click",function(e){var n;n=t(e.target),n&&x(n)&&e.preventDefault()}),c.on("mousedown",function(e){var n;if(n=t(e.target))x(n)?(e.preventDefault(),K(A(n))):(G(),r(e.clientX,e.clientY,c.selection.getRng())||c.selection.placeCaretAt(e.clientX,e.clientY));else{G(),ne.hide();var i=s.closestCaret(Q,e.clientX,e.clientY);i&&(e.preventDefault(),c.getBody().focus(),S(R(1,i.node,i.before)))}}),c.on("keydown",function(t){if(!d.modifierPressed(t))switch(t.keyCode){case d.RIGHT:e(t,f);break;case d.DOWN:e(t,T);break;case d.LEFT:e(t,g);break;case d.UP:e(t,_);break;case d.DELETE:e(t,v);break;case d.BACKSPACE:e(t,w);break;default:x(c.selection.getNode())&&t.preventDefault()}}),c.on("keyup compositionstart",function(e){o(e),l(e)},!0),c.on("cut",function(){var e=c.selection.getNode();x(e)&&p.setEditorTimeout(c,function(){S(U($(e)))})}),c.on("getSelectionRange",function(e){var t=e.range;if(ie){if(!ie.parentNode)return void(ie=null);t=t.cloneRange(),t.selectNode(ie), -e.range=t}}),c.on("setSelectionRange",function(e){var t;t=K(e.range),t&&(e.range=t)}),c.on("focus",function(){p.setEditorTimeout(c,function(){c.selection.setRng(U(c.selection.getRng()))},0)}),m.init(c)}function Y(){var e=c.contentStyles,t=".mce-content-body";e.push(ne.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;width: 100px;height: 100px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")}function X(e){return r.isCaretContainer(e.startContainer)||r.isCaretContainer(e.endContainer)}function K(t){var n,r=c.$,i=c.dom,o,a,s,l,u,d,f,h,p;if(!t)return G(),null;if(t.collapsed){if(G(),!X(t)){if(f=M(1,t),x(f.getNode()))return R(1,f.getNode(),!f.isAtEnd());if(x(f.getNode(!0)))return R(1,f.getNode(!0),!1)}return null}return s=t.startContainer,l=t.startOffset,u=t.endOffset,3==s.nodeType&&0==l&&x(s.parentNode)&&(s=s.parentNode,l=i.nodeIndex(s),s=s.parentNode),1!=s.nodeType?(G(),null):(u==l+1&&(n=s.childNodes[l]),x(n)?(h=p=n.cloneNode(!0),d=c.fire("ObjectSelected",{target:n,targetClone:h}),d.isDefaultPrevented()?(G(),null):(h=d.targetClone,o=r("#"+re),0===o.length&&(o=r('
    ').attr("id",re),o.appendTo(c.getBody())),t=c.dom.createRng(),h===p&&e.ie?(o.empty().append(g.ZWSP).append(h).append(g.ZWSP),t.setStart(o[0].firstChild,0),t.setEnd(o[0].lastChild,1)):(o.empty().append("\xa0").append(h).append("\xa0"),t.setStart(o[0].firstChild,1),t.setEnd(o[0].lastChild,0)),o.css({top:i.getPos(n,c.getBody()).y}),c.getBody().focus(),o[0].focus(),a=c.selection.getSel(),a.removeAllRanges(),a.addRange(t),c.$("*[data-mce-selected]").removeAttr("data-mce-selected"),n.setAttribute("data-mce-selected",1),ie=n,t)):(G(),null))}function G(){ie&&(ie.removeAttribute("data-mce-selected"),c.$("#"+re).remove(),ie=null)}function J(){ne.destroy(),ie=null}var Q=c.getBody(),Z=new t(Q),ee=b(v,Z.next),te=b(v,Z.prev),ne=new o(c.getBody(),y),re="sel-"+c.dom.uniqueId(),ie,oe=c.$;return e.ceFalse&&(j(),Y()),{showBlockCaretContainer:W,destroy:J}}var b=f.curry,C=l.isContentEditableTrue,x=l.isContentEditableFalse,w=l.isElement,E=i.isAfterContentEditableFalse,N=i.isBeforeContentEditableFalse,_=c.getSelectedNode;return y}),r(Ge,[w,g,N,R,A,H,P,Y,J,Q,Z,ee,re,ie,E,d,Te,Me,B,M,Pe,h,m,u,He,Oe,Ie,Ue,Ke],function(e,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C,x,w,E,N,_,S,k,T,R){function A(e,t,i){var o=this,a,s,l;a=o.documentBaseUrl=i.documentBaseURL,s=i.baseURI,l=i.defaultSettings,t=L({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:a,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:"",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",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,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,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o,ie7_compat:!0},l,t),l&&l.external_plugins&&t.external_plugins&&(t.external_plugins=L({},l.external_plugins,t.external_plugins)),o.settings=t,r.language=t.language||"en",r.languageLoad=t.language_load,r.baseURL=i.baseURL,o.id=t.id=e,o.setDirty(!1),o.plugins={},o.documentBaseURI=new p(t.document_base_url||a,{base_uri:s}),o.baseURI=s,o.contentCSS=[],o.contentStyles=[],o.shortcuts=new k(o),o.loadedCSS={},o.editorCommands=new h(o),t.target&&(o.targetElm=t.target),o.suffix=i.suffix,o.editorManager=i,o.inline=t.inline,t.cache_suffix&&(w.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),t.override_viewport===!1&&(w.overrideViewPort=!1),i.fire("SetupEditor",o),o.execCallback("setup",o),o.$=n.overrideDefaults(function(){return{context:o.inline?o.getBody():o.getDoc(),element:o.getBody()}})}var B=e.DOM,D=r.ThemeManager,M=r.PluginManager,L=E.extend,P=E.each,H=E.explode,O=E.inArray,I=E.trim,F=E.resolve,z=g.Event,W=w.gecko,V=w.ie;return A.prototype={render:function(){function e(){B.unbind(window,"ready",e),n.render()}function t(){var e=m.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!D.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+o+".js",D.load(r.theme,t)}E.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),P(r.external_plugins,function(e,t){M.load(t,e),r.plugins+=" "+t}),P(r.plugins.split(/[ ,]/),function(e){if(e=I(e),e&&!M.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=M.dependencies(e);P(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=M.createUrl(t,e),M.load(e.resource,e)})}else M.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;if(!z.domLoaded)return void B.bind(window,"ready",e);if(n.getElement()&&w.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var a=n.getElement().form||B.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(B.insertAfter(B.create("input",{type:"hidden",name:i}),i),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},B.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.setDirty(!1),a._mceOldSubmit(a)})),n.windowManager=new v(n),n.notificationManager=new y(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=B.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),t()}},init:function(){function e(n){var r=M.get(n),i,o;if(i=M.urls[n]||t.documentBaseUrl.replace(/\/$/,""),n=I(n),r&&-1===O(m,n)){if(P(M.dependencies(n),function(t){e(t)}),t.plugins[n])return;o=new r(t,i,t.$),t.plugins[n]=o,o.init&&(o.init(t,i),m.push(n))}}var t=this,n=t.settings,r=t.getElement(),i,o,a,s,l,c,u,d,f,h,p,m=[];if(this.editorManager.i18n.setCode(n.language),t.rtl=n.rtl_ui||this.editorManager.i18n.rtl,t.editorManager.add(t),n.aria_label=n.aria_label||B.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),n.theme&&("function"!=typeof n.theme?(n.theme=n.theme.replace(/-/,""),c=D.get(n.theme),t.theme=new c(t,D.urls[n.theme]),t.theme.init&&t.theme.init(t,D.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""),t.$)):t.theme=n.theme),P(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),n.render_ui&&t.theme&&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,h=/^[0-9\.]+(|px)$/i,h.test(""+i)&&(i=Math.max(parseInt(i,10),100)),h.test(""+o)&&(o=Math.max(parseInt(o,10),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,deltaHeight:n.delta_height}),n.content_editable||(o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&P(H(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();if(t.iframeHTML=n.doctype+"",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+=''),!w.caretAfter&&n.ie7_compat&&(t.iframeHTML+=''),t.iframeHTML+='',!/#$/.test(document.location.href))for(p=0;p',t.loadedCSS[g]=!0}d=n.body_id||"tinymce",-1!=d.indexOf("=")&&(d=t.getParam("body_id","","hash"),d=d[t.id]||d),f=n.body_class||"",-1!=f.indexOf("=")&&(f=t.getParam("body_class","","hash"),f=f[t.id]||""),n.content_security_policy&&(t.iframeHTML+=''),t.iframeHTML+='
    ';var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&w.ie&&w.ie<12&&(u=v);var y=B.create("iframe",{id:t.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}});if(y.onload=function(){y.onload=null,t.fire("load")},B.setAttrib(y,"src",u||'javascript:""'),t.contentAreaContainer=l.iframeContainer,t.iframeElement=y,s=B.add(l.iframeContainer,y),V)try{t.getDoc()}catch(b){s.src=u=v}l.editorContainer&&(B.get(l.editorContainer).style.display=t.orgDisplay,t.hidden=B.isHidden(l.editorContainer)),t.getElement().style.display="none",B.setAttrib(t.id,"aria-hidden",!0),u||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,r=n.settings,s=n.getElement(),h=n.getDoc(),p,m;r.inline||(n.getElement().style.visibility=n.orgVisibility),t||r.content_editable||(h.open(),h.write(n.iframeHTML),h.close()),r.content_editable&&(n.on("remove",function(){var e=this.getBody();B.removeClass(e,"mce-content-body"),B.removeClass(e,"mce-edit-focus"),B.setAttrib(e,"contentEditable",null)}),B.addClass(s,"mce-content-body"),n.contentDocument=h=r.content_document||document,n.contentWindow=r.content_window||window,n.bodyElement=s,r.content_document=r.content_window=null,r.root_name=s.nodeName.toLowerCase()),p=n.getBody(),p.disabled=!0,n.readonly=r.readonly,n.readonly||(n.inline&&"static"==B.getStyle(p,"position",!0)&&(p.style.position="relative"),p.contentEditable=n.getParam("content_editable_state",!0)),p.disabled=!1,n.editorUpload=new T(n),n.schema=new b(r),n.dom=new e(h,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:r.force_hex_style_colors,class_filter:r.class_filter,update_styles:!0,root_element:n.inline?n.getBody():null,collect:r.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e)}}),n.parser=new C(r,n.schema),n.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)if(i=e[r],a=i.attr(t),s="data-mce-"+t,!i.attributes.map[s]){if(0===a.indexOf("data:")||0===a.indexOf("blob:"))continue;"style"===t?(a=o.serializeStyle(o.parseStyle(a),i.name),a.length||(a=null),i.attr(s,a),i.attr(t,a)):"tabindex"===t?(i.attr(s,a),i.attr(t,null)):i.attr(s,n.convertURL(a,t,i.name))}}),n.parser.addNodeFilter("script",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("type")||"no/type",0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,r,i=n.schema.getNonEmptyElements();t--;)r=e[t],r.isEmpty(i)&&(r.append(new o("br",1)).shortEnded=!0)}),n.serializer=new a(r,n),n.selection=new l(n.dom,n.getWin(),n.serializer,n),n.formatter=new c(n),n.undoManager=new u(n),n.forceBlocks=new f(n),n.enterKey=new d(n),n._nodeChangeDispatcher=new i(n),n._selectionOverrides=new R(n),n.fire("PreInit"),r.browser_spellcheck||r.gecko_spellcheck||(h.body.spellcheck=!1,B.setAttrib(p,"spellcheck","false")),n.fire("PostRender"),n.quirks=new x(n),r.directionality&&(p.dir=r.directionality),r.nowrap&&(p.style.whiteSpace="nowrap"),r.protect&&n.on("BeforeSetContent",function(e){P(r.protect,function(t){e.content=e.content.replace(t,function(e){return""})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),r.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,n.bindPendingEventDelegates(),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.on("compositionstart compositionend",function(e){n.composing="compositionstart"===e.type}),n.contentStyles.length>0&&(m="",P(n.contentStyles,function(e){m+=e+"\r\n"}),n.dom.addStyle(m)),P(n.contentCSS,function(e){n.loadedCSS[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),r.auto_focus&&N.setEditorTimeout(n,function(){var e;e=r.auto_focus===!0?n:n.editorManager.get(r.auto_focus),e.destroyed||e.focus()},100),s=h=p=null},focus:function(e){function t(e){return n.dom.getParent(e,function(e){return"true"===n.dom.getContentEditable(e)})}var n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l=n.getBody(),c;if(!e){if(o=r.getRng(),o.item&&(a=o.item(0)),n.quirks.refreshContentEditable(),c=t(r.getNode()),n.$.contains(l,c))return c.focus(),r.normalize(),void n.editorManager.setActive(n);if(i||(w.opera||n.getBody().focus(),n.getWin().focus()),W||i){if(l.setActive)try{l.setActive()}catch(u){l.focus()}else l.focus();i&&r.normalize()}a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())}n.editorManager.setActive(n)},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?F(r):0,n=F(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?P(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){e=e.split("="),e.length>1?i[I(e[0])]=I(e[1]):i[I(e[0])]=I(e)}):i=r,i):r},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addContextToolbar:function(e,t){var n=this,r;n.contextToolbars=n.contextToolbars||[],"string"==typeof e&&(r=e,e=function(e){return n.dom.is(e,r)}),n.contextToolbars.push({predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(B.show(e.getContainer()),B.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(V&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(B.hide(e.getContainer()),B.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initialized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),"raw"==e.format&&t.fire("RawSaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(t.inline||(n.innerHTML=r),(i=B.getParent(t.id,"form"))&&P(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&t.setDirty(!1),r},setContent:function(e,t){var n=this,r=n.getBody(),i,o;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(o=V&&11>V?"":'
    ',"TABLE"==r.nodeName?e="
    ":/^(UL|OL)$/.test(r.nodeName)&&(e="
  • "+o+"
  • "),i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=o,e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):V||e||(e='
    '),n.dom.setHTML(r,e),n.fire("SetContent",t)):("raw"!==t.format&&(e=new s({validate:n.validate},n.schema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=I(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?t.serializer.getTrimmedContent():"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),"text"!=e.format?e.content=I(n):e.content=n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=L({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!=t&&this.fire("dirty")},setMode:function(e){S.setMode(this,e)},getContainer:function(){var e=this;return e.container||(e.container=B.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=B.get(this.id)),this.targetElm},getWin:function(){var e=this,t;return e.contentWindow||(t=e.iframeElement,t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),P(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border"),void(t&&"0"!=t||!n.hasVisual?i.removeClass(e,o):i.addClass(e,o));case"A":return void(i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o=r.visual_anchor_class||"mce-item-anchor",t&&n.hasVisual?i.addClass(e,o):i.removeClass(e,o)))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&B.remove(e.getElement().nextSibling),e.inline||(V&&10>V&&e.getDoc().execCommand("SelectAll",!1,null),B.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),B.remove(e.getContainer()),e._selectionOverrides.destroy(),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t=this,n;if(!t.destroyed){if(!e&&!t.removed)return void t.remove();e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),B.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},L(A.prototype,_),A}),r(Je,[],function(){var e={},t="en";return{setCode:function(e){e&&(t=e,this.rtl=this.data[e]?"rtl"===this.data[e]._dir:!1)},getCode:function(){return t},rtl:!1,add:function(t,n){var r=e[t];r||(e[t]=r={});for(var i in n)r[i]=n[i];this.setCode(t)},translate:function(n){var r;if(r=e[t],r||(r={}),"undefined"==typeof n)return n;if("string"!=typeof n&&n.raw)return n.raw;if(n.push){var i=n.slice(1);n=(r[n[0]]||n[0]).replace(/\{([0-9]+)\}/g,function(e,t){return i[t]})}return(r[n]||n).replace(/{context:\w+}$/,"")},data:e}}),r(Qe,[w,u,h],function(e,t,n){function r(e){function l(){try{return document.activeElement}catch(e){return document.body}}function c(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function u(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function d(e){return!!s.getParent(e,r.isEditorUIElement)}function f(r){var f=r.editor;f.on("init",function(){(f.inline||n.ie)&&("onbeforedeactivate"in document&&n.ie<9?f.dom.bind(f.getBody(),"beforedeactivate",function(e){if(e.target==f.getBody())try{f.lastRng=f.selection.getRng()}catch(t){}}):f.on("nodechange mouseup keyup",function(e){var t=l();"nodechange"==e.type&&e.selectionChange||(t&&t.id==f.id+"_ifr"&&(t=f.getBody()),f.dom.isChildOf(t,f.getBody())&&(f.lastRng=f.selection.getRng()))}),n.webkit&&!i&&(i=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(f.lastRng=n)}},s.bind(document,"selectionchange",i)))}),f.on("setcontent",function(){f.lastRng=null}),f.on("mousedown",function(){f.selection.lastFocusBookmark=null}),f.on("focusin",function(){var t=e.focusedEditor,n;f.selection.lastFocusBookmark&&(n=u(f,f.selection.lastFocusBookmark),f.selection.lastFocusBookmark=null,f.selection.setRng(n)),t!=f&&(t&&t.fire("blur",{focusedEditor:f}),e.setActive(f),e.focusedEditor=f,f.fire("focus",{blurredEditor:t}),f.focus(!0)),f.lastRng=null}),f.on("focusout",function(){t.setEditorTimeout(f,function(){var t=e.focusedEditor;d(l())||t!=f||(f.fire("blur",{focusedEditor:null}),e.focusedEditor=null,f.selection&&(f.selection.lastFocusBookmark=null))})}),o||(o=function(t){var n=e.activeEditor,r;r=t.target,n&&r.ownerDocument==document&&(n.selection&&r!=n.getBody()&&(n.selection.lastFocusBookmark=c(n.dom,n.lastRng)),r==document.body||d(r)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},s.bind(document,"focusin",o)),f.inline&&!a&&(a=function(t){var n=e.activeEditor;if(n.inline&&!n.dom.isChildOf(t.target,n.getBody())){var r=n.selection.getRng();r.collapsed||(n.lastRng=r)}},s.bind(document,"mouseup",a))}function h(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(s.unbind(document,"selectionchange",i),s.unbind(document,"focusin",o),s.unbind(document,"mouseup",a),i=o=a=null)}e.on("AddEditor",f),e.on("RemoveEditor",h)}var i,o,a,s=e.DOM;return r.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},r}),r(Ze,[Ge,g,w,ie,h,m,c,le,Je,Qe],function(e,t,n,r,i,o,a,s,l,c){function u(e){g(C.editors,function(t){"scroll"===e.type?t.fire("ScrollWindow",e):t.fire("ResizeWindow",e)})}function d(e,n){n!==x&&(n?t(window).on("resize scroll",u):t(window).off("resize scroll",u),x=n)}function f(e){var t=C.editors,n;delete t[e.id];for(var r=0;r0&&g(m(t),function(e){var t;(t=p.get(e))?n.push(t):g(document.forms,function(t){g(t.elements,function(t){t.name===e&&(e="mce_editor_"+y++,p.setAttrib(t,"id",e),n.push(t))})})});break;case"textareas":case"specific_textareas":g(p.select("textarea"),function(t){e.editor_deselector&&s(t,e.editor_deselector)||e.editor_selector&&!s(t,e.editor_selector)||n.push(t)})}return n}function c(){function a(t,n,r){if(!h(u.get(t))){var i=new e(t,n,u);d.push(i),i.on("init",function(){++s===m.length&&f(d)}),i.targetElm=i.targetElm||r,i.render()}}var s=0,d=[],m;return p.unbind(window,"ready",c),i("onpageload"),m=t.unique(l(n)),n.types?void g(n.types,function(e){o.each(m,function(t){return p.is(t,e.selector)?(a(r(t),v({},n,e),t),!1):!0})}):void g(m,function(e){a(r(e),n,e)})}var u=this,d,f=function(e){d=e};return u.settings=n,p.bind(window,"ready",c),new a(function(e){d?e(d):f=function(t){e(t)}})},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),d(n,!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),b||(b=function(){t.fire("BeforeUnload")},p.bind(window,"beforeunload",b)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i;{if(e)return"string"==typeof e?(e=e.selector||e,void g(p.select(e),function(e){i=r[e.id],i&&t.remove(i)})):(i=e,r[i.id]?(f(i)&&t.fire("RemoveEditor",{editor:i}),r.length||p.unbind(window,"beforeunload",b),i.remove(),d(r,r.length>0),i):null);for(n=r.length-1;n>=0;n--)t.remove(r[n])}},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){g(this.editors,function(e){e.save()})},addI18n:function(e,t){l.add(e,t)},translate:function(e){return l.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}},v(C,s),C.setup(),window.tinymce=window.tinyMCE=C,C}),r(et,[Ze,m],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(n,r){"html4"===t.settings.schema&&e(r,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(tt,[le,m],function(e,t){var n={send:function(e){function r(){!e.async||4==i.readyState||o++>1e4?(e.success&&1e4>o&&200==i.status?e.success.call(e.success_scope,""+i.responseText,i,e):e.error&&e.error.call(e.error_scope,o>1e4?"TIMED_OUT":"GENERAL",i,e),i=null):setTimeout(r,10)}var i,o=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async!==!1,e.data=e.data||"",n.fire("beforeInitialize",{settings:e}),i=new XMLHttpRequest){if(i.overrideMimeType&&i.overrideMimeType(e.content_type),i.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(i.withCredentials=!0),e.content_type&&i.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&t.each(e.requestheaders,function(e){i.setRequestHeader(e.key,e.value)}),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i=n.fire("beforeSend",{xhr:i,settings:e}).xhr,i.send(e.data),!e.async)return r();setTimeout(r,10)}}};return t.extend(n,e),n}),r(nt,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):""); -return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}}),r(rt,[nt,tt,m],function(e,t,n){function r(e){this.settings=i({},e),this.count=0}var i=n.extend;return r.sendRPC=function(e){return(new r).send(e)},r.prototype={send:function(n){var r=n.error,o=n.success;n=i(this.settings,n),n.success=function(t,i){t=e.parse(t),"undefined"==typeof t&&(t={error:"JSON Parse error."}),t.error?r.call(n.error_scope||n.scope,t.error,i):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},r}),r(it,[w],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),r.count++}}}),r(ot,[],function(){function e(){s=[];for(var e in a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return r=e!==t?u+e:i.indexOf(",",u),-1===r||r>i.length?null:(n=i.substring(u,r),u=r+1,n)}var r,i,s,u=0;if(a={},c){o.load(l),i=o.getAttribute(l)||"";do{var d=n();if(null===d)break;if(r=n(parseInt(d,32)||0),null!==r){if(d=n(),null===d)break;s=n(parseInt(d,32)||0),r&&(a[r]=s)}}while(null!==r);e()}}function r(){var t,n="";if(c){for(var r in a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n);try{o.save(l)}catch(i){}e()}}var i,o,a,s,l,c;try{if(window.localStorage)return localStorage}catch(u){}return l="tinymce",o=document.documentElement,c=!!o.addBehavior,c&&o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i}),r(at,[w,d,E,N,m,h],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each(i,function(e,t){a[t]=e}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r(st,[oe,m],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t=this,n=t.settings,r,i,o,a;r=n.firstControlClass,i=n.lastControlClass,e.each(function(e){e.classes.remove(r).remove(i).add(n.controlClass),e.visible()&&(o||(o=e),a=e)}),o&&o.classes.add(r),a&&a.classes.add(i)},renderHtml:function(e){var t=this,n="";return t.applyClasses(e.items()),e.items().each(function(e){n+=e.renderHtml()}),n},recalc:function(){},postRender:function(){},isNative:function(){return!1}})}),r(lt,[st],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'
    '+this._super(e)}})}),r(ct,[Ae],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t=this,n;t._super(e),e=t.settings,n=t.settings.size,t.on("click mousedown",function(e){e.preventDefault()}),t.on("touchstart",function(e){t.fire("click",e),e.preventDefault()}),e.subtype&&t.classes.add(e.subtype),n&&t.classes.add("btn-"+n),e.icon&&t.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e=this.getEl().firstChild,t;e&&(t=e.style,t.width=t.height="100%"),this._super()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("icon"),i,o=e.state.get("text"),a="";return i=e.settings.image,i?(r="none","string"!=typeof i&&(i=window.getSelection?i[0]:i[1]),i=" style=\"background-image: url('"+i+"')\""):i="",o&&(e.classes.add("btn-has-text"),a=''+e.encode(o)+""),r=e.settings.icon?n+"ico "+n+"i-"+r:"",'
    "},bindStates:function(){function e(e){var i=n("span."+r,t.getEl());e?(i[0]||(n("button:first",t.getEl()).append(''),i=n("span."+r,t.getEl())),i.html(t.encode(e))):i.remove(),t.classes.toggle("btn-has-text",!!e)}var t=this,n=t.$,r=t.classPrefix+"txt";return t.state.on("change:text",function(t){e(t.value)}),t.state.on("change:icon",function(n){var r=n.value,i=t.classPrefix;t.settings.icon=r,r=r?i+"ico "+i+"i-"+t.settings.icon:"";var o=t.getEl().firstChild,a=o.getElementsByTagName("i")[0];r?(a&&a==o.firstChild||(a=document.createElement("i"),o.insertBefore(a,o.firstChild)),a.className=r):a&&o.removeChild(a),e(t.state.get("text"))}),t._super()}})}),r(ut,[be],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),'
    '+(e.settings.html||"")+t.renderHtml(e)+"
    "}})}),r(dt,[Ae],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'
    '+e.encode(e.state.get("text"))+"
    "},bindStates:function(){function e(e){t.classes.toggle("checked",e),t.aria("checked",e)}var t=this;return t.state.on("change:text",function(e){t.getEl("al").firstChild.data=t.translate(e.value)}),t.state.on("change:checked change:value",function(n){t.fire("change"),e(n.value)}),t.state.on("change:icon",function(e){var n=e.value,r=t.classPrefix;if("undefined"==typeof n)return t.settings.icon;t.settings.icon=n,n=n?r+"ico "+r+"i-"+t.settings.icon:"";var i=t.getEl().firstChild,o=i.getElementsByTagName("i")[0];n?(o&&o==i.firstChild||(o=document.createElement("i"),i.insertBefore(o,i.firstChild)),o.className=n):o&&i.removeChild(o)}),t.state.get("checked")&&e(!0),t._super()}})}),r(ft,[Ae,ve,fe,g],function(e,t,n,r){return e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.classes.add("combobox"),t.subinput=!0,t.ariaTarget="inp",e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){var i=n.target,o=t.getEl();if(r.contains(o,i)||i==o)for(;i&&i!=o;)i.id&&-1!=i.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),i=i.parentNode}),t.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&t.parents().reverse().each(function(n){var r=t.state.get("value"),i=t.getEl("inp").value;return e.preventDefault(),t.state.set("value",i),r!=i&&t.fire("change"),n.hasEventListeners("submit")&&n.toJSON?(n.fire("submit",{data:n.toJSON()}),!1):void 0})}),t.on("keyup",function(e){"INPUT"==e.target.nodeName&&t.state.set("value",e.target.value)})},showMenu:function(){var e=this,n=e.settings,r;e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()==e.value())})}).fire("show"),e.menu.on("select",function(t){e.value(t.control.value())}),e.on("focusin",function(t){"INPUT"==t.target.tagName.toUpperCase()&&e.menu.hide()}),e.aria("expanded",!0)),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e=this,t=e.getEl(),i=e.getEl("open"),o=e.layoutRect(),a,s;a=i?o.w-n.getSize(i).width-10:o.w-10;var l=document;return l.all&&(!l.documentMode||l.documentMode<=8)&&(s=e.layoutRect().h-2+"px"),r(t.firstChild).css({width:a,lineHeight:s}),e._super(),e},postRender:function(){var e=this;return r(this.getEl("inp")).on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)}),e._super()},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=e.state.get("value")||"",o,a,s="",l="";return"spellcheck"in n&&(l+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(l+=' maxlength="'+n.maxLength+'"'),n.size&&(l+=' size="'+n.size+'"'),n.subtype&&(l+=' type="'+n.subtype+'"'),e.disabled()&&(l+=' disabled="disabled"'),o=n.icon,o&&"caret"!=o&&(o=r+"ico "+r+"i-"+n.icon),a=e.state.get("text"),(o||a)&&(s='
    ",e.classes.add("has-open")),'
    '+s+"
    "},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl("inp").value!=t.value&&(e.getEl("inp").value=t.value)}),e.state.on("change:disabled",function(t){e.getEl("inp").disabled=t.value}),e._super()},remove:function(){r(this.getEl("inp")).off(),this._super()}})}),r(ht,[ft],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl().getElementsByTagName("i")[0];if(t)try{t.style.background=e}catch(n){}},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e._rendered&&e.repaintColor(t.value)}),e._super()}})}),r(pt,[ct,_e],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var r=n.panel;r.type&&(r={layout:"grid",items:r}),r.role=r.role||"dialog",r.popover=!0,r.autohide=!0,r.ariaRoot=!0,e.panel=new t(r).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),r(mt,[pt,w],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("text"),i=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",a="";return r&&(e.classes.add("btn-has-text"),a=''+e.encode(r)+""),'
    '},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=e||n.getParent(r.target,"."+e.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(e,r))}),delete e.settings.onclick,e._super()}})}),r(gt,[],function(){function e(e){function i(e,i,o){var a,s,l,c,u,d;return a=0,s=0,l=0,e/=255,i/=255,o/=255,u=t(e,t(i,o)),d=n(e,n(i,o)),u==d?(l=u,{h:0,s:0,v:100*l}):(c=e==u?i-o:o==u?e-i:o-e,a=e==u?3:o==u?1:5,a=60*(a-c/(d-u)),s=(d-u)/d,l=d,{h:r(a),s:r(100*s),v:r(100*l)})}function o(e,i,o){var a,s,l,c;if(e=(parseInt(e,10)||0)%360,i=parseInt(i,10)/100,o=parseInt(o,10)/100,i=n(0,t(i,1)),o=n(0,t(o,1)),0===i)return void(d=f=h=r(255*o));switch(a=e/60,s=o*i,l=s*(1-Math.abs(a%2-1)),c=o-s,Math.floor(a)){case 0:d=s,f=l,h=0;break;case 1:d=l,f=s,h=0;break;case 2:d=0,f=s,h=l;break;case 3:d=0,f=l,h=s;break;case 4:d=l,f=0,h=s;break;case 5:d=s,f=0,h=l;break;default:d=f=h=0}d=r(255*(d+c)),f=r(255*(f+c)),h=r(255*(h+c))}function a(){function e(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+e(d)+e(f)+e(h)}function s(){return{r:d,g:f,b:h}}function l(){return i(d,f,h)}function c(e){var t;return"object"==typeof e?"r"in e?(d=e.r,f=e.g,h=e.b):"v"in e&&o(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(d=parseInt(t[1],10),f=parseInt(t[2],10),h=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(d=parseInt(t[1],16),f=parseInt(t[2],16),h=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(d=parseInt(t[1]+t[1],16),f=parseInt(t[2]+t[2],16),h=parseInt(t[3]+t[3],16)),d=0>d?0:d>255?255:d,f=0>f?0:f>255?255:f,h=0>h?0:h>255?255:h,u}var u=this,d=0,f=0,h=0;e&&c(e),u.toRgb=s,u.toHsv=l,u.toHex=a,u.parse=c}var t=Math.min,n=Math.max,r=Math.round;return e}),r(vt,[Ae,Ce,fe,gt],function(e,t,n,r){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){function e(e,t){var r=n.getPos(e),i,o;return i=t.pageX-r.x,o=t.pageY-r.y,i=Math.max(0,Math.min(i/e.clientWidth,1)),o=Math.max(0,Math.min(o/e.clientHeight,1)),{x:i,y:o}}function i(e,t){var i=(360-e.h)/360;n.css(d,{top:100*i+"%"}),t||n.css(h,{left:e.s+"%",top:100-e.v+"%"}),f.style.background=new r({s:100,v:100,h:e.h}).toHex(),s.color().parse({s:e.s,v:e.v,h:e.h})}function o(t){var n;n=e(f,t),c.s=100*n.x,c.v=100*(1-n.y),i(c),s.fire("change")}function a(t){var n;n=e(u,t),c=l.toHsv(),c.h=360*(1-n.y),i(c,!0),s.fire("change")}var s=this,l=s.color(),c,u,d,f,h;u=s.getEl("h"),d=s.getEl("hp"),f=s.getEl("sv"),h=s.getEl("svp"),s._repaint=function(){c=l.toHsv(),i(c)},s._super(),s._svdraghelper=new t(s._id+"-sv",{start:o,drag:o}),s._hdraghelper=new t(s._id+"-h",{start:a,drag:a}),s._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){var t=this;return arguments.length?(t.color().parse(e),void(t._rendered&&t._repaint())):t.color().toHex()},color:function(){return this._color||(this._color=new r),this._color},renderHtml:function(){function e(){var e,t,n="",i,a;for(i="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",a=o.split(","),e=0,t=a.length-1;t>e;e++)n+='
    ';return n}var t=this,n=t._id,r=t.classPrefix,i,o="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000",a="background: -ms-linear-gradient(top,"+o+");background: linear-gradient(to bottom,"+o+");";return i='
    '+e()+'
    ','
    '+i+"
    "}})}),r(yt,[Ae],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.classes.add("path"),t.canFocus=!0,t.on("click",function(e){var n,r=e.target;(n=r.getAttribute("data-index"))&&t.fire("select",{value:t.row()[n],index:n})}),t.row(t.settings.row)},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){var e=this;return'
    '+e._getDataPathHtml(e.state.get("row"))+"
    "},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(e){var t=this,n=e||[],r,i,o="",a=t.classPrefix;for(r=0,i=n.length;i>r;r++)o+=(r>0?'":"")+'
    '+n[r].name+"
    ";return o||(o='
    \xa0
    '),o}})}),r(bt,[yt,Ze],function(e,t){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var n=this,r=t.activeEditor;return r.settings.elementpath!==!1&&(n.on("select",function(e){r.focus(),r.selection.select(this.row()[e.index].element),r.nodeChanged()}),r.on("nodeChange",function(t){for(var i=[],o=t.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=r.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});if(s.isDefaultPrevented()||i.push({name:s.name,element:o[a]}),s.isPropagationStopped())break}n.row(i)})),n._super()}})}),r(Ct,[be],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'
    '+(e.settings.title?'
    '+e.settings.title+"
    ":"")+'
    '+(e.settings.html||"")+t.renderHtml(e)+"
    "}})}),r(xt,[be,Ct,m],function(e,t,n){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,r=e.items();e.settings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),r.each(function(r){var i,o=r.settings.label;o&&(i=new t(n.extend({items:{type:"label",id:r._id+"-l",text:o,flex:0,forId:r._id,disabled:r.disabled()}},e.settings.formItemDefaults)),i.type="formitem",r.aria("labelledby",r._id+"-l"),"undefined"==typeof r.settings.flex&&(r.settings.flex=1),e.replace(r,i),i.add(r))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.fromJSON(e.settings.data)},bindStates:function(){function e(){var e=0,n=[],r,i,o;if(t.settings.labelGapCalc!==!1)for(o="children"==t.settings.labelGapCalc?t.find("formitem"):t.items(),o.filter("formitem").each(function(t){var r=t.items()[0],i=r.getEl().clientWidth;e=i>e?i:e,n.push(r)}),i=t.settings.labelGap||0,r=n.length;r--;)n[r].settings.minWidth=e+i}var t=this;t._super(),t.on("show",e),e()}})}),r(wt,[xt],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'
    '+(e.settings.title?''+e.settings.title+"":"")+'
    '+(e.settings.html||"")+t.renderHtml(e)+"
    "}})}),r(Et,[ft,m],function(e,t){return e.extend({init:function(e){var n=this,r=tinymce.activeEditor,i=r.settings,o,a,s;e.spellcheck=!1,s=i.file_picker_types||i.file_browser_callback_types,s&&(s=t.makeMap(s,/[, ]/)),s&&!s[e.filetype]||(a=i.file_picker_callback,!a||s&&!s[e.filetype]?(a=i.file_browser_callback,!a||s&&!s[e.filetype]||(o=function(){a(n.getEl("inp").id,n.value(),e.filetype,window)})):o=function(){var i=n.fire("beforecall").meta;i=t.extend({filetype:e.filetype},i),a.call(r,function(e,t){n.value(e).fire("change",{meta:t})},n.value(),i)}),o&&(e.icon="browse",e.onaction=o),n._super(e)}})}),r(Nt,[lt],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r(_t,[lt],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v=[],y,b,C,x,w,E,N,_,S,k,T,R,A,B,D,M,L,P,H,O,I,F,z=Math.max,W=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e.paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,"row-reversed"!=f&&"column-reverse"!=f||(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(S="y",N="h",_="minH",k="maxH",R="innerH",T="top",A="deltaH",B="contentH",H="left",L="w",D="x",M="innerW",P="minW",O="right",I="deltaW",F="contentW"):(S="x",N="w",_="minW",k="maxW",R="innerW",T="left",A="deltaW",B="contentW",H="top",L="h",D="y",M="innerH",P="minH",O="bottom",I="deltaH",F="contentH"),d=i[R]-o[T]-o[T],E=u=0,t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),m=h.settings,g=m.flex,d-=n-1>t?c:0,g>0&&(u+=g,p[k]&&v.push(h),p.flex=g),d-=p[_],y=o[H]+p[P]+o[O],y>E&&(E=y);if(x={},0>d?x[_]=i[_]-d+i[A]:x[_]=i[R]-d+i[A],x[P]=E+i[I],x[B]=i[R]-d,x[F]=E,x.minW=W(x.minW,i.maxW),x.minH=W(x.minH,i.maxH),x.minW=z(x.minW,i.startMinWidth),x.minH=z(x.minH,i.startMinHeight),!i.autoResize||x.minW==i.minW&&x.minH==i.minH){for(C=d/u,t=0,n=v.length;n>t;t++)h=v[t],p=h.layoutRect(),b=p[k],y=p[_]+p.flex*C,y>b?(d-=p[k]-p[_],u-=p.flex,p.flex=0,p.maxFlexSize=b):p.maxFlexSize=0;for(C=d/u,w=o[T],x={},0===u&&("end"==l?w=d+o[T]:"center"==l?(w=Math.round(i[R]/2-(i[R]-d)/2)+o[T],0>w&&(w=o[T])):"justify"==l&&(w=o[T],c=Math.floor(d/(r.length-1)))),x[D]=o[H],t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),y=p.maxFlexSize||p[_],"center"===s?x[D]=Math.round(i[M]/2-p[L]/2):"stretch"===s?(x[L]=z(p[P]||0,i[M]-o[H]-o[O]),x[D]=o[H]):"end"===s&&(x[D]=i[M]-p[L]-o.top),p.flex>0&&(y+=p.flex*C),x[N]=y,x[S]=w,h.layoutRect(x),h.recalc&&h.recalc(),w+=y+c}else if(x.w=x.minW,x.h=x.minH,e.layoutRect(x),this.recalc(e),null===e._lastRect){var V=e.parent();V&&(V._lastRect=null,V.recalc())}}})}),r(St,[st],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}})}),r(kt,[ge,Ae,_e,m,Ze,h],function(e,t,n,r,i,o){function a(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;s(i.parents,function(e){return s(t,function(t){return n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a?!1:void 0}),a?!1:void 0}),r.value(a)})}}function r(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}function i(){function t(e){var n=[];if(e)return s(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{var a=e.format||"custom"+r++;e.format||(e.name=a,i.push(e)),o.format=a,o.cmd=e.cmd}n.push(o)}),n}function n(){var n;return n=t(e.settings.style_formats_merge?e.settings.style_formats?o.concat(e.settings.style_formats):o:e.settings.style_formats||o)}var r=0,i=[],o=[{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"}]}];return e.on("init",function(){s(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:n(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){return this.settings.format?e.formatter.getCssText(this.settings.format):void 0},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,r;n=t.settings.format,n&&(t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))),r=t.settings.cmd,r&&t.active(e.queryCommandState(r))})},onclick:function(){this.settings.format&&c(this.settings.format),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}function o(t){return function(){var n=this;e.formatter?e.formatter.formatChanged(t,function(e){n.active(e)}):e.on("init",function(){e.formatter.formatChanged(t,function(e){n.active(e)})})}}function a(t){return function(){function n(){return e.undoManager?e.undoManager[t]():!1}var r=this;t="redo"==t?"hasRedo":"hasUndo",r.disabled(!n()),e.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){r.disabled(e.readonly||!n())})}}function l(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function c(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var u;u=i(),s({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:o(n),onclick:function(){c(n)}})}),s({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),s({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:o(n)})}),e.addButton("undo",{tooltip:"Undo",onPostRender:a("undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:a("redo"),cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:a("undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:a("redo"),cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:l,cmd:"mceToggleVisualAid"}),e.addButton("remove",{tooltip:"Remove",icon:"remove",cmd:"Delete"}),s({cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"],bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown",function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:u}),e.addButton("formatselect",function(){var n=[],i=r(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");return s(i,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:i[0][0],values:n,fixedWidth:!0,onselect:c,onPostRender:t(n)}}),e.addButton("fontselect",function(){var n="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",i=[],o=r(e.settings.font_formats||n);return s(o,function(e){i.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:t(i,"fontname"),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var n=[],r="8pt 10pt 12pt 14pt 18pt 24pt 36pt",i=e.settings.fontsize_formats||r;return s(i.split(" "),function(e){var t=e,r=e,i=e.split("=");i.length>1&&(t=i[0],r=i[1]),n.push({text:t,value:r})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:n,fixedWidth:!0,onPostRender:t(n,"fontsize"),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:u})}var s=r.each;i.on("AddEditor",function(t){t.editor.rtl&&(e.rtl=!0),a(t.editor)}),e.translate=function(e){return i.translate(e)},t.tooltips=!o.iOS}),r(Tt,[lt],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C,x,w,E,N=[],_=[],S,k,T,R,A,B;t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,C=t.alignH||t.align,x=t.alignV||t.align,g=e.paddingBox,A="reverseRows"in t?t.reverseRows:e.isRtl(),C&&"string"==typeof C&&(C=[C]),x&&"string"==typeof x&&(x=[x]);for(d=0;r>d;d++)N.push(0);for(f=0;n>f;f++)_.push(0);for(f=0;n>f;f++)for(d=0;r>d&&(u=i[f*r+d],u);d++)c=u.layoutRect(),S=c.minW,k=c.minH,N[d]=S>N[d]?S:N[d],_[f]=k>_[f]?k:_[f];for(T=o.innerW-g.left-g.right,w=0,d=0;r>d;d++)w+=N[d]+(d>0?y:0), -T-=(d>0?y:0)+N[d];for(R=o.innerH-g.top-g.bottom,E=0,f=0;n>f;f++)E+=_[f]+(f>0?b:0),R-=(f>0?b:0)+_[f];if(w+=g.left+g.right,E+=g.top+g.bottom,l={},l.minW=w+(o.w-o.innerW),l.minH=E+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH);var D;D="start"==t.packV?0:R>0?Math.floor(R/n):0;var M=0,L=t.flexWidths;if(L)for(d=0;dd;d++)N[d]+=L?L[d]*P:P;for(p=g.top,f=0;n>f;f++){for(h=g.left,s=_[f]+D,d=0;r>d&&(B=A?f*r+r-1-d:f*r+d,u=i[B],u);d++)m=u.settings,c=u.layoutRect(),a=Math.max(N[d],c.startMinWidth),c.x=h,c.y=p,v=m.alignH||(C?C[d]||C[0]:null),"center"==v?c.x=h+a/2-c.w/2:"right"==v?c.x=h+a-c.w:"stretch"==v&&(c.w=a),v=m.alignV||(x?x[d]||x[0]:null),"center"==v?c.y=p+s/2-c.h/2:"bottom"==v?c.y=p+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),h+=a+y,u.recalc&&u.recalc();p+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var H=e.parent();H&&(H._lastRect=null,H.recalc())}}})}),r(Rt,[Ae,u],function(e,t){return e.extend({renderHtml:function(){var e=this;return e.classes.add("iframe"),e.canFocus=!1,''},src:function(e){this.getEl().src=e},html:function(e,n){var r=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=e,n&&n()):t.setTimeout(function(){r.html(e)}),this}})}),r(At,[Ae],function(e){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("infobox"),t.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this,t=e.classPrefix;return'
    '+e.encode(e.state.get("text"))+'
    '},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl("body").firstChild.data=e.encode(t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e.state.on("change:help",function(t){e.classes.toggle("has-help",t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r(Bt,[Ae,fe],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("label"),t.canFocus=!1,e.multiline&&t.classes.add("autoscroll"),e.strong&&t.classes.add("strong")},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){var r=t.getSize(e.getEl());r.width>n.maxW&&(n.minW=n.maxW,e.classes.add("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)}return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e=this,t,n,r=e.settings.forId;return!r&&(n=e.settings.forName)&&(t=e.getRoot().find("#"+n)[0],t&&(r=t._id)),r?'":''+e.encode(e.state.get("text"))+""},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.innerHtml(e.encode(t.value)),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r(Dt,[be],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.classes.add("toolbar")},postRender:function(){var e=this;return e.items().each(function(e){e.classes.add("toolbar-item")}),e._super()}})}),r(Mt,[Dt],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r(Lt,[ct,ve,Mt],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),e=t.settings,t.classes.add("menubtn"),e.fixedWidth&&t.classes.add("fixed-width"),t.aria("haspopup",!0),t.state.set("menu",e.menu||t.render())},showMenu:function(){var e=this,n;return e.menu&&e.menu.visible()?e.hideMenu():(e.menu||(n=e.state.get("menu")||[],n.length?n={type:"menu",items:n}:n.type=n.type||"menu",n.renderTo?e.menu=n.parent(e).show().renderTo():e.menu=t.create(n).parent(e).renderTo(),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control.parent()===e.menu&&(t.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()}),e.menu.on("show hide",function(t){t.control==e.menu&&e.activeMenu("show"==t.type),e.aria("expanded","show"==t.type)}).fire("show")),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),void e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]))},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix,i=e.settings.icon,o,a=e.state.get("text"),s="";return o=e.settings.image,o?(i="none","string"!=typeof o&&(o=window.getSelection?o[0]:o[1]),o=" style=\"background-image: url('"+o+"')\""):o="",a&&(e.classes.add("btn-has-text"),s=''+e.encode(a)+""),i=e.settings.icon?r+"ico "+r+"i-"+i:"",e.aria("role",e.parent()instanceof n?"menuitem":"button"),'
    '},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&r(t.target,e.getEl())&&(e.showMenu(),t.aria&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n=t.control,r=e.parent(),o;n&&r&&n instanceof i&&n.parent()==r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(o=!0),e.hideMenu())}),o&&(n.focus(),n.showMenu()))}),e._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return i}),r(Pt,[Ae,ve,h,u],function(e,t,n,r){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t=this,n;t._super(e),e=t.settings,t.classes.add("menu-item"),e.menu&&t.classes.add("menu-item-expand"),e.preview&&t.classes.add("menu-item-preview"),n=t.state.get("text"),"-"!==n&&"|"!==n||(t.classes.add("menu-item-sep"),t.aria("role","separator"),t.state.set("text","-")),e.selectable&&(t.aria("role","menuitemcheckbox"),t.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||t.classes.add("menu-item-normal"),t.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&t.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e=this,n=e.settings,r,i=e.parent();if(i.items().each(function(t){t!==e&&t.hideMenu()}),n.menu){r=e.menu,r?r.show():(r=n.menu,r.length?r={type:"menu",items:r}:r.type=r.type||"menu",i.settings.itemDefaults&&(r.itemDefaults=i.settings.itemDefaults),r=e.menu=t.create(r).parent(e).renderTo(),r.reflow(),r.on("cancel",function(t){t.stopPropagation(),e.focus(),r.hide()}),r.on("show hide",function(e){e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),r.on("hide",function(t){t.control===r&&e.classes.remove("selected")}),r.submenu=!0),r._parentMenu=i,r.classes.add("menu-sub");var o=r.testMoveRel(e.getEl(),e.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);r.moveRel(e.getEl(),o),r.rel=o,o="menu-sub-"+o,r.classes.remove(r._lastRel).add(o),r._lastRel=o,e.classes.add("selected"),e.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){function e(e){var t,r,i={};for(i=n.mac?{alt:"⌥",ctrl:"⌘",shift:"⇧",meta:"⌘"}:{meta:"Ctrl"},e=e.split("+"),t=0;t'+("-"!==a?'\xa0":"")+("-"!==a?''+a+"":"")+(c?'
    '+c+"
    ":"")+(i.menu?'
    ':"")+""},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var i=e.getEl("text");i&&i.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),r.requestAnimationFrame(function(){e.parent().hideAll()})))}),e._super(),e},hover:function(){var e=this;return e.parent().items().each(function(e){e.classes.remove("selected")}),e.classes.toggle("selected",!0),e},active:function(e){return"undefined"!=typeof e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r(Ht,[g,ge,u],function(e,t,n){return function(r,i){var o=this,a,s=t.classPrefix,l;o.show=function(t,c){function u(){a&&(e(r).append('
    '),c&&c())}return o.hide(),a=!0,t?l=n.setTimeout(u,t):u(),o},o.hide=function(){var e=r.lastChild;return n.clearTimeout(l),e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),a=!1,o}}}),r(Ot,[_e,Pt,Ht,m],function(e,t,n,r){return e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var n=e.items,i=n.length;i--;)n[i]=r.extend({},e.itemDefaults,n[i]);t._super(e),t.classes.add("menu")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},load:function(){function e(){t.throbber&&(t.throbber.hide(),t.throbber=null)}var t=this,r,i;i=t.settings.itemsFactory,i&&(t.throbber||(t.throbber=new n(t.getEl("body"),!0),0===t.items().length?(t.throbber.show(),t.fire("loading")):t.throbber.show(100,function(){t.items().remove(),t.fire("loading")}),t.on("hide close",e)),t.requestTime=r=(new Date).getTime(),t.settings.itemsFactory(function(n){return 0===n.length?void t.hide():void(t.requestTime===r&&(t.getEl().style.width="",t.getEl("body").style.width="",e(),t.items().remove(),t.getEl("body").innerHTML="",t.add(n),t.renderNew(),t.fire("loaded")))}))},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;return n.icon||n.image||n.selectable?(e._hasIcons=!0,!1):void 0}),e.settings.itemsFactory&&e.on("postrender",function(){e.settings.itemsFactory&&e.load()}),e._super()}})}),r(It,[Lt,Ot],function(e,t){return e.extend({init:function(e){function t(r){for(var a=0;a0&&(o=r[0].text,n.state.set("value",r[0].value)),n.state.set("menu",r)),n.state.set("text",e.text||o),n.classes.add("listbox"),n.on("select",function(t){var r=t.control;a&&(t.lastControl=a),e.multiple?r.active(!r.active()):n.value(t.control.value()),a=r})},bindStates:function(){function e(e,n){e instanceof t&&e.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}function n(e,t){var r;if(e)for(var i=0;i'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),r(Wt,[Ae],function(e){function t(e){var t="";if(e)for(var n=0;n'+e[n]+"";return t}return e.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var t=this;t._super(e),t.settings.size&&(t.size=t.settings.size),t.settings.options&&(t._options=t.settings.options),t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e=this,n,r="";return n=t(e._options),e.size&&(r=' size = "'+e.size+'"'),'"},bindStates:function(){var e=this;return e.state.on("change:options",function(n){e.getEl().innerHTML=t(n.value)}),e._super()}})}),r(Vt,[Ae,Ce,fe],function(e,t,n){function r(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}function i(e,t,n){e.setAttribute("aria-"+t,n)}function o(e,t){var r,o,a,s,l,c;"v"==e.settings.orientation?(s="top",a="height",o="h"):(s="left",a="width",o="w"),c=e.getEl("handle"),r=(e.layoutRect()[o]||100)-n.getSize(c)[a],l=r*((t-e._minValue)/(e._maxValue-e._minValue))+"px",c.style[s]=l,c.style.height=e.layoutRect().h+"px",i(c,"valuenow",t),i(c,"valuetext",""+e.settings.previewFilter(t)),i(c,"valuemin",e._minValue),i(c,"valuemax",e._maxValue)}return e.extend({init:function(e){var t=this;e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),t._super(e),t.classes.add("slider"),"v"==e.orientation&&t.classes.add("vertical"),t._minValue=e.minValue||0,t._maxValue=e.maxValue||100,t._initValue=t.state.get("value")},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'
    '},reset:function(){this.value(this._initValue).repaint()},postRender:function(){function e(e,t,n){return(n+e)/(t-e)}function i(e,t,n){return n*(t-e)-e}function o(t,n){function o(o){var a;a=s.value(),a=i(t,n,e(t,n,a)+.05*o),a=r(a,t,n),s.value(a),s.fire("dragstart",{value:a}),s.fire("drag",{value:a}),s.fire("dragend",{value:a})}s.on("keydown",function(e){switch(e.keyCode){case 37:case 38:o(-1);break;case 39:case 40:o(1)}})}function a(e,i,o){var a,l,c,p,m;s._dragHelper=new t(s._id,{handle:s._id+"-handle",start:function(e){a=e[u],l=parseInt(s.getEl("handle").style[d],10),c=(s.layoutRect()[h]||100)-n.getSize(o)[f],s.fire("dragstart",{value:m})},drag:function(t){var n=t[u]-a;p=r(l+n,0,c),o.style[d]=p+"px",m=e+p/c*(i-e),s.value(m),s.tooltip().text(""+s.settings.previewFilter(m)).show().moveRel(o,"bc tc"),s.fire("drag",{value:m})},stop:function(){s.tooltip().hide(),s.fire("dragend",{value:m})}})}var s=this,l,c,u,d,f,h;l=s._minValue,c=s._maxValue,"v"==s.settings.orientation?(u="screenY",d="top",f="height",h="h"):(u="screenX",d="left",f="width",h="w"),s._super(),o(l,c,s.getEl("handle")),a(l,c,s.getEl("handle"))},repaint:function(){this._super(),o(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){o(e,t.value)}),e._super()}})}),r(Ut,[Ae],function(e){return e.extend({renderHtml:function(){var e=this;return e.classes.add("spacer"),e.canFocus=!1,'
    '}})}),r($t,[Lt,fe,g],function(e,t,n){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e=this,r=e.getEl(),i=e.layoutRect(),o,a;return e._super(),o=r.firstChild,a=r.lastChild,n(o).css({width:i.w-t.getSize(a).width,height:i.h-2}),n(a).css({height:i.h-2}),e},activeMenu:function(e){var t=this;n(t.getEl().lastChild).toggleClass(t.classPrefix+"active",e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r,i=e.state.get("icon"),o=e.state.get("text"),a="";return r=e.settings.image,r?(i="none","string"!=typeof r&&(r=window.getSelection?r[0]:r[1]),r=" style=\"background-image: url('"+r+"')\""):r="",i=e.settings.icon?n+"ico "+n+"i-"+i:"",o&&(e.classes.add("btn-has-text"),a=''+e.encode(o)+""),'
    '},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void(t&&t.call(this,e));n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),r(qt,[St],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),r(jt,[we,g,fe],function(e,t,n){return e.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t(n).removeClass(this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,n=this.getEl("t"+e),n.setAttribute("aria-selected","true"),t(n).addClass(this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!=n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){var o=e._id+"-t"+i;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='"}),'
    '+n+'
    '+t.renderHtml(e)+"
    "},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e=this,t,r,i;r=n.getSize(e.getEl("head")).width,r=0>r?0:r,i=0,e.items().each(function(e){r=Math.max(r,e.layoutRect().minW),i=Math.max(i,e.layoutRect().minH)}),e.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=r,e.settings.h=i,e.layoutRect({x:0,y:0,w:r,h:i})});var o=n.getSize(e.getEl("head")).height;return e.settings.minWidth=r,e.settings.minHeight=i+o,t=e._super(),t.deltaH+=o,t.innerH=t.h-t.deltaH,t}})}),r(Yt,[Ae,m,fe],function(e,t,n){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("textbox"),e.multiline?t.classes.add("multiline"):(t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){t.state.set("value",e.target.value)}))},repaint:function(){var e=this,t,n,r,i,o=0,a;t=e.getEl().style,n=e._layoutRect,a=e._lastRepaintRect||{};var s=document;return!e.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(t.lineHeight=n.h-o+"px"),r=e.borderBox,i=r.left+r.right+8,o=r.top+r.bottom+(e.settings.multiline?8:0),n.x!==a.x&&(t.left=n.x+"px",a.x=n.x),n.y!==a.y&&(t.top=n.y+"px",a.y=n.y),n.w!==a.w&&(t.width=n.w-i+"px",a.w=n.w),n.h!==a.h&&(t.height=n.h-o+"px",a.h=n.h),e._lastRepaintRect=a,e.fire("repaint",{},!1),e},renderHtml:function(){var e=this,r=e.settings,i,o;return i={id:e._id,hidefocus:"1"},t.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(e){i[e]=r[e]}),e.disabled()&&(i.disabled="disabled"),r.subtype&&(i.type=r.subtype),o=n.create(r.multiline?"textarea":"input",i),o.value=e.state.get("value"),o.className=e.classes,o.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e.getEl().value=e.state.get("value"),e._super(),e.$el.on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!=t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}})}),r(Xt,[],function(){var e=this||window,t=function(){return e.tinymce};return"function"==typeof e.define&&(e.define.amd||e.define("ephox/tinymce",[],t)),{}}),a([l,c,u,d,f,h,m,g,v,y,C,w,E,N,T,A,B,D,M,L,P,H,I,F,j,Y,J,Q,re,ie,oe,ae,le,ue,de,me,ge,ve,ye,be,Ce,xe,we,Ee,Ne,_e,Se,ke,Te,Re,Ae,Be,De,Me,He,Ie,Ge,Je,Qe,Ze,tt,nt,rt,it,ot,at,st,lt,ct,ut,dt,ft,ht,pt,mt,gt,vt,yt,bt,Ct,xt,wt,Et,Nt,_t,St,kt,Tt,Rt,At,Bt,Dt,Mt,Lt,Pt,Ht,Ot,It,Ft,zt,Wt,Vt,Ut,$t,qt,jt,Yt])}(this); \ No newline at end of file +// 4.3.11 (2016-04-25) +!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i=r.x&&o.x+o.w<=r.w+r.x&&o.y>=r.y&&o.y+o.h<=r.h+r.y)return i[a];return null}function n(e,t,n){return o(e.x-t,e.y-n,e.w+2*t,e.h+2*n)}function r(e,t){var n,r,i,a;return n=l(e.x,t.x),r=l(e.y,t.y),i=s(e.x+e.w,t.x+t.w),a=s(e.y+e.h,t.y+t.h),0>i-n||0>a-r?null:o(n,r,i-n,a-r)}function i(e,t,n){var r,i,a,s,c,u,d,f,h,p;return c=e.x,u=e.y,d=e.x+e.w,f=e.y+e.h,h=t.x+t.w,p=t.y+t.h,r=l(0,t.x-c),i=l(0,t.y-u),a=l(0,d-h),s=l(0,f-p),c+=r,u+=i,n&&(d+=r,f+=i,c-=a,u-=s),d-=a,f-=s,o(c,u,d-c,f-u)}function o(e,t,n,r){return{x:e,y:t,w:n,h:r}}function a(e){return o(e.left,e.top,e.width,e.height)}var s=Math.min,l=Math.max,c=Math.round;return{inflate:n,relativePosition:e,findBestRelativePosition:t,intersect:r,clamp:i,create:o,fromClientRect:a}}),r(c,[],function(){function e(e,t){return function(){e.apply(t,arguments)}}function t(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=[],s(t,e(r,this),e(i,this))}function n(e){var t=this;return null===this._state?void this._deferreds.push(e):void l(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=n(t._value)}catch(i){return void e.reject(i)}e.resolve(r)})}function r(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 s(e(n,t),e(r,this),e(i,this))}this._state=!0,this._value=t,o.call(this)}catch(a){i.call(this,a)}}function i(e){this._state=!1,this._value=e,o.call(this)}function o(){for(var e=0,t=this._deferreds.length;t>e;e++)n.call(this,this._deferreds[e]);this._deferreds=null}function a(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 s(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(i){if(r)return;r=!0,n(i)}}if(window.Promise)return window.Promise;var l=t.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)},c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,r){var i=this;return new t(function(t,o){n.call(i,new a(e,r,t,o))})},t.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&c(arguments[0])?arguments[0]:arguments);return new t(function(t,n){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(o,e)},n)}e[o]=a,0===--i&&t(e)}catch(l){n(l)}}if(0===e.length)return t([]);for(var i=e.length,o=0;or;r++)e[r].then(t,n)})},t}),r(u,[c],function(e){function t(e,t){function n(e){window.setTimeout(e,0)}var r,i=window.requestAnimationFrame,o=["ms","moz","webkit"];for(r=0;rr;r++)if(o=n[r],o&&o.func.call(o.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var o=this,s={},l,c,u,d,f;c=a+(+new Date).toString(32),d="onmouseenter"in document.documentElement,u="onfocusin"in document.documentElement,f={mouseenter:"mouseover",mouseleave:"mouseout"},l=1,o.domLoaded=!1,o.events=s,o.bind=function(n,a,h,p){function m(t){e(r(t||N.event),g)}var g,v,y,b,C,x,w,N=window;if(n&&3!==n.nodeType&&8!==n.nodeType){for(n[c]?g=n[c]:(g=l++,n[c]=g,s[g]={}),p=p||n,a=a.split(" "),y=a.length;y--;)b=a[y],x=m,C=w=!1,"DOMContentLoaded"===b&&(b="ready"),o.domLoaded&&"ready"===b&&"complete"==n.readyState?h.call(p,r({type:b})):(d||(C=f[b],C&&(x=function(t){var n,i;if(n=t.currentTarget,i=t.relatedTarget,i&&n.contains)i=n.contains(i);else for(;i&&i!==n;)i=i.parentNode;i||(t=r(t||N.event),t.type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=n,e(t,g))})),u||"focusin"!==b&&"focusout"!==b||(w=!0,C="focusin"===b?"focus":"blur",x=function(t){t=r(t||N.event),t.type="focus"===t.type?"focusin":"focusout",e(t,g)}),v=s[g][b],v?"ready"===b&&o.domLoaded?h({type:b}):v.push({func:h,scope:p}):(s[g][b]=v=[{func:h,scope:p}],v.fakeName=C,v.capture=w,v.nativeHandler=x,"ready"===b?i(n,x,o):t(n,C||b,x,w)));return n=v=0,h}},o.unbind=function(e,t,r){var i,a,l,u,d,f;if(!e||3===e.nodeType||8===e.nodeType)return o;if(i=e[c]){if(f=s[i],t){for(t=t.split(" "),l=t.length;l--;)if(d=t[l],a=f[d]){if(r)for(u=a.length;u--;)if(a[u].func===r){var h=a.nativeHandler,p=a.fakeName,m=a.capture;a=a.slice(0,u).concat(a.slice(u+1)),a.nativeHandler=h,a.fakeName=p,a.capture=m,f[d]=a}r&&0!==a.length||(delete f[d],n(e,a.fakeName||d,a.nativeHandler,a.capture))}}else{for(d in f)a=f[d],n(e,a.fakeName||d,a.nativeHandler,a.capture);f={}}for(d in f)return o;delete s[i];try{delete e[c]}catch(g){e[c]=null}}return o},o.fire=function(t,n,i){var a;if(!t||3===t.nodeType||8===t.nodeType)return o;i=r(null,i),i.type=n,i.target=t;do a=t[c],a&&e(i,a),t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow;while(t&&!i.isPropagationStopped());return o},o.clean=function(e){var t,n,r=o.unbind;if(!e||3===e.nodeType||8===e.nodeType)return o;if(e[c]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),n=e.getElementsByTagName("*"),t=n.length;t--;)e=n[t],e[c]&&r(e);return o},o.destroy=function(){s={}},o.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var a="mce-data-",s=/^(?:mouse|contextmenu)|click/,l={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1};return o.Event=new o,o.Event.bind(window,"ready",function(){}),o}),r(f,[],function(){function e(e,t,n,r){var i,o,a,s,l,c,d,h,p,m;if((t?t.ownerDocument||t:z)!==D&&B(t),t=t||D,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(L&&!r){if(i=ve.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&I(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&x.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(x.qsa&&(!P||!P.test(e))){if(h=d=F,p=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=_(e),(d=t.getAttribute("id"))?h=d.replace(be,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=c.length;l--;)c[l]=h+f(c[l]);p=ye.test(e)&&u(t.parentNode)||t,m=c.join(",")}if(m)try{return Z.apply(n,p.querySelectorAll(m)),n}catch(g){}finally{d||t.removeAttribute("id")}}}return k(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[F]=!0,e}function i(e){var t=D.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&typeof e.getElementsByTagName!==Y&&e}function d(){}function f(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=V++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c=[W,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[F]||(t[F]={}),(s=l[r])&&s[0]===W&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(t,n,r){for(var i=0,o=n.length;o>i;i++)e(t,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),c&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[F]&&(i=v(i)),o&&!o[F]&&(o=v(o,a)),r(function(r,a,s,l){var c,u,d,f=[],h=[],p=a.length,v=r||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,f,e,s,l),b=n?o||(r?e:p||i)?[]:a:y;if(n&&n(y,b,s,l),i)for(c=g(b,h),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[h[u]]=!(y[h[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(y[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?te.call(r,d):f[u])>-1&&(r[c]=!(a[c]=d))}}else b=g(b===a?b.splice(p,b.length):b),o?o(null,a,b,l):Z.apply(a,b)})}function y(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),c=h(function(e){return te.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==T)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=w.relative[e[s].type])u=[h(p(u),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[F]){for(r=++s;i>r&&!w.relative[e[r].type];r++);return v(s>1&&p(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&f(e))}u.push(n)}return p(u)}function b(t,n){var i=n.length>0,o=t.length>0,a=function(r,a,s,l,c){var u,d,f,h=0,p="0",m=r&&[],v=[],y=T,b=r||o&&w.find.TAG("*",c),C=W+=null==y?1:Math.random()||.1,x=b.length;for(c&&(T=a!==D&&a);p!==x&&null!=(u=b[p]);p++){if(o&&u){for(d=0;f=t[d++];)if(f(u,a,s)){l.push(u);break}c&&(W=C)}i&&((u=!f&&u)&&h--,r&&m.push(u))}if(h+=p,i&&p!==h){for(d=0;f=n[d++];)f(m,v,a,s);if(r){if(h>0)for(;p--;)m[p]||v[p]||(v[p]=J.call(l));v=g(v)}Z.apply(l,v),c&&!r&&v.length>0&&h+n.length>1&&e.uniqueSort(l)}return c&&(W=C,T=y),m};return i?r(a):a}var C,x,w,N,E,_,S,k,T,R,A,B,D,M,L,P,H,O,I,F="sizzle"+-new Date,z=window.document,W=0,V=0,U=n(),$=n(),q=n(),j=function(e,t){return e===t&&(A=!0),0},Y=typeof t,X=1<<31,K={}.hasOwnProperty,G=[],J=G.pop,Q=G.push,Z=G.push,ee=G.slice,te=G.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",re="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+re+"*("+ie+")(?:"+re+"*([*^$|!~]?=)"+re+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+re+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp("^"+re+"+|((?:^|[^\\\\])(?:\\\\.)*)"+re+"+$","g"),le=new RegExp("^"+re+"*,"+re+"*"),ce=new RegExp("^"+re+"*([>+~]|"+re+")"+re+"*"),ue=new RegExp("="+re+"*([^\\]'\"]*?)"+re+"*\\]","g"),de=new RegExp(ae),fe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+re+"*(even|odd|(([+-]|)(\\d*)n|)"+re+"*(?:([+-]|)"+re+"*(\\d+)|))"+re+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+re+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+re+"*((?:-\\d)?\\d*)"+re+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,Ce=new RegExp("\\\\([\\da-f]{1,6}"+re+"?|("+re+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Z.apply(G=ee.call(z.childNodes),z.childNodes),G[z.childNodes.length].nodeType}catch(we){Z={apply:G.length?function(e,t){Q.apply(e,ee.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=e.support={},E=e.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},B=e.setDocument=function(e){function t(e){try{return e.top}catch(t){}return null}var n,r=e?e.ownerDocument||e:z,o=r.defaultView;return r!==D&&9===r.nodeType&&r.documentElement?(D=r,M=r.documentElement,L=!E(r),o&&o!==t(o)&&(o.addEventListener?o.addEventListener("unload",function(){B()},!1):o.attachEvent&&o.attachEvent("onunload",function(){B()})),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ge.test(r.getElementsByClassName),x.getById=i(function(e){return M.appendChild(e).id=F,!r.getElementsByName||!r.getElementsByName(F).length}),x.getById?(w.find.ID=function(e,t){if(typeof t.getElementById!==Y&&L){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){var n=typeof e.getAttributeNode!==Y&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=x.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==Y?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=x.getElementsByClassName&&function(e,t){return L?t.getElementsByClassName(e):void 0},H=[],P=[],(x.qsa=ge.test(r.querySelectorAll))&&(i(function(e){e.innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+re+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+re+"*(?:value|"+ne+")"),e.querySelectorAll(":checked").length||P.push(":checked")}),i(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+re+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(x.matchesSelector=ge.test(O=M.matches||M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&i(function(e){x.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),H.push("!=",ae)}),P=P.length&&new RegExp(P.join("|")),H=H.length&&new RegExp(H.join("|")),n=ge.test(M.compareDocumentPosition),I=n||ge.test(M.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},j=n?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===z&&I(z,e)?-1:t===r||t.ownerDocument===z&&I(z,t)?1:R?te.call(R,e)-te.call(R,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===r?-1:t===r?1:o?-1:s?1:R?te.call(R,e)-te.call(R,t):0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===z?-1:c[i]===z?1:0},r):D},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==D&&B(t),n=n.replace(ue,"='$1']"),x.matchesSelector&&L&&(!H||!H.test(n))&&(!P||!P.test(n)))try{var r=O.call(t,n);if(r||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(i){}return e(n,D,null,[t]).length>0},e.contains=function(e,t){return(e.ownerDocument||e)!==D&&B(e),I(e,t)},e.attr=function(e,n){(e.ownerDocument||e)!==D&&B(e);var r=w.attrHandle[n.toLowerCase()],i=r&&K.call(w.attrHandle,n.toLowerCase())?r(e,n,!L):t;return i!==t?i:x.attributes||!L?e.getAttribute(n):(i=e.getAttributeNode(n))&&i.specified?i.value:null},e.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},e.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!x.detectDuplicates,R=!x.sortStable&&e.slice(0),e.sort(j),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return R=null,e},N=e.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=N(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=N(t);return n},w=e.selectors={cacheLength:50,createPseudo:r,match:he,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(Ce,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(Ce,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=_(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(Ce,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+re+")"+e+"("+re+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Y&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,h,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(u=g[F]||(g[F]={}),c=u[e]||[],h=c[0]===W&&c[1],f=c[0]===W&&c[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(f=h=0)||p.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[W,h,f];break}}else if(y&&(c=(t[F]||(t[F]={}))[e])&&c[0]===W)f=c[1];else for(;(d=++h&&d&&d[m]||(f=h=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[F]||(d[F]={}))[e]=[W,f]),d!==t)););return f-=i,f===r||f%r===0&&f/r>=0}}},PSEUDO:function(t,n){var i,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(n):o.length>1?(i=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=te.call(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(se,"$1"));return i[F]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(e){return e=e.replace(Ce,xe),function(t){return(t.textContent||t.innerText||N(t)).indexOf(e)>-1}}),lang:r(function(t){return fe.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(Ce,xe).toLowerCase(),function(e){var n;do if(n=L?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===M},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},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,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.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:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&L&&w.relative[o[1].type]){if(t=(w.find.ID(a.matches[0].replace(Ce,xe),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((l=w.find[s])&&(r=l(a.matches[0].replace(Ce,xe),ye.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return Z.apply(n,r),n;break}}return(c||S(e,d))(r,t,!L,n,ye.test(e)&&u(t.parentNode)||t),n},x.sortStable=F.split("").sort(j).join("")===F,x.detectDuplicates=!!A,B(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ne,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),e}),r(h,[],function(){function e(e){return"matchMedia"in window?matchMedia(e).matches:!1}var t=navigator,n=t.userAgent,r,i,o,a,s,l,c,u,d,f,h,p,m;r=window.opera&&window.opera.buildNumber,d=/Android/.test(n),i=/WebKit/.test(n),o=!i&&!r&&/MSIE/gi.test(n)&&/Explorer/gi.test(t.appName), +o=o&&/MSIE (\w+)\./.exec(n)[1],a=-1==n.indexOf("Trident/")||-1==n.indexOf("rv:")&&-1==t.appName.indexOf("Netscape")?!1:11,s=-1==n.indexOf("Edge/")||o||a?!1:12,o=o||a||s,l=!i&&!a&&/Gecko/.test(n),c=-1!=n.indexOf("Mac"),u=/(iPad|iPhone)/.test(n),f="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,h=e("only screen and (max-device-width: 480px)")&&(d||u),p=e("only screen and (min-width: 800px)")&&(d||u),m=-1!=n.indexOf("Windows Phone"),s&&(i=!1);var g=!u||f||n.match(/AppleWebKit\/(\d*)/)[1]>=534;return{opera:r,webkit:i,ie:o,gecko:l,mac:c,iOS:u,android:d,contentEditable:g,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=o,range:window.getSelection&&"Range"in window,documentMode:o&&!s?document.documentMode||7:10,fileApi:f,ceFalse:o===!1||o>8,desktop:!h&&!p,windowsPhone:m}}),r(p,[],function(){function e(e){var t=e,n,r;if(!u(e))for(t=[],n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function n(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;o>i;i++)if(n.call(r,e[i],i,e)===!1)return 0}else for(i in e)if(e.hasOwnProperty(i)&&n.call(r,e[i],i,e)===!1)return 0;return 1}function r(e,t){var r=[];return n(e,function(n,i){r.push(t(n,i,e))}),r}function i(e,t){var r=[];return n(e,function(n,i){t&&!t(n,i,e)||r.push(n)}),r}function o(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function a(e,t,n,r){var i=0;for(arguments.length<3&&(n=e[0]);ir;r++)if(t.call(n,e[r],r,e))return r;return-1}function l(e,n,r){var i=s(e,n,r);return-1!==i?e[i]:t}function c(e){return e[e.length-1]}var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{isArray:u,toArray:e,each:n,map:r,filter:i,indexOf:o,reduce:a,findIndex:s,find:l,last:c}}),r(m,[h,p],function(e,n){function r(e){return null===e||e===t?"":(""+e).replace(h,"")}function i(e,r){return r?"array"==r&&n.isArray(e)?!0:typeof e==r:e!==t}function o(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function a(e,t,n){var r=this,i,o,a,s,l,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),a=e[3].match(/(^|\.)(\w+)$/i)[2],o=r.createNS(e[3].replace(/\.\w+$/,""),n),!o[a]){if("static"==e[2])return o[a]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[a]));t[a]||(t[a]=function(){},c=1),o[a]=t[a],r.extend(o[a].prototype,t),e[5]&&(i=r.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],l=o[a],c?o[a]=function(){return i[s].apply(this,arguments)}:o[a]=function(){return this.parent=i[s],l.apply(this,arguments)},o[a].prototype[a]=o[a],r.each(i,function(e,t){o[a].prototype[t]=i[t]}),r.each(t,function(e,t){i[t]?o[a].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=a&&(o[a].prototype[t]=e)})),r.each(t["static"],function(e,t){o[a][t]=e})}}function s(e,n){var r,i,o,a=arguments,s;for(r=1,i=a.length;i>r;r++){n=a[r];for(o in n)n.hasOwnProperty(o)&&(s=n[o],s!==t&&(e[o]=s))}return e}function l(e,t,r,i){i=i||this,e&&(r&&(e=e[r]),n.each(e,function(e,n){return t.call(i,e,n,r)===!1?!1:void l(e,t,r,i)}))}function c(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;nn&&(t=t[e[n]],t);n++);return t}function d(e,t){return!e||i(e,"array")?e:n.map(e.split(t||","),r)}function f(t){var n=e.cacheSuffix;return n&&(t+=(-1===t.indexOf("?")?"?":"&")+n),t}var h=/^\s*|\s*$/g;return{trim:r,isArray:n.isArray,is:i,toArray:n.toArray,makeMap:o,each:n.each,map:n.map,grep:n.filter,inArray:n.indexOf,extend:s,create:a,walk:l,createNS:c,resolve:u,explode:d,_addCacheSuffix:f}}),r(g,[d,f,m,h],function(e,n,r,i){function o(e){return"undefined"!=typeof e}function a(e){return"string"==typeof e}function s(e){return e&&e==e.window}function l(e,t){var n,r,i;for(t=t||w,i=t.createElement("div"),n=t.createDocumentFragment(),i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return n}function c(e,t,n,r){var i;if(a(t))t=l(t,v(e[0]));else if(t.length&&!t.nodeType){if(t=f.makeArray(t),r)for(i=t.length-1;i>=0;i--)c(e,t[i],n,r);else for(i=0;ii&&(a=e[i],t.call(a,i,a)!==!1);i++);return e}function g(e,t){var n=[];return m(e,function(e,r){t(r,e)&&n.push(r)}),n}function v(e){return e?9==e.nodeType?e:e.ownerDocument:w}function y(e,n,r){var i=[],o=e[n];for("string"!=typeof r&&r instanceof f&&(r=r[0]);o&&9!==o.nodeType;){if(r!==t){if(o===r)break;if("string"==typeof r&&f(o).is(r))break}1===o.nodeType&&i.push(o),o=o[n]}return i}function b(e,n,r,i){var o=[];for(i instanceof f&&(i=i[0]);e;e=e[n])if(!r||e.nodeType===r){if(i!==t){if(e===i)break;if("string"==typeof i&&f(e).is(i))break}o.push(e)}return o}function C(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType==n)return e;return null}function x(e,t,n){m(n,function(n,r){e[n]=e[n]||{},e[n][t]=r})}var w=document,N=Array.prototype.push,E=Array.prototype.slice,_=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,S=e.Event,k,T=r.makeMap("children,contents,next,prev"),R=r.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),A=r.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),B={"for":"htmlFor","class":"className",readonly:"readOnly"},D={"float":"cssFloat"},M={},L={},P=/^\s*|\s*$/g;return f.fn=f.prototype={constructor:f,selector:"",context:null,length:0,init:function(e,t){var n=this,r,i;if(!e)return n;if(e.nodeType)return n.context=n[0]=e,n.length=1,n;if(t&&t.nodeType)n.context=t;else{if(t)return f(e).attr(t);n.context=t=document}if(a(e)){if(n.selector=e,r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:_.exec(e),!r)return f(t).find(e);if(r[1])for(i=l(e,v(t)).firstChild;i;)N.call(n,i),i=i.nextSibling;else{if(i=v(t).getElementById(r[2]),!i)return n;if(i.id!==r[2])return n.find(e);n.length=1,n[0]=i}}else this.add(e,!1);return n},toArray:function(){return r.toArray(this)},add:function(e,t){var n=this,r,i;if(a(e))return n.add(f(e));if(t!==!1)for(r=f.unique(n.toArray().concat(f.makeArray(e))),n.length=r.length,i=0;it;t++)f.find(e,this[t],r);return f(r)},filter:function(e){return f("function"==typeof e?g(this.toArray(),function(t,n){return e(n,t)}):f.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof f&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&f(r).is(e)){t.push(r);break}if(r==e){t.push(r);break}r=r.parentNode}}),f(t)},offset:function(e){var t,n,r,i=0,o=0,a;return e?this.css(e):(t=this[0],t&&(n=t.ownerDocument,r=n.documentElement,t.getBoundingClientRect&&(a=t.getBoundingClientRect(),i=a.left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,o=a.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:o})},push:N,sort:[].sort,splice:[].splice},r.extend(f,{extend:r.extend,makeArray:function(e){return s(e)||e.nodeType?[e]:r.toArray(e)},inArray:h,isArray:r.isArray,each:m,trim:p,grep:g,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,contains:n.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?f.find.matchesSelector(t[0],e)?[t[0]]:[]:f.find.matches(e,t)}}),m({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return y(e,"parentNode")},next:function(e){return C(e,"nextSibling",1)},prev:function(e){return C(e,"previousSibling",1)},children:function(e){return b(e.firstChild,"nextSibling",1)},contents:function(e){return r.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){f.fn[e]=function(n){var r=this,i=[];return r.each(function(){var e=t.call(i,this,n,i);e&&(f.isArray(e)?i.push.apply(i,e):i.push(e))}),this.length>1&&(T[e]||(i=f.unique(i)),0===e.indexOf("parents")&&(i=i.reverse())),i=f(i),n?i.filter(n):i}}),m({parentsUntil:function(e,t){return y(e,"parentNode",t)},nextUntil:function(e,t){return b(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return b(e,"previousSibling",1,t).slice(1)}},function(e,t){f.fn[e]=function(n,r){var i=this,o=[];return i.each(function(){var e=t.call(o,this,n,o);e&&(f.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=f.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse())),o=f(o),r?o.filter(r):o}}),f.fn.is=function(e){return!!e&&this.filter(e).length>0},f.fn.init.prototype=f.fn,f.overrideDefaults=function(e){function t(r,i){return n=n||e(),0===arguments.length&&(r=n.element),i||(i=n.context),new t.fn.init(r,i)}var n;return f.extend(t,this),t},i.ie&&i.ie<8&&(x(M,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?k:t},size:function(e){var t=e.size;return 20===t?k:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?k:t}}),x(M,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),i.ie&&i.ie<9&&(D["float"]="styleFloat",x(L,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),f.attrHooks=M,f.cssHooks=L,f}),r(v,[],function(){return function(e,t){function n(e,t,n,r){function i(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+i(t)+i(n)+i(r)}var r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,s,l,c={},u,d,f,h="\ufeff";for(e=e||{},t&&(d=t.getValidStyles(),f=t.getInvalidStyles()),u=("\\\" \\' \\; \\: ; : "+h).split(" "),l=0;l-1&&n||(m[e+t]=-1==l?s[0]:s.join(" "),delete m[e+"-top"+t],delete m[e+"-right"+t],delete m[e+"-bottom"+t],delete m[e+"-left"+t])}}function u(e){var t=m[e],n;if(t){for(t=t.split(" "),n=t.length;n--;)if(t[n]!==t[0])return!1;return m[e]=t[0],!0}}function d(e,t,n,r){u(t)&&u(n)&&u(r)&&(m[e]=m[t]+" "+m[n]+" "+m[r],delete m[t],delete m[n],delete m[r])}function f(e){return b=!0,c[e]}function h(e,t){return b&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function p(t,n,r,i,o,a){if(o=o||a)return o=h(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=h(n||r||i),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return C&&(n=C.call(x,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var m={},g,v,y,b,C=e.url_converter,x=e.url_converter_scope||this;if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,f).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,f)});g=o.exec(t);){if(v=g[1].replace(a,"").toLowerCase(),y=g[2].replace(a,""),y=y.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),v&&y.length>0){if(!e.allow_script_urls&&("behavior"==v||/expression\s*\(|\/\*|\*\//.test(y)))continue;"font-weight"===v&&"700"===y?y="bold":"color"!==v&&"background-color"!==v||(y=y.toLowerCase()),y=y.replace(r,n),y=y.replace(i,p),m[v]=b?h(y,!0):y}o.lastIndex=g.index+g[0].length}s("border","",!0),s("border","-width"),s("border","-color"),s("border","-style"),s("padding",""),s("margin",""),d("border","border-width","border-style","border-color"),"medium none"===m.border&&delete m.border,"none"===m["border-image"]&&delete m["border-image"]}return m},serialize:function(e,t){function n(t){var n,r,o,a;if(n=d[t])for(r=0,o=n.length;o>r;r++)t=n[r],a=e[t],a!==s&&a.length>0&&(i+=(i.length>0?" ":"")+t+": "+a+";")}function r(e,t){var n;return n=f["*"],n&&n[e]?!1:(n=f[t],!n||!n[e])}var i="",o,a;if(t&&d)n("*"),n(t);else for(o in e)a=e[o],a!==s&&a.length>0&&(f&&!r(o,t)||(i+=(i.length>0?" ":"")+o+": "+a+";"));return i}}}}),r(y,[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}function r(e,n,r,i){var o,a,s;if(e){if(o=e[r],t&&o===t)return;if(o){if(!i)for(s=o[n];s;s=s[n])if(!s[n])return s;return o}if(a=e.parentNode,a&&a!==t)return a}}var i=e;this.current=function(){return i},this.next=function(e){return i=n(i,"firstChild","nextSibling",e)},this.prev=function(e){return i=n(i,"lastChild","previousSibling",e)},this.prev2=function(e){return i=r(i,"lastChild","previousSibling",e)}}}),r(b,[m],function(e){function t(n){function r(){return P.createDocumentFragment()}function i(e,t){N(F,e,t)}function o(e,t){N(z,e,t)}function a(e){i(e.parentNode,j(e))}function s(e){i(e.parentNode,j(e)+1)}function l(e){o(e.parentNode,j(e))}function c(e){o(e.parentNode,j(e)+1)}function u(e){e?(L[U]=L[V],L[$]=L[W]):(L[V]=L[U],L[W]=L[$]),L.collapsed=F}function d(e){a(e),c(e)}function f(e){i(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function h(e,t){var n=L[V],r=L[W],i=L[U],o=L[$],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?w(n,r,a,s):1===e?w(i,o,a,s):2===e?w(i,o,l,c):3===e?w(n,r,l,c):void 0}function p(){E(I)}function m(){return E(H)}function g(){return E(O)}function v(e){var t=this[V],r=this[W],i,o;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(o=t.childNodes[r]),o?t.insertBefore(e,o):3==t.nodeType?n.insertAfter(e,t):t.appendChild(e)):r?r>=t.nodeValue.length?n.insertAfter(e,t):(i=t.splitText(r),t.parentNode.insertBefore(e,i)):t.parentNode.insertBefore(e,t)}function y(e){var t=L.extractContents();L.insertNode(e),e.appendChild(t),L.selectNode(e)}function b(){return q(new t(n),{startContainer:L[V],startOffset:L[W],endContainer:L[U],endOffset:L[$],collapsed:L.collapsed,commonAncestorContainer:L.commonAncestorContainer})}function C(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function x(){return L[V]==L[U]&&L[W]==L[$]}function w(e,t,r,i){var o,a,s,l,c,u;if(e==r)return t==i?0:i>t?-1:1;for(o=r;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&t>a;)a++,s=s.nextSibling;return a>=t?-1:1}for(o=e;o&&o.parentNode!=r;)o=o.parentNode;if(o){for(a=0,s=r.firstChild;s!=o&&i>a;)a++,s=s.nextSibling;return i>a?-1:1}for(l=n.findCommonAncestor(e,r),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=r;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function N(e,t,r){var i,o;for(e?(L[V]=t,L[W]=r):(L[U]=t,L[$]=r),i=L[U];i.parentNode;)i=i.parentNode;for(o=L[V];o.parentNode;)o=o.parentNode;o==i?w(L[V],L[W],L[U],L[$])>0&&L.collapse(e):L.collapse(e),L.collapsed=x(),L.commonAncestorContainer=n.findCommonAncestor(L[V],L[U])}function E(e){var t,n=0,r=0,i,o,a,s,l,c;if(L[V]==L[U])return _(e);for(t=L[U],i=t.parentNode;i;t=i,i=i.parentNode){if(i==L[V])return S(t,e);++n}for(t=L[V],i=t.parentNode;i;t=i,i=i.parentNode){if(i==L[U])return k(t,e);++r}for(o=r-n,a=L[V];o>0;)a=a.parentNode,o--;for(s=L[U];0>o;)s=s.parentNode,o++;for(l=a.parentNode,c=s.parentNode;l!=c;l=l.parentNode,c=c.parentNode)a=l,s=c;return T(a,s,e)}function _(e){var t,n,i,o,a,s,l,c,u;if(e!=I&&(t=r()),L[W]==L[$])return t;if(3==L[V].nodeType){if(n=L[V].nodeValue,i=n.substring(L[W],L[$]),e!=O&&(o=L[V],c=L[W],u=L[$]-L[W],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),L.collapse(F)),e==I)return;return i.length>0&&t.appendChild(P.createTextNode(i)),t}for(o=C(L[V],L[W]),a=L[$]-L[W];o&&a>0;)s=o.nextSibling,l=D(o,e),t&&t.appendChild(l),--a,o=s;return e!=O&&L.collapse(F),t}function S(e,t){var n,i,o,a,s,l;if(t!=I&&(n=r()),i=R(e,t),n&&n.appendChild(i),o=j(e),a=o-L[W],0>=a)return t!=O&&(L.setEndBefore(e),L.collapse(z)),n;for(i=e.previousSibling;a>0;)s=i.previousSibling,l=D(i,t),n&&n.insertBefore(l,n.firstChild),--a,i=s;return t!=O&&(L.setEndBefore(e),L.collapse(z)),n}function k(e,t){var n,i,o,a,s,l;for(t!=I&&(n=r()),o=A(e,t),n&&n.appendChild(o),i=j(e),++i,a=L[$]-i,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=D(o,t),n&&n.appendChild(l),--a,o=s;return t!=O&&(L.setStartAfter(e),L.collapse(F)),n}function T(e,t,n){var i,o,a,s,l,c,u;for(n!=I&&(o=r()),i=A(e,n),o&&o.appendChild(i),a=j(e),s=j(t),++a,l=s-a,c=e.nextSibling;l>0;)u=c.nextSibling,i=D(c,n),o&&o.appendChild(i),c=u,--l;return i=R(t,n),o&&o.appendChild(i),n!=O&&(L.setStartAfter(e),L.collapse(F)),o}function R(e,t){var n=C(L[U],L[$]-1),r,i,o,a,s,l=n!=L[U];if(n==e)return B(n,l,z,t);for(r=n.parentNode,i=B(r,z,z,t);r;){for(;n;)o=n.previousSibling,a=B(n,l,z,t),t!=I&&i.insertBefore(a,i.firstChild),l=F,n=o;if(r==e)return i;n=r.previousSibling,r=r.parentNode,s=B(r,z,z,t),t!=I&&s.appendChild(i),i=s}}function A(e,t){var n=C(L[V],L[W]),r=n!=L[V],i,o,a,s,l;if(n==e)return B(n,r,F,t);for(i=n.parentNode,o=B(i,z,F,t);i;){for(;n;)a=n.nextSibling,s=B(n,r,F,t),t!=I&&o.appendChild(s),r=F,n=a;if(i==e)return o;n=i.nextSibling,i=i.parentNode,l=B(i,z,F,t),t!=I&&l.appendChild(o),o=l}}function B(e,t,r,i){var o,a,s,l,c;if(t)return D(e,i);if(3==e.nodeType){if(o=e.nodeValue,r?(l=L[W],a=o.substring(l),s=o.substring(0,l)):(l=L[$],a=o.substring(0,l),s=o.substring(l)),i!=O&&(e.nodeValue=s),i==I)return;return c=n.clone(e,z),c.nodeValue=a,c}if(i!=I)return n.clone(e,z)}function D(e,t){return t!=I?t==O?n.clone(e,F):e:void e.parentNode.removeChild(e)}function M(){return n.create("body",null,g()).outerText}var L=this,P=n.doc,H=0,O=1,I=2,F=!0,z=!1,W="startOffset",V="startContainer",U="endContainer",$="endOffset",q=e.extend,j=n.nodeIndex;return q(L,{startContainer:P,startOffset:0,endContainer:P,endOffset:0,collapsed:F,commonAncestorContainer:P,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:i,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:h,deleteContents:p,extractContents:m,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:M}),L}return t.prototype.toString=function(){return this.toStringIE()},t}),r(C,[m],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,d={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"};o={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},a={"<":"<",">":">","&":"&",""":'"',"'":"'"},i=n("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 f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return o[e]||n[e]||e})},getEncodeFunc:function(e,t){function a(e,n){return e.replace(n?s:l,function(e){return o[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||i,e=r(e.replace(/\+/g,",")),e.named&&e.numeric?a:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n){return n?(n="x"===n.charAt(0).toLowerCase()?parseInt(n.substr(1),16):parseInt(n,10),n>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n))):d[n]||String.fromCharCode(n)):a[e]||i[e]||t(e)})}};return f}),r(x,[m,u],function(e,t){return function(n,r){function i(e){n.getElementsByTagName("head")[0].appendChild(e)}function o(r,o,c){function u(){for(var e=b.passed,t=e.length;t--;)e[t]();b.status=2,b.passed=[],b.failed=[]}function d(){for(var e=b.failed,t=e.length;t--;)e[t]();b.status=3,b.passed=[],b.failed=[]}function f(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function h(e,n){e()||((new Date).getTime()-y0)return v=n.createElement("style"),v.textContent='@import "'+r+'"',m(),void i(v);p()}i(g),g.href=r}}var a=0,s={},l;r=r||{},l=r.maxLoadTime||5e3,this.load=o}}),r(w,[f,g,v,d,y,b,C,h,m,x],function(e,n,r,i,o,a,s,l,c,u){function d(e,t){var n={},r=t.keep_values,i;return i={set:function(n,r,i){t.url_converter&&(r=t.url_converter.call(t.url_converter_scope||e,r,i,n[0])),n.attr("data-mce-"+i,r).attr(i,r)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},n={style:{set:function(e,t){return null!==t&&"object"==typeof t?void e.css(t):(r&&e.attr("data-mce-style",t),void e.attr("style",t))},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serializeStyle(e.parseStyle(n),t[0].nodeName)}}},r&&(n.href=n.src=i),n}function f(e,t){var n=t.attr("style");n=e.serializeStyle(e.parseStyle(n),t[0].nodeName),n||(n=null),t.attr("data-mce-style",n)}function h(e,t){var n=0,r,i;if(e)for(r=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=r&&e.nodeValue.length)&&(n++,r=i);return n}function p(e,t){var o=this,a;o.doc=e,o.win=window,o.files={},o.counter=0,o.stdMode=!b||e.documentMode>=8,o.boxModel=!b||"CSS1Compat"==e.compatMode||o.stdMode,o.styleSheetLoader=new u(e),o.boundEvents=[],o.settings=t=t||{},o.schema=t.schema,o.styles=new r({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),o.fixDoc(e),o.events=t.ownEvents?new i(t.proxy):i.Event,o.attrHooks=d(o,t),a=t.schema?t.schema.getBlockElements():{},o.$=n.overrideDefaults(function(){return{context:e,element:o.getRoot()}}),o.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!a[e.nodeName]):!!a[e]}}var m=c.each,g=c.is,v=c.grep,y=c.trim,b=l.ie,C=/^([a-z0-9],?)+$/i,x=/^[ \t\r\n]*$/;return p.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(e){var t=this.settings,n;if(b&&t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(n in t.schema.getCustomElements())e.createElement(n)}},clone:function(e,t){var n=this,r,i;return!b||1!==e.nodeType||t?e.cloneNode(t):(i=n.doc,t?r.firstChild:(r=i.createElement(e.nodeName),m(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),r))},getRoot:function(){var e=this;return e.settings.root_element||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t=this,n,r;return e=t.get(e),n=t.getPos(e),r=t.getSize(e),{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;return e=t.get(e),n=t.getStyle(e,"width"),r=t.getStyle(e,"height"),-1===n.indexOf("px")&&(n=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(n,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o=this,a,s=[];for(e=o.get(e),i=i===t,r=r||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),g(n,"string")&&(a=n,n="*"===n?function(e){return 1==e.nodeType}:function(e){return o.is(e,a)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e), +e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.settings.root_element||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(C.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(r,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=g(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r="",i;r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&"undefined"!=typeof t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return"undefined"!=typeof n?r+">"+n+"":r+" />"},createFragment:function(e){var t,n,r=this.doc,i;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),e.length>1?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&f(this,e)},getStyle:function(e,n,r){return e=this.$$(e),r?e.css(n):(n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==n&&(n=l.ie&&l.ie<12?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[n]:t)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&f(this,e)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r=this,i,o,a=r.settings;""===n&&(n=null),e=r.$$(e),i=e.attr(t),e.length&&(o=r.attrHooks[t],o&&o.set?o.set(e,n,t):e.attr(t,n),i!=n&&a.onSetAttrib&&a.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var n=this;n.$$(e).each(function(e,r){m(t,function(e,t){n.setAttrib(r,t,e)})})},getAttrib:function(e,t,n){var r=this,i,o;return e=r.$$(e),e.length&&(i=r.attrHooks[t],o=i&&i.get?i.get(e,t):e.attr(t)),"undefined"==typeof o&&(o=n||""),o},getPos:function(e,t){var r=this,i=0,o=0,a,s=r.doc,l=s.body,c;if(e=r.get(e),t=t||l,e){if(t===l&&e.getBoundingClientRect&&"static"===n(l).css("position"))return c=e.getBoundingClientRect(),t=r.boxModel?s.documentElement:l,i=c.left+(s.documentElement.scrollLeft||l.scrollLeft)-t.clientLeft,o=c.top+(s.documentElement.scrollTop||l.scrollTop)-t.clientTop,{x:i,y:o};for(a=e;a&&a!=t&&a.nodeType;)i+=a.offsetLeft||0,o+=a.offsetTop||0,a=a.offsetParent;for(a=e.parentNode;a&&a!=t&&a.nodeType;)i-=a.scrollLeft||0,o-=a.scrollTop||0,a=a.parentNode}return{x:i,y:o}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t=this,n=t.doc,r,i;if(t!==p.DOM&&n===document){var o=p.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,p.DOM.addedStyles=o}i=n.getElementById("mceDefaultStyles"),i||(i=n.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=n.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(n.createTextNode(e))},loadCSS:function(e){var t=this,n=t.doc,r;return t!==p.DOM&&n===document?void p.DOM.loadCSS(e):(e||(e=""),r=n.getElementsByTagName("head")[0],void m(e.split(","),function(e){var i;e=c._addCacheSuffix(e),t.files[e]||(t.files[e]=!0,i=t.create("link",{rel:"stylesheet",href:e}),b&&n.documentMode&&n.recalc&&(i.onload=function(){n.recalc&&n.recalc(),i.onload=null}),r.appendChild(i))}))},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,r){this.$$(e).toggleClass(t,r).each(function(){""===this.className&&n(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(e,t){e=this.$$(e),b?e.each(function(e,r){if(r.canHaveHTML!==!1){for(;r.firstChild;)r.removeChild(r.firstChild);try{r.innerHTML="
    "+t,r.removeChild(r.firstChild)}catch(i){n("
    ").html("
    "+t).contents().slice(1).appendTo(r)}return t}}):e.html(t)},getOuterHTML:function(e){return e=this.get(e),1==e.nodeType&&"outerHTML"in e?e.outerHTML:n("
    ").append(n(e).clone()).html()},setOuterHTML:function(e,t){var r=this;r.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}r.remove(n(this).html(t),!0)})},decode:s.decode,encode:s.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return g(t,"array")&&(e=e.cloneNode(!0)),n&&m(v(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),m(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncestor:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(c.trim(e))},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],m(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(b){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n=this,r,i,a,s,l,c=0;if(e=e.firstChild){s=new o(e,e.parentNode),t=t||(n.schema?n.schema.getNonEmptyElements():null);do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue}return!1}for(i=n.getAttribs(e),r=i.length;r--;)if(l=i[r].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==a)return!1;if(3===a&&!x.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new a(this)},nodeIndex:h,split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=o.length-1;n>=0;n--)r(o[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=y(e.nodeValue).length;if(!i.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(o=e.childNodes,1==o.length&&o[0]&&1==o[0].nodeType&&"bookmark"==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;i.remove(e)}return e}}var i=this,o=i.createRng(),a,s,l;return e&&t?(o.setStart(e.parentNode,i.nodeIndex(e)),o.setEnd(t.parentNode,i.nodeIndex(t)),a=o.extractContents(),o=i.createRng(),o.setStart(t.parentNode,i.nodeIndex(t)+1),o.setEnd(e.parentNode,i.nodeIndex(e)+1),s=o.extractContents(),l=e.parentNode,l.insertBefore(r(a),e),n?l.insertBefore(n,e):l.insertBefore(t,e),l.insertBefore(r(s),e),i.remove(e),n||t):void 0},bind:function(e,t,n,r){var i=this;if(c.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(c.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null):null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&(n=this.getContentEditable(e),null===n);e=e.parentNode);return n},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n];this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},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},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},p.DOM=new p(document),p.nodeIndex=h,p}),r(N,[w,m],function(e,t){function n(){function e(e,n){function i(){a.remove(l),s&&(s.onreadystatechange=s.onload=s=null),n()}function o(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var a=r,s,l;l=a.uniqueId(),s=document.createElement("script"),s.id=l,s.type="text/javascript",s.src=t._addCacheSuffix(e),"onreadystatechange"in s?s.onreadystatechange=function(){/loaded|complete/.test(s.readyState)&&i()}:s.onload=i,s.onerror=o,(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}var n=0,a=1,s=2,l={},c=[],u={},d=[],f=0,h;this.isDone=function(e){return l[e]==s},this.markDone=function(e){l[e]=s},this.add=this.load=function(e,t,r){var i=l[e];i==h&&(c.push(e),l[e]=n),t&&(u[e]||(u[e]=[]),u[e].push({func:t,scope:r||this}))},this.loadQueue=function(e,t){this.loadScripts(c,e,t)},this.loadScripts=function(t,n,r){function c(e){i(u[e],function(e){e.func.call(e.scope)}),u[e]=h}var p;d.push({func:n,scope:r||this}),(p=function(){var n=o(t);t.length=0,i(n,function(t){return l[t]==s?void c(t):void(l[t]!=a&&(l[t]=a,f++,e(t,function(){l[t]=s,f--,c(t),p()})))}),f||(i(d,function(e){e.func.call(e.scope)}),d.length=0)})()}}var r=e.DOM,i=t.each,o=t.grep;return n.ScriptLoader=new n,n}),r(E,[N,m],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var i=r.language;if(i&&r.languageLoad!==!1){if(n)if(n=","+n+",",-1!=n.indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1==n.indexOf(","+i+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+i+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){function l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&(s?a.call(s):a.call(e))}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=r.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(_,[],function(){function e(e){return function(t){return!!t&&t.nodeType==e}}function t(e){return e=e.toLowerCase().split(" "),function(t){var n,r;if(t&&t.nodeType)for(r=t.nodeName.toLowerCase(),n=0;nn.length-1?t=n.length-1:0>t&&(t=0),n[t]||e}function o(e){this.walk=function(t,n){function r(e){var t;return t=e[0],3===t.nodeType&&t===c&&u>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===f&&e.length>0&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e}function o(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function a(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function l(e,t,i){var a=i?"nextSibling":"previousSibling";for(g=e,v=g.parentNode;g&&g!=t;g=v)v=g.parentNode,y=o(g==e?g:g[a],a),y.length&&(i||y.reverse(),n(r(y)))}var c=t.startContainer,u=t.startOffset,d=t.endContainer,f=t.endOffset,h,p,m,g,v,y,b;if(b=e.select("td[data-mce-selected],th[data-mce-selected]"),b.length>0)return void s(b,function(e){n([e])});if(1==c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[u]),1==d.nodeType&&d.hasChildNodes()&&(d=i(d,f)),c==d)return n(r([c]));for(h=e.findCommonAncestor(c,d),g=c;g;g=g.parentNode){if(g===d)return l(c,h,!0);if(g===h)break}for(g=d;g;g=g.parentNode){if(g===c)return l(d,h);if(g===h)break}p=a(c,h)||c,m=a(d,h)||d,l(c,p,!0),y=o(p==c?p:p.nextSibling,"nextSibling",m==d?m.nextSibling:m),y.length&&n(r(y)),l(d,m)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&rr?(o-=r,n=i=t(i,o).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&r0&&o0)return h=v,p=n?v.nodeValue.length:0,void(i=!0);if(e.isBlock(v)||y[v.nodeName.toLowerCase()])return;s=v}o&&s&&(h=s,i=!0,p=0)}var h,p,m,g=e.getRoot(),v,y,b,C;if(h=n[(r?"start":"end")+"Container"],p=n[(r?"start":"end")+"Offset"],C=1==h.nodeType&&p===h.childNodes.length,y=e.schema.getNonEmptyElements(),b=r,!c(h)){if(1==h.nodeType&&p>h.childNodes.length-1&&(b=!1),9===h.nodeType&&(h=e.getRoot(),p=0),h===g){if(b&&(v=h.childNodes[p>0?p-1:0])){if(c(v))return;if(y[v.nodeName]||"TABLE"==v.nodeName)return}if(h.hasChildNodes()){if(p=Math.min(!b&&p>0?p-1:p,h.childNodes.length-1),h=h.childNodes[p],p=0,u(h)||c(h))return;if(h.hasChildNodes()&&!/TABLE/.test(h.nodeName)){v=h,m=new t(h,g);do{if(l(v)||c(v)){i=!1;break}if(3===v.nodeType&&v.nodeValue.length>0){p=b?0:v.nodeValue.length,h=v,i=!0;break}if(y[v.nodeName.toLowerCase()]&&!a(v)){p=e.nodeIndex(v),h=v.parentNode,"IMG"!=v.nodeName||b||p++,i=!0;break}}while(v=b?m.next():m.prev())}}}o&&(3===h.nodeType&&0===p&&f(!0),1===h.nodeType&&(v=h.childNodes[p],v||(v=h.childNodes[p-1]),!v||"BR"!==v.nodeName||d(v,"A")||s(v)||s(v,!0)||f(!0,v))),b&&!o&&3===h.nodeType&&p===h.nodeValue.length&&f(!1),i&&n["set"+(r?"Start":"End")](h,p)}}var i,o;return o=n.collapsed,r(!0),o||r(),i&&o&&n.collapse(!0),i}}function a(t,n,r){var i,o,a;if(i=r.elementFromPoint(t,n),o=r.body.createTextRange(),"HTML"==i.tagName&&(i=r.body),o.moveToElementText(i),a=e.toArray(o.getClientRects()),a=a.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)),e-t}),a.length>0){n=(a[0].bottom+a[0].top)/2;try{return o.moveToPoint(t,n),o.collapse(!0),o}catch(s){}}return null}var s=e.each,l=n.isContentEditableFalse,c=r.isCaretContainer;return o.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},o.getCaretRangeFromPoint=function(e,t,n){var r,i;if(n.caretPositionFromPoint)i=n.caretPositionFromPoint(e,t),r=n.createRange(),r.setStart(i.offsetNode,i.offset),r.collapse(!0);else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(n.body.createTextRange){r=n.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(o){r=a(e,t,n)}}return r},o.getSelectedNode=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset==n+1?t.childNodes[n]:null},o.getNode=function(e,t){return 1==e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},o}),r(R,[T,h,u],function(e,t,n){return function(r){function i(e){var t,n;if(n=r.$(e).parentsUntil(r.getBody()).add(e),n.length===a.length){for(t=n.length;t>=0&&n[t]===a[t];t--);if(-1===t)return a=n,!0}return a=n,!1}var o,a=[];"onselectionchange"in r.getDoc()||r.on("NodeChange Click MouseUp KeyUp Focus",function(t){var n,i;n=r.selection.getRng(),i={startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset},"nodechange"!=t.type&&e.compareRanges(i,o)||r.fire("SelectionChange"),o=i}),r.on("contextmenu",function(){r.fire("SelectionChange")}),r.on("SelectionChange",function(){var e=r.selection.getStart(!0);!t.range&&r.selection.isCollapsed()||!i(e)&&r.dom.isChildOf(e,r.getBody())&&r.nodeChanged({selectionChange:!0})}),r.on("MouseUp",function(e){e.isDefaultPrevented()||("IMG"==r.selection.getNode().nodeName?n.setEditorTimeout(r,function(){r.nodeChanged()}):r.nodeChanged())}),this.nodeChanged=function(e){var t=r.selection,n,i,o;r.initialized&&t&&!r.settings.disable_nodechange&&!r.readonly&&(o=r.getBody(),n=t.getStart()||o,n=n.ownerDocument!=r.getDoc()?r.getBody():n,"IMG"==n.nodeName&&t.isCollapsed()&&(n=n.parentNode),i=[],r.dom.getParent(n,function(e){return e===o?!0:void i.push(e)}),e=e||{},e.element=n,e.parents=i,r.fire("NodeChange",e))}}}),r(A,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i].name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(B,[m],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e,t){var n={},r,i;for(r=0,i=e.length;i>r;r++)n[e[r]]=t||{};return n}var s,c,u,d=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),c=3;co;o++)i.attributes[n[o]]={},i.attributesOrder.push(n[o])}var a={},l,c,u,d,f,h;return i[e]?i[e]:(l=t("id accesskey class dir lang style tabindex title"),c=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),u=t("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&&(l.push.apply(l,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),c.push.apply(c,t("article aside details dialog figure header footer hgroup section nav")),u.push.apply(u,t("audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"))),"html5-strict"!=e&&(l.push("xml:lang"),h=t("acronym applet basefont big font strike tt"),u.push.apply(u,h),s(h,function(e){n(e,"",u)}),f=t("center dir isindex noframes"),c.push.apply(c,f),d=[].concat(c,u),s(f,function(e){n(e,"",d)})),d=d||[].concat(c,u),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",d),n("address dt dd div caption","",d),n("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","",u),n("blockquote","cite",d),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",d),n("dl","","dt dd"),n("a","href target rel media hreflang type",u),n("q","cite",u),n("ins del","cite datetime",d),n("img","src sizes srcset alt usemap ismap width height"),n("iframe","src name width height",d),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",d,"param"),n("param","name value"),n("map","name",d,"area"),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",d),n("th","colspan rowspan headers scope abbr",d),n("form","accept-charset action autocomplete enctype method name novalidate target",d),n("fieldset","disabled form name",d,"legend"),n("label","form for",u),n("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"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?d:u),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",d,"li"),n("noscript","",d),"html4"!=e&&(n("wbr"),n("ruby","",u,"rt rp"),n("figcaption","",d),n("mark rt rp summary bdi","",u),n("canvas","width height",d),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",d,"track source"),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",d,"track source"),n("picture","","img source"),n("source","src srcset type media sizes"),n("track","kind src srclang label default"),n("datalist","",u,"option"),n("article section nav aside header footer","",d),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",d,"figcaption"),n("time","datetime",u),n("dialog","open",d),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",u),n("progress","value max",u),n("meter","value min max low high optimum",u),n("details","open",d,"summary"),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(r("script","language xml:space"),r("style","xml:space"),r("object","declare classid code codebase codetype archive standby align border hspace vspace"),r("embed","align name hspace vspace"),r("param","valuetype type"),r("a","charset name rev shape coords"),r("br","clear"),r("applet","codebase archive code object alt name width height align hspace vspace"),r("img","name longdesc align border hspace vspace"),r("iframe","longdesc frameborder marginwidth marginheight scrolling align"),r("font basefont","size color face"),r("input","usemap align"),r("select","onchange"),r("textarea"),r("h1 h2 h3 h4 h5 h6 div p legend caption","align"),r("ul","type compact"),r("li","type"),r("ol dl menu dir","compact"),r("pre","width xml:space"),r("hr","align noshade size width"),r("isindex","prompt"),r("table","summary width frame rules cellspacing cellpadding align bgcolor"),r("col","width align char charoff valign"),r("colgroup","width align char charoff valign"),r("thead","align char charoff valign"),r("tr","align char charoff valign bgcolor"),r("th","axis align char charoff valign nowrap bgcolor width height"),r("form","accept"),r("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),r("tfoot","align char charoff valign"),r("tbody","align char charoff valign"),r("area","nohref"),r("body","background bgcolor text link vlink alink")),"html4"!=e&&(r("input button select textarea","autofocus"),r("input textarea","placeholder"),r("a","download"),r("link script img","crossorigin"),r("iframe","sandbox seamless allowfullscreen")),s(t("a form meter progress dfn"),function(e){a[e]&&delete a[e].children[e]}),delete a.caption.children.table,delete a.script,i[e]=a,a)}function r(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),s(e,function(e,r){n[r]=n[r.toUpperCase()]="map"==t?a(e,/[, ]/):c(e,/[, ]/)})),n}var i={},o={},a=e.makeMap,s=e.each,l=e.extend,c=e.explode,u=e.inArray;return function(e){function o(t,n,r){var o=e[t];return o?o=a(o,/[, ]/,a(o.toUpperCase(),/[, ]/)):(o=i[t],o||(o=a(n," ",a(n.toUpperCase()," ")),o=l(o,r),i[t]=o)),o}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function f(e){var n,r,i,o,s,l,c,f,h,p,m,g,v,b,x,w,N,E,_,S=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,k=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(e)for(e=t(e,","),y["@"]&&(w=y["@"].attributes,N=y["@"].attributesOrder),n=0,r=e.length;r>n;n++)if(s=S.exec(e[n])){if(b=s[1],h=s[2],x=s[3],f=s[5],g={},v=[],l={attributes:g,attributesOrder:v},"#"===b&&(l.paddEmpty=!0),"-"===b&&(l.removeEmpty=!0),"!"===s[4]&&(l.removeEmptyAttrs=!0),w){for(E in w)g[E]=w[E];v.push.apply(v,N)}if(f)for(f=t(f,"|"),i=0,o=f.length;o>i;i++)if(s=k.exec(f[i])){if(c={},m=s[1],p=s[2].replace(/::/g,":"),b=s[3],_=s[4],"!"===m&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(p),c.required=!0),"-"===m){delete g[p],v.splice(u(v,p),1);continue}b&&("="===b&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:p,value:_}),c.defaultValue=_),":"===b&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:p,value:_}),c.forcedValue=_),"<"===b&&(c.validValues=a(_,"?"))),T.test(p)?(l.attributePatterns=l.attributePatterns||[],c.pattern=d(p),l.attributePatterns.push(c)):(g[p]||v.push(p),g[p]=c)}w||"@"!=h||(w=g,N=v),x&&(l.outputName=h,y[x]=l),T.test(h)?(l.pattern=d(h),C.push(l)):y[h]=l}}function h(e){y={},C=[],f(e),s(N,function(e,t){b[t]=e.children})}function p(e){var n=/^(~)?(.+)$/;e&&(i.text_block_elements=i.block_elements=null,s(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",o=t[2];if(b[o]=b[i],L[o]=i,r||(R[o.toUpperCase()]={},R[o]={}),!y[o]){var a=y[i]; +a=l({},a),delete a.removeEmptyAttrs,delete a.removeEmpty,y[o]=a}s(b,function(e,t){e[i]&&(b[t]=e=l({},b[t]),e[o]=e[i])})}))}function m(n){var r=/^([+\-]?)(\w+)\[([^\]]+)\]$/;i[e.schema]=null,n&&s(t(n,","),function(e){var n=r.exec(e),i,o;n&&(o=n[1],i=o?b[n[2]]:b[n[2]]={"#comment":{}},i=b[n[2]],s(t(n[3],"|"),function(e){"-"===o?delete i[e]:i[e]={}}))})}function g(e){var t=y[e],n;if(t)return t;for(n=C.length;n--;)if(t=C[n],t.pattern.test(e))return t}var v=this,y={},b={},C=[],x,w,N,E,_,S,k,T,R,A,B,D,M,L={},P={};e=e||{},N=n(e.schema),e.verify_html===!1&&(e.valid_elements="*[*]"),x=r(e.valid_styles),w=r(e.invalid_styles,"map"),T=r(e.valid_classes,"map"),E=o("whitespace_elements","pre script noscript style textarea video audio iframe object"),_=o("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),S=o("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),k=o("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),A=o("non_empty_elements","td th iframe video audio object script",S),B=o("move_caret_before_on_enter_elements","table",A),D=o("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),R=o("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",D),M=o("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),s((e.special||"script noscript style textarea").split(" "),function(e){P[e]=new RegExp("]*>","gi")}),e.valid_elements?h(e.valid_elements):(s(N,function(e,t){y[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},b[t]=e.children}),"html5"!=e.schema&&s(t("strong/b em/i"),function(e){e=t(e,"/"),y[e[1]].outputName=e[0]}),s(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){y[e]&&(y[e].removeEmpty=!0)}),s(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){y[e].paddEmpty=!0}),s(t("span"),function(e){y[e].removeEmptyAttrs=!0})),p(e.custom_elements),m(e.valid_children),f(e.extended_valid_elements),m("+ol[ul|ol],+ul[ul|ol]"),e.invalid_elements&&s(c(e.invalid_elements),function(e){y[e]&&delete y[e]}),g("span")||f("span[!data-mce-type|*]"),v.children=b,v.getValidStyles=function(){return x},v.getInvalidStyles=function(){return w},v.getValidClasses=function(){return T},v.getBoolAttrs=function(){return k},v.getBlockElements=function(){return R},v.getTextBlockElements=function(){return D},v.getTextInlineElements=function(){return M},v.getShortEndedElements=function(){return S},v.getSelfClosingElements=function(){return _},v.getNonEmptyElements=function(){return A},v.getMoveCaretBeforeOnEnterElements=function(){return B},v.getWhiteSpaceElements=function(){return E},v.getSpecialElements=function(){return P},v.isValidChild=function(e,t){var n=b[e];return!(!n||!n[t])},v.isValid=function(e,t){var n,r,i=g(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},v.getElementRule=g,v.getCustomElements=function(){return L},v.addValidElements=f,v.setValidElements=h,v.addCustomElements=p,v.addValidChildren=m,v.elements=y}}),r(D,[B,C,m],function(e,t,n){function r(e,t,n){var r=1,i,o,a,s;for(s=e.getShortEndedElements(),a=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,a.lastIndex=i=n;o=a.exec(t);){if(i=a.lastIndex,"/"===o[1])r--;else if(!o[1]){if(o[2]in s)continue;r++}if(0===r)break}return i}function i(i,a){function s(){}var l=this;i=i||{},l.schema=a=a||new e,i.fix_self_closing!==!1&&(i.fix_self_closing=!0),o("comment cdata text start end pi doctype".split(" "),function(e){e&&(l[e]=i[e]||s)}),l.parse=function(e){function o(e){var t,n;for(t=h.length;t--&&h[t].name!==e;);if(t>=0){for(n=h.length-1;n>=t;n--)e=h[n],e.valid&&l.end(e.name);h.length=t}}function s(e,t,n,r,o){var a,s,l=/[\s\u0000-\u001F]+/g;if(t=t.toLowerCase(),n=t in x?t:z(n||r||o||""),N&&!y&&0!==t.indexOf("data-")){if(a=T[t],!a&&R){for(s=R.length;s--&&(a=R[s],!a.pattern.test(t)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(V[t]&&!i.allow_script_urls){var c=n.replace(l,"");try{c=decodeURIComponent(c)}catch(u){c=unescape(c)}if(U.test(c))return;if(!i.allow_html_data_urls&&$.test(c)&&!/^data:image\//i.test(c))return}p.map[t]=n,p.push({name:t,value:n})}var l=this,c,u=0,d,f,h=[],p,m,g,v,y,b,C,x,w,N,E,_,S,k,T,R,A,B,D,M,L,P,H,O,I,F=0,z=t.decode,W,V=n.makeMap("src,href,data,background,formaction,poster"),U=/((java|vb)script|mhtml):/i,$=/^data:/i;for(P=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),H=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,C=a.getShortEndedElements(),L=i.self_closing_elements||a.getSelfClosingElements(),x=a.getBoolAttrs(),N=i.validate,b=i.remove_internals,W=i.fix_self_closing,O=a.getSpecialElements();c=P.exec(e);){if(u0&&h[h.length-1].name===d&&o(d),!N||(E=a.getElementRule(d))){if(_=!0,N&&(T=E.attributes,R=E.attributePatterns),(k=c[8])?(y=-1!==k.indexOf("data-mce-type"),y&&b&&(_=!1),p=[],p.map={},k.replace(H,s)):(p=[],p.map={}),N&&!y){if(A=E.attributesRequired,B=E.attributesDefault,D=E.attributesForced,M=E.removeEmptyAttrs,M&&!p.length&&(_=!1),D)for(m=D.length;m--;)S=D[m],v=S.name,I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I});if(B)for(m=B.length;m--;)S=B[m],v=S.name,v in p.map||(I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I}));if(A){for(m=A.length;m--&&!(A[m]in p.map););-1===m&&(_=!1)}if(S=p.map["data-mce-bogus"]){if("all"===S){u=r(a,e,P.lastIndex),P.lastIndex=u;continue}_=!1}}_&&l.start(d,p,w)}else _=!1;if(f=O[d]){f.lastIndex=u=c.index+c[0].length,(c=f.exec(e))?(_&&(g=e.substr(u,c.index-u)),u=c.index+c[0].length):(g=e.substr(u),u=e.length),_&&(g.length>0&&l.text(g,!0),l.end(d)),P.lastIndex=u;continue}w||(k&&k.indexOf("/")==k.length-1?_&&l.end(d):h.push({name:d,valid:_}))}else(d=c[1])?(">"===d.charAt(0)&&(d=" "+d),i.allow_conditional_comments||"[if"!==d.substr(0,3)||(d=" "+d),l.comment(d)):(d=c[2])?l.cdata(d):(d=c[3])?l.doctype(d):(d=c[4])&&l.pi(d,c[5]);u=c.index+c[0].length}for(u=0;m--)d=h[m],d.valid&&l.end(d.name)}}var o=n.each;return i.findEndTag=r,i}),r(M,[A,B,D,m],function(e,t,n,r){var i=r.makeMap,o=r.each,a=r.explode,s=r.extend;return function(r,l){function c(t){var n,r,o,a,s,c,d,f,h,p,m,g,v,y,b;for(m=i("tr,td,th,tbody,thead,tfoot,table"),p=l.getNonEmptyElements(),g=l.getTextBlockElements(),v=l.getSpecialElements(),n=0;n1){for(a.reverse(),s=c=u.filterNode(a[0].clone()),h=0;h0)return void(t.value=r);if(n=t.next){if(3==n.type&&n.value.length){t=t.prev;continue}if(!o[n.name]&&"script"!=n.name&&"style"!=n.name){t=t.prev;continue}}i=t.prev,t.remove(),t=i}}function g(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var v,y,b,C,x,w,N,E,_,S,k,T,R,A=[],B,D,M,L,P,H,O,I;if(o=o||{},h={},p={},T=s(i("script,style,head,html,body,title,meta,param"),l.getBlockElements()),O=l.getNonEmptyElements(),H=l.children,k=r.validate,I="forced_root_block"in o?o.forced_root_block:r.forced_root_block,P=l.getWhiteSpaceElements(),R=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,M=/[ \t\r\n]+/g,L=/^[ \t\r\n]+$/,v=new n({validate:k,allow_script_urls:r.allow_script_urls,allow_conditional_comments:r.allow_conditional_comments,self_closing_elements:g(l.getSelfClosingElements()),cdata:function(e){b.append(u("#cdata",4)).value=e},text:function(e,t){var n;B||(e=e.replace(M," "),b.lastChild&&T[b.lastChild.name]&&(e=e.replace(R,""))),0!==e.length&&(n=u("#text",3),n.raw=!!t,b.append(n).value=e)},comment:function(e){b.append(u("#comment",8)).value=e},pi:function(e,t){b.append(u(e,7)).value=t,m(b)},doctype:function(e){var t;t=b.append(u("#doctype",10)),t.value=e,m(b)},start:function(e,t,n){var r,i,o,a,s;if(o=k?l.getElementRule(e):{}){for(r=u(o.outputName||e,1),r.attributes=t,r.shortEnded=n,b.append(r),s=H[b.name],s&&H[r.name]&&!s[r.name]&&A.push(r),i=f.length;i--;)a=f[i].name,a in t.map&&(_=p[a],_?_.push(r):p[a]=[r]);T[e]&&m(r),n||(b=r),!B&&P[e]&&(B=!0)}},end:function(t){var n,r,i,o,a;if(r=k?l.getElementRule(t):{}){if(T[t]&&!B){if(n=b.firstChild,n&&3===n.type)if(i=n.value.replace(R,""),i.length>0)n.value=i,n=n.next;else for(o=n.next,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.next,(0===i.length||L.test(i))&&(n.remove(),n=o),n=o;if(n=b.lastChild,n&&3===n.type)if(i=n.value.replace(D,""),i.length>0)n.value=i,n=n.prev;else for(o=n.prev,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.prev,(0===i.length||L.test(i))&&(n.remove(),n=o),n=o}if(B&&P[t]&&(B=!1),(r.removeEmpty||r.paddEmpty)&&b.isEmpty(O))if(r.paddEmpty)b.empty().append(new e("#text","3")).value="\xa0";else if(!b.attributes.map.name&&!b.attributes.map.id)return a=b.parent,T[b.name]?b.empty().remove():b.unwrap(),void(b=a);b=b.parent}}},l),y=b=new e(o.context||r.root_name,11),v.parse(t),k&&A.length&&(o.context?o.invalid=!0:c(A)),I&&("body"==y.name||o.isRootContent)&&a(),!o.invalid){for(S in h){for(_=d[S],C=h[S],N=C.length;N--;)C[N].parent||C.splice(N,1);for(x=0,w=_.length;w>x;x++)_[x](C,S,o)}for(x=0,w=f.length;w>x;x++)if(_=f[x],_.name in p){for(C=p[_.name],N=C.length;N--;)C[N].parent||C.splice(N,1);for(N=0,E=_.callbacks.length;E>N;N++)_.callbacks[N](C,_.name,o)}}return y},r.remove_trailing_brs&&u.addNodeFilter("br",function(t){var n,r=t.length,i,o=s({},l.getBlockElements()),a=l.getNonEmptyElements(),c,u,d,f,h,p;for(o.body=1,n=0;r>n;n++)if(i=t[n],c=i.parent,o[i.parent.name]&&i===c.lastChild){for(d=i.prev;d;){if(f=d.name,"span"!==f||"bookmark"!==d.attr("data-mce-type")){if("br"!==f)break;if("br"===f){i=null;break}}d=d.prev}i&&(i.remove(),c.isEmpty(a)&&(h=l.getElementRule(c.name),h&&(h.removeEmpty?c.remove():h.paddEmpty&&(c.empty().append(new e("#text",3)).value="\xa0"))))}else{for(u=i;c&&c.firstChild===u&&c.lastChild===u&&(u=c,!o[c.name]);)c=c.parent;u===c&&(p=new e("#text",3),p.value="\xa0",i.replace(p))}}),r.allow_html_in_named_anchor||u.addAttributeFilter("id,name",function(e){for(var t=e.length,n,r,i,o;t--;)if(o=e[t],"a"===o.name&&o.firstChild&&!o.attr("href")){i=o.parent,n=o.lastChild;do r=n.prev,i.insert(n,o),n=r;while(n)}}),r.validate&&l.getValidClasses()&&u.addAttributeFilter("class",function(e){for(var t=e.length,n,r,i,o,a,s=l.getValidClasses(),c,u;t--;){for(n=e[t],r=n.attr("class").split(" "),a="",i=0;i0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n")),r.push("<",e),t)for(c=0,u=t.length;u>c;c++)d=t[c],r.push(" ",d.name,'="',s(d.value,!0),'"');!n||l?r[r.length]=">":r[r.length]=" />",n&&i&&a[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n"))},end:function(e){var t;r.push(""),i&&a[e]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(e,t){e.length>0&&(r[r.length]=t?e:s(e))},cdata:function(e){r.push("")},comment:function(e){r.push("")},pi:function(e,t){t?r.push(""):r.push(""),i&&r.push("\n")},doctype:function(e){r.push("",i?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),r(P,[L,B],function(e,t){return function(n,r){var i=this,o=new e(n);n=n||{},n.validate="validate"in n?n.validate:!0,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n=i[e.type],s,l,c,u,d,f,h,p,m;if(n)n(e);else{if(s=e.name,l=e.shortEnded,c=e.attributes,a&&c&&c.length>1&&(f=[],f.map={},m=r.getElementRule(e.name))){for(h=0,p=m.attributesOrder.length;p>h;h++)u=m.attributesOrder[h],u in c.map&&(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));for(h=0,p=c.length;p>h;h++)u=c[h].name,u in f.map||(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));c=f}if(o.start(e.name,c,l),!l){if(e=e.firstChild)do t(e);while(e=e.next);o.end(s)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do t(e);while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r(H,[w,M,D,C,P,A,B,h,m,S],function(e,t,n,r,i,o,a,s,l,c){function u(e){function t(e){return e&&"br"===e.name}var n,r;n=e.lastChild,t(n)&&(r=n.prev,t(r)&&(n.remove(),r.remove()))}var d=l.each,f=l.trim,h=e.DOM,p=["data-mce-selected"];return function(e,o){function m(e){var t=new RegExp(["]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>","\\s?("+p.join("|")+')="[^"]+"'].join("|"),"gi");return e=c.trim(e.replace(t,""))}function g(){var e=o.getBody().innerHTML,t=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,r,i,a,s,l,c=o.schema;for(e=m(e),l=c.getShortEndedElements();s=t.exec(e);)i=t.lastIndex,a=s[0].length,r=l[s[1]]?i:n.findEndTag(c,e,i),e=e.substring(0,i-a)+e.substring(r),t.lastIndex=i-a;return f(e)}function v(e){-1===l.inArray(p,e)&&(C.addAttributeFilter(e,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),p.push(e))}var y,b,C;return o&&(y=o.dom,b=o.schema),y=y||h,b=b||new a(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0,C=new t(e,b),C.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length,r;n--;)r=e[n],r.attr("tabindex",r.attributes.map["data-mce-tabindex"]),r.attr(t,null)}),C.addAttributeFilter("src,href,style",function(t,n){for(var r=t.length,i,o,a="data-mce-"+n,s=e.url_converter,l=e.url_converter_scope,c;r--;)i=t[r],o=i.attributes.map[a],o!==c?(i.attr(n,o.length>0?o:null),i.attr(a,null)):(o=i.attributes.map[n],"style"===n?o=y.serializeStyle(y.parseStyle(o),i.name):s&&(o=s.call(l,o,n,i.name)),i.attr(n,o.length>0?o:null))}),C.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class"),r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}),C.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length,i;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),C.addNodeFilter("noscript",function(e){for(var t=e.length,n;t--;)n=e[t].firstChild,n&&(n.value=r.decode(n.value))}),C.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r=e.length,i,o,a;r--;)i=e[r],o=i.firstChild?i.firstChild.value:"","script"===t?(a=i.attr("type"),a&&i.attr("type","mce-no/type"==a?null:a.replace(/^mce\-/,"")),o.length>0&&(i.firstChild.value="// ")):o.length>0&&(i.firstChild.value="")}),C.addNodeFilter("#comment",function(e){for(var t=e.length,n;t--;)n=e[t],0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}),C.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length,r;n--;)r=e[n],7===r.type?r.remove():1===r.type&&("input"!==t||"type"in r.attributes.map||r.attr("type","text"))}),e.fix_list_elements&&C.addNodeFilter("ul,ol",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.parent,"ul"!==r.name&&"ol"!==r.name||n.prev&&"li"===n.prev.name&&n.prev.append(n)}),C.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:b,addNodeFilter:C.addNodeFilter,addAttributeFilter:C.addAttributeFilter,serialize:function(t,n){var r=this,o,a,l,h,p,m;return s.ie&&y.select("script,style,select,map").length>0?(p=t.innerHTML,t=t.cloneNode(!1),y.setHTML(t,p)):t=t.cloneNode(!0),o=t.ownerDocument.implementation,o.createHTMLDocument&&(a=o.createHTMLDocument(""),d("BODY"==t.nodeName?t.childNodes:[t],function(e){a.body.appendChild(a.importNode(e,!0))}),t="BODY"!=t.nodeName?a.body.firstChild:a.body,l=y.doc,y.doc=a),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,r.onPreProcess(n)),m=C.parse(f(n.getInner?t.innerHTML:y.getOuterHTML(t)),n),u(m),h=new i(e,b),n.content=h.serialize(m),n.cleanup||(n.content=c.trim(n.content),n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||r.onPostProcess(n),l&&(y.doc=l),n.node=null,n.content},addRules:function(e){b.addValidElements(e)},setRules:function(e){b.setValidElements(e)},onPreProcess:function(e){o&&o.fire("PreProcess",e)},onPostProcess:function(e){o&&o.fire("PostProcess",e)},addTempAttr:v,trimHtml:m,getTrimmedContent:g}}}),r(O,[],function(){function e(e){function t(t,n){var r,i=0,o,a,s,l,c,u,d=-1,f;if(r=t.duplicate(),r.collapse(n),f=r.parentElement(),f.ownerDocument===e.dom.doc){for(;"false"===f.contentEditable;)f=f.parentNode;if(!f.hasChildNodes())return{node:f,inside:1};for(s=f.children,o=s.length-1;o>=i;)if(u=Math.floor((i+o)/2),l=s[u],r.moveToElementText(l),d=r.compareEndPoints(n?"StartToStart":"EndToEnd",t),d>0)o=u-1;else{if(!(0>d))return{node:l};i=u+1}if(0>d)for(l?r.collapse(!1):(r.moveToElementText(f),r.collapse(!0),l=f,a=!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&f==r.parentElement();)c++;else for(r.collapse(!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&f==r.parentElement();)c++;return{node:l,position:d,offset:c,inside:a}}}function n(){function n(e){var n=t(o,e),r,i,s=0,l,c,u;if(r=n.node,i=n.offset,n.inside&&!r.hasChildNodes())return void a[e?"setStart":"setEnd"](r,0);if(i===c)return void a[e?"setStartBefore":"setEndAfter"](r);if(n.position<0){if(l=n.inside?r.firstChild:r.nextSibling,!l)return void a[e?"setStartAfter":"setEndAfter"](r);if(!i)return void(3==l.nodeType?a[e?"setStart":"setEnd"](l,0):a[e?"setStartBefore":"setEndBefore"](l));for(;l;){if(3==l.nodeType&&(u=l.nodeValue,s+=u.length,s>=i)){r=l,s-=i,s=u.length-s;break}l=l.nextSibling}}else{if(l=r.previousSibling,!l)return a[e?"setStartBefore":"setEndBefore"](r);if(!i)return void(3==r.nodeType?a[e?"setStart":"setEnd"](l,r.nodeValue.length):a[e?"setStartAfter":"setEndAfter"](l));for(;l;){if(3==l.nodeType&&(s+=l.nodeValue.length,s>=i)){r=l,s-=i;break}l=l.previousSibling}}a[e?"setStart":"setEnd"](r,s)}var o=e.getRng(),a=i.createRng(),s,l,c,u,d;if(s=o.item?o.item(0):o.parentElement(),s.ownerDocument!=i.doc)return a;if(l=e.isCollapsed(),o.item)return a.setStart(s.parentNode,i.nodeIndex(s)),a.setEnd(a.startContainer,a.startOffset+1),a;try{n(!0),l||n()}catch(f){if(-2147024809!=f.number)throw f;d=r.getBookmark(2),c=o.duplicate(),c.collapse(!0),s=c.parentElement(),l||(c=o.duplicate(),c.collapse(!1),u=c.parentElement(),u.innerHTML=u.innerHTML),s.innerHTML=s.innerHTML,r.moveToBookmark(d),o=e.getRng(),n(!0),l||n()}return a}var r=this,i=e.dom,o=!1;this.getBookmark=function(n){function r(e){var t,n,r,o,a=[];for(t=e.parentNode,n=i.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=t.children,o=r.length;o--;)if(e===r[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;return n=t(a,e),n?{position:n.position,offset:n.offset,indexes:r(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:r(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,r,o;for(t=i.getRoot(),n=e.length-1;n>=0;n--)o=t.children,r=e[n],r<=o.length-1&&(t=o[r]);return t}function n(n){var i=e[n?"start":"end"],a,s,l,c;i&&(a=i.position>0,s=o.createTextRange(),s.moveToElementText(t(i.indexes)),c=i.offset,c!==l?(s.collapse(i.inside||a),s.moveStart("character",a?-c:c)):s.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",s),n&&r.collapse(!0))}var r,o=i.doc.body;e.start&&(e.start.ctrl?(r=o.createControlRange(),r.addElement(t(e.start.indexes)),r.select()):(r=o.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(t){function n(e){var t,n,a,d,p;a=i.create("a"),t=e?s:c,n=e?l:u,d=r.duplicate(),t!=f&&t!=f.documentElement||(t=h,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),d.moveToElementText(a),d.moveStart("character",n),i.remove(a),r.setEndPoint(e?"StartToStart":"EndToEnd",d)):(p=t.childNodes,p.length?(n>=p.length?i.insertAfter(a,p[p.length-1]):t.insertBefore(a,p[n]),d.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="",a=t.firstChild,d.moveToElementText(a),d.collapse(o)),r.setEndPoint(e?"StartToStart":"EndToEnd",d),i.remove(a))}var r,a,s,l,c,u,d,f=e.dom.doc,h=f.body,p,m;if(s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,r=h.createTextRange(),s==c&&1==s.nodeType){if(l==u&&!s.hasChildNodes()){if(s.canHaveHTML)return d=s.previousSibling,d&&!d.hasChildNodes()&&i.isBlock(d)?d.innerHTML="":d=null,s.innerHTML="",r.moveToElementText(s.lastChild),r.select(),i.doc.selection.clear(),s.innerHTML="",void(d&&(d.innerHTML=""));l=i.nodeIndex(s),s=s.parentNode}if(l==u-1)try{if(m=s.childNodes[l],a=h.createControlRange(),a.addElement(m),a.select(),p=e.getRng(),p.item&&m===p.item(0))return}catch(g){}}n(!0),n(),r.select()},this.getRangeAt=n}return e}),r(I,[h],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(t){return e.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),r(F,[I,m,u,h,_],function(e,t,n,r,i){var o=i.isContentEditableFalse;return function(i,a){function s(e){var t=a.settings.object_resizing;return t===!1||r.iOS?!1:("string"!=typeof t&&(t="table,img,div"),"false"===e.getAttribute("data-mce-resize")?!1:e==a.getBody()?!1:a.dom.is(e,t))}function l(t){var n,r,i,o,s;n=t.screenX-B,r=t.screenY-D,F=n*R[2]+P,z=r*R[3]+H,F=5>F?5:F,z=5>z?5:z,i="IMG"==_.nodeName&&a.settings.resize_img_proportional!==!1?!e.modifierPressed(t):e.modifierPressed(t)||"IMG"==_.nodeName&&R[2]*R[3]!==0,i&&($(n)>$(r)?(z=q(F*O),F=q(z/O)):(F=q(z/O),z=q(F*O))),N.setStyles(S,{width:F,height:z}),o=R.startPos.x+n,s=R.startPos.y+r,o=o>0?o:0,s=s>0?s:0,N.setStyles(k,{left:o,top:s,display:"block"}),k.innerHTML=F+" × "+z,R[2]<0&&S.clientWidth<=F&&N.setStyle(S,"left",M+(P-F)),R[3]<0&&S.clientHeight<=z&&N.setStyle(S,"top",L+(H-z)),n=j.scrollWidth-Y,r=j.scrollHeight-X,n+r!==0&&N.setStyles(k,{left:o-n,top:s-r}),I||(a.fire("ObjectResizeStart",{target:_,width:P,height:H}),I=!0)}function c(){function e(e,t){t&&(_.style[e]||!a.schema.isValid(_.nodeName.toLowerCase(),e)?N.setStyle(_,e,t):N.setAttrib(_,e,t))}I=!1,e("width",F),e("height",z),N.unbind(W,"mousemove",l),N.unbind(W,"mouseup",c),V!=W&&(N.unbind(V,"mousemove",l),N.unbind(V,"mouseup",c)),N.remove(S),N.remove(k),U&&"TABLE"!=_.nodeName||u(_),a.fire("ObjectResized",{target:_,width:F,height:z}),N.setAttrib(_,"style",N.getAttrib(_,"style")),a.nodeChanged()}function u(e,t,n){var i,o,u,f,h;d(),b(),i=N.getPos(e,j),M=i.x,L=i.y,h=e.getBoundingClientRect(),o=h.width||h.right-h.left,u=h.height||h.bottom-h.top,_!=e&&(y(),_=e,F=z=0),f=a.fire("ObjectSelected",{target:e}),s(e)&&!f.isDefaultPrevented()?E(T,function(e,i){function a(t){B=t.screenX,D=t.screenY,P=_.clientWidth,H=_.clientHeight,O=H/P,R=e,e.startPos={x:o*e[0]+M,y:u*e[1]+L},Y=j.scrollWidth,X=j.scrollHeight,S=_.cloneNode(!0),N.addClass(S,"mce-clonedresizable"),N.setAttrib(S,"data-mce-bogus","all"),S.contentEditable=!1,S.unSelectabe=!0,N.setStyles(S,{left:M,top:L,margin:0}),S.removeAttribute("data-mce-selected"),j.appendChild(S),N.bind(W,"mousemove",l),N.bind(W,"mouseup",c),V!=W&&(N.bind(V,"mousemove",l),N.bind(V,"mouseup",c)),k=N.add(j,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},P+" × "+H)}var s;return t?void(i==t&&a(n)):(s=N.get("mceResizeHandle"+i),s&&N.remove(s),s=N.add(j,"div",{id:"mceResizeHandle"+i,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+i+"-resize; margin:0; padding:0"}),r.ie&&(s.contentEditable=!1),N.bind(s,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),a(e)}),e.elm=s,void N.setStyles(s,{left:o*e[0]+M-s.offsetWidth/2,top:u*e[1]+L-s.offsetHeight/2}))}):d(),_.setAttribute("data-mce-selected","1")}function d(){var e,t;b(),_&&_.removeAttribute("data-mce-selected");for(e in T)t=N.get("mceResizeHandle"+e),t&&(N.unbind(t),N.remove(t))}function f(e){function t(e,t){if(e)do if(e===t)return!0;while(e=e.parentNode)}var n,r;if(!I&&!a.removed)return E(N.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"==e.type?e.target:i.getNode(),r=N.$(r).closest(U?"table":"table,img,hr")[0],t(r,j)&&(C(),n=i.getStart(!0),t(n,r)&&t(i.getEnd(!0),r)&&(!U||r!=n&&"IMG"!==n.nodeName))?void u(r):void d()}function h(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function p(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function m(e){var t=e.srcElement,n,r,i,o,s,l,c;n=t.getBoundingClientRect(),l=A.clientX-n.left,c=A.clientY-n.top;for(r in T)if(i=T[r],o=t.offsetWidth*i[0],s=t.offsetHeight*i[1],$(o-l)<8&&$(s-c)<8){R=i;break}I=!0,a.fire("ObjectResizeStart",{target:_,width:_.clientWidth,height:_.clientHeight}),a.getDoc().selection.empty(),u(t,r,A)}function g(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function v(e){var t=e.srcElement;if(o(t))return void g(e);if(t!=_){if(a.fire("ObjectSelected",{target:t}),y(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);"IMG"!=t.nodeName&&"TABLE"!=t.nodeName||(d(),_=t,h(t,"resizestart",m))}}function y(){p(_,"resizestart",m)}function b(){for(var e in T){var t=T[e];t.elm&&(N.unbind(t.elm),delete t.elm)}}function C(){try{a.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function x(e){var t;if(U){t=W.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function w(){_=S=null,U&&(y(),p(j,"controlselect",v))}var N=a.dom,E=t.each,_,S,k,T,R,A,B,D,M,L,P,H,O,I,F,z,W=a.getDoc(),V=document,U=r.ie&&r.ie<11,$=Math.abs,q=Math.round,j=a.getBody(),Y,X;T={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var K=".mce-content-body";return a.contentStyles.push(K+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: box-sizing;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+K+" .mce-resizehandle:hover {background: #000}"+K+" img[data-mce-selected],"+K+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+K+" .mce-clonedresizable {position: absolute;"+(r.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+K+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),a.on("init",function(){U?(a.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(d(),x(e.target))}),h(j,"controlselect",v),a.on("mousedown",function(e){A=e})):(C(),r.ie>=11&&(a.on("mousedown click",function(e){var t=e.target.nodeName;!I&&/^(TABLE|IMG|HR)$/.test(t)&&(a.selection.select(e.target,"TABLE"==t),"mousedown"==e.type&&a.nodeChanged())}),a.dom.bind(j,"mscontrolselect",function(e){function t(e){n.setEditorTimeout(a,function(){a.selection.select(e)})}return o(e.target)?(e.preventDefault(),void t(e.target)):void(/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&t(e.target)))})));var e=n.throttle(f);a.on("nodechange ResizeEditor ResizeWindow drop",function(t){a.composing||e(t)}),a.on("keydown keyup compositionend",function(t){_&&"TABLE"==_.nodeName&&!a.composing&&e(t)}),a.on("hide blur",d)}),a.on("remove",b),{isResizable:s,showResizeRect:u,hideResizeRect:d,updateResizeRect:f,controlSelect:x,destroy:w}}}),r(z,[],function(){function e(e){return function(){return e}}function t(e){return function(t){return!e(t)}}function n(e,t){return function(n){return e(t(n))}}function r(){var e=a.call(arguments);return function(t){for(var n=0;n=e.length?e.apply(this,t.slice(1)):function(){var e=t.concat([].slice.call(arguments));return o.apply(this,e)}}var a=[].slice;return{constant:e,negate:t,and:i,or:r,curry:o,compose:n}}),r(W,[_,p,k],function(e,t,n){function r(e){return m(e)?!1:d(e)?!f(e.parentNode):h(e)||u(e)||p(e)||c(e)}function i(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode){if(c(e))return!1;if(l(e))return!0}return!0}function o(e){return c(e)?t.reduce(e.getElementsByTagName("*"),function(e,t){return e||l(t); +},!1)!==!0:!1}function a(e){return h(e)||o(e)}function s(e,t){return r(e)&&i(e,t)}var l=e.isContentEditableTrue,c=e.isContentEditableFalse,u=e.isBr,d=e.isText,f=e.matchNodeNames("script style textarea"),h=e.matchNodeNames("img input textarea hr iframe video audio object"),p=e.matchNodeNames("table"),m=n.isCaretContainer;return{isCaretCandidate:r,isInEditable:i,isAtomic:a,isEditableCaretCandidate:s}}),r(V,[],function(){function e(e){return e?{left:u(e.left),top:u(e.top),bottom:u(e.bottom),right:u(e.right),width:u(e.width),height:u(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function t(t,n){return t=e(t),n?t.right=t.left:(t.left=t.left+t.width,t.right=t.left),t.width=0,t}function n(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right}function r(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2}function i(e,t){return e.bottomt.bottom?!1:r(t.top-e.bottom,e,t)}function o(e,t){return e.top>t.bottom?!0:e.bottomt.right}function l(e,t){return i(e,t)?-1:o(e,t)?1:a(e,t)?-1:s(e,t)?1:0}function c(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}var u=Math.round;return{clone:e,collapse:t,isEqual:n,isAbove:i,isBelow:o,isLeft:a,isRight:s,compare:l,containsXY:c}}),r(U,[],function(){function e(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&t.test(e)}var t=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]");return{isExtendingChar:e}}),r($,[z,_,w,T,W,V,U],function(e,t,n,r,i,o,a){function s(e){return e&&/[\r\n\t ]/.test(e)}function l(e){var t=e.startContainer,n=e.startOffset,r;return!!(s(e.toString())&&g(t.parentNode)&&(r=t.data,s(r[n-1])||s(r[n+1])))}function c(e){function t(e){var t=e.ownerDocument,n=t.createRange(),r=t.createTextNode("\xa0"),i=e.parentNode,a;return i.insertBefore(r,e),n.setStart(r,0),n.setEnd(r,1),a=o.clone(n.getBoundingClientRect()),i.removeChild(r),a}function n(e){var n,r;return r=e.getClientRects(),n=r.length>0?o.clone(r[0]):o.clone(e.getBoundingClientRect()),y(e)&&0===n.left?t(e):n}function r(e,t){return e=o.collapse(e,t),e.width=1,e.right=e.left+1,e}function i(e){0!==e.height&&(c.length>0&&o.isEqual(e,c[c.length-1])||c.push(e))}function s(e,t){var o=e.ownerDocument.createRange();if(t0&&(o.setStart(e,t-1),o.setEnd(e,t),l(o)||i(r(n(o),!1))),t=t.data.length:n>=t.childNodes.length}function a(){var e;return e=t.ownerDocument.createRange(),e.setStart(t,n),e.setEnd(t,n),e}function s(){return r||(r=c(new u(t,n))),r}function l(){return s().length>0}function d(e){return e&&t===e.container()&&n===e.offset()}function f(e){return C(t,e?n-1:n)}return{container:e.constant(t),offset:e.constant(n),toRange:a,getClientRects:s,isVisible:l,isAtStart:i,isAtEnd:o,isEqual:d,getNode:f}}var d=t.isElement,f=i.isCaretCandidate,h=t.matchStyleValues("display","block table"),p=t.matchStyleValues("float","left right"),m=e.and(d,f,e.negate(p)),g=e.negate(t.matchStyleValues("white-space","pre pre-line pre-wrap")),v=t.isText,y=t.isBr,b=n.nodeIndex,C=r.getNode;return u.fromRangeStart=function(e){return new u(e.startContainer,e.startOffset)},u.fromRangeEnd=function(e){return new u(e.endContainer,e.endOffset)},u.after=function(e){return new u(e.parentNode,b(e)+1)},u.before=function(e){return new u(e.parentNode,b(e))},u}),r(q,[_,w,z,p,$],function(e,t,n,r,i){function o(e){var t=e.parentNode;return v(t)?o(t):t}function a(e){return e?r.reduce(e.childNodes,function(e,t){return v(t)&&"BR"!=t.nodeName?e=e.concat(a(t)):e.push(t),e},[]):[]}function s(e,t){for(;(e=e.previousSibling)&&g(e);)t+=e.data.length;return t}function l(e){return function(t){return e===t}}function c(t){var n,i,s;return n=a(o(t)),i=r.findIndex(n,l(t),t),n=n.slice(0,i+1),s=r.reduce(n,function(e,t,r){return g(t)&&g(n[r-1])&&e++,e},0),n=r.filter(n,e.matchNodeNames(t.nodeName)),i=r.findIndex(n,l(t),t),i-s}function u(e){var t;return t=g(e)?"text()":e.nodeName.toLowerCase(),t+"["+c(e)+"]"}function d(e,t,n){var r=[];for(t=t.parentNode;t!=e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}function f(t,i){var o,a,l=[],c,f,h;return o=i.container(),a=i.offset(),g(o)?c=s(o,a):(f=o.childNodes,a>=f.length?(c="after",a=f.length-1):c="before",o=f[a]),l.push(u(o)),h=d(t,o),h=r.filter(h,n.negate(e.isBogus)),l=l.concat(r.map(h,function(e){return u(e)})),l.reverse().join("/")+","+c}function h(t,n,i){var o=a(t);return o=r.filter(o,function(e,t){return!g(e)||!g(o[t-1])}),o=r.filter(o,e.matchNodeNames(n)),o[i]}function p(e,t){for(var n=e,r=0,o;g(n);){if(o=n.data.length,t>=r&&r+o>=t){e=n,t-=r;break}if(!g(n.nextSibling)){e=n,t=o;break}r+=o,n=n.nextSibling}return t>e.data.length&&(t=e.data.length),new i(e,t)}function m(e,t){var n,o,a;return t?(n=t.split(","),t=n[0].split("/"),a=n.length>1?n[1]:"before",o=r.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),h(e,t[1],parseInt(t[2],10))):null},e),o?g(o)?p(o,parseInt(a,10)):(a="after"===a?y(o)+1:y(o),new i(o.parentNode,a)):null):null}var g=e.isText,v=e.isBogus,y=t.nodeIndex;return{create:f,resolve:m}}),r(j,[h,m,k,q,$,_],function(e,t,n,r,i,o){function a(a){var l=a.dom;this.getBookmark=function(e,c){function u(e,n){var r=0;return t.each(l.select(e),function(e){return"all"!==e.getAttribute("data-mce-bogus")?e==n?!1:void r++:void 0}),r}function d(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function f(e){function t(e,t){var r=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"],o=[],a,s,u=0;if(3==r.nodeType){if(c)for(a=r.previousSibling;a&&3==a.nodeType;a=a.previousSibling)i+=a.nodeValue.length;o.push(i)}else s=r.childNodes,i>=s.length&&s.length&&(u=1,i=Math.max(0,s.length-1)),o.push(l.nodeIndex(s[i],c)+u);for(;r&&r!=n;r=r.parentNode)o.push(l.nodeIndex(r,c));return o}var n=l.getRoot(),r={};return r.start=t(e,!0),a.isCollapsed()||(r.end=t(e)),r}function h(e){function t(e){var t;if(n.isCaretContainer(e)){if(o.isText(e)&&n.isCaretContainerBlock(e)&&(e=e.parentNode),t=e.previousSibling,s(t))return t;if(t=e.nextSibling,s(t))return t}}return t(e.startContainer)||t(e.endContainer)}var p,m,g,v,y,b,C="",x;if(2==e)return b=a.getNode(),y=b?b.nodeName:null,p=a.getRng(),s(b)||"IMG"==y?{name:y,index:u(y,b)}:a.tridentSel?a.tridentSel.getBookmark(e):(b=h(p),b?(y=b.tagName,{name:y,index:u(y,b)}):f(p));if(3==e)return p=a.getRng(),{start:r.create(l.getRoot(),i.fromRangeStart(p)),end:r.create(l.getRoot(),i.fromRangeEnd(p))};if(e)return{rng:a.getRng()};if(p=a.getRng(),g=l.uniqueId(),v=a.isCollapsed(),x="overflow:hidden;line-height:0px",p.duplicate||p.item){if(p.item)return b=p.item(0),y=b.nodeName,{name:y,index:u(y,b)};m=p.duplicate();try{p.collapse(),p.pasteHTML(''+C+""),v||(m.collapse(!1),p.moveToElementText(m.parentElement()),0===p.compareEndPoints("StartToEnd",m)&&m.move("character",-1),m.pasteHTML(''+C+""))}catch(w){return null}}else{if(b=a.getNode(),y=b.nodeName,"IMG"==y)return{name:y,index:u(y,b)};m=d(p.cloneRange()),v||(m.collapse(!1),m.insertNode(l.create("span",{"data-mce-type":"bookmark",id:g+"_end",style:x},C))),p=d(p),p.collapse(!0),p.insertNode(l.create("span",{"data-mce-type":"bookmark",id:g+"_start",style:x},C))}return a.moveToBookmark({id:g,keep:1}),{id:g}},this.moveToBookmark=function(n){function i(e){var t=n[e?"start":"end"],r,i,o,a;if(t){for(o=t[0],i=d,r=t.length-1;r>=1;r--){if(a=i.childNodes,t[r]>a.length-1)return;i=a[t[r]]}3===i.nodeType&&(o=Math.min(t[0],i.nodeValue.length)),1===i.nodeType&&(o=Math.min(t[0],i.childNodes.length)),e?u.setStart(i,o):u.setEnd(i,o)}return!0}function o(r){var i=l.get(n.id+"_"+r),o,a,s,c,u=n.keep;if(i&&(o=i.parentNode,"start"==r?(u?(o=i.firstChild,a=1):a=l.nodeIndex(i),f=h=o,p=m=a):(u?(o=i.firstChild,a=1):a=l.nodeIndex(i),h=o,m=a),!u)){for(c=i.previousSibling,s=i.nextSibling,t.each(t.grep(i.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});i=l.get(n.id+"_"+r);)l.remove(i,1);c&&s&&c.nodeType==s.nodeType&&3==c.nodeType&&!e.opera&&(a=c.nodeValue.length,c.appendData(s.nodeValue),l.remove(s),"start"==r?(f=h=c,p=m=a):(h=c,m=a))}}function s(t){return!l.isBlock(t)||t.innerHTML||e.ie||(t.innerHTML='
    '),t}function c(){var e,t;return e=l.createRng(),t=r.resolve(l.getRoot(),n.start),e.setStart(t.container(),t.offset()),t=r.resolve(l.getRoot(),n.end),e.setEnd(t.container(),t.offset()),e}var u,d,f,h,p,m;if(n)if(t.isArray(n.start)){if(u=l.createRng(),d=l.getRoot(),a.tridentSel)return a.tridentSel.moveToBookmark(n);i(!0)&&i()&&a.setRng(u)}else"string"==typeof n.start?a.setRng(c(n)):n.id?(o("start"),o("end"),f&&(u=l.createRng(),u.setStart(s(f),p),u.setEnd(s(h),m),a.setRng(u))):n.name?a.select(l.select(n.name)[n.index]):n.rng&&a.setRng(n.rng)}}var s=o.isContentEditableFalse;return a.isBookmarkNode=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},a}),r(Y,[y,O,F,T,j,_,h,m],function(e,n,r,i,o,a,s,l){function c(e,t,i,a){var s=this;s.dom=e,s.win=t,s.serializer=i,s.editor=a,s.bookmarkManager=new o(s),s.controlSelection=new r(s,a),s.win.getSelection||(s.tridentSel=new n(s))}var u=l.each,d=l.trim,f=s.ie;return c.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();e?(r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)):(n._moveEndPoint(r,n.editor.getBody(),!0),n.setRng(r))},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body"),o=n.getSel(),a,s,l;return e=e||{},a=s="",e.get=!0,e.format=e.format||"html",e.selection=!0,n.editor.fire("BeforeGetContent",e),"text"==e.format?n.isCollapsed()?"":r.text||(o.toString?o.toString():""):(r.cloneContents?(l=r.cloneContents(),l&&i.appendChild(l)):r.item!==t||r.htmlText!==t?(i.innerHTML="
    "+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=r.toString(),/^\s/.test(i.innerHTML)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='_',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('_'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(e){var t=this,n=t.getRng(),r,i,o,a;if(n.duplicate||n.item){if(n.item)return n.item(0);for(o=n.duplicate(),o.collapse(1),r=o.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),i=a=n.parentElement();a=a.parentNode;)if(a==r){r=i;break}return r}return r=n.startContainer,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[Math.min(r.childNodes.length-1,n.startOffset)])),r&&3==r.nodeType?r.parentNode:r},getEnd:function(e){var t=this,n=t.getRng(),r,i;return n.duplicate||n.item?n.item?n.item(0):(n=n.duplicate(),n.collapse(0),r=n.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),r&&"BODY"==r.nodeName?r.lastChild||r:r):(r=n.endContainer,i=n.endOffset,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[i>0?i-1:i])),r&&3==r.nodeType?r.parentNode:r)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),o;if(n.lastFocusBookmark=null,e){if(!t&&n.controlSelection.controlSelect(e))return;o=r.nodeIndex(e),i.setStart(e.parentNode,o),i.setEnd(e.parentNode,o+1),t&&(n._moveEndPoint(i,e,!0),n._moveEndPoint(i,e)),n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var n=this,r,i,o,a,s,l;if(!n.win)return null;if(a=n.win.document,!e&&n.lastFocusBookmark){var c=n.lastFocusBookmark;return c.startContainer?(i=a.createRange(),i.setStart(c.startContainer,c.startOffset),i.setEnd(c.endContainer,c.endOffset)):i=c,i}if(e&&n.tridentSel)return n.tridentSel.getRangeAt(0);try{(r=n.getSel())&&(i=r.rangeCount>0?r.getRangeAt(0):r.createRange?r.createRange():a.createRange())}catch(u){}if(l=n.editor.fire("GetSelectionRange",{range:i}),l.range!==i)return l.range;if(f&&i&&i.setStart&&a.selection){try{s=a.selection.createRange()}catch(u){}s&&s.item&&(o=s.item(0),i=a.createRange(),i.setStartBefore(o),i.setEndAfter(o))}return i||(i=a.createRange?a.createRange():a.body.createTextRange()),i.setStart&&9===i.startContainer.nodeType&&i.collapsed&&(o=n.dom.getRoot(),i.setStart(o,0),i.setEnd(o,0)),n.selectedRange&&n.explicitRange&&(0===t(i.START_TO_START,i,n.selectedRange)&&0===t(i.END_TO_END,i,n.selectedRange)?i=n.explicitRange:(n.selectedRange=null,n.explicitRange=null)),i},setRng:function(e,t){var n=this,r,i,o;if(e)if(e.select){n.explicitRange=null;try{e.select()}catch(a){}}else if(n.tridentSel){if(e.cloneRange)try{n.tridentSel.addRange(e)}catch(a){}}else{if(r=n.getSel(),o=n.editor.fire("SetSelectionRange",{range:e}),e=o.range,r){n.explicitRange=e;try{r.removeAllRanges(),r.addRange(e)}catch(a){}t===!1&&r.extend&&(r.collapse(e.endContainer,e.endOffset),r.extend(e.startContainer,e.startOffset)),n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}e.collapsed||e.startContainer!=e.endContainer||!r.setBaseAndExtent||s.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(i=e.startContainer.childNodes[e.startOffset],i&&"IMG"==i.tagName&&n.getSel().setBaseAndExtent(i,0,i,1))}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i,o,a,s,l=t.dom.getRoot();return n?(i=n.startContainer,o=n.endContainer,a=n.startOffset,s=n.endOffset,n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):(r=n.item?n.item(0):n.parentElement(),r.ownerDocument!==t.win.document&&(r=l),r)):l},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a,s=[];if(a=i.getRoot(),t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&t!=a&&s.push(t),t&&n&&t!=n){o=t;for(var l=new e(t,a);(o=l.next())&&o!=n;)i.isBlock(o)&&s.push(o)}return n&&t!=n&&n!=a&&s.push(n),s},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0):!0},normalize:function(){var e=this,t=e.getRng();return s.range&&new i(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n=this,r;return n.selectorChangedData||(n.selectorChangedData={},r={},n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,o=i.getParents(t,null,i.getRoot()),a={};u(n.selectorChangedData,function(e,t){u(o,function(n){return i.is(n,t)?(r[t]||(u(e,function(e){e(!0,{node:n,selector:t,parents:o})}),r[t]=e),a[t]=e,!1):void 0})}),u(r,function(e,n){a[n]||(delete r[n],u(e,function(e){e(!1,{node:t,selector:n,parents:o})}))})})),n.selectorChangedData[e]||(n.selectorChangedData[e]=[]),n.selectorChangedData[e].push(t),n},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){function n(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var r,i,o=this,s=o.dom,l=s.getRoot(),c,u,d=0;if(a.isElement(e)){if(t===!1&&(d=e.offsetHeight),"BODY"!=l.nodeName){var f=o.getScrollContainer();if(f)return r=n(e).y-n(f).y+d,u=f.clientHeight,c=f.scrollTop,void((c>r||r+25>c+u)&&(f.scrollTop=c>r?r:r-u+25))}i=s.getViewPort(o.editor.getWin()),r=s.getPos(e).y+d,c=i.y,u=i.h,(rc+u)&&o.editor.getWin().scrollTo(0,c>r?r:r-u+25)}},placeCaretAt:function(e,t){this.setRng(i.getCaretRangeFromPoint(e,t,this.editor.getDoc()))},_moveEndPoint:function(t,n,r){var i=n,o=new e(n,i),a=this.dom.schema.getNonEmptyElements();do{if(3==n.nodeType&&0!==d(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));if(s.ie&&s.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?o.next():o.prev());"BODY"==i.nodeName&&(r?t.setStart(i,0):t.setEnd(i,i.childNodes.length))},destroy:function(){this.win=null,this.controlSelection.destroy()}},c}),r(X,[j,m],function(e,t){function n(t){this.compare=function(n,i){function o(e){var n={};return r(t.getAttribs(e),function(r){var i=r.nodeName.toLowerCase();0!==i.indexOf("_")&&"style"!==i&&"data-mce-style"!==i&&"data-mce-fragment"!=i&&(n[i]=t.getAttrib(e,i))}),n}function a(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(n=t[r],"undefined"==typeof n)return!1;if(e[r]!=n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0}return n.nodeName!=i.nodeName?!1:a(o(n),o(i))&&a(t.parseStyle(t.getAttrib(n,"style")),t.parseStyle(t.getAttrib(i,"style")))?!e.isBookmarkNode(n)&&!e.isBookmarkNode(i):!1}}var r=t.each;return n}),r(K,[m],function(e){function t(e,t){function r(e){return e.replace(/%(\w+)/g,"")}var i,o,a=e.dom,s="",l,c;if(c=e.settings.preview_styles,c===!1)return"";if(c||(c="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof t){if(t=e.formatter.get(t),!t)return;t=t[0]}return i=t.block||t.inline||"span",o=a.create(i),n(t.styles,function(e,t){e=r(e),e&&a.setStyle(o,t,e)}),n(t.attributes,function(e,t){e=r(e),e&&a.setAttrib(o,t,e)}),n(t.classes,function(e){e=r(e),a.hasClass(o,e)||a.addClass(o,e)}),e.fire("PreviewFormats"),a.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),l=a.getStyle(e.getBody(),"fontSize",!0),l=/px$/.test(l)?parseInt(l,10):0,n(c.split(" "),function(t){var n=a.getStyle(o,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=a.getStyle(e.getBody(),t,!0),"#ffffff"==a.toHex(n).toLowerCase())||"color"==t&&"#000000"==a.toHex(n).toLowerCase())){if("font-size"==t&&/em|%$/.test(n)){if(0===l)return;n=parseFloat(n,10)/(/%$/.test(n)?100:1),n=n*l+"px"}"border"==t&&n&&(s+="padding:0 2px;"),s+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),a.remove(o),s}var n=e.each;return{getCssText:t}}),r(G,[p,_,g],function(e,t,n){function r(e,t){var n=o[e];n||(o[e]=n=[]),o[e].push(t)}function i(e,t){s(o[e],function(e){e(t)})}var o=[],a=e.filter,s=e.each;return r("pre",function(r){function i(t){return c(t.previousSibling)&&-1!=e.indexOf(u,t.previousSibling)}function o(e,t){n(t).remove(),n(e).append("

    ").append(t.childNodes)}var l=r.selection.getRng(),c,u;c=t.matchNodeNames("pre"),l.collapsed||(u=r.selection.getSelectedBlocks(),s(a(a(u,c),i),function(e){o(e.previousSibling,e)}))}),{postProcess:i}}),r(J,[y,T,j,X,m,K,G],function(e,t,n,r,i,o,a){return function(s){function l(e){return e.nodeType&&(e=e.nodeName),!!s.schema.getTextBlockElements()[e.toLowerCase()]}function c(e){return/^(TH|TD)$/.test(e.nodeName)}function u(e){return e&&/^(IMG)$/.test(e.nodeName)}function d(e,t){return Y.getParents(e,t,Y.getRoot())}function f(e){return 1===e.nodeType&&"_mce_caret"===e.id}function h(){g({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},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,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(e,t,n){ue(n,function(t,n){Y.setAttrib(e,n,t)})}},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}]}),ue("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){g(e,{block:e,remove:"all"})}),g(s.settings.formats)}function p(){s.addShortcut("meta+b","bold_desc","Bold"),s.addShortcut("meta+i","italic_desc","Italic"),s.addShortcut("meta+u","underline_desc","Underline");for(var e=1;6>=e;e++)s.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);s.addShortcut("access+7","",["FormatBlock",!1,"p"]),s.addShortcut("access+8","",["FormatBlock",!1,"div"]),s.addShortcut("access+9","",["FormatBlock",!1,"address"])}function m(e){return e?j[e]:j}function g(e,t){e&&("string"!=typeof e?ue(e,function(e,t){g(t,e)}):(t=t.length?t:[t],ue(t,function(e){e.deep===oe&&(e.deep=!e.selector),e.split===oe&&(e.split=!e.selector||e.inline),e.remove===oe&&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+/))}),j[e]=t))}function v(e){return e&&j[e]&&delete j[e],j}function y(e,t){var n=m(t);if(n)for(var r=0;r0)return r;if(r.childNodes.length>1||r==t||"BR"==r.tagName)return r}}var n=s.selection.getRng(),i=n.startContainer,o=n.endContainer;if(i!=o&&0===n.endOffset){var a=t(i,o),l=3==a.nodeType?a.data.length:a.childNodes.length;n.setEnd(a,l)}return n}function c(e,r,o){var a=[],s,c,h=!0;s=d.inline||d.block,c=Y.create(s),i(c),K.walk(e,function(e){function r(e){var m,v,y,b,C;return C=h,m=e.nodeName.toLowerCase(),v=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&ae(e)&&(C=h,h="true"===ae(e),b=!0),B(m,"br")?(p=0,void(d.block&&Y.remove(e))):d.wrapper&&E(e,t,n)?void(p=0):h&&!b&&d.block&&!d.wrapper&&l(m)&&G(v,s)?(e=Y.rename(e,s),i(e),a.push(e),void(p=0)):d.selector&&(ue(u,function(t){return"collapsed"in t&&t.collapsed!==g?void 0:Y.is(e,t.selector)&&!f(e)?(i(e,t),y=!0,!1):void 0}),!d.inline||y)?void(p=0):void(!h||b||!G(s,m)||!G(v,s)||!o&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||f(e)||d.inline&&J(e)?(p=0,ue(de(e.childNodes),r),b&&(h=C),p=0):(p||(p=Y.clone(c,ne),e.parentNode.insertBefore(p,e),a.push(p)),p.appendChild(e)))}var p;ue(e,r)}),d.links===!0&&ue(a,function(e){function t(e){"A"===e.nodeName&&i(e,d),ue(de(e.childNodes),t)}t(e)}),ue(a,function(e){function r(e){var t=0;return ue(e.childNodes,function(e){P(e)||ce(e)||t++}),t}function o(e){var t,n;return ue(e.childNodes,function(e){return 1!=e.nodeType||ce(e)||f(e)?void 0:(t=e,ne)}),t&&!ce(t)&&A(t,d)&&(n=Y.clone(t,ne),i(n),Y.replace(n,e,re),Y.remove(t,1)),n||e}var s;if(s=r(e),(a.length>1||!J(e))&&0===s)return void Y.remove(e,1);if(d.inline||d.wrapper){if(d.exact||1!==s||(e=o(e)),ue(u,function(t){ue(Y.select(t.inline,e),function(e){ce(e)||F(t,n,e,t.exact?e:null)})}),E(e.parentNode,t,n))return Y.remove(e,1),e=0,re;d.merge_with_parents&&Y.getParent(e.parentNode,function(r){return E(r,t,n)?(Y.remove(e,1),e=0,re):void 0}),e&&d.merge_siblings!==!1&&(e=V(W(e),e),e=V(e,W(e,re)))}})}var u=m(t),d=u[0],h,p,g=!r&&X.isCollapsed();if("false"!==ae(X.getNode())){if(d){if(r)r.nodeType?(p=Y.createRng(),p.setStartBefore(r),p.setEndAfter(r),c(O(p,u),null,!0)):c(r,null,!0);else if(g&&d.inline&&!Y.select("td[data-mce-selected],th[data-mce-selected]").length)$("apply",t,n);else{var v=s.selection.getNode();Q||!u[0].defaultBlock||Y.getParent(v,Y.isBlock)||x(u[0].defaultBlock),s.selection.setRng(o()),h=X.getBookmark(),c(O(X.getRng(re),u),h),d.styles&&(d.styles.color||d.styles.textDecoration)&&(fe(v,C,"childNodes"),C(v)),X.moveToBookmark(h),q(X.getRng(re)),s.nodeChanged()}a.postProcess(t,s)}}else{r=X.getNode();for(var y=0,b=u.length;b>y;y++)if(u[y].ceFalseOverride&&Y.is(r,u[y].selector))return void i(r,u[y])}}function w(e,t,n,r){function i(e){var n,r,o,a,s;if(1===e.nodeType&&ae(e)&&(a=y,y="true"===ae(e),s=!0),n=de(e.childNodes),y&&!s)for(r=0,o=h.length;o>r&&!F(h[r],t,e,e);r++);if(p.deep&&n.length){for(r=0,o=n.length;o>r;r++)i(n[r]);s&&(y=a)}}function o(n){var i;return ue(d(n.parentNode).reverse(),function(n){var o;i||"_start"==n.id||"_end"==n.id||(o=E(n,e,t,r),o&&o.split!==!1&&(i=n))}),i}function a(e,n,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=n.parentNode;o&&o!=u;o=o.parentNode){for(a=Y.clone(o,ne),c=0;cC&&(!h[C].ceFalseOverride||!F(h[C],t,n,n));C++);}}function N(e,t,n){var r=m(e);!_(e,t,n)||"toggle"in r[0]&&!r[0].toggle?x(e,t,n):w(e,t,n)}function E(e,t,n,r){function i(e,t,i){var o,a,s=t[i],l;if(t.onmatch)return t.onmatch(e,t,i);if(s)if(s.length===oe){for(o in s)if(s.hasOwnProperty(o)){if(a="attributes"===i?Y.getAttrib(e,o):D(e,o),r&&!a&&!t.exact)return;if((!r||t.exact)&&!B(a,M(L(s[o],n),o)))return}}else for(l=0;l=0;o--){if(a=t[o].selector,!a||t[o].defaultBlock)return re;for(i=r.length-1;i>=0;i--)if(Y.is(r[i],a))return re}return ne}function T(e,t,n){var r;return ie||(ie={},r={},s.on("NodeChange",function(e){var t=d(e.element),n={};t=i.grep(t,function(e){return 1==e.nodeType&&!e.getAttribute("data-mce-bogus")}),ue(ie,function(e,i){ue(t,function(o){return E(o,i,{},e.similar)?(r[i]||(ue(e,function(e){e(!0,{node:o,format:i,parents:t})}),r[i]=e),n[i]=e,!1):y(o,i)?!1:void 0})}),ue(r,function(i,o){n[o]||(delete r[o],ue(i,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),ue(e.split(","),function(e){ie[e]||(ie[e]=[],ie[e].similar=n),ie[e].push(t)}),this}function R(e){return o.getCssText(s,e)}function A(e,t){return B(e,t.inline)?re:B(e,t.block)?re:t.selector?1==e.nodeType&&Y.is(e,t.selector):void 0}function B(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function D(e,t){return M(Y.getStyle(e,t),t)}function M(e,t){return"color"!=t&&"backgroundColor"!=t||(e=Y.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function L(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function P(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function H(e,t,n){var r=Y.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function O(t,n,r){function i(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var r,i,o,a,s;if(r=i=e?g:y,a=e?"previousSibling":"nextSibling",s=Y.getRoot(),3==r.nodeType&&!P(r)&&(e?v>0:bo?n:o,-1===n||r||n++):(n=a.indexOf(" ",t),o=a.indexOf("\xa0",t),n=-1!==n&&(-1===o||o>n)?n:o),n}var a,l,c,u;if(3===t.nodeType){if(c=o(t,n),-1!==c)return{container:t,offset:c};u=t}for(a=new e(t,Y.getParent(t,J)||s.getBody());l=a[i?"prev":"next"]();)if(3===l.nodeType){if(u=l,c=o(l),-1!==c)return{container:l,offset:c}}else if(J(l))break;return u?(n=i?0:u.length,{container:u,offset:n}):void 0}function u(e,r){var i,o,a,s;for(3==e.nodeType&&0===e.nodeValue.length&&e[r]&&(e=e[r]),i=d(e),o=0;oh?h:v],3==g.nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(h=y.childNodes.length-1,y=y.childNodes[b>h?h:b-1],3==y.nodeType&&(b=y.nodeValue.length)),g=a(g),y=a(y),(ce(g.parentNode)||ce(g))&&(g=ce(g)?g:g.parentNode,g=g.nextSibling||g,3==g.nodeType&&(v=0)),(ce(y.parentNode)||ce(y))&&(y=ce(y)?y:y.parentNode,y=y.previousSibling||y,3==y.nodeType&&(b=y.length)),n[0].inline&&(t.collapsed&&(m=c(g,v,!0),m&&(g=m.container,v=m.offset),m=c(y,b),m&&(y=m.container,b=m.offset)),p=o(y,b),p.node)){for(;p.node&&0===p.offset&&p.node.previousSibling;)p=o(p.node.previousSibling);p.node&&p.offset>0&&3===p.node.nodeType&&" "===p.node.nodeValue.charAt(p.offset-1)&&p.offset>1&&(y=p.node,y.splitText(p.offset-1))}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=i(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=i())),n[0].selector&&n[0].expand!==ne&&!n[0].inline&&(g=u(g,"previousSibling"),y=u(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=f(g,"previousSibling"),y=f(y,"nextSibling"),n[0].block&&(J(g)||(g=i(!0)),J(y)||(y=i()))),1==g.nodeType&&(v=Z(g),g=g.parentNode),1==y.nodeType&&(b=Z(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function I(e,t){return t.links&&"A"==e.tagName}function F(e,t,n,r){var i,o,a;if(!A(n,e)&&!I(n,e))return ne;if("all"!=e.remove)for(ue(e.styles,function(i,o){i=M(L(i,t),o),"number"==typeof o&&(o=i,r=0),(e.remove_similar||!r||B(D(r,o),i))&&Y.setStyle(n,o,""),a=1}),a&&""===Y.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),ue(e.attributes,function(e,i){var o;if(e=L(e,t),"number"==typeof i&&(i=e,r=0),!r||B(Y.getAttrib(r,i),e)){if("class"==i&&(e=Y.getAttrib(n,i),e&&(o="",ue(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(o+=(o?" ":"")+e)}),o)))return void Y.setAttrib(n,i,o);"class"==i&&n.removeAttribute("className"),te.test(i)&&n.removeAttribute("data-mce-"+i),n.removeAttribute(i)}}),ue(e.classes,function(e){e=L(e,t),r&&!Y.hasClass(r,e)||Y.removeClass(n,e)}),o=Y.getAttribs(n),i=0;io?o:i]),3===r.nodeType&&n&&i>=r.nodeValue.length&&(r=new e(r,s.getBody()).next()||r),3!==r.nodeType||n||0!==i||(r=new e(r,s.getBody()).prev()||r),r}function $(t,n,r,i){function o(e){var t=Y.create("span",{id:g,"data-mce-bogus":!0,style:v?"color:red":""});return e&&t.appendChild(s.getDoc().createTextNode(ee)),t}function a(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==ee||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function c(e){for(;e;){if(e.id===g)return e;e=e.parentNode}}function u(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function d(e,t){var n,r;if(e)r=X.getRng(!0),a(e)?(t!==!1&&(r.setStartBefore(e),r.setEndBefore(e)),Y.remove(e)):(n=u(e),n.nodeValue.charAt(0)===ee&&(n.deleteData(0,1),r.startContainer==n&&r.startOffset>0&&r.setStart(n,r.startOffset-1),r.endContainer==n&&r.endOffset>0&&r.setEnd(n,r.endOffset-1)),Y.remove(e,1)),X.setRng(r);else if(e=c(X.getStart()),!e)for(;e=Y.get(g);)d(e,!1)}function f(){var e,t,i,a,s,l,d;e=X.getRng(!0),a=e.startOffset,l=e.startContainer,d=l.nodeValue,t=c(X.getStart()),t&&(i=u(t)),d&&a>0&&a=0;h--)u.appendChild(Y.clone(f[h],!1)),u=u.firstChild;u.appendChild(Y.doc.createTextNode(ee)),u=u.firstChild;var g=Y.getParent(d,l);g&&Y.isEmpty(g)?d.parentNode.replaceChild(p,d):Y.insertAfter(p,d),X.setCursorLocation(u,1),Y.isEmpty(d)&&Y.remove(d)}}function p(){var e;e=c(X.getStart()),e&&!Y.isEmpty(e)&&fe(e,function(e){1!=e.nodeType||e.id===g||Y.isEmpty(e)||Y.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var g="_mce_caret",v=s.settings.caret_debug;s._hasCaretEvents||(le=function(){var e=[],t;if(a(c(X.getStart()),e))for(t=e.length;t--;)Y.setAttrib(e[t],"data-mce-bogus","1")},se=function(e){var t=e.keyCode;d(),8==t&&X.isCollapsed()&&X.getStart().innerHTML==ee&&d(c(X.getStart())),37!=t&&39!=t||d(c(X.getStart())),p()},s.on("SetContent",function(e){e.selection&&p()}),s._hasCaretEvents=!0),"apply"==t?f():h()}function q(t){var n=t.startContainer,r=t.startOffset,i,o,a,s,l;if((t.startContainer!=t.endContainer||!u(t.startContainer.childNodes[t.startOffset]))&&(3==n.nodeType&&r>=n.nodeValue.length&&(r=Z(n),n=n.parentNode,i=!0),1==n.nodeType))for(s=n.childNodes,n=s[Math.min(r,s.length-1)],o=new e(n,Y.getParent(n,Y.isBlock)),(r>s.length-1||i)&&o.next(),a=o.current();a;a=o.next())if(3==a.nodeType&&!P(a))return l=Y.create("a",{"data-mce-bogus":"all"},ee),a.parentNode.insertBefore(l,a),t.setStart(a,0),X.setRng(t),void Y.remove(l)}var j={},Y=s.dom,X=s.selection,K=new t(Y),G=s.schema.isValidChild,J=Y.isBlock,Q=s.settings.forced_root_block,Z=Y.nodeIndex,ee="\ufeff",te=/^(src|href|style)$/,ne=!1,re=!0,ie,oe,ae=Y.getContentEditable,se,le,ce=n.isBookmarkNode,ue=i.each,de=i.grep,fe=i.walk,he=i.extend;he(this,{get:m,register:g,unregister:v,apply:x,remove:w,toggle:N,match:_,matchAll:S,matchNode:E,canApply:k,formatChanged:T,getCssText:R}),h(),p(),s.on("BeforeGetContent",function(e){le&&"raw"!=e.format&&le()}),s.on("mouseup keydown",function(e){se&&se(e)})}}),r(Q,[I,h],function(e,t){return function(e){function n(){return e.serializer.getTrimmedContent()}function r(t){e.setDirty(t)}function i(e){o.typing=!1,o.add({},e)}var o=this,a=0,s=[],l,c,u=0;return e.on("init",function(){o.add()}),e.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&o.beforeChange()}),e.on("ExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&i(e)}),e.on("ObjectResizeStart Cut",function(){o.beforeChange()}),e.on("SaveContent ObjectResized blur",i),e.on("DragEnd",i),e.on("KeyUp",function(a){var l=a.keyCode;a.isDefaultPrevented()||((l>=33&&36>=l||l>=37&&40>=l||45==l||13==l||a.ctrlKey)&&(i(),e.nodeChanged()),(46==l||8==l||t.mac&&(91==l||93==l))&&e.nodeChanged(),c&&o.typing&&(e.isDirty()||(r(s[0]&&n()!=s[0].content),e.isDirty()&&e.fire("change",{level:s[0],lastLevel:null})),e.fire("TypingUndo"),c=!1,e.nodeChanged()))}),e.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented()){if(t>=33&&36>=t||t>=37&&40>=t||45==t)return void(o.typing&&i(e));var n=e.ctrlKey&&!e.altKey||e.metaKey;!(16>t||t>20)||224==t||91==t||o.typing||n||(o.beforeChange(),o.typing=!0,o.add({},e),c=!0)}}),e.on("MouseDown",function(e){o.typing&&i(e)}),e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()}),o={data:s,typing:!1,beforeChange:function(){u||(l=e.selection.getBookmark(2,!0))},add:function(t,i){var o,c=e.settings,d;if(t=t||{},t.content=n(),u||e.removed)return null;if(d=s[a],e.fire("BeforeAddUndo",{level:t,lastLevel:d,originalEvent:i}).isDefaultPrevented())return null;if(d&&d.content==t.content)return null;if(s[a]&&(s[a].beforeBookmark=l),c.custom_undo_redo_levels&&s.length>c.custom_undo_redo_levels){for(o=0;o0&&(r(!0),e.fire("change",f)),t},undo:function(){var t;return o.typing&&(o.add(),o.typing=!1),a>0&&(t=s[--a],e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(t.beforeBookmark),r(!0),e.fire("undo",{level:t})),t},redo:function(){var t;return a0||o.typing&&s[0]&&n()!=s[0].content},hasRedo:function(){return aP)&&(u=a.create("br"),t.parentNode.insertBefore(u,t)),l.setStartBefore(t),l.setEndBefore(t)):(l.setStartAfter(t),l.setEndAfter(t)):(l.setStart(t,0),l.setEnd(t,0));s.setRng(l),a.remove(u),s.scrollIntoView(t)}}function y(e){var t=l.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&a.setAttribs(e,l.forced_root_block_attrs)}function b(e){e.innerHTML=r?"":'
    '}function C(e){var t=D,n,i,o,s=u.getTextInlineElements();if(e||"TABLE"==z?(n=a.create(e||V),y(n)):n=L.cloneNode(!1),o=n,l.keep_styles!==!1)do if(s[t.nodeName]){if("_mce_caret"==t.id)continue;i=t.cloneNode(!1),a.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(o=i,n.appendChild(i))}while((t=t.parentNode)&&t!=B);return r||(o.innerHTML='
    '),n}function x(t){var n,r,i;if(3==D.nodeType&&(t?M>0:MD.childNodes.length-1,D=D.childNodes[Math.min(M,D.childNodes.length-1)]||D,M=U&&3==D.nodeType?D.nodeValue.length:0),B=S(D)){if(c.beforeChange(),!a.isBlock(B)&&B!=a.getRoot())return void(V&&!H||E());if((V&&!H||!V&&H)&&(D=w(D,M)),L=a.getParent(D,a.isBlock),F=L?a.getParent(L.parentNode,a.isBlock):null,z=L?L.nodeName.toUpperCase():"",W=F?F.nodeName.toUpperCase():"","LI"!=W||o.ctrlKey||(L=F,z=W),/^(LI|DT|DD)$/.test(z)){if(!V&&H)return void E();if(a.isEmpty(L))return void N()}if("PRE"==z&&l.br_in_pre!==!1){if(!H)return void E()}else if(!V&&!H&&"LI"!=z||V&&H)return void E();V&&L===i.getBody()||(V=V||"P",x()?T():x(!0)?(O=L.parentNode.insertBefore(C(),L),m(O),v(L)):(A=R.cloneRange(),A.setEndAfter(L),I=A.extractContents(),_(I),O=I.firstChild,a.insertAfter(I,L),g(O),k(L),a.isEmpty(L)&&b(L),O.normalize(),a.isEmpty(O)?(a.remove(O),T()):v(O)),a.setAttrib(O,"id",""),i.fire("NewBlock",{newBlock:O}),c.add())}}}var a=i.dom,s=i.selection,l=i.settings,c=i.undoManager,u=i.schema,d=u.getNonEmptyElements(),f=u.getMoveCaretBeforeOnEnterElements();i.on("keydown",function(e){13==e.keyCode&&o(e)!==!1&&e.preventDefault()})}}),r(ee,[],function(){return function(e){function t(){var t=i.getStart(),s=e.getBody(),l,c,u,d,f,h,p,m=-16777215,g,v,y,b,C;if(C=n.forced_root_block,t&&1===t.nodeType&&C){for(;t&&t!=s;){if(a[t.nodeName])return;t=t.parentNode}if(l=i.getRng(),l.setStart){c=l.startContainer,u=l.startOffset,d=l.endContainer,f=l.endOffset;try{v=e.getDoc().activeElement===s}catch(x){}}else l.item&&(t=l.item(0),l=e.getDoc().body.createTextRange(),l.moveToElementText(t)),v=l.parentElement().ownerDocument===e.getDoc(),y=l.duplicate(),y.collapse(!0),u=-1*y.move("character",m),y.collapsed||(y=l.duplicate(),y.collapse(!1),f=-1*y.move("character",m)-u);for(t=s.firstChild,b=s.nodeName.toLowerCase();t;)if((3===t.nodeType||1==t.nodeType&&!a[t.nodeName])&&o.isValidChild(b,C.toLowerCase())){if(3===t.nodeType&&0===t.nodeValue.length){p=t,t=t.nextSibling,r.remove(p);continue}h||(h=r.create(C,e.settings.forced_root_block_attrs),t.parentNode.insertBefore(h,t),g=!0),p=t,t=t.nextSibling,h.appendChild(p)}else h=null,t=t.nextSibling;if(g&&v){if(l.setStart)l.setStart(c,u),l.setEnd(d,f),i.setRng(l);else try{l=e.getDoc().body.createTextRange(),l.moveToElementText(s),l.collapse(!0),l.moveStart("character",u),f>0&&l.moveEnd("character",f),l.select()}catch(x){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),r(te,[z,y,_,$,k,W],function(e,t,n,r,i,o){function a(e){return e>0}function s(e){return 0>e}function l(e,n,r,i,o){var l=new t(e,i);if(s(n)){if(C(e)&&(e=l.prev(!0),r(e)))return e;for(;e=l.prev(o);)if(r(e))return e}if(a(n)){if(C(e)&&(e=l.next(!0),r(e)))return e;for(;e=l.next(o);)if(r(e))return e}return null}function c(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode)if(b(e))return e;return t}function u(e,t){for(;e&&e!=t;){if(x(e))return e;e=e.parentNode}return null}function d(e,t,n){return u(e.container(),n)==u(t.container(),n)}function f(e,t,n){return c(e.container(),n)==c(t.container(),n)}function h(e,t){var n,r;return t?(n=t.container(),r=t.offset(),E(n)?n.childNodes[r+e]:null):null}function p(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function m(e,t,n){return u(t,e)==u(n,e)}function g(e,t,n){var r,i;for(i=e?"previousSibling":"nextSibling";n&&n!=t;){if(r=n[i],w(r)&&(r=r[i]),C(r)){if(m(t,r,n))return r;break}if(_(r))break;n=n.parentNode}return null}function v(e,t,r){var o,a,s,l,c=N(g,!0,t),u=N(g,!1,t);if(a=r.startContainer,s=r.startOffset,i.isCaretContainerBlock(a)){if(E(a)||(a=a.parentNode),l=a.getAttribute("data-mce-caret"),"before"==l&&(o=a.nextSibling,C(o)))return S(o);if("after"==l&&(o=a.previousSibling,C(o)))return k(o)}if(!r.collapsed)return r;if(n.isText(a)){if(w(a)){if(1===e){if(o=u(a))return S(o);if(o=c(a))return k(o)}if(-1===e){if(o=c(a))return k(o);if(o=u(a))return S(o)}return r}if(i.endsWithCaretContainer(a)&&s>=a.data.length-1)return 1===e&&(o=u(a))?S(o):r;if(i.startsWithCaretContainer(a)&&1>=s)return-1===e&&(o=c(a))?k(o):r;if(s===a.data.length)return o=u(a),o?S(o):r;if(0===s)return o=c(a),o?k(o):r}return r}function y(e,t){return C(h(e,t))}var b=n.isContentEditableTrue,C=n.isContentEditableFalse,x=n.matchStyleValues("display","block table table-cell table-caption"),w=i.isCaretContainer,N=e.curry,E=n.isElement,_=o.isCaretCandidate,S=N(p,!0),k=N(p,!1);return{isForwards:a,isBackwards:s,findNode:l,getEditingHost:c,getParentBlock:u,isInSameBlock:d,isInSameEditingHost:f,isBeforeContentEditableFalse:N(y,0),isAfterContentEditableFalse:N(y,-1),normalizeRange:v}}),r(ne,[_,W,$,te,p,z],function(e,t,n,r,i,o){function a(e,t){for(var n=[];e&&e!=t;)n.push(e),e=e.parentNode;return n}function s(e,t){return e.hasChildNodes()&&t0)return n(C,--x);if(m(e)&&x0&&(N=s(C,x-1),v(N)))return!y(N)&&(E=r.findNode(N,e,b,N))?f(E)?n(E,E.data.length):n.after(E):f(N)?n(N,N.data.length):n.before(N);if(m(e)&&x=1&&7>=n&&(i=p(I.font_size_style_values),r=p(I.font_size_classes),n=r?r[n-1]||n:i[n-1]||n),B(e,n)},RemoveFormat:function(e){H.remove(e)},mceBlockQuote:function(){B("blockquote")},FormatBlock:function(e,t,n){return B(n||"p")},mceCleanup:function(){var e=P.getBookmark();c.setContent(c.getContent({cleanup:v}),{cleanup:v}),P.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var r=n||P.getNode();r!=c.getBody()&&(D(),c.dom.remove(r,v),M())},mceSelectNodeDepth:function(e,t,n){var r=0;L.getParent(P.getNode(),function(e){return 1==e.nodeType&&r++==n?(P.select(e),y):void 0},c.getBody())},mceSelectNode:function(e,t,n){P.select(n)},mceInsertContent:function(t,n,o){function a(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=P.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^ /," "):t("previousSibling")||(e=e.replace(/^ /," ")),i|)$/," "):t("nextSibling")||(e=e.replace(/( | )(
    |)$/," "))),e}function d(){var e,t,n;e=P.getRng(!0),t=e.startContainer,n=e.startOffset,3==t.nodeType&&e.collapsed&&("\xa0"===t.data[n]?(t.deleteData(n,1),/[\u00a0| ]$/.test(o)||(o+=" ")):"\xa0"===t.data[n-1]&&(t.deleteData(n-1,1),/[\u00a0| ]$/.test(o)||(o=" "+o)))}function f(e){if(D)for(R=e.firstChild;R;R=R.walk(!0))H[R.name]&&R.attr("data-mce-new","true")}function h(){if(D){var e=c.getBody(),t=new i(L);u(L.select("*[data-mce-new]"),function(n){n.removeAttribute("data-mce-new");for(var r=n.parentNode;r&&r!=e;r=r.parentNode)t.compare(r,n)&&L.remove(n,!0)})}}function p(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}function g(e){r.each(e.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")})}function v(e){return!!e.getAttribute("data-mce-fragment")}function y(e){return e&&!c.schema.getShortEndedElements()[e.nodeName]}function C(e){function t(e){for(var t=c.getBody();e&&e!==t;e=e.parentNode)if("false"===c.dom.getContentEditable(e))return e;return null}function n(e){var t=l.fromRangeStart(e),n=new s(c.getBody());return t=n.next(t),t?t.toRange():void 0; +}var r,i,o;if(e){if(P.scrollIntoView(e),r=t(e))return L.remove(e),void P.select(r);T=L.createRng(),R=e.previousSibling,R&&3==R.nodeType?(T.setStart(R,R.nodeValue.length),m||(A=e.nextSibling,A&&3==A.nodeType&&(R.appendData(A.data),A.parentNode.removeChild(A)))):(T.setStartBefore(e),T.setEndBefore(e)),i=L.getParent(e,L.isBlock),L.remove(e),i&&L.isEmpty(i)&&(c.$(i).empty(),T.setStart(i,0),T.setEnd(i,0),b(i)||v(i)||!(o=n(T))?L.add(i,L.create("br",{"data-mce-bogus":"1"})):(T=o,L.remove(i))),P.setRng(T)}}var x,w,N,E,_,S,k,T,R,A,B,D,M,H=c.schema.getTextInlineElements();"string"!=typeof o&&(D=o.merge,M=o.data,o=o.content),/^ | $/.test(o)&&(o=a(o)),x=c.parser,w=new e({validate:I.validate},c.schema),B='​',S={content:o,format:"html",selection:!0},c.fire("BeforeSetContent",S),o=S.content,-1==o.indexOf("{$caret}")&&(o+="{$caret}"),o=o.replace(/\{\$caret\}/,B),T=P.getRng();var O=T.startContainer||(T.parentElement?T.parentElement():null),F=c.getBody();O===F&&P.isCollapsed()&&L.isBlock(F.firstChild)&&y(F.firstChild)&&L.isEmpty(F.firstChild)&&(T=L.createRng(),T.setStart(F.firstChild,0),T.setEnd(F.firstChild,0),P.setRng(T)),P.isCollapsed()||(c.selection.setRng(c.selection.getRng()),c.getDoc().execCommand("Delete",!1,null),d()),N=P.getNode();var z={context:N.nodeName.toLowerCase(),data:M};if(_=x.parse(o,z),p(_),f(_),R=_.lastChild,"mce_marker"==R.attr("id"))for(k=R,R=R.prev;R;R=R.walk(!0))if(3==R.type||!L.isBlock(R.name)){c.schema.isValidChild(R.parent.name,"span")&&R.parent.insert(k,R,"br"===R.name);break}if(c._selectionOverrides.showBlockCaretContainer(N),z.invalid){for(P.setContent(B),N=P.getNode(),E=c.getBody(),9==N.nodeType?N=R=E:R=N;R!==E;)N=R,R=R.parentNode;o=N==E?E.innerHTML:L.getOuterHTML(N),o=w.serialize(x.parse(o.replace(//i,function(){return w.serialize(_)}))),N==E?L.setHTML(E,o):L.setOuterHTML(N,o)}else o=w.serialize(_),R=N.firstChild,A=N.lastChild,!R||R===A&&"BR"===R.nodeName?L.setHTML(N,o):P.setContent(o);h(),C(L.get("mce_marker")),g(c.getBody()),c.fire("SetContent",S),c.addVisual()},mceInsertRawHTML:function(e,t,n){P.setContent("tiny_mce_marker"),c.setContent(c.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){B(n)},mceSetContent:function(e,t,n){c.setContent(n)},"Indent,Outdent":function(e){var t,n,r;t=I.indentation,n=/[a-z%]+$/i.exec(t),t=parseInt(t,10),x("InsertUnorderedList")||x("InsertOrderedList")?R(e):(I.forced_root_block||L.getParent(P.getNode(),L.isBlock)||H.apply("div"),u(P.getSelectedBlocks(),function(i){if("false"!==L.getContentEditable(i)&&"LI"!=i.nodeName){var o=c.getParam("indent_use_margin",!1)?"margin":"padding";o+="rtl"==L.getStyle(i,"direction",!0)?"Right":"Left","outdent"==e?(r=Math.max(0,parseInt(i.style[o]||0,10)-t),L.setStyle(i,o,r?r+n:"")):(r=parseInt(i.style[o]||0,10)+t+n,L.setStyle(i,o,r))}}))},mceRepaint:function(){},InsertHorizontalRule:function(){c.execCommand("mceInsertContent",!1,"
    ")},mceToggleVisualAid:function(){c.hasVisual=!c.hasVisual,c.addVisual()},mceReplaceContent:function(e,t,n){c.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,P.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=L.getParent(P.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||H.remove("link"),n.href&&H.apply("link",n,r)},selectAll:function(){var e=L.getRoot(),t;P.getRng().setStart?(t=L.createRng(),t.setStart(e,0),t.setEnd(e,e.childNodes.length),P.setRng(t)):(t=P.getRng(),t.item||(t.moveToElementText(e),t.select()))},"delete":function(){R("Delete");var e=c.getBody();L.isEmpty(e)&&(c.setContent(""),e.firstChild&&L.isBlock(e.firstChild)?c.selection.setCursorLocation(e.firstChild,0):c.selection.setCursorLocation(e,0))},mceNewDocument:function(){c.setContent("")},InsertLineBreak:function(e,t,n){function r(){for(var e=new a(h,m),t,n=c.schema.getNonEmptyElements();t=e.next();)if(n[t.nodeName.toLowerCase()]||t.length>0)return!0}var i=n,s,l,u,d=P.getRng(!0);new o(L).normalize(d);var f=d.startOffset,h=d.startContainer;if(1==h.nodeType&&h.hasChildNodes()){var p=f>h.childNodes.length-1;h=h.childNodes[Math.min(f,h.childNodes.length-1)]||h,f=p&&3==h.nodeType?h.nodeValue.length:0}var m=L.getParent(h,L.isBlock),y=m?m.nodeName.toUpperCase():"",b=m?L.getParent(m.parentNode,L.isBlock):null,C=b?b.nodeName.toUpperCase():"",x=i&&i.ctrlKey;"LI"!=C||x||(m=b,y=C),h&&3==h.nodeType&&f>=h.nodeValue.length&&(g||r()||(s=L.create("br"),d.insertNode(s),d.setStartAfter(s),d.setEndAfter(s),l=!0)),s=L.create("br"),d.insertNode(s);var w=L.doc.documentMode;return g&&"PRE"==y&&(!w||8>w)&&s.parentNode.insertBefore(L.doc.createTextNode("\r"),s),u=L.create("span",{}," "),s.parentNode.insertBefore(u,s),P.scrollIntoView(u),L.remove(u),l?(d.setStartBefore(s),d.setEndBefore(s)):(d.setStartAfter(s),d.setEndAfter(s)),P.setRng(d),c.undoManager.add(),v}}),N({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=P.isCollapsed()?[L.getParent(P.getNode(),L.isBlock)]:P.getSelectedBlocks(),r=f(n,function(e){return!!H.matchNode(e,t)});return-1!==h(r,v)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return A(e)},mceBlockQuote:function(){return A("blockquote")},Outdent:function(){var e;if(I.inline_styles){if((e=L.getParent(P.getStart(),L.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return v;if((e=L.getParent(P.getEnd(),L.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return v}return x("InsertUnorderedList")||x("InsertOrderedList")||!I.inline_styles&&!!L.getParent(P.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=L.getParent(P.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),N({"FontSize,FontName":function(e){var t=0,n;return(n=L.getParent(P.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),N({Undo:function(){c.undoManager.undo()},Redo:function(){c.undoManager.redo()}})}}),r(ie,[m],function(e){function t(e,o){var a=this,s,l;if(e=r(e),o=a.settings=o||{},s=o.base_uri,/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(a.source=e);var c=0===e.indexOf("//");0!==e.indexOf("/")||c||(e=(s?s.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(l=o.base_uri?o.base_uri.path:new t(location.href).directory,""===o.base_uri.protocol?e="//mce_host"+a.toAbsPath(l,e):(e=/([^#?]*)([#?]?.*)/.exec(e),e=(s&&s.protocol||"http")+"://mce_host"+a.toAbsPath(l,e[1])+e[2])),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(i,function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),a[t]=r}),s&&(a.protocol||(a.protocol=s.protocol),a.userInfo||(a.userInfo=s.userInfo),a.port||"mce_host"!==a.host||(a.port=s.port),a.host&&"mce_host"!==a.host||(a.host=s.host),a.source=""),c&&(a.protocol="")}var n=e.each,r=e.trim,i="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),o={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n=this,r;if("./"===e)return e;if(e=new t(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=n.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=n.toRelPath(n.path,e.path),e.query&&(r+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,n){return e=new t(e,{base_uri:this}),e.getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=o[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.lengtho;o++)if(o>=e.length||e[o]!=n[o]){r=o+1;break}if(1===r)return t;for(o=0,a=e.length-(r-1);a>o;o++)i+="../";for(o=r-1,a=n.length;a>o;o++)i+=o!=r-1?"/"+n[o]:n[o];return i},toAbsPath:function(e,t){var r,i=0,o=[],a,s;for(a=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),n(e,function(e){e&&o.push(e)}),e=o,r=t.length-1,o=[];r>=0;r--)0!==t[r].length&&"."!==t[r]&&(".."!==t[r]?i>0?i--:o.push(t[r]):i++);return r=e.length-i,s=0>=r?o.reverse().join("/"):e.slice(0,r).join("/")+"/"+o.reverse().join("/"),0!==s.indexOf("/")&&(s="/"+s),a&&s.lastIndexOf("/")!==s.length-1&&(s+=a),s},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(t+=n.protocol?n.protocol+"://":"//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}},t.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},t}),r(oe,[m],function(e){function t(){}var n=e.each,r=e.extend,i,o;return t.extend=i=function(e){function t(){var e,t,n,r=this;if(!o&&(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)}function a(){return this}function s(e,t){return function(){var n=this,r=n._super,i;return n._super=c[e],i=t.apply(n,arguments),n._super=r,i}}var l=this,c=l.prototype,u,d,f;o=!0,u=new l,o=!1,e.Mixins&&(n(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),c.Mixins&&(e.Mixins=c.Mixins.concat(e.Mixins))),e.Methods&&n(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&n(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;return e!==r?(t[n]=e,t):t[n]}}),e.Statics&&n(e.Statics,function(e,n){t[n]=e}),e.Defaults&&c.Defaults&&(e.Defaults=r({},c.Defaults,e.Defaults));for(d in e)f=e[d],"function"==typeof f&&c[d]?u[d]=s(d,f):u[d]=f;return t.prototype=u,t.constructor=t,t.extend=i,t},t}),r(ae,[m],function(e){function t(t){function n(){return!1}function r(){return!0}function i(e,i){var o,s,l,c;if(e=e.toLowerCase(),i=i||{},i.type=e,i.target||(i.target=u),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=r},i.stopPropagation=function(){i.isPropagationStopped=r},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=r},i.isDefaultPrevented=n,i.isPropagationStopped=n,i.isImmediatePropagationStopped=n),t.beforeFire&&t.beforeFire(i),o=d[e])for(s=0,l=o.length;l>s;s++){if(c=o[s],c.once&&a(e,c.func),i.isImmediatePropagationStopped())return i.stopPropagation(),i;if(c.func.call(u,i)===!1)return i.preventDefault(),i}return i}function o(t,r,i,o){var a,s,l;if(r===!1&&(r=n),r)for(r={func:r},o&&e.extend(r,o),s=t.toLowerCase().split(" "),l=s.length;l--;)t=s[l],a=d[t],a||(a=d[t]=[],f(t,!0)),i?a.unshift(r):a.push(r);return c}function a(e,t){var n,r,i,o,a;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],r=d[e],!e){for(i in d)f(i,!1),delete d[i];return c}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),d[e]=r);else r.length=0;r.length||(f(e,!1),delete d[e])}}else{for(e in d)f(e,!1);d={}}return c}function s(e,t,n){return o(e,t,n,{once:!0})}function l(e){return e=e.toLowerCase(),!(!d[e]||0===d[e].length)}var c=this,u,d={},f;t=t||{},u=t.scope||c,f=t.toggleEvent||n,c.fire=i,c.on=o,c.off=a,c.once=s,c.has=l}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchend"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),r(se,[],function(){function e(e){this.create=e.create}return e.create=function(t,n){return new e({create:function(e,r){function i(t){e.set(r,t.value)}function o(e){t.set(n,e.value)}var a;return e.on("change:"+r,o),t.on("change:"+n,i),a=e._bindings,a||(a=e._bindings=[],e.on("destroy",function(){for(var e=a.length;e--;)a[e]()})),a.push(function(){t.off("change:"+n,i)}),t.get(n)}})},e}),r(le,[ae],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,r){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,r)}})),t._eventDispatcher}return{fire:function(e,n,r){var i=this;if(i.removed&&"remove"!==e)return n;if(n=t(i).fire(e,n,r),r!==!1&&i.parent)for(var o=i.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,r){return t(this).on(e,n,r)},off:function(e,n){return t(this).off(e,n)},once:function(e,n){return t(this).once(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),r(ce,[se,le,oe,m],function(e,t,n,r){function i(e){return e.nodeType>0}function o(e,t){var n,a;if(e===t)return!0;if(null===e||null===t)return e===t;if("object"!=typeof e||"object"!=typeof t)return e===t;if(r.isArray(t)){if(e.length!==t.length)return!1;for(n=e.length;n--;)if(!o(e[n],t[n]))return!1}if(i(e)||i(t))return e===t;a={};for(n in t){if(!o(e[n],t[n]))return!1;a[n]=!0}for(n in e)if(!a[n]&&!o(e[n],t[n]))return!1;return!0}return n.extend({Mixins:[t],init:function(t){var n,r;t=t||{};for(n in t)r=t[n],r instanceof e&&(t[n]=r.create(this,n));this.data=t},set:function(t,n){var r,i,a=this.data[t];if(n instanceof e&&(n=n.create(this,t)),"object"==typeof t){for(r in t)this.set(r,t[r]);return this}return o(a,n)||(this.data[t]=n,i={target:this,name:t,value:n,oldValue:a},this.fire("change:"+t,i),this.fire("change",i)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(t){return e.create(this,t)},destroy:function(){this.fire("destroy")}})}),r(ue,[oe],function(e){function t(e){for(var t=[],n=e.length,r;n--;)r=e[n],r.__checked||(t.push(r),r.__checked=1);for(n=t.length;n--;)delete t[n].__checked;return t}var n=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=/^\s*|\s*$/g,o,a=e.extend({init:function(e){function t(e){return e?(e=e.toLowerCase(),function(t){return"*"===e||t.type===e}):void 0}function o(e){return e?function(t){return t._name===e}:void 0}function a(e){return e?(e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.classes.contains(e[n]))return!1;return!0}):void 0}function s(e,t,n){return e?function(r){var i=r[e]?r[e]():"";return t?"="===t?i===n:"*="===t?i.indexOf(n)>=0:"~="===t?(" "+i+" ").indexOf(" "+n+" ")>=0:"!="===t?i!=n:"^="===t?0===i.indexOf(n):"$="===t?i.substr(i.length-n.length)===n:!1:!!n}:void 0}function l(e){var t;return e?(e=/(?:not\((.+)\))|(.+)/i.exec(e),e[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2===0:"odd"===e?n%2===1:t[e]?t[e]():!1})):void 0}function c(e,r,c){function u(e){e&&r.push(e)}var d;return d=n.exec(e.replace(i,"")),u(t(d[1])),u(o(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),r.pseudo=!!d[7],r.direct=c,r}function u(e,t){var n=[],i,o,a;do if(r.exec(""),o=r.exec(e),o&&(e=o[3],n.push(o[1]),o[2])){i=o[3];break}while(o);for(i&&u(i,t),e=[],a=0;a"!=n[a]&&e.push(c(n[a],[],">"===n[a-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,r,i,o,a,s,l,c,u,d,f,h,p;for(t=t||this._selectors,n=0,r=t.length;r>n;n++){for(a=t[n],o=a.length,p=e,h=0,i=o-1;i>=0;i--)for(c=a[i];p;){if(c.pseudo)for(f=p.parent().items(),u=d=f.length;u--&&f[u]!==p;);for(s=0,l=c.length;l>s;s++)if(!c[s](p,u,d)){s=l+1;break}if(s===l){h++;break}if(i===o-1)break;p=p.parent()}if(h===o)return!0}return!1},find:function(e){function n(e,t,i){var o,a,s,l,c,u=t[i];for(o=0,a=e.length;a>o;o++){for(c=e[o],s=0,l=u.length;l>s;s++)if(!u[s](c,o,a)){s=l+1;break}if(s===l)i==t.length-1?r.push(c):c.items&&n(c.items(),t,i+1);else if(u.direct)return;c.items&&n(c.items(),t,i)}}var r=[],i,s,l=this._selectors;if(e.items){for(i=0,s=l.length;s>i;i++)n(e.items(),l[i],0);s>1&&(r=t(r))}return o||(o=a.Collection),new o(r)}});return a}),r(de,[m,ue,oe],function(e,t,n){var r,i,o=Array.prototype.push,a=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof r?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t=this,n=t.length,r;for(t.length=0,t.add(e),r=t.length;n>r;r++)delete t[r];return t},filter:function(e){var n=this,i,o,a=[],s,l;for("string"==typeof e?(e=new t(e),l=function(t){return e.match(t)}):l=e,i=0,o=n.length;o>i;i++)s=n[i],l(s)&&a.push(s);return new r(a)},slice:function(){return new r(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].classes.contains(e):!1},prop:function(e,t){var n=this,r,i;return t!==r?(n.each(function(n){n[e]&&n[e](t)}),n):(i=n[0],i&&i[e]?i[e]():void 0)},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(e){return this.each(function(t){t.classes.add(e)})},removeClass:function(e){return this.each(function(t){t.classes.remove(e)})}},e.each("fire on off show hide append prepend before after reflow".split(" "),function(t){i[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){i[e]=function(t){return this.prop(e,t)}}),r=n.extend(i),t.Collection=r,r}),r(fe,[m,w],function(e,t){var n=0;return{id:function(){return"mceu_"+n++},create:function(n,r,i){var o=document.createElement(n);return t.DOM.setAttribs(o,r),"string"==typeof i?o.innerHTML=i:e.each(i,function(e){e.nodeType&&o.appendChild(e)}),o},createFragment:function(e){return t.DOM.createFragment(e)},getWindowSize:function(){return t.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,n){return t.DOM.getPos(e,n)},getViewPort:function(e){return t.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,n){return t.DOM.addClass(e,n)},removeClass:function(e,n){return t.DOM.removeClass(e,n)},hasClass:function(e,n){return t.DOM.hasClass(e,n)},toggleClass:function(e,n,r){return t.DOM.toggleClass(e,n,r)},css:function(e,n,r){return t.DOM.setStyle(e,n,r)},getRuntimeStyle:function(e,n){return t.DOM.getStyle(e,n,!0)},on:function(e,n,r,i){return t.DOM.bind(e,n,r,i)},off:function(e,n,r){return t.DOM.unbind(e,n,r)},fire:function(e,n,r){return t.DOM.fire(e,n,r)},innerHtml:function(e,n){t.DOM.setHTML(e,n)}}}),r(he,[],function(){return{parseBox:function(e){var t,n=10;if(e)return"number"==typeof e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}}}}),r(pe,[m],function(e){function t(){}function n(e){this.cls=[],this.cls._map={},this.onchange=e||t,this.prefix=""}return e.extend(n.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){for(var t=0;t0&&(e+=" "),e+=this.prefix+this.cls[t];return e},n}),r(me,[u],function(e){var t={},n;return{add:function(r){var i=r.parent();if(i){if(!i._layout||i._layout.isNative())return;t[i._id]||(t[i._id]=i),n||(n=!0,e.requestAnimationFrame(function(){var e,r;n=!1;for(e in t)r=t[e],r.state.get("rendered")&&r.reflow();t={}},document.body))}},remove:function(e){t[e._id]&&delete t[e._id]}}}),r(ge,[oe,m,ae,ce,de,fe,g,he,pe,me],function(e,t,n,r,i,o,a,s,l,c){function u(e){return e._eventDispatcher||(e._eventDispatcher=new n({scope:e,toggleEvent:function(t,r){r&&n.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e.state.get("rendered")&&d(e))}})),e._eventDispatcher}function d(e){function t(t){var n=e.getParentCtrl(t.target);n&&n.fire(t.type,t)}function n(){var e=c._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),c._lastHoverCtrl=null)}function r(t){var n=e.getParentCtrl(t.target),r=c._lastHoverCtrl,i=0,o,a,s;if(n!==r){if(c._lastHoverCtrl=n,a=n.parents().toArray().reverse(),a.push(n),r){for(s=r.parents().toArray().reverse(),s.push(r),i=0;i=i;o--)r=s[o],r.fire("mouseleave",{target:r.getEl()})}for(o=i;oo;o++)c=l[o]._eventsRoot;for(c||(c=l[l.length-1]||e),e._eventsRoot=c,s=o,o=0;s>o;o++)l[o]._eventsRoot=c;var p=c._delegates;p||(p=c._delegates={});for(d in u){if(!u)return!1;"wheel"!==d||h?("mouseenter"===d||"mouseleave"===d?c._hasMouseEnter||(a(c.getEl()).on("mouseleave",n).on("mouseover",r),c._hasMouseEnter=1):p[d]||(a(c.getEl()).on(d,t),p[d]=!0),u[d]=!1):f?a(e.getEl()).on("mousewheel",i):a(e.getEl()).on("DOMMouseScroll",i)}}}var f="onmousewheel"in document,h=!1,p="mce-",m,g=0,v={Statics:{classPrefix:p},isRtl:function(){return m.rtl},classPrefix:p,init:function(e){function n(e){var t;for(e=e.split(" "),t=0;tn.maxW?n.maxW:i,n.w=i,n.innerW=i-o),i=e.h,i!==s&&(i=in.maxH?n.maxH:i,n.h=i,n.innerH=i-a),i=e.innerW,i!==s&&(i=in.maxW-o?n.maxW-o:i,n.innerW=i,n.w=i+o),i=e.innerH,i!==s&&(i=in.maxH-a?n.maxH-a:i,n.innerH=i,n.h=i+a),e.contentW!==s&&(n.contentW=e.contentW),e.contentH!==s&&(n.contentH=e.contentH),r=t._lastLayoutRect,r.x===n.x&&r.y===n.y&&r.w===n.w&&r.h===n.h||(l=m.repaintControls,l&&l.map&&!l.map[t._id]&&(l.push(t),l.map[t._id]=!0),r.x=n.x,r.y=n.y,r.w=n.w,r.h=n.h),t):n},repaint:function(){var e=this,t,n,r,i,o,a,s,l,c,u;c=document.createRange?function(e){return e}:Math.round,t=e.getEl().style,i=e._layoutRect,l=e._lastRepaintRect||{},o=e.borderBox,a=o.left+o.right,s=o.top+o.bottom,i.x!==l.x&&(t.left=c(i.x)+"px",l.x=i.x),i.y!==l.y&&(t.top=c(i.y)+"px",l.y=i.y),i.w!==l.w&&(u=c(i.w-a),t.width=(u>=0?u:0)+"px",l.w=i.w),i.h!==l.h&&(u=c(i.h-s),t.height=(u>=0?u:0)+"px",l.h=i.h),e._hasBody&&i.innerW!==l.innerW&&(u=c(i.innerW),r=e.getEl("body"),r&&(n=r.style,n.width=(u>=0?u:0)+"px"),l.innerW=i.innerW),e._hasBody&&i.innerH!==l.innerH&&(u=c(i.innerH),r=r||e.getEl("body"),r&&(n=n||r.style,n.height=(u>=0?u:0)+"px"),l.innerH=i.innerH),e._lastRepaintRect=l,e.fire("repaint",{},!1)},updateLayoutRect:function(){var e=this;e.parent()._lastRect=null,o.css(e.getEl(),{width:"",height:""}),e._layoutRect=e._lastRepaintRect=e._lastLayoutRect=null,e.initLayoutRect()},on:function(e,t){function n(e){var t,n;return"string"!=typeof e?e:function(i){return t||r.parentsAndSelf().each(function(r){var i=r.settings.callbacks;return i&&(t=i[e])?(n=r,!1):void 0}),t?t.call(n,i):(i.action=e,void this.fire("execute",i))}}var r=this;return u(r).on(e,n(t)),r},off:function(e,t){return u(this).off(e,t),this},fire:function(e,t,n){var r=this;if(t=t||{},t.control||(t.control=r),t=u(r).fire(e,t),n!==!1&&r.parent)for(var i=r.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return u(this).has(e)},parents:function(e){var t=this,n,r=new i;for(n=t.parent();n;n=n.parent())r.add(n);return e&&(r=r.filter(e)),r},parentsAndSelf:function(e){return new i(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=a("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,r=n.getEl(n.ariaTarget);return"undefined"==typeof t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&r.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){return t!==!1&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return m.translate?m.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),r,i;if(e.items){var o=e.items().toArray();for(i=o.length;i--;)o[i].remove()}n&&n.items&&(r=[],n.items().each(function(t){t!==e&&r.push(t)}),n.items().set(r),n._lastRect=null),e._eventsRoot&&e._eventsRoot==e&&a(t).off();var s=e.getRoot().controlIdLookup;return s&&delete s[e._id],t&&t.parentNode&&t.parentNode.removeChild(t),e.state.set("rendered",!1),e.state.destroy(),e.fire("remove"),e},renderBefore:function(e){return a(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return a(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'
    '},postRender:function(){var e=this,t=e.settings,n,r,i,o,s;e.$el=a(e.getEl()),e.state.set("rendered",!0);for(o in t)0===o.indexOf("on")&&e.on(o.substr(2),t[o]);if(e._eventsRoot){for(i=e.parent();!s&&i;i=i.parent())s=i._eventsRoot;if(s)for(o in s._nativeEvents)e._nativeEvents[o]=!0}d(e),t.style&&(n=e.getEl(),n&&(n.setAttribute("style",t.style),n.style.cssText=t.style)),e.settings.border&&(r=e.borderBox,e.$el.css({"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left}));var l=e.getRoot();l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[e._id]=e;for(var u in e._aria)e.aria(u,e._aria[u]);e.state.get("visible")===!1&&(e.getEl().style.display="none"),e.bindStates(),e.state.on("change:visible",function(t){var n=t.value,r;e.state.get("rendered")&&(e.getEl().style.display=n===!1?"none":"",e.getEl().getBoundingClientRect()),r=e.parent(),r&&(r._lastRect=null),e.fire(n?"show":"hide"),c.add(e)}),e.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n=this.getEl(),r=n.parentNode,i,o,a,s,l,c,u=t(n,r);return i=u.x,o=u.y,a=n.offsetWidth,s=n.offsetHeight,l=r.clientWidth,c=r.clientHeight,"end"==e?(i-=l-a,o-=c-s):"center"==e&&(i-=l/2-a/2,o-=c/2-s/2),r.scrollLeft=i,r.scrollTop=o,this},getRoot:function(){for(var e=this,t,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),t=e,e=e.parent()}t||(t=this);for(var r=n.length;r--;)n[r].rootControl=t;return t},reflow:function(){c.remove(this);var e=this.parent();return e._layout&&!e._layout.isNative()&&e.reflow(),this}};return t.each("text title visible disabled active value".split(" "),function(e){v[e]=function(t){return 0===arguments.length?this.state.get(e):("undefined"!=typeof t&&this.state.set(e,t),this)}}),m=e.extend(v)}),r(ve,[],function(){var e={},t;return{add:function(t,n){e[t.toLowerCase()]=n},has:function(t){return!!e[t.toLowerCase()]},create:function(n,r){var i,o,a;if(!t){a=tinymce.ui;for(o in a)e[o.toLowerCase()]=a[o];t=!0}if("string"==typeof n?(r=r||{},r.type=n):(r=n,n=r.type),n=n.toLowerCase(),i=e[n],!i)throw new Error("Could not find control by type: "+n);return i=new i(r),i.type=n,i}}}),r(ye,[],function(){return function(e){function t(e){return e&&1===e.nodeType}function n(e){return e=e||C,t(e)?e.getAttribute("role"):null}function r(e){for(var t,r=e||C;r=r.parentNode;)if(t=n(r))return t}function i(e){var n=C;return t(n)?n.getAttribute("aria-"+e):void 0}function o(e){var t=e.tagName.toUpperCase(); +return"INPUT"==t||"TEXTAREA"==t||"SELECT"==t}function a(e){return o(e)&&!e.hidden?!0:!!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(n(e))}function s(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display){a(e)&&n.push(e);for(var r=0;re?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function d(e,t){var n=-1,r=l();t=t||s(r.getEl());for(var i=0;i=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),n=e.getEl(),n&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n=this,i,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),i=o.extend({},n.settings.defaults,t),t.type=i.type=i.type||t.type||n.settings.defaultType||(i.defaults?i.defaults.type:null),t=r.create(i)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r;t.parent(e),t.state.get("rendered")||(r=e.getEl("body"),r.hasChildNodes()&&n<=r.childNodes.length-1?a(r.childNodes[n]).before(t.renderHtml()):a(r).append(t.renderHtml()),t.postRender(),l.add(t))}),e._layout.applyClasses(e.items().filter(":visible")),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r=this,i,o,a;return e=r.create(e),i=r.items(),!n&&t=0&&t
    '+(e.settings.html||"")+t.renderHtml(e)+"
    "},postRender:function(){var e=this,t;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e.state.set("rendered",!0),e.settings.style&&e.$el.css(e.settings.style),e.settings.border&&(t=e.borderBox,e.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=new i({root:e})),e},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;return n&&n.w==t.w&&n.h==t.h?void 0:(e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0)},reflow:function(){var t;if(l.remove(this),this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r(Ce,[g],function(e){function t(e){var t,n,r,i,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,r=c(t.scrollWidth,n.scrollWidth),i=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:o>r?i:r,height:l>a?s:a}}function n(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n").css({position:"absolute",top:0,left:0,width:c.width,height:c.height,zIndex:2147483647,opacity:1e-4,cursor:m}).appendTo(s.body),e(s).on("mousemove touchmove",d).on("mouseup touchend",u),i.start(r)},d=function(e){return n(e),e.button!==l?u(e):(e.deltaX=e.screenX-f,e.deltaY=e.screenY-h,e.preventDefault(),void i.drag(e))},u=function(t){n(t),e(s).off("mousemove touchmove",d).off("mouseup touchend",u),a.remove(),i.stop&&i.stop(t)},this.destroy=function(){e(o()).off()},e(o()).on("mousedown touchstart",c)}}),r(xe,[g,Ce],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,h,p,m,g,v,y,b;if(f=i.getEl("scroll"+t)){if(y=a.toLowerCase(),b=s.toLowerCase(),e(i.getEl("absend")).css(y,i.layoutRect()[l]-1),!c)return void e(f).css("display","none");e(f).css("display","block"),d=i.getEl("body"),h=i.getEl("scroll"+t+"t"),p=d["client"+s]-2*o,p-=n&&r?f["client"+u]:0,m=d["scroll"+s],g=p/m,v={},v[y]=d["offset"+a]+o,v[b]=p,e(f).css(v),v={},v[y]=d["scroll"+a]*g,v[b]=p*g,e(h).css(v)}}var n,r,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,r=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",r,"Width")}function r(){function n(n,r,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;e(i.getEl()).append('
    '),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+r],e("#"+u).addClass(d+"active")},drag:function(e){var t,u,d,f,h=i.layoutRect();u=h.contentW>h.innerW,d=h.contentH>h.innerH,f=i.getEl("body")["client"+a]-2*o,f-=u&&d?i.getEl("scroll"+n)["client"+l]:0,t=f/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+r]=c+e["delta"+s]/t},stop:function(){e("#"+u).removeClass(d+"active")}})}i.classes.add("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}var i=this,o=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,r(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e(i.getEl("body")).on("scroll",n)),n())}}}),r(we,[be,xe],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),"undefined"==typeof n?n='
    '+t.renderHtml(e)+"
    ":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'
    '+(e._preBodyHtml||"")+n+"
    "}})}),r(Ne,[fe],function(e){function t(t,n,r){var i,o,a,s,l,c,u,d,f,h;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t.state.get("fixed")&&"static"==e.getRuntimeStyle(document.body,"position")&&(a-=f.x,s-=f.y),i=t.getEl(),h=e.getSize(i),l=h.width,c=h.height,h=e.getSize(n),u=h.width,d=h.height,r=(r||"").split(""),"b"===r[0]&&(s+=d),"r"===r[1]&&(a+=u),"c"===r[0]&&(s+=Math.round(d/2)),"c"===r[1]&&(a+=Math.round(u/2)),"b"===r[3]&&(s-=c),"r"===r[4]&&(a-=l),"c"===r[3]&&(s-=Math.round(c/2)),"c"===r[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,r){for(var i=e.getViewPort(),o=0;o0&&a.x+a.w0&&a.y+a.hi.x&&a.x+a.wi.y&&a.y+a.he?0:e+n>t?(e=t-n,0>e?0:e):e}var i=this;if(i.settings.constrainToViewport){var o=e.getViewPort(window),a=i.layoutRect();t=r(t,o.w+o.x,a.w),n=r(n,o.h+o.y,a.h)}return i.state.get("rendered")?i.layoutRect({x:t,y:n}).repaint():(i.settings.x=t,i.settings.y=n),i.fire("move",{x:t,y:n}),i}}}),r(Ee,[fe],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(1>=t||1>=n){var r=e.getWindowSize();t=1>=t?t*r.w:t,n=1>=n?n*r.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r(_e,[we,Ne,Ee,fe,g,u],function(e,t,n,r,i,o){function a(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}function s(e){for(var t=v.length;t--;){var n=v[t],r=n.getParentCtrl(e.target);if(n.settings.autohide){if(r&&(a(r,n)||n.parent()===r))continue;e=n.fire("autohide",{target:e.target}),e.isDefaultPrevented()||n.hide()}}}function l(){p||(p=function(e){2!=e.button&&s(e)},i(document).on("click touchstart",p))}function c(){m||(m=function(){var e;for(e=v.length;e--;)d(v[e])},i(window).on("scroll",m))}function u(){if(!g){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;g=function(){document.all&&t==e.clientWidth&&n==e.clientHeight||(t=e.clientWidth,n=e.clientHeight,C.hideAll())},i(window).on("resize",g)}}function d(e){function t(t,n){for(var r,i=0;in&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY
    ').appendTo(t.getContainerElm())),o.setTimeout(function(){n.addClass(r+"in"),i(t.getEl()).addClass(r+"in")}),b=!0),f(!0,t)}}),t.on("show",function(){t.parents().each(function(e){return e.state.get("fixed")?(t.fixed(!0),!1):void 0})}),e.popover&&(t._preBodyHtml='
    ',t.classes.add("popover").add("bottom").add(t.isRtl()?"end":"start")),t.aria("label",e.ariaLabel),t.aria("labelledby",t._id),t.aria("describedby",t.describedBy||t._id+"-none")},fixed:function(e){var t=this;if(t.state.get("fixed")!=e){if(t.state.get("rendered")){var n=r.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e=this,t,n=e._super();for(t=v.length;t--&&v[t]!==e;);return-1===t&&v.push(e),n},hide:function(){return h(this),f(!1,this),this._super()},hideAll:function(){C.hideAll()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||(e.remove(),f(!1,e)),e},remove:function(){h(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return C.hideAll=function(){for(var e=v.length;e--;){var t=v[e];t&&t.settings.autohide&&(t.hide(),v.splice(e,1))}},C}),r(Se,[_e,we,fe,g,Ce,he,h,u],function(e,t,n,r,i,o,a,s){function l(e){var t="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0",n=r("meta[name=viewport]")[0],i;a.overrideViewPort!==!1&&(n||(n=document.createElement("meta"),n.setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),i=n.getAttribute("content"),i&&"undefined"!=typeof f&&(f=i),n.setAttribute("content",e?t:f))}function c(e){for(var t=0;tr.w&&(o=r.x-Math.max(0,i/2),e.layoutRect({w:i,x:o}),a=!0)),t&&(t.layoutRect({w:e.layoutRect().innerW}).recalc(),i=t.layoutRect().minW+r.deltaW,i>r.w&&(o=r.x-Math.max(0,i-r.w),e.layoutRect({w:i,x:o}),a=!0)),a&&e.recalc()},initLayoutRect:function(){var e=this,t=e._super(),r=0,i;if(e.settings.title&&!e._fullscreen){i=e.getEl("head");var o=n.getSize(i);t.headerW=o.width,t.headerH=o.height,r+=t.headerH}e.statusbar&&(r+=e.statusbar.layoutRect().h),t.deltaH+=r,t.minH+=r,t.h+=r;var a=n.getWindowSize();return t.x=e.settings.x||Math.max(0,a.w/2-t.w/2),t.y=e.settings.y||Math.max(0,a.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o='
    '+e.encode(i.title)+'
    '),i.url&&(s=''),"undefined"==typeof s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'
    '+o+'
    '+s+"
    "+a+"
    "},fullscreen:function(e){var t=this,i=document.documentElement,a,l=t.classPrefix,c;if(e!=t._fullscreen)if(r(window).on("resize",function(){var e;if(t._fullscreen)if(a)t._timer||(t._timer=s.setTimeout(function(){var e=n.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h),t._timer=0},50));else{e=(new Date).getTime();var r=n.getWindowSize();t.moveTo(0,0).resizeTo(r.w,r.h),(new Date).getTime()-e>50&&(a=!0)}}),c=t.layoutRect(),t._fullscreen=e,e){t._initial={x:c.x,y:c.y,w:c.w,h:c.h},t.borderBox=o.parseBox("0"),t.getEl("head").style.display="none",c.deltaH-=c.headerH+2,r([i,document.body]).addClass(l+"fullscreen"),t.classes.add("fullscreen");var u=n.getWindowSize();t.moveTo(0,0).resizeTo(u.w,u.h)}else t.borderBox=o.parseBox(t.settings.border),t.getEl("head").style.display="",c.deltaH+=c.headerH,r([i,document.body]).removeClass(l+"fullscreen"),t.classes.remove("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h);return t.reflow()},postRender:function(){var e=this,t;setTimeout(function(){e.classes.add("in"),e.fire("open")},0),e._super(),e.statusbar&&e.statusbar.postRender(),e.focus(),this.dragHelper=new i(e._id+"-dragh",{start:function(){t={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(n){e.moveTo(t.x+n.deltaX,t.y+n.deltaY)}}),e.on("submit",function(t){t.isDefaultPrevented()||e.close()}),d.push(e),l(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this,t;for(e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),t=d.length;t--;)d[t]===e&&d.splice(t,1);l(d.length>0),c(e.classPrefix)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return u(),h}),r(ke,[Se],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){function r(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),o(t)}}}var i,o=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:i=[r("Ok",!0,!0),r("Cancel",!1)];break;case t.YES_NO:case t.YES_NO_CANCEL:i=[r("Yes",1,!0),r("No",0)],n.buttons==t.YES_NO_CANCEL&&i.push(r("Cancel",-1));break;default:i=[r("Ok",!0,!0)]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:i,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){o(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r(Te,[Se,ke],function(e,t){return function(n){function r(){return s.length?s[s.length-1]:void 0}function i(e){n.fire("OpenWindow",{win:e})}function o(e){n.fire("CloseWindow",{win:e})}var a=this,s=[];a.windows=s,n.on("remove",function(){for(var e=s.length;e--;)s[e].close()}),a.open=function(t,r){var a;return n.editorManager.setActive(n),t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body,data:t.data,callbacks:t.commands}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){a.find("form")[0].submit()}},{text:"Cancel",onclick:function(){a.close()}}]),a=new e(t),s.push(a),a.on("close",function(){for(var e=s.length;e--;)s[e]===a&&s.splice(e,1);s.length||n.focus(),o(a)}),t.data&&a.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),a.features=t||{},a.params=r||{},1===s.length&&n.nodeChanged(),a=a.renderTo().reflow(),i(a),a},a.alert=function(e,r,a){var s;s=t.alert(e,function(){r?r.call(a||this):n.focus()}),s.on("close",function(){o(s)}),i(s)},a.confirm=function(e,n,r){var a;a=t.confirm(e,function(e){n.call(r||this,e)}),a.on("close",function(){o(a)}),i(a)},a.close=function(){r()&&r().close()},a.getParams=function(){return r()?r().params:null},a.setParams=function(e){r()&&(r().params=e)},a.getWindows=function(){return s}}}),r(Re,[ge,Ne],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this,t=e.classPrefix;return'"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(Ae,[ge,Re],function(e,t){var n,r=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&r.tooltips!==!1&&(t.on("mouseenter",function(n){var r=t.tooltip().moveTo(-65535);if(n.control==t){var i=r.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);r.classes.toggle("tooltip-n","bc-tc"==i),r.classes.toggle("tooltip-nw","bc-tl"==i),r.classes.toggle("tooltip-ne","bc-tr"==i),r.moveRel(t.getEl(),i)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"}),n.renderTo()),n},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){function e(e){n.aria("disabled",e),n.classes.toggle("disabled",e)}function t(e){n.aria("pressed",e),n.classes.toggle("active",e)}var n=this;return n.state.on("change:disabled",function(t){e(t.value)}),n.state.on("change:active",function(e){t(e.value)}),n.state.get("disabled")&&e(!0),n.state.get("active")&&t(!0),n._super()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return r}),r(Be,[Ae],function(e){return e.extend({Defaults:{value:0},init:function(e){var t=this;t._super(e),t.classes.add("progress"),t.settings.filter||(t.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this,t=e._id,n=this.classPrefix;return'
    0%
    '},postRender:function(){var e=this;return e._super(),e.value(e.settings.value),e},bindStates:function(){function e(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}var t=this;return t.state.on("change:value",function(t){e(t.value)}),e(t.state.get("value")),t._super()}})}),r(De,[ge,Ne,Be,u],function(e,t,n,r){return e.extend({Mixins:[t],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||e.timeout>0)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new n),t.on("click",function(e){-1!=e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e=this,t=e.classPrefix,n="",r="",i="",o="";return e.icon&&(n=''),e.color&&(o=' style="background-color: '+e.color+'"'),e.closeButton&&(r=''),e.progressBar&&(i=e.progressBar.renderHtml()),'"},postRender:function(){var e=this;return r.setTimeout(function(){e.$el.addClass(e.classPrefix+"in")}),e._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().childNodes[1].innerHTML=t.value}),e.progressBar&&e.progressBar.bindStates(),e._super()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||e.remove(),e},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(Me,[De,u],function(e,t){return function(n){function r(){return l.length?l[l.length-1]:void 0}function i(){t.requestAnimationFrame(function(){o(),a()})}function o(){for(var e=0;e0){var e=l.slice(0,1)[0],t=n.inline?n.getElement():n.getContentAreaContainer();if(e.moveRel(t,"tc-tc"),l.length>1)for(var r=1;r0&&(r.timer=setTimeout(function(){r.close()},t.timeout)),r.on("close",function(){var e=l.length;for(r.timer&&n.getWin().clearTimeout(r.timer);e--;)l[e]===r&&l.splice(e,1);a()}),r.renderTo(),a(),r},s.close=function(){r()&&r().close()},s.getNotifications=function(){return l},n.on("SkinLoaded",function(){var e=n.settings.service_message;e&&n.notificationManager.open({text:e,type:"warning",timeout:0,icon:""})})}}),r(Le,[w],function(e){function t(t,n,r){for(var i=[];n&&n!=t;n=n.parentNode)i.push(e.nodeIndex(n,r));return i}function n(e,t){var n,r,i;for(r=e,n=t.length-1;n>=0;n--){if(i=r.childNodes,t[n]>i.length-1)return null;r=i[t[n]]}return r}return{create:t,resolve:n}}),r(Pe,[I,T,y,Le,A,C,h,m,u,k],function(e,t,n,r,i,o,a,s,l,c){return function(u){function d(e,t){try{u.getDoc().execCommand(e,!1,t)}catch(n){}}function f(){var e=u.getDoc().documentMode;return e?e:6}function h(e){return e.isDefaultPrevented()}function p(e){var t,n;e.dataTransfer&&(u.selection.isCollapsed()&&"IMG"==e.target.tagName&&ee.select(e.target),t=u.selection.getContent(),t.length>0&&(n=se+escape(u.id)+","+escape(t),e.dataTransfer.setData(le,n)))}function m(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(le),t&&t.indexOf(se)>=0)?(t=t.substr(se.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}function g(e){u.queryCommandSupported("mceInsertClipboardContent")?u.execCommand("mceInsertClipboardContent",!1,{content:e}):u.execCommand("mceInsertContent",!1,e)}function v(){function i(e){var t=C.schema.getBlockElements(),n=u.getBody();if("BR"!=e.nodeName)return!1;for(;e!=n&&!t[e.nodeName];e=e.parentNode)if(e.nextSibling)return!1;return!0}function o(e,t){var n;for(n=e.nextSibling;n&&n!=t;n=n.nextSibling)if((3!=n.nodeType||0!==G.trim(n.data).length)&&n!==t)return!1;return n===t}function a(e,t,r){var o,a,s;for(s=C.schema.getNonEmptyElements(),o=new n(r||e,e);a=o[t?"next":"prev"]();){if(s[a.nodeName]&&!i(a))return a;if(3==a.nodeType&&a.data.length>0)return a}}function c(e){var n,r,i,o,s;if(!e.collapsed&&(n=C.getParent(t.getNode(e.startContainer,e.startOffset),C.isBlock),r=C.getParent(t.getNode(e.endContainer,e.endOffset),C.isBlock),s=u.schema.getTextBlockElements(),n!=r&&s[n.nodeName]&&s[r.nodeName]&&"false"!==C.getContentEditable(n)&&"false"!==C.getContentEditable(r)))return e.deleteContents(),i=a(n,!1),o=a(r,!0),C.isEmpty(r)||G(n).append(r.childNodes),G(r).remove(),i?1==i.nodeType?"BR"==i.nodeName?(e.setStartBefore(i),e.setEndBefore(i)):(e.setStartAfter(i),e.setEndAfter(i)):(e.setStart(i,i.data.length),e.setEnd(i,i.data.length)):o&&(1==o.nodeType?(e.setStartBefore(o),e.setEndBefore(o)):(e.setStart(o,0),e.setEnd(o,0))),x.setRng(e),!0}function d(e,n){var r,i,s,l,c,d;if(!e.collapsed)return e;if(c=e.startContainer,d=e.startOffset,3==c.nodeType)if(n){if(d0)return e;if(r=t.getNode(e.startContainer,e.startOffset),s=C.getParent(r,C.isBlock),i=a(u.getBody(),n,r),l=C.getParent(i,C.isBlock),!r||!i)return e;if(l&&s!=l)if(n){if(!o(s,l))return e;1==r.nodeType?"BR"==r.nodeName?e.setStartBefore(r):e.setStartAfter(r):e.setStart(r,r.data.length),1==i.nodeType?e.setEnd(i,0):e.setEndBefore(i)}else{if(!o(l,s))return e;1==i.nodeType?"BR"==i.nodeName?e.setStartBefore(i):e.setStartAfter(i):e.setStart(i,i.data.length),1==r.nodeType?e.setEnd(r,0):e.setEndBefore(r)}return e}function f(e){var t=x.getRng();return t=d(t,e),c(t)?!0:void 0}function v(e,t){function n(e,n){return m=G(n).parents().filter(function(e,t){return!!u.schema.getTextInlineElements()[t.nodeName]}),l=e.cloneNode(!1),m=s.map(m,function(e){return e=e.cloneNode(!1),l.hasChildNodes()?(e.appendChild(l.firstChild),l.appendChild(e)):l.appendChild(e),l.appendChild(e),e}),m.length?(p=C.create("br"),m[0].appendChild(p),C.replace(l,e),t.setStartBefore(p),t.setEndBefore(p),u.selection.setRng(t),p):null}function i(e){return e&&u.schema.getTextBlockElements()[e.tagName]}var o,a,l,c,d,f,h,p,m;if(t.collapsed&&(f=t.startContainer,h=t.startOffset,a=C.getParent(f,C.isBlock),i(a)))if(1==f.nodeType){if(f=f.childNodes[h],f&&"BR"!=f.tagName)return;if(d=e?a.nextSibling:a.previousSibling,C.isEmpty(a)&&i(d)&&C.isEmpty(d)&&n(a,f))return C.remove(d),!0}else if(3==f.nodeType){if(o=r.create(a,f),c=a.cloneNode(!0),f=r.resolve(c,o),e){if(h>=f.data.length)return;f.deleteData(h,1)}else{if(0>=h)return;f.deleteData(h-1,1)}if(C.isEmpty(c))return n(a,f)}}function y(e){var t,n,r;f(e)||(s.each(u.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&u.dom.setAttrib(e,"style",u.dom.getAttrib(e,"style"))}),t=new w(function(){}),t.observe(u.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),u.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),n=u.selection.getRng(),r=n.startContainer.parentNode,s.each(t.takeRecords(),function(e){if(C.isChildOf(e.target,u.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}s.each(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,i;e==r&&(t=n.startOffset,i=e.firstChild),C.remove(e,!0),i&&(n.setStart(i,t),n.setEnd(i,t),u.selection.setRng(n))}})}}),t.disconnect(),s.each(u.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")}))}var b=u.getDoc(),C=u.dom,x=u.selection,w=window.MutationObserver,N,E; +w||(N=!0,w=function(){function e(e){var t=e.relatedNode||e.target;n.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;n.push({target:t,attributeName:e.attrName})}var n=[],r;this.observe=function(n){r=n,r.addEventListener("DOMSubtreeModified",e,!1),r.addEventListener("DOMNodeInsertedIntoDocument",e,!1),r.addEventListener("DOMNodeInserted",e,!1),r.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){r.removeEventListener("DOMSubtreeModified",e,!1),r.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),r.removeEventListener("DOMNodeInserted",e,!1),r.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return n}}),u.on("keydown",function(e){var t=e.keyCode==Q,n=e.ctrlKey||e.metaKey;if(!h(e)&&(t||e.keyCode==J)){var r=u.selection.getRng(),i=r.startContainer,o=r.startOffset;if(t&&e.shiftKey)return;if(v(t,r))return void e.preventDefault();if(!n&&r.collapsed&&3==i.nodeType&&(t?o0))return;e.preventDefault(),n&&u.selection.getSel().modify("extend",t?"forward":"backward",e.metaKey?"lineboundary":"word"),y(t)}}),u.on("keypress",function(t){if(!h(t)&&!x.isCollapsed()&&t.charCode>31&&!e.metaKeyPressed(t)){var n,r,i,o,a,s;n=u.selection.getRng(),s=String.fromCharCode(t.charCode),t.preventDefault(),r=G(n.startContainer).parents().filter(function(e,t){return!!u.schema.getTextInlineElements()[t.nodeName]}),y(!0),r=r.filter(function(e,t){return!G.contains(u.getBody(),t)}),r.length?(i=C.createFragment(),r.each(function(e,t){t=t.cloneNode(!1),i.hasChildNodes()?(t.appendChild(i.firstChild),i.appendChild(t)):(a=t,i.appendChild(t)),i.appendChild(t)}),a.appendChild(u.getDoc().createTextNode(s)),o=C.getParent(n.startContainer,C.isBlock),C.isEmpty(o)?G(o).empty().append(i):n.insertNode(i),n.setStart(a.firstChild,1),n.setEnd(a.firstChild,1),u.selection.setRng(n)):u.selection.setContent(s)}}),u.addCommand("Delete",function(){y()}),u.addCommand("ForwardDelete",function(){y(!0)}),N||(u.on("dragstart",function(e){E=x.getRng(),p(e)}),u.on("drop",function(e){if(!h(e)){var n=m(e);n&&(e.preventDefault(),l.setEditorTimeout(u,function(){var r=t.getCaretRangeFromPoint(e.x,e.y,b);E&&(x.setRng(E),E=null),y(),x.setRng(r),g(n.html)}))}}),u.on("cut",function(e){h(e)||!e.clipboardData||u.selection.isCollapsed()||(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",u.selection.getContent()),e.clipboardData.setData("text/plain",u.selection.getContent({format:"text"})),l.setEditorTimeout(u,function(){y(!0)}))}))}function y(){function e(e){var t=Z.create("body"),n=e.cloneContents();return t.appendChild(n),ee.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var r=n.duplicate();return r.moveToElementText(u.getBody()),t.compareRanges(n,r)}var i=e(n),o=Z.createRng();o.selectNode(u.getBody());var a=e(o);return i===a}u.on("keydown",function(e){var t=e.keyCode,r,i;if(!h(e)&&(t==Q||t==J)){if(r=u.selection.isCollapsed(),i=u.getBody(),r&&!Z.isEmpty(i))return;if(!r&&!n(u.selection.getRng()))return;e.preventDefault(),u.setContent(""),i.firstChild&&Z.isBlock(i.firstChild)?u.selection.setCursorLocation(i.firstChild,0):u.selection.setCursorLocation(i,0),u.nodeChanged()}})}function b(){u.shortcuts.add("meta+a",null,"SelectAll")}function C(){u.settings.content_editable||Z.bind(u.getDoc(),"mousedown mouseup",function(e){var t;if(e.target==u.getDoc().documentElement)if(t=ee.getRng(),u.getBody().focus(),"mousedown"==e.type){if(c.isCaretContainer(t.startContainer))return;ee.placeCaretAt(e.clientX,e.clientY)}else ee.setRng(t)})}function x(){u.on("keydown",function(e){if(!h(e)&&e.keyCode===J){if(!u.getBody().getElementsByTagName("hr").length)return;if(ee.isCollapsed()&&0===ee.getRng(!0).startOffset){var t=ee.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return Z.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(Z.remove(n),e.preventDefault())}}})}function w(){window.Range.prototype.getClientRects||u.on("mousedown",function(e){if(!h(e)&&"HTML"===e.target.nodeName){var t=u.getBody();t.blur(),l.setEditorTimeout(u,function(){t.focus()})}})}function N(){u.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==Z.getContentEditableParent(t)&&(e.preventDefault(),ee.getSel().setBaseAndExtent(t,0,t,1),u.nodeChanged()),"A"==t.nodeName&&Z.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),ee.select(t))})}function E(){function e(){var e=Z.getAttribs(ee.getStart().cloneNode(!1));return function(){var t=ee.getStart();t!==u.getBody()&&(Z.setAttrib(t,"style",null),K(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!ee.isCollapsed()&&Z.getParent(ee.getStart(),Z.isBlock)!=Z.getParent(ee.getEnd(),Z.isBlock)}u.on("keypress",function(n){var r;return h(n)||8!=n.keyCode&&46!=n.keyCode||!t()?void 0:(r=e(),u.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1)}),Z.bind(u.getDoc(),"cut",function(n){var r;!h(n)&&t()&&(r=e(),l.setEditorTimeout(u,function(){r()}))})}function _(){document.body.setAttribute("role","application")}function S(){u.on("keydown",function(e){if(!h(e)&&e.keyCode===J&&ee.isCollapsed()&&0===ee.getRng(!0).startOffset){var t=ee.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function k(){f()>7||(d("RespectVisibilityInDesign",!0),u.contentStyles.push(".mceHideBrInPre pre br {display: none}"),Z.addClass(u.getBody(),"mceHideBrInPre"),ne.addNodeFilter("pre",function(e){for(var t=e.length,n,r,o,a;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)o=n[r],a=o.prev,a&&3===a.type&&"\n"!=a.value.charAt(a.value-1)?a.value+="\n":o.parent.insert(new i("#text",3),o,!0).value="\n"}),re.addNodeFilter("pre",function(e){for(var t=e.length,n,r,i,o;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)i=n[r],o=i.prev,o&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,""))}))}function T(){Z.bind(u.getBody(),"mouseup",function(){var e,t=ee.getNode();"IMG"==t.nodeName&&((e=Z.getStyle(t,"width"))&&(Z.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),Z.setStyle(t,"width","")),(e=Z.getStyle(t,"height"))&&(Z.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),Z.setStyle(t,"height","")))})}function R(){u.on("keydown",function(t){var n,r,i,o,a;if(!h(t)&&t.keyCode==e.BACKSPACE&&(n=ee.getRng(),r=n.startContainer,i=n.startOffset,o=Z.getRoot(),a=r,n.collapsed&&0===i)){for(;a&&a.parentNode&&a.parentNode.firstChild==a&&a.parentNode!=o;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(u.formatter.toggle("blockquote",null,a),n=Z.createRng(),n.setStart(r,0),n.setEnd(r,0),ee.setRng(n))}})}function A(){function e(){Y(),d("StyleWithCSS",!1),d("enableInlineTableEditing",!1),te.object_resizing||d("enableObjectResizing",!1)}te.readonly||u.on("BeforeExecCommand MouseDown",e)}function B(){function e(){K(Z.select("a"),function(e){var t=e.parentNode,n=Z.getRoot();if(t.lastChild===e){for(;t&&!Z.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}Z.add(t,"br",{"data-mce-bogus":1})}})}u.on("SetContent ExecCommand",function(t){"setcontent"!=t.type&&"mceInsertLink"!==t.command||e()})}function D(){te.forced_root_block&&u.on("init",function(){d("DefaultParagraphSeparator",te.forced_root_block)})}function M(){u.on("keydown",function(e){var t;h(e)||e.keyCode!=J||(t=u.getDoc().selection.createRange(),t&&t.item&&(e.preventDefault(),u.undoManager.beforeChange(),Z.remove(t.item(0)),u.undoManager.add()))})}function L(){var e;f()>=10&&(e="",K("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),u.contentStyles.push(e+"{padding-right: 1px !important}"))}function P(){f()<9&&(ne.addNodeFilter("noscript",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.firstChild,r&&n.attr("data-mce-innertext",r.value)}),re.addNodeFilter("noscript",function(e){for(var t=e.length,n,r,a;t--;)n=e[t],r=e[t].firstChild,r?r.value=o.decode(r.value):(a=n.attributes.map["data-mce-innertext"],a&&(n.attr("data-mce-innertext",null),r=new i("#text",3),r.value=a,r.raw=!0,n.append(r)))}))}function H(){function e(e,t){var n=i.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}return n}function t(t){var r;t.button?(r=e(t.x,t.y),r&&(r.compareEndPoints("StartToStart",a)>0?r.setEndPoint("StartToStart",a):r.setEndPoint("EndToEnd",a),r.select())):n()}function n(){var e=r.selection.createRange();a&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&a.select(),Z.unbind(r,"mouseup",n),Z.unbind(r,"mousemove",t),a=o=0}var r=Z.doc,i=r.body,o,a,s;r.documentElement.unselectable=!0,Z.bind(r,"mousedown contextmenu",function(i){if("HTML"===i.target.nodeName){if(o&&n(),s=r.documentElement,s.scrollHeight>s.clientHeight)return;o=1,a=e(i.x,i.y),a&&(Z.bind(r,"mouseup",n),Z.bind(r,"mousemove",t),Z.getRoot().focus(),a.select())}})}function O(){u.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||ee.normalize()},!0)}function I(){u.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function F(){u.inline||u.on("keydown",function(){document.activeElement==document.body&&u.getWin().focus()})}function z(){u.inline||(u.contentStyles.push("body {min-height: 150px}"),u.on("click",function(e){var t;if("HTML"==e.target.nodeName){if(a.ie>11)return void u.getBody().focus();t=u.selection.getRng(),u.getBody().focus(),u.selection.setRng(t),u.selection.normalize(),u.nodeChanged()}}))}function W(){a.mac&&u.on("keydown",function(t){!e.metaKeyPressed(t)||t.shiftKey||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),u.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","lineboundary"))})}function V(){d("AutoUrlDetect",!1)}function U(){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}")}function $(){u.on("init",function(){u.dom.bind(u.getBody(),"submit",function(e){e.preventDefault()})})}function q(){ne.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()})}function j(){u.on("dragstart",function(e){p(e)}),u.on("drop",function(e){if(!h(e)){var n=m(e);if(n&&n.id!=u.id){e.preventDefault();var r=t.getCaretRangeFromPoint(e.x,e.y,u.getDoc());ee.setRng(r),g(n.html)}}})}function Y(){var e,t;X()&&(e=u.getBody(),t=e.parentNode,t.removeChild(e),t.appendChild(e),e.focus())}function X(){var e;return ie?(e=u.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}var K=s.each,G=u.$,J=e.BACKSPACE,Q=e.DELETE,Z=u.dom,ee=u.selection,te=u.settings,ne=u.parser,re=u.serializer,ie=a.gecko,oe=a.ie,ae=a.webkit,se="data:text/mce-internal,",le=oe?"Text":"URL";return R(),y(),a.windowsPhone||O(),ae&&(v(),C(),N(),D(),$(),S(),q(),a.iOS?(F(),z(),U()):b()),oe&&a.ie<11&&(x(),_(),k(),T(),M(),L(),P(),H()),a.ie>=11&&(z(),S()),a.ie&&(b(),V(),j()),ie&&(x(),w(),E(),A(),B(),I(),W(),S()),{refreshContentEditable:Y,isHidden:X}}}),r(He,[le,w,m],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=o.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function i(e,t){function n(e){return!e.hidden&&!e.readonly}var i=r(e,t),s;if(e.delegates||(e.delegates={}),!e.delegates[t])if(e.settings.event_root){if(a||(a={},e.editorManager.on("removeEditor",function(){var t;if(!e.editorManager.activeEditor&&a){for(t in a)e.dom.unbind(r(e,t));a=null}})),a[t])return;s=function(r){for(var i=r.target,a=e.editorManager.editors,s=a.length;s--;){var l=a[s].getBody();(l===i||o.isChildOf(i,l))&&n(a[s])&&a[s].fire(t,r)}},a[t]=s,o.bind(i,t,s)}else s=function(r){n(e)&&e.fire(t,r)},o.bind(i,t,s),e.delegates[t]=s}var o=t.DOM,a,s={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){i(e,t)})},toggleNativeEvent:function(e,t){var n=this;"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(r(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e=this,t;if(e.delegates){for(t in e.delegates)e.dom.unbind(r(e,t),t,e.delegates[t]);delete e.delegates}e.inline||(e.getBody().onload=null,e.dom.unbind(e.getWin()),e.dom.unbind(e.getDoc())),e.dom.unbind(e.getBody()),e.dom.unbind(e.getContainer())}};return s=n.extend({},e,s)}),r(Oe,[],function(){function e(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}}function t(e){var t,n;return t=e.getBody(),n=function(t){e.dom.getParents(t.target,"a").length>0&&t.preventDefault()},e.dom.bind(t,"click",n),{unbind:function(){e.dom.unbind(t,"click",n)}}}function n(n,r){n._clickBlocker&&(n._clickBlocker.unbind(),n._clickBlocker=null),r?(n._clickBlocker=t(n),n.selection.controlSelection.hideResizeRect(),n.readonly=!0,n.getBody().contentEditable=!1):(n.readonly=!1,n.getBody().contentEditable=!0,e(n,"StyleWithCSS",!1),e(n,"enableInlineTableEditing",!1),e(n,"enableObjectResizing",!1),n.focus(),n.nodeChanged())}function r(e,t){var r=e.readonly?"readonly":"design";t!=r&&(e.initialized?n(e,"readonly"==t):e.on("init",function(){n(e,"readonly"==t)}),e.fire("SwitchMode",{mode:t}))}return{setMode:r}}),r(Ie,[m,h],function(e,t){var n=e.each,r=e.explode,i={f9:120,f10:121,f11:122},o=e.makeMap("alt,ctrl,shift,meta,access");return function(a){function s(e){var a,s,l={};n(r(e,"+"),function(e){e in o?l[e]=!0:/^[0-9]{2,}$/.test(e)?l.keyCode=parseInt(e,10):(l.charCode=e.charCodeAt(0),l.keyCode=i[e]||e.toUpperCase().charCodeAt(0))}),a=[l.keyCode];for(s in o)l[s]?a.push(s):l[s]=!1;return l.id=a.join(","),l.access&&(l.alt=!0,t.mac?l.ctrl=!0:l.shift=!0),l.meta&&(t.mac?l.meta=!0:(l.ctrl=!0,l.meta=!1)),l}function l(t,n,i,o){var l;return l=e.map(r(t,">"),s),l[l.length-1]=e.extend(l[l.length-1],{func:i,scope:o||a}),e.extend(l[0],{desc:a.translate(n),subpatterns:l.slice(1)})}function c(e){return e.altKey||e.ctrlKey||e.metaKey}function u(e){return e.keyCode>=112&&e.keyCode<=123}function d(e,t){return t?t.ctrl!=e.ctrlKey||t.meta!=e.metaKey?!1:t.alt!=e.altKey||t.shift!=e.shiftKey?!1:e.keyCode==t.keyCode||e.charCode&&e.charCode==t.charCode?(e.preventDefault(),!0):!1:!1}function f(e){return e.func?e.func.call(e.scope):null}var h=this,p={},m=[];a.on("keyup keypress keydown",function(e){!c(e)&&!u(e)||e.isDefaultPrevented()||(n(p,function(t){return d(e,t)?(m=t.subpatterns.slice(0),"keydown"==e.type&&f(t),!0):void 0}),d(e,m[0])&&(1===m.length&&"keydown"==e.type&&f(m[0]),m.shift()))}),h.add=function(t,i,o,s){var c;return c=o,"string"==typeof o?o=function(){a.execCommand(c,!1,null)}:e.isArray(c)&&(o=function(){a.execCommand(c[0],c[1],c[2])}),n(r(e.trim(t.toLowerCase())),function(e){var t=l(e,i,o,s);p[t.id]=t}),!0},h.remove=function(e){var t=l(e);return p[t.id]?(delete p[t.id],!0):!1}}}),r(Fe,[c,m,z],function(e,t,n){return function(r){function i(e){var t,n;return n={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"},t=n[e.blob().type.toLowerCase()]||"dat",e.id()+"."+t}function o(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t}function a(e){return{id:e.id,blob:e.blob,base64:e.base64,filename:n.constant(i(e))}}function s(e,t,n,a){var s,l,c;s=new XMLHttpRequest,s.open("POST",r.url),s.withCredentials=r.credentials,c=a(),s.upload.onprogress=function(e){var t=Math.round(e.loaded/e.total*100);c.progressBar.value(t)},s.onerror=function(){c.close(),n("Image upload failed due to a XHR Transport error. Code: "+s.status)},s.onload=function(){var e;return c.close(),200!=s.status?void n("HTTP Error: "+s.status):(e=JSON.parse(s.responseText),e&&"string"==typeof e.location?void t(o(r.basePath,e.location)):void n("Invalid JSON: "+s.responseText))},l=new FormData,l.append("file",e.blob(),i(e)),s.send(l)}function l(){return new e(function(e){e([])})}function c(e){return e.then(function(e){return e})["catch"](function(e){return e})}function u(e,t,n){var r=e(n),i=c(r);return delete p[t],p[t]=i,i}function d(e,n){return t.map(e,function(e){var t=e.id();return p[t]?p[t]:u(n,t,e)})}function f(t,n){function i(t){return new e(function(e){var i=r.handler;try{i(a(t),function(n){e({url:n,blobInfo:t,status:!0})},function(n){e({url:"",blobInfo:t,status:!1,error:n})},n)}catch(o){e({url:"",blobInfo:t,status:!1,error:o.message})}})}var o=d(t,i);return e.all(o)}function h(e,t){return r.url||r.handler!==s?f(e,t):l()}var p={};return r=t.extend({credentials:!1,handler:s},r),{upload:h}}}),r(ze,[c],function(e){function t(t){return new e(function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200==this.status&&e(this.response)},n.send()})}function n(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}}function r(t){return new e(function(e){var r,i,o;t=n(t);try{r=atob(t.data)}catch(a){return void e(new Blob([]))}for(i=new Uint8Array(r.length),o=0;o0&&(n&&(l*=-1),r.left+=l,r.right+=l),r}function l(){var n,r,o,a,s;for(n=i("*[contentEditable=false]",t),a=0;a').css(l).appendTo(t),o&&m.addClass("mce-visual-caret-before"),d(),c=a.ownerDocument.createRange(),f=g.firstChild,c.setStart(f,0),c.setEnd(f,1),c):(g=e.insertInline(a,o),c=a.ownerDocument.createRange(),s(g.nextSibling)?(c.setStart(g,0),c.setEnd(g,0)):(c.setStart(g,1),c.setEnd(g,1)),c)}function u(){l(),g&&(e.remove(g),g=null),m&&(m.remove(),m=null),clearInterval(p)}function d(){p=a.setInterval(function(){i("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden")},500)}function f(){a.clearInterval(p)}function h(){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;}"}var p,m,g;return{show:c,hide:u,getCss:h,destroy:f}}}),r(qe,[p,_,V],function(e,t,n){function r(i){function o(t){return e.map(t,function(e){return e=n.clone(e),e.node=i,e})}if(e.isArray(i))return e.reduce(i,function(e,t){return e.concat(r(t))},[]);if(t.isElement(i))return o(i.getClientRects());if(t.isText(i)){var a=i.ownerDocument.createRange();return a.setStart(i,0),a.setEnd(i,i.data.length),o(a.getClientRects())}}return{getClientRects:r}}),r(je,[z,p,qe,W,te,ne,$,V],function(e,t,n,r,i,o,a,s){function l(e,t,n,o){for(;o=i.findNode(o,e,r.isEditableCaretCandidate,t);)if(n(o))return}function c(e,r,i,o,a,s){function c(o){var s,l,c;for(c=n.getClientRects(o),-1==e&&(c=c.reverse()),s=0;s0&&r(l,t.last(f))&&u++,l.line=u,a(l))return!0;f.push(l)}}var u=0,d,f=[],h;return(h=t.last(s.getClientRects()))?(d=s.getNode(),c(d),l(e,o,c,d),f):f}function u(e,t){return t.line>e}function d(e,t){return t.line===e}function f(e,n,r,i){function l(n){return 1==e?t.last(n.getClientRects()):t.last(n.getClientRects())}var c=new o(n),u,d,f,h,p=[],m=0,g,v;1==e?(u=c.next,d=s.isBelow,f=s.isAbove,h=a.after(i)):(u=c.prev,d=s.isAbove,f=s.isBelow,h=a.before(i)),v=l(h);do if(h.isVisible()&&(g=l(h),!f(g,v))){if(p.length>0&&d(g,t.last(p))&&m++,g=s.clone(g),g.position=h,g.line=m,r(g))return p;p.push(g)}while(h=u(h));return p}var h=e.curry,p=h(c,-1,s.isAbove,s.isBelow),m=h(c,1,s.isBelow,s.isAbove);return{upUntil:p,downUntil:m,positionsUntil:f,isAboveLine:h(u),isLine:h(d)}}),r(Ye,[z,p,_,qe,V,te,W],function(e,t,n,r,i,o,a){function s(e,t){return Math.abs(e.left-t)}function l(e,t){return Math.abs(e.right-t)}function c(e,n){function r(e,t){return e>=t.left&&e<=t.right}return t.reduce(e,function(e,t){var i,o;return i=Math.min(s(e,n),l(e,n)),o=Math.min(s(t,n),l(t,n)),r(n,t)?t:r(n,e)?e:o==i&&m(t.node)?t:i>o?t:e})}function u(e,t,n,r){for(;r=g(r,e,a.isEditableCaretCandidate,t);)if(n(r))return}function d(e,n){function o(e,i){var o;return o=t.filter(r.getClientRects(i),function(t){return!e(t,n)}),a=a.concat(o),0===o.length}var a=[];return a.push(n),u(-1,e,v(o,i.isAbove),n.node),u(1,e,v(o,i.isBelow),n.node),a}function f(e){return t.filter(t.toArray(e.getElementsByTagName("*")),m)}function h(e,t){return{node:e.node,before:s(e,t)=e.top&&i<=e.bottom}),a=c(o,n),a&&(a=c(d(e,a),n),a&&m(a.node))?h(a,n):null}var m=n.isContentEditableFalse,g=o.findNode,v=e.curry;return{findClosestClientRect:c,findLineNodeRects:d,closestCaret:p}}),r(Xe,[_,p,z],function(e,t,n){function r(e){function r(e){return i(e)}function a(t){f(e.getBody()).css("cursor",t)}function s(t){return t==g.element||e.dom.isChildOf(t,g.element)?!1:!i(t)}function l(t){var n,r,i,o,s=0,l=0,c,u,d,h;0===t.button&&(n=t.screenX-g.screenX,r=t.screenY-g.screenY,c=Math.max(Math.abs(n),Math.abs(r)),!g.dragging&&c>10&&(g.dragging=!0,a("default"),g.clone=g.element.cloneNode(!0),i=m.getPos(g.element),g.relX=g.clientX-i.x,g.relY=g.clientY-i.y,g.width=g.element.offsetWidth,g.height=g.element.offsetHeight,f(g.clone).css({width:g.width,height:g.height}).removeAttr("data-mce-selected"),g.ghost=f("
    ").css({position:"absolute",opacity:.5,overflow:"hidden",width:g.width,height:g.height}).attr({"data-mce-bogus":"all",unselectable:"on",contenteditable:"false"}).addClass("mce-drag-container mce-reset").append(g.clone).appendTo(e.getBody())[0],o=e.dom.getViewPort(e.getWin()),g.maxX=o.w,g.maxY=o.h),g.dragging&&(e.selection.placeCaretAt(t.clientX,t.clientY),u=g.clientX+n-g.relX,d=g.clientY+r+5,u+g.width>g.maxX&&(s=u+g.width-g.maxX),d+g.height>g.maxY&&(l=d+g.height-g.maxY),h="BODY"!=e.getBody().nodeName?e.getBody().getBoundingClientRect():{left:0,top:0},f(g.ghost).css({left:u-h.left,top:d-h.top,width:g.width-s,height:g.height-l})))}function c(){var t;if(g.dragging&&(e.selection.setRng(e.selection.getSel().getRangeAt(0)),s(e.selection.getNode()))){var n=g.element;if(t=e.fire("drop",{targetClone:n}),t.isDefaultPrevented())return;n=t.targetClone,e.undoManager.transact(function(){e.insertContent(m.getOuterHTML(n)),f(g.element).remove()})}d()}function u(a){var s,u;if(d(),0===a.button&&(s=t.find(e.dom.getParents(a.target),n.or(i,o)),r(s))){if(u=e.fire("dragstart",{target:s}),u.isDefaultPrevented())return;e.on("mousemove",l),e.on("mouseup",c),h!=p&&(m.bind(h,"mousemove",l),m.bind(h,"mouseup",c)),g={screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY,element:s}}}function d(){f(g.ghost).remove(),a(null),e.off("mousemove",l),e.off("mouseup",d),h!=p&&(m.unbind(h,"mousemove",l),m.unbind(h,"mouseup",d)),g={}}var f=e.$,h=document,p=e.getDoc(),m=e.dom,g={};e.on("mousedown",u),e.on("drop",function(t){var n=e.getDoc().elementFromPoint(t.clientX,t.clientY);(i(n)||i(e.dom.getContentEditableParent(n)))&&t.preventDefault()})}var i=e.isContentEditableFalse,o=e.isContentEditableTrue;return{init:r}}),r(Ke,[h,ne,$,k,te,$e,je,Ye,_,T,V,I,z,p,u,Xe,S],function(e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g){function v(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}function y(c){function y(e){return c.dom.isBlock(e)}function S(e){e&&c.selection.setRng(e)}function k(){return c.selection.getRng()}function T(e,t){c.selection.scrollIntoView(e,t)}function R(e,t,n){var r;return r=c.fire("ShowCaret",{target:t,direction:e,before:n}),r.isDefaultPrevented()?null:(T(t,-1===e),re.show(n,t))}function A(e){var t;return re.hide(),t=c.fire("BeforeObjectSelected",{target:e}),t.isDefaultPrevented()?null:B(e)}function B(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}function D(e,t){var n=i.isInSameBlock(e,t);return!n&&l.isBr(e.getNode())?!0:n}function M(e,t){return t=i.normalizeRange(e,Z,t),-1==e?n.fromRangeStart(t):n.fromRangeEnd(t)}function L(e){return r.isCaretContainerBlock(e.startContainer)}function P(e,t,n,r){var i,o,a,s;return!r.collapsed&&(i=_(r),x(i))?R(e,i,-1==e):(s=L(r),o=M(e,r),n(o)?A(o.getNode(-1==e)):(o=t(o))?n(o)?R(e,o.getNode(-1==e),1==e):(a=t(o),n(a)&&D(o,a)?R(e,a.getNode(-1==e),1==e):s?U(o.toRange()):null):s?r:null)}function H(e,t,n){var r,i,o,l,c,u,d,f,p;if(p=_(n),r=M(e,n),i=t(Z,a.isAboveLine(1),r),o=h.filter(i,a.isLine(1)),c=h.last(r.getClientRects()),E(r)&&(p=r.getNode()),N(r)&&(p=r.getNode(!0)),!c)return null;if(u=c.left,l=s.findClosestClientRect(o,u),l&&x(l.node))return d=Math.abs(u-l.left),f=Math.abs(u-l.right),R(e,l.node,f>d);if(p){var m=a.positionsUntil(e,Z,a.isAboveLine(1),p);if(l=s.findClosestClientRect(h.filter(m,a.isLine(1)),u))return U(l.position.toRange());if(l=h.last(h.filter(m,a.isLine(0))))return U(l.position.toRange())}}function O(t,r){function i(){var t=c.dom.create(c.settings.forced_root_block);return(!e.ie||e.ie>=11)&&(t.innerHTML='
    '),t}var o,a,s;if(r.collapsed&&c.settings.forced_root_block){if(o=c.dom.getParent(r.startContainer,"PRE"),!o)return;a=1==t?te(n.fromRangeStart(r)):ne(n.fromRangeStart(r)),a||(s=i(),1==t?c.$(o).after(s):c.$(o).before(s),c.selection.select(s,!0),c.selection.collapse())}}function I(e,t,n,r){var i;return(i=P(e,t,n,r))?i:(i=O(e,r),i?i:null)}function F(e,t,n){var r;return(r=H(e,t,n))?r:(r=O(e,n),r?r:null)}function z(){return ae("*[data-mce-caret]")[0]}function W(e){e=ae(e),e.attr("data-mce-caret")&&(re.hide(),e.removeAttr("data-mce-caret"),e.removeAttr("data-mce-bogus"),e.removeAttr("style"),S(k()),T(e[0]))}function V(e){var t,r;return e=i.normalizeRange(1,Z,e),t=n.fromRangeStart(e),x(t.getNode())?R(1,t.getNode(),!t.isAtEnd()):x(t.getNode(!0))?R(1,t.getNode(!0),!1):(r=c.dom.getParent(t.getNode(),f.or(x,C)),x(r)?R(1,r,!1):(re.hide(),null))}function U(e){var t;return e&&e.collapsed?(t=V(e),t?t:e):e}function $(e){var t,i,o,a;return x(e)?(x(e.previousSibling)&&(o=e.previousSibling),i=ne(n.before(e)),i||(t=te(n.after(e))),t&&w(t.getNode())&&(a=t.getNode()),r.remove(e.previousSibling),r.remove(e.nextSibling),c.dom.remove(e),J(),c.dom.isEmpty(c.getBody())?(c.setContent(""),void c.focus()):o?n.after(o).toRange():a?n.before(a).toRange():i?i.toRange():t?t.toRange():null):null}function q(e,t,n){var r=c.dom,i,o,a,s;if(-1===e){if(N(n)&&y(n.getNode(!0)))return $(n.getNode(!0))}else if(E(t)&&y(t.getNode()))return $(t.getNode());if(s=c.schema.getTextBlockElements(),i=r.getParent(t.getNode(),r.isBlock),o=r.getParent(n.getNode(),r.isBlock),i===o||!s[i.nodeName]||!s[o.nodeName])return null;for(;a=i.firstChild;)o.appendChild(a);return c.dom.remove(i),n.toRange()}function j(e,t,n){var r,i,o;return!n.collapsed&&(r=_(n),x(r))?U($(r)):(i=M(e,n),t(i)?U($(i.getNode(-1==e))):(o=-1==e?ee.prev(i):ee.next(i),t(o)?-1===e?q(e,i,o):q(e,o,i):void 0))}function Y(){function e(e,t){var n=t(k());n&&!e.isDefaultPrevented()&&(e.preventDefault(),S(n))}function t(e){for(var t=c.getBody();e&&e!=t;){if(C(e)||x(e))return e;e=e.parentNode}return null}function r(e,t,n){return n.collapsed?!1:h.reduce(n.getClientRects(),function(n,r){return n||u.containsXY(r,e,t)},!1)}function i(){var e,r=t(c.selection.getNode());C(r)&&y(r)&&c.dom.isEmpty(r)&&(e=c.dom.create("br",{"data-mce-bogus":"1"}),c.$(r).empty().append(e),c.selection.setRng(n.before(e).toRange()))}function o(e){var t=z();if(t)return"compositionstart"==e.type?(e.preventDefault(),e.stopPropagation(),void W(t)):void(" "!=t.innerHTML&&W(t))}function l(e){var t;switch(e.keyCode){case d.DELETE:t=i();break;case d.BACKSPACE:t=i()}t&&e.preventDefault()}var f=b(I,1,te,E),g=b(I,-1,ne,N),v=b(j,1,E),w=b(j,-1,N),_=b(F,-1,a.upUntil),T=b(F,1,a.downUntil);c.on("mouseup",function(){var e=k();e.collapsed&&S(V(e))}),c.on("click",function(e){var n;n=t(e.target),n&&x(n)&&e.preventDefault()}),c.on("mousedown",function(e){var n;if(n=t(e.target))x(n)?(e.preventDefault(), +G(A(n))):(J(),r(e.clientX,e.clientY,c.selection.getRng())||c.selection.placeCaretAt(e.clientX,e.clientY));else{J(),re.hide();var i=s.closestCaret(Z,e.clientX,e.clientY);i&&(e.preventDefault(),c.getBody().focus(),S(R(1,i.node,i.before)))}}),c.on("keydown",function(t){if(!d.modifierPressed(t))switch(t.keyCode){case d.RIGHT:e(t,f);break;case d.DOWN:e(t,T);break;case d.LEFT:e(t,g);break;case d.UP:e(t,_);break;case d.DELETE:e(t,v);break;case d.BACKSPACE:e(t,w);break;default:x(c.selection.getNode())&&t.preventDefault()}}),c.on("keyup compositionstart",function(e){o(e),l(e)},!0),c.on("cut",function(){var e=c.selection.getNode();x(e)&&p.setEditorTimeout(c,function(){S(U($(e)))})}),c.on("getSelectionRange",function(e){var t=e.range;if(oe){if(!oe.parentNode)return void(oe=null);t=t.cloneRange(),t.selectNode(oe),e.range=t}}),c.on("setSelectionRange",function(e){var t;t=G(e.range),t&&(e.range=t)}),c.on("focus",function(){p.setEditorTimeout(c,function(){c.selection.setRng(U(c.selection.getRng()))},0)}),m.init(c)}function X(){var e=c.contentStyles,t=".mce-content-body";e.push(re.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;width: 100px;height: 100px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")}function K(e){return r.isCaretContainer(e.startContainer)||r.isCaretContainer(e.endContainer)}function G(t){var n,r=c.$,i=c.dom,o,a,s,l,u,d,f,h,p;if(!t)return J(),null;if(t.collapsed){if(J(),!K(t)){if(f=M(1,t),x(f.getNode()))return R(1,f.getNode(),!f.isAtEnd());if(x(f.getNode(!0)))return R(1,f.getNode(!0),!1)}return null}return s=t.startContainer,l=t.startOffset,u=t.endOffset,3==s.nodeType&&0==l&&x(s.parentNode)&&(s=s.parentNode,l=i.nodeIndex(s),s=s.parentNode),1!=s.nodeType?(J(),null):(u==l+1&&(n=s.childNodes[l]),x(n)?(h=p=n.cloneNode(!0),d=c.fire("ObjectSelected",{target:n,targetClone:h}),d.isDefaultPrevented()?(J(),null):(h=d.targetClone,o=r("#"+ie),0===o.length&&(o=r('
    ').attr("id",ie),o.appendTo(c.getBody())),t=c.dom.createRng(),h===p&&e.ie?(o.empty().append(g.ZWSP).append(h).append(g.ZWSP),t.setStart(o[0].firstChild,0),t.setEnd(o[0].lastChild,1)):(o.empty().append("\xa0").append(h).append("\xa0"),t.setStart(o[0].firstChild,1),t.setEnd(o[0].lastChild,0)),o.css({top:i.getPos(n,c.getBody()).y}),c.getBody().focus(),o[0].focus(),a=c.selection.getSel(),a.removeAllRanges(),a.addRange(t),c.$("*[data-mce-selected]").removeAttr("data-mce-selected"),n.setAttribute("data-mce-selected",1),oe=n,t)):(J(),null))}function J(){oe&&(oe.removeAttribute("data-mce-selected"),c.$("#"+ie).remove(),oe=null)}function Q(){re.destroy(),oe=null}var Z=c.getBody(),ee=new t(Z),te=b(v,ee.next),ne=b(v,ee.prev),re=new o(c.getBody(),y),ie="sel-"+c.dom.uniqueId(),oe,ae=c.$;return e.ceFalse&&(Y(),X()),{showBlockCaretContainer:W,destroy:Q}}var b=f.curry,C=l.isContentEditableTrue,x=l.isContentEditableFalse,w=l.isElement,N=i.isAfterContentEditableFalse,E=i.isBeforeContentEditableFalse,_=c.getSelectedNode;return y}),r(Ge,[w,g,E,R,A,H,P,Y,J,Q,Z,ee,re,ie,N,d,Te,Me,B,M,Pe,h,m,u,He,Oe,Ie,Ue,Ke],function(e,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C,x,w,N,E,_,S,k,T,R){function A(e,t,i){var o=this,a,s,l;a=o.documentBaseUrl=i.documentBaseURL,s=i.baseURI,l=i.defaultSettings,t=L({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:a,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:"",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",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,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,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o,ie7_compat:!0},l,t),l&&l.external_plugins&&t.external_plugins&&(t.external_plugins=L({},l.external_plugins,t.external_plugins)),o.settings=t,r.language=t.language||"en",r.languageLoad=t.language_load,r.baseURL=i.baseURL,o.id=t.id=e,o.setDirty(!1),o.plugins={},o.documentBaseURI=new p(t.document_base_url||a,{base_uri:s}),o.baseURI=s,o.contentCSS=[],o.contentStyles=[],o.shortcuts=new k(o),o.loadedCSS={},o.editorCommands=new h(o),t.target&&(o.targetElm=t.target),o.suffix=i.suffix,o.editorManager=i,o.inline=t.inline,t.cache_suffix&&(w.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),t.override_viewport===!1&&(w.overrideViewPort=!1),i.fire("SetupEditor",o),o.execCallback("setup",o),o.$=n.overrideDefaults(function(){return{context:o.inline?o.getBody():o.getDoc(),element:o.getBody()}})}var B=e.DOM,D=r.ThemeManager,M=r.PluginManager,L=N.extend,P=N.each,H=N.explode,O=N.inArray,I=N.trim,F=N.resolve,z=g.Event,W=w.gecko,V=w.ie;return A.prototype={render:function(){function e(){B.unbind(window,"ready",e),n.render()}function t(){var e=m.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!D.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+o+".js",D.load(r.theme,t)}N.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),P(r.external_plugins,function(e,t){M.load(t,e),r.plugins+=" "+t}),P(r.plugins.split(/[ ,]/),function(e){if(e=I(e),e&&!M.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=M.dependencies(e);P(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=M.createUrl(t,e),M.load(e.resource,e)})}else M.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;if(!z.domLoaded)return void B.bind(window,"ready",e);if(n.getElement()&&w.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var a=n.getElement().form||B.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(B.insertAfter(B.create("input",{type:"hidden",name:i}),i),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},B.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.setDirty(!1),a._mceOldSubmit(a)})),n.windowManager=new v(n),n.notificationManager=new y(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=B.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),t()}},init:function(){function e(n){var r=M.get(n),i,o;if(i=M.urls[n]||t.documentBaseUrl.replace(/\/$/,""),n=I(n),r&&-1===O(m,n)){if(P(M.dependencies(n),function(t){e(t)}),t.plugins[n])return;o=new r(t,i,t.$),t.plugins[n]=o,o.init&&(o.init(t,i),m.push(n))}}var t=this,n=t.settings,r=t.getElement(),i,o,a,s,l,c,u,d,f,h,p,m=[];if(this.editorManager.i18n.setCode(n.language),t.rtl=n.rtl_ui||this.editorManager.i18n.rtl,t.editorManager.add(t),n.aria_label=n.aria_label||B.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),n.theme&&("function"!=typeof n.theme?(n.theme=n.theme.replace(/-/,""),c=D.get(n.theme),t.theme=new c(t,D.urls[n.theme]),t.theme.init&&t.theme.init(t,D.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""),t.$)):t.theme=n.theme),P(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),n.render_ui&&t.theme&&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,h=/^[0-9\.]+(|px)$/i,h.test(""+i)&&(i=Math.max(parseInt(i,10),100)),h.test(""+o)&&(o=Math.max(parseInt(o,10),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,deltaHeight:n.delta_height}),n.content_editable||(o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&P(H(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();if(t.iframeHTML=n.doctype+"",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+=''),!w.caretAfter&&n.ie7_compat&&(t.iframeHTML+=''),t.iframeHTML+='',!/#$/.test(document.location.href))for(p=0;p',t.loadedCSS[g]=!0}d=n.body_id||"tinymce",-1!=d.indexOf("=")&&(d=t.getParam("body_id","","hash"),d=d[t.id]||d),f=n.body_class||"",-1!=f.indexOf("=")&&(f=t.getParam("body_class","","hash"),f=f[t.id]||""),n.content_security_policy&&(t.iframeHTML+=''),t.iframeHTML+='
    ';var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&w.ie&&w.ie<12&&(u=v);var y=B.create("iframe",{id:t.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}});if(y.onload=function(){y.onload=null,t.fire("load")},B.setAttrib(y,"src",u||'javascript:""'),t.contentAreaContainer=l.iframeContainer,t.iframeElement=y,s=B.add(l.iframeContainer,y),V)try{t.getDoc()}catch(b){s.src=u=v}l.editorContainer&&(B.get(l.editorContainer).style.display=t.orgDisplay,t.hidden=B.isHidden(l.editorContainer)),t.getElement().style.display="none",B.setAttrib(t.id,"aria-hidden",!0),u||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,r=n.settings,s=n.getElement(),h=n.getDoc(),p,m;r.inline||(n.getElement().style.visibility=n.orgVisibility),t||r.content_editable||(h.open(),h.write(n.iframeHTML),h.close()),r.content_editable&&(n.on("remove",function(){var e=this.getBody();B.removeClass(e,"mce-content-body"),B.removeClass(e,"mce-edit-focus"),B.setAttrib(e,"contentEditable",null)}),B.addClass(s,"mce-content-body"),n.contentDocument=h=r.content_document||document,n.contentWindow=r.content_window||window,n.bodyElement=s,r.content_document=r.content_window=null,r.root_name=s.nodeName.toLowerCase()),p=n.getBody(),p.disabled=!0,n.readonly=r.readonly,n.readonly||(n.inline&&"static"==B.getStyle(p,"position",!0)&&(p.style.position="relative"),p.contentEditable=n.getParam("content_editable_state",!0)),p.disabled=!1,n.editorUpload=new T(n),n.schema=new b(r),n.dom=new e(h,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:r.force_hex_style_colors,class_filter:r.class_filter,update_styles:!0,root_element:n.inline?n.getBody():null,collect:r.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e)}}),n.parser=new C(r,n.schema),n.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)if(i=e[r],a=i.attr(t),s="data-mce-"+t,!i.attributes.map[s]){if(0===a.indexOf("data:")||0===a.indexOf("blob:"))continue;"style"===t?(a=o.serializeStyle(o.parseStyle(a),i.name),a.length||(a=null),i.attr(s,a),i.attr(t,a)):"tabindex"===t?(i.attr(s,a),i.attr(t,null)):i.attr(s,n.convertURL(a,t,i.name))}}),n.parser.addNodeFilter("script",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("type")||"no/type",0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,r,i=n.schema.getNonEmptyElements();t--;)r=e[t],r.isEmpty(i)&&(r.append(new o("br",1)).shortEnded=!0)}),n.serializer=new a(r,n),n.selection=new l(n.dom,n.getWin(),n.serializer,n),n.formatter=new c(n),n.undoManager=new u(n),n.forceBlocks=new f(n),n.enterKey=new d(n),n._nodeChangeDispatcher=new i(n),n._selectionOverrides=new R(n),n.fire("PreInit"),r.browser_spellcheck||r.gecko_spellcheck||(h.body.spellcheck=!1,B.setAttrib(p,"spellcheck","false")),n.fire("PostRender"),n.quirks=new x(n),r.directionality&&(p.dir=r.directionality),r.nowrap&&(p.style.whiteSpace="nowrap"),r.protect&&n.on("BeforeSetContent",function(e){P(r.protect,function(t){e.content=e.content.replace(t,function(e){return""})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),r.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,n.bindPendingEventDelegates(),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.on("compositionstart compositionend",function(e){n.composing="compositionstart"===e.type}),n.contentStyles.length>0&&(m="",P(n.contentStyles,function(e){m+=e+"\r\n"}),n.dom.addStyle(m)),P(n.contentCSS,function(e){n.loadedCSS[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),r.auto_focus&&E.setEditorTimeout(n,function(){var e;e=r.auto_focus===!0?n:n.editorManager.get(r.auto_focus),e.destroyed||e.focus()},100),s=h=p=null},focus:function(e){function t(e){return n.dom.getParent(e,function(e){return"true"===n.dom.getContentEditable(e)})}var n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l=n.getBody(),c;if(!e){if(o=r.getRng(),o.item&&(a=o.item(0)),n.quirks.refreshContentEditable(),c=t(r.getNode()),n.$.contains(l,c))return c.focus(),r.normalize(),void n.editorManager.setActive(n);if(i||(w.opera||n.getBody().focus(),n.getWin().focus()),W||i){if(l.setActive)try{l.setActive()}catch(u){l.focus()}else l.focus();i&&r.normalize()}a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())}n.editorManager.setActive(n)},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?F(r):0,n=F(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?P(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){e=e.split("="),e.length>1?i[I(e[0])]=I(e[1]):i[I(e[0])]=I(e)}):i=r,i):r},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addContextToolbar:function(e,t){var n=this,r;n.contextToolbars=n.contextToolbars||[],"string"==typeof e&&(r=e,e=function(e){return n.dom.is(e,r)}),n.contextToolbars.push({predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(B.show(e.getContainer()),B.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(V&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(B.hide(e.getContainer()),B.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initialized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),"raw"==e.format&&t.fire("RawSaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(t.inline||(n.innerHTML=r),(i=B.getParent(t.id,"form"))&&P(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&t.setDirty(!1),r},setContent:function(e,t){var n=this,r=n.getBody(),i,o;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(o=V&&11>V?"":'
    ',"TABLE"==r.nodeName?e="
    ":/^(UL|OL)$/.test(r.nodeName)&&(e="
  • "+o+"
  • "),i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=o,e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):V||e||(e='
    '),n.dom.setHTML(r,e),n.fire("SetContent",t)):("raw"!==t.format&&(e=new s({validate:n.validate},n.schema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=I(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?t.serializer.getTrimmedContent():"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),"text"!=e.format?e.content=I(n):e.content=n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=L({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!=t&&this.fire("dirty")},setMode:function(e){S.setMode(this,e)},getContainer:function(){var e=this;return e.container||(e.container=B.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=B.get(this.id)),this.targetElm},getWin:function(){var e=this,t;return e.contentWindow||(t=e.iframeElement,t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),P(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border"),void(t&&"0"!=t||!n.hasVisual?i.removeClass(e,o):i.addClass(e,o));case"A":return void(i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o=r.visual_anchor_class||"mce-item-anchor",t&&n.hasVisual?i.addClass(e,o):i.removeClass(e,o)))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&B.remove(e.getElement().nextSibling),e.inline||(V&&10>V&&e.getDoc().execCommand("SelectAll",!1,null),B.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),B.remove(e.getContainer()),e._selectionOverrides.destroy(),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t=this,n;if(!t.destroyed){if(!e&&!t.removed)return void t.remove();e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),B.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},L(A.prototype,_),A}),r(Je,[],function(){var e={},t="en";return{setCode:function(e){e&&(t=e,this.rtl=this.data[e]?"rtl"===this.data[e]._dir:!1)},getCode:function(){return t},rtl:!1,add:function(t,n){var r=e[t];r||(e[t]=r={});for(var i in n)r[i]=n[i];this.setCode(t)},translate:function(n){var r;if(r=e[t],r||(r={}),"undefined"==typeof n)return n;if("string"!=typeof n&&n.raw)return n.raw;if(n.push){var i=n.slice(1);n=(r[n[0]]||n[0]).replace(/\{([0-9]+)\}/g,function(e,t){return i[t]})}return(r[n]||n).replace(/{context:\w+}$/,"")},data:e}}),r(Qe,[w,u,h],function(e,t,n){function r(e){function l(){try{return document.activeElement}catch(e){return document.body}}function c(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function u(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function d(e){return!!s.getParent(e,r.isEditorUIElement)}function f(r){var f=r.editor;f.on("init",function(){(f.inline||n.ie)&&("onbeforedeactivate"in document&&n.ie<9?f.dom.bind(f.getBody(),"beforedeactivate",function(e){if(e.target==f.getBody())try{f.lastRng=f.selection.getRng()}catch(t){}}):f.on("nodechange mouseup keyup",function(e){var t=l();"nodechange"==e.type&&e.selectionChange||(t&&t.id==f.id+"_ifr"&&(t=f.getBody()),f.dom.isChildOf(t,f.getBody())&&(f.lastRng=f.selection.getRng()))}),n.webkit&&!i&&(i=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(f.lastRng=n)}},s.bind(document,"selectionchange",i)))}),f.on("setcontent",function(){f.lastRng=null}),f.on("mousedown",function(){f.selection.lastFocusBookmark=null}),f.on("focusin",function(){var t=e.focusedEditor,n;f.selection.lastFocusBookmark&&(n=u(f,f.selection.lastFocusBookmark),f.selection.lastFocusBookmark=null,f.selection.setRng(n)),t!=f&&(t&&t.fire("blur",{focusedEditor:f}),e.setActive(f),e.focusedEditor=f,f.fire("focus",{blurredEditor:t}),f.focus(!0)),f.lastRng=null}),f.on("focusout",function(){t.setEditorTimeout(f,function(){var t=e.focusedEditor;d(l())||t!=f||(f.fire("blur",{focusedEditor:null}),e.focusedEditor=null,f.selection&&(f.selection.lastFocusBookmark=null))})}),o||(o=function(t){var n=e.activeEditor,r;r=t.target,n&&r.ownerDocument==document&&(n.selection&&r!=n.getBody()&&(n.selection.lastFocusBookmark=c(n.dom,n.lastRng)),r==document.body||d(r)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},s.bind(document,"focusin",o)),f.inline&&!a&&(a=function(t){var n=e.activeEditor;if(n.inline&&!n.dom.isChildOf(t.target,n.getBody())){var r=n.selection.getRng();r.collapsed||(n.lastRng=r)}},s.bind(document,"mouseup",a))}function h(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(s.unbind(document,"selectionchange",i),s.unbind(document,"focusin",o),s.unbind(document,"mouseup",a),i=o=a=null)}e.on("AddEditor",f),e.on("RemoveEditor",h)}var i,o,a,s=e.DOM;return r.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},r}),r(Ze,[Ge,g,w,ie,h,m,c,le,Je,Qe],function(e,t,n,r,i,o,a,s,l,c){function u(e){g(C.editors,function(t){"scroll"===e.type?t.fire("ScrollWindow",e):t.fire("ResizeWindow",e)})}function d(e,n){n!==x&&(n?t(window).on("resize scroll",u):t(window).off("resize scroll",u),x=n)}function f(e){var t=C.editors,n;delete t[e.id];for(var r=0;r0&&g(m(t),function(e){var t;(t=p.get(e))?n.push(t):g(document.forms,function(t){g(t.elements,function(t){t.name===e&&(e="mce_editor_"+y++,p.setAttrib(t,"id",e),n.push(t))})})});break;case"textareas":case"specific_textareas":g(p.select("textarea"),function(t){e.editor_deselector&&s(t,e.editor_deselector)||e.editor_selector&&!s(t,e.editor_selector)||n.push(t)})}return n}function c(){function a(t,n,r){if(!h(u.get(t))){var i=new e(t,n,u);d.push(i),i.on("init",function(){++s===m.length&&f(d)}),i.targetElm=i.targetElm||r,i.render()}}var s=0,d=[],m;return p.unbind(window,"ready",c),i("onpageload"),m=t.unique(l(n)),n.types?void g(n.types,function(e){o.each(m,function(t){return p.is(t,e.selector)?(a(r(t),v({},n,e),t),!1):!0})}):void g(m,function(e){a(r(e),n,e)})}var u=this,d,f=function(e){d=e};return u.settings=n,p.bind(window,"ready",c),new a(function(e){d?e(d):f=function(t){e(t)}})},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),d(n,!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),b||(b=function(){t.fire("BeforeUnload")},p.bind(window,"beforeunload",b)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i;{if(e)return"string"==typeof e?(e=e.selector||e,void g(p.select(e),function(e){i=r[e.id],i&&t.remove(i)})):(i=e,r[i.id]?(f(i)&&t.fire("RemoveEditor",{editor:i}),r.length||p.unbind(window,"beforeunload",b),i.remove(),d(r,r.length>0),i):null);for(n=r.length-1;n>=0;n--)t.remove(r[n])}},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){g(this.editors,function(e){e.save()})},addI18n:function(e,t){l.add(e,t)},translate:function(e){return l.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}},v(C,s),C.setup(),window.tinymce=window.tinyMCE=C,C}),r(et,[Ze,m],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(n,r){"html4"===t.settings.schema&&e(r,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(tt,[le,m],function(e,t){var n={send:function(e){function r(){!e.async||4==i.readyState||o++>1e4?(e.success&&1e4>o&&200==i.status?e.success.call(e.success_scope,""+i.responseText,i,e):e.error&&e.error.call(e.error_scope,o>1e4?"TIMED_OUT":"GENERAL",i,e),i=null):setTimeout(r,10)}var i,o=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async!==!1,e.data=e.data||"",n.fire("beforeInitialize",{settings:e}),i=new XMLHttpRequest){if(i.overrideMimeType&&i.overrideMimeType(e.content_type),i.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(i.withCredentials=!0),e.content_type&&i.setRequestHeader("Content-Type",e.content_type), +e.requestheaders&&t.each(e.requestheaders,function(e){i.setRequestHeader(e.key,e.value)}),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i=n.fire("beforeSend",{xhr:i,settings:e}).xhr,i.send(e.data),!e.async)return r();setTimeout(r,10)}}};return t.extend(n,e),n}),r(nt,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}}),r(rt,[nt,tt,m],function(e,t,n){function r(e){this.settings=i({},e),this.count=0}var i=n.extend;return r.sendRPC=function(e){return(new r).send(e)},r.prototype={send:function(n){var r=n.error,o=n.success;n=i(this.settings,n),n.success=function(t,i){t=e.parse(t),"undefined"==typeof t&&(t={error:"JSON Parse error."}),t.error?r.call(n.error_scope||n.scope,t.error,i):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},r}),r(it,[w],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),r.count++}}}),r(ot,[],function(){function e(){s=[];for(var e in a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return r=e!==t?u+e:i.indexOf(",",u),-1===r||r>i.length?null:(n=i.substring(u,r),u=r+1,n)}var r,i,s,u=0;if(a={},c){o.load(l),i=o.getAttribute(l)||"";do{var d=n();if(null===d)break;if(r=n(parseInt(d,32)||0),null!==r){if(d=n(),null===d)break;s=n(parseInt(d,32)||0),r&&(a[r]=s)}}while(null!==r);e()}}function r(){var t,n="";if(c){for(var r in a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n);try{o.save(l)}catch(i){}e()}}var i,o,a,s,l,c;try{if(window.localStorage)return localStorage}catch(u){}return l="tinymce",o=document.documentElement,c=!!o.addBehavior,c&&o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i}),r(at,[w,d,N,E,m,h],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each(i,function(e,t){a[t]=e}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r(st,[oe,m],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t=this,n=t.settings,r,i,o,a;r=n.firstControlClass,i=n.lastControlClass,e.each(function(e){e.classes.remove(r).remove(i).add(n.controlClass),e.visible()&&(o||(o=e),a=e)}),o&&o.classes.add(r),a&&a.classes.add(i)},renderHtml:function(e){var t=this,n="";return t.applyClasses(e.items()),e.items().each(function(e){n+=e.renderHtml()}),n},recalc:function(){},postRender:function(){},isNative:function(){return!1}})}),r(lt,[st],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'
    '+this._super(e)}})}),r(ct,[Ae],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t=this,n;t._super(e),e=t.settings,n=t.settings.size,t.on("click mousedown",function(e){e.preventDefault()}),t.on("touchstart",function(e){t.fire("click",e),e.preventDefault()}),e.subtype&&t.classes.add(e.subtype),n&&t.classes.add("btn-"+n),e.icon&&t.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e=this.getEl().firstChild,t;e&&(t=e.style,t.width=t.height="100%"),this._super()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("icon"),i,o=e.state.get("text"),a="";return i=e.settings.image,i?(r="none","string"!=typeof i&&(i=window.getSelection?i[0]:i[1]),i=" style=\"background-image: url('"+i+"')\""):i="",o&&(e.classes.add("btn-has-text"),a=''+e.encode(o)+""),r=e.settings.icon?n+"ico "+n+"i-"+r:"",'
    "},bindStates:function(){function e(e){var i=n("span."+r,t.getEl());e?(i[0]||(n("button:first",t.getEl()).append(''),i=n("span."+r,t.getEl())),i.html(t.encode(e))):i.remove(),t.classes.toggle("btn-has-text",!!e)}var t=this,n=t.$,r=t.classPrefix+"txt";return t.state.on("change:text",function(t){e(t.value)}),t.state.on("change:icon",function(n){var r=n.value,i=t.classPrefix;t.settings.icon=r,r=r?i+"ico "+i+"i-"+t.settings.icon:"";var o=t.getEl().firstChild,a=o.getElementsByTagName("i")[0];r?(a&&a==o.firstChild||(a=document.createElement("i"),o.insertBefore(a,o.firstChild)),a.className=r):a&&o.removeChild(a),e(t.state.get("text"))}),t._super()}})}),r(ut,[be],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),'
    '+(e.settings.html||"")+t.renderHtml(e)+"
    "}})}),r(dt,[Ae],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'
    '+e.encode(e.state.get("text"))+"
    "},bindStates:function(){function e(e){t.classes.toggle("checked",e),t.aria("checked",e)}var t=this;return t.state.on("change:text",function(e){t.getEl("al").firstChild.data=t.translate(e.value)}),t.state.on("change:checked change:value",function(n){t.fire("change"),e(n.value)}),t.state.on("change:icon",function(e){var n=e.value,r=t.classPrefix;if("undefined"==typeof n)return t.settings.icon;t.settings.icon=n,n=n?r+"ico "+r+"i-"+t.settings.icon:"";var i=t.getEl().firstChild,o=i.getElementsByTagName("i")[0];n?(o&&o==i.firstChild||(o=document.createElement("i"),i.insertBefore(o,i.firstChild)),o.className=n):o&&i.removeChild(o)}),t.state.get("checked")&&e(!0),t._super()}})}),r(ft,[Ae,ve,fe,g],function(e,t,n,r){return e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.classes.add("combobox"),t.subinput=!0,t.ariaTarget="inp",e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){var i=n.target,o=t.getEl();if(r.contains(o,i)||i==o)for(;i&&i!=o;)i.id&&-1!=i.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),i=i.parentNode}),t.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&t.parents().reverse().each(function(n){var r=t.state.get("value"),i=t.getEl("inp").value;return e.preventDefault(),t.state.set("value",i),r!=i&&t.fire("change"),n.hasEventListeners("submit")&&n.toJSON?(n.fire("submit",{data:n.toJSON()}),!1):void 0})}),t.on("keyup",function(e){"INPUT"==e.target.nodeName&&t.state.set("value",e.target.value)})},showMenu:function(){var e=this,n=e.settings,r;e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()==e.value())})}).fire("show"),e.menu.on("select",function(t){e.value(t.control.value())}),e.on("focusin",function(t){"INPUT"==t.target.tagName.toUpperCase()&&e.menu.hide()}),e.aria("expanded",!0)),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e=this,t=e.getEl(),i=e.getEl("open"),o=e.layoutRect(),a,s;a=i?o.w-n.getSize(i).width-10:o.w-10;var l=document;return l.all&&(!l.documentMode||l.documentMode<=8)&&(s=e.layoutRect().h-2+"px"),r(t.firstChild).css({width:a,lineHeight:s}),e._super(),e},postRender:function(){var e=this;return r(this.getEl("inp")).on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)}),e._super()},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=e.state.get("value")||"",o,a,s="",l="";return"spellcheck"in n&&(l+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(l+=' maxlength="'+n.maxLength+'"'),n.size&&(l+=' size="'+n.size+'"'),n.subtype&&(l+=' type="'+n.subtype+'"'),e.disabled()&&(l+=' disabled="disabled"'),o=n.icon,o&&"caret"!=o&&(o=r+"ico "+r+"i-"+n.icon),a=e.state.get("text"),(o||a)&&(s='
    ",e.classes.add("has-open")),'
    '+s+"
    "},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl("inp").value!=t.value&&(e.getEl("inp").value=t.value)}),e.state.on("change:disabled",function(t){e.getEl("inp").disabled=t.value}),e._super()},remove:function(){r(this.getEl("inp")).off(),this._super()}})}),r(ht,[ft],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl().getElementsByTagName("i")[0];if(t)try{t.style.background=e}catch(n){}},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e._rendered&&e.repaintColor(t.value)}),e._super()}})}),r(pt,[ct,_e],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var r=n.panel;r.type&&(r={layout:"grid",items:r}),r.role=r.role||"dialog",r.popover=!0,r.autohide=!0,r.ariaRoot=!0,e.panel=new t(r).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),r(mt,[pt,w],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("text"),i=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",a="";return r&&(e.classes.add("btn-has-text"),a=''+e.encode(r)+""),'
    '},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=e||n.getParent(r.target,"."+e.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(e,r))}),delete e.settings.onclick,e._super()}})}),r(gt,[],function(){function e(e){function i(e,i,o){var a,s,l,c,u,d;return a=0,s=0,l=0,e/=255,i/=255,o/=255,u=t(e,t(i,o)),d=n(e,n(i,o)),u==d?(l=u,{h:0,s:0,v:100*l}):(c=e==u?i-o:o==u?e-i:o-e,a=e==u?3:o==u?1:5,a=60*(a-c/(d-u)),s=(d-u)/d,l=d,{h:r(a),s:r(100*s),v:r(100*l)})}function o(e,i,o){var a,s,l,c;if(e=(parseInt(e,10)||0)%360,i=parseInt(i,10)/100,o=parseInt(o,10)/100,i=n(0,t(i,1)),o=n(0,t(o,1)),0===i)return void(d=f=h=r(255*o));switch(a=e/60,s=o*i,l=s*(1-Math.abs(a%2-1)),c=o-s,Math.floor(a)){case 0:d=s,f=l,h=0;break;case 1:d=l,f=s,h=0;break;case 2:d=0,f=s,h=l;break;case 3:d=0,f=l,h=s;break;case 4:d=l,f=0,h=s;break;case 5:d=s,f=0,h=l;break;default:d=f=h=0}d=r(255*(d+c)),f=r(255*(f+c)),h=r(255*(h+c))}function a(){function e(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+e(d)+e(f)+e(h)}function s(){return{r:d,g:f,b:h}}function l(){return i(d,f,h)}function c(e){var t;return"object"==typeof e?"r"in e?(d=e.r,f=e.g,h=e.b):"v"in e&&o(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(d=parseInt(t[1],10),f=parseInt(t[2],10),h=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(d=parseInt(t[1],16),f=parseInt(t[2],16),h=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(d=parseInt(t[1]+t[1],16),f=parseInt(t[2]+t[2],16),h=parseInt(t[3]+t[3],16)),d=0>d?0:d>255?255:d,f=0>f?0:f>255?255:f,h=0>h?0:h>255?255:h,u}var u=this,d=0,f=0,h=0;e&&c(e),u.toRgb=s,u.toHsv=l,u.toHex=a,u.parse=c}var t=Math.min,n=Math.max,r=Math.round;return e}),r(vt,[Ae,Ce,fe,gt],function(e,t,n,r){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){function e(e,t){var r=n.getPos(e),i,o;return i=t.pageX-r.x,o=t.pageY-r.y,i=Math.max(0,Math.min(i/e.clientWidth,1)),o=Math.max(0,Math.min(o/e.clientHeight,1)),{x:i,y:o}}function i(e,t){var i=(360-e.h)/360;n.css(d,{top:100*i+"%"}),t||n.css(h,{left:e.s+"%",top:100-e.v+"%"}),f.style.background=new r({s:100,v:100,h:e.h}).toHex(),s.color().parse({s:e.s,v:e.v,h:e.h})}function o(t){var n;n=e(f,t),c.s=100*n.x,c.v=100*(1-n.y),i(c),s.fire("change")}function a(t){var n;n=e(u,t),c=l.toHsv(),c.h=360*(1-n.y),i(c,!0),s.fire("change")}var s=this,l=s.color(),c,u,d,f,h;u=s.getEl("h"),d=s.getEl("hp"),f=s.getEl("sv"),h=s.getEl("svp"),s._repaint=function(){c=l.toHsv(),i(c)},s._super(),s._svdraghelper=new t(s._id+"-sv",{start:o,drag:o}),s._hdraghelper=new t(s._id+"-h",{start:a,drag:a}),s._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){var t=this;return arguments.length?(t.color().parse(e),void(t._rendered&&t._repaint())):t.color().toHex()},color:function(){return this._color||(this._color=new r),this._color},renderHtml:function(){function e(){var e,t,n="",i,a;for(i="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",a=o.split(","),e=0,t=a.length-1;t>e;e++)n+='
    ';return n}var t=this,n=t._id,r=t.classPrefix,i,o="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000",a="background: -ms-linear-gradient(top,"+o+");background: linear-gradient(to bottom,"+o+");";return i='
    '+e()+'
    ','
    '+i+"
    "}})}),r(yt,[Ae],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.classes.add("path"),t.canFocus=!0,t.on("click",function(e){var n,r=e.target;(n=r.getAttribute("data-index"))&&t.fire("select",{value:t.row()[n],index:n})}),t.row(t.settings.row)},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){var e=this;return'
    '+e._getDataPathHtml(e.state.get("row"))+"
    "},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(e){var t=this,n=e||[],r,i,o="",a=t.classPrefix;for(r=0,i=n.length;i>r;r++)o+=(r>0?'":"")+'
    '+n[r].name+"
    ";return o||(o='
    \xa0
    '),o}})}),r(bt,[yt,Ze],function(e,t){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var n=this,r=t.activeEditor;return r.settings.elementpath!==!1&&(n.on("select",function(e){r.focus(),r.selection.select(this.row()[e.index].element),r.nodeChanged()}),r.on("nodeChange",function(t){for(var i=[],o=t.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=r.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});if(s.isDefaultPrevented()||i.push({name:s.name,element:o[a]}),s.isPropagationStopped())break}n.row(i)})),n._super()}})}),r(Ct,[be],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'
    '+(e.settings.title?'
    '+e.settings.title+"
    ":"")+'
    '+(e.settings.html||"")+t.renderHtml(e)+"
    "}})}),r(xt,[be,Ct,m],function(e,t,n){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,r=e.items();e.settings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),r.each(function(r){var i,o=r.settings.label;o&&(i=new t(n.extend({items:{type:"label",id:r._id+"-l",text:o,flex:0,forId:r._id,disabled:r.disabled()}},e.settings.formItemDefaults)),i.type="formitem",r.aria("labelledby",r._id+"-l"),"undefined"==typeof r.settings.flex&&(r.settings.flex=1),e.replace(r,i),i.add(r))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.fromJSON(e.settings.data)},bindStates:function(){function e(){var e=0,n=[],r,i,o;if(t.settings.labelGapCalc!==!1)for(o="children"==t.settings.labelGapCalc?t.find("formitem"):t.items(),o.filter("formitem").each(function(t){var r=t.items()[0],i=r.getEl().clientWidth;e=i>e?i:e,n.push(r)}),i=t.settings.labelGap||0,r=n.length;r--;)n[r].settings.minWidth=e+i}var t=this;t._super(),t.on("show",e),e()}})}),r(wt,[xt],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'
    '+(e.settings.title?''+e.settings.title+"":"")+'
    '+(e.settings.html||"")+t.renderHtml(e)+"
    "}})}),r(Nt,[ft,m],function(e,t){return e.extend({init:function(e){var n=this,r=tinymce.activeEditor,i=r.settings,o,a,s;e.spellcheck=!1,s=i.file_picker_types||i.file_browser_callback_types,s&&(s=t.makeMap(s,/[, ]/)),s&&!s[e.filetype]||(a=i.file_picker_callback,!a||s&&!s[e.filetype]?(a=i.file_browser_callback,!a||s&&!s[e.filetype]||(o=function(){a(n.getEl("inp").id,n.value(),e.filetype,window)})):o=function(){var i=n.fire("beforecall").meta;i=t.extend({filetype:e.filetype},i),a.call(r,function(e,t){n.value(e).fire("change",{meta:t})},n.value(),i)}),o&&(e.icon="browse",e.onaction=o),n._super(e)}})}),r(Et,[lt],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r(_t,[lt],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v=[],y,b,C,x,w,N,E,_,S,k,T,R,A,B,D,M,L,P,H,O,I,F,z=Math.max,W=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e.paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,"row-reversed"!=f&&"column-reverse"!=f||(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(S="y",E="h",_="minH",k="maxH",R="innerH",T="top",A="deltaH",B="contentH",H="left",L="w",D="x",M="innerW",P="minW",O="right",I="deltaW",F="contentW"):(S="x",E="w",_="minW",k="maxW",R="innerW",T="left",A="deltaW",B="contentW",H="top",L="h",D="y",M="innerH",P="minH",O="bottom",I="deltaH",F="contentH"),d=i[R]-o[T]-o[T],N=u=0,t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),m=h.settings,g=m.flex,d-=n-1>t?c:0,g>0&&(u+=g,p[k]&&v.push(h),p.flex=g),d-=p[_],y=o[H]+p[P]+o[O],y>N&&(N=y);if(x={},0>d?x[_]=i[_]-d+i[A]:x[_]=i[R]-d+i[A],x[P]=N+i[I],x[B]=i[R]-d,x[F]=N,x.minW=W(x.minW,i.maxW),x.minH=W(x.minH,i.maxH),x.minW=z(x.minW,i.startMinWidth),x.minH=z(x.minH,i.startMinHeight),!i.autoResize||x.minW==i.minW&&x.minH==i.minH){for(C=d/u,t=0,n=v.length;n>t;t++)h=v[t],p=h.layoutRect(),b=p[k],y=p[_]+p.flex*C,y>b?(d-=p[k]-p[_],u-=p.flex,p.flex=0,p.maxFlexSize=b):p.maxFlexSize=0;for(C=d/u,w=o[T],x={},0===u&&("end"==l?w=d+o[T]:"center"==l?(w=Math.round(i[R]/2-(i[R]-d)/2)+o[T],0>w&&(w=o[T])):"justify"==l&&(w=o[T],c=Math.floor(d/(r.length-1)))),x[D]=o[H],t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),y=p.maxFlexSize||p[_],"center"===s?x[D]=Math.round(i[M]/2-p[L]/2):"stretch"===s?(x[L]=z(p[P]||0,i[M]-o[H]-o[O]),x[D]=o[H]):"end"===s&&(x[D]=i[M]-p[L]-o.top),p.flex>0&&(y+=p.flex*C),x[E]=y,x[S]=w,h.layoutRect(x),h.recalc&&h.recalc(),w+=y+c}else if(x.w=x.minW,x.h=x.minH,e.layoutRect(x),this.recalc(e),null===e._lastRect){var V=e.parent();V&&(V._lastRect=null,V.recalc())}}})}),r(St,[st],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}})}),r(kt,[ge,Ae,_e,m,Ze,h],function(e,t,n,r,i,o){function a(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;s(i.parents,function(e){return s(t,function(t){return n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a?!1:void 0}),a?!1:void 0}),r.value(a)})}}function r(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}function i(){function t(e){var n=[];if(e)return s(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{var a=e.format||"custom"+r++;e.format||(e.name=a,i.push(e)),o.format=a,o.cmd=e.cmd}n.push(o)}),n}function n(){var n;return n=t(e.settings.style_formats_merge?e.settings.style_formats?o.concat(e.settings.style_formats):o:e.settings.style_formats||o)}var r=0,i=[],o=[{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"}]}];return e.on("init",function(){s(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:n(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){return this.settings.format?e.formatter.getCssText(this.settings.format):void 0},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,r;n=t.settings.format,n&&(t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))),r=t.settings.cmd,r&&t.active(e.queryCommandState(r))})},onclick:function(){this.settings.format&&c(this.settings.format),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}function o(t){return function(){var n=this;e.formatter?e.formatter.formatChanged(t,function(e){n.active(e)}):e.on("init",function(){e.formatter.formatChanged(t,function(e){n.active(e)})})}}function a(t){return function(){function n(){return e.undoManager?e.undoManager[t]():!1}var r=this;t="redo"==t?"hasRedo":"hasUndo",r.disabled(!n()),e.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){r.disabled(e.readonly||!n())})}}function l(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function c(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var u;u=i(),s({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:o(n),onclick:function(){c(n)}})}),s({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),s({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:o(n)})}),e.addButton("undo",{tooltip:"Undo",onPostRender:a("undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:a("redo"),cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:a("undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:a("redo"),cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:l,cmd:"mceToggleVisualAid"}),e.addButton("remove",{tooltip:"Remove",icon:"remove",cmd:"Delete"}),s({cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"],bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown",function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:u}),e.addButton("formatselect",function(){var n=[],i=r(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");return s(i,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:i[0][0],values:n,fixedWidth:!0,onselect:c,onPostRender:t(n)}}),e.addButton("fontselect",function(){var n="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",i=[],o=r(e.settings.font_formats||n);return s(o,function(e){i.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:t(i,"fontname"),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var n=[],r="8pt 10pt 12pt 14pt 18pt 24pt 36pt",i=e.settings.fontsize_formats||r;return s(i.split(" "),function(e){var t=e,r=e,i=e.split("=");i.length>1&&(t=i[0],r=i[1]),n.push({text:t,value:r})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:n,fixedWidth:!0,onPostRender:t(n,"fontsize"),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{ +text:"Formats",menu:u})}var s=r.each;i.on("AddEditor",function(t){t.editor.rtl&&(e.rtl=!0),a(t.editor)}),e.translate=function(e){return i.translate(e)},t.tooltips=!o.iOS}),r(Tt,[lt],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C,x,w,N,E=[],_=[],S,k,T,R,A,B;t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,C=t.alignH||t.align,x=t.alignV||t.align,g=e.paddingBox,A="reverseRows"in t?t.reverseRows:e.isRtl(),C&&"string"==typeof C&&(C=[C]),x&&"string"==typeof x&&(x=[x]);for(d=0;r>d;d++)E.push(0);for(f=0;n>f;f++)_.push(0);for(f=0;n>f;f++)for(d=0;r>d&&(u=i[f*r+d],u);d++)c=u.layoutRect(),S=c.minW,k=c.minH,E[d]=S>E[d]?S:E[d],_[f]=k>_[f]?k:_[f];for(T=o.innerW-g.left-g.right,w=0,d=0;r>d;d++)w+=E[d]+(d>0?y:0),T-=(d>0?y:0)+E[d];for(R=o.innerH-g.top-g.bottom,N=0,f=0;n>f;f++)N+=_[f]+(f>0?b:0),R-=(f>0?b:0)+_[f];if(w+=g.left+g.right,N+=g.top+g.bottom,l={},l.minW=w+(o.w-o.innerW),l.minH=N+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH);var D;D="start"==t.packV?0:R>0?Math.floor(R/n):0;var M=0,L=t.flexWidths;if(L)for(d=0;dd;d++)E[d]+=L?L[d]*P:P;for(p=g.top,f=0;n>f;f++){for(h=g.left,s=_[f]+D,d=0;r>d&&(B=A?f*r+r-1-d:f*r+d,u=i[B],u);d++)m=u.settings,c=u.layoutRect(),a=Math.max(E[d],c.startMinWidth),c.x=h,c.y=p,v=m.alignH||(C?C[d]||C[0]:null),"center"==v?c.x=h+a/2-c.w/2:"right"==v?c.x=h+a-c.w:"stretch"==v&&(c.w=a),v=m.alignV||(x?x[d]||x[0]:null),"center"==v?c.y=p+s/2-c.h/2:"bottom"==v?c.y=p+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),h+=a+y,u.recalc&&u.recalc();p+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var H=e.parent();H&&(H._lastRect=null,H.recalc())}}})}),r(Rt,[Ae,u],function(e,t){return e.extend({renderHtml:function(){var e=this;return e.classes.add("iframe"),e.canFocus=!1,''},src:function(e){this.getEl().src=e},html:function(e,n){var r=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=e,n&&n()):t.setTimeout(function(){r.html(e)}),this}})}),r(At,[Ae],function(e){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("infobox"),t.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this,t=e.classPrefix;return'
    '+e.encode(e.state.get("text"))+'
    '},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl("body").firstChild.data=e.encode(t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e.state.on("change:help",function(t){e.classes.toggle("has-help",t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r(Bt,[Ae,fe],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("label"),t.canFocus=!1,e.multiline&&t.classes.add("autoscroll"),e.strong&&t.classes.add("strong")},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){var r=t.getSize(e.getEl());r.width>n.maxW&&(n.minW=n.maxW,e.classes.add("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)}return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e=this,t,n,r=e.settings.forId;return!r&&(n=e.settings.forName)&&(t=e.getRoot().find("#"+n)[0],t&&(r=t._id)),r?'":''+e.encode(e.state.get("text"))+""},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.innerHtml(e.encode(t.value)),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r(Dt,[be],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.classes.add("toolbar")},postRender:function(){var e=this;return e.items().each(function(e){e.classes.add("toolbar-item")}),e._super()}})}),r(Mt,[Dt],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r(Lt,[ct,ve,Mt],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),e=t.settings,t.classes.add("menubtn"),e.fixedWidth&&t.classes.add("fixed-width"),t.aria("haspopup",!0),t.state.set("menu",e.menu||t.render())},showMenu:function(){var e=this,n;return e.menu&&e.menu.visible()?e.hideMenu():(e.menu||(n=e.state.get("menu")||[],n.length?n={type:"menu",items:n}:n.type=n.type||"menu",n.renderTo?e.menu=n.parent(e).show().renderTo():e.menu=t.create(n).parent(e).renderTo(),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control.parent()===e.menu&&(t.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()}),e.menu.on("show hide",function(t){t.control==e.menu&&e.activeMenu("show"==t.type),e.aria("expanded","show"==t.type)}).fire("show")),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),void e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]))},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix,i=e.settings.icon,o,a=e.state.get("text"),s="";return o=e.settings.image,o?(i="none","string"!=typeof o&&(o=window.getSelection?o[0]:o[1]),o=" style=\"background-image: url('"+o+"')\""):o="",a&&(e.classes.add("btn-has-text"),s=''+e.encode(a)+""),i=e.settings.icon?r+"ico "+r+"i-"+i:"",e.aria("role",e.parent()instanceof n?"menuitem":"button"),'
    '},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&r(t.target,e.getEl())&&(e.showMenu(),t.aria&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n=t.control,r=e.parent(),o;n&&r&&n instanceof i&&n.parent()==r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(o=!0),e.hideMenu())}),o&&(n.focus(),n.showMenu()))}),e._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return i}),r(Pt,[Ae,ve,h,u],function(e,t,n,r){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t=this,n;t._super(e),e=t.settings,t.classes.add("menu-item"),e.menu&&t.classes.add("menu-item-expand"),e.preview&&t.classes.add("menu-item-preview"),n=t.state.get("text"),"-"!==n&&"|"!==n||(t.classes.add("menu-item-sep"),t.aria("role","separator"),t.state.set("text","-")),e.selectable&&(t.aria("role","menuitemcheckbox"),t.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||t.classes.add("menu-item-normal"),t.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&t.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e=this,n=e.settings,r,i=e.parent();if(i.items().each(function(t){t!==e&&t.hideMenu()}),n.menu){r=e.menu,r?r.show():(r=n.menu,r.length?r={type:"menu",items:r}:r.type=r.type||"menu",i.settings.itemDefaults&&(r.itemDefaults=i.settings.itemDefaults),r=e.menu=t.create(r).parent(e).renderTo(),r.reflow(),r.on("cancel",function(t){t.stopPropagation(),e.focus(),r.hide()}),r.on("show hide",function(e){e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),r.on("hide",function(t){t.control===r&&e.classes.remove("selected")}),r.submenu=!0),r._parentMenu=i,r.classes.add("menu-sub");var o=r.testMoveRel(e.getEl(),e.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);r.moveRel(e.getEl(),o),r.rel=o,o="menu-sub-"+o,r.classes.remove(r._lastRel).add(o),r._lastRel=o,e.classes.add("selected"),e.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){function e(e){var t,r,i={};for(i=n.mac?{alt:"⌥",ctrl:"⌘",shift:"⇧",meta:"⌘"}:{meta:"Ctrl"},e=e.split("+"),t=0;t'+("-"!==a?'\xa0":"")+("-"!==a?''+a+"":"")+(c?'
    '+c+"
    ":"")+(i.menu?'
    ':"")+""},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var i=e.getEl("text");i&&i.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),r.requestAnimationFrame(function(){e.parent().hideAll()})))}),e._super(),e},hover:function(){var e=this;return e.parent().items().each(function(e){e.classes.remove("selected")}),e.classes.toggle("selected",!0),e},active:function(e){return"undefined"!=typeof e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r(Ht,[g,ge,u],function(e,t,n){return function(r,i){var o=this,a,s=t.classPrefix,l;o.show=function(t,c){function u(){a&&(e(r).append('
    '),c&&c())}return o.hide(),a=!0,t?l=n.setTimeout(u,t):u(),o},o.hide=function(){var e=r.lastChild;return n.clearTimeout(l),e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),a=!1,o}}}),r(Ot,[_e,Pt,Ht,m],function(e,t,n,r){return e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var n=e.items,i=n.length;i--;)n[i]=r.extend({},e.itemDefaults,n[i]);t._super(e),t.classes.add("menu")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},load:function(){function e(){t.throbber&&(t.throbber.hide(),t.throbber=null)}var t=this,r,i;i=t.settings.itemsFactory,i&&(t.throbber||(t.throbber=new n(t.getEl("body"),!0),0===t.items().length?(t.throbber.show(),t.fire("loading")):t.throbber.show(100,function(){t.items().remove(),t.fire("loading")}),t.on("hide close",e)),t.requestTime=r=(new Date).getTime(),t.settings.itemsFactory(function(n){return 0===n.length?void t.hide():void(t.requestTime===r&&(t.getEl().style.width="",t.getEl("body").style.width="",e(),t.items().remove(),t.getEl("body").innerHTML="",t.add(n),t.renderNew(),t.fire("loaded")))}))},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;return n.icon||n.image||n.selectable?(e._hasIcons=!0,!1):void 0}),e.settings.itemsFactory&&e.on("postrender",function(){e.settings.itemsFactory&&e.load()}),e._super()}})}),r(It,[Lt,Ot],function(e,t){return e.extend({init:function(e){function t(r){for(var a=0;a0&&(o=r[0].text,n.state.set("value",r[0].value)),n.state.set("menu",r)),n.state.set("text",e.text||o),n.classes.add("listbox"),n.on("select",function(t){var r=t.control;a&&(t.lastControl=a),e.multiple?r.active(!r.active()):n.value(t.control.value()),a=r})},bindStates:function(){function e(e,n){e instanceof t&&e.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}function n(e,t){var r;if(e)for(var i=0;i'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),r(Wt,[Ae],function(e){function t(e){var t="";if(e)for(var n=0;n'+e[n]+"";return t}return e.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var t=this;t._super(e),t.settings.size&&(t.size=t.settings.size),t.settings.options&&(t._options=t.settings.options),t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e=this,n,r="";return n=t(e._options),e.size&&(r=' size = "'+e.size+'"'),'"},bindStates:function(){var e=this;return e.state.on("change:options",function(n){e.getEl().innerHTML=t(n.value)}),e._super()}})}),r(Vt,[Ae,Ce,fe],function(e,t,n){function r(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}function i(e,t,n){e.setAttribute("aria-"+t,n)}function o(e,t){var r,o,a,s,l,c;"v"==e.settings.orientation?(s="top",a="height",o="h"):(s="left",a="width",o="w"),c=e.getEl("handle"),r=(e.layoutRect()[o]||100)-n.getSize(c)[a],l=r*((t-e._minValue)/(e._maxValue-e._minValue))+"px",c.style[s]=l,c.style.height=e.layoutRect().h+"px",i(c,"valuenow",t),i(c,"valuetext",""+e.settings.previewFilter(t)),i(c,"valuemin",e._minValue),i(c,"valuemax",e._maxValue)}return e.extend({init:function(e){var t=this;e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),t._super(e),t.classes.add("slider"),"v"==e.orientation&&t.classes.add("vertical"),t._minValue=e.minValue||0,t._maxValue=e.maxValue||100,t._initValue=t.state.get("value")},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'
    '},reset:function(){this.value(this._initValue).repaint()},postRender:function(){function e(e,t,n){return(n+e)/(t-e)}function i(e,t,n){return n*(t-e)-e}function o(t,n){function o(o){var a;a=s.value(),a=i(t,n,e(t,n,a)+.05*o),a=r(a,t,n),s.value(a),s.fire("dragstart",{value:a}),s.fire("drag",{value:a}),s.fire("dragend",{value:a})}s.on("keydown",function(e){switch(e.keyCode){case 37:case 38:o(-1);break;case 39:case 40:o(1)}})}function a(e,i,o){var a,l,c,p,m;s._dragHelper=new t(s._id,{handle:s._id+"-handle",start:function(e){a=e[u],l=parseInt(s.getEl("handle").style[d],10),c=(s.layoutRect()[h]||100)-n.getSize(o)[f],s.fire("dragstart",{value:m})},drag:function(t){var n=t[u]-a;p=r(l+n,0,c),o.style[d]=p+"px",m=e+p/c*(i-e),s.value(m),s.tooltip().text(""+s.settings.previewFilter(m)).show().moveRel(o,"bc tc"),s.fire("drag",{value:m})},stop:function(){s.tooltip().hide(),s.fire("dragend",{value:m})}})}var s=this,l,c,u,d,f,h;l=s._minValue,c=s._maxValue,"v"==s.settings.orientation?(u="screenY",d="top",f="height",h="h"):(u="screenX",d="left",f="width",h="w"),s._super(),o(l,c,s.getEl("handle")),a(l,c,s.getEl("handle"))},repaint:function(){this._super(),o(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){o(e,t.value)}),e._super()}})}),r(Ut,[Ae],function(e){return e.extend({renderHtml:function(){var e=this;return e.classes.add("spacer"),e.canFocus=!1,'
    '}})}),r($t,[Lt,fe,g],function(e,t,n){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e=this,r=e.getEl(),i=e.layoutRect(),o,a;return e._super(),o=r.firstChild,a=r.lastChild,n(o).css({width:i.w-t.getSize(a).width,height:i.h-2}),n(a).css({height:i.h-2}),e},activeMenu:function(e){var t=this;n(t.getEl().lastChild).toggleClass(t.classPrefix+"active",e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r,i=e.state.get("icon"),o=e.state.get("text"),a="";return r=e.settings.image,r?(i="none","string"!=typeof r&&(r=window.getSelection?r[0]:r[1]),r=" style=\"background-image: url('"+r+"')\""):r="",i=e.settings.icon?n+"ico "+n+"i-"+i:"",o&&(e.classes.add("btn-has-text"),a=''+e.encode(o)+""),'
    '},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void(t&&t.call(this,e));n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),r(qt,[St],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),r(jt,[we,g,fe],function(e,t,n){return e.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t(n).removeClass(this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,n=this.getEl("t"+e),n.setAttribute("aria-selected","true"),t(n).addClass(this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!=n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){var o=e._id+"-t"+i;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='"}),'
    '+n+'
    '+t.renderHtml(e)+"
    "},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e=this,t,r,i;r=n.getSize(e.getEl("head")).width,r=0>r?0:r,i=0,e.items().each(function(e){r=Math.max(r,e.layoutRect().minW),i=Math.max(i,e.layoutRect().minH)}),e.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=r,e.settings.h=i,e.layoutRect({x:0,y:0,w:r,h:i})});var o=n.getSize(e.getEl("head")).height;return e.settings.minWidth=r,e.settings.minHeight=i+o,t=e._super(),t.deltaH+=o,t.innerH=t.h-t.deltaH,t}})}),r(Yt,[Ae,m,fe],function(e,t,n){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("textbox"),e.multiline?t.classes.add("multiline"):(t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){t.state.set("value",e.target.value)}))},repaint:function(){var e=this,t,n,r,i,o=0,a;t=e.getEl().style,n=e._layoutRect,a=e._lastRepaintRect||{};var s=document;return!e.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(t.lineHeight=n.h-o+"px"),r=e.borderBox,i=r.left+r.right+8,o=r.top+r.bottom+(e.settings.multiline?8:0),n.x!==a.x&&(t.left=n.x+"px",a.x=n.x),n.y!==a.y&&(t.top=n.y+"px",a.y=n.y),n.w!==a.w&&(t.width=n.w-i+"px",a.w=n.w),n.h!==a.h&&(t.height=n.h-o+"px",a.h=n.h),e._lastRepaintRect=a,e.fire("repaint",{},!1),e},renderHtml:function(){var e=this,r=e.settings,i,o;return i={id:e._id,hidefocus:"1"},t.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(e){i[e]=r[e]}),e.disabled()&&(i.disabled="disabled"),r.subtype&&(i.type=r.subtype),o=n.create(r.multiline?"textarea":"input",i),o.value=e.state.get("value"),o.className=e.classes,o.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e.getEl().value=e.state.get("value"),e._super(),e.$el.on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!=t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}})}),r(Xt,[],function(){var e=this||window,t=function(){return e.tinymce};return"function"==typeof e.define&&(e.define.amd||e.define("ephox/tinymce",[],t)),{}}),a([l,c,u,d,f,h,m,g,v,y,C,w,N,E,T,A,B,D,M,L,P,H,I,F,j,Y,J,Q,re,ie,oe,ae,le,ue,de,me,ge,ve,ye,be,Ce,xe,we,Ne,Ee,_e,Se,ke,Te,Re,Ae,Be,De,Me,He,Ie,Ge,Je,Qe,Ze,tt,nt,rt,it,ot,at,st,lt,ct,ut,dt,ft,ht,pt,mt,gt,vt,yt,bt,Ct,xt,wt,Nt,Et,_t,St,kt,Tt,Rt,At,Bt,Dt,Mt,Lt,Pt,Ht,Ot,It,Ft,zt,Wt,Vt,Ut,$t,qt,jt,Yt])}(this); \ No newline at end of file diff --git a/plugins/editors/tinymce/tinymce.xml b/plugins/editors/tinymce/tinymce.xml index e7542bc01fb05..5729ea412ca3e 100644 --- a/plugins/editors/tinymce/tinymce.xml +++ b/plugins/editors/tinymce/tinymce.xml @@ -1,7 +1,7 @@ plg_editors_tinymce - 4.3.10 + 4.3.11 2005-2016 Ephox Corporation N/A From df9151d71ba67895ae88463180e9848218881c42 Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Tue, 10 May 2016 15:22:02 +0100 Subject: [PATCH 037/294] File copyright: 2015 to 2016 (#10387) * correct years * spaces in licence * one more --- media/editors/none/none.js | 4 ++-- media/system/js/subform-repeatable-uncompressed.js | 2 +- plugins/installer/folderinstaller/folderinstaller.php | 2 +- plugins/installer/packageinstaller/packageinstaller.php | 2 +- plugins/installer/urlinstaller/urlinstaller.php | 2 +- .../suites/libraries/cms/language/JLanguageMultilangTest.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/media/editors/none/none.js b/media/editors/none/none.js index e1a8969ab8f94..9bf81e481cb9e 100644 --- a/media/editors/none/none.js +++ b/media/editors/none/none.js @@ -1,6 +1,6 @@ /** - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE.txt + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ /** diff --git a/media/system/js/subform-repeatable-uncompressed.js b/media/system/js/subform-repeatable-uncompressed.js index 31df79a879b47..1442ddc63eeb7 100644 --- a/media/system/js/subform-repeatable-uncompressed.js +++ b/media/system/js/subform-repeatable-uncompressed.js @@ -1,5 +1,5 @@ /** - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/plugins/installer/folderinstaller/folderinstaller.php b/plugins/installer/folderinstaller/folderinstaller.php index 66f4adc50a24a..b5ed94c548033 100644 --- a/plugins/installer/folderinstaller/folderinstaller.php +++ b/plugins/installer/folderinstaller/folderinstaller.php @@ -3,7 +3,7 @@ * @package Joomla.Plugin * @subpackage Installer.FolderInstaller * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/plugins/installer/packageinstaller/packageinstaller.php b/plugins/installer/packageinstaller/packageinstaller.php index 9e24c528504c1..eb2dca29d3bb6 100644 --- a/plugins/installer/packageinstaller/packageinstaller.php +++ b/plugins/installer/packageinstaller/packageinstaller.php @@ -3,7 +3,7 @@ * @package Joomla.Plugin * @subpackage Installer.packageInstaller * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/plugins/installer/urlinstaller/urlinstaller.php b/plugins/installer/urlinstaller/urlinstaller.php index 39117966244c8..f7884ddd2f351 100644 --- a/plugins/installer/urlinstaller/urlinstaller.php +++ b/plugins/installer/urlinstaller/urlinstaller.php @@ -3,7 +3,7 @@ * @package Joomla.Plugin * @subpackage Installer.Urlinstaller * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/tests/unit/suites/libraries/cms/language/JLanguageMultilangTest.php b/tests/unit/suites/libraries/cms/language/JLanguageMultilangTest.php index 7390e47d067cb..bb0345832914f 100644 --- a/tests/unit/suites/libraries/cms/language/JLanguageMultilangTest.php +++ b/tests/unit/suites/libraries/cms/language/JLanguageMultilangTest.php @@ -3,7 +3,7 @@ * @package Joomla.UnitTest * @subpackage Language * - * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ From caab0bbd2380a0c64547c63008a79207e6552083 Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Tue, 10 May 2016 10:58:00 -0500 Subject: [PATCH 038/294] Set correct sendmail path (Fix #10032) (#10342) --- libraries/joomla/mail/mail.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/libraries/joomla/mail/mail.php b/libraries/joomla/mail/mail.php index cd80f790b2884..8d16d3a7a399e 100644 --- a/libraries/joomla/mail/mail.php +++ b/libraries/joomla/mail/mail.php @@ -557,6 +557,30 @@ public function isHtml($ishtml = true) return $this; } + /** + * Send messages using $Sendmail. + * + * This overrides the parent class to remove the restriction on the executable's name containing the word "sendmail" + * + * @return void + * + * @since 11.1 + */ + public function isSendmail() + { + // Prefer the Joomla configured sendmail path and default to the configured PHP path otherwise + $sendmail = JFactory::getConfig()->get('sendmail', ini_get('sendmail_path')); + + // And if we still don't have a path, then use the system default for Linux + if (empty($sendmail)) + { + $sendmail = '/usr/sbin/sendmail'; + } + + $this->Sendmail = $sendmail; + $this->Mailer = 'sendmail'; + } + /** * Use sendmail for sending the email * From 28323f98c5fff3f2734f4e2cc57514133af60b0c Mon Sep 17 00:00:00 2001 From: infograf768 Date: Tue, 10 May 2016 19:39:13 +0200 Subject: [PATCH 039/294] Correcting double escape in lang strings (#10389) --- .../components/com_admin/views/profile/tmpl/edit.php | 2 +- .../com_admin/views/sysinfo/tmpl/default.php | 10 +++++----- .../com_banners/views/banner/tmpl/edit.php | 6 +++--- .../com_banners/views/client/tmpl/edit.php | 4 ++-- .../com_categories/views/category/tmpl/edit.php | 8 ++++---- .../com_categories/views/category/tmpl/modal.php | 6 +++--- .../com_contact/views/contact/tmpl/edit.php | 8 ++++---- .../com_contact/views/contact/tmpl/edit_params.php | 2 +- .../com_contact/views/contact/tmpl/modal.php | 6 +++--- .../com_contact/views/contact/tmpl/modal_params.php | 2 +- .../com_content/views/article/tmpl/edit.php | 12 ++++++------ .../components/com_finder/views/filter/tmpl/edit.php | 4 ++-- .../com_installer/views/database/tmpl/default.php | 2 +- .../com_installer/views/install/tmpl/default.php | 2 +- .../com_languages/views/language/tmpl/edit.php | 6 +++--- .../components/com_menus/views/item/tmpl/edit.php | 6 +++--- .../components/com_menus/views/menu/tmpl/edit.php | 4 ++-- .../com_modules/views/module/tmpl/edit.php | 8 ++++---- .../com_newsfeeds/views/newsfeed/tmpl/edit.php | 10 +++++----- .../com_newsfeeds/views/newsfeed/tmpl/modal.php | 8 ++++---- .../com_plugins/views/plugin/tmpl/edit.php | 4 ++-- .../components/com_redirect/views/link/tmpl/edit.php | 2 +- .../components/com_tags/views/tag/tmpl/edit.php | 4 ++-- .../com_templates/views/style/tmpl/edit.php | 6 +++--- .../com_templates/views/template/tmpl/default.php | 6 +++--- .../com_templates/views/template/tmpl/readonly.php | 2 +- .../components/com_users/views/user/tmpl/edit.php | 8 ++++---- .../com_contact/views/contact/tmpl/default.php | 8 ++++---- .../com_contact/views/contact/tmpl/default_links.php | 2 +- .../installer/folderinstaller/folderinstaller.php | 2 +- .../installer/packageinstaller/packageinstaller.php | 2 +- plugins/installer/urlinstaller/urlinstaller.php | 2 +- 32 files changed, 82 insertions(+), 82 deletions(-) diff --git a/administrator/components/com_admin/views/profile/tmpl/edit.php b/administrator/components/com_admin/views/profile/tmpl/edit.php index 1e75bf73e83a2..151a366c143a0 100644 --- a/administrator/components/com_admin/views/profile/tmpl/edit.php +++ b/administrator/components/com_admin/views/profile/tmpl/edit.php @@ -34,7 +34,7 @@
    'account')); ?> - + form->getFieldset('user_details') as $field) : ?>
    label; ?>
    diff --git a/administrator/components/com_admin/views/sysinfo/tmpl/default.php b/administrator/components/com_admin/views/sysinfo/tmpl/default.php index 0cc9d6a344f20..301b38be75968 100644 --- a/administrator/components/com_admin/views/sysinfo/tmpl/default.php +++ b/administrator/components/com_admin/views/sysinfo/tmpl/default.php @@ -19,23 +19,23 @@
    'site')); ?> - + loadTemplate('system'); ?> - + loadTemplate('phpsettings'); ?> - + loadTemplate('config'); ?> - + loadTemplate('directory'); ?> - + loadTemplate('phpinfo'); ?> diff --git a/administrator/components/com_banners/views/banner/tmpl/edit.php b/administrator/components/com_banners/views/banner/tmpl/edit.php index 2a16281941ec4..9adae73d8ed00 100644 --- a/administrator/components/com_banners/views/banner/tmpl/edit.php +++ b/administrator/components/com_banners/views/banner/tmpl/edit.php @@ -53,7 +53,7 @@
    'details')); ?> - +
    form->getControlGroup('type'); ?> @@ -74,11 +74,11 @@
    - + form->getControlGroups('otherparams'); ?> - +
    diff --git a/administrator/components/com_banners/views/client/tmpl/edit.php b/administrator/components/com_banners/views/client/tmpl/edit.php index 172c0bc4cb68e..267cb45d17c14 100644 --- a/administrator/components/com_banners/views/client/tmpl/edit.php +++ b/administrator/components/com_banners/views/client/tmpl/edit.php @@ -31,7 +31,7 @@
    'general')); ?> - item->id) ? JText::_('COM_BANNERS_NEW_CLIENT', true) : JText::_('COM_BANNERS_EDIT_CLIENT', true)); ?> + item->id) ? JText::_('COM_BANNERS_NEW_CLIENT') : JText::_('COM_BANNERS_EDIT_CLIENT')); ?>
    - + form->getControlGroups('metadata'); ?> diff --git a/administrator/components/com_categories/views/category/tmpl/edit.php b/administrator/components/com_categories/views/category/tmpl/edit.php index 648e0c303860b..d57c7ab7fbc89 100644 --- a/administrator/components/com_categories/views/category/tmpl/edit.php +++ b/administrator/components/com_categories/views/category/tmpl/edit.php @@ -47,7 +47,7 @@
    'general')); ?> - +
    form->getLabel('description'); ?> @@ -59,7 +59,7 @@
    - +
    @@ -71,13 +71,13 @@ - + loadTemplate('associations'); ?> canDo->get('core.admin')) : ?> - + form->getInput('rules'); ?> diff --git a/administrator/components/com_categories/views/category/tmpl/modal.php b/administrator/components/com_categories/views/category/tmpl/modal.php index c56c4f0f626c1..376c817c05f73 100644 --- a/administrator/components/com_categories/views/category/tmpl/modal.php +++ b/administrator/components/com_categories/views/category/tmpl/modal.php @@ -59,7 +59,7 @@
    'general')); ?> - +
    form->getLabel('description'); ?> @@ -71,7 +71,7 @@
    - +
    @@ -87,7 +87,7 @@ canDo->get('core.admin')) : ?> - + form->getInput('rules'); ?> diff --git a/administrator/components/com_contact/views/contact/tmpl/edit.php b/administrator/components/com_contact/views/contact/tmpl/edit.php index 1d72371606ba8..75f020ca69ce1 100644 --- a/administrator/components/com_contact/views/contact/tmpl/edit.php +++ b/administrator/components/com_contact/views/contact/tmpl/edit.php @@ -40,7 +40,7 @@
    'details')); ?> - item->id) ? JText::_('COM_CONTACT_NEW_CONTACT', true) : JText::_('COM_CONTACT_EDIT_CONTACT', true)); ?> + item->id) ? JText::_('COM_CONTACT_NEW_CONTACT') : JText::_('COM_CONTACT_EDIT_CONTACT')); ?>
    @@ -72,7 +72,7 @@
    - +
    form->renderField('misc'); ?> @@ -80,7 +80,7 @@
    - +
    @@ -94,7 +94,7 @@ - + loadTemplate('associations'); ?> diff --git a/administrator/components/com_contact/views/contact/tmpl/edit_params.php b/administrator/components/com_contact/views/contact/tmpl/edit_params.php index 9f7d2cacca693..6cef8b8f8b3a7 100644 --- a/administrator/components/com_contact/views/contact/tmpl/edit_params.php +++ b/administrator/components/com_contact/views/contact/tmpl/edit_params.php @@ -12,7 +12,7 @@ $fieldSets = $this->form->getFieldsets('params'); foreach ($fieldSets as $name => $fieldSet) : $paramstabs = 'params-' . $name; - echo JHtml::_('bootstrap.addTab', 'myTab', $paramstabs, JText::_($fieldSet->label, true)); + echo JHtml::_('bootstrap.addTab', 'myTab', $paramstabs, JText::_($fieldSet->label)); if (isset($fieldSet->description) && trim($fieldSet->description)) : echo '

    ' . $this->escape(JText::_($fieldSet->description)) . '

    '; diff --git a/administrator/components/com_contact/views/contact/tmpl/modal.php b/administrator/components/com_contact/views/contact/tmpl/modal.php index 557bce135674a..5a6bdc6605934 100644 --- a/administrator/components/com_contact/views/contact/tmpl/modal.php +++ b/administrator/components/com_contact/views/contact/tmpl/modal.php @@ -59,7 +59,7 @@
    'details')); ?> - item->id) ? JText::_('COM_CONTACT_NEW_CONTACT', true) : JText::_('COM_CONTACT_EDIT_CONTACT', true)); ?> + item->id) ? JText::_('COM_CONTACT_NEW_CONTACT') : JText::_('COM_CONTACT_EDIT_CONTACT')); ?>
    @@ -91,7 +91,7 @@
    - +
    form->renderField('misc'); ?> @@ -99,7 +99,7 @@
    - +
    diff --git a/administrator/components/com_contact/views/contact/tmpl/modal_params.php b/administrator/components/com_contact/views/contact/tmpl/modal_params.php index 9f7d2cacca693..6cef8b8f8b3a7 100644 --- a/administrator/components/com_contact/views/contact/tmpl/modal_params.php +++ b/administrator/components/com_contact/views/contact/tmpl/modal_params.php @@ -12,7 +12,7 @@ $fieldSets = $this->form->getFieldsets('params'); foreach ($fieldSets as $name => $fieldSet) : $paramstabs = 'params-' . $name; - echo JHtml::_('bootstrap.addTab', 'myTab', $paramstabs, JText::_($fieldSet->label, true)); + echo JHtml::_('bootstrap.addTab', 'myTab', $paramstabs, JText::_($fieldSet->label)); if (isset($fieldSet->description) && trim($fieldSet->description)) : echo '

    ' . $this->escape(JText::_($fieldSet->description)) . '

    '; diff --git a/administrator/components/com_content/views/article/tmpl/edit.php b/administrator/components/com_content/views/article/tmpl/edit.php index 13bc098b7db82..e010e0938bac1 100644 --- a/administrator/components/com_content/views/article/tmpl/edit.php +++ b/administrator/components/com_content/views/article/tmpl/edit.php @@ -81,7 +81,7 @@
    'general')); ?> - +
    @@ -96,7 +96,7 @@ show_publishing_options == 1) : ?> - +
    @@ -110,7 +110,7 @@ show_urls_images_backend == 1) : ?> - +
    form->getControlGroup('images'); ?> @@ -128,7 +128,7 @@ get('layout') != 'modal') : ?> - + loadTemplate('associations'); ?> @@ -137,13 +137,13 @@ canDo->get('core.admin')) : ?> - + form->renderFieldset('editorConfig'); ?> canDo->get('core.admin')) : ?> - + form->getInput('rules'); ?> diff --git a/administrator/components/com_finder/views/filter/tmpl/edit.php b/administrator/components/com_finder/views/filter/tmpl/edit.php index 779ca5839704b..81ae0ae53594b 100644 --- a/administrator/components/com_finder/views/filter/tmpl/edit.php +++ b/administrator/components/com_finder/views/filter/tmpl/edit.php @@ -65,7 +65,7 @@
    'details')); ?> - +
    total > 0) : ?> @@ -87,7 +87,7 @@
    - +
    diff --git a/administrator/components/com_installer/views/database/tmpl/default.php b/administrator/components/com_installer/views/database/tmpl/default.php index ce099998fe460..71f16004412f9 100644 --- a/administrator/components/com_installer/views/database/tmpl/default.php +++ b/administrator/components/com_installer/views/database/tmpl/default.php @@ -63,7 +63,7 @@ - +
      diff --git a/administrator/components/com_installer/views/install/tmpl/default.php b/administrator/components/com_installer/views/install/tmpl/default.php index 291bd93a1f4bb..2c75fa41481fb 100644 --- a/administrator/components/com_installer/views/install/tmpl/default.php +++ b/administrator/components/com_installer/views/install/tmpl/default.php @@ -134,7 +134,7 @@ ftp) : ?> - + loadTemplate('ftp'); ?> diff --git a/administrator/components/com_languages/views/language/tmpl/edit.php b/administrator/components/com_languages/views/language/tmpl/edit.php index 68a578764777f..4c8e4f2a98581 100644 --- a/administrator/components/com_languages/views/language/tmpl/edit.php +++ b/administrator/components/com_languages/views/language/tmpl/edit.php @@ -47,7 +47,7 @@
      'details')); ?> - + form->renderField('title'); ?> form->renderField('title_native'); ?> form->renderField('lang_code'); ?> @@ -72,11 +72,11 @@ form->renderField('lang_id'); ?> - + form->renderFieldset('metadata'); ?> - + form->renderFieldset('site_name'); ?> diff --git a/administrator/components/com_menus/views/item/tmpl/edit.php b/administrator/components/com_menus/views/item/tmpl/edit.php index d475e0e0c4ec0..fe0df318d2d76 100644 --- a/administrator/components/com_menus/views/item/tmpl/edit.php +++ b/administrator/components/com_menus/views/item/tmpl/edit.php @@ -88,7 +88,7 @@ 'details')); ?> - +
      item->type !== 'alias' && $this->item->type !== 'url' && $this->item->type !== 'separator' && $this->item->type !== 'heading') : ?> - + loadTemplate('associations'); ?> modules)) : ?> - + loadTemplate('modules'); ?> diff --git a/administrator/components/com_menus/views/menu/tmpl/edit.php b/administrator/components/com_menus/views/menu/tmpl/edit.php index a07b7064a46e5..8c2993f3a1da9 100644 --- a/administrator/components/com_menus/views/menu/tmpl/edit.php +++ b/administrator/components/com_menus/views/menu/tmpl/edit.php @@ -34,7 +34,7 @@
      'details')); ?> - +
      form->getLabel('title'); ?> @@ -62,7 +62,7 @@ canDo->get('core.admin')) : ?> - + form->getInput('rules'); ?> diff --git a/administrator/components/com_modules/views/module/tmpl/edit.php b/administrator/components/com_modules/views/module/tmpl/edit.php index dd176a788f0c4..e39011fe7297a 100644 --- a/administrator/components/com_modules/views/module/tmpl/edit.php +++ b/administrator/components/com_modules/views/module/tmpl/edit.php @@ -151,7 +151,7 @@
      'general')); ?> - +
      @@ -244,19 +244,19 @@ - + item->client_id == 0) : ?> - + loadTemplate('assignment'); ?> canDo->get('core.admin')) : ?> - + form->getInput('rules'); ?> diff --git a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php index be8755566f4cb..2293ac8a49088 100644 --- a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php +++ b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php @@ -40,7 +40,7 @@
      'details')); ?> - item->id) ? JText::_('COM_NEWSFEEDS_NEW_NEWSFEED', true) : JText::_('COM_NEWSFEEDS_EDIT_NEWSFEED', true)); ?> + item->id) ? JText::_('COM_NEWSFEEDS_NEW_NEWSFEED') : JText::_('COM_NEWSFEEDS_EDIT_NEWSFEED')); ?>
      @@ -54,7 +54,7 @@
      - +
      form->getControlGroup('images'); ?> @@ -65,7 +65,7 @@
      - +
      @@ -77,7 +77,7 @@ - + loadTemplate('display'); ?> @@ -85,7 +85,7 @@ - + loadTemplate('associations'); ?> diff --git a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/modal.php b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/modal.php index 5760f03748641..7eb6fbfd3593a 100644 --- a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/modal.php +++ b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/modal.php @@ -55,7 +55,7 @@
      'details')); ?> - item->id) ? JText::_('COM_NEWSFEEDS_NEW_NEWSFEED', true) : JText::_('COM_NEWSFEEDS_EDIT_NEWSFEED', true)); ?> + item->id) ? JText::_('COM_NEWSFEEDS_NEW_NEWSFEED') : JText::_('COM_NEWSFEEDS_EDIT_NEWSFEED')); ?>
      @@ -69,7 +69,7 @@
      - +
      form->getControlGroup('images'); ?> @@ -80,7 +80,7 @@
      - +
      @@ -91,7 +91,7 @@
      - + loadTemplate('display'); ?> diff --git a/administrator/components/com_plugins/views/plugin/tmpl/edit.php b/administrator/components/com_plugins/views/plugin/tmpl/edit.php index f74ca0bb6de5b..91e612b5fc18b 100644 --- a/administrator/components/com_plugins/views/plugin/tmpl/edit.php +++ b/administrator/components/com_plugins/views/plugin/tmpl/edit.php @@ -30,7 +30,7 @@ 'general')); ?> - +
      @@ -125,7 +125,7 @@ - + diff --git a/administrator/components/com_redirect/views/link/tmpl/edit.php b/administrator/components/com_redirect/views/link/tmpl/edit.php index 5b0a79b043bcc..070d0e6aac820 100644 --- a/administrator/components/com_redirect/views/link/tmpl/edit.php +++ b/administrator/components/com_redirect/views/link/tmpl/edit.php @@ -31,7 +31,7 @@
      'basic')); ?> - item->id) ? JText::_('COM_REDIRECT_NEW_LINK', true) : JText::sprintf('COM_REDIRECT_EDIT_LINK', $this->item->id, array('jsSafe' => true))); ?> + item->id) ? JText::_('COM_REDIRECT_NEW_LINK') : JText::sprintf('COM_REDIRECT_EDIT_LINK', $this->item->id))); ?> form->renderField('old_url'); ?> form->renderField('new_url'); ?> form->renderField('published'); ?> diff --git a/administrator/components/com_tags/views/tag/tmpl/edit.php b/administrator/components/com_tags/views/tag/tmpl/edit.php index 71dc264fa9e1d..b6379950b6629 100644 --- a/administrator/components/com_tags/views/tag/tmpl/edit.php +++ b/administrator/components/com_tags/views/tag/tmpl/edit.php @@ -34,7 +34,7 @@
      'details')); ?> - +
      @@ -47,7 +47,7 @@
      - +
      diff --git a/administrator/components/com_templates/views/style/tmpl/edit.php b/administrator/components/com_templates/views/style/tmpl/edit.php index c2ac6025b8585..d7a965e266ec2 100644 --- a/administrator/components/com_templates/views/style/tmpl/edit.php +++ b/administrator/components/com_templates/views/style/tmpl/edit.php @@ -33,7 +33,7 @@
      'details')); ?> - +
      @@ -80,7 +80,7 @@ - + @@ -92,7 +92,7 @@ ?> authorise('core.edit', 'com_menu') && $this->item->client_id == 0 && $this->canDo->get('core.edit.state')) : ?> - + loadTemplate('assignment'); ?> diff --git a/administrator/components/com_templates/views/template/tmpl/default.php b/administrator/components/com_templates/views/template/tmpl/default.php index 27540dedbd65f..4e7d98c7b72a4 100644 --- a/administrator/components/com_templates/views/template/tmpl/default.php +++ b/administrator/components/com_templates/views/template/tmpl/default.php @@ -167,7 +167,7 @@ function clearCoords() } ?> 'editor')); ?> - +
      type == 'file'): ?> @@ -305,7 +305,7 @@ function clearCoords()
      - +
      @@ -370,7 +370,7 @@ function clearCoords()
      - + loadTemplate('description');?> diff --git a/administrator/components/com_templates/views/template/tmpl/readonly.php b/administrator/components/com_templates/views/template/tmpl/readonly.php index 7ac3b758e469f..a7bc08e1e50ab 100644 --- a/administrator/components/com_templates/views/template/tmpl/readonly.php +++ b/administrator/components/com_templates/views/template/tmpl/readonly.php @@ -18,7 +18,7 @@ ?> 'description')); ?> - + loadTemplate('description');?> diff --git a/administrator/components/com_users/views/user/tmpl/edit.php b/administrator/components/com_users/views/user/tmpl/edit.php index 68f35cd837762..62514b7fceb4f 100644 --- a/administrator/components/com_users/views/user/tmpl/edit.php +++ b/administrator/components/com_users/views/user/tmpl/edit.php @@ -52,7 +52,7 @@
      'details')); ?> - + form->getFieldset('user_details') as $field) : ?>
      @@ -69,7 +69,7 @@ grouplist) : ?> - + loadTemplate('groups'); ?> @@ -80,7 +80,7 @@ continue; endif; ?> - name, JText::_($fieldset->label, true)); ?> + name, JText::_($fieldset->label)); ?> form->getFieldset($fieldset->name) as $field) : ?> hidden) : ?>
      @@ -103,7 +103,7 @@ tfaform) && $this->item->id): ?> - +
    '; $htmlCallStack .= ''; $htmlCallStack .= ''; $htmlCallStack .= ''; $count--; } + $htmlCallStack .= ''; $htmlCallStack .= '
    "+o+"
    "+o+"
    ' . '' . - JText::_('PLG_DEBUG_WARNING_NO_INDEX') . '' . ''; + $html[] = '' . '' + . JText::_('PLG_DEBUG_WARNING_NO_INDEX') . '' . ''; $hasWarnings = true; } else @@ -1313,9 +1313,9 @@ protected function tableToHtml($table, &$hasWarnings) // Displays warnings for "Using filesort": $htmlTdWithWarnings = str_replace( 'Using filesort', - '' . - JText::_('PLG_DEBUG_WARNING_USING_FILESORT') . '', + '' + . JText::_('PLG_DEBUG_WARNING_USING_FILESORT') . '', $htmlTd ); @@ -1750,6 +1750,7 @@ protected function displayLogs() // SQL log entries $showExecutedSQL = $this->params->get('log-executed-sql', 0); + if (!$showExecutedSQL) { $logEntriesDatabasequery = count( @@ -1773,6 +1774,7 @@ protected function displayLogs() ) ); $showDeprecated = $this->params->get('log-deprecated', 0); + if (!$showDeprecated) { $logEntriesTotal = $logEntriesTotal - $logEntriesDeprecated; @@ -1794,6 +1796,7 @@ protected function displayLogs() $out .= '
      '; $count = 1; + foreach ($this->logEntries as $entry) { // Don't show database queries if not selected. @@ -1826,9 +1829,11 @@ protected function displayLogs() $out .= JHtml::_('bootstrap.endSlide'); $out .= JHtml::_('bootstrap.endAccordion'); } + $out .= '
      '; $count++; } + $out .= '
    '; return $out; @@ -1875,6 +1880,7 @@ protected function renderCallStack(array $callStack = array()) $htmlCallStack .= '
    ' . $count . ''; + if (isset($call['class'])) { // If entry has Class/Method print it. @@ -1893,6 +1899,7 @@ protected function renderCallStack(array $callStack = array()) $htmlCallStack .= htmlspecialchars($call['function']) . '()'; } } + $htmlCallStack .= ''; @@ -1907,11 +1914,13 @@ protected function renderCallStack(array $callStack = array()) { $htmlCallStack .= $this->formatLink(htmlspecialchars($call['file']), htmlspecialchars($call['line'])); } + $htmlCallStack .= '
    '; $htmlCallStack .= ''; diff --git a/plugins/system/debug/debug.xml b/plugins/system/debug/debug.xml index eaf94acbad685..43775ae9d31ff 100644 --- a/plugins/system/debug/debug.xml +++ b/plugins/system/debug/debug.xml @@ -19,67 +19,83 @@
    - - + > - + > - + > - + > - + > - + multiple="true" + default="all" + > @@ -91,67 +107,87 @@ - - + default="0" + class="btn-group btn-group-yesno" + >
    -
    +
    - + > - + > - + > - + > - @@ -163,35 +199,42 @@ />
    -
    - - + + > - + > - - + > From dad5b375c112291b5544a073b3733b8ee7f14e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:43:56 +0200 Subject: [PATCH 088/294] [plg_system_cache]Code style (#10496) --- plugins/system/cache/cache.php | 2 +- plugins/system/cache/cache.xml | 67 +++++++++++++++++++--------------- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/plugins/system/cache/cache.php b/plugins/system/cache/cache.php index 590c618b16a2b..4ed4990167ae5 100644 --- a/plugins/system/cache/cache.php +++ b/plugins/system/cache/cache.php @@ -134,7 +134,7 @@ protected function isExcluded() { // Get the current menu item $active = JFactory::getApplication()->getMenu()->getActive(); - + if ($active && $active->id && in_array($active->id, (array) $exclusions)) { return true; diff --git a/plugins/system/cache/cache.xml b/plugins/system/cache/cache.xml index 11128587b6a23..360148968c7be 100644 --- a/plugins/system/cache/cache.xml +++ b/plugins/system/cache/cache.xml @@ -17,34 +17,43 @@ en-GB.plg_system_cache.sys.ini - -
    - - - - - -
    -
    - -
    -
    + +
    + + + + + + + +
    +
    + + +
    +
    From e87829e9f96c095a9df982cc0677fd056f4d4591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:44:28 +0200 Subject: [PATCH 089/294] [plg_search_tags]Code style (#10495) * [plg_search_tags]Code style * more cs * cs --- plugins/search/tags/tags.php | 35 ++++++++++++++++++----------------- plugins/search/tags/tags.xml | 18 ++++++++++++------ 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/plugins/search/tags/tags.php b/plugins/search/tags/tags.php index 9853ff5542f8b..72ba1451de343 100644 --- a/plugins/search/tags/tags.php +++ b/plugins/search/tags/tags.php @@ -57,14 +57,14 @@ public function onContentSearchAreas() */ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) { - $db = JFactory::getDbo(); + $db = JFactory::getDbo(); $query = $db->getQuery(true); - $app = JFactory::getApplication(); - $user = JFactory::getUser(); - $lang = JFactory::getLanguage(); + $app = JFactory::getApplication(); + $user = JFactory::getUser(); + $lang = JFactory::getLanguage(); $section = JText::_('PLG_SEARCH_TAGS_TAGS'); - $limit = $this->params->def('search_limit', 50); + $limit = $this->params->def('search_limit', 50); if (is_array($areas)) { @@ -102,15 +102,15 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu $order = 'a.title DESC'; } - $query->select('a.id, a.title, a.alias, a.note, a.published, a.access' . - ', a.checked_out, a.checked_out_time, a.created_user_id' . - ', a.path, a.parent_id, a.level, a.lft, a.rgt' . - ', a.language, a.created_time AS created, a.description'); + $query->select('a.id, a.title, a.alias, a.note, a.published, a.access' + . ', a.checked_out, a.checked_out_time, a.created_user_id' + . ', a.path, a.parent_id, a.level, a.lft, a.rgt' + . ', a.language, a.created_time AS created, a.description'); - $case_when_item_alias = ' CASE WHEN '; + $case_when_item_alias = ' CASE WHEN '; $case_when_item_alias .= $query->charLength('a.alias', '!=', '0'); $case_when_item_alias .= ' THEN '; - $a_id = $query->castAsChar('a.id'); + $a_id = $query->castAsChar('a.id'); $case_when_item_alias .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when_item_alias .= ' ELSE '; $case_when_item_alias .= $a_id . ' END as slug'; @@ -136,6 +136,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu $query->order($order); $db->setQuery($query, 0, $limit); + try { $rows = $db->loadObjectList(); @@ -154,7 +155,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu { $rows[$key]->href = TagsHelperRoute::getTagRoute($row->id); $rows[$key]->text = ($row->description != "" ? $row->description : $row->title); - $rows[$key]->text .= $row->note; + $rows[$key]->text .= $row->note; $rows[$key]->section = $section; $rows[$key]->created = $row->created; $rows[$key]->browsernav = 0; @@ -191,10 +192,10 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu $type = implode('_', $parts); $type = $comp . '_CONTENT_TYPE_' . $type; - $new_item = new stdClass; - $new_item->href = $item->link; + $new_item = new stdClass; + $new_item->href = $item->link; $new_item->title = $item->core_title; - $new_item->text = $item->core_body; + $new_item->text = $item->core_body; if ($lang->hasKey($type)) { @@ -205,9 +206,9 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu $new_item->section = JText::sprintf('PLG_SEARCH_TAGS_ITEM_TAGGED_WITH', $item->content_type_title, $row->title); } - $new_item->created = $item->displayDate; + $new_item->created = $item->displayDate; $new_item->browsernav = 0; - $final_items[] = $new_item; + $final_items[] = $new_item; } } } diff --git a/plugins/search/tags/tags.xml b/plugins/search/tags/tags.xml index ad57b875951ca..19dfef9b5d8d8 100644 --- a/plugins/search/tags/tags.xml +++ b/plugins/search/tags/tags.xml @@ -19,17 +19,23 @@
    - - + > From 5d585d9d618718b92e674360b7092f523a7ffda4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:45:17 +0200 Subject: [PATCH 090/294] [plg_search_newsfeeds]Code style (#10494) * [plg_search_content]Code style * [plg_search_newsfeeds]Code style * Revert "[plg_search_content]Code style" This reverts commit 41f564c8f944ff2bad36d0ef690b528ec47a8440. * remove blank line --- plugins/search/newsfeeds/newsfeeds.php | 9 ++++---- plugins/search/newsfeeds/newsfeeds.xml | 29 +++++++++++++++----------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/plugins/search/newsfeeds/newsfeeds.php b/plugins/search/newsfeeds/newsfeeds.php index faf3c3663dbd5..320e3024d41fe 100644 --- a/plugins/search/newsfeeds/newsfeeds.php +++ b/plugins/search/newsfeeds/newsfeeds.php @@ -148,18 +148,18 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu $query = $db->getQuery(true); // SQLSRV changes. - $case_when = ' CASE WHEN '; + $case_when = ' CASE WHEN '; $case_when .= $query->charLength('a.alias', '!=', '0'); $case_when .= ' THEN '; - $a_id = $query->castAsChar('a.id'); + $a_id = $query->castAsChar('a.id'); $case_when .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when .= ' ELSE '; $case_when .= $a_id . ' END as slug'; - $case_when1 = ' CASE WHEN '; + $case_when1 = ' CASE WHEN '; $case_when1 .= $query->charLength('c.alias', '!=', '0'); $case_when1 .= ' THEN '; - $c_id = $query->castAsChar('c.id'); + $c_id = $query->castAsChar('c.id'); $case_when1 .= $query->concatenate(array($c_id, 'c.alias'), ':'); $case_when1 .= ' ELSE '; $case_when1 .= $c_id . ' END as catslug'; @@ -181,6 +181,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu } $db->setQuery($query, 0, $limit); + try { $rows = $db->loadObjectList(); diff --git a/plugins/search/newsfeeds/newsfeeds.xml b/plugins/search/newsfeeds/newsfeeds.xml index e965bb1622a32..0aec5fc161792 100644 --- a/plugins/search/newsfeeds/newsfeeds.xml +++ b/plugins/search/newsfeeds/newsfeeds.xml @@ -19,34 +19,39 @@
    - - + > - + >
    -
    From ed4cfdda65894d13f186966f1e60bb35250a1941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:46:06 +0200 Subject: [PATCH 091/294] [plg_search_content]Code style (#10493) --- plugins/search/content/content.php | 46 ++++++++++++++++-------------- plugins/search/content/content.xml | 28 +++++++++++------- 2 files changed, 41 insertions(+), 33 deletions(-) diff --git a/plugins/search/content/content.php b/plugins/search/content/content.php index 17b71555c94a2..a4b39fe579ea5 100644 --- a/plugins/search/content/content.php +++ b/plugins/search/content/content.php @@ -48,11 +48,11 @@ public function onContentSearchAreas() */ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) { - $db = JFactory::getDbo(); - $app = JFactory::getApplication(); - $user = JFactory::getUser(); + $db = JFactory::getDbo(); + $app = JFactory::getApplication(); + $user = JFactory::getUser(); $groups = implode(',', $user->getAuthorisedViewLevels()); - $tag = JFactory::getLanguage()->getTag(); + $tag = JFactory::getLanguage()->getTag(); require_once JPATH_SITE . '/components/com_content/helpers/route.php'; require_once JPATH_ADMINISTRATOR . '/components/com_search/helpers/search.php'; @@ -67,13 +67,13 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu } } - $sContent = $this->params->get('search_content', 1); + $sContent = $this->params->get('search_content', 1); $sArchived = $this->params->get('search_archived', 1); - $limit = $this->params->def('search_limit', 50); + $limit = $this->params->def('search_limit', 50); - $nullDate = $db->getNullDate(); - $date = JFactory::getDate(); - $now = $date->toSql(); + $nullDate = $db->getNullDate(); + $date = JFactory::getDate(); + $now = $date->toSql(); $text = trim($text); @@ -85,14 +85,14 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu switch ($phrase) { case 'exact': - $text = $db->quote('%' . $db->escape($text, true) . '%', false); - $wheres2 = array(); + $text = $db->quote('%' . $db->escape($text, true) . '%', false); + $wheres2 = array(); $wheres2[] = 'a.title LIKE ' . $text; $wheres2[] = 'a.introtext LIKE ' . $text; $wheres2[] = 'a.fulltext LIKE ' . $text; $wheres2[] = 'a.metakey LIKE ' . $text; $wheres2[] = 'a.metadesc LIKE ' . $text; - $where = '(' . implode(') OR (', $wheres2) . ')'; + $where = '(' . implode(') OR (', $wheres2) . ')'; break; case 'all': @@ -103,14 +103,14 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu foreach ($words as $word) { - $word = $db->quote('%' . $db->escape($word, true) . '%', false); - $wheres2 = array(); + $word = $db->quote('%' . $db->escape($word, true) . '%', false); + $wheres2 = array(); $wheres2[] = 'LOWER(a.title) LIKE LOWER(' . $word . ')'; $wheres2[] = 'LOWER(a.introtext) LIKE LOWER(' . $word . ')'; $wheres2[] = 'LOWER(a.fulltext) LIKE LOWER(' . $word . ')'; $wheres2[] = 'LOWER(a.metakey) LIKE LOWER(' . $word . ')'; $wheres2[] = 'LOWER(a.metadesc) LIKE LOWER(' . $word . ')'; - $wheres[] = implode(' OR ', $wheres2); + $wheres[] = implode(' OR ', $wheres2); } $where = '(' . implode(($phrase == 'all' ? ') AND (' : ') OR ('), $wheres) . ')'; @@ -150,15 +150,15 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu $query->clear(); // SQLSRV changes. - $case_when = ' CASE WHEN '; + $case_when = ' CASE WHEN '; $case_when .= $query->charLength('a.alias', '!=', '0'); $case_when .= ' THEN '; - $a_id = $query->castAsChar('a.id'); + $a_id = $query->castAsChar('a.id'); $case_when .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when .= ' ELSE '; $case_when .= $a_id . ' END as slug'; - $case_when1 = ' CASE WHEN '; + $case_when1 = ' CASE WHEN '; $case_when1 .= $query->charLength('c.alias', '!=', '0'); $case_when1 .= ' THEN '; $c_id = $query->castAsChar('c.id'); @@ -189,6 +189,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu } $db->setQuery($query, 0, $limit); + try { $list = $db->loadObjectList(); @@ -217,15 +218,15 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu $query->clear(); // SQLSRV changes. - $case_when = ' CASE WHEN '; + $case_when = ' CASE WHEN '; $case_when .= $query->charLength('a.alias', '!=', '0'); $case_when .= ' THEN '; - $a_id = $query->castAsChar('a.id'); + $a_id = $query->castAsChar('a.id'); $case_when .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when .= ' ELSE '; $case_when .= $a_id . ' END as slug'; - $case_when1 = ' CASE WHEN '; + $case_when1 = ' CASE WHEN '; $case_when1 .= $query->charLength('c.alias', '!=', '0'); $case_when1 .= ' THEN '; $c_id = $query->castAsChar('c.id'); @@ -259,6 +260,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu } $db->setQuery($query, 0, $limit); + try { $list3 = $db->loadObjectList(); @@ -280,7 +282,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu $date = JFactory::getDate($item->created); $created_month = $date->format("n"); - $created_year = $date->format("Y"); + $created_year = $date->format("Y"); $list3[$key]->href = JRoute::_('index.php?option=com_content&view=archive&year=' . $created_year . '&month=' . $created_month . $itemid); } diff --git a/plugins/search/content/content.xml b/plugins/search/content/content.xml index 5c00c501b7d72..afd43352b6ed2 100644 --- a/plugins/search/content/content.xml +++ b/plugins/search/content/content.xml @@ -19,29 +19,35 @@
    - - + > - + > From c7bb93051a3048e226d686fa32eb69e25a10b666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:46:40 +0200 Subject: [PATCH 092/294] [plg_search_contacts]Code style (#10492) --- plugins/search/contacts/contacts.php | 22 +++++++++++----------- plugins/search/contacts/contacts.xml | 28 +++++++++++++++++----------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/plugins/search/contacts/contacts.php b/plugins/search/contacts/contacts.php index 2efb629eb2573..b908c8c7b2de0 100644 --- a/plugins/search/contacts/contacts.php +++ b/plugins/search/contacts/contacts.php @@ -59,9 +59,9 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu { require_once JPATH_SITE . '/components/com_contact/helpers/route.php'; - $db = JFactory::getDbo(); - $app = JFactory::getApplication(); - $user = JFactory::getUser(); + $db = JFactory::getDbo(); + $app = JFactory::getApplication(); + $user = JFactory::getUser(); $groups = implode(',', $user->getAuthorisedViewLevels()); if (is_array($areas)) @@ -72,10 +72,10 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu } } - $sContent = $this->params->get('search_content', 1); + $sContent = $this->params->get('search_content', 1); $sArchived = $this->params->get('search_archived', 1); - $limit = $this->params->def('search_limit', 50); - $state = array(); + $limit = $this->params->def('search_limit', 50); + $state = array(); if ($sContent) { @@ -123,7 +123,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu $query = $db->getQuery(true); // SQLSRV changes. - $case_when = ' CASE WHEN '; + $case_when = ' CASE WHEN '; $case_when .= $query->charLength('a.alias', '!=', '0'); $case_when .= ' THEN '; $a_id = $query->castAsChar('a.id'); @@ -131,10 +131,10 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu $case_when .= ' ELSE '; $case_when .= $a_id . ' END as slug'; - $case_when1 = ' CASE WHEN '; + $case_when1 = ' CASE WHEN '; $case_when1 .= $query->charLength('c.alias', '!=', '0'); $case_when1 .= ' THEN '; - $c_id = $query->castAsChar('c.id'); + $c_id = $query->castAsChar('c.id'); $case_when1 .= $query->concatenate(array($c_id, 'c.alias'), ':'); $case_when1 .= ' ELSE '; $case_when1 .= $c_id . ' END as catslug'; @@ -181,8 +181,8 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu { foreach ($rows as $key => $row) { - $rows[$key]->href = ContactHelperRoute::getContactRoute($row->slug, $row->catslug); - $rows[$key]->text = $row->title; + $rows[$key]->href = ContactHelperRoute::getContactRoute($row->slug, $row->catslug); + $rows[$key]->text = $row->title; $rows[$key]->text .= ($row->con_position) ? ', ' . $row->con_position : ''; $rows[$key]->text .= ($row->misc) ? ', ' . $row->misc : ''; } diff --git a/plugins/search/contacts/contacts.xml b/plugins/search/contacts/contacts.xml index 8fd0f41861172..32714c6bd4f2b 100644 --- a/plugins/search/contacts/contacts.xml +++ b/plugins/search/contacts/contacts.xml @@ -19,29 +19,35 @@
    - - + > - + > From 53f52da2b3cb601fc4bebe44a0f25da06b09d29b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:47:15 +0200 Subject: [PATCH 093/294] [plg_search_categories]Code style (#10491) --- plugins/search/categories/categories.php | 1 + plugins/search/categories/categories.xml | 28 ++++++++++++++---------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/plugins/search/categories/categories.php b/plugins/search/categories/categories.php index 50ad3e6ffea84..7e26588ae18e5 100644 --- a/plugins/search/categories/categories.php +++ b/plugins/search/categories/categories.php @@ -169,6 +169,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu } $db->setQuery($query, 0, $limit); + try { $rows = $db->loadObjectList(); diff --git a/plugins/search/categories/categories.xml b/plugins/search/categories/categories.xml index bbd04ab802c97..876ceee31b10a 100644 --- a/plugins/search/categories/categories.xml +++ b/plugins/search/categories/categories.xml @@ -20,29 +20,35 @@
    - - + > - + > From f3e107b3dddcee8f7f3f5e76b4032346113bd275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:47:38 +0200 Subject: [PATCH 094/294] [plg_quickicon_joomlaupdate]XML code style (#10490) --- plugins/quickicon/joomlaupdate/joomlaupdate.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/quickicon/joomlaupdate/joomlaupdate.xml b/plugins/quickicon/joomlaupdate/joomlaupdate.xml index c0db84f4e0a44..f54967e54d7ee 100644 --- a/plugins/quickicon/joomlaupdate/joomlaupdate.xml +++ b/plugins/quickicon/joomlaupdate/joomlaupdate.xml @@ -19,11 +19,12 @@
    -
    From 7f02578f4daf39cc27df00c75253d234fdcbfa3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:48:11 +0200 Subject: [PATCH 095/294] [plg_quickicon_extensionupdate]XML code style (#10489) --- plugins/quickicon/extensionupdate/extensionupdate.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/quickicon/extensionupdate/extensionupdate.xml b/plugins/quickicon/extensionupdate/extensionupdate.xml index 1636387db9246..06c0c34908edc 100644 --- a/plugins/quickicon/extensionupdate/extensionupdate.xml +++ b/plugins/quickicon/extensionupdate/extensionupdate.xml @@ -21,9 +21,9 @@
    From 9ad97518878d33b67b62a0ad0fdc54fee15a23db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:49:05 +0200 Subject: [PATCH 096/294] [plg_editors-xtd_readmore]Code style (#10487) --- plugins/editors-xtd/readmore/readmore.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/editors-xtd/readmore/readmore.php b/plugins/editors-xtd/readmore/readmore.php index 5c282140850fd..dd9751b74898d 100644 --- a/plugins/editors-xtd/readmore/readmore.php +++ b/plugins/editors-xtd/readmore/readmore.php @@ -55,16 +55,16 @@ function insertReadmore(editor) $doc->addScriptDeclaration($js); - $button = new JObject; - $button->modal = false; - $button->class = 'btn'; + $button = new JObject; + $button->modal = false; + $button->class = 'btn'; $button->onclick = 'insertReadmore(\'' . $name . '\');return false;'; - $button->text = JText::_('PLG_READMORE_BUTTON_READMORE'); - $button->name = 'arrow-down'; + $button->text = JText::_('PLG_READMORE_BUTTON_READMORE'); + $button->name = 'arrow-down'; // @TODO: The button writer needs to take into account the javascript directive // $button->link', 'javascript:void(0)'); - $button->link = '#'; + $button->link = '#'; return $button; } From 5a00e01bcec3360962ed88fe7bb09b045f816a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:49:23 +0200 Subject: [PATCH 097/294] [plg_editors-xtd_pagebreak]Code style (#10486) --- plugins/editors-xtd/pagebreak/pagebreak.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/editors-xtd/pagebreak/pagebreak.php b/plugins/editors-xtd/pagebreak/pagebreak.php index a9415b0163cd5..a97f111ff2521 100644 --- a/plugins/editors-xtd/pagebreak/pagebreak.php +++ b/plugins/editors-xtd/pagebreak/pagebreak.php @@ -33,15 +33,14 @@ class PlgButtonPagebreak extends JPlugin */ public function onDisplay($name) { - $link = 'index.php?option=com_content&view=article&layout=pagebreak&tmpl=component&e_name=' . $name; - $button = new JObject; - $button->modal = true; - $button->class = 'btn'; - $button->link = $link; - $button->text = JText::_('PLG_EDITORSXTD_PAGEBREAK_BUTTON_PAGEBREAK'); - $button->name = 'copy'; + $button = new JObject; + $button->modal = true; + $button->class = 'btn'; + $button->link = $link; + $button->text = JText::_('PLG_EDITORSXTD_PAGEBREAK_BUTTON_PAGEBREAK'); + $button->name = 'copy'; $button->options = "{handler: 'iframe', size: {x: 500, y: 300}}"; return $button; From a02dfa6c4729a1eb8b19dc4cae2685b5760acc44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:49:37 +0200 Subject: [PATCH 098/294] [plg_editors-xtd_module]Code style (#10485) --- plugins/editors-xtd/module/module.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/editors-xtd/module/module.php b/plugins/editors-xtd/module/module.php index 5e898c7822d01..861b7a8eb5f7b 100644 --- a/plugins/editors-xtd/module/module.php +++ b/plugins/editors-xtd/module/module.php @@ -41,12 +41,12 @@ public function onDisplay($name) $link = 'index.php?option=com_modules&view=modules&layout=modal&tmpl=component&editor=' . $name . '&' . JSession::getFormToken() . '=1'; - $button = new JObject; - $button->modal = true; - $button->class = 'btn'; - $button->link = $link; - $button->text = JText::_('PLG_MODULE_BUTTON_MODULE'); - $button->name = 'file-add'; + $button = new JObject; + $button->modal = true; + $button->class = 'btn'; + $button->link = $link; + $button->text = JText::_('PLG_MODULE_BUTTON_MODULE'); + $button->name = 'file-add'; $button->options = "{handler: 'iframe', size: {x: 800, y: 500}}"; return $button; From 6fa46f11af3bce503ef8e34d1968dbaeca98ea58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:49:57 +0200 Subject: [PATCH 099/294] [plg_editors_none]code style (#10483) --- plugins/editors/none/none.php | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/editors/none/none.php b/plugins/editors/none/none.php index 1c4eae3a8b57a..55608adc6724f 100644 --- a/plugins/editors/none/none.php +++ b/plugins/editors/none/none.php @@ -77,7 +77,6 @@ public function onSetContent($id, $html) */ public function onGetInsertMethod($id) { - return null; } From 01685ffaaed182f253a24de994e55b25566f0647 Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Mon, 16 May 2016 16:50:46 +0100 Subject: [PATCH 100/294] copyright header (#10476) --- media/plg_system_stats/js/stats.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/media/plg_system_stats/js/stats.js b/media/plg_system_stats/js/stats.js index 6604bfe84bcdc..339dff9894452 100644 --- a/media/plg_system_stats/js/stats.js +++ b/media/plg_system_stats/js/stats.js @@ -1,3 +1,18 @@ +/** + * @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +/** + * stats javascript behavior + * + * To allow users to accept & configure stats sending + * + * @package Joomla + * @since 3.5.0 + * @version 1.0 + */ + (function ($) { $(document).ready(function () { var ajaxData = { From 6d05567b74fdfb2d16cd7dec03ad67be430204e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:51:04 +0200 Subject: [PATCH 101/294] [plg_content_pagenavigation]Code style (#10474) * [plg_content_pagenavigation]Code style * XML CS * options in one line * indent --- .../content/pagenavigation/pagenavigation.php | 6 +-- .../content/pagenavigation/pagenavigation.xml | 41 +++++++++++-------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/plugins/content/pagenavigation/pagenavigation.php b/plugins/content/pagenavigation/pagenavigation.php index 3f19feee25023..aac9b8fbeb4a9 100644 --- a/plugins/content/pagenavigation/pagenavigation.php +++ b/plugins/content/pagenavigation/pagenavigation.php @@ -117,9 +117,9 @@ public function onContentBeforeDisplay($context, &$row, &$params, $page = 0) break; } - $xwhere = ' AND (a.state = 1 OR a.state = -1)' . - ' AND (publish_up = ' . $db->quote($nullDate) . ' OR publish_up <= ' . $db->quote($now) . ')' . - ' AND (publish_down = ' . $db->quote($nullDate) . ' OR publish_down >= ' . $db->quote($now) . ')'; + $xwhere = ' AND (a.state = 1 OR a.state = -1)' + . ' AND (publish_up = ' . $db->quote($nullDate) . ' OR publish_up <= ' . $db->quote($now) . ')' + . ' AND (publish_down = ' . $db->quote($nullDate) . ' OR publish_down >= ' . $db->quote($now) . ')'; // Array of articles in same category correctly ordered. $query = $db->getQuery(true); diff --git a/plugins/content/pagenavigation/pagenavigation.xml b/plugins/content/pagenavigation/pagenavigation.xml index b256f0684bbfa..3465a47db466a 100644 --- a/plugins/content/pagenavigation/pagenavigation.xml +++ b/plugins/content/pagenavigation/pagenavigation.xml @@ -21,30 +21,39 @@
    - + description="PLG_PAGENAVIGATION_FIELD_POSITION_DESC" + default="1" + > - - - + + + + - + + +
    From d7f5a53c0f4b6002af06f131b9fb16133dc98866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:51:27 +0200 Subject: [PATCH 102/294] [plg_content_pagebreak]Code style (#10473) * [plg_content_pagebreak]Code style * more XML CS * options on one line + indent --- plugins/content/pagebreak/pagebreak.xml | 60 ++++++++++++++++--------- 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/plugins/content/pagebreak/pagebreak.xml b/plugins/content/pagebreak/pagebreak.xml index 66f609164b72b..24297c7d106d2 100644 --- a/plugins/content/pagebreak/pagebreak.xml +++ b/plugins/content/pagebreak/pagebreak.xml @@ -20,54 +20,70 @@
    - + > - + > - - + > - + > - + description="PLG_CONTENT_PAGEBREAK_STYLE_DESC" + default="pages" + > From 9fdcb7908fc0da8a7c69df161f984fb16dc81d43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:52:03 +0200 Subject: [PATCH 103/294] [plg_content_loadmodule]XML code style (#10472) * [plg_content_loadmodule]XML code style * XML CS * options in one line --- plugins/content/loadmodule/loadmodule.xml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/content/loadmodule/loadmodule.xml b/plugins/content/loadmodule/loadmodule.xml index 7cc8bd3882a9e..350efda61ae70 100644 --- a/plugins/content/loadmodule/loadmodule.xml +++ b/plugins/content/loadmodule/loadmodule.xml @@ -19,10 +19,13 @@
    - + default="table" + > From cbc4131492a872e82a598c14d78fc4ceb4493560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Smoli=C5=84ski?= Date: Mon, 16 May 2016 17:52:40 +0200 Subject: [PATCH 104/294] [plg_captcha_recaptcha]code style (#10471) * [plg_captcha_recaptcha]code style * indent * indent * XML CS * options in one line --- plugins/captcha/recaptcha/recaptcha.php | 10 +- plugins/captcha/recaptcha/recaptcha.xml | 167 ++++++++++++------------ 2 files changed, 89 insertions(+), 88 deletions(-) diff --git a/plugins/captcha/recaptcha/recaptcha.php b/plugins/captcha/recaptcha/recaptcha.php index 9e916a289e610..60b9e114c3fe6 100644 --- a/plugins/captcha/recaptcha/recaptcha.php +++ b/plugins/captcha/recaptcha/recaptcha.php @@ -86,11 +86,11 @@ public function onDisplay($name = null, $id = 'dynamic_recaptcha_1', $class = '' } else { - return '
    '; + return '
    '; } } diff --git a/plugins/captcha/recaptcha/recaptcha.xml b/plugins/captcha/recaptcha/recaptcha.xml index dc810e3ac50c6..9bab64601c908 100644 --- a/plugins/captcha/recaptcha/recaptcha.xml +++ b/plugins/captcha/recaptcha/recaptcha.xml @@ -14,92 +14,93 @@ recaptchalib.php - -
    - - - - - - + +
    + - + + + + - - - - - - + - - - - + - - - - -
    -
    + + + + + + + + + + + + + + + + +
    +
    From 3e3012c7f4a866de70a515a07b3ce4d97dcf98e4 Mon Sep 17 00:00:00 2001 From: Thomas Hunziker Date: Mon, 16 May 2016 17:53:26 +0200 Subject: [PATCH 105/294] Remove obsolte bootstrap and jquery files in ISIS template (#10445) --- administrator/components/com_admin/script.php | 2 ++ administrator/templates/isis/js/bootstrap.min.js | 1 - administrator/templates/isis/js/jquery.js | 4 ---- 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 administrator/templates/isis/js/bootstrap.min.js delete mode 100644 administrator/templates/isis/js/jquery.js diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index d1e9c5b31d1e9..0aaa9ad97ed99 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -1421,6 +1421,8 @@ public function deleteUnexistingFiles() '/libraries/simplepie/idn/idna_convert.class.php', '/libraries/simplepie/idn/npdata.ser', '/administrator/manifests/libraries/simplepie.xml', + '/administrator/templates/isis/js/jquery.js', + '/administrator/templates/isis/js/bootstrap.min.js', ); // TODO There is an issue while deleting folders using the ftp mode diff --git a/administrator/templates/isis/js/bootstrap.min.js b/administrator/templates/isis/js/bootstrap.min.js deleted file mode 100644 index 97dc88e10aae1..0000000000000 --- a/administrator/templates/isis/js/bootstrap.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger("close").removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide)};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;if(!e.length)return;return this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element.addClass("collapse")},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a(' diff --git a/administrator/language/en-GB/en-GB.com_contact.ini b/administrator/language/en-GB/en-GB.com_contact.ini index 7f92c0a5d82c2..9ca44bdf4f0bb 100644 --- a/administrator/language/en-GB/en-GB.com_contact.ini +++ b/administrator/language/en-GB/en-GB.com_contact.ini @@ -20,7 +20,7 @@ COM_CONTACT_CONTACT_DISPLAY_DETAILS="Display options for the individual contact COM_CONTACT_CONTACT_SETTINGS_LABEL="Contact Options" COM_CONTACT_CONTACT_VIEW_DEFAULT_DESC="This links to the contact information for one contact." COM_CONTACT_DETAILS="Contact Information" -COM_CONTACT_EDIT_CONTACT="Contact" +COM_CONTACT_EDIT_CONTACT="Edit Contact" COM_CONTACT_EDIT_DETAILS="Edit contact information displayed on an individual page." COM_CONTACT_ERROR_UNIQUE_ALIAS="Another Contact from this category has the same alias (remember it may be a trashed item)." COM_CONTACT_ERROR_ALL_LANGUAGE_ASSOCIATED="A contact item set to All languages can't be associated. Associations have not been set." From d4d505851d9a2afd4ade1e2f6131b4ebc58c1524 Mon Sep 17 00:00:00 2001 From: zero-24 Date: Mon, 16 May 2016 17:56:14 +0200 Subject: [PATCH 108/294] [admin & frontend & modules] Always use htmlspecialchars($str, ENT_COMPAT, 'UTF-8') (#10443) * Update index.php * Update login.php * Update manager.php * Update view.html.php * Update blog.php * Update default_items.php * Update default.php --- administrator/components/com_media/models/manager.php | 2 +- administrator/templates/hathor/login.php | 4 ++-- components/com_contact/views/featured/view.html.php | 2 +- components/com_content/views/category/tmpl/blog.php | 2 +- .../com_newsfeeds/views/category/tmpl/default_items.php | 3 +-- modules/mod_finder/tmpl/default.php | 2 +- templates/protostar/index.php | 4 ++-- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/administrator/components/com_media/models/manager.php b/administrator/components/com_media/models/manager.php index 25d51b050a025..e2b9598374f0e 100644 --- a/administrator/components/com_media/models/manager.php +++ b/administrator/components/com_media/models/manager.php @@ -101,7 +101,7 @@ public function getFolderList($base = null) // so both string and integer are supported. if ($asset == 0) { - $asset = htmlspecialchars(json_encode(trim($input->get('asset', 0, 'cmd')))); + $asset = htmlspecialchars(json_encode(trim($input->get('asset', 0, 'cmd'))), ENT_COMPAT, 'UTF-8'); } $author = $input->get('author', 0, 'integer'); diff --git a/administrator/templates/hathor/login.php b/administrator/templates/hathor/login.php index 851bf9a153c0d..6a599a252f535 100644 --- a/administrator/templates/hathor/login.php +++ b/administrator/templates/hathor/login.php @@ -25,7 +25,7 @@ $doc->addStyleSheet($this->baseurl . '/templates/system/css/system.css'); // Loadtemplate CSS -$doc->addStyleSheet($this->baseurl . '/templates/'.$this->template.'/css/template.css'); +$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template.css'); // Load additional CSS styles for colors if (!$this->params->get('colourChoice')) @@ -34,7 +34,7 @@ } else { - $colour = htmlspecialchars($this->params->get('colourChoice')); + $colour = htmlspecialchars($this->params->get('colourChoice'), ENT_COMPAT, 'UTF-8'); } $doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/colour_' . $colour . '.css'); diff --git a/components/com_contact/views/featured/view.html.php b/components/com_contact/views/featured/view.html.php index 9e0a5df9b7a91..3c815cde3d26f 100644 --- a/components/com_contact/views/featured/view.html.php +++ b/components/com_contact/views/featured/view.html.php @@ -118,7 +118,7 @@ public function display($tpl = null) } // Escape strings for HTML output - $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); + $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'), ENT_COMPAT, 'UTF-8'); $maxLevel = $params->get('maxLevel', -1); $this->maxLevel = &$maxLevel; diff --git a/components/com_content/views/category/tmpl/blog.php b/components/com_content/views/category/tmpl/blog.php index e616e97c71eab..cd4d0a0a6a899 100644 --- a/components/com_content/views/category/tmpl/blog.php +++ b/components/com_content/views/category/tmpl/blog.php @@ -36,7 +36,7 @@ params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
    params->get('show_description_image') && $this->category->getParams()->get('image')) : ?> - <?php echo htmlspecialchars($this->category->getParams()->get('image_alt')); ?> + <?php echo htmlspecialchars($this->category->getParams()->get('image_alt'), ENT_COMPAT, 'UTF-8'); ?> params->get('show_description') && $this->category->description) : ?> category->description, '', 'com_content.category'); ?> diff --git a/components/com_newsfeeds/views/category/tmpl/default_items.php b/components/com_newsfeeds/views/category/tmpl/default_items.php index 25d6a612221ce..0c2dc5af749cf 100644 --- a/components/com_newsfeeds/views/category/tmpl/default_items.php +++ b/components/com_newsfeeds/views/category/tmpl/default_items.php @@ -19,7 +19,7 @@

    -
    + params->get('filter_field') != 'hide') || ($this->params->get('filter_field') != '0')) || $this->params->get('show_pagination_limit')) :?>
    params->get('filter_field') != 'hide') || ($this->params->get('filter_field') != '0')) :?> @@ -80,7 +80,6 @@ pagination->getPagesCounter(); ?>

    - pagination->getPagesLinks(); ?>
    diff --git a/modules/mod_finder/tmpl/default.php b/modules/mod_finder/tmpl/default.php index 75d8760226d26..2799dfe827170 100644 --- a/modules/mod_finder/tmpl/default.php +++ b/modules/mod_finder/tmpl/default.php @@ -21,7 +21,7 @@ $suffix = $params->get('moduleclass_sfx'); $output = 'get('field_size', 20) . '" value="' . htmlspecialchars(JFactory::getApplication()->input->get('q', '', 'string'), ENT_COMPAT, 'UTF-8') . '"' . ' placeholder="' . JText::_('MOD_FINDER_SEARCH_VALUE') . '"/>'; $showLabel = $params->get('show_label', 1); diff --git a/templates/protostar/index.php b/templates/protostar/index.php index 43bd7a29565db..5386776e89e32 100644 --- a/templates/protostar/index.php +++ b/templates/protostar/index.php @@ -81,7 +81,7 @@ } elseif ($this->params->get('sitetitle')) { - $logo = '' . htmlspecialchars($this->params->get('sitetitle')) . ''; + $logo = '' . htmlspecialchars($this->params->get('sitetitle'), ENT_COMPAT, 'UTF-8') . ''; } else { @@ -144,7 +144,7 @@ params->get('sitedescription')) : ?> - ' . htmlspecialchars($this->params->get('sitedescription')) . ''; ?> + ' . htmlspecialchars($this->params->get('sitedescription'), ENT_COMPAT, 'UTF-8') . ''; ?> - + loadTemplate('associations'); ?> + + canDo->get('core.admin')) : ?> diff --git a/administrator/components/com_categories/views/category/tmpl/modal.php b/administrator/components/com_categories/views/category/tmpl/modal.php index 376c817c05f73..5b07e532df661 100644 --- a/administrator/components/com_categories/views/category/tmpl/modal.php +++ b/administrator/components/com_categories/views/category/tmpl/modal.php @@ -9,96 +9,13 @@ defined('_JEXEC') or die; -// Include the component HTML helpers. -JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); - -JHtml::_('behavior.formvalidator'); -JHtml::_('behavior.keepalive'); -JHtml::_('formbehavior.chosen', 'select'); - -$app = JFactory::getApplication(); -$input = $app->input; - -$assoc = JLanguageAssociations::isEnabled(); - -JFactory::getDocument()->addScriptDeclaration(" - Joomla.submitbutton = function(task) - { - if (task == 'category.cancel' || document.formvalidator.isValid(document.getElementById('item-form'))) - { - " . $this->form->getField('description')->save() . " - - if (window.opener && (task == 'category.save' || task == 'category.cancel')) - { - window.opener.document.closeEditWindow = self; - window.opener.setTimeout('window.document.closeEditWindow.close()', 1000); - } - - Joomla.submitform(task, document.getElementById('item-form')); - } - }; -"); - -// Fieldsets to not automatically render by /layouts/joomla/edit/params.php -$this->ignore_fieldsets = array('jmetadata', 'item_associations'); +JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); ?> -
    - -
    - - - -
    - -
    -
    + + + - - - -
    - 'general')); ?> - - -
    -
    - form->getLabel('description'); ?> - form->getInput('description'); ?> -
    -
    - -
    -
    - - - -
    -
    - -
    -
    - -
    -
    - - - - - - - canDo->get('core.admin')) : ?> - - form->getInput('rules'); ?> - - - - - - - - form->getInput('extension'); ?> - - -
    - +
    + setLayout('edit'); ?> + loadTemplate(); ?>
    From 56068d5adef9c2b7d924334947256d6281660037 Mon Sep 17 00:00:00 2001 From: Tomasz Narloch Date: Mon, 16 May 2016 23:49:54 +0200 Subject: [PATCH 136/294] Do not count all table rows if start offset is 0 (#9162) --- libraries/legacy/model/list.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libraries/legacy/model/list.php b/libraries/legacy/model/list.php index 2e597609de2e7..127749a7c7be3 100644 --- a/libraries/legacy/model/list.php +++ b/libraries/legacy/model/list.php @@ -321,11 +321,14 @@ public function getStart() $start = $this->getState('list.start'); $limit = $this->getState('list.limit'); - $total = $this->getTotal(); - if ($start > $total - $limit) + if ($start > 0) { - $start = max(0, (int) (ceil($total / $limit) - 1) * $limit); + $total = $this->getTotal(); + if ($start > $total - $limit) + { + $start = max(0, (int) (ceil($total / $limit) - 1) * $limit); + } } // Add the total to the internal cache. From cef2ecd11355648f74ff96c32473110cd8849b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyril=20Rez=C3=A9?= Date: Mon, 16 May 2016 23:54:46 +0200 Subject: [PATCH 137/294] Check out in case of modal close not needed anymore (set in bootstrap.renderModal) (#10428) --- .../components/com_content/views/article/tmpl/modal.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/administrator/components/com_content/views/article/tmpl/modal.php b/administrator/components/com_content/views/article/tmpl/modal.php index dc3359766f64f..975992bad8941 100644 --- a/administrator/components/com_content/views/article/tmpl/modal.php +++ b/administrator/components/com_content/views/article/tmpl/modal.php @@ -10,15 +10,6 @@ defined('_JEXEC') or die; JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); - -// This code is needed for proper check out in case of modal close -JFactory::getDocument()->addScriptDeclaration(' - window.parent.jQuery(".modal").on("hidden", function () { - if (typeof window.parent.jQuery("#articleEdit' . $this->item->id . 'Modal iframe").contents().find("#closeBtn") !== "undefined") { - window.parent.jQuery("#articleEdit' . $this->item->id . 'Modal iframe").contents().find("#closeBtn").click(); - } - }); -'); ?> From ba96c75c7050bfc434d210f16c3386ee965085de Mon Sep 17 00:00:00 2001 From: Izhar Aazmi Date: Tue, 17 May 2016 03:28:28 +0530 Subject: [PATCH 138/294] Use getState instead of direct property read (#10435) * Use getState instead of direct property read Use getState instead of direct property read to avoid any undefined property warnings. * Fix test case We're setting state manually for this test case. But since the flag is not set the populateState will be called and it will overwrite them. --- libraries/legacy/model/list.php | 8 ++++---- .../unit/suites/libraries/legacy/model/JModelListTest.php | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libraries/legacy/model/list.php b/libraries/legacy/model/list.php index 127749a7c7be3..8c94857668414 100644 --- a/libraries/legacy/model/list.php +++ b/libraries/legacy/model/list.php @@ -453,10 +453,10 @@ protected function loadFormData() if (!property_exists($data, 'list')) { $data->list = array( - 'direction' => $this->state->{'list.direction'}, - 'limit' => $this->state->{'list.limit'}, - 'ordering' => $this->state->{'list.ordering'}, - 'start' => $this->state->{'list.start'} + 'direction' => $this->getState('list.direction'), + 'limit' => $this->getState('list.limit'), + 'ordering' => $this->getState('list.ordering'), + 'start' => $this->getState('list.start'), ); } diff --git a/tests/unit/suites/libraries/legacy/model/JModelListTest.php b/tests/unit/suites/libraries/legacy/model/JModelListTest.php index 7dcc8140bf558..f04cbe7e4be9c 100644 --- a/tests/unit/suites/libraries/legacy/model/JModelListTest.php +++ b/tests/unit/suites/libraries/legacy/model/JModelListTest.php @@ -592,6 +592,9 @@ public function testListInfoIsAppendedToFormData() ) ); + // We've set the state manually, populateState call will overwrite it. + TestReflection::setValue($this->object, '__state_set', true); + $this->assertEquals($expected, $method->invoke($this->object)); } From 21256590d820e51e9dad09dbcdd6dcf6e8e9447f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyril=20Rez=C3=A9?= Date: Tue, 17 May 2016 00:09:53 +0200 Subject: [PATCH 139/294] [com_categories] Coding standards xml + fix a wrong closing tag (#10515) * Code style filter_categories.xml Add empty line before opening tags for readability * Code style category.xml + fix closing tag field "tags" * Remove extra empty lines at end of categories.xml --- .../components/com_categories/categories.xml | 2 - .../com_categories/models/forms/category.xml | 130 +++++++++++------- .../models/forms/filter_categories.xml | 14 +- 3 files changed, 94 insertions(+), 52 deletions(-) diff --git a/administrator/components/com_categories/categories.xml b/administrator/components/com_categories/categories.xml index 16b1b1d1e4786..2570edb438169 100644 --- a/administrator/components/com_categories/categories.xml +++ b/administrator/components/com_categories/categories.xml @@ -25,5 +25,3 @@ - - diff --git a/administrator/components/com_categories/models/forms/category.xml b/administrator/components/com_categories/models/forms/category.xml index b13683b368ff3..1b41ed27ac806 100644 --- a/administrator/components/com_categories/models/forms/category.xml +++ b/administrator/components/com_categories/models/forms/category.xml @@ -1,48 +1,56 @@
    + + readonly="true" + /> + readonly="true" + /> + filter="unset" + /> + description="COM_CATEGORIES_FIELD_PARENT_DESC" + /> + filter="unset" + /> + filter="unset" + /> + filter="unset" + /> + readonly="true" + /> + type="hidden" + /> + required="true" + /> + /> + size="45" + maxlength="255" + /> + size="40" + maxlength="255" + /> + hide="readmore,pagebreak" + /> + > + + /> + + filter="unset" + /> + filter="unset" + /> + description="JFIELD_ACCESS_DESC" + /> + cols="40" + /> + cols="40" + /> + /> + readonly="true" + /> + filter="unset" + /> + readonly="true" + /> + description="COM_CATEGORIES_FIELD_LANGUAGE_DESC" + > - - + /> + section="category" + /> -
    + +
    + useglobal="true" + /> + description="COM_CATEGORIES_FIELD_IMAGE_DESC" + /> - + size="20" + />
    -
    + +
    + + size="30" + /> - + > diff --git a/administrator/components/com_categories/models/forms/filter_categories.xml b/administrator/components/com_categories/models/forms/filter_categories.xml index d462b0b498183..3dd53359d3527 100644 --- a/administrator/components/com_categories/models/forms/filter_categories.xml +++ b/administrator/components/com_categories/models/forms/filter_categories.xml @@ -1,6 +1,8 @@ + + + + + JOPTION_SELECT_LANGUAGE + + JOPTION_SELECT_MAX_LEVELS + + @@ -84,13 +93,14 @@ + From 6ee4c6fd8e2914e148e6526d18c483b730035b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyril=20Rez=C3=A9?= Date: Tue, 17 May 2016 00:15:08 +0200 Subject: [PATCH 140/294] Modal com_newsfeeds: improve Select & Edit Newsfeed (#10516) * Simplify newsfeed modal, by setting edit layout * Improve Select & Edit com_newsfeeds modals --- .../models/fields/modal/newsfeed.php | 127 +++++++---- .../views/newsfeed/tmpl/edit.php | 18 +- .../views/newsfeed/tmpl/modal.php | 101 +-------- .../views/newsfeeds/tmpl/modal.php | 200 +++++++++--------- 4 files changed, 209 insertions(+), 237 deletions(-) diff --git a/administrator/components/com_newsfeeds/models/fields/modal/newsfeed.php b/administrator/components/com_newsfeeds/models/fields/modal/newsfeed.php index 388eae05cb690..93134a07a6826 100644 --- a/administrator/components/com_newsfeeds/models/fields/modal/newsfeed.php +++ b/administrator/components/com_newsfeeds/models/fields/modal/newsfeed.php @@ -19,7 +19,7 @@ class JFormFieldModal_Newsfeed extends JFormField /** * The form field type. * - * @var string + * @var string * @since 1.6 */ protected $type = 'Modal_Newsfeed'; @@ -27,7 +27,7 @@ class JFormFieldModal_Newsfeed extends JFormField /** * Method to get the field input markup. * - * @return string The field input markup. + * @return string The field input markup. * * @since 1.6 */ @@ -39,9 +39,6 @@ protected function getInput() // Load language JFactory::getLanguage()->load('com_newsfeeds', JPATH_ADMINISTRATOR); - // Load the javascript - JHtml::_('bootstrap.tooltip'); - // Build the script. $script = array(); @@ -52,7 +49,11 @@ protected function getInput() if ($allowEdit) { - $script[] = ' jQuery("#' . $this->id . '_edit").removeClass("hidden");'; + $script[] = ' if (id == "' . (int) $this->value . '") {'; + $script[] = ' jQuery("#' . $this->id . '_edit").removeClass("hidden");'; + $script[] = ' } else {'; + $script[] = ' jQuery("#' . $this->id . '_edit").addClass("hidden");'; + $script[] = ' }'; } if ($allowClear) @@ -60,7 +61,7 @@ protected function getInput() $script[] = ' jQuery("#' . $this->id . '_clear").removeClass("hidden");'; } - $script[] = ' jQuery("#modalNewsfeed' . $this->id . '").modal("hide");'; + $script[] = ' jQuery("#newsfeedSelect' . $this->id . 'Modal").modal("hide");'; if ($this->required) { @@ -79,8 +80,8 @@ protected function getInput() $script[] = ' function jClearNewsfeed(id) {'; $script[] = ' document.getElementById(id + "_id").value = "";'; - $script[] = ' document.getElementById(id + "_name").value = "' . - htmlspecialchars(JText::_('COM_NEWSFEEDS_SELECT_A_FEED', true), ENT_COMPAT, 'UTF-8') . '";'; + $script[] = ' document.getElementById(id + "_name").value = "' + . htmlspecialchars(JText::_('COM_NEWSFEEDS_SELECT_A_FEED', true), ENT_COMPAT, 'UTF-8') . '";'; $script[] = ' jQuery("#"+id + "_clear").addClass("hidden");'; $script[] = ' if (document.getElementById(id + "_edit")) {'; $script[] = ' jQuery("#"+id + "_edit").addClass("hidden");'; @@ -94,17 +95,19 @@ protected function getInput() // Setup variables for display. $html = array(); - $link = 'index.php?option=com_newsfeeds&view=newsfeeds&layout=modal&tmpl=component&function=jSelectNewsfeed_' . $this->id; + + $linkNewsfeeds = 'index.php?option=com_newsfeeds&view=newsfeeds&layout=modal&tmpl=component&function=jSelectNewsfeed_' . $this->id; + $linkNewsfeed = 'index.php?option=com_newsfeeds&view=newsfeed&layout=modal&tmpl=component&task=newsfeed.edit'; if (isset($this->element['language'])) { - $link .= '&forcedLanguage=' . $this->element['language']; + $linkNewsfeeds .= '&forcedLanguage=' . $this->element['language']; + $linkNewsfeed .= '&forcedLanguage=' . $this->element['language']; } - // Get the title of the linked chart if ((int) $this->value > 0) { - $db = JFactory::getDbo(); + $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('name')) ->from($db->quoteName('#__newsfeeds')) @@ -125,6 +128,7 @@ protected function getInput() { $title = JText::_('COM_NEWSFEEDS_SELECT_A_FEED'); } + $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); // The active newsfeed id field. @@ -137,54 +141,93 @@ protected function getInput() $value = (int) $this->value; } + $urlSelect = $linkNewsfeeds . '&' . JSession::getFormToken() . '=1'; + $urlEdit = $linkNewsfeed . '&id=' . $value . '&' . JSession::getFormToken() . '=1'; + // The current newsfeed display field. $html[] = ''; - $html[] = ''; - - $html[] = 'id . '_name" type="text" value="' . $title . '" disabled="disabled" size="35" />'; + + // Select newsfeed button + $html[] = '' . ' ' . JText::_('JSELECT') . ''; - $html[] = JHtml::_( - 'bootstrap.renderModal', - 'modalNewsfeed' . $this->id, - array( - 'url' => $link . '&' . JSession::getFormToken() . '=1"', - 'title' => JText::_('COM_NEWSFEEDS_CHANGE_FEED_BUTTON'), - 'width' => '800px', - 'height' => '300px', - 'footer' => '' - ) - ); - // Edit newsfeed button if ($allowEdit) { - $html[] = '' . JText::_('JACTION_EDIT') . ''; + $html[] = '' + . ' ' . JText::_('JACTION_EDIT') + . ''; } // Clear newsfeed button if ($allowClear) { - $html[] = ''; + $html[] = '' + . '' . JText::_('JCLEAR') + . ''; } $html[] = ''; - // Add class='required' for client side validation - $class = ''; + // Select newsfeed modal + $html[] = JHtml::_( + 'bootstrap.renderModal', + 'newsfeedSelect' . $this->id . 'Modal', + array( + 'url' => $urlSelect, + 'title' => JText::_('COM_NEWSFEEDS_SELECT_A_FEED'), + 'width' => '800px', + 'height' => '400px', + 'modalWidth' => '80', + 'bodyHeight' => '70', + 'footer' => '' + ) + ); - if ($this->required) - { - $class = ' class="required modal-value"'; - } + // Edit newsfeed modal + $html[] = JHtml::_( + 'bootstrap.renderModal', + 'newsfeedEdit' . $this->id . 'Modal', + array( + 'url' => $urlEdit, + 'title' => JText::_('COM_NEWSFEEDS_EDIT_NEWSFEED'), + 'backdrop' => 'static', + 'closeButton' => false, + 'width' => '800px', + 'height' => '400px', + 'modalWidth' => '80', + 'bodyHeight' => '70', + 'footer' => '' + . '' + . '' + ) + ); + + // Add class='required' for client side validation + $class = $this->required ? ' class="required modal-value"' : ''; $html[] = ''; diff --git a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php index 2293ac8a49088..7906d0f477376 100644 --- a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php +++ b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php @@ -9,15 +9,16 @@ defined('_JEXEC') or die; -// Include the HTML helpers. +// Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('behavior.formvalidator'); JHtml::_('behavior.keepalive'); JHtml::_('formbehavior.chosen', 'select'); -$app = JFactory::getApplication(); +$app = JFactory::getApplication(); $input = $app->input; + $assoc = JLanguageAssociations::isEnabled(); JFactory::getDocument()->addScriptDeclaration(" @@ -32,8 +33,13 @@ // Fieldsets to not automatically render by /layouts/joomla/edit/params.php $this->ignore_fieldsets = array('images', 'jbasic', 'jmetadata', 'item_associations'); +// In case of modal +$isModal = $input->get('layout') == 'modal' ? true : false; +$layout = $isModal ? 'modal' : 'edit'; +$tmpl = $isModal ? '&tmpl=component' : ''; ?> - + + @@ -76,18 +82,18 @@
    - loadTemplate('display'); ?> - - + loadTemplate('associations'); ?> + + diff --git a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/modal.php b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/modal.php index 7eb6fbfd3593a..f395c7e582366 100644 --- a/administrator/components/com_newsfeeds/views/newsfeed/tmpl/modal.php +++ b/administrator/components/com_newsfeeds/views/newsfeed/tmpl/modal.php @@ -9,100 +9,13 @@ defined('_JEXEC') or die; -// Include the HTML helpers. -JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); - -JHtml::_('behavior.formvalidator'); -JHtml::_('behavior.keepalive'); -JHtml::_('formbehavior.chosen', 'select'); - -$app = JFactory::getApplication(); -$input = $app->input; -$assoc = JLanguageAssociations::isEnabled(); - -JFactory::getDocument()->addScriptDeclaration(" - Joomla.submitbutton = function(task) - { - if (task == 'newsfeed.cancel' || document.formvalidator.isValid(document.getElementById('newsfeed-form'))) - { - if (window.opener && (task == 'newsfeed.save' || task == 'newsfeed.cancel')) - { - window.opener.document.closeEditWindow = self; - window.opener.setTimeout('window.document.closeEditWindow.close()', 1000); - } - - Joomla.submitform(task, document.getElementById('newsfeed-form')); - } - }; -"); - -$this->ignore_fieldsets = array('jbasic', 'item_associations'); +JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); ?> -
    + + + -
    - - - +
    + setLayout('edit'); ?> + loadTemplate(); ?>
    - -
    -
    - - - - -
    - 'details')); ?> - - item->id) ? JText::_('COM_NEWSFEEDS_NEW_NEWSFEED') : JText::_('COM_NEWSFEEDS_EDIT_NEWSFEED')); ?> -
    -
    -
    - form->getControlGroup('link'); ?> - form->getControlGroup('description'); ?> -
    -
    -
    - -
    -
    - - - -
    -
    - form->getControlGroup('images'); ?> - form->getGroup('images') as $field) : ?> - getControlGroup(); ?> - -
    -
    - - - -
    -
    - -
    -
    - -
    -
    - - - - loadTemplate('display'); ?> - - - - - - - - - -
    - - - diff --git a/administrator/components/com_newsfeeds/views/newsfeeds/tmpl/modal.php b/administrator/components/com_newsfeeds/views/newsfeeds/tmpl/modal.php index 1ee123de45dfb..139db4d59c164 100644 --- a/administrator/components/com_newsfeeds/views/newsfeeds/tmpl/modal.php +++ b/administrator/components/com_newsfeeds/views/newsfeeds/tmpl/modal.php @@ -14,111 +14,121 @@ JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('behavior.core'); -JHtml::_('bootstrap.tooltip'); +JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); JHtml::_('formbehavior.chosen', 'select'); +// Special case for the search field tooltip. +$searchFilterDesc = $this->filterForm->getFieldAttribute('search', 'description', null, 'filter'); +JHtml::_('bootstrap.tooltip', '#filter_search', array('title' => JText::_($searchFilterDesc), 'placement' => 'bottom')); + $app = JFactory::getApplication(); $function = $app->input->getCmd('function', 'jSelectNewsfeed'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); ?> -
    -
    - $this)); ?> - items)) : ?> -
    - -
    - - - - - - - - - - - - - - - - - - 'icon-trash', - 0 => 'icon-unpublish', - 1 => 'icon-publish', - 2 => 'icon-archive', - ); - ?> - items as $i => $item) : ?> - language && JLanguageMultilang::isEnabled()) - { - $tag = strlen($item->language); - if ($tag == 5) +
    + + + + $this)); ?> + + items)) : ?> +
    + +
    + +
    - - - - - - - - - -
    - pagination->getListFooter(); ?> -
    + + + + + + + + + + + + + + + + 'icon-trash', + 0 => 'icon-unpublish', + 1 => 'icon-publish', + 2 => 'icon-archive', + ); + ?> + items as $i => $item) : ?> + language && JLanguageMultilang::isEnabled()) { - $lang = substr($item->language, 0, 2); + $tag = strlen($item->language); + if ($tag == 5) + { + $lang = substr($item->language, 0, 2); + } + elseif ($tag == 6) + { + $lang = substr($item->language, 0, 3); + } + else { + $lang = ""; + } } - elseif ($tag == 6) + elseif (!JLanguageMultilang::isEnabled()) { - $lang = substr($item->language, 0, 3); - } - else { $lang = ""; } - } - elseif (!JLanguageMultilang::isEnabled()) - { - $lang = ""; - } - ?> - - - - - - - - - -
    + + + + + + + + + +
    + pagination->getListFooter(); ?> +
    - - - - escape($item->name); ?> -
    - escape($item->category_title); ?> -
    -
    - escape($item->access_level); ?> - - language == '*'):?> - - - language_title ? JHtml::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true) . ' ' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> - - - id; ?> -
    - - - - - -
    + ?> + + + + + + + escape($item->name); ?> +
    + escape($item->category_title); ?> +
    + + + escape($item->access_level); ?> + + + language == '*'):?> + + + language_title ? JHtml::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true) . ' ' . $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> + + + + id; ?> + + + + + + + + + + + + + +
    From f7f3e2bd8ddec399d8bc348b85fa5cbe2172a95c Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Mon, 16 May 2016 23:17:16 +0100 Subject: [PATCH 141/294] [js message system] Add close button (#10517) * add close button to js messages * type button --- media/system/js/core-uncompressed.js | 9 ++++++++- media/system/js/core.js | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/media/system/js/core-uncompressed.js b/media/system/js/core-uncompressed.js index 921923bc2684b..7364e91099609 100644 --- a/media/system/js/core-uncompressed.js +++ b/media/system/js/core-uncompressed.js @@ -164,6 +164,14 @@ Joomla.editors.instances = Joomla.editors.instances || {}; messagesBox = document.createElement( 'div' ); messagesBox.className = 'alert alert-' + type; + // Close button + var buttonWrapper = document.createElement( 'button' ); + buttonWrapper.setAttribute('type', 'button'); + buttonWrapper.setAttribute('data-dismiss', 'alert'); + buttonWrapper.className = 'close'; + buttonWrapper.innerHTML = '×'; + messagesBox.appendChild( buttonWrapper ); + // Title title = Joomla.JText._( type ); @@ -172,7 +180,6 @@ Joomla.editors.instances = Joomla.editors.instances || {}; titleWrapper = document.createElement( 'h4' ); titleWrapper.className = 'alert-heading'; titleWrapper.innerHTML = Joomla.JText._( type ); - messagesBox.appendChild( titleWrapper ); } diff --git a/media/system/js/core.js b/media/system/js/core.js index 425d0526da466..260dabb27bb88 100644 --- a/media/system/js/core.js +++ b/media/system/js/core.js @@ -1 +1 @@ -Joomla=window.Joomla||{},Joomla.editors=Joomla.editors||{},Joomla.editors.instances=Joomla.editors.instances||{},function(e,t){"use strict";e.submitform=function(e,n,r){n||(n=t.getElementById("adminForm")),e&&(n.task.value=e),n.noValidate=!r,n.setAttribute("novalidate",!r);var i=t.createElement("input");i.style.display="none",i.type="submit",n.appendChild(i).click(),n.removeChild(i)},e.submitbutton=function(t){e.submitform(t)},e.JText={strings:{},_:function(e,t){return typeof this.strings[e.toUpperCase()]!="undefined"?this.strings[e.toUpperCase()]:t},load:function(e){for(var t in e){if(!e.hasOwnProperty(t))continue;this.strings[t.toUpperCase()]=e[t]}return this}},e.replaceTokens=function(e){if(!/^[0-9A-F]{32}$/i.test(e))return;var n=t.getElementsByTagName("input"),r,i,s;for(r=0,s=n.length;r=0;f--)l=t.createElement("div"),l.innerHTML=s[f],o.appendChild(l);r.appendChild(o)}},e.removeMessages=function(){var e=t.getElementById("system-message-container");while(e.firstChild)e.removeChild(e.firstChild);e.style.display="none",e.offsetHeight,e.style.display=""},e.isChecked=function(e,n){typeof n=="undefined"&&(n=t.getElementById("adminForm")),n.boxchecked.value=e?parseInt(n.boxchecked.value)+1:parseInt(n.boxchecked.value)-1;if(!n.elements["checkall-toggle"])return;var r=!0,i,s,o;for(i=0,o=n.elements.length;i",u=r==i,a=0,f,l,c;for(l in n){if(!n.hasOwnProperty(l))continue;c=n[l];if(c[0]!=r)continue;f="";if(u&&s==c[1]||!u&&a===0)f='selected="selected"';o+='",a++}o+="",t.writeln(o)},window.changeDynaList=function(e,n,r,i,s){var o=t.adminForm[e],u=r==i,a,f,l,c;while(o.firstChild)o.removeChild(o.firstChild);a=0;for(f in n){if(!n.hasOwnProperty(f))continue;l=n[f];if(l[0]!=r)continue;c=new Option,c.value=l[1],c.text=l[2];if(u&&s==c.value||!u&&a===0)c.selected=!0;o.options[a++]=c}o.length=a},window.radioGetCheckedValue=function(e){if(!e)return"";var t=e.length,n;if(t===undefined)return e.checked?e.value:"";for(n=0;n-1?r.options[i].value:null},window.listItemTask=function(e,n){var r=t.adminForm,i=0,s,o=r[e];if(!o)return!1;for(;;){s=r["cb"+i];if(!s)break;s.checked=!1,i++}return o.checked=!0,r.boxchecked.value=1,window.submitform(n),!1},window.submitbutton=function(t){e.submitbutton(t)},window.submitform=function(t){e.submitform(t)},window.saveorder=function(e,t){window.checkAll_button(e,t)},window.checkAll_button=function(n,r){r=r?r:"saveorder";var i,s;for(i=0;i<=n;i++){s=t.adminForm["cb"+i];if(!s){alert("You cannot change the order of items, as an item in the list is `Checked Out`");return}s.checked=!0}e.submitform(r)}}(Joomla,document); \ No newline at end of file +Joomla=window.Joomla||{},Joomla.editors=Joomla.editors||{},Joomla.editors.instances=Joomla.editors.instances||{},function(e,t){"use strict";e.submitform=function(e,n,i){n||(n=t.getElementById("adminForm")),e&&(n.task.value=e),n.noValidate=!i,n.setAttribute("novalidate",!i);var o=t.createElement("input");o.style.display="none",o.type="submit",n.appendChild(o).click(),n.removeChild(o)},e.submitbutton=function(t){e.submitform(t)},e.JText={strings:{},_:function(e,t){return"undefined"!=typeof this.strings[e.toUpperCase()]?this.strings[e.toUpperCase()]:t},load:function(e){for(var t in e)e.hasOwnProperty(t)&&(this.strings[t.toUpperCase()]=e[t]);return this}},e.replaceTokens=function(e){if(/^[0-9A-F]{32}$/i.test(e)){var n,i,o,r=t.getElementsByTagName("input");for(n=0,o=r.length;o>n;n++)i=r[n],"hidden"==i.type&&"1"==i.value&&32==i.name.length&&(i.name=e)}},e.isEmail=function(e){var t=/^[\w.!#$%&‚Äô*+\/=?^`{|}~-]+@[a-z0-9-]+(?:\.[a-z0-9-]{2,})+$/i;return t.test(e)},e.checkAll=function(e,t){if(!e.form)return!1;t=t?t:"cb";var n,i,o,r=0;for(n=0,o=e.form.elements.length;o>n;n++)i=e.form.elements[n],i.type==e.type&&0===i.id.indexOf(t)&&(i.checked=e.checked,r+=i.checked?1:0);return e.form.boxchecked&&(e.form.boxchecked.value=r),!0},e.renderMessages=function(n){e.removeMessages();var i,o,r,a,s,l,d,c=t.getElementById("system-message-container");for(i in n)if(n.hasOwnProperty(i)){o=n[i],r=t.createElement("div"),r.className="alert alert-"+i;var u=t.createElement("button");for(u.setAttribute("type","button"),u.setAttribute("data-dismiss","alert"),u.className="close",u.innerHTML="×",r.appendChild(u),a=e.JText._(i),"undefined"!=typeof a&&(s=t.createElement("h4"),s.className="alert-heading",s.innerHTML=e.JText._(i),r.appendChild(s)),l=o.length-1;l>=0;l--)d=t.createElement("div"),d.innerHTML=o[l],r.appendChild(d);c.appendChild(r)}},e.removeMessages=function(){for(var e=t.getElementById("system-message-container");e.firstChild;)e.removeChild(e.firstChild);e.style.display="none",e.offsetHeight,e.style.display=""},e.isChecked=function(e,n){if("undefined"==typeof n&&(n=t.getElementById("adminForm")),n.boxchecked.value=e?parseInt(n.boxchecked.value)+1:parseInt(n.boxchecked.value)-1,n.elements["checkall-toggle"]){var i,o,r,a=!0;for(i=0,r=n.elements.length;r>i;i++)if(o=n.elements[i],"checkbox"==o.type&&"checkall-toggle"!=o.name&&!o.checked){a=!1;break}n.elements["checkall-toggle"].checked=a}},e.popupWindow=function(e,t,n,i,o){var r=(screen.width-n)/2,a=(screen.height-i)/2,s="height="+i+",width="+n+",top="+a+",left="+r+",scrollbars="+o+",resizable";window.open(e,t,s).window.focus()},e.tableOrdering=function(n,i,o,r){"undefined"==typeof r&&(r=t.getElementById("adminForm")),r.filter_order.value=n,r.filter_order_Dir.value=i,e.submitform(o,r)},window.writeDynaList=function(e,n,i,o,r){var a,s,l,d="",t.writeln(d)},window.changeDynaList=function(e,n,i,o,r){for(var a,s,l,d,c=t.adminForm[e],u=i==o;c.firstChild;)c.removeChild(c.firstChild);a=0;for(s in n)n.hasOwnProperty(s)&&(l=n[s],l[0]==i&&(d=new Option,d.value=l[1],d.text=l[2],(u&&r==d.value||!u&&0===a)&&(d.selected=!0),c.options[a++]=d));c.length=a},window.radioGetCheckedValue=function(e){if(!e)return"";var t,n=e.length;if(void 0===n)return e.checked?e.value:"";for(t=0;n>t;t++)if(e[t].checked)return e[t].value;return""},window.getSelectedValue=function(e,n){var i=t[e][n],o=i.selectedIndex;return null!==o&&o>-1?i.options[o].value:null},window.listItemTask=function(e,n){var i,o=t.adminForm,r=0,a=o[e];if(!a)return!1;for(;;){if(i=o["cb"+r],!i)break;i.checked=!1,r++}return a.checked=!0,o.boxchecked.value=1,window.submitform(n),!1},window.submitbutton=function(t){e.submitbutton(t)},window.submitform=function(t){e.submitform(t)},window.saveorder=function(e,t){window.checkAll_button(e,t)},window.checkAll_button=function(n,i){i=i?i:"saveorder";var o,r;for(o=0;n>=o;o++){if(r=t.adminForm["cb"+o],!r)return void alert("You cannot change the order of items, as an item in the list is `Checked Out`");r.checked=!0}e.submitform(i)}}(Joomla,document); From 4052683a60bb588f9c6b437391d2d538b04be6d0 Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Tue, 17 May 2016 12:11:23 +0100 Subject: [PATCH 142/294] correct js messages class (#10521) --- media/system/js/core-uncompressed.js | 9 +++++++-- media/system/js/core.js | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/media/system/js/core-uncompressed.js b/media/system/js/core-uncompressed.js index 7364e91099609..6e3a36edcf88c 100644 --- a/media/system/js/core-uncompressed.js +++ b/media/system/js/core-uncompressed.js @@ -153,7 +153,7 @@ Joomla.editors.instances = Joomla.editors.instances || {}; Joomla.removeMessages(); var messageContainer = document.getElementById( 'system-message-container' ), - type, typeMessages, messagesBox, title, titleWrapper, i, messageWrapper; + type, typeMessages, messagesBox, title, titleWrapper, i, messageWrapper, alertClass; for ( type in messages ) { if ( !messages.hasOwnProperty( type ) ) { continue; } @@ -162,7 +162,12 @@ Joomla.editors.instances = Joomla.editors.instances || {}; // Create the alert box messagesBox = document.createElement( 'div' ); - messagesBox.className = 'alert alert-' + type; + + // Message class + alertClass = (type == 'notice') ? 'alert-info' : 'alert-' + type; + alertClass = (type == 'message') ? 'alert-success' : alertClass; + + messagesBox.className = 'alert ' + alertClass; // Close button var buttonWrapper = document.createElement( 'button' ); diff --git a/media/system/js/core.js b/media/system/js/core.js index 260dabb27bb88..6cc4f233ab1f2 100644 --- a/media/system/js/core.js +++ b/media/system/js/core.js @@ -1 +1 @@ -Joomla=window.Joomla||{},Joomla.editors=Joomla.editors||{},Joomla.editors.instances=Joomla.editors.instances||{},function(e,t){"use strict";e.submitform=function(e,n,i){n||(n=t.getElementById("adminForm")),e&&(n.task.value=e),n.noValidate=!i,n.setAttribute("novalidate",!i);var o=t.createElement("input");o.style.display="none",o.type="submit",n.appendChild(o).click(),n.removeChild(o)},e.submitbutton=function(t){e.submitform(t)},e.JText={strings:{},_:function(e,t){return"undefined"!=typeof this.strings[e.toUpperCase()]?this.strings[e.toUpperCase()]:t},load:function(e){for(var t in e)e.hasOwnProperty(t)&&(this.strings[t.toUpperCase()]=e[t]);return this}},e.replaceTokens=function(e){if(/^[0-9A-F]{32}$/i.test(e)){var n,i,o,r=t.getElementsByTagName("input");for(n=0,o=r.length;o>n;n++)i=r[n],"hidden"==i.type&&"1"==i.value&&32==i.name.length&&(i.name=e)}},e.isEmail=function(e){var t=/^[\w.!#$%&‚Äô*+\/=?^`{|}~-]+@[a-z0-9-]+(?:\.[a-z0-9-]{2,})+$/i;return t.test(e)},e.checkAll=function(e,t){if(!e.form)return!1;t=t?t:"cb";var n,i,o,r=0;for(n=0,o=e.form.elements.length;o>n;n++)i=e.form.elements[n],i.type==e.type&&0===i.id.indexOf(t)&&(i.checked=e.checked,r+=i.checked?1:0);return e.form.boxchecked&&(e.form.boxchecked.value=r),!0},e.renderMessages=function(n){e.removeMessages();var i,o,r,a,s,l,d,c=t.getElementById("system-message-container");for(i in n)if(n.hasOwnProperty(i)){o=n[i],r=t.createElement("div"),r.className="alert alert-"+i;var u=t.createElement("button");for(u.setAttribute("type","button"),u.setAttribute("data-dismiss","alert"),u.className="close",u.innerHTML="×",r.appendChild(u),a=e.JText._(i),"undefined"!=typeof a&&(s=t.createElement("h4"),s.className="alert-heading",s.innerHTML=e.JText._(i),r.appendChild(s)),l=o.length-1;l>=0;l--)d=t.createElement("div"),d.innerHTML=o[l],r.appendChild(d);c.appendChild(r)}},e.removeMessages=function(){for(var e=t.getElementById("system-message-container");e.firstChild;)e.removeChild(e.firstChild);e.style.display="none",e.offsetHeight,e.style.display=""},e.isChecked=function(e,n){if("undefined"==typeof n&&(n=t.getElementById("adminForm")),n.boxchecked.value=e?parseInt(n.boxchecked.value)+1:parseInt(n.boxchecked.value)-1,n.elements["checkall-toggle"]){var i,o,r,a=!0;for(i=0,r=n.elements.length;r>i;i++)if(o=n.elements[i],"checkbox"==o.type&&"checkall-toggle"!=o.name&&!o.checked){a=!1;break}n.elements["checkall-toggle"].checked=a}},e.popupWindow=function(e,t,n,i,o){var r=(screen.width-n)/2,a=(screen.height-i)/2,s="height="+i+",width="+n+",top="+a+",left="+r+",scrollbars="+o+",resizable";window.open(e,t,s).window.focus()},e.tableOrdering=function(n,i,o,r){"undefined"==typeof r&&(r=t.getElementById("adminForm")),r.filter_order.value=n,r.filter_order_Dir.value=i,e.submitform(o,r)},window.writeDynaList=function(e,n,i,o,r){var a,s,l,d="",t.writeln(d)},window.changeDynaList=function(e,n,i,o,r){for(var a,s,l,d,c=t.adminForm[e],u=i==o;c.firstChild;)c.removeChild(c.firstChild);a=0;for(s in n)n.hasOwnProperty(s)&&(l=n[s],l[0]==i&&(d=new Option,d.value=l[1],d.text=l[2],(u&&r==d.value||!u&&0===a)&&(d.selected=!0),c.options[a++]=d));c.length=a},window.radioGetCheckedValue=function(e){if(!e)return"";var t,n=e.length;if(void 0===n)return e.checked?e.value:"";for(t=0;n>t;t++)if(e[t].checked)return e[t].value;return""},window.getSelectedValue=function(e,n){var i=t[e][n],o=i.selectedIndex;return null!==o&&o>-1?i.options[o].value:null},window.listItemTask=function(e,n){var i,o=t.adminForm,r=0,a=o[e];if(!a)return!1;for(;;){if(i=o["cb"+r],!i)break;i.checked=!1,r++}return a.checked=!0,o.boxchecked.value=1,window.submitform(n),!1},window.submitbutton=function(t){e.submitbutton(t)},window.submitform=function(t){e.submitform(t)},window.saveorder=function(e,t){window.checkAll_button(e,t)},window.checkAll_button=function(n,i){i=i?i:"saveorder";var o,r;for(o=0;n>=o;o++){if(r=t.adminForm["cb"+o],!r)return void alert("You cannot change the order of items, as an item in the list is `Checked Out`");r.checked=!0}e.submitform(i)}}(Joomla,document); +Joomla=window.Joomla||{},Joomla.editors=Joomla.editors||{},Joomla.editors.instances=Joomla.editors.instances||{},function(e,t){"use strict";e.submitform=function(e,n,i){n||(n=t.getElementById("adminForm")),e&&(n.task.value=e),n.noValidate=!i,n.setAttribute("novalidate",!i);var o=t.createElement("input");o.style.display="none",o.type="submit",n.appendChild(o).click(),n.removeChild(o)},e.submitbutton=function(t){e.submitform(t)},e.JText={strings:{},_:function(e,t){return"undefined"!=typeof this.strings[e.toUpperCase()]?this.strings[e.toUpperCase()]:t},load:function(e){for(var t in e)e.hasOwnProperty(t)&&(this.strings[t.toUpperCase()]=e[t]);return this}},e.replaceTokens=function(e){if(/^[0-9A-F]{32}$/i.test(e)){var n,i,o,r=t.getElementsByTagName("input");for(n=0,o=r.length;o>n;n++)i=r[n],"hidden"==i.type&&"1"==i.value&&32==i.name.length&&(i.name=e)}},e.isEmail=function(e){var t=/^[\w.!#$%&‚Äô*+\/=?^`{|}~-]+@[a-z0-9-]+(?:\.[a-z0-9-]{2,})+$/i;return t.test(e)},e.checkAll=function(e,t){if(!e.form)return!1;t=t?t:"cb";var n,i,o,r=0;for(n=0,o=e.form.elements.length;o>n;n++)i=e.form.elements[n],i.type==e.type&&0===i.id.indexOf(t)&&(i.checked=e.checked,r+=i.checked?1:0);return e.form.boxchecked&&(e.form.boxchecked.value=r),!0},e.renderMessages=function(n){e.removeMessages();var i,o,r,a,s,l,c,d,u=t.getElementById("system-message-container");for(i in n)if(n.hasOwnProperty(i)){o=n[i],r=t.createElement("div"),d="notice"==i?"alert-info":"alert-"+i,d="message"==i?"alert-success":d,r.className="alert "+d;var m=t.createElement("button");for(m.setAttribute("type","button"),m.setAttribute("data-dismiss","alert"),m.className="close",m.innerHTML="×",r.appendChild(m),a=e.JText._(i),"undefined"!=typeof a&&(s=t.createElement("h4"),s.className="alert-heading",s.innerHTML=e.JText._(i),r.appendChild(s)),l=o.length-1;l>=0;l--)c=t.createElement("div"),c.innerHTML=o[l],r.appendChild(c);u.appendChild(r)}},e.removeMessages=function(){for(var e=t.getElementById("system-message-container");e.firstChild;)e.removeChild(e.firstChild);e.style.display="none",e.offsetHeight,e.style.display=""},e.isChecked=function(e,n){if("undefined"==typeof n&&(n=t.getElementById("adminForm")),n.boxchecked.value=e?parseInt(n.boxchecked.value)+1:parseInt(n.boxchecked.value)-1,n.elements["checkall-toggle"]){var i,o,r,a=!0;for(i=0,r=n.elements.length;r>i;i++)if(o=n.elements[i],"checkbox"==o.type&&"checkall-toggle"!=o.name&&!o.checked){a=!1;break}n.elements["checkall-toggle"].checked=a}},e.popupWindow=function(e,t,n,i,o){var r=(screen.width-n)/2,a=(screen.height-i)/2,s="height="+i+",width="+n+",top="+a+",left="+r+",scrollbars="+o+",resizable";window.open(e,t,s).window.focus()},e.tableOrdering=function(n,i,o,r){"undefined"==typeof r&&(r=t.getElementById("adminForm")),r.filter_order.value=n,r.filter_order_Dir.value=i,e.submitform(o,r)},window.writeDynaList=function(e,n,i,o,r){var a,s,l,c="",t.writeln(c)},window.changeDynaList=function(e,n,i,o,r){for(var a,s,l,c,d=t.adminForm[e],u=i==o;d.firstChild;)d.removeChild(d.firstChild);a=0;for(s in n)n.hasOwnProperty(s)&&(l=n[s],l[0]==i&&(c=new Option,c.value=l[1],c.text=l[2],(u&&r==c.value||!u&&0===a)&&(c.selected=!0),d.options[a++]=c));d.length=a},window.radioGetCheckedValue=function(e){if(!e)return"";var t,n=e.length;if(void 0===n)return e.checked?e.value:"";for(t=0;n>t;t++)if(e[t].checked)return e[t].value;return""},window.getSelectedValue=function(e,n){var i=t[e][n],o=i.selectedIndex;return null!==o&&o>-1?i.options[o].value:null},window.listItemTask=function(e,n){var i,o=t.adminForm,r=0,a=o[e];if(!a)return!1;for(;;){if(i=o["cb"+r],!i)break;i.checked=!1,r++}return a.checked=!0,o.boxchecked.value=1,window.submitform(n),!1},window.submitbutton=function(t){e.submitbutton(t)},window.submitform=function(t){e.submitform(t)},window.saveorder=function(e,t){window.checkAll_button(e,t)},window.checkAll_button=function(n,i){i=i?i:"saveorder";var o,r;for(o=0;n>=o;o++){if(r=t.adminForm["cb"+o],!r)return void alert("You cannot change the order of items, as an item in the list is `Checked Out`");r.checked=!0}e.submitform(i)}}(Joomla,document); From 3b8e66413ed4233fe3d142ebea6dd48b84ea0a0b Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Tue, 17 May 2016 13:02:37 +0100 Subject: [PATCH 143/294] [com_categories] Cleaner tree view (#10213) * cleaner tree * new view * and now? --- .../components/com_categories/views/categories/tmpl/default.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_categories/views/categories/tmpl/default.php b/administrator/components/com_categories/views/categories/tmpl/default.php index 3deda5ad9bcdc..ec704534558c5 100644 --- a/administrator/components/com_categories/views/categories/tmpl/default.php +++ b/administrator/components/com_categories/views/categories/tmpl/default.php @@ -200,7 +200,7 @@
    - —', $item->level - 1) ?> + level > 1 ? '' . str_repeat('┊   ', $item->level - 2) . '–' : ''; ?> checked_out) : ?> editor, $item->checked_out_time, 'categories.', $canCheckin); ?> From c13f53a52200253ee27c8bff0b764acd783cf9e8 Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Tue, 17 May 2016 13:29:20 +0100 Subject: [PATCH 144/294] use the same level structure as categories --- administrator/components/com_tags/views/tags/tmpl/default.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/administrator/components/com_tags/views/tags/tmpl/default.php b/administrator/components/com_tags/views/tags/tmpl/default.php index 1b1101a28226e..bca78ccd8da5c 100644 --- a/administrator/components/com_tags/views/tags/tmpl/default.php +++ b/administrator/components/com_tags/views/tags/tmpl/default.php @@ -153,9 +153,7 @@ - level > 0): ?> - —', $item->level - 1) ?> - + level > 1 ? '' . str_repeat('┊   ', $item->level - 2) . '–' : ''; ?> checked_out) : ?> editor, $item->checked_out_time, 'tags.', $canCheckin); ?> From c0a4ab3943b4f7686a5395caf6dad070d74adfda Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Tue, 17 May 2016 15:52:29 +0100 Subject: [PATCH 145/294] add to com_config filters and solve html error (th to td) --- administrator/components/com_config/model/field/filters.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/administrator/components/com_config/model/field/filters.php b/administrator/components/com_config/model/field/filters.php index b0c8b02e36a2e..f3f776b392487 100644 --- a/administrator/components/com_config/model/field/filters.php +++ b/administrator/components/com_config/model/field/filters.php @@ -79,9 +79,9 @@ protected function getInput() $group_filter['filter_attributes'] = !empty($group_filter['filter_attributes']) ? $group_filter['filter_attributes'] : ''; $html[] = ' '; - $html[] = ' '; - $html[] = ' ' . str_repeat('|—', $group->level) . $group->text; - $html[] = ' '; + $html[] = ' '; + $html[] = ' ' . JLayoutHelper::render('joomla.html.treeprefix', array('level' => $group->level + 1)) . $group->text; + $html[] = ' '; $html[] = ' '; $html[] = ' Date: Tue, 17 May 2016 17:51:04 +0200 Subject: [PATCH 146/294] [imp] New lang string for successful language installation (#10523) * New lang string for successful language installation * took off pack --- administrator/components/com_installer/models/languages.php | 2 +- administrator/language/en-GB/en-GB.com_installer.ini | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/administrator/components/com_installer/models/languages.php b/administrator/components/com_installer/models/languages.php index f4a5f9cd9ccdb..3cd4661cfc8ca 100644 --- a/administrator/components/com_installer/models/languages.php +++ b/administrator/components/com_installer/models/languages.php @@ -301,7 +301,7 @@ public function install($lids) } // Package installed successfully. - $app->enqueueMessage(JText::sprintf('COM_INSTALLER_INSTALL_SUCCESS', $language->name)); + $app->enqueueMessage(JText::sprintf('COM_INSTALLER_INSTALL_LANGUAGE_SUCCESS', $language->name)); // Cleanup the install files in tmp folder. if (!is_file($package['packagefile'])) diff --git a/administrator/language/en-GB/en-GB.com_installer.ini b/administrator/language/en-GB/en-GB.com_installer.ini index b891076d81a29..0b9d90b3da2b1 100644 --- a/administrator/language/en-GB/en-GB.com_installer.ini +++ b/administrator/language/en-GB/en-GB.com_installer.ini @@ -69,6 +69,7 @@ COM_INSTALLER_INSTALL_FROM_WEB="Install from Web" COM_INSTALLER_INSTALL_FROM_WEB_ADD_TAB="Add "Install from Web" tab" COM_INSTALLER_INSTALL_FROM_WEB_INFO="Joomla! Extensions Directory™ (JED) now available with Install from Web on this page." COM_INSTALLER_INSTALL_FROM_WEB_TOS="By selecting "_QQ_"Add Install from Web tab"_QQ_" below, you agree to the JED Terms of Service and all applicable third party license terms." +COM_INSTALLER_INSTALL_LANGUAGE_SUCCESS="Installation of the %s language was successful." COM_INSTALLER_INSTALL_SUCCESS="Installation of the %s was successful." COM_INSTALLER_INSTALL_URL="Install URL" COM_INSTALLER_INVALID_EXTENSION_UPDATE="Invalid extension update" From a18e851cb01bd54e22596908dba9722b404fc608 Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Tue, 17 May 2016 16:52:23 +0100 Subject: [PATCH 147/294] [com_users] user groups: use the same visual level structure as categories (#10528) * user groups tree * forgot the * * add space * remove space --- .../com_users/views/groups/tmpl/default.php | 2 +- layouts/joomla/html/treeprefix.php | 26 +++++++++++++++++++ libraries/cms/html/access.php | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 layouts/joomla/html/treeprefix.php diff --git a/administrator/components/com_users/views/groups/tmpl/default.php b/administrator/components/com_users/views/groups/tmpl/default.php index 03c6ad1944baa..00232f44079bf 100644 --- a/administrator/components/com_users/views/groups/tmpl/default.php +++ b/administrator/components/com_users/views/groups/tmpl/default.php @@ -105,7 +105,7 @@ - |—', $item->level); ?> + $item->level + 1)); ?> escape($item->title); ?> diff --git a/layouts/joomla/html/treeprefix.php b/layouts/joomla/html/treeprefix.php new file mode 100644 index 0000000000000..f8e675adb2c9b --- /dev/null +++ b/layouts/joomla/html/treeprefix.php @@ -0,0 +1,26 @@ + 1) +{ + echo '' . str_repeat('┊   ', (int) $level - 2) . '– '; +} diff --git a/libraries/cms/html/access.php b/libraries/cms/html/access.php index a75e7d44f4631..650da1c926b03 100644 --- a/libraries/cms/html/access.php +++ b/libraries/cms/html/access.php @@ -173,7 +173,7 @@ public static function usergroups($name, $selected, $checkSuperAdmin = false) $html[] = ' '; $html[] = ' '; $html[] = ' '; From c6f129dc95813314566fec8e849ffecbf0cc9e04 Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Tue, 17 May 2016 16:52:54 +0100 Subject: [PATCH 148/294] debuguser and debuggroup tree view (#10530) --- .../components/com_users/views/debuggroup/tmpl/default.php | 3 +-- .../components/com_users/views/debuguser/tmpl/default.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/administrator/components/com_users/views/debuggroup/tmpl/default.php b/administrator/components/com_users/views/debuggroup/tmpl/default.php index 5ee78b508a75b..e0620c34b4706 100644 --- a/administrator/components/com_users/views/debuggroup/tmpl/default.php +++ b/administrator/components/com_users/views/debuggroup/tmpl/default.php @@ -66,8 +66,7 @@ escape($item->title); ?> - |—', $item->level); ?> - escape($item->name); ?> + $item->level + 1)) . $this->escape($item->name); ?> actions as $action) : ?> escape($item->title); ?> - |—', $item->level); ?> - escape($item->name); ?> + $item->level + 1)) . $this->escape($item->name); ?> actions as $action) : ?> Date: Tue, 17 May 2016 17:49:03 +0100 Subject: [PATCH 149/294] use the new layout (#10536) --- administrator/components/com_tags/views/tags/tmpl/default.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_tags/views/tags/tmpl/default.php b/administrator/components/com_tags/views/tags/tmpl/default.php index bca78ccd8da5c..4c84c6c4995d1 100644 --- a/administrator/components/com_tags/views/tags/tmpl/default.php +++ b/administrator/components/com_tags/views/tags/tmpl/default.php @@ -153,7 +153,7 @@ - level > 1 ? '' . str_repeat('┊   ', $item->level - 2) . '–' : ''; ?> + $item->level)); ?> checked_out) : ?> editor, $item->checked_out_time, 'tags.', $canCheckin); ?> From 4761590d783b1a2446fb3ab8ec238164cf8299dc Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Tue, 17 May 2016 17:49:12 +0100 Subject: [PATCH 150/294] tree prefix for rules field. (#10532) --- libraries/joomla/form/fields/rules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/joomla/form/fields/rules.php b/libraries/joomla/form/fields/rules.php index 16b91264f43a5..546761d3fb7f3 100644 --- a/libraries/joomla/form/fields/rules.php +++ b/libraries/joomla/form/fields/rules.php @@ -217,7 +217,7 @@ protected function getInput() $html[] = '
  • '; $html[] = ''; - $html[] = str_repeat(' ', $curLevel = $group->level) . $group->text; + $html[] = JLayoutHelper::render('joomla.html.treeprefix', array('level' => $group->level + 1)) . $group->text; $html[] = ''; $html[] = '
  • '; } From 082ff91290df11f32025610bc3aeb2cdb345d784 Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Tue, 17 May 2016 17:49:22 +0100 Subject: [PATCH 151/294] [com_categories] modal: use the same tree level visual (#10533) * use layout * add tree prefix to categories modal --- .../components/com_categories/views/categories/tmpl/default.php | 2 +- .../components/com_categories/views/categories/tmpl/modal.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_categories/views/categories/tmpl/default.php b/administrator/components/com_categories/views/categories/tmpl/default.php index ec704534558c5..4a4d02636c761 100644 --- a/administrator/components/com_categories/views/categories/tmpl/default.php +++ b/administrator/components/com_categories/views/categories/tmpl/default.php @@ -200,7 +200,7 @@ - level > 1 ? '' . str_repeat('┊   ', $item->level - 2) . '–' : ''; ?> + $item->level)); ?> checked_out) : ?> editor, $item->checked_out_time, 'categories.', $canCheckin); ?> diff --git a/administrator/components/com_categories/views/categories/tmpl/modal.php b/administrator/components/com_categories/views/categories/tmpl/modal.php index 88485e91f328e..b10924e8ae63c 100644 --- a/administrator/components/com_categories/views/categories/tmpl/modal.php +++ b/administrator/components/com_categories/views/categories/tmpl/modal.php @@ -110,7 +110,7 @@ - —', $item->level - 1); ?> + $item->level)); ?> escape($item->title); ?> From 6d665b6fb03140c6eb81fd0bee7fc30875973e92 Mon Sep 17 00:00:00 2001 From: Emil Masiakowski Date: Tue, 17 May 2016 20:02:04 +0200 Subject: [PATCH 152/294] mod_feed helper now catches all exceptions (#9293) --- modules/mod_feed/helper.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/modules/mod_feed/helper.php b/modules/mod_feed/helper.php index 040fc21bd9dff..19c8cf70acb05 100644 --- a/modules/mod_feed/helper.php +++ b/modules/mod_feed/helper.php @@ -36,15 +36,7 @@ public static function getFeed($params) $feed = new JFeedFactory; $rssDoc = $feed->getFeed($rssurl); } - catch (InvalidArgumentException $e) - { - return JText::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED'); - } - catch (RunTimeException $e) - { - return JText::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED'); - } - catch (LogicException $e) + catch (Exception $e) { return JText::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED'); } From 7fc84e37b13900a60610bb421ddbe77cfc58db9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyril=20Rez=C3=A9?= Date: Tue, 17 May 2016 20:40:09 +0200 Subject: [PATCH 153/294] [com_newsfeeds] Coding standards form xml + correction wrong closing tags (#10535) * Remove extra empty line at end of xml file * Improve readability filter_newsfeeds.xml * Code style newsfeed.xml + fix wrong closing tag "catid" and "tags" * Code style config.xml + fix a few space indent --- .../components/com_newsfeeds/config.xml | 284 +++++---- .../models/forms/filter_newsfeeds.xml | 27 +- .../com_newsfeeds/models/forms/newsfeed.xml | 554 ++++++++++++------ .../components/com_newsfeeds/newsfeeds.xml | 1 - 4 files changed, 553 insertions(+), 313 deletions(-) diff --git a/administrator/components/com_newsfeeds/config.xml b/administrator/components/com_newsfeeds/config.xml index 7331dc0154988..3091aff7bc7e0 100644 --- a/administrator/components/com_newsfeeds/config.xml +++ b/administrator/components/com_newsfeeds/config.xml @@ -1,13 +1,15 @@ -
    + description="COM_NEWSFEEDS_FIELD_CONFIG_NEWSFEED_SETTINGS_DESC" + > @@ -30,65 +32,69 @@ + description="COM_NEWSFEEDS_FIELD_SHOW_FEED_IMAGE_DESC" + id="show_feed_image" + default="1" + class="btn-group btn-group-yesno" + > + description="COM_NEWSFEEDS_FIELD_SHOW_FEED_DESCRIPTION_DESC" + id="show_feed_description" + default="1" + class="btn-group btn-group-yesno" + > + description="COM_NEWSFEEDS_FIELD_SHOW_ITEM_DESCRIPTION_DESC" + id="show_item_description" + default="1" + class="btn-group btn-group-yesno" + > + description="COM_NEWSFEEDS_FIELD_CHARACTER_COUNT_DESC" + id="feed_character_count" + default="0" + size="6" + /> + id="feed_display_order" + > @@ -97,42 +103,47 @@ name="float_first" type="list" label="COM_NEWSFEEDS_FLOAT_LABEL" - description="COM_NEWSFEEDS_FLOAT_DESC"> - - - + description="COM_NEWSFEEDS_FLOAT_DESC" + > + + + + - - - + description="COM_NEWSFEEDS_FLOAT_DESC" + > + + + + description="COM_NEWSFEEDS_FIELD_SHOW_TAGS_DESC" + id="show_tags" + default="1" + class="btn-group btn-group-yesno" + > -
    + description="COM_NEWSFEEDS_FIELD_CONFIG_CATEGORY_SETTINGS_DESC" + > - + class="btn-group btn-group-yesno" + > + description="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC" + id="show_description" + default="1" + class="btn-group btn-group-yesno" + > @@ -165,20 +179,22 @@ - - - + default="1" + class="btn-group btn-group-yesno" + > + + + - + > @@ -188,72 +204,83 @@ - + > - + > + id="show_cat_items" + default="1" + class="btn-group btn-group-yesno" + > - + class="btn-group btn-group-yesno" + > -
    -
    + description="COM_NEWSFEEDS_CATEGORIES_DESC" + > - + default="1" + class="btn-group btn-group-yesno" + > - + description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC" + default="-1" + > @@ -261,116 +288,123 @@ - - + > - + > - + description="COM_NEWSFEEDS_FIELD_SHOW_CAT_ITEMS_DESC" + default="1" + class="btn-group btn-group-yesno" + > -
    + description="COM_NEWSFEEDS_FIELD_CONFIG_LIST_SETTINGS_DESC" + > - - + + + default="1" + class="btn-group btn-group-yesno" + > + id="show_headings" + default="1" + class="btn-group btn-group-yesno" + > + id="show_articles" + default="1" + class="btn-group btn-group-yesno" + > + id="show_link" + default="1" + class="btn-group btn-group-yesno" + > - + default="2" + > @@ -379,16 +413,15 @@ + > -
    + section="component" + />
    diff --git a/administrator/components/com_newsfeeds/models/forms/filter_newsfeeds.xml b/administrator/components/com_newsfeeds/models/forms/filter_newsfeeds.xml index 14496643ff764..60f597b38c7cb 100644 --- a/administrator/components/com_newsfeeds/models/forms/filter_newsfeeds.xml +++ b/administrator/components/com_newsfeeds/models/forms/filter_newsfeeds.xml @@ -1,6 +1,8 @@
    + + + + + + JOPTION_SELECT_LANGUAGE + + JOPTION_SELECT_MAX_LEVELS + + COM_NEWSFEEDS_NUM_ARTICLES_HEADING_DESC - - + + + diff --git a/administrator/components/com_newsfeeds/models/forms/newsfeed.xml b/administrator/components/com_newsfeeds/models/forms/newsfeed.xml index 01ded7187560e..be19faf6e20cc 100644 --- a/administrator/components/com_newsfeeds/models/forms/newsfeed.xml +++ b/administrator/components/com_newsfeeds/models/forms/newsfeed.xml @@ -1,258 +1,431 @@ +
    - - + + + required="true" + /> - - - - - - - + /> + + + + + + - - + /> - + > - - + /> - - + /> - + size="60" + required="true" + filter="url" + /> - + default="5" + size="2" + required="true" + /> - + default="3600" + size="4" + required="true" + /> - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - -
    - - + size="6" + readonly="true" + filter="unset" + /> + + + + + + + + + + + + + + + +
    + + + + - - - - + + - - + + + + + + + + - - - -
    -
    +
    + + + + +
    +
    - + default="5" + size="2" + required="true" + /> - + default="3600" + size="4" + required="true" + /> - - - - + default="0" + > + + + + - + > - + > - + > - + + + /> - + > @@ -278,13 +453,15 @@ +
    - + @@ -292,18 +469,27 @@ - +
    - - + filter="unset" + />
    diff --git a/administrator/components/com_newsfeeds/newsfeeds.xml b/administrator/components/com_newsfeeds/newsfeeds.xml index a071a841fde6e..4575df016a385 100644 --- a/administrator/components/com_newsfeeds/newsfeeds.xml +++ b/administrator/components/com_newsfeeds/newsfeeds.xml @@ -62,4 +62,3 @@ - From 2bad919f164eeda8c7ff6b14ae770deed58c19cf Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Wed, 18 May 2016 08:52:48 +0100 Subject: [PATCH 154/294] [Install Languages] Add logo layer on install languages packages (#10396) * add logo layer on install languages * no transparency in the logo, only on the layer * vannila js and improvements * simplify * better comments * move to core js * add the same method to installation * remove form isis js * also used in installation now * lack of coffee ... * thanks Fedik * cs * allow to set parent element and other top units * just change the @since * spaces * organize doc block * forget to change this. Tests are still valid as the part that was changed was not used yet. * solves relative paths * fix conflicts 1 * fix conflicts final * add also in hathor install languages override --- .../views/languages/tmpl/default.php | 12 ++++ .../html/com_installer/languages/default.php | 13 +++- administrator/templates/hathor/index.php | 2 +- administrator/templates/isis/index.php | 2 +- installation/template/css/template.css | 14 ---- installation/template/index.php | 2 +- installation/template/js/installation.js | 23 ++++--- media/system/js/core-uncompressed.js | 65 +++++++++++++++++++ media/system/js/core.js | 2 +- 9 files changed, 104 insertions(+), 31 deletions(-) diff --git a/administrator/components/com_installer/views/languages/tmpl/default.php b/administrator/components/com_installer/views/languages/tmpl/default.php index 6693d9cf16a36..46287b8344faa 100644 --- a/administrator/components/com_installer/views/languages/tmpl/default.php +++ b/administrator/components/com_installer/views/languages/tmpl/default.php @@ -16,6 +16,18 @@ $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); +// Add spindle-wheel for language installation. +JFactory::getDocument()->addScriptDeclaration(' +jQuery(document).ready(function($) { + Joomla.loadingLayer("load"); + $("#adminForm").on("submit", function(e) { + if (document.getElementsByName("task")[0].value == "languages.install") + { + Joomla.loadingLayer("show"); + } + }); +}); +'); ?>
    diff --git a/administrator/templates/hathor/html/com_installer/languages/default.php b/administrator/templates/hathor/html/com_installer/languages/default.php index 09e92596e4447..ab53e6fa86f5d 100644 --- a/administrator/templates/hathor/html/com_installer/languages/default.php +++ b/administrator/templates/hathor/html/com_installer/languages/default.php @@ -17,8 +17,19 @@ $version = new JVersion; +// Add spindle-wheel for language installation. +JFactory::getDocument()->addScriptDeclaration(' +jQuery(document).ready(function($) { + Joomla.loadingLayer("load"); + $("#adminForm").on("submit", function(e) { + if (document.getElementsByName("task")[0].value == "languages.install") + { + Joomla.loadingLayer("show"); + } + }); +}); +'); ?> -
    sidebar)) : ?> diff --git a/administrator/templates/hathor/index.php b/administrator/templates/hathor/index.php index 7463312aa1029..71f7b827cb130 100644 --- a/administrator/templates/hathor/index.php +++ b/administrator/templates/hathor/index.php @@ -99,7 +99,7 @@ -
    +