bundle5.js 1.12 MB
Newer Older
Ketan's avatar
Ketan committed
1 2 3
require.config({"config": {
        "jsbuild":{"Magento_Tinymce3/tiny_mce/classes/Editor.js":"/**\n * Editor.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t// Shorten these names\n\tvar DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend,\n\t\tDispatcher = tinymce.util.Dispatcher, each = tinymce.each, isGecko = tinymce.isGecko,\n\t\tisIE = tinymce.isIE, isWebKit = tinymce.isWebKit, is = tinymce.is,\n\t\tThemeManager = tinymce.ThemeManager, PluginManager = tinymce.PluginManager,\n\t\tinArray = tinymce.inArray, grep = tinymce.grep, explode = tinymce.explode;\n\n\t/**\n\t * This class contains the core logic for a TinyMCE editor.\n\t *\n\t * @class tinymce.Editor\n\t * @example\n\t * // Add a class to all paragraphs in the editor.\n\t * tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('p'), 'someclass');\n\t *\n\t * // Gets the current editors selection as text\n\t * tinyMCE.activeEditor.selection.getContent({format : 'text'});\n\t *\n\t * // Creates a new editor instance\n\t * var ed = new tinymce.Editor('textareaid', {\n\t *     some_setting : 1\n\t * });\n\t *\n\t * // Select each item the user clicks on\n\t * ed.onClick.add(function(ed, e) {\n\t *     ed.selection.select(e.target);\n\t * });\n\t *\n\t * ed.render();\n\t */\n\ttinymce.create('tinymce.Editor', {\n\t\t/**\n\t\t * Constructs a editor instance by id.\n\t\t *\n\t\t * @constructor\n\t\t * @method Editor\n\t\t * @param {String} id Unique id for the editor.\n\t\t * @param {Object} s Optional settings string for the editor.\n\t\t * @author Moxiecode\n\t\t */\n\t\tEditor : function(id, s) {\n\t\t\tvar t = this;\n\n\t\t\t/**\n\t\t\t * Editor instance id, normally the same as the div/textarea that was replaced.\n\t\t\t *\n\t\t\t * @property id\n\t\t\t * @type String\n\t\t\t */\n\t\t\tt.id = t.editorId = id;\n\n\t\t\tt.execCommands = {};\n\t\t\tt.queryStateCommands = {};\n\t\t\tt.queryValueCommands = {};\n\n\t\t\t/**\n\t\t\t * State to force the editor to return false on a isDirty call.\n\t\t\t *\n\t\t\t * @property isNotDirty\n\t\t\t * @type Boolean\n\t\t\t * @example\n\t\t\t * function ajaxSave() {\n\t\t\t *     var ed = tinyMCE.get('elm1');\n\t\t\t *\n\t\t\t *     // Save contents using some XHR call\n\t\t\t *     alert(ed.getContent());\n\t\t\t *\n\t\t\t *     ed.isNotDirty = 1; // Force not dirty state\n\t\t\t * }\n\t\t\t */\n\t\t\tt.isNotDirty = false;\n\n\t\t\t/**\n\t\t\t * Name/Value object containting plugin instances.\n\t\t\t *\n\t\t\t * @property plugins\n\t\t\t * @type Object\n\t\t\t * @example\n\t\t\t * // Execute a method inside a plugin directly\n\t\t\t * tinyMCE.activeEditor.plugins.someplugin.someMethod();\n\t\t\t */\n\t\t\tt.plugins = {};\n\n\t\t\t// Add events to the editor\n\t\t\teach([\n\t\t\t\t/**\n\t\t\t\t * Fires before the initialization of the editor.\n\t\t\t\t *\n\t\t\t\t * @event onPreInit\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @see #onInit\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onPreInit event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onPreInit.add(function(ed) {\n\t\t\t\t *           console.debug('PreInit: ' + ed.id);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onPreInit',\n\n\t\t\t\t/**\n\t\t\t\t * Fires before the initialization of the editor.\n\t\t\t\t *\n\t\t\t\t * @event onBeforeRenderUI\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onBeforeRenderUI event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n \t\t\t\t *      ed.onBeforeRenderUI.add(function(ed, cm) {\n \t\t\t\t *          console.debug('Before render: ' + ed.id);\n \t\t\t\t *      });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onBeforeRenderUI',\n\n\t\t\t\t/**\n\t\t\t\t * Fires after the rendering has completed.\n\t\t\t\t *\n\t\t\t\t * @event onPostRender\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onPostRender event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onPostRender.add(function(ed, cm) {\n\t\t\t\t *           console.debug('After render: ' + ed.id);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onPostRender',\n\n\t\t\t\t/**\n\t\t\t\t * Fires after the initialization of the editor is done.\n\t\t\t\t *\n\t\t\t\t * @event onInit\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @see #onPreInit\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onInit event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onInit.add(function(ed) {\n\t\t\t\t *           console.debug('Editor is done: ' + ed.id);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onInit',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the editor instance is removed from page.\n\t\t\t\t *\n\t\t\t\t * @event onRemove\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onRemove event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onRemove.add(function(ed) {\n\t\t\t\t *           console.debug('Editor was removed: ' + ed.id);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onRemove',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the editor is activated.\n\t\t\t\t *\n\t\t\t\t * @event onActivate\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onActivate event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onActivate.add(function(ed) {\n\t\t\t\t *           console.debug('Editor was activated: ' + ed.id);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onActivate',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the editor is deactivated.\n\t\t\t\t *\n\t\t\t\t * @event onDeactivate\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onDeactivate event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onDeactivate.add(function(ed) {\n\t\t\t\t *           console.debug('Editor was deactivated: ' + ed.id);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onDeactivate',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when something in the body of the editor is clicked.\n\t\t\t\t *\n\t\t\t\t * @event onClick\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onClick event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onClick.add(function(ed, e) {\n\t\t\t\t *           console.debug('Editor was clicked: ' + e.target.nodeName);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onClick',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when a registered event is intercepted.\n\t\t\t\t *\n\t\t\t\t * @event onEvent\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onEvent event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onEvent.add(function(ed, e) {\n \t\t\t\t *          console.debug('Editor event occurred: ' + e.target.nodeName);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onEvent',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when a mouseup event is intercepted inside the editor.\n\t\t\t\t *\n\t\t\t\t * @event onMouseUp\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onMouseUp event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onMouseUp.add(function(ed, e) {\n\t\t\t\t *           console.debug('Mouse up event: ' + e.target.nodeName);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onMouseUp',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when a mousedown event is intercepted inside the editor.\n\t\t\t\t *\n\t\t\t\t * @event onMouseDown\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onMouseDown event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onMouseDown.add(function(ed, e) {\n\t\t\t\t *           console.debug('Mouse down event: ' + e.target.nodeName);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onMouseDown',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when a dblclick event is intercepted inside the editor.\n\t\t\t\t *\n\t\t\t\t * @event onDblClick\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onDblClick event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onDblClick.add(function(ed, e) {\n \t\t\t\t *          console.debug('Double click event: ' + e.target.nodeName);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onDblClick',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when a keydown event is intercepted inside the editor.\n\t\t\t\t *\n\t\t\t\t * @event onKeyDown\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onKeyDown event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onKeyDown.add(function(ed, e) {\n\t\t\t\t *           console.debug('Key down event: ' + e.keyCode);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onKeyDown',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when a keydown event is intercepted inside the editor.\n\t\t\t\t *\n\t\t\t\t * @event onKeyUp\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onKeyUp event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onKeyUp.add(function(ed, e) {\n\t\t\t\t *           console.debug('Key up event: ' + e.keyCode);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onKeyUp',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when a keypress event is intercepted inside the editor.\n\t\t\t\t *\n\t\t\t\t * @event onKeyPress\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onKeyPress event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onKeyPress.add(function(ed, e) {\n\t\t\t\t *           console.debug('Key press event: ' + e.keyCode);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onKeyPress',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when a contextmenu event is intercepted inside the editor.\n\t\t\t\t *\n\t\t\t\t * @event onContextMenu\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onContextMenu event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onContextMenu.add(function(ed, e) {\n\t\t\t\t *            console.debug('Context menu event:' + e.target);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onContextMenu',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when a form submit event is intercepted.\n\t\t\t\t *\n\t\t\t\t * @event onSubmit\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onSubmit event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onSubmit.add(function(ed, e) {\n\t\t\t\t *            console.debug('Form submit:' + e.target);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onSubmit',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when a form reset event is intercepted.\n\t\t\t\t *\n\t\t\t\t * @event onReset\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onReset event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onReset.add(function(ed, e) {\n\t\t\t\t *            console.debug('Form reset:' + e.target);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onReset',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when a paste event is intercepted inside the editor.\n\t\t\t\t *\n\t\t\t\t * @event onPaste\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onPaste event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onPaste.add(function(ed, e) {\n\t\t\t\t *            console.debug('Pasted plain text');\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onPaste',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the Serializer does a preProcess on the contents.\n\t\t\t\t *\n\t\t\t\t * @event onPreProcess\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Object} obj PreProcess object.\n\t\t\t\t * @option {Node} node DOM node for the item being serialized.\n\t\t\t\t * @option {String} format The specified output format normally \"html\".\n\t\t\t\t * @option {Boolean} get Is true if the process is on a getContent operation.\n\t\t\t\t * @option {Boolean} set Is true if the process is on a setContent operation.\n\t\t\t\t * @option {Boolean} cleanup Is true if the process is on a cleanup operation.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onPreProcess event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onPreProcess.add(function(ed, o) {\n\t\t\t\t *            // Add a class to each paragraph in the editor\n\t\t\t\t *            ed.dom.addClass(ed.dom.select('p', o.node), 'myclass');\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onPreProcess',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the Serializer does a postProcess on the contents.\n\t\t\t\t *\n\t\t\t\t * @event onPostProcess\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Object} obj PreProcess object.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onPostProcess event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onPostProcess.add(function(ed, o) {\n\t\t\t\t *            // Remove all paragraphs and replace with BR\n\t\t\t\t *            o.content = o.content.replace(/<p[^>]+>|<p>/g, '');\n\t\t\t\t *            o.content = o.content.replace(/<\\/p>/g, '<br />');\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onPostProcess',\n\n\t\t\t\t/**\n\t\t\t\t * Fires before new contents is added to the editor. Using for example setContent.\n\t\t\t\t *\n\t\t\t\t * @event onBeforeSetContent\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onBeforeSetContent event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onBeforeSetContent.add(function(ed, o) {\n\t\t\t\t *            // Replaces all a characters with b characters\n\t\t\t\t *            o.content = o.content.replace(/a/g, 'b');\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onBeforeSetContent',\n\n\t\t\t\t/**\n\t\t\t\t * Fires before contents is extracted from the editor using for example getContent.\n\t\t\t\t *\n\t\t\t\t * @event onBeforeGetContent\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Event} evt W3C DOM Event instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onBeforeGetContent event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onBeforeGetContent.add(function(ed, o) {\n\t\t\t\t *            console.debug('Before get content.');\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onBeforeGetContent',\n\n\t\t\t\t/**\n\t\t\t\t * Fires after the contents has been added to the editor using for example onSetContent.\n\t\t\t\t *\n\t\t\t\t * @event onSetContent\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onSetContent event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onSetContent.add(function(ed, o) {\n\t\t\t\t *            // Replaces all a characters with b characters\n\t\t\t\t *            o.content = o.content.replace(/a/g, 'b');\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onSetContent',\n\n\t\t\t\t/**\n\t\t\t\t * Fires after the contents has been extracted from the editor using for example getContent.\n\t\t\t\t *\n\t\t\t\t * @event onGetContent\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onGetContent event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onGetContent.add(function(ed, o) {\n\t\t\t\t *           // Replace all a characters with b\n\t\t\t\t *           o.content = o.content.replace(/a/g, 'b');\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onGetContent',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the editor gets loaded with contents for example when the load method is executed.\n\t\t\t\t *\n\t\t\t\t * @event onLoadContent\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onLoadContent event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onLoadContent.add(function(ed, o) {\n\t\t\t\t *           // Output the element name\n\t\t\t\t *           console.debug(o.element.nodeName);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onLoadContent',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the editor contents gets saved for example when the save method is executed.\n\t\t\t\t *\n\t\t\t\t * @event onSaveContent\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onSaveContent event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onSaveContent.add(function(ed, o) {\n\t\t\t\t *           // Output the element name\n\t\t\t\t *           console.debug(o.element.nodeName);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onSaveContent',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the user changes node location using the mouse or keyboard.\n\t\t\t\t *\n\t\t\t\t * @event onNodeChange\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onNodeChange event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onNodeChange.add(function(ed, cm, e) {\n\t\t\t\t *           // Activates the link button when the caret is placed in a anchor element\n\t\t\t\t *           if (e.nodeName == 'A')\n\t\t\t\t *              cm.setActive('link', true);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onNodeChange',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when a new undo level is added to the editor.\n\t\t\t\t *\n\t\t\t\t * @event onChange\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onChange event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t * \t  ed.onChange.add(function(ed, l) {\n\t\t\t\t * \t\t  console.debug('Editor contents was modified. Contents: ' + l.content);\n\t\t\t\t * \t  });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onChange',\n\n\t\t\t\t/**\n\t\t\t\t * Fires before a command gets executed for example \"Bold\".\n\t\t\t\t *\n\t\t\t\t * @event onBeforeExecCommand\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onBeforeExecCommand event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) {\n\t\t\t\t *           console.debug('Command is to be executed: ' + cmd);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onBeforeExecCommand',\n\n\t\t\t\t/**\n\t\t\t\t * Fires after a command is executed for example \"Bold\".\n\t\t\t\t *\n\t\t\t\t * @event onExecCommand\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onExecCommand event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onExecCommand.add(function(ed, cmd, ui, val) {\n\t\t\t\t *           console.debug('Command was executed: ' + cmd);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onExecCommand',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the contents is undo:ed.\n\t\t\t\t *\n\t\t\t\t * @event onUndo\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Object} level Undo level object.\n\t\t\t\t * @ example\n\t\t\t\t * // Adds an observer to the onUndo event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onUndo.add(function(ed, level) {\n\t\t\t\t *           console.debug('Undo was performed: ' + level.content);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onUndo',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the contents is redo:ed.\n\t\t\t\t *\n\t\t\t\t * @event onRedo\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @param {Object} level Undo level object.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onRedo event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onRedo.add(function(ed, level) {\n\t\t\t\t *           console.debug('Redo was performed: ' +level.content);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onRedo',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when visual aids is enabled/disabled.\n\t\t\t\t *\n\t\t\t\t * @event onVisualAid\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onVisualAid event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onVisualAid.add(function(ed, e, s) {\n\t\t\t\t *           console.debug('onVisualAid event: ' + ed.id + \", State: \" + s);\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onVisualAid',\n\n\t\t\t\t/**\n\t\t\t\t * Fires when the progress throbber is shown above the editor.\n\t\t\t\t *\n\t\t\t\t * @event onSetProgressState\n\t\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t\t * @example\n\t\t\t\t * // Adds an observer to the onSetProgressState event using tinyMCE.init\n\t\t\t\t * tinyMCE.init({\n\t\t\t\t *    ...\n\t\t\t\t *    setup : function(ed) {\n\t\t\t\t *       ed.onSetProgressState.add(function(ed, b) {\n\t\t\t\t *            if (b)\n\t\t\t\t *                 console.debug('SHOW!');\n\t\t\t\t *            else\n\t\t\t\t *                 console.debug('HIDE!');\n\t\t\t\t *       });\n\t\t\t\t *    }\n\t\t\t\t * });\n\t\t\t\t */\n\t\t\t\t'onSetProgressState'\n\t\t\t], function(e) {\n\t\t\t\tt[e] = new Dispatcher(t);\n\t\t\t});\n\n\t\t\t/**\n\t\t\t * Name/value collection with editor settings.\n\t\t\t *\n\t\t\t * @property settings\n\t\t\t * @type Object\n\t\t\t * @example\n\t\t\t * // Get the value of the theme setting\n\t\t\t * tinyMCE.activeEditor.windowManager.alert(\"You are using the \" + tinyMCE.activeEditor.settings.theme + \" theme\");\n\t\t\t */\n\t\t\tt.settings = s = extend({\n\t\t\t\tid : id,\n\t\t\t\tlanguage : 'en',\n\t\t\t\tdocs_language : 'en',\n\t\t\t\ttheme : 'simple',\n\t\t\t\tskin : 'default',\n\t\t\t\tdelta_width : 0,\n\t\t\t\tdelta_height : 0,\n\t\t\t\tpopup_css : '',\n\t\t\t\tplugins : '',\n\t\t\t\tdocument_base_url : tinymce.documentBaseURL,\n\t\t\t\tadd_form_submit_trigger : 1,\n\t\t\t\tsubmit_patch : 1,\n\t\t\t\tadd_unload_trigger : 1,\n\t\t\t\tconvert_urls : 1,\n\t\t\t\trelative_urls : 1,\n\t\t\t\tremove_script_host : 1,\n\t\t\t\ttable_inline_editing : 0,\n\t\t\t\tobject_resizing : 1,\n\t\t\t\tcleanup : 1,\n\t\t\t\taccessibility_focus : 1,\n\t\t\t\tcustom_shortcuts : 1,\n\t\t\t\tcustom_undo_redo_keyboard_shortcuts : 1,\n\t\t\t\tcustom_undo_redo_restore_selection : 1,\n\t\t\t\tcustom_undo_redo : 1,\n\t\t\t\tdoctype : tinymce.isIE6 ? '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">' : '<!DOCTYPE>', // Use old doctype on IE 6 to avoid horizontal scroll\n\t\t\t\tvisual_table_class : 'mceItemTable',\n\t\t\t\tvisual : 1,\n\t\t\t\tfont_size_style_values : 'xx-small,x-small,small,medium,large,x-large,xx-large',\n\t\t\t\tfont_size_legacy_values : 'xx-small,small,medium,large,x-large,xx-large,300%', // See: http://www.w3.org/TR/CSS2/fonts.html#propdef-font-size\n\t\t\t\tapply_source_formatting : 1,\n\t\t\t\tdirectionality : 'ltr',\n\t\t\t\tforced_root_block : 'p',\n\t\t\t\thidden_input : 1,\n\t\t\t\tpadd_empty_editor : 1,\n\t\t\t\trender_ui : 1,\n\t\t\t\tinit_theme : 1,\n\t\t\t\tforce_p_newlines : 1,\n\t\t\t\tindentation : '30px',\n\t\t\t\tkeep_styles : 1,\n\t\t\t\tfix_table_elements : 1,\n\t\t\t\tinline_styles : 1,\n\t\t\t\tconvert_fonts_to_spans : true,\n\t\t\t\tindent : 'simple',\n\t\t\t\tindent_before : 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr',\n\t\t\t\tindent_after : 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr',\n\t\t\t\tvalidate : true,\n\t\t\t\tentity_encoding : 'named',\n\t\t\t\turl_converter : t.convertURL,\n\t\t\t\turl_converter_scope : t,\n\t\t\t\tie7_compat : true\n\t\t\t}, s);\n\n\t\t\t/**\n\t\t\t * URI object to document configured for the TinyMCE instance.\n\t\t\t *\n\t\t\t * @property documentBaseURI\n\t\t\t * @type tinymce.util.URI\n\t\t\t * @example\n\t\t\t * // Get relative URL from the location of document_base_url\n\t\t\t * tinyMCE.activeEditor.documentBaseURI.toRelative('/somedir/somefile.htm');\n\t\t\t *\n\t\t\t * // Get absolute URL from the location of document_base_url\n\t\t\t * tinyMCE.activeEditor.documentBaseURI.toAbsolute('somefile.htm');\n\t\t\t */\n\t\t\tt.documentBaseURI = new tinymce.util.URI(s.document_base_url || tinymce.documentBaseURL, {\n\t\t\t\tbase_uri : tinyMCE.baseURI\n\t\t\t});\n\n\t\t\t/**\n\t\t\t * URI object to current document that holds the TinyMCE editor instance.\n\t\t\t *\n\t\t\t * @property baseURI\n\t\t\t * @type tinymce.util.URI\n\t\t\t * @example\n\t\t\t * // Get relative URL from the location of the API\n\t\t\t * tinyMCE.activeEditor.baseURI.toRelative('/somedir/somefile.htm');\n\t\t\t *\n\t\t\t * // Get absolute URL from the location of the API\n\t\t\t * tinyMCE.activeEditor.baseURI.toAbsolute('somefile.htm');\n\t\t\t */\n\t\t\tt.baseURI = tinymce.baseURI;\n\n\t\t\t/**\n\t\t\t * Array with CSS files to load into the iframe.\n\t\t\t *\n\t\t\t * @property contentCSS\n\t\t\t * @type Array\n\t\t\t */\n\t\t\tt.contentCSS = [];\n\n\t\t\t// Call setup\n\t\t\tt.execCallback('setup', t);\n\t\t},\n\n\t\t/**\n\t\t * Renderes the editor/adds it to the page.\n\t\t *\n\t\t * @method render\n\t\t */\n\t\trender : function(nst) {\n\t\t\tvar t = this, s = t.settings, id = t.id, sl = tinymce.ScriptLoader;\n\n\t\t\t// Page is not loaded yet, wait for it\n\t\t\tif (!Event.domLoaded) {\n\t\t\t\tEvent.add(document, 'init', function() {\n\t\t\t\t\tt.render();\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttinyMCE.settings = s;\n\n\t\t\t// Element not found, then skip initialization\n\t\t\tif (!t.getElement())\n\t\t\t\treturn;\n\n\t\t\t// Is a iPad/iPhone and not on iOS5, then skip initialization. We need to sniff\n\t\t\t// here since the browser says it has contentEditable support but there is no visible\n\t\t\t// caret We will remove this check ones Apple implements full contentEditable support\n\t\t\tif (tinymce.isIDevice && !tinymce.isIOS5)\n\t\t\t\treturn;\n\n\t\t\t// Add hidden input for non input elements inside form elements\n\t\t\tif (!/TEXTAREA|INPUT/i.test(t.getElement().nodeName) && s.hidden_input && DOM.getParent(id, 'form'))\n\t\t\t\tDOM.insertAfter(DOM.create('input', {type : 'hidden', name : id}), id);\n\n\t\t\t/**\n\t\t\t * Window manager reference, use this to open new windows and dialogs.\n\t\t\t *\n\t\t\t * @property windowManager\n\t\t\t * @type tinymce.WindowManager\n\t\t\t * @example\n\t\t\t * // Shows an alert message\n\t\t\t * tinyMCE.activeEditor.windowManager.alert('Hello world!');\n\t\t\t *\n\t\t\t * // Opens a new dialog with the file.htm file and the size 320x240\n\t\t\t * // It also adds a custom parameter this can be retrieved by using tinyMCEPopup.getWindowArg inside the dialog.\n\t\t\t * tinyMCE.activeEditor.windowManager.open({\n\t\t\t *    url : 'file.htm',\n\t\t\t *    width : 320,\n\t\t\t *    height : 240\n\t\t\t * }, {\n\t\t\t *    custom_param : 1\n\t\t\t * });\n\t\t\t */\n\t\t\tif (tinymce.WindowManager)\n\t\t\t\tt.windowManager = new tinymce.WindowManager(t);\n\n\t\t\tif (s.encoding == 'xml') {\n\t\t\t\tt.onGetContent.add(function(ed, o) {\n\t\t\t\t\tif (o.save)\n\t\t\t\t\t\to.content = DOM.encode(o.content);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (s.add_form_submit_trigger) {\n\t\t\t\tt.onSubmit.addToTop(function() {\n\t\t\t\t\tif (t.initialized) {\n\t\t\t\t\t\tt.save();\n\t\t\t\t\t\tt.isNotDirty = 1;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (s.add_unload_trigger) {\n\t\t\t\tt._beforeUnload = tinyMCE.onBeforeUnload.add(function() {\n\t\t\t\t\tif (t.initialized && !t.destroyed && !t.isHidden())\n\t\t\t\t\t\tt.save({format : 'raw', no_events : true});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\ttinymce.addUnload(t.destroy, t);\n\n\t\t\tif (s.submit_patch) {\n\t\t\t\tt.onBeforeRenderUI.add(function() {\n\t\t\t\t\tvar n = t.getElement().form;\n\n\t\t\t\t\tif (!n)\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t// Already patched\n\t\t\t\t\tif (n._mceOldSubmit)\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t// Check page uses id=\"submit\" or name=\"submit\" for it's submit button\n\t\t\t\t\tif (!n.submit.nodeType && !n.submit.length) {\n\t\t\t\t\t\tt.formElement = n;\n\t\t\t\t\t\tn._mceOldSubmit = n.submit;\n\t\t\t\t\t\tn.submit = function() {\n\t\t\t\t\t\t\t// Save all instances\n\t\t\t\t\t\t\ttinymce.triggerSave();\n\t\t\t\t\t\t\tt.isNotDirty = 1;\n\n\t\t\t\t\t\t\treturn t.formElement._mceOldSubmit(t.formElement);\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\tn = null;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Load scripts\n\t\t\tfunction loadScripts() {\n\t\t\t\tif (s.language && s.language_load !== false)\n\t\t\t\t\tsl.add(tinymce.baseURL + '/langs/' + s.language + '.js');\n\n\t\t\t\tif (s.theme && s.theme.charAt(0) != '-' && !ThemeManager.urls[s.theme])\n\t\t\t\t\tThemeManager.load(s.theme, 'themes/' + s.theme + '/editor_template' + tinymce.suffix + '.js');\n\n\t\t\t\teach(explode(s.plugins), function(p) {\n\t\t\t\t\tif (p &&!PluginManager.urls[p]) {\n\t\t\t\t\t\tif (p.charAt(0) == '-') {\n\t\t\t\t\t\t\tp = p.substr(1, p.length);\n\t\t\t\t\t\t\tvar dependencies = PluginManager.dependencies(p);\n\t\t\t\t\t\t\teach(dependencies, function(dep) {\n\t\t\t\t\t\t\t\tvar defaultSettings = {prefix:'plugins/', resource: dep, suffix:'/editor_plugin' + tinymce.suffix + '.js'};\n\t\t\t\t\t\t\t\tvar dep = PluginManager.createUrl(defaultSettings, dep);\n\t\t\t\t\t\t\t\tPluginManager.load(dep.resource, dep);\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Skip safari plugin, since it is removed as of 3.3b1\n\t\t\t\t\t\t\tif (p == 'safari') {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tPluginManager.load(p, {prefix:'plugins/', resource: p, suffix:'/editor_plugin' + tinymce.suffix + '.js'});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Init when que is loaded\n\t\t\t\tsl.loadQueue(function() {\n\t\t\t\t\tif (!t.removed)\n\t\t\t\t\t\tt.init();\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tloadScripts();\n\t\t},\n\n\t\t/**\n\t\t * Initializes the editor this will be called automatically when\n\t\t * all plugins/themes and language packs are loaded by the rendered method.\n\t\t * This method will setup the iframe and create the theme and plugin instances.\n\t\t *\n\t\t * @method init\n\t\t */\n\t\tinit : function() {\n\t\t\tvar n, t = this, s = t.settings, w, h, e = t.getElement(), o, ti, u, bi, bc, re, i, initializedPlugins = [];\n\n\t\t\ttinymce.add(t);\n\n\t\t\ts.aria_label = s.aria_label || DOM.getAttrib(e, 'aria-label', t.getLang('aria.rich_text_area'));\n\n\t\t\t/**\n\t\t\t * Reference to the theme instance that was used to generate the UI.\n\t\t\t *\n\t\t\t * @property theme\n\t\t\t * @type tinymce.Theme\n\t\t\t * @example\n\t\t\t * // Executes a method on the theme directly\n\t\t\t * tinyMCE.activeEditor.theme.someMethod();\n\t\t\t */\n\t\t\tif (s.theme) {\n\t\t\t\ts.theme = s.theme.replace(/-/, '');\n\t\t\t\to = ThemeManager.get(s.theme);\n\t\t\t\tt.theme = new o();\n\n\t\t\t\tif (t.theme.init && s.init_theme)\n\t\t\t\t\tt.theme.init(t, ThemeManager.urls[s.theme] || tinymce.documentBaseURL.replace(/\\/$/, ''));\n\t\t\t}\n\t\t\tfunction initPlugin(p) {\n\t\t\t\tvar c = PluginManager.get(p), u = PluginManager.urls[p] || tinymce.documentBaseURL.replace(/\\/$/, ''), po;\n\t\t\t\tif (c && tinymce.inArray(initializedPlugins,p) === -1) {\n\t\t\t\t\teach(PluginManager.dependencies(p), function(dep){\n\t\t\t\t\t\tinitPlugin(dep);\n\t\t\t\t\t});\n\t\t\t\t\tpo = new c(t, u);\n\n\t\t\t\t\tt.plugins[p] = po;\n\n\t\t\t\t\tif (po.init) {\n\t\t\t\t\t\tpo.init(t, u);\n\t\t\t\t\t\tinitializedPlugins.push(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Create all plugins\n\t\t\teach(explode(s.plugins.replace(/\\-/g, '')), initPlugin);\n\n\t\t\t// Setup popup CSS path(s)\n\t\t\tif (s.popup_css !== false) {\n\t\t\t\tif (s.popup_css)\n\t\t\t\t\ts.popup_css = t.documentBaseURI.toAbsolute(s.popup_css);\n\t\t\t\telse\n\t\t\t\t\ts.popup_css = t.baseURI.toAbsolute(\"themes/\" + s.theme + \"/skins/\" + s.skin + \"/dialog.css\");\n\t\t\t}\n\n\t\t\tif (s.popup_css_add)\n\t\t\t\ts.popup_css += ',' + t.documentBaseURI.toAbsolute(s.popup_css_add);\n\n\t\t\t/**\n\t\t\t * Control manager instance for the editor. Will enables you to create new UI elements and change their states etc.\n\t\t\t *\n\t\t\t * @property controlManager\n\t\t\t * @type tinymce.ControlManager\n\t\t\t * @example\n\t\t\t * // Disables the bold button\n\t\t\t * tinyMCE.activeEditor.controlManager.setDisabled('bold', true);\n\t\t\t */\n\t\t\tt.controlManager = new tinymce.ControlManager(t);\n\n\t\t\tif (s.custom_undo_redo) {\n\t\t\t\tt.onBeforeExecCommand.add(function(ed, cmd, ui, val, a) {\n\t\t\t\t\tif (cmd != 'Undo' && cmd != 'Redo' && cmd != 'mceRepaint' && (!a || !a.skip_undo))\n\t\t\t\t\t\tt.undoManager.beforeChange();\n\t\t\t\t});\n\n\t\t\t\tt.onExecCommand.add(function(ed, cmd, ui, val, a) {\n\t\t\t\t\tif (cmd != 'Undo' && cmd != 'Redo' && cmd != 'mceRepaint' && (!a || !a.skip_undo))\n\t\t\t\t\t\tt.undoManager.add();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tt.onExecCommand.add(function(ed, c) {\n\t\t\t\t// Don't refresh the select lists until caret move\n\t\t\t\tif (!/^(FontName|FontSize)$/.test(c))\n\t\t\t\t\tt.nodeChanged();\n\t\t\t});\n\n\t\t\t// Remove ghost selections on images and tables in Gecko\n\t\t\tif (isGecko) {\n\t\t\t\tfunction repaint(a, o) {\n\t\t\t\t\tif (!o || !o.initial)\n\t\t\t\t\t\tt.execCommand('mceRepaint');\n\t\t\t\t};\n\n\t\t\t\tt.onUndo.add(repaint);\n\t\t\t\tt.onRedo.add(repaint);\n\t\t\t\tt.onSetContent.add(repaint);\n\t\t\t}\n\n\t\t\t// Enables users to override the control factory\n\t\t\tt.onBeforeRenderUI.dispatch(t, t.controlManager);\n\n\t\t\t// Measure box\n\t\t\tif (s.render_ui) {\n\t\t\t\tw = s.width || e.style.width || e.offsetWidth;\n\t\t\t\th = s.height || e.style.height || e.offsetHeight;\n\t\t\t\tt.orgDisplay = e.style.display;\n\t\t\t\tre = /^[0-9\\.]+(|px)$/i;\n\n\t\t\t\tif (re.test('' + w))\n\t\t\t\t\tw = Math.max(parseInt(w) + (o.deltaWidth || 0), 100);\n\n\t\t\t\tif (re.test('' + h))\n\t\t\t\t\th = Math.max(parseInt(h) + (o.deltaHeight || 0), 100);\n\n\t\t\t\t// Render UI\n\t\t\t\to = t.theme.renderUI({\n\t\t\t\t\ttargetNode : e,\n\t\t\t\t\twidth : w,\n\t\t\t\t\theight : h,\n\t\t\t\t\tdeltaWidth : s.delta_width,\n\t\t\t\t\tdeltaHeight : s.delta_height\n\t\t\t\t});\n\n\t\t\t\tt.editorContainer = o.editorContainer;\n\t\t\t}\n\n\t\t\t// #ifdef contentEditable\n\n\t\t\t// Content editable mode ends here\n\t\t\tif (s.content_editable) {\n\t\t\t\te = n = o = null; // Fix IE leak\n\t\t\t\treturn t.setupContentEditable();\n\t\t\t}\n\n\t\t\t// #endif\n\n\t\t\t// User specified a document.domain value\n\t\t\tif (document.domain && location.hostname != document.domain)\n\t\t\t\ttinymce.relaxedDomain = document.domain;\n\n\t\t\t// Resize editor\n\t\t\tDOM.setStyles(o.sizeContainer || o.editorContainer, {\n\t\t\t\twidth : w,\n\t\t\t\theight : h\n\t\t\t});\n\n\t\t\t// Load specified content CSS last\n\t\t\tif (s.content_css) {\n\t\t\t\ttinymce.each(explode(s.content_css), function(u) {\n\t\t\t\t\tt.contentCSS.push(t.documentBaseURI.toAbsolute(u));\n\t\t\t\t});\n\t\t\t}\n\n\t\t\th = (o.iframeHeight || h) + (typeof(h) == 'number' ? (o.deltaHeight || 0) : '');\n\t\t\tif (h < 100)\n\t\t\t\th = 100;\n\n\t\t\tt.iframeHTML = s.doctype + '<html><head xmlns=\"http://www.w3.org/1999/xhtml\">';\n\n\t\t\t// We only need to override paths if we have to\n\t\t\t// IE has a bug where it remove site absolute urls to relative ones if this is specified\n\t\t\tif (s.document_base_url != tinymce.documentBaseURL)\n\t\t\t\tt.iframeHTML += '<base href=\"' + t.documentBaseURI.getURI() + '\" />';\n\n\t\t\t// IE8 doesn't support carets behind images setting ie7_compat would force IE8+ to run in IE7 compat mode.\n\t\t\tif (s.ie7_compat)\n\t\t\t\tt.iframeHTML += '<meta http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />';\n\t\t\telse\n\t\t\t\tt.iframeHTML += '<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />';\n\n\t\t\tt.iframeHTML += '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />';\n\n\t\t\t// Load the CSS by injecting them into the HTML this will reduce \"flicker\"\n\t\t\tfor (i = 0; i < t.contentCSS.length; i++) {\n\t\t\t\tt.iframeHTML += '<link type=\"text/css\" rel=\"stylesheet\" href=\"' + t.contentCSS[i] + '\" />';\n\t\t\t}\n\n\t\t\tbi = s.body_id || 'tinymce';\n\t\t\tif (bi.indexOf('=') != -1) {\n\t\t\t\tbi = t.getParam('body_id', '', 'hash');\n\t\t\t\tbi = bi[t.id] || bi;\n\t\t\t}\n\n\t\t\tbc = s.body_class || '';\n\t\t\tif (bc.indexOf('=') != -1) {\n\t\t\t\tbc = t.getParam('body_class', '', 'hash');\n\t\t\t\tbc = bc[t.id] || '';\n\t\t\t}\n\n\t\t\tt.iframeHTML += '</head><body id=\"' + bi + '\" class=\"mceContentBody ' + bc + '\"><br></body></html>';\n\n\t\t\t// Domain relaxing enabled, then set document domain\n\t\t\tif (tinymce.relaxedDomain && (isIE || (tinymce.isOpera && parseFloat(opera.version()) < 11))) {\n\t\t\t\t// We need to write the contents here in IE since multiple writes messes up refresh button and back button\n\t\t\t\tu = 'javascript:(function(){document.open();document.domain=\"' + document.domain + '\";var ed = window.parent.tinyMCE.get(\"' + t.id + '\");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()';\n\t\t\t}\n\n\t\t\t// Create iframe\n\t\t\t// TODO: ACC add the appropriate description on this.\n\t\t\tn = DOM.add(o.iframeContainer, 'iframe', {\n\t\t\t\tid : t.id + \"_ifr\",\n\t\t\t\tsrc : u || 'javascript:\"\"', // Workaround for HTTPS warning in IE6/7\n\t\t\t\tframeBorder : '0',\n\t\t\t\tallowTransparency : \"true\",\n\t\t\t\ttitle : s.aria_label,\n\t\t\t\tstyle : {\n\t\t\t\t\twidth : '100%',\n\t\t\t\t\theight : h,\n\t\t\t\t\tdisplay : 'block' // Important for Gecko to render the iframe correctly\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tt.contentAreaContainer = o.iframeContainer;\n\t\t\tDOM.get(o.editorContainer).style.display = t.orgDisplay;\n\t\t\tDOM.get(t.id).style.display = 'none';\n\t\t\tDOM.setAttrib(t.id, 'aria-hidden', true);\n\n\t\t\tif (!tinymce.relaxedDomain || !u)\n\t\t\t\tt.setupIframe();\n\n\t\t\te = n = o = null; // Cleanup\n\t\t},\n\n\t\t/**\n\t\t * This method get called by the init method ones the iframe is loaded.\n\t\t * It will fill the iframe with contents, setups DOM and selection objects for the iframe.\n\t\t * This method should not be called directly.\n\t\t *\n\t\t * @method setupIframe\n\t\t */\n\t\tsetupIframe : function() {\n\t\t\tvar t = this, s = t.settings, e = DOM.get(t.id), d = t.getDoc(), h, b;\n\n\t\t\t// Setup iframe body\n\t\t\tif (!isIE || !tinymce.relaxedDomain) {\n\t\t\t\td.open();\n\t\t\t\td.write(t.iframeHTML);\n\t\t\t\td.close();\n\n\t\t\t\tif (tinymce.relaxedDomain)\n\t\t\t\t\td.domain = tinymce.relaxedDomain;\n\t\t\t}\n\n\t\t\t// It will not steal focus while setting contentEditable\n\t\t\tb = t.getBody();\n\t\t\tb.disabled = true;\n\n\t\t\tif (!s.readonly)\n\t\t\t\tb.contentEditable = true;\n\n\t\t\tb.disabled = false;\n\n\t\t\t/**\n\t\t\t * Schema instance, enables you to validate elements and it's children.\n\t\t\t *\n\t\t\t * @property schema\n\t\t\t * @type tinymce.html.Schema\n\t\t\t */\n\t\t\tt.schema = new tinymce.html.Schema(s);\n\n\t\t\t/**\n\t\t\t * DOM instance for the editor.\n\t\t\t *\n\t\t\t * @property dom\n\t\t\t * @type tinymce.dom.DOMUtils\n\t\t\t * @example\n\t\t\t * // Adds a class to all paragraphs within the editor\n\t\t\t * tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('p'), 'someclass');\n\t\t\t */\n\t\t\tt.dom = new tinymce.dom.DOMUtils(t.getDoc(), {\n\t\t\t\tkeep_values : true,\n\t\t\t\turl_converter : t.convertURL,\n\t\t\t\turl_converter_scope : t,\n\t\t\t\thex_colors : s.force_hex_style_colors,\n\t\t\t\tclass_filter : s.class_filter,\n\t\t\t\tupdate_styles : 1,\n\t\t\t\tfix_ie_paragraphs : 1,\n\t\t\t\tschema : t.schema\n\t\t\t});\n\n\t\t\t/**\n\t\t\t * HTML parser will be used when contents is inserted into the editor.\n\t\t\t *\n\t\t\t * @property parser\n\t\t\t * @type tinymce.html.DomParser\n\t\t\t */\n\t\t\tt.parser = new tinymce.html.DomParser(s, t.schema);\n\n\t\t\t// Force anchor names closed, unless the setting \"allow_html_in_named_anchor\" is explicitly included.\n\t\t\tif (!t.settings.allow_html_in_named_anchor) {\n\t\t\t\tt.parser.addAttributeFilter('name', function(nodes, name) {\n\t\t\t\t\tvar i = nodes.length, sibling, prevSibling, parent, node;\n\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tnode = nodes[i];\n\t\t\t\t\t\tif (node.name === 'a' && node.firstChild) {\n\t\t\t\t\t\t\tparent = node.parent;\n\n\t\t\t\t\t\t\t// Move children after current node\n\t\t\t\t\t\t\tsibling = node.lastChild;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tprevSibling = sibling.prev;\n\t\t\t\t\t\t\t\tparent.insert(sibling, node);\n\t\t\t\t\t\t\t\tsibling = prevSibling;\n\t\t\t\t\t\t\t} while (sibling);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Convert src and href into data-mce-src, data-mce-href and data-mce-style\n\t\t\tt.parser.addAttributeFilter('src,href,style', function(nodes, name) {\n\t\t\t\tvar i = nodes.length, node, dom = t.dom, value, internalName;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tnode = nodes[i];\n\t\t\t\t\tvalue = node.attr(name);\n\t\t\t\t\tinternalName = 'data-mce-' + name;\n\n\t\t\t\t\t// Add internal attribute if we need to we don't on a refresh of the document\n\t\t\t\t\tif (!node.attributes.map[internalName]) {\n\t\t\t\t\t\tif (name === \"style\")\n\t\t\t\t\t\t\tnode.attr(internalName, dom.serializeStyle(dom.parseStyle(value), node.name));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tnode.attr(internalName, t.convertURL(value, name, node.name));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Keep scripts from executing\n\t\t\tt.parser.addNodeFilter('script', function(nodes, name) {\n\t\t\t\tvar i = nodes.length, node;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tnode = nodes[i];\n\t\t\t\t\tnode.attr('type', 'mce-' + (node.attr('type') || 'text/javascript'));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tt.parser.addNodeFilter('#cdata', function(nodes, name) {\n\t\t\t\tvar i = nodes.length, node;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tnode = nodes[i];\n\t\t\t\t\tnode.type = 8;\n\t\t\t\t\tnode.name = '#comment';\n\t\t\t\t\tnode.value = '[CDATA[' + node.value + ']]';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tt.parser.addNodeFilter('p,h1,h2,h3,h4,h5,h6,div', function(nodes, name) {\n\t\t\t\tvar i = nodes.length, node, nonEmptyElements = t.schema.getNonEmptyElements();\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tnode = nodes[i];\n\n\t\t\t\t\tif (node.isEmpty(nonEmptyElements))\n\t\t\t\t\t\tnode.empty().append(new tinymce.html.Node('br', 1)).shortEnded = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t/**\n\t\t\t * DOM serializer for the editor. Will be used when contents is extracted from the editor.\n\t\t\t *\n\t\t\t * @property serializer\n\t\t\t * @type tinymce.dom.Serializer\n\t\t\t * @example\n\t\t\t * // Serializes the first paragraph in the editor into a string\n\t\t\t * tinyMCE.activeEditor.serializer.serialize(tinyMCE.activeEditor.dom.select('p')[0]);\n\t\t\t */\n\t\t\tt.serializer = new tinymce.dom.Serializer(s, t.dom, t.schema);\n\n\t\t\t/**\n\t\t\t * Selection instance for the editor.\n\t\t\t *\n\t\t\t * @property selection\n\t\t\t * @type tinymce.dom.Selection\n\t\t\t * @example\n\t\t\t * // Sets some contents to the current selection in the editor\n\t\t\t * tinyMCE.activeEditor.selection.setContent('Some contents');\n\t\t\t *\n\t\t\t * // Gets the current selection\n\t\t\t * alert(tinyMCE.activeEditor.selection.getContent());\n\t\t\t *\n\t\t\t * // Selects the first paragraph found\n\t\t\t * tinyMCE.activeEditor.selection.select(tinyMCE.activeEditor.dom.select('p')[0]);\n\t\t\t */\n\t\t\tt.selection = new tinymce.dom.Selection(t.dom, t.getWin(), t.serializer);\n\n\t\t\t/**\n\t\t\t * Formatter instance.\n\t\t\t *\n\t\t\t * @property formatter\n\t\t\t * @type tinymce.Formatter\n\t\t\t */\n\t\t\tt.formatter = new tinymce.Formatter(this);\n\n\t\t\t// Register default formats\n\t\t\tt.formatter.register({\n\t\t\t\talignleft : [\n\t\t\t\t\t{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'left'}},\n\t\t\t\t\t{selector : 'img,table', collapsed : false, styles : {'float' : 'left'}}\n\t\t\t\t],\n\n\t\t\t\taligncenter : [\n\t\t\t\t\t{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'center'}},\n\t\t\t\t\t{selector : 'img', collapsed : false, styles : {display : 'block', marginLeft : 'auto', marginRight : 'auto'}},\n\t\t\t\t\t{selector : 'table', collapsed : false, styles : {marginLeft : 'auto', marginRight : 'auto'}}\n\t\t\t\t],\n\n\t\t\t\talignright : [\n\t\t\t\t\t{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'right'}},\n\t\t\t\t\t{selector : 'img,table', collapsed : false, styles : {'float' : 'right'}}\n\t\t\t\t],\n\n\t\t\t\talignfull : [\n\t\t\t\t\t{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'justify'}}\n\t\t\t\t],\n\n\t\t\t\tbold : [\n\t\t\t\t\t{inline : 'strong', remove : 'all'},\n\t\t\t\t\t{inline : 'span', styles : {fontWeight : 'bold'}},\n\t\t\t\t\t{inline : 'b', remove : 'all'}\n\t\t\t\t],\n\n\t\t\t\titalic : [\n\t\t\t\t\t{inline : 'em', remove : 'all'},\n\t\t\t\t\t{inline : 'span', styles : {fontStyle : 'italic'}},\n\t\t\t\t\t{inline : 'i', remove : 'all'}\n\t\t\t\t],\n\n\t\t\t\tunderline : [\n\t\t\t\t\t{inline : 'span', styles : {textDecoration : 'underline'}, exact : true},\n\t\t\t\t\t{inline : 'u', remove : 'all'}\n\t\t\t\t],\n\n\t\t\t\tstrikethrough : [\n\t\t\t\t\t{inline : 'span', styles : {textDecoration : 'line-through'}, exact : true},\n\t\t\t\t\t{inline : 'strike', remove : 'all'}\n\t\t\t\t],\n\n\t\t\t\tforecolor : {inline : 'span', styles : {color : '%value'}, wrap_links : false},\n\t\t\t\thilitecolor : {inline : 'span', styles : {backgroundColor : '%value'}, wrap_links : false},\n\t\t\t\tfontname : {inline : 'span', styles : {fontFamily : '%value'}},\n\t\t\t\tfontsize : {inline : 'span', styles : {fontSize : '%value'}},\n\t\t\t\tfontsize_class : {inline : 'span', attributes : {'class' : '%value'}},\n\t\t\t\tblockquote : {block : 'blockquote', wrapper : 1, remove : 'all'},\n\t\t\t\tsubscript : {inline : 'sub'},\n\t\t\t\tsuperscript : {inline : 'sup'},\n\n\t\t\t\tlink : {inline : 'a', selector : 'a', remove : 'all', split : true, deep : true,\n\t\t\t\t\tonmatch : function(node) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t},\n\n\t\t\t\t\tonformat : function(elm, fmt, vars) {\n\t\t\t\t\t\teach(vars, function(value, key) {\n\t\t\t\t\t\t\tt.dom.setAttrib(elm, key, value);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tremoveformat : [\n\t\t\t\t\t{selector : 'b,strong,em,i,font,u,strike', remove : 'all', split : true, expand : false, block_expand : true, deep : true},\n\t\t\t\t\t{selector : 'span', attributes : ['style', 'class'], remove : 'empty', split : true, expand : false, deep : true},\n\t\t\t\t\t{selector : '*', attributes : ['style', 'class'], split : false, expand : false, deep : true}\n\t\t\t\t]\n\t\t\t});\n\n\t\t\t// Register default block formats\n\t\t\teach('p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp'.split(/\\s/), function(name) {\n\t\t\t\tt.formatter.register(name, {block : name, remove : 'all'});\n\t\t\t});\n\n\t\t\t// Register user defined formats\n\t\t\tt.formatter.register(t.settings.formats);\n\n\t\t\t/**\n\t\t\t * Undo manager instance, responsible for handling undo levels.\n\t\t\t *\n\t\t\t * @property undoManager\n\t\t\t * @type tinymce.UndoManager\n\t\t\t * @example\n\t\t\t * // Undoes the last modification to the editor\n\t\t\t * tinyMCE.activeEditor.undoManager.undo();\n\t\t\t */\n\t\t\tt.undoManager = new tinymce.UndoManager(t);\n\n\t\t\t// Pass through\n\t\t\tt.undoManager.onAdd.add(function(um, l) {\n\t\t\t\tif (um.hasUndo())\n\t\t\t\t\treturn t.onChange.dispatch(t, l, um);\n\t\t\t});\n\n\t\t\tt.undoManager.onUndo.add(function(um, l) {\n\t\t\t\treturn t.onUndo.dispatch(t, l, um);\n\t\t\t});\n\n\t\t\tt.undoManager.onRedo.add(function(um, l) {\n\t\t\t\treturn t.onRedo.dispatch(t, l, um);\n\t\t\t});\n\n\t\t\tt.forceBlocks = new tinymce.ForceBlocks(t, {\n\t\t\t\tforced_root_block : s.forced_root_block\n\t\t\t});\n\n\t\t\tt.editorCommands = new tinymce.EditorCommands(t);\n\n\t\t\t// Pass through\n\t\t\tt.serializer.onPreProcess.add(function(se, o) {\n\t\t\t\treturn t.onPreProcess.dispatch(t, o, se);\n\t\t\t});\n\n\t\t\tt.serializer.onPostProcess.add(function(se, o) {\n\t\t\t\treturn t.onPostProcess.dispatch(t, o, se);\n\t\t\t});\n\n\t\t\tt.onPreInit.dispatch(t);\n\n\t\t\tif (!s.gecko_spellcheck)\n\t\t\t\tt.getBody().spellcheck = 0;\n\n\t\t\tif (!s.readonly)\n\t\t\t\tt._addEvents();\n\n\t\t\tt.controlManager.onPostRender.dispatch(t, t.controlManager);\n\t\t\tt.onPostRender.dispatch(t);\n\n\t\t\tt.quirks = new tinymce.util.Quirks(this);\n\n\t\t\tif (s.directionality)\n\t\t\t\tt.getBody().dir = s.directionality;\n\n\t\t\tif (s.nowrap)\n\t\t\t\tt.getBody().style.whiteSpace = \"nowrap\";\n\n\t\t\tif (s.handle_node_change_callback) {\n\t\t\t\tt.onNodeChange.add(function(ed, cm, n) {\n\t\t\t\t\tt.execCallback('handle_node_change_callback', t.id, n, -1, -1, true, t.selection.isCollapsed());\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (s.save_callback) {\n\t\t\t\tt.onSaveContent.add(function(ed, o) {\n\t\t\t\t\tvar h = t.execCallback('save_callback', t.id, o.content, t.getBody());\n\n\t\t\t\t\tif (h)\n\t\t\t\t\t\to.content = h;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (s.onchange_callback) {\n\t\t\t\tt.onChange.add(function(ed, l) {\n\t\t\t\t\tt.execCallback('onchange_callback', t, l);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (s.protect) {\n\t\t\t\tt.onBeforeSetContent.add(function(ed, o) {\n\t\t\t\t\tif (s.protect) {\n\t\t\t\t\t\teach(s.protect, function(pattern) {\n\t\t\t\t\t\t\to.content = o.content.replace(pattern, function(str) {\n\t\t\t\t\t\t\t\treturn '<!--mce:protected ' + escape(str) + '-->';\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (s.convert_newlines_to_brs) {\n\t\t\t\tt.onBeforeSetContent.add(function(ed, o) {\n\t\t\t\t\tif (o.initial)\n\t\t\t\t\t\to.content = o.content.replace(/\\r?\\n/g, '<br />');\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (s.preformatted) {\n\t\t\t\tt.onPostProcess.add(function(ed, o) {\n\t\t\t\t\to.content = o.content.replace(/^\\s*<pre.*?>/, '');\n\t\t\t\t\to.content = o.content.replace(/<\\/pre>\\s*$/, '');\n\n\t\t\t\t\tif (o.set)\n\t\t\t\t\t\to.content = '<pre class=\"mceItemHidden\">' + o.content + '</pre>';\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (s.verify_css_classes) {\n\t\t\t\tt.serializer.attribValueFilter = function(n, v) {\n\t\t\t\t\tvar s, cl;\n\n\t\t\t\t\tif (n == 'class') {\n\t\t\t\t\t\t// Build regexp for classes\n\t\t\t\t\t\tif (!t.classesRE) {\n\t\t\t\t\t\t\tcl = t.dom.getClasses();\n\n\t\t\t\t\t\t\tif (cl.length > 0) {\n\t\t\t\t\t\t\t\ts = '';\n\n\t\t\t\t\t\t\t\teach (cl, function(o) {\n\t\t\t\t\t\t\t\t\ts += (s ? '|' : '') + o['class'];\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tt.classesRE = new RegExp('(' + s + ')', 'gi');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn !t.classesRE || /(\\bmceItem\\w+\\b|\\bmceTemp\\w+\\b)/g.test(v) || t.classesRE.test(v) ? v : '';\n\t\t\t\t\t}\n\n\t\t\t\t\treturn v;\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (s.cleanup_callback) {\n\t\t\t\tt.onBeforeSetContent.add(function(ed, o) {\n\t\t\t\t\to.content = t.execCallback('cleanup_callback', 'insert_to_editor', o.content, o);\n\t\t\t\t});\n\n\t\t\t\tt.onPreProcess.add(function(ed, o) {\n\t\t\t\t\tif (o.set)\n\t\t\t\t\t\tt.execCallback('cleanup_callback', 'insert_to_editor_dom', o.node, o);\n\n\t\t\t\t\tif (o.get)\n\t\t\t\t\t\tt.execCallback('cleanup_callback', 'get_from_editor_dom', o.node, o);\n\t\t\t\t});\n\n\t\t\t\tt.onPostProcess.add(function(ed, o) {\n\t\t\t\t\tif (o.set)\n\t\t\t\t\t\to.content = t.execCallback('cleanup_callback', 'insert_to_editor', o.content, o);\n\n\t\t\t\t\tif (o.get)\n\t\t\t\t\t\to.content = t.execCallback('cleanup_callback', 'get_from_editor', o.content, o);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (s.save_callback) {\n\t\t\t\tt.onGetContent.add(function(ed, o) {\n\t\t\t\t\tif (o.save)\n\t\t\t\t\t\to.content = t.execCallback('save_callback', t.id, o.content, t.getBody());\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (s.handle_event_callback) {\n\t\t\t\tt.onEvent.add(function(ed, e, o) {\n\t\t\t\t\tif (t.execCallback('handle_event_callback', e, ed, o) === false)\n\t\t\t\t\t\tEvent.cancel(e);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Add visual aids when new contents is added\n\t\t\tt.onSetContent.add(function() {\n\t\t\t\tt.addVisual(t.getBody());\n\t\t\t});\n\n\t\t\t// Remove empty contents\n\t\t\tif (s.padd_empty_editor) {\n\t\t\t\tt.onPostProcess.add(function(ed, o) {\n\t\t\t\t\to.content = o.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\\s|\\u00a0|)<\\/p>[\\r\\n]*|<br \\/>[\\r\\n]*)$/, '');\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (isGecko) {\n\t\t\t\t// Fix gecko link bug, when a link is placed at the end of block elements there is\n\t\t\t\t// no way to move the caret behind the link. This fix adds a bogus br element after the link\n\t\t\t\tfunction fixLinks(ed, o) {\n\t\t\t\t\teach(ed.dom.select('a'), function(n) {\n\t\t\t\t\t\tvar pn = n.parentNode;\n\n\t\t\t\t\t\tif (ed.dom.isBlock(pn) && pn.lastChild === n)\n\t\t\t\t\t\t\ted.dom.add(pn, 'br', {'data-mce-bogus' : 1});\n\t\t\t\t\t});\n\t\t\t\t};\n\n\t\t\t\tt.onExecCommand.add(function(ed, cmd) {\n\t\t\t\t\tif (cmd === 'CreateLink')\n\t\t\t\t\t\tfixLinks(ed);\n\t\t\t\t});\n\n\t\t\t\tt.onSetContent.add(t.selection.onSetContent.add(fixLinks));\n\t\t\t}\n\n\t\t\tt.load({initial : true, format : 'html'});\n\t\t\tt.startContent = t.getContent({format : 'raw'});\n\t\t\tt.undoManager.add();\n\t\t\tt.initialized = true;\n\n\t\t\tt.onInit.dispatch(t);\n\t\t\tt.execCallback('setupcontent_callback', t.id, t.getBody(), t.getDoc());\n\t\t\tt.execCallback('init_instance_callback', t);\n\t\t\tt.focus(true);\n\t\t\tt.nodeChanged({initial : 1});\n\n\t\t\t// Load specified content CSS last\n\t\t\teach(t.contentCSS, function(u) {\n\t\t\t\tt.dom.loadCSS(u);\n\t\t\t});\n\n\t\t\t// Handle auto focus\n\t\t\tif (s.auto_focus) {\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tvar ed = tinymce.get(s.auto_focus);\n\n\t\t\t\t\ted.selection.select(ed.getBody(), 1);\n\t\t\t\t\ted.selection.collapse(1);\n\t\t\t\t\ted.getBody().focus();\n\t\t\t\t\ted.getWin().focus();\n\t\t\t\t}, 100);\n\t\t\t}\n\n\t\t\te = null;\n\t\t},\n\n\t\t// #ifdef contentEditable\n\n\t\t/**\n\t\t * Sets up the contentEditable mode.\n\t\t *\n\t\t * @method setupContentEditable\n\t\t */\n\t\tsetupContentEditable : function() {\n\t\t\tvar t = this, s = t.settings, e = t.getElement();\n\n\t\t\tt.contentDocument = s.content_document || document;\n\t\t\tt.contentWindow = s.content_window || window;\n\t\t\tt.bodyElement = e;\n\n\t\t\t// Prevent leak in IE\n\t\t\ts.content_document = s.content_window = null;\n\n\t\t\tDOM.hide(e);\n\t\t\te.contentEditable = t.getParam('content_editable_state', true);\n\t\t\tDOM.show(e);\n\n\t\t\tif (!s.gecko_spellcheck)\n\t\t\t\tt.getDoc().body.spellcheck = 0;\n\n\t\t\t// Setup objects\n\t\t\tt.dom = new tinymce.dom.DOMUtils(t.getDoc(), {\n\t\t\t\tkeep_values : true,\n\t\t\t\turl_converter : t.convertURL,\n\t\t\t\turl_converter_scope : t,\n\t\t\t\thex_colors : s.force_hex_style_colors,\n\t\t\t\tclass_filter : s.class_filter,\n\t\t\t\troot_element : t.id,\n\t\t\t\tfix_ie_paragraphs : 1,\n\t\t\t\tupdate_styles : 1\n\t\t\t});\n\n\t\t\tt.serializer = new tinymce.dom.Serializer(s, t.dom, schema);\n\n\t\t\tt.selection = new tinymce.dom.Selection(t.dom, t.getWin(), t.serializer);\n\t\t\tt.forceBlocks = new tinymce.ForceBlocks(t, {\n\t\t\t\tforced_root_block : s.forced_root_block\n\t\t\t});\n\n\t\t\tt.editorCommands = new tinymce.EditorCommands(t);\n\n\t\t\t// Pass through\n\t\t\tt.serializer.onPreProcess.add(function(se, o) {\n\t\t\t\treturn t.onPreProcess.dispatch(t, o, se);\n\t\t\t});\n\n\t\t\tt.serializer.onPostProcess.add(function(se, o) {\n\t\t\t\treturn t.onPostProcess.dispatch(t, o, se);\n\t\t\t});\n\n\t\t\tt.onPreInit.dispatch(t);\n\t\t\tt._addEvents();\n\n\t\t\tt.controlManager.onPostRender.dispatch(t, t.controlManager);\n\t\t\tt.onPostRender.dispatch(t);\n\n\t\t\tt.onSetContent.add(function() {\n\t\t\t\tt.addVisual(t.getBody());\n\t\t\t});\n\n\t\t\t//t.load({initial : true, format : (s.cleanup_on_startup ? 'html' : 'raw')});\n\t\t\tt.startContent = t.getContent({format : 'raw'});\n\t\t\tt.undoManager.add({initial : true});\n\t\t\tt.initialized = true;\n\n\t\t\tt.onInit.dispatch(t);\n\t\t\tt.focus(true);\n\t\t\tt.nodeChanged({initial : 1});\n\n\t\t\t// Load specified content CSS last\n\t\t\tif (s.content_css) {\n\t\t\t\teach(explode(s.content_css), function(u) {\n\t\t\t\t\tt.dom.loadCSS(t.documentBaseURI.toAbsolute(u));\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (isIE) {\n\t\t\t\t// Store away selection\n\t\t\t\tt.dom.bind(t.getElement(), 'beforedeactivate', function() {\n\t\t\t\t\tt.lastSelectionBookmark = t.selection.getBookmark(1);\n\t\t\t\t});\n\n\t\t\t\tt.onBeforeExecCommand.add(function(ed, cmd, ui, val, o) {\n\t\t\t\t\tif (!DOM.getParent(ed.selection.getStart(), function(n) {return n == ed.getBody();}))\n\t\t\t\t\t\to.terminate = 1;\n\n\t\t\t\t\tif (!DOM.getParent(ed.selection.getEnd(), function(n) {return n == ed.getBody();}))\n\t\t\t\t\t\to.terminate = 1;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\te = null; // Cleanup\n\t\t},\n\n\t\t// #endif\n\n\t\t/**\n\t\t * Focuses/activates the editor. This will set this editor as the activeEditor in the tinymce collection\n\t\t * it will also place DOM focus inside the editor.\n\t\t *\n\t\t * @method focus\n\t\t * @param {Boolean} sf Skip DOM focus. Just set is as the active editor.\n\t\t */\n\t\tfocus : function(sf) {\n\t\t\tvar oed, t = this, selection = t.selection, ce = t.settings.content_editable, ieRng, controlElm, doc = t.getDoc();\n\n\t\t\tif (!sf) {\n\t\t\t\t// Get selected control element\n\t\t\t\tieRng = selection.getRng();\n\t\t\t\tif (ieRng.item) {\n\t\t\t\t\tcontrolElm = ieRng.item(0);\n\t\t\t\t}\n\n\t\t\t\tt._refreshContentEditable();\n\t\t\t\tselection.normalize();\n\n\t\t\t\t// Is not content editable\n\t\t\t\tif (!ce)\n\t\t\t\t\tt.getWin().focus();\n\n\t\t\t\t// Focus the body as well since it's contentEditable\n\t\t\t\tif (tinymce.isGecko) {\n\t\t\t\t\tt.getBody().focus();\n\t\t\t\t}\n\n\t\t\t\t// Restore selected control element\n\t\t\t\t// This is needed when for example an image is selected within a\n\t\t\t\t// layer a call to focus will then remove the control selection\n\t\t\t\tif (controlElm && controlElm.ownerDocument == doc) {\n\t\t\t\t\tieRng = doc.body.createControlRange();\n\t\t\t\t\tieRng.addElement(controlElm);\n\t\t\t\t\tieRng.select();\n\t\t\t\t}\n\n\t\t\t\t// #ifdef contentEditable\n\n\t\t\t\t// Content editable mode ends here\n\t\t\t\tif (ce) {\n\t\t\t\t\tif (tinymce.isWebKit)\n\t\t\t\t\t\tt.getWin().focus();\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (tinymce.isIE)\n\t\t\t\t\t\t\tt.getElement().setActive();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tt.getElement().focus();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// #endif\n\t\t\t}\n\n\t\t\tif (tinymce.activeEditor != t) {\n\t\t\t\tif ((oed = tinymce.activeEditor) != null)\n\t\t\t\t\toed.onDeactivate.dispatch(oed, t);\n\n\t\t\t\tt.onActivate.dispatch(t, oed);\n\t\t\t}\n\n\t\t\ttinymce._setActive(t);\n\t\t},\n\n\t\t/**\n\t\t * Executes a legacy callback. This method is useful to call old 2.x option callbacks.\n\t\t * There new event model is a better way to add callback so this method might be removed in the future.\n\t\t *\n\t\t * @method execCallback\n\t\t * @param {String} n Name of the callback to execute.\n\t\t * @return {Object} Return value passed from callback function.\n\t\t */\n\t\texecCallback : function(n) {\n\t\t\tvar t = this, f = t.settings[n], s;\n\n\t\t\tif (!f)\n\t\t\t\treturn;\n\n\t\t\t// Look through lookup\n\t\t\tif (t.callbackLookup && (s = t.callbackLookup[n])) {\n\t\t\t\tf = s.func;\n\t\t\t\ts = s.scope;\n\t\t\t}\n\n\t\t\tif (is(f, 'string')) {\n\t\t\t\ts = f.replace(/\\.\\w+$/, '');\n\t\t\t\ts = s ? tinymce.resolve(s) : 0;\n\t\t\t\tf = tinymce.resolve(f);\n\t\t\t\tt.callbackLookup = t.callbackLookup || {};\n\t\t\t\tt.callbackLookup[n] = {func : f, scope : s};\n\t\t\t}\n\n\t\t\treturn f.apply(s || t, Array.prototype.slice.call(arguments, 1));\n\t\t},\n\n\t\t/**\n\t\t * Translates the specified string by replacing variables with language pack items it will also check if there is\n\t\t * a key mathcin the input.\n\t\t *\n\t\t * @method translate\n\t\t * @param {String} s String to translate by the language pack data.\n\t\t * @return {String} Translated string.\n\t\t */\n\t\ttranslate : function(s) {\n\t\t\tvar c = this.settings.language || 'en', i18n = tinymce.i18n;\n\n\t\t\tif (!s)\n\t\t\t\treturn '';\n\n\t\t\treturn i18n[c + '.' + s] || s.replace(/{\\#([^}]+)\\}/g, function(a, b) {\n\t\t\t\treturn i18n[c + '.' + b] || '{#' + b + '}';\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Returns a language pack item by name/key.\n\t\t *\n\t\t * @method getLang\n\t\t * @param {String} n Name/key to get from the language pack.\n\t\t * @param {String} dv Optional default value to retrieve.\n\t\t */\n\t\tgetLang : function(n, dv) {\n\t\t\treturn tinymce.i18n[(this.settings.language || 'en') + '.' + n] || (is(dv) ? dv : '{#' + n + '}');\n\t\t},\n\n\t\t/**\n\t\t * Returns a configuration parameter by name.\n\t\t *\n\t\t * @method getParam\n\t\t * @param {String} n Configruation parameter to retrieve.\n\t\t * @param {String} dv Optional default value to return.\n\t\t * @param {String} ty Optional type parameter.\n\t\t * @return {String} Configuration parameter value or default value.\n\t\t * @example\n\t\t * // Returns a specific config value from the currently active editor\n\t\t * var someval = tinyMCE.activeEditor.getParam('myvalue');\n\t\t *\n\t\t * // Returns a specific config value from a specific editor instance by id\n\t\t * var someval2 = tinyMCE.get('my_editor').getParam('myvalue');\n\t\t */\n\t\tgetParam : function(n, dv, ty) {\n\t\t\tvar tr = tinymce.trim, v = is(this.settings[n]) ? this.settings[n] : dv, o;\n\n\t\t\tif (ty === 'hash') {\n\t\t\t\to = {};\n\n\t\t\t\tif (is(v, 'string')) {\n\t\t\t\t\teach(v.indexOf('=') > 0 ? v.split(/[;,](?![^=;,]*(?:[;,]|$))/) : v.split(','), function(v) {\n\t\t\t\t\t\tv = v.split('=');\n\n\t\t\t\t\t\tif (v.length > 1)\n\t\t\t\t\t\t\to[tr(v[0])] = tr(v[1]);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\to[tr(v[0])] = tr(v);\n\t\t\t\t\t});\n\t\t\t\t} else\n\t\t\t\t\to = v;\n\n\t\t\t\treturn o;\n\t\t\t}\n\n\t\t\treturn v;\n\t\t},\n\n\t\t/**\n\t\t * Distpaches out a onNodeChange event to all observers. This method should be called when you\n\t\t * need to update the UI states or element path etc.\n\t\t *\n\t\t * @method nodeChanged\n\t\t * @param {Object} o Optional object to pass along for the node changed event.\n\t\t */\n\t\tnodeChanged : function(o) {\n\t\t\tvar t = this, s = t.selection, n = s.getStart() || t.getBody();\n\n\t\t\t// Fix for bug #1896577 it seems that this can not be fired while the editor is loading\n\t\t\tif (t.initialized) {\n\t\t\t\to = o || {};\n\t\t\t\tn = isIE && n.ownerDocument != t.getDoc() ? t.getBody() : n; // Fix for IE initial state\n\n\t\t\t\t// Get parents and add them to object\n\t\t\t\to.parents = [];\n\t\t\t\tt.dom.getParent(n, function(node) {\n\t\t\t\t\tif (node.nodeName == 'BODY')\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t\to.parents.push(node);\n\t\t\t\t});\n\n\t\t\t\tt.onNodeChange.dispatch(\n\t\t\t\t\tt,\n\t\t\t\t\to ? o.controlManager || t.controlManager : t.controlManager,\n\t\t\t\t\tn,\n\t\t\t\t\ts.isCollapsed(),\n\t\t\t\t\to\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Adds a button that later gets created by the ControlManager. This is a shorter and easier method\n\t\t * of adding buttons without the need to deal with the ControlManager directly. But it's also less\n\t\t * powerfull if you need more control use the ControlManagers factory methods instead.\n\t\t *\n\t\t * @method addButton\n\t\t * @param {String} n Button name to add.\n\t\t * @param {Object} s Settings object with title, cmd etc.\n\t\t * @example\n\t\t * // Adds a custom button to the editor and when a user clicks the button it will open\n\t\t * // an alert box with the selected contents as plain text.\n\t\t * tinyMCE.init({\n\t\t *    ...\n\t\t *\n\t\t *    theme_advanced_buttons1 : 'example,..'\n\t\t *\n\t\t *    setup : function(ed) {\n\t\t *       // Register example button\n\t\t *       ed.addButton('example', {\n\t\t *          title : 'example.desc',\n\t\t *          image : '../jscripts/tiny_mce/plugins/example/img/example.gif',\n\t\t *          onclick : function() {\n\t\t *             ed.windowManager.alert('Hello world!! Selection: ' + ed.selection.getContent({format : 'text'}));\n\t\t *          }\n\t\t *       });\n\t\t *    }\n\t\t * });\n\t\t */\n\t\taddButton : function(n, s) {\n\t\t\tvar t = this;\n\n\t\t\tt.buttons = t.buttons || {};\n\t\t\tt.buttons[n] = s;\n\t\t},\n\n\t\t/**\n\t\t * Adds a custom command to the editor, you can also override existing commands with this method.\n\t\t * The command that you add can be executed with execCommand.\n\t\t *\n\t\t * @method addCommand\n\t\t * @param {String} name Command name to add/override.\n\t\t * @param {addCommandCallback} callback Function to execute when the command occurs.\n\t\t * @param {Object} scope Optional scope to execute the function in.\n\t\t * @example\n\t\t * // Adds a custom command that later can be executed using execCommand\n\t\t * tinyMCE.init({\n\t\t *    ...\n\t\t *\n\t\t *    setup : function(ed) {\n\t\t *       // Register example command\n\t\t *       ed.addCommand('mycommand', function(ui, v) {\n\t\t *          ed.windowManager.alert('Hello world!! Selection: ' + ed.selection.getContent({format : 'text'}));\n\t\t *       });\n\t\t *    }\n\t\t * });\n\t\t */\n\t\taddCommand : function(name, callback, scope) {\n\t\t\t/**\n\t\t\t * Callback function that gets called when a command is executed.\n\t\t\t *\n\t\t\t * @callback addCommandCallback\n\t\t\t * @param {Boolean} ui Display UI state true/false.\n\t\t\t * @param {Object} value Optional value for command.\n\t\t\t * @return {Boolean} True/false state if the command was handled or not.\n\t\t\t */\n\t\t\tthis.execCommands[name] = {func : callback, scope : scope || this};\n\t\t},\n\n\t\t/**\n\t\t * Adds a custom query state command to the editor, you can also override existing commands with this method.\n\t\t * The command that you add can be executed with queryCommandState function.\n\t\t *\n\t\t * @method addQueryStateHandler\n\t\t * @param {String} name Command name to add/override.\n\t\t * @param {addQueryStateHandlerCallback} callback Function to execute when the command state retrival occurs.\n\t\t * @param {Object} scope Optional scope to execute the function in.\n\t\t */\n\t\taddQueryStateHandler : function(name, callback, scope) {\n\t\t\t/**\n\t\t\t * Callback function that gets called when a queryCommandState is executed.\n\t\t\t *\n\t\t\t * @callback addQueryStateHandlerCallback\n\t\t\t * @return {Boolean} True/false state if the command is enabled or not like is it bold.\n\t\t\t */\n\t\t\tthis.queryStateCommands[name] = {func : callback, scope : scope || this};\n\t\t},\n\n\t\t/**\n\t\t * Adds a custom query value command to the editor, you can also override existing commands with this method.\n\t\t * The command that you add can be executed with queryCommandValue function.\n\t\t *\n\t\t * @method addQueryValueHandler\n\t\t * @param {String} name Command name to add/override.\n\t\t * @param {addQueryValueHandlerCallback} callback Function to execute when the command value retrival occurs.\n\t\t * @param {Object} scope Optional scope to execute the function in.\n\t\t */\n\t\taddQueryValueHandler : function(name, callback, scope) {\n\t\t\t/**\n\t\t\t * Callback function that gets called when a queryCommandValue is executed.\n\t\t\t *\n\t\t\t * @callback addQueryValueHandlerCallback\n\t\t\t * @return {Object} Value of the command or undefined.\n\t\t\t */\n\t\t\tthis.queryValueCommands[name] = {func : callback, scope : scope || this};\n\t\t},\n\n\t\t/**\n\t\t * Adds a keyboard shortcut for some command or function.\n\t\t *\n\t\t * @method addShortcut\n\t\t * @param {String} pa Shortcut pattern. Like for example: ctrl+alt+o.\n\t\t * @param {String} desc Text description for the command.\n\t\t * @param {String/Function} cmd_func Command name string or function to execute when the key is pressed.\n\t\t * @param {Object} sc Optional scope to execute the function in.\n\t\t * @return {Boolean} true/false state if the shortcut was added or not.\n\t\t */\n\t\taddShortcut : function(pa, desc, cmd_func, sc) {\n\t\t\tvar t = this, c;\n\n\t\t\tif (!t.settings.custom_shortcuts)\n\t\t\t\treturn false;\n\n\t\t\tt.shortcuts = t.shortcuts || {};\n\n\t\t\tif (is(cmd_func, 'string')) {\n\t\t\t\tc = cmd_func;\n\n\t\t\t\tcmd_func = function() {\n\t\t\t\t\tt.execCommand(c, false, null);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(cmd_func, 'object')) {\n\t\t\t\tc = cmd_func;\n\n\t\t\t\tcmd_func = function() {\n\t\t\t\t\tt.execCommand(c[0], c[1], c[2]);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\teach(explode(pa), function(pa) {\n\t\t\t\tvar o = {\n\t\t\t\t\tfunc : cmd_func,\n\t\t\t\t\tscope : sc || this,\n\t\t\t\t\tdesc : desc,\n\t\t\t\t\talt : false,\n\t\t\t\t\tctrl : false,\n\t\t\t\t\tshift : false\n\t\t\t\t};\n\n\t\t\t\teach(explode(pa, '+'), function(v) {\n\t\t\t\t\tswitch (v) {\n\t\t\t\t\t\tcase 'alt':\n\t\t\t\t\t\tcase 'ctrl':\n\t\t\t\t\t\tcase 'shift':\n\t\t\t\t\t\t\to[v] = true;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\to.charCode = v.charCodeAt(0);\n\t\t\t\t\t\t\to.keyCode = v.toUpperCase().charCodeAt(0);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tt.shortcuts[(o.ctrl ? 'ctrl' : '') + ',' + (o.alt ? 'alt' : '') + ',' + (o.shift ? 'shift' : '') + ',' + o.keyCode] = o;\n\t\t\t});\n\n\t\t\treturn true;\n\t\t},\n\n\t\t/**\n\t\t * Executes a command on the current instance. These commands can be TinyMCE internal commands prefixed with \"mce\" or\n\t\t * they can be build in browser commands such as \"Bold\". A compleate list of browser commands is available on MSDN or Mozilla.org.\n\t\t * This function will dispatch the execCommand function on each plugin, theme or the execcommand_callback option if none of these\n\t\t * return true it will handle the command as a internal browser command.\n\t\t *\n\t\t * @method execCommand\n\t\t * @param {String} cmd Command name to execute, for example mceLink or Bold.\n\t\t * @param {Boolean} ui True/false state if a UI (dialog) should be presented or not.\n\t\t * @param {mixed} val Optional command value, this can be anything.\n\t\t * @param {Object} a Optional arguments object.\n\t\t * @return {Boolean} True/false if the command was executed or not.\n\t\t */\n\t\texecCommand : function(cmd, ui, val, a) {\n\t\t\tvar t = this, s = 0, o, st;\n\n\t\t\tif (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd) && (!a || !a.skip_focus))\n\t\t\t\tt.focus();\n\n\t\t\to = {};\n\t\t\tt.onBeforeExecCommand.dispatch(t, cmd, ui, val, o);\n\t\t\tif (o.terminate)\n\t\t\t\treturn false;\n\n\t\t\t// Command callback\n\t\t\tif (t.execCallback('execcommand_callback', t.id, t.selection.getNode(), cmd, ui, val)) {\n\t\t\t\tt.onExecCommand.dispatch(t, cmd, ui, val, a);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Registred commands\n\t\t\tif (o = t.execCommands[cmd]) {\n\t\t\t\tst = o.func.call(o.scope, ui, val);\n\n\t\t\t\t// Fall through on true\n\t\t\t\tif (st !== true) {\n\t\t\t\t\tt.onExecCommand.dispatch(t, cmd, ui, val, a);\n\t\t\t\t\treturn st;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Plugin commands\n\t\t\teach(t.plugins, function(p) {\n\t\t\t\tif (p.execCommand && p.execCommand(cmd, ui, val)) {\n\t\t\t\t\tt.onExecCommand.dispatch(t, cmd, ui, val, a);\n\t\t\t\t\ts = 1;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (s)\n\t\t\t\treturn true;\n\n\t\t\t// Theme commands\n\t\t\tif (t.theme && t.theme.execCommand && t.theme.execCommand(cmd, ui, val)) {\n\t\t\t\tt.onExecCommand.dispatch(t, cmd, ui, val, a);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Editor commands\n\t\t\tif (t.editorCommands.execCommand(cmd, ui, val)) {\n\t\t\t\tt.onExecCommand.dispatch(t, cmd, ui, val, a);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Browser commands\n\t\t\tt.getDoc().execCommand(cmd, ui, val);\n\t\t\tt.onExecCommand.dispatch(t, cmd, ui, val, a);\n\t\t},\n\n\t\t/**\n\t\t * Returns a command specific state, for example if bold is enabled or not.\n\t\t *\n\t\t * @method queryCommandState\n\t\t * @param {string} cmd Command to query state from.\n\t\t * @return {Boolean} Command specific state, for example if bold is enabled or not.\n\t\t */\n\t\tqueryCommandState : function(cmd) {\n\t\t\tvar t = this, o, s;\n\n\t\t\t// Is hidden then return undefined\n\t\t\tif (t._isHidden())\n\t\t\t\treturn;\n\n\t\t\t// Registred commands\n\t\t\tif (o = t.queryStateCommands[cmd]) {\n\t\t\t\ts = o.func.call(o.scope);\n\n\t\t\t\t// Fall though on true\n\t\t\t\tif (s !== true)\n\t\t\t\t\treturn s;\n\t\t\t}\n\n\t\t\t// Registred commands\n\t\t\to = t.editorCommands.queryCommandState(cmd);\n\t\t\tif (o !== -1)\n\t\t\t\treturn o;\n\n\t\t\t// Browser commands\n\t\t\ttry {\n\t\t\t\treturn this.getDoc().queryCommandState(cmd);\n\t\t\t} catch (ex) {\n\t\t\t\t// Fails sometimes see bug: 1896577\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns a command specific value, for example the current font size.\n\t\t *\n\t\t * @method queryCommandValue\n\t\t * @param {string} c Command to query value from.\n\t\t * @return {Object} Command specific value, for example the current font size.\n\t\t */\n\t\tqueryCommandValue : function(c) {\n\t\t\tvar t = this, o, s;\n\n\t\t\t// Is hidden then return undefined\n\t\t\tif (t._isHidden())\n\t\t\t\treturn;\n\n\t\t\t// Registred commands\n\t\t\tif (o = t.queryValueCommands[c]) {\n\t\t\t\ts = o.func.call(o.scope);\n\n\t\t\t\t// Fall though on true\n\t\t\t\tif (s !== true)\n\t\t\t\t\treturn s;\n\t\t\t}\n\n\t\t\t// Registred commands\n\t\t\to = t.editorCommands.queryCommandValue(c);\n\t\t\tif (is(o))\n\t\t\t\treturn o;\n\n\t\t\t// Browser commands\n\t\t\ttry {\n\t\t\t\treturn this.getDoc().queryCommandValue(c);\n\t\t\t} catch (ex) {\n\t\t\t\t// Fails sometimes see bug: 1896577\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Shows the editor and hides any textarea/div that the editor is supposed to replace.\n\t\t *\n\t\t * @method show\n\t\t */\n\t\tshow : function() {\n\t\t\tvar t = this;\n\n\t\t\tDOM.show(t.getContainer());\n\t\t\tDOM.hide(t.id);\n\t\t\tt.load();\n\t\t},\n\n\t\t/**\n\t\t * Hides the editor and shows any textarea/div that the editor is supposed to replace.\n\t\t *\n\t\t * @method hide\n\t\t */\n\t\thide : function() {\n\t\t\tvar t = this, d = t.getDoc();\n\n\t\t\t// Fixed bug where IE has a blinking cursor left from the editor\n\t\t\tif (isIE && d)\n\t\t\t\td.execCommand('SelectAll');\n\n\t\t\t// We must save before we hide so Safari doesn't crash\n\t\t\tt.save();\n\t\t\tDOM.hide(t.getContainer());\n\t\t\tDOM.setStyle(t.id, 'display', t.orgDisplay);\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the editor is hidden or not.\n\t\t *\n\t\t * @method isHidden\n\t\t * @return {Boolean} True/false if the editor is hidden or not.\n\t\t */\n\t\tisHidden : function() {\n\t\t\treturn !DOM.isHidden(this.id);\n\t\t},\n\n\t\t/**\n\t\t * Sets the progress state, this will display a throbber/progess for the editor.\n\t\t * This is ideal for asycronous operations like an AJAX save call.\n\t\t *\n\t\t * @method setProgressState\n\t\t * @param {Boolean} b Boolean state if the progress should be shown or hidden.\n\t\t * @param {Number} ti Optional time to wait before the progress gets shown.\n\t\t * @param {Object} o Optional object to pass to the progress observers.\n\t\t * @return {Boolean} Same as the input state.\n\t\t * @example\n\t\t * // Show progress for the active editor\n\t\t * tinyMCE.activeEditor.setProgressState(true);\n\t\t *\n\t\t * // Hide progress for the active editor\n\t\t * tinyMCE.activeEditor.setProgressState(false);\n\t\t *\n\t\t * // Show progress after 3 seconds\n\t\t * tinyMCE.activeEditor.setProgressState(true, 3000);\n\t\t */\n\t\tsetProgressState : function(b, ti, o) {\n\t\t\tthis.onSetProgressState.dispatch(this, b, ti, o);\n\n\t\t\treturn b;\n\t\t},\n\n\t\t/**\n\t\t * Loads contents from the textarea or div element that got converted into an editor instance.\n\t\t * This method will move the contents from that textarea or div into the editor by using setContent\n\t\t * so all events etc that method has will get dispatched as well.\n\t\t *\n\t\t * @method load\n\t\t * @param {Object} o Optional content object, this gets passed around through the whole load process.\n\t\t * @return {String} HTML string that got set into the editor.\n\t\t */\n\t\tload : function(o) {\n\t\t\tvar t = this, e = t.getElement(), h;\n\n\t\t\tif (e) {\n\t\t\t\to = o || {};\n\t\t\t\to.load = true;\n\n\t\t\t\t// Double encode existing entities in the value\n\t\t\t\th = t.setContent(is(e.value) ? e.value : e.innerHTML, o);\n\t\t\t\to.element = e;\n\n\t\t\t\tif (!o.no_events)\n\t\t\t\t\tt.onLoadContent.dispatch(t, o);\n\n\t\t\t\to.element = e = null;\n\n\t\t\t\treturn h;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Saves the contents from a editor out to the textarea or div element that got converted into an editor instance.\n\t\t * This method will move the HTML contents from the editor into that textarea or div by getContent\n\t\t * so all events etc that method has will get dispatched as well.\n\t\t *\n\t\t * @method save\n\t\t * @param {Object} o Optional content object, this gets passed around through the whole save process.\n\t\t * @return {String} HTML string that got set into the textarea/div.\n\t\t */\n\t\tsave : function(o) {\n\t\t\tvar t = this, e = t.getElement(), h, f;\n\n\t\t\tif (!e || !t.initialized)\n\t\t\t\treturn;\n\n\t\t\to = o || {};\n\t\t\to.save = true;\n\n\t\t\t// Add undo level will trigger onchange event\n\t\t\tif (!o.no_events) {\n\t\t\t\tt.undoManager.typing = false;\n\t\t\t\tt.undoManager.add();\n\t\t\t}\n\n\t\t\to.element = e;\n\t\t\th = o.content = t.getContent(o);\n\n\t\t\tif (!o.no_events)\n\t\t\t\tt.onSaveContent.dispatch(t, o);\n\n\t\t\th = o.content;\n\n\t\t\tif (!/TEXTAREA|INPUT/i.test(e.nodeName)) {\n\t\t\t\te.innerHTML = h;\n\n\t\t\t\t// Update hidden form element\n\t\t\t\tif (f = DOM.getParent(t.id, 'form')) {\n\t\t\t\t\teach(f.elements, function(e) {\n\t\t\t\t\t\tif (e.name == t.id) {\n\t\t\t\t\t\t\te.value = h;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\te.value = h;\n\n\t\t\to.element = e = null;\n\n\t\t\treturn h;\n\t\t},\n\n\t\t/**\n\t\t * Sets the specified content to the editor instance, this will cleanup the content before it gets set using\n\t\t * the different cleanup rules options.\n\t\t *\n\t\t * @method setContent\n\t\t * @param {String} content Content to set to editor, normally HTML contents but can be other formats as well.\n\t\t * @param {Object} args Optional content object, this gets passed around through the whole set process.\n\t\t * @return {String} HTML string that got set into the editor.\n\t\t * @example\n\t\t * // Sets the HTML contents of the activeEditor editor\n\t\t * tinyMCE.activeEditor.setContent('<span>some</span> html');\n\t\t *\n\t\t * // Sets the raw contents of the activeEditor editor\n\t\t * tinyMCE.activeEditor.setContent('<span>some</span> html', {format : 'raw'});\n\t\t *\n\t\t * // Sets the content of a specific editor (my_editor in this example)\n\t\t * tinyMCE.get('my_editor').setContent(data);\n\t\t *\n\t\t * // Sets the bbcode contents of the activeEditor editor if the bbcode plugin was added\n\t\t * tinyMCE.activeEditor.setContent('[b]some[/b] html', {format : 'bbcode'});\n\t\t */\n\t\tsetContent : function(content, args) {\n\t\t\tvar self = this, rootNode, body = self.getBody(), forcedRootBlockName;\n\n\t\t\t// Setup args object\n\t\t\targs = args || {};\n\t\t\targs.format = args.format || 'html';\n\t\t\targs.set = true;\n\t\t\targs.content = content;\n\n\t\t\t// Do preprocessing\n\t\t\tif (!args.no_events)\n\t\t\t\tself.onBeforeSetContent.dispatch(self, args);\n\n\t\t\tcontent = args.content;\n\n\t\t\t// Padd empty content in Gecko and Safari. Commands will otherwise fail on the content\n\t\t\t// It will also be impossible to place the caret in the editor unless there is a BR element present\n\t\t\tif (!tinymce.isIE && (content.length === 0 || /^\\s+$/.test(content))) {\n\t\t\t\tforcedRootBlockName = self.settings.forced_root_block;\n\t\t\t\tif (forcedRootBlockName)\n\t\t\t\t\tcontent = '<' + forcedRootBlockName + '><br data-mce-bogus=\"1\"></' + forcedRootBlockName + '>';\n\t\t\t\telse\n\t\t\t\t\tcontent = '<br data-mce-bogus=\"1\">';\n\n\t\t\t\tbody.innerHTML = content;\n\t\t\t\tself.selection.select(body, true);\n\t\t\t\tself.selection.collapse(true);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Parse and serialize the html\n\t\t\tif (args.format !== 'raw') {\n\t\t\t\tcontent = new tinymce.html.Serializer({}, self.schema).serialize(\n\t\t\t\t\tself.parser.parse(content)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Set the new cleaned contents to the editor\n\t\t\targs.content = tinymce.trim(content);\n\t\t\tself.dom.setHTML(body, args.content);\n\n\t\t\t// Do post processing\n\t\t\tif (!args.no_events)\n\t\t\t\tself.onSetContent.dispatch(self, args);\n\n\t\t\tself.selection.normalize();\n\n\t\t\treturn args.content;\n\t\t},\n\n\t\t/**\n\t\t * Gets the content from the editor instance, this will cleanup the content before it gets returned using\n\t\t * the different cleanup rules options.\n\t\t *\n\t\t * @method getContent\n\t\t * @param {Object} args Optional content object, this gets passed around through the whole get process.\n\t\t * @return {String} Cleaned content string, normally HTML contents.\n\t\t * @example\n\t\t * // Get the HTML contents of the currently active editor\n\t\t * console.debug(tinyMCE.activeEditor.getContent());\n\t\t *\n\t\t * // Get the raw contents of the currently active editor\n\t\t * tinyMCE.activeEditor.getContent({format : 'raw'});\n\t\t *\n\t\t * // Get content of a specific editor:\n\t\t * tinyMCE.get('content id').getContent()\n\t\t */\n\t\tgetContent : function(args) {\n\t\t\tvar self = this, content;\n\n\t\t\t// Setup args object\n\t\t\targs = args || {};\n\t\t\targs.format = args.format || 'html';\n\t\t\targs.get = true;\n\n\t\t\t// Do preprocessing\n\t\t\tif (!args.no_events)\n\t\t\t\tself.onBeforeGetContent.dispatch(self, args);\n\n\t\t\t// Get raw contents or by default the cleaned contents\n\t\t\tif (args.format == 'raw')\n\t\t\t\tcontent = self.getBody().innerHTML;\n\t\t\telse\n\t\t\t\tcontent = self.serializer.serialize(self.getBody(), args);\n\n\t\t\targs.content = tinymce.trim(content);\n\n\t\t\t// Do post processing\n\t\t\tif (!args.no_events)\n\t\t\t\tself.onGetContent.dispatch(self, args);\n\n\t\t\treturn args.content;\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the editor is dirty or not. It will get dirty if the user has made modifications to the contents.\n\t\t *\n\t\t * @method isDirty\n\t\t * @return {Boolean} True/false if the editor is dirty or not. It will get dirty if the user has made modifications to the contents.\n\t\t * @example\n\t\t * if (tinyMCE.activeEditor.isDirty())\n\t\t *     alert(\"You must save your contents.\");\n\t\t */\n\t\tisDirty : function() {\n\t\t\tvar self = this;\n\n\t\t\treturn tinymce.trim(self.startContent) != tinymce.trim(self.getContent({format : 'raw', no_events : 1})) && !self.isNotDirty;\n\t\t},\n\n\t\t/**\n\t\t * Returns the editors container element. The container element wrappes in\n\t\t * all the elements added to the page for the editor. Such as UI, iframe etc.\n\t\t *\n\t\t * @method getContainer\n\t\t * @return {Element} HTML DOM element for the editor container.\n\t\t */\n\t\tgetContainer : function() {\n\t\t\tvar t = this;\n\n\t\t\tif (!t.container)\n\t\t\t\tt.container = DOM.get(t.editorContainer || t.id + '_parent');\n\n\t\t\treturn t.container;\n\t\t},\n\n\t\t/**\n\t\t * Returns the editors content area container element. The this element is the one who\n\t\t * holds the iframe or the editable element.\n\t\t *\n\t\t * @method getContentAreaContainer\n\t\t * @return {Element} HTML DOM element for the editor area container.\n\t\t */\n\t\tgetContentAreaContainer : function() {\n\t\t\treturn this.contentAreaContainer;\n\t\t},\n\n\t\t/**\n\t\t * Returns the target element/textarea that got replaced with a TinyMCE editor instance.\n\t\t *\n\t\t * @method getElement\n\t\t * @return {Element} HTML DOM element for the replaced element.\n\t\t */\n\t\tgetElement : function() {\n\t\t\treturn DOM.get(this.settings.content_element || this.id);\n\t\t},\n\n\t\t/**\n\t\t * Returns the iframes window object.\n\t\t *\n\t\t * @method getWin\n\t\t * @return {Window} Iframe DOM window object.\n\t\t */\n\t\tgetWin : function() {\n\t\t\tvar t = this, e;\n\n\t\t\tif (!t.contentWindow) {\n\t\t\t\te = DOM.get(t.id + \"_ifr\");\n\n\t\t\t\tif (e)\n\t\t\t\t\tt.contentWindow = e.contentWindow;\n\t\t\t}\n\n\t\t\treturn t.contentWindow;\n\t\t},\n\n\t\t/**\n\t\t * Returns the iframes document object.\n\t\t *\n\t\t * @method getDoc\n\t\t * @return {Document} Iframe DOM document object.\n\t\t */\n\t\tgetDoc : function() {\n\t\t\tvar t = this, w;\n\n\t\t\tif (!t.contentDocument) {\n\t\t\t\tw = t.getWin();\n\n\t\t\t\tif (w)\n\t\t\t\t\tt.contentDocument = w.document;\n\t\t\t}\n\n\t\t\treturn t.contentDocument;\n\t\t},\n\n\t\t/**\n\t\t * Returns the iframes body element.\n\t\t *\n\t\t * @method getBody\n\t\t * @return {Element} Iframe body element.\n\t\t */\n\t\tgetBody : function() {\n\t\t\treturn this.bodyElement || this.getDoc().body;\n\t\t},\n\n\t\t/**\n\t\t * URL converter function this gets executed each time a user adds an img, a or\n\t\t * any other element that has a URL in it. This will be called both by the DOM and HTML\n\t\t * manipulation functions.\n\t\t *\n\t\t * @method convertURL\n\t\t * @param {string} u URL to convert.\n\t\t * @param {string} n Attribute name src, href etc.\n\t\t * @param {string/HTMLElement} Tag name or HTML DOM element depending on HTML or DOM insert.\n\t\t * @return {string} Converted URL string.\n\t\t */\n\t\tconvertURL : function(u, n, e) {\n\t\t\tvar t = this, s = t.settings;\n\n\t\t\t// Use callback instead\n\t\t\tif (s.urlconverter_callback)\n\t\t\t\treturn t.execCallback('urlconverter_callback', u, e, true, n);\n\n\t\t\t// Don't convert link href since thats the CSS files that gets loaded into the editor also skip local file URLs\n\t\t\tif (!s.convert_urls || (e && e.nodeName == 'LINK') || u.indexOf('file:') === 0)\n\t\t\t\treturn u;\n\n\t\t\t// Convert to relative\n\t\t\tif (s.relative_urls)\n\t\t\t\treturn t.documentBaseURI.toRelative(u);\n\n\t\t\t// Convert to absolute\n\t\t\tu = t.documentBaseURI.toAbsolute(u, s.remove_script_host);\n\n\t\t\treturn u;\n\t\t},\n\n\t\t/**\n\t\t * Adds visual aid for tables, anchors etc so they can be more easily edited inside the editor.\n\t\t *\n\t\t * @method addVisual\n\t\t * @param {Element} e Optional root element to loop though to find tables etc that needs the visual aid.\n\t\t */\n\t\taddVisual : function(e) {\n\t\t\tvar t = this, s = t.settings;\n\n\t\t\te = e || t.getBody();\n\n\t\t\tif (!is(t.hasVisual))\n\t\t\t\tt.hasVisual = s.visual;\n\n\t\t\teach(t.dom.select('table,a', e), function(e) {\n\t\t\t\tvar v;\n\n\t\t\t\tswitch (e.nodeName) {\n\t\t\t\t\tcase 'TABLE':\n\t\t\t\t\t\tv = t.dom.getAttrib(e, 'border');\n\n\t\t\t\t\t\tif (!v || v == '0') {\n\t\t\t\t\t\t\tif (t.hasVisual)\n\t\t\t\t\t\t\t\tt.dom.addClass(e, s.visual_table_class);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tt.dom.removeClass(e, s.visual_table_class);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\tcase 'A':\n\t\t\t\t\t\tv = t.dom.getAttrib(e, 'name');\n\n\t\t\t\t\t\tif (v) {\n\t\t\t\t\t\t\tif (t.hasVisual)\n\t\t\t\t\t\t\t\tt.dom.addClass(e, 'mceItemAnchor');\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tt.dom.removeClass(e, 'mceItemAnchor');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tt.onVisualAid.dispatch(t, e, t.hasVisual);\n\t\t},\n\n\t\t/**\n\t\t * Removes the editor from the dom and tinymce collection.\n\t\t *\n\t\t * @method remove\n\t\t */\n\t\tremove : function() {\n\t\t\tvar t = this, e = t.getContainer();\n\n\t\t\tt.removed = 1; // Cancels post remove event execution\n\t\t\tt.hide();\n\n\t\t\tt.execCallback('remove_instance_callback', t);\n\t\t\tt.onRemove.dispatch(t);\n\n\t\t\t// Clear all execCommand listeners this is required to avoid errors if the editor was removed inside another command\n\t\t\tt.onExecCommand.listeners = [];\n\n\t\t\ttinymce.remove(t);\n\t\t\tDOM.remove(e);\n\t\t},\n\n\t\t/**\n\t\t * Destroys the editor instance by removing all events, element references or other resources\n\t\t * that could leak memory. This method will be called automatically when the page is unloaded\n\t\t * but you can also call it directly if you know what you are doing.\n\t\t *\n\t\t * @method destroy\n\t\t * @param {Boolean} s Optional state if the destroy is an automatic destroy or user called one.\n\t\t */\n\t\tdestroy : function(s) {\n\t\t\tvar t = this;\n\n\t\t\t// One time is enough\n\t\t\tif (t.destroyed)\n\t\t\t\treturn;\n\n\t\t\tif (!s) {\n\t\t\t\ttinymce.removeUnload(t.destroy);\n\t\t\t\ttinyMCE.onBeforeUnload.remove(t._beforeUnload);\n\n\t\t\t\t// Manual destroy\n\t\t\t\tif (t.theme && t.theme.destroy)\n\t\t\t\t\tt.theme.destroy();\n\n\t\t\t\t// Destroy controls, selection and dom\n\t\t\t\tt.controlManager.destroy();\n\t\t\t\tt.selection.destroy();\n\t\t\t\tt.dom.destroy();\n\n\t\t\t\t// Remove all events\n\n\t\t\t\t// Don't clear the window or document if content editable\n\t\t\t\t// is enabled since other instances might still be present\n\t\t\t\tif (!t.settings.content_editable) {\n\t\t\t\t\tEvent.clear(t.getWin());\n\t\t\t\t\tEvent.clear(t.getDoc());\n\t\t\t\t}\n\n\t\t\t\tEvent.clear(t.getBody());\n\t\t\t\tEvent.clear(t.formElement);\n\t\t\t}\n\n\t\t\tif (t.formElement) {\n\t\t\t\tt.formElement.submit = t.formElement._mceOldSubmit;\n\t\t\t\tt.formElement._mceOldSubmit = null;\n\t\t\t}\n\n\t\t\tt.contentAreaContainer = t.formElement = t.container = t.settings.content_element = t.bodyElement = t.contentDocument = t.contentWindow = null;\n\n\t\t\tif (t.selection)\n\t\t\t\tt.selection = t.selection.win = t.selection.dom = t.selection.dom.doc = null;\n\n\t\t\tt.destroyed = 1;\n\t\t},\n\n\t\t// Internal functions\n\n\t\t_addEvents : function() {\n\t\t\t// 'focus', 'blur', 'dblclick', 'beforedeactivate', submit, reset\n\t\t\tvar t = this, i, s = t.settings, dom = t.dom, lo = {\n\t\t\t\tmouseup : 'onMouseUp',\n\t\t\t\tmousedown : 'onMouseDown',\n\t\t\t\tclick : 'onClick',\n\t\t\t\tkeyup : 'onKeyUp',\n\t\t\t\tkeydown : 'onKeyDown',\n\t\t\t\tkeypress : 'onKeyPress',\n\t\t\t\tsubmit : 'onSubmit',\n\t\t\t\treset : 'onReset',\n\t\t\t\tcontextmenu : 'onContextMenu',\n\t\t\t\tdblclick : 'onDblClick',\n\t\t\t\tpaste : 'onPaste' // Doesn't work in all browsers yet\n\t\t\t};\n\n\t\t\tfunction eventHandler(e, o) {\n\t\t\t\tvar ty = e.type;\n\n\t\t\t\t// Don't fire events when it's removed\n\t\t\t\tif (t.removed)\n\t\t\t\t\treturn;\n\n\t\t\t\t// Generic event handler\n\t\t\t\tif (t.onEvent.dispatch(t, e, o) !== false) {\n\t\t\t\t\t// Specific event handler\n\t\t\t\t\tt[lo[e.fakeType || e.type]].dispatch(t, e, o);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Add DOM events\n\t\t\teach(lo, function(v, k) {\n\t\t\t\tswitch (k) {\n\t\t\t\t\tcase 'contextmenu':\n\t\t\t\t\t\tdom.bind(t.getDoc(), k, eventHandler);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'paste':\n\t\t\t\t\t\tdom.bind(t.getBody(), k, function(e) {\n\t\t\t\t\t\t\teventHandler(e);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'submit':\n\t\t\t\t\tcase 'reset':\n\t\t\t\t\t\tdom.bind(t.getElement().form || DOM.getParent(t.id, 'form'), k, eventHandler);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tdom.bind(s.content_editable ? t.getBody() : t.getDoc(), k, eventHandler);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tdom.bind(s.content_editable ? t.getBody() : (isGecko ? t.getDoc() : t.getWin()), 'focus', function(e) {\n\t\t\t\tt.focus(true);\n\t\t\t});\n\n\t\t\t// #ifdef contentEditable\n\n\t\t\tif (s.content_editable && tinymce.isOpera) {\n\t\t\t\t// Opera doesn't support focus event for contentEditable elements so we need to fake it\n\t\t\t\tfunction doFocus(e) {\n\t\t\t\t\tt.focus(true);\n\t\t\t\t};\n\n\t\t\t\tdom.bind(t.getBody(), 'click', doFocus);\n\t\t\t\tdom.bind(t.getBody(), 'keydown', doFocus);\n\t\t\t}\n\n\t\t\t// #endif\n\n\t\t\t// Fixes bug where a specified document_base_uri could result in broken images\n\t\t\t// This will also fix drag drop of images in Gecko\n\t\t\tif (tinymce.isGecko) {\n\t\t\t\tdom.bind(t.getDoc(), 'DOMNodeInserted', function(e) {\n\t\t\t\t\tvar v;\n\n\t\t\t\t\te = e.target;\n\n\t\t\t\t\tif (e.nodeType === 1 && e.nodeName === 'IMG' && (v = e.getAttribute('data-mce-src')))\n\t\t\t\t\t\te.src = t.documentBaseURI.toAbsolute(v);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Set various midas options in Gecko\n\t\t\tif (isGecko) {\n\t\t\t\tfunction setOpts() {\n\t\t\t\t\tvar t = this, d = t.getDoc(), s = t.settings;\n\n\t\t\t\t\tif (isGecko && !s.readonly) {\n\t\t\t\t\t\tt._refreshContentEditable();\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Try new Gecko method\n\t\t\t\t\t\t\td.execCommand(\"styleWithCSS\", 0, false);\n\t\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t\t// Use old method\n\t\t\t\t\t\t\tif (!t._isHidden())\n\t\t\t\t\t\t\t\ttry {d.execCommand(\"useCSS\", 0, true);} catch (ex) {}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!s.table_inline_editing)\n\t\t\t\t\t\t\ttry {d.execCommand('enableInlineTableEditing', false, false);} catch (ex) {}\n\n\t\t\t\t\t\tif (!s.object_resizing)\n\t\t\t\t\t\t\ttry {d.execCommand('enableObjectResizing', false, false);} catch (ex) {}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tt.onBeforeExecCommand.add(setOpts);\n\t\t\t\tt.onMouseDown.add(setOpts);\n\t\t\t}\n\n\t\t\t// Add node change handlers\n\t\t\tt.onMouseUp.add(t.nodeChanged);\n\t\t\t//t.onClick.add(t.nodeChanged);\n\t\t\tt.onKeyUp.add(function(ed, e) {\n\t\t\t\tvar c = e.keyCode;\n\n\t\t\t\tif ((c >= 33 && c <= 36) || (c >= 37 && c <= 40) || c == 13 || c == 45 || c == 46 || c == 8 || (tinymce.isMac && (c == 91 || c == 93)) || e.ctrlKey)\n\t\t\t\t\tt.nodeChanged();\n\t\t\t});\n\n\n\t\t\t// Add block quote deletion handler\n\t\t\tt.onKeyDown.add(function(ed, e) {\n\t\t\t\t// Was the BACKSPACE key pressed?\n\t\t\t\tif (e.keyCode != 8)\n\t\t\t\t\treturn;\n\n\t\t\t\tvar n = ed.selection.getRng().startContainer;\n\t\t\t\tvar offset = ed.selection.getRng().startOffset;\n\n\t\t\t\twhile (n && n.nodeType && n.nodeType != 1 && n.parentNode)\n\t\t\t\t\tn = n.parentNode;\n\n\t\t\t\t// Is the cursor at the beginning of a blockquote?\n\t\t\t\tif (n && n.parentNode && n.parentNode.tagName === 'BLOCKQUOTE' && n.parentNode.firstChild == n && offset == 0) {\n\t\t\t\t\t// Remove the blockquote\n\t\t\t\t\ted.formatter.toggle('blockquote', null, n.parentNode);\n\n\t\t\t\t\t// Move the caret to the beginning of n\n\t\t\t\t\tvar rng = ed.selection.getRng();\n\t\t\t\t\trng.setStart(n, 0);\n\t\t\t\t\trng.setEnd(n, 0);\n\t\t\t\t\ted.selection.setRng(rng);\n\t\t\t\t\ted.selection.collapse(false);\n\t\t\t\t}\n\t\t\t});\n\n\n\n\t\t\t// Add reset handler\n\t\t\tt.onReset.add(function() {\n\t\t\t\tt.setContent(t.startContent, {format : 'raw'});\n\t\t\t});\n\n\t\t\t// Add shortcuts\n\t\t\tif (s.custom_shortcuts) {\n\t\t\t\tif (s.custom_undo_redo_keyboard_shortcuts) {\n\t\t\t\t\tt.addShortcut('ctrl+z', t.getLang('undo_desc'), 'Undo');\n\t\t\t\t\tt.addShortcut('ctrl+y', t.getLang('redo_desc'), 'Redo');\n\t\t\t\t}\n\n\t\t\t\t// Add default shortcuts for gecko\n\t\t\t\tt.addShortcut('ctrl+b', t.getLang('bold_desc'), 'Bold');\n\t\t\t\tt.addShortcut('ctrl+i', t.getLang('italic_desc'), 'Italic');\n\t\t\t\tt.addShortcut('ctrl+u', t.getLang('underline_desc'), 'Underline');\n\n\t\t\t\t// BlockFormat shortcuts keys\n\t\t\t\tfor (i=1; i<=6; i++)\n\t\t\t\t\tt.addShortcut('ctrl+' + i, '', ['FormatBlock', false, 'h' + i]);\n\n\t\t\t\tt.addShortcut('ctrl+7', '', ['FormatBlock', false, 'p']);\n\t\t\t\tt.addShortcut('ctrl+8', '', ['FormatBlock', false, 'div']);\n\t\t\t\tt.addShortcut('ctrl+9', '', ['FormatBlock', false, 'address']);\n\n\t\t\t\tfunction find(e) {\n\t\t\t\t\tvar v = null;\n\n\t\t\t\t\tif (!e.altKey && !e.ctrlKey && !e.metaKey)\n\t\t\t\t\t\treturn v;\n\n\t\t\t\t\teach(t.shortcuts, function(o) {\n\t\t\t\t\t\tif (tinymce.isMac && o.ctrl != e.metaKey)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\telse if (!tinymce.isMac && o.ctrl != e.ctrlKey)\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\tif (o.alt != e.altKey)\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\tif (o.shift != e.shiftKey)\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\tif (e.keyCode == o.keyCode || (e.charCode && e.charCode == o.charCode)) {\n\t\t\t\t\t\t\tv = o;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\treturn v;\n\t\t\t\t};\n\n\t\t\t\tt.onKeyUp.add(function(ed, e) {\n\t\t\t\t\tvar o = find(e);\n\n\t\t\t\t\tif (o)\n\t\t\t\t\t\treturn Event.cancel(e);\n\t\t\t\t});\n\n\t\t\t\tt.onKeyPress.add(function(ed, e) {\n\t\t\t\t\tvar o = find(e);\n\n\t\t\t\t\tif (o)\n\t\t\t\t\t\treturn Event.cancel(e);\n\t\t\t\t});\n\n\t\t\t\tt.onKeyDown.add(function(ed, e) {\n\t\t\t\t\tvar o = find(e);\n\n\t\t\t\t\tif (o) {\n\t\t\t\t\t\to.func.call(o.scope);\n\t\t\t\t\t\treturn Event.cancel(e);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (tinymce.isIE) {\n\t\t\t\t// Fix so resize will only update the width and height attributes not the styles of an image\n\t\t\t\t// It will also block mceItemNoResize items\n\t\t\t\tdom.bind(t.getDoc(), 'controlselect', function(e) {\n\t\t\t\t\tvar re = t.resizeInfo, cb;\n\n\t\t\t\t\te = e.target;\n\n\t\t\t\t\t// Don't do this action for non image elements\n\t\t\t\t\tif (e.nodeName !== 'IMG')\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\tif (re)\n\t\t\t\t\t\tdom.unbind(re.node, re.ev, re.cb);\n\n\t\t\t\t\tif (!dom.hasClass(e, 'mceItemNoResize')) {\n\t\t\t\t\t\tev = 'resizeend';\n\t\t\t\t\t\tcb = dom.bind(e, ev, function(e) {\n\t\t\t\t\t\t\tvar v;\n\n\t\t\t\t\t\t\te = e.target;\n\n\t\t\t\t\t\t\tif (v = dom.getStyle(e, 'width')) {\n\t\t\t\t\t\t\t\tdom.setAttrib(e, 'width', v.replace(/[^0-9%]+/g, ''));\n\t\t\t\t\t\t\t\tdom.setStyle(e, 'width', '');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (v = dom.getStyle(e, 'height')) {\n\t\t\t\t\t\t\t\tdom.setAttrib(e, 'height', v.replace(/[^0-9%]+/g, ''));\n\t\t\t\t\t\t\t\tdom.setStyle(e, 'height', '');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tev = 'resizestart';\n\t\t\t\t\t\tcb = dom.bind(e, 'resizestart', Event.cancel, Event);\n\t\t\t\t\t}\n\n\t\t\t\t\tre = t.resizeInfo = {\n\t\t\t\t\t\tnode : e,\n\t\t\t\t\t\tev : ev,\n\t\t\t\t\t\tcb : cb\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (tinymce.isOpera) {\n\t\t\t\tt.onClick.add(function(ed, e) {\n\t\t\t\t\tEvent.prevent(e);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Add custom undo/redo handlers\n\t\t\tif (s.custom_undo_redo) {\n\t\t\t\tfunction addUndo() {\n\t\t\t\t\tt.undoManager.typing = false;\n\t\t\t\t\tt.undoManager.add();\n\t\t\t\t};\n\n\t\t\t\tdom.bind(t.getDoc(), 'focusout', function(e) {\n\t\t\t\t\tif (!t.removed && t.undoManager.typing)\n\t\t\t\t\t\taddUndo();\n\t\t\t\t});\n\n\t\t\t\t// Add undo level when contents is drag/dropped within the editor\n\t\t\t\tt.dom.bind(t.dom.getRoot(), 'dragend', function(e) {\n\t\t\t\t\taddUndo();\n\t\t\t\t});\n\n\t\t\t\tt.onKeyUp.add(function(ed, e) {\n\t\t\t\t\tvar keyCode = e.keyCode;\n\n\t\t\t\t\tif ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || keyCode == 45 || e.ctrlKey)\n\t\t\t\t\t\taddUndo();\n\t\t\t\t});\n\n\t\t\t\tt.onKeyDown.add(function(ed, e) {\n\t\t\t\t\tvar keyCode = e.keyCode, sel;\n\n\t\t\t\t\tif (keyCode == 8) {\n\t\t\t\t\t\tsel = t.getDoc().selection;\n\n\t\t\t\t\t\t// Fix IE control + backspace browser bug\n\t\t\t\t\t\tif (sel && sel.createRange && sel.createRange().item) {\n\t\t\t\t\t\t\tt.undoManager.beforeChange();\n\t\t\t\t\t\t\ted.dom.remove(sel.createRange().item(0));\n\t\t\t\t\t\t\taddUndo();\n\n\t\t\t\t\t\t\treturn Event.cancel(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Is caracter positon keys left,right,up,down,home,end,pgdown,pgup,enter\n\t\t\t\t\tif ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || keyCode == 45) {\n\t\t\t\t\t\t// Add position before enter key is pressed, used by IE since it still uses the default browser behavior\n\t\t\t\t\t\t// Todo: Remove this once we normalize enter behavior on IE\n\t\t\t\t\t\tif (tinymce.isIE && keyCode == 13)\n\t\t\t\t\t\t\tt.undoManager.beforeChange();\n\n\t\t\t\t\t\tif (t.undoManager.typing)\n\t\t\t\t\t\t\taddUndo();\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If key isn't shift,ctrl,alt,capslock,metakey\n\t\t\t\t\tif ((keyCode < 16 || keyCode > 20) && keyCode != 224 && keyCode != 91 && !t.undoManager.typing) {\n\t\t\t\t\t\tt.undoManager.beforeChange();\n\t\t\t\t\t\tt.undoManager.typing = true;\n\t\t\t\t\t\tt.undoManager.add();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tt.onMouseDown.add(function() {\n\t\t\t\t\tif (t.undoManager.typing)\n\t\t\t\t\t\taddUndo();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Bug fix for FireFox keeping styles from end of selection instead of start.\n\t\t\tif (tinymce.isGecko) {\n\t\t\t\tfunction getAttributeApplyFunction() {\n\t\t\t\t\tvar template = t.dom.getAttribs(t.selection.getStart().cloneNode(false));\n\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tvar target = t.selection.getStart();\n\n\t\t\t\t\t\tif (target !== t.getBody()) {\n\t\t\t\t\t\t\tt.dom.setAttrib(target, \"style\", null);\n\n\t\t\t\t\t\t\teach(template, function(attr) {\n\t\t\t\t\t\t\t\ttarget.setAttributeNode(attr.cloneNode(true));\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tfunction isSelectionAcrossElements() {\n\t\t\t\t\tvar s = t.selection;\n\n\t\t\t\t\treturn !s.isCollapsed() && s.getStart() != s.getEnd();\n\t\t\t\t}\n\n\t\t\t\tt.onKeyPress.add(function(ed, e) {\n\t\t\t\t\tvar applyAttributes;\n\n\t\t\t\t\tif ((e.keyCode == 8 || e.keyCode == 46) && isSelectionAcrossElements()) {\n\t\t\t\t\t\tapplyAttributes = getAttributeApplyFunction();\n\t\t\t\t\t\tt.getDoc().execCommand('delete', false, null);\n\t\t\t\t\t\tapplyAttributes();\n\n\t\t\t\t\t\treturn Event.cancel(e);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tt.dom.bind(t.getDoc(), 'cut', function(e) {\n\t\t\t\t\tvar applyAttributes;\n\n\t\t\t\t\tif (isSelectionAcrossElements()) {\n\t\t\t\t\t\tapplyAttributes = getAttributeApplyFunction();\n\t\t\t\t\t\tt.onKeyUp.addToTop(Event.cancel, Event);\n\n\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\tapplyAttributes();\n\t\t\t\t\t\t\tt.onKeyUp.remove(Event.cancel, Event);\n\t\t\t\t\t\t}, 0);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\t_refreshContentEditable : function() {\n\t\t\tvar self = this, body, parent;\n\n\t\t\t// Check if the editor was hidden and the re-initalize contentEditable mode by removing and adding the body again\n\t\t\tif (self._isHidden()) {\n\t\t\t\tbody = self.getBody();\n\t\t\t\tparent = body.parentNode;\n\n\t\t\t\tparent.removeChild(body);\n\t\t\t\tparent.appendChild(body);\n\n\t\t\t\tbody.focus();\n\t\t\t}\n\t\t},\n\n\t\t_isHidden : function() {\n\t\t\tvar s;\n\n\t\t\tif (!isGecko)\n\t\t\t\treturn 0;\n\n\t\t\t// Weird, wheres that cursor selection?\n\t\t\ts = this.selection.getSel();\n\t\t\treturn (!s || !s.rangeCount || s.rangeCount == 0);\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/UndoManager.js":"/**\n * UndoManager.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar Dispatcher = tinymce.util.Dispatcher;\n\n\t/**\n\t * This class handles the undo/redo history levels for the editor. Since the build in undo/redo has major drawbacks a custom one was needed.\n\t *\n\t * @class tinymce.UndoManager\n\t */\n\ttinymce.UndoManager = function(editor) {\n\t\tvar self, index = 0, data = [], beforeBookmark;\n\n\t\tfunction getContent() {\n\t\t\treturn tinymce.trim(editor.getContent({format : 'raw', no_events : 1}));\n\t\t};\n\n\t\treturn self = {\n\t\t\t/**\n\t\t\t * State if the user is currently typing or not. This will add a typing operation into one undo\n\t\t\t * level instead of one new level for each keystroke.\n\t\t\t *\n\t\t\t * @field {Boolean} typing\n\t\t\t */\n\t\t\ttyping : false,\n\n\t\t\t/**\n\t\t\t * This event will fire each time a new undo level is added to the undo manager.\n\t\t\t *\n\t\t\t * @event onAdd\n\t\t\t * @param {tinymce.UndoManager} sender UndoManager instance that got the new level.\n\t\t\t * @param {Object} level The new level object containing a bookmark and contents.\n\t\t\t */\n\t\t\tonAdd : new Dispatcher(self),\n\n\t\t\t/**\n\t\t\t * This event will fire when the user make an undo of a change.\n\t\t\t *\n\t\t\t * @event onUndo\n\t\t\t * @param {tinymce.UndoManager} sender UndoManager instance that got the new level.\n\t\t\t * @param {Object} level The old level object containing a bookmark and contents.\n\t\t\t */\n\t\t\tonUndo : new Dispatcher(self),\n\n\t\t\t/**\n\t\t\t * This event will fire when the user make an redo of a change.\n\t\t\t *\n\t\t\t * @event onRedo\n\t\t\t * @param {tinymce.UndoManager} sender UndoManager instance that got the new level.\n\t\t\t * @param {Object} level The old level object containing a bookmark and contents.\n\t\t\t */\n\t\t\tonRedo : new Dispatcher(self),\n\n\t\t\t/**\n\t\t\t * Stores away a bookmark to be used when performing an undo action so that the selection is before\n\t\t\t * the change has been made.\n\t\t\t *\n\t\t\t * @method beforeChange\n\t\t\t */\n\t\t\tbeforeChange : function() {\n\t\t\t\tbeforeBookmark = editor.selection.getBookmark(2, true);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Adds a new undo level/snapshot to the undo list.\n\t\t\t *\n\t\t\t * @method add\n\t\t\t * @param {Object} l Optional undo level object to add.\n\t\t\t * @return {Object} Undo level that got added or null it a level wasn't needed.\n\t\t\t */\n\t\t\tadd : function(level) {\n\t\t\t\tvar i, settings = editor.settings, lastLevel;\n\n\t\t\t\tlevel = level || {};\n\t\t\t\tlevel.content = getContent();\n\n\t\t\t\t// Add undo level if needed\n\t\t\t\tlastLevel = data[index];\n\t\t\t\tif (lastLevel && lastLevel.content == level.content)\n\t\t\t\t\treturn null;\n\n\t\t\t\t// Set before bookmark on previous level\n\t\t\t\tif (data[index])\n\t\t\t\t\tdata[index].beforeBookmark = beforeBookmark;\n\n\t\t\t\t// Time to compress\n\t\t\t\tif (settings.custom_undo_redo_levels) {\n\t\t\t\t\tif (data.length > settings.custom_undo_redo_levels) {\n\t\t\t\t\t\tfor (i = 0; i < data.length - 1; i++)\n\t\t\t\t\t\t\tdata[i] = data[i + 1];\n\n\t\t\t\t\t\tdata.length--;\n\t\t\t\t\t\tindex = data.length;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Get a non intrusive normalized bookmark\n\t\t\t\tlevel.bookmark = editor.selection.getBookmark(2, true);\n\n\t\t\t\t// Crop array if needed\n\t\t\t\tif (index < data.length - 1)\n\t\t\t\t\tdata.length = index + 1;\n\n\t\t\t\tdata.push(level);\n\t\t\t\tindex = data.length - 1;\n\n\t\t\t\tself.onAdd.dispatch(self, level);\n\t\t\t\teditor.isNotDirty = 0;\n\n\t\t\t\treturn level;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Undoes the last action.\n\t\t\t *\n\t\t\t * @method undo\n\t\t\t * @return {Object} Undo level or null if no undo was performed.\n\t\t\t */\n\t\t\tundo : function() {\n\t\t\t\tvar level, i;\n\n\t\t\t\tif (self.typing) {\n\t\t\t\t\tself.add();\n\t\t\t\t\tself.typing = false;\n\t\t\t\t}\n\n\t\t\t\tif (index > 0) {\n\t\t\t\t\tlevel = data[--index];\n\n\t\t\t\t\teditor.setContent(level.content, {format : 'raw'});\n\t\t\t\t\teditor.selection.moveToBookmark(level.beforeBookmark);\n\n\t\t\t\t\tself.onUndo.dispatch(self, level);\n\t\t\t\t}\n\n\t\t\t\treturn level;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Redoes the last action.\n\t\t\t *\n\t\t\t * @method redo\n\t\t\t * @return {Object} Redo level or null if no redo was performed.\n\t\t\t */\n\t\t\tredo : function() {\n\t\t\t\tvar level;\n\n\t\t\t\tif (index < data.length - 1) {\n\t\t\t\t\tlevel = data[++index];\n\n\t\t\t\t\teditor.setContent(level.content, {format : 'raw'});\n\t\t\t\t\teditor.selection.moveToBookmark(level.bookmark);\n\n\t\t\t\t\tself.onRedo.dispatch(self, level);\n\t\t\t\t}\n\n\t\t\t\treturn level;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Removes all undo levels.\n\t\t\t *\n\t\t\t * @method clear\n\t\t\t */\n\t\t\tclear : function() {\n\t\t\t\tdata = [];\n\t\t\t\tindex = 0;\n\t\t\t\tself.typing = false;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns true/false if the undo manager has any undo levels.\n\t\t\t *\n\t\t\t * @method hasUndo\n\t\t\t * @return {Boolean} true/false if the undo manager has any undo levels.\n\t\t\t */\n\t\t\thasUndo : function() {\n\t\t\t\treturn index > 0 || this.typing;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns true/false if the undo manager has any redo levels.\n\t\t\t *\n\t\t\t * @method hasRedo\n\t\t\t * @return {Boolean} true/false if the undo manager has any redo levels.\n\t\t\t */\n\t\t\thasRedo : function() {\n\t\t\t\treturn index < data.length - 1 && !this.typing;\n\t\t\t}\n\t\t};\n\t};\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/tinymce.js":"/**\n * tinymce.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(win) {\n\tvar whiteSpaceRe = /^\\s*|\\s*$/g,\n\t\tundefined, isRegExpBroken = 'B'.replace(/A(.)|B/, '$1') === '$1';\n\n\t/**\n\t * Core namespace with core functionality for the TinyMCE API all sub classes will be added to this namespace/object.\n\t *\n\t * @static\n\t * @class tinymce\n\t * @example\n\t * // Using each method\n\t * tinymce.each([1, 2, 3], function(v, i) {\n\t *   console.log(i + '=' + v);\n\t * });\n\t *\n\t * // Checking for a specific browser\n\t * if (tinymce.isIE)\n\t *   console.log(\"IE\");\n\t */\n\tvar tinymce = {\n\t\t/**\n\t\t * Major version of TinyMCE build.\n\t\t *\n\t\t * @property majorVersion\n\t\t * @type String\n\t\t */\n\t\tmajorVersion : '@@tinymce_major_version@@',\n\n\t\t/**\n\t\t * Major version of TinyMCE build.\n\t\t *\n\t\t * @property minorVersion\n\t\t * @type String\n\t\t */\n\t\tminorVersion : '@@tinymce_minor_version@@',\n\n\t\t/**\n\t\t * Release date of TinyMCE build.\n\t\t *\n\t\t * @property releaseDate\n\t\t * @type String\n\t\t */\n\t\treleaseDate : '@@tinymce_release_date@@',\n\n\t\t/**\n\t\t * Initializes the TinyMCE global namespace this will setup browser detection and figure out where TinyMCE is running from.\n\t\t */\n\t\t_init : function() {\n\t\t\tvar t = this, d = document, na = navigator, ua = na.userAgent, i, nl, n, base, p, v;\n\n\t\t\t/**\n\t\t\t * Constant that is true if the browser is Opera.\n\t\t\t *\n\t\t\t * @property isOpera\n\t\t\t * @type Boolean\n\t\t\t * @final\n\t\t\t */\n\t\t\tt.isOpera = win.opera && opera.buildNumber;\n\n\t\t\t/**\n\t\t\t * Constant that is true if the browser is WebKit (Safari/Chrome).\n\t\t\t *\n\t\t\t * @property isWebKit\n\t\t\t * @type Boolean\n\t\t\t * @final\n\t\t\t */\n\t\t\tt.isWebKit = /WebKit/.test(ua);\n\n\t\t\t/**\n\t\t\t * Constant that is true if the browser is IE.\n\t\t\t *\n\t\t\t * @property isIE\n\t\t\t * @type Boolean\n\t\t\t * @final\n\t\t\t */\n\t\t\tt.isIE = !t.isWebKit && !t.isOpera && (/MSIE/gi).test(ua) && (/Explorer/gi).test(na.appName);\n\n\t\t\t/**\n\t\t\t * Constant that is true if the browser is IE 6 or older.\n\t\t\t *\n\t\t\t * @property isIE6\n\t\t\t * @type Boolean\n\t\t\t * @final\n\t\t\t */\n\t\t\tt.isIE6 = t.isIE && /MSIE [56]/.test(ua);\n\n\t\t\t/**\n\t\t\t * Constant that is true if the browser is IE 7.\n\t\t\t *\n\t\t\t * @property isIE7\n\t\t\t * @type Boolean\n\t\t\t * @final\n\t\t\t */\n\t\t\tt.isIE7 = t.isIE && /MSIE [7]/.test(ua);\n\n\t\t\t/**\n\t\t\t * Constant that is true if the browser is IE 8.\n\t\t\t *\n\t\t\t * @property isIE8\n\t\t\t * @type Boolean\n\t\t\t * @final\n\t\t\t */\n\t\t\tt.isIE8 = t.isIE && /MSIE [8]/.test(ua);\n\n\t\t\t/**\n\t\t\t * Constant that is true if the browser is IE 9.\n\t\t\t *\n\t\t\t * @property isIE9\n\t\t\t * @type Boolean\n\t\t\t * @final\n\t\t\t */\n\t\t\tt.isIE9 = t.isIE && /MSIE [9]/.test(ua);\n\n\t\t\t/**\n\t\t\t * Constant that is true if the browser is Gecko.\n\t\t\t *\n\t\t\t * @property isGecko\n\t\t\t * @type Boolean\n\t\t\t * @final\n\t\t\t */\n\t\t\tt.isGecko = !t.isWebKit && /Gecko/.test(ua);\n\n\t\t\t/**\n\t\t\t * Constant that is true if the os is Mac OS.\n\t\t\t *\n\t\t\t * @property isMac\n\t\t\t * @type Boolean\n\t\t\t * @final\n\t\t\t */\n\t\t\tt.isMac = ua.indexOf('Mac') != -1;\n\n\t\t\t/**\n\t\t\t * Constant that is true if the runtime is Adobe Air.\n\t\t\t *\n\t\t\t * @property isAir\n\t\t\t * @type Boolean\n\t\t\t * @final\n\t\t\t */\n\t\t\tt.isAir = /adobeair/i.test(ua);\n\n\t\t\t/**\n\t\t\t * Constant that tells if the current browser is an iPhone or iPad.\n\t\t\t *\n\t\t\t * @property isIDevice\n\t\t\t * @type Boolean\n\t\t\t * @final\n\t\t\t */\n\t\t\tt.isIDevice = /(iPad|iPhone)/.test(ua);\n\t\t\t\n\t\t\t/**\n\t\t\t * Constant that is true if the current browser is running on iOS 5 or greater.\n\t\t\t *\n\t\t\t * @property isIOS5\n\t\t\t * @type Boolean\n\t\t\t * @final\n\t\t\t */\n\t\t\tt.isIOS5 = t.isIDevice && ua.match(/AppleWebKit\\/(\\d*)/)[1]>=534;\n\n\t\t\t// TinyMCE .NET webcontrol might be setting the values for TinyMCE\n\t\t\tif (win.tinyMCEPreInit) {\n\t\t\t\tt.suffix = tinyMCEPreInit.suffix;\n\t\t\t\tt.baseURL = tinyMCEPreInit.base;\n\t\t\t\tt.query = tinyMCEPreInit.query;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Get suffix and base\n\t\t\tt.suffix = '';\n\n\t\t\t// If base element found, add that infront of baseURL\n\t\t\tnl = d.getElementsByTagName('base');\n\t\t\tfor (i=0; i<nl.length; i++) {\n\t\t\t\tif (v = nl[i].href) {\n\t\t\t\t\t// Host only value like http://site.com or http://site.com:8008\n\t\t\t\t\tif (/^https?:\\/\\/[^\\/]+$/.test(v))\n\t\t\t\t\t\tv += '/';\n\n\t\t\t\t\tbase = v ? v.match(/.*\\//)[0] : ''; // Get only directory\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction getBase(n) {\n\t\t\t\tif (n.src && /tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(n.src)) {\n\t\t\t\t\tif (/_(src|dev)\\.js/g.test(n.src))\n\t\t\t\t\t\tt.suffix = '_src';\n\n\t\t\t\t\tif ((p = n.src.indexOf('?')) != -1)\n\t\t\t\t\t\tt.query = n.src.substring(p + 1);\n\n\t\t\t\t\tt.baseURL = n.src.substring(0, n.src.lastIndexOf('/'));\n\n\t\t\t\t\t// If path to script is relative and a base href was found add that one infront\n\t\t\t\t\t// the src property will always be an absolute one on non IE browsers and IE 8\n\t\t\t\t\t// so this logic will basically only be executed on older IE versions\n\t\t\t\t\tif (base && t.baseURL.indexOf('://') == -1 && t.baseURL.indexOf('/') !== 0)\n\t\t\t\t\t\tt.baseURL = base + t.baseURL;\n\n\t\t\t\t\treturn t.baseURL;\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t};\n\n\t\t\t// Check document\n\t\t\tnl = d.getElementsByTagName('script');\n\t\t\tfor (i=0; i<nl.length; i++) {\n\t\t\t\tif (getBase(nl[i]))\n\t\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check head\n\t\t\tn = d.getElementsByTagName('head')[0];\n\t\t\tif (n) {\n\t\t\t\tnl = n.getElementsByTagName('script');\n\t\t\t\tfor (i=0; i<nl.length; i++) {\n\t\t\t\t\tif (getBase(nl[i]))\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t},\n\n\t\t/**\n\t\t * Checks if a object is of a specific type for example an array.\n\t\t *\n\t\t * @method is\n\t\t * @param {Object} o Object to check type of.\n\t\t * @param {string} t Optional type to check for.\n\t\t * @return {Boolean} true/false if the object is of the specified type.\n\t\t */\n\t\tis : function(o, t) {\n\t\t\tif (!t)\n\t\t\t\treturn o !== undefined;\n\n\t\t\tif (t == 'array' && (o.hasOwnProperty && o instanceof Array))\n\t\t\t\treturn true;\n\n\t\t\treturn typeof(o) == t;\n\t\t},\n\n\t\t/**\n\t\t * Makes a name/object map out of an array with names.\n\t\t *\n\t\t * @method makeMap\n\t\t * @param {Array/String} items Items to make map out of.\n\t\t * @param {String} delim Optional delimiter to split string by.\n\t\t * @param {Object} map Optional map to add items to.\n\t\t * @return {Object} Name/value map of items.\n\t\t */\n\t\tmakeMap : function(items, delim, map) {\n\t\t\tvar i;\n\n\t\t\titems = items || [];\n\t\t\tdelim = delim || ',';\n\n\t\t\tif (typeof(items) == \"string\")\n\t\t\t\titems = items.split(delim);\n\n\t\t\tmap = map || {};\n\n\t\t\ti = items.length;\n\t\t\twhile (i--)\n\t\t\t\tmap[items[i]] = {};\n\n\t\t\treturn map;\n\t\t},\n\n\t\t/**\n\t\t * Performs an iteration of all items in a collection such as an object or array. This method will execure the\n\t\t * callback function for each item in the collection, if the callback returns false the iteration will terminate.\n\t\t * The callback has the following format: cb(value, key_or_index).\n\t\t *\n\t\t * @method each\n\t\t * @param {Object} o Collection to iterate.\n\t\t * @param {function} cb Callback function to execute for each item.\n\t\t * @param {Object} s Optional scope to execute the callback in.\n\t\t * @example\n\t\t * // Iterate an array\n\t\t * tinymce.each([1,2,3], function(v, i) {\n\t\t *     console.debug(\"Value: \" + v + \", Index: \" + i);\n\t\t * });\n\t\t * \n\t\t * // Iterate an object\n\t\t * tinymce.each({a : 1, b : 2, c: 3], function(v, k) {\n\t\t *     console.debug(\"Value: \" + v + \", Key: \" + k);\n\t\t * });\n\t\t */\n\t\teach : function(o, cb, s) {\n\t\t\tvar n, l;\n\n\t\t\tif (!o)\n\t\t\t\treturn 0;\n\n\t\t\ts = s || o;\n\n\t\t\tif (o.length !== undefined) {\n\t\t\t\t// Indexed arrays, needed for Safari\n\t\t\t\tfor (n=0, l = o.length; n < l; n++) {\n\t\t\t\t\tif (cb.call(s, o[n], n, o) === false)\n\t\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Hashtables\n\t\t\t\tfor (n in o) {\n\t\t\t\t\tif (o.hasOwnProperty(n)) {\n\t\t\t\t\t\tif (cb.call(s, o[n], n, o) === false)\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn 1;\n\t\t},\n\n\t\t// #ifndef jquery\n\n\t\t/**\n\t\t * Creates a new array by the return value of each iteration function call. This enables you to convert\n\t\t * one array list into another.\n\t\t *\n\t\t * @method map\n\t\t * @param {Array} a Array of items to iterate.\n\t\t * @param {function} f Function to call for each item. It's return value will be the new value.\n\t\t * @return {Array} Array with new values based on function return values.\n\t\t */\n\t\tmap : function(a, f) {\n\t\t\tvar o = [];\n\n\t\t\ttinymce.each(a, function(v) {\n\t\t\t\to.push(f(v));\n\t\t\t});\n\n\t\t\treturn o;\n\t\t},\n\n\t\t/**\n\t\t * Filters out items from the input array by calling the specified function for each item.\n\t\t * If the function returns false the item will be excluded if it returns true it will be included.\n\t\t *\n\t\t * @method grep\n\t\t * @param {Array} a Array of items to loop though.\n\t\t * @param {function} f Function to call for each item. Include/exclude depends on it's return value.\n\t\t * @return {Array} New array with values imported and filtered based in input.\n\t\t * @example\n\t\t * // Filter out some items, this will return an array with 4 and 5\n\t\t * var items = tinymce.grep([1,2,3,4,5], function(v) {return v > 3;});\n\t\t */\n\t\tgrep : function(a, f) {\n\t\t\tvar o = [];\n\n\t\t\ttinymce.each(a, function(v) {\n\t\t\t\tif (!f || f(v))\n\t\t\t\t\to.push(v);\n\t\t\t});\n\n\t\t\treturn o;\n\t\t},\n\n\t\t/**\n\t\t * Returns the index of a value in an array, this method will return -1 if the item wasn't found.\n\t\t *\n\t\t * @method inArray\n\t\t * @param {Array} a Array/Object to search for value in.\n\t\t * @param {Object} v Value to check for inside the array.\n\t\t * @return {Number/String} Index of item inside the array inside an object. Or -1 if it wasn't found.\n\t\t * @example\n\t\t * // Get index of value in array this will alert 1 since 2 is at that index\n\t\t * alert(tinymce.inArray([1,2,3], 2));\n\t\t */\n\t\tinArray : function(a, v) {\n\t\t\tvar i, l;\n\n\t\t\tif (a) {\n\t\t\t\tfor (i = 0, l = a.length; i < l; i++) {\n\t\t\t\t\tif (a[i] === v)\n\t\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn -1;\n\t\t},\n\n\t\t/**\n\t\t * Extends an object with the specified other object(s).\n\t\t *\n\t\t * @method extend\n\t\t * @param {Object} o Object to extend with new items.\n\t\t * @param {Object} e..n Object(s) to extend the specified object with.\n\t\t * @return {Object} o New extended object, same reference as the input object.\n\t\t * @example\n\t\t * // Extends obj1 with two new fields\n\t\t * var obj = tinymce.extend(obj1, {\n\t\t *     somefield1 : 'a',\n\t\t *     somefield2 : 'a'\n\t\t * });\n\t\t * \n\t\t * // Extends obj with obj2 and obj3\n\t\t * tinymce.extend(obj, obj2, obj3);\n\t\t */\n\t\textend : function(o, e) {\n\t\t\tvar i, l, a = arguments;\n\n\t\t\tfor (i = 1, l = a.length; i < l; i++) {\n\t\t\t\te = a[i];\n\n\t\t\t\ttinymce.each(e, function(v, n) {\n\t\t\t\t\tif (v !== undefined)\n\t\t\t\t\t\to[n] = v;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn o;\n\t\t},\n\n\t\t// #endif\n\n\t\t/**\n\t\t * Removes whitespace from the beginning and end of a string.\n\t\t *\n\t\t * @method trim\n\t\t * @param {String} s String to remove whitespace from.\n\t\t * @return {String} New string with removed whitespace.\n\t\t */\n\t\ttrim : function(s) {\n\t\t\treturn (s ? '' + s : '').replace(whiteSpaceRe, '');\n\t\t},\n\n\t\t/**\n\t\t * Creates a class, subclass or static singleton.\n\t\t * More details on this method can be found in the Wiki.\n\t\t *\n\t\t * @method create\n\t\t * @param {String} s Class name, inheritage and prefix.\n\t\t * @param {Object} p Collection of methods to add to the class.\n\t\t * @param {Object} root Optional root object defaults to the global window object.\n\t\t * @example\n\t\t * // Creates a basic class\n\t\t * tinymce.create('tinymce.somepackage.SomeClass', {\n\t\t *     SomeClass : function() {\n\t\t *         // Class constructor\n\t\t *     },\n\t\t * \n\t\t *     method : function() {\n\t\t *         // Some method\n\t\t *     }\n\t\t * });\n\t\t *\n\t\t * // Creates a basic subclass class\n\t\t * tinymce.create('tinymce.somepackage.SomeSubClass:tinymce.somepackage.SomeClass', {\n\t\t *     SomeSubClass: function() {\n\t\t *         // Class constructor\n\t\t *         this.parent(); // Call parent constructor\n\t\t *     },\n\t\t * \n\t\t *     method : function() {\n\t\t *         // Some method\n\t\t *         this.parent(); // Call parent method\n\t\t *     },\n\t\t * \n\t\t *     'static' : {\n\t\t *         staticMethod : function() {\n\t\t *             // Static method\n\t\t *         }\n\t\t *     }\n\t\t * });\n\t\t *\n\t\t * // Creates a singleton/static class\n\t\t * tinymce.create('static tinymce.somepackage.SomeSingletonClass', {\n\t\t *     method : function() {\n\t\t *         // Some method\n\t\t *     }\n\t\t * });\n\t\t */\n\t\tcreate : function(s, p, root) {\n\t\t\tvar t = this, sp, ns, cn, scn, c, de = 0;\n\n\t\t\t// Parse : <prefix> <class>:<super class>\n\t\t\ts = /^((static) )?([\\w.]+)(:([\\w.]+))?/.exec(s);\n\t\t\tcn = s[3].match(/(^|\\.)(\\w+)$/i)[2]; // Class name\n\n\t\t\t// Create namespace for new class\n\t\t\tns = t.createNS(s[3].replace(/\\.\\w+$/, ''), root);\n\n\t\t\t// Class already exists\n\t\t\tif (ns[cn])\n\t\t\t\treturn;\n\n\t\t\t// Make pure static class\n\t\t\tif (s[2] == 'static') {\n\t\t\t\tns[cn] = p;\n\n\t\t\t\tif (this.onCreate)\n\t\t\t\t\tthis.onCreate(s[2], s[3], ns[cn]);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Create default constructor\n\t\t\tif (!p[cn]) {\n\t\t\t\tp[cn] = function() {};\n\t\t\t\tde = 1;\n\t\t\t}\n\n\t\t\t// Add constructor and methods\n\t\t\tns[cn] = p[cn];\n\t\t\tt.extend(ns[cn].prototype, p);\n\n\t\t\t// Extend\n\t\t\tif (s[5]) {\n\t\t\t\tsp = t.resolve(s[5]).prototype;\n\t\t\t\tscn = s[5].match(/\\.(\\w+)$/i)[1]; // Class name\n\n\t\t\t\t// Extend constructor\n\t\t\t\tc = ns[cn];\n\t\t\t\tif (de) {\n\t\t\t\t\t// Add passthrough constructor\n\t\t\t\t\tns[cn] = function() {\n\t\t\t\t\t\treturn sp[scn].apply(this, arguments);\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\t// Add inherit constructor\n\t\t\t\t\tns[cn] = function() {\n\t\t\t\t\t\tthis.parent = sp[scn];\n\t\t\t\t\t\treturn c.apply(this, arguments);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tns[cn].prototype[cn] = ns[cn];\n\n\t\t\t\t// Add super methods\n\t\t\t\tt.each(sp, function(f, n) {\n\t\t\t\t\tns[cn].prototype[n] = sp[n];\n\t\t\t\t});\n\n\t\t\t\t// Add overridden methods\n\t\t\t\tt.each(p, function(f, n) {\n\t\t\t\t\t// Extend methods if needed\n\t\t\t\t\tif (sp[n]) {\n\t\t\t\t\t\tns[cn].prototype[n] = function() {\n\t\t\t\t\t\t\tthis.parent = sp[n];\n\t\t\t\t\t\t\treturn f.apply(this, arguments);\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (n != cn)\n\t\t\t\t\t\t\tns[cn].prototype[n] = f;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Add static methods\n\t\t\tt.each(p['static'], function(f, n) {\n\t\t\t\tns[cn][n] = f;\n\t\t\t});\n\n\t\t\tif (this.onCreate)\n\t\t\t\tthis.onCreate(s[2], s[3], ns[cn].prototype);\n\t\t},\n\n\t\t/**\n\t\t * Executed the specified function for each item in a object tree.\n\t\t *\n\t\t * @method walk\n\t\t * @param {Object} o Object tree to walk though.\n\t\t * @param {function} f Function to call for each item.\n\t\t * @param {String} n Optional name of collection inside the objects to walk for example childNodes.\n\t\t * @param {String} s Optional scope to execute the function in.\n\t\t */\n\t\twalk : function(o, f, n, s) {\n\t\t\ts = s || this;\n\n\t\t\tif (o) {\n\t\t\t\tif (n)\n\t\t\t\t\to = o[n];\n\n\t\t\t\ttinymce.each(o, function(o, i) {\n\t\t\t\t\tif (f.call(s, o, i, n) === false)\n\t\t\t\t\t\treturn false;\n\n\t\t\t\t\ttinymce.walk(o, f, n, s);\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Creates a namespace on a specific object.\n\t\t *\n\t\t * @method createNS\n\t\t * @param {String} n Namespace to create for example a.b.c.d.\n\t\t * @param {Object} o Optional object to add namespace to, defaults to window.\n\t\t * @return {Object} New namespace object the last item in path.\n\t\t * @example\n\t\t * // Create some namespace\n\t\t * tinymce.createNS('tinymce.somepackage.subpackage');\n\t\t *\n\t\t * // Add a singleton\n\t\t * var tinymce.somepackage.subpackage.SomeSingleton = {\n\t\t *     method : function() {\n\t\t *         // Some method\n\t\t *     }\n\t\t * };\n\t\t */\n\t\tcreateNS : function(n, o) {\n\t\t\tvar i, v;\n\n\t\t\to = o || win;\n\n\t\t\tn = n.split('.');\n\t\t\tfor (i=0; i<n.length; i++) {\n\t\t\t\tv = n[i];\n\n\t\t\t\tif (!o[v])\n\t\t\t\t\to[v] = {};\n\n\t\t\t\to = o[v];\n\t\t\t}\n\n\t\t\treturn o;\n\t\t},\n\n\t\t/**\n\t\t * Resolves a string and returns the object from a specific structure.\n\t\t *\n\t\t * @method resolve\n\t\t * @param {String} n Path to resolve for example a.b.c.d.\n\t\t * @param {Object} o Optional object to search though, defaults to window.\n\t\t * @return {Object} Last object in path or null if it couldn't be resolved.\n\t\t * @example\n\t\t * // Resolve a path into an object reference\n\t\t * var obj = tinymce.resolve('a.b.c.d');\n\t\t */\n\t\tresolve : function(n, o) {\n\t\t\tvar i, l;\n\n\t\t\to = o || win;\n\n\t\t\tn = n.split('.');\n\t\t\tfor (i = 0, l = n.length; i < l; i++) {\n\t\t\t\to = o[n[i]];\n\n\t\t\t\tif (!o)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn o;\n\t\t},\n\n\t\t/**\n\t\t * Adds an unload handler to the document. This handler will be executed when the document gets unloaded.\n\t\t * This method is useful for dealing with browser memory leaks where it might be vital to remove DOM references etc.\n\t\t *\n\t\t * @method addUnload\n\t\t * @param {function} f Function to execute before the document gets unloaded.\n\t\t * @param {Object} s Optional scope to execute the function in.\n\t\t * @return {function} Returns the specified unload handler function.\n\t\t * @example\n\t\t * // Fixes a leak with a DOM element that was palces in the someObject\n\t\t * tinymce.addUnload(function() {\n\t\t *     // Null DOM element to reduce IE memory leak\n\t\t *     someObject.someElement = null;\n\t\t * });\n\t\t */\n\t\taddUnload : function(f, s) {\n\t\t\tvar t = this;\n\n\t\t\tf = {func : f, scope : s || this};\n\n\t\t\tif (!t.unloads) {\n\t\t\t\tfunction unload() {\n\t\t\t\t\tvar li = t.unloads, o, n;\n\n\t\t\t\t\tif (li) {\n\t\t\t\t\t\t// Call unload handlers\n\t\t\t\t\t\tfor (n in li) {\n\t\t\t\t\t\t\to = li[n];\n\n\t\t\t\t\t\t\tif (o && o.func)\n\t\t\t\t\t\t\t\to.func.call(o.scope, 1); // Send in one arg to distinct unload and user destroy\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Detach unload function\n\t\t\t\t\t\tif (win.detachEvent) {\n\t\t\t\t\t\t\twin.detachEvent('onbeforeunload', fakeUnload);\n\t\t\t\t\t\t\twin.detachEvent('onunload', unload);\n\t\t\t\t\t\t} else if (win.removeEventListener)\n\t\t\t\t\t\t\twin.removeEventListener('unload', unload, false);\n\n\t\t\t\t\t\t// Destroy references\n\t\t\t\t\t\tt.unloads = o = li = w = unload = 0;\n\n\t\t\t\t\t\t// Run garbarge collector on IE\n\t\t\t\t\t\tif (win.CollectGarbage)\n\t\t\t\t\t\t\tCollectGarbage();\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tfunction fakeUnload() {\n\t\t\t\t\tvar d = document;\n\n\t\t\t\t\t// Is there things still loading, then do some magic\n\t\t\t\t\tif (d.readyState == 'interactive') {\n\t\t\t\t\t\tfunction stop() {\n\t\t\t\t\t\t\t// Prevent memory leak\n\t\t\t\t\t\t\td.detachEvent('onstop', stop);\n\n\t\t\t\t\t\t\t// Call unload handler\n\t\t\t\t\t\t\tif (unload)\n\t\t\t\t\t\t\t\tunload();\n\n\t\t\t\t\t\t\td = 0;\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// Fire unload when the currently loading page is stopped\n\t\t\t\t\t\tif (d)\n\t\t\t\t\t\t\td.attachEvent('onstop', stop);\n\n\t\t\t\t\t\t// Remove onstop listener after a while to prevent the unload function\n\t\t\t\t\t\t// to execute if the user presses cancel in an onbeforeunload\n\t\t\t\t\t\t// confirm dialog and then presses the browser stop button\n\t\t\t\t\t\twin.setTimeout(function() {\n\t\t\t\t\t\t\tif (d)\n\t\t\t\t\t\t\t\td.detachEvent('onstop', stop);\n\t\t\t\t\t\t}, 0);\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Attach unload handler\n\t\t\t\tif (win.attachEvent) {\n\t\t\t\t\twin.attachEvent('onunload', unload);\n\t\t\t\t\twin.attachEvent('onbeforeunload', fakeUnload);\n\t\t\t\t} else if (win.addEventListener)\n\t\t\t\t\twin.addEventListener('unload', unload, false);\n\n\t\t\t\t// Setup initial unload handler array\n\t\t\t\tt.unloads = [f];\n\t\t\t} else\n\t\t\t\tt.unloads.push(f);\n\n\t\t\treturn f;\n\t\t},\n\n\t\t/**\n\t\t * Removes the specified function form the unload handler list.\n\t\t *\n\t\t * @method removeUnload\n\t\t * @param {function} f Function to remove from unload handler list.\n\t\t * @return {function} Removed function name or null if it wasn't found.\n\t\t */\n\t\tremoveUnload : function(f) {\n\t\t\tvar u = this.unloads, r = null;\n\n\t\t\ttinymce.each(u, function(o, i) {\n\t\t\t\tif (o && o.func == f) {\n\t\t\t\t\tu.splice(i, 1);\n\t\t\t\t\tr = f;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn r;\n\t\t},\n\n\t\t/**\n\t\t * Splits a string but removes the whitespace before and after each value.\n\t\t *\n\t\t * @method explode\n\t\t * @param {string} s String to split.\n\t\t * @param {string} d Delimiter to split by.\n\t\t * @example\n\t\t * // Split a string into an array with a,b,c\n\t\t * var arr = tinymce.explode('a, b,   c');\n\t\t */\n\t\texplode : function(s, d) {\n\t\t\treturn s ? tinymce.map(s.split(d || ','), tinymce.trim) : s;\n\t\t},\n\n\t\t_addVer : function(u) {\n\t\t\tvar v;\n\n\t\t\tif (!this.query)\n\t\t\t\treturn u;\n\n\t\t\tv = (u.indexOf('?') == -1 ? '?' : '&') + this.query;\n\n\t\t\tif (u.indexOf('#') == -1)\n\t\t\t\treturn u + v;\n\n\t\t\treturn u.replace('#', v + '#');\n\t\t},\n\n\t\t// Fix function for IE 9 where regexps isn't working correctly\n\t\t// Todo: remove me once MS fixes the bug\n\t\t_replace : function(find, replace, str) {\n\t\t\t// On IE9 we have to fake $x replacement\n\t\t\tif (isRegExpBroken) {\n\t\t\t\treturn str.replace(find, function() {\n\t\t\t\t\tvar val = replace, args = arguments, i;\n\n\t\t\t\t\tfor (i = 0; i < args.length - 2; i++) {\n\t\t\t\t\t\tif (args[i] === undefined) {\n\t\t\t\t\t\t\tval = val.replace(new RegExp('\\\\$' + i, 'g'), '');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tval = val.replace(new RegExp('\\\\$' + i, 'g'), args[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn val;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn str.replace(find, replace);\n\t\t}\n\n\t\t/**#@-*/\n\t};\n\n\t// Initialize the API\n\ttinymce._init();\n\n\t// Expose tinymce namespace to the global namespace (window)\n\twin.tinymce = win.tinyMCE = tinymce;\n\n\t// Describe the different namespaces\n\n\t/**\n\t * Root level namespace this contains classes directly releated to the TinyMCE editor.\n\t *\n\t * @namespace tinymce\n\t */\n\n\t/**\n\t * Contains classes for handling the browsers DOM.\n\t *\n\t * @namespace tinymce.dom\n\t */\n\n\t/**\n\t * Contains html parser and serializer logic.\n\t *\n\t * @namespace tinymce.html\n\t */\n\n\t/**\n\t * Contains the different UI types such as buttons, listboxes etc.\n\t *\n\t * @namespace tinymce.ui\n\t */\n\n\t/**\n\t * Contains various utility classes such as json parser, cookies etc.\n\t *\n\t * @namespace tinymce.util\n\t */\n\n\t/**\n\t * Contains plugin classes.\n\t *\n\t * @namespace tinymce.plugins\n\t */\n})(window);\n","Magento_Tinymce3/tiny_mce/classes/EditorCommands.js":"/**\n * EditorCommands.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t// Added for compression purposes\n\tvar each = tinymce.each, undefined, TRUE = true, FALSE = false;\n\n\t/**\n\t * This class enables you to add custom editor commands and it contains\n\t * overrides for native browser commands to address various bugs and issues.\n\t *\n\t * @class tinymce.EditorCommands\n\t */\n\ttinymce.EditorCommands = function(editor) {\n\t\tvar dom = editor.dom,\n\t\t\tselection = editor.selection,\n\t\t\tcommands = {state: {}, exec : {}, value : {}},\n\t\t\tsettings = editor.settings,\n\t\t\tformatter = editor.formatter,\n\t\t\tbookmark;\n\n\t\t/**\n\t\t * Executes the specified command.\n\t\t *\n\t\t * @method execCommand\n\t\t * @param {String} command Command to execute.\n\t\t * @param {Boolean} ui Optional user interface state.\n\t\t * @param {Object} value Optional value for command.\n\t\t * @return {Boolean} true/false if the command was found or not.\n\t\t */\n\t\tfunction execCommand(command, ui, value) {\n\t\t\tvar func;\n\n\t\t\tcommand = command.toLowerCase();\n\t\t\tif (func = commands.exec[command]) {\n\t\t\t\tfunc(command, ui, value);\n\t\t\t\treturn TRUE;\n\t\t\t}\n\n\t\t\treturn FALSE;\n\t\t};\n\n\t\t/**\n\t\t * Queries the current state for a command for example if the current selection is \"bold\".\n\t\t *\n\t\t * @method queryCommandState\n\t\t * @param {String} command Command to check the state of.\n\t\t * @return {Boolean/Number} true/false if the selected contents is bold or not, -1 if it's not found.\n\t\t */\n\t\tfunction queryCommandState(command) {\n\t\t\tvar func;\n\n\t\t\tcommand = command.toLowerCase();\n\t\t\tif (func = commands.state[command])\n\t\t\t\treturn func(command);\n\n\t\t\treturn -1;\n\t\t};\n\n\t\t/**\n\t\t * Queries the command value for example the current fontsize.\n\t\t *\n\t\t * @method queryCommandValue\n\t\t * @param {String} command Command to check the value of.\n\t\t * @return {Object} Command value of false if it's not found.\n\t\t */\n\t\tfunction queryCommandValue(command) {\n\t\t\tvar func;\n\n\t\t\tcommand = command.toLowerCase();\n\t\t\tif (func = commands.value[command])\n\t\t\t\treturn func(command);\n\n\t\t\treturn FALSE;\n\t\t};\n\n\t\t/**\n\t\t * Adds commands to the command collection.\n\t\t *\n\t\t * @method addCommands\n\t\t * @param {Object} command_list Name/value collection with commands to add, the names can also be comma separated.\n\t\t * @param {String} type Optional type to add, defaults to exec. Can be value or state as well.\n\t\t */\n\t\tfunction addCommands(command_list, type) {\n\t\t\ttype = type || 'exec';\n\n\t\t\teach(command_list, function(callback, command) {\n\t\t\t\teach(command.toLowerCase().split(','), function(command) {\n\t\t\t\t\tcommands[type][command] = callback;\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\n\t\t// Expose public methods\n\t\ttinymce.extend(this, {\n\t\t\texecCommand : execCommand,\n\t\t\tqueryCommandState : queryCommandState,\n\t\t\tqueryCommandValue : queryCommandValue,\n\t\t\taddCommands : addCommands\n\t\t});\n\n\t\t// Private methods\n\n\t\tfunction execNativeCommand(command, ui, value) {\n\t\t\tif (ui === undefined)\n\t\t\t\tui = FALSE;\n\n\t\t\tif (value === undefined)\n\t\t\t\tvalue = null;\n\n\t\t\treturn editor.getDoc().execCommand(command, ui, value);\n\t\t};\n\n\t\tfunction isFormatMatch(name) {\n\t\t\treturn formatter.match(name);\n\t\t};\n\n\t\tfunction toggleFormat(name, value) {\n\t\t\tformatter.toggle(name, value ? {value : value} : undefined);\n\t\t};\n\n\t\tfunction storeSelection(type) {\n\t\t\tbookmark = selection.getBookmark(type);\n\t\t};\n\n\t\tfunction restoreSelection() {\n\t\t\tselection.moveToBookmark(bookmark);\n\t\t};\n\n\t\t// Add execCommand overrides\n\t\taddCommands({\n\t\t\t// Ignore these, added for compatibility\n\t\t\t'mceResetDesignMode,mceBeginUndoLevel' : function() {},\n\n\t\t\t// Add undo manager logic\n\t\t\t'mceEndUndoLevel,mceAddUndoLevel' : function() {\n\t\t\t\teditor.undoManager.add();\n\t\t\t},\n\n\t\t\t'Cut,Copy,Paste' : function(command) {\n\t\t\t\tvar doc = editor.getDoc(), failed;\n\n\t\t\t\t// Try executing the native command\n\t\t\t\ttry {\n\t\t\t\t\texecNativeCommand(command);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Command failed\n\t\t\t\t\tfailed = TRUE;\n\t\t\t\t}\n\n\t\t\t\t// Present alert message about clipboard access not being available\n\t\t\t\tif (failed || !doc.queryCommandSupported(command)) {\n\t\t\t\t\tif (tinymce.isGecko) {\n\t\t\t\t\t\teditor.windowManager.confirm(editor.getLang('clipboard_msg'), function(state) {\n\t\t\t\t\t\t\tif (state)\n\t\t\t\t\t\t\t\topen('http://www.mozilla.org/editor/midasdemo/securityprefs.html', '_blank');\n\t\t\t\t\t\t});\n\t\t\t\t\t} else\n\t\t\t\t\t\teditor.windowManager.alert(editor.getLang('clipboard_no_support'));\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// Override unlink command\n\t\t\tunlink : function(command) {\n\t\t\t\tif (selection.isCollapsed())\n\t\t\t\t\tselection.select(selection.getNode());\n\n\t\t\t\texecNativeCommand(command);\n\t\t\t\tselection.collapse(FALSE);\n\t\t\t},\n\n\t\t\t// Override justify commands to use the text formatter engine\n\t\t\t'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull' : function(command) {\n\t\t\t\tvar align = command.substring(7);\n\n\t\t\t\t// Remove all other alignments first\n\t\t\t\teach('left,center,right,full'.split(','), function(name) {\n\t\t\t\t\tif (align != name)\n\t\t\t\t\t\tformatter.remove('align' + name);\n\t\t\t\t});\n\n\t\t\t\ttoggleFormat('align' + align);\n\t\t\t\texecCommand('mceRepaint');\n\t\t\t},\n\n\t\t\t// Override list commands to fix WebKit bug\n\t\t\t'InsertUnorderedList,InsertOrderedList' : function(command) {\n\t\t\t\tvar listElm, listParent;\n\n\t\t\t\texecNativeCommand(command);\n\n\t\t\t\t// WebKit produces lists within block elements so we need to split them\n\t\t\t\t// we will replace the native list creation logic to custom logic later on\n\t\t\t\t// TODO: Remove this when the list creation logic is removed\n\t\t\t\tlistElm = dom.getParent(selection.getNode(), 'ol,ul');\n\t\t\t\tif (listElm) {\n\t\t\t\t\tlistParent = listElm.parentNode;\n\n\t\t\t\t\t// If list is within a text block then split that block\n\t\t\t\t\tif (/^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)) {\n\t\t\t\t\t\tstoreSelection();\n\t\t\t\t\t\tdom.split(listParent, listElm);\n\t\t\t\t\t\trestoreSelection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// Override commands to use the text formatter engine\n\t\t\t'Bold,Italic,Underline,Strikethrough,Superscript,Subscript' : function(command) {\n\t\t\t\ttoggleFormat(command);\n\t\t\t},\n\n\t\t\t// Override commands to use the text formatter engine\n\t\t\t'ForeColor,HiliteColor,FontName' : function(command, ui, value) {\n\t\t\t\ttoggleFormat(command, value);\n\t\t\t},\n\n\t\t\tFontSize : function(command, ui, value) {\n\t\t\t\tvar fontClasses, fontSizes;\n\n\t\t\t\t// Convert font size 1-7 to styles\n\t\t\t\tif (value >= 1 && value <= 7) {\n\t\t\t\t\tfontSizes = tinymce.explode(settings.font_size_style_values);\n\t\t\t\t\tfontClasses = tinymce.explode(settings.font_size_classes);\n\n\t\t\t\t\tif (fontClasses)\n\t\t\t\t\t\tvalue = fontClasses[value - 1] || value;\n\t\t\t\t\telse\n\t\t\t\t\t\tvalue = fontSizes[value - 1] || value;\n\t\t\t\t}\n\n\t\t\t\ttoggleFormat(command, value);\n\t\t\t},\n\n\t\t\tRemoveFormat : function(command) {\n\t\t\t\tformatter.remove(command);\n\t\t\t},\n\n\t\t\tmceBlockQuote : function(command) {\n\t\t\t\ttoggleFormat('blockquote');\n\t\t\t},\n\n\t\t\tFormatBlock : function(command, ui, value) {\n\t\t\t\treturn toggleFormat(value || 'p');\n\t\t\t},\n\n\t\t\tmceCleanup : function() {\n\t\t\t\tvar bookmark = selection.getBookmark();\n\n\t\t\t\teditor.setContent(editor.getContent({cleanup : TRUE}), {cleanup : TRUE});\n\n\t\t\t\tselection.moveToBookmark(bookmark);\n\t\t\t},\n\n\t\t\tmceRemoveNode : function(command, ui, value) {\n\t\t\t\tvar node = value || selection.getNode();\n\n\t\t\t\t// Make sure that the body node isn't removed\n\t\t\t\tif (node != editor.getBody()) {\n\t\t\t\t\tstoreSelection();\n\t\t\t\t\teditor.dom.remove(node, TRUE);\n\t\t\t\t\trestoreSelection();\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tmceSelectNodeDepth : function(command, ui, value) {\n\t\t\t\tvar counter = 0;\n\n\t\t\t\tdom.getParent(selection.getNode(), function(node) {\n\t\t\t\t\tif (node.nodeType == 1 && counter++ == value) {\n\t\t\t\t\t\tselection.select(node);\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\t\t\t\t}, editor.getBody());\n\t\t\t},\n\n\t\t\tmceSelectNode : function(command, ui, value) {\n\t\t\t\tselection.select(value);\n\t\t\t},\n\n\t\t\tmceInsertContent : function(command, ui, value) {\n\t\t\t\tvar parser, serializer, parentNode, rootNode, fragment, args,\n\t\t\t\t\tmarker, nodeRect, viewPortRect, rng, node, node2, bookmarkHtml, viewportBodyElement;\n\n\t\t\t\t// Setup parser and serializer\n\t\t\t\tparser = editor.parser;\n\t\t\t\tserializer = new tinymce.html.Serializer({}, editor.schema);\n\t\t\t\tbookmarkHtml = '<span id=\"mce_marker\" data-mce-type=\"bookmark\">\\uFEFF</span>';\n\n\t\t\t\t// Run beforeSetContent handlers on the HTML to be inserted\n\t\t\t\targs = {content: value, format: 'html'};\n\t\t\t\tselection.onBeforeSetContent.dispatch(selection, args);\n\t\t\t\tvalue = args.content;\n\n\t\t\t\t// Add caret at end of contents if it's missing\n\t\t\t\tif (value.indexOf('{$caret}') == -1)\n\t\t\t\t\tvalue += '{$caret}';\n\n\t\t\t\t// Replace the caret marker with a span bookmark element\n\t\t\t\tvalue = value.replace(/\\{\\$caret\\}/, bookmarkHtml);\n\n\t\t\t\t// Insert node maker where we will insert the new HTML and get it's parent\n\t\t\t\tif (!selection.isCollapsed())\n\t\t\t\t\teditor.getDoc().execCommand('Delete', false, null);\n\n\t\t\t\tparentNode = selection.getNode();\n\n\t\t\t\t// Parse the fragment within the context of the parent node\n\t\t\t\targs = {context : parentNode.nodeName.toLowerCase()};\n\t\t\t\tfragment = parser.parse(value, args);\n\n\t\t\t\t// Move the caret to a more suitable location\n\t\t\t\tnode = fragment.lastChild;\n\t\t\t\tif (node.attr('id') == 'mce_marker') {\n\t\t\t\t\tmarker = node;\n\n\t\t\t\t\tfor (node = node.prev; node; node = node.walk(true)) {\n\t\t\t\t\t\tif (node.type == 3 || !dom.isBlock(node.name)) {\n\t\t\t\t\t\t\tnode.parent.insert(marker, node, node.name === 'br');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If parser says valid we can insert the contents into that parent\n\t\t\t\tif (!args.invalid) {\n\t\t\t\t\tvalue = serializer.serialize(fragment);\n\n\t\t\t\t\t// Check if parent is empty or only has one BR element then set the innerHTML of that parent\n\t\t\t\t\tnode = parentNode.firstChild;\n\t\t\t\t\tnode2 = parentNode.lastChild;\n\t\t\t\t\tif (!node || (node === node2 && node.nodeName === 'BR'))\n\t\t\t\t\t\tdom.setHTML(parentNode, value);\n\t\t\t\t\telse\n\t\t\t\t\t\tselection.setContent(value);\n\t\t\t\t} else {\n\t\t\t\t\t// If the fragment was invalid within that context then we need\n\t\t\t\t\t// to parse and process the parent it's inserted into\n\n\t\t\t\t\t// Insert bookmark node and get the parent\n\t\t\t\t\tselection.setContent(bookmarkHtml);\n\t\t\t\t\tparentNode = editor.selection.getNode();\n\t\t\t\t\trootNode = editor.getBody();\n\n\t\t\t\t\t// Opera will return the document node when selection is in root\n\t\t\t\t\tif (parentNode.nodeType == 9)\n\t\t\t\t\t\tparentNode = node = rootNode;\n\t\t\t\t\telse\n\t\t\t\t\t\tnode = parentNode;\n\n\t\t\t\t\t// Find the ancestor just before the root element\n\t\t\t\t\twhile (node !== rootNode) {\n\t\t\t\t\t\tparentNode = node;\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get the outer/inner HTML depending on if we are in the root and parser and serialize that\n\t\t\t\t\tvalue = parentNode == rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode);\n\t\t\t\t\tvalue = serializer.serialize(\n\t\t\t\t\t\tparser.parse(\n\t\t\t\t\t\t\t// Need to replace by using a function since $ in the contents would otherwise be a problem\n\t\t\t\t\t\t\tvalue.replace(/<span (id=\"mce_marker\"|id=mce_marker).+?<\\/span>/i, function() {\n\t\t\t\t\t\t\t\treturn serializer.serialize(fragment);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\t// Set the inner/outer HTML depending on if we are in the root or not\n\t\t\t\t\tif (parentNode == rootNode)\n\t\t\t\t\t\tdom.setHTML(rootNode, value);\n\t\t\t\t\telse\n\t\t\t\t\t\tdom.setOuterHTML(parentNode, value);\n\t\t\t\t}\n\n\t\t\t\tmarker = dom.get('mce_marker');\n\n\t\t\t\t// Scroll range into view scrollIntoView on element can't be used since it will scroll the main view port as well\n\t\t\t\tnodeRect = dom.getRect(marker);\n\t\t\t\tviewPortRect = dom.getViewPort(editor.getWin());\n\n\t\t\t\t// Check if node is out side the viewport if it is then scroll to it\n\t\t\t\tif ((nodeRect.y + nodeRect.h > viewPortRect.y + viewPortRect.h || nodeRect.y < viewPortRect.y) ||\n\t\t\t\t\t(nodeRect.x > viewPortRect.x + viewPortRect.w || nodeRect.x < viewPortRect.x)) {\n\t\t\t\t\tviewportBodyElement = tinymce.isIE ? editor.getDoc().documentElement : editor.getBody();\n\t\t\t\t\tviewportBodyElement.scrollLeft = nodeRect.x;\n\t\t\t\t\tviewportBodyElement.scrollTop = nodeRect.y - viewPortRect.h + 25;\n\t\t\t\t}\n\n\t\t\t\t// Move selection before marker and remove it\n\t\t\t\trng = dom.createRng();\n\n\t\t\t\t// If previous sibling is a text node set the selection to the end of that node\n\t\t\t\tnode = marker.previousSibling;\n\t\t\t\tif (node && node.nodeType == 3) {\n\t\t\t\t\trng.setStart(node, node.nodeValue.length);\n\t\t\t\t} else {\n\t\t\t\t\t// If the previous sibling isn't a text node or doesn't exist set the selection before the marker node\n\t\t\t\t\trng.setStartBefore(marker);\n\t\t\t\t\trng.setEndBefore(marker);\n\t\t\t\t}\n\n\t\t\t\t// Remove the marker node and set the new range\n\t\t\t\tdom.remove(marker);\n\t\t\t\tselection.setRng(rng);\n\n\t\t\t\t// Dispatch after event and add any visual elements needed\n\t\t\t\tselection.onSetContent.dispatch(selection, args);\n\t\t\t\teditor.addVisual();\n\t\t\t},\n\n\t\t\tmceInsertRawHTML : function(command, ui, value) {\n\t\t\t\tselection.setContent('tiny_mce_marker');\n\t\t\t\teditor.setContent(editor.getContent().replace(/tiny_mce_marker/g, function() { return value }));\n\t\t\t},\n\n\t\t\tmceSetContent : function(command, ui, value) {\n\t\t\t\teditor.setContent(value);\n\t\t\t},\n\n\t\t\t'Indent,Outdent' : function(command) {\n\t\t\t\tvar intentValue, indentUnit, value;\n\n\t\t\t\t// Setup indent level\n\t\t\t\tintentValue = settings.indentation;\n\t\t\t\tindentUnit = /[a-z%]+$/i.exec(intentValue);\n\t\t\t\tintentValue = parseInt(intentValue);\n\n\t\t\t\tif (!queryCommandState('InsertUnorderedList') && !queryCommandState('InsertOrderedList')) {\n\t\t\t\t\teach(selection.getSelectedBlocks(), function(element) {\n\t\t\t\t\t\tif (command == 'outdent') {\n\t\t\t\t\t\t\tvalue = Math.max(0, parseInt(element.style.paddingLeft || 0) - intentValue);\n\t\t\t\t\t\t\tdom.setStyle(element, 'paddingLeft', value ? value + indentUnit : '');\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tdom.setStyle(element, 'paddingLeft', (parseInt(element.style.paddingLeft || 0) + intentValue) + indentUnit);\n\t\t\t\t\t});\n\t\t\t\t} else\n\t\t\t\t\texecNativeCommand(command);\n\t\t\t},\n\n\t\t\tmceRepaint : function() {\n\t\t\t\tvar bookmark;\n\n\t\t\t\tif (tinymce.isGecko) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstoreSelection(TRUE);\n\n\t\t\t\t\t\tif (selection.getSel())\n\t\t\t\t\t\t\tselection.getSel().selectAllChildren(editor.getBody());\n\n\t\t\t\t\t\tselection.collapse(TRUE);\n\t\t\t\t\t\trestoreSelection();\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t// Ignore\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tmceToggleFormat : function(command, ui, value) {\n\t\t\t\tformatter.toggle(value);\n\t\t\t},\n\n\t\t\tInsertHorizontalRule : function() {\n\t\t\t\teditor.execCommand('mceInsertContent', false, '<hr />');\n\t\t\t},\n\n\t\t\tmceToggleVisualAid : function() {\n\t\t\t\teditor.hasVisual = !editor.hasVisual;\n\t\t\t\teditor.addVisual();\n\t\t\t},\n\n\t\t\tmceReplaceContent : function(command, ui, value) {\n\t\t\t\teditor.execCommand('mceInsertContent', false, value.replace(/\\{\\$selection\\}/g, selection.getContent({format : 'text'})));\n\t\t\t},\n\n\t\t\tmceInsertLink : function(command, ui, value) {\n\t\t\t\tvar anchor;\n\n\t\t\t\tif (typeof(value) == 'string')\n\t\t\t\t\tvalue = {href : value};\n\n\t\t\t\tanchor = dom.getParent(selection.getNode(), 'a');\n\n\t\t\t\t// Spaces are never valid in URLs and it's a very common mistake for people to make so we fix it here.\n\t\t\t\tvalue.href = value.href.replace(' ', '%20');\n\n\t\t\t\t// Remove existing links if there could be child links or that the href isn't specified\n\t\t\t\tif (!anchor || !value.href) {\n\t\t\t\t\tformatter.remove('link');\n\t\t\t\t}\t\t\n\n\t\t\t\t// Apply new link to selection\n\t\t\t\tif (value.href) {\n\t\t\t\t\tformatter.apply('link', value, anchor);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tselectAll : function() {\n\t\t\t\tvar root = dom.getRoot(), rng = dom.createRng();\n\n\t\t\t\trng.setStart(root, 0);\n\t\t\t\trng.setEnd(root, root.childNodes.length);\n\n\t\t\t\teditor.selection.setRng(rng);\n\t\t\t}\n\t\t});\n\n\t\t// Add queryCommandState overrides\n\t\taddCommands({\n\t\t\t// Override justify commands\n\t\t\t'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull' : function(command) {\n\t\t\t\treturn isFormatMatch('align' + command.substring(7));\n\t\t\t},\n\n\t\t\t'Bold,Italic,Underline,Strikethrough,Superscript,Subscript' : function(command) {\n\t\t\t\treturn isFormatMatch(command);\n\t\t\t},\n\n\t\t\tmceBlockQuote : function() {\n\t\t\t\treturn isFormatMatch('blockquote');\n\t\t\t},\n\n\t\t\tOutdent : function() {\n\t\t\t\tvar node;\n\n\t\t\t\tif (settings.inline_styles) {\n\t\t\t\t\tif ((node = dom.getParent(selection.getStart(), dom.isBlock)) && parseInt(node.style.paddingLeft) > 0)\n\t\t\t\t\t\treturn TRUE;\n\n\t\t\t\t\tif ((node = dom.getParent(selection.getEnd(), dom.isBlock)) && parseInt(node.style.paddingLeft) > 0)\n\t\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\n\t\t\t\treturn queryCommandState('InsertUnorderedList') || queryCommandState('InsertOrderedList') || (!settings.inline_styles && !!dom.getParent(selection.getNode(), 'BLOCKQUOTE'));\n\t\t\t},\n\n\t\t\t'InsertUnorderedList,InsertOrderedList' : function(command) {\n\t\t\t\treturn dom.getParent(selection.getNode(), command == 'insertunorderedlist' ? 'UL' : 'OL');\n\t\t\t}\n\t\t}, 'state');\n\n\t\t// Add queryCommandValue overrides\n\t\taddCommands({\n\t\t\t'FontSize,FontName' : function(command) {\n\t\t\t\tvar value = 0, parent;\n\n\t\t\t\tif (parent = dom.getParent(selection.getNode(), 'span')) {\n\t\t\t\t\tif (command == 'fontsize')\n\t\t\t\t\t\tvalue = parent.style.fontSize;\n\t\t\t\t\telse\n\t\t\t\t\t\tvalue = parent.style.fontFamily.replace(/, /g, ',').replace(/[\\'\\\"]/g, '').toLowerCase();\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}, 'value');\n\n\t\t// Add undo manager logic\n\t\tif (settings.custom_undo_redo) {\n\t\t\taddCommands({\n\t\t\t\tUndo : function() {\n\t\t\t\t\teditor.undoManager.undo();\n\t\t\t\t},\n\n\t\t\t\tRedo : function() {\n\t\t\t\t\teditor.undoManager.redo();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/WindowManager.js":"/**\n * WindowManager.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar Dispatcher = tinymce.util.Dispatcher, each = tinymce.each, isIE = tinymce.isIE, isOpera = tinymce.isOpera;\n\n\t/**\n\t * This class handles the creation of native windows and dialogs. This class can be extended to provide for example inline dialogs.\n\t *\n\t * @class tinymce.WindowManager\n\t * @example\n\t * // Opens a new dialog with the file.htm file and the size 320x240\n\t * // It also adds a custom parameter this can be retrieved by using tinyMCEPopup.getWindowArg inside the dialog.\n\t * tinyMCE.activeEditor.windowManager.open({\n\t *    url : 'file.htm',\n\t *    width : 320,\n\t *    height : 240\n\t * }, {\n\t *    custom_param : 1\n\t * });\n\t *\n\t * // Displays an alert box using the active editors window manager instance\n\t * tinyMCE.activeEditor.windowManager.alert('Hello world!');\n\t *\n\t * // Displays an confirm box and an alert message will be displayed depending on what you choose in the confirm\n\t * tinyMCE.activeEditor.windowManager.confirm(\"Do you want to do something\", function(s) {\n\t *    if (s)\n\t *       tinyMCE.activeEditor.windowManager.alert(\"Ok\");\n\t *    else\n\t *       tinyMCE.activeEditor.windowManager.alert(\"Cancel\");\n\t * });\n\t */\n\ttinymce.create('tinymce.WindowManager', {\n\t\t/**\n\t\t * Constructs a new window manager instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method WindowManager\n\t\t * @param {tinymce.Editor} ed Editor instance that the windows are bound to.\n\t\t */\n\t\tWindowManager : function(ed) {\n\t\t\tvar t = this;\n\n\t\t\tt.editor = ed;\n\t\t\tt.onOpen = new Dispatcher(t);\n\t\t\tt.onClose = new Dispatcher(t);\n\t\t\tt.params = {};\n\t\t\tt.features = {};\n\t\t},\n\n\t\t/**\n\t\t * Opens a new window.\n\t\t *\n\t\t * @method open\n\t\t * @param {Object} s Optional name/value settings collection contains things like width/height/url etc.\n\t\t * @option {String} title Window title.\n\t\t * @option {String} file URL of the file to open in the window.\n\t\t * @option {Number} width Width in pixels.\n\t\t * @option {Number} height Height in pixels.\n\t\t * @option {Boolean} resizable Specifies whether the popup window is resizable or not.\n\t\t * @option {Boolean} maximizable Specifies whether the popup window has a \"maximize\" button and can get maximized or not.\n\t\t * @option {Boolean} inline Specifies whether to display in-line (set to 1 or true for in-line display; requires inlinepopups plugin).\n\t\t * @option {String/Boolean} popup_css Optional CSS to use in the popup. Set to false to remove the default one.\n\t\t * @option {Boolean} translate_i18n Specifies whether translation should occur or not of i18 key strings. Default is true.\n\t\t * @option {String/bool} close_previous Specifies whether a previously opened popup window is to be closed or not (like when calling the file browser window over the advlink popup).\n\t\t * @option {String/bool} scrollbars Specifies whether the popup window can have scrollbars if required (i.e. content larger than the popup size specified).\n\t\t * @param {Object} p Optional parameters/arguments collection can be used by the dialogs to retrieve custom parameters.\n\t\t * @option {String} plugin_url url to plugin if opening plugin window that calls tinyMCEPopup.requireLangPack() and needs access to the plugin language js files\n\t\t */\n\t\topen : function(s, p) {\n\t\t\tvar t = this, f = '', x, y, mo = t.editor.settings.dialog_type == 'modal', w, sw, sh, vp = tinymce.DOM.getViewPort(), u;\n\n\t\t\t// Default some options\n\t\t\ts = s || {};\n\t\t\tp = p || {};\n\t\t\tsw = isOpera ? vp.w : screen.width; // Opera uses windows inside the Opera window\n\t\t\tsh = isOpera ? vp.h : screen.height;\n\t\t\ts.name = s.name || 'mc_' + new Date().getTime();\n\t\t\ts.width = parseInt(s.width || 320);\n\t\t\ts.height = parseInt(s.height || 240);\n\t\t\ts.resizable = true;\n\t\t\ts.left = s.left || parseInt(sw / 2.0) - (s.width / 2.0);\n\t\t\ts.top = s.top || parseInt(sh / 2.0) - (s.height / 2.0);\n\t\t\tp.inline = false;\n\t\t\tp.mce_width = s.width;\n\t\t\tp.mce_height = s.height;\n\t\t\tp.mce_auto_focus = s.auto_focus;\n\n\t\t\tif (mo) {\n\t\t\t\tif (isIE) {\n\t\t\t\t\ts.center = true;\n\t\t\t\t\ts.help = false;\n\t\t\t\t\ts.dialogWidth = s.width + 'px';\n\t\t\t\t\ts.dialogHeight = s.height + 'px';\n\t\t\t\t\ts.scroll = s.scrollbars || false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Build features string\n\t\t\teach(s, function(v, k) {\n\t\t\t\tif (tinymce.is(v, 'boolean'))\n\t\t\t\t\tv = v ? 'yes' : 'no';\n\n\t\t\t\tif (!/^(name|url)$/.test(k)) {\n\t\t\t\t\tif (isIE && mo)\n\t\t\t\t\t\tf += (f ? ';' : '') + k + ':' + v;\n\t\t\t\t\telse\n\t\t\t\t\t\tf += (f ? ',' : '') + k + '=' + v;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tt.features = s;\n\t\t\tt.params = p;\n\t\t\tt.onOpen.dispatch(t, s, p);\n\n\t\t\tu = s.url || s.file;\n\t\t\tu = tinymce._addVer(u);\n\n\t\t\ttry {\n\t\t\t\tif (isIE && mo) {\n\t\t\t\t\tw = 1;\n\t\t\t\t\twindow.showModalDialog(u, window, f);\n\t\t\t\t} else\n\t\t\t\t\tw = window.open(u, s.name, f);\n\t\t\t} catch (ex) {\n\t\t\t\t// Ignore\n\t\t\t}\n\n\t\t\tif (!w)\n\t\t\t\talert(t.editor.getLang('popup_blocked'));\n\t\t},\n\n\t\t/**\n\t\t * Closes the specified window. This will also dispatch out a onClose event.\n\t\t *\n\t\t * @method close\n\t\t * @param {Window} w Native window object to close.\n\t\t */\n\t\tclose : function(w) {\n\t\t\tw.close();\n\t\t\tthis.onClose.dispatch(this);\n\t\t},\n\n\t\t/**\n\t\t * Creates a instance of a class. This method was needed since IE can't create instances\n\t\t * of classes from a parent window due to some reference problem. Any arguments passed after the class name\n\t\t * will be passed as arguments to the constructor.\n\t\t *\n\t\t * @method createInstance\n\t\t * @param {String} cl Class name to create an instance of.\n\t\t * @return {Object} Instance of the specified class.\n\t\t * @example\n\t\t * var uri = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.URI', 'http://www.somesite.com');\n\t\t * alert(uri.getURI());\n\t\t */\n\t\tcreateInstance : function(cl, a, b, c, d, e) {\n\t\t\tvar f = tinymce.resolve(cl);\n\n\t\t\treturn new f(a, b, c, d, e);\n\t\t},\n\n\t\t/**\n\t\t * Creates a confirm dialog. Please don't use the blocking behavior of this\n\t\t * native version use the callback method instead then it can be extended.\n\t\t *\n\t\t * @method confirm\n\t\t * @param {String} t Title for the new confirm dialog.\n\t\t * @param {function} cb Callback function to be executed after the user has selected ok or cancel.\n\t\t * @param {Object} s Optional scope to execute the callback in.\n\t\t * @example\n\t\t * // Displays an confirm box and an alert message will be displayed depending on what you choose in the confirm\n\t\t * tinyMCE.activeEditor.windowManager.confirm(\"Do you want to do something\", function(s) {\n\t\t *    if (s)\n\t\t *       tinyMCE.activeEditor.windowManager.alert(\"Ok\");\n\t\t *    else\n\t\t *       tinyMCE.activeEditor.windowManager.alert(\"Cancel\");\n\t\t * });\n\t\t */\n\t\tconfirm : function(t, cb, s, w) {\n\t\t\tw = w || window;\n\n\t\t\tcb.call(s || this, w.confirm(this._decode(this.editor.getLang(t, t))));\n\t\t},\n\n\t\t/**\n\t\t * Creates a alert dialog. Please don't use the blocking behavior of this\n\t\t * native version use the callback method instead then it can be extended.\n\t\t *\n\t\t * @method alert\n\t\t * @param {String} t Title for the new alert dialog.\n\t\t * @param {function} cb Callback function to be executed after the user has selected ok.\n\t\t * @param {Object} s Optional scope to execute the callback in.\n\t\t * @example\n\t\t * // Displays an alert box using the active editors window manager instance\n\t\t * tinyMCE.activeEditor.windowManager.alert('Hello world!');\n\t\t */\n\t\talert : function(tx, cb, s, w) {\n\t\t\tvar t = this;\n\n\t\t\tw = w || window;\n\t\t\tw.alert(t._decode(t.editor.getLang(tx, tx)));\n\n\t\t\tif (cb)\n\t\t\t\tcb.call(s || t);\n\t\t},\n\n\t\t/**\n\t\t * Resizes the specified window or id.\n\t\t *\n\t\t * @param {Number} dw Delta width.\n\t\t * @param {Number} dh Delta height.\n\t\t * @param {window/id} win Window if the dialog isn't inline. Id if the dialog is inline.\n\t\t */\n\t\tresizeBy : function(dw, dh, win) {\n\t\t\twin.resizeBy(dw, dh);\n\t\t},\n\n\t\t// Internal functions\n\n\t\t_decode : function(s) {\n\t\t\treturn tinymce.DOM.decode(s).replace(/\\\\n/g, '\\n');\n\t\t}\n\t});\n}(tinymce));\n","Magento_Tinymce3/tiny_mce/classes/ControlManager.js":"/**\n * ControlManager.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t// Shorten names\n\tvar DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, extend = tinymce.extend;\n\n\t/**\n\t * This class is responsible for managing UI control instances. It's both a factory and a collection for the controls.\n\t * @class tinymce.ControlManager\n\t */\n\ttinymce.create('tinymce.ControlManager', {\n\t\t/**\n\t\t * Constructs a new control manager instance.\n\t\t * Consult the Wiki for more details on this class.\n\t\t *\n\t\t * @constructor\n\t\t * @method ControlManager\n\t\t * @param {tinymce.Editor} ed TinyMCE editor instance to add the control to.\n\t\t * @param {Object} s Optional settings object for the control manager.\n\t\t */\n\t\tControlManager : function(ed, s) {\n\t\t\tvar t = this, i;\n\n\t\t\ts = s || {};\n\t\t\tt.editor = ed;\n\t\t\tt.controls = {};\n\t\t\tt.onAdd = new tinymce.util.Dispatcher(t);\n\t\t\tt.onPostRender = new tinymce.util.Dispatcher(t);\n\t\t\tt.prefix = s.prefix || ed.id + '_';\n\t\t\tt._cls = {};\n\n\t\t\tt.onPostRender.add(function() {\n\t\t\t\teach(t.controls, function(c) {\n\t\t\t\t\tc.postRender();\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Returns a control by id or undefined it wasn't found.\n\t\t *\n\t\t * @method get\n\t\t * @param {String} id Control instance name.\n\t\t * @return {tinymce.ui.Control} Control instance or undefined.\n\t\t */\n\t\tget : function(id) {\n\t\t\treturn this.controls[this.prefix + id] || this.controls[id];\n\t\t},\n\n\t\t/**\n\t\t * Sets the active state of a control by id.\n\t\t *\n\t\t * @method setActive\n\t\t * @param {String} id Control id to set state on.\n\t\t * @param {Boolean} s Active state true/false.\n\t\t * @return {tinymce.ui.Control} Control instance that got activated or null if it wasn't found.\n\t\t */\n\t\tsetActive : function(id, s) {\n\t\t\tvar c = null;\n\n\t\t\tif (c = this.get(id))\n\t\t\t\tc.setActive(s);\n\n\t\t\treturn c;\n\t\t},\n\n\t\t/**\n\t\t * Sets the dsiabled state of a control by id.\n\t\t *\n\t\t * @method setDisabled\n\t\t * @param {String} id Control id to set state on.\n\t\t * @param {Boolean} s Active state true/false.\n\t\t * @return {tinymce.ui.Control} Control instance that got disabled or null if it wasn't found.\n\t\t */\n\t\tsetDisabled : function(id, s) {\n\t\t\tvar c = null;\n\n\t\t\tif (c = this.get(id))\n\t\t\t\tc.setDisabled(s);\n\n\t\t\treturn c;\n\t\t},\n\n\t\t/**\n\t\t * Adds a control to the control collection inside the manager.\n\t\t *\n\t\t * @method add\n\t\t * @param {tinymce.ui.Control} Control instance to add to collection.\n\t\t * @return {tinymce.ui.Control} Control instance that got passed in.\n\t\t */\n\t\tadd : function(c) {\n\t\t\tvar t = this;\n\n\t\t\tif (c) {\n\t\t\t\tt.controls[c.id] = c;\n\t\t\t\tt.onAdd.dispatch(c, t);\n\t\t\t}\n\n\t\t\treturn c;\n\t\t},\n\n\t\t/**\n\t\t * Creates a control by name, when a control is created it will automatically add it to the control collection.\n\t\t * It first ask all plugins for the specified control if the plugins didn't return a control then the default behavior\n\t\t * will be used.\n\t\t *\n\t\t * @method createControl\n\t\t * @param {String} n Control name to create for example \"separator\".\n\t\t * @return {tinymce.ui.Control} Control instance that got created and added.\n\t\t */\n\t\tcreateControl : function(n) {\n\t\t\tvar c, t = this, ed = t.editor;\n\n\t\t\teach(ed.plugins, function(p) {\n\t\t\t\tif (p.createControl) {\n\t\t\t\t\tc = p.createControl(n, t);\n\n\t\t\t\t\tif (c)\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tswitch (n) {\n\t\t\t\tcase \"|\":\n\t\t\t\tcase \"separator\":\n\t\t\t\t\treturn t.createSeparator();\n\t\t\t}\n\n\t\t\tif (!c && ed.buttons && (c = ed.buttons[n]))\n\t\t\t\treturn t.createButton(n, c);\n\n\t\t\treturn t.add(c);\n\t\t},\n\n\t\t/**\n\t\t * Creates a drop menu control instance by id.\n\t\t *\n\t\t * @method createDropMenu\n\t\t * @param {String} id Unique id for the new dropdown instance. For example \"some menu\".\n\t\t * @param {Object} s Optional settings object for the control.\n\t\t * @param {Object} cc Optional control class to use instead of the default one.\n\t\t * @return {tinymce.ui.Control} Control instance that got created and added.\n\t\t */\n\t\tcreateDropMenu : function(id, s, cc) {\n\t\t\tvar t = this, ed = t.editor, c, bm, v, cls;\n\n\t\t\ts = extend({\n\t\t\t\t'class' : 'mceDropDown',\n\t\t\t\tconstrain : ed.settings.constrain_menus\n\t\t\t}, s);\n\n\t\t\ts['class'] = s['class'] + ' ' + ed.getParam('skin') + 'Skin';\n\t\t\tif (v = ed.getParam('skin_variant'))\n\t\t\t\ts['class'] += ' ' + ed.getParam('skin') + 'Skin' + v.substring(0, 1).toUpperCase() + v.substring(1);\n\n\t\t\tid = t.prefix + id;\n\t\t\tcls = cc || t._cls.dropmenu || tinymce.ui.DropMenu;\n\t\t\tc = t.controls[id] = new cls(id, s);\n\t\t\tc.onAddItem.add(function(c, o) {\n\t\t\t\tvar s = o.settings;\n\n\t\t\t\ts.title = ed.getLang(s.title, s.title);\n\n\t\t\t\tif (!s.onclick) {\n\t\t\t\t\ts.onclick = function(v) {\n\t\t\t\t\t\tif (s.cmd)\n\t\t\t\t\t\t\ted.execCommand(s.cmd, s.ui || false, s.value);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t});\n\n\t\t\ted.onRemove.add(function() {\n\t\t\t\tc.destroy();\n\t\t\t});\n\n\t\t\t// Fix for bug #1897785, #1898007\n\t\t\tif (tinymce.isIE) {\n\t\t\t\tc.onShowMenu.add(function() {\n\t\t\t\t\t// IE 8 needs focus in order to store away a range with the current collapsed caret location\n\t\t\t\t\ted.focus();\n\n\t\t\t\t\tbm = ed.selection.getBookmark(1);\n\t\t\t\t});\n\n\t\t\t\tc.onHideMenu.add(function() {\n\t\t\t\t\tif (bm) {\n\t\t\t\t\t\ted.selection.moveToBookmark(bm);\n\t\t\t\t\t\tbm = 0;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn t.add(c);\n\t\t},\n\n\t\t/**\n\t\t * Creates a list box control instance by id. A list box is either a native select element or a DOM/JS based list box control. This\n\t\t * depends on the use_native_selects settings state.\n\t\t *\n\t\t * @method createListBox\n\t\t * @param {String} id Unique id for the new listbox instance. For example \"styles\".\n\t\t * @param {Object} s Optional settings object for the control.\n\t\t * @param {Object} cc Optional control class to use instead of the default one.\n\t\t * @return {tinymce.ui.Control} Control instance that got created and added.\n\t\t */\n\t\tcreateListBox : function(id, s, cc) {\n\t\t\tvar t = this, ed = t.editor, cmd, c, cls;\n\n\t\t\tif (t.get(id))\n\t\t\t\treturn null;\n\n\t\t\ts.title = ed.translate(s.title);\n\t\t\ts.scope = s.scope || ed;\n\n\t\t\tif (!s.onselect) {\n\t\t\t\ts.onselect = function(v) {\n\t\t\t\t\ted.execCommand(s.cmd, s.ui || false, v || s.value);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\ts = extend({\n\t\t\t\ttitle : s.title,\n\t\t\t\t'class' : 'mce_' + id,\n\t\t\t\tscope : s.scope,\n\t\t\t\tcontrol_manager : t\n\t\t\t}, s);\n\n\t\t\tid = t.prefix + id;\n\n\n\t\t\tfunction useNativeListForAccessibility(ed) {\n\t\t\t\treturn ed.settings.use_accessible_selects && !tinymce.isGecko\n\t\t\t}\n\n\t\t\tif (ed.settings.use_native_selects || useNativeListForAccessibility(ed))\n\t\t\t\tc = new tinymce.ui.NativeListBox(id, s);\n\t\t\telse {\n\t\t\t\tcls = cc || t._cls.listbox || tinymce.ui.ListBox;\n\t\t\t\tc = new cls(id, s, ed);\n\t\t\t}\n\n\t\t\tt.controls[id] = c;\n\n\t\t\t// Fix focus problem in Safari\n\t\t\tif (tinymce.isWebKit) {\n\t\t\t\tc.onPostRender.add(function(c, n) {\n\t\t\t\t\t// Store bookmark on mousedown\n\t\t\t\t\tEvent.add(n, 'mousedown', function() {\n\t\t\t\t\t\ted.bookmark = ed.selection.getBookmark(1);\n\t\t\t\t\t});\n\n\t\t\t\t\t// Restore on focus, since it might be lost\n\t\t\t\t\tEvent.add(n, 'focus', function() {\n\t\t\t\t\t\ted.selection.moveToBookmark(ed.bookmark);\n\t\t\t\t\t\ted.bookmark = null;\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (c.hideMenu)\n\t\t\t\ted.onMouseDown.add(c.hideMenu, c);\n\n\t\t\treturn t.add(c);\n\t\t},\n\n\t\t/**\n\t\t * Creates a button control instance by id.\n\t\t *\n\t\t * @method createButton\n\t\t * @param {String} id Unique id for the new button instance. For example \"bold\".\n\t\t * @param {Object} s Optional settings object for the control.\n\t\t * @param {Object} cc Optional control class to use instead of the default one.\n\t\t * @return {tinymce.ui.Control} Control instance that got created and added.\n\t\t */\n\t\tcreateButton : function(id, s, cc) {\n\t\t\tvar t = this, ed = t.editor, o, c, cls;\n\n\t\t\tif (t.get(id))\n\t\t\t\treturn null;\n\n\t\t\ts.title = ed.translate(s.title);\n\t\t\ts.label = ed.translate(s.label);\n\t\t\ts.scope = s.scope || ed;\n\n\t\t\tif (!s.onclick && !s.menu_button) {\n\t\t\t\ts.onclick = function() {\n\t\t\t\t\ted.execCommand(s.cmd, s.ui || false, s.value);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\ts = extend({\n\t\t\t\ttitle : s.title,\n\t\t\t\t'class' : 'mce_' + id,\n\t\t\t\tunavailable_prefix : ed.getLang('unavailable', ''),\n\t\t\t\tscope : s.scope,\n\t\t\t\tcontrol_manager : t\n\t\t\t}, s);\n\n\t\t\tid = t.prefix + id;\n\n\t\t\tif (s.menu_button) {\n\t\t\t\tcls = cc || t._cls.menubutton || tinymce.ui.MenuButton;\n\t\t\t\tc = new cls(id, s, ed);\n\t\t\t\ted.onMouseDown.add(c.hideMenu, c);\n\t\t\t} else {\n\t\t\t\tcls = t._cls.button || tinymce.ui.Button;\n\t\t\t\tc = new cls(id, s, ed);\n\t\t\t}\n\n\t\t\treturn t.add(c);\n\t\t},\n\n\t\t/**\n\t\t * Creates a menu button control instance by id.\n\t\t *\n\t\t * @method createMenuButton\n\t\t * @param {String} id Unique id for the new menu button instance. For example \"menu1\".\n\t\t * @param {Object} s Optional settings object for the control.\n\t\t * @param {Object} cc Optional control class to use instead of the default one.\n\t\t * @return {tinymce.ui.Control} Control instance that got created and added.\n\t\t */\n\t\tcreateMenuButton : function(id, s, cc) {\n\t\t\ts = s || {};\n\t\t\ts.menu_button = 1;\n\n\t\t\treturn this.createButton(id, s, cc);\n\t\t},\n\n\t\t/**\n\t\t * Creates a split button control instance by id.\n\t\t *\n\t\t * @method createSplitButton\n\t\t * @param {String} id Unique id for the new split button instance. For example \"spellchecker\".\n\t\t * @param {Object} s Optional settings object for the control.\n\t\t * @param {Object} cc Optional control class to use instead of the default one.\n\t\t * @return {tinymce.ui.Control} Control instance that got created and added.\n\t\t */\n\t\tcreateSplitButton : function(id, s, cc) {\n\t\t\tvar t = this, ed = t.editor, cmd, c, cls;\n\n\t\t\tif (t.get(id))\n\t\t\t\treturn null;\n\n\t\t\ts.title = ed.translate(s.title);\n\t\t\ts.scope = s.scope || ed;\n\n\t\t\tif (!s.onclick) {\n\t\t\t\ts.onclick = function(v) {\n\t\t\t\t\ted.execCommand(s.cmd, s.ui || false, v || s.value);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (!s.onselect) {\n\t\t\t\ts.onselect = function(v) {\n\t\t\t\t\ted.execCommand(s.cmd, s.ui || false, v || s.value);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\ts = extend({\n\t\t\t\ttitle : s.title,\n\t\t\t\t'class' : 'mce_' + id,\n\t\t\t\tscope : s.scope,\n\t\t\t\tcontrol_manager : t\n\t\t\t}, s);\n\n\t\t\tid = t.prefix + id;\n\t\t\tcls = cc || t._cls.splitbutton || tinymce.ui.SplitButton;\n\t\t\tc = t.add(new cls(id, s, ed));\n\t\t\ted.onMouseDown.add(c.hideMenu, c);\n\n\t\t\treturn c;\n\t\t},\n\n\t\t/**\n\t\t * Creates a color split button control instance by id.\n\t\t *\n\t\t * @method createColorSplitButton\n\t\t * @param {String} id Unique id for the new color split button instance. For example \"forecolor\".\n\t\t * @param {Object} s Optional settings object for the control.\n\t\t * @param {Object} cc Optional control class to use instead of the default one.\n\t\t * @return {tinymce.ui.Control} Control instance that got created and added.\n\t\t */\n\t\tcreateColorSplitButton : function(id, s, cc) {\n\t\t\tvar t = this, ed = t.editor, cmd, c, cls, bm;\n\n\t\t\tif (t.get(id))\n\t\t\t\treturn null;\n\n\t\t\ts.title = ed.translate(s.title);\n\t\t\ts.scope = s.scope || ed;\n\n\t\t\tif (!s.onclick) {\n\t\t\t\ts.onclick = function(v) {\n\t\t\t\t\tif (tinymce.isIE)\n\t\t\t\t\t\tbm = ed.selection.getBookmark(1);\n\n\t\t\t\t\ted.execCommand(s.cmd, s.ui || false, v || s.value);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (!s.onselect) {\n\t\t\t\ts.onselect = function(v) {\n\t\t\t\t\ted.execCommand(s.cmd, s.ui || false, v || s.value);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\ts = extend({\n\t\t\t\ttitle : s.title,\n\t\t\t\t'class' : 'mce_' + id,\n\t\t\t\t'menu_class' : ed.getParam('skin') + 'Skin',\n\t\t\t\tscope : s.scope,\n\t\t\t\tmore_colors_title : ed.getLang('more_colors')\n\t\t\t}, s);\n\n\t\t\tid = t.prefix + id;\n\t\t\tcls = cc || t._cls.colorsplitbutton || tinymce.ui.ColorSplitButton;\n\t\t\tc = new cls(id, s, ed);\n\t\t\ted.onMouseDown.add(c.hideMenu, c);\n\n\t\t\t// Remove the menu element when the editor is removed\n\t\t\ted.onRemove.add(function() {\n\t\t\t\tc.destroy();\n\t\t\t});\n\n\t\t\t// Fix for bug #1897785, #1898007\n\t\t\tif (tinymce.isIE) {\n\t\t\t\tc.onShowMenu.add(function() {\n\t\t\t\t\t// IE 8 needs focus in order to store away a range with the current collapsed caret location\n\t\t\t\t\ted.focus();\n\t\t\t\t\tbm = ed.selection.getBookmark(1);\n\t\t\t\t});\n\n\t\t\t\tc.onHideMenu.add(function() {\n\t\t\t\t\tif (bm) {\n\t\t\t\t\t\ted.selection.moveToBookmark(bm);\n\t\t\t\t\t\tbm = 0;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn t.add(c);\n\t\t},\n\n\t\t/**\n\t\t * Creates a toolbar container control instance by id.\n\t\t *\n\t\t * @method createToolbar\n\t\t * @param {String} id Unique id for the new toolbar container control instance. For example \"toolbar1\".\n\t\t * @param {Object} s Optional settings object for the control.\n\t\t * @param {Object} cc Optional control class to use instead of the default one.\n\t\t * @return {tinymce.ui.Control} Control instance that got created and added.\n\t\t */\n\t\tcreateToolbar : function(id, s, cc) {\n\t\t\tvar c, t = this, cls;\n\n\t\t\tid = t.prefix + id;\n\t\t\tcls = cc || t._cls.toolbar || tinymce.ui.Toolbar;\n\t\t\tc = new cls(id, s, t.editor);\n\n\t\t\tif (t.get(id))\n\t\t\t\treturn null;\n\n\t\t\treturn t.add(c);\n\t\t},\n\t\t\n\t\tcreateToolbarGroup : function(id, s, cc) {\n\t\t\tvar c, t = this, cls;\n\t\t\tid = t.prefix + id;\n\t\t\tcls = cc || this._cls.toolbarGroup || tinymce.ui.ToolbarGroup;\n\t\t\tc = new cls(id, s, t.editor);\n\t\t\t\n\t\t\tif (t.get(id))\n\t\t\t\treturn null;\n\t\t\t\n\t\t\treturn t.add(c);\n\t\t},\n\n\t\t/**\n\t\t * Creates a separator control instance.\n\t\t *\n\t\t * @method createSeparator\n\t\t * @param {Object} cc Optional control class to use instead of the default one.\n\t\t * @return {tinymce.ui.Control} Control instance that got created and added.\n\t\t */\n\t\tcreateSeparator : function(cc) {\n\t\t\tvar cls = cc || this._cls.separator || tinymce.ui.Separator;\n\n\t\t\treturn new cls();\n\t\t},\n\n\t\t/**\n\t\t * Overrides a specific control type with a custom class.\n\t\t *\n\t\t * @method setControlType\n\t\t * @param {string} n Name of the control to override for example button or dropmenu.\n\t\t * @param {function} c Class reference to use instead of the default one.\n\t\t * @return {function} Same as the class reference.\n\t\t */\n\t\tsetControlType : function(n, c) {\n\t\t\treturn this._cls[n.toLowerCase()] = c;\n\t\t},\n\t\n\t\t/**\n\t\t * Destroy.\n\t\t *\n\t\t * @method destroy\n\t\t */\n\t\tdestroy : function() {\n\t\t\teach(this.controls, function(c) {\n\t\t\t\tc.destroy();\n\t\t\t});\n\n\t\t\tthis.controls = null;\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/AddOnManager.js":"/**\n * AddOnManager.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar Dispatcher = tinymce.util.Dispatcher, each = tinymce.each;\n\n\t/**\n\t * This class handles the loading of themes/plugins or other add-ons and their language packs.\n\t *\n\t * @class tinymce.AddOnManager\n\t */\n\ttinymce.create('tinymce.AddOnManager', {\n\t\tAddOnManager : function() {\n\t\t\tvar self = this;\n\n\t\t\tself.items = [];\n\t\t\tself.urls = {};\n\t\t\tself.lookup = {};\n\t\t\tself.onAdd = new Dispatcher(self);\n\t\t},\n\n\t\t/**\n\t\t * Fires when a item is added.\n\t\t *\n\t\t * @event onAdd\n\t\t */\n\n\t\t/**\n\t\t * Returns the specified add on by the short name.\n\t\t *\n\t\t * @method get\n\t\t * @param {String} n Add-on to look for.\n\t\t * @return {tinymce.Theme/tinymce.Plugin} Theme or plugin add-on instance or undefined.\n\t\t */\n\t\tget : function(n) {\n\t\t\tif (this.lookup[n]) {\n\t\t\t\treturn this.lookup[n].instance;\n\t\t\t} else {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t},\n\n\t\tdependencies : function(n) {\n\t\t\tvar result;\n\t\t\tif (this.lookup[n]) {\n\t\t\t\tresult = this.lookup[n].dependencies;\n\t\t\t}\n\t\t\treturn result || [];\n\t\t},\n\n\t\t/**\n\t\t * Loads a language pack for the specified add-on.\n\t\t *\n\t\t * @method requireLangPack\n\t\t * @param {String} n Short name of the add-on.\n\t\t */\n\t\trequireLangPack : function(n) {\n\t\t\tvar s = tinymce.settings;\n\n\t\t\tif (s && s.language && s.language_load !== false)\n\t\t\t\ttinymce.ScriptLoader.add(this.urls[n] + '/langs/' + s.language + '.js');\n\t\t},\n\n\t\t/**\n\t\t * Adds a instance of the add-on by it's short name.\n\t\t *\n\t\t * @method add\n\t\t * @param {String} id Short name/id for the add-on.\n\t\t * @param {tinymce.Theme/tinymce.Plugin} o Theme or plugin to add.\n\t\t * @return {tinymce.Theme/tinymce.Plugin} The same theme or plugin instance that got passed in.\n\t\t * @example\n\t\t * // Create a simple plugin\n\t\t * tinymce.create('tinymce.plugins.TestPlugin', {\n\t\t *     TestPlugin : function(ed, url) {\n\t\t *         ed.onClick.add(function(ed, e) {\n\t\t *             ed.windowManager.alert('Hello World!');\n\t\t *         });\n\t\t *     }\n\t\t * });\n\t\t * \n\t\t * // Register plugin using the add method\n\t\t * tinymce.PluginManager.add('test', tinymce.plugins.TestPlugin);\n\t\t * \n\t\t * // Initialize TinyMCE\n\t\t * tinyMCE.init({\n\t\t *    ...\n\t\t *    plugins : '-test' // Init the plugin but don't try to load it\n\t\t * });\n\t\t */\n\t\tadd : function(id, o, dependencies) {\n\t\t\tthis.items.push(o);\n\t\t\tthis.lookup[id] = {instance:o, dependencies:dependencies};\n\t\t\tthis.onAdd.dispatch(this, id, o);\n\n\t\t\treturn o;\n\t\t},\n\t\tcreateUrl: function(baseUrl, dep) {\n\t\t\tif (typeof dep === \"object\") {\n\t\t\t\treturn dep\n\t\t\t} else {\n\t\t\t\treturn {prefix: baseUrl.prefix, resource: dep, suffix: baseUrl.suffix};\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t \t * Add a set of components that will make up the add-on. Using the url of the add-on name as the base url.\n\t\t * This should be used in development mode.  A new compressor/javascript munger process will ensure that the \n\t\t * components are put together into the editor_plugin.js file and compressed correctly.\n\t\t * @param pluginName {String} name of the plugin to load scripts from (will be used to get the base url for the plugins).\n\t\t * @param scripts {Array} Array containing the names of the scripts to load.\n\t \t */\n\t\taddComponents: function(pluginName, scripts) {\n\t\t\tvar pluginUrl = this.urls[pluginName];\n\t\t\ttinymce.each(scripts, function(script){\n\t\t\t\ttinymce.ScriptLoader.add(pluginUrl+\"/\"+script);\t\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Loads an add-on from a specific url.\n\t\t *\n\t\t * @method load\n\t\t * @param {String} n Short name of the add-on that gets loaded.\n\t\t * @param {String} u URL to the add-on that will get loaded.\n\t\t * @param {function} cb Optional callback to execute ones the add-on is loaded.\n\t\t * @param {Object} s Optional scope to execute the callback in.\n\t\t * @example\n\t\t * // Loads a plugin from an external URL\n\t\t * tinymce.PluginManager.load('myplugin', '/some/dir/someplugin/editor_plugin.js');\n\t\t *\n\t\t * // Initialize TinyMCE\n\t\t * tinyMCE.init({\n\t\t *    ...\n\t\t *    plugins : '-myplugin' // Don't try to load it again\n\t\t * });\n\t\t */\n\t\tload : function(n, u, cb, s) {\n\t\t\tvar t = this, url = u;\n\n\t\t\tfunction loadDependencies() {\n\t\t\t\tvar dependencies = t.dependencies(n);\n\t\t\t\ttinymce.each(dependencies, function(dep) {\n\t\t\t\t\tvar newUrl = t.createUrl(u, dep);\n\t\t\t\t\tt.load(newUrl.resource, newUrl, undefined, undefined);\n\t\t\t\t});\n\t\t\t\tif (cb) {\n\t\t\t\t\tif (s) {\n\t\t\t\t\t\tcb.call(s);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcb.call(tinymce.ScriptLoader);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (t.urls[n])\n\t\t\t\treturn;\n\t\t\tif (typeof u === \"object\")\n\t\t\t\turl = u.prefix + u.resource + u.suffix;\n\n\t\t\tif (url.indexOf('/') != 0 && url.indexOf('://') == -1)\n\t\t\t\turl = tinymce.baseURL + '/' + url;\n\n\t\t\tt.urls[n] = url.substring(0, url.lastIndexOf('/'));\n\n\t\t\tif (t.lookup[n]) {\n\t\t\t\tloadDependencies();\n\t\t\t} else {\n\t\t\t\ttinymce.ScriptLoader.add(url, loadDependencies, s);\n\t\t\t}\n\t\t}\n\t});\n\n\t// Create plugin and theme managers\n\ttinymce.PluginManager = new tinymce.AddOnManager();\n\ttinymce.ThemeManager = new tinymce.AddOnManager();\n}(tinymce));\n\n/**\n * TinyMCE theme class.\n *\n * @class tinymce.Theme\n */\n\n/**\n * Initializes the theme.\n *\n * @method init\n * @param {tinymce.Editor} editor Editor instance that created the theme instance.\n * @param {String} url Absolute URL where the theme is located. \n */\n\n/**\n * Meta info method, this method gets executed when TinyMCE wants to present information about the theme for example in the about/help dialog.\n *\n * @method getInfo\n * @return {Object} Returns an object with meta information about the theme the current items are longname, author, authorurl, infourl and version.\n */\n\n/**\n * This method is responsible for rendering/generating the overall user interface with toolbars, buttons, iframe containers etc.\n *\n * @method renderUI\n * @param {Object} obj Object parameter containing the targetNode DOM node that will be replaced visually with an editor instance. \n * @return {Object} an object with items like iframeContainer, editorContainer, sizeContainer, deltaWidth, deltaHeight. \n */\n\n/**\n * Plugin base class, this is a pseudo class that describes how a plugin is to be created for TinyMCE. The methods below are all optional.\n *\n * @class tinymce.Plugin\n * @example\n * // Create a new plugin class\n * tinymce.create('tinymce.plugins.ExamplePlugin', {\n *     init : function(ed, url) {\n *         // Register an example button\n *         ed.addButton('example', {\n *             title : 'example.desc',\n *             onclick : function() {\n *                  // Display an alert when the user clicks the button\n *                  ed.windowManager.alert('Hello world!');\n *             },\n *             'class' : 'bold' // Use the bold icon from the theme\n *         });\n *     }\n * });\n * \n * // Register plugin with a short name\n * tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);\n * \n * // Initialize TinyMCE with the new plugin and button\n * tinyMCE.init({\n *    ...\n *    plugins : '-example', // - means TinyMCE will not try to load it\n *    theme_advanced_buttons1 : 'example' // Add the new example button to the toolbar\n * });\n */\n\n/**\n * Initialization function for the plugin. This will be called when the plugin is created. \n *\n * @method init\n * @param {tinymce.Editor} editor Editor instance that created the plugin instance. \n * @param {String} url Absolute URL where the plugin is located. \n * @example\n * // Creates a new plugin class\n * tinymce.create('tinymce.plugins.ExamplePlugin', {\n *     init : function(ed, url) {\n *         // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');\n *         ed.addCommand('mceExample', function() {\n *             ed.windowManager.open({\n *                 file : url + '/dialog.htm',\n *                 width : 320 + ed.getLang('example.delta_width', 0),\n *                 height : 120 + ed.getLang('example.delta_height', 0),\n *                 inline : 1\n *             }, {\n *                 plugin_url : url, // Plugin absolute URL\n *                 some_custom_arg : 'custom arg' // Custom argument\n *             });\n *         });\n * \n *         // Register example button\n *         ed.addButton('example', {\n *             title : 'example.desc',\n *             cmd : 'mceExample',\n *             image : url + '/img/example.gif'\n *         });\n * \n *         // Add a node change handler, selects the button in the UI when a image is selected\n *         ed.onNodeChange.add(function(ed, cm, n) {\n *             cm.setActive('example', n.nodeName == 'IMG');\n *         });\n *     }\n * });\n * \n * // Register plugin\n * tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);\n */\n\n/**\n * Meta info method, this method gets executed when TinyMCE wants to present information about the plugin for example in the about/help dialog.\n *\n * @method getInfo\n * @return {Object} Returns an object with meta information about the plugin the current items are longname, author, authorurl, infourl and version.\n * @example \n * // Creates a new plugin class\n * tinymce.create('tinymce.plugins.ExamplePlugin', {\n *     // Meta info method\n *     getInfo : function() {\n *         return {\n *             longname : 'Example plugin',\n *             author : 'Some author',\n *             authorurl : 'http://tinymce.moxiecode.com',\n *             infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',\n *             version : \"1.0\"\n *         };\n *     }\n * });\n * \n * // Register plugin\n * tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);\n * \n * // Initialize TinyMCE with the new plugin\n * tinyMCE.init({\n *    ...\n *    plugins : '-example' // - means TinyMCE will not try to load it\n * });\n */\n\n/**\n * Gets called when a new control instance is created.\n *\n * @method createControl\n * @param {String} name Control name to create for example \"mylistbox\" \n * @param {tinymce.ControlManager} controlman Control manager/factory to use to create the control. \n * @return {tinymce.ui.Control} Returns a new control instance or null.\n * @example \n * // Creates a new plugin class\n * tinymce.create('tinymce.plugins.ExamplePlugin', {\n *     createControl: function(n, cm) {\n *         switch (n) {\n *             case 'mylistbox':\n *                 var mlb = cm.createListBox('mylistbox', {\n *                      title : 'My list box',\n *                      onselect : function(v) {\n *                          tinyMCE.activeEditor.windowManager.alert('Value selected:' + v);\n *                      }\n *                 });\n * \n *                 // Add some values to the list box\n *                 mlb.add('Some item 1', 'val1');\n *                 mlb.add('some item 2', 'val2');\n *                 mlb.add('some item 3', 'val3');\n * \n *                 // Return the new listbox instance\n *                 return mlb;\n *         }\n * \n *         return null;\n *     }\n * });\n * \n * // Register plugin\n * tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);\n * \n * // Initialize TinyMCE with the new plugin and button\n * tinyMCE.init({\n *    ...\n *    plugins : '-example', // - means TinyMCE will not try to load it\n *    theme_advanced_buttons1 : 'mylistbox' // Add the new mylistbox control to the toolbar\n * });\n */\n","Magento_Tinymce3/tiny_mce/classes/LegacyInput.js":"/**\n * LegacyInput.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\ntinymce.onAddEditor.add(function(tinymce, ed) {\n\tvar filters, fontSizes, dom, settings = ed.settings;\n\n\tif (settings.inline_styles) {\n\t\tfontSizes = tinymce.explode(settings.font_size_legacy_values);\n\n\t\tfunction replaceWithSpan(node, styles) {\n\t\t\ttinymce.each(styles, function(value, name) {\n\t\t\t\tif (value)\n\t\t\t\t\tdom.setStyle(node, name, value);\n\t\t\t});\n\n\t\t\tdom.rename(node, 'span');\n\t\t};\n\n\t\tfilters = {\n\t\t\tfont : function(dom, node) {\n\t\t\t\treplaceWithSpan(node, {\n\t\t\t\t\tbackgroundColor : node.style.backgroundColor,\n\t\t\t\t\tcolor : node.color,\n\t\t\t\t\tfontFamily : node.face,\n\t\t\t\t\tfontSize : fontSizes[parseInt(node.size) - 1]\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tu : function(dom, node) {\n\t\t\t\treplaceWithSpan(node, {\n\t\t\t\t\ttextDecoration : 'underline'\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tstrike : function(dom, node) {\n\t\t\t\treplaceWithSpan(node, {\n\t\t\t\t\ttextDecoration : 'line-through'\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tfunction convert(editor, params) {\n\t\t\tdom = editor.dom;\n\n\t\t\tif (settings.convert_fonts_to_spans) {\n\t\t\t\ttinymce.each(dom.select('font,u,strike', params.node), function(node) {\n\t\t\t\t\tfilters[node.nodeName.toLowerCase()](ed.dom, node);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\ted.onPreProcess.add(convert);\n\t\ted.onSetContent.add(convert);\n\n\t\ted.onInit.add(function() {\n\t\t\ted.selection.onSetContent.add(convert);\n\t\t});\n\t}\n});\n","Magento_Tinymce3/tiny_mce/classes/ForceBlocks.js":"/**\n * ForceBlocks.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t// Shorten names\n\tvar Event = tinymce.dom.Event,\n\t\tisIE = tinymce.isIE,\n\t\tisGecko = tinymce.isGecko,\n\t\tisOpera = tinymce.isOpera,\n\t\teach = tinymce.each,\n\t\textend = tinymce.extend,\n\t\tTRUE = true,\n\t\tFALSE = false;\n\n\tfunction cloneFormats(node) {\n\t\tvar clone, temp, inner;\n\n\t\tdo {\n\t\t\tif (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(node.nodeName)) {\n\t\t\t\tif (clone) {\n\t\t\t\t\ttemp = node.cloneNode(false);\n\t\t\t\t\ttemp.appendChild(clone);\n\t\t\t\t\tclone = temp;\n\t\t\t\t} else {\n\t\t\t\t\tclone = inner = node.cloneNode(false);\n\t\t\t\t}\n\n\t\t\t\tclone.removeAttribute('id');\n\t\t\t}\n\t\t} while (node = node.parentNode);\n\n\t\tif (clone)\n\t\t\treturn {wrapper : clone, inner : inner};\n\t};\n\n\t// Checks if the selection/caret is at the end of the specified block element\n\tfunction isAtEnd(rng, par) {\n\t\tvar rng2 = par.ownerDocument.createRange();\n\n\t\trng2.setStart(rng.endContainer, rng.endOffset);\n\t\trng2.setEndAfter(par);\n\n\t\t// Get number of characters to the right of the cursor if it's zero then we are at the end and need to merge the next block element\n\t\treturn rng2.cloneContents().textContent.length == 0;\n\t};\n\n\tfunction splitList(selection, dom, li) {\n\t\tvar listBlock, block;\n\n\t\tif (dom.isEmpty(li)) {\n\t\t\tlistBlock = dom.getParent(li, 'ul,ol');\n\n\t\t\tif (!dom.getParent(listBlock.parentNode, 'ul,ol')) {\n\t\t\t\tdom.split(listBlock, li);\n\t\t\t\tblock = dom.create('p', 0, '<br data-mce-bogus=\"1\" />');\n\t\t\t\tdom.replace(block, li);\n\t\t\t\tselection.select(block, 1);\n\t\t\t}\n\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t};\n\n\t/**\n\t * This is a internal class and no method in this class should be called directly form the out side.\n\t */\n\ttinymce.create('tinymce.ForceBlocks', {\n\t\tForceBlocks : function(ed) {\n\t\t\tvar t = this, s = ed.settings, elm;\n\n\t\t\tt.editor = ed;\n\t\t\tt.dom = ed.dom;\n\t\t\telm = (s.forced_root_block || 'p').toLowerCase();\n\t\t\ts.element = elm.toUpperCase();\n\n\t\t\ted.onPreInit.add(t.setup, t);\n\t\t},\n\n\t\tsetup : function() {\n\t\t\tvar t = this, ed = t.editor, s = ed.settings, dom = ed.dom, selection = ed.selection, blockElements = ed.schema.getBlockElements();\n\n\t\t\t// Force root blocks\n\t\t\tif (s.forced_root_block) {\n\t\t\t\tfunction addRootBlocks() {\n\t\t\t\t\tvar node = selection.getStart(), rootNode = ed.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF;\n\n\t\t\t\t\tif (!node || node.nodeType !== 1)\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t// Check if node is wrapped in block\n\t\t\t\t\twhile (node != rootNode) {\n\t\t\t\t\t\tif (blockElements[node.nodeName])\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get current selection\n\t\t\t\t\trng = selection.getRng();\n\t\t\t\t\tif (rng.setStart) {\n\t\t\t\t\t\tstartContainer = rng.startContainer;\n\t\t\t\t\t\tstartOffset = rng.startOffset;\n\t\t\t\t\t\tendContainer = rng.endContainer;\n\t\t\t\t\t\tendOffset = rng.endOffset;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Force control range into text range\n\t\t\t\t\t\tif (rng.item) {\n\t\t\t\t\t\t\trng = ed.getDoc().body.createTextRange();\n\t\t\t\t\t\t\trng.moveToElementText(rng.item(0));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttmpRng = rng.duplicate();\n\t\t\t\t\t\ttmpRng.collapse(true);\n\t\t\t\t\t\tstartOffset = tmpRng.move('character', offset) * -1;\n\n\t\t\t\t\t\tif (!tmpRng.collapsed) {\n\t\t\t\t\t\t\ttmpRng = rng.duplicate();\n\t\t\t\t\t\t\ttmpRng.collapse(false);\n\t\t\t\t\t\t\tendOffset = (tmpRng.move('character', offset) * -1) - startOffset;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Wrap non block elements and text nodes\n\t\t\t\t\tfor (node = rootNode.firstChild; node; node) {\n\t\t\t\t\t\tif (node.nodeType === 3 || (node.nodeType == 1 && !blockElements[node.nodeName])) {\n\t\t\t\t\t\t\tif (!rootBlockNode) {\n\t\t\t\t\t\t\t\trootBlockNode = dom.create(s.forced_root_block);\n\t\t\t\t\t\t\t\tnode.parentNode.insertBefore(rootBlockNode, node);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\ttempNode = node;\n\t\t\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\t\t\trootBlockNode.appendChild(tempNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trootBlockNode = null;\n\t\t\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (rng.setStart) {\n\t\t\t\t\t\trng.setStart(startContainer, startOffset);\n\t\t\t\t\t\trng.setEnd(endContainer, endOffset);\n\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trng = ed.getDoc().body.createTextRange();\n\t\t\t\t\t\t\trng.moveToElementText(rootNode);\n\t\t\t\t\t\t\trng.collapse(true);\n\t\t\t\t\t\t\trng.moveStart('character', startOffset);\n\n\t\t\t\t\t\t\tif (endOffset > 0)\n\t\t\t\t\t\t\t\trng.moveEnd('character', endOffset);\n\n\t\t\t\t\t\t\trng.select();\n\t\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t\t// Ignore\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ted.nodeChanged();\n\t\t\t\t};\n\n\t\t\t\ted.onKeyUp.add(addRootBlocks);\n\t\t\t\ted.onClick.add(addRootBlocks);\n\t\t\t}\n\n\t\t\tif (s.force_br_newlines) {\n\t\t\t\t// Force IE to produce BRs on enter\n\t\t\t\tif (isIE) {\n\t\t\t\t\ted.onKeyPress.add(function(ed, e) {\n\t\t\t\t\t\tvar n;\n\n\t\t\t\t\t\tif (e.keyCode == 13 && selection.getNode().nodeName != 'LI') {\n\t\t\t\t\t\t\tselection.setContent('<br id=\"__\" /> ', {format : 'raw'});\n\t\t\t\t\t\t\tn = dom.get('__');\n\t\t\t\t\t\t\tn.removeAttribute('id');\n\t\t\t\t\t\t\tselection.select(n);\n\t\t\t\t\t\t\tselection.collapse();\n\t\t\t\t\t\t\treturn Event.cancel(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (s.force_p_newlines) {\n\t\t\t\tif (!isIE) {\n\t\t\t\t\ted.onKeyPress.add(function(ed, e) {\n\t\t\t\t\t\tif (e.keyCode == 13 && !e.shiftKey && !t.insertPara(e))\n\t\t\t\t\t\t\tEvent.cancel(e);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t// Ungly hack to for IE to preserve the formatting when you press\n\t\t\t\t\t// enter at the end of a block element with formatted contents\n\t\t\t\t\t// This logic overrides the browsers default logic with\n\t\t\t\t\t// custom logic that enables us to control the output\n\t\t\t\t\ttinymce.addUnload(function() {\n\t\t\t\t\t\tt._previousFormats = 0; // Fix IE leak\n\t\t\t\t\t});\n\n\t\t\t\t\ted.onKeyPress.add(function(ed, e) {\n\t\t\t\t\t\tt._previousFormats = 0;\n\n\t\t\t\t\t\t// Clone the current formats, this will later be applied to the new block contents\n\t\t\t\t\t\tif (e.keyCode == 13 && !e.shiftKey && ed.selection.isCollapsed() && s.keep_styles)\n\t\t\t\t\t\t\tt._previousFormats = cloneFormats(ed.selection.getStart());\n\t\t\t\t\t});\n\n\t\t\t\t\ted.onKeyUp.add(function(ed, e) {\n\t\t\t\t\t\t// Let IE break the element and the wrap the new caret location in the previous formats\n\t\t\t\t\t\tif (e.keyCode == 13 && !e.shiftKey) {\n\t\t\t\t\t\t\tvar parent = ed.selection.getStart(), fmt = t._previousFormats;\n\n\t\t\t\t\t\t\t// Parent is an empty block\n\t\t\t\t\t\t\tif (!parent.hasChildNodes() && fmt) {\n\t\t\t\t\t\t\t\tparent = dom.getParent(parent, dom.isBlock);\n\n\t\t\t\t\t\t\t\tif (parent && parent.nodeName != 'LI') {\n\t\t\t\t\t\t\t\t\tparent.innerHTML = '';\n\n\t\t\t\t\t\t\t\t\tif (t._previousFormats) {\n\t\t\t\t\t\t\t\t\t\tparent.appendChild(fmt.wrapper);\n\t\t\t\t\t\t\t\t\t\tfmt.inner.innerHTML = '\\uFEFF';\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\tparent.innerHTML = '\\uFEFF';\n\n\t\t\t\t\t\t\t\t\tselection.select(parent, 1);\n\t\t\t\t\t\t\t\t\tselection.collapse(true);\n\t\t\t\t\t\t\t\t\ted.getDoc().execCommand('Delete', false, null);\n\t\t\t\t\t\t\t\t\tt._previousFormats = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (isGecko) {\n\t\t\t\t\ted.onKeyDown.add(function(ed, e) {\n\t\t\t\t\t\tif ((e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey)\n\t\t\t\t\t\t\tt.backspaceDelete(e, e.keyCode == 8);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Workaround for missing shift+enter support, http://bugs.webkit.org/show_bug.cgi?id=16973\n\t\t\tif (tinymce.isWebKit) {\n\t\t\t\tfunction insertBr(ed) {\n\t\t\t\t\tvar rng = selection.getRng(), br, div = dom.create('div', null, ' '), divYPos, vpHeight = dom.getViewPort(ed.getWin()).h;\n\n\t\t\t\t\t// Insert BR element\n\t\t\t\t\trng.insertNode(br = dom.create('br'));\n\n\t\t\t\t\t// Place caret after BR\n\t\t\t\t\trng.setStartAfter(br);\n\t\t\t\t\trng.setEndAfter(br);\n\t\t\t\t\tselection.setRng(rng);\n\n\t\t\t\t\t// Could not place caret after BR then insert an nbsp entity and move the caret\n\t\t\t\t\tif (selection.getSel().focusNode == br.previousSibling) {\n\t\t\t\t\t\tselection.select(dom.insertAfter(dom.doc.createTextNode('\\u00a0'), br));\n\t\t\t\t\t\tselection.collapse(TRUE);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create a temporary DIV after the BR and get the position as it\n\t\t\t\t\t// seems like getPos() returns 0 for text nodes and BR elements.\n\t\t\t\t\tdom.insertAfter(div, br);\n\t\t\t\t\tdivYPos = dom.getPos(div).y;\n\t\t\t\t\tdom.remove(div);\n\n\t\t\t\t\t// Scroll to new position, scrollIntoView can't be used due to bug: http://bugs.webkit.org/show_bug.cgi?id=16117\n\t\t\t\t\tif (divYPos > vpHeight) // It is not necessary to scroll if the DIV is inside the view port.\n\t\t\t\t\t\ted.getWin().scrollTo(0, divYPos);\n\t\t\t\t};\n\n\t\t\t\ted.onKeyPress.add(function(ed, e) {\n\t\t\t\t\tif (e.keyCode == 13 && (e.shiftKey || (s.force_br_newlines && !dom.getParent(selection.getNode(), 'h1,h2,h3,h4,h5,h6,ol,ul')))) {\n\t\t\t\t\t\tinsertBr(ed);\n\t\t\t\t\t\tEvent.cancel(e);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// IE specific fixes\n\t\t\tif (isIE) {\n\t\t\t\t// Replaces IE:s auto generated paragraphs with the specified element name\n\t\t\t\tif (s.element != 'P') {\n\t\t\t\t\ted.onKeyPress.add(function(ed, e) {\n\t\t\t\t\t\tt.lastElm = selection.getNode().nodeName;\n\t\t\t\t\t});\n\n\t\t\t\t\ted.onKeyUp.add(function(ed, e) {\n\t\t\t\t\t\tvar bl, n = selection.getNode(), b = ed.getBody();\n\n\t\t\t\t\t\tif (b.childNodes.length === 1 && n.nodeName == 'P') {\n\t\t\t\t\t\t\tn = dom.rename(n, s.element);\n\t\t\t\t\t\t\tselection.select(n);\n\t\t\t\t\t\t\tselection.collapse();\n\t\t\t\t\t\t\ted.nodeChanged();\n\t\t\t\t\t\t} else if (e.keyCode == 13 && !e.shiftKey && t.lastElm != 'P') {\n\t\t\t\t\t\t\tbl = dom.getParent(n, 'p');\n\n\t\t\t\t\t\t\tif (bl) {\n\t\t\t\t\t\t\t\tdom.rename(bl, s.element);\n\t\t\t\t\t\t\t\ted.nodeChanged();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tgetParentBlock : function(n) {\n\t\t\tvar d = this.dom;\n\n\t\t\treturn d.getParent(n, d.isBlock);\n\t\t},\n\n\t\tinsertPara : function(e) {\n\t\t\tvar t = this, ed = t.editor, dom = ed.dom, d = ed.getDoc(), se = ed.settings, s = ed.selection.getSel(), r = s.getRangeAt(0), b = d.body;\n\t\t\tvar rb, ra, dir, sn, so, en, eo, sb, eb, bn, bef, aft, sc, ec, n, vp = dom.getViewPort(ed.getWin()), y, ch, car;\n\n\t\t\ted.undoManager.beforeChange();\n\n\t\t\t// If root blocks are forced then use Operas default behavior since it's really good\n// Removed due to bug: #1853816\n//\t\t\tif (se.forced_root_block && isOpera)\n//\t\t\t\treturn TRUE;\n\n\t\t\t// Setup before range\n\t\t\trb = d.createRange();\n\n\t\t\t// If is before the first block element and in body, then move it into first block element\n\t\t\trb.setStart(s.anchorNode, s.anchorOffset);\n\t\t\trb.collapse(TRUE);\n\n\t\t\t// Setup after range\n\t\t\tra = d.createRange();\n\n\t\t\t// If is before the first block element and in body, then move it into first block element\n\t\t\tra.setStart(s.focusNode, s.focusOffset);\n\t\t\tra.collapse(TRUE);\n\n\t\t\t// Setup start/end points\n\t\t\tdir = rb.compareBoundaryPoints(rb.START_TO_END, ra) < 0;\n\t\t\tsn = dir ? s.anchorNode : s.focusNode;\n\t\t\tso = dir ? s.anchorOffset : s.focusOffset;\n\t\t\ten = dir ? s.focusNode : s.anchorNode;\n\t\t\teo = dir ? s.focusOffset : s.anchorOffset;\n\n\t\t\t// If selection is in empty table cell\n\t\t\tif (sn === en && /^(TD|TH)$/.test(sn.nodeName)) {\n\t\t\t\tif (sn.firstChild.nodeName == 'BR')\n\t\t\t\t\tdom.remove(sn.firstChild); // Remove BR\n\n\t\t\t\t// Create two new block elements\n\t\t\t\tif (sn.childNodes.length == 0) {\n\t\t\t\t\ted.dom.add(sn, se.element, null, '<br />');\n\t\t\t\t\taft = ed.dom.add(sn, se.element, null, '<br />');\n\t\t\t\t} else {\n\t\t\t\t\tn = sn.innerHTML;\n\t\t\t\t\tsn.innerHTML = '';\n\t\t\t\t\ted.dom.add(sn, se.element, null, n);\n\t\t\t\t\taft = ed.dom.add(sn, se.element, null, '<br />');\n\t\t\t\t}\n\n\t\t\t\t// Move caret into the last one\n\t\t\t\tr = d.createRange();\n\t\t\t\tr.selectNodeContents(aft);\n\t\t\t\tr.collapse(1);\n\t\t\t\ted.selection.setRng(r);\n\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t// If the caret is in an invalid location in FF we need to move it into the first block\n\t\t\tif (sn == b && en == b && b.firstChild && ed.dom.isBlock(b.firstChild)) {\n\t\t\t\tsn = en = sn.firstChild;\n\t\t\t\tso = eo = 0;\n\t\t\t\trb = d.createRange();\n\t\t\t\trb.setStart(sn, 0);\n\t\t\t\tra = d.createRange();\n\t\t\t\tra.setStart(en, 0);\n\t\t\t}\n\n\t\t\t// If the body is totally empty add a BR element this might happen on webkit\n\t\t\tif (!d.body.hasChildNodes()) {\n\t\t\t\td.body.appendChild(dom.create('br'));\n\t\t\t}\n\n\t\t\t// Never use body as start or end node\n\t\t\tsn = sn.nodeName == \"HTML\" ? d.body : sn; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes\n\t\t\tsn = sn.nodeName == \"BODY\" ? sn.firstChild : sn;\n\t\t\ten = en.nodeName == \"HTML\" ? d.body : en; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes\n\t\t\ten = en.nodeName == \"BODY\" ? en.firstChild : en;\n\n\t\t\t// Get start and end blocks\n\t\t\tsb = t.getParentBlock(sn);\n\t\t\teb = t.getParentBlock(en);\n\t\t\tbn = sb ? sb.nodeName : se.element; // Get block name to create\n\n\t\t\t// Return inside list use default browser behavior\n\t\t\tif (n = t.dom.getParent(sb, 'li,pre')) {\n\t\t\t\tif (n.nodeName == 'LI')\n\t\t\t\t\treturn splitList(ed.selection, t.dom, n);\n\n\t\t\t\treturn TRUE;\n\t\t\t}\n\n\t\t\t// If caption or absolute layers then always generate new blocks within\n\t\t\tif (sb && (sb.nodeName == 'CAPTION' || /absolute|relative|fixed/gi.test(dom.getStyle(sb, 'position', 1)))) {\n\t\t\t\tbn = se.element;\n\t\t\t\tsb = null;\n\t\t\t}\n\n\t\t\t// If caption or absolute layers then always generate new blocks within\n\t\t\tif (eb && (eb.nodeName == 'CAPTION' || /absolute|relative|fixed/gi.test(dom.getStyle(sb, 'position', 1)))) {\n\t\t\t\tbn = se.element;\n\t\t\t\teb = null;\n\t\t\t}\n\n\t\t\t// Use P instead\n\t\t\tif (/(TD|TABLE|TH|CAPTION)/.test(bn) || (sb && bn == \"DIV\" && /left|right/gi.test(dom.getStyle(sb, 'float', 1)))) {\n\t\t\t\tbn = se.element;\n\t\t\t\tsb = eb = null;\n\t\t\t}\n\n\t\t\t// Setup new before and after blocks\n\t\t\tbef = (sb && sb.nodeName == bn) ? sb.cloneNode(0) : ed.dom.create(bn);\n\t\t\taft = (eb && eb.nodeName == bn) ? eb.cloneNode(0) : ed.dom.create(bn);\n\n\t\t\t// Remove id from after clone\n\t\t\taft.removeAttribute('id');\n\n\t\t\t// Is header and cursor is at the end, then force paragraph under\n\t\t\tif (/^(H[1-6])$/.test(bn) && isAtEnd(r, sb))\n\t\t\t\taft = ed.dom.create(se.element);\n\n\t\t\t// Find start chop node\n\t\t\tn = sc = sn;\n\t\t\tdo {\n\t\t\t\tif (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName))\n\t\t\t\t\tbreak;\n\n\t\t\t\tsc = n;\n\t\t\t} while ((n = n.previousSibling ? n.previousSibling : n.parentNode));\n\n\t\t\t// Find end chop node\n\t\t\tn = ec = en;\n\t\t\tdo {\n\t\t\t\tif (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName))\n\t\t\t\t\tbreak;\n\n\t\t\t\tec = n;\n\t\t\t} while ((n = n.nextSibling ? n.nextSibling : n.parentNode));\n\n\t\t\t// Place first chop part into before block element\n\t\t\tif (sc.nodeName == bn)\n\t\t\t\trb.setStart(sc, 0);\n\t\t\telse\n\t\t\t\trb.setStartBefore(sc);\n\n\t\t\trb.setEnd(sn, so);\n\t\t\tbef.appendChild(rb.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari\n\n\t\t\t// Place secnd chop part within new block element\n\t\t\ttry {\n\t\t\t\tra.setEndAfter(ec);\n\t\t\t} catch(ex) {\n\t\t\t\t//console.debug(s.focusNode, s.focusOffset);\n\t\t\t}\n\n\t\t\tra.setStart(en, eo);\n\t\t\taft.appendChild(ra.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari\n\n\t\t\t// Create range around everything\n\t\t\tr = d.createRange();\n\t\t\tif (!sc.previousSibling && sc.parentNode.nodeName == bn) {\n\t\t\t\tr.setStartBefore(sc.parentNode);\n\t\t\t} else {\n\t\t\t\tif (rb.startContainer.nodeName == bn && rb.startOffset == 0)\n\t\t\t\t\tr.setStartBefore(rb.startContainer);\n\t\t\t\telse\n\t\t\t\t\tr.setStart(rb.startContainer, rb.startOffset);\n\t\t\t}\n\n\t\t\tif (!ec.nextSibling && ec.parentNode.nodeName == bn)\n\t\t\t\tr.setEndAfter(ec.parentNode);\n\t\t\telse\n\t\t\t\tr.setEnd(ra.endContainer, ra.endOffset);\n\n\t\t\t// Delete and replace it with new block elements\n\t\t\tr.deleteContents();\n\n\t\t\tif (isOpera)\n\t\t\t\ted.getWin().scrollTo(0, vp.y);\n\n\t\t\t// Never wrap blocks in blocks\n\t\t\tif (bef.firstChild && bef.firstChild.nodeName == bn)\n\t\t\t\tbef.innerHTML = bef.firstChild.innerHTML;\n\n\t\t\tif (aft.firstChild && aft.firstChild.nodeName == bn)\n\t\t\t\taft.innerHTML = aft.firstChild.innerHTML;\n\n\t\t\tfunction appendStyles(e, en) {\n\t\t\t\tvar nl = [], nn, n, i;\n\n\t\t\t\te.innerHTML = '';\n\n\t\t\t\t// Make clones of style elements\n\t\t\t\tif (se.keep_styles) {\n\t\t\t\t\tn = en;\n\t\t\t\t\tdo {\n\t\t\t\t\t\t// We only want style specific elements\n\t\t\t\t\t\tif (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(n.nodeName)) {\n\t\t\t\t\t\t\tnn = n.cloneNode(FALSE);\n\t\t\t\t\t\t\tdom.setAttrib(nn, 'id', ''); // Remove ID since it needs to be unique\n\t\t\t\t\t\t\tnl.push(nn);\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (n = n.parentNode);\n\t\t\t\t}\n\n\t\t\t\t// Append style elements to aft\n\t\t\t\tif (nl.length > 0) {\n\t\t\t\t\tfor (i = nl.length - 1, nn = e; i >= 0; i--)\n\t\t\t\t\t\tnn = nn.appendChild(nl[i]);\n\n\t\t\t\t\t// Padd most inner style element\n\t\t\t\t\tnl[0].innerHTML = isOpera ? '\\u00a0' : '<br />'; // Extra space for Opera so that the caret can move there\n\t\t\t\t\treturn nl[0]; // Move caret to most inner element\n\t\t\t\t} else\n\t\t\t\t\te.innerHTML = isOpera ? '\\u00a0' : '<br />'; // Extra space for Opera so that the caret can move there\n\t\t\t};\n\t\t\t\t\n\t\t\t// Padd empty blocks\n\t\t\tif (dom.isEmpty(bef))\n\t\t\t\tappendStyles(bef, sn);\n\n\t\t\t// Fill empty afterblook with current style\n\t\t\tif (dom.isEmpty(aft))\n\t\t\t\tcar = appendStyles(aft, en);\n\n\t\t\t// Opera needs this one backwards for older versions\n\t\t\tif (isOpera && parseFloat(opera.version()) < 9.5) {\n\t\t\t\tr.insertNode(bef);\n\t\t\t\tr.insertNode(aft);\n\t\t\t} else {\n\t\t\t\tr.insertNode(aft);\n\t\t\t\tr.insertNode(bef);\n\t\t\t}\n\n\t\t\t// Normalize\n\t\t\taft.normalize();\n\t\t\tbef.normalize();\n\n\t\t\t// Move cursor and scroll into view\n\t\t\ted.selection.select(aft, true);\n\t\t\ted.selection.collapse(true);\n\n\t\t\t// scrollIntoView seems to scroll the parent window in most browsers now including FF 3.0b4 so it's time to stop using it and do it our selfs\n\t\t\ty = ed.dom.getPos(aft).y;\n\t\t\t//ch = aft.clientHeight;\n\n\t\t\t// Is element within viewport\n\t\t\tif (y < vp.y || y + 25 > vp.y + vp.h) {\n\t\t\t\ted.getWin().scrollTo(0, y < vp.y ? y : y - vp.h + 25); // Needs to be hardcoded to roughly one line of text if a huge text block is broken into two blocks\n\n\t\t\t\t/*console.debug(\n\t\t\t\t\t'Element: y=' + y + ', h=' + ch + ', ' +\n\t\t\t\t\t'Viewport: y=' + vp.y + \", h=\" + vp.h + ', bottom=' + (vp.y + vp.h)\n\t\t\t\t);*/\n\t\t\t}\n\n\t\t\ted.undoManager.add();\n\n\t\t\treturn FALSE;\n\t\t},\n\n\t\tbackspaceDelete : function(e, bs) {\n\t\t\tvar t = this, ed = t.editor, b = ed.getBody(), dom = ed.dom, n, se = ed.selection, r = se.getRng(), sc = r.startContainer, n, w, tn, walker;\n\n\t\t\t// Delete when caret is behind a element doesn't work correctly on Gecko see #3011651\n\t\t\tif (!bs && r.collapsed && sc.nodeType == 1 && r.startOffset == sc.childNodes.length) {\n\t\t\t\twalker = new tinymce.dom.TreeWalker(sc.lastChild, sc);\n\n\t\t\t\t// Walk the dom backwards until we find a text node\n\t\t\t\tfor (n = sc.lastChild; n; n = walker.prev()) {\n\t\t\t\t\tif (n.nodeType == 3) {\n\t\t\t\t\t\tr.setStart(n, n.nodeValue.length);\n\t\t\t\t\t\tr.collapse(true);\n\t\t\t\t\t\tse.setRng(r);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// The caret sometimes gets stuck in Gecko if you delete empty paragraphs\n\t\t\t// This workaround removes the element by hand and moves the caret to the previous element\n\t\t\tif (sc && ed.dom.isBlock(sc) && !/^(TD|TH)$/.test(sc.nodeName) && bs) {\n\t\t\t\tif (sc.childNodes.length == 0 || (sc.childNodes.length == 1 && sc.firstChild.nodeName == 'BR')) {\n\t\t\t\t\t// Find previous block element\n\t\t\t\t\tn = sc;\n\t\t\t\t\twhile ((n = n.previousSibling) && !ed.dom.isBlock(n)) ;\n\n\t\t\t\t\tif (n) {\n\t\t\t\t\t\tif (sc != b.firstChild) {\n\t\t\t\t\t\t\t// Find last text node\n\t\t\t\t\t\t\tw = ed.dom.doc.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, FALSE);\n\t\t\t\t\t\t\twhile (tn = w.nextNode())\n\t\t\t\t\t\t\t\tn = tn;\n\n\t\t\t\t\t\t\t// Place caret at the end of last text node\n\t\t\t\t\t\t\tr = ed.getDoc().createRange();\n\t\t\t\t\t\t\tr.setStart(n, n.nodeValue ? n.nodeValue.length : 0);\n\t\t\t\t\t\t\tr.setEnd(n, n.nodeValue ? n.nodeValue.length : 0);\n\t\t\t\t\t\t\tse.setRng(r);\n\n\t\t\t\t\t\t\t// Remove the target container\n\t\t\t\t\t\t\ted.dom.remove(sc);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn Event.cancel(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/EditorManager.js":"/**\n * EditorManager.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t/**\n\t * @class tinymce\n\t */\n\n\t// Shorten names\n\tvar each = tinymce.each, extend = tinymce.extend,\n\t\tDOM = tinymce.DOM, Event = tinymce.dom.Event,\n\t\tThemeManager = tinymce.ThemeManager, PluginManager = tinymce.PluginManager,\n\t\texplode = tinymce.explode,\n\t\tDispatcher = tinymce.util.Dispatcher, undefined, instanceCounter = 0;\n\n\t// Setup some URLs where the editor API is located and where the document is\n\ttinymce.documentBaseURL = window.location.href.replace(/[\\?#].*$/, '').replace(/[\\/\\\\][^\\/]+$/, '');\n\tif (!/[\\/\\\\]$/.test(tinymce.documentBaseURL))\n\t\ttinymce.documentBaseURL += '/';\n\n\ttinymce.baseURL = new tinymce.util.URI(tinymce.documentBaseURL).toAbsolute(tinymce.baseURL);\n\n\t/**\n\t * Absolute baseURI for the installation path of TinyMCE.\n\t *\n\t * @property baseURI\n\t * @type tinymce.util.URI\n\t */\n\ttinymce.baseURI = new tinymce.util.URI(tinymce.baseURL);\n\n\t// Add before unload listener\n\t// This was required since IE was leaking memory if you added and removed beforeunload listeners\n\t// with attachEvent/detatchEvent so this only adds one listener and instances can the attach to the onBeforeUnload event\n\ttinymce.onBeforeUnload = new Dispatcher(tinymce);\n\n\t// Must be on window or IE will leak if the editor is placed in frame or iframe\n\tEvent.add(window, 'beforeunload', function(e) {\n\t\ttinymce.onBeforeUnload.dispatch(tinymce, e);\n\t});\n\n\t/**\n\t * Fires when a new editor instance is added to the tinymce collection.\n\t *\n\t * @event onAddEditor\n\t * @param {tinymce} sender TinyMCE root class/namespace.\n\t * @param {tinymce.Editor} editor Editor instance.\n\t * @example\n\t * tinyMCE.execCommand(\"mceAddControl\", false, \"some_textarea\");\n\t * tinyMCE.onAddEditor.add(function(mgr,ed) {\n\t *     console.debug('A new editor is available' + ed.id);\n\t * });\n\t */\n\ttinymce.onAddEditor = new Dispatcher(tinymce);\n\n\t/**\n\t * Fires when an editor instance is removed from the tinymce collection.\n\t *\n\t * @event onRemoveEditor\n\t * @param {tinymce} sender TinyMCE root class/namespace.\n\t * @param {tinymce.Editor} editor Editor instance.\n\t */\n\ttinymce.onRemoveEditor = new Dispatcher(tinymce);\n\n\ttinymce.EditorManager = extend(tinymce, {\n\t\t/**\n\t\t * Collection of editor instances.\n\t\t *\n\t\t * @property editors\n\t\t * @type Object\n\t\t * @example\n\t\t * for (edId in tinyMCE.editors)\n\t\t *     tinyMCE.editors[edId].save();\n\t\t */\n\t\teditors : [],\n\n\t\t/**\n\t\t * Collection of language pack data.\n\t\t *\n\t\t * @property i18n\n\t\t * @type Object\n\t\t */\n\t\ti18n : {},\n\n\t\t/**\n\t\t * Currently active editor instance.\n\t\t *\n\t\t * @property activeEditor\n\t\t * @type tinymce.Editor\n\t\t * @example\n\t\t * tinyMCE.activeEditor.selection.getContent();\n\t\t * tinymce.EditorManager.activeEditor.selection.getContent();\n\t\t */\n\t\tactiveEditor : null,\n\n\t\t/**\n\t\t * Initializes a set of editors. This method will create a bunch of editors based in the input.\n\t\t *\n\t\t * @method init\n\t\t * @param {Object} s Settings object to be passed to each editor instance.\n\t\t * @example\n\t\t * // Initializes a editor using the longer method\n\t\t * tinymce.EditorManager.init({\n\t\t *    some_settings : 'some value'\n\t\t * });\n\t\t * \n\t\t * // Initializes a editor instance using the shorter version\n\t\t * tinyMCE.init({\n\t\t *    some_settings : 'some value'\n\t\t * });\n\t\t */\n\t\tinit : function(s) {\n\t\t\tvar t = this, pl, sl = tinymce.ScriptLoader, e, el = [], ed;\n\n\t\t\tfunction execCallback(se, n, s) {\n\t\t\t\tvar f = se[n];\n\n\t\t\t\tif (!f)\n\t\t\t\t\treturn;\n\n\t\t\t\tif (tinymce.is(f, 'string')) {\n\t\t\t\t\ts = f.replace(/\\.\\w+$/, '');\n\t\t\t\t\ts = s ? tinymce.resolve(s) : 0;\n\t\t\t\t\tf = tinymce.resolve(f);\n\t\t\t\t}\n\n\t\t\t\treturn f.apply(s || this, Array.prototype.slice.call(arguments, 2));\n\t\t\t};\n\n\t\t\ts = extend({\n\t\t\t\ttheme : \"simple\",\n\t\t\t\tlanguage : \"en\"\n\t\t\t}, s);\n\n\t\t\tt.settings = s;\n\n\t\t\t// Legacy call\n\t\t\tEvent.add(document, 'init', function() {\n\t\t\t\tvar l, co;\n\n\t\t\t\texecCallback(s, 'onpageload');\n\n\t\t\t\tswitch (s.mode) {\n\t\t\t\t\tcase \"exact\":\n\t\t\t\t\t\tl = s.elements || '';\n\n\t\t\t\t\t\tif(l.length > 0) {\n\t\t\t\t\t\t\teach(explode(l), function(v) {\n\t\t\t\t\t\t\t\tif (DOM.get(v)) {\n\t\t\t\t\t\t\t\t\ted = new tinymce.Editor(v, s);\n\t\t\t\t\t\t\t\t\tel.push(ed);\n\t\t\t\t\t\t\t\t\ted.render(1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\teach(document.forms, function(f) {\n\t\t\t\t\t\t\t\t\t\teach(f.elements, function(e) {\n\t\t\t\t\t\t\t\t\t\t\tif (e.name === v) {\n\t\t\t\t\t\t\t\t\t\t\t\tv = 'mce_editor_' + instanceCounter++;\n\t\t\t\t\t\t\t\t\t\t\t\tDOM.setAttrib(e, 'id', v);\n\n\t\t\t\t\t\t\t\t\t\t\t\ted = new tinymce.Editor(v, s);\n\t\t\t\t\t\t\t\t\t\t\t\tel.push(ed);\n\t\t\t\t\t\t\t\t\t\t\t\ted.render(1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"textareas\":\n\t\t\t\t\tcase \"specific_textareas\":\n\t\t\t\t\t\tfunction hasClass(n, c) {\n\t\t\t\t\t\t\treturn c.constructor === RegExp ? c.test(n.className) : DOM.hasClass(n, c);\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\teach(DOM.select('textarea'), function(v) {\n\t\t\t\t\t\t\tif (s.editor_deselector && hasClass(v, s.editor_deselector))\n\t\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t\tif (!s.editor_selector || hasClass(v, s.editor_selector)) {\n\t\t\t\t\t\t\t\t// Can we use the name\n\t\t\t\t\t\t\t\te = DOM.get(v.name);\n\t\t\t\t\t\t\t\tif (!v.id && !e)\n\t\t\t\t\t\t\t\t\tv.id = v.name;\n\n\t\t\t\t\t\t\t\t// Generate unique name if missing or already exists\n\t\t\t\t\t\t\t\tif (!v.id || t.get(v.id))\n\t\t\t\t\t\t\t\t\tv.id = DOM.uniqueId();\n\n\t\t\t\t\t\t\t\ted = new tinymce.Editor(v.id, s);\n\t\t\t\t\t\t\t\tel.push(ed);\n\t\t\t\t\t\t\t\ted.render(1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Call onInit when all editors are initialized\n\t\t\t\tif (s.oninit) {\n\t\t\t\t\tl = co = 0;\n\n\t\t\t\t\teach(el, function(ed) {\n\t\t\t\t\t\tco++;\n\n\t\t\t\t\t\tif (!ed.initialized) {\n\t\t\t\t\t\t\t// Wait for it\n\t\t\t\t\t\t\ted.onInit.add(function() {\n\t\t\t\t\t\t\t\tl++;\n\n\t\t\t\t\t\t\t\t// All done\n\t\t\t\t\t\t\t\tif (l == co)\n\t\t\t\t\t\t\t\t\texecCallback(s, 'oninit');\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tl++;\n\n\t\t\t\t\t\t// All done\n\t\t\t\t\t\tif (l == co)\n\t\t\t\t\t\t\texecCallback(s, 'oninit');\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Returns a editor instance by id.\n\t\t *\n\t\t * @method get\n\t\t * @param {String/Number} id Editor instance id or index to return.\n\t\t * @return {tinymce.Editor} Editor instance to return.\n\t\t * @example\n\t\t * // Adds an onclick event to an editor by id (shorter version)\n\t\t * tinyMCE.get('mytextbox').onClick.add(function(ed, e) {\n\t\t *    ed.windowManager.alert('Hello world!');\n\t\t * });\n\t\t * \n\t\t * // Adds an onclick event to an editor by id (longer version)\n\t\t * tinymce.EditorManager.get('mytextbox').onClick.add(function(ed, e) {\n\t\t *    ed.windowManager.alert('Hello world!');\n\t\t * });\n\t\t */\n\t\tget : function(id) {\n\t\t\tif (id === undefined)\n\t\t\t\treturn this.editors;\n\n\t\t\treturn this.editors[id];\n\t\t},\n\n\t\t/**\n\t\t * Returns a editor instance by id. This method was added for compatibility with the 2.x branch.\n\t\t *\n\t\t * @method getInstanceById\n\t\t * @param {String} id Editor instance id to return.\n\t\t * @return {tinymce.Editor} Editor instance to return.\n\t\t * @deprecated Use get method instead.\n\t\t * @see #get\n\t\t */\n\t\tgetInstanceById : function(id) {\n\t\t\treturn this.get(id);\n\t\t},\n\n\t\t/**\n\t\t * Adds an editor instance to the editor collection. This will also set it as the active editor.\n\t\t *\n\t\t * @method add\n\t\t * @param {tinymce.Editor} editor Editor instance to add to the collection.\n\t\t * @return {tinymce.Editor} The same instance that got passed in.\n\t\t */\n\t\tadd : function(editor) {\n\t\t\tvar self = this, editors = self.editors;\n\n\t\t\t// Add named and index editor instance\n\t\t\teditors[editor.id] = editor;\n\t\t\teditors.push(editor);\n\n\t\t\tself._setActive(editor);\n\t\t\tself.onAddEditor.dispatch(self, editor);\n\n\t\t\t// #ifdef jquery\n\n\t\t\t// Patch the tinymce.Editor instance with jQuery adapter logic\n\t\t\tif (tinymce.adapter)\n\t\t\t\ttinymce.adapter.patchEditor(editor);\n\n\t\t\t// #endif\n\n\t\t\treturn editor;\n\t\t},\n\n\t\t/**\n\t\t * Removes a editor instance from the collection.\n\t\t *\n\t\t * @method remove\n\t\t * @param {tinymce.Editor} e Editor instance to remove.\n\t\t * @return {tinymce.Editor} The editor that got passed in will be return if it was found otherwise null.\n\t\t */\n\t\tremove : function(editor) {\n\t\t\tvar t = this, i, editors = t.editors;\n\n\t\t\t// Not in the collection\n\t\t\tif (!editors[editor.id])\n\t\t\t\treturn null;\n\n\t\t\tdelete editors[editor.id];\n\n\t\t\tfor (i = 0; i < editors.length; i++) {\n\t\t\t\tif (editors[i] == editor) {\n\t\t\t\t\teditors.splice(i, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Select another editor since the active one was removed\n\t\t\tif (t.activeEditor == editor)\n\t\t\t\tt._setActive(editors[0]);\n\n\t\t\teditor.destroy();\n\t\t\tt.onRemoveEditor.dispatch(t, editor);\n\n\t\t\treturn editor;\n\t\t},\n\n\t\t/**\n\t\t * Executes a specific command on the currently active editor.\n\t\t *\n\t\t * @method execCommand\n\t\t * @param {String} c Command to perform for example Bold.\n\t\t * @param {Boolean} u Optional boolean state if a UI should be presented for the command or not.\n\t\t * @param {String} v Optional value parameter like for example an URL to a link.\n\t\t * @return {Boolean} true/false if the command was executed or not.\n\t\t */\n\t\texecCommand : function(c, u, v) {\n\t\t\tvar t = this, ed = t.get(v), w;\n\n\t\t\t// Manager commands\n\t\t\tswitch (c) {\n\t\t\t\tcase \"mceFocus\":\n\t\t\t\t\ted.focus();\n\t\t\t\t\treturn true;\n\n\t\t\t\tcase \"mceAddEditor\":\n\t\t\t\tcase \"mceAddControl\":\n\t\t\t\t\tif (!t.get(v))\n\t\t\t\t\t\tnew tinymce.Editor(v, t.settings).render();\n\n\t\t\t\t\treturn true;\n\n\t\t\t\tcase \"mceAddFrameControl\":\n\t\t\t\t\tw = v.window;\n\n\t\t\t\t\t// Add tinyMCE global instance and tinymce namespace to specified window\n\t\t\t\t\tw.tinyMCE = tinyMCE;\n\t\t\t\t\tw.tinymce = tinymce;\n\n\t\t\t\t\ttinymce.DOM.doc = w.document;\n\t\t\t\t\ttinymce.DOM.win = w;\n\n\t\t\t\t\ted = new tinymce.Editor(v.element_id, v);\n\t\t\t\t\ted.render();\n\n\t\t\t\t\t// Fix IE memory leaks\n\t\t\t\t\tif (tinymce.isIE) {\n\t\t\t\t\t\tfunction clr() {\n\t\t\t\t\t\t\ted.destroy();\n\t\t\t\t\t\t\tw.detachEvent('onunload', clr);\n\t\t\t\t\t\t\tw = w.tinyMCE = w.tinymce = null; // IE leak\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tw.attachEvent('onunload', clr);\n\t\t\t\t\t}\n\n\t\t\t\t\tv.page_window = null;\n\n\t\t\t\t\treturn true;\n\n\t\t\t\tcase \"mceRemoveEditor\":\n\t\t\t\tcase \"mceRemoveControl\":\n\t\t\t\t\tif (ed)\n\t\t\t\t\t\ted.remove();\n\n\t\t\t\t\treturn true;\n\n\t\t\t\tcase 'mceToggleEditor':\n\t\t\t\t\tif (!ed) {\n\t\t\t\t\t\tt.execCommand('mceAddControl', 0, v);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (ed.isHidden())\n\t\t\t\t\t\ted.show();\n\t\t\t\t\telse\n\t\t\t\t\t\ted.hide();\n\n\t\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Run command on active editor\n\t\t\tif (t.activeEditor)\n\t\t\t\treturn t.activeEditor.execCommand(c, u, v);\n\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * Executes a command on a specific editor by id. This method was added for compatibility with the 2.x branch.\n\t\t *\n\t\t * @deprecated Use the execCommand method of a editor instance instead.\n\t\t * @method execInstanceCommand\n\t\t * @param {String} id Editor id to perform the command on.\n\t\t * @param {String} c Command to perform for example Bold.\n\t\t * @param {Boolean} u Optional boolean state if a UI should be presented for the command or not.\n\t\t * @param {String} v Optional value parameter like for example an URL to a link.\n\t\t * @return {Boolean} true/false if the command was executed or not.\n\t\t */\n\t\texecInstanceCommand : function(id, c, u, v) {\n\t\t\tvar ed = this.get(id);\n\n\t\t\tif (ed)\n\t\t\t\treturn ed.execCommand(c, u, v);\n\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * Calls the save method on all editor instances in the collection. This can be useful when a form is to be submitted.\n\t\t *\n\t\t * @method triggerSave\n\t\t * @example\n\t\t * // Saves all contents\n\t\t * tinyMCE.triggerSave();\n\t\t */\n\t\ttriggerSave : function() {\n\t\t\teach(this.editors, function(e) {\n\t\t\t\te.save();\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Adds a language pack, this gets called by the loaded language files like en.js.\n\t\t *\n\t\t * @method addI18n\n\t\t * @param {String} p Prefix for the language items. For example en.myplugin\n\t\t * @param {Object} o Name/Value collection with items to add to the language group.\n\t\t */\n\t\taddI18n : function(p, o) {\n\t\t\tvar lo, i18n = this.i18n;\n\n\t\t\tif (!tinymce.is(p, 'string')) {\n\t\t\t\teach(p, function(o, lc) {\n\t\t\t\t\teach(o, function(o, g) {\n\t\t\t\t\t\teach(o, function(o, k) {\n\t\t\t\t\t\t\tif (g === 'common')\n\t\t\t\t\t\t\t\ti18n[lc + '.' + k] = o;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\ti18n[lc + '.' + g + '.' + k] = o;\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\teach(o, function(o, k) {\n\t\t\t\t\ti18n[p + '.' + k] = o;\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\t// Private methods\n\n\t\t_setActive : function(editor) {\n\t\t\tthis.selectedInstance = this.activeEditor = editor;\n\t\t}\n\t});\n})(tinymce);\n\n/**\n * Alternative name for tinymce added for 2.x compatibility.\n *\n * @member\n * @property tinyMCE\n * @type tinymce\n * @example\n * // To initialize editor instances\n * tinyMCE.init({\n *    ...\n * });\n */\n\n/**\n * Alternative name for tinymce added for compatibility.\n *\n * @member tinymce\n * @property EditorManager\n * @type tinymce\n * @example\n * // To initialize editor instances\n * tinymce.EditorManager.get('editor');\n */\n","Magento_Tinymce3/tiny_mce/classes/Popup.js":"/**\n * Popup.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n// Some global instances\nvar tinymce = null, tinyMCEPopup, tinyMCE;\n\n/**\n * TinyMCE popup/dialog helper class. This gives you easy access to the\n * parent editor instance and a bunch of other things. It's higly recommended\n * that you load this script into your dialogs.\n *\n * @static\n * @class tinyMCEPopup\n */\ntinyMCEPopup = {\n\t/**\n\t * Initializes the popup this will be called automatically.\n\t *\n\t * @method init\n\t */\n\tinit : function() {\n\t\tvar t = this, w, ti;\n\n\t\t// Find window & API\n\t\tw = t.getWin();\n\t\ttinymce = w.tinymce;\n\t\ttinyMCE = w.tinyMCE;\n\t\tt.editor = tinymce.EditorManager.activeEditor;\n\t\tt.params = t.editor.windowManager.params;\n\t\tt.features = t.editor.windowManager.features;\n\n\t\t// Setup local DOM\n\t\tt.dom = t.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document);\n\n\t\t// Enables you to skip loading the default css\n\t\tif (t.features.popup_css !== false)\n\t\t\tt.dom.loadCSS(t.features.popup_css || t.editor.settings.popup_css);\n\n\t\t// Setup on init listeners\n\t\tt.listeners = [];\n\n\t\t/**\n\t\t * Fires when the popup is initialized.\n\t\t *\n\t\t * @event onInit\n\t\t * @param {tinymce.Editor} editor Editor instance.\n\t\t * @example\n\t\t * // Alerts the selected contents when the dialog is loaded\n\t\t * tinyMCEPopup.onInit.add(function(ed) {\n\t\t *     alert(ed.selection.getContent());\n\t\t * });\n\t\t *\n\t\t * // Executes the init method on page load in some object using the SomeObject scope\n\t\t * tinyMCEPopup.onInit.add(SomeObject.init, SomeObject);\n\t\t */\n\t\tt.onInit = {\n\t\t\tadd : function(f, s) {\n\t\t\t\tt.listeners.push({func : f, scope : s});\n\t\t\t}\n\t\t};\n\n\t\tt.isWindow = !t.getWindowArg('mce_inline');\n\t\tt.id = t.getWindowArg('mce_window_id');\n\t\tt.editor.windowManager.onOpen.dispatch(t.editor.windowManager, window);\n\t},\n\n\t/**\n\t * Returns the reference to the parent window that opened the dialog.\n\t *\n\t * @method getWin\n\t * @return {Window} Reference to the parent window that opened the dialog.\n\t */\n\tgetWin : function() {\n\t\t// Added frameElement check to fix bug: #2817583\n\t\treturn (!window.frameElement && window.dialogArguments) || opener || parent || top;\n\t},\n\n\t/**\n\t * Returns a window argument/parameter by name.\n\t *\n\t * @method getWindowArg\n\t * @param {String} n Name of the window argument to retrieve.\n\t * @param {String} dv Optional default value to return.\n\t * @return {String} Argument value or default value if it wasn't found.\n\t */\n\tgetWindowArg : function(n, dv) {\n\t\tvar v = this.params[n];\n\n\t\treturn tinymce.is(v) ? v : dv;\n\t},\n\n\t/**\n\t * Returns a editor parameter/config option value.\n\t *\n\t * @method getParam\n\t * @param {String} n Name of the editor config option to retrieve.\n\t * @param {String} dv Optional default value to return.\n\t * @return {String} Parameter value or default value if it wasn't found.\n\t */\n\tgetParam : function(n, dv) {\n\t\treturn this.editor.getParam(n, dv);\n\t},\n\n\t/**\n\t * Returns a language item by key.\n\t *\n\t * @method getLang\n\t * @param {String} n Language item like mydialog.something.\n\t * @param {String} dv Optional default value to return.\n\t * @return {String} Language value for the item like \"my string\" or the default value if it wasn't found.\n\t */\n\tgetLang : function(n, dv) {\n\t\treturn this.editor.getLang(n, dv);\n\t},\n\n\t/**\n\t * Executed a command on editor that opened the dialog/popup.\n\t *\n\t * @method execCommand\n\t * @param {String} cmd Command to execute.\n\t * @param {Boolean} ui Optional boolean value if the UI for the command should be presented or not.\n\t * @param {Object} val Optional value to pass with the comman like an URL.\n\t * @param {Object} a Optional arguments object.\n\t */\n\texecCommand : function(cmd, ui, val, a) {\n\t\ta = a || {};\n\t\ta.skip_focus = 1;\n\n\t\tthis.restoreSelection();\n\t\treturn this.editor.execCommand(cmd, ui, val, a);\n\t},\n\n\t/**\n\t * Resizes the dialog to the inner size of the window. This is needed since various browsers\n\t * have different border sizes on windows.\n\t *\n\t * @method resizeToInnerSize\n\t */\n\tresizeToInnerSize : function() {\n\t\tvar t = this;\n\n\t\t// Detach it to workaround a Chrome specific bug\n\t\t// https://sourceforge.net/tracker/?func=detail&atid=635682&aid=2926339&group_id=103281\n\t\tsetTimeout(function() {\n\t\t\tvar vp = t.dom.getViewPort(window);\n\n\t\t\tt.editor.windowManager.resizeBy(\n\t\t\t\tt.getWindowArg('mce_width') - vp.w,\n\t\t\t\tt.getWindowArg('mce_height') - vp.h,\n\t\t\t\tt.id || window\n\t\t\t);\n\t\t}, 10);\n\t},\n\n\t/**\n\t * Will executed the specified string when the page has been loaded. This function\n\t * was added for compatibility with the 2.x branch.\n\t *\n\t * @method executeOnLoad\n\t * @param {String} s String to evalutate on init.\n\t */\n\texecuteOnLoad : function(s) {\n\t\tthis.onInit.add(function() {\n\t\t\teval(s);\n\t\t});\n\t},\n\n\t/**\n\t * Stores the current editor selection for later restoration. This can be useful since some browsers\n\t * looses it's selection if a control element is selected/focused inside the dialogs.\n\t *\n\t * @method storeSelection\n\t */\n\tstoreSelection : function() {\n\t\tthis.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark(1);\n\t},\n\n\t/**\n\t * Restores any stored selection. This can be useful since some browsers\n\t * looses it's selection if a control element is selected/focused inside the dialogs.\n\t *\n\t * @method restoreSelection\n\t */\n\trestoreSelection : function() {\n\t\tvar t = tinyMCEPopup;\n\n\t\tif (!t.isWindow && tinymce.isIE)\n\t\t\tt.editor.selection.moveToBookmark(t.editor.windowManager.bookmark);\n\t},\n\n\t/**\n\t * Loads a specific dialog language pack. If you pass in plugin_url as a arugment\n\t * when you open the window it will load the <plugin url>/langs/<code>_dlg.js lang pack file.\n\t *\n\t * @method requireLangPack\n\t */\n\trequireLangPack : function() {\n\t\tvar t = this, u = t.getWindowArg('plugin_url') || t.getWindowArg('theme_url');\n\n\t\tif (u && t.editor.settings.language && t.features.translate_i18n !== false && t.editor.settings.language_load !== false) {\n\t\t\tu += '/langs/' + t.editor.settings.language + '_dlg.js';\n\n\t\t\tif (!tinymce.ScriptLoader.isDone(u)) {\n\t\t\t\tdocument.write('<script type=\"text/javascript\" src=\"' + tinymce._addVer(u) + '\"></script>');\n\t\t\t\ttinymce.ScriptLoader.markDone(u);\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Executes a color picker on the specified element id. When the user\n\t * then selects a color it will be set as the value of the specified element.\n\t *\n\t * @method pickColor\n\t * @param {DOMEvent} e DOM event object.\n\t * @param {string} element_id Element id to be filled with the color value from the picker.\n\t */\n\tpickColor : function(e, element_id) {\n\t\tthis.execCommand('mceColorPicker', true, {\n\t\t\tcolor : document.getElementById(element_id).value,\n\t\t\tfunc : function(c) {\n\t\t\t\tdocument.getElementById(element_id).value = c;\n\n\t\t\t\ttry {\n\t\t\t\t\tdocument.getElementById(element_id).onchange();\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Try fire event, ignore errors\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n\t * Opens a filebrowser/imagebrowser this will set the output value from\n\t * the browser as a value on the specified element.\n\t *\n\t * @method openBrowser\n\t * @param {string} element_id Id of the element to set value in.\n\t * @param {string} type Type of browser to open image/file/flash.\n\t * @param {string} option Option name to get the file_broswer_callback function name from.\n\t */\n\topenBrowser : function(element_id, type, option) {\n\t\ttinyMCEPopup.restoreSelection();\n\t\tthis.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window);\n\t},\n\n\t/**\n\t * Creates a confirm dialog. Please don't use the blocking behavior of this\n\t * native version use the callback method instead then it can be extended.\n\t *\n\t * @method confirm\n\t * @param {String} t Title for the new confirm dialog.\n\t * @param {function} cb Callback function to be executed after the user has selected ok or cancel.\n\t * @param {Object} s Optional scope to execute the callback in.\n\t */\n\tconfirm : function(t, cb, s) {\n\t\tthis.editor.windowManager.confirm(t, cb, s, window);\n\t},\n\n\t/**\n\t * Creates a alert dialog. Please don't use the blocking behavior of this\n\t * native version use the callback method instead then it can be extended.\n\t *\n\t * @method alert\n\t * @param {String} t Title for the new alert dialog.\n\t * @param {function} cb Callback function to be executed after the user has selected ok.\n\t * @param {Object} s Optional scope to execute the callback in.\n\t */\n\talert : function(tx, cb, s) {\n\t\tthis.editor.windowManager.alert(tx, cb, s, window);\n\t},\n\n\t/**\n\t * Closes the current window.\n\t *\n\t * @method close\n\t */\n\tclose : function() {\n\t\tvar t = this;\n\n\t\t// To avoid domain relaxing issue in Opera\n\t\tfunction close() {\n\t\t\tt.editor.windowManager.close(window);\n\t\t\ttinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup\n\t\t};\n\n\t\tif (tinymce.isOpera)\n\t\t\tt.getWin().setTimeout(close, 0);\n\t\telse\n\t\t\tclose();\n\t},\n\n\t// Internal functions\n\n\t_restoreSelection : function() {\n\t\tvar e = window.event.srcElement;\n\n\t\tif (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button'))\n\t\t\ttinyMCEPopup.restoreSelection();\n\t},\n\n/*\t_restoreSelection : function() {\n\t\tvar e = window.event.srcElement;\n\n\t\t// If user focus a non text input or textarea\n\t\tif ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text')\n\t\t\ttinyMCEPopup.restoreSelection();\n\t},*/\n\n\t_onDOMLoaded : function() {\n\t\tvar t = tinyMCEPopup, ti = document.title, bm, h, nv;\n\n\t\tif (t.domLoaded)\n\t\t\treturn;\n\n\t\tt.domLoaded = 1;\n\n\t\t// Translate page\n\t\tif (t.features.translate_i18n !== false) {\n\t\t\th = document.body.innerHTML;\n\n\t\t\t// Replace a=x with a=\"x\" in IE\n\t\t\tif (tinymce.isIE)\n\t\t\t\th = h.replace(/ (value|title|alt)=([^\"][^\\s>]+)/gi, ' $1=\"$2\"')\n\n\t\t\tdocument.dir = t.editor.getParam('directionality','');\n\n\t\t\tif ((nv = t.editor.translate(h)) && nv != h)\n\t\t\t\tdocument.body.innerHTML = nv;\n\n\t\t\tif ((nv = t.editor.translate(ti)) && nv != ti)\n\t\t\t\tdocument.title = ti = nv;\n\t\t}\n\n\t\tif (!t.editor.getParam('browser_preferred_colors', false) || !t.isWindow)\n\t\t\tt.dom.addClass(document.body, 'forceColors');\n\n\t\tdocument.body.style.display = '';\n\n\t\t// Restore selection in IE when focus is placed on a non textarea or input element of the type text\n\t\tif (tinymce.isIE) {\n\t\t\tdocument.attachEvent('onmouseup', tinyMCEPopup._restoreSelection);\n\n\t\t\t// Add base target element for it since it would fail with modal dialogs\n\t\t\tt.dom.add(t.dom.select('head')[0], 'base', {target : '_self'});\n\t\t}\n\n\t\tt.restoreSelection();\n\t\tt.resizeToInnerSize();\n\n\t\t// Set inline title\n\t\tif (!t.isWindow)\n\t\t\tt.editor.windowManager.setTitle(window, ti);\n\t\telse\n\t\t\twindow.focus();\n\n\t\tif (!tinymce.isIE && !t.isWindow) {\n\t\t\ttinymce.dom.Event._add(document, 'focus', function() {\n\t\t\t\tt.editor.windowManager.focus(t.id);\n\t\t\t});\n\t\t}\n\n\t\t// Patch for accessibility\n\t\ttinymce.each(t.dom.select('select'), function(e) {\n\t\t\te.onkeydown = tinyMCEPopup._accessHandler;\n\t\t});\n\n\t\t// Call onInit\n\t\t// Init must be called before focus so the selection won't get lost by the focus call\n\t\ttinymce.each(t.listeners, function(o) {\n\t\t\to.func.call(o.scope, t.editor);\n\t\t});\n\n\t\t// Move focus to window\n\t\tif (t.getWindowArg('mce_auto_focus', true)) {\n\t\t\twindow.focus();\n\n\t\t\t// Focus element with mceFocus class\n\t\t\ttinymce.each(document.forms, function(f) {\n\t\t\t\ttinymce.each(f.elements, function(e) {\n\t\t\t\t\tif (t.dom.hasClass(e, 'mceFocus') && !e.disabled) {\n\t\t\t\t\t\te.focus();\n\t\t\t\t\t\treturn false; // Break loop\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tdocument.onkeyup = tinyMCEPopup._closeWinKeyHandler;\n\t},\n\n\t_accessHandler : function(e) {\n\t\te = e || window.event;\n\n\t\tif (e.keyCode == 13 || e.keyCode == 32) {\n\t\t\te = e.target || e.srcElement;\n\n\t\t\tif (e.onchange)\n\t\t\t\te.onchange();\n\n\t\t\treturn tinymce.dom.Event.cancel(e);\n\t\t}\n\t},\n\n\t_closeWinKeyHandler : function(e) {\n\t\te = e || window.event;\n\n\t\tif (e.keyCode == 27)\n\t\t\ttinyMCEPopup.close();\n\t},\n\n\t_wait : function() {\n\t\t// Use IE method\n\t\tif (document.attachEvent) {\n\t\t\tdocument.attachEvent(\"onreadystatechange\", function() {\n\t\t\t\tif (document.readyState === \"complete\") {\n\t\t\t\t\tdocument.detachEvent(\"onreadystatechange\", arguments.callee);\n\t\t\t\t\ttinyMCEPopup._onDOMLoaded();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (document.documentElement.doScroll && window == window.top) {\n\t\t\t\t(function() {\n\t\t\t\t\tif (tinyMCEPopup.domLoaded)\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// If IE is used, use the trick by Diego Perini licensed under MIT by request to the author.\n\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\t\t\t\t\tdocument.documentElement.doScroll(\"left\");\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\tsetTimeout(arguments.callee, 0);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\ttinyMCEPopup._onDOMLoaded();\n\t\t\t\t})();\n\t\t\t}\n\n\t\t\tdocument.attachEvent('onload', tinyMCEPopup._onDOMLoaded);\n\t\t} else if (document.addEventListener) {\n\t\t\twindow.addEventListener('DOMContentLoaded', tinyMCEPopup._onDOMLoaded, false);\n\t\t\twindow.addEventListener('load', tinyMCEPopup._onDOMLoaded, false);\n\t\t}\n\t}\n};\n\ntinyMCEPopup.init();\ntinyMCEPopup._wait(); // Wait for DOM Content Loaded\n","Magento_Tinymce3/tiny_mce/classes/Formatter.js":"/**\n * Formatter.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t/**\n\t * Text formatter engine class. This class is used to apply formats like bold, italic, font size\n\t * etc to the current selection or specific nodes. This engine was build to replace the browsers\n\t * default formatting logic for execCommand due to it's inconsistant and buggy behavior.\n\t *\n\t * @class tinymce.Formatter\n\t * @example\n\t *  tinymce.activeEditor.formatter.register('mycustomformat', {\n\t *    inline : 'span',\n\t *    styles : {color : '#ff0000'}\n\t *  });\n\t *\n\t *  tinymce.activeEditor.formatter.apply('mycustomformat');\n\t */\n\n\t/**\n\t * Constructs a new formatter instance.\n\t *\n\t * @constructor Formatter\n\t * @param {tinymce.Editor} ed Editor instance to construct the formatter engine to.\n\t */\n\ttinymce.Formatter = function(ed) {\n\t\tvar formats = {},\n\t\t\teach = tinymce.each,\n\t\t\tdom = ed.dom,\n\t\t\tselection = ed.selection,\n\t\t\tTreeWalker = tinymce.dom.TreeWalker,\n\t\t\trangeUtils = new tinymce.dom.RangeUtils(dom),\n\t\t\tisValid = ed.schema.isValidChild,\n\t\t\tisBlock = dom.isBlock,\n\t\t\tforcedRootBlock = ed.settings.forced_root_block,\n\t\t\tnodeIndex = dom.nodeIndex,\n\t\t\tINVISIBLE_CHAR = '\\uFEFF',\n\t\t\tMCE_ATTR_RE = /^(src|href|style)$/,\n\t\t\tFALSE = false,\n\t\t\tTRUE = true,\n\t\t\tundefined;\n\n\t\tfunction isArray(obj) {\n\t\t\treturn obj instanceof Array;\n\t\t};\n\n\t\tfunction getParents(node, selector) {\n\t\t\treturn dom.getParents(node, selector, dom.getRoot());\n\t\t};\n\n\t\tfunction isCaretNode(node) {\n\t\t\treturn node.nodeType === 1 && (node.face === 'mceinline' || node.style.fontFamily === 'mceinline');\n\t\t};\n\n\t\t// Public functions\n\n\t\t/**\n\t\t * Returns the format by name or all formats if no name is specified.\n\t\t *\n\t\t * @method get\n\t\t * @param {String} name Optional name to retrieve by.\n\t\t * @return {Array/Object} Array/Object with all registered formats or a specific format.\n\t\t */\n\t\tfunction get(name) {\n\t\t\treturn name ? formats[name] : formats;\n\t\t};\n\n\t\t/**\n\t\t * Registers a specific format by name.\n\t\t *\n\t\t * @method register\n\t\t * @param {Object/String} name Name of the format for example \"bold\".\n\t\t * @param {Object/Array} format Optional format object or array of format variants can only be omitted if the first arg is an object.\n\t\t */\n\t\tfunction register(name, format) {\n\t\t\tif (name) {\n\t\t\t\tif (typeof(name) !== 'string') {\n\t\t\t\t\teach(name, function(format, name) {\n\t\t\t\t\t\tregister(name, format);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t// Force format into array and add it to internal collection\n\t\t\t\t\tformat = format.length ? format : [format];\n\n\t\t\t\t\teach(format, function(format) {\n\t\t\t\t\t\t// Set deep to false by default on selector formats this to avoid removing\n\t\t\t\t\t\t// alignment on images inside paragraphs when alignment is changed on paragraphs\n\t\t\t\t\t\tif (format.deep === undefined)\n\t\t\t\t\t\t\tformat.deep = !format.selector;\n\n\t\t\t\t\t\t// Default to true\n\t\t\t\t\t\tif (format.split === undefined)\n\t\t\t\t\t\t\tformat.split = !format.selector || format.inline;\n\n\t\t\t\t\t\t// Default to true\n\t\t\t\t\t\tif (format.remove === undefined && format.selector && !format.inline)\n\t\t\t\t\t\t\tformat.remove = 'none';\n\n\t\t\t\t\t\t// Mark format as a mixed format inline + block level\n\t\t\t\t\t\tif (format.selector && format.inline) {\n\t\t\t\t\t\t\tformat.mixed = true;\n\t\t\t\t\t\t\tformat.block_expand = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Split classes if needed\n\t\t\t\t\t\tif (typeof(format.classes) === 'string')\n\t\t\t\t\t\t\tformat.classes = format.classes.split(/\\s+/);\n\t\t\t\t\t});\n\n\t\t\t\t\tformats[name] = format;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar getTextDecoration = function(node) {\n\t\t\tvar decoration;\n\n\t\t\ted.dom.getParent(node, function(n) {\n\t\t\t\tdecoration = ed.dom.getStyle(n, 'text-decoration');\n\t\t\t\treturn decoration && decoration !== 'none';\n\t\t\t});\n\n\t\t\treturn decoration;\n\t\t};\n\n\t\tvar processUnderlineAndColor = function(node) {\n\t\t\tvar textDecoration;\n\t\t\tif (node.nodeType === 1 && node.parentNode && node.parentNode.nodeType === 1) {\n\t\t\t\ttextDecoration = getTextDecoration(node.parentNode);\n\t\t\t\tif (ed.dom.getStyle(node, 'color') && textDecoration) {\n\t\t\t\t\ted.dom.setStyle(node, 'text-decoration', textDecoration);\n\t\t\t\t} else if (ed.dom.getStyle(node, 'textdecoration') === textDecoration) {\n\t\t\t\t\ted.dom.setStyle(node, 'text-decoration', null);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Applies the specified format to the current selection or specified node.\n\t\t *\n\t\t * @method apply\n\t\t * @param {String} name Name of format to apply.\n\t\t * @param {Object} vars Optional list of variables to replace within format before applying it.\n\t\t * @param {Node} node Optional node to apply the format to defaults to current selection.\n\t\t */\n\t\tfunction apply(name, vars, node) {\n\t\t\tvar formatList = get(name), format = formatList[0], bookmark, rng, i, isCollapsed = selection.isCollapsed();\n\n\t\t\t/**\n\t\t\t * Moves the start to the first suitable text node.\n\t\t\t */\n\t\t\tfunction moveStart(rng) {\n\t\t\t\tvar container = rng.startContainer,\n\t\t\t\t\toffset = rng.startOffset,\n\t\t\t\t\twalker, node;\n\n\t\t\t\t// Move startContainer/startOffset in to a suitable node\n\t\t\t\tif (container.nodeType == 1 || container.nodeValue === \"\") {\n\t\t\t\t\tcontainer = container.nodeType == 1 ? container.childNodes[offset] : container;\n\n\t\t\t\t\t// Might fail if the offset is behind the last element in it's container\n\t\t\t\t\tif (container) {\n\t\t\t\t\t\twalker = new TreeWalker(container, container.parentNode);\n\t\t\t\t\t\tfor (node = walker.current(); node; node = walker.next()) {\n\t\t\t\t\t\t\tif (node.nodeType == 3 && !isWhiteSpaceNode(node)) {\n\t\t\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t};\n\n\t\t\tfunction setElementFormat(elm, fmt) {\n\t\t\t\tfmt = fmt || format;\n\n\t\t\t\tif (elm) {\n\t\t\t\t\tif (fmt.onformat) {\n\t\t\t\t\t\tfmt.onformat(elm, fmt, vars, node);\n\t\t\t\t\t}\n\n\t\t\t\t\teach(fmt.styles, function(value, name) {\n\t\t\t\t\t\tdom.setStyle(elm, name, replaceVars(value, vars));\n\t\t\t\t\t});\n\n\t\t\t\t\teach(fmt.attributes, function(value, name) {\n\t\t\t\t\t\tdom.setAttrib(elm, name, replaceVars(value, vars));\n\t\t\t\t\t});\n\n\t\t\t\t\teach(fmt.classes, function(value) {\n\t\t\t\t\t\tvalue = replaceVars(value, vars);\n\n\t\t\t\t\t\tif (!dom.hasClass(elm, value))\n\t\t\t\t\t\t\tdom.addClass(elm, value);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\t\t\tfunction adjustSelectionToVisibleSelection() {\n\t\t\t\tfunction findSelectionEnd(start, end) {\n\t\t\t\t\tvar walker = new TreeWalker(end);\n\t\t\t\t\tfor (node = walker.current(); node; node = walker.prev()) {\n\t\t\t\t\t\tif (node.childNodes.length > 1 || node == start) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Adjust selection so that a end container with a end offset of zero is not included in the selection\n\t\t\t\t// as this isn't visible to the user.\n\t\t\t\tvar rng = ed.selection.getRng();\n\t\t\t\tvar start = rng.startContainer;\n\t\t\t\tvar end = rng.endContainer;\n\n\t\t\t\tif (start != end && rng.endOffset == 0) {\n\t\t\t\t\tvar newEnd = findSelectionEnd(start, end);\n\t\t\t\t\tvar endOffset = newEnd.nodeType == 3 ? newEnd.length : newEnd.childNodes.length;\n\n\t\t\t\t\trng.setEnd(newEnd, endOffset);\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\tfunction applyStyleToList(node, bookmark, wrapElm, newWrappers, process){\n\t\t\t\tvar nodes = [], listIndex = -1, list, startIndex = -1, endIndex = -1, currentWrapElm;\n\n\t\t\t\t// find the index of the first child list.\n\t\t\t\teach(node.childNodes, function(n, index) {\n\t\t\t\t\tif (n.nodeName === \"UL\" || n.nodeName === \"OL\") {\n\t\t\t\t\t\tlistIndex = index;\n\t\t\t\t\t\tlist = n;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// get the index of the bookmarks\n\t\t\t\teach(node.childNodes, function(n, index) {\n\t\t\t\t\tif (n.nodeName === \"SPAN\" && dom.getAttrib(n, \"data-mce-type\") == \"bookmark\") {\n\t\t\t\t\t\tif (n.id == bookmark.id + \"_start\") {\n\t\t\t\t\t\t\tstartIndex = index;\n\t\t\t\t\t\t} else if (n.id == bookmark.id + \"_end\") {\n\t\t\t\t\t\t\tendIndex = index;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// if the selection spans across an embedded list, or there isn't an embedded list - handle processing normally\n\t\t\t\tif (listIndex <= 0 || (startIndex < listIndex && endIndex > listIndex)) {\n\t\t\t\t\teach(tinymce.grep(node.childNodes), process);\n\t\t\t\t\treturn 0;\n\t\t\t\t} else {\n\t\t\t\t\tcurrentWrapElm = wrapElm.cloneNode(FALSE);\n\n\t\t\t\t\t// create a list of the nodes on the same side of the list as the selection\n\t\t\t\t\teach(tinymce.grep(node.childNodes), function(n, index) {\n\t\t\t\t\t\tif ((startIndex < listIndex && index < listIndex) || (startIndex > listIndex && index > listIndex)) {\n\t\t\t\t\t\t\tnodes.push(n);\n\t\t\t\t\t\t\tn.parentNode.removeChild(n);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// insert the wrapping element either before or after the list.\n\t\t\t\t\tif (startIndex < listIndex) {\n\t\t\t\t\t\tnode.insertBefore(currentWrapElm, list);\n\t\t\t\t\t} else if (startIndex > listIndex) {\n\t\t\t\t\t\tnode.insertBefore(currentWrapElm, list.nextSibling);\n\t\t\t\t\t}\n\n\t\t\t\t\t// add the new nodes to the list.\n\t\t\t\t\tnewWrappers.push(currentWrapElm);\n\n\t\t\t\t\teach(nodes, function(node) {\n\t\t\t\t\t\tcurrentWrapElm.appendChild(node);\n\t\t\t\t\t});\n\n\t\t\t\t\treturn currentWrapElm;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfunction applyRngStyle(rng, bookmark, node_specific) {\n\t\t\t\tvar newWrappers = [], wrapName, wrapElm;\n\n\t\t\t\t// Setup wrapper element\n\t\t\t\twrapName = format.inline || format.block;\n\t\t\t\twrapElm = dom.create(wrapName);\n\t\t\t\tsetElementFormat(wrapElm);\n\n\t\t\t\trangeUtils.walk(rng, function(nodes) {\n\t\t\t\t\tvar currentWrapElm;\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Process a list of nodes wrap them.\n\t\t\t\t\t */\n\t\t\t\t\tfunction process(node) {\n\t\t\t\t\t\tvar nodeName = node.nodeName.toLowerCase(), parentName = node.parentNode.nodeName.toLowerCase(), found;\n\n\t\t\t\t\t\t// Stop wrapping on br elements\n\t\t\t\t\t\tif (isEq(nodeName, 'br')) {\n\t\t\t\t\t\t\tcurrentWrapElm = 0;\n\n\t\t\t\t\t\t\t// Remove any br elements when we wrap things\n\t\t\t\t\t\t\tif (format.block)\n\t\t\t\t\t\t\t\tdom.remove(node);\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If node is wrapper type\n\t\t\t\t\t\tif (format.wrapper && matchNode(node, name, vars)) {\n\t\t\t\t\t\t\tcurrentWrapElm = 0;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Can we rename the block\n\t\t\t\t\t\tif (format.block && !format.wrapper && isTextBlock(nodeName)) {\n\t\t\t\t\t\t\tnode = dom.rename(node, wrapName);\n\t\t\t\t\t\t\tsetElementFormat(node);\n\t\t\t\t\t\t\tnewWrappers.push(node);\n\t\t\t\t\t\t\tcurrentWrapElm = 0;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Handle selector patterns\n\t\t\t\t\t\tif (format.selector) {\n\t\t\t\t\t\t\t// Look for matching formats\n\t\t\t\t\t\t\teach(formatList, function(format) {\n\t\t\t\t\t\t\t\t// Check collapsed state if it exists\n\t\t\t\t\t\t\t\tif ('collapsed' in format && format.collapsed !== isCollapsed) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (dom.is(node, format.selector) && !isCaretNode(node)) {\n\t\t\t\t\t\t\t\t\tsetElementFormat(node, format);\n\t\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// Continue processing if a selector match wasn't found and a inline element is defined\n\t\t\t\t\t\t\tif (!format.inline || found) {\n\t\t\t\t\t\t\t\tcurrentWrapElm = 0;\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Is it valid to wrap this item\n\t\t\t\t\t\tif (isValid(wrapName, nodeName) && isValid(parentName, wrapName) &&\n\t\t\t\t\t\t\t\t!(!node_specific && node.nodeType === 3 && node.nodeValue.length === 1 && node.nodeValue.charCodeAt(0) === 65279) && node.id !== '_mce_caret') {\n\t\t\t\t\t\t\t// Start wrapping\n\t\t\t\t\t\t\tif (!currentWrapElm) {\n\t\t\t\t\t\t\t\t// Wrap the node\n\t\t\t\t\t\t\t\tcurrentWrapElm = wrapElm.cloneNode(FALSE);\n\t\t\t\t\t\t\t\tnode.parentNode.insertBefore(currentWrapElm, node);\n\t\t\t\t\t\t\t\tnewWrappers.push(currentWrapElm);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcurrentWrapElm.appendChild(node);\n\t\t\t\t\t\t} else if (nodeName == 'li' && bookmark) {\n\t\t\t\t\t\t\t// Start wrapping - if we are in a list node and have a bookmark, then we will always begin by wrapping in a new element.\n\t\t\t\t\t\t\tcurrentWrapElm = applyStyleToList(node, bookmark, wrapElm, newWrappers, process);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Start a new wrapper for possible children\n\t\t\t\t\t\t\tcurrentWrapElm = 0;\n\n\t\t\t\t\t\t\teach(tinymce.grep(node.childNodes), process);\n\n\t\t\t\t\t\t\t// End the last wrapper\n\t\t\t\t\t\t\tcurrentWrapElm = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\t// Process siblings from range\n\t\t\t\t\teach(nodes, process);\n\t\t\t\t});\n\n\t\t\t\t// Wrap links inside as well, for example color inside a link when the wrapper is around the link\n\t\t\t\tif (format.wrap_links === false) {\n\t\t\t\t\teach(newWrappers, function(node) {\n\t\t\t\t\t\tfunction process(node) {\n\t\t\t\t\t\t\tvar i, currentWrapElm, children;\n\n\t\t\t\t\t\t\tif (node.nodeName === 'A') {\n\t\t\t\t\t\t\t\tcurrentWrapElm = wrapElm.cloneNode(FALSE);\n\t\t\t\t\t\t\t\tnewWrappers.push(currentWrapElm);\n\n\t\t\t\t\t\t\t\tchildren = tinymce.grep(node.childNodes);\n\t\t\t\t\t\t\t\tfor (i = 0; i < children.length; i++)\n\t\t\t\t\t\t\t\t\tcurrentWrapElm.appendChild(children[i]);\n\n\t\t\t\t\t\t\t\tnode.appendChild(currentWrapElm);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\teach(tinymce.grep(node.childNodes), process);\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tprocess(node);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Cleanup\n\t\t\t\teach(newWrappers, function(node) {\n\t\t\t\t\tvar childCount;\n\n\t\t\t\t\tfunction getChildCount(node) {\n\t\t\t\t\t\tvar count = 0;\n\n\t\t\t\t\t\teach(node.childNodes, function(node) {\n\t\t\t\t\t\t\tif (!isWhiteSpaceNode(node) && !isBookmarkNode(node))\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn count;\n\t\t\t\t\t};\n\n\t\t\t\t\tfunction mergeStyles(node) {\n\t\t\t\t\t\tvar child, clone;\n\n\t\t\t\t\t\teach(node.childNodes, function(node) {\n\t\t\t\t\t\t\tif (node.nodeType == 1 && !isBookmarkNode(node) && !isCaretNode(node)) {\n\t\t\t\t\t\t\t\tchild = node;\n\t\t\t\t\t\t\t\treturn FALSE; // break loop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// If child was found and of the same type as the current node\n\t\t\t\t\t\tif (child && matchName(child, format)) {\n\t\t\t\t\t\t\tclone = child.cloneNode(FALSE);\n\t\t\t\t\t\t\tsetElementFormat(clone);\n\n\t\t\t\t\t\t\tdom.replace(clone, node, TRUE);\n\t\t\t\t\t\t\tdom.remove(child, 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn clone || node;\n\t\t\t\t\t};\n\n\t\t\t\t\tchildCount = getChildCount(node);\n\n\t\t\t\t\t// Remove empty nodes but only if there is multiple wrappers and they are not block\n\t\t\t\t\t// elements so never remove single <h1></h1> since that would remove the current empty block element where the caret is at\n\t\t\t\t\tif ((newWrappers.length > 1 || !isBlock(node)) && childCount === 0) {\n\t\t\t\t\t\tdom.remove(node, 1);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (format.inline || format.wrapper) {\n\t\t\t\t\t\t// Merges the current node with it's children of similar type to reduce the number of elements\n\t\t\t\t\t\tif (!format.exact && childCount === 1)\n\t\t\t\t\t\t\tnode = mergeStyles(node);\n\n\t\t\t\t\t\t// Remove/merge children\n\t\t\t\t\t\teach(formatList, function(format) {\n\t\t\t\t\t\t\t// Merge all children of similar type will move styles from child to parent\n\t\t\t\t\t\t\t// this: <span style=\"color:red\"><b><span style=\"color:red; font-size:10px\">text</span></b></span>\n\t\t\t\t\t\t\t// will become: <span style=\"color:red\"><b><span style=\"font-size:10px\">text</span></b></span>\n\t\t\t\t\t\t\teach(dom.select(format.inline, node), function(child) {\n\t\t\t\t\t\t\t\tvar parent;\n\n\t\t\t\t\t\t\t\t// When wrap_links is set to false we don't want\n\t\t\t\t\t\t\t\t// to remove the format on children within links\n\t\t\t\t\t\t\t\tif (format.wrap_links === false) {\n\t\t\t\t\t\t\t\t\tparent = child.parentNode;\n\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tif (parent.nodeName === 'A')\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t} while (parent = parent.parentNode);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tremoveFormat(format, vars, child, format.exact ? child : null);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// Remove child if direct parent is of same type\n\t\t\t\t\t\tif (matchNode(node.parentNode, name, vars)) {\n\t\t\t\t\t\t\tdom.remove(node, 1);\n\t\t\t\t\t\t\tnode = 0;\n\t\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for parent with similar style format\n\t\t\t\t\t\tif (format.merge_with_parents) {\n\t\t\t\t\t\t\tdom.getParent(node.parentNode, function(parent) {\n\t\t\t\t\t\t\t\tif (matchNode(parent, name, vars)) {\n\t\t\t\t\t\t\t\t\tdom.remove(node, 1);\n\t\t\t\t\t\t\t\t\tnode = 0;\n\t\t\t\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Merge next and previous siblings if they are similar <b>text</b><b>text</b> becomes <b>texttext</b>\n\t\t\t\t\t\tif (node && format.merge_siblings !== false) {\n\t\t\t\t\t\t\tnode = mergeSiblings(getNonWhiteSpaceSibling(node), node);\n\t\t\t\t\t\t\tnode = mergeSiblings(node, getNonWhiteSpaceSibling(node, TRUE));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tif (format) {\n\t\t\t\tif (node) {\n\t\t\t\t\tif (node.nodeType) {\n\t\t\t\t\t\trng = dom.createRng();\n\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\trng.setEndAfter(node);\n\t\t\t\t\t\tapplyRngStyle(expandRng(rng, formatList), null, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyRngStyle(node, null, true);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!isCollapsed || !format.inline || dom.select('td.mceSelected,th.mceSelected').length) {\n\t\t\t\t\t\t// Obtain selection node before selection is unselected by applyRngStyle()\n\t\t\t\t\t\tvar curSelNode = ed.selection.getNode();\n\n\t\t\t\t\t\t// Apply formatting to selection\n\t\t\t\t\t\ted.selection.setRng(adjustSelectionToVisibleSelection());\n\t\t\t\t\t\tbookmark = selection.getBookmark();\n\t\t\t\t\t\tapplyRngStyle(expandRng(selection.getRng(TRUE), formatList), bookmark);\n\n\t\t\t\t\t\t// Colored nodes should be underlined so that the color of the underline matches the text color.\n\t\t\t\t\t\tif (format.styles && (format.styles.color || format.styles.textDecoration)) {\n\t\t\t\t\t\t\ttinymce.walk(curSelNode, processUnderlineAndColor, 'childNodes');\n\t\t\t\t\t\t\tprocessUnderlineAndColor(curSelNode);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tselection.moveToBookmark(bookmark);\n\t\t\t\t\t\tselection.setRng(moveStart(selection.getRng(TRUE)));\n\t\t\t\t\t\ted.nodeChanged();\n\t\t\t\t\t} else\n\t\t\t\t\t\tperformCaretAction('apply', name, vars);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Removes the specified format from the current selection or specified node.\n\t\t *\n\t\t * @method remove\n\t\t * @param {String} name Name of format to remove.\n\t\t * @param {Object} vars Optional list of variables to replace within format before removing it.\n\t\t * @param {Node/Range} node Optional node or DOM range to remove the format from defaults to current selection.\n\t\t */\n\t\tfunction remove(name, vars, node) {\n\t\t\tvar formatList = get(name), format = formatList[0], bookmark, i, rng;\n\t\t\t/**\n\t\t\t * Moves the start to the first suitable text node.\n\t\t\t */\n\t\t\tfunction moveStart(rng) {\n\t\t\t\tvar container = rng.startContainer,\n\t\t\t\t\toffset = rng.startOffset,\n\t\t\t\t\twalker, node, nodes, tmpNode;\n\n\t\t\t\t// Convert text node into index if possible\n\t\t\t\tif (container.nodeType == 3 && offset >= container.nodeValue.length - 1) {\n\t\t\t\t\tcontainer = container.parentNode;\n\t\t\t\t\toffset = nodeIndex(container) + 1;\n\t\t\t\t}\n\n\t\t\t\t// Move startContainer/startOffset in to a suitable node\n\t\t\t\tif (container.nodeType == 1) {\n\t\t\t\t\tnodes = container.childNodes;\n\t\t\t\t\tcontainer = nodes[Math.min(offset, nodes.length - 1)];\n\t\t\t\t\twalker = new TreeWalker(container);\n\n\t\t\t\t\t// If offset is at end of the parent node walk to the next one\n\t\t\t\t\tif (offset > nodes.length - 1)\n\t\t\t\t\t\twalker.next();\n\n\t\t\t\t\tfor (node = walker.current(); node; node = walker.next()) {\n\t\t\t\t\t\tif (node.nodeType == 3 && !isWhiteSpaceNode(node)) {\n\t\t\t\t\t\t\t// IE has a \"neat\" feature where it moves the start node into the closest element\n\t\t\t\t\t\t\t// we can avoid this by inserting an element before it and then remove it after we set the selection\n\t\t\t\t\t\t\ttmpNode = dom.create('a', null, INVISIBLE_CHAR);\n\t\t\t\t\t\t\tnode.parentNode.insertBefore(tmpNode, node);\n\n\t\t\t\t\t\t\t// Set selection and remove tmpNode\n\t\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t\t\tdom.remove(tmpNode);\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Merges the styles for each node\n\t\t\tfunction process(node) {\n\t\t\t\tvar children, i, l;\n\n\t\t\t\t// Grab the children first since the nodelist might be changed\n\t\t\t\tchildren = tinymce.grep(node.childNodes);\n\n\t\t\t\t// Process current node\n\t\t\t\tfor (i = 0, l = formatList.length; i < l; i++) {\n\t\t\t\t\tif (removeFormat(formatList[i], vars, node, node))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Process the children\n\t\t\t\tif (format.deep) {\n\t\t\t\t\tfor (i = 0, l = children.length; i < l; i++)\n\t\t\t\t\t\tprocess(children[i]);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfunction findFormatRoot(container) {\n\t\t\t\tvar formatRoot;\n\n\t\t\t\t// Find format root\n\t\t\t\teach(getParents(container.parentNode).reverse(), function(parent) {\n\t\t\t\t\tvar format;\n\n\t\t\t\t\t// Find format root element\n\t\t\t\t\tif (!formatRoot && parent.id != '_start' && parent.id != '_end') {\n\t\t\t\t\t\t// Is the node matching the format we are looking for\n\t\t\t\t\t\tformat = matchNode(parent, name, vars);\n\t\t\t\t\t\tif (format && format.split !== false)\n\t\t\t\t\t\t\tformatRoot = parent;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn formatRoot;\n\t\t\t};\n\n\t\t\tfunction wrapAndSplit(format_root, container, target, split) {\n\t\t\t\tvar parent, clone, lastClone, firstClone, i, formatRootParent;\n\n\t\t\t\t// Format root found then clone formats and split it\n\t\t\t\tif (format_root) {\n\t\t\t\t\tformatRootParent = format_root.parentNode;\n\n\t\t\t\t\tfor (parent = container.parentNode; parent && parent != formatRootParent; parent = parent.parentNode) {\n\t\t\t\t\t\tclone = parent.cloneNode(FALSE);\n\n\t\t\t\t\t\tfor (i = 0; i < formatList.length; i++) {\n\t\t\t\t\t\t\tif (removeFormat(formatList[i], vars, clone, clone)) {\n\t\t\t\t\t\t\t\tclone = 0;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Build wrapper node\n\t\t\t\t\t\tif (clone) {\n\t\t\t\t\t\t\tif (lastClone)\n\t\t\t\t\t\t\t\tclone.appendChild(lastClone);\n\n\t\t\t\t\t\t\tif (!firstClone)\n\t\t\t\t\t\t\t\tfirstClone = clone;\n\n\t\t\t\t\t\t\tlastClone = clone;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never split block elements if the format is mixed\n\t\t\t\t\tif (split && (!format.mixed || !isBlock(format_root)))\n\t\t\t\t\t\tcontainer = dom.split(format_root, container);\n\n\t\t\t\t\t// Wrap container in cloned formats\n\t\t\t\t\tif (lastClone) {\n\t\t\t\t\t\ttarget.parentNode.insertBefore(lastClone, target);\n\t\t\t\t\t\tfirstClone.appendChild(target);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn container;\n\t\t\t};\n\n\t\t\tfunction splitToFormatRoot(container) {\n\t\t\t\treturn wrapAndSplit(findFormatRoot(container), container, container, true);\n\t\t\t};\n\n\t\t\tfunction unwrap(start) {\n\t\t\t\tvar node = dom.get(start ? '_start' : '_end'),\n\t\t\t\t\tout = node[start ? 'firstChild' : 'lastChild'];\n\n\t\t\t\t// If the end is placed within the start the result will be removed\n\t\t\t\t// So this checks if the out node is a bookmark node if it is it\n\t\t\t\t// checks for another more suitable node\n\t\t\t\tif (isBookmarkNode(out))\n\t\t\t\t\tout = out[start ? 'firstChild' : 'lastChild'];\n\n\t\t\t\tdom.remove(node, true);\n\n\t\t\t\treturn out;\n\t\t\t};\n\n\t\t\tfunction removeRngStyle(rng) {\n\t\t\t\tvar startContainer, endContainer;\n\n\t\t\t\trng = expandRng(rng, formatList, TRUE);\n\n\t\t\t\tif (format.split) {\n\t\t\t\t\tstartContainer = getContainer(rng, TRUE);\n\t\t\t\t\tendContainer = getContainer(rng);\n\n\t\t\t\t\tif (startContainer != endContainer) {\n\t\t\t\t\t\t// Wrap start/end nodes in span element since these might be cloned/moved\n\t\t\t\t\t\tstartContainer = wrap(startContainer, 'span', {id : '_start', 'data-mce-type' : 'bookmark'});\n\t\t\t\t\t\tendContainer = wrap(endContainer, 'span', {id : '_end', 'data-mce-type' : 'bookmark'});\n\n\t\t\t\t\t\t// Split start/end\n\t\t\t\t\t\tsplitToFormatRoot(startContainer);\n\t\t\t\t\t\tsplitToFormatRoot(endContainer);\n\n\t\t\t\t\t\t// Unwrap start/end to get real elements again\n\t\t\t\t\t\tstartContainer = unwrap(TRUE);\n\t\t\t\t\t\tendContainer = unwrap();\n\t\t\t\t\t} else\n\t\t\t\t\t\tstartContainer = endContainer = splitToFormatRoot(startContainer);\n\n\t\t\t\t\t// Update range positions since they might have changed after the split operations\n\t\t\t\t\trng.startContainer = startContainer.parentNode;\n\t\t\t\t\trng.startOffset = nodeIndex(startContainer);\n\t\t\t\t\trng.endContainer = endContainer.parentNode;\n\t\t\t\t\trng.endOffset = nodeIndex(endContainer) + 1;\n\t\t\t\t}\n\n\t\t\t\t// Remove items between start/end\n\t\t\t\trangeUtils.walk(rng, function(nodes) {\n\t\t\t\t\teach(nodes, function(node) {\n\t\t\t\t\t\tprocess(node);\n\n\t\t\t\t\t\t// Remove parent span if it only contains text-decoration: underline, yet a parent node is also underlined.\n\t\t\t\t\t\tif (node.nodeType === 1 && ed.dom.getStyle(node, 'text-decoration') === 'underline' && node.parentNode && getTextDecoration(node.parentNode) === 'underline') {\n\t\t\t\t\t\t\tremoveFormat({'deep': false, 'exact': true, 'inline': 'span', 'styles': {'textDecoration' : 'underline'}}, null, node);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t};\n\n\t\t\t// Handle node\n\t\t\tif (node) {\n\t\t\t\tif (node.nodeType) {\n\t\t\t\t\trng = dom.createRng();\n\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\trng.setEndAfter(node);\n\t\t\t\t\tremoveRngStyle(rng);\n\t\t\t\t} else {\n\t\t\t\t\tremoveRngStyle(node);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!selection.isCollapsed() || !format.inline || dom.select('td.mceSelected,th.mceSelected').length) {\n\t\t\t\tbookmark = selection.getBookmark();\n\t\t\t\tremoveRngStyle(selection.getRng(TRUE));\n\t\t\t\tselection.moveToBookmark(bookmark);\n\n\t\t\t\t// Check if start element still has formatting then we are at: \"<b>text|</b>text\" and need to move the start into the next text node\n\t\t\t\tif (format.inline && match(name, vars, selection.getStart())) {\n\t\t\t\t\tmoveStart(selection.getRng(true));\n\t\t\t\t}\n\n\t\t\t\ted.nodeChanged();\n\t\t\t} else\n\t\t\t\tperformCaretAction('remove', name, vars);\n\n\t\t\t// When you remove formatting from a table cell in WebKit (cell, not the contents of a cell) there is a rendering issue with column width\n\t\t\tif (tinymce.isWebKit) {\n\t\t\t\ted.execCommand('mceCleanup');\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Toggles the specified format on/off.\n\t\t *\n\t\t * @method toggle\n\t\t * @param {String} name Name of format to apply/remove.\n\t\t * @param {Object} vars Optional list of variables to replace within format before applying/removing it.\n\t\t * @param {Node} node Optional node to apply the format to or remove from. Defaults to current selection.\n\t\t */\n\t\tfunction toggle(name, vars, node) {\n\t\t\tvar fmt = get(name);\n\n\t\t\tif (match(name, vars, node) && (!('toggle' in fmt[0]) || fmt[0]['toggle']))\n\t\t\t\tremove(name, vars, node);\n\t\t\telse\n\t\t\t\tapply(name, vars, node);\n\t\t};\n\n\t\t/**\n\t\t * Return true/false if the specified node has the specified format.\n\t\t *\n\t\t * @method matchNode\n\t\t * @param {Node} node Node to check the format on.\n\t\t * @param {String} name Format name to check.\n\t\t * @param {Object} vars Optional list of variables to replace before checking it.\n\t\t * @param {Boolean} similar Match format that has similar properties.\n\t\t * @return {Object} Returns the format object it matches or undefined if it doesn't match.\n\t\t */\n\t\tfunction matchNode(node, name, vars, similar) {\n\t\t\tvar formatList = get(name), format, i, classes;\n\n\t\t\tfunction matchItems(node, format, item_name) {\n\t\t\t\tvar key, value, items = format[item_name], i;\n\n\t\t\t\t// Custom match\n\t\t\t\tif (format.onmatch) {\n\t\t\t\t\treturn format.onmatch(node, format, item_name);\n\t\t\t\t}\n\n\t\t\t\t// Check all items\n\t\t\t\tif (items) {\n\t\t\t\t\t// Non indexed object\n\t\t\t\t\tif (items.length === undefined) {\n\t\t\t\t\t\tfor (key in items) {\n\t\t\t\t\t\t\tif (items.hasOwnProperty(key)) {\n\t\t\t\t\t\t\t\tif (item_name === 'attributes')\n\t\t\t\t\t\t\t\t\tvalue = dom.getAttrib(node, key);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tvalue = getStyle(node, key);\n\n\t\t\t\t\t\t\t\tif (similar && !value && !format.exact)\n\t\t\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t\t\tif ((!similar || format.exact) && !isEq(value, replaceVars(items[key], vars)))\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Only one match needed for indexed arrays\n\t\t\t\t\t\tfor (i = 0; i < items.length; i++) {\n\t\t\t\t\t\t\tif (item_name === 'attributes' ? dom.getAttrib(node, items[i]) : getStyle(node, items[i]))\n\t\t\t\t\t\t\t\treturn format;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn format;\n\t\t\t};\n\n\t\t\tif (formatList && node) {\n\t\t\t\t// Check each format in list\n\t\t\t\tfor (i = 0; i < formatList.length; i++) {\n\t\t\t\t\tformat = formatList[i];\n\n\t\t\t\t\t// Name name, attributes, styles and classes\n\t\t\t\t\tif (matchName(node, format) && matchItems(node, format, 'attributes') && matchItems(node, format, 'styles')) {\n\t\t\t\t\t\t// Match classes\n\t\t\t\t\t\tif (classes = format.classes) {\n\t\t\t\t\t\t\tfor (i = 0; i < classes.length; i++) {\n\t\t\t\t\t\t\t\tif (!dom.hasClass(node, classes[i]))\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn format;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Matches the current selection or specified node against the specified format name.\n\t\t *\n\t\t * @method match\n\t\t * @param {String} name Name of format to match.\n\t\t * @param {Object} vars Optional list of variables to replace before checking it.\n\t\t * @param {Node} node Optional node to check.\n\t\t * @return {boolean} true/false if the specified selection/node matches the format.\n\t\t */\n\t\tfunction match(name, vars, node) {\n\t\t\tvar startNode;\n\n\t\t\tfunction matchParents(node) {\n\t\t\t\t// Find first node with similar format settings\n\t\t\t\tnode = dom.getParent(node, function(node) {\n\t\t\t\t\treturn !!matchNode(node, name, vars, true);\n\t\t\t\t});\n\n\t\t\t\t// Do an exact check on the similar format element\n\t\t\t\treturn matchNode(node, name, vars);\n\t\t\t};\n\n\t\t\t// Check specified node\n\t\t\tif (node)\n\t\t\t\treturn matchParents(node);\n\n\t\t\t// Check selected node\n\t\t\tnode = selection.getNode();\n\t\t\tif (matchParents(node))\n\t\t\t\treturn TRUE;\n\n\t\t\t// Check start node if it's different\n\t\t\tstartNode = selection.getStart();\n\t\t\tif (startNode != node) {\n\t\t\t\tif (matchParents(startNode))\n\t\t\t\t\treturn TRUE;\n\t\t\t}\n\n\t\t\treturn FALSE;\n\t\t};\n\n\t\t/**\n\t\t * Matches the current selection against the array of formats and returns a new array with matching formats.\n\t\t *\n\t\t * @method matchAll\n\t\t * @param {Array} names Name of format to match.\n\t\t * @param {Object} vars Optional list of variables to replace before checking it.\n\t\t * @return {Array} Array with matched formats.\n\t\t */\n\t\tfunction matchAll(names, vars) {\n\t\t\tvar startElement, matchedFormatNames = [], checkedMap = {}, i, ni, name;\n\n\t\t\t// Check start of selection for formats\n\t\t\tstartElement = selection.getStart();\n\t\t\tdom.getParent(startElement, function(node) {\n\t\t\t\tvar i, name;\n\n\t\t\t\tfor (i = 0; i < names.length; i++) {\n\t\t\t\t\tname = names[i];\n\n\t\t\t\t\tif (!checkedMap[name] && matchNode(node, name, vars)) {\n\t\t\t\t\t\tcheckedMap[name] = true;\n\t\t\t\t\t\tmatchedFormatNames.push(name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn matchedFormatNames;\n\t\t};\n\n\t\t/**\n\t\t * Returns true/false if the specified format can be applied to the current selection or not. It will currently only check the state for selector formats, it returns true on all other format types.\n\t\t *\n\t\t * @method canApply\n\t\t * @param {String} name Name of format to check.\n\t\t * @return {boolean} true/false if the specified format can be applied to the current selection/node.\n\t\t */\n\t\tfunction canApply(name) {\n\t\t\tvar formatList = get(name), startNode, parents, i, x, selector;\n\n\t\t\tif (formatList) {\n\t\t\t\tstartNode = selection.getStart();\n\t\t\t\tparents = getParents(startNode);\n\n\t\t\t\tfor (x = formatList.length - 1; x >= 0; x--) {\n\t\t\t\t\tselector = formatList[x].selector;\n\n\t\t\t\t\t// Format is not selector based, then always return TRUE\n\t\t\t\t\tif (!selector)\n\t\t\t\t\t\treturn TRUE;\n\n\t\t\t\t\tfor (i = parents.length - 1; i >= 0; i--) {\n\t\t\t\t\t\tif (dom.is(parents[i], selector))\n\t\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn FALSE;\n\t\t};\n\n\t\t// Expose to public\n\t\ttinymce.extend(this, {\n\t\t\tget : get,\n\t\t\tregister : register,\n\t\t\tapply : apply,\n\t\t\tremove : remove,\n\t\t\ttoggle : toggle,\n\t\t\tmatch : match,\n\t\t\tmatchAll : matchAll,\n\t\t\tmatchNode : matchNode,\n\t\t\tcanApply : canApply\n\t\t});\n\n\t\t// Private functions\n\n\t\t/**\n\t\t * Checks if the specified nodes name matches the format inline/block or selector.\n\t\t *\n\t\t * @private\n\t\t * @param {Node} node Node to match against the specified format.\n\t\t * @param {Object} format Format object o match with.\n\t\t * @return {boolean} true/false if the format matches.\n\t\t */\n\t\tfunction matchName(node, format) {\n\t\t\t// Check for inline match\n\t\t\tif (isEq(node, format.inline))\n\t\t\t\treturn TRUE;\n\n\t\t\t// Check for block match\n\t\t\tif (isEq(node, format.block))\n\t\t\t\treturn TRUE;\n\n\t\t\t// Check for selector match\n\t\t\tif (format.selector)\n\t\t\t\treturn dom.is(node, format.selector);\n\t\t};\n\n\t\t/**\n\t\t * Compares two string/nodes regardless of their case.\n\t\t *\n\t\t * @private\n\t\t * @param {String/Node} Node or string to compare.\n\t\t * @param {String/Node} Node or string to compare.\n\t\t * @return {boolean} True/false if they match.\n\t\t */\n\t\tfunction isEq(str1, str2) {\n\t\t\tstr1 = str1 || '';\n\t\t\tstr2 = str2 || '';\n\n\t\t\tstr1 = '' + (str1.nodeName || str1);\n\t\t\tstr2 = '' + (str2.nodeName || str2);\n\n\t\t\treturn str1.toLowerCase() == str2.toLowerCase();\n\t\t};\n\n\t\t/**\n\t\t * Returns the style by name on the specified node. This method modifies the style\n\t\t * contents to make it more easy to match. This will resolve a few browser issues.\n\t\t *\n\t\t * @private\n\t\t * @param {Node} node to get style from.\n\t\t * @param {String} name Style name to get.\n\t\t * @return {String} Style item value.\n\t\t */\n\t\tfunction getStyle(node, name) {\n\t\t\tvar styleVal = dom.getStyle(node, name);\n\n\t\t\t// Force the format to hex\n\t\t\tif (name == 'color' || name == 'backgroundColor')\n\t\t\t\tstyleVal = dom.toHex(styleVal);\n\n\t\t\t// Opera will return bold as 700\n\t\t\tif (name == 'fontWeight' && styleVal == 700)\n\t\t\t\tstyleVal = 'bold';\n\n\t\t\treturn '' + styleVal;\n\t\t};\n\n\t\t/**\n\t\t * Replaces variables in the value. The variable format is %var.\n\t\t *\n\t\t * @private\n\t\t * @param {String} value Value to replace variables in.\n\t\t * @param {Object} vars Name/value array with variables to replace.\n\t\t * @return {String} New value with replaced variables.\n\t\t */\n\t\tfunction replaceVars(value, vars) {\n\t\t\tif (typeof(value) != \"string\")\n\t\t\t\tvalue = value(vars);\n\t\t\telse if (vars) {\n\t\t\t\tvalue = value.replace(/%(\\w+)/g, function(str, name) {\n\t\t\t\t\treturn vars[name] || str;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn value;\n\t\t};\n\n\t\tfunction isWhiteSpaceNode(node) {\n\t\t\treturn node && node.nodeType === 3 && /^([\\t \\r\\n]+|)$/.test(node.nodeValue);\n\t\t};\n\n\t\tfunction wrap(node, name, attrs) {\n\t\t\tvar wrapper = dom.create(name, attrs);\n\n\t\t\tnode.parentNode.insertBefore(wrapper, node);\n\t\t\twrapper.appendChild(node);\n\n\t\t\treturn wrapper;\n\t\t};\n\n\t\t/**\n\t\t * Expands the specified range like object to depending on format.\n\t\t *\n\t\t * For example on block formats it will move the start/end position\n\t\t * to the beginning of the current block.\n\t\t *\n\t\t * @private\n\t\t * @param {Object} rng Range like object.\n\t\t * @param {Array} formats Array with formats to expand by.\n\t\t * @return {Object} Expanded range like object.\n\t\t */\n\t\tfunction expandRng(rng, format, remove) {\n\t\t\tvar startContainer = rng.startContainer,\n\t\t\t\tstartOffset = rng.startOffset,\n\t\t\t\tendContainer = rng.endContainer,\n\t\t\t\tendOffset = rng.endOffset, sibling, lastIdx, leaf, endPoint;\n\n\t\t\t// This function walks up the tree if there is no siblings before/after the node\n\t\t\tfunction findParentContainer(start) {\n\t\t\t\tvar container, parent, child, sibling, siblingName;\n\n\t\t\t\tcontainer = parent = start ? startContainer : endContainer;\n\t\t\t\tsiblingName = start ? 'previousSibling' : 'nextSibling';\n\t\t\t\troot = dom.getRoot();\n\n\t\t\t\t// If it's a text node and the offset is inside the text\n\t\t\t\tif (container.nodeType == 3 && !isWhiteSpaceNode(container)) {\n\t\t\t\t\tif (start ? startOffset > 0 : endOffset < container.nodeValue.length) {\n\t\t\t\t\t\treturn container;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (;;) {\n\t\t\t\t\t// Stop expanding on block elements or root depending on format\n\t\t\t\t\tif (parent == root || (!format[0].block_expand && isBlock(parent)))\n\t\t\t\t\t\treturn parent;\n\n\t\t\t\t\t// Walk left/right\n\t\t\t\t\tfor (sibling = parent[siblingName]; sibling; sibling = sibling[siblingName]) {\n\t\t\t\t\t\tif (!isBookmarkNode(sibling) && !isWhiteSpaceNode(sibling)) {\n\t\t\t\t\t\t\treturn parent;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check if we can move up are we at root level or body level\n\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t}\n\n\t\t\t\treturn container;\n\t\t\t};\n\n\t\t\t// This function walks down the tree to find the leaf at the selection.\n\t\t\t// The offset is also returned as if node initially a leaf, the offset may be in the middle of the text node.\n\t\t\tfunction findLeaf(node, offset) {\n\t\t\t\tif (offset === undefined)\n\t\t\t\t\toffset = node.nodeType === 3 ? node.length : node.childNodes.length;\n\t\t\t\twhile (node && node.hasChildNodes()) {\n\t\t\t\t\tnode = node.childNodes[offset];\n\t\t\t\t\tif (node)\n\t\t\t\t\t\toffset = node.nodeType === 3 ? node.length : node.childNodes.length;\n\t\t\t\t}\n\t\t\t\treturn { node: node, offset: offset };\n\t\t\t}\n\n\t\t\t// If index based start position then resolve it\n\t\t\tif (startContainer.nodeType == 1 && startContainer.hasChildNodes()) {\n\t\t\t\tlastIdx = startContainer.childNodes.length - 1;\n\t\t\t\tstartContainer = startContainer.childNodes[startOffset > lastIdx ? lastIdx : startOffset];\n\n\t\t\t\tif (startContainer.nodeType == 3)\n\t\t\t\t\tstartOffset = 0;\n\t\t\t}\n\n\t\t\t// If index based end position then resolve it\n\t\t\tif (endContainer.nodeType == 1 && endContainer.hasChildNodes()) {\n\t\t\t\tlastIdx = endContainer.childNodes.length - 1;\n\t\t\t\tendContainer = endContainer.childNodes[endOffset > lastIdx ? lastIdx : endOffset - 1];\n\n\t\t\t\tif (endContainer.nodeType == 3)\n\t\t\t\t\tendOffset = endContainer.nodeValue.length;\n\t\t\t}\n\n\t\t\t// Exclude bookmark nodes if possible\n\t\t\tif (isBookmarkNode(startContainer.parentNode) || isBookmarkNode(startContainer)) {\n\t\t\t\tstartContainer = isBookmarkNode(startContainer) ? startContainer : startContainer.parentNode;\n\t\t\t\tstartContainer = startContainer.nextSibling || startContainer;\n\n\t\t\t\tif (startContainer.nodeType == 3)\n\t\t\t\t\tstartOffset = 0;\n\t\t\t}\n\n\t\t\tif (isBookmarkNode(endContainer.parentNode) || isBookmarkNode(endContainer)) {\n\t\t\t\tendContainer = isBookmarkNode(endContainer) ? endContainer : endContainer.parentNode;\n\t\t\t\tendContainer = endContainer.previousSibling || endContainer;\n\n\t\t\t\tif (endContainer.nodeType == 3)\n\t\t\t\t\tendOffset = endContainer.length;\n\t\t\t}\n\n\t\t\tif (format[0].inline) {\n\t\t\t\tif (rng.collapsed) {\n\t\t\t\t\tfunction findWordEndPoint(container, offset, start) {\n\t\t\t\t\t\tvar walker, node, pos, lastTextNode;\n\n\t\t\t\t\t\tfunction findSpace(node, offset) {\n\t\t\t\t\t\t\tvar pos, pos2, str = node.nodeValue;\n\n\t\t\t\t\t\t\tif (typeof(offset) == \"undefined\") {\n\t\t\t\t\t\t\t\toffset = start ? str.length : 0;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (start) {\n\t\t\t\t\t\t\t\tpos = str.lastIndexOf(' ', offset);\n\t\t\t\t\t\t\t\tpos2 = str.lastIndexOf('\\u00a0', offset);\n\t\t\t\t\t\t\t\tpos = pos > pos2 ? pos : pos2;\n\n\t\t\t\t\t\t\t\t// Include the space on remove to avoid tag soup\n\t\t\t\t\t\t\t\tif (pos !== -1 && !remove) {\n\t\t\t\t\t\t\t\t\tpos++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpos = str.indexOf(' ', offset);\n\t\t\t\t\t\t\t\tpos2 = str.indexOf('\\u00a0', offset);\n\t\t\t\t\t\t\t\tpos = pos !== -1 && (pos2 === -1 || pos < pos2) ? pos : pos2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn pos;\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (container.nodeType === 3) {\n\t\t\t\t\t\t\tpos = findSpace(container, offset);\n\n\t\t\t\t\t\t\tif (pos !== -1) {\n\t\t\t\t\t\t\t\treturn {container : container, offset : pos};\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tlastTextNode = container;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Walk the nodes inside the block\n\t\t\t\t\t\twalker = new TreeWalker(container, dom.getParent(container, isBlock) || ed.getBody());\n\t\t\t\t\t\twhile (node = walker[start ? 'prev' : 'next']()) {\n\t\t\t\t\t\t\tif (node.nodeType === 3) {\n\t\t\t\t\t\t\t\tlastTextNode = node;\n\t\t\t\t\t\t\t\tpos = findSpace(node);\n\n\t\t\t\t\t\t\t\tif (pos !== -1) {\n\t\t\t\t\t\t\t\t\treturn {container : node, offset : pos};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (isBlock(node)) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (lastTextNode) {\n\t\t\t\t\t\t\tif (start) {\n\t\t\t\t\t\t\t\toffset = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\toffset = lastTextNode.length;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn {container: lastTextNode, offset: offset};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Expand left to closest word boundery\n\t\t\t\t\tendPoint = findWordEndPoint(startContainer, startOffset, true);\n\t\t\t\t\tif (endPoint) {\n\t\t\t\t\t\tstartContainer = endPoint.container;\n\t\t\t\t\t\tstartOffset = endPoint.offset;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Expand right to closest word boundery\n\t\t\t\t\tendPoint = findWordEndPoint(endContainer, endOffset);\n\t\t\t\t\tif (endPoint) {\n\t\t\t\t\t\tendContainer = endPoint.container;\n\t\t\t\t\t\tendOffset = endPoint.offset;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Avoid applying formatting to a trailing space.\n\t\t\t\tleaf = findLeaf(endContainer, endOffset);\n\t\t\t\tif (leaf.node) {\n\t\t\t\t\twhile (leaf.node && leaf.offset === 0 && leaf.node.previousSibling)\n\t\t\t\t\t\tleaf = findLeaf(leaf.node.previousSibling);\n\n\t\t\t\t\tif (leaf.node && leaf.offset > 0 && leaf.node.nodeType === 3 &&\n\t\t\t\t\t\t\tleaf.node.nodeValue.charAt(leaf.offset - 1) === ' ') {\n\n\t\t\t\t\t\tif (leaf.offset > 1) {\n\t\t\t\t\t\t\tendContainer = leaf.node;\n\t\t\t\t\t\t\tendContainer.splitText(leaf.offset - 1);\n\t\t\t\t\t\t} else if (leaf.node.previousSibling) {\n\t\t\t\t\t\t\t// TODO: Figure out why this is in here\n\t\t\t\t\t\t\t//endContainer = leaf.node.previousSibling;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Move start/end point up the tree if the leaves are sharp and if we are in different containers\n\t\t\t// Example * becomes !: !<p><b><i>*text</i><i>text*</i></b></p>!\n\t\t\t// This will reduce the number of wrapper elements that needs to be created\n\t\t\t// Move start point up the tree\n\t\t\tif (format[0].inline || format[0].block_expand) {\n\t\t\t\tif (!format[0].inline || (startContainer.nodeType != 3 || startOffset === 0)) {\n\t\t\t\t\tstartContainer = findParentContainer(true);\n\t\t\t\t}\n\n\t\t\t\tif (!format[0].inline || (endContainer.nodeType != 3 || endOffset === endContainer.nodeValue.length)) {\n\t\t\t\t\tendContainer = findParentContainer();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Expand start/end container to matching selector\n\t\t\tif (format[0].selector && format[0].expand !== FALSE && !format[0].inline) {\n\t\t\t\tfunction findSelectorEndPoint(container, sibling_name) {\n\t\t\t\t\tvar parents, i, y, curFormat;\n\n\t\t\t\t\tif (container.nodeType == 3 && container.nodeValue.length == 0 && container[sibling_name])\n\t\t\t\t\t\tcontainer = container[sibling_name];\n\n\t\t\t\t\tparents = getParents(container);\n\t\t\t\t\tfor (i = 0; i < parents.length; i++) {\n\t\t\t\t\t\tfor (y = 0; y < format.length; y++) {\n\t\t\t\t\t\t\tcurFormat = format[y];\n\n\t\t\t\t\t\t\t// If collapsed state is set then skip formats that doesn't match that\n\t\t\t\t\t\t\tif (\"collapsed\" in curFormat && curFormat.collapsed !== rng.collapsed)\n\t\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\t\tif (dom.is(parents[i], curFormat.selector))\n\t\t\t\t\t\t\t\treturn parents[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn container;\n\t\t\t\t};\n\n\t\t\t\t// Find new startContainer/endContainer if there is better one\n\t\t\t\tstartContainer = findSelectorEndPoint(startContainer, 'previousSibling');\n\t\t\t\tendContainer = findSelectorEndPoint(endContainer, 'nextSibling');\n\t\t\t}\n\n\t\t\t// Expand start/end container to matching block element or text node\n\t\t\tif (format[0].block || format[0].selector) {\n\t\t\t\tfunction findBlockEndPoint(container, sibling_name, sibling_name2) {\n\t\t\t\t\tvar node;\n\n\t\t\t\t\t// Expand to block of similar type\n\t\t\t\t\tif (!format[0].wrapper)\n\t\t\t\t\t\tnode = dom.getParent(container, format[0].block);\n\n\t\t\t\t\t// Expand to first wrappable block element or any block element\n\t\t\t\t\tif (!node)\n\t\t\t\t\t\tnode = dom.getParent(container.nodeType == 3 ? container.parentNode : container, isBlock);\n\n\t\t\t\t\t// Exclude inner lists from wrapping\n\t\t\t\t\tif (node && format[0].wrapper)\n\t\t\t\t\t\tnode = getParents(node, 'ul,ol').reverse()[0] || node;\n\n\t\t\t\t\t// Didn't find a block element look for first/last wrappable element\n\t\t\t\t\tif (!node) {\n\t\t\t\t\t\tnode = container;\n\n\t\t\t\t\t\twhile (node[sibling_name] && !isBlock(node[sibling_name])) {\n\t\t\t\t\t\t\tnode = node[sibling_name];\n\n\t\t\t\t\t\t\t// Break on BR but include it will be removed later on\n\t\t\t\t\t\t\t// we can't remove it now since we need to check if it can be wrapped\n\t\t\t\t\t\t\tif (isEq(node, 'br'))\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn node || container;\n\t\t\t\t};\n\n\t\t\t\t// Find new startContainer/endContainer if there is better one\n\t\t\t\tstartContainer = findBlockEndPoint(startContainer, 'previousSibling');\n\t\t\t\tendContainer = findBlockEndPoint(endContainer, 'nextSibling');\n\n\t\t\t\t// Non block element then try to expand up the leaf\n\t\t\t\tif (format[0].block) {\n\t\t\t\t\tif (!isBlock(startContainer))\n\t\t\t\t\t\tstartContainer = findParentContainer(true);\n\n\t\t\t\t\tif (!isBlock(endContainer))\n\t\t\t\t\t\tendContainer = findParentContainer();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Setup index for startContainer\n\t\t\tif (startContainer.nodeType == 1) {\n\t\t\t\tstartOffset = nodeIndex(startContainer);\n\t\t\t\tstartContainer = startContainer.parentNode;\n\t\t\t}\n\n\t\t\t// Setup index for endContainer\n\t\t\tif (endContainer.nodeType == 1) {\n\t\t\t\tendOffset = nodeIndex(endContainer) + 1;\n\t\t\t\tendContainer = endContainer.parentNode;\n\t\t\t}\n\n\t\t\t// Return new range like object\n\t\t\treturn {\n\t\t\t\tstartContainer : startContainer,\n\t\t\t\tstartOffset : startOffset,\n\t\t\t\tendContainer : endContainer,\n\t\t\t\tendOffset : endOffset\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Removes the specified format for the specified node. It will also remove the node if it doesn't have\n\t\t * any attributes if the format specifies it to do so.\n\t\t *\n\t\t * @private\n\t\t * @param {Object} format Format object with items to remove from node.\n\t\t * @param {Object} vars Name/value object with variables to apply to format.\n\t\t * @param {Node} node Node to remove the format styles on.\n\t\t * @param {Node} compare_node Optional compare node, if specified the styles will be compared to that node.\n\t\t * @return {Boolean} True/false if the node was removed or not.\n\t\t */\n\t\tfunction removeFormat(format, vars, node, compare_node) {\n\t\t\tvar i, attrs, stylesModified;\n\n\t\t\t// Check if node matches format\n\t\t\tif (!matchName(node, format))\n\t\t\t\treturn FALSE;\n\n\t\t\t// Should we compare with format attribs and styles\n\t\t\tif (format.remove != 'all') {\n\t\t\t\t// Remove styles\n\t\t\t\teach(format.styles, function(value, name) {\n\t\t\t\t\tvalue = replaceVars(value, vars);\n\n\t\t\t\t\t// Indexed array\n\t\t\t\t\tif (typeof(name) === 'number') {\n\t\t\t\t\t\tname = value;\n\t\t\t\t\t\tcompare_node = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!compare_node || isEq(getStyle(compare_node, name), value))\n\t\t\t\t\t\tdom.setStyle(node, name, '');\n\n\t\t\t\t\tstylesModified = 1;\n\t\t\t\t});\n\n\t\t\t\t// Remove style attribute if it's empty\n\t\t\t\tif (stylesModified && dom.getAttrib(node, 'style') == '') {\n\t\t\t\t\tnode.removeAttribute('style');\n\t\t\t\t\tnode.removeAttribute('data-mce-style');\n\t\t\t\t}\n\n\t\t\t\t// Remove attributes\n\t\t\t\teach(format.attributes, function(value, name) {\n\t\t\t\t\tvar valueOut;\n\n\t\t\t\t\tvalue = replaceVars(value, vars);\n\n\t\t\t\t\t// Indexed array\n\t\t\t\t\tif (typeof(name) === 'number') {\n\t\t\t\t\t\tname = value;\n\t\t\t\t\t\tcompare_node = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!compare_node || isEq(dom.getAttrib(compare_node, name), value)) {\n\t\t\t\t\t\t// Keep internal classes\n\t\t\t\t\t\tif (name == 'class') {\n\t\t\t\t\t\t\tvalue = dom.getAttrib(node, name);\n\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t// Build new class value where everything is removed except the internal prefixed classes\n\t\t\t\t\t\t\t\tvalueOut = '';\n\t\t\t\t\t\t\t\teach(value.split(/\\s+/), function(cls) {\n\t\t\t\t\t\t\t\t\tif (/mce\\w+/.test(cls))\n\t\t\t\t\t\t\t\t\t\tvalueOut += (valueOut ? ' ' : '') + cls;\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t// We got some internal classes left\n\t\t\t\t\t\t\t\tif (valueOut) {\n\t\t\t\t\t\t\t\t\tdom.setAttrib(node, name, valueOut);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// IE6 has a bug where the attribute doesn't get removed correctly\n\t\t\t\t\t\tif (name == \"class\")\n\t\t\t\t\t\t\tnode.removeAttribute('className');\n\n\t\t\t\t\t\t// Remove mce prefixed attributes\n\t\t\t\t\t\tif (MCE_ATTR_RE.test(name))\n\t\t\t\t\t\t\tnode.removeAttribute('data-mce-' + name);\n\n\t\t\t\t\t\tnode.removeAttribute(name);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Remove classes\n\t\t\t\teach(format.classes, function(value) {\n\t\t\t\t\tvalue = replaceVars(value, vars);\n\n\t\t\t\t\tif (!compare_node || dom.hasClass(compare_node, value))\n\t\t\t\t\t\tdom.removeClass(node, value);\n\t\t\t\t});\n\n\t\t\t\t// Check for non internal attributes\n\t\t\t\tattrs = dom.getAttribs(node);\n\t\t\t\tfor (i = 0; i < attrs.length; i++) {\n\t\t\t\t\tif (attrs[i].nodeName.indexOf('_') !== 0)\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove the inline child if it's empty for example <b> or <span>\n\t\t\tif (format.remove != 'none') {\n\t\t\t\tremoveNode(node, format);\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Removes the node and wrap it's children in paragraphs before doing so or\n\t\t * appends BR elements to the beginning/end of the block element if forcedRootBlocks is disabled.\n\t\t *\n\t\t * If the div in the node below gets removed:\n\t\t *  text<div>text</div>text\n\t\t *\n\t\t * Output becomes:\n\t\t *  text<div><br />text<br /></div>text\n\t\t *\n\t\t * So when the div is removed the result is:\n\t\t *  text<br />text<br />text\n\t\t *\n\t\t * @private\n\t\t * @param {Node} node Node to remove + apply BR/P elements to.\n\t\t * @param {Object} format Format rule.\n\t\t * @return {Node} Input node.\n\t\t */\n\t\tfunction removeNode(node, format) {\n\t\t\tvar parentNode = node.parentNode, rootBlockElm;\n\n\t\t\tif (format.block) {\n\t\t\t\tif (!forcedRootBlock) {\n\t\t\t\t\tfunction find(node, next, inc) {\n\t\t\t\t\t\tnode = getNonWhiteSpaceSibling(node, next, inc);\n\n\t\t\t\t\t\treturn !node || (node.nodeName == 'BR' || isBlock(node));\n\t\t\t\t\t};\n\n\t\t\t\t\t// Append BR elements if needed before we remove the block\n\t\t\t\t\tif (isBlock(node) && !isBlock(parentNode)) {\n\t\t\t\t\t\tif (!find(node, FALSE) && !find(node.firstChild, TRUE, 1))\n\t\t\t\t\t\t\tnode.insertBefore(dom.create('br'), node.firstChild);\n\n\t\t\t\t\t\tif (!find(node, TRUE) && !find(node.lastChild, FALSE, 1))\n\t\t\t\t\t\t\tnode.appendChild(dom.create('br'));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Wrap the block in a forcedRootBlock if we are at the root of document\n\t\t\t\t\tif (parentNode == dom.getRoot()) {\n\t\t\t\t\t\tif (!format.list_block || !isEq(node, format.list_block)) {\n\t\t\t\t\t\t\teach(tinymce.grep(node.childNodes), function(node) {\n\t\t\t\t\t\t\t\tif (isValid(forcedRootBlock, node.nodeName.toLowerCase())) {\n\t\t\t\t\t\t\t\t\tif (!rootBlockElm)\n\t\t\t\t\t\t\t\t\t\trootBlockElm = wrap(node, forcedRootBlock);\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\trootBlockElm.appendChild(node);\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\trootBlockElm = 0;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Never remove nodes that isn't the specified inline element if a selector is specified too\n\t\t\tif (format.selector && format.inline && !isEq(format.inline, node))\n\t\t\t\treturn;\n\n\t\t\tdom.remove(node, 1);\n\t\t};\n\n\t\t/**\n\t\t * Returns the next/previous non whitespace node.\n\t\t *\n\t\t * @private\n\t\t * @param {Node} node Node to start at.\n\t\t * @param {boolean} next (Optional) Include next or previous node defaults to previous.\n\t\t * @param {boolean} inc (Optional) Include the current node in checking. Defaults to false.\n\t\t * @return {Node} Next or previous node or undefined if it wasn't found.\n\t\t */\n\t\tfunction getNonWhiteSpaceSibling(node, next, inc) {\n\t\t\tif (node) {\n\t\t\t\tnext = next ? 'nextSibling' : 'previousSibling';\n\n\t\t\t\tfor (node = inc ? node : node[next]; node; node = node[next]) {\n\t\t\t\t\tif (node.nodeType == 1 || !isWhiteSpaceNode(node))\n\t\t\t\t\t\treturn node;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Checks if the specified node is a bookmark node or not.\n\t\t *\n\t\t * @param {Node} node Node to check if it's a bookmark node or not.\n\t\t * @return {Boolean} true/false if the node is a bookmark node.\n\t\t */\n\t\tfunction isBookmarkNode(node) {\n\t\t\treturn node && node.nodeType == 1 && node.getAttribute('data-mce-type') == 'bookmark';\n\t\t};\n\n\t\t/**\n\t\t * Merges the next/previous sibling element if they match.\n\t\t *\n\t\t * @private\n\t\t * @param {Node} prev Previous node to compare/merge.\n\t\t * @param {Node} next Next node to compare/merge.\n\t\t * @return {Node} Next node if we didn't merge and prev node if we did.\n\t\t */\n\t\tfunction mergeSiblings(prev, next) {\n\t\t\tvar marker, sibling, tmpSibling;\n\n\t\t\t/**\n\t\t\t * Compares two nodes and checks if it's attributes and styles matches.\n\t\t\t * This doesn't compare classes as items since their order is significant.\n\t\t\t *\n\t\t\t * @private\n\t\t\t * @param {Node} node1 First node to compare with.\n\t\t\t * @param {Node} node2 Second node to compare with.\n\t\t\t * @return {boolean} True/false if the nodes are the same or not.\n\t\t\t */\n\t\t\tfunction compareElements(node1, node2) {\n\t\t\t\t// Not the same name\n\t\t\t\tif (node1.nodeName != node2.nodeName)\n\t\t\t\t\treturn FALSE;\n\n\t\t\t\t/**\n\t\t\t\t * Returns all the nodes attributes excluding internal ones, styles and classes.\n\t\t\t\t *\n\t\t\t\t * @private\n\t\t\t\t * @param {Node} node Node to get attributes from.\n\t\t\t\t * @return {Object} Name/value object with attributes and attribute values.\n\t\t\t\t */\n\t\t\t\tfunction getAttribs(node) {\n\t\t\t\t\tvar attribs = {};\n\n\t\t\t\t\teach(dom.getAttribs(node), function(attr) {\n\t\t\t\t\t\tvar name = attr.nodeName.toLowerCase();\n\n\t\t\t\t\t\t// Don't compare internal attributes or style\n\t\t\t\t\t\tif (name.indexOf('_') !== 0 && name !== 'style')\n\t\t\t\t\t\t\tattribs[name] = dom.getAttrib(node, name);\n\t\t\t\t\t});\n\n\t\t\t\t\treturn attribs;\n\t\t\t\t};\n\n\t\t\t\t/**\n\t\t\t\t * Compares two objects checks if it's key + value exists in the other one.\n\t\t\t\t *\n\t\t\t\t * @private\n\t\t\t\t * @param {Object} obj1 First object to compare.\n\t\t\t\t * @param {Object} obj2 Second object to compare.\n\t\t\t\t * @return {boolean} True/false if the objects matches or not.\n\t\t\t\t */\n\t\t\t\tfunction compareObjects(obj1, obj2) {\n\t\t\t\t\tvar value, name;\n\n\t\t\t\t\tfor (name in obj1) {\n\t\t\t\t\t\t// Obj1 has item obj2 doesn't have\n\t\t\t\t\t\tif (obj1.hasOwnProperty(name)) {\n\t\t\t\t\t\t\tvalue = obj2[name];\n\n\t\t\t\t\t\t\t// Obj2 doesn't have obj1 item\n\t\t\t\t\t\t\tif (value === undefined)\n\t\t\t\t\t\t\t\treturn FALSE;\n\n\t\t\t\t\t\t\t// Obj2 item has a different value\n\t\t\t\t\t\t\tif (obj1[name] != value)\n\t\t\t\t\t\t\t\treturn FALSE;\n\n\t\t\t\t\t\t\t// Delete similar value\n\t\t\t\t\t\t\tdelete obj2[name];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check if obj 2 has something obj 1 doesn't have\n\t\t\t\t\tfor (name in obj2) {\n\t\t\t\t\t\t// Obj2 has item obj1 doesn't have\n\t\t\t\t\t\tif (obj2.hasOwnProperty(name))\n\t\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn TRUE;\n\t\t\t\t};\n\n\t\t\t\t// Attribs are not the same\n\t\t\t\tif (!compareObjects(getAttribs(node1), getAttribs(node2)))\n\t\t\t\t\treturn FALSE;\n\n\t\t\t\t// Styles are not the same\n\t\t\t\tif (!compareObjects(dom.parseStyle(dom.getAttrib(node1, 'style')), dom.parseStyle(dom.getAttrib(node2, 'style'))))\n\t\t\t\t\treturn FALSE;\n\n\t\t\t\treturn TRUE;\n\t\t\t};\n\n\t\t\t// Check if next/prev exists and that they are elements\n\t\t\tif (prev && next) {\n\t\t\t\tfunction findElementSibling(node, sibling_name) {\n\t\t\t\t\tfor (sibling = node; sibling; sibling = sibling[sibling_name]) {\n\t\t\t\t\t\tif (sibling.nodeType == 3 && sibling.nodeValue.length !== 0)\n\t\t\t\t\t\t\treturn node;\n\n\t\t\t\t\t\tif (sibling.nodeType == 1 && !isBookmarkNode(sibling))\n\t\t\t\t\t\t\treturn sibling;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn node;\n\t\t\t\t};\n\n\t\t\t\t// If previous sibling is empty then jump over it\n\t\t\t\tprev = findElementSibling(prev, 'previousSibling');\n\t\t\t\tnext = findElementSibling(next, 'nextSibling');\n\n\t\t\t\t// Compare next and previous nodes\n\t\t\t\tif (compareElements(prev, next)) {\n\t\t\t\t\t// Append nodes between\n\t\t\t\t\tfor (sibling = prev.nextSibling; sibling && sibling != next;) {\n\t\t\t\t\t\ttmpSibling = sibling;\n\t\t\t\t\t\tsibling = sibling.nextSibling;\n\t\t\t\t\t\tprev.appendChild(tmpSibling);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove next node\n\t\t\t\t\tdom.remove(next);\n\n\t\t\t\t\t// Move children into prev node\n\t\t\t\t\teach(tinymce.grep(next.childNodes), function(node) {\n\t\t\t\t\t\tprev.appendChild(node);\n\t\t\t\t\t});\n\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn next;\n\t\t};\n\n\t\t/**\n\t\t * Returns true/false if the specified node is a text block or not.\n\t\t *\n\t\t * @private\n\t\t * @param {Node} node Node to check.\n\t\t * @return {boolean} True/false if the node is a text block.\n\t\t */\n\t\tfunction isTextBlock(name) {\n\t\t\treturn /^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(name);\n\t\t};\n\n\t\tfunction getContainer(rng, start) {\n\t\t\tvar container, offset, lastIdx, walker;\n\n\t\t\tcontainer = rng[start ? 'startContainer' : 'endContainer'];\n\t\t\toffset = rng[start ? 'startOffset' : 'endOffset'];\n\n\t\t\tif (container.nodeType == 1) {\n\t\t\t\tlastIdx = container.childNodes.length - 1;\n\n\t\t\t\tif (!start && offset)\n\t\t\t\t\toffset--;\n\n\t\t\t\tcontainer = container.childNodes[offset > lastIdx ? lastIdx : offset];\n\t\t\t}\n\n\t\t\t// If start text node is excluded then walk to the next node\n\t\t\tif (container.nodeType === 3 && start && offset >= container.nodeValue.length) {\n\t\t\t\tcontainer = new TreeWalker(container, ed.getBody()).next() || container;\n\t\t\t}\n\n\t\t\t// If end text node is excluded then walk to the previous node\n\t\t\tif (container.nodeType === 3 && !start && offset == 0) {\n\t\t\t\tcontainer = new TreeWalker(container, ed.getBody()).prev() || container;\n\t\t\t}\n\n\t\t\treturn container;\n\t\t};\n\n\t\tfunction performCaretAction(type, name, vars) {\n\t\t\tvar invisibleChar, caretContainerId = '_mce_caret', debug = ed.settings.caret_debug;\n\n\t\t\t// Setup invisible character use zero width space on Gecko since it doesn't change the heigt of the container\n\t\t\tinvisibleChar = tinymce.isGecko ? '\\u200B' : INVISIBLE_CHAR;\n\n\t\t\t// Creates a caret container bogus element\n\t\t\tfunction createCaretContainer(fill) {\n\t\t\t\tvar caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true, style: debug ? 'color:red' : ''});\n\n\t\t\t\tif (fill) {\n\t\t\t\t\tcaretContainer.appendChild(ed.getDoc().createTextNode(invisibleChar));\n\t\t\t\t}\n\n\t\t\t\treturn caretContainer;\n\t\t\t};\n\n\t\t\tfunction isCaretContainerEmpty(node, nodes) {\n\t\t\t\twhile (node) {\n\t\t\t\t\tif ((node.nodeType === 3 && node.nodeValue !== invisibleChar) || node.childNodes.length > 1) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Collect nodes\n\t\t\t\t\tif (nodes && node.nodeType === 1) {\n\t\t\t\t\t\tnodes.push(node);\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.firstChild;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\t// Returns any parent caret container element\n\t\t\tfunction getParentCaretContainer(node) {\n\t\t\t\twhile (node) {\n\t\t\t\t\tif (node.id === caretContainerId) {\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Finds the first text node in the specified node\n\t\t\tfunction findFirstTextNode(node) {\n\t\t\t\tvar walker;\n\n\t\t\t\tif (node) {\n\t\t\t\t\twalker = new TreeWalker(node, node);\n\n\t\t\t\t\tfor (node = walker.current(); node; node = walker.next()) {\n\t\t\t\t\t\tif (node.nodeType === 3) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Removes the caret container for the specified node or all on the current document\n\t\t\tfunction removeCaretContainer(node, move_caret) {\n\t\t\t\tvar child, rng;\n\n\t\t\t\tif (!node) {\n\t\t\t\t\tnode = getParentCaretContainer(selection.getStart());\n\n\t\t\t\t\tif (!node) {\n\t\t\t\t\t\twhile (node = dom.get(caretContainerId)) {\n\t\t\t\t\t\t\tremoveCaretContainer(node, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\trng = selection.getRng(true);\n\n\t\t\t\t\tif (isCaretContainerEmpty(node)) {\n\t\t\t\t\t\tif (move_caret !== false) {\n\t\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\t\trng.setEndBefore(node);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdom.remove(node);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild = findFirstTextNode(node);\n\t\t\t\t\t\tchild = child.deleteData(0, 1);\n\t\t\t\t\t\tdom.remove(node, 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Applies formatting to the caret position\n\t\t\tfunction applyCaretFormat() {\n\t\t\t\tvar rng, caretContainer, textNode, offset, bookmark, container, text;\n\n\t\t\t\trng = selection.getRng(true);\n\t\t\t\toffset = rng.startOffset;\n\t\t\t\tcontainer = rng.startContainer;\n\t\t\t\ttext = container.nodeValue;\n\n\t\t\t\tcaretContainer = getParentCaretContainer(selection.getStart());\n\t\t\t\tif (caretContainer) {\n\t\t\t\t\ttextNode = findFirstTextNode(caretContainer);\n\t\t\t\t}\n\n\t\t\t\t// Expand to word is caret is in the middle of a text node and the char before/after is a alpha numeric character\n\t\t\t\tif (text && offset > 0 && offset < text.length && /\\w/.test(text.charAt(offset)) && /\\w/.test(text.charAt(offset - 1))) {\n\t\t\t\t\t// Get bookmark of caret position\n\t\t\t\t\tbookmark = selection.getBookmark();\n\n\t\t\t\t\t// Collapse bookmark range (WebKit)\n\t\t\t\t\trng.collapse(true);\n\n\t\t\t\t\t// Expand the range to the closest word and split it at those points\n\t\t\t\t\trng = expandRng(rng, get(name));\n\t\t\t\t\trng = rangeUtils.split(rng);\n\n\t\t\t\t\t// Apply the format to the range\n\t\t\t\t\tapply(name, vars, rng);\n\n\t\t\t\t\t// Move selection back to caret position\n\t\t\t\t\tselection.moveToBookmark(bookmark);\n\t\t\t\t} else {\n\t\t\t\t\tif (!caretContainer || textNode.nodeValue !== invisibleChar) {\n\t\t\t\t\t\tcaretContainer = createCaretContainer(true);\n\t\t\t\t\t\ttextNode = caretContainer.firstChild;\n\n\t\t\t\t\t\trng.insertNode(caretContainer);\n\t\t\t\t\t\toffset = 1;\n\n\t\t\t\t\t\tapply(name, vars, caretContainer);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapply(name, vars, caretContainer);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Move selection to text node\n\t\t\t\t\tselection.setCursorLocation(textNode, offset);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfunction removeCaretFormat() {\n\t\t\t\tvar rng = selection.getRng(true), container, offset, bookmark,\n\t\t\t\t\thasContentAfter, node, formatNode, parents = [], i, caretContainer;\n\n\t\t\t\tcontainer = rng.startContainer;\n\t\t\t\toffset = rng.startOffset;\n\t\t\t\tnode = container;\n\n\t\t\t\tif (container.nodeType == 3) {\n\t\t\t\t\tif (offset != container.nodeValue.length || container.nodeValue === invisibleChar) {\n\t\t\t\t\t\thasContentAfter = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t}\n\n\t\t\t\twhile (node) {\n\t\t\t\t\tif (matchNode(node, name, vars)) {\n\t\t\t\t\t\tformatNode = node;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (node.nextSibling) {\n\t\t\t\t\t\thasContentAfter = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tparents.push(node);\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t}\n\n\t\t\t\t// Node doesn't have the specified format\n\t\t\t\tif (!formatNode) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Is there contents after the caret then remove the format on the element\n\t\t\t\tif (hasContentAfter) {\n\t\t\t\t\t// Get bookmark of caret position\n\t\t\t\t\tbookmark = selection.getBookmark();\n\n\t\t\t\t\t// Collapse bookmark range (WebKit)\n\t\t\t\t\trng.collapse(true);\n\n\t\t\t\t\t// Expand the range to the closest word and split it at those points\n\t\t\t\t\trng = expandRng(rng, get(name), true);\n\t\t\t\t\trng = rangeUtils.split(rng);\n\n\t\t\t\t\t// Remove the format from the range\n\t\t\t\t\tremove(name, vars, rng);\n\n\t\t\t\t\t// Move selection back to caret position\n\t\t\t\t\tselection.moveToBookmark(bookmark);\n\t\t\t\t} else {\n\t\t\t\t\tcaretContainer = createCaretContainer();\n\n\t\t\t\t\tnode = caretContainer;\n\t\t\t\t\tfor (i = parents.length - 1; i >= 0; i--) {\n\t\t\t\t\t\tnode.appendChild(parents[i].cloneNode(false));\n\t\t\t\t\t\tnode = node.firstChild;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Insert invisible character into inner most format element\n\t\t\t\t\tnode.appendChild(dom.doc.createTextNode(invisibleChar));\n\t\t\t\t\tnode = node.firstChild;\n\n\t\t\t\t\t// Insert caret container after the formated node\n\t\t\t\t\tdom.insertAfter(caretContainer, formatNode);\n\n\t\t\t\t\t// Move selection to text node\n\t\t\t\t\tselection.setCursorLocation(node, 1);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Mark current caret container elements as bogus when getting the contents so we don't end up with empty elements\n\t\t\ted.onBeforeGetContent.addToTop(function() {\n\t\t\t\tvar nodes = [], i;\n\n\t\t\t\tif (isCaretContainerEmpty(getParentCaretContainer(selection.getStart()), nodes)) {\n\t\t\t\t\t// Mark children\n\t\t\t\t\ti = nodes.length;\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tdom.setAttrib(nodes[i], 'data-mce-bogus', '1');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Remove caret container on mouse up and on key up\n\t\t\ttinymce.each('onMouseUp onKeyUp'.split(' '), function(name) {\n\t\t\t\ted[name].addToTop(function() {\n\t\t\t\t\tremoveCaretContainer();\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// Remove caret container on keydown and it's a backspace, enter or left/right arrow keys\n\t\t\ted.onKeyDown.addToTop(function(ed, e) {\n\t\t\t\tvar keyCode = e.keyCode;\n\n\t\t\t\tif (keyCode == 8 || keyCode == 37 || keyCode == 39) {\n\t\t\t\t\tremoveCaretContainer(getParentCaretContainer(selection.getStart()));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Do apply or remove caret format\n\t\t\tif (type == \"apply\") {\n\t\t\t\tapplyCaretFormat();\n\t\t\t} else {\n\t\t\t\tremoveCaretFormat();\n\t\t\t}\n\t\t};\n\t};\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/html/SaxParser.js":"/**\n * SaxParser.js\n *\n * Copyright 2010, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t/**\n\t * This class parses HTML code using pure JavaScript and executes various events for each item it finds. It will\n\t * always execute the events in the right order for tag soup code like <b><p></b></p>. It will also remove elements\n\t * and attributes that doesn't fit the schema if the validate setting is enabled.\n\t *\n\t * @example\n\t * var parser = new tinymce.html.SaxParser({\n\t *     validate: true,\n\t *\n\t *     comment: function(text) {\n\t *         console.log('Comment:', text);\n\t *     },\n\t *\n\t *     cdata: function(text) {\n\t *         console.log('CDATA:', text);\n\t *     },\n\t *\n\t *     text: function(text, raw) {\n\t *         console.log('Text:', text, 'Raw:', raw);\n\t *     },\n\t *\n\t *     start: function(name, attrs, empty) {\n\t *         console.log('Start:', name, attrs, empty);\n\t *     },\n\t *\n\t *     end: function(name) {\n\t *         console.log('End:', name);\n\t *     },\n\t *\n\t *     pi: function(name, text) {\n\t *         console.log('PI:', name, text);\n\t *     },\n\t *\n\t *     doctype: function(text) {\n\t *         console.log('DocType:', text);\n\t *     }\n\t * }, schema);\n\t * @class tinymce.html.SaxParser\n\t * @version 3.4\n\t */\n\n\t/**\n\t * Constructs a new SaxParser instance.\n\t *\n\t * @constructor\n\t * @method SaxParser\n\t * @param {Object} settings Name/value collection of settings. comment, cdata, text, start and end are callbacks.\n\t * @param {tinymce.html.Schema} schema HTML Schema class to use when parsing.\n\t */\n\ttinymce.html.SaxParser = function(settings, schema) {\n\t\tvar self = this, noop = function() {};\n\n\t\tsettings = settings || {};\n\t\tself.schema = schema = schema || new tinymce.html.Schema();\n\n\t\tif (settings.fix_self_closing !== false)\n\t\t\tsettings.fix_self_closing = true;\n\n\t\t// Add handler functions from settings and setup default handlers\n\t\ttinymce.each('comment cdata text start end pi doctype'.split(' '), function(name) {\n\t\t\tif (name)\n\t\t\t\tself[name] = settings[name] || noop;\n\t\t});\n\n\t\t/**\n\t\t * Parses the specified HTML string and executes the callbacks for each item it finds.\n\t\t *\n\t\t * @example\n\t\t * new SaxParser({...}).parse('<b>text</b>');\n\t\t * @method parse\n\t\t * @param {String} html Html string to sax parse.\n\t\t */\n\t\tself.parse = function(html) {\n\t\t\tvar self = this, matches, index = 0, value, endRegExp, stack = [], attrList, i, text, name, isInternalElement, removeInternalElements,\n\t\t\t\tshortEndedElements, fillAttrsMap, isShortEnded, validate, elementRule, isValidElement, attr, attribsValue, invalidPrefixRegExp,\n\t\t\t\tvalidAttributesMap, validAttributePatterns, attributesRequired, attributesDefault, attributesForced, selfClosing,\n\t\t\t\ttokenRegExp, attrRegExp, specialElements, attrValue, idCount = 0, decode = tinymce.html.Entities.decode, fixSelfClosing, isIE;\n\n\t\t\tfunction processEndTag(name) {\n\t\t\t\tvar pos, i;\n\n\t\t\t\t// Find position of parent of the same type\n\t\t\t\tpos = stack.length;\n\t\t\t\twhile (pos--) {\n\t\t\t\t\tif (stack[pos].name === name)\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t// Found parent\n\t\t\t\tif (pos >= 0) {\n\t\t\t\t\t// Close all the open elements\n\t\t\t\t\tfor (i = stack.length - 1; i >= pos; i--) {\n\t\t\t\t\t\tname = stack[i];\n\n\t\t\t\t\t\tif (name.valid)\n\t\t\t\t\t\t\tself.end(name.name);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove the open elements from the stack\n\t\t\t\t\tstack.length = pos;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Precompile RegExps and map objects\n\t\t\ttokenRegExp = new RegExp('<(?:' +\n\t\t\t\t'(?:!--([\\\\w\\\\W]*?)-->)|' + // Comment\n\t\t\t\t'(?:!\\\\[CDATA\\\\[([\\\\w\\\\W]*?)\\\\]\\\\]>)|' + // CDATA\n\t\t\t\t'(?:!DOCTYPE([\\\\w\\\\W]*?)>)|' + // DOCTYPE\n\t\t\t\t'(?:\\\\?([^\\\\s\\\\/<>]+) ?([\\\\w\\\\W]*?)[?/]>)|' + // PI\n\t\t\t\t'(?:\\\\/([^>]+)>)|' + // End element\n\t\t\t\t'(?:([^\\\\s\\\\/<>]+)((?:\\\\s+[^\"\\'>]+(?:(?:\"[^\"]*\")|(?:\\'[^\\']*\\')|[^>]*))*|\\\\/)>)' + // Start element\n\t\t\t')', 'g');\n\n\t\t\tattrRegExp = /([\\w:\\-]+)(?:\\s*=\\s*(?:(?:\\\"((?:\\\\.|[^\\\"])*)\\\")|(?:\\'((?:\\\\.|[^\\'])*)\\')|([^>\\s]+)))?/g;\n\t\t\tspecialElements = {\n\t\t\t\t'script' : /<\\/script[^>]*>/gi,\n\t\t\t\t'style' : /<\\/style[^>]*>/gi,\n\t\t\t\t'noscript' : /<\\/noscript[^>]*>/gi\n\t\t\t};\n\n\t\t\t// Setup lookup tables for empty elements and boolean attributes\n\t\t\tshortEndedElements = schema.getShortEndedElements();\n\t\t\tselfClosing = schema.getSelfClosingElements();\n\t\t\tfillAttrsMap = schema.getBoolAttrs();\n\t\t\tvalidate = settings.validate;\n\t\t\tremoveInternalElements = settings.remove_internals;\n\t\t\tfixSelfClosing = settings.fix_self_closing;\n\t\t\tisIE = tinymce.isIE;\n\t\t\tinvalidPrefixRegExp = /^:/;\n\n\t\t\twhile (matches = tokenRegExp.exec(html)) {\n\t\t\t\t// Text\n\t\t\t\tif (index < matches.index)\n\t\t\t\t\tself.text(decode(html.substr(index, matches.index - index)));\n\n\t\t\t\tif (value = matches[6]) { // End element\n\t\t\t\t\tvalue = value.toLowerCase();\n\n\t\t\t\t\t// IE will add a \":\" in front of elements it doesn't understand like custom elements or HTML5 elements\n\t\t\t\t\tif (isIE && invalidPrefixRegExp.test(value))\n\t\t\t\t\t\tvalue = value.substr(1);\n\n\t\t\t\t\tprocessEndTag(value);\n\t\t\t\t} else if (value = matches[7]) { // Start element\n\t\t\t\t\tvalue = value.toLowerCase();\n\n\t\t\t\t\t// IE will add a \":\" in front of elements it doesn't understand like custom elements or HTML5 elements\n\t\t\t\t\tif (isIE && invalidPrefixRegExp.test(value))\n\t\t\t\t\t\tvalue = value.substr(1);\n\n\t\t\t\t\tisShortEnded = value in shortEndedElements;\n\n\t\t\t\t\t// Is self closing tag for example an <li> after an open <li>\n\t\t\t\t\tif (fixSelfClosing && selfClosing[value] && stack.length > 0 && stack[stack.length - 1].name === value)\n\t\t\t\t\t\tprocessEndTag(value);\n\n\t\t\t\t\t// Validate element\n\t\t\t\t\tif (!validate || (elementRule = schema.getElementRule(value))) {\n\t\t\t\t\t\tisValidElement = true;\n\n\t\t\t\t\t\t// Grab attributes map and patters when validation is enabled\n\t\t\t\t\t\tif (validate) {\n\t\t\t\t\t\t\tvalidAttributesMap = elementRule.attributes;\n\t\t\t\t\t\t\tvalidAttributePatterns = elementRule.attributePatterns;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Parse attributes\n\t\t\t\t\t\tif (attribsValue = matches[8]) {\n\t\t\t\t\t\t\tisInternalElement = attribsValue.indexOf('data-mce-type') !== -1; // Check if the element is an internal element\n\n\t\t\t\t\t\t\t// If the element has internal attributes then remove it if we are told to do so\n\t\t\t\t\t\t\tif (isInternalElement && removeInternalElements)\n\t\t\t\t\t\t\t\tisValidElement = false;\n\n\t\t\t\t\t\t\tattrList = [];\n\t\t\t\t\t\t\tattrList.map = {};\n\n\t\t\t\t\t\t\tattribsValue.replace(attrRegExp, function(match, name, value, val2, val3) {\n\t\t\t\t\t\t\t\tvar attrRule, i;\n\n\t\t\t\t\t\t\t\tname = name.toLowerCase();\n\t\t\t\t\t\t\t\tvalue = name in fillAttrsMap ? name : decode(value || val2 || val3 || ''); // Handle boolean attribute than value attribute\n\n\t\t\t\t\t\t\t\t// Validate name and value\n\t\t\t\t\t\t\t\tif (validate && !isInternalElement && name.indexOf('data-') !== 0) {\n\t\t\t\t\t\t\t\t\tattrRule = validAttributesMap[name];\n\n\t\t\t\t\t\t\t\t\t// Find rule by pattern matching\n\t\t\t\t\t\t\t\t\tif (!attrRule && validAttributePatterns) {\n\t\t\t\t\t\t\t\t\t\ti = validAttributePatterns.length;\n\t\t\t\t\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\t\t\t\t\tattrRule = validAttributePatterns[i];\n\t\t\t\t\t\t\t\t\t\t\tif (attrRule.pattern.test(name))\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// No rule matched\n\t\t\t\t\t\t\t\t\t\tif (i === -1)\n\t\t\t\t\t\t\t\t\t\t\tattrRule = null;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// No attribute rule found\n\t\t\t\t\t\t\t\t\tif (!attrRule)\n\t\t\t\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t\t\t\t// Validate value\n\t\t\t\t\t\t\t\t\tif (attrRule.validValues && !(value in attrRule.validValues))\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Add attribute to list and map\n\t\t\t\t\t\t\t\tattrList.map[name] = value;\n\t\t\t\t\t\t\t\tattrList.push({\n\t\t\t\t\t\t\t\t\tname: name,\n\t\t\t\t\t\t\t\t\tvalue: value\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tattrList = [];\n\t\t\t\t\t\t\tattrList.map = {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Process attributes if validation is enabled\n\t\t\t\t\t\tif (validate && !isInternalElement) {\n\t\t\t\t\t\t\tattributesRequired = elementRule.attributesRequired;\n\t\t\t\t\t\t\tattributesDefault = elementRule.attributesDefault;\n\t\t\t\t\t\t\tattributesForced = elementRule.attributesForced;\n\n\t\t\t\t\t\t\t// Handle forced attributes\n\t\t\t\t\t\t\tif (attributesForced) {\n\t\t\t\t\t\t\t\ti = attributesForced.length;\n\t\t\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\t\t\tattr = attributesForced[i];\n\t\t\t\t\t\t\t\t\tname = attr.name;\n\t\t\t\t\t\t\t\t\tattrValue = attr.value;\n\n\t\t\t\t\t\t\t\t\tif (attrValue === '{$uid}')\n\t\t\t\t\t\t\t\t\t\tattrValue = 'mce_' + idCount++;\n\n\t\t\t\t\t\t\t\t\tattrList.map[name] = attrValue;\n\t\t\t\t\t\t\t\t\tattrList.push({name: name, value: attrValue});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Handle default attributes\n\t\t\t\t\t\t\tif (attributesDefault) {\n\t\t\t\t\t\t\t\ti = attributesDefault.length;\n\t\t\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\t\t\tattr = attributesDefault[i];\n\t\t\t\t\t\t\t\t\tname = attr.name;\n\n\t\t\t\t\t\t\t\t\tif (!(name in attrList.map)) {\n\t\t\t\t\t\t\t\t\t\tattrValue = attr.value;\n\n\t\t\t\t\t\t\t\t\t\tif (attrValue === '{$uid}')\n\t\t\t\t\t\t\t\t\t\t\tattrValue = 'mce_' + idCount++;\n\n\t\t\t\t\t\t\t\t\t\tattrList.map[name] = attrValue;\n\t\t\t\t\t\t\t\t\t\tattrList.push({name: name, value: attrValue});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Handle required attributes\n\t\t\t\t\t\t\tif (attributesRequired) {\n\t\t\t\t\t\t\t\ti = attributesRequired.length;\n\t\t\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\t\t\tif (attributesRequired[i] in attrList.map)\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// None of the required attributes where found\n\t\t\t\t\t\t\t\tif (i === -1)\n\t\t\t\t\t\t\t\t\tisValidElement = false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Invalidate element if it's marked as bogus\n\t\t\t\t\t\t\tif (attrList.map['data-mce-bogus'])\n\t\t\t\t\t\t\t\tisValidElement = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isValidElement)\n\t\t\t\t\t\t\tself.start(value, attrList, isShortEnded);\n\t\t\t\t\t} else\n\t\t\t\t\t\tisValidElement = false;\n\n\t\t\t\t\t// Treat script, noscript and style a bit different since they may include code that looks like elements\n\t\t\t\t\tif (endRegExp = specialElements[value]) {\n\t\t\t\t\t\tendRegExp.lastIndex = index = matches.index + matches[0].length;\n\n\t\t\t\t\t\tif (matches = endRegExp.exec(html)) {\n\t\t\t\t\t\t\tif (isValidElement)\n\t\t\t\t\t\t\t\ttext = html.substr(index, matches.index - index);\n\n\t\t\t\t\t\t\tindex = matches.index + matches[0].length;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttext = html.substr(index);\n\t\t\t\t\t\t\tindex = html.length;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isValidElement && text.length > 0)\n\t\t\t\t\t\t\tself.text(text, true);\n\n\t\t\t\t\t\tif (isValidElement)\n\t\t\t\t\t\t\tself.end(value);\n\n\t\t\t\t\t\ttokenRegExp.lastIndex = index;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Push value on to stack\n\t\t\t\t\tif (!isShortEnded) {\n\t\t\t\t\t\tif (!attribsValue || attribsValue.indexOf('/') != attribsValue.length - 1)\n\t\t\t\t\t\t\tstack.push({name: value, valid: isValidElement});\n\t\t\t\t\t\telse if (isValidElement)\n\t\t\t\t\t\t\tself.end(value);\n\t\t\t\t\t}\n\t\t\t\t} else if (value = matches[1]) { // Comment\n\t\t\t\t\tself.comment(value);\n\t\t\t\t} else if (value = matches[2]) { // CDATA\n\t\t\t\t\tself.cdata(value);\n\t\t\t\t} else if (value = matches[3]) { // DOCTYPE\n\t\t\t\t\tself.doctype(value);\n\t\t\t\t} else if (value = matches[4]) { // PI\n\t\t\t\t\tself.pi(value, matches[5]);\n\t\t\t\t}\n\n\t\t\t\tindex = matches.index + matches[0].length;\n\t\t\t}\n\n\t\t\t// Text\n\t\t\tif (index < html.length)\n\t\t\t\tself.text(decode(html.substr(index)));\n\n\t\t\t// Close any open elements\n\t\t\tfor (i = stack.length - 1; i >= 0; i--) {\n\t\t\t\tvalue = stack[i];\n\n\t\t\t\tif (value.valid)\n\t\t\t\t\tself.end(value.name);\n\t\t\t}\n\t\t};\n\t}\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/html/Node.js":"/**\n * Node.js\n *\n * Copyright 2010, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar whiteSpaceRegExp = /^[ \\t\\r\\n]*$/, typeLookup = {\n\t\t'#text' : 3,\n\t\t'#comment' : 8,\n\t\t'#cdata' : 4,\n\t\t'#pi' : 7,\n\t\t'#doctype' : 10,\n\t\t'#document-fragment' : 11\n\t};\n\n\t// Walks the tree left/right\n\tfunction walk(node, root_node, prev) {\n\t\tvar sibling, parent, startName = prev ? 'lastChild' : 'firstChild', siblingName = prev ? 'prev' : 'next';\n\n\t\t// Walk into nodes if it has a start\n\t\tif (node[startName])\n\t\t\treturn node[startName];\n\n\t\t// Return the sibling if it has one\n\t\tif (node !== root_node) {\n\t\t\tsibling = node[siblingName];\n\n\t\t\tif (sibling)\n\t\t\t\treturn sibling;\n\n\t\t\t// Walk up the parents to look for siblings\n\t\t\tfor (parent = node.parent; parent && parent !== root_node; parent = parent.parent) {\n\t\t\t\tsibling = parent[siblingName];\n\n\t\t\t\tif (sibling)\n\t\t\t\t\treturn sibling;\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * This class is a minimalistic implementation of a DOM like node used by the DomParser class.\n\t *\n\t * @example\n\t * var node = new tinymce.html.Node('strong', 1);\n\t * someRoot.append(node);\n\t *\n\t * @class tinymce.html.Node\n\t * @version 3.4\n\t */\n\n\t/**\n\t * Constructs a new Node instance.\n\t *\n\t * @constructor\n\t * @method Node\n\t * @param {String} name Name of the node type.\n\t * @param {Number} type Numeric type representing the node.\n\t */\n\tfunction Node(name, type) {\n\t\tthis.name = name;\n\t\tthis.type = type;\n\n\t\tif (type === 1) {\n\t\t\tthis.attributes = [];\n\t\t\tthis.attributes.map = {};\n\t\t}\n\t}\n\n\ttinymce.extend(Node.prototype, {\n\t\t/**\n\t\t * Replaces the current node with the specified one.\n\t\t *\n\t\t * @example\n\t\t * someNode.replace(someNewNode);\n\t\t *\n\t\t * @method replace\n\t\t * @param {tinymce.html.Node} node Node to replace the current node with.\n\t\t * @return {tinymce.html.Node} The old node that got replaced.\n\t\t */\n\t\treplace : function(node) {\n\t\t\tvar self = this;\n\n\t\t\tif (node.parent)\n\t\t\t\tnode.remove();\n\n\t\t\tself.insert(node, self);\n\t\t\tself.remove();\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Gets/sets or removes an attribute by name.\n\t\t *\n\t\t * @example\n\t\t * someNode.attr(\"name\", \"value\"); // Sets an attribute\n\t\t * console.log(someNode.attr(\"name\")); // Gets an attribute\n\t\t * someNode.attr(\"name\", null); // Removes an attribute\n\t\t *\n\t\t * @method attr\n\t\t * @param {String} name Attribute name to set or get.\n\t\t * @param {String} value Optional value to set.\n\t\t * @return {String/tinymce.html.Node} String or undefined on a get operation or the current node on a set operation.\n\t\t */\n\t\tattr : function(name, value) {\n\t\t\tvar self = this, attrs, i, undef;\n\n\t\t\tif (typeof name !== \"string\") {\n\t\t\t\tfor (i in name)\n\t\t\t\t\tself.attr(i, name[i]);\n\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\tif (attrs = self.attributes) {\n\t\t\t\tif (value !== undef) {\n\t\t\t\t\t// Remove attribute\n\t\t\t\t\tif (value === null) {\n\t\t\t\t\t\tif (name in attrs.map) {\n\t\t\t\t\t\t\tdelete attrs.map[name];\n\n\t\t\t\t\t\t\ti = attrs.length;\n\t\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\t\tif (attrs[i].name === name) {\n\t\t\t\t\t\t\t\t\tattrs = attrs.splice(i, 1);\n\t\t\t\t\t\t\t\t\treturn self;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn self;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set attribute\n\t\t\t\t\tif (name in attrs.map) {\n\t\t\t\t\t\t// Set attribute\n\t\t\t\t\t\ti = attrs.length;\n\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\tif (attrs[i].name === name) {\n\t\t\t\t\t\t\t\tattrs[i].value = value;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tattrs.push({name: name, value: value});\n\n\t\t\t\t\tattrs.map[name] = value;\n\n\t\t\t\t\treturn self;\n\t\t\t\t} else {\n\t\t\t\t\treturn attrs.map[name];\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Does a shallow clones the node into a new node. It will also exclude id attributes since\n\t\t * there should only be one id per document.\n\t\t *\n\t\t * @example\n\t\t * var clonedNode = node.clone();\n\t\t *\n\t\t * @method clone\n\t\t * @return {tinymce.html.Node} New copy of the original node.\n\t\t */\n\t\tclone : function() {\n\t\t\tvar self = this, clone = new Node(self.name, self.type), i, l, selfAttrs, selfAttr, cloneAttrs;\n\n\t\t\t// Clone element attributes\n\t\t\tif (selfAttrs = self.attributes) {\n\t\t\t\tcloneAttrs = [];\n\t\t\t\tcloneAttrs.map = {};\n\n\t\t\t\tfor (i = 0, l = selfAttrs.length; i < l; i++) {\n\t\t\t\t\tselfAttr = selfAttrs[i];\n\n\t\t\t\t\t// Clone everything except id\n\t\t\t\t\tif (selfAttr.name !== 'id') {\n\t\t\t\t\t\tcloneAttrs[cloneAttrs.length] = {name: selfAttr.name, value: selfAttr.value};\n\t\t\t\t\t\tcloneAttrs.map[selfAttr.name] = selfAttr.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tclone.attributes = cloneAttrs;\n\t\t\t}\n\n\t\t\tclone.value = self.value;\n\t\t\tclone.shortEnded = self.shortEnded;\n\n\t\t\treturn clone;\n\t\t},\n\n\t\t/**\n\t\t * Wraps the node in in another node.\n\t\t *\n\t\t * @example\n\t\t * node.wrap(wrapperNode);\n\t\t *\n\t\t * @method wrap\n\t\t */\n\t\twrap : function(wrapper) {\n\t\t\tvar self = this;\n\n\t\t\tself.parent.insert(wrapper, self);\n\t\t\twrapper.append(self);\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Unwraps the node in other words it removes the node but keeps the children.\n\t\t *\n\t\t * @example\n\t\t * node.unwrap();\n\t\t *\n\t\t * @method unwrap\n\t\t */\n\t\tunwrap : function() {\n\t\t\tvar self = this, node, next;\n\n\t\t\tfor (node = self.firstChild; node; ) {\n\t\t\t\tnext = node.next;\n\t\t\t\tself.insert(node, self, true);\n\t\t\t\tnode = next;\n\t\t\t}\n\n\t\t\tself.remove();\n\t\t},\n\n\t\t/**\n\t\t * Removes the node from it's parent.\n\t\t *\n\t\t * @example\n\t\t * node.remove();\n\t\t *\n\t\t * @method remove\n\t\t * @return {tinymce.html.Node} Current node that got removed.\n\t\t */\n\t\tremove : function() {\n\t\t\tvar self = this, parent = self.parent, next = self.next, prev = self.prev;\n\n\t\t\tif (parent) {\n\t\t\t\tif (parent.firstChild === self) {\n\t\t\t\t\tparent.firstChild = next;\n\n\t\t\t\t\tif (next)\n\t\t\t\t\t\tnext.prev = null;\n\t\t\t\t} else {\n\t\t\t\t\tprev.next = next;\n\t\t\t\t}\n\n\t\t\t\tif (parent.lastChild === self) {\n\t\t\t\t\tparent.lastChild = prev;\n\n\t\t\t\t\tif (prev)\n\t\t\t\t\t\tprev.next = null;\n\t\t\t\t} else {\n\t\t\t\t\tnext.prev = prev;\n\t\t\t\t}\n\n\t\t\t\tself.parent = self.next = self.prev = null;\n\t\t\t}\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Appends a new node as a child of the current node.\n\t\t *\n\t\t * @example\n\t\t * node.append(someNode);\n\t\t *\n\t\t * @method append\n\t\t * @param {tinymce.html.Node} node Node to append as a child of the current one.\n\t\t * @return {tinymce.html.Node} The node that got appended.\n\t\t */\n\t\tappend : function(node) {\n\t\t\tvar self = this, last;\n\n\t\t\tif (node.parent)\n\t\t\t\tnode.remove();\n\n\t\t\tlast = self.lastChild;\n\t\t\tif (last) {\n\t\t\t\tlast.next = node;\n\t\t\t\tnode.prev = last;\n\t\t\t\tself.lastChild = node;\n\t\t\t} else\n\t\t\t\tself.lastChild = self.firstChild = node;\n\n\t\t\tnode.parent = self;\n\n\t\t\treturn node;\n\t\t},\n\n\t\t/**\n\t\t * Inserts a node at a specific position as a child of the current node.\n\t\t *\n\t\t * @example\n\t\t * parentNode.insert(newChildNode, oldChildNode);\n\t\t *\n\t\t * @method insert\n\t\t * @param {tinymce.html.Node} node Node to insert as a child of the current node.\n\t\t * @param {tinymce.html.Node} ref_node Reference node to set node before/after.\n\t\t * @param {Boolean} before Optional state to insert the node before the reference node.\n\t\t * @return {tinymce.html.Node} The node that got inserted.\n\t\t */\n\t\tinsert : function(node, ref_node, before) {\n\t\t\tvar parent;\n\n\t\t\tif (node.parent)\n\t\t\t\tnode.remove();\n\n\t\t\tparent = ref_node.parent || this;\n\n\t\t\tif (before) {\n\t\t\t\tif (ref_node === parent.firstChild)\n\t\t\t\t\tparent.firstChild = node;\n\t\t\t\telse\n\t\t\t\t\tref_node.prev.next = node;\n\n\t\t\t\tnode.prev = ref_node.prev;\n\t\t\t\tnode.next = ref_node;\n\t\t\t\tref_node.prev = node;\n\t\t\t} else {\n\t\t\t\tif (ref_node === parent.lastChild)\n\t\t\t\t\tparent.lastChild = node;\n\t\t\t\telse\n\t\t\t\t\tref_node.next.prev = node;\n\n\t\t\t\tnode.next = ref_node.next;\n\t\t\t\tnode.prev = ref_node;\n\t\t\t\tref_node.next = node;\n\t\t\t}\n\n\t\t\tnode.parent = parent;\n\n\t\t\treturn node;\n\t\t},\n\n\t\t/**\n\t\t * Get all children by name.\n\t\t *\n\t\t * @method getAll\n\t\t * @param {String} name Name of the child nodes to collect.\n\t\t * @return {Array} Array with child nodes matchin the specified name.\n\t\t */\n\t\tgetAll : function(name) {\n\t\t\tvar self = this, node, collection = [];\n\n\t\t\tfor (node = self.firstChild; node; node = walk(node, self)) {\n\t\t\t\tif (node.name === name)\n\t\t\t\t\tcollection.push(node);\n\t\t\t}\n\n\t\t\treturn collection;\n\t\t},\n\n\t\t/**\n\t\t * Removes all children of the current node.\n\t\t *\n\t\t * @method empty\n\t\t * @return {tinymce.html.Node} The current node that got cleared.\n\t\t */\n\t\tempty : function() {\n\t\t\tvar self = this, nodes, i, node;\n\n\t\t\t// Remove all children\n\t\t\tif (self.firstChild) {\n\t\t\t\tnodes = [];\n\n\t\t\t\t// Collect the children\n\t\t\t\tfor (node = self.firstChild; node; node = walk(node, self))\n\t\t\t\t\tnodes.push(node);\n\n\t\t\t\t// Remove the children\n\t\t\t\ti = nodes.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\tnode = nodes[i];\n\t\t\t\t\tnode.parent = node.firstChild = node.lastChild = node.next = node.prev = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tself.firstChild = self.lastChild = null;\n\n\t\t\treturn self;\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the node is to be considered empty or not.\n\t\t *\n\t\t * @example\n\t\t * node.isEmpty({img : true});\n\t\t * @method isEmpty\n\t\t * @param {Object} elements Name/value object with elements that are automatically treated as non empty elements.\n\t\t * @return {Boolean} true/false if the node is empty or not.\n\t\t */\n\t\tisEmpty : function(elements) {\n\t\t\tvar self = this, node = self.firstChild, i, name;\n\n\t\t\tif (node) {\n\t\t\t\tdo {\n\t\t\t\t\tif (node.type === 1) {\n\t\t\t\t\t\t// Ignore bogus elements\n\t\t\t\t\t\tif (node.attributes.map['data-mce-bogus'])\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\t// Keep empty elements like <img />\n\t\t\t\t\t\tif (elements[node.name])\n\t\t\t\t\t\t\treturn false;\n\n\t\t\t\t\t\t// Keep elements with data attributes or name attribute like <a name=\"1\"></a>\n\t\t\t\t\t\ti = node.attributes.length;\n\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\tname = node.attributes[i].name;\n\t\t\t\t\t\t\tif (name === \"name\" || name.indexOf('data-') === 0)\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Keep non whitespace text nodes\n\t\t\t\t\tif ((node.type === 3 && !whiteSpaceRegExp.test(node.value)))\n\t\t\t\t\t\treturn false;\n\t\t\t\t} while (node = walk(node, self));\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\t/**\n\t\t * Walks to the next or previous node and returns that node or null if it wasn't found.\n\t\t *\n\t\t * @method walk\n\t\t * @param {Boolean} prev Optional previous node state defaults to false.\n\t\t * @return {tinymce.html.Node} Node that is next to or previous of the current node.\n\t\t */\n\t\twalk : function(prev) {\n\t\t\treturn walk(this, null, prev);\n\t\t}\n\t});\n\n\ttinymce.extend(Node, {\n\t\t/**\n\t\t * Creates a node of a specific type.\n\t\t *\n\t\t * @static\n\t\t * @method create\n\t\t * @param {String} name Name of the node type to create for example \"b\" or \"#text\".\n\t\t * @param {Object} attrs Name/value collection of attributes that will be applied to elements.\n\t\t */\n\t\tcreate : function(name, attrs) {\n\t\t\tvar node, attrName;\n\n\t\t\t// Create node\n\t\t\tnode = new Node(name, typeLookup[name] || 1);\n\n\t\t\t// Add attributes if needed\n\t\t\tif (attrs) {\n\t\t\t\tfor (attrName in attrs)\n\t\t\t\t\tnode.attr(attrName, attrs[attrName]);\n\t\t\t}\n\n\t\t\treturn node;\n\t\t}\n\t});\n\n\ttinymce.html.Node = Node;\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/html/Styles.js":"/**\n * Styles.js\n *\n * Copyright 2010, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n/**\n * This class is used to parse CSS styles it also compresses styles to reduce the output size.\n *\n * @example\n * var Styles = new tinymce.html.Styles({\n *    url_converter: function(url) {\n *       return url;\n *    }\n * });\n *\n * styles = Styles.parse('border: 1px solid red');\n * styles.color = 'red';\n *\n * console.log(new tinymce.html.StyleSerializer().serialize(styles));\n *\n * @class tinymce.html.Styles\n * @version 3.4\n */\ntinymce.html.Styles = function(settings, schema) {\n\tvar rgbRegExp = /rgb\\s*\\(\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*\\)/gi,\n\t\turlOrStrRegExp = /(?:url(?:(?:\\(\\s*\\\"([^\\\"]+)\\\"\\s*\\))|(?:\\(\\s*\\'([^\\']+)\\'\\s*\\))|(?:\\(\\s*([^)\\s]+)\\s*\\))))|(?:\\'([^\\']+)\\')|(?:\\\"([^\\\"]+)\\\")/gi,\n\t\tstyleRegExp = /\\s*([^:]+):\\s*([^;]+);?/g,\n\t\ttrimRightRegExp = /\\s+$/,\n\t\turlColorRegExp = /rgb/,\n\t\tundef, i, encodingLookup = {}, encodingItems;\n\n\tsettings = settings || {};\n\n\tencodingItems = '\\\\\" \\\\\\' \\\\; \\\\: ; : \\uFEFF'.split(' ');\n\tfor (i = 0; i < encodingItems.length; i++) {\n\t\tencodingLookup[encodingItems[i]] = '\\uFEFF' + i;\n\t\tencodingLookup['\\uFEFF' + i] = encodingItems[i];\n\t}\n\n\tfunction toHex(match, r, g, b) {\n\t\tfunction hex(val) {\n\t\t\tval = parseInt(val).toString(16);\n\n\t\t\treturn val.length > 1 ? val : '0' + val; // 0 -> 00\n\t\t};\n\n\t\treturn '#' + hex(r) + hex(g) + hex(b);\n\t};\n\n\treturn {\n\t\t/**\n\t\t * Parses the specified RGB color value and returns a hex version of that color.\n\t\t *\n\t\t * @method toHex\n\t\t * @param {String} color RGB string value like rgb(1,2,3)\n\t\t * @return {String} Hex version of that RGB value like #FF00FF.\n\t\t */\n\t\ttoHex : function(color) {\n\t\t\treturn color.replace(rgbRegExp, toHex);\n\t\t},\n\n\t\t/**\n\t\t * Parses the specified style value into an object collection. This parser will also\n\t\t * merge and remove any redundant items that browsers might have added. It will also convert non hex\n\t\t * colors to hex values. Urls inside the styles will also be converted to absolute/relative based on settings.\n\t\t *\n\t\t * @method parse\n\t\t * @param {String} css Style value to parse for example: border:1px solid red;.\n\t\t * @return {Object} Object representation of that style like {border : '1px solid red'}\n\t\t */\n\t\tparse : function(css) {\n\t\t\tvar styles = {}, matches, name, value, isEncoded, urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope || this;\n\n\t\t\tfunction compress(prefix, suffix) {\n\t\t\t\tvar top, right, bottom, left;\n\n\t\t\t\t// Get values and check it needs compressing\n\t\t\t\ttop = styles[prefix + '-top' + suffix];\n\t\t\t\tif (!top)\n\t\t\t\t\treturn;\n\n\t\t\t\tright = styles[prefix + '-right' + suffix];\n\t\t\t\tif (top != right)\n\t\t\t\t\treturn;\n\n\t\t\t\tbottom = styles[prefix + '-bottom' + suffix];\n\t\t\t\tif (right != bottom)\n\t\t\t\t\treturn;\n\n\t\t\t\tleft = styles[prefix + '-left' + suffix];\n\t\t\t\tif (bottom != left)\n\t\t\t\t\treturn;\n\n\t\t\t\t// Compress\n\t\t\t\tstyles[prefix + suffix] = left;\n\t\t\t\tdelete styles[prefix + '-top' + suffix];\n\t\t\t\tdelete styles[prefix + '-right' + suffix];\n\t\t\t\tdelete styles[prefix + '-bottom' + suffix];\n\t\t\t\tdelete styles[prefix + '-left' + suffix];\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Checks if the specific style can be compressed in other words if all border-width are equal.\n\t\t\t */\n\t\t\tfunction canCompress(key) {\n\t\t\t\tvar value = styles[key], i;\n\n\t\t\t\tif (!value || value.indexOf(' ') < 0)\n\t\t\t\t\treturn;\n\n\t\t\t\tvalue = value.split(' ');\n\t\t\t\ti = value.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\tif (value[i] !== value[0])\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tstyles[key] = value[0];\n\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Compresses multiple styles into one style.\n\t\t\t */\n\t\t\tfunction compress2(target, a, b, c) {\n\t\t\t\tif (!canCompress(a))\n\t\t\t\t\treturn;\n\n\t\t\t\tif (!canCompress(b))\n\t\t\t\t\treturn;\n\n\t\t\t\tif (!canCompress(c))\n\t\t\t\t\treturn;\n\n\t\t\t\t// Compress\n\t\t\t\tstyles[target] = styles[a] + ' ' + styles[b] + ' ' + styles[c];\n\t\t\t\tdelete styles[a];\n\t\t\t\tdelete styles[b];\n\t\t\t\tdelete styles[c];\n\t\t\t};\n\n\t\t\t// Encodes the specified string by replacing all \\\" \\' ; : with _<num>\n\t\t\tfunction encode(str) {\n\t\t\t\tisEncoded = true;\n\n\t\t\t\treturn encodingLookup[str];\n\t\t\t};\n\n\t\t\t// Decodes the specified string by replacing all _<num> with it's original value \\\" \\' etc\n\t\t\t// It will also decode the \\\" \\' if keep_slashes is set to fale or omitted\n\t\t\tfunction decode(str, keep_slashes) {\n\t\t\t\tif (isEncoded) {\n\t\t\t\t\tstr = str.replace(/\\uFEFF[0-9]/g, function(str) {\n\t\t\t\t\t\treturn encodingLookup[str];\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (!keep_slashes)\n\t\t\t\t\tstr = str.replace(/\\\\([\\'\\\";:])/g, \"$1\");\n\n\t\t\t\treturn str;\n\t\t\t}\n\n\t\t\tif (css) {\n\t\t\t\t// Encode \\\" \\' % and ; and : inside strings so they don't interfere with the style parsing\n\t\t\t\tcss = css.replace(/\\\\[\\\"\\';:\\uFEFF]/g, encode).replace(/\\\"[^\\\"]+\\\"|\\'[^\\']+\\'/g, function(str) {\n\t\t\t\t\treturn str.replace(/[;:]/g, encode);\n\t\t\t\t});\n\n\t\t\t\t// Parse styles\n\t\t\t\twhile (matches = styleRegExp.exec(css)) {\n\t\t\t\t\tname = matches[1].replace(trimRightRegExp, '').toLowerCase();\n\t\t\t\t\tvalue = matches[2].replace(trimRightRegExp, '');\n\n\t\t\t\t\tif (name && value.length > 0) {\n\t\t\t\t\t\t// Opera will produce 700 instead of bold in their style values\n\t\t\t\t\t\tif (name === 'font-weight' && value === '700')\n\t\t\t\t\t\t\tvalue = 'bold';\n\t\t\t\t\t\telse if (name === 'color' || name === 'background-color') // Lowercase colors like RED\n\t\t\t\t\t\t\tvalue = value.toLowerCase();\t\t\n\n\t\t\t\t\t\t// Convert RGB colors to HEX\n\t\t\t\t\t\tvalue = value.replace(rgbRegExp, toHex);\n\n\t\t\t\t\t\t// Convert URLs and force them into url('value') format\n\t\t\t\t\t\tvalue = value.replace(urlOrStrRegExp, function(match, url, url2, url3, str, str2) {\n\t\t\t\t\t\t\tstr = str || str2;\n\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr = decode(str);\n\n\t\t\t\t\t\t\t\t// Force strings into single quote format\n\t\t\t\t\t\t\t\treturn \"'\" + str.replace(/\\'/g, \"\\\\'\") + \"'\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\turl = decode(url || url2 || url3);\n\n\t\t\t\t\t\t\t// Convert the URL to relative/absolute depending on config\n\t\t\t\t\t\t\tif (urlConverter)\n\t\t\t\t\t\t\t\turl = urlConverter.call(urlConverterScope, url, 'style');\n\n\t\t\t\t\t\t\t// Output new URL format\n\t\t\t\t\t\t\treturn \"url('\" + url.replace(/\\'/g, \"\\\\'\") + \"')\";\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tstyles[name] = isEncoded ? decode(value, true) : value;\n\t\t\t\t\t}\n\n\t\t\t\t\tstyleRegExp.lastIndex = matches.index + matches[0].length;\n\t\t\t\t}\n\n\t\t\t\t// Compress the styles to reduce it's size for example IE will expand styles\n\t\t\t\tcompress(\"border\", \"\");\n\t\t\t\tcompress(\"border\", \"-width\");\n\t\t\t\tcompress(\"border\", \"-color\");\n\t\t\t\tcompress(\"border\", \"-style\");\n\t\t\t\tcompress(\"padding\", \"\");\n\t\t\t\tcompress(\"margin\", \"\");\n\t\t\t\tcompress2('border', 'border-width', 'border-style', 'border-color');\n\n\t\t\t\t// Remove pointless border, IE produces these\n\t\t\t\tif (styles.border === 'medium none')\n\t\t\t\t\tdelete styles.border;\n\t\t\t}\n\n\t\t\treturn styles;\n\t\t},\n\n\t\t/**\n\t\t * Serializes the specified style object into a string.\n\t\t *\n\t\t * @method serialize\n\t\t * @param {Object} styles Object to serialize as string for example: {border : '1px solid red'}\n\t\t * @param {String} element_name Optional element name, if specified only the styles that matches the schema will be serialized.\n\t\t * @return {String} String representation of the style object for example: border: 1px solid red.\n\t\t */\n\t\tserialize : function(styles, element_name) {\n\t\t\tvar css = '', name, value;\n\n\t\t\tfunction serializeStyles(name) {\n\t\t\t\tvar styleList, i, l, value;\n\n\t\t\t\tstyleList = schema.styles[name];\n\t\t\t\tif (styleList) {\n\t\t\t\t\tfor (i = 0, l = styleList.length; i < l; i++) {\n\t\t\t\t\t\tname = styleList[i];\n\t\t\t\t\t\tvalue = styles[name];\n\n\t\t\t\t\t\tif (value !== undef && value.length > 0)\n\t\t\t\t\t\t\tcss += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Serialize styles according to schema\n\t\t\tif (element_name && schema && schema.styles) {\n\t\t\t\t// Serialize global styles and element specific styles\n\t\t\t\tserializeStyles('*');\n\t\t\t\tserializeStyles(element_name);\n\t\t\t} else {\n\t\t\t\t// Output the styles in the order they are inside the object\n\t\t\t\tfor (name in styles) {\n\t\t\t\t\tvalue = styles[name];\n\n\t\t\t\t\tif (value !== undef && value.length > 0)\n\t\t\t\t\t\tcss += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn css;\n\t\t}\n\t};\n};\n","Magento_Tinymce3/tiny_mce/classes/html/DomParser.js":"/**\n * DomParser.js\n *\n * Copyright 2010, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar Node = tinymce.html.Node;\n\n\t/**\n\t * This class parses HTML code into a DOM like structure of nodes it will remove redundant whitespace and make\n\t * sure that the node tree is valid according to the specified schema. So for example: <p>a<p>b</p>c</p> will become <p>a</p><p>b</p><p>c</p>\n\t *\n\t * @example\n\t * var parser = new tinymce.html.DomParser({validate: true}, schema);\n\t * var rootNode = parser.parse('<h1>content</h1>');\n\t *\n\t * @class tinymce.html.DomParser\n\t * @version 3.4\n\t */\n\n\t/**\n\t * Constructs a new DomParser instance.\n\t *\n\t * @constructor\n\t * @method DomParser\n\t * @param {Object} settings Name/value collection of settings. comment, cdata, text, start and end are callbacks.\n\t * @param {tinymce.html.Schema} schema HTML Schema class to use when parsing.\n\t */\n\ttinymce.html.DomParser = function(settings, schema) {\n\t\tvar self = this, nodeFilters = {}, attributeFilters = [], matchedNodes = {}, matchedAttributes = {};\n\n\t\tsettings = settings || {};\n\t\tsettings.validate = \"validate\" in settings ? settings.validate : true;\n\t\tsettings.root_name = settings.root_name || 'body';\n\t\tself.schema = schema = schema || new tinymce.html.Schema();\n\n\t\tfunction fixInvalidChildren(nodes) {\n\t\t\tvar ni, node, parent, parents, newParent, currentNode, tempNode, childNode, i,\n\t\t\t\tchildClone, nonEmptyElements, nonSplitableElements, sibling, nextNode;\n\n\t\t\tnonSplitableElements = tinymce.makeMap('tr,td,th,tbody,thead,tfoot,table');\n\t\t\tnonEmptyElements = schema.getNonEmptyElements();\n\n\t\t\tfor (ni = 0; ni < nodes.length; ni++) {\n\t\t\t\tnode = nodes[ni];\n\n\t\t\t\t// Already removed\n\t\t\t\tif (!node.parent)\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// Get list of all parent nodes until we find a valid parent to stick the child into\n\t\t\t\tparents = [node];\n\t\t\t\tfor (parent = node.parent; parent && !schema.isValidChild(parent.name, node.name) && !nonSplitableElements[parent.name]; parent = parent.parent)\n\t\t\t\t\tparents.push(parent);\n\n\t\t\t\t// Found a suitable parent\n\t\t\t\tif (parent && parents.length > 1) {\n\t\t\t\t\t// Reverse the array since it makes looping easier\n\t\t\t\t\tparents.reverse();\n\n\t\t\t\t\t// Clone the related parent and insert that after the moved node\n\t\t\t\t\tnewParent = currentNode = self.filterNode(parents[0].clone());\n\n\t\t\t\t\t// Start cloning and moving children on the left side of the target node\n\t\t\t\t\tfor (i = 0; i < parents.length - 1; i++) {\n\t\t\t\t\t\tif (schema.isValidChild(currentNode.name, parents[i].name)) {\n\t\t\t\t\t\t\ttempNode = self.filterNode(parents[i].clone());\n\t\t\t\t\t\t\tcurrentNode.append(tempNode);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\ttempNode = currentNode;\n\n\t\t\t\t\t\tfor (childNode = parents[i].firstChild; childNode && childNode != parents[i + 1]; ) {\n\t\t\t\t\t\t\tnextNode = childNode.next;\n\t\t\t\t\t\t\ttempNode.append(childNode);\n\t\t\t\t\t\t\tchildNode = nextNode;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcurrentNode = tempNode;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!newParent.isEmpty(nonEmptyElements)) {\n\t\t\t\t\t\tparent.insert(newParent, parents[0], true);\n\t\t\t\t\t\tparent.insert(node, newParent);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparent.insert(node, parents[0], true);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check if the element is empty by looking through it's contents and special treatment for <p><br /></p>\n\t\t\t\t\tparent = parents[0];\n\t\t\t\t\tif (parent.isEmpty(nonEmptyElements) || parent.firstChild === parent.lastChild && parent.firstChild.name === 'br') {\n\t\t\t\t\t\tparent.empty().remove();\n\t\t\t\t\t}\n\t\t\t\t} else if (node.parent) {\n\t\t\t\t\t// If it's an LI try to find a UL/OL for it or wrap it\n\t\t\t\t\tif (node.name === 'li') {\n\t\t\t\t\t\tsibling = node.prev;\n\t\t\t\t\t\tif (sibling && (sibling.name === 'ul' || sibling.name === 'ul')) {\n\t\t\t\t\t\t\tsibling.append(node);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsibling = node.next;\n\t\t\t\t\t\tif (sibling && (sibling.name === 'ul' || sibling.name === 'ul')) {\n\t\t\t\t\t\t\tsibling.insert(node, sibling.firstChild, true);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode.wrap(self.filterNode(new Node('ul', 1)));\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Try wrapping the element in a DIV\n\t\t\t\t\tif (schema.isValidChild(node.parent.name, 'div') && schema.isValidChild('div', node.name)) {\n\t\t\t\t\t\tnode.wrap(self.filterNode(new Node('div', 1)));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// We failed wrapping it, then remove or unwrap it\n\t\t\t\t\t\tif (node.name === 'style' || node.name === 'script')\n\t\t\t\t\t\t\tnode.empty().remove();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tnode.unwrap();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Runs the specified node though the element and attributes filters.\n\t\t *\n\t\t * @param {tinymce.html.Node} Node the node to run filters on.\n\t\t * @return {tinymce.html.Node} The passed in node.\n\t\t */\n\t\tself.filterNode = function(node) {\n\t\t\tvar i, name, list;\n\n\t\t\t// Run element filters\n\t\t\tif (name in nodeFilters) {\n\t\t\t\tlist = matchedNodes[name];\n\n\t\t\t\tif (list)\n\t\t\t\t\tlist.push(node);\n\t\t\t\telse\n\t\t\t\t\tmatchedNodes[name] = [node];\n\t\t\t}\n\n\t\t\t// Run attribute filters\n\t\t\ti = attributeFilters.length;\n\t\t\twhile (i--) {\n\t\t\t\tname = attributeFilters[i].name;\n\n\t\t\t\tif (name in node.attributes.map) {\n\t\t\t\t\tlist = matchedAttributes[name];\n\n\t\t\t\t\tif (list)\n\t\t\t\t\t\tlist.push(node);\n\t\t\t\t\telse\n\t\t\t\t\t\tmatchedAttributes[name] = [node];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn node;\n\t\t};\n\n\t\t/**\n\t\t * Adds a node filter function to the parser, the parser will collect the specified nodes by name\n\t\t * and then execute the callback ones it has finished parsing the document.\n\t\t *\n\t\t * @example\n\t\t * parser.addNodeFilter('p,h1', function(nodes, name) {\n\t\t *\t\tfor (var i = 0; i < nodes.length; i++) {\n\t\t *\t\t\tconsole.log(nodes[i].name);\n\t\t *\t\t}\n\t\t * });\n\t\t * @method addNodeFilter\n\t\t * @method {String} name Comma separated list of nodes to collect.\n\t\t * @param {function} callback Callback function to execute once it has collected nodes.\n\t\t */\n\t\tself.addNodeFilter = function(name, callback) {\n\t\t\ttinymce.each(tinymce.explode(name), function(name) {\n\t\t\t\tvar list = nodeFilters[name];\n\n\t\t\t\tif (!list)\n\t\t\t\t\tnodeFilters[name] = list = [];\n\n\t\t\t\tlist.push(callback);\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Adds a attribute filter function to the parser, the parser will collect nodes that has the specified attributes\n\t\t * and then execute the callback ones it has finished parsing the document.\n\t\t *\n\t\t * @example\n\t\t * parser.addAttributeFilter('src,href', function(nodes, name) {\n\t\t *\t\tfor (var i = 0; i < nodes.length; i++) {\n\t\t *\t\t\tconsole.log(nodes[i].name);\n\t\t *\t\t}\n\t\t * });\n\t\t * @method addAttributeFilter\n\t\t * @method {String} name Comma separated list of nodes to collect.\n\t\t * @param {function} callback Callback function to execute once it has collected nodes.\n\t\t */\n\t\tself.addAttributeFilter = function(name, callback) {\n\t\t\ttinymce.each(tinymce.explode(name), function(name) {\n\t\t\t\tvar i;\n\n\t\t\t\tfor (i = 0; i < attributeFilters.length; i++) {\n\t\t\t\t\tif (attributeFilters[i].name === name) {\n\t\t\t\t\t\tattributeFilters[i].callbacks.push(callback);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tattributeFilters.push({name: name, callbacks: [callback]});\n\t\t\t});\n\t\t};\n\n\t\t/**\n\t\t * Parses the specified HTML string into a DOM like node tree and returns the result.\n\t\t *\n\t\t * @example\n\t\t * var rootNode = new DomParser({...}).parse('<b>text</b>');\n\t\t * @method parse\n\t\t * @param {String} html Html string to sax parse.\n\t\t * @param {Object} args Optional args object that gets passed to all filter functions.\n\t\t * @return {tinymce.html.Node} Root node containing the tree.\n\t\t */\n\t\tself.parse = function(html, args) {\n\t\t\tvar parser, rootNode, node, nodes, i, l, fi, fl, list, name, validate,\n\t\t\t\tblockElements, startWhiteSpaceRegExp, invalidChildren = [],\n\t\t\t\tendWhiteSpaceRegExp, allWhiteSpaceRegExp, whiteSpaceElements, children, nonEmptyElements, rootBlockName;\n\n\t\t\targs = args || {};\n\t\t\tmatchedNodes = {};\n\t\t\tmatchedAttributes = {};\n\t\t\tblockElements = tinymce.extend(tinymce.makeMap('script,style,head,html,body,title,meta,param'), schema.getBlockElements());\n\t\t\tnonEmptyElements = schema.getNonEmptyElements();\n\t\t\tchildren = schema.children;\n\t\t\tvalidate = settings.validate;\n\t\t\trootBlockName = \"forced_root_block\" in args ? args.forced_root_block : settings.forced_root_block;\n\n\t\t\twhiteSpaceElements = schema.getWhiteSpaceElements();\n\t\t\tstartWhiteSpaceRegExp = /^[ \\t\\r\\n]+/;\n\t\t\tendWhiteSpaceRegExp = /[ \\t\\r\\n]+$/;\n\t\t\tallWhiteSpaceRegExp = /[ \\t\\r\\n]+/g;\n\n\t\t\tfunction addRootBlocks() {\n\t\t\t\tvar node = rootNode.firstChild, next, rootBlockNode;\n\n\t\t\t\twhile (node) {\n\t\t\t\t\tnext = node.next;\n\n\t\t\t\t\tif (node.type == 3 || (node.type == 1 && node.name !== 'p' && !blockElements[node.name] && !node.attr('data-mce-type'))) {\n\t\t\t\t\t\tif (!rootBlockNode) {\n\t\t\t\t\t\t\t// Create a new root block element\n\t\t\t\t\t\t\trootBlockNode = createNode(rootBlockName, 1);\n\t\t\t\t\t\t\trootNode.insert(rootBlockNode, node);\n\t\t\t\t\t\t\trootBlockNode.append(node);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\trootBlockNode.append(node);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trootBlockNode = null;\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = next;\n\t\t\t\t};\n\t\t\t};\n\n\t\t\tfunction createNode(name, type) {\n\t\t\t\tvar node = new Node(name, type), list;\n\n\t\t\t\tif (name in nodeFilters) {\n\t\t\t\t\tlist = matchedNodes[name];\n\n\t\t\t\t\tif (list)\n\t\t\t\t\t\tlist.push(node);\n\t\t\t\t\telse\n\t\t\t\t\t\tmatchedNodes[name] = [node];\n\t\t\t\t}\n\n\t\t\t\treturn node;\n\t\t\t};\n\n\t\t\tfunction removeWhitespaceBefore(node) {\n\t\t\t\tvar textNode, textVal, sibling;\n\n\t\t\t\tfor (textNode = node.prev; textNode && textNode.type === 3; ) {\n\t\t\t\t\ttextVal = textNode.value.replace(endWhiteSpaceRegExp, '');\n\n\t\t\t\t\tif (textVal.length > 0) {\n\t\t\t\t\t\ttextNode.value = textVal;\n\t\t\t\t\t\ttextNode = textNode.prev;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsibling = textNode.prev;\n\t\t\t\t\t\ttextNode.remove();\n\t\t\t\t\t\ttextNode = sibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tparser = new tinymce.html.SaxParser({\n\t\t\t\tvalidate : validate,\n\t\t\t\tfix_self_closing : !validate, // Let the DOM parser handle <li> in <li> or <p> in <p> for better results\n\n\t\t\t\tcdata: function(text) {\n\t\t\t\t\tnode.append(createNode('#cdata', 4)).value = text;\n\t\t\t\t},\n\n\t\t\t\ttext: function(text, raw) {\n\t\t\t\t\tvar textNode;\n\n\t\t\t\t\t// Trim all redundant whitespace on non white space elements\n\t\t\t\t\tif (!whiteSpaceElements[node.name]) {\n\t\t\t\t\t\ttext = text.replace(allWhiteSpaceRegExp, ' ');\n\n\t\t\t\t\t\tif (node.lastChild && blockElements[node.lastChild.name])\n\t\t\t\t\t\t\ttext = text.replace(startWhiteSpaceRegExp, '');\n\t\t\t\t\t}\n\n\t\t\t\t\t// Do we need to create the node\n\t\t\t\t\tif (text.length !== 0) {\n\t\t\t\t\t\ttextNode = createNode('#text', 3);\n\t\t\t\t\t\ttextNode.raw = !!raw;\n\t\t\t\t\t\tnode.append(textNode).value = text;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tcomment: function(text) {\n\t\t\t\t\tnode.append(createNode('#comment', 8)).value = text;\n\t\t\t\t},\n\n\t\t\t\tpi: function(name, text) {\n\t\t\t\t\tnode.append(createNode(name, 7)).value = text;\n\t\t\t\t\tremoveWhitespaceBefore(node);\n\t\t\t\t},\n\n\t\t\t\tdoctype: function(text) {\n\t\t\t\t\tvar newNode;\n\t\t\n\t\t\t\t\tnewNode = node.append(createNode('#doctype', 10));\n\t\t\t\t\tnewNode.value = text;\n\t\t\t\t\tremoveWhitespaceBefore(node);\n\t\t\t\t},\n\n\t\t\t\tstart: function(name, attrs, empty) {\n\t\t\t\t\tvar newNode, attrFiltersLen, elementRule, textNode, attrName, text, sibling, parent;\n\n\t\t\t\t\telementRule = validate ? schema.getElementRule(name) : {};\n\t\t\t\t\tif (elementRule) {\n\t\t\t\t\t\tnewNode = createNode(elementRule.outputName || name, 1);\n\t\t\t\t\t\tnewNode.attributes = attrs;\n\t\t\t\t\t\tnewNode.shortEnded = empty;\n\n\t\t\t\t\t\tnode.append(newNode);\n\n\t\t\t\t\t\t// Check if node is valid child of the parent node is the child is\n\t\t\t\t\t\t// unknown we don't collect it since it's probably a custom element\n\t\t\t\t\t\tparent = children[node.name];\n\t\t\t\t\t\tif (parent && children[newNode.name] && !parent[newNode.name])\n\t\t\t\t\t\t\tinvalidChildren.push(newNode);\n\n\t\t\t\t\t\tattrFiltersLen = attributeFilters.length;\n\t\t\t\t\t\twhile (attrFiltersLen--) {\n\t\t\t\t\t\t\tattrName = attributeFilters[attrFiltersLen].name;\n\n\t\t\t\t\t\t\tif (attrName in attrs.map) {\n\t\t\t\t\t\t\t\tlist = matchedAttributes[attrName];\n\n\t\t\t\t\t\t\t\tif (list)\n\t\t\t\t\t\t\t\t\tlist.push(newNode);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tmatchedAttributes[attrName] = [newNode];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Trim whitespace before block\n\t\t\t\t\t\tif (blockElements[name])\n\t\t\t\t\t\t\tremoveWhitespaceBefore(newNode);\n\n\t\t\t\t\t\t// Change current node if the element wasn't empty i.e not <br /> or <img />\n\t\t\t\t\t\tif (!empty)\n\t\t\t\t\t\t\tnode = newNode;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tend: function(name) {\n\t\t\t\t\tvar textNode, elementRule, text, sibling, tempNode;\n\n\t\t\t\t\telementRule = validate ? schema.getElementRule(name) : {};\n\t\t\t\t\tif (elementRule) {\n\t\t\t\t\t\tif (blockElements[name]) {\n\t\t\t\t\t\t\tif (!whiteSpaceElements[node.name]) {\n\t\t\t\t\t\t\t\t// Trim whitespace at beginning of block\n\t\t\t\t\t\t\t\tfor (textNode = node.firstChild; textNode && textNode.type === 3; ) {\n\t\t\t\t\t\t\t\t\ttext = textNode.value.replace(startWhiteSpaceRegExp, '');\n\n\t\t\t\t\t\t\t\t\tif (text.length > 0) {\n\t\t\t\t\t\t\t\t\t\ttextNode.value = text;\n\t\t\t\t\t\t\t\t\t\ttextNode = textNode.next;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tsibling = textNode.next;\n\t\t\t\t\t\t\t\t\t\ttextNode.remove();\n\t\t\t\t\t\t\t\t\t\ttextNode = sibling;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Trim whitespace at end of block\n\t\t\t\t\t\t\t\tfor (textNode = node.lastChild; textNode && textNode.type === 3; ) {\n\t\t\t\t\t\t\t\t\ttext = textNode.value.replace(endWhiteSpaceRegExp, '');\n\n\t\t\t\t\t\t\t\t\tif (text.length > 0) {\n\t\t\t\t\t\t\t\t\t\ttextNode.value = text;\n\t\t\t\t\t\t\t\t\t\ttextNode = textNode.prev;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tsibling = textNode.prev;\n\t\t\t\t\t\t\t\t\t\ttextNode.remove();\n\t\t\t\t\t\t\t\t\t\ttextNode = sibling;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Trim start white space\n\t\t\t\t\t\t\ttextNode = node.prev;\n\t\t\t\t\t\t\tif (textNode && textNode.type === 3) {\n\t\t\t\t\t\t\t\ttext = textNode.value.replace(startWhiteSpaceRegExp, '');\n\n\t\t\t\t\t\t\t\tif (text.length > 0)\n\t\t\t\t\t\t\t\t\ttextNode.value = text;\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\ttextNode.remove();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Handle empty nodes\n\t\t\t\t\t\tif (elementRule.removeEmpty || elementRule.paddEmpty) {\n\t\t\t\t\t\t\tif (node.isEmpty(nonEmptyElements)) {\n\t\t\t\t\t\t\t\tif (elementRule.paddEmpty)\n\t\t\t\t\t\t\t\t\tnode.empty().append(new Node('#text', '3')).value = '\\u00a0';\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t// Leave nodes that have a name like <a name=\"name\">\n\t\t\t\t\t\t\t\t\tif (!node.attributes.map.name) {\n\t\t\t\t\t\t\t\t\t\ttempNode = node.parent;\n\t\t\t\t\t\t\t\t\t\tnode.empty().remove();\n\t\t\t\t\t\t\t\t\t\tnode = tempNode;\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode = node.parent;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, schema);\n\n\t\t\trootNode = node = new Node(args.context || settings.root_name, 11);\n\n\t\t\tparser.parse(html);\n\n\t\t\t// Fix invalid children or report invalid children in a contextual parsing\n\t\t\tif (validate && invalidChildren.length) {\n\t\t\t\tif (!args.context)\n\t\t\t\t\tfixInvalidChildren(invalidChildren);\n\t\t\t\telse\n\t\t\t\t\targs.invalid = true;\n\t\t\t}\n\n\t\t\t// Wrap nodes in the root into block elements if the root is body\n\t\t\tif (rootBlockName && rootNode.name == 'body')\n\t\t\t\taddRootBlocks();\n\n\t\t\t// Run filters only when the contents is valid\n\t\t\tif (!args.invalid) {\n\t\t\t\t// Run node filters\n\t\t\t\tfor (name in matchedNodes) {\n\t\t\t\t\tlist = nodeFilters[name];\n\t\t\t\t\tnodes = matchedNodes[name];\n\n\t\t\t\t\t// Remove already removed children\n\t\t\t\t\tfi = nodes.length;\n\t\t\t\t\twhile (fi--) {\n\t\t\t\t\t\tif (!nodes[fi].parent)\n\t\t\t\t\t\t\tnodes.splice(fi, 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (i = 0, l = list.length; i < l; i++)\n\t\t\t\t\t\tlist[i](nodes, name, args);\n\t\t\t\t}\n\n\t\t\t\t// Run attribute filters\n\t\t\t\tfor (i = 0, l = attributeFilters.length; i < l; i++) {\n\t\t\t\t\tlist = attributeFilters[i];\n\n\t\t\t\t\tif (list.name in matchedAttributes) {\n\t\t\t\t\t\tnodes = matchedAttributes[list.name];\n\n\t\t\t\t\t\t// Remove already removed children\n\t\t\t\t\t\tfi = nodes.length;\n\t\t\t\t\t\twhile (fi--) {\n\t\t\t\t\t\t\tif (!nodes[fi].parent)\n\t\t\t\t\t\t\t\tnodes.splice(fi, 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (fi = 0, fl = list.callbacks.length; fi < fl; fi++)\n\t\t\t\t\t\t\tlist.callbacks[fi](nodes, list.name, args);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn rootNode;\n\t\t};\n\n\t\t// Remove <br> at end of block elements Gecko and WebKit injects BR elements to\n\t\t// make it possible to place the caret inside empty blocks. This logic tries to remove\n\t\t// these elements and keep br elements that where intended to be there intact\n\t\tif (settings.remove_trailing_brs) {\n\t\t\tself.addNodeFilter('br', function(nodes, name) {\n\t\t\t\tvar i, l = nodes.length, node, blockElements = schema.getBlockElements(),\n\t\t\t\t\tnonEmptyElements = schema.getNonEmptyElements(), parent, prev, prevName;\n\n\t\t\t\t// Remove brs from body element as well\n\t\t\t\tblockElements.body = 1;\n\n\t\t\t\t// Must loop forwards since it will otherwise remove all brs in <p>a<br><br><br></p>\n\t\t\t\tfor (i = 0; i < l; i++) {\n\t\t\t\t\tnode = nodes[i];\n\t\t\t\t\tparent = node.parent;\n\n\t\t\t\t\tif (blockElements[node.parent.name] && node === parent.lastChild) {\n\t\t\t\t\t\t// Loop all nodes to the right of the current node and check for other BR elements\n\t\t\t\t\t\t// excluding bookmarks since they are invisible\n\t\t\t\t\t\tprev = node.prev;\n\t\t\t\t\t\twhile (prev) {\n\t\t\t\t\t\t\tprevName = prev.name;\n\n\t\t\t\t\t\t\t// Ignore bookmarks\n\t\t\t\t\t\t\tif (prevName !== \"span\" || prev.attr('data-mce-type') !== 'bookmark') {\n\t\t\t\t\t\t\t\t// Found a non BR element\n\t\t\t\t\t\t\t\tif (prevName !== \"br\")\n\t\t\t\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\t\t\t\t// Found another br it's a <br><br> structure then don't remove anything\n\t\t\t\t\t\t\t\tif (prevName === 'br') {\n\t\t\t\t\t\t\t\t\tnode = null;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tprev = prev.prev;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node) {\n\t\t\t\t\t\t\tnode.remove();\n\n\t\t\t\t\t\t\t// Is the parent to be considered empty after we removed the BR\n\t\t\t\t\t\t\tif (parent.isEmpty(nonEmptyElements)) {\n\t\t\t\t\t\t\t\telementRule = schema.getElementRule(parent.name);\n\n\t\t\t\t\t\t\t\t// Remove or padd the element depending on schema rule\n\t\t\t\t\t\t\t\tif (elementRule) {\n\t\t\t\t\t\t\t\t  if (elementRule.removeEmpty)\n\t\t\t\t\t\t\t\t\t  parent.remove();\n\t\t\t\t\t\t\t\t  else if (elementRule.paddEmpty)\n\t\t\t\t\t\t\t\t\t  parent.empty().append(new tinymce.html.Node('#text', 3)).value = '\\u00a0';\n\t\t\t\t\t\t\t  }\n              }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/html/Schema.js":"/**\n * Schema.js\n *\n * Copyright 2010, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar transitional = {}, boolAttrMap, blockElementsMap, shortEndedElementsMap, nonEmptyElementsMap, customElementsMap = {},\n\t\tdefaultWhiteSpaceElementsMap, selfClosingElementsMap, makeMap = tinymce.makeMap, each = tinymce.each;\n\n\tfunction split(str, delim) {\n\t\treturn str.split(delim || ',');\n\t};\n\n\t/**\n\t * Unpacks the specified lookup and string data it will also parse it into an object\n\t * map with sub object for it's children. This will later also include the attributes.\n\t */\n\tfunction unpack(lookup, data) {\n\t\tvar key, elements = {};\n\n\t\tfunction replace(value) {\n\t\t\treturn value.replace(/[A-Z]+/g, function(key) {\n\t\t\t\treturn replace(lookup[key]);\n\t\t\t});\n\t\t};\n\n\t\t// Unpack lookup\n\t\tfor (key in lookup) {\n\t\t\tif (lookup.hasOwnProperty(key))\n\t\t\t\tlookup[key] = replace(lookup[key]);\n\t\t}\n\n\t\t// Unpack and parse data into object map\n\t\treplace(data).replace(/#/g, '#text').replace(/(\\w+)\\[([^\\]]+)\\]\\[([^\\]]*)\\]/g, function(str, name, attributes, children) {\n\t\t\tattributes = split(attributes, '|');\n\n\t\t\telements[name] = {\n\t\t\t\tattributes : makeMap(attributes),\n\t\t\t\tattributesOrder : attributes,\n\t\t\t\tchildren : makeMap(children, '|', {'#comment' : {}})\n\t\t\t}\n\t\t});\n\n\t\treturn elements;\n\t};\n\n\t// Build a lookup table for block elements both lowercase and uppercase\n\tblockElementsMap = 'h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,' + \n\t\t\t\t\t\t'th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,' + \n\t\t\t\t\t\t'noscript,menu,isindex,samp,header,footer,article,section,hgroup';\n\tblockElementsMap = makeMap(blockElementsMap, ',', makeMap(blockElementsMap.toUpperCase()));\n\n\t// This is the XHTML 1.0 transitional elements with it's attributes and children packed to reduce it's size\n\ttransitional = unpack({\n\t\tZ : 'H|K|N|O|P',\n\t\tY : 'X|form|R|Q',\n\t\tZG : 'E|span|width|align|char|charoff|valign',\n\t\tX : 'p|T|div|U|W|isindex|fieldset|table',\n\t\tZF : 'E|align|char|charoff|valign',\n\t\tW : 'pre|hr|blockquote|address|center|noframes',\n\t\tZE : 'abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height',\n\t\tZD : '[E][S]',\n\t\tU : 'ul|ol|dl|menu|dir',\n\t\tZC : 'p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q',\n\t\tT : 'h1|h2|h3|h4|h5|h6',\n\t\tZB : 'X|S|Q',\n\t\tS : 'R|P',\n\t\tZA : 'a|G|J|M|O|P',\n\t\tR : 'a|H|K|N|O',\n\t\tQ : 'noscript|P',\n\t\tP : 'ins|del|script',\n\t\tO : 'input|select|textarea|label|button',\n\t\tN : 'M|L',\n\t\tM : 'em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym',\n\t\tL : 'sub|sup',\n\t\tK : 'J|I',\n\t\tJ : 'tt|i|b|u|s|strike',\n\t\tI : 'big|small|font|basefont',\n\t\tH : 'G|F',\n\t\tG : 'br|span|bdo',\n\t\tF : 'object|applet|img|map|iframe',\n\t\tE : 'A|B|C',\n\t\tD : 'accesskey|tabindex|onfocus|onblur',\n\t\tC : 'onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup',\n\t\tB : 'lang|xml:lang|dir',\n\t\tA : 'id|class|style|title'\n\t}, 'script[id|charset|type|language|src|defer|xml:space][]' + \n\t\t'style[B|id|type|media|title|xml:space][]' + \n\t\t'object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]' + \n\t\t'param[id|name|value|valuetype|type][]' + \n\t\t'p[E|align][#|S]' + \n\t\t'a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]' + \n\t\t'br[A|clear][]' + \n\t\t'span[E][#|S]' + \n\t\t'bdo[A|C|B][#|S]' + \n\t\t'applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]' + \n\t\t'h1[E|align][#|S]' + \n\t\t'img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]' + \n\t\t'map[B|C|A|name][X|form|Q|area]' + \n\t\t'h2[E|align][#|S]' + \n\t\t'iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]' + \n\t\t'h3[E|align][#|S]' + \n\t\t'tt[E][#|S]' + \n\t\t'i[E][#|S]' + \n\t\t'b[E][#|S]' + \n\t\t'u[E][#|S]' + \n\t\t's[E][#|S]' + \n\t\t'strike[E][#|S]' + \n\t\t'big[E][#|S]' + \n\t\t'small[E][#|S]' + \n\t\t'font[A|B|size|color|face][#|S]' + \n\t\t'basefont[id|size|color|face][]' + \n\t\t'em[E][#|S]' + \n\t\t'strong[E][#|S]' + \n\t\t'dfn[E][#|S]' + \n\t\t'code[E][#|S]' + \n\t\t'q[E|cite][#|S]' + \n\t\t'samp[E][#|S]' + \n\t\t'kbd[E][#|S]' + \n\t\t'var[E][#|S]' + \n\t\t'cite[E][#|S]' + \n\t\t'abbr[E][#|S]' + \n\t\t'acronym[E][#|S]' + \n\t\t'sub[E][#|S]' + \n\t\t'sup[E][#|S]' + \n\t\t'input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]' + \n\t\t'select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]' + \n\t\t'optgroup[E|disabled|label][option]' + \n\t\t'option[E|selected|disabled|label|value][]' + \n\t\t'textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]' + \n\t\t'label[E|for|accesskey|onfocus|onblur][#|S]' + \n\t\t'button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]' + \n\t\t'h4[E|align][#|S]' + \n\t\t'ins[E|cite|datetime][#|Y]' + \n\t\t'h5[E|align][#|S]' + \n\t\t'del[E|cite|datetime][#|Y]' + \n\t\t'h6[E|align][#|S]' + \n\t\t'div[E|align][#|Y]' + \n\t\t'ul[E|type|compact][li]' + \n\t\t'li[E|type|value][#|Y]' + \n\t\t'ol[E|type|compact|start][li]' + \n\t\t'dl[E|compact][dt|dd]' + \n\t\t'dt[E][#|S]' + \n\t\t'dd[E][#|Y]' + \n\t\t'menu[E|compact][li]' + \n\t\t'dir[E|compact][li]' + \n\t\t'pre[E|width|xml:space][#|ZA]' + \n\t\t'hr[E|align|noshade|size|width][]' + \n\t\t'blockquote[E|cite][#|Y]' + \n\t\t'address[E][#|S|p]' + \n\t\t'center[E][#|Y]' + \n\t\t'noframes[E][#|Y]' + \n\t\t'isindex[A|B|prompt][]' + \n\t\t'fieldset[E][#|legend|Y]' + \n\t\t'legend[E|accesskey|align][#|S]' + \n\t\t'table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]' + \n\t\t'caption[E|align][#|S]' + \n\t\t'col[ZG][]' + \n\t\t'colgroup[ZG][col]' + \n\t\t'thead[ZF][tr]' + \n\t\t'tr[ZF|bgcolor][th|td]' + \n\t\t'th[E|ZE][#|Y]' + \n\t\t'form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]' + \n\t\t'noscript[E][#|Y]' + \n\t\t'td[E|ZE][#|Y]' + \n\t\t'tfoot[ZF][tr]' + \n\t\t'tbody[ZF][tr]' + \n\t\t'area[E|D|shape|coords|href|nohref|alt|target][]' + \n\t\t'base[id|href|target][]' + \n\t\t'body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]'\n\t);\n\n\tboolAttrMap = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls');\n\tshortEndedElementsMap = makeMap('area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source');\n\tnonEmptyElementsMap = tinymce.extend(makeMap('td,th,iframe,video,audio,object'), shortEndedElementsMap);\n\tdefaultWhiteSpaceElementsMap = makeMap('pre,script,style,textarea');\n\tselfClosingElementsMap = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr');\n\n\t/**\n\t * Schema validator class.\n\t *\n\t * @class tinymce.html.Schema\n\t * @example\n\t *  if (tinymce.activeEditor.schema.isValidChild('p', 'span'))\n\t *    alert('span is valid child of p.');\n\t *\n\t *  if (tinymce.activeEditor.schema.getElementRule('p'))\n\t *    alert('P is a valid element.');\n\t *\n\t * @class tinymce.html.Schema\n\t * @version 3.4\n\t */\n\n\t/**\n\t * Constructs a new Schema instance.\n\t *\n\t * @constructor\n\t * @method Schema\n\t * @param {Object} settings Name/value settings object.\n\t */\n\ttinymce.html.Schema = function(settings) {\n\t\tvar self = this, elements = {}, children = {}, patternElements = [], validStyles, whiteSpaceElementsMap;\n\n\t\tsettings = settings || {};\n\n\t\t// Allow all elements and attributes if verify_html is set to false\n\t\tif (settings.verify_html === false)\n\t\t\tsettings.valid_elements = '*[*]';\n\n\t\t// Build styles list\n\t\tif (settings.valid_styles) {\n\t\t\tvalidStyles = {};\n\n\t\t\t// Convert styles into a rule list\n\t\t\teach(settings.valid_styles, function(value, key) {\n\t\t\t\tvalidStyles[key] = tinymce.explode(value);\n\t\t\t});\n\t\t}\n\n\t\twhiteSpaceElementsMap = settings.whitespace_elements ? makeMap(settings.whitespace_elements) : defaultWhiteSpaceElementsMap;\n\n\t\t// Converts a wildcard expression string to a regexp for example *a will become /.*a/.\n\t\tfunction patternToRegExp(str) {\n\t\t\treturn new RegExp('^' + str.replace(/([?+*])/g, '.$1') + '$');\n\t\t};\n\n\t\t// Parses the specified valid_elements string and adds to the current rules\n\t\t// This function is a bit hard to read since it's heavily optimized for speed\n\t\tfunction addValidElements(valid_elements) {\n\t\t\tvar ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,\n\t\t\t\tprefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value,\n\t\t\t\telementRuleRegExp = /^([#+-])?([^\\[\\/]+)(?:\\/([^\\[]+))?(?:\\[([^\\]]+)\\])?$/,\n\t\t\t\tattrRuleRegExp = /^([!\\-])?(\\w+::\\w+|[^=:<]+)?(?:([=:<])(.*))?$/,\n\t\t\t\thasPatternsRegExp = /[*?+]/;\n\n\t\t\tif (valid_elements) {\n\t\t\t\t// Split valid elements into an array with rules\n\t\t\t\tvalid_elements = split(valid_elements);\n\n\t\t\t\tif (elements['@']) {\n\t\t\t\t\tglobalAttributes = elements['@'].attributes;\n\t\t\t\t\tglobalAttributesOrder = elements['@'].attributesOrder;\n\t\t\t\t}\n\n\t\t\t\t// Loop all rules\n\t\t\t\tfor (ei = 0, el = valid_elements.length; ei < el; ei++) {\n\t\t\t\t\t// Parse element rule\n\t\t\t\t\tmatches = elementRuleRegExp.exec(valid_elements[ei]);\n\t\t\t\t\tif (matches) {\n\t\t\t\t\t\t// Setup local names for matches\n\t\t\t\t\t\tprefix = matches[1];\n\t\t\t\t\t\telementName = matches[2];\n\t\t\t\t\t\toutputName = matches[3];\n\t\t\t\t\t\tattrData = matches[4];\n\n\t\t\t\t\t\t// Create new attributes and attributesOrder\n\t\t\t\t\t\tattributes = {};\n\t\t\t\t\t\tattributesOrder = [];\n\n\t\t\t\t\t\t// Create the new element\n\t\t\t\t\t\telement = {\n\t\t\t\t\t\t\tattributes : attributes,\n\t\t\t\t\t\t\tattributesOrder : attributesOrder\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// Padd empty elements prefix\n\t\t\t\t\t\tif (prefix === '#')\n\t\t\t\t\t\t\telement.paddEmpty = true;\n\n\t\t\t\t\t\t// Remove empty elements prefix\n\t\t\t\t\t\tif (prefix === '-')\n\t\t\t\t\t\t\telement.removeEmpty = true;\n\n\t\t\t\t\t\t// Copy attributes from global rule into current rule\n\t\t\t\t\t\tif (globalAttributes) {\n\t\t\t\t\t\t\tfor (key in globalAttributes)\n\t\t\t\t\t\t\t\tattributes[key] = globalAttributes[key];\n\n\t\t\t\t\t\t\tattributesOrder.push.apply(attributesOrder, globalAttributesOrder);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Attributes defined\n\t\t\t\t\t\tif (attrData) {\n\t\t\t\t\t\t\tattrData = split(attrData, '|');\n\t\t\t\t\t\t\tfor (ai = 0, al = attrData.length; ai < al; ai++) {\n\t\t\t\t\t\t\t\tmatches = attrRuleRegExp.exec(attrData[ai]);\n\t\t\t\t\t\t\t\tif (matches) {\n\t\t\t\t\t\t\t\t\tattr = {};\n\t\t\t\t\t\t\t\t\tattrType = matches[1];\n\t\t\t\t\t\t\t\t\tattrName = matches[2].replace(/::/g, ':');\n\t\t\t\t\t\t\t\t\tprefix = matches[3];\n\t\t\t\t\t\t\t\t\tvalue = matches[4];\n\n\t\t\t\t\t\t\t\t\t// Required\n\t\t\t\t\t\t\t\t\tif (attrType === '!') {\n\t\t\t\t\t\t\t\t\t\telement.attributesRequired = element.attributesRequired || [];\n\t\t\t\t\t\t\t\t\t\telement.attributesRequired.push(attrName);\n\t\t\t\t\t\t\t\t\t\tattr.required = true;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Denied from global\n\t\t\t\t\t\t\t\t\tif (attrType === '-') {\n\t\t\t\t\t\t\t\t\t\tdelete attributes[attrName];\n\t\t\t\t\t\t\t\t\t\tattributesOrder.splice(tinymce.inArray(attributesOrder, attrName), 1);\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Default value\n\t\t\t\t\t\t\t\t\tif (prefix) {\n\t\t\t\t\t\t\t\t\t\t// Default value\n\t\t\t\t\t\t\t\t\t\tif (prefix === '=') {\n\t\t\t\t\t\t\t\t\t\t\telement.attributesDefault = element.attributesDefault || [];\n\t\t\t\t\t\t\t\t\t\t\telement.attributesDefault.push({name: attrName, value: value});\n\t\t\t\t\t\t\t\t\t\t\tattr.defaultValue = value;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Forced value\n\t\t\t\t\t\t\t\t\t\tif (prefix === ':') {\n\t\t\t\t\t\t\t\t\t\t\telement.attributesForced = element.attributesForced || [];\n\t\t\t\t\t\t\t\t\t\t\telement.attributesForced.push({name: attrName, value: value});\n\t\t\t\t\t\t\t\t\t\t\tattr.forcedValue = value;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Required values\n\t\t\t\t\t\t\t\t\t\tif (prefix === '<')\n\t\t\t\t\t\t\t\t\t\t\tattr.validValues = makeMap(value, '?');\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Check for attribute patterns\n\t\t\t\t\t\t\t\t\tif (hasPatternsRegExp.test(attrName)) {\n\t\t\t\t\t\t\t\t\t\telement.attributePatterns = element.attributePatterns || [];\n\t\t\t\t\t\t\t\t\t\tattr.pattern = patternToRegExp(attrName);\n\t\t\t\t\t\t\t\t\t\telement.attributePatterns.push(attr);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// Add attribute to order list if it doesn't already exist\n\t\t\t\t\t\t\t\t\t\tif (!attributes[attrName])\n\t\t\t\t\t\t\t\t\t\t\tattributesOrder.push(attrName);\n\n\t\t\t\t\t\t\t\t\t\tattributes[attrName] = attr;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Global rule, store away these for later usage\n\t\t\t\t\t\tif (!globalAttributes && elementName == '@') {\n\t\t\t\t\t\t\tglobalAttributes = attributes;\n\t\t\t\t\t\t\tglobalAttributesOrder = attributesOrder;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Handle substitute elements such as b/strong\n\t\t\t\t\t\tif (outputName) {\n\t\t\t\t\t\t\telement.outputName = elementName;\n\t\t\t\t\t\t\telements[outputName] = element;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Add pattern or exact element\n\t\t\t\t\t\tif (hasPatternsRegExp.test(elementName)) {\n\t\t\t\t\t\t\telement.pattern = patternToRegExp(elementName);\n\t\t\t\t\t\t\tpatternElements.push(element);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\telements[elementName] = element;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tfunction setValidElements(valid_elements) {\n\t\t\telements = {};\n\t\t\tpatternElements = [];\n\n\t\t\taddValidElements(valid_elements);\n\n\t\t\teach(transitional, function(element, name) {\n\t\t\t\tchildren[name] = element.children;\n\t\t\t});\n\t\t};\n\n\t\t// Adds custom non HTML elements to the schema\n\t\tfunction addCustomElements(custom_elements) {\n\t\t\tvar customElementRegExp = /^(~)?(.+)$/;\n\n\t\t\tif (custom_elements) {\n\t\t\t\teach(split(custom_elements), function(rule) {\n\t\t\t\t\tvar matches = customElementRegExp.exec(rule),\n\t\t\t\t\t\tinline = matches[1] === '~',\n\t\t\t\t\t\tcloneName = inline ? 'span' : 'div',\n\t\t\t\t\t\tname = matches[2];\n\n\t\t\t\t\tchildren[name] = children[cloneName];\n\t\t\t\t\tcustomElementsMap[name] = cloneName;\n\n\t\t\t\t\t// If it's not marked as inline then add it to valid block elements\n\t\t\t\t\tif (!inline)\n\t\t\t\t\t\tblockElementsMap[name] = {};\n\n\t\t\t\t\t// Add custom elements at span/div positions\n\t\t\t\t\teach(children, function(element, child) {\n\t\t\t\t\t\tif (element[cloneName])\n\t\t\t\t\t\t\telement[name] = element[cloneName];\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\t// Adds valid children to the schema object\n\t\tfunction addValidChildren(valid_children) {\n\t\t\tvar childRuleRegExp = /^([+\\-]?)(\\w+)\\[([^\\]]+)\\]$/;\n\n\t\t\tif (valid_children) {\n\t\t\t\teach(split(valid_children), function(rule) {\n\t\t\t\t\tvar matches = childRuleRegExp.exec(rule), parent, prefix;\n\n\t\t\t\t\tif (matches) {\n\t\t\t\t\t\tprefix = matches[1];\n\n\t\t\t\t\t\t// Add/remove items from default\n\t\t\t\t\t\tif (prefix)\n\t\t\t\t\t\t\tparent = children[matches[2]];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tparent = children[matches[2]] = {'#comment' : {}};\n\n\t\t\t\t\t\tparent = children[matches[2]];\n\n\t\t\t\t\t\teach(split(matches[3], '|'), function(child) {\n\t\t\t\t\t\t\tif (prefix === '-')\n\t\t\t\t\t\t\t\tdelete parent[child];\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tparent[child] = {};\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tfunction getElementRule(name) {\n\t\t\tvar element = elements[name], i;\n\n\t\t\t// Exact match found\n\t\t\tif (element)\n\t\t\t\treturn element;\n\n\t\t\t// No exact match then try the patterns\n\t\t\ti = patternElements.length;\n\t\t\twhile (i--) {\n\t\t\t\telement = patternElements[i];\n\n\t\t\t\tif (element.pattern.test(name))\n\t\t\t\t\treturn element;\n\t\t\t}\n\t\t};\n\n\t\tif (!settings.valid_elements) {\n\t\t\t// No valid elements defined then clone the elements from the transitional spec\n\t\t\teach(transitional, function(element, name) {\n\t\t\t\telements[name] = {\n\t\t\t\t\tattributes : element.attributes,\n\t\t\t\t\tattributesOrder : element.attributesOrder\n\t\t\t\t};\n\n\t\t\t\tchildren[name] = element.children;\n\t\t\t});\n\n\t\t\t// Switch these\n\t\t\teach(split('strong/b,em/i'), function(item) {\n\t\t\t\titem = split(item, '/');\n\t\t\t\telements[item[1]].outputName = item[0];\n\t\t\t});\n\n\t\t\t// Add default alt attribute for images\n\t\t\telements.img.attributesDefault = [{name: 'alt', value: ''}];\n\n\t\t\t// Remove these if they are empty by default\n\t\t\teach(split('ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr'), function(name) {\n\t\t\t\telements[name].removeEmpty = true;\n\t\t\t});\n\n\t\t\t// Padd these by default\n\t\t\teach(split('p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption'), function(name) {\n\t\t\t\telements[name].paddEmpty = true;\n\t\t\t});\n\t\t} else\n\t\t\tsetValidElements(settings.valid_elements);\n\n\t\taddCustomElements(settings.custom_elements);\n\t\taddValidChildren(settings.valid_children);\n\t\taddValidElements(settings.extended_valid_elements);\n\n\t\t// Todo: Remove this when we fix list handling to be valid\n\t\taddValidChildren('+ol[ul|ol],+ul[ul|ol]');\n\n\t\t// If the user didn't allow span only allow internal spans\n\t\tif (!getElementRule('span'))\n\t\t\taddValidElements('span[!data-mce-type|*]');\n\n\t\t// Delete invalid elements\n\t\tif (settings.invalid_elements) {\n\t\t\ttinymce.each(tinymce.explode(settings.invalid_elements), function(item) {\n\t\t\t\tif (elements[item])\n\t\t\t\t\tdelete elements[item];\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Name/value map object with valid parents and children to those parents.\n\t\t *\n\t\t * @example\n\t\t * children = {\n\t\t *    div:{p:{}, h1:{}}\n\t\t * };\n\t\t * @field children\n\t\t * @type {Object}\n\t\t */\n\t\tself.children = children;\n\n\t\t/**\n\t\t * Name/value map object with valid styles for each element.\n\t\t *\n\t\t * @field styles\n\t\t * @type {Object}\n\t\t */\n\t\tself.styles = validStyles;\n\n\t\t/**\n\t\t * Returns a map with boolean attributes.\n\t\t *\n\t\t * @method getBoolAttrs\n\t\t * @return {Object} Name/value lookup map for boolean attributes.\n\t\t */\n\t\tself.getBoolAttrs = function() {\n\t\t\treturn boolAttrMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with block elements.\n\t\t *\n\t\t * @method getBoolAttrs\n\t\t * @return {Object} Name/value lookup map for block elements.\n\t\t */\n\t\tself.getBlockElements = function() {\n\t\t\treturn blockElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with short ended elements such as BR or IMG.\n\t\t *\n\t\t * @method getShortEndedElements\n\t\t * @return {Object} Name/value lookup map for short ended elements.\n\t\t */\n\t\tself.getShortEndedElements = function() {\n\t\t\treturn shortEndedElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with self closing tags such as <li>.\n\t\t *\n\t\t * @method getSelfClosingElements\n\t\t * @return {Object} Name/value lookup map for self closing tags elements.\n\t\t */\n\t\tself.getSelfClosingElements = function() {\n\t\t\treturn selfClosingElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with elements that should be treated as contents regardless if it has text\n\t\t * content in them or not such as TD, VIDEO or IMG.\n\t\t *\n\t\t * @method getNonEmptyElements\n\t\t * @return {Object} Name/value lookup map for non empty elements.\n\t\t */\n\t\tself.getNonEmptyElements = function() {\n\t\t\treturn nonEmptyElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns a map with elements where white space is to be preserved like PRE or SCRIPT.\n\t\t *\n\t\t * @method getWhiteSpaceElements\n\t\t * @return {Object} Name/value lookup map for white space elements.\n\t\t */\n\t\tself.getWhiteSpaceElements = function() {\n\t\t\treturn whiteSpaceElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Returns true/false if the specified element and it's child is valid or not\n\t\t * according to the schema.\n\t\t *\n\t\t * @method isValidChild\n\t\t * @param {String} name Element name to check for.\n\t\t * @param {String} child Element child to verify.\n\t\t * @return {Boolean} True/false if the element is a valid child of the specified parent.\n\t\t */\n\t\tself.isValidChild = function(name, child) {\n\t\t\tvar parent = children[name];\n\n\t\t\treturn !!(parent && parent[child]);\n\t\t};\n\n\t\t/**\n\t\t * Returns true/false if the specified element is valid or not\n\t\t * according to the schema.\n\t\t *\n\t\t * @method getElementRule\n\t\t * @param {String} name Element name to check for.\n\t\t * @return {Object} Element object or undefined if the element isn't valid.\n\t\t */\n\t\tself.getElementRule = getElementRule;\n\n\t\t/**\n\t\t * Returns an map object of all custom elements.\n\t\t *\n\t\t * @method getCustomElements\n\t\t * @return {Object} Name/value map object of all custom elements.\n\t\t */\n\t\tself.getCustomElements = function() {\n\t\t\treturn customElementsMap;\n\t\t};\n\n\t\t/**\n\t\t * Parses a valid elements string and adds it to the schema. The valid elements format is for example \"element[attr=default|otherattr]\".\n\t\t * Existing rules will be replaced with the ones specified, so this extends the schema.\n\t\t *\n\t\t * @method addValidElements\n\t\t * @param {String} valid_elements String in the valid elements format to be parsed.\n\t\t */\n\t\tself.addValidElements = addValidElements;\n\n\t\t/**\n\t\t * Parses a valid elements string and sets it to the schema. The valid elements format is for example \"element[attr=default|otherattr]\".\n\t\t * Existing rules will be replaced with the ones specified, so this extends the schema.\n\t\t *\n\t\t * @method setValidElements\n\t\t * @param {String} valid_elements String in the valid elements format to be parsed.\n\t\t */\n\t\tself.setValidElements = setValidElements;\n\n\t\t/**\n\t\t * Adds custom non HTML elements to the schema.\n\t\t *\n\t\t * @method addCustomElements\n\t\t * @param {String} custom_elements Comma separated list of custom elements to add.\n\t\t */\n\t\tself.addCustomElements = addCustomElements;\n\n\t\t/**\n\t\t * Parses a valid children string and adds them to the schema structure. The valid children format is for example: \"element[child1|child2]\".\n\t\t *\n\t\t * @method addValidChildren\n\t\t * @param {String} valid_children Valid children elements string to parse\n\t\t */\n\t\tself.addValidChildren = addValidChildren;\n\t};\n\n\t// Expose boolMap and blockElementMap as static properties for usage in DOMUtils\n\ttinymce.html.Schema.boolAttrMap = boolAttrMap;\n\ttinymce.html.Schema.blockElementsMap = blockElementsMap;\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/html/Serializer.js":"/**\n * Serializer.js\n *\n * Copyright 2010, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t/**\n\t * This class is used to serialize down the DOM tree into a string using a Writer instance.\n\t *\n\t *\n\t * @example\n\t * new tinymce.html.Serializer().serialize(new tinymce.html.DomParser().parse('<p>text</p>'));\n\t * @class tinymce.html.Serializer\n\t * @version 3.4\n\t */\n\n\t/**\n\t * Constructs a new Serializer instance.\n\t *\n\t * @constructor\n\t * @method Serializer\n\t * @param {Object} settings Name/value settings object.\n\t * @param {tinymce.html.Schema} schema Schema instance to use.\n\t */\n\ttinymce.html.Serializer = function(settings, schema) {\n\t\tvar self = this, writer = new tinymce.html.Writer(settings);\n\n\t\tsettings = settings || {};\n\t\tsettings.validate = \"validate\" in settings ? settings.validate : true;\n\n\t\tself.schema = schema = schema || new tinymce.html.Schema();\n\t\tself.writer = writer;\n\n\t\t/**\n\t\t * Serializes the specified node into a string.\n\t\t *\n\t\t * @example\n\t\t * new tinymce.html.Serializer().serialize(new tinymce.html.DomParser().parse('<p>text</p>'));\n\t\t * @method serialize\n\t\t * @param {tinymce.html.Node} node Node instance to serialize.\n\t\t * @return {String} String with HTML based on DOM tree.\n\t\t */\n\t\tself.serialize = function(node) {\n\t\t\tvar handlers, validate;\n\n\t\t\tvalidate = settings.validate;\n\n\t\t\thandlers = {\n\t\t\t\t// #text\n\t\t\t\t3: function(node, raw) {\n\t\t\t\t\twriter.text(node.value, node.raw);\n\t\t\t\t},\n\n\t\t\t\t// #comment\n\t\t\t\t8: function(node) {\n\t\t\t\t\twriter.comment(node.value);\n\t\t\t\t},\n\n\t\t\t\t// Processing instruction\n\t\t\t\t7: function(node) {\n\t\t\t\t\twriter.pi(node.name, node.value);\n\t\t\t\t},\n\n\t\t\t\t// Doctype\n\t\t\t\t10: function(node) {\n\t\t\t\t\twriter.doctype(node.value);\n\t\t\t\t},\n\n\t\t\t\t// CDATA\n\t\t\t\t4: function(node) {\n\t\t\t\t\twriter.cdata(node.value);\n\t\t\t\t},\n\n \t\t\t\t// Document fragment\n\t\t\t\t11: function(node) {\n\t\t\t\t\tif ((node = node.firstChild)) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\twalk(node);\n\t\t\t\t\t\t} while (node = node.next);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\twriter.reset();\n\n\t\t\tfunction walk(node) {\n\t\t\t\tvar handler = handlers[node.type], name, isEmpty, attrs, attrName, attrValue, sortedAttrs, i, l, elementRule;\n\n\t\t\t\tif (!handler) {\n\t\t\t\t\tname = node.name;\n\t\t\t\t\tisEmpty = node.shortEnded;\n\t\t\t\t\tattrs = node.attributes;\n\n\t\t\t\t\t// Sort attributes\n\t\t\t\t\tif (validate && attrs && attrs.length > 1) {\n\t\t\t\t\t\tsortedAttrs = [];\n\t\t\t\t\t\tsortedAttrs.map = {};\n\n\t\t\t\t\t\telementRule = schema.getElementRule(node.name);\n\t\t\t\t\t\tfor (i = 0, l = elementRule.attributesOrder.length; i < l; i++) {\n\t\t\t\t\t\t\tattrName = elementRule.attributesOrder[i];\n\n\t\t\t\t\t\t\tif (attrName in attrs.map) {\n\t\t\t\t\t\t\t\tattrValue = attrs.map[attrName];\n\t\t\t\t\t\t\t\tsortedAttrs.map[attrName] = attrValue;\n\t\t\t\t\t\t\t\tsortedAttrs.push({name: attrName, value: attrValue});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (i = 0, l = attrs.length; i < l; i++) {\n\t\t\t\t\t\t\tattrName = attrs[i].name;\n\n\t\t\t\t\t\t\tif (!(attrName in sortedAttrs.map)) {\n\t\t\t\t\t\t\t\tattrValue = attrs.map[attrName];\n\t\t\t\t\t\t\t\tsortedAttrs.map[attrName] = attrValue;\n\t\t\t\t\t\t\t\tsortedAttrs.push({name: attrName, value: attrValue});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tattrs = sortedAttrs;\n\t\t\t\t\t}\n\n\t\t\t\t\twriter.start(node.name, attrs, isEmpty);\n\n\t\t\t\t\tif (!isEmpty) {\n\t\t\t\t\t\tif ((node = node.firstChild)) {\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\twalk(node);\n\t\t\t\t\t\t\t} while (node = node.next);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twriter.end(name);\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\thandler(node);\n\t\t\t}\n\n\t\t\t// Serialize element and treat all non elements as fragments\n\t\t\tif (node.type == 1 && !settings.inner)\n\t\t\t\twalk(node);\n\t\t\telse\n\t\t\t\thandlers[11](node);\n\n\t\t\treturn writer.getContent();\n\t\t};\n\t}\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/html/Writer.js":"/**\n * Writer.js\n *\n * Copyright 2010, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n/**\n * This class is used to write HTML tags out it can be used with the Serializer or the SaxParser.\n *\n * @class tinymce.html.Writer\n * @example\n * var writer = new tinymce.html.Writer({indent : true});\n * var parser = new tinymce.html.SaxParser(writer).parse('<p><br></p>');\n * console.log(writer.getContent());\n *\n * @class tinymce.html.Writer\n * @version 3.4\n */\n\n/**\n * Constructs a new Writer instance.\n *\n * @constructor\n * @method Writer\n * @param {Object} settings Name/value settings object.\n */\ntinymce.html.Writer = function(settings) {\n\tvar html = [], indent, indentBefore, indentAfter, encode, htmlOutput;\n\n\tsettings = settings || {};\n\tindent = settings.indent;\n\tindentBefore = tinymce.makeMap(settings.indent_before || '');\n\tindentAfter = tinymce.makeMap(settings.indent_after || '');\n\tencode = tinymce.html.Entities.getEncodeFunc(settings.entity_encoding || 'raw', settings.entities);\n\thtmlOutput = settings.element_format == \"html\";\n\n\treturn {\n\t\t/**\n\t\t * Writes the a start element such as <p id=\"a\">.\n\t\t *\n\t\t * @method start\n\t\t * @param {String} name Name of the element.\n\t\t * @param {Array} attrs Optional attribute array or undefined if it hasn't any.\n\t\t * @param {Boolean} empty Optional empty state if the tag should end like <br />.\n\t\t */\n\t\tstart: function(name, attrs, empty) {\n\t\t\tvar i, l, attr, value;\n\n\t\t\tif (indent && indentBefore[name] && html.length > 0) {\n\t\t\t\tvalue = html[html.length - 1];\n\n\t\t\t\tif (value.length > 0 && value !== '\\n')\n\t\t\t\t\thtml.push('\\n');\n\t\t\t}\n\n\t\t\thtml.push('<', name);\n\n\t\t\tif (attrs) {\n\t\t\t\tfor (i = 0, l = attrs.length; i < l; i++) {\n\t\t\t\t\tattr = attrs[i];\n\t\t\t\t\thtml.push(' ', attr.name, '=\"', encode(attr.value, true), '\"');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty || htmlOutput)\n\t\t\t\thtml[html.length] = '>';\n\t\t\telse\n\t\t\t\thtml[html.length] = ' />';\n\n\t\t\tif (empty && indent && indentAfter[name] && html.length > 0) {\n\t\t\t\tvalue = html[html.length - 1];\n\n\t\t\t\tif (value.length > 0 && value !== '\\n')\n\t\t\t\t\thtml.push('\\n');\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Writes the a end element such as </p>.\n\t\t *\n\t\t * @method end\n\t\t * @param {String} name Name of the element.\n\t\t */\n\t\tend: function(name) {\n\t\t\tvar value;\n\n\t\t\t/*if (indent && indentBefore[name] && html.length > 0) {\n\t\t\t\tvalue = html[html.length - 1];\n\n\t\t\t\tif (value.length > 0 && value !== '\\n')\n\t\t\t\t\thtml.push('\\n');\n\t\t\t}*/\n\n\t\t\thtml.push('</', name, '>');\n\n\t\t\tif (indent && indentAfter[name] && html.length > 0) {\n\t\t\t\tvalue = html[html.length - 1];\n\n\t\t\t\tif (value.length > 0 && value !== '\\n')\n\t\t\t\t\thtml.push('\\n');\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Writes a text node.\n\t\t *\n\t\t * @method text\n\t\t * @param {String} text String to write out.\n\t\t * @param {Boolean} raw Optional raw state if true the contents won't get encoded.\n\t\t */\n\t\ttext: function(text, raw) {\n\t\t\tif (text.length > 0)\n\t\t\t\thtml[html.length] = raw ? text : encode(text);\n\t\t},\n\n\t\t/**\n\t\t * Writes a cdata node such as <![CDATA[data]]>.\n\t\t *\n\t\t * @method cdata\n\t\t * @param {String} text String to write out inside the cdata.\n\t\t */\n\t\tcdata: function(text) {\n\t\t\thtml.push('<![CDATA[', text, ']]>');\n\t\t},\n\n\t\t/**\n\t\t * Writes a comment node such as <!-- Comment -->.\n\t\t *\n\t\t * @method cdata\n\t\t * @param {String} text String to write out inside the comment.\n\t\t */\n\t\tcomment: function(text) {\n\t\t\thtml.push('<!--', text, '-->');\n\t\t},\n\n\t\t/**\n\t\t * Writes a PI node such as <?xml attr=\"value\" ?>.\n\t\t *\n\t\t * @method pi\n\t\t * @param {String} name Name of the pi.\n\t\t * @param {String} text String to write out inside the pi.\n\t\t */\n\t\tpi: function(name, text) {\n\t\t\tif (text)\n\t\t\t\thtml.push('<?', name, ' ', text, '?>');\n\t\t\telse\n\t\t\t\thtml.push('<?', name, '?>');\n\n\t\t\tif (indent)\n\t\t\t\thtml.push('\\n');\n\t\t},\n\n\t\t/**\n\t\t * Writes a doctype node such as <!DOCTYPE data>.\n\t\t *\n\t\t * @method doctype\n\t\t * @param {String} text String to write out inside the doctype.\n\t\t */\n\t\tdoctype: function(text) {\n\t\t\thtml.push('<!DOCTYPE', text, '>', indent ? '\\n' : '');\n\t\t},\n\n\t\t/**\n\t\t * Resets the internal buffer if one wants to reuse the writer.\n\t\t *\n\t\t * @method reset\n\t\t */\n\t\treset: function() {\n\t\t\thtml.length = 0;\n\t\t},\n\n\t\t/**\n\t\t * Returns the contents that got serialized.\n\t\t *\n\t\t * @method getContent\n\t\t * @return {String} HTML contents that got written down.\n\t\t */\n\t\tgetContent: function() {\n\t\t\treturn html.join('').replace(/\\n$/, '');\n\t\t}\n\t};\n};\n","Magento_Tinymce3/tiny_mce/classes/html/Entities.js":"/**\n * Entities.js\n *\n * Copyright 2010, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar namedEntities, baseEntities, reverseEntities,\n\t\tattrsCharsRegExp = /[&<>\\\"\\u007E-\\uD7FF\\uE000-\\uFFEF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\n\t\ttextCharsRegExp = /[<>&\\u007E-\\uD7FF\\uE000-\\uFFEF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\n\t\trawCharsRegExp = /[<>&\\\"\\']/g,\n\t\tentityRegExp = /&(#x|#)?([\\w]+);/g,\n\t\tasciiMap = {\n\t\t\t\t128 : \"\\u20AC\", 130 : \"\\u201A\", 131 : \"\\u0192\", 132 : \"\\u201E\", 133 : \"\\u2026\", 134 : \"\\u2020\",\n\t\t\t\t135 : \"\\u2021\", 136 : \"\\u02C6\", 137 : \"\\u2030\", 138 : \"\\u0160\", 139 : \"\\u2039\", 140 : \"\\u0152\",\n\t\t\t\t142 : \"\\u017D\", 145 : \"\\u2018\", 146 : \"\\u2019\", 147 : \"\\u201C\", 148 : \"\\u201D\", 149 : \"\\u2022\",\n\t\t\t\t150 : \"\\u2013\", 151 : \"\\u2014\", 152 : \"\\u02DC\", 153 : \"\\u2122\", 154 : \"\\u0161\", 155 : \"\\u203A\",\n\t\t\t\t156 : \"\\u0153\", 158 : \"\\u017E\", 159 : \"\\u0178\"\n\t\t};\n\n\t// Raw entities\n\tbaseEntities = {\n\t\t'\\\"' : '&quot;', // Needs to be escaped since the YUI compressor would otherwise break the code\n\t\t\"'\" : '&#39;',\n\t\t'<' : '&lt;',\n\t\t'>' : '&gt;',\n\t\t'&' : '&amp;'\n\t};\n\n\t// Reverse lookup table for raw entities\n\treverseEntities = {\n\t\t'&lt;' : '<',\n\t\t'&gt;' : '>',\n\t\t'&amp;' : '&',\n\t\t'&quot;' : '\"',\n\t\t'&apos;' : \"'\"\n\t};\n\n\t// Decodes text by using the browser\n\tfunction nativeDecode(text) {\n\t\tvar elm;\n\n\t\telm = document.createElement(\"div\");\n\t\telm.innerHTML = text;\n\n\t\treturn elm.textContent || elm.innerText || text;\n\t};\n\n\t// Build a two way lookup table for the entities\n\tfunction buildEntitiesLookup(items, radix) {\n\t\tvar i, chr, entity, lookup = {};\n\n\t\tif (items) {\n\t\t\titems = items.split(',');\n\t\t\tradix = radix || 10;\n\n\t\t\t// Build entities lookup table\n\t\t\tfor (i = 0; i < items.length; i += 2) {\n\t\t\t\tchr = String.fromCharCode(parseInt(items[i], radix));\n\n\t\t\t\t// Only add non base entities\n\t\t\t\tif (!baseEntities[chr]) {\n\t\t\t\t\tentity = '&' + items[i + 1] + ';';\n\t\t\t\t\tlookup[chr] = entity;\n\t\t\t\t\tlookup[entity] = chr;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn lookup;\n\t\t}\n\t};\n\n\t// Unpack entities lookup where the numbers are in radix 32 to reduce the size\n\tnamedEntities = buildEntitiesLookup(\n\t\t'50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,' +\n\t\t'5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,' +\n\t\t'5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,' +\n\t\t'5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,' +\n\t\t'68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,' +\n\t\t'6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,' +\n\t\t'6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,' +\n\t\t'75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,' +\n\t\t'7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,' +\n\t\t'7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,' +\n\t\t'sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,' +\n\t\t'st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,' +\n\t\t't9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,' +\n\t\t'tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,' +\n\t\t'u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,' +\n\t\t'81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,' +\n\t\t'8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,' +\n\t\t'8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,' +\n\t\t'8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,' +\n\t\t'8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,' +\n\t\t'nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,' +\n\t\t'rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,' +\n\t\t'Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,' +\n\t\t'80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,' +\n\t\t'811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro'\n\t, 32);\n\n\ttinymce.html = tinymce.html || {};\n\n\t/**\n\t * Entity encoder class.\n\t *\n\t * @class tinymce.html.SaxParser\n\t * @static\n\t * @version 3.4\n\t */\n\ttinymce.html.Entities = {\n\t\t/**\n\t\t * Encodes the specified string using raw entities. This means only the required XML base entities will be endoded.\n\t\t *\n\t\t * @method encodeRaw\n\t\t * @param {String} text Text to encode.\n\t\t * @param {Boolean} attr Optional flag to specify if the text is attribute contents.\n\t\t * @return {String} Entity encoded text.\n\t\t */\n\t\tencodeRaw : function(text, attr) {\n\t\t\treturn text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {\n\t\t\t\treturn baseEntities[chr] || chr;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Encoded the specified text with both the attributes and text entities. This function will produce larger text contents\n\t\t * since it doesn't know if the context is within a attribute or text node. This was added for compatibility\n\t\t * and is exposed as the DOMUtils.encode function.\n\t\t *\n\t\t * @method encodeAllRaw\n\t\t * @param {String} text Text to encode.\n\t\t * @return {String} Entity encoded text.\n\t\t */\n\t\tencodeAllRaw : function(text) {\n\t\t\treturn ('' + text).replace(rawCharsRegExp, function(chr) {\n\t\t\t\treturn baseEntities[chr] || chr;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Encodes the specified string using numeric entities. The core entities will be encoded as named ones but all non lower ascii characters\n\t\t * will be encoded into numeric entities.\n\t\t *\n\t\t * @method encodeNumeric\n\t\t * @param {String} text Text to encode.\n\t\t * @param {Boolean} attr Optional flag to specify if the text is attribute contents.\n\t\t * @return {String} Entity encoded text.\n\t\t */\n\t\tencodeNumeric : function(text, attr) {\n\t\t\treturn text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {\n\t\t\t\t// Multi byte sequence convert it to a single entity\n\t\t\t\tif (chr.length > 1)\n\t\t\t\t\treturn '&#' + (((chr.charCodeAt(0) - 0xD800) * 0x400) + (chr.charCodeAt(1) - 0xDC00) + 0x10000) + ';';\n\n\t\t\t\treturn baseEntities[chr] || '&#' + chr.charCodeAt(0) + ';';\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Encodes the specified string using named entities. The core entities will be encoded as named ones but all non lower ascii characters\n\t\t * will be encoded into named entities.\n\t\t *\n\t\t * @method encodeNamed\n\t\t * @param {String} text Text to encode.\n\t\t * @param {Boolean} attr Optional flag to specify if the text is attribute contents.\n\t\t * @param {Object} entities Optional parameter with entities to use.\n\t\t * @return {String} Entity encoded text.\n\t\t */\n\t\tencodeNamed : function(text, attr, entities) {\n\t\t\tentities = entities || namedEntities;\n\n\t\t\treturn text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {\n\t\t\t\treturn baseEntities[chr] || entities[chr] || chr;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Returns an encode function based on the name(s) and it's optional entities.\n\t\t *\n\t\t * @method getEncodeFunc\n\t\t * @param {String} name Comma separated list of encoders for example named,numeric.\n\t\t * @param {String} entities Optional parameter with entities to use instead of the built in set.\n\t\t * @return {function} Encode function to be used.\n\t\t */\n\t\tgetEncodeFunc : function(name, entities) {\n\t\t\tvar Entities = tinymce.html.Entities;\n\n\t\t\tentities = buildEntitiesLookup(entities) || namedEntities;\n\n\t\t\tfunction encodeNamedAndNumeric(text, attr) {\n\t\t\t\treturn text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {\n\t\t\t\t\treturn baseEntities[chr] || entities[chr] || '&#' + chr.charCodeAt(0) + ';' || chr;\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tfunction encodeCustomNamed(text, attr) {\n\t\t\t\treturn Entities.encodeNamed(text, attr, entities);\n\t\t\t};\n\n\t\t\t// Replace + with , to be compatible with previous TinyMCE versions\n\t\t\tname = tinymce.makeMap(name.replace(/\\+/g, ','));\n\n\t\t\t// Named and numeric encoder\n\t\t\tif (name.named && name.numeric)\n\t\t\t\treturn encodeNamedAndNumeric;\n\n\t\t\t// Named encoder\n\t\t\tif (name.named) {\n\t\t\t\t// Custom names\n\t\t\t\tif (entities)\n\t\t\t\t\treturn encodeCustomNamed;\n\n\t\t\t\treturn Entities.encodeNamed;\n\t\t\t}\n\n\t\t\t// Numeric\n\t\t\tif (name.numeric)\n\t\t\t\treturn Entities.encodeNumeric;\n\n\t\t\t// Raw encoder\n\t\t\treturn Entities.encodeRaw;\n\t\t},\n\n\t\t/**\n\t\t * Decodes the specified string, this will replace entities with raw UTF characters.\n\t\t *\n\t\t * @param {String} text Text to entity decode.\n\t\t * @return {String} Entity decoded string.\n\t\t */\n\t\tdecode : function(text) {\n\t\t\treturn text.replace(entityRegExp, function(all, numeric, value) {\n\t\t\t\tif (numeric) {\n\t\t\t\t\tvalue = parseInt(value, numeric.length === 2 ? 16 : 10);\n\n\t\t\t\t\t// Support upper UTF\n\t\t\t\t\tif (value > 0xFFFF) {\n\t\t\t\t\t\tvalue -= 0x10000;\n\n\t\t\t\t\t\treturn String.fromCharCode(0xD800 + (value >> 10), 0xDC00 + (value & 0x3FF));\n\t\t\t\t\t} else\n\t\t\t\t\t\treturn asciiMap[value] || String.fromCharCode(value);\n\t\t\t\t}\n\n\t\t\t\treturn reverseEntities[all] || namedEntities[all] || nativeDecode(all);\n\t\t\t});\n\t\t}\n\t};\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/dom/DOMUtils.js":"/**\n * DOMUtils.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t// Shorten names\n\tvar each = tinymce.each,\n\t\tis = tinymce.is,\n\t\tisWebKit = tinymce.isWebKit,\n\t\tisIE = tinymce.isIE,\n\t\tEntities = tinymce.html.Entities,\n\t\tsimpleSelectorRe = /^([a-z0-9],?)+$/i,\n\t\tblockElementsMap = tinymce.html.Schema.blockElementsMap,\n\t\twhiteSpaceRegExp = /^[ \\t\\r\\n]*$/;\n\n\t/**\n\t * Utility class for various DOM manipulation and retrival functions.\n\t *\n\t * @class tinymce.dom.DOMUtils\n\t * @example\n\t * // Add a class to an element by id in the page\n\t * tinymce.DOM.addClass('someid', 'someclass');\n\t *\n\t * // Add a class to an element by id inside the editor\n\t * tinyMCE.activeEditor.dom.addClass('someid', 'someclass');\n\t */\n\ttinymce.create('tinymce.dom.DOMUtils', {\n\t\tdoc : null,\n\t\troot : null,\n\t\tfiles : null,\n\t\tpixelStyles : /^(top|left|bottom|right|width|height|borderWidth)$/,\n\t\tprops : {\n\t\t\t\"for\" : \"htmlFor\",\n\t\t\t\"class\" : \"className\",\n\t\t\tclassName : \"className\",\n\t\t\tchecked : \"checked\",\n\t\t\tdisabled : \"disabled\",\n\t\t\tmaxlength : \"maxLength\",\n\t\t\treadonly : \"readOnly\",\n\t\t\tselected : \"selected\",\n\t\t\tvalue : \"value\",\n\t\t\tid : \"id\",\n\t\t\tname : \"name\",\n\t\t\ttype : \"type\"\n\t\t},\n\n\t\t/**\n\t\t * Constructs a new DOMUtils instance. Consult the Wiki for more details on settings etc for this class.\n\t\t *\n\t\t * @constructor\n\t\t * @method DOMUtils\n\t\t * @param {Document} d Document reference to bind the utility class to.\n\t\t * @param {settings} s Optional settings collection.\n\t\t */\n\t\tDOMUtils : function(d, s) {\n\t\t\tvar t = this, globalStyle, name;\n\n\t\t\tt.doc = d;\n\t\t\tt.win = window;\n\t\t\tt.files = {};\n\t\t\tt.cssFlicker = false;\n\t\t\tt.counter = 0;\n\t\t\tt.stdMode = !tinymce.isIE || d.documentMode >= 8;\n\t\t\tt.boxModel = !tinymce.isIE || d.compatMode == \"CSS1Compat\" || t.stdMode;\n\t\t\tt.hasOuterHTML = \"outerHTML\" in d.createElement(\"a\");\n\n\t\t\tt.settings = s = tinymce.extend({\n\t\t\t\tkeep_values : false,\n\t\t\t\thex_colors : 1\n\t\t\t}, s);\n\t\t\t\n\t\t\tt.schema = s.schema;\n\t\t\tt.styles = new tinymce.html.Styles({\n\t\t\t\turl_converter : s.url_converter,\n\t\t\t\turl_converter_scope : s.url_converter_scope\n\t\t\t}, s.schema);\n\n\t\t\t// Fix IE6SP2 flicker and check it failed for pre SP2\n\t\t\tif (tinymce.isIE6) {\n\t\t\t\ttry {\n\t\t\t\t\td.execCommand('BackgroundImageCache', false, true);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tt.cssFlicker = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isIE && s.schema) {\n\t\t\t\t// Add missing HTML 4/5 elements to IE\n\t\t\t\t('abbr article aside audio canvas ' +\n\t\t\t\t'details figcaption figure footer ' +\n\t\t\t\t'header hgroup mark menu meter nav ' +\n\t\t\t\t'output progress section summary ' +\n\t\t\t\t'time video').replace(/\\w+/g, function(name) {\n\t\t\t\t\td.createElement(name);\n\t\t\t\t});\n\n\t\t\t\t// Create all custom elements\n\t\t\t\tfor (name in s.schema.getCustomElements()) {\n\t\t\t\t\td.createElement(name);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttinymce.addUnload(t.destroy, t);\n\t\t},\n\n\t\t/**\n\t\t * Returns the root node of the document this is normally the body but might be a DIV. Parents like getParent will not\n\t\t * go above the point of this root node.\n\t\t *\n\t\t * @method getRoot\n\t\t * @return {Element} Root element for the utility class.\n\t\t */\n\t\tgetRoot : function() {\n\t\t\tvar t = this, s = t.settings;\n\n\t\t\treturn (s && t.get(s.root_element)) || t.doc.body;\n\t\t},\n\n\t\t/**\n\t\t * Returns the viewport of the window.\n\t\t *\n\t\t * @method getViewPort\n\t\t * @param {Window} w Optional window to get viewport of.\n\t\t * @return {Object} Viewport object with fields x, y, w and h.\n\t\t */\n\t\tgetViewPort : function(w) {\n\t\t\tvar d, b;\n\n\t\t\tw = !w ? this.win : w;\n\t\t\td = w.document;\n\t\t\tb = this.boxModel ? d.documentElement : d.body;\n\n\t\t\t// Returns viewport size excluding scrollbars\n\t\t\treturn {\n\t\t\t\tx : w.pageXOffset || b.scrollLeft,\n\t\t\t\ty : w.pageYOffset || b.scrollTop,\n\t\t\t\tw : w.innerWidth || b.clientWidth,\n\t\t\t\th : w.innerHeight || b.clientHeight\n\t\t\t};\n\t\t},\n\n\t\t/**\n\t\t * Returns the rectangle for a specific element.\n\t\t *\n\t\t * @method getRect\n\t\t * @param {Element/String} e Element object or element ID to get rectange from.\n\t\t * @return {object} Rectange for specified element object with x, y, w, h fields.\n\t\t */\n\t\tgetRect : function(e) {\n\t\t\tvar p, t = this, sr;\n\n\t\t\te = t.get(e);\n\t\t\tp = t.getPos(e);\n\t\t\tsr = t.getSize(e);\n\n\t\t\treturn {\n\t\t\t\tx : p.x,\n\t\t\t\ty : p.y,\n\t\t\t\tw : sr.w,\n\t\t\t\th : sr.h\n\t\t\t};\n\t\t},\n\n\t\t/**\n\t\t * Returns the size dimensions of the specified element.\n\t\t *\n\t\t * @method getSize\n\t\t * @param {Element/String} e Element object or element ID to get rectange from.\n\t\t * @return {object} Rectange for specified element object with w, h fields.\n\t\t */\n\t\tgetSize : function(e) {\n\t\t\tvar t = this, w, h;\n\n\t\t\te = t.get(e);\n\t\t\tw = t.getStyle(e, 'width');\n\t\t\th = t.getStyle(e, 'height');\n\n\t\t\t// Non pixel value, then force offset/clientWidth\n\t\t\tif (w.indexOf('px') === -1)\n\t\t\t\tw = 0;\n\n\t\t\t// Non pixel value, then force offset/clientWidth\n\t\t\tif (h.indexOf('px') === -1)\n\t\t\t\th = 0;\n\n\t\t\treturn {\n\t\t\t\tw : parseInt(w) || e.offsetWidth || e.clientWidth,\n\t\t\t\th : parseInt(h) || e.offsetHeight || e.clientHeight\n\t\t\t};\n\t\t},\n\n\t\t/**\n\t\t * Returns a node by the specified selector function. This function will\n\t\t * loop through all parent nodes and call the specified function for each node.\n\t\t * If the function then returns true indicating that it has found what it was looking for, the loop execution will then end\n\t\t * and the node it found will be returned.\n\t\t *\n\t\t * @method getParent\n\t\t * @param {Node/String} n DOM node to search parents on or ID string.\n\t\t * @param {function} f Selection function to execute on each node or CSS pattern.\n\t\t * @param {Node} r Optional root element, never go below this point.\n\t\t * @return {Node} DOM Node or null if it wasn't found.\n\t\t */\n\t\tgetParent : function(n, f, r) {\n\t\t\treturn this.getParents(n, f, r, false);\n\t\t},\n\n\t\t/**\n\t\t * Returns a node list of all parents matching the specified selector function or pattern.\n\t\t * If the function then returns true indicating that it has found what it was looking for and that node will be collected.\n\t\t *\n\t\t * @method getParents\n\t\t * @param {Node/String} n DOM node to search parents on or ID string.\n\t\t * @param {function} f Selection function to execute on each node or CSS pattern.\n\t\t * @param {Node} r Optional root element, never go below this point.\n\t\t * @return {Array} Array of nodes or null if it wasn't found.\n\t\t */\n\t\tgetParents : function(n, f, r, c) {\n\t\t\tvar t = this, na, se = t.settings, o = [];\n\n\t\t\tn = t.get(n);\n\t\t\tc = c === undefined;\n\n\t\t\tif (se.strict_root)\n\t\t\t\tr = r || t.getRoot();\n\n\t\t\t// Wrap node name as func\n\t\t\tif (is(f, 'string')) {\n\t\t\t\tna = f;\n\n\t\t\t\tif (f === '*') {\n\t\t\t\t\tf = function(n) {return n.nodeType == 1;};\n\t\t\t\t} else {\n\t\t\t\t\tf = function(n) {\n\t\t\t\t\t\treturn t.is(n, na);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile (n) {\n\t\t\t\tif (n == r || !n.nodeType || n.nodeType === 9)\n\t\t\t\t\tbreak;\n\n\t\t\t\tif (!f || f(n)) {\n\t\t\t\t\tif (c)\n\t\t\t\t\t\to.push(n);\n\t\t\t\t\telse\n\t\t\t\t\t\treturn n;\n\t\t\t\t}\n\n\t\t\t\tn = n.parentNode;\n\t\t\t}\n\n\t\t\treturn c ? o : null;\n\t\t},\n\n\t\t/**\n\t\t * Returns the specified element by ID or the input element if it isn't a string.\n\t\t *\n\t\t * @method get\n\t\t * @param {String/Element} n Element id to look for or element to just pass though.\n\t\t * @return {Element} Element matching the specified id or null if it wasn't found.\n\t\t */\n\t\tget : function(e) {\n\t\t\tvar n;\n\n\t\t\tif (e && this.doc && typeof(e) == 'string') {\n\t\t\t\tn = e;\n\t\t\t\te = this.doc.getElementById(e);\n\n\t\t\t\t// IE and Opera returns meta elements when they match the specified input ID, but getElementsByName seems to do the trick\n\t\t\t\tif (e && e.id !== n)\n\t\t\t\t\treturn this.doc.getElementsByName(n)[1];\n\t\t\t}\n\n\t\t\treturn e;\n\t\t},\n\n\t\t/**\n\t\t * Returns the next node that matches selector or function\n\t\t *\n\t\t * @method getNext\n\t\t * @param {Node} node Node to find siblings from.\n\t\t * @param {String/function} selector Selector CSS expression or function.\n\t\t * @return {Node} Next node item matching the selector or null if it wasn't found.\n\t\t */\n\t\tgetNext : function(node, selector) {\n\t\t\treturn this._findSib(node, selector, 'nextSibling');\n\t\t},\n\n\t\t/**\n\t\t * Returns the previous node that matches selector or function\n\t\t *\n\t\t * @method getPrev\n\t\t * @param {Node} node Node to find siblings from.\n\t\t * @param {String/function} selector Selector CSS expression or function.\n\t\t * @return {Node} Previous node item matching the selector or null if it wasn't found.\n\t\t */\n\t\tgetPrev : function(node, selector) {\n\t\t\treturn this._findSib(node, selector, 'previousSibling');\n\t\t},\n\n\t\t// #ifndef jquery\n\n\t\t/**\n\t\t * Selects specific elements by a CSS level 3 pattern. For example \"div#a1 p.test\".\n\t\t * This function is optimized for the most common patterns needed in TinyMCE but it also performes good enough\n\t\t * on more complex patterns.\n\t\t *\n\t\t * @method select\n\t\t * @param {String} p CSS level 1 pattern to select/find elements by.\n\t\t * @param {Object} s Optional root element/scope element to search in.\n\t\t * @return {Array} Array with all matched elements.\n\t\t * @example\n\t\t * // Adds a class to all paragraphs in the currently active editor\n\t\t * tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('p'), 'someclass');\n\t\t * \n\t\t * // Adds a class to all spans that has the test class in the currently active editor\n\t\t * tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('span.test'), 'someclass')\n\t\t */\n\t\tselect : function(pa, s) {\n\t\t\tvar t = this;\n\n\t\t\treturn tinymce.dom.Sizzle(pa, t.get(s) || t.get(t.settings.root_element) || t.doc, []);\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the specified element matches the specified css pattern.\n\t\t *\n\t\t * @method is\n\t\t * @param {Node/NodeList} n DOM node to match or an array of nodes to match.\n\t\t * @param {String} selector CSS pattern to match the element agains.\n\t\t */\n\t\tis : function(n, selector) {\n\t\t\tvar i;\n\n\t\t\t// If it isn't an array then try to do some simple selectors instead of Sizzle for to boost performance\n\t\t\tif (n.length === undefined) {\n\t\t\t\t// Simple all selector\n\t\t\t\tif (selector === '*')\n\t\t\t\t\treturn n.nodeType == 1;\n\n\t\t\t\t// Simple selector just elements\n\t\t\t\tif (simpleSelectorRe.test(selector)) {\n\t\t\t\t\tselector = selector.toLowerCase().split(/,/);\n\t\t\t\t\tn = n.nodeName.toLowerCase();\n\n\t\t\t\t\tfor (i = selector.length - 1; i >= 0; i--) {\n\t\t\t\t\t\tif (selector[i] == n)\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn tinymce.dom.Sizzle.matches(selector, n.nodeType ? [n] : n).length > 0;\n\t\t},\n\n\t\t// #endif\n\n\t\t/**\n\t\t * Adds the specified element to another element or elements.\n\t\t *\n\t\t * @method add\n\t\t * @param {String/Element/Array} Element id string, DOM node element or array of id's or elements to add to.\n\t\t * @param {String/Element} n Name of new element to add or existing element to add.\n\t\t * @param {Object} a Optional object collection with arguments to add to the new element(s).\n\t\t * @param {String} h Optional inner HTML contents to add for each element.\n\t\t * @param {Boolean} c Optional internal state to indicate if it should create or add.\n\t\t * @return {Element/Array} Element that got created or array with elements if multiple elements where passed.\n\t\t * @example\n\t\t * // Adds a new paragraph to the end of the active editor\n\t\t * tinyMCE.activeEditor.dom.add(tinyMCE.activeEditor.getBody(), 'p', {title : 'my title'}, 'Some content');\n\t\t */\n\t\tadd : function(p, n, a, h, c) {\n\t\t\tvar t = this;\n\n\t\t\treturn this.run(p, function(p) {\n\t\t\t\tvar e, k;\n\n\t\t\t\te = is(n, 'string') ? t.doc.createElement(n) : n;\n\t\t\t\tt.setAttribs(e, a);\n\n\t\t\t\tif (h) {\n\t\t\t\t\tif (h.nodeType)\n\t\t\t\t\t\te.appendChild(h);\n\t\t\t\t\telse\n\t\t\t\t\t\tt.setHTML(e, h);\n\t\t\t\t}\n\n\t\t\t\treturn !c ? p.appendChild(e) : e;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Creates a new element.\n\t\t *\n\t\t * @method create\n\t\t * @param {String} n Name of new element.\n\t\t * @param {Object} a Optional object name/value collection with element attributes.\n\t\t * @param {String} h Optional HTML string to set as inner HTML of the element.\n\t\t * @return {Element} HTML DOM node element that got created.\n\t\t * @example\n\t\t * // Adds an element where the caret/selection is in the active editor\n\t\t * var el = tinyMCE.activeEditor.dom.create('div', {id : 'test', 'class' : 'myclass'}, 'some content');\n\t\t * tinyMCE.activeEditor.selection.setNode(el);\n\t\t */\n\t\tcreate : function(n, a, h) {\n\t\t\treturn this.add(this.doc.createElement(n), n, a, h, 1);\n\t\t},\n\n\t\t/**\n\t\t * Create HTML string for element. The element will be closed unless an empty inner HTML string is passed.\n\t\t *\n\t\t * @method createHTML\n\t\t * @param {String} n Name of new element.\n\t\t * @param {Object} a Optional object name/value collection with element attributes.\n\t\t * @param {String} h Optional HTML string to set as inner HTML of the element.\n\t\t * @return {String} String with new HTML element like for example: <a href=\"#\">test</a>.\n\t\t * @example\n\t\t * // Creates a html chunk and inserts it at the current selection/caret location\n\t\t * tinyMCE.activeEditor.selection.setContent(tinyMCE.activeEditor.dom.createHTML('a', {href : 'test.html'}, 'some line'));\n\t\t */\n\t\tcreateHTML : function(n, a, h) {\n\t\t\tvar o = '', t = this, k;\n\n\t\t\to += '<' + n;\n\n\t\t\tfor (k in a) {\n\t\t\t\tif (a.hasOwnProperty(k))\n\t\t\t\t\to += ' ' + k + '=\"' + t.encode(a[k]) + '\"';\n\t\t\t}\n\n\t\t\t// A call to tinymce.is doesn't work for some odd reason on IE9 possible bug inside their JS runtime\n\t\t\tif (typeof(h) != \"undefined\")\n\t\t\t\treturn o + '>' + h + '</' + n + '>';\n\n\t\t\treturn o + ' />';\n\t\t},\n\n\t\t/**\n\t\t * Removes/deletes the specified element(s) from the DOM.\n\t\t *\n\t\t * @method remove\n\t\t * @param {String/Element/Array} node ID of element or DOM element object or array containing multiple elements/ids.\n\t\t * @param {Boolean} keep_children Optional state to keep children or not. If set to true all children will be placed at the location of the removed element.\n\t\t * @return {Element/Array} HTML DOM element that got removed or array of elements depending on input.\n\t\t * @example\n\t\t * // Removes all paragraphs in the active editor\n\t\t * tinyMCE.activeEditor.dom.remove(tinyMCE.activeEditor.dom.select('p'));\n\t\t * \n\t\t * // Removes a element by id in the document\n\t\t * tinyMCE.DOM.remove('mydiv');\n\t\t */\n\t\tremove : function(node, keep_children) {\n\t\t\treturn this.run(node, function(node) {\n\t\t\t\tvar child, parent = node.parentNode;\n\n\t\t\t\tif (!parent)\n\t\t\t\t\treturn null;\n\n\t\t\t\tif (keep_children) {\n\t\t\t\t\twhile (child = node.firstChild) {\n\t\t\t\t\t\t// IE 8 will crash if you don't remove completely empty text nodes\n\t\t\t\t\t\tif (!tinymce.isIE || child.nodeType !== 3 || child.nodeValue)\n\t\t\t\t\t\t\tparent.insertBefore(child, node);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tnode.removeChild(child);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn parent.removeChild(node);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Sets the CSS style value on a HTML element. The name can be a camelcase string\n\t\t * or the CSS style name like background-color.\n\t\t *\n\t\t * @method setStyle\n\t\t * @param {String/Element/Array} n HTML element/Element ID or Array of elements/ids to set CSS style value on.\n\t\t * @param {String} na Name of the style value to set.\n\t\t * @param {String} v Value to set on the style.\n\t\t * @example\n\t\t * // Sets a style value on all paragraphs in the currently active editor\n\t\t * tinyMCE.activeEditor.dom.setStyle(tinyMCE.activeEditor.dom.select('p'), 'background-color', 'red');\n\t\t * \n\t\t * // Sets a style value to an element by id in the current document\n\t\t * tinyMCE.DOM.setStyle('mydiv', 'background-color', 'red');\n\t\t */\n\t\tsetStyle : function(n, na, v) {\n\t\t\tvar t = this;\n\n\t\t\treturn t.run(n, function(e) {\n\t\t\t\tvar s, i;\n\n\t\t\t\ts = e.style;\n\n\t\t\t\t// Camelcase it, if needed\n\t\t\t\tna = na.replace(/-(\\D)/g, function(a, b){\n\t\t\t\t\treturn b.toUpperCase();\n\t\t\t\t});\n\n\t\t\t\t// Default px suffix on these\n\t\t\t\tif (t.pixelStyles.test(na) && (tinymce.is(v, 'number') || /^[\\-0-9\\.]+$/.test(v)))\n\t\t\t\t\tv += 'px';\n\n\t\t\t\tswitch (na) {\n\t\t\t\t\tcase 'opacity':\n\t\t\t\t\t\t// IE specific opacity\n\t\t\t\t\t\tif (isIE) {\n\t\t\t\t\t\t\ts.filter = v === '' ? '' : \"alpha(opacity=\" + (v * 100) + \")\";\n\n\t\t\t\t\t\t\tif (!n.currentStyle || !n.currentStyle.hasLayout)\n\t\t\t\t\t\t\t\ts.display = 'inline-block';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Fix for older browsers\n\t\t\t\t\t\ts[na] = s['-moz-opacity'] = s['-khtml-opacity'] = v || '';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'float':\n\t\t\t\t\t\tisIE ? s.styleFloat = v : s.cssFloat = v;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ts[na] = v || '';\n\t\t\t\t}\n\n\t\t\t\t// Force update of the style data\n\t\t\t\tif (t.settings.update_styles)\n\t\t\t\t\tt.setAttrib(e, 'data-mce-style');\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Returns the current style or runtime/computed value of a element.\n\t\t *\n\t\t * @method getStyle\n\t\t * @param {String/Element} n HTML element or element id string to get style from.\n\t\t * @param {String} na Style name to return.\n\t\t * @param {Boolean} c Computed style.\n\t\t * @return {String} Current style or computed style value of a element.\n\t\t */\n\t\tgetStyle : function(n, na, c) {\n\t\t\tn = this.get(n);\n\n\t\t\tif (!n)\n\t\t\t\treturn;\n\n\t\t\t// Gecko\n\t\t\tif (this.doc.defaultView && c) {\n\t\t\t\t// Remove camelcase\n\t\t\t\tna = na.replace(/[A-Z]/g, function(a){\n\t\t\t\t\treturn '-' + a;\n\t\t\t\t});\n\n\t\t\t\ttry {\n\t\t\t\t\treturn this.doc.defaultView.getComputedStyle(n, null).getPropertyValue(na);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Old safari might fail\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Camelcase it, if needed\n\t\t\tna = na.replace(/-(\\D)/g, function(a, b){\n\t\t\t\treturn b.toUpperCase();\n\t\t\t});\n\n\t\t\tif (na == 'float')\n\t\t\t\tna = isIE ? 'styleFloat' : 'cssFloat';\n\n\t\t\t// IE & Opera\n\t\t\tif (n.currentStyle && c)\n\t\t\t\treturn n.currentStyle[na];\n\n\t\t\treturn n.style ? n.style[na] : undefined;\n\t\t},\n\n\t\t/**\n\t\t * Sets multiple styles on the specified element(s).\n\t\t *\n\t\t * @method setStyles\n\t\t * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set styles on.\n\t\t * @param {Object} o Name/Value collection of style items to add to the element(s).\n\t\t * @example\n\t\t * // Sets styles on all paragraphs in the currently active editor\n\t\t * tinyMCE.activeEditor.dom.setStyles(tinyMCE.activeEditor.dom.select('p'), {'background-color' : 'red', 'color' : 'green'});\n\t\t * \n\t\t * // Sets styles to an element by id in the current document\n\t\t * tinyMCE.DOM.setStyles('mydiv', {'background-color' : 'red', 'color' : 'green'});\n\t\t */\n\t\tsetStyles : function(e, o) {\n\t\t\tvar t = this, s = t.settings, ol;\n\n\t\t\tol = s.update_styles;\n\t\t\ts.update_styles = 0;\n\n\t\t\teach(o, function(v, n) {\n\t\t\t\tt.setStyle(e, n, v);\n\t\t\t});\n\n\t\t\t// Update style info\n\t\t\ts.update_styles = ol;\n\t\t\tif (s.update_styles)\n\t\t\t\tt.setAttrib(e, s.cssText);\n\t\t},\n\n\t\t/**\n\t\t * Removes all attributes from an element or elements.\n\t\t * \n\t\t * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to remove attributes from.\n\t\t */\n\t\tremoveAllAttribs: function(e) {\n\t\t\treturn this.run(e, function(e) {\n\t\t\t\tvar i, attrs = e.attributes;\n\t\t\t\tfor (i = attrs.length - 1; i >= 0; i--) {\n\t\t\t\t\te.removeAttributeNode(attrs.item(i));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Sets the specified attributes value of a element or elements.\n\t\t *\n\t\t * @method setAttrib\n\t\t * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set attribute on.\n\t\t * @param {String} n Name of attribute to set.\n\t\t * @param {String} v Value to set on the attribute of this value is falsy like null 0 or '' it will remove the attribute instead.\n\t\t * @example\n\t\t * // Sets an attribute to all paragraphs in the active editor\n\t\t * tinyMCE.activeEditor.dom.setAttrib(tinyMCE.activeEditor.dom.select('p'), 'class', 'myclass');\n\t\t * \n\t\t * // Sets an attribute to a specific element in the current page\n\t\t * tinyMCE.dom.setAttrib('mydiv', 'class', 'myclass');\n\t\t */\n\t\tsetAttrib : function(e, n, v) {\n\t\t\tvar t = this;\n\n\t\t\t// Whats the point\n\t\t\tif (!e || !n)\n\t\t\t\treturn;\n\n\t\t\t// Strict XML mode\n\t\t\tif (t.settings.strict)\n\t\t\t\tn = n.toLowerCase();\n\n\t\t\treturn this.run(e, function(e) {\n\t\t\t\tvar s = t.settings;\n\t\t\t\tif (v !== null) {\n\t\t\t\t\tswitch (n) {\n\t\t\t\t\t\tcase \"style\":\n\t\t\t\t\t\t\tif (!is(v, 'string')) {\n\t\t\t\t\t\t\t\teach(v, function(v, n) {\n\t\t\t\t\t\t\t\t\tt.setStyle(e, n, v);\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// No mce_style for elements with these since they might get resized by the user\n\t\t\t\t\t\t\tif (s.keep_values) {\n\t\t\t\t\t\t\t\tif (v && !t._isRes(v))\n\t\t\t\t\t\t\t\t\te.setAttribute('data-mce-style', v, 2);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\te.removeAttribute('data-mce-style', 2);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\te.style.cssText = v;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"class\":\n\t\t\t\t\t\t\te.className = v || ''; // Fix IE null bug\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"src\":\n\t\t\t\t\t\tcase \"href\":\n\t\t\t\t\t\t\tif (s.keep_values) {\n\t\t\t\t\t\t\t\tif (s.url_converter)\n\t\t\t\t\t\t\t\t\tv = s.url_converter.call(s.url_converter_scope || t, v, n, e);\n\n\t\t\t\t\t\t\t\tt.setAttrib(e, 'data-mce-' + n, v, 2);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"shape\":\n\t\t\t\t\t\t\te.setAttribute('data-mce-style', v);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (is(v) && v !== null && v.length !== 0)\n\t\t\t\t\te.setAttribute(n, '' + v, 2);\n\t\t\t\telse\n\t\t\t\t\te.removeAttribute(n, 2);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Sets the specified attributes of a element or elements.\n\t\t *\n\t\t * @method setAttribs\n\t\t * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set attributes on.\n\t\t * @param {Object} o Name/Value collection of attribute items to add to the element(s).\n\t\t * @example\n\t\t * // Sets some attributes to all paragraphs in the active editor\n\t\t * tinyMCE.activeEditor.dom.setAttribs(tinyMCE.activeEditor.dom.select('p'), {'class' : 'myclass', title : 'some title'});\n\t\t * \n\t\t * // Sets some attributes to a specific element in the current page\n\t\t * tinyMCE.DOM.setAttribs('mydiv', {'class' : 'myclass', title : 'some title'});\n\t\t */\n\t\tsetAttribs : function(e, o) {\n\t\t\tvar t = this;\n\n\t\t\treturn this.run(e, function(e) {\n\t\t\t\teach(o, function(v, n) {\n\t\t\t\t\tt.setAttrib(e, n, v);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Returns the specified attribute by name.\n\t\t *\n\t\t * @method getAttrib\n\t\t * @param {String/Element} e Element string id or DOM element to get attribute from.\n\t\t * @param {String} n Name of attribute to get.\n\t\t * @param {String} dv Optional default value to return if the attribute didn't exist.\n\t\t * @return {String} Attribute value string, default value or null if the attribute wasn't found.\n\t\t */\n\t\tgetAttrib : function(e, n, dv) {\n\t\t\tvar v, t = this, undef;\n\n\t\t\te = t.get(e);\n\n\t\t\tif (!e || e.nodeType !== 1)\n\t\t\t\treturn dv === undef ? false : dv;\n\n\t\t\tif (!is(dv))\n\t\t\t\tdv = '';\n\n\t\t\t// Try the mce variant for these\n\t\t\tif (/^(src|href|style|coords|shape)$/.test(n)) {\n\t\t\t\tv = e.getAttribute(\"data-mce-\" + n);\n\n\t\t\t\tif (v)\n\t\t\t\t\treturn v;\n\t\t\t}\n\n\t\t\tif (isIE && t.props[n]) {\n\t\t\t\tv = e[t.props[n]];\n\t\t\t\tv = v && v.nodeValue ? v.nodeValue : v;\n\t\t\t}\n\n\t\t\tif (!v)\n\t\t\t\tv = e.getAttribute(n, 2);\n\n\t\t\t// Check boolean attribs\n\t\t\tif (/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(n)) {\n\t\t\t\tif (e[t.props[n]] === true && v === '')\n\t\t\t\t\treturn n;\n\n\t\t\t\treturn v ? n : '';\n\t\t\t}\n\n\t\t\t// Inner input elements will override attributes on form elements\n\t\t\tif (e.nodeName === \"FORM\" && e.getAttributeNode(n))\n\t\t\t\treturn e.getAttributeNode(n).nodeValue;\n\n\t\t\tif (n === 'style') {\n\t\t\t\tv = v || e.style.cssText;\n\n\t\t\t\tif (v) {\n\t\t\t\t\tv = t.serializeStyle(t.parseStyle(v), e.nodeName);\n\n\t\t\t\t\tif (t.settings.keep_values && !t._isRes(v))\n\t\t\t\t\t\te.setAttribute('data-mce-style', v);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove Apple and WebKit stuff\n\t\t\tif (isWebKit && n === \"class\" && v)\n\t\t\t\tv = v.replace(/(apple|webkit)\\-[a-z\\-]+/gi, '');\n\n\t\t\t// Handle IE issues\n\t\t\tif (isIE) {\n\t\t\t\tswitch (n) {\n\t\t\t\t\tcase 'rowspan':\n\t\t\t\t\tcase 'colspan':\n\t\t\t\t\t\t// IE returns 1 as default value\n\t\t\t\t\t\tif (v === 1)\n\t\t\t\t\t\t\tv = '';\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'size':\n\t\t\t\t\t\t// IE returns +0 as default value for size\n\t\t\t\t\t\tif (v === '+0' || v === 20 || v === 0)\n\t\t\t\t\t\t\tv = '';\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'width':\n\t\t\t\t\tcase 'height':\n\t\t\t\t\tcase 'vspace':\n\t\t\t\t\tcase 'checked':\n\t\t\t\t\tcase 'disabled':\n\t\t\t\t\tcase 'readonly':\n\t\t\t\t\t\tif (v === 0)\n\t\t\t\t\t\t\tv = '';\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'hspace':\n\t\t\t\t\t\t// IE returns -1 as default value\n\t\t\t\t\t\tif (v === -1)\n\t\t\t\t\t\t\tv = '';\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'maxlength':\n\t\t\t\t\tcase 'tabindex':\n\t\t\t\t\t\t// IE returns default value\n\t\t\t\t\t\tif (v === 32768 || v === 2147483647 || v === '32768')\n\t\t\t\t\t\t\tv = '';\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'multiple':\n\t\t\t\t\tcase 'compact':\n\t\t\t\t\tcase 'noshade':\n\t\t\t\t\tcase 'nowrap':\n\t\t\t\t\t\tif (v === 65535)\n\t\t\t\t\t\t\treturn n;\n\n\t\t\t\t\t\treturn dv;\n\n\t\t\t\t\tcase 'shape':\n\t\t\t\t\t\tv = v.toLowerCase();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// IE has odd anonymous function for event attributes\n\t\t\t\t\t\tif (n.indexOf('on') === 0 && v)\n\t\t\t\t\t\t\tv = tinymce._replace(/^function\\s+\\w+\\(\\)\\s+\\{\\s+(.*)\\s+\\}$/, '$1', '' + v);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn (v !== undef && v !== null && v !== '') ? '' + v : dv;\n\t\t},\n\n\t\t/**\n\t\t * Returns the absolute x, y position of a node. The position will be returned in a object with x, y fields.\n\t\t *\n\t\t * @method getPos\n\t\t * @param {Element/String} n HTML element or element id to get x, y position from.\n\t\t * @param {Element} ro Optional root element to stop calculations at.\n\t\t * @return {object} Absolute position of the specified element object with x, y fields.\n\t\t */\n\t\tgetPos : function(n, ro) {\n\t\t\tvar t = this, x = 0, y = 0, e, d = t.doc, r;\n\n\t\t\tn = t.get(n);\n\t\t\tro = ro || d.body;\n\n\t\t\tif (n) {\n\t\t\t\t// Use getBoundingClientRect if it exists since it's faster than looping offset nodes\n\t\t\t\tif (n.getBoundingClientRect) {\n\t\t\t\t\tn = n.getBoundingClientRect();\n\t\t\t\t\te = t.boxModel ? d.documentElement : d.body;\n\n\t\t\t\t\t// Add scroll offsets from documentElement or body since IE with the wrong box model will use d.body and so do WebKit\n\t\t\t\t\t// Also remove the body/documentelement clientTop/clientLeft on IE 6, 7 since they offset the position\n\t\t\t\t\tx = n.left + (d.documentElement.scrollLeft || d.body.scrollLeft) - e.clientTop;\n\t\t\t\t\ty = n.top + (d.documentElement.scrollTop || d.body.scrollTop) - e.clientLeft;\n\n\t\t\t\t\treturn {x : x, y : y};\n\t\t\t\t}\n\n\t\t\t\tr = n;\n\t\t\t\twhile (r && r != ro && r.nodeType) {\n\t\t\t\t\tx += r.offsetLeft || 0;\n\t\t\t\t\ty += r.offsetTop || 0;\n\t\t\t\t\tr = r.offsetParent;\n\t\t\t\t}\n\n\t\t\t\tr = n.parentNode;\n\t\t\t\twhile (r && r != ro && r.nodeType) {\n\t\t\t\t\tx -= r.scrollLeft || 0;\n\t\t\t\t\ty -= r.scrollTop || 0;\n\t\t\t\t\tr = r.parentNode;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {x : x, y : y};\n\t\t},\n\n\t\t/**\n\t\t * Parses the specified style value into an object collection. This parser will also\n\t\t * merge and remove any redundant items that browsers might have added. It will also convert non hex\n\t\t * colors to hex values. Urls inside the styles will also be converted to absolute/relative based on settings.\n\t\t *\n\t\t * @method parseStyle\n\t\t * @param {String} st Style value to parse for example: border:1px solid red;.\n\t\t * @return {Object} Object representation of that style like {border : '1px solid red'}\n\t\t */\n\t\tparseStyle : function(st) {\n\t\t\treturn this.styles.parse(st);\n\t\t},\n\n\t\t/**\n\t\t * Serializes the specified style object into a string.\n\t\t *\n\t\t * @method serializeStyle\n\t\t * @param {Object} o Object to serialize as string for example: {border : '1px solid red'}\n\t\t * @param {String} name Optional element name.\n\t\t * @return {String} String representation of the style object for example: border: 1px solid red.\n\t\t */\n\t\tserializeStyle : function(o, name) {\n\t\t\treturn this.styles.serialize(o, name);\n\t\t},\n\n\t\t/**\n\t\t * Imports/loads the specified CSS file into the document bound to the class.\n\t\t *\n\t\t * @method loadCSS\n\t\t * @param {String} u URL to CSS file to load.\n\t\t * @example\n\t\t * // Loads a CSS file dynamically into the current document\n\t\t * tinymce.DOM.loadCSS('somepath/some.css');\n\t\t * \n\t\t * // Loads a CSS file into the currently active editor instance\n\t\t * tinyMCE.activeEditor.dom.loadCSS('somepath/some.css');\n\t\t * \n\t\t * // Loads a CSS file into an editor instance by id\n\t\t * tinyMCE.get('someid').dom.loadCSS('somepath/some.css');\n\t\t * \n\t\t * // Loads multiple CSS files into the current document\n\t\t * tinymce.DOM.loadCSS('somepath/some.css,somepath/someother.css');\n\t\t */\n\t\tloadCSS : function(u) {\n\t\t\tvar t = this, d = t.doc, head;\n\n\t\t\tif (!u)\n\t\t\t\tu = '';\n\n\t\t\thead = t.select('head')[0];\n\n\t\t\teach(u.split(','), function(u) {\n\t\t\t\tvar link;\n\n\t\t\t\tif (t.files[u])\n\t\t\t\t\treturn;\n\n\t\t\t\tt.files[u] = true;\n\t\t\t\tlink = t.create('link', {rel : 'stylesheet', href : tinymce._addVer(u)});\n\n\t\t\t\t// IE 8 has a bug where dynamically loading stylesheets would produce a 1 item remaining bug\n\t\t\t\t// This fix seems to resolve that issue by realcing the document ones a stylesheet finishes loading\n\t\t\t\t// It's ugly but it seems to work fine.\n\t\t\t\tif (isIE && d.documentMode && d.recalc) {\n\t\t\t\t\tlink.onload = function() {\n\t\t\t\t\t\tif (d.recalc)\n\t\t\t\t\t\t\td.recalc();\n\n\t\t\t\t\t\tlink.onload = null;\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\thead.appendChild(link);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Adds a class to the specified element or elements.\n\t\t *\n\t\t * @method addClass\n\t\t * @param {String/Element/Array} Element ID string or DOM element or array with elements or IDs.\n\t\t * @param {String} c Class name to add to each element.\n\t\t * @return {String/Array} String with new class value or array with new class values for all elements.\n\t\t * @example\n\t\t * // Adds a class to all paragraphs in the active editor\n\t\t * tinyMCE.activeEditor.dom.addClass(tinyMCE.activeEditor.dom.select('p'), 'myclass');\n\t\t * \n\t\t * // Adds a class to a specific element in the current page\n\t\t * tinyMCE.DOM.addClass('mydiv', 'myclass');\n\t\t */\n\t\taddClass : function(e, c) {\n\t\t\treturn this.run(e, function(e) {\n\t\t\t\tvar o;\n\n\t\t\t\tif (!c)\n\t\t\t\t\treturn 0;\n\n\t\t\t\tif (this.hasClass(e, c))\n\t\t\t\t\treturn e.className;\n\n\t\t\t\to = this.removeClass(e, c);\n\n\t\t\t\treturn e.className = (o != '' ? (o + ' ') : '') + c;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Removes a class from the specified element or elements.\n\t\t *\n\t\t * @method removeClass\n\t\t * @param {String/Element/Array} Element ID string or DOM element or array with elements or IDs.\n\t\t * @param {String} c Class name to remove to each element.\n\t\t * @return {String/Array} String with new class value or array with new class values for all elements.\n\t\t * @example\n\t\t * // Removes a class from all paragraphs in the active editor\n\t\t * tinyMCE.activeEditor.dom.removeClass(tinyMCE.activeEditor.dom.select('p'), 'myclass');\n\t\t * \n\t\t * // Removes a class from a specific element in the current page\n\t\t * tinyMCE.DOM.removeClass('mydiv', 'myclass');\n\t\t */\n\t\tremoveClass : function(e, c) {\n\t\t\tvar t = this, re;\n\n\t\t\treturn t.run(e, function(e) {\n\t\t\t\tvar v;\n\n\t\t\t\tif (t.hasClass(e, c)) {\n\t\t\t\t\tif (!re)\n\t\t\t\t\t\tre = new RegExp(\"(^|\\\\s+)\" + c + \"(\\\\s+|$)\", \"g\");\n\n\t\t\t\t\tv = e.className.replace(re, ' ');\n\t\t\t\t\tv = tinymce.trim(v != ' ' ? v : '');\n\n\t\t\t\t\te.className = v;\n\n\t\t\t\t\t// Empty class attr\n\t\t\t\t\tif (!v) {\n\t\t\t\t\t\te.removeAttribute('class');\n\t\t\t\t\t\te.removeAttribute('className');\n\t\t\t\t\t}\n\n\t\t\t\t\treturn v;\n\t\t\t\t}\n\n\t\t\t\treturn e.className;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Returns true if the specified element has the specified class.\n\t\t *\n\t\t * @method hasClass\n\t\t * @param {String/Element} n HTML element or element id string to check CSS class on.\n\t\t * @param {String} c CSS class to check for.\n\t\t * @return {Boolean} true/false if the specified element has the specified class.\n\t\t */\n\t\thasClass : function(n, c) {\n\t\t\tn = this.get(n);\n\n\t\t\tif (!n || !c)\n\t\t\t\treturn false;\n\n\t\t\treturn (' ' + n.className + ' ').indexOf(' ' + c + ' ') !== -1;\n\t\t},\n\n\t\t/**\n\t\t * Shows the specified element(s) by ID by setting the \"display\" style.\n\t\t *\n\t\t * @method show\n\t\t * @param {String/Element/Array} e ID of DOM element or DOM element or array with elements or IDs to show.\n\t\t */\n\t\tshow : function(e) {\n\t\t\treturn this.setStyle(e, 'display', 'block');\n\t\t},\n\n\t\t/**\n\t\t * Hides the specified element(s) by ID by setting the \"display\" style.\n\t\t *\n\t\t * @method hide\n\t\t * @param {String/Element/Array} e ID of DOM element or DOM element or array with elements or IDs to hide.\n\t\t * @example\n\t\t * // Hides a element by id in the document\n\t\t * tinymce.DOM.hide('myid');\n\t\t */\n\t\thide : function(e) {\n\t\t\treturn this.setStyle(e, 'display', 'none');\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the element is hidden or not by checking the \"display\" style.\n\t\t *\n\t\t * @method isHidden\n\t\t * @param {String/Element} e Id or element to check display state on.\n\t\t * @return {Boolean} true/false if the element is hidden or not.\n\t\t */\n\t\tisHidden : function(e) {\n\t\t\te = this.get(e);\n\n\t\t\treturn !e || e.style.display == 'none' || this.getStyle(e, 'display') == 'none';\n\t\t},\n\n\t\t/**\n\t\t * Returns a unique id. This can be useful when generating elements on the fly.\n\t\t * This method will not check if the element already exists.\n\t\t *\n\t\t * @method uniqueId\n\t\t * @param {String} p Optional prefix to add infront of all ids defaults to \"mce_\".\n\t\t * @return {String} Unique id.\n\t\t */\n\t\tuniqueId : function(p) {\n\t\t\treturn (!p ? 'mce_' : p) + (this.counter++);\n\t\t},\n\n\t\t/**\n\t\t * Sets the specified HTML content inside the element or elements. The HTML will first be processed this means\n\t\t * URLs will get converted, hex color values fixed etc. Check processHTML for details.\n\t\t *\n\t\t * @method setHTML\n\t\t * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set HTML inside.\n\t\t * @param {String} h HTML content to set as inner HTML of the element.\n\t\t * @example\n\t\t * // Sets the inner HTML of all paragraphs in the active editor\n\t\t * tinyMCE.activeEditor.dom.setHTML(tinyMCE.activeEditor.dom.select('p'), 'some inner html');\n\t\t * \n\t\t * // Sets the inner HTML of a element by id in the document\n\t\t * tinyMCE.DOM.setHTML('mydiv', 'some inner html');\n\t\t */\n\t\tsetHTML : function(element, html) {\n\t\t\tvar self = this;\n\n\t\t\treturn self.run(element, function(element) {\n\t\t\t\tif (isIE) {\n\t\t\t\t\t// Remove all child nodes, IE keeps empty text nodes in DOM\n\t\t\t\t\twhile (element.firstChild)\n\t\t\t\t\t\telement.removeChild(element.firstChild);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// IE will remove comments from the beginning\n\t\t\t\t\t\t// unless you padd the contents with something\n\t\t\t\t\t\telement.innerHTML = '<br />' + html;\n\t\t\t\t\t\telement.removeChild(element.firstChild);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t// IE sometimes produces an unknown runtime error on innerHTML if it's an block element within a block element for example a div inside a p\n\t\t\t\t\t\t// This seems to fix this problem\n\n\t\t\t\t\t\t// Create new div with HTML contents and a BR infront to keep comments\n\t\t\t\t\t\telement = self.create('div');\n\t\t\t\t\t\telement.innerHTML = '<br />' + html;\n\n\t\t\t\t\t\t// Add all children from div to target\n\t\t\t\t\t\teach (element.childNodes, function(node, i) {\n\t\t\t\t\t\t\t// Skip br element\n\t\t\t\t\t\t\tif (i)\n\t\t\t\t\t\t\t\telement.appendChild(node);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\telement.innerHTML = html;\n\n\t\t\t\treturn html;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Returns the outer HTML of an element.\n\t\t *\n\t\t * @method getOuterHTML\n\t\t * @param {String/Element} elm Element ID or element object to get outer HTML from.\n\t\t * @return {String} Outer HTML string.\n\t\t * @example\n\t\t * tinymce.DOM.getOuterHTML(editorElement);\n\t\t * tinyMCE.activeEditor.getOuterHTML(tinyMCE.activeEditor.getBody());\n\t\t */\n\t\tgetOuterHTML : function(elm) {\n\t\t\tvar doc, self = this;\n\n\t\t\telm = self.get(elm);\n\n\t\t\tif (!elm)\n\t\t\t\treturn null;\n\n\t\t\tif (elm.nodeType === 1 && self.hasOuterHTML)\n\t\t\t\treturn elm.outerHTML;\n\n\t\t\tdoc = (elm.ownerDocument || self.doc).createElement(\"body\");\n\t\t\tdoc.appendChild(elm.cloneNode(true));\n\n\t\t\treturn doc.innerHTML;\n\t\t},\n\n\t\t/**\n\t\t * Sets the specified outer HTML on a element or elements.\n\t\t *\n\t\t * @method setOuterHTML\n\t\t * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to set outer HTML on.\n\t\t * @param {Object} h HTML code to set as outer value for the element.\n\t\t * @param {Document} d Optional document scope to use in this process defaults to the document of the DOM class.\n\t\t * @example\n\t\t * // Sets the outer HTML of all paragraphs in the active editor\n\t\t * tinyMCE.activeEditor.dom.setOuterHTML(tinyMCE.activeEditor.dom.select('p'), '<div>some html</div>');\n\t\t * \n\t\t * // Sets the outer HTML of a element by id in the document\n\t\t * tinyMCE.DOM.setOuterHTML('mydiv', '<div>some html</div>');\n\t\t */\n\t\tsetOuterHTML : function(e, h, d) {\n\t\t\tvar t = this;\n\n\t\t\tfunction setHTML(e, h, d) {\n\t\t\t\tvar n, tp;\n\n\t\t\t\ttp = d.createElement(\"body\");\n\t\t\t\ttp.innerHTML = h;\n\n\t\t\t\tn = tp.lastChild;\n\t\t\t\twhile (n) {\n\t\t\t\t\tt.insertAfter(n.cloneNode(true), e);\n\t\t\t\t\tn = n.previousSibling;\n\t\t\t\t}\n\n\t\t\t\tt.remove(e);\n\t\t\t};\n\n\t\t\treturn this.run(e, function(e) {\n\t\t\t\te = t.get(e);\n\n\t\t\t\t// Only set HTML on elements\n\t\t\t\tif (e.nodeType == 1) {\n\t\t\t\t\td = d || e.ownerDocument || t.doc;\n\n\t\t\t\t\tif (isIE) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Try outerHTML for IE it sometimes produces an unknown runtime error\n\t\t\t\t\t\t\tif (isIE && e.nodeType == 1)\n\t\t\t\t\t\t\t\te.outerHTML = h;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tsetHTML(e, h, d);\n\t\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t\t// Fix for unknown runtime error\n\t\t\t\t\t\t\tsetHTML(e, h, d);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tsetHTML(e, h, d);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Entity decode a string, resolves any HTML entities like &aring;.\n\t\t *\n\t\t * @method decode\n\t\t * @param {String} s String to decode entities on.\n\t\t * @return {String} Entity decoded string.\n\t\t */\n\t\tdecode : Entities.decode,\n\n\t\t/**\n\t\t * Entity encodes a string, encodes the most common entities <>\"& into entities.\n\t\t *\n\t\t * @method encode\n\t\t * @param {String} text String to encode with entities.\n\t\t * @return {String} Entity encoded string.\n\t\t */\n\t\tencode : Entities.encodeAllRaw,\n\n\t\t/**\n\t\t * Inserts a element after the reference element.\n\t\t *\n\t\t * @method insertAfter\n\t\t * @param {Element} node Element to insert after the reference.\n\t\t * @param {Element/String/Array} reference_node Reference element, element id or array of elements to insert after.\n\t\t * @return {Element/Array} Element that got added or an array with elements. \n\t\t */\n\t\tinsertAfter : function(node, reference_node) {\n\t\t\treference_node = this.get(reference_node);\n\n\t\t\treturn this.run(node, function(node) {\n\t\t\t\tvar parent, nextSibling;\n\n\t\t\t\tparent = reference_node.parentNode;\n\t\t\t\tnextSibling = reference_node.nextSibling;\n\n\t\t\t\tif (nextSibling)\n\t\t\t\t\tparent.insertBefore(node, nextSibling);\n\t\t\t\telse\n\t\t\t\t\tparent.appendChild(node);\n\n\t\t\t\treturn node;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the specified element is a block element or not.\n\t\t *\n\t\t * @method isBlock\n\t\t * @param {Node/String} node Element/Node to check.\n\t\t * @return {Boolean} True/False state if the node is a block element or not.\n\t\t */\n\t\tisBlock : function(node) {\n\t\t\tvar type = node.nodeType;\n\n\t\t\t// If it's a node then check the type and use the nodeName\n\t\t\tif (type)\n\t\t\t\treturn !!(type === 1 && blockElementsMap[node.nodeName]);\n\n\t\t\treturn !!blockElementsMap[node];\n\t\t},\n\n\t\t/**\n\t\t * Replaces the specified element or elements with the specified element, the new element will\n\t\t * be cloned if multiple inputs elements are passed.\n\t\t *\n\t\t * @method replace\n\t\t * @param {Element} n New element to replace old ones with.\n\t\t * @param {Element/String/Array} o Element DOM node, element id or array of elements or ids to replace.\n\t\t * @param {Boolean} k Optional keep children state, if set to true child nodes from the old object will be added to new ones.\n\t\t */\n\t\treplace : function(n, o, k) {\n\t\t\tvar t = this;\n\n\t\t\tif (is(o, 'array'))\n\t\t\t\tn = n.cloneNode(true);\n\n\t\t\treturn t.run(o, function(o) {\n\t\t\t\tif (k) {\n\t\t\t\t\teach(tinymce.grep(o.childNodes), function(c) {\n\t\t\t\t\t\tn.appendChild(c);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn o.parentNode.replaceChild(n, o);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Renames the specified element to a new name and keep it's attributes and children.\n\t\t *\n\t\t * @method rename\n\t\t * @param {Element} elm Element to rename.\n\t\t * @param {String} name Name of the new element.\n\t\t * @return New element or the old element if it needed renaming.\n\t\t */\n\t\trename : function(elm, name) {\n\t\t\tvar t = this, newElm;\n\n\t\t\tif (elm.nodeName != name.toUpperCase()) {\n\t\t\t\t// Rename block element\n\t\t\t\tnewElm = t.create(name);\n\n\t\t\t\t// Copy attribs to new block\n\t\t\t\teach(t.getAttribs(elm), function(attr_node) {\n\t\t\t\t\tt.setAttrib(newElm, attr_node.nodeName, t.getAttrib(elm, attr_node.nodeName));\n\t\t\t\t});\n\n\t\t\t\t// Replace block\n\t\t\t\tt.replace(newElm, elm, 1);\n\t\t\t}\n\n\t\t\treturn newElm || elm;\n\t\t},\n\n\t\t/**\n\t\t * Find the common ancestor of two elements. This is a shorter method than using the DOM Range logic.\n\t\t *\n\t\t * @method findCommonAncestor\n\t\t * @param {Element} a Element to find common ancestor of.\n\t\t * @param {Element} b Element to find common ancestor of.\n\t\t * @return {Element} Common ancestor element of the two input elements.\n\t\t */\n\t\tfindCommonAncestor : function(a, b) {\n\t\t\tvar ps = a, pe;\n\n\t\t\twhile (ps) {\n\t\t\t\tpe = b;\n\n\t\t\t\twhile (pe && ps != pe)\n\t\t\t\t\tpe = pe.parentNode;\n\n\t\t\t\tif (ps == pe)\n\t\t\t\t\tbreak;\n\n\t\t\t\tps = ps.parentNode;\n\t\t\t}\n\n\t\t\tif (!ps && a.ownerDocument)\n\t\t\t\treturn a.ownerDocument.documentElement;\n\n\t\t\treturn ps;\n\t\t},\n\n\t\t/**\n\t\t * Parses the specified RGB color value and returns a hex version of that color.\n\t\t *\n\t\t * @method toHex\n\t\t * @param {String} s RGB string value like rgb(1,2,3)\n\t\t * @return {String} Hex version of that RGB value like #FF00FF.\n\t\t */\n\t\ttoHex : function(s) {\n\t\t\tvar c = /^\\s*rgb\\s*?\\(\\s*?([0-9]+)\\s*?,\\s*?([0-9]+)\\s*?,\\s*?([0-9]+)\\s*?\\)\\s*$/i.exec(s);\n\n\t\t\tfunction hex(s) {\n\t\t\t\ts = parseInt(s).toString(16);\n\n\t\t\t\treturn s.length > 1 ? s : '0' + s; // 0 -> 00\n\t\t\t};\n\n\t\t\tif (c) {\n\t\t\t\ts = '#' + hex(c[1]) + hex(c[2]) + hex(c[3]);\n\n\t\t\t\treturn s;\n\t\t\t}\n\n\t\t\treturn s;\n\t\t},\n\n\t\t/**\n\t\t * Returns a array of all single CSS classes in the document. A single CSS class is a simple\n\t\t * rule like \".class\" complex ones like \"div td.class\" will not be added to output.\n\t\t *\n\t\t * @method getClasses\n\t\t * @return {Array} Array with class objects each object has a class field might be other fields in the future.\n\t\t */\n\t\tgetClasses : function() {\n\t\t\tvar t = this, cl = [], i, lo = {}, f = t.settings.class_filter, ov;\n\n\t\t\tif (t.classes)\n\t\t\t\treturn t.classes;\n\n\t\t\tfunction addClasses(s) {\n\t\t\t\t// IE style imports\n\t\t\t\teach(s.imports, function(r) {\n\t\t\t\t\taddClasses(r);\n\t\t\t\t});\n\n\t\t\t\teach(s.cssRules || s.rules, function(r) {\n\t\t\t\t\t// Real type or fake it on IE\n\t\t\t\t\tswitch (r.type || 1) {\n\t\t\t\t\t\t// Rule\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tif (r.selectorText) {\n\t\t\t\t\t\t\t\teach(r.selectorText.split(','), function(v) {\n\t\t\t\t\t\t\t\t\tv = v.replace(/^\\s*|\\s*$|^\\s\\./g, \"\");\n\n\t\t\t\t\t\t\t\t\t// Is internal or it doesn't contain a class\n\t\t\t\t\t\t\t\t\tif (/\\.mce/.test(v) || !/\\.[\\w\\-]+$/.test(v))\n\t\t\t\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t\t\t\t// Remove everything but class name\n\t\t\t\t\t\t\t\t\tov = v;\n\t\t\t\t\t\t\t\t\tv = tinymce._replace(/.*\\.([a-z0-9_\\-]+).*/i, '$1', v);\n\n\t\t\t\t\t\t\t\t\t// Filter classes\n\t\t\t\t\t\t\t\t\tif (f && !(v = f(v, ov)))\n\t\t\t\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t\t\t\tif (!lo[v]) {\n\t\t\t\t\t\t\t\t\t\tcl.push({'class' : v});\n\t\t\t\t\t\t\t\t\t\tlo[v] = 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// Import\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\taddClasses(r.styleSheet);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\n\t\t\ttry {\n\t\t\t\teach(t.doc.styleSheets, addClasses);\n\t\t\t} catch (ex) {\n\t\t\t\t// Ignore\n\t\t\t}\n\n\t\t\tif (cl.length > 0)\n\t\t\t\tt.classes = cl;\n\n\t\t\treturn cl;\n\t\t},\n\n\t\t/**\n\t\t * Executes the specified function on the element by id or dom element node or array of elements/id.\n\t\t *\n\t\t * @method run\n\t\t * @param {String/Element/Array} Element ID or DOM element object or array with ids or elements.\n\t\t * @param {function} f Function to execute for each item.\n\t\t * @param {Object} s Optional scope to execute the function in.\n\t\t * @return {Object/Array} Single object or array with objects depending on multiple input or not.\n\t\t */\n\t\trun : function(e, f, s) {\n\t\t\tvar t = this, o;\n\n\t\t\tif (t.doc && typeof(e) === 'string')\n\t\t\t\te = t.get(e);\n\n\t\t\tif (!e)\n\t\t\t\treturn false;\n\n\t\t\ts = s || this;\n\t\t\tif (!e.nodeType && (e.length || e.length === 0)) {\n\t\t\t\to = [];\n\n\t\t\t\teach(e, function(e, i) {\n\t\t\t\t\tif (e) {\n\t\t\t\t\t\tif (typeof(e) == 'string')\n\t\t\t\t\t\t\te = t.doc.getElementById(e);\n\n\t\t\t\t\t\to.push(f.call(s, e, i));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn o;\n\t\t\t}\n\n\t\t\treturn f.call(s, e);\n\t\t},\n\n\t\t/**\n\t\t * Returns an NodeList with attributes for the element.\n\t\t *\n\t\t * @method getAttribs\n\t\t * @param {HTMLElement/string} n Element node or string id to get attributes from.\n\t\t * @return {NodeList} NodeList with attributes.\n\t\t */\n\t\tgetAttribs : function(n) {\n\t\t\tvar o;\n\n\t\t\tn = this.get(n);\n\n\t\t\tif (!n)\n\t\t\t\treturn [];\n\n\t\t\tif (isIE) {\n\t\t\t\to = [];\n\n\t\t\t\t// Object will throw exception in IE\n\t\t\t\tif (n.nodeName == 'OBJECT')\n\t\t\t\t\treturn n.attributes;\n\n\t\t\t\t// IE doesn't keep the selected attribute if you clone option elements\n\t\t\t\tif (n.nodeName === 'OPTION' && this.getAttrib(n, 'selected'))\n\t\t\t\t\to.push({specified : 1, nodeName : 'selected'});\n\n\t\t\t\t// It's crazy that this is faster in IE but it's because it returns all attributes all the time\n\t\t\t\tn.cloneNode(false).outerHTML.replace(/<\\/?[\\w:\\-]+ ?|=[\\\"][^\\\"]+\\\"|=\\'[^\\']+\\'|=[\\w\\-]+|>/gi, '').replace(/[\\w:\\-]+/gi, function(a) {\n\t\t\t\t\to.push({specified : 1, nodeName : a});\n\t\t\t\t});\n\n\t\t\t\treturn o;\n\t\t\t}\n\n\t\t\treturn n.attributes;\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the specified node is to be considered empty or not.\n\t\t *\n\t\t * @example\n\t\t * tinymce.DOM.isEmpty(node, {img : true});\n\t\t * @method isEmpty\n\t\t * @param {Object} elements Optional name/value object with elements that are automatically treated as non empty elements.\n\t\t * @return {Boolean} true/false if the node is empty or not.\n\t\t */\n\t\tisEmpty : function(node, elements) {\n\t\t\tvar self = this, i, attributes, type, walker, name, parentNode;\n\n\t\t\tnode = node.firstChild;\n\t\t\tif (node) {\n\t\t\t\twalker = new tinymce.dom.TreeWalker(node);\n\t\t\t\telements = elements || self.schema ? self.schema.getNonEmptyElements() : null;\n\n\t\t\t\tdo {\n\t\t\t\t\ttype = node.nodeType;\n\n\t\t\t\t\tif (type === 1) {\n\t\t\t\t\t\t// Ignore bogus elements\n\t\t\t\t\t\tif (node.getAttribute('data-mce-bogus'))\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\t// Keep empty elements like <img />\n\t\t\t\t\t\tname = node.nodeName.toLowerCase();\n\t\t\t\t\t\tif (elements && elements[name]) {\n\t\t\t\t\t\t\t// Ignore single BR elements in blocks like <p><br /></p>\n\t\t\t\t\t\t\tparentNode = node.parentNode;\n\t\t\t\t\t\t\tif (name === 'br' && self.isBlock(parentNode) && parentNode.firstChild === node && parentNode.lastChild === node) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Keep elements with data-bookmark attributes or name attribute like <a name=\"1\"></a>\n\t\t\t\t\t\tattributes = self.getAttribs(node);\n\t\t\t\t\t\ti = node.attributes.length;\n\t\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\t\tname = node.attributes[i].nodeName;\n\t\t\t\t\t\t\tif (name === \"name\" || name === 'data-mce-bookmark')\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Keep non whitespace text nodes\n\t\t\t\t\tif ((type === 3 && !whiteSpaceRegExp.test(node.nodeValue)))\n\t\t\t\t\t\treturn false;\n\t\t\t\t} while (node = walker.next());\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\t/**\n\t\t * Destroys all internal references to the DOM to solve IE leak issues.\n\t\t *\n\t\t * @method destroy\n\t\t */\n\t\tdestroy : function(s) {\n\t\t\tvar t = this;\n\n\t\t\tif (t.events)\n\t\t\t\tt.events.destroy();\n\n\t\t\tt.win = t.doc = t.root = t.events = null;\n\n\t\t\t// Manual destroy then remove unload handler\n\t\t\tif (!s)\n\t\t\t\ttinymce.removeUnload(t.destroy);\n\t\t},\n\n\t\t/**\n\t\t * Created a new DOM Range object. This will use the native DOM Range API if it's\n\t\t * available if it's not it will fallback to the custom TinyMCE implementation.\n\t\t *\n\t\t * @method createRng\n\t\t * @return {DOMRange} DOM Range object.\n\t\t * @example\n\t\t * var rng = tinymce.DOM.createRng();\n\t\t * alert(rng.startContainer + \",\" + rng.startOffset);\n\t\t */\n\t\tcreateRng : function() {\n\t\t\tvar d = this.doc;\n\n\t\t\treturn d.createRange ? d.createRange() : new tinymce.dom.Range(this);\n\t\t},\n\n\t\t/**\n\t\t * Returns the index of the specified node within it's parent.\n\t\t *\n\t\t * @param {Node} node Node to look for.\n\t\t * @param {boolean} normalized Optional true/false state if the index is what it would be after a normalization.\n\t\t * @return {Number} Index of the specified node.\n\t\t */\n\t\tnodeIndex : function(node, normalized) {\n\t\t\tvar idx = 0, lastNodeType, lastNode, nodeType;\n\n\t\t\tif (node) {\n\t\t\t\tfor (lastNodeType = node.nodeType, node = node.previousSibling, lastNode = node; node; node = node.previousSibling) {\n\t\t\t\t\tnodeType = node.nodeType;\n\n\t\t\t\t\t// Normalize text nodes\n\t\t\t\t\tif (normalized && nodeType == 3) {\n\t\t\t\t\t\tif (nodeType == lastNodeType || !node.nodeValue.length)\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tidx++;\n\t\t\t\t\tlastNodeType = nodeType;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn idx;\n\t\t},\n\n\t\t/**\n\t\t * Splits an element into two new elements and places the specified split\n\t\t * element or element between the new ones. For example splitting the paragraph at the bold element in\n\t\t * this example <p>abc<b>abc</b>123</p> would produce <p>abc</p><b>abc</b><p>123</p>. \n\t\t *\n\t\t * @method split\n\t\t * @param {Element} pe Parent element to split.\n\t\t * @param {Element} e Element to split at.\n\t\t * @param {Element} re Optional replacement element to replace the split element by.\n\t\t * @return {Element} Returns the split element or the replacement element if that is specified.\n\t\t */\n\t\tsplit : function(pe, e, re) {\n\t\t\tvar t = this, r = t.createRng(), bef, aft, pa;\n\n\t\t\t// W3C valid browsers tend to leave empty nodes to the left/right side of the contents, this makes sense\n\t\t\t// but we don't want that in our code since it serves no purpose for the end user\n\t\t\t// For example if this is chopped:\n\t\t\t//   <p>text 1<span><b>CHOP</b></span>text 2</p>\n\t\t\t// would produce:\n\t\t\t//   <p>text 1<span></span></p><b>CHOP</b><p><span></span>text 2</p>\n\t\t\t// this function will then trim of empty edges and produce:\n\t\t\t//   <p>text 1</p><b>CHOP</b><p>text 2</p>\n\t\t\tfunction trim(node) {\n\t\t\t\tvar i, children = node.childNodes, type = node.nodeType;\n\n\t\t\t\tif (type == 1 && node.getAttribute('data-mce-type') == 'bookmark')\n\t\t\t\t\treturn;\n\n\t\t\t\tfor (i = children.length - 1; i >= 0; i--)\n\t\t\t\t\ttrim(children[i]);\n\n\t\t\t\tif (type != 9) {\n\t\t\t\t\t// Keep non whitespace text nodes\n\t\t\t\t\tif (type == 3 && node.nodeValue.length > 0) {\n\t\t\t\t\t\t// If parent element isn't a block or there isn't any useful contents for example \"<p>   </p>\"\n\t\t\t\t\t\tif (!t.isBlock(node.parentNode) || tinymce.trim(node.nodeValue).length > 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t} else if (type == 1) {\n\t\t\t\t\t\t// If the only child is a bookmark then move it up\n\t\t\t\t\t\tchildren = node.childNodes;\n\t\t\t\t\t\tif (children.length == 1 && children[0] && children[0].nodeType == 1 && children[0].getAttribute('data-mce-type') == 'bookmark')\n\t\t\t\t\t\t\tnode.parentNode.insertBefore(children[0], node);\n\n\t\t\t\t\t\t// Keep non empty elements or img, hr etc\n\t\t\t\t\t\tif (children.length || /^(br|hr|input|img)$/i.test(node.nodeName))\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tt.remove(node);\n\t\t\t\t}\n\n\t\t\t\treturn node;\n\t\t\t};\n\n\t\t\tif (pe && e) {\n\t\t\t\t// Get before chunk\n\t\t\t\tr.setStart(pe.parentNode, t.nodeIndex(pe));\n\t\t\t\tr.setEnd(e.parentNode, t.nodeIndex(e));\n\t\t\t\tbef = r.extractContents();\n\n\t\t\t\t// Get after chunk\n\t\t\t\tr = t.createRng();\n\t\t\t\tr.setStart(e.parentNode, t.nodeIndex(e) + 1);\n\t\t\t\tr.setEnd(pe.parentNode, t.nodeIndex(pe) + 1);\n\t\t\t\taft = r.extractContents();\n\n\t\t\t\t// Insert before chunk\n\t\t\t\tpa = pe.parentNode;\n\t\t\t\tpa.insertBefore(trim(bef), pe);\n\n\t\t\t\t// Insert middle chunk\n\t\t\t\tif (re)\n\t\t\t\t\tpa.replaceChild(re, e);\n\t\t\t\telse\n\t\t\t\t\tpa.insertBefore(e, pe);\n\n\t\t\t\t// Insert after chunk\n\t\t\t\tpa.insertBefore(trim(aft), pe);\n\t\t\t\tt.remove(pe);\n\n\t\t\t\treturn re || e;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Adds an event handler to the specified object.\n\t\t *\n\t\t * @method bind\n\t\t * @param {Element/Document/Window/Array/String} o Object or element id string to add event handler to or an array of elements/ids/documents.\n\t\t * @param {String} n Name of event handler to add for example: click.\n\t\t * @param {function} f Function to execute when the event occurs.\n\t\t * @param {Object} s Optional scope to execute the function in.\n\t\t * @return {function} Function callback handler the same as the one passed in.\n\t\t */\n\t\tbind : function(target, name, func, scope) {\n\t\t\tvar t = this;\n\n\t\t\tif (!t.events)\n\t\t\t\tt.events = new tinymce.dom.EventUtils();\n\n\t\t\treturn t.events.add(target, name, func, scope || this);\n\t\t},\n\n\t\t/**\n\t\t * Removes the specified event handler by name and function from a element or collection of elements.\n\t\t *\n\t\t * @method unbind\n\t\t * @param {String/Element/Array} o Element ID string or HTML element or an array of elements or ids to remove handler from.\n\t\t * @param {String} n Event handler name like for example: \"click\"\n\t\t * @param {function} f Function to remove.\n\t\t * @return {bool/Array} Bool state if true if the handler was removed or an array with states if multiple elements where passed in.\n\t\t */\n\t\tunbind : function(target, name, func) {\n\t\t\tvar t = this;\n\n\t\t\tif (!t.events)\n\t\t\t\tt.events = new tinymce.dom.EventUtils();\n\n\t\t\treturn t.events.remove(target, name, func);\n\t\t},\n\n\t\t// #ifdef debug\n\n\t\tdumpRng : function(r) {\n\t\t\treturn 'startContainer: ' + r.startContainer.nodeName + ', startOffset: ' + r.startOffset + ', endContainer: ' + r.endContainer.nodeName + ', endOffset: ' + r.endOffset;\n\t\t},\n\n\t\t// #endif\n\n\t\t_findSib : function(node, selector, name) {\n\t\t\tvar t = this, f = selector;\n\n\t\t\tif (node) {\n\t\t\t\t// If expression make a function of it using is\n\t\t\t\tif (is(f, 'string')) {\n\t\t\t\t\tf = function(node) {\n\t\t\t\t\t\treturn t.is(node, selector);\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Loop all siblings\n\t\t\t\tfor (node = node[name]; node; node = node[name]) {\n\t\t\t\t\tif (f(node))\n\t\t\t\t\t\treturn node;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\n\t\t_isRes : function(c) {\n\t\t\t// Is live resizble element\n\t\t\treturn /^(top|left|bottom|right|width|height)/i.test(c) || /;\\s*(top|left|bottom|right|width|height)/i.test(c);\n\t\t}\n\n\t\t/*\n\t\twalk : function(n, f, s) {\n\t\t\tvar d = this.doc, w;\n\n\t\t\tif (d.createTreeWalker) {\n\t\t\t\tw = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false);\n\n\t\t\t\twhile ((n = w.nextNode()) != null)\n\t\t\t\t\tf.call(s || this, n);\n\t\t\t} else\n\t\t\t\ttinymce.walk(n, f, 'childNodes', s);\n\t\t}\n\t\t*/\n\n\t\t/*\n\t\ttoRGB : function(s) {\n\t\t\tvar c = /^\\s*?#([0-9A-F]{2})([0-9A-F]{1,2})([0-9A-F]{2})?\\s*?$/.exec(s);\n\n\t\t\tif (c) {\n\t\t\t\t// #FFF -> #FFFFFF\n\t\t\t\tif (!is(c[3]))\n\t\t\t\t\tc[3] = c[2] = c[1];\n\n\t\t\t\treturn \"rgb(\" + parseInt(c[1], 16) + \",\" + parseInt(c[2], 16) + \",\" + parseInt(c[3], 16) + \")\";\n\t\t\t}\n\n\t\t\treturn s;\n\t\t}\n\t\t*/\n\t});\n\n\t/**\n\t * Instance of DOMUtils for the current document.\n\t *\n\t * @property DOM\n\t * @member tinymce\n\t * @type tinymce.dom.DOMUtils\n\t * @example\n\t * // Example of how to add a class to some element by id\n\t * tinymce.DOM.addClass('someid', 'someclass');\n\t */\n\ttinymce.DOM = new tinymce.dom.DOMUtils(document, {process_html : 0});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/dom/TridentSelection.js":"/**\n * TridentSelection.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function() {\n\tfunction Selection(selection) {\n\t\tvar self = this, dom = selection.dom, TRUE = true, FALSE = false;\n\n\t\tfunction getPosition(rng, start) {\n\t\t\tvar checkRng, startIndex = 0, endIndex, inside,\n\t\t\t\tchildren, child, offset, index, position = -1, parent;\n\n\t\t\t// Setup test range, collapse it and get the parent\n\t\t\tcheckRng = rng.duplicate();\n\t\t\tcheckRng.collapse(start);\n\t\t\tparent = checkRng.parentElement();\n\n\t\t\t// Check if the selection is within the right document\n\t\t\tif (parent.ownerDocument !== selection.dom.doc)\n\t\t\t\treturn;\n\n\t\t\t// IE will report non editable elements as it's parent so look for an editable one\n\t\t\twhile (parent.contentEditable === \"false\") {\n\t\t\t\tparent = parent.parentNode;\n\t\t\t}\n\n\t\t\t// If parent doesn't have any children then return that we are inside the element\n\t\t\tif (!parent.hasChildNodes()) {\n\t\t\t\treturn {node : parent, inside : 1};\n\t\t\t}\n\n\t\t\t// Setup node list and endIndex\n\t\t\tchildren = parent.children;\n\t\t\tendIndex = children.length - 1;\n\n\t\t\t// Perform a binary search for the position\n\t\t\twhile (startIndex <= endIndex) {\n\t\t\t\tindex = Math.floor((startIndex + endIndex) / 2);\n\n\t\t\t\t// Move selection to node and compare the ranges\n\t\t\t\tchild = children[index];\n\t\t\t\tcheckRng.moveToElementText(child);\n\t\t\t\tposition = checkRng.compareEndPoints(start ? 'StartToStart' : 'EndToEnd', rng);\n\n\t\t\t\t// Before/after or an exact match\n\t\t\t\tif (position > 0) {\n\t\t\t\t\tendIndex = index - 1;\n\t\t\t\t} else if (position < 0) {\n\t\t\t\t\tstartIndex = index + 1;\n\t\t\t\t} else {\n\t\t\t\t\treturn {node : child};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if child position is before or we didn't find a position\n\t\t\tif (position < 0) {\n\t\t\t\t// No element child was found use the parent element and the offset inside that\n\t\t\t\tif (!child) {\n\t\t\t\t\tcheckRng.moveToElementText(parent);\n\t\t\t\t\tcheckRng.collapse(true);\n\t\t\t\t\tchild = parent;\n\t\t\t\t\tinside = true;\n\t\t\t\t} else\n\t\t\t\t\tcheckRng.collapse(false);\n\n\t\t\t\tcheckRng.setEndPoint(start ? 'EndToStart' : 'EndToEnd', rng);\n\n\t\t\t\t// Fix for edge case: <div style=\"width: 100px; height:100px;\"><table>..</table>ab|c</div>\n\t\t\t\tif (checkRng.compareEndPoints(start ? 'StartToStart' : 'StartToEnd', rng) > 0) {\n\t\t\t\t\tcheckRng = rng.duplicate();\n\t\t\t\t\tcheckRng.collapse(start);\n\n\t\t\t\t\toffset = -1;\n\t\t\t\t\twhile (parent == checkRng.parentElement()) {\n\t\t\t\t\t\tif (checkRng.move('character', -1) == 0)\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\toffset++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\toffset = offset || checkRng.text.replace('\\r\\n', ' ').length;\n\t\t\t} else {\n\t\t\t\t// Child position is after the selection endpoint\n\t\t\t\tcheckRng.collapse(true);\n\t\t\t\tcheckRng.setEndPoint(start ? 'StartToStart' : 'StartToEnd', rng);\n\n\t\t\t\t// Get the length of the text to find where the endpoint is relative to it's container\n\t\t\t\toffset = checkRng.text.replace('\\r\\n', ' ').length;\n\t\t\t}\n\n\t\t\treturn {node : child, position : position, offset : offset, inside : inside};\n\t\t};\n\n\t\t// Returns a W3C DOM compatible range object by using the IE Range API\n\t\tfunction getRange() {\n\t\t\tvar ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed, tmpRange, element2, bookmark, fail;\n\n\t\t\t// If selection is outside the current document just return an empty range\n\t\t\telement = ieRange.item ? ieRange.item(0) : ieRange.parentElement();\n\t\t\tif (element.ownerDocument != dom.doc)\n\t\t\t\treturn domRange;\n\n\t\t\tcollapsed = selection.isCollapsed();\n\n\t\t\t// Handle control selection\n\t\t\tif (ieRange.item) {\n\t\t\t\tdomRange.setStart(element.parentNode, dom.nodeIndex(element));\n\t\t\t\tdomRange.setEnd(domRange.startContainer, domRange.startOffset + 1);\n\n\t\t\t\treturn domRange;\n\t\t\t}\n\n\t\t\tfunction findEndPoint(start) {\n\t\t\t\tvar endPoint = getPosition(ieRange, start), container, offset, textNodeOffset = 0, sibling, undef, nodeValue;\n\n\t\t\t\tcontainer = endPoint.node;\n\t\t\t\toffset = endPoint.offset;\n\n\t\t\t\tif (endPoint.inside && !container.hasChildNodes()) {\n\t\t\t\t\tdomRange[start ? 'setStart' : 'setEnd'](container, 0);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (offset === undef) {\n\t\t\t\t\tdomRange[start ? 'setStartBefore' : 'setEndAfter'](container);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (endPoint.position < 0) {\n\t\t\t\t\tsibling = endPoint.inside ? container.firstChild : container.nextSibling;\n\n\t\t\t\t\tif (!sibling) {\n\t\t\t\t\t\tdomRange[start ? 'setStartAfter' : 'setEndAfter'](container);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!offset) {\n\t\t\t\t\t\tif (sibling.nodeType == 3)\n\t\t\t\t\t\t\tdomRange[start ? 'setStart' : 'setEnd'](sibling, 0);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdomRange[start ? 'setStartBefore' : 'setEndBefore'](sibling);\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Find the text node and offset\n\t\t\t\t\twhile (sibling) {\n\t\t\t\t\t\tnodeValue = sibling.nodeValue;\n\t\t\t\t\t\ttextNodeOffset += nodeValue.length;\n\n\t\t\t\t\t\t// We are at or passed the position we where looking for\n\t\t\t\t\t\tif (textNodeOffset >= offset) {\n\t\t\t\t\t\t\tcontainer = sibling;\n\t\t\t\t\t\t\ttextNodeOffset -= offset;\n\t\t\t\t\t\t\ttextNodeOffset = nodeValue.length - textNodeOffset;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsibling = sibling.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Find the text node and offset\n\t\t\t\t\tsibling = container.previousSibling;\n\n\t\t\t\t\tif (!sibling)\n\t\t\t\t\t\treturn domRange[start ? 'setStartBefore' : 'setEndBefore'](container);\n\n\t\t\t\t\t// If there isn't any text to loop then use the first position\n\t\t\t\t\tif (!offset) {\n\t\t\t\t\t\tif (container.nodeType == 3)\n\t\t\t\t\t\t\tdomRange[start ? 'setStart' : 'setEnd'](sibling, container.nodeValue.length);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdomRange[start ? 'setStartAfter' : 'setEndAfter'](sibling);\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (sibling) {\n\t\t\t\t\t\ttextNodeOffset += sibling.nodeValue.length;\n\n\t\t\t\t\t\t// We are at or passed the position we where looking for\n\t\t\t\t\t\tif (textNodeOffset >= offset) {\n\t\t\t\t\t\t\tcontainer = sibling;\n\t\t\t\t\t\t\ttextNodeOffset -= offset;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsibling = sibling.previousSibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdomRange[start ? 'setStart' : 'setEnd'](container, textNodeOffset);\n\t\t\t};\n\n\t\t\ttry {\n\t\t\t\t// Find start point\n\t\t\t\tfindEndPoint(true);\n\n\t\t\t\t// Find end point if needed\n\t\t\t\tif (!collapsed)\n\t\t\t\t\tfindEndPoint();\n\t\t\t} catch (ex) {\n\t\t\t\t// IE has a nasty bug where text nodes might throw \"invalid argument\" when you\n\t\t\t\t// access the nodeValue or other properties of text nodes. This seems to happend when\n\t\t\t\t// text nodes are split into two nodes by a delete/backspace call. So lets detect it and try to fix it.\n\t\t\t\tif (ex.number == -2147024809) {\n\t\t\t\t\t// Get the current selection\n\t\t\t\t\tbookmark = self.getBookmark(2);\n\n\t\t\t\t\t// Get start element\n\t\t\t\t\ttmpRange = ieRange.duplicate();\n\t\t\t\t\ttmpRange.collapse(true);\n\t\t\t\t\telement = tmpRange.parentElement();\n\n\t\t\t\t\t// Get end element\n\t\t\t\t\tif (!collapsed) {\n\t\t\t\t\t\ttmpRange = ieRange.duplicate();\n\t\t\t\t\t\ttmpRange.collapse(false);\n\t\t\t\t\t\telement2 = tmpRange.parentElement();\n\t\t\t\t\t\telement2.innerHTML = element2.innerHTML;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove the broken elements\n\t\t\t\t\telement.innerHTML = element.innerHTML;\n\n\t\t\t\t\t// Restore the selection\n\t\t\t\t\tself.moveToBookmark(bookmark);\n\n\t\t\t\t\t// Since the range has moved we need to re-get it\n\t\t\t\t\tieRange = selection.getRng();\n\n\t\t\t\t\t// Find start point\n\t\t\t\t\tfindEndPoint(true);\n\n\t\t\t\t\t// Find end point if needed\n\t\t\t\t\tif (!collapsed)\n\t\t\t\t\t\tfindEndPoint();\n\t\t\t\t} else\n\t\t\t\t\tthrow ex; // Throw other errors\n\t\t\t}\n\n\t\t\treturn domRange;\n\t\t};\n\n\t\tthis.getBookmark = function(type) {\n\t\t\tvar rng = selection.getRng(), start, end, bookmark = {};\n\n\t\t\tfunction getIndexes(node) {\n\t\t\t\tvar node, parent, root, children, i, indexes = [];\n\n\t\t\t\tparent = node.parentNode;\n\t\t\t\troot = dom.getRoot().parentNode;\n\n\t\t\t\twhile (parent != root && parent.nodeType !== 9) {\n\t\t\t\t\tchildren = parent.children;\n\n\t\t\t\t\ti = children.length;\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tif (node === children[i]) {\n\t\t\t\t\t\t\tindexes.push(i);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = parent;\n\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t}\n\n\t\t\t\treturn indexes;\n\t\t\t};\n\n\t\t\tfunction getBookmarkEndPoint(start) {\n\t\t\t\tvar position;\n\n\t\t\t\tposition = getPosition(rng, start);\n\t\t\t\tif (position) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tposition : position.position,\n\t\t\t\t\t\toffset : position.offset,\n\t\t\t\t\t\tindexes : getIndexes(position.node),\n\t\t\t\t\t\tinside : position.inside\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Non ubstructive bookmark\n\t\t\tif (type === 2) {\n\t\t\t\t// Handle text selection\n\t\t\t\tif (!rng.item) {\n\t\t\t\t\tbookmark.start = getBookmarkEndPoint(true);\n\n\t\t\t\t\tif (!selection.isCollapsed())\n\t\t\t\t\t\tbookmark.end = getBookmarkEndPoint();\n\t\t\t\t} else\n\t\t\t\t\tbookmark.start = {ctrl : true, indexes : getIndexes(rng.item(0))};\n\t\t\t}\n\n\t\t\treturn bookmark;\n\t\t};\n\n\t\tthis.moveToBookmark = function(bookmark) {\n\t\t\tvar rng, body = dom.doc.body;\n\n\t\t\tfunction resolveIndexes(indexes) {\n\t\t\t\tvar node, i, idx, children;\n\n\t\t\t\tnode = dom.getRoot();\n\t\t\t\tfor (i = indexes.length - 1; i >= 0; i--) {\n\t\t\t\t\tchildren = node.children;\n\t\t\t\t\tidx = indexes[i];\n\n\t\t\t\t\tif (idx <= children.length - 1) {\n\t\t\t\t\t\tnode = children[idx];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn node;\n\t\t\t};\n\t\t\t\n\t\t\tfunction setBookmarkEndPoint(start) {\n\t\t\t\tvar endPoint = bookmark[start ? 'start' : 'end'], moveLeft, moveRng, undef;\n\n\t\t\t\tif (endPoint) {\n\t\t\t\t\tmoveLeft = endPoint.position > 0;\n\n\t\t\t\t\tmoveRng = body.createTextRange();\n\t\t\t\t\tmoveRng.moveToElementText(resolveIndexes(endPoint.indexes));\n\n\t\t\t\t\toffset = endPoint.offset;\n\t\t\t\t\tif (offset !== undef) {\n\t\t\t\t\t\tmoveRng.collapse(endPoint.inside || moveLeft);\n\t\t\t\t\t\tmoveRng.moveStart('character', moveLeft ? -offset : offset);\n\t\t\t\t\t} else\n\t\t\t\t\t\tmoveRng.collapse(start);\n\n\t\t\t\t\trng.setEndPoint(start ? 'StartToStart' : 'EndToStart', moveRng);\n\n\t\t\t\t\tif (start)\n\t\t\t\t\t\trng.collapse(true);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (bookmark.start) {\n\t\t\t\tif (bookmark.start.ctrl) {\n\t\t\t\t\trng = body.createControlRange();\n\t\t\t\t\trng.addElement(resolveIndexes(bookmark.start.indexes));\n\t\t\t\t\trng.select();\n\t\t\t\t} else {\n\t\t\t\t\trng = body.createTextRange();\n\t\t\t\t\tsetBookmarkEndPoint(true);\n\t\t\t\t\tsetBookmarkEndPoint();\n\t\t\t\t\trng.select();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.addRange = function(rng) {\n\t\t\tvar ieRng, ctrlRng, startContainer, startOffset, endContainer, endOffset, doc = selection.dom.doc, body = doc.body;\n\n\t\t\tfunction setEndPoint(start) {\n\t\t\t\tvar container, offset, marker, tmpRng, nodes;\n\n\t\t\t\tmarker = dom.create('a');\n\t\t\t\tcontainer = start ? startContainer : endContainer;\n\t\t\t\toffset = start ? startOffset : endOffset;\n\t\t\t\ttmpRng = ieRng.duplicate();\n\n\t\t\t\tif (container == doc || container == doc.documentElement) {\n\t\t\t\t\tcontainer = body;\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\n\t\t\t\tif (container.nodeType == 3) {\n\t\t\t\t\tcontainer.parentNode.insertBefore(marker, container);\n\t\t\t\t\ttmpRng.moveToElementText(marker);\n\t\t\t\t\ttmpRng.moveStart('character', offset);\n\t\t\t\t\tdom.remove(marker);\n\t\t\t\t\tieRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', tmpRng);\n\t\t\t\t} else {\n\t\t\t\t\tnodes = container.childNodes;\n\n\t\t\t\t\tif (nodes.length) {\n\t\t\t\t\t\tif (offset >= nodes.length) {\n\t\t\t\t\t\t\tdom.insertAfter(marker, nodes[nodes.length - 1]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontainer.insertBefore(marker, nodes[offset]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttmpRng.moveToElementText(marker);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Empty node selection for example <div>|</div>\n\t\t\t\t\t\tmarker = doc.createTextNode('\\uFEFF');\n\t\t\t\t\t\tcontainer.appendChild(marker);\n\t\t\t\t\t\ttmpRng.moveToElementText(marker.parentNode);\n\t\t\t\t\t\ttmpRng.collapse(TRUE);\n\t\t\t\t\t}\n\n\t\t\t\t\tieRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', tmpRng);\n\t\t\t\t\tdom.remove(marker);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Setup some shorter versions\n\t\t\tstartContainer = rng.startContainer;\n\t\t\tstartOffset = rng.startOffset;\n\t\t\tendContainer = rng.endContainer;\n\t\t\tendOffset = rng.endOffset;\n\t\t\tieRng = body.createTextRange();\n\n\t\t\t// If single element selection then try making a control selection out of it\n\t\t\tif (startContainer == endContainer && startContainer.nodeType == 1 && startOffset == endOffset - 1) {\n\t\t\t\tif (startOffset == endOffset - 1) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tctrlRng = body.createControlRange();\n\t\t\t\t\t\tctrlRng.addElement(startContainer.childNodes[startOffset]);\n\t\t\t\t\t\tctrlRng.select();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t// Ignore\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set start/end point of selection\n\t\t\tsetEndPoint(true);\n\t\t\tsetEndPoint();\n\n\t\t\t// Select the new range and scroll it into view\n\t\t\tieRng.select();\n\t\t};\n\n\t\t// Expose range method\n\t\tthis.getRangeAt = getRange;\n\t};\n\n\t// Expose the selection object\n\ttinymce.dom.TridentSelection = Selection;\n})();\n","Magento_Tinymce3/tiny_mce/classes/dom/RangeUtils.js":"/**\n * Range.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\ttinymce.dom.RangeUtils = function(dom) {\n\t\tvar INVISIBLE_CHAR = '\\uFEFF';\n\n\t\t/**\n\t\t * Walks the specified range like object and executes the callback for each sibling collection it finds.\n\t\t *\n\t\t * @param {Object} rng Range like object.\n\t\t * @param {function} callback Callback function to execute for each sibling collection.\n\t\t */\n\t\tthis.walk = function(rng, callback) {\n\t\t\tvar startContainer = rng.startContainer,\n\t\t\t\tstartOffset = rng.startOffset,\n\t\t\t\tendContainer = rng.endContainer,\n\t\t\t\tendOffset = rng.endOffset,\n\t\t\t\tancestor, startPoint,\n\t\t\t\tendPoint, node, parent, siblings, nodes;\n\n\t\t\t// Handle table cell selection the table plugin enables\n\t\t\t// you to fake select table cells and perform formatting actions on them\n\t\t\tnodes = dom.select('td.mceSelected,th.mceSelected');\n\t\t\tif (nodes.length > 0) {\n\t\t\t\ttinymce.each(nodes, function(node) {\n\t\t\t\t\tcallback([node]);\n\t\t\t\t});\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Excludes start/end text node if they are out side the range\n\t\t\t *\n\t\t\t * @private\n\t\t\t * @param {Array} nodes Nodes to exclude items from.\n\t\t\t * @return {Array} Array with nodes excluding the start/end container if needed.\n\t\t\t */\n\t\t\tfunction exclude(nodes) {\n\t\t\t\tvar node;\n\n\t\t\t\t// First node is excluded\n\t\t\t\tnode = nodes[0];\n\t\t\t\tif (node.nodeType === 3 && node === startContainer && startOffset >= node.nodeValue.length) {\n\t\t\t\t\tnodes.splice(0, 1);\n\t\t\t\t}\n\n\t\t\t\t// Last node is excluded\n\t\t\t\tnode = nodes[nodes.length - 1];\n\t\t\t\tif (endOffset === 0 && nodes.length > 0 && node === endContainer && node.nodeType === 3) {\n\t\t\t\t\tnodes.splice(nodes.length - 1, 1);\n\t\t\t\t}\n\n\t\t\t\treturn nodes;\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Collects siblings\n\t\t\t *\n\t\t\t * @private\n\t\t\t * @param {Node} node Node to collect siblings from.\n\t\t\t * @param {String} name Name of the sibling to check for.\n\t\t\t * @return {Array} Array of collected siblings.\n\t\t\t */\n\t\t\tfunction collectSiblings(node, name, end_node) {\n\t\t\t\tvar siblings = [];\n\n\t\t\t\tfor (; node && node != end_node; node = node[name])\n\t\t\t\t\tsiblings.push(node);\n\n\t\t\t\treturn siblings;\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Find an end point this is the node just before the common ancestor root.\n\t\t\t *\n\t\t\t * @private\n\t\t\t * @param {Node} node Node to start at.\n\t\t\t * @param {Node} root Root/ancestor element to stop just before.\n\t\t\t * @return {Node} Node just before the root element.\n\t\t\t */\n\t\t\tfunction findEndPoint(node, root) {\n\t\t\t\tdo {\n\t\t\t\t\tif (node.parentNode == root)\n\t\t\t\t\t\treturn node;\n\n\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t} while(node);\n\t\t\t};\n\n\t\t\tfunction walkBoundary(start_node, end_node, next) {\n\t\t\t\tvar siblingName = next ? 'nextSibling' : 'previousSibling';\n\n\t\t\t\tfor (node = start_node, parent = node.parentNode; node && node != end_node; node = parent) {\n\t\t\t\t\tparent = node.parentNode;\n\t\t\t\t\tsiblings = collectSiblings(node == start_node ? node : node[siblingName], siblingName);\n\n\t\t\t\t\tif (siblings.length) {\n\t\t\t\t\t\tif (!next)\n\t\t\t\t\t\t\tsiblings.reverse();\n\n\t\t\t\t\t\tcallback(exclude(siblings));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// If index based start position then resolve it\n\t\t\tif (startContainer.nodeType == 1 && startContainer.hasChildNodes())\n\t\t\t\tstartContainer = startContainer.childNodes[startOffset];\n\n\t\t\t// If index based end position then resolve it\n\t\t\tif (endContainer.nodeType == 1 && endContainer.hasChildNodes())\n\t\t\t\tendContainer = endContainer.childNodes[Math.min(endOffset - 1, endContainer.childNodes.length - 1)];\n\n\t\t\t// Same container\n\t\t\tif (startContainer == endContainer)\n\t\t\t\treturn callback(exclude([startContainer]));\n\n\t\t\t// Find common ancestor and end points\n\t\t\tancestor = dom.findCommonAncestor(startContainer, endContainer);\n\t\t\t\t\n\t\t\t// Process left side\n\t\t\tfor (node = startContainer; node; node = node.parentNode) {\n\t\t\t\tif (node === endContainer)\n\t\t\t\t\treturn walkBoundary(startContainer, ancestor, true);\n\n\t\t\t\tif (node === ancestor)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Process right side\n\t\t\tfor (node = endContainer; node; node = node.parentNode) {\n\t\t\t\tif (node === startContainer)\n\t\t\t\t\treturn walkBoundary(endContainer, ancestor);\n\n\t\t\t\tif (node === ancestor)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Find start/end point\n\t\t\tstartPoint = findEndPoint(startContainer, ancestor) || startContainer;\n\t\t\tendPoint = findEndPoint(endContainer, ancestor) || endContainer;\n\n\t\t\t// Walk left leaf\n\t\t\twalkBoundary(startContainer, startPoint, true);\n\n\t\t\t// Walk the middle from start to end point\n\t\t\tsiblings = collectSiblings(\n\t\t\t\tstartPoint == startContainer ? startPoint : startPoint.nextSibling,\n\t\t\t\t'nextSibling',\n\t\t\t\tendPoint == endContainer ? endPoint.nextSibling : endPoint\n\t\t\t);\n\n\t\t\tif (siblings.length)\n\t\t\t\tcallback(exclude(siblings));\n\n\t\t\t// Walk right leaf\n\t\t\twalkBoundary(endContainer, endPoint);\n\t\t};\n\n\t\t/**\n\t\t * Splits the specified range at it's start/end points.\n\t\t *\n\t\t * @param {Range/RangeObject} rng Range to split.\n\t\t * @return {Object} Range position object.\n\t\t */\n\t\tthis.split = function(rng) {\n\t\t\tvar startContainer = rng.startContainer,\n\t\t\t\tstartOffset = rng.startOffset,\n\t\t\t\tendContainer = rng.endContainer,\n\t\t\t\tendOffset = rng.endOffset;\n\n\t\t\tfunction splitText(node, offset) {\n\t\t\t\treturn node.splitText(offset);\n\t\t\t};\n\n\t\t\t// Handle single text node\n\t\t\tif (startContainer == endContainer && startContainer.nodeType == 3) {\n\t\t\t\tif (startOffset > 0 && startOffset < startContainer.nodeValue.length) {\n\t\t\t\t\tendContainer = splitText(startContainer, startOffset);\n\t\t\t\t\tstartContainer = endContainer.previousSibling;\n\n\t\t\t\t\tif (endOffset > startOffset) {\n\t\t\t\t\t\tendOffset = endOffset - startOffset;\n\t\t\t\t\t\tstartContainer = endContainer = splitText(endContainer, endOffset).previousSibling;\n\t\t\t\t\t\tendOffset = endContainer.nodeValue.length;\n\t\t\t\t\t\tstartOffset = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tendOffset = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Split startContainer text node if needed\n\t\t\t\tif (startContainer.nodeType == 3 && startOffset > 0 && startOffset < startContainer.nodeValue.length) {\n\t\t\t\t\tstartContainer = splitText(startContainer, startOffset);\n\t\t\t\t\tstartOffset = 0;\n\t\t\t\t}\n\n\t\t\t\t// Split endContainer text node if needed\n\t\t\t\tif (endContainer.nodeType == 3 && endOffset > 0 && endOffset < endContainer.nodeValue.length) {\n\t\t\t\t\tendContainer = splitText(endContainer, endOffset).previousSibling;\n\t\t\t\t\tendOffset = endContainer.nodeValue.length;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tstartContainer : startContainer,\n\t\t\t\tstartOffset : startOffset,\n\t\t\t\tendContainer : endContainer,\n\t\t\t\tendOffset : endOffset\n\t\t\t};\n\t\t};\n\n\t};\n\n\t/**\n\t * Compares two ranges and checks if they are equal.\n\t *\n\t * @static\n\t * @param {DOMRange} rng1 First range to compare.\n\t * @param {DOMRange} rng2 First range to compare.\n\t * @return {Boolean} true/false if the ranges are equal.\n\t */\n\ttinymce.dom.RangeUtils.compareRanges = function(rng1, rng2) {\n\t\tif (rng1 && rng2) {\n\t\t\t// Compare native IE ranges\n\t\t\tif (rng1.item || rng1.duplicate) {\n\t\t\t\t// Both are control ranges and the selected element matches\n\t\t\t\tif (rng1.item && rng2.item && rng1.item(0) === rng2.item(0))\n\t\t\t\t\treturn true;\n\n\t\t\t\t// Both are text ranges and the range matches\n\t\t\t\tif (rng1.isEqual && rng2.isEqual && rng2.isEqual(rng1))\n\t\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// Compare w3c ranges\n\t\t\t\treturn rng1.startContainer == rng2.startContainer && rng1.startOffset == rng2.startOffset;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/dom/Range.js":"/**\n * Range.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(ns) {\n\t// Range constructor\n\tfunction Range(dom) {\n\t\tvar t = this,\n\t\t\tdoc = dom.doc,\n\t\t\tEXTRACT = 0,\n\t\t\tCLONE = 1,\n\t\t\tDELETE = 2,\n\t\t\tTRUE = true,\n\t\t\tFALSE = false,\n\t\t\tSTART_OFFSET = 'startOffset',\n\t\t\tSTART_CONTAINER = 'startContainer',\n\t\t\tEND_CONTAINER = 'endContainer',\n\t\t\tEND_OFFSET = 'endOffset',\n\t\t\textend = tinymce.extend,\n\t\t\tnodeIndex = dom.nodeIndex;\n\n\t\textend(t, {\n\t\t\t// Inital states\n\t\t\tstartContainer : doc,\n\t\t\tstartOffset : 0,\n\t\t\tendContainer : doc,\n\t\t\tendOffset : 0,\n\t\t\tcollapsed : TRUE,\n\t\t\tcommonAncestorContainer : doc,\n\n\t\t\t// Range constants\n\t\t\tSTART_TO_START : 0,\n\t\t\tSTART_TO_END : 1,\n\t\t\tEND_TO_END : 2,\n\t\t\tEND_TO_START : 3,\n\n\t\t\t// Public methods\n\t\t\tsetStart : setStart,\n\t\t\tsetEnd : setEnd,\n\t\t\tsetStartBefore : setStartBefore,\n\t\t\tsetStartAfter : setStartAfter,\n\t\t\tsetEndBefore : setEndBefore,\n\t\t\tsetEndAfter : setEndAfter,\n\t\t\tcollapse : collapse,\n\t\t\tselectNode : selectNode,\n\t\t\tselectNodeContents : selectNodeContents,\n\t\t\tcompareBoundaryPoints : compareBoundaryPoints,\n\t\t\tdeleteContents : deleteContents,\n\t\t\textractContents : extractContents,\n\t\t\tcloneContents : cloneContents,\n\t\t\tinsertNode : insertNode,\n\t\t\tsurroundContents : surroundContents,\n\t\t\tcloneRange : cloneRange\n\t\t});\n\n\t\tfunction setStart(n, o) {\n\t\t\t_setEndPoint(TRUE, n, o);\n\t\t};\n\n\t\tfunction setEnd(n, o) {\n\t\t\t_setEndPoint(FALSE, n, o);\n\t\t};\n\n\t\tfunction setStartBefore(n) {\n\t\t\tsetStart(n.parentNode, nodeIndex(n));\n\t\t};\n\n\t\tfunction setStartAfter(n) {\n\t\t\tsetStart(n.parentNode, nodeIndex(n) + 1);\n\t\t};\n\n\t\tfunction setEndBefore(n) {\n\t\t\tsetEnd(n.parentNode, nodeIndex(n));\n\t\t};\n\n\t\tfunction setEndAfter(n) {\n\t\t\tsetEnd(n.parentNode, nodeIndex(n) + 1);\n\t\t};\n\n\t\tfunction collapse(ts) {\n\t\t\tif (ts) {\n\t\t\t\tt[END_CONTAINER] = t[START_CONTAINER];\n\t\t\t\tt[END_OFFSET] = t[START_OFFSET];\n\t\t\t} else {\n\t\t\t\tt[START_CONTAINER] = t[END_CONTAINER];\n\t\t\t\tt[START_OFFSET] = t[END_OFFSET];\n\t\t\t}\n\n\t\t\tt.collapsed = TRUE;\n\t\t};\n\n\t\tfunction selectNode(n) {\n\t\t\tsetStartBefore(n);\n\t\t\tsetEndAfter(n);\n\t\t};\n\n\t\tfunction selectNodeContents(n) {\n\t\t\tsetStart(n, 0);\n\t\t\tsetEnd(n, n.nodeType === 1 ? n.childNodes.length : n.nodeValue.length);\n\t\t};\n\n\t\tfunction compareBoundaryPoints(h, r) {\n\t\t\tvar sc = t[START_CONTAINER], so = t[START_OFFSET], ec = t[END_CONTAINER], eo = t[END_OFFSET],\n\t\t\trsc = r.startContainer, rso = r.startOffset, rec = r.endContainer, reo = r.endOffset;\n\n\t\t\t// Check START_TO_START\n\t\t\tif (h === 0)\n\t\t\t\treturn _compareBoundaryPoints(sc, so, rsc, rso);\n\t\n\t\t\t// Check START_TO_END\n\t\t\tif (h === 1)\n\t\t\t\treturn _compareBoundaryPoints(ec, eo, rsc, rso);\n\t\n\t\t\t// Check END_TO_END\n\t\t\tif (h === 2)\n\t\t\t\treturn _compareBoundaryPoints(ec, eo, rec, reo);\n\t\n\t\t\t// Check END_TO_START\n\t\t\tif (h === 3) \n\t\t\t\treturn _compareBoundaryPoints(sc, so, rec, reo);\n\t\t};\n\n\t\tfunction deleteContents() {\n\t\t\t_traverse(DELETE);\n\t\t};\n\n\t\tfunction extractContents() {\n\t\t\treturn _traverse(EXTRACT);\n\t\t};\n\n\t\tfunction cloneContents() {\n\t\t\treturn _traverse(CLONE);\n\t\t};\n\n\t\tfunction insertNode(n) {\n\t\t\tvar startContainer = this[START_CONTAINER],\n\t\t\t\tstartOffset = this[START_OFFSET], nn, o;\n\n\t\t\t// Node is TEXT_NODE or CDATA\n\t\t\tif ((startContainer.nodeType === 3 || startContainer.nodeType === 4) && startContainer.nodeValue) {\n\t\t\t\tif (!startOffset) {\n\t\t\t\t\t// At the start of text\n\t\t\t\t\tstartContainer.parentNode.insertBefore(n, startContainer);\n\t\t\t\t} else if (startOffset >= startContainer.nodeValue.length) {\n\t\t\t\t\t// At the end of text\n\t\t\t\t\tdom.insertAfter(n, startContainer);\n\t\t\t\t} else {\n\t\t\t\t\t// Middle, need to split\n\t\t\t\t\tnn = startContainer.splitText(startOffset);\n\t\t\t\t\tstartContainer.parentNode.insertBefore(n, nn);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Insert element node\n\t\t\t\tif (startContainer.childNodes.length > 0)\n\t\t\t\t\to = startContainer.childNodes[startOffset];\n\n\t\t\t\tif (o)\n\t\t\t\t\tstartContainer.insertBefore(n, o);\n\t\t\t\telse\n\t\t\t\t\tstartContainer.appendChild(n);\n\t\t\t}\n\t\t};\n\n\t\tfunction surroundContents(n) {\n\t\t\tvar f = t.extractContents();\n\n\t\t\tt.insertNode(n);\n\t\t\tn.appendChild(f);\n\t\t\tt.selectNode(n);\n\t\t};\n\n\t\tfunction cloneRange() {\n\t\t\treturn extend(new Range(dom), {\n\t\t\t\tstartContainer : t[START_CONTAINER],\n\t\t\t\tstartOffset : t[START_OFFSET],\n\t\t\t\tendContainer : t[END_CONTAINER],\n\t\t\t\tendOffset : t[END_OFFSET],\n\t\t\t\tcollapsed : t.collapsed,\n\t\t\t\tcommonAncestorContainer : t.commonAncestorContainer\n\t\t\t});\n\t\t};\n\n\t\t// Private methods\n\n\t\tfunction _getSelectedNode(container, offset) {\n\t\t\tvar child;\n\n\t\t\tif (container.nodeType == 3 /* TEXT_NODE */)\n\t\t\t\treturn container;\n\n\t\t\tif (offset < 0)\n\t\t\t\treturn container;\n\n\t\t\tchild = container.firstChild;\n\t\t\twhile (child && offset > 0) {\n\t\t\t\t--offset;\n\t\t\t\tchild = child.nextSibling;\n\t\t\t}\n\n\t\t\tif (child)\n\t\t\t\treturn child;\n\n\t\t\treturn container;\n\t\t};\n\n\t\tfunction _isCollapsed() {\n\t\t\treturn (t[START_CONTAINER] == t[END_CONTAINER] && t[START_OFFSET] == t[END_OFFSET]);\n\t\t};\n\n\t\tfunction _compareBoundaryPoints(containerA, offsetA, containerB, offsetB) {\n\t\t\tvar c, offsetC, n, cmnRoot, childA, childB;\n\t\t\t\n\t\t\t// In the first case the boundary-points have the same container. A is before B\n\t\t\t// if its offset is less than the offset of B, A is equal to B if its offset is\n\t\t\t// equal to the offset of B, and A is after B if its offset is greater than the\n\t\t\t// offset of B.\n\t\t\tif (containerA == containerB) {\n\t\t\t\tif (offsetA == offsetB)\n\t\t\t\t\treturn 0; // equal\n\n\t\t\t\tif (offsetA < offsetB)\n\t\t\t\t\treturn -1; // before\n\n\t\t\t\treturn 1; // after\n\t\t\t}\n\n\t\t\t// In the second case a child node C of the container of A is an ancestor\n\t\t\t// container of B. In this case, A is before B if the offset of A is less than or\n\t\t\t// equal to the index of the child node C and A is after B otherwise.\n\t\t\tc = containerB;\n\t\t\twhile (c && c.parentNode != containerA)\n\t\t\t\tc = c.parentNode;\n\n\t\t\tif (c) {\n\t\t\t\toffsetC = 0;\n\t\t\t\tn = containerA.firstChild;\n\n\t\t\t\twhile (n != c && offsetC < offsetA) {\n\t\t\t\t\toffsetC++;\n\t\t\t\t\tn = n.nextSibling;\n\t\t\t\t}\n\n\t\t\t\tif (offsetA <= offsetC)\n\t\t\t\t\treturn -1; // before\n\n\t\t\t\treturn 1; // after\n\t\t\t}\n\n\t\t\t// In the third case a child node C of the container of B is an ancestor container\n\t\t\t// of A. In this case, A is before B if the index of the child node C is less than\n\t\t\t// the offset of B and A is after B otherwise.\n\t\t\tc = containerA;\n\t\t\twhile (c && c.parentNode != containerB) {\n\t\t\t\tc = c.parentNode;\n\t\t\t}\n\n\t\t\tif (c) {\n\t\t\t\toffsetC = 0;\n\t\t\t\tn = containerB.firstChild;\n\n\t\t\t\twhile (n != c && offsetC < offsetB) {\n\t\t\t\t\toffsetC++;\n\t\t\t\t\tn = n.nextSibling;\n\t\t\t\t}\n\n\t\t\t\tif (offsetC < offsetB)\n\t\t\t\t\treturn -1; // before\n\n\t\t\t\treturn 1; // after\n\t\t\t}\n\n\t\t\t// In the fourth case, none of three other cases hold: the containers of A and B\n\t\t\t// are siblings or descendants of sibling nodes. In this case, A is before B if\n\t\t\t// the container of A is before the container of B in a pre-order traversal of the\n\t\t\t// Ranges' context tree and A is after B otherwise.\n\t\t\tcmnRoot = dom.findCommonAncestor(containerA, containerB);\n\t\t\tchildA = containerA;\n\n\t\t\twhile (childA && childA.parentNode != cmnRoot)\n\t\t\t\tchildA = childA.parentNode;\n\n\t\t\tif (!childA)\n\t\t\t\tchildA = cmnRoot;\n\n\t\t\tchildB = containerB;\n\t\t\twhile (childB && childB.parentNode != cmnRoot)\n\t\t\t\tchildB = childB.parentNode;\n\n\t\t\tif (!childB)\n\t\t\t\tchildB = cmnRoot;\n\n\t\t\tif (childA == childB)\n\t\t\t\treturn 0; // equal\n\n\t\t\tn = cmnRoot.firstChild;\n\t\t\twhile (n) {\n\t\t\t\tif (n == childA)\n\t\t\t\t\treturn -1; // before\n\n\t\t\t\tif (n == childB)\n\t\t\t\t\treturn 1; // after\n\n\t\t\t\tn = n.nextSibling;\n\t\t\t}\n\t\t};\n\n\t\tfunction _setEndPoint(st, n, o) {\n\t\t\tvar ec, sc;\n\n\t\t\tif (st) {\n\t\t\t\tt[START_CONTAINER] = n;\n\t\t\t\tt[START_OFFSET] = o;\n\t\t\t} else {\n\t\t\t\tt[END_CONTAINER] = n;\n\t\t\t\tt[END_OFFSET] = o;\n\t\t\t}\n\n\t\t\t// If one boundary-point of a Range is set to have a root container\n\t\t\t// other than the current one for the Range, the Range is collapsed to\n\t\t\t// the new position. This enforces the restriction that both boundary-\n\t\t\t// points of a Range must have the same root container.\n\t\t\tec = t[END_CONTAINER];\n\t\t\twhile (ec.parentNode)\n\t\t\t\tec = ec.parentNode;\n\n\t\t\tsc = t[START_CONTAINER];\n\t\t\twhile (sc.parentNode)\n\t\t\t\tsc = sc.parentNode;\n\n\t\t\tif (sc == ec) {\n\t\t\t\t// The start position of a Range is guaranteed to never be after the\n\t\t\t\t// end position. To enforce this restriction, if the start is set to\n\t\t\t\t// be at a position after the end, the Range is collapsed to that\n\t\t\t\t// position.\n\t\t\t\tif (_compareBoundaryPoints(t[START_CONTAINER], t[START_OFFSET], t[END_CONTAINER], t[END_OFFSET]) > 0)\n\t\t\t\t\tt.collapse(st);\n\t\t\t} else\n\t\t\t\tt.collapse(st);\n\n\t\t\tt.collapsed = _isCollapsed();\n\t\t\tt.commonAncestorContainer = dom.findCommonAncestor(t[START_CONTAINER], t[END_CONTAINER]);\n\t\t};\n\n\t\tfunction _traverse(how) {\n\t\t\tvar c, endContainerDepth = 0, startContainerDepth = 0, p, depthDiff, startNode, endNode, sp, ep;\n\n\t\t\tif (t[START_CONTAINER] == t[END_CONTAINER])\n\t\t\t\treturn _traverseSameContainer(how);\n\n\t\t\tfor (c = t[END_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) {\n\t\t\t\tif (p == t[START_CONTAINER])\n\t\t\t\t\treturn _traverseCommonStartContainer(c, how);\n\n\t\t\t\t++endContainerDepth;\n\t\t\t}\n\n\t\t\tfor (c = t[START_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) {\n\t\t\t\tif (p == t[END_CONTAINER])\n\t\t\t\t\treturn _traverseCommonEndContainer(c, how);\n\n\t\t\t\t++startContainerDepth;\n\t\t\t}\n\n\t\t\tdepthDiff = startContainerDepth - endContainerDepth;\n\n\t\t\tstartNode = t[START_CONTAINER];\n\t\t\twhile (depthDiff > 0) {\n\t\t\t\tstartNode = startNode.parentNode;\n\t\t\t\tdepthDiff--;\n\t\t\t}\n\n\t\t\tendNode = t[END_CONTAINER];\n\t\t\twhile (depthDiff < 0) {\n\t\t\t\tendNode = endNode.parentNode;\n\t\t\t\tdepthDiff++;\n\t\t\t}\n\n\t\t\t// ascend the ancestor hierarchy until we have a common parent.\n\t\t\tfor (sp = startNode.parentNode, ep = endNode.parentNode; sp != ep; sp = sp.parentNode, ep = ep.parentNode) {\n\t\t\t\tstartNode = sp;\n\t\t\t\tendNode = ep;\n\t\t\t}\n\n\t\t\treturn _traverseCommonAncestors(startNode, endNode, how);\n\t\t};\n\n\t\t function _traverseSameContainer(how) {\n\t\t\tvar frag, s, sub, n, cnt, sibling, xferNode;\n\n\t\t\tif (how != DELETE)\n\t\t\t\tfrag = doc.createDocumentFragment();\n\n\t\t\t// If selection is empty, just return the fragment\n\t\t\tif (t[START_OFFSET] == t[END_OFFSET])\n\t\t\t\treturn frag;\n\n\t\t\t// Text node needs special case handling\n\t\t\tif (t[START_CONTAINER].nodeType == 3 /* TEXT_NODE */) {\n\t\t\t\t// get the substring\n\t\t\t\ts = t[START_CONTAINER].nodeValue;\n\t\t\t\tsub = s.substring(t[START_OFFSET], t[END_OFFSET]);\n\n\t\t\t\t// set the original text node to its new value\n\t\t\t\tif (how != CLONE) {\n\t\t\t\t\tt[START_CONTAINER].deleteData(t[START_OFFSET], t[END_OFFSET] - t[START_OFFSET]);\n\n\t\t\t\t\t// Nothing is partially selected, so collapse to start point\n\t\t\t\t\tt.collapse(TRUE);\n\t\t\t\t}\n\n\t\t\t\tif (how == DELETE)\n\t\t\t\t\treturn;\n\n\t\t\t\tfrag.appendChild(doc.createTextNode(sub));\n\t\t\t\treturn frag;\n\t\t\t}\n\n\t\t\t// Copy nodes between the start/end offsets.\n\t\t\tn = _getSelectedNode(t[START_CONTAINER], t[START_OFFSET]);\n\t\t\tcnt = t[END_OFFSET] - t[START_OFFSET];\n\n\t\t\twhile (cnt > 0) {\n\t\t\t\tsibling = n.nextSibling;\n\t\t\t\txferNode = _traverseFullySelected(n, how);\n\n\t\t\t\tif (frag)\n\t\t\t\t\tfrag.appendChild( xferNode );\n\n\t\t\t\t--cnt;\n\t\t\t\tn = sibling;\n\t\t\t}\n\n\t\t\t// Nothing is partially selected, so collapse to start point\n\t\t\tif (how != CLONE)\n\t\t\t\tt.collapse(TRUE);\n\n\t\t\treturn frag;\n\t\t};\n\n\t\tfunction _traverseCommonStartContainer(endAncestor, how) {\n\t\t\tvar frag, n, endIdx, cnt, sibling, xferNode;\n\n\t\t\tif (how != DELETE)\n\t\t\t\tfrag = doc.createDocumentFragment();\n\n\t\t\tn = _traverseRightBoundary(endAncestor, how);\n\n\t\t\tif (frag)\n\t\t\t\tfrag.appendChild(n);\n\n\t\t\tendIdx = nodeIndex(endAncestor);\n\t\t\tcnt = endIdx - t[START_OFFSET];\n\n\t\t\tif (cnt <= 0) {\n\t\t\t\t// Collapse to just before the endAncestor, which\n\t\t\t\t// is partially selected.\n\t\t\t\tif (how != CLONE) {\n\t\t\t\t\tt.setEndBefore(endAncestor);\n\t\t\t\t\tt.collapse(FALSE);\n\t\t\t\t}\n\n\t\t\t\treturn frag;\n\t\t\t}\n\n\t\t\tn = endAncestor.previousSibling;\n\t\t\twhile (cnt > 0) {\n\t\t\t\tsibling = n.previousSibling;\n\t\t\t\txferNode = _traverseFullySelected(n, how);\n\n\t\t\t\tif (frag)\n\t\t\t\t\tfrag.insertBefore(xferNode, frag.firstChild);\n\n\t\t\t\t--cnt;\n\t\t\t\tn = sibling;\n\t\t\t}\n\n\t\t\t// Collapse to just before the endAncestor, which\n\t\t\t// is partially selected.\n\t\t\tif (how != CLONE) {\n\t\t\t\tt.setEndBefore(endAncestor);\n\t\t\t\tt.collapse(FALSE);\n\t\t\t}\n\n\t\t\treturn frag;\n\t\t};\n\n\t\tfunction _traverseCommonEndContainer(startAncestor, how) {\n\t\t\tvar frag, startIdx, n, cnt, sibling, xferNode;\n\n\t\t\tif (how != DELETE)\n\t\t\t\tfrag = doc.createDocumentFragment();\n\n\t\t\tn = _traverseLeftBoundary(startAncestor, how);\n\t\t\tif (frag)\n\t\t\t\tfrag.appendChild(n);\n\n\t\t\tstartIdx = nodeIndex(startAncestor);\n\t\t\t++startIdx; // Because we already traversed it\n\n\t\t\tcnt = t[END_OFFSET] - startIdx;\n\t\t\tn = startAncestor.nextSibling;\n\t\t\twhile (cnt > 0) {\n\t\t\t\tsibling = n.nextSibling;\n\t\t\t\txferNode = _traverseFullySelected(n, how);\n\n\t\t\t\tif (frag)\n\t\t\t\t\tfrag.appendChild(xferNode);\n\n\t\t\t\t--cnt;\n\t\t\t\tn = sibling;\n\t\t\t}\n\n\t\t\tif (how != CLONE) {\n\t\t\t\tt.setStartAfter(startAncestor);\n\t\t\t\tt.collapse(TRUE);\n\t\t\t}\n\n\t\t\treturn frag;\n\t\t};\n\n\t\tfunction _traverseCommonAncestors(startAncestor, endAncestor, how) {\n\t\t\tvar n, frag, commonParent, startOffset, endOffset, cnt, sibling, nextSibling;\n\n\t\t\tif (how != DELETE)\n\t\t\t\tfrag = doc.createDocumentFragment();\n\n\t\t\tn = _traverseLeftBoundary(startAncestor, how);\n\t\t\tif (frag)\n\t\t\t\tfrag.appendChild(n);\n\n\t\t\tcommonParent = startAncestor.parentNode;\n\t\t\tstartOffset = nodeIndex(startAncestor);\n\t\t\tendOffset = nodeIndex(endAncestor);\n\t\t\t++startOffset;\n\n\t\t\tcnt = endOffset - startOffset;\n\t\t\tsibling = startAncestor.nextSibling;\n\n\t\t\twhile (cnt > 0) {\n\t\t\t\tnextSibling = sibling.nextSibling;\n\t\t\t\tn = _traverseFullySelected(sibling, how);\n\n\t\t\t\tif (frag)\n\t\t\t\t\tfrag.appendChild(n);\n\n\t\t\t\tsibling = nextSibling;\n\t\t\t\t--cnt;\n\t\t\t}\n\n\t\t\tn = _traverseRightBoundary(endAncestor, how);\n\n\t\t\tif (frag)\n\t\t\t\tfrag.appendChild(n);\n\n\t\t\tif (how != CLONE) {\n\t\t\t\tt.setStartAfter(startAncestor);\n\t\t\t\tt.collapse(TRUE);\n\t\t\t}\n\n\t\t\treturn frag;\n\t\t};\n\n\t\tfunction _traverseRightBoundary(root, how) {\n\t\t\tvar next = _getSelectedNode(t[END_CONTAINER], t[END_OFFSET] - 1), parent, clonedParent, prevSibling, clonedChild, clonedGrandParent, isFullySelected = next != t[END_CONTAINER];\n\n\t\t\tif (next == root)\n\t\t\t\treturn _traverseNode(next, isFullySelected, FALSE, how);\n\n\t\t\tparent = next.parentNode;\n\t\t\tclonedParent = _traverseNode(parent, FALSE, FALSE, how);\n\n\t\t\twhile (parent) {\n\t\t\t\twhile (next) {\n\t\t\t\t\tprevSibling = next.previousSibling;\n\t\t\t\t\tclonedChild = _traverseNode(next, isFullySelected, FALSE, how);\n\n\t\t\t\t\tif (how != DELETE)\n\t\t\t\t\t\tclonedParent.insertBefore(clonedChild, clonedParent.firstChild);\n\n\t\t\t\t\tisFullySelected = TRUE;\n\t\t\t\t\tnext = prevSibling;\n\t\t\t\t}\n\n\t\t\t\tif (parent == root)\n\t\t\t\t\treturn clonedParent;\n\n\t\t\t\tnext = parent.previousSibling;\n\t\t\t\tparent = parent.parentNode;\n\n\t\t\t\tclonedGrandParent = _traverseNode(parent, FALSE, FALSE, how);\n\n\t\t\t\tif (how != DELETE)\n\t\t\t\t\tclonedGrandParent.appendChild(clonedParent);\n\n\t\t\t\tclonedParent = clonedGrandParent;\n\t\t\t}\n\t\t};\n\n\t\tfunction _traverseLeftBoundary(root, how) {\n\t\t\tvar next = _getSelectedNode(t[START_CONTAINER], t[START_OFFSET]), isFullySelected = next != t[START_CONTAINER], parent, clonedParent, nextSibling, clonedChild, clonedGrandParent;\n\n\t\t\tif (next == root)\n\t\t\t\treturn _traverseNode(next, isFullySelected, TRUE, how);\n\n\t\t\tparent = next.parentNode;\n\t\t\tclonedParent = _traverseNode(parent, FALSE, TRUE, how);\n\n\t\t\twhile (parent) {\n\t\t\t\twhile (next) {\n\t\t\t\t\tnextSibling = next.nextSibling;\n\t\t\t\t\tclonedChild = _traverseNode(next, isFullySelected, TRUE, how);\n\n\t\t\t\t\tif (how != DELETE)\n\t\t\t\t\t\tclonedParent.appendChild(clonedChild);\n\n\t\t\t\t\tisFullySelected = TRUE;\n\t\t\t\t\tnext = nextSibling;\n\t\t\t\t}\n\n\t\t\t\tif (parent == root)\n\t\t\t\t\treturn clonedParent;\n\n\t\t\t\tnext = parent.nextSibling;\n\t\t\t\tparent = parent.parentNode;\n\n\t\t\t\tclonedGrandParent = _traverseNode(parent, FALSE, TRUE, how);\n\n\t\t\t\tif (how != DELETE)\n\t\t\t\t\tclonedGrandParent.appendChild(clonedParent);\n\n\t\t\t\tclonedParent = clonedGrandParent;\n\t\t\t}\n\t\t};\n\n\t\tfunction _traverseNode(n, isFullySelected, isLeft, how) {\n\t\t\tvar txtValue, newNodeValue, oldNodeValue, offset, newNode;\n\n\t\t\tif (isFullySelected)\n\t\t\t\treturn _traverseFullySelected(n, how);\n\n\t\t\tif (n.nodeType == 3 /* TEXT_NODE */) {\n\t\t\t\ttxtValue = n.nodeValue;\n\n\t\t\t\tif (isLeft) {\n\t\t\t\t\toffset = t[START_OFFSET];\n\t\t\t\t\tnewNodeValue = txtValue.substring(offset);\n\t\t\t\t\toldNodeValue = txtValue.substring(0, offset);\n\t\t\t\t} else {\n\t\t\t\t\toffset = t[END_OFFSET];\n\t\t\t\t\tnewNodeValue = txtValue.substring(0, offset);\n\t\t\t\t\toldNodeValue = txtValue.substring(offset);\n\t\t\t\t}\n\n\t\t\t\tif (how != CLONE)\n\t\t\t\t\tn.nodeValue = oldNodeValue;\n\n\t\t\t\tif (how == DELETE)\n\t\t\t\t\treturn;\n\n\t\t\t\tnewNode = n.cloneNode(FALSE);\n\t\t\t\tnewNode.nodeValue = newNodeValue;\n\n\t\t\t\treturn newNode;\n\t\t\t}\n\n\t\t\tif (how == DELETE)\n\t\t\t\treturn;\n\n\t\t\treturn n.cloneNode(FALSE);\n\t\t};\n\n\t\tfunction _traverseFullySelected(n, how) {\n\t\t\tif (how != DELETE)\n\t\t\t\treturn how == CLONE ? n.cloneNode(TRUE) : n;\n\n\t\t\tn.parentNode.removeChild(n);\n\t\t};\n\t};\n\n\tns.Range = Range;\n})(tinymce.dom);\n","Magento_Tinymce3/tiny_mce/classes/dom/Serializer.js":"/**\n * Serializer.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t/**\n\t * This class is used to serialize DOM trees into a string. Consult the TinyMCE Wiki API for more details and examples on how to use this class. \n\t *\n\t * @class tinymce.dom.Serializer\n\t */\n\n\t/**\n\t * Constucts a new DOM serializer class.\n\t *\n\t * @constructor\n\t * @method Serializer\n\t * @param {Object} settings Serializer settings object.\n\t * @param {tinymce.dom.DOMUtils} dom DOMUtils instance reference.\n\t * @param {tinymce.html.Schema} schema Optional schema reference.\n\t */\n\ttinymce.dom.Serializer = function(settings, dom, schema) {\n\t\tvar onPreProcess, onPostProcess, isIE = tinymce.isIE, each = tinymce.each, htmlParser;\n\n\t\t// Support the old apply_source_formatting option\n\t\tif (!settings.apply_source_formatting)\n\t\t\tsettings.indent = false;\n\n\t\tsettings.remove_trailing_brs = true;\n\n\t\t// Default DOM and Schema if they are undefined\n\t\tdom = dom || tinymce.DOM;\n\t\tschema = schema || new tinymce.html.Schema(settings);\n\t\tsettings.entity_encoding = settings.entity_encoding || 'named';\n\n\t\t/**\n\t\t * This event gets executed before a HTML fragment gets serialized into a HTML string. This event enables you to do modifications to the DOM before the serialization occurs. It's important to know that the element that is getting serialized is cloned so it's not inside a document.\n\t\t *\n\t\t * @event onPreProcess\n\t\t * @param {tinymce.dom.Serializer} sender object/Serializer instance that is serializing an element.\n\t\t * @param {Object} args Object containing things like the current node.\n\t\t * @example\n\t\t * // Adds an observer to the onPreProcess event\n\t\t * serializer.onPreProcess.add(function(se, o) {\n\t\t *     // Add a class to each paragraph\n\t\t *     se.dom.addClass(se.dom.select('p', o.node), 'myclass');\n\t\t * });\n\t\t */\n\t\tonPreProcess = new tinymce.util.Dispatcher(self);\n\n\t\t/**\n\t\t * This event gets executed after a HTML fragment has been serialized into a HTML string. This event enables you to do modifications to the HTML string like regexp replaces etc. \n\t\t *\n\t\t * @event onPreProcess\n\t\t * @param {tinymce.dom.Serializer} sender object/Serializer instance that is serializing an element.\n\t\t * @param {Object} args Object containing things like the current contents. \n\t\t * @example\n\t\t * // Adds an observer to the onPostProcess event\n\t\t * serializer.onPostProcess.add(function(se, o) {\n\t\t *    // Remove all paragraphs and replace with BR\n\t\t *    o.content = o.content.replace(/<p[^>]+>|<p>/g, '');\n\t\t *    o.content = o.content.replace(/<\\/p>/g, '<br />');\n\t\t * });\n\t\t */\n\t\tonPostProcess = new tinymce.util.Dispatcher(self);\n\n\t\thtmlParser = new tinymce.html.DomParser(settings, schema);\n\n\t\t// Convert move data-mce-src, data-mce-href and data-mce-style into nodes or process them if needed\n\t\thtmlParser.addAttributeFilter('src,href,style', function(nodes, name) {\n\t\t\tvar i = nodes.length, node, value, internalName = 'data-mce-' + name, urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope, undef;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\n\t\t\t\tvalue = node.attributes.map[internalName];\n\t\t\t\tif (value !== undef) {\n\t\t\t\t\t// Set external name to internal value and remove internal\n\t\t\t\t\tnode.attr(name, value.length > 0 ? value : null);\n\t\t\t\t\tnode.attr(internalName, null);\n\t\t\t\t} else {\n\t\t\t\t\t// No internal attribute found then convert the value we have in the DOM\n\t\t\t\t\tvalue = node.attributes.map[name];\n\n\t\t\t\t\tif (name === \"style\")\n\t\t\t\t\t\tvalue = dom.serializeStyle(dom.parseStyle(value), node.name);\n\t\t\t\t\telse if (urlConverter)\n\t\t\t\t\t\tvalue = urlConverter.call(urlConverterScope, value, name, node.name);\n\n\t\t\t\t\tnode.attr(name, value.length > 0 ? value : null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Remove internal classes mceItem<..>\n\t\thtmlParser.addAttributeFilter('class', function(nodes, name) {\n\t\t\tvar i = nodes.length, node, value;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\t\t\t\tvalue = node.attr('class').replace(/\\s*mce(Item\\w+|Selected)\\s*/g, '');\n\t\t\t\tnode.attr('class', value.length > 0 ? value : null);\n\t\t\t}\n\t\t});\n\n\t\t// Remove bookmark elements\n\t\thtmlParser.addAttributeFilter('data-mce-type', function(nodes, name, args) {\n\t\t\tvar i = nodes.length, node;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\n\t\t\t\tif (node.attributes.map['data-mce-type'] === 'bookmark' && !args.cleanup)\n\t\t\t\t\tnode.remove();\n\t\t\t}\n\t\t});\n\n\t\t// Force script into CDATA sections and remove the mce- prefix also add comments around styles\n\t\thtmlParser.addNodeFilter('script,style', function(nodes, name) {\n\t\t\tvar i = nodes.length, node, value;\n\n\t\t\tfunction trim(value) {\n\t\t\t\treturn value.replace(/(<!--\\[CDATA\\[|\\]\\]-->)/g, '\\n')\n\t\t\t\t\t\t.replace(/^[\\r\\n]*|[\\r\\n]*$/g, '')\n\t\t\t\t\t\t.replace(/^\\s*(\\/\\/\\s*<!--|\\/\\/\\s*<!\\[CDATA\\[|<!--|<!\\[CDATA\\[)[\\r\\n]*/g, '')\n\t\t\t\t\t\t.replace(/\\s*(\\/\\/\\s*\\]\\]>|\\/\\/\\s*-->|\\]\\]>|-->|\\]\\]-->)\\s*$/g, '');\n\t\t\t};\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\t\t\t\tvalue = node.firstChild ? node.firstChild.value : '';\n\n\t\t\t\tif (name === \"script\") {\n\t\t\t\t\t// Remove mce- prefix from script elements\n\t\t\t\t\tnode.attr('type', (node.attr('type') || 'text/javascript').replace(/^mce\\-/, ''));\n\n\t\t\t\t\tif (value.length > 0)\n\t\t\t\t\t\tnode.firstChild.value = '// <![CDATA[\\n' + trim(value) + '\\n// ]]>';\n\t\t\t\t} else {\n\t\t\t\t\tif (value.length > 0)\n\t\t\t\t\t\tnode.firstChild.value = '<!--\\n' + trim(value) + '\\n-->';\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Convert comments to cdata and handle protected comments\n\t\thtmlParser.addNodeFilter('#comment', function(nodes, name) {\n\t\t\tvar i = nodes.length, node;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\n\t\t\t\tif (node.value.indexOf('[CDATA[') === 0) {\n\t\t\t\t\tnode.name = '#cdata';\n\t\t\t\t\tnode.type = 4;\n\t\t\t\t\tnode.value = node.value.replace(/^\\[CDATA\\[|\\]\\]$/g, '');\n\t\t\t\t} else if (node.value.indexOf('mce:protected ') === 0) {\n\t\t\t\t\tnode.name = \"#text\";\n\t\t\t\t\tnode.type = 3;\n\t\t\t\t\tnode.raw = true;\n\t\t\t\t\tnode.value = unescape(node.value).substr(14);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\thtmlParser.addNodeFilter('xml:namespace,input', function(nodes, name) {\n\t\t\tvar i = nodes.length, node;\n\n\t\t\twhile (i--) {\n\t\t\t\tnode = nodes[i];\n\t\t\t\tif (node.type === 7)\n\t\t\t\t\tnode.remove();\n\t\t\t\telse if (node.type === 1) {\n\t\t\t\t\tif (name === \"input\" && !(\"type\" in node.attributes.map))\n\t\t\t\t\t\tnode.attr('type', 'text');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Fix list elements, TODO: Replace this later\n\t\tif (settings.fix_list_elements) {\n\t\t\thtmlParser.addNodeFilter('ul,ol', function(nodes, name) {\n\t\t\t\tvar i = nodes.length, node, parentNode;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tnode = nodes[i];\n\t\t\t\t\tparentNode = node.parent;\n\n\t\t\t\t\tif (parentNode.name === 'ul' || parentNode.name === 'ol') {\n\t\t\t\t\t\tif (node.prev && node.prev.name === 'li') {\n\t\t\t\t\t\t\tnode.prev.append(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Remove internal data attributes\n\t\thtmlParser.addAttributeFilter('data-mce-src,data-mce-href,data-mce-style', function(nodes, name) {\n\t\t\tvar i = nodes.length;\n\n\t\t\twhile (i--) {\n\t\t\t\tnodes[i].attr(name, null);\n\t\t\t}\n\t\t});\n\n\t\t// Return public methods\n\t\treturn {\n\t\t\t/**\n\t\t\t * Schema instance that was used to when the Serializer was constructed.\n\t\t\t *\n\t\t\t * @field {tinymce.html.Schema} schema\n\t\t\t */\n\t\t\tschema : schema,\n\n\t\t\t/**\n\t\t\t * Adds a node filter function to the parser used by the serializer, the parser will collect the specified nodes by name\n\t\t\t * and then execute the callback ones it has finished parsing the document.\n\t\t\t *\n\t\t\t * @example\n\t\t\t * parser.addNodeFilter('p,h1', function(nodes, name) {\n\t\t\t *\t\tfor (var i = 0; i < nodes.length; i++) {\n\t\t\t *\t\t\tconsole.log(nodes[i].name);\n\t\t\t *\t\t}\n\t\t\t * });\n\t\t\t * @method addNodeFilter\n\t\t\t * @method {String} name Comma separated list of nodes to collect.\n\t\t\t * @param {function} callback Callback function to execute once it has collected nodes.\n\t\t\t */\n\t\t\taddNodeFilter : htmlParser.addNodeFilter,\n\n\t\t\t/**\n\t\t\t * Adds a attribute filter function to the parser used by the serializer, the parser will collect nodes that has the specified attributes\n\t\t\t * and then execute the callback ones it has finished parsing the document.\n\t\t\t *\n\t\t\t * @example\n\t\t\t * parser.addAttributeFilter('src,href', function(nodes, name) {\n\t\t\t *\t\tfor (var i = 0; i < nodes.length; i++) {\n\t\t\t *\t\t\tconsole.log(nodes[i].name);\n\t\t\t *\t\t}\n\t\t\t * });\n\t\t\t * @method addAttributeFilter\n\t\t\t * @method {String} name Comma separated list of nodes to collect.\n\t\t\t * @param {function} callback Callback function to execute once it has collected nodes.\n\t\t\t */\n\t\t\taddAttributeFilter : htmlParser.addAttributeFilter,\n\n\t\t\t/**\n\t\t\t * Fires when the Serializer does a preProcess on the contents.\n\t\t\t *\n\t\t\t * @event onPreProcess\n\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t * @param {Object} obj PreProcess object.\n\t\t\t * @option {Node} node DOM node for the item being serialized.\n\t\t\t * @option {String} format The specified output format normally \"html\".\n\t\t\t * @option {Boolean} get Is true if the process is on a getContent operation.\n\t\t\t * @option {Boolean} set Is true if the process is on a setContent operation.\n\t\t\t * @option {Boolean} cleanup Is true if the process is on a cleanup operation.\n\t\t\t */\n\t\t\tonPreProcess : onPreProcess,\n\n\t\t\t/**\n\t\t\t * Fires when the Serializer does a postProcess on the contents.\n\t\t\t *\n\t\t\t * @event onPostProcess\n\t\t\t * @param {tinymce.Editor} sender Editor instance.\n\t\t\t * @param {Object} obj PreProcess object.\n\t\t\t */\n\t\t\tonPostProcess : onPostProcess,\n\n\t\t\t/**\n\t\t\t * Serializes the specified browser DOM node into a HTML string.\n\t\t\t *\n\t\t\t * @method serialize\n\t\t\t * @param {DOMNode} node DOM node to serialize.\n\t\t\t * @param {Object} args Arguments option that gets passed to event handlers.\n\t\t\t */\n\t\t\tserialize : function(node, args) {\n\t\t\t\tvar impl, doc, oldDoc, htmlSerializer, content;\n\n\t\t\t\t// Explorer won't clone contents of script and style and the\n\t\t\t\t// selected index of select elements are cleared on a clone operation.\n\t\t\t\tif (isIE && dom.select('script,style,select,map').length > 0) {\n\t\t\t\t\tcontent = node.innerHTML;\n\t\t\t\t\tnode = node.cloneNode(false);\n\t\t\t\t\tdom.setHTML(node, content);\n\t\t\t\t} else\n\t\t\t\t\tnode = node.cloneNode(true);\n\n\t\t\t\t// Nodes needs to be attached to something in WebKit/Opera\n\t\t\t\t// Older builds of Opera crashes if you attach the node to an document created dynamically\n\t\t\t\t// and since we can't feature detect a crash we need to sniff the acutal build number\n\t\t\t\t// This fix will make DOM ranges and make Sizzle happy!\n\t\t\t\timpl = node.ownerDocument.implementation;\n\t\t\t\tif (impl.createHTMLDocument) {\n\t\t\t\t\t// Create an empty HTML document\n\t\t\t\t\tdoc = impl.createHTMLDocument(\"\");\n\n\t\t\t\t\t// Add the element or it's children if it's a body element to the new document\n\t\t\t\t\teach(node.nodeName == 'BODY' ? node.childNodes : [node], function(node) {\n\t\t\t\t\t\tdoc.body.appendChild(doc.importNode(node, true));\n\t\t\t\t\t});\n\n\t\t\t\t\t// Grab first child or body element for serialization\n\t\t\t\t\tif (node.nodeName != 'BODY')\n\t\t\t\t\t\tnode = doc.body.firstChild;\n\t\t\t\t\telse\n\t\t\t\t\t\tnode = doc.body;\n\n\t\t\t\t\t// set the new document in DOMUtils so createElement etc works\n\t\t\t\t\toldDoc = dom.doc;\n\t\t\t\t\tdom.doc = doc;\n\t\t\t\t}\n\n\t\t\t\targs = args || {};\n\t\t\t\targs.format = args.format || 'html';\n\n\t\t\t\t// Pre process\n\t\t\t\tif (!args.no_events) {\n\t\t\t\t\targs.node = node;\n\t\t\t\t\tonPreProcess.dispatch(self, args);\n\t\t\t\t}\n\n\t\t\t\t// Setup serializer\n\t\t\t\thtmlSerializer = new tinymce.html.Serializer(settings, schema);\n\n\t\t\t\t// Parse and serialize HTML\n\t\t\t\targs.content = htmlSerializer.serialize(\n\t\t\t\t\thtmlParser.parse(args.getInner ? node.innerHTML : tinymce.trim(dom.getOuterHTML(node), args), args)\n\t\t\t\t);\n\n\t\t\t\t// Replace all BOM characters for now until we can find a better solution\n\t\t\t\tif (!args.cleanup)\n\t\t\t\t\targs.content = args.content.replace(/\\uFEFF|\\u200B/g, '');\n\n\t\t\t\t// Post process\n\t\t\t\tif (!args.no_events)\n\t\t\t\t\tonPostProcess.dispatch(self, args);\n\n\t\t\t\t// Restore the old document if it was changed\n\t\t\t\tif (oldDoc)\n\t\t\t\t\tdom.doc = oldDoc;\n\n\t\t\t\targs.node = null;\n\n\t\t\t\treturn args.content;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Adds valid elements rules to the serializers schema instance this enables you to specify things\n\t\t\t * like what elements should be outputted and what attributes specific elements might have.\n\t\t\t * Consult the Wiki for more details on this format.\n\t\t\t *\n\t\t\t * @method addRules\n\t\t\t * @param {String} rules Valid elements rules string to add to schema.\n\t\t\t */\n\t\t\taddRules : function(rules) {\n\t\t\t\tschema.addValidElements(rules);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Sets the valid elements rules to the serializers schema instance this enables you to specify things\n\t\t\t * like what elements should be outputted and what attributes specific elements might have.\n\t\t\t * Consult the Wiki for more details on this format.\n\t\t\t *\n\t\t\t * @method setRules\n\t\t\t * @param {String} rules Valid elements rules string.\n\t\t\t */\n\t\t\tsetRules : function(rules) {\n\t\t\t\tschema.setValidElements(rules);\n\t\t\t}\n\t\t};\n\t};\n})(tinymce);","Magento_Tinymce3/tiny_mce/classes/dom/TreeWalker.js":"/**\n * TreeWalker.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\ntinymce.dom.TreeWalker = function(start_node, root_node) {\n\tvar node = start_node;\n\n\tfunction findSibling(node, start_name, sibling_name, shallow) {\n\t\tvar sibling, parent;\n\n\t\tif (node) {\n\t\t\t// Walk into nodes if it has a start\n\t\t\tif (!shallow && node[start_name])\n\t\t\t\treturn node[start_name];\n\n\t\t\t// Return the sibling if it has one\n\t\t\tif (node != root_node) {\n\t\t\t\tsibling = node[sibling_name];\n\t\t\t\tif (sibling)\n\t\t\t\t\treturn sibling;\n\n\t\t\t\t// Walk up the parents to look for siblings\n\t\t\t\tfor (parent = node.parentNode; parent && parent != root_node; parent = parent.parentNode) {\n\t\t\t\t\tsibling = parent[sibling_name];\n\t\t\t\t\tif (sibling)\n\t\t\t\t\t\treturn sibling;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Returns the current node.\n\t *\n\t * @return {Node} Current node where the walker is.\n\t */\n\tthis.current = function() {\n\t\treturn node;\n\t};\n\n\t/**\n\t * Walks to the next node in tree.\n\t *\n\t * @return {Node} Current node where the walker is after moving to the next node.\n\t */\n\tthis.next = function(shallow) {\n\t\treturn (node = findSibling(node, 'firstChild', 'nextSibling', shallow));\n\t};\n\n\t/**\n\t * Walks to the previous node in tree.\n\t *\n\t * @return {Node} Current node where the walker is after moving to the previous node.\n\t */\n\tthis.prev = function(shallow) {\n\t\treturn (node = findSibling(node, 'lastChild', 'previousSibling', shallow));\n\t};\n};\n","Magento_Tinymce3/tiny_mce/classes/dom/ScriptLoader.js":"/**\n * ScriptLoader.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t/**\n\t * This class handles asynchronous/synchronous loading of JavaScript files it will execute callbacks when various items gets loaded. This class is useful to load external JavaScript files. \n\t *\n\t * @class tinymce.dom.ScriptLoader\n\t * @example\n\t * // Load a script from a specific URL using the global script loader\n\t * tinymce.ScriptLoader.load('somescript.js');\n\t * \n\t * // Load a script using a unique instance of the script loader\n\t * var scriptLoader = new tinymce.dom.ScriptLoader();\n\t * \n\t * scriptLoader.load('somescript.js');\n\t * \n\t * // Load multiple scripts\n\t * var scriptLoader = new tinymce.dom.ScriptLoader();\n\t * \n\t * scriptLoader.add('somescript1.js');\n\t * scriptLoader.add('somescript2.js');\n\t * scriptLoader.add('somescript3.js');\n\t * \n\t * scriptLoader.loadQueue(function() {\n\t *    alert('All scripts are now loaded.');\n\t * });\n\t */\n\ttinymce.dom.ScriptLoader = function(settings) {\n\t\tvar QUEUED = 0,\n\t\t\tLOADING = 1,\n\t\t\tLOADED = 2,\n\t\t\tstates = {},\n\t\t\tqueue = [],\n\t\t\tscriptLoadedCallbacks = {},\n\t\t\tqueueLoadedCallbacks = [],\n\t\t\tloading = 0,\n\t\t\tundefined;\n\n\t\t/**\n\t\t * Loads a specific script directly without adding it to the load queue.\n\t\t *\n\t\t * @method load\n\t\t * @param {String} url Absolute URL to script to add.\n\t\t * @param {function} callback Optional callback function to execute ones this script gets loaded.\n\t\t * @param {Object} scope Optional scope to execute callback in.\n\t\t */\n\t\tfunction loadScript(url, callback) {\n\t\t\tvar t = this, dom = tinymce.DOM, elm, uri, loc, id;\n\n\t\t\t// Execute callback when script is loaded\n\t\t\tfunction done() {\n\t\t\t\tdom.remove(id);\n\n\t\t\t\tif (elm)\n\t\t\t\t\telm.onreadystatechange = elm.onload = elm = null;\n\n\t\t\t\tcallback();\n\t\t\t};\n\t\t\t\n\t\t\tfunction error() {\n\t\t\t\t// Report the error so it's easier for people to spot loading errors\n\t\t\t\tif (typeof(console) !== \"undefined\" && console.log)\n\t\t\t\t\tconsole.log(\"Failed to load: \" + url);\n\n\t\t\t\t// We can't mark it as done if there is a load error since\n\t\t\t\t// A) We don't want to produce 404 errors on the server and\n\t\t\t\t// B) the onerror event won't fire on all browsers.\n\t\t\t\t// done();\n\t\t\t};\n\n\t\t\tid = dom.uniqueId();\n\n\t\t\tif (tinymce.isIE6) {\n\t\t\t\turi = new tinymce.util.URI(url);\n\t\t\t\tloc = location;\n\n\t\t\t\t// If script is from same domain and we\n\t\t\t\t// use IE 6 then use XHR since it's more reliable\n\t\t\t\tif (uri.host == loc.hostname && uri.port == loc.port && (uri.protocol + ':') == loc.protocol && uri.protocol.toLowerCase() != 'file') {\n\t\t\t\t\ttinymce.util.XHR.send({\n\t\t\t\t\t\turl : tinymce._addVer(uri.getURI()),\n\t\t\t\t\t\tsuccess : function(content) {\n\t\t\t\t\t\t\t// Create new temp script element\n\t\t\t\t\t\t\tvar script = dom.create('script', {\n\t\t\t\t\t\t\t\ttype : 'text/javascript'\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// Evaluate script in global scope\n\t\t\t\t\t\t\tscript.text = content;\n\t\t\t\t\t\t\tdocument.getElementsByTagName('head')[0].appendChild(script);\n\t\t\t\t\t\t\tdom.remove(script);\n\n\t\t\t\t\t\t\tdone();\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\n\t\t\t\t\t\terror : error\n\t\t\t\t\t});\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Create new script element\n\t\t\telm = dom.create('script', {\n\t\t\t\tid : id,\n\t\t\t\ttype : 'text/javascript',\n\t\t\t\tsrc : tinymce._addVer(url)\n\t\t\t});\n\n\t\t\t// Add onload listener for non IE browsers since IE9\n\t\t\t// fires onload event before the script is parsed and executed\n\t\t\tif (!tinymce.isIE)\n\t\t\t\telm.onload = done;\n\n\t\t\t// Add onerror event will get fired on some browsers but not all of them\n\t\t\telm.onerror = error;\n\n\t\t\t// Opera 9.60 doesn't seem to fire the onreadystate event at correctly\n\t\t\tif (!tinymce.isOpera) {\n\t\t\t\telm.onreadystatechange = function() {\n\t\t\t\t\tvar state = elm.readyState;\n\n\t\t\t\t\t// Loaded state is passed on IE 6 however there\n\t\t\t\t\t// are known issues with this method but we can't use\n\t\t\t\t\t// XHR in a cross domain loading\n\t\t\t\t\tif (state == 'complete' || state == 'loaded')\n\t\t\t\t\t\tdone();\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Most browsers support this feature so we report errors\n\t\t\t// for those at least to help users track their missing plugins etc\n\t\t\t// todo: Removed since it produced error if the document is unloaded by navigating away, re-add it as an option\n\t\t\t/*elm.onerror = function() {\n\t\t\t\talert('Failed to load: ' + url);\n\t\t\t};*/\n\n\t\t\t// Add script to document\n\t\t\t(document.getElementsByTagName('head')[0] || document.body).appendChild(elm);\n\t\t};\n\n\t\t/**\n\t\t * Returns true/false if a script has been loaded or not.\n\t\t *\n\t\t * @method isDone\n\t\t * @param {String} url URL to check for.\n\t\t * @return [Boolean} true/false if the URL is loaded.\n\t\t */\n\t\tthis.isDone = function(url) {\n\t\t\treturn states[url] == LOADED;\n\t\t};\n\n\t\t/**\n\t\t * Marks a specific script to be loaded. This can be useful if a script got loaded outside\n\t\t * the script loader or to skip it from loading some script.\n\t\t *\n\t\t * @method markDone\n\t\t * @param {string} u Absolute URL to the script to mark as loaded.\n\t\t */\n\t\tthis.markDone = function(url) {\n\t\t\tstates[url] = LOADED;\n\t\t};\n\n\t\t/**\n\t\t * Adds a specific script to the load queue of the script loader.\n\t\t *\n\t\t * @method add\n\t\t * @param {String} url Absolute URL to script to add.\n\t\t * @param {function} callback Optional callback function to execute ones this script gets loaded.\n\t\t * @param {Object} scope Optional scope to execute callback in.\n\t\t */\n\t\tthis.add = this.load = function(url, callback, scope) {\n\t\t\tvar item, state = states[url];\n\n\t\t\t// Add url to load queue\n\t\t\tif (state == undefined) {\n\t\t\t\tqueue.push(url);\n\t\t\t\tstates[url] = QUEUED;\n\t\t\t}\n\n\t\t\tif (callback) {\n\t\t\t\t// Store away callback for later execution\n\t\t\t\tif (!scriptLoadedCallbacks[url])\n\t\t\t\t\tscriptLoadedCallbacks[url] = [];\n\n\t\t\t\tscriptLoadedCallbacks[url].push({\n\t\t\t\t\tfunc : callback,\n\t\t\t\t\tscope : scope || this\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Starts the loading of the queue.\n\t\t *\n\t\t * @method loadQueue\n\t\t * @param {function} callback Optional callback to execute when all queued items are loaded.\n\t\t * @param {Object} scope Optional scope to execute the callback in.\n\t\t */\n\t\tthis.loadQueue = function(callback, scope) {\n\t\t\tthis.loadScripts(queue, callback, scope);\n\t\t};\n\n\t\t/**\n\t\t * Loads the specified queue of files and executes the callback ones they are loaded.\n\t\t * This method is generally not used outside this class but it might be useful in some scenarios. \n\t\t *\n\t\t * @method loadScripts\n\t\t * @param {Array} scripts Array of queue items to load.\n\t\t * @param {function} callback Optional callback to execute ones all items are loaded.\n\t\t * @param {Object} scope Optional scope to execute callback in.\n\t\t */\n\t\tthis.loadScripts = function(scripts, callback, scope) {\n\t\t\tvar loadScripts;\n\n\t\t\tfunction execScriptLoadedCallbacks(url) {\n\t\t\t\t// Execute URL callback functions\n\t\t\t\ttinymce.each(scriptLoadedCallbacks[url], function(callback) {\n\t\t\t\t\tcallback.func.call(callback.scope);\n\t\t\t\t});\n\n\t\t\t\tscriptLoadedCallbacks[url] = undefined;\n\t\t\t};\n\n\t\t\tqueueLoadedCallbacks.push({\n\t\t\t\tfunc : callback,\n\t\t\t\tscope : scope || this\n\t\t\t});\n\n\t\t\tloadScripts = function() {\n\t\t\t\tvar loadingScripts = tinymce.grep(scripts);\n\n\t\t\t\t// Current scripts has been handled\n\t\t\t\tscripts.length = 0;\n\n\t\t\t\t// Load scripts that needs to be loaded\n\t\t\t\ttinymce.each(loadingScripts, function(url) {\n\t\t\t\t\t// Script is already loaded then execute script callbacks directly\n\t\t\t\t\tif (states[url] == LOADED) {\n\t\t\t\t\t\texecScriptLoadedCallbacks(url);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Is script not loading then start loading it\n\t\t\t\t\tif (states[url] != LOADING) {\n\t\t\t\t\t\tstates[url] = LOADING;\n\t\t\t\t\t\tloading++;\n\n\t\t\t\t\t\tloadScript(url, function() {\n\t\t\t\t\t\t\tstates[url] = LOADED;\n\t\t\t\t\t\t\tloading--;\n\n\t\t\t\t\t\t\texecScriptLoadedCallbacks(url);\n\n\t\t\t\t\t\t\t// Load more scripts if they where added by the recently loaded script\n\t\t\t\t\t\t\tloadScripts();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// No scripts are currently loading then execute all pending queue loaded callbacks\n\t\t\t\tif (!loading) {\n\t\t\t\t\ttinymce.each(queueLoadedCallbacks, function(callback) {\n\t\t\t\t\t\tcallback.func.call(callback.scope);\n\t\t\t\t\t});\n\n\t\t\t\t\tqueueLoadedCallbacks.length = 0;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tloadScripts();\n\t\t};\n\t};\n\n\t// Global script loader\n\ttinymce.ScriptLoader = new tinymce.dom.ScriptLoader();\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/dom/Selection.js":"/**\n * Selection.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tfunction trimNl(s) {\n\t\treturn s.replace(/[\\n\\r]+/g, '');\n\t};\n\n\t// Shorten names\n\tvar is = tinymce.is, isIE = tinymce.isIE, each = tinymce.each;\n\n\t/**\n\t * This class handles text and control selection it's an crossbrowser utility class.\n\t * Consult the TinyMCE Wiki API for more details and examples on how to use this class.\n\t *\n\t * @class tinymce.dom.Selection\n\t * @example\n\t * // Getting the currently selected node for the active editor\n\t * alert(tinymce.activeEditor.selection.getNode().nodeName);\n\t */\n\ttinymce.create('tinymce.dom.Selection', {\n\t\t/**\n\t\t * Constructs a new selection instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method Selection\n\t\t * @param {tinymce.dom.DOMUtils} dom DOMUtils object reference.\n\t\t * @param {Window} win Window to bind the selection object to.\n\t\t * @param {tinymce.dom.Serializer} serializer DOM serialization class to use for getContent.\n\t\t */\n\t\tSelection : function(dom, win, serializer) {\n\t\t\tvar t = this;\n\n\t\t\tt.dom = dom;\n\t\t\tt.win = win;\n\t\t\tt.serializer = serializer;\n\n\t\t\t// Add events\n\t\t\teach([\n\t\t\t\t/**\n\t\t\t\t * This event gets executed before contents is extracted from the selection.\n\t\t\t\t *\n\t\t\t\t * @event onBeforeSetContent\n\t\t\t\t * @param {tinymce.dom.Selection} selection Selection object that fired the event.\n\t\t\t\t * @param {Object} args Contains things like the contents that will be returned. \n\t\t\t\t */\n\t\t\t\t'onBeforeSetContent',\n\n\t\t\t\t/**\n\t\t\t\t * This event gets executed before contents is inserted into selection. \n\t\t\t\t *\n\t\t\t\t * @event onBeforeGetContent\n\t\t\t\t * @param {tinymce.dom.Selection} selection Selection object that fired the event.\n\t\t\t\t * @param {Object} args Contains things like the contents that will be inserted. \n\t\t\t\t */\n\t\t\t\t'onBeforeGetContent',\n\n\t\t\t\t/**\n\t\t\t\t * This event gets executed when contents is inserted into selection.\n\t\t\t\t *\n\t\t\t\t * @event onSetContent\n\t\t\t\t * @param {tinymce.dom.Selection} selection Selection object that fired the event.\n\t\t\t\t * @param {Object} args Contains things like the contents that will be inserted. \n\t\t\t\t */\n\t\t\t\t'onSetContent',\n\n\t\t\t\t/**\n\t\t\t\t * This event gets executed when contents is extracted from the selection.\n\t\t\t\t *\n\t\t\t\t * @event onGetContent\n\t\t\t\t * @param {tinymce.dom.Selection} selection Selection object that fired the event.\n\t\t\t\t * @param {Object} args Contains things like the contents that will be returned. \n\t\t\t\t */\n\t\t\t\t'onGetContent'\n\t\t\t], function(e) {\n\t\t\t\tt[e] = new tinymce.util.Dispatcher(t);\n\t\t\t});\n\n\t\t\t// No W3C Range support\n\t\t\tif (!t.win.getSelection)\n\t\t\t\tt.tridentSel = new tinymce.dom.TridentSelection(t);\n\n\t\t\tif (tinymce.isIE && dom.boxModel)\n\t\t\t\tthis._fixIESelection();\n\n\t\t\t// Prevent leaks\n\t\t\ttinymce.addUnload(t.destroy, t);\n\t\t},\n\n\t\t/**\n\t\t * Move the selection cursor range to the specified node and offset.\n\t\t * @param node Node to put the cursor in.\n\t\t * @param offset Offset from the start of the node to put the cursor at.\n\t\t */\n\t\tsetCursorLocation: function(node, offset) {\n\t\t\tvar t = this; var r = t.dom.createRng();\n\t\t\tr.setStart(node, offset);\n\t\t\tr.setEnd(node, offset);\n\t\t\tt.setRng(r);\n\t\t\tt.collapse(false);\n\t\t},\n\t\t/**\n\t\t * Returns the selected contents using the DOM serializer passed in to this class.\n\t\t *\n\t\t * @method getContent\n\t\t * @param {Object} s Optional settings class with for example output format text or html.\n\t\t * @return {String} Selected contents in for example HTML format.\n\t\t * @example\n\t\t * // Alerts the currently selected contents\n\t\t * alert(tinyMCE.activeEditor.selection.getContent());\n\t\t * \n\t\t * // Alerts the currently selected contents as plain text\n\t\t * alert(tinyMCE.activeEditor.selection.getContent({format : 'text'}));\n\t\t */\n\t\tgetContent : function(s) {\n\t\t\tvar t = this, r = t.getRng(), e = t.dom.create(\"body\"), se = t.getSel(), wb, wa, n;\n\n\t\t\ts = s || {};\n\t\t\twb = wa = '';\n\t\t\ts.get = true;\n\t\t\ts.format = s.format || 'html';\n\t\t\ts.forced_root_block = '';\n\t\t\tt.onBeforeGetContent.dispatch(t, s);\n\n\t\t\tif (s.format == 'text')\n\t\t\t\treturn t.isCollapsed() ? '' : (r.text || (se.toString ? se.toString() : ''));\n\n\t\t\tif (r.cloneContents) {\n\t\t\t\tn = r.cloneContents();\n\n\t\t\t\tif (n)\n\t\t\t\t\te.appendChild(n);\n\t\t\t} else if (is(r.item) || is(r.htmlText)) {\n\t\t\t\t// IE will produce invalid markup if elements are present that\n\t\t\t\t// it doesn't understand like custom elements or HTML5 elements.\n\t\t\t\t// Adding a BR in front of the contents and then remoiving it seems to fix it though.\n\t\t\t\te.innerHTML = '<br>' + (r.item ? r.item(0).outerHTML : r.htmlText);\n\t\t\t\te.removeChild(e.firstChild);\n\t\t\t} else\n\t\t\t\te.innerHTML = r.toString();\n\n\t\t\t// Keep whitespace before and after\n\t\t\tif (/^\\s/.test(e.innerHTML))\n\t\t\t\twb = ' ';\n\n\t\t\tif (/\\s+$/.test(e.innerHTML))\n\t\t\t\twa = ' ';\n\n\t\t\ts.getInner = true;\n\n\t\t\ts.content = t.isCollapsed() ? '' : wb + t.serializer.serialize(e, s) + wa;\n\t\t\tt.onGetContent.dispatch(t, s);\n\n\t\t\treturn s.content;\n\t\t},\n\n\t\t/**\n\t\t * Sets the current selection to the specified content. If any contents is selected it will be replaced\n\t\t * with the contents passed in to this function. If there is no selection the contents will be inserted\n\t\t * where the caret is placed in the editor/page.\n\t\t *\n\t\t * @method setContent\n\t\t * @param {String} content HTML contents to set could also be other formats depending on settings.\n\t\t * @param {Object} args Optional settings object with for example data format.\n\t\t * @example\n\t\t * // Inserts some HTML contents at the current selection\n\t\t * tinyMCE.activeEditor.selection.setContent('<strong>Some contents</strong>');\n\t\t */\n\t\tsetContent : function(content, args) {\n\t\t\tvar self = this, rng = self.getRng(), caretNode, doc = self.win.document, frag, temp;\n\n\t\t\targs = args || {format : 'html'};\n\t\t\targs.set = true;\n\t\t\tcontent = args.content = content;\n\n\t\t\t// Dispatch before set content event\n\t\t\tif (!args.no_events)\n\t\t\t\tself.onBeforeSetContent.dispatch(self, args);\n\n\t\t\tcontent = args.content;\n\n\t\t\tif (rng.insertNode) {\n\t\t\t\t// Make caret marker since insertNode places the caret in the beginning of text after insert\n\t\t\t\tcontent += '<span id=\"__caret\">_</span>';\n\n\t\t\t\t// Delete and insert new node\n\t\t\t\tif (rng.startContainer == doc && rng.endContainer == doc) {\n\t\t\t\t\t// WebKit will fail if the body is empty since the range is then invalid and it can't insert contents\n\t\t\t\t\tdoc.body.innerHTML = content;\n\t\t\t\t} else {\n\t\t\t\t\trng.deleteContents();\n\n\t\t\t\t\tif (doc.body.childNodes.length == 0) {\n\t\t\t\t\t\tdoc.body.innerHTML = content;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// createContextualFragment doesn't exists in IE 9 DOMRanges\n\t\t\t\t\t\tif (rng.createContextualFragment) {\n\t\t\t\t\t\t\trng.insertNode(rng.createContextualFragment(content));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Fake createContextualFragment call in IE 9\n\t\t\t\t\t\t\tfrag = doc.createDocumentFragment();\n\t\t\t\t\t\t\ttemp = doc.createElement('div');\n\n\t\t\t\t\t\t\tfrag.appendChild(temp);\n\t\t\t\t\t\t\ttemp.outerHTML = content;\n\n\t\t\t\t\t\t\trng.insertNode(frag);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Move to caret marker\n\t\t\t\tcaretNode = self.dom.get('__caret');\n\n\t\t\t\t// Make sure we wrap it compleatly, Opera fails with a simple select call\n\t\t\t\trng = doc.createRange();\n\t\t\t\trng.setStartBefore(caretNode);\n\t\t\t\trng.setEndBefore(caretNode);\n\t\t\t\tself.setRng(rng);\n\n\t\t\t\t// Remove the caret position\n\t\t\t\tself.dom.remove('__caret');\n\n\t\t\t\ttry {\n\t\t\t\t\tself.setRng(rng);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Might fail on Opera for some odd reason\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (rng.item) {\n\t\t\t\t\t// Delete content and get caret text selection\n\t\t\t\t\tdoc.execCommand('Delete', false, null);\n\t\t\t\t\trng = self.getRng();\n\t\t\t\t}\n\n\t\t\t\t// Explorer removes spaces from the beginning of pasted contents\n\t\t\t\tif (/^\\s+/.test(content)) {\n\t\t\t\t\trng.pasteHTML('<span id=\"__mce_tmp\">_</span>' + content);\n\t\t\t\t\tself.dom.remove('__mce_tmp');\n\t\t\t\t} else\n\t\t\t\t\trng.pasteHTML(content);\n\t\t\t}\n\n\t\t\t// Dispatch set content event\n\t\t\tif (!args.no_events)\n\t\t\t\tself.onSetContent.dispatch(self, args);\n\t\t},\n\n\t\t/**\n\t\t * Returns the start element of a selection range. If the start is in a text\n\t\t * node the parent element will be returned.\n\t\t *\n\t\t * @method getStart\n\t\t * @return {Element} Start element of selection range.\n\t\t */\n\t\tgetStart : function() {\n\t\t\tvar rng = this.getRng(), startElement, parentElement, checkRng, node;\n\n\t\t\tif (rng.duplicate || rng.item) {\n\t\t\t\t// Control selection, return first item\n\t\t\t\tif (rng.item)\n\t\t\t\t\treturn rng.item(0);\n\n\t\t\t\t// Get start element\n\t\t\t\tcheckRng = rng.duplicate();\n\t\t\t\tcheckRng.collapse(1);\n\t\t\t\tstartElement = checkRng.parentElement();\n\n\t\t\t\t// Check if range parent is inside the start element, then return the inner parent element\n\t\t\t\t// This will fix issues when a single element is selected, IE would otherwise return the wrong start element\n\t\t\t\tparentElement = node = rng.parentElement();\n\t\t\t\twhile (node = node.parentNode) {\n\t\t\t\t\tif (node == startElement) {\n\t\t\t\t\t\tstartElement = parentElement;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn startElement;\n\t\t\t} else {\n\t\t\t\tstartElement = rng.startContainer;\n\n\t\t\t\tif (startElement.nodeType == 1 && startElement.hasChildNodes())\n\t\t\t\t\tstartElement = startElement.childNodes[Math.min(startElement.childNodes.length - 1, rng.startOffset)];\n\n\t\t\t\tif (startElement && startElement.nodeType == 3)\n\t\t\t\t\treturn startElement.parentNode;\n\n\t\t\t\treturn startElement;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns the end element of a selection range. If the end is in a text\n\t\t * node the parent element will be returned.\n\t\t *\n\t\t * @method getEnd\n\t\t * @return {Element} End element of selection range.\n\t\t */\n\t\tgetEnd : function() {\n\t\t\tvar t = this, r = t.getRng(), e, eo;\n\n\t\t\tif (r.duplicate || r.item) {\n\t\t\t\tif (r.item)\n\t\t\t\t\treturn r.item(0);\n\n\t\t\t\tr = r.duplicate();\n\t\t\t\tr.collapse(0);\n\t\t\t\te = r.parentElement();\n\n\t\t\t\tif (e && e.nodeName == 'BODY')\n\t\t\t\t\treturn e.lastChild || e;\n\n\t\t\t\treturn e;\n\t\t\t} else {\n\t\t\t\te = r.endContainer;\n\t\t\t\teo = r.endOffset;\n\n\t\t\t\tif (e.nodeType == 1 && e.hasChildNodes())\n\t\t\t\t\te = e.childNodes[eo > 0 ? eo - 1 : eo];\n\n\t\t\t\tif (e && e.nodeType == 3)\n\t\t\t\t\treturn e.parentNode;\n\n\t\t\t\treturn e;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns a bookmark location for the current selection. This bookmark object\n\t\t * can then be used to restore the selection after some content modification to the document.\n\t\t *\n\t\t * @method getBookmark\n\t\t * @param {Number} type Optional state if the bookmark should be simple or not. Default is complex.\n\t\t * @param {Boolean} normalized Optional state that enables you to get a position that it would be after normalization.\n\t\t * @return {Object} Bookmark object, use moveToBookmark with this object to restore the selection.\n\t\t * @example\n\t\t * // Stores a bookmark of the current selection\n\t\t * var bm = tinyMCE.activeEditor.selection.getBookmark();\n\t\t * \n\t\t * tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent() + 'Some new content');\n\t\t * \n\t\t * // Restore the selection bookmark\n\t\t * tinyMCE.activeEditor.selection.moveToBookmark(bm);\n\t\t */\n\t\tgetBookmark : function(type, normalized) {\n\t\t\tvar t = this, dom = t.dom, rng, rng2, id, collapsed, name, element, index, chr = '\\uFEFF', styles;\n\n\t\t\tfunction findIndex(name, element) {\n\t\t\t\tvar index = 0;\n\n\t\t\t\teach(dom.select(name), function(node, i) {\n\t\t\t\t\tif (node == element)\n\t\t\t\t\t\tindex = i;\n\t\t\t\t});\n\n\t\t\t\treturn index;\n\t\t\t};\n\n\t\t\tif (type == 2) {\n\t\t\t\tfunction getLocation() {\n\t\t\t\t\tvar rng = t.getRng(true), root = dom.getRoot(), bookmark = {};\n\n\t\t\t\t\tfunction getPoint(rng, start) {\n\t\t\t\t\t\tvar container = rng[start ? 'startContainer' : 'endContainer'],\n\t\t\t\t\t\t\toffset = rng[start ? 'startOffset' : 'endOffset'], point = [], node, childNodes, after = 0;\n\n\t\t\t\t\t\tif (container.nodeType == 3) {\n\t\t\t\t\t\t\tif (normalized) {\n\t\t\t\t\t\t\t\tfor (node = container.previousSibling; node && node.nodeType == 3; node = node.previousSibling)\n\t\t\t\t\t\t\t\t\toffset += node.nodeValue.length;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpoint.push(offset);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchildNodes = container.childNodes;\n\n\t\t\t\t\t\t\tif (offset >= childNodes.length && childNodes.length) {\n\t\t\t\t\t\t\t\tafter = 1;\n\t\t\t\t\t\t\t\toffset = Math.max(0, childNodes.length - 1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpoint.push(t.dom.nodeIndex(childNodes[offset], normalized) + after);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (; container && container != root; container = container.parentNode)\n\t\t\t\t\t\t\tpoint.push(t.dom.nodeIndex(container, normalized));\n\n\t\t\t\t\t\treturn point;\n\t\t\t\t\t};\n\n\t\t\t\t\tbookmark.start = getPoint(rng, true);\n\n\t\t\t\t\tif (!t.isCollapsed())\n\t\t\t\t\t\tbookmark.end = getPoint(rng);\n\n\t\t\t\t\treturn bookmark;\n\t\t\t\t};\n\n\t\t\t\tif (t.tridentSel)\n\t\t\t\t\treturn t.tridentSel.getBookmark(type);\n\n\t\t\t\treturn getLocation();\n\t\t\t}\n\n\t\t\t// Handle simple range\n\t\t\tif (type)\n\t\t\t\treturn {rng : t.getRng()};\n\n\t\t\trng = t.getRng();\n\t\t\tid = dom.uniqueId();\n\t\t\tcollapsed = tinyMCE.activeEditor.selection.isCollapsed();\n\t\t\tstyles = 'overflow:hidden;line-height:0px';\n\n\t\t\t// Explorer method\n\t\t\tif (rng.duplicate || rng.item) {\n\t\t\t\t// Text selection\n\t\t\t\tif (!rng.item) {\n\t\t\t\t\trng2 = rng.duplicate();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Insert start marker\n\t\t\t\t\t\trng.collapse();\n\t\t\t\t\t\trng.pasteHTML('<span data-mce-type=\"bookmark\" id=\"' + id + '_start\" style=\"' + styles + '\">' + chr + '</span>');\n\n\t\t\t\t\t\t// Insert end marker\n\t\t\t\t\t\tif (!collapsed) {\n\t\t\t\t\t\t\trng2.collapse(false);\n\n\t\t\t\t\t\t\t// Detect the empty space after block elements in IE and move the end back one character <p></p>] becomes <p>]</p>\n\t\t\t\t\t\t\trng.moveToElementText(rng2.parentElement());\n\t\t\t\t\t\t\tif (rng.compareEndPoints('StartToEnd', rng2) == 0)\n\t\t\t\t\t\t\t\trng2.move('character', -1);\n\n\t\t\t\t\t\t\trng2.pasteHTML('<span data-mce-type=\"bookmark\" id=\"' + id + '_end\" style=\"' + styles + '\">' + chr + '</span>');\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t// IE might throw unspecified error so lets ignore it\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Control selection\n\t\t\t\t\telement = rng.item(0);\n\t\t\t\t\tname = element.nodeName;\n\n\t\t\t\t\treturn {name : name, index : findIndex(name, element)};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\telement = t.getNode();\n\t\t\t\tname = element.nodeName;\n\t\t\t\tif (name == 'IMG')\n\t\t\t\t\treturn {name : name, index : findIndex(name, element)};\n\n\t\t\t\t// W3C method\n\t\t\t\trng2 = rng.cloneRange();\n\n\t\t\t\t// Insert end marker\n\t\t\t\tif (!collapsed) {\n\t\t\t\t\trng2.collapse(false);\n\t\t\t\t\trng2.insertNode(dom.create('span', {'data-mce-type' : \"bookmark\", id : id + '_end', style : styles}, chr));\n\t\t\t\t}\n\n\t\t\t\trng.collapse(true);\n\t\t\t\trng.insertNode(dom.create('span', {'data-mce-type' : \"bookmark\", id : id + '_start', style : styles}, chr));\n\t\t\t}\n\n\t\t\tt.moveToBookmark({id : id, keep : 1});\n\n\t\t\treturn {id : id};\n\t\t},\n\n\t\t/**\n\t\t * Restores the selection to the specified bookmark.\n\t\t *\n\t\t * @method moveToBookmark\n\t\t * @param {Object} bookmark Bookmark to restore selection from.\n\t\t * @return {Boolean} true/false if it was successful or not.\n\t\t * @example\n\t\t * // Stores a bookmark of the current selection\n\t\t * var bm = tinyMCE.activeEditor.selection.getBookmark();\n\t\t * \n\t\t * tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent() + 'Some new content');\n\t\t * \n\t\t * // Restore the selection bookmark\n\t\t * tinyMCE.activeEditor.selection.moveToBookmark(bm);\n\t\t */\n\t\tmoveToBookmark : function(bookmark) {\n\t\t\tvar t = this, dom = t.dom, marker1, marker2, rng, root, startContainer, endContainer, startOffset, endOffset;\n\n\t\t\tif (bookmark) {\n\t\t\t\tif (bookmark.start) {\n\t\t\t\t\trng = dom.createRng();\n\t\t\t\t\troot = dom.getRoot();\n\n\t\t\t\t\tfunction setEndPoint(start) {\n\t\t\t\t\t\tvar point = bookmark[start ? 'start' : 'end'], i, node, offset, children;\n\n\t\t\t\t\t\tif (point) {\n\t\t\t\t\t\t\toffset = point[0];\n\n\t\t\t\t\t\t\t// Find container node\n\t\t\t\t\t\t\tfor (node = root, i = point.length - 1; i >= 1; i--) {\n\t\t\t\t\t\t\t\tchildren = node.childNodes;\n\n\t\t\t\t\t\t\t\tif (point[i] > children.length - 1)\n\t\t\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t\t\tnode = children[point[i]];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Move text offset to best suitable location\n\t\t\t\t\t\t\tif (node.nodeType === 3)\n\t\t\t\t\t\t\t\toffset = Math.min(point[0], node.nodeValue.length);\n\n\t\t\t\t\t\t\t// Move element offset to best suitable location\n\t\t\t\t\t\t\tif (node.nodeType === 1)\n\t\t\t\t\t\t\t\toffset = Math.min(point[0], node.childNodes.length);\n\n\t\t\t\t\t\t\t// Set offset within container node\n\t\t\t\t\t\t\tif (start)\n\t\t\t\t\t\t\t\trng.setStart(node, offset);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\trng.setEnd(node, offset);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t};\n\n\t\t\t\t\tif (t.tridentSel)\n\t\t\t\t\t\treturn t.tridentSel.moveToBookmark(bookmark);\n\n\t\t\t\t\tif (setEndPoint(true) && setEndPoint()) {\n\t\t\t\t\t\tt.setRng(rng);\n\t\t\t\t\t}\n\t\t\t\t} else if (bookmark.id) {\n\t\t\t\t\tfunction restoreEndPoint(suffix) {\n\t\t\t\t\t\tvar marker = dom.get(bookmark.id + '_' + suffix), node, idx, next, prev, keep = bookmark.keep;\n\n\t\t\t\t\t\tif (marker) {\n\t\t\t\t\t\t\tnode = marker.parentNode;\n\n\t\t\t\t\t\t\tif (suffix == 'start') {\n\t\t\t\t\t\t\t\tif (!keep) {\n\t\t\t\t\t\t\t\t\tidx = dom.nodeIndex(marker);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnode = marker.firstChild;\n\t\t\t\t\t\t\t\t\tidx = 1;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tstartContainer = endContainer = node;\n\t\t\t\t\t\t\t\tstartOffset = endOffset = idx;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (!keep) {\n\t\t\t\t\t\t\t\t\tidx = dom.nodeIndex(marker);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnode = marker.firstChild;\n\t\t\t\t\t\t\t\t\tidx = 1;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tendContainer = node;\n\t\t\t\t\t\t\t\tendOffset = idx;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!keep) {\n\t\t\t\t\t\t\t\tprev = marker.previousSibling;\n\t\t\t\t\t\t\t\tnext = marker.nextSibling;\n\n\t\t\t\t\t\t\t\t// Remove all marker text nodes\n\t\t\t\t\t\t\t\teach(tinymce.grep(marker.childNodes), function(node) {\n\t\t\t\t\t\t\t\t\tif (node.nodeType == 3)\n\t\t\t\t\t\t\t\t\t\tnode.nodeValue = node.nodeValue.replace(/\\uFEFF/g, '');\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t// Remove marker but keep children if for example contents where inserted into the marker\n\t\t\t\t\t\t\t\t// Also remove duplicated instances of the marker for example by a split operation or by WebKit auto split on paste feature\n\t\t\t\t\t\t\t\twhile (marker = dom.get(bookmark.id + '_' + suffix))\n\t\t\t\t\t\t\t\t\tdom.remove(marker, 1);\n\n\t\t\t\t\t\t\t\t// If siblings are text nodes then merge them unless it's Opera since it some how removes the node\n\t\t\t\t\t\t\t\t// and we are sniffing since adding a lot of detection code for a browser with 3% of the market isn't worth the effort. Sorry, Opera but it's just a fact\n\t\t\t\t\t\t\t\tif (prev && next && prev.nodeType == next.nodeType && prev.nodeType == 3 && !tinymce.isOpera) {\n\t\t\t\t\t\t\t\t\tidx = prev.nodeValue.length;\n\t\t\t\t\t\t\t\t\tprev.appendData(next.nodeValue);\n\t\t\t\t\t\t\t\t\tdom.remove(next);\n\n\t\t\t\t\t\t\t\t\tif (suffix == 'start') {\n\t\t\t\t\t\t\t\t\t\tstartContainer = endContainer = prev;\n\t\t\t\t\t\t\t\t\t\tstartOffset = endOffset = idx;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tendContainer = prev;\n\t\t\t\t\t\t\t\t\t\tendOffset = idx;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tfunction addBogus(node) {\n\t\t\t\t\t\t// Adds a bogus BR element for empty block elements or just a space on IE since it renders BR elements incorrectly\n\t\t\t\t\t\tif (dom.isBlock(node) && !node.innerHTML)\n\t\t\t\t\t\t\tnode.innerHTML = !isIE ? '<br data-mce-bogus=\"1\" />' : ' ';\n\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t};\n\n\t\t\t\t\t// Restore start/end points\n\t\t\t\t\trestoreEndPoint('start');\n\t\t\t\t\trestoreEndPoint('end');\n\n\t\t\t\t\tif (startContainer) {\n\t\t\t\t\t\trng = dom.createRng();\n\t\t\t\t\t\trng.setStart(addBogus(startContainer), startOffset);\n\t\t\t\t\t\trng.setEnd(addBogus(endContainer), endOffset);\n\t\t\t\t\t\tt.setRng(rng);\n\t\t\t\t\t}\n\t\t\t\t} else if (bookmark.name) {\n\t\t\t\t\tt.select(dom.select(bookmark.name)[bookmark.index]);\n\t\t\t\t} else if (bookmark.rng)\n\t\t\t\t\tt.setRng(bookmark.rng);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Selects the specified element. This will place the start and end of the selection range around the element.\n\t\t *\n\t\t * @method select\n\t\t * @param {Element} node HMTL DOM element to select.\n\t\t * @param {Boolean} content Optional bool state if the contents should be selected or not on non IE browser.\n\t\t * @return {Element} Selected element the same element as the one that got passed in.\n\t\t * @example\n\t\t * // Select the first paragraph in the active editor\n\t\t * tinyMCE.activeEditor.selection.select(tinyMCE.activeEditor.dom.select('p')[0]);\n\t\t */\n\t\tselect : function(node, content) {\n\t\t\tvar t = this, dom = t.dom, rng = dom.createRng(), idx;\n\n\t\t\tif (node) {\n\t\t\t\tidx = dom.nodeIndex(node);\n\t\t\t\trng.setStart(node.parentNode, idx);\n\t\t\t\trng.setEnd(node.parentNode, idx + 1);\n\n\t\t\t\t// Find first/last text node or BR element\n\t\t\t\tif (content) {\n\t\t\t\t\tfunction setPoint(node, start) {\n\t\t\t\t\t\tvar walker = new tinymce.dom.TreeWalker(node, node);\n\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t// Text node\n\t\t\t\t\t\t\tif (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) {\n\t\t\t\t\t\t\t\tif (start)\n\t\t\t\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\trng.setEnd(node, node.nodeValue.length);\n\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// BR element\n\t\t\t\t\t\t\tif (node.nodeName == 'BR') {\n\t\t\t\t\t\t\t\tif (start)\n\t\t\t\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\trng.setEndBefore(node);\n\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (node = (start ? walker.next() : walker.prev()));\n\t\t\t\t\t};\n\n\t\t\t\t\tsetPoint(node, 1);\n\t\t\t\t\tsetPoint(node);\n\t\t\t\t}\n\n\t\t\t\tt.setRng(rng);\n\t\t\t}\n\n\t\t\treturn node;\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the selection range is collapsed or not. Collapsed means if it's a caret or a larger selection.\n\t\t *\n\t\t * @method isCollapsed\n\t\t * @return {Boolean} true/false state if the selection range is collapsed or not. Collapsed means if it's a caret or a larger selection.\n\t\t */\n\t\tisCollapsed : function() {\n\t\t\tvar t = this, r = t.getRng(), s = t.getSel();\n\n\t\t\tif (!r || r.item)\n\t\t\t\treturn false;\n\n\t\t\tif (r.compareEndPoints)\n\t\t\t\treturn r.compareEndPoints('StartToEnd', r) === 0;\n\n\t\t\treturn !s || r.collapsed;\n\t\t},\n\n\t\t/**\n\t\t * Collapse the selection to start or end of range.\n\t\t *\n\t\t * @method collapse\n\t\t * @param {Boolean} to_start Optional boolean state if to collapse to end or not. Defaults to start.\n\t\t */\n\t\tcollapse : function(to_start) {\n\t\t\tvar self = this, rng = self.getRng(), node;\n\n\t\t\t// Control range on IE\n\t\t\tif (rng.item) {\n\t\t\t\tnode = rng.item(0);\n\t\t\t\trng = self.win.document.body.createTextRange();\n\t\t\t\trng.moveToElementText(node);\n\t\t\t}\n\n\t\t\trng.collapse(!!to_start);\n\t\t\tself.setRng(rng);\n\t\t},\n\n\t\t/**\n\t\t * Returns the browsers internal selection object.\n\t\t *\n\t\t * @method getSel\n\t\t * @return {Selection} Internal browser selection object.\n\t\t */\n\t\tgetSel : function() {\n\t\t\tvar t = this, w = this.win;\n\n\t\t\treturn w.getSelection ? w.getSelection() : w.document.selection;\n\t\t},\n\n\t\t/**\n\t\t * Returns the browsers internal range object.\n\t\t *\n\t\t * @method getRng\n\t\t * @param {Boolean} w3c Forces a compatible W3C range on IE.\n\t\t * @return {Range} Internal browser range object.\n\t\t * @see http://www.quirksmode.org/dom/range_intro.html\n\t\t * @see http://www.dotvoid.com/2001/03/using-the-range-object-in-mozilla/\n\t\t */\n\t\tgetRng : function(w3c) {\n\t\t\tvar t = this, s, r, elm, doc = t.win.document;\n\n\t\t\t// Found tridentSel object then we need to use that one\n\t\t\tif (w3c && t.tridentSel)\n\t\t\t\treturn t.tridentSel.getRangeAt(0);\n\n\t\t\ttry {\n\t\t\t\tif (s = t.getSel())\n\t\t\t\t\tr = s.rangeCount > 0 ? s.getRangeAt(0) : (s.createRange ? s.createRange() : doc.createRange());\n\t\t\t} catch (ex) {\n\t\t\t\t// IE throws unspecified error here if TinyMCE is placed in a frame/iframe\n\t\t\t}\n\n\t\t\t// We have W3C ranges and it's IE then fake control selection since IE9 doesn't handle that correctly yet\n\t\t\tif (tinymce.isIE && r && r.setStart && doc.selection.createRange().item) {\n\t\t\t\telm = doc.selection.createRange().item(0);\n\t\t\t\tr = doc.createRange();\n\t\t\t\tr.setStartBefore(elm);\n\t\t\t\tr.setEndAfter(elm);\n\t\t\t}\n\n\t\t\t// No range found then create an empty one\n\t\t\t// This can occur when the editor is placed in a hidden container element on Gecko\n\t\t\t// Or on IE when there was an exception\n\t\t\tif (!r)\n\t\t\t\tr = doc.createRange ? doc.createRange() : doc.body.createTextRange();\n\n\t\t\tif (t.selectedRange && t.explicitRange) {\n\t\t\t\tif (r.compareBoundaryPoints(r.START_TO_START, t.selectedRange) === 0 && r.compareBoundaryPoints(r.END_TO_END, t.selectedRange) === 0) {\n\t\t\t\t\t// Safari, Opera and Chrome only ever select text which causes the range to change.\n\t\t\t\t\t// This lets us use the originally set range if the selection hasn't been changed by the user.\n\t\t\t\t\tr = t.explicitRange;\n\t\t\t\t} else {\n\t\t\t\t\tt.selectedRange = null;\n\t\t\t\t\tt.explicitRange = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn r;\n\t\t},\n\n\t\t/**\n\t\t * Changes the selection to the specified DOM range.\n\t\t *\n\t\t * @method setRng\n\t\t * @param {Range} r Range to select.\n\t\t */\n\t\tsetRng : function(r) {\n\t\t\tvar s, t = this;\n\t\t\t\n\t\t\tif (!t.tridentSel) {\n\t\t\t\ts = t.getSel();\n\n\t\t\t\tif (s) {\n\t\t\t\t\tt.explicitRange = r;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\ts.removeAllRanges();\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t// IE9 might throw errors here don't know why\n\t\t\t\t\t}\n\n\t\t\t\t\ts.addRange(r);\n\t\t\t\t\tt.selectedRange = s.getRangeAt(0);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Is W3C Range\n\t\t\t\tif (r.cloneRange) {\n\t\t\t\t\tt.tridentSel.addRange(r);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Is IE specific range\n\t\t\t\ttry {\n\t\t\t\t\tr.select();\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Needed for some odd IE bug #1843306\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Sets the current selection to the specified DOM element.\n\t\t *\n\t\t * @method setNode\n\t\t * @param {Element} n Element to set as the contents of the selection.\n\t\t * @return {Element} Returns the element that got passed in.\n\t\t * @example\n\t\t * // Inserts a DOM node at current selection/caret location\n\t\t * tinyMCE.activeEditor.selection.setNode(tinyMCE.activeEditor.dom.create('img', {src : 'some.gif', title : 'some title'}));\n\t\t */\n\t\tsetNode : function(n) {\n\t\t\tvar t = this;\n\n\t\t\tt.setContent(t.dom.getOuterHTML(n));\n\n\t\t\treturn n;\n\t\t},\n\n\t\t/**\n\t\t * Returns the currently selected element or the common ancestor element for both start and end of the selection.\n\t\t *\n\t\t * @method getNode\n\t\t * @return {Element} Currently selected element or common ancestor element.\n\t\t * @example\n\t\t * // Alerts the currently selected elements node name\n\t\t * alert(tinyMCE.activeEditor.selection.getNode().nodeName);\n\t\t */\n\t\tgetNode : function() {\n\t\t\tvar t = this, rng = t.getRng(), sel = t.getSel(), elm, start = rng.startContainer, end = rng.endContainer;\n\n\t\t\t// Range maybe lost after the editor is made visible again\n\t\t\tif (!rng)\n\t\t\t\treturn t.dom.getRoot();\n\n\t\t\tif (rng.setStart) {\n\t\t\t\telm = rng.commonAncestorContainer;\n\n\t\t\t\t// Handle selection a image or other control like element such as anchors\n\t\t\t\tif (!rng.collapsed) {\n\t\t\t\t\tif (rng.startContainer == rng.endContainer) {\n\t\t\t\t\t\tif (rng.endOffset - rng.startOffset < 2) {\n\t\t\t\t\t\t\tif (rng.startContainer.hasChildNodes())\n\t\t\t\t\t\t\t\telm = rng.startContainer.childNodes[rng.startOffset];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the anchor node is a element instead of a text node then return this element\n\t\t\t\t\t//if (tinymce.isWebKit && sel.anchorNode && sel.anchorNode.nodeType == 1) \n\t\t\t\t\t//\treturn sel.anchorNode.childNodes[sel.anchorOffset];\n\n\t\t\t\t\t// Handle cases where the selection is immediately wrapped around a node and return that node instead of it's parent.\n\t\t\t\t\t// This happens when you double click an underlined word in FireFox.\n\t\t\t\t\tif (start.nodeType === 3 && end.nodeType === 3) {\n\t\t\t\t\t\tfunction skipEmptyTextNodes(n, forwards) {\n\t\t\t\t\t\t\tvar orig = n;\n\t\t\t\t\t\t\twhile (n && n.nodeType === 3 && n.length === 0) {\n\t\t\t\t\t\t\t\tn = forwards ? n.nextSibling : n.previousSibling;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn n || orig;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (start.length === rng.startOffset) {\n\t\t\t\t\t\t\tstart = skipEmptyTextNodes(start.nextSibling, true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart = start.parentNode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (rng.endOffset === 0) {\n\t\t\t\t\t\t\tend = skipEmptyTextNodes(end.previousSibling, false);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tend = end.parentNode;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (start && start === end)\n\t\t\t\t\t\t\treturn start;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (elm && elm.nodeType == 3)\n\t\t\t\t\treturn elm.parentNode;\n\n\t\t\t\treturn elm;\n\t\t\t}\n\n\t\t\treturn rng.item ? rng.item(0) : rng.parentElement();\n\t\t},\n\n\t\tgetSelectedBlocks : function(st, en) {\n\t\t\tvar t = this, dom = t.dom, sb, eb, n, bl = [];\n\n\t\t\tsb = dom.getParent(st || t.getStart(), dom.isBlock);\n\t\t\teb = dom.getParent(en || t.getEnd(), dom.isBlock);\n\n\t\t\tif (sb)\n\t\t\t\tbl.push(sb);\n\n\t\t\tif (sb && eb && sb != eb) {\n\t\t\t\tn = sb;\n\n\t\t\t\tvar walker = new tinymce.dom.TreeWalker(sb, dom.getRoot());\n\t\t\t\twhile ((n = walker.next()) && n != eb) {\n\t\t\t\t\tif (dom.isBlock(n))\n\t\t\t\t\t\tbl.push(n);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (eb && sb != eb)\n\t\t\t\tbl.push(eb);\n\n\t\t\treturn bl;\n\t\t},\n\n\t\tnormalize : function() {\n\t\t\tvar self = this, rng, normalized;\n\n\t\t\t// Normalize only on non IE browsers for now\n\t\t\tif (tinymce.isIE)\n\t\t\t\treturn;\n\n\t\t\tfunction normalizeEndPoint(start) {\n\t\t\t\tvar container, offset, walker, dom = self.dom, body = dom.getRoot(), node;\n\n\t\t\t\tcontainer = rng[(start ? 'start' : 'end') + 'Container'];\n\t\t\t\toffset = rng[(start ? 'start' : 'end') + 'Offset'];\n\n\t\t\t\t// If the container is a document move it to the body element\n\t\t\t\tif (container.nodeType === 9) {\n\t\t\t\t\tcontainer = container.body;\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\n\t\t\t\t// If the container is body try move it into the closest text node or position\n\t\t\t\t// TODO: Add more logic here to handle element selection cases\n\t\t\t\tif (container === body) {\n\t\t\t\t\t// Resolve the index\n\t\t\t\t\tif (container.hasChildNodes()) {\n\t\t\t\t\t\tcontainer = container.childNodes[Math.min(!start && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1)];\n\t\t\t\t\t\toffset = 0;\n\n\t\t\t\t\t\t// Don't walk into elements that doesn't have any child nodes like a IMG\n\t\t\t\t\t\tif (container.hasChildNodes()) {\n\t\t\t\t\t\t\t// Walk the DOM to find a text node to place the caret at or a BR\n\t\t\t\t\t\t\tnode = container;\n\t\t\t\t\t\t\twalker = new tinymce.dom.TreeWalker(container, body);\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t// Found a text node use that position\n\t\t\t\t\t\t\t\tif (node.nodeType === 3) {\n\t\t\t\t\t\t\t\t\toffset = start ? 0 : node.nodeValue.length - 1;\n\t\t\t\t\t\t\t\t\tcontainer = node;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Found a BR element that we can place the caret before\n\t\t\t\t\t\t\t\tif (node.nodeName === 'BR') {\n\t\t\t\t\t\t\t\t\toffset = dom.nodeIndex(node);\n\t\t\t\t\t\t\t\t\tcontainer = node.parentNode;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} while (node = (start ? walker.next() : walker.prev()));\n\n\t\t\t\t\t\t\tnormalized = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Set endpoint if it was normalized\n\t\t\t\tif (normalized)\n\t\t\t\t\trng['set' + (start ? 'Start' : 'End')](container, offset);\n\t\t\t};\n\n\t\t\trng = self.getRng();\n\n\t\t\t// Normalize the end points\n\t\t\tnormalizeEndPoint(true);\n\t\t\t\n\t\t\tif (rng.collapsed)\n\t\t\t\tnormalizeEndPoint();\n\n\t\t\t// Set the selection if it was normalized\n\t\t\tif (normalized) {\n\t\t\t\t//console.log(self.dom.dumpRng(rng));\n\t\t\t\tself.setRng(rng);\n\t\t\t}\n\t\t},\n\n\t\tdestroy : function(s) {\n\t\t\tvar t = this;\n\n\t\t\tt.win = null;\n\n\t\t\t// Manual destroy then remove unload handler\n\t\t\tif (!s)\n\t\t\t\ttinymce.removeUnload(t.destroy);\n\t\t},\n\n\t\t// IE has an issue where you can't select/move the caret by clicking outside the body if the document is in standards mode\n\t\t_fixIESelection : function() {\n\t\t\tvar dom = this.dom, doc = dom.doc, body = doc.body, started, startRng, htmlElm;\n\n\t\t\t// Make HTML element unselectable since we are going to handle selection by hand\n\t\t\tdoc.documentElement.unselectable = true;\n\n\t\t\t// Return range from point or null if it failed\n\t\t\tfunction rngFromPoint(x, y) {\n\t\t\t\tvar rng = body.createTextRange();\n\n\t\t\t\ttry {\n\t\t\t\t\trng.moveToPoint(x, y);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// IE sometimes throws and exception, so lets just ignore it\n\t\t\t\t\trng = null;\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t};\n\n\t\t\t// Fires while the selection is changing\n\t\t\tfunction selectionChange(e) {\n\t\t\t\tvar pointRng;\n\n\t\t\t\t// Check if the button is down or not\n\t\t\t\tif (e.button) {\n\t\t\t\t\t// Create range from mouse position\n\t\t\t\t\tpointRng = rngFromPoint(e.x, e.y);\n\n\t\t\t\t\tif (pointRng) {\n\t\t\t\t\t\t// Check if pointRange is before/after selection then change the endPoint\n\t\t\t\t\t\tif (pointRng.compareEndPoints('StartToStart', startRng) > 0)\n\t\t\t\t\t\t\tpointRng.setEndPoint('StartToStart', startRng);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tpointRng.setEndPoint('EndToEnd', startRng);\n\n\t\t\t\t\t\tpointRng.select();\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\tendSelection();\n\t\t\t}\n\n\t\t\t// Removes listeners\n\t\t\tfunction endSelection() {\n\t\t\t\tvar rng = doc.selection.createRange();\n\n\t\t\t\t// If the range is collapsed then use the last start range\n\t\t\t\tif (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0)\n\t\t\t\t\tstartRng.select();\n\n\t\t\t\tdom.unbind(doc, 'mouseup', endSelection);\n\t\t\t\tdom.unbind(doc, 'mousemove', selectionChange);\n\t\t\t\tstartRng = started = 0;\n\t\t\t};\n\n\t\t\t// Detect when user selects outside BODY\n\t\t\tdom.bind(doc, ['mousedown', 'contextmenu'], function(e) {\n\t\t\t\tif (e.target.nodeName === 'HTML') {\n\t\t\t\t\tif (started)\n\t\t\t\t\t\tendSelection();\n\n\t\t\t\t\t// Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML\n\t\t\t\t\thtmlElm = doc.documentElement;\n\t\t\t\t\tif (htmlElm.scrollHeight > htmlElm.clientHeight)\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\tstarted = 1;\n\t\t\t\t\t// Setup start position\n\t\t\t\t\tstartRng = rngFromPoint(e.x, e.y);\n\t\t\t\t\tif (startRng) {\n\t\t\t\t\t\t// Listen for selection change events\n\t\t\t\t\t\tdom.bind(doc, 'mouseup', endSelection);\n\t\t\t\t\t\tdom.bind(doc, 'mousemove', selectionChange);\n\n\t\t\t\t\t\tdom.win.focus();\n\t\t\t\t\t\tstartRng.select();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/dom/Element.js":"/**\n * Element.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t/**\n\t * Element class, this enables element blocking in IE. Element blocking is a method to block out select blockes that\n\t * gets visible though DIVs on IE 6 it uses a iframe for this blocking. This class also shortens the length of some DOM API calls\n\t * since it's bound to an element.\n\t *\n\t * @class tinymce.dom.Element\n\t * @example\n\t * // Creates an basic element for an existing element\n\t * var elm = new tinymce.dom.Element('someid');\n\t * \n\t * elm.setStyle('background-color', 'red');\n\t * elm.moveTo(10, 10);\n\t */\n\n\t/**\n\t * Constructs a new Element instance. Consult the Wiki for more details on this class.\n\t *\n\t * @constructor\n\t * @method Element\n\t * @param {String} id Element ID to bind/execute methods on.\n\t * @param {Object} settings Optional settings name/value collection.\n\t */\n\ttinymce.dom.Element = function(id, settings) {\n\t\tvar t = this, dom, el;\n\n\t\tt.settings = settings = settings || {};\n\t\tt.id = id;\n\t\tt.dom = dom = settings.dom || tinymce.DOM;\n\n\t\t// Only IE leaks DOM references, this is a lot faster\n\t\tif (!tinymce.isIE)\n\t\t\tel = dom.get(t.id);\n\n\t\ttinymce.each(\n\t\t\t\t('getPos,getRect,getParent,add,setStyle,getStyle,setStyles,' + \n\t\t\t\t'setAttrib,setAttribs,getAttrib,addClass,removeClass,' + \n\t\t\t\t'hasClass,getOuterHTML,setOuterHTML,remove,show,hide,' + \n\t\t\t\t'isHidden,setHTML,get').split(/,/)\n\t\t\t, function(k) {\n\t\t\t\tt[k] = function() {\n\t\t\t\t\tvar a = [id], i;\n\n\t\t\t\t\tfor (i = 0; i < arguments.length; i++)\n\t\t\t\t\t\ta.push(arguments[i]);\n\n\t\t\t\t\ta = dom[k].apply(dom, a);\n\t\t\t\t\tt.update(k);\n\n\t\t\t\t\treturn a;\n\t\t\t\t};\n\t\t});\n\n\t\ttinymce.extend(t, {\n\t\t\t/**\n\t\t\t * Adds a event handler to the element.\n\t\t\t *\n\t\t\t * @method on\n\t\t\t * @param {String} n Event name like for example \"click\".\n\t\t\t * @param {function} f Function to execute on the specified event.\n\t\t\t * @param {Object} s Optional scope to execute function on.\n\t\t\t * @return {function} Event handler function the same as the input function.\n\t\t\t */\n\t\t\ton : function(n, f, s) {\n\t\t\t\treturn tinymce.dom.Event.add(t.id, n, f, s);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the absolute X, Y cordinate of the element.\n\t\t\t *\n\t\t\t * @method getXY\n\t\t\t * @return {Object} Objext with x, y cordinate fields.\n\t\t\t */\n\t\t\tgetXY : function() {\n\t\t\t\treturn {\n\t\t\t\t\tx : parseInt(t.getStyle('left')),\n\t\t\t\t\ty : parseInt(t.getStyle('top'))\n\t\t\t\t};\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the size of the element by a object with w and h fields.\n\t\t\t *\n\t\t\t * @method getSize\n\t\t\t * @return {Object} Object with element size with a w and h field.\n\t\t\t */\n\t\t\tgetSize : function() {\n\t\t\t\tvar n = dom.get(t.id);\n\n\t\t\t\treturn {\n\t\t\t\t\tw : parseInt(t.getStyle('width') || n.clientWidth),\n\t\t\t\t\th : parseInt(t.getStyle('height') || n.clientHeight)\n\t\t\t\t};\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Moves the element to a specific absolute position.\n\t\t\t *\n\t\t\t * @method moveTo\n\t\t\t * @param {Number} x X cordinate of element position.\n\t\t\t * @param {Number} y Y cordinate of element position.\n\t\t\t */\n\t\t\tmoveTo : function(x, y) {\n\t\t\t\tt.setStyles({left : x, top : y});\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Moves the element relative to the current position.\n\t\t\t *\n\t\t\t * @method moveBy\n\t\t\t * @param {Number} x Relative X cordinate of element position.\n\t\t\t * @param {Number} y Relative Y cordinate of element position.\n\t\t\t */\n\t\t\tmoveBy : function(x, y) {\n\t\t\t\tvar p = t.getXY();\n\n\t\t\t\tt.moveTo(p.x + x, p.y + y);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Resizes the element to a specific size.\n\t\t\t *\n\t\t\t * @method resizeTo\n\t\t\t * @param {Number} w New width of element.\n\t\t\t * @param {Numner} h New height of element.\n\t\t\t */\n\t\t\tresizeTo : function(w, h) {\n\t\t\t\tt.setStyles({width : w, height : h});\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Resizes the element relative to the current sizeto a specific size.\n\t\t\t *\n\t\t\t * @method resizeBy\n\t\t\t * @param {Number} w Relative width of element.\n\t\t\t * @param {Numner} h Relative height of element.\n\t\t\t */\n\t\t\tresizeBy : function(w, h) {\n\t\t\t\tvar s = t.getSize();\n\n\t\t\t\tt.resizeTo(s.w + w, s.h + h);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Updates the element blocker in IE6 based on the style information of the element.\n\t\t\t *\n\t\t\t * @method update\n\t\t\t * @param {String} k Optional function key. Used internally.\n\t\t\t */\n\t\t\tupdate : function(k) {\n\t\t\t\tvar b;\n\n\t\t\t\tif (tinymce.isIE6 && settings.blocker) {\n\t\t\t\t\tk = k || '';\n\n\t\t\t\t\t// Ignore getters\n\t\t\t\t\tif (k.indexOf('get') === 0 || k.indexOf('has') === 0 || k.indexOf('is') === 0)\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t// Remove blocker on remove\n\t\t\t\t\tif (k == 'remove') {\n\t\t\t\t\t\tdom.remove(t.blocker);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!t.blocker) {\n\t\t\t\t\t\tt.blocker = dom.uniqueId();\n\t\t\t\t\t\tb = dom.add(settings.container || dom.getRoot(), 'iframe', {id : t.blocker, style : 'position:absolute;', frameBorder : 0, src : 'javascript:\"\"'});\n\t\t\t\t\t\tdom.setStyle(b, 'opacity', 0);\n\t\t\t\t\t} else\n\t\t\t\t\t\tb = dom.get(t.blocker);\n\n\t\t\t\t\tdom.setStyles(b, {\n\t\t\t\t\t\tleft : t.getStyle('left', 1),\n\t\t\t\t\t\ttop : t.getStyle('top', 1),\n\t\t\t\t\t\twidth : t.getStyle('width', 1),\n\t\t\t\t\t\theight : t.getStyle('height', 1),\n\t\t\t\t\t\tdisplay : t.getStyle('display', 1),\n\t\t\t\t\t\tzIndex : parseInt(t.getStyle('zIndex', 1) || 0) - 1\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/dom/Sizzle.js":"// #ifndef jquery\n\n/*\n * Sizzle CSS Selector Engine - v1.0\n *  Copyright 2009, The Dojo Foundation\n *  Released under the MIT, BSD, and GPL Licenses.\n *  More information: http://sizzlejs.com/\n */\n(function(){\n\nvar chunker = /((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^\\[\\]]*\\]|['\"][^'\"]*['\"]|[^\\[\\]'\"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g,\n\tdone = 0,\n\ttoString = Object.prototype.toString,\n\thasDuplicate = false,\n\tbaseHasDuplicate = true;\n\n// Here we check if the JavaScript engine is using some sort of\n// optimization where it does not always call our comparision\n// function. If that is the case, discard the hasDuplicate value.\n//   Thus far that includes Google Chrome.\n[0, 0].sort(function(){\n\tbaseHasDuplicate = false;\n\treturn 0;\n});\n\nvar Sizzle = function(selector, context, results, seed) {\n\tresults = results || [];\n\tcontext = context || document;\n\n\tvar origContext = context;\n\n\tif ( context.nodeType !== 1 && context.nodeType !== 9 ) {\n\t\treturn [];\n\t}\n\t\n\tif ( !selector || typeof selector !== \"string\" ) {\n\t\treturn results;\n\t}\n\n\tvar parts = [], m, set, checkSet, extra, prune = true, contextXML = Sizzle.isXML(context),\n\t\tsoFar = selector, ret, cur, pop, i;\n\t\n\t// Reset the position of the chunker regexp (start from head)\n\tdo {\n\t\tchunker.exec(\"\");\n\t\tm = chunker.exec(soFar);\n\n\t\tif ( m ) {\n\t\t\tsoFar = m[3];\n\t\t\n\t\t\tparts.push( m[1] );\n\t\t\n\t\t\tif ( m[2] ) {\n\t\t\t\textra = m[3];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} while ( m );\n\n\tif ( parts.length > 1 && origPOS.exec( selector ) ) {\n\t\tif ( parts.length === 2 && Expr.relative[ parts[0] ] ) {\n\t\t\tset = posProcess( parts[0] + parts[1], context );\n\t\t} else {\n\t\t\tset = Expr.relative[ parts[0] ] ?\n\t\t\t\t[ context ] :\n\t\t\t\tSizzle( parts.shift(), context );\n\n\t\t\twhile ( parts.length ) {\n\t\t\t\tselector = parts.shift();\n\n\t\t\t\tif ( Expr.relative[ selector ] ) {\n\t\t\t\t\tselector += parts.shift();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tset = posProcess( selector, set );\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Take a shortcut and set the context if the root selector is an ID\n\t\t// (but not if it'll be faster if the inner selector is an ID)\n\t\tif ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&\n\t\t\t\tExpr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {\n\t\t\tret = Sizzle.find( parts.shift(), context, contextXML );\n\t\t\tcontext = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0];\n\t\t}\n\n\t\tif ( context ) {\n\t\t\tret = seed ?\n\t\t\t\t{ expr: parts.pop(), set: makeArray(seed) } :\n\t\t\t\tSizzle.find( parts.pop(), parts.length === 1 && (parts[0] === \"~\" || parts[0] === \"+\") && context.parentNode ? context.parentNode : context, contextXML );\n\t\t\tset = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set;\n\n\t\t\tif ( parts.length > 0 ) {\n\t\t\t\tcheckSet = makeArray(set);\n\t\t\t} else {\n\t\t\t\tprune = false;\n\t\t\t}\n\n\t\t\twhile ( parts.length ) {\n\t\t\t\tcur = parts.pop();\n\t\t\t\tpop = cur;\n\n\t\t\t\tif ( !Expr.relative[ cur ] ) {\n\t\t\t\t\tcur = \"\";\n\t\t\t\t} else {\n\t\t\t\t\tpop = parts.pop();\n\t\t\t\t}\n\n\t\t\t\tif ( pop == null ) {\n\t\t\t\t\tpop = context;\n\t\t\t\t}\n\n\t\t\t\tExpr.relative[ cur ]( checkSet, pop, contextXML );\n\t\t\t}\n\t\t} else {\n\t\t\tcheckSet = parts = [];\n\t\t}\n\t}\n\n\tif ( !checkSet ) {\n\t\tcheckSet = set;\n\t}\n\n\tif ( !checkSet ) {\n\t\tSizzle.error( cur || selector );\n\t}\n\n\tif ( toString.call(checkSet) === \"[object Array]\" ) {\n\t\tif ( !prune ) {\n\t\t\tresults.push.apply( results, checkSet );\n\t\t} else if ( context && context.nodeType === 1 ) {\n\t\t\tfor ( i = 0; checkSet[i] != null; i++ ) {\n\t\t\t\tif ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {\n\t\t\t\t\tresults.push( set[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; checkSet[i] != null; i++ ) {\n\t\t\t\tif ( checkSet[i] && checkSet[i].nodeType === 1 ) {\n\t\t\t\t\tresults.push( set[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tmakeArray( checkSet, results );\n\t}\n\n\tif ( extra ) {\n\t\tSizzle( extra, origContext, results, seed );\n\t\tSizzle.uniqueSort( results );\n\t}\n\n\treturn results;\n};\n\nSizzle.uniqueSort = function(results){\n\tif ( sortOrder ) {\n\t\thasDuplicate = baseHasDuplicate;\n\t\tresults.sort(sortOrder);\n\n\t\tif ( hasDuplicate ) {\n\t\t\tfor ( var i = 1; i < results.length; i++ ) {\n\t\t\t\tif ( results[i] === results[i-1] ) {\n\t\t\t\t\tresults.splice(i--, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn results;\n};\n\nSizzle.matches = function(expr, set){\n\treturn Sizzle(expr, null, null, set);\n};\n\nSizzle.find = function(expr, context, isXML){\n\tvar set;\n\n\tif ( !expr ) {\n\t\treturn [];\n\t}\n\n\tfor ( var i = 0, l = Expr.order.length; i < l; i++ ) {\n\t\tvar type = Expr.order[i], match;\n\t\t\n\t\tif ( (match = Expr.leftMatch[ type ].exec( expr )) ) {\n\t\t\tvar left = match[1];\n\t\t\tmatch.splice(1,1);\n\n\t\t\tif ( left.substr( left.length - 1 ) !== \"\\\\\" ) {\n\t\t\t\tmatch[1] = (match[1] || \"\").replace(/\\\\/g, \"\");\n\t\t\t\tset = Expr.find[ type ]( match, context, isXML );\n\t\t\t\tif ( set != null ) {\n\t\t\t\t\texpr = expr.replace( Expr.match[ type ], \"\" );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( !set ) {\n\t\tset = context.getElementsByTagName(\"*\");\n\t}\n\n\treturn {set: set, expr: expr};\n};\n\nSizzle.filter = function(expr, set, inplace, not){\n\tvar old = expr, result = [], curLoop = set, match, anyFound,\n\t\tisXMLFilter = set && set[0] && Sizzle.isXML(set[0]);\n\n\twhile ( expr && set.length ) {\n\t\tfor ( var type in Expr.filter ) {\n\t\t\tif ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {\n\t\t\t\tvar filter = Expr.filter[ type ], found, item, left = match[1];\n\t\t\t\tanyFound = false;\n\n\t\t\t\tmatch.splice(1,1);\n\n\t\t\t\tif ( left.substr( left.length - 1 ) === \"\\\\\" ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( curLoop === result ) {\n\t\t\t\t\tresult = [];\n\t\t\t\t}\n\n\t\t\t\tif ( Expr.preFilter[ type ] ) {\n\t\t\t\t\tmatch = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );\n\n\t\t\t\t\tif ( !match ) {\n\t\t\t\t\t\tanyFound = found = true;\n\t\t\t\t\t} else if ( match === true ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( match ) {\n\t\t\t\t\tfor ( var i = 0; (item = curLoop[i]) != null; i++ ) {\n\t\t\t\t\t\tif ( item ) {\n\t\t\t\t\t\t\tfound = filter( item, match, i, curLoop );\n\t\t\t\t\t\t\tvar pass = not ^ !!found;\n\n\t\t\t\t\t\t\tif ( inplace && found != null ) {\n\t\t\t\t\t\t\t\tif ( pass ) {\n\t\t\t\t\t\t\t\t\tanyFound = true;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcurLoop[i] = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( pass ) {\n\t\t\t\t\t\t\t\tresult.push( item );\n\t\t\t\t\t\t\t\tanyFound = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( found !== undefined ) {\n\t\t\t\t\tif ( !inplace ) {\n\t\t\t\t\t\tcurLoop = result;\n\t\t\t\t\t}\n\n\t\t\t\t\texpr = expr.replace( Expr.match[ type ], \"\" );\n\n\t\t\t\t\tif ( !anyFound ) {\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Improper expression\n\t\tif ( expr === old ) {\n\t\t\tif ( anyFound == null ) {\n\t\t\t\tSizzle.error( expr );\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\told = expr;\n\t}\n\n\treturn curLoop;\n};\n\nSizzle.error = function( msg ) {\n\tthrow \"Syntax error, unrecognized expression: \" + msg;\n};\n\nvar Expr = Sizzle.selectors = {\n\torder: [ \"ID\", \"NAME\", \"TAG\" ],\n\tmatch: {\n\t\tID: /#((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/,\n\t\tCLASS: /\\.((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/,\n\t\tNAME: /\\[name=['\"]*((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)['\"]*\\]/,\n\t\tATTR: /\\[\\s*((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)\\s*(?:(\\S?=)\\s*(['\"]*)(.*?)\\3|)\\s*\\]/,\n\t\tTAG: /^((?:[\\w\\u00c0-\\uFFFF\\*\\-]|\\\\.)+)/,\n\t\tCHILD: /:(only|nth|last|first)-child(?:\\((even|odd|[\\dn+\\-]*)\\))?/,\n\t\tPOS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\))?(?=[^\\-]|$)/,\n\t\tPSEUDO: /:((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)(?:\\((['\"]?)((?:\\([^\\)]+\\)|[^\\(\\)]*)+)\\2\\))?/\n\t},\n\tleftMatch: {},\n\tattrMap: {\n\t\t\"class\": \"className\",\n\t\t\"for\": \"htmlFor\"\n\t},\n\tattrHandle: {\n\t\thref: function(elem){\n\t\t\treturn elem.getAttribute(\"href\");\n\t\t}\n\t},\n\trelative: {\n\t\t\"+\": function(checkSet, part){\n\t\t\tvar isPartStr = typeof part === \"string\",\n\t\t\t\tisTag = isPartStr && !/\\W/.test(part),\n\t\t\t\tisPartStrNotTag = isPartStr && !isTag;\n\n\t\t\tif ( isTag ) {\n\t\t\t\tpart = part.toLowerCase();\n\t\t\t}\n\n\t\t\tfor ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {\n\t\t\t\tif ( (elem = checkSet[i]) ) {\n\t\t\t\t\twhile ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}\n\n\t\t\t\t\tcheckSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?\n\t\t\t\t\t\telem || false :\n\t\t\t\t\t\telem === part;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isPartStrNotTag ) {\n\t\t\t\tSizzle.filter( part, checkSet, true );\n\t\t\t}\n\t\t},\n\t\t\">\": function(checkSet, part){\n\t\t\tvar isPartStr = typeof part === \"string\",\n\t\t\t\telem, i = 0, l = checkSet.length;\n\n\t\t\tif ( isPartStr && !/\\W/.test(part) ) {\n\t\t\t\tpart = part.toLowerCase();\n\n\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\telem = checkSet[i];\n\t\t\t\t\tif ( elem ) {\n\t\t\t\t\t\tvar parent = elem.parentNode;\n\t\t\t\t\t\tcheckSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\telem = checkSet[i];\n\t\t\t\t\tif ( elem ) {\n\t\t\t\t\t\tcheckSet[i] = isPartStr ?\n\t\t\t\t\t\t\telem.parentNode :\n\t\t\t\t\t\t\telem.parentNode === part;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( isPartStr ) {\n\t\t\t\t\tSizzle.filter( part, checkSet, true );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"\": function(checkSet, part, isXML){\n\t\t\tvar doneName = done++, checkFn = dirCheck, nodeCheck;\n\n\t\t\tif ( typeof part === \"string\" && !/\\W/.test(part) ) {\n\t\t\t\tpart = part.toLowerCase();\n\t\t\t\tnodeCheck = part;\n\t\t\t\tcheckFn = dirNodeCheck;\n\t\t\t}\n\n\t\t\tcheckFn(\"parentNode\", part, doneName, checkSet, nodeCheck, isXML);\n\t\t},\n\t\t\"~\": function(checkSet, part, isXML){\n\t\t\tvar doneName = done++, checkFn = dirCheck, nodeCheck;\n\n\t\t\tif ( typeof part === \"string\" && !/\\W/.test(part) ) {\n\t\t\t\tpart = part.toLowerCase();\n\t\t\t\tnodeCheck = part;\n\t\t\t\tcheckFn = dirNodeCheck;\n\t\t\t}\n\n\t\t\tcheckFn(\"previousSibling\", part, doneName, checkSet, nodeCheck, isXML);\n\t\t}\n\t},\n\tfind: {\n\t\tID: function(match, context, isXML){\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && !isXML ) {\n\t\t\t\tvar m = context.getElementById(match[1]);\n\t\t\t\treturn m ? [m] : [];\n\t\t\t}\n\t\t},\n\t\tNAME: function(match, context){\n\t\t\tif ( typeof context.getElementsByName !== \"undefined\" ) {\n\t\t\t\tvar ret = [], results = context.getElementsByName(match[1]);\n\n\t\t\t\tfor ( var i = 0, l = results.length; i < l; i++ ) {\n\t\t\t\t\tif ( results[i].getAttribute(\"name\") === match[1] ) {\n\t\t\t\t\t\tret.push( results[i] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn ret.length === 0 ? null : ret;\n\t\t\t}\n\t\t},\n\t\tTAG: function(match, context){\n\t\t\treturn context.getElementsByTagName(match[1]);\n\t\t}\n\t},\n\tpreFilter: {\n\t\tCLASS: function(match, curLoop, inplace, result, not, isXML){\n\t\t\tmatch = \" \" + match[1].replace(/\\\\/g, \"\") + \" \";\n\n\t\t\tif ( isXML ) {\n\t\t\t\treturn match;\n\t\t\t}\n\n\t\t\tfor ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {\n\t\t\t\tif ( elem ) {\n\t\t\t\t\tif ( not ^ (elem.className && (\" \" + elem.className + \" \").replace(/[\\t\\n]/g, \" \").indexOf(match) >= 0) ) {\n\t\t\t\t\t\tif ( !inplace ) {\n\t\t\t\t\t\t\tresult.push( elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( inplace ) {\n\t\t\t\t\t\tcurLoop[i] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\t\tID: function(match){\n\t\t\treturn match[1].replace(/\\\\/g, \"\");\n\t\t},\n\t\tTAG: function(match, curLoop){\n\t\t\treturn match[1].toLowerCase();\n\t\t},\n\t\tCHILD: function(match){\n\t\t\tif ( match[1] === \"nth\" ) {\n\t\t\t\t// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'\n\t\t\t\tvar test = /(-?)(\\d*)n((?:\\+|-)?\\d*)/.exec(\n\t\t\t\t\tmatch[2] === \"even\" && \"2n\" || match[2] === \"odd\" && \"2n+1\" ||\n\t\t\t\t\t!/\\D/.test( match[2] ) && \"0n+\" + match[2] || match[2]);\n\n\t\t\t\t// calculate the numbers (first)n+(last) including if they are negative\n\t\t\t\tmatch[2] = (test[1] + (test[2] || 1)) - 0;\n\t\t\t\tmatch[3] = test[3] - 0;\n\t\t\t}\n\n\t\t\t// TODO: Move to normal caching system\n\t\t\tmatch[0] = done++;\n\n\t\t\treturn match;\n\t\t},\n\t\tATTR: function(match, curLoop, inplace, result, not, isXML){\n\t\t\tvar name = match[1].replace(/\\\\/g, \"\");\n\t\t\t\n\t\t\tif ( !isXML && Expr.attrMap[name] ) {\n\t\t\t\tmatch[1] = Expr.attrMap[name];\n\t\t\t}\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[4] = \" \" + match[4] + \" \";\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\t\tPSEUDO: function(match, curLoop, inplace, result, not){\n\t\t\tif ( match[1] === \"not\" ) {\n\t\t\t\t// If we're dealing with a complex expression, or a simple one\n\t\t\t\tif ( ( chunker.exec(match[3]) || \"\" ).length > 1 || /^\\w/.test(match[3]) ) {\n\t\t\t\t\tmatch[3] = Sizzle(match[3], null, null, curLoop);\n\t\t\t\t} else {\n\t\t\t\t\tvar ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);\n\t\t\t\t\tif ( !inplace ) {\n\t\t\t\t\t\tresult.push.apply( result, ret );\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn match;\n\t\t},\n\t\tPOS: function(match){\n\t\t\tmatch.unshift( true );\n\t\t\treturn match;\n\t\t}\n\t},\n\tfilters: {\n\t\tenabled: function(elem){\n\t\t\treturn elem.disabled === false && elem.type !== \"hidden\";\n\t\t},\n\t\tdisabled: function(elem){\n\t\t\treturn elem.disabled === true;\n\t\t},\n\t\tchecked: function(elem){\n\t\t\treturn elem.checked === true;\n\t\t},\n\t\tselected: function(elem){\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\telem.parentNode.selectedIndex;\n\t\t\treturn elem.selected === true;\n\t\t},\n\t\tparent: function(elem){\n\t\t\treturn !!elem.firstChild;\n\t\t},\n\t\tempty: function(elem){\n\t\t\treturn !elem.firstChild;\n\t\t},\n\t\thas: function(elem, i, match){\n\t\t\treturn !!Sizzle( match[3], elem ).length;\n\t\t},\n\t\theader: function(elem){\n\t\t\treturn (/h\\d/i).test( elem.nodeName );\n\t\t},\n\t\ttext: function(elem){\n\t\t\treturn \"text\" === elem.type;\n\t\t},\n\t\tradio: function(elem){\n\t\t\treturn \"radio\" === elem.type;\n\t\t},\n\t\tcheckbox: function(elem){\n\t\t\treturn \"checkbox\" === elem.type;\n\t\t},\n\t\tfile: function(elem){\n\t\t\treturn \"file\" === elem.type;\n\t\t},\n\t\tpassword: function(elem){\n\t\t\treturn \"password\" === elem.type;\n\t\t},\n\t\tsubmit: function(elem){\n\t\t\treturn \"submit\" === elem.type;\n\t\t},\n\t\timage: function(elem){\n\t\t\treturn \"image\" === elem.type;\n\t\t},\n\t\treset: function(elem){\n\t\t\treturn \"reset\" === elem.type;\n\t\t},\n\t\tbutton: function(elem){\n\t\t\treturn \"button\" === elem.type || elem.nodeName.toLowerCase() === \"button\";\n\t\t},\n\t\tinput: function(elem){\n\t\t\treturn (/input|select|textarea|button/i).test(elem.nodeName);\n\t\t}\n\t},\n\tsetFilters: {\n\t\tfirst: function(elem, i){\n\t\t\treturn i === 0;\n\t\t},\n\t\tlast: function(elem, i, match, array){\n\t\t\treturn i === array.length - 1;\n\t\t},\n\t\teven: function(elem, i){\n\t\t\treturn i % 2 === 0;\n\t\t},\n\t\todd: function(elem, i){\n\t\t\treturn i % 2 === 1;\n\t\t},\n\t\tlt: function(elem, i, match){\n\t\t\treturn i < match[3] - 0;\n\t\t},\n\t\tgt: function(elem, i, match){\n\t\t\treturn i > match[3] - 0;\n\t\t},\n\t\tnth: function(elem, i, match){\n\t\t\treturn match[3] - 0 === i;\n\t\t},\n\t\teq: function(elem, i, match){\n\t\t\treturn match[3] - 0 === i;\n\t\t}\n\t},\n\tfilter: {\n\t\tPSEUDO: function(elem, match, i, array){\n\t\t\tvar name = match[1], filter = Expr.filters[ name ];\n\n\t\t\tif ( filter ) {\n\t\t\t\treturn filter( elem, i, match, array );\n\t\t\t} else if ( name === \"contains\" ) {\n\t\t\t\treturn (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || \"\").indexOf(match[3]) >= 0;\n\t\t\t} else if ( name === \"not\" ) {\n\t\t\t\tvar not = match[3];\n\n\t\t\t\tfor ( var j = 0, l = not.length; j < l; j++ ) {\n\t\t\t\t\tif ( not[j] === elem ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tSizzle.error( \"Syntax error, unrecognized expression: \" + name );\n\t\t\t}\n\t\t},\n\t\tCHILD: function(elem, match){\n\t\t\tvar type = match[1], node = elem;\n\t\t\tswitch (type) {\n\t\t\t\tcase 'only':\n\t\t\t\tcase 'first':\n\t\t\t\t\twhile ( (node = node.previousSibling) )\t {\n\t\t\t\t\t\tif ( node.nodeType === 1 ) { \n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( type === \"first\" ) { \n\t\t\t\t\t\treturn true; \n\t\t\t\t\t}\n\t\t\t\t\tnode = elem;\n\t\t\t\tcase 'last':\n\t\t\t\t\twhile ( (node = node.nextSibling) )\t {\n\t\t\t\t\t\tif ( node.nodeType === 1 ) { \n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\tcase 'nth':\n\t\t\t\t\tvar first = match[2], last = match[3];\n\n\t\t\t\t\tif ( first === 1 && last === 0 ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar doneName = match[0],\n\t\t\t\t\t\tparent = elem.parentNode;\n\t\n\t\t\t\t\tif ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {\n\t\t\t\t\t\tvar count = 0;\n\t\t\t\t\t\tfor ( node = parent.firstChild; node; node = node.nextSibling ) {\n\t\t\t\t\t\t\tif ( node.nodeType === 1 ) {\n\t\t\t\t\t\t\t\tnode.nodeIndex = ++count;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} \n\t\t\t\t\t\tparent.sizcache = doneName;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar diff = elem.nodeIndex - last;\n\t\t\t\t\tif ( first === 0 ) {\n\t\t\t\t\t\treturn diff === 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tID: function(elem, match){\n\t\t\treturn elem.nodeType === 1 && elem.getAttribute(\"id\") === match;\n\t\t},\n\t\tTAG: function(elem, match){\n\t\t\treturn (match === \"*\" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;\n\t\t},\n\t\tCLASS: function(elem, match){\n\t\t\treturn (\" \" + (elem.className || elem.getAttribute(\"class\")) + \" \")\n\t\t\t\t.indexOf( match ) > -1;\n\t\t},\n\t\tATTR: function(elem, match){\n\t\t\tvar name = match[1],\n\t\t\t\tresult = Expr.attrHandle[ name ] ?\n\t\t\t\t\tExpr.attrHandle[ name ]( elem ) :\n\t\t\t\t\telem[ name ] != null ?\n\t\t\t\t\t\telem[ name ] :\n\t\t\t\t\t\telem.getAttribute( name ),\n\t\t\t\tvalue = result + \"\",\n\t\t\t\ttype = match[2],\n\t\t\t\tcheck = match[4];\n\n\t\t\treturn result == null ?\n\t\t\t\ttype === \"!=\" :\n\t\t\t\ttype === \"=\" ?\n\t\t\t\tvalue === check :\n\t\t\t\ttype === \"*=\" ?\n\t\t\t\tvalue.indexOf(check) >= 0 :\n\t\t\t\ttype === \"~=\" ?\n\t\t\t\t(\" \" + value + \" \").indexOf(check) >= 0 :\n\t\t\t\t!check ?\n\t\t\t\tvalue && result !== false :\n\t\t\t\ttype === \"!=\" ?\n\t\t\t\tvalue !== check :\n\t\t\t\ttype === \"^=\" ?\n\t\t\t\tvalue.indexOf(check) === 0 :\n\t\t\t\ttype === \"$=\" ?\n\t\t\t\tvalue.substr(value.length - check.length) === check :\n\t\t\t\ttype === \"|=\" ?\n\t\t\t\tvalue === check || value.substr(0, check.length + 1) === check + \"-\" :\n\t\t\t\tfalse;\n\t\t},\n\t\tPOS: function(elem, match, i, array){\n\t\t\tvar name = match[2], filter = Expr.setFilters[ name ];\n\n\t\t\tif ( filter ) {\n\t\t\t\treturn filter( elem, i, match, array );\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar origPOS = Expr.match.POS,\n\tfescape = function(all, num){\n\t\treturn \"\\\\\" + (num - 0 + 1);\n\t};\n\nfor ( var type in Expr.match ) {\n\tExpr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\\[]*\\])(?![^\\(]*\\))/.source) );\n\tExpr.leftMatch[ type ] = new RegExp( /(^(?:.|\\r|\\n)*?)/.source + Expr.match[ type ].source.replace(/\\\\(\\d+)/g, fescape) );\n}\n\nvar makeArray = function(array, results) {\n\tarray = Array.prototype.slice.call( array, 0 );\n\n\tif ( results ) {\n\t\tresults.push.apply( results, array );\n\t\treturn results;\n\t}\n\t\n\treturn array;\n};\n\n// Perform a simple check to determine if the browser is capable of\n// converting a NodeList to an array using builtin methods.\n// Also verifies that the returned array holds DOM nodes\n// (which is not the case in the Blackberry browser)\ntry {\n\tArray.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;\n\n// Provide a fallback method if it does not work\n} catch(e){\n\tmakeArray = function(array, results) {\n\t\tvar ret = results || [], i = 0;\n\n\t\tif ( toString.call(array) === \"[object Array]\" ) {\n\t\t\tArray.prototype.push.apply( ret, array );\n\t\t} else {\n\t\t\tif ( typeof array.length === \"number\" ) {\n\t\t\t\tfor ( var l = array.length; i < l; i++ ) {\n\t\t\t\t\tret.push( array[i] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( ; array[i]; i++ ) {\n\t\t\t\t\tret.push( array[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t};\n}\n\nvar sortOrder;\n\nif ( document.documentElement.compareDocumentPosition ) {\n\tsortOrder = function( a, b ) {\n\t\tif ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {\n\t\t\tif ( a == b ) {\n\t\t\t\thasDuplicate = true;\n\t\t\t}\n\t\t\treturn a.compareDocumentPosition ? -1 : 1;\n\t\t}\n\n\t\tvar ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;\n\t\tif ( ret === 0 ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn ret;\n\t};\n} else if ( \"sourceIndex\" in document.documentElement ) {\n\tsortOrder = function( a, b ) {\n\t\tif ( !a.sourceIndex || !b.sourceIndex ) {\n\t\t\tif ( a == b ) {\n\t\t\t\thasDuplicate = true;\n\t\t\t}\n\t\t\treturn a.sourceIndex ? -1 : 1;\n\t\t}\n\n\t\tvar ret = a.sourceIndex - b.sourceIndex;\n\t\tif ( ret === 0 ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn ret;\n\t};\n} else if ( document.createRange ) {\n\tsortOrder = function( a, b ) {\n\t\tif ( !a.ownerDocument || !b.ownerDocument ) {\n\t\t\tif ( a == b ) {\n\t\t\t\thasDuplicate = true;\n\t\t\t}\n\t\t\treturn a.ownerDocument ? -1 : 1;\n\t\t}\n\n\t\tvar aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();\n\t\taRange.setStart(a, 0);\n\t\taRange.setEnd(a, 0);\n\t\tbRange.setStart(b, 0);\n\t\tbRange.setEnd(b, 0);\n\t\tvar ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);\n\t\tif ( ret === 0 ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn ret;\n\t};\n}\n\n// Utility function for retreiving the text value of an array of DOM nodes\nSizzle.getText = function( elems ) {\n\tvar ret = \"\", elem;\n\n\tfor ( var i = 0; elems[i]; i++ ) {\n\t\telem = elems[i];\n\n\t\t// Get the text from text nodes and CDATA nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 4 ) {\n\t\t\tret += elem.nodeValue;\n\n\t\t// Traverse everything else, except comment nodes\n\t\t} else if ( elem.nodeType !== 8 ) {\n\t\t\tret += Sizzle.getText( elem.childNodes );\n\t\t}\n\t}\n\n\treturn ret;\n};\n\n// Check to see if the browser returns elements by name when\n// querying by getElementById (and provide a workaround)\n(function(){\n\t// We're going to inject a fake input element with a specified name\n\tvar form = document.createElement(\"div\"),\n\t\tid = \"script\" + (new Date()).getTime();\n\tform.innerHTML = \"<a name='\" + id + \"'/>\";\n\n\t// Inject it into the root element, check its status, and remove it quickly\n\tvar root = document.documentElement;\n\troot.insertBefore( form, root.firstChild );\n\n\t// The workaround has to do additional checks after a getElementById\n\t// Which slows things down for other browsers (hence the branching)\n\tif ( document.getElementById( id ) ) {\n\t\tExpr.find.ID = function(match, context, isXML){\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && !isXML ) {\n\t\t\t\tvar m = context.getElementById(match[1]);\n\t\t\t\treturn m ? m.id === match[1] || typeof m.getAttributeNode !== \"undefined\" && m.getAttributeNode(\"id\").nodeValue === match[1] ? [m] : undefined : [];\n\t\t\t}\n\t\t};\n\n\t\tExpr.filter.ID = function(elem, match){\n\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" && elem.getAttributeNode(\"id\");\n\t\t\treturn elem.nodeType === 1 && node && node.nodeValue === match;\n\t\t};\n\t}\n\n\troot.removeChild( form );\n\troot = form = null; // release memory in IE\n})();\n\n(function(){\n\t// Check to see if the browser returns only elements\n\t// when doing getElementsByTagName(\"*\")\n\n\t// Create a fake element\n\tvar div = document.createElement(\"div\");\n\tdiv.appendChild( document.createComment(\"\") );\n\n\t// Make sure no comments are found\n\tif ( div.getElementsByTagName(\"*\").length > 0 ) {\n\t\tExpr.find.TAG = function(match, context){\n\t\t\tvar results = context.getElementsByTagName(match[1]);\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( match[1] === \"*\" ) {\n\t\t\t\tvar tmp = [];\n\n\t\t\t\tfor ( var i = 0; results[i]; i++ ) {\n\t\t\t\t\tif ( results[i].nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( results[i] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tresults = tmp;\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t}\n\n\t// Check to see if an attribute returns normalized href attributes\n\tdiv.innerHTML = \"<a href='#'></a>\";\n\tif ( div.firstChild && typeof div.firstChild.getAttribute !== \"undefined\" &&\n\t\t\tdiv.firstChild.getAttribute(\"href\") !== \"#\" ) {\n\t\tExpr.attrHandle.href = function(elem){\n\t\t\treturn elem.getAttribute(\"href\", 2);\n\t\t};\n\t}\n\n\tdiv = null; // release memory in IE\n})();\n\nif ( document.querySelectorAll ) {\n\t(function(){\n\t\tvar oldSizzle = Sizzle, div = document.createElement(\"div\");\n\t\tdiv.innerHTML = \"<p class='TEST'></p>\";\n\n\t\t// Safari can't handle uppercase or unicode characters when\n\t\t// in quirks mode.\n\t\tif ( div.querySelectorAll && div.querySelectorAll(\".TEST\").length === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\tSizzle = function(query, context, extra, seed){\n\t\t\tcontext = context || document;\n\n\t\t\t// Only use querySelectorAll on non-XML documents\n\t\t\t// (ID selectors don't work in non-HTML documents)\n\t\t\tif ( !seed && context.nodeType === 9 && !Sizzle.isXML(context) ) {\n\t\t\t\ttry {\n\t\t\t\t\treturn makeArray( context.querySelectorAll(query), extra );\n\t\t\t\t} catch(e){}\n\t\t\t}\n\t\t\n\t\t\treturn oldSizzle(query, context, extra, seed);\n\t\t};\n\n\t\tfor ( var prop in oldSizzle ) {\n\t\t\tSizzle[ prop ] = oldSizzle[ prop ];\n\t\t}\n\n\t\tdiv = null; // release memory in IE\n\t})();\n}\n\n(function(){\n\tvar div = document.createElement(\"div\");\n\n\tdiv.innerHTML = \"<div class='test e'></div><div class='test'></div>\";\n\n\t// Opera can't find a second classname (in 9.6)\n\t// Also, make sure that getElementsByClassName actually exists\n\tif ( !div.getElementsByClassName || div.getElementsByClassName(\"e\").length === 0 ) {\n\t\treturn;\n\t}\n\n\t// Safari caches class attributes, doesn't catch changes (in 3.2)\n\tdiv.lastChild.className = \"e\";\n\n\tif ( div.getElementsByClassName(\"e\").length === 1 ) {\n\t\treturn;\n\t}\n\t\n\tExpr.order.splice(1, 0, \"CLASS\");\n\tExpr.find.CLASS = function(match, context, isXML) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && !isXML ) {\n\t\t\treturn context.getElementsByClassName(match[1]);\n\t\t}\n\t};\n\n\tdiv = null; // release memory in IE\n})();\n\nfunction dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {\n\tfor ( var i = 0, l = checkSet.length; i < l; i++ ) {\n\t\tvar elem = checkSet[i];\n\t\tif ( elem ) {\n\t\t\telem = elem[dir];\n\t\t\tvar match = false;\n\n\t\t\twhile ( elem ) {\n\t\t\t\tif ( elem.sizcache === doneName ) {\n\t\t\t\t\tmatch = checkSet[elem.sizset];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( elem.nodeType === 1 && !isXML ){\n\t\t\t\t\telem.sizcache = doneName;\n\t\t\t\t\telem.sizset = i;\n\t\t\t\t}\n\n\t\t\t\tif ( elem.nodeName.toLowerCase() === cur ) {\n\t\t\t\t\tmatch = elem;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\telem = elem[dir];\n\t\t\t}\n\n\t\t\tcheckSet[i] = match;\n\t\t}\n\t}\n}\n\nfunction dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {\n\tfor ( var i = 0, l = checkSet.length; i < l; i++ ) {\n\t\tvar elem = checkSet[i];\n\t\tif ( elem ) {\n\t\t\telem = elem[dir];\n\t\t\tvar match = false;\n\n\t\t\twhile ( elem ) {\n\t\t\t\tif ( elem.sizcache === doneName ) {\n\t\t\t\t\tmatch = checkSet[elem.sizset];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\tif ( !isXML ) {\n\t\t\t\t\t\telem.sizcache = doneName;\n\t\t\t\t\t\telem.sizset = i;\n\t\t\t\t\t}\n\t\t\t\t\tif ( typeof cur !== \"string\" ) {\n\t\t\t\t\t\tif ( elem === cur ) {\n\t\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {\n\t\t\t\t\t\tmatch = elem;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telem = elem[dir];\n\t\t\t}\n\n\t\t\tcheckSet[i] = match;\n\t\t}\n\t}\n}\n\nSizzle.contains = document.compareDocumentPosition ? function(a, b){\n\treturn !!(a.compareDocumentPosition(b) & 16);\n} : function(a, b){\n\treturn a !== b && (a.contains ? a.contains(b) : true);\n};\n\nSizzle.isXML = function(elem){\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833) \n\tvar documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\nvar posProcess = function(selector, context){\n\tvar tmpSet = [], later = \"\", match,\n\t\troot = context.nodeType ? [context] : context;\n\n\t// Position selectors must be done after the filter\n\t// And so must :not(positional) so we move all PSEUDOs to the end\n\twhile ( (match = Expr.match.PSEUDO.exec( selector )) ) {\n\t\tlater += match[0];\n\t\tselector = selector.replace( Expr.match.PSEUDO, \"\" );\n\t}\n\n\tselector = Expr.relative[selector] ? selector + \"*\" : selector;\n\n\tfor ( var i = 0, l = root.length; i < l; i++ ) {\n\t\tSizzle( selector, root[i], tmpSet );\n\t}\n\n\treturn Sizzle.filter( later, tmpSet );\n};\n\n// EXPOSE\n\nwindow.tinymce.dom.Sizzle = Sizzle;\n\n})();\n\n// #endif\n","Magento_Tinymce3/tiny_mce/classes/dom/EventUtils.js":"/**\n * EventUtils.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t// Shorten names\n\tvar each = tinymce.each, DOM = tinymce.DOM, isIE = tinymce.isIE, isWebKit = tinymce.isWebKit, Event;\n\n\t/**\n\t * This class handles DOM events in a cross platform fasion it also keeps track of element\n\t * and handler references to be able to clean elements to reduce IE memory leaks.\n\t *\n\t * @class tinymce.dom.EventUtils\n\t */\n\ttinymce.create('tinymce.dom.EventUtils', {\n\t\t/**\n\t\t * Constructs a new EventUtils instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method EventUtils\n\t\t */\n\t\tEventUtils : function() {\n\t\t\tthis.inits = [];\n\t\t\tthis.events = [];\n\t\t},\n\n\t\t/**\n\t\t * Adds an event handler to the specified object.\n\t\t *\n\t\t * @method add\n\t\t * @param {Element/Document/Window/Array/String} o Object or element id string to add event handler to or an array of elements/ids/documents.\n\t\t * @param {String/Array} n Name of event handler to add for example: click.\n\t\t * @param {function} f Function to execute when the event occurs.\n\t\t * @param {Object} s Optional scope to execute the function in.\n\t\t * @return {function} Function callback handler the same as the one passed in.\n\t\t * @example\n\t\t * // Adds a click handler to the current document\n\t\t * tinymce.dom.Event.add(document, 'click', function(e) {\n\t\t *    console.debug(e.target);\n\t\t * });\n\t\t */\n\t\tadd : function(o, n, f, s) {\n\t\t\tvar cb, t = this, el = t.events, r;\n\n\t\t\tif (n instanceof Array) {\n\t\t\t\tr = [];\n\n\t\t\t\teach(n, function(n) {\n\t\t\t\t\tr.push(t.add(o, n, f, s));\n\t\t\t\t});\n\n\t\t\t\treturn r;\n\t\t\t}\n\n\t\t\t// Handle array\n\t\t\tif (o && o.hasOwnProperty && o instanceof Array) {\n\t\t\t\tr = [];\n\n\t\t\t\teach(o, function(o) {\n\t\t\t\t\to = DOM.get(o);\n\t\t\t\t\tr.push(t.add(o, n, f, s));\n\t\t\t\t});\n\n\t\t\t\treturn r;\n\t\t\t}\n\n\t\t\to = DOM.get(o);\n\n\t\t\tif (!o)\n\t\t\t\treturn;\n\n\t\t\t// Setup event callback\n\t\t\tcb = function(e) {\n\t\t\t\t// Is all events disabled\n\t\t\t\tif (t.disabled)\n\t\t\t\t\treturn;\n\n\t\t\t\te = e || window.event;\n\n\t\t\t\t// Patch in target, preventDefault and stopPropagation in IE it's W3C valid\n\t\t\t\tif (e && isIE) {\n\t\t\t\t\tif (!e.target)\n\t\t\t\t\t\te.target = e.srcElement;\n\n\t\t\t\t\t// Patch in preventDefault, stopPropagation methods for W3C compatibility\n\t\t\t\t\ttinymce.extend(e, t._stoppers);\n\t\t\t\t}\n\n\t\t\t\tif (!s)\n\t\t\t\t\treturn f(e);\n\n\t\t\t\treturn f.call(s, e);\n\t\t\t};\n\n\t\t\tif (n == 'unload') {\n\t\t\t\ttinymce.unloads.unshift({func : cb});\n\t\t\t\treturn cb;\n\t\t\t}\n\n\t\t\tif (n == 'init') {\n\t\t\t\tif (t.domLoaded)\n\t\t\t\t\tcb();\n\t\t\t\telse\n\t\t\t\t\tt.inits.push(cb);\n\n\t\t\t\treturn cb;\n\t\t\t}\n\n\t\t\t// Store away listener reference\n\t\t\tel.push({\n\t\t\t\tobj : o,\n\t\t\t\tname : n,\n\t\t\t\tfunc : f,\n\t\t\t\tcfunc : cb,\n\t\t\t\tscope : s\n\t\t\t});\n\n\t\t\tt._add(o, n, cb);\n\n\t\t\treturn f;\n\t\t},\n\n\t\t/**\n\t\t * Removes the specified event handler by name and function from a element or collection of elements.\n\t\t *\n\t\t * @method remove\n\t\t * @param {String/Element/Array} o Element ID string or HTML element or an array of elements or ids to remove handler from.\n\t\t * @param {String} n Event handler name like for example: \"click\"\n\t\t * @param {function} f Function to remove.\n\t\t * @return {bool/Array} Bool state if true if the handler was removed or an array with states if multiple elements where passed in.\n\t\t * @example\n\t\t * // Adds a click handler to the current document\n\t\t * var func = tinymce.dom.Event.add(document, 'click', function(e) {\n\t\t *    console.debug(e.target);\n\t\t * });\n\t\t * \n\t\t * // Removes the click handler from the document\n\t\t * tinymce.dom.Event.remove(document, 'click', func);\n\t\t */\n\t\tremove : function(o, n, f) {\n\t\t\tvar t = this, a = t.events, s = false, r;\n\n\t\t\t// Handle array\n\t\t\tif (o && o.hasOwnProperty && o instanceof Array) {\n\t\t\t\tr = [];\n\n\t\t\t\teach(o, function(o) {\n\t\t\t\t\to = DOM.get(o);\n\t\t\t\t\tr.push(t.remove(o, n, f));\n\t\t\t\t});\n\n\t\t\t\treturn r;\n\t\t\t}\n\n\t\t\to = DOM.get(o);\n\n\t\t\teach(a, function(e, i) {\n\t\t\t\tif (e.obj == o && e.name == n && (!f || (e.func == f || e.cfunc == f))) {\n\t\t\t\t\ta.splice(i, 1);\n\t\t\t\t\tt._remove(o, n, e.cfunc);\n\t\t\t\t\ts = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn s;\n\t\t},\n\n\t\t/**\n\t\t * Clears all events of a specific object.\n\t\t *\n\t\t * @method clear\n\t\t * @param {Object} o DOM element or object to remove all events from.\n\t\t * @example\n\t\t * // Cancels all mousedown events in the active editor\n\t\t * tinyMCE.activeEditor.onMouseDown.add(function(ed, e) {\n\t\t *    return tinymce.dom.Event.cancel(e);\n\t\t * });\n\t\t */\n\t\tclear : function(o) {\n\t\t\tvar t = this, a = t.events, i, e;\n\n\t\t\tif (o) {\n\t\t\t\to = DOM.get(o);\n\n\t\t\t\tfor (i = a.length - 1; i >= 0; i--) {\n\t\t\t\t\te = a[i];\n\n\t\t\t\t\tif (e.obj === o) {\n\t\t\t\t\t\tt._remove(e.obj, e.name, e.cfunc);\n\t\t\t\t\t\te.obj = e.cfunc = null;\n\t\t\t\t\t\ta.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Cancels an event for both bubbeling and the default browser behavior.\n\t\t *\n\t\t * @method cancel\n\t\t * @param {Event} e Event object to cancel.\n\t\t * @return {Boolean} Always false.\n\t\t */\n\t\tcancel : function(e) {\n\t\t\tif (!e)\n\t\t\t\treturn false;\n\n\t\t\tthis.stop(e);\n\n\t\t\treturn this.prevent(e);\n\t\t},\n\n\t\t/**\n\t\t * Stops propogation/bubbeling of an event.\n\t\t *\n\t\t * @method stop\n\t\t * @param {Event} e Event to cancel bubbeling on.\n\t\t * @return {Boolean} Always false.\n\t\t */\n\t\tstop : function(e) {\n\t\t\tif (e.stopPropagation)\n\t\t\t\te.stopPropagation();\n\t\t\telse\n\t\t\t\te.cancelBubble = true;\n\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * Prevent default browser behvaior of an event.\n\t\t *\n\t\t * @method prevent\n\t\t * @param {Event} e Event to prevent default browser behvaior of an event.\n\t\t * @return {Boolean} Always false.\n\t\t */\n\t\tprevent : function(e) {\n\t\t\tif (e.preventDefault)\n\t\t\t\te.preventDefault();\n\t\t\telse\n\t\t\t\te.returnValue = false;\n\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * Destroys the instance.\n\t\t *\n\t\t * @method destroy\n\t\t */\n\t\tdestroy : function() {\n\t\t\tvar t = this;\n\n\t\t\teach(t.events, function(e, i) {\n\t\t\t\tt._remove(e.obj, e.name, e.cfunc);\n\t\t\t\te.obj = e.cfunc = null;\n\t\t\t});\n\n\t\t\tt.events = [];\n\t\t\tt = null;\n\t\t},\n\n\t\t_add : function(o, n, f) {\n\t\t\tif (o.attachEvent)\n\t\t\t\to.attachEvent('on' + n, f);\n\t\t\telse if (o.addEventListener)\n\t\t\t\to.addEventListener(n, f, false);\n\t\t\telse\n\t\t\t\to['on' + n] = f;\n\t\t},\n\n\t\t_remove : function(o, n, f) {\n\t\t\tif (o) {\n\t\t\t\ttry {\n\t\t\t\t\tif (o.detachEvent)\n\t\t\t\t\t\to.detachEvent('on' + n, f);\n\t\t\t\t\telse if (o.removeEventListener)\n\t\t\t\t\t\to.removeEventListener(n, f, false);\n\t\t\t\t\telse\n\t\t\t\t\t\to['on' + n] = null;\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// Might fail with permission denined on IE so we just ignore that\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t_pageInit : function(win) {\n\t\t\tvar t = this;\n\n\t\t\t// Keep it from running more than once\n\t\t\tif (t.domLoaded)\n\t\t\t\treturn;\n\n\t\t\tt.domLoaded = true;\n\n\t\t\teach(t.inits, function(c) {\n\t\t\t\tc();\n\t\t\t});\n\n\t\t\tt.inits = [];\n\t\t},\n\n\t\t_wait : function(win) {\n\t\t\tvar t = this, doc = win.document;\n\n\t\t\t// No need since the document is already loaded\n\t\t\tif (win.tinyMCE_GZ && tinyMCE_GZ.loaded) {\n\t\t\t\tt.domLoaded = 1;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Use IE method\n\t\t\tif (doc.attachEvent) {\n\t\t\t\tdoc.attachEvent(\"onreadystatechange\", function() {\n\t\t\t\t\tif (doc.readyState === \"complete\") {\n\t\t\t\t\t\tdoc.detachEvent(\"onreadystatechange\", arguments.callee);\n\t\t\t\t\t\tt._pageInit(win);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (doc.documentElement.doScroll && win == win.top) {\n\t\t\t\t\t(function() {\n\t\t\t\t\t\tif (t.domLoaded)\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// If IE is used, use the trick by Diego Perini licensed under MIT by request to the author.\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\t\t\t\t\t\tdoc.documentElement.doScroll(\"left\");\n\t\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t\tsetTimeout(arguments.callee, 0);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tt._pageInit(win);\n\t\t\t\t\t})();\n\t\t\t\t}\n\t\t\t} else if (doc.addEventListener) {\n\t\t\t\tt._add(win, 'DOMContentLoaded', function() {\n\t\t\t\t\tt._pageInit(win);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tt._add(win, 'load', function() {\n\t\t\t\tt._pageInit(win);\n\t\t\t});\n\t\t},\n\n\t\t_stoppers : {\n\t\t\tpreventDefault : function() {\n\t\t\t\tthis.returnValue = false;\n\t\t\t},\n\n\t\t\tstopPropagation : function() {\n\t\t\t\tthis.cancelBubble = true;\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t * Instance of EventUtils for the current document.\n\t *\n\t * @property Event\n\t * @member tinymce.dom\n\t * @type tinymce.dom.EventUtils\n\t */\n\tEvent = tinymce.dom.Event = new tinymce.dom.EventUtils();\n\n\t// Dispatch DOM content loaded event for IE and Safari\n\tEvent._wait(window);\n\n\ttinymce.addUnload(function() {\n\t\tEvent.destroy();\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/ui/Container.js":"/**\n * Container.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n/**\n * This class is the base class for all container controls like toolbars. This class should not\n * be instantiated directly other container controls should inherit from this one.\n *\n * @class tinymce.ui.Container\n * @extends tinymce.ui.Control\n */\ntinymce.create('tinymce.ui.Container:tinymce.ui.Control', {\n\t/**\n\t * Base contrustor a new container control instance.\n\t *\n\t * @constructor\n\t * @method Container\n\t * @param {String} id Control id to use for the container.\n\t * @param {Object} s Optional name/value settings object.\n\t */\n\tContainer : function(id, s, editor) {\n\t\tthis.parent(id, s, editor);\n\n\t\t/**\n\t\t * Array of controls added to the container.\n\t\t *\n\t\t * @property controls\n\t\t * @type Array\n\t\t */\n\t\tthis.controls = [];\n\n\t\tthis.lookup = {};\n\t},\n\n\t/**\n\t * Adds a control to the collection of controls for the container.\n\t *\n\t * @method add\n\t * @param {tinymce.ui.Control} c Control instance to add to the container.\n\t * @return {tinymce.ui.Control} Same control instance that got passed in.\n\t */\n\tadd : function(c) {\n\t\tthis.lookup[c.id] = c;\n\t\tthis.controls.push(c);\n\n\t\treturn c;\n\t},\n\n\t/**\n\t * Returns a control by id from the containers collection.\n\t *\n\t * @method get\n\t * @param {String} n Id for the control to retrieve.\n\t * @return {tinymce.ui.Control} Control instance by the specified name or undefined if it wasn't found.\n\t */\n\tget : function(n) {\n\t\treturn this.lookup[n];\n\t}\n});\n\n","Magento_Tinymce3/tiny_mce/classes/ui/Toolbar.js":"/**\n * Toolbar.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n// Shorten class names\nvar dom = tinymce.DOM, each = tinymce.each;\n/**\n * This class is used to create toolbars a toolbar is a container for other controls like buttons etc.\n *\n * @class tinymce.ui.Toolbar\n * @extends tinymce.ui.Container\n */\ntinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {\n\t/**\n\t * Renders the toolbar as a HTML string. This method is much faster than using the DOM and when\n\t * creating a whole toolbar with buttons it does make a lot of difference.\n\t *\n\t * @method renderHTML\n\t * @return {String} HTML for the toolbar control.\n\t */\n\trenderHTML : function() {\n\t\tvar t = this, h = '', c, co, s = t.settings, i, pr, nx, cl;\n\n\t\tcl = t.controls;\n\t\tfor (i=0; i<cl.length; i++) {\n\t\t\t// Get current control, prev control, next control and if the control is a list box or not\n\t\t\tco = cl[i];\n\t\t\tpr = cl[i - 1];\n\t\t\tnx = cl[i + 1];\n\n\t\t\t// Add toolbar start\n\t\t\tif (i === 0) {\n\t\t\t\tc = 'mceToolbarStart';\n\n\t\t\t\tif (co.Button)\n\t\t\t\t\tc += ' mceToolbarStartButton';\n\t\t\t\telse if (co.SplitButton)\n\t\t\t\t\tc += ' mceToolbarStartSplitButton';\n\t\t\t\telse if (co.ListBox)\n\t\t\t\t\tc += ' mceToolbarStartListBox';\n\n\t\t\t\th += dom.createHTML('td', {'class' : c}, dom.createHTML('span', null, '<!-- IE -->'));\n\t\t\t}\n\n\t\t\t// Add toolbar end before list box and after the previous button\n\t\t\t// This is to fix the o2k7 editor skins\n\t\t\tif (pr && co.ListBox) {\n\t\t\t\tif (pr.Button || pr.SplitButton)\n\t\t\t\t\th += dom.createHTML('td', {'class' : 'mceToolbarEnd'}, dom.createHTML('span', null, '<!-- IE -->'));\n\t\t\t}\n\n\t\t\t// Render control HTML\n\n\t\t\t// IE 8 quick fix, needed to propertly generate a hit area for anchors\n\t\t\tif (dom.stdMode)\n\t\t\t\th += '<td style=\"position: relative\">' + co.renderHTML() + '</td>';\n\t\t\telse\n\t\t\t\th += '<td>' + co.renderHTML() + '</td>';\n\n\t\t\t// Add toolbar start after list box and before the next button\n\t\t\t// This is to fix the o2k7 editor skins\n\t\t\tif (nx && co.ListBox) {\n\t\t\t\tif (nx.Button || nx.SplitButton)\n\t\t\t\t\th += dom.createHTML('td', {'class' : 'mceToolbarStart'}, dom.createHTML('span', null, '<!-- IE -->'));\n\t\t\t}\n\t\t}\n\n\t\tc = 'mceToolbarEnd';\n\n\t\tif (co.Button)\n\t\t\tc += ' mceToolbarEndButton';\n\t\telse if (co.SplitButton)\n\t\t\tc += ' mceToolbarEndSplitButton';\n\t\telse if (co.ListBox)\n\t\t\tc += ' mceToolbarEndListBox';\n\n\t\th += dom.createHTML('td', {'class' : c}, dom.createHTML('span', null, '<!-- IE -->'));\n\n\t\treturn dom.createHTML('table', {id : t.id, 'class' : 'mceToolbar' + (s['class'] ? ' ' + s['class'] : ''), cellpadding : '0', cellspacing : '0', align : t.settings.align || '', role: 'presentation', tabindex: '-1'}, '<tbody><tr>' + h + '</tr></tbody>');\n\t}\n});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/ui/Separator.js":"/**\n * Separator.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n/**\n * This class is used to create vertical separator between other controls.\n *\n * @class tinymce.ui.Separator\n * @extends tinymce.ui.Control\n */\ntinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {\n\t/**\n\t * Separator constructor.\n\t *\n\t * @constructor\n\t * @method Separator\n\t * @param {String} id Control id to use for the Separator.\n\t * @param {Object} s Optional name/value settings object.\n\t */\n\tSeparator : function(id, s) {\n\t\tthis.parent(id, s);\n\t\tthis.classPrefix = 'mceSeparator';\n\t\tthis.setDisabled(true);\n\t},\n\n\t/**\n\t * Renders the separator as a HTML string. This method is much faster than using the DOM and when\n\t * creating a whole toolbar with buttons it does make a lot of difference.\n\t *\n\t * @method renderHTML\n\t * @return {String} HTML for the separator control element.\n\t */\n\trenderHTML : function() {\n\t\treturn tinymce.DOM.createHTML('span', {'class' : this.classPrefix, role : 'separator', 'aria-orientation' : 'vertical', tabindex : '-1'});\n\t}\n});\n","Magento_Tinymce3/tiny_mce/classes/ui/SplitButton.js":"/**\n * SplitButton.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each;\n\n\t/**\n\t * This class is used to create a split button. A button with a menu attached to it.\n\t *\n\t * @class tinymce.ui.SplitButton\n\t * @extends tinymce.ui.Button\n\t * @example\n\t * // Creates a new plugin class and a custom split button\n\t * tinymce.create('tinymce.plugins.ExamplePlugin', {\n\t *     createControl: function(n, cm) {\n\t *         switch (n) {\n\t *             case 'mysplitbutton':\n\t *                 var c = cm.createSplitButton('mysplitbutton', {\n\t *                     title : 'My split button',\n\t *                     image : 'some.gif',\n\t *                     onclick : function() {\n\t *                         alert('Button was clicked.');\n\t *                     }\n\t *                 });\n\t * \n\t *                 c.onRenderMenu.add(function(c, m) {\n\t *                     m.add({title : 'Some title', 'class' : 'mceMenuItemTitle'}).setDisabled(1);\n\t * \n\t *                     m.add({title : 'Some item 1', onclick : function() {\n\t *                         alert('Some item 1 was clicked.');\n\t *                     }});\n\t * \n\t *                     m.add({title : 'Some item 2', onclick : function() {\n\t *                         alert('Some item 2 was clicked.');\n\t *                     }});\n\t *                 });\n\t * \n\t *               // Return the new splitbutton instance\n\t *               return c;\n\t *         }\n\t * \n\t *         return null;\n\t *     }\n\t * });\n\t */\n\ttinymce.create('tinymce.ui.SplitButton:tinymce.ui.MenuButton', {\n\t\t/**\n\t\t * Constructs a new split button control instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method SplitButton\n\t\t * @param {String} id Control id for the split button.\n\t\t * @param {Object} s Optional name/value settings object.\n\t\t * @param {Editor} ed Optional the editor instance this button is for.\n\t\t */\n\t\tSplitButton : function(id, s, ed) {\n\t\t\tthis.parent(id, s, ed);\n\t\t\tthis.classPrefix = 'mceSplitButton';\n\t\t},\n\n\t\t/**\n\t\t * Renders the split button as a HTML string. This method is much faster than using the DOM and when\n\t\t * creating a whole toolbar with buttons it does make a lot of difference.\n\t\t *\n\t\t * @method renderHTML\n\t\t * @return {String} HTML for the split button control element.\n\t\t */\n\t\trenderHTML : function() {\n\t\t\tvar h, t = this, s = t.settings, h1;\n\n\t\t\th = '<tbody><tr>';\n\n\t\t\tif (s.image)\n\t\t\t\th1 = DOM.createHTML('img ', {src : s.image, role: 'presentation', 'class' : 'mceAction ' + s['class']});\n\t\t\telse\n\t\t\t\th1 = DOM.createHTML('span', {'class' : 'mceAction ' + s['class']}, '');\n\n\t\t\th1 += DOM.createHTML('span', {'class': 'mceVoiceLabel mceIconOnly', id: t.id + '_voice', style: 'display:none;'}, s.title);\n\t\t\th += '<td >' + DOM.createHTML('a', {role: 'button', id : t.id + '_action', tabindex: '-1', href : 'javascript:;', 'class' : 'mceAction ' + s['class'], onclick : \"return false;\", onmousedown : 'return false;', title : s.title}, h1) + '</td>';\n\t\n\t\t\th1 = DOM.createHTML('span', {'class' : 'mceOpen ' + s['class']}, '<span style=\"display:none;\" class=\"mceIconOnly\" aria-hidden=\"true\">\\u25BC</span>');\n\t\t\th += '<td >' + DOM.createHTML('a', {role: 'button', id : t.id + '_open', tabindex: '-1', href : 'javascript:;', 'class' : 'mceOpen ' + s['class'], onclick : \"return false;\", onmousedown : 'return false;', title : s.title}, h1) + '</td>';\n\n\t\t\th += '</tr></tbody>';\n\t\t\th = DOM.createHTML('table', { role: 'presentation',   'class' : 'mceSplitButton mceSplitButtonEnabled ' + s['class'], cellpadding : '0', cellspacing : '0', title : s.title}, h);\n\t\t\treturn DOM.createHTML('div', {id : t.id, role: 'button', tabindex: '0', 'aria-labelledby': t.id + '_voice', 'aria-haspopup': 'true'}, h);\n\t\t},\n\n\t\t/**\n\t\t * Post render handler. This function will be called after the UI has been\n\t\t * rendered so that events can be added.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender : function() {\n\t\t\tvar t = this, s = t.settings, activate;\n\n\t\t\tif (s.onclick) {\n\t\t\t\tactivate = function(evt) {\n\t\t\t\t\tif (!t.isDisabled()) {\n\t\t\t\t\t\ts.onclick(t.value);\n\t\t\t\t\t\tEvent.cancel(evt);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tEvent.add(t.id + '_action', 'click', activate);\n\t\t\t\tEvent.add(t.id, ['click', 'keydown'], function(evt) {\n\t\t\t\t\tvar DOM_VK_SPACE = 32, DOM_VK_ENTER = 14, DOM_VK_RETURN = 13, DOM_VK_UP = 38, DOM_VK_DOWN = 40;\n\t\t\t\t\tif ((evt.keyCode === 32 || evt.keyCode === 13 || evt.keyCode === 14) && !evt.altKey && !evt.ctrlKey && !evt.metaKey) {\n\t\t\t\t\t\tactivate();\n\t\t\t\t\t\tEvent.cancel(evt);\n\t\t\t\t\t} else if (evt.type === 'click' || evt.keyCode === DOM_VK_DOWN) {\n\t\t\t\t\t\tt.showMenu();\n\t\t\t\t\t\tEvent.cancel(evt);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tEvent.add(t.id + '_open', 'click', function (evt) {\n\t\t\t\tt.showMenu();\n\t\t\t\tEvent.cancel(evt);\n\t\t\t});\n\t\t\tEvent.add([t.id, t.id + '_open'], 'focus', function() {t._focused = 1;});\n\t\t\tEvent.add([t.id, t.id + '_open'], 'blur', function() {t._focused = 0;});\n\n\t\t\t// Old IE doesn't have hover on all elements\n\t\t\tif (tinymce.isIE6 || !DOM.boxModel) {\n\t\t\t\tEvent.add(t.id, 'mouseover', function() {\n\t\t\t\t\tif (!DOM.hasClass(t.id, 'mceSplitButtonDisabled'))\n\t\t\t\t\t\tDOM.addClass(t.id, 'mceSplitButtonHover');\n\t\t\t\t});\n\n\t\t\t\tEvent.add(t.id, 'mouseout', function() {\n\t\t\t\t\tif (!DOM.hasClass(t.id, 'mceSplitButtonDisabled'))\n\t\t\t\t\t\tDOM.removeClass(t.id, 'mceSplitButtonHover');\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\tdestroy : function() {\n\t\t\tthis.parent();\n\n\t\t\tEvent.clear(this.id + '_action');\n\t\t\tEvent.clear(this.id + '_open');\n\t\t\tEvent.clear(this.id);\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/ui/NativeListBox.js":"/**\n * NativeListBox.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher;\n\n\t/**\n\t * This class is used to create list boxes/select list. This one will generate\n\t * a native control the way that the browser produces them by default.\n\t *\n\t * @class tinymce.ui.NativeListBox\n\t * @extends tinymce.ui.ListBox\n\t */\n\ttinymce.create('tinymce.ui.NativeListBox:tinymce.ui.ListBox', {\n\t\t/**\n\t\t * Constructs a new button control instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method NativeListBox\n\t\t * @param {String} id Button control id for the button.\n\t\t * @param {Object} s Optional name/value settings object.\n\t\t */\n\t\tNativeListBox : function(id, s) {\n\t\t\tthis.parent(id, s);\n\t\t\tthis.classPrefix = 'mceNativeListBox';\n\t\t},\n\n\t\t/**\n\t\t * Sets the disabled state for the control. This will add CSS classes to the\n\t\t * element that contains the control. So that it can be disabled visually.\n\t\t *\n\t\t * @method setDisabled\n\t\t * @param {Boolean} s Boolean state if the control should be disabled or not.\n\t\t */\n\t\tsetDisabled : function(s) {\n\t\t\tDOM.get(this.id).disabled = s;\n\t\t\tthis.setAriaProperty('disabled', s);\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the control is disabled or not. This is a method since you can then\n\t\t * choose to check some class or some internal bool state in subclasses.\n\t\t *\n\t\t * @method isDisabled\n\t\t * @return {Boolean} true/false if the control is disabled or not.\n\t\t */\n\t\tisDisabled : function() {\n\t\t\treturn DOM.get(this.id).disabled;\n\t\t},\n\n\t\t/**\n\t\t * Selects a item/option by value. This will both add a visual selection to the\n\t\t * item and change the title of the control to the title of the option.\n\t\t *\n\t\t * @method select\n\t\t * @param {String/function} va Value to look for inside the list box or a function selector.\n\t\t */\n\t\tselect : function(va) {\n\t\t\tvar t = this, fv, f;\n\n\t\t\tif (va == undefined)\n\t\t\t\treturn t.selectByIndex(-1);\n\n\t\t\t// Is string or number make function selector\n\t\t\tif (va && va.call)\n\t\t\t\tf = va;\n\t\t\telse {\n\t\t\t\tf = function(v) {\n\t\t\t\t\treturn v == va;\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Do we need to do something?\n\t\t\tif (va != t.selectedValue) {\n\t\t\t\t// Find item\n\t\t\t\teach(t.items, function(o, i) {\n\t\t\t\t\tif (f(o.value)) {\n\t\t\t\t\t\tfv = 1;\n\t\t\t\t\t\tt.selectByIndex(i);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (!fv)\n\t\t\t\t\tt.selectByIndex(-1);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Selects a item/option by index. This will both add a visual selection to the\n\t\t * item and change the title of the control to the title of the option.\n\t\t *\n\t\t * @method selectByIndex\n\t\t * @param {String} idx Index to select, pass -1 to select menu/title of select box.\n\t\t */\n\t\tselectByIndex : function(idx) {\n\t\t\tDOM.get(this.id).selectedIndex = idx + 1;\n\t\t\tthis.selectedValue = this.items[idx] ? this.items[idx].value : null;\n\t\t},\n\n\t\t/**\n\t\t * Adds a option item to the list box.\n\t\t *\n\t\t * @method add\n\t\t * @param {String} n Title for the new option.\n\t\t * @param {String} v Value for the new option.\n\t\t * @param {Object} o Optional object with settings like for example class.\n\t\t */\n\t\tadd : function(n, v, a) {\n\t\t\tvar o, t = this;\n\n\t\t\ta = a || {};\n\t\t\ta.value = v;\n\n\t\t\tif (t.isRendered())\n\t\t\t\tDOM.add(DOM.get(this.id), 'option', a, n);\n\n\t\t\to = {\n\t\t\t\ttitle : n,\n\t\t\t\tvalue : v,\n\t\t\t\tattribs : a\n\t\t\t};\n\n\t\t\tt.items.push(o);\n\t\t\tt.onAdd.dispatch(t, o);\n\t\t},\n\n\t\t/**\n\t\t * Executes the specified callback function for the menu item. In this case when the user clicks the menu item.\n\t\t *\n\t\t * @method getLength\n\t\t */\n\t\tgetLength : function() {\n\t\t\treturn this.items.length;\n\t\t},\n\n\t\t/**\n\t\t * Renders the list box as a HTML string. This method is much faster than using the DOM and when\n\t\t * creating a whole toolbar with buttons it does make a lot of difference.\n\t\t *\n\t\t * @method renderHTML\n\t\t * @return {String} HTML for the list box control element.\n\t\t */\n\t\trenderHTML : function() {\n\t\t\tvar h, t = this;\n\n\t\t\th = DOM.createHTML('option', {value : ''}, '-- ' + t.settings.title + ' --');\n\n\t\t\teach(t.items, function(it) {\n\t\t\t\th += DOM.createHTML('option', {value : it.value}, it.title);\n\t\t\t});\n\n\t\t\th = DOM.createHTML('select', {id : t.id, 'class' : 'mceNativeListBox', 'aria-labelledby': t.id + '_aria'}, h);\n\t\t\th += DOM.createHTML('span', {id : t.id + '_aria', 'style': 'display: none'}, t.settings.title);\n\t\t\treturn h;\n\t\t},\n\n\t\t/**\n\t\t * Post render handler. This function will be called after the UI has been\n\t\t * rendered so that events can be added.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender : function() {\n\t\t\tvar t = this, ch, changeListenerAdded = true;\n\n\t\t\tt.rendered = true;\n\n\t\t\tfunction onChange(e) {\n\t\t\t\tvar v = t.items[e.target.selectedIndex - 1];\n\n\t\t\t\tif (v && (v = v.value)) {\n\t\t\t\t\tt.onChange.dispatch(t, v);\n\n\t\t\t\t\tif (t.settings.onselect)\n\t\t\t\t\t\tt.settings.onselect(v);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tEvent.add(t.id, 'change', onChange);\n\n\t\t\t// Accessibility keyhandler\n\t\t\tEvent.add(t.id, 'keydown', function(e) {\n\t\t\t\tvar bf;\n\n\t\t\t\tEvent.remove(t.id, 'change', ch);\n\t\t\t\tchangeListenerAdded = false;\n\n\t\t\t\tbf = Event.add(t.id, 'blur', function() {\n\t\t\t\t\tif (changeListenerAdded) return;\n\t\t\t\t\tchangeListenerAdded = true;\n\t\t\t\t\tEvent.add(t.id, 'change', onChange);\n\t\t\t\t\tEvent.remove(t.id, 'blur', bf);\n\t\t\t\t});\n\n\t\t\t\t//prevent default left and right keys on chrome - so that the keyboard navigation is used.\n\t\t\t\tif (tinymce.isWebKit && (e.keyCode==37 ||e.keyCode==39)) {\n\t\t\t\t\treturn Event.prevent(e);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (e.keyCode == 13 || e.keyCode == 32) {\n\t\t\t\t\tonChange(e);\n\t\t\t\t\treturn Event.cancel(e);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tt.onPostRender.dispatch(t, DOM.get(t.id));\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/ui/Menu.js":"/**\n * Menu.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, walk = tinymce.walk;\n\n\t/**\n\t * This class is base class for all menu types like DropMenus etc. This class should not\n\t * be instantiated directly other menu controls should inherit from this one.\n\t *\n\t * @class tinymce.ui.Menu\n\t * @extends tinymce.ui.MenuItem\n\t */\n\ttinymce.create('tinymce.ui.Menu:tinymce.ui.MenuItem', {\n\t\t/**\n\t\t * Constructs a new button control instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method Menu\n\t\t * @param {String} id Button control id for the button.\n\t\t * @param {Object} s Optional name/value settings object.\n\t\t */\n\t\tMenu : function(id, s) {\n\t\t\tvar t = this;\n\n\t\t\tt.parent(id, s);\n\t\t\tt.items = {};\n\t\t\tt.collapsed = false;\n\t\t\tt.menuCount = 0;\n\t\t\tt.onAddItem = new tinymce.util.Dispatcher(this);\n\t\t},\n\n\t\t/**\n\t\t * Expands the menu, this will show them menu and all menu items.\n\t\t *\n\t\t * @method expand\n\t\t * @param {Boolean} d Optional deep state. If this is set to true all children will be expanded as well.\n\t\t */\n\t\texpand : function(d) {\n\t\t\tvar t = this;\n\n\t\t\tif (d) {\n\t\t\t\twalk(t, function(o) {\n\t\t\t\t\tif (o.expand)\n\t\t\t\t\t\to.expand();\n\t\t\t\t}, 'items', t);\n\t\t\t}\n\n\t\t\tt.collapsed = false;\n\t\t},\n\n\t\t/**\n\t\t * Collapses the menu, this will hide the menu and all menu items.\n\t\t *\n\t\t * @method collapse\n\t\t * @param {Boolean} d Optional deep state. If this is set to true all children will be collapsed as well.\n\t\t */\n\t\tcollapse : function(d) {\n\t\t\tvar t = this;\n\n\t\t\tif (d) {\n\t\t\t\twalk(t, function(o) {\n\t\t\t\t\tif (o.collapse)\n\t\t\t\t\t\to.collapse();\n\t\t\t\t}, 'items', t);\n\t\t\t}\n\n\t\t\tt.collapsed = true;\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the menu has been collapsed or not.\n\t\t *\n\t\t * @method isCollapsed\n\t\t * @return {Boolean} True/false state if the menu has been collapsed or not.\n\t\t */\n\t\tisCollapsed : function() {\n\t\t\treturn this.collapsed;\n\t\t},\n\n\t\t/**\n\t\t * Adds a new menu, menu item or sub classes of them to the drop menu.\n\t\t *\n\t\t * @method add\n\t\t * @param {tinymce.ui.Control} o Menu or menu item to add to the drop menu.\n\t\t * @return {tinymce.ui.Control} Same as the input control, the menu or menu item.\n\t\t */\n\t\tadd : function(o) {\n\t\t\tif (!o.settings)\n\t\t\t\to = new tinymce.ui.MenuItem(o.id || DOM.uniqueId(), o);\n\n\t\t\tthis.onAddItem.dispatch(this, o);\n\n\t\t\treturn this.items[o.id] = o;\n\t\t},\n\n\t\t/**\n\t\t * Adds a menu separator between the menu items.\n\t\t *\n\t\t * @method addSeparator\n\t\t * @return {tinymce.ui.MenuItem} Menu item instance for the separator.\n\t\t */\n\t\taddSeparator : function() {\n\t\t\treturn this.add({separator : true});\n\t\t},\n\n\t\t/**\n\t\t * Adds a sub menu to the menu.\n\t\t *\n\t\t * @method addMenu\n\t\t * @param {Object} o Menu control or a object with settings to be created into an control.\n\t\t * @return {tinymce.ui.Menu} Menu control instance passed in or created.\n\t\t */\n\t\taddMenu : function(o) {\n\t\t\tif (!o.collapse)\n\t\t\t\to = this.createMenu(o);\n\n\t\t\tthis.menuCount++;\n\n\t\t\treturn this.add(o);\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the menu has sub menus or not.\n\t\t *\n\t\t * @method hasMenus\n\t\t * @return {Boolean} True/false state if the menu has sub menues or not.\n\t\t */\n\t\thasMenus : function() {\n\t\t\treturn this.menuCount !== 0;\n\t\t},\n\n\t\t/**\n\t\t * Removes a specific sub menu or menu item from the menu.\n\t\t *\n\t\t * @method remove\n\t\t * @param {tinymce.ui.Control} o Menu item or menu to remove from menu.\n\t\t * @return {tinymce.ui.Control} Control instance or null if it wasn't found.\n\t\t */\n\t\tremove : function(o) {\n\t\t\tdelete this.items[o.id];\n\t\t},\n\n\t\t/**\n\t\t * Removes all menu items and sub menu items from the menu.\n\t\t *\n\t\t * @method removeAll\n\t\t */\n\t\tremoveAll : function() {\n\t\t\tvar t = this;\n\n\t\t\twalk(t, function(o) {\n\t\t\t\tif (o.removeAll)\n\t\t\t\t\to.removeAll();\n\t\t\t\telse\n\t\t\t\t\to.remove();\n\n\t\t\t\to.destroy();\n\t\t\t}, 'items', t);\n\n\t\t\tt.items = {};\n\t\t},\n\n\t\t/**\n\t\t * Created a new sub menu for the menu control.\n\t\t *\n\t\t * @method createMenu\n\t\t * @param {Object} s Optional name/value settings object.\n\t\t * @return {tinymce.ui.Menu} New drop menu instance.\n\t\t */\n\t\tcreateMenu : function(o) {\n\t\t\tvar m = new tinymce.ui.Menu(o.id || DOM.uniqueId(), o);\n\n\t\t\tm.onAddItem.add(this.onAddItem.dispatch, this.onAddItem);\n\n\t\t\treturn m;\n\t\t}\n\t});\n})(tinymce);","Magento_Tinymce3/tiny_mce/classes/ui/ListBox.js":"/**\n * ListBox.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher;\n\n\t/**\n\t * This class is used to create list boxes/select list. This one will generate\n\t * a non native control. This one has the benefits of having visual items added.\n\t *\n\t * @class tinymce.ui.ListBox\n\t * @extends tinymce.ui.Control\n\t * @example\n\t * // Creates a new plugin class and a custom listbox\n\t * tinymce.create('tinymce.plugins.ExamplePlugin', {\n\t *     createControl: function(n, cm) {\n\t *         switch (n) {\n\t *             case 'mylistbox':\n\t *                 var mlb = cm.createListBox('mylistbox', {\n\t *                      title : 'My list box',\n\t *                      onselect : function(v) {\n\t *                          tinyMCE.activeEditor.windowManager.alert('Value selected:' + v);\n\t *                      }\n\t *                 });\n\t * \n\t *                 // Add some values to the list box\n\t *                 mlb.add('Some item 1', 'val1');\n\t *                 mlb.add('some item 2', 'val2');\n\t *                 mlb.add('some item 3', 'val3');\n\t * \n\t *                 // Return the new listbox instance\n\t *                 return mlb;\n\t *         }\n\t * \n\t *         return null;\n\t *     }\n\t * });\n\t * \n\t * // Register plugin with a short name\n\t * tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);\n\t * \n\t * // Initialize TinyMCE with the new plugin and button\n\t * tinyMCE.init({\n\t *    ...\n\t *    plugins : '-example', // - means TinyMCE will not try to load it\n\t *    theme_advanced_buttons1 : 'mylistbox' // Add the new example listbox to the toolbar\n\t * });\n\t */\n\ttinymce.create('tinymce.ui.ListBox:tinymce.ui.Control', {\n\t\t/**\n\t\t * Constructs a new listbox control instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method ListBox\n\t\t * @param {String} id Control id for the list box.\n\t\t * @param {Object} s Optional name/value settings object.\n\t\t * @param {Editor} ed Optional the editor instance this button is for.\n\t\t */\n\t\tListBox : function(id, s, ed) {\n\t\t\tvar t = this;\n\n\t\t\tt.parent(id, s, ed);\n\n\t\t\t/**\n\t\t\t * Array of ListBox items.\n\t\t\t *\n\t\t\t * @property items\n\t\t\t * @type Array\n\t\t\t */\n\t\t\tt.items = [];\n\n\t\t\t/**\n\t\t\t * Fires when the selection has been changed.\n\t\t\t *\n\t\t\t * @event onChange\n\t\t\t */\n\t\t\tt.onChange = new Dispatcher(t);\n\n\t\t\t/**\n\t\t\t * Fires after the element has been rendered to DOM.\n\t\t\t *\n\t\t\t * @event onPostRender\n\t\t\t */\n\t\t\tt.onPostRender = new Dispatcher(t);\n\n\t\t\t/**\n\t\t\t * Fires when a new item is added.\n\t\t\t *\n\t\t\t * @event onAdd\n\t\t\t */\n\t\t\tt.onAdd = new Dispatcher(t);\n\n\t\t\t/**\n\t\t\t * Fires when the menu gets rendered.\n\t\t\t *\n\t\t\t * @event onRenderMenu\n\t\t\t */\n\t\t\tt.onRenderMenu = new tinymce.util.Dispatcher(this);\n\n\t\t\tt.classPrefix = 'mceListBox';\n\t\t},\n\n\t\t/**\n\t\t * Selects a item/option by value. This will both add a visual selection to the\n\t\t * item and change the title of the control to the title of the option.\n\t\t *\n\t\t * @method select\n\t\t * @param {String/function} va Value to look for inside the list box or a function selector.\n\t\t */\n\t\tselect : function(va) {\n\t\t\tvar t = this, fv, f;\n\n\t\t\tif (va == undefined)\n\t\t\t\treturn t.selectByIndex(-1);\n\n\t\t\t// Is string or number make function selector\n\t\t\tif (va && va.call)\n\t\t\t\tf = va;\n\t\t\telse {\n\t\t\t\tf = function(v) {\n\t\t\t\t\treturn v == va;\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Do we need to do something?\n\t\t\tif (va != t.selectedValue) {\n\t\t\t\t// Find item\n\t\t\t\teach(t.items, function(o, i) {\n\t\t\t\t\tif (f(o.value)) {\n\t\t\t\t\t\tfv = 1;\n\t\t\t\t\t\tt.selectByIndex(i);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (!fv)\n\t\t\t\t\tt.selectByIndex(-1);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Selects a item/option by index. This will both add a visual selection to the\n\t\t * item and change the title of the control to the title of the option.\n\t\t *\n\t\t * @method selectByIndex\n\t\t * @param {String} idx Index to select, pass -1 to select menu/title of select box.\n\t\t */\n\t\tselectByIndex : function(idx) {\n\t\t\tvar t = this, e, o, label;\n\n\t\t\tif (idx != t.selectedIndex) {\n\t\t\t\te = DOM.get(t.id + '_text');\n\t\t\t\tlabel = DOM.get(t.id + '_voiceDesc');\n\t\t\t\to = t.items[idx];\n\n\t\t\t\tif (o) {\n\t\t\t\t\tt.selectedValue = o.value;\n\t\t\t\t\tt.selectedIndex = idx;\n\t\t\t\t\tDOM.setHTML(e, DOM.encode(o.title));\n\t\t\t\t\tDOM.setHTML(label, t.settings.title + \" - \" + o.title);\n\t\t\t\t\tDOM.removeClass(e, 'mceTitle');\n\t\t\t\t\tDOM.setAttrib(t.id, 'aria-valuenow', o.title);\n\t\t\t\t} else {\n\t\t\t\t\tDOM.setHTML(e, DOM.encode(t.settings.title));\n\t\t\t\t\tDOM.setHTML(label, DOM.encode(t.settings.title));\n\t\t\t\t\tDOM.addClass(e, 'mceTitle');\n\t\t\t\t\tt.selectedValue = t.selectedIndex = null;\n\t\t\t\t\tDOM.setAttrib(t.id, 'aria-valuenow', t.settings.title);\n\t\t\t\t}\n\t\t\t\te = 0;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Adds a option item to the list box.\n\t\t *\n\t\t * @method add\n\t\t * @param {String} n Title for the new option.\n\t\t * @param {String} v Value for the new option.\n\t\t * @param {Object} o Optional object with settings like for example class.\n\t\t */\n\t\tadd : function(n, v, o) {\n\t\t\tvar t = this;\n\n\t\t\to = o || {};\n\t\t\to = tinymce.extend(o, {\n\t\t\t\ttitle : n,\n\t\t\t\tvalue : v\n\t\t\t});\n\n\t\t\tt.items.push(o);\n\t\t\tt.onAdd.dispatch(t, o);\n\t\t},\n\n\t\t/**\n\t\t * Returns the number of items inside the list box.\n\t\t *\n\t\t * @method getLength\n\t\t * @param {Number} Number of items inside the list box.\n\t\t */\n\t\tgetLength : function() {\n\t\t\treturn this.items.length;\n\t\t},\n\n\t\t/**\n\t\t * Renders the list box as a HTML string. This method is much faster than using the DOM and when\n\t\t * creating a whole toolbar with buttons it does make a lot of difference.\n\t\t *\n\t\t * @method renderHTML\n\t\t * @return {String} HTML for the list box control element.\n\t\t */\n\t\trenderHTML : function() {\n\t\t\tvar h = '', t = this, s = t.settings, cp = t.classPrefix;\n\n\t\t\th = '<span role=\"listbox\" aria-haspopup=\"true\" aria-labelledby=\"' + t.id +'_voiceDesc\" aria-describedby=\"' + t.id + '_voiceDesc\"><table role=\"presentation\" tabindex=\"0\" id=\"' + t.id + '\" cellpadding=\"0\" cellspacing=\"0\" class=\"' + cp + ' ' + cp + 'Enabled' + (s['class'] ? (' ' + s['class']) : '') + '\"><tbody><tr>';\n\t\t\th += '<td>' + DOM.createHTML('span', {id: t.id + '_voiceDesc', 'class': 'voiceLabel', style:'display:none;'}, t.settings.title); \n\t\t\th += DOM.createHTML('a', {id : t.id + '_text', tabindex : -1, href : 'javascript:;', 'class' : 'mceText', onclick : \"return false;\", onmousedown : 'return false;'}, DOM.encode(t.settings.title)) + '</td>';\n\t\t\th += '<td>' + DOM.createHTML('a', {id : t.id + '_open', tabindex : -1, href : 'javascript:;', 'class' : 'mceOpen', onclick : \"return false;\", onmousedown : 'return false;'}, '<span><span style=\"display:none;\" class=\"mceIconOnly\" aria-hidden=\"true\">\\u25BC</span></span>') + '</td>';\n\t\t\th += '</tr></tbody></table></span>';\n\n\t\t\treturn h;\n\t\t},\n\n\t\t/**\n\t\t * Displays the drop menu with all items.\n\t\t *\n\t\t * @method showMenu\n\t\t */\n\t\tshowMenu : function() {\n\t\t\tvar t = this, p2, e = DOM.get(this.id), m;\n\n\t\t\tif (t.isDisabled() || t.items.length == 0)\n\t\t\t\treturn;\n\n\t\t\tif (t.menu && t.menu.isMenuVisible)\n\t\t\t\treturn t.hideMenu();\n\n\t\t\tif (!t.isMenuRendered) {\n\t\t\t\tt.renderMenu();\n\t\t\t\tt.isMenuRendered = true;\n\t\t\t}\n\n\t\t\tp2 = DOM.getPos(e);\n\n\t\t\tm = t.menu;\n\t\t\tm.settings.offset_x = p2.x;\n\t\t\tm.settings.offset_y = p2.y;\n\t\t\tm.settings.keyboard_focus = !tinymce.isOpera; // Opera is buggy when it comes to auto focus\n\n\t\t\t// Select in menu\n\t\t\tif (t.oldID)\n\t\t\t\tm.items[t.oldID].setSelected(0);\n\n\t\t\teach(t.items, function(o) {\n\t\t\t\tif (o.value === t.selectedValue) {\n\t\t\t\t\tm.items[o.id].setSelected(1);\n\t\t\t\t\tt.oldID = o.id;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tm.showMenu(0, e.clientHeight);\n\n\t\t\tEvent.add(DOM.doc, 'mousedown', t.hideMenu, t);\n\t\t\tDOM.addClass(t.id, t.classPrefix + 'Selected');\n\n\t\t\t//DOM.get(t.id + '_text').focus();\n\t\t},\n\n\t\t/**\n\t\t * Hides the drop menu.\n\t\t *\n\t\t * @method hideMenu\n\t\t */\n\t\thideMenu : function(e) {\n\t\t\tvar t = this;\n\n\t\t\tif (t.menu && t.menu.isMenuVisible) {\n\t\t\t\tDOM.removeClass(t.id, t.classPrefix + 'Selected');\n\n\t\t\t\t// Prevent double toogles by canceling the mouse click event to the button\n\t\t\t\tif (e && e.type == \"mousedown\" && (e.target.id == t.id + '_text' || e.target.id == t.id + '_open'))\n\t\t\t\t\treturn;\n\n\t\t\t\tif (!e || !DOM.getParent(e.target, '.mceMenu')) {\n\t\t\t\t\tDOM.removeClass(t.id, t.classPrefix + 'Selected');\n\t\t\t\t\tEvent.remove(DOM.doc, 'mousedown', t.hideMenu, t);\n\t\t\t\t\tt.menu.hideMenu();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Renders the menu to the DOM.\n\t\t *\n\t\t * @method renderMenu\n\t\t */\n\t\trenderMenu : function() {\n\t\t\tvar t = this, m;\n\n\t\t\tm = t.settings.control_manager.createDropMenu(t.id + '_menu', {\n\t\t\t\tmenu_line : 1,\n\t\t\t\t'class' : t.classPrefix + 'Menu mceNoIcons',\n\t\t\t\tmax_width : 150,\n\t\t\t\tmax_height : 150\n\t\t\t});\n\n\t\t\tm.onHideMenu.add(function() {\n\t\t\t\tt.hideMenu();\n\t\t\t\tt.focus();\n\t\t\t});\n\n\t\t\tm.add({\n\t\t\t\ttitle : t.settings.title,\n\t\t\t\t'class' : 'mceMenuItemTitle',\n\t\t\t\tonclick : function() {\n\t\t\t\t\tif (t.settings.onselect('') !== false)\n\t\t\t\t\t\tt.select(''); // Must be runned after\n\t\t\t\t}\n\t\t\t});\n\n\t\t\teach(t.items, function(o) {\n\t\t\t\t// No value then treat it as a title\n\t\t\t\tif (o.value === undefined) {\n\t\t\t\t\tm.add({\n\t\t\t\t\t\ttitle : o.title,\n\t\t\t\t\t\trole : \"option\",\n\t\t\t\t\t\t'class' : 'mceMenuItemTitle',\n\t\t\t\t\t\tonclick : function() {\n\t\t\t\t\t\t\tif (t.settings.onselect('') !== false)\n\t\t\t\t\t\t\t\tt.select(''); // Must be runned after\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\to.id = DOM.uniqueId();\n\t\t\t\t\to.role= \"option\";\n\t\t\t\t\to.onclick = function() {\n\t\t\t\t\t\tif (t.settings.onselect(o.value) !== false)\n\t\t\t\t\t\t\tt.select(o.value); // Must be runned after\n\t\t\t\t\t};\n\n\t\t\t\t\tm.add(o);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tt.onRenderMenu.dispatch(t, m);\n\t\t\tt.menu = m;\n\t\t},\n\n\t\t/**\n\t\t * Post render event. This will be executed after the control has been rendered and can be used to\n\t\t * set states, add events to the control etc. It's recommended for subclasses of the control to call this method by using this.parent().\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender : function() {\n\t\t\tvar t = this, cp = t.classPrefix;\n\n\t\t\tEvent.add(t.id, 'click', t.showMenu, t);\n\t\t\tEvent.add(t.id, 'keydown', function(evt) {\n\t\t\t\tif (evt.keyCode == 32) { // Space\n\t\t\t\t\tt.showMenu(evt);\n\t\t\t\t\tEvent.cancel(evt);\n\t\t\t\t}\n\t\t\t});\n\t\t\tEvent.add(t.id, 'focus', function() {\n\t\t\t\tif (!t._focused) {\n\t\t\t\t\tt.keyDownHandler = Event.add(t.id, 'keydown', function(e) {\n\t\t\t\t\t\tif (e.keyCode == 40) {\n\t\t\t\t\t\t\tt.showMenu();\n\t\t\t\t\t\t\tEvent.cancel(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tt.keyPressHandler = Event.add(t.id, 'keypress', function(e) {\n\t\t\t\t\t\tvar v;\n\t\t\t\t\t\tif (e.keyCode == 13) {\n\t\t\t\t\t\t\t// Fake select on enter\n\t\t\t\t\t\t\tv = t.selectedValue;\n\t\t\t\t\t\t\tt.selectedValue = null; // Needs to be null to fake change\n\t\t\t\t\t\t\tEvent.cancel(e);\n\t\t\t\t\t\t\tt.settings.onselect(v);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tt._focused = 1;\n\t\t\t});\n\t\t\tEvent.add(t.id, 'blur', function() {\n\t\t\t\tEvent.remove(t.id, 'keydown', t.keyDownHandler);\n\t\t\t\tEvent.remove(t.id, 'keypress', t.keyPressHandler);\n\t\t\t\tt._focused = 0;\n\t\t\t});\n\n\t\t\t// Old IE doesn't have hover on all elements\n\t\t\tif (tinymce.isIE6 || !DOM.boxModel) {\n\t\t\t\tEvent.add(t.id, 'mouseover', function() {\n\t\t\t\t\tif (!DOM.hasClass(t.id, cp + 'Disabled'))\n\t\t\t\t\t\tDOM.addClass(t.id, cp + 'Hover');\n\t\t\t\t});\n\n\t\t\t\tEvent.add(t.id, 'mouseout', function() {\n\t\t\t\t\tif (!DOM.hasClass(t.id, cp + 'Disabled'))\n\t\t\t\t\t\tDOM.removeClass(t.id, cp + 'Hover');\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tt.onPostRender.dispatch(t, DOM.get(t.id));\n\t\t},\n\n\t\t/**\n\t\t * Destroys the ListBox i.e. clear memory and events.\n\t\t *\n\t\t * @method destroy\n\t\t */\n\t\tdestroy : function() {\n\t\t\tthis.parent();\n\n\t\t\tEvent.clear(this.id + '_text');\n\t\t\tEvent.clear(this.id + '_open');\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/ui/Button.js":"/**\n * Button.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar DOM = tinymce.DOM;\n\n\t/**\n\t * This class is used to create a UI button. A button is basically a link\n\t * that is styled to look like a button or icon.\n\t *\n\t * @class tinymce.ui.Button\n\t * @extends tinymce.ui.Control\n\t */\n\ttinymce.create('tinymce.ui.Button:tinymce.ui.Control', {\n\t\t/**\n\t\t * Constructs a new button control instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method Button\n\t\t * @param {String} id Control id for the button.\n\t\t * @param {Object} s Optional name/value settings object.\n\t\t * @param {Editor} ed Optional the editor instance this button is for.\n\t\t */\n\t\tButton : function(id, s, ed) {\n\t\t\tthis.parent(id, s, ed);\n\t\t\tthis.classPrefix = 'mceButton';\n\t\t},\n\n\t\t/**\n\t\t * Renders the button as a HTML string. This method is much faster than using the DOM and when\n\t\t * creating a whole toolbar with buttons it does make a lot of difference.\n\t\t *\n\t\t * @method renderHTML\n\t\t * @return {String} HTML for the button control element.\n\t\t */\n\t\trenderHTML : function() {\n\t\t\tvar cp = this.classPrefix, s = this.settings, h, l;\n\n\t\t\tl = DOM.encode(s.label || '');\n\t\t\th = '<a role=\"button\" id=\"' + this.id + '\" href=\"javascript:;\" class=\"' + cp + ' ' + cp + 'Enabled ' + s['class'] + (l ? ' ' + cp + 'Labeled' : '') +'\" onmousedown=\"return false;\" onclick=\"return false;\" aria-labelledby=\"' + this.id + '_voice\" title=\"' + DOM.encode(s.title) + '\">';\n\t\t\tif (s.image && !(this.editor  &&this.editor.forcedHighContrastMode) )\n\t\t\t\th += '<img class=\"mceIcon\" src=\"' + s.image + '\" alt=\"' + DOM.encode(s.title) + '\" />' + l;\n\t\t\telse\n\t\t\t\th += '<span class=\"mceIcon ' + s['class'] + '\"></span>' + (l ? '<span class=\"' + cp + 'Label\">' + l + '</span>' : '');\n\n\t\t\th += '<span class=\"mceVoiceLabel mceIconOnly\" style=\"display: none;\" id=\"' + this.id + '_voice\">' + s.title + '</span>'; \n\t\t\th += '</a>';\n\t\t\treturn h;\n\t\t},\n\n\t\t/**\n\t\t * Post render handler. This function will be called after the UI has been\n\t\t * rendered so that events can be added.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender : function() {\n\t\t\tvar t = this, s = t.settings;\n\n\t\t\ttinymce.dom.Event.add(t.id, 'click', function(e) {\n\t\t\t\tif (!t.isDisabled())\n\t\t\t\t\treturn s.onclick.call(s.scope, e);\n\t\t\t});\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/ui/KeyboardNavigation.js":"/**\n * KeyboardNavigation.js\n *\n * Copyright 2011, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar Event = tinymce.dom.Event, each = tinymce.each;\n\n\t/**\n\t * This class provides basic keyboard navigation using the arrow keys to children of a component.\n\t * For example, this class handles moving between the buttons on the toolbars. \n\t * \n\t * @class tinymce.ui.KeyboardNavigation\n\t */\n\ttinymce.create('tinymce.ui.KeyboardNavigation', {\n\t\t/**\n\t\t * Create a new KeyboardNavigation instance to handle the focus for a specific element.\n\t\t * \n\t\t * @constructor\n\t\t * @method KeyboardNavigation\n\t\t * @param {Object} settings the settings object to define how keyboard navigation works.\n\t\t * @param {DOMUtils} dom the DOMUtils instance to use.\n\t\t * \n\t\t * @setting {Element/String} root the root element or ID of the root element for the control.\n\t\t * @setting {Array} items an array containing the items to move focus between. Every object in this array must have an id attribute which maps to the actual DOM element. If the actual elements are passed without an ID then one is automatically assigned.\n\t\t * @setting {Function} onCancel the callback for when the user presses escape or otherwise indicates cancelling.\n\t\t * @setting {Function} onAction (optional) the action handler to call when the user activates an item.\n\t\t * @setting {Boolean} enableLeftRight (optional, default) when true, the up/down arrows move through items.\n\t\t * @setting {Boolean} enableUpDown (optional) when true, the up/down arrows move through items.\n\t\t * Note for both up/down and left/right explicitly set both enableLeftRight and enableUpDown to true.\n\t\t */\n\t\tKeyboardNavigation: function(settings, dom) {\n\t\t\tvar t = this, root = settings.root, items = settings.items,\n\t\t\t\t\tenableUpDown = settings.enableUpDown, enableLeftRight = settings.enableLeftRight || !settings.enableUpDown,\n\t\t\t\t\texcludeFromTabOrder = settings.excludeFromTabOrder,\n\t\t\t\t\titemFocussed, itemBlurred, rootKeydown, rootFocussed, focussedId;\n\n\t\t\tdom = dom || tinymce.DOM;\n\n\t\t\titemFocussed = function(evt) {\n\t\t\t\tfocussedId = evt.target.id;\n\t\t\t};\n\t\t\t\n\t\t\titemBlurred = function(evt) {\n\t\t\t\tdom.setAttrib(evt.target.id, 'tabindex', '-1');\n\t\t\t};\n\t\t\t\n\t\t\trootFocussed = function(evt) {\n\t\t\t\tvar item = dom.get(focussedId);\n\t\t\t\tdom.setAttrib(item, 'tabindex', '0');\n\t\t\t\titem.focus();\n\t\t\t};\n\t\t\t\n\t\t\tt.focus = function() {\n\t\t\t\tdom.get(focussedId).focus();\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Destroys the KeyboardNavigation and unbinds any focus/blur event handles it might have added.\n\t\t\t *\n\t\t\t * @method destroy\n\t\t\t */\n\t\t\tt.destroy = function() {\n\t\t\t\teach(items, function(item) {\n\t\t\t\t\tdom.unbind(dom.get(item.id), 'focus', itemFocussed);\n\t\t\t\t\tdom.unbind(dom.get(item.id), 'blur', itemBlurred);\n\t\t\t\t});\n\n\t\t\t\tdom.unbind(dom.get(root), 'focus', rootFocussed);\n\t\t\t\tdom.unbind(dom.get(root), 'keydown', rootKeydown);\n\n\t\t\t\titems = dom = root = t.focus = itemFocussed = itemBlurred = rootKeydown = rootFocussed = null;\n\t\t\t\tt.destroy = function() {};\n\t\t\t};\n\t\t\t\n\t\t\tt.moveFocus = function(dir, evt) {\n\t\t\t\tvar idx = -1, controls = t.controls, newFocus;\n\n\t\t\t\tif (!focussedId)\n\t\t\t\t\treturn;\n\n\t\t\t\teach(items, function(item, index) {\n\t\t\t\t\tif (item.id === focussedId) {\n\t\t\t\t\t\tidx = index;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tidx += dir;\n\t\t\t\tif (idx < 0) {\n\t\t\t\t\tidx = items.length - 1;\n\t\t\t\t} else if (idx >= items.length) {\n\t\t\t\t\tidx = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnewFocus = items[idx];\n\t\t\t\tdom.setAttrib(focussedId, 'tabindex', '-1');\n\t\t\t\tdom.setAttrib(newFocus.id, 'tabindex', '0');\n\t\t\t\tdom.get(newFocus.id).focus();\n\n\t\t\t\tif (settings.actOnFocus) {\n\t\t\t\t\tsettings.onAction(newFocus.id);\n\t\t\t\t}\n\n\t\t\t\tif (evt)\n\t\t\t\t\tEvent.cancel(evt);\n\t\t\t};\n\t\t\t\n\t\t\trootKeydown = function(evt) {\n\t\t\t\tvar DOM_VK_LEFT = 37, DOM_VK_RIGHT = 39, DOM_VK_UP = 38, DOM_VK_DOWN = 40, DOM_VK_ESCAPE = 27, DOM_VK_ENTER = 14, DOM_VK_RETURN = 13, DOM_VK_SPACE = 32;\n\t\t\t\t\n\t\t\t\tswitch (evt.keyCode) {\n\t\t\t\t\tcase DOM_VK_LEFT:\n\t\t\t\t\t\tif (enableLeftRight) t.moveFocus(-1);\n\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\tcase DOM_VK_RIGHT:\n\t\t\t\t\t\tif (enableLeftRight) t.moveFocus(1);\n\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\tcase DOM_VK_UP:\n\t\t\t\t\t\tif (enableUpDown) t.moveFocus(-1);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DOM_VK_DOWN:\n\t\t\t\t\t\tif (enableUpDown) t.moveFocus(1);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DOM_VK_ESCAPE:\n\t\t\t\t\t\tif (settings.onCancel) {\n\t\t\t\t\t\t\tsettings.onCancel();\n\t\t\t\t\t\t\tEvent.cancel(evt);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DOM_VK_ENTER:\n\t\t\t\t\tcase DOM_VK_RETURN:\n\t\t\t\t\tcase DOM_VK_SPACE:\n\t\t\t\t\t\tif (settings.onAction) {\n\t\t\t\t\t\t\tsettings.onAction(focussedId);\n\t\t\t\t\t\t\tEvent.cancel(evt);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Set up state and listeners for each item.\n\t\t\teach(items, function(item, idx) {\n\t\t\t\tvar tabindex;\n\n\t\t\t\tif (!item.id) {\n\t\t\t\t\titem.id = dom.uniqueId('_mce_item_');\n\t\t\t\t}\n\n\t\t\t\tif (excludeFromTabOrder) {\n\t\t\t\t\tdom.bind(item.id, 'blur', itemBlurred);\n\t\t\t\t\ttabindex = '-1';\n\t\t\t\t} else {\n\t\t\t\t\ttabindex = (idx === 0 ? '0' : '-1');\n\t\t\t\t}\n\n\t\t\t\tdom.setAttrib(item.id, 'tabindex', tabindex);\n\t\t\t\tdom.bind(dom.get(item.id), 'focus', itemFocussed);\n\t\t\t});\n\t\t\t\n\t\t\t// Setup initial state for root element.\n\t\t\tif (items[0]){\n\t\t\t\tfocussedId = items[0].id;\n\t\t\t}\n\n\t\t\tdom.setAttrib(root, 'tabindex', '-1');\n\t\t\t\n\t\t\t// Setup listeners for root element.\n\t\t\tdom.bind(dom.get(root), 'focus', rootFocussed);\n\t\t\tdom.bind(dom.get(root), 'keydown', rootKeydown);\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/ui/ToolbarGroup.js":"/**\n * ToolbarGroup.js\n *\n * Copyright 2010, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n// Shorten class names\nvar dom = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event;\n/**\n * This class is used to group a set of toolbars together and control the keyboard navigation and focus.\n *\n * @class tinymce.ui.ToolbarGroup\n * @extends tinymce.ui.Container\n */\ntinymce.create('tinymce.ui.ToolbarGroup:tinymce.ui.Container', {\n\t/**\n\t * Renders the toolbar group as a HTML string.\n\t *\n\t * @method renderHTML\n\t * @return {String} HTML for the toolbar control.\n\t */\n\trenderHTML : function() {\n\t\tvar t = this, h = [], controls = t.controls, each = tinymce.each, settings = t.settings;\n\n\t\th.push('<div id=\"' + t.id + '\" role=\"group\" aria-labelledby=\"' + t.id + '_voice\">');\n\t\t//TODO: ACC test this out - adding a role = application for getting the landmarks working well.\n\t\th.push(\"<span role='application'>\");\n\t\th.push('<span id=\"' + t.id + '_voice\" class=\"mceVoiceLabel\" style=\"display:none;\">' + dom.encode(settings.name) + '</span>');\n\t\teach(controls, function(toolbar) {\n\t\t\th.push(toolbar.renderHTML());\n\t\t});\n\t\th.push(\"</span>\");\n\t\th.push('</div>');\n\n\t\treturn h.join('');\n\t},\n\t\n\tfocus : function() {\n\t\tvar t = this;\n\t\tdom.get(t.id).focus();\n\t},\n\t\n\tpostRender : function() {\n\t\tvar t = this, items = [];\n\n\t\teach(t.controls, function(toolbar) {\n\t\t\teach (toolbar.controls, function(control) {\n\t\t\t\tif (control.id) {\n\t\t\t\t\titems.push(control);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tt.keyNav = new tinymce.ui.KeyboardNavigation({\n\t\t\troot: t.id,\n\t\t\titems: items,\n\t\t\tonCancel: function() {\n\t\t\t\t//Move focus if webkit so that navigation back will read the item.\n\t\t\t\tif (tinymce.isWebKit) {\n\t\t\t\t\tdom.get(t.editor.id+\"_ifr\").focus();\n\t\t\t\t}\n\t\t\t\tt.editor.focus();\n\t\t\t},\n\t\t\texcludeFromTabOrder: !t.settings.tab_focus_toolbar\n\t\t});\n\t},\n\t\n\tdestroy : function() {\n\t\tvar self = this;\n\n\t\tself.parent();\n\t\tself.keyNav.destroy();\n\t\tEvent.clear(self.id);\n\t}\n});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/ui/MenuItem.js":"/**\n * MenuItem.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, walk = tinymce.walk;\n\n\t/**\n\t * This class is base class for all menu item types like DropMenus items etc. This class should not\n\t * be instantiated directly other menu items should inherit from this one.\n\t *\n\t * @class tinymce.ui.MenuItem\n\t * @extends tinymce.ui.Control\n\t */\n\ttinymce.create('tinymce.ui.MenuItem:tinymce.ui.Control', {\n\t\t/**\n\t\t * Constructs a new button control instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method MenuItem\n\t\t * @param {String} id Button control id for the button.\n\t\t * @param {Object} s Optional name/value settings object.\n\t\t */\n\t\tMenuItem : function(id, s) {\n\t\t\tthis.parent(id, s);\n\t\t\tthis.classPrefix = 'mceMenuItem';\n\t\t},\n\n\t\t/**\n\t\t * Sets the selected state for the control. This will add CSS classes to the\n\t\t * element that contains the control. So that it can be selected visually.\n\t\t *\n\t\t * @method setSelected\n\t\t * @param {Boolean} s Boolean state if the control should be selected or not.\n\t\t */\n\t\tsetSelected : function(s) {\n\t\t\tthis.setState('Selected', s);\n\t\t\tthis.setAriaProperty('checked', !!s);\n\t\t\tthis.selected = s;\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the control is selected or not.\n\t\t *\n\t\t * @method isSelected\n\t\t * @return {Boolean} true/false if the control is selected or not.\n\t\t */\n\t\tisSelected : function() {\n\t\t\treturn this.selected;\n\t\t},\n\n\t\t/**\n\t\t * Post render handler. This function will be called after the UI has been\n\t\t * rendered so that events can be added.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender : function() {\n\t\t\tvar t = this;\n\t\t\t\n\t\t\tt.parent();\n\n\t\t\t// Set pending state\n\t\t\tif (is(t.selected))\n\t\t\t\tt.setSelected(t.selected);\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/ui/ColorSplitButton.js":"/**\n * ColorSplitButton.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar DOM = tinymce.DOM, Event = tinymce.dom.Event, is = tinymce.is, each = tinymce.each;\n\n\t/**\n\t * This class is used to create UI color split button. A color split button will present show a small color picker\n\t * when you press the open menu.\n\t *\n\t * @class tinymce.ui.ColorSplitButton\n\t * @extends tinymce.ui.SplitButton\n\t */\n\ttinymce.create('tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton', {\n\t\t/**\n\t\t * Constructs a new color split button control instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method ColorSplitButton\n\t\t * @param {String} id Control id for the color split button.\n\t\t * @param {Object} s Optional name/value settings object.\n\t\t * @param {Editor} ed The editor instance this button is for.\n\t\t */\n\t\tColorSplitButton : function(id, s, ed) {\n\t\t\tvar t = this;\n\n\t\t\tt.parent(id, s, ed);\n\n\t\t\t/**\n\t\t\t * Settings object.\n\t\t\t *\n\t\t\t * @property settings\n\t\t\t * @type Object\n\t\t\t */\n\t\t\tt.settings = s = tinymce.extend({\n\t\t\t\tcolors : '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF',\n\t\t\t\tgrid_width : 8,\n\t\t\t\tdefault_color : '#888888'\n\t\t\t}, t.settings);\n\n\t\t\t/**\n\t\t\t * Fires when the menu is shown.\n\t\t\t *\n\t\t\t * @event onShowMenu\n\t\t\t */\n\t\t\tt.onShowMenu = new tinymce.util.Dispatcher(t);\n\n\t\t\t/**\n\t\t\t * Fires when the menu is hidden.\n\t\t\t *\n\t\t\t * @event onHideMenu\n\t\t\t */\n\t\t\tt.onHideMenu = new tinymce.util.Dispatcher(t);\n\n\t\t\t/**\n\t\t\t * Current color value.\n\t\t\t *\n\t\t\t * @property value\n\t\t\t * @type String\n\t\t\t */\n\t\t\tt.value = s.default_color;\n\t\t},\n\n\t\t/**\n\t\t * Shows the color menu. The color menu is a layer places under the button\n\t\t * and displays a table of colors for the user to pick from.\n\t\t *\n\t\t * @method showMenu\n\t\t */\n\t\tshowMenu : function() {\n\t\t\tvar t = this, r, p, e, p2;\n\n\t\t\tif (t.isDisabled())\n\t\t\t\treturn;\n\n\t\t\tif (!t.isMenuRendered) {\n\t\t\t\tt.renderMenu();\n\t\t\t\tt.isMenuRendered = true;\n\t\t\t}\n\n\t\t\tif (t.isMenuVisible)\n\t\t\t\treturn t.hideMenu();\n\n\t\t\te = DOM.get(t.id);\n\t\t\tDOM.show(t.id + '_menu');\n\t\t\tDOM.addClass(e, 'mceSplitButtonSelected');\n\t\t\tp2 = DOM.getPos(e);\n\t\t\tDOM.setStyles(t.id + '_menu', {\n\t\t\t\tleft : p2.x,\n\t\t\t\ttop : p2.y + e.clientHeight,\n\t\t\t\tzIndex : 200000\n\t\t\t});\n\t\t\te = 0;\n\n\t\t\tEvent.add(DOM.doc, 'mousedown', t.hideMenu, t);\n\t\t\tt.onShowMenu.dispatch(t);\n\n\t\t\tif (t._focused) {\n\t\t\t\tt._keyHandler = Event.add(t.id + '_menu', 'keydown', function(e) {\n\t\t\t\t\tif (e.keyCode == 27)\n\t\t\t\t\t\tt.hideMenu();\n\t\t\t\t});\n\n\t\t\t\tDOM.select('a', t.id + '_menu')[0].focus(); // Select first link\n\t\t\t}\n\n\t\t\tt.isMenuVisible = 1;\n\t\t},\n\n\t\t/**\n\t\t * Hides the color menu. The optional event parameter is used to check where the event occurred so it\n\t\t * doesn't close them menu if it was a event inside the menu.\n\t\t *\n\t\t * @method hideMenu\n\t\t * @param {Event} e Optional event object.\n\t\t */\n\t\thideMenu : function(e) {\n\t\t\tvar t = this;\n\n\t\t\tif (t.isMenuVisible) {\n\t\t\t\t// Prevent double toogles by canceling the mouse click event to the button\n\t\t\t\tif (e && e.type == \"mousedown\" && DOM.getParent(e.target, function(e) {return e.id === t.id + '_open';}))\n\t\t\t\t\treturn;\n\n\t\t\t\tif (!e || !DOM.getParent(e.target, '.mceSplitButtonMenu')) {\n\t\t\t\t\tDOM.removeClass(t.id, 'mceSplitButtonSelected');\n\t\t\t\t\tEvent.remove(DOM.doc, 'mousedown', t.hideMenu, t);\n\t\t\t\t\tEvent.remove(t.id + '_menu', 'keydown', t._keyHandler);\n\t\t\t\t\tDOM.hide(t.id + '_menu');\n\t\t\t\t}\n\n\t\t\t\tt.isMenuVisible = 0;\n\t\t\t\tt.onHideMenu.dispatch();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Renders the menu to the DOM.\n\t\t *\n\t\t * @method renderMenu\n\t\t */\n\t\trenderMenu : function() {\n\t\t\tvar t = this, m, i = 0, s = t.settings, n, tb, tr, w, context;\n\n\t\t\tw = DOM.add(s.menu_container, 'div', {role: 'listbox', id : t.id + '_menu', 'class' : s['menu_class'] + ' ' + s['class'], style : 'position:absolute;left:0;top:-1000px;'});\n\t\t\tm = DOM.add(w, 'div', {'class' : s['class'] + ' mceSplitButtonMenu'});\n\t\t\tDOM.add(m, 'span', {'class' : 'mceMenuLine'});\n\n\t\t\tn = DOM.add(m, 'table', {role: 'presentation', 'class' : 'mceColorSplitMenu'});\n\t\t\ttb = DOM.add(n, 'tbody');\n\n\t\t\t// Generate color grid\n\t\t\ti = 0;\n\t\t\teach(is(s.colors, 'array') ? s.colors : s.colors.split(','), function(c) {\n\t\t\t\tc = c.replace(/^#/, '');\n\n\t\t\t\tif (!i--) {\n\t\t\t\t\ttr = DOM.add(tb, 'tr');\n\t\t\t\t\ti = s.grid_width - 1;\n\t\t\t\t}\n\n\t\t\t\tn = DOM.add(tr, 'td');\n\t\t\t\tn = DOM.add(n, 'a', {\n\t\t\t\t\trole : 'option',\n\t\t\t\t\thref : 'javascript:;',\n\t\t\t\t\tstyle : {\n\t\t\t\t\t\tbackgroundColor : '#' + c\n\t\t\t\t\t},\n\t\t\t\t\t'title': t.editor.getLang('colors.' + c, c),\n\t\t\t\t\t'data-mce-color' : '#' + c\n\t\t\t\t});\n\n\t\t\t\tif (t.editor.forcedHighContrastMode) {\n\t\t\t\t\tn = DOM.add(n, 'canvas', { width: 16, height: 16, 'aria-hidden': 'true' });\n\t\t\t\t\tif (n.getContext && (context = n.getContext(\"2d\"))) {\n\t\t\t\t\t\tcontext.fillStyle = '#' + c;\n\t\t\t\t\t\tcontext.fillRect(0, 0, 16, 16);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No point leaving a canvas element around if it's not supported for drawing on anyway.\n\t\t\t\t\t\tDOM.remove(n);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (s.more_colors_func) {\n\t\t\t\tn = DOM.add(tb, 'tr');\n\t\t\t\tn = DOM.add(n, 'td', {colspan : s.grid_width, 'class' : 'mceMoreColors'});\n\t\t\t\tn = DOM.add(n, 'a', {role: 'option', id : t.id + '_more', href : 'javascript:;', onclick : 'return false;', 'class' : 'mceMoreColors'}, s.more_colors_title);\n\n\t\t\t\tEvent.add(n, 'click', function(e) {\n\t\t\t\t\ts.more_colors_func.call(s.more_colors_scope || this);\n\t\t\t\t\treturn Event.cancel(e); // Cancel to fix onbeforeunload problem\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tDOM.addClass(m, 'mceColorSplitMenu');\n\t\t\t\n\t\t\tnew tinymce.ui.KeyboardNavigation({\n\t\t\t\troot: t.id + '_menu',\n\t\t\t\titems: DOM.select('a', t.id + '_menu'),\n\t\t\t\tonCancel: function() {\n\t\t\t\t\tt.hideMenu();\n\t\t\t\t\tt.focus();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Prevent IE from scrolling and hindering click to occur #4019\n\t\t\tEvent.add(t.id + '_menu', 'mousedown', function(e) {return Event.cancel(e);});\n\n\t\t\tEvent.add(t.id + '_menu', 'click', function(e) {\n\t\t\t\tvar c;\n\n\t\t\t\te = DOM.getParent(e.target, 'a', tb);\n\n\t\t\t\tif (e && e.nodeName.toLowerCase() == 'a' && (c = e.getAttribute('data-mce-color')))\n\t\t\t\t\tt.setColor(c);\n\n\t\t\t\treturn Event.cancel(e); // Prevent IE auto save warning\n\t\t\t});\n\n\t\t\treturn w;\n\t\t},\n\n\t\t/**\n\t\t * Sets the current color for the control and hides the menu if it should be visible.\n\t\t *\n\t\t * @method setColor\n\t\t * @param {String} c Color code value in hex for example: #FF00FF\n\t\t */\n\t\tsetColor : function(c) {\n\t\t\tthis.displayColor(c);\n\t\t\tthis.hideMenu();\n\t\t\tthis.settings.onselect(c);\n\t\t},\n\t\t\n\t\t/**\n\t\t * Change the currently selected color for the control.\n\t\t *\n\t\t * @method displayColor\n\t\t * @param {String} c Color code value in hex for example: #FF00FF\n\t\t */\n\t\tdisplayColor : function(c) {\n\t\t\tvar t = this;\n\n\t\t\tDOM.setStyle(t.id + '_preview', 'backgroundColor', c);\n\n\t\t\tt.value = c;\n\t\t},\n\n\t\t/**\n\t\t * Post render event. This will be executed after the control has been rendered and can be used to\n\t\t * set states, add events to the control etc. It's recommended for subclasses of the control to call this method by using this.parent().\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender : function() {\n\t\t\tvar t = this, id = t.id;\n\n\t\t\tt.parent();\n\t\t\tDOM.add(id + '_action', 'div', {id : id + '_preview', 'class' : 'mceColorPreview'});\n\t\t\tDOM.setStyle(t.id + '_preview', 'backgroundColor', t.value);\n\t\t},\n\n\t\t/**\n\t\t * Destroys the control. This means it will be removed from the DOM and any\n\t\t * events tied to it will also be removed.\n\t\t *\n\t\t * @method destroy\n\t\t */\n\t\tdestroy : function() {\n\t\t\tthis.parent();\n\n\t\t\tEvent.clear(this.id + '_menu');\n\t\t\tEvent.clear(this.id + '_more');\n\t\t\tDOM.remove(this.id + '_menu');\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/ui/MenuButton.js":"/**\n * MenuButton.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each;\n\n\t/**\n\t * This class is used to create a UI button. A button is basically a link\n\t * that is styled to look like a button or icon.\n\t *\n\t * @class tinymce.ui.MenuButton\n\t * @extends tinymce.ui.Control\n\t * @example\n\t * // Creates a new plugin class and a custom menu button\n\t * tinymce.create('tinymce.plugins.ExamplePlugin', {\n\t *     createControl: function(n, cm) {\n\t *         switch (n) {\n\t *             case 'mymenubutton':\n\t *                 var c = cm.createSplitButton('mysplitbutton', {\n\t *                     title : 'My menu button',\n\t *                     image : 'some.gif'\n\t *                 });\n\t * \n\t *                 c.onRenderMenu.add(function(c, m) {\n\t *                     m.add({title : 'Some title', 'class' : 'mceMenuItemTitle'}).setDisabled(1);\n\t * \n\t *                     m.add({title : 'Some item 1', onclick : function() {\n\t *                         alert('Some item 1 was clicked.');\n\t *                     }});\n\t * \n\t *                     m.add({title : 'Some item 2', onclick : function() {\n\t *                         alert('Some item 2 was clicked.');\n\t *                     }});\n\t *               });\n\t * \n\t *               // Return the new menubutton instance\n\t *               return c;\n\t *         }\n\t * \n\t *         return null;\n\t *     }\n\t * });\n\t */\n\ttinymce.create('tinymce.ui.MenuButton:tinymce.ui.Button', {\n\t\t/**\n\t\t * Constructs a new split button control instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method MenuButton\n\t\t * @param {String} id Control id for the split button.\n\t\t * @param {Object} s Optional name/value settings object.\n\t\t * @param {Editor} ed Optional the editor instance this button is for.\n\t\t */\n\t\tMenuButton : function(id, s, ed) {\n\t\t\tthis.parent(id, s, ed);\n\n\t\t\t/**\n\t\t\t * Fires when the menu is rendered.\n\t\t\t *\n\t\t\t * @event onRenderMenu\n\t\t\t */\n\t\t\tthis.onRenderMenu = new tinymce.util.Dispatcher(this);\n\n\t\t\ts.menu_container = s.menu_container || DOM.doc.body;\n\t\t},\n\n\t\t/**\n\t\t * Shows the menu.\n\t\t *\n\t\t * @method showMenu\n\t\t */\n\t\tshowMenu : function() {\n\t\t\tvar t = this, p1, p2, e = DOM.get(t.id), m;\n\n\t\t\tif (t.isDisabled())\n\t\t\t\treturn;\n\n\t\t\tif (!t.isMenuRendered) {\n\t\t\t\tt.renderMenu();\n\t\t\t\tt.isMenuRendered = true;\n\t\t\t}\n\n\t\t\tif (t.isMenuVisible)\n\t\t\t\treturn t.hideMenu();\n\n\t\t\tp1 = DOM.getPos(t.settings.menu_container);\n\t\t\tp2 = DOM.getPos(e);\n\n\t\t\tm = t.menu;\n\t\t\tm.settings.offset_x = p2.x;\n\t\t\tm.settings.offset_y = p2.y;\n\t\t\tm.settings.vp_offset_x = p2.x;\n\t\t\tm.settings.vp_offset_y = p2.y;\n\t\t\tm.settings.keyboard_focus = t._focused;\n\t\t\tm.showMenu(0, e.clientHeight);\n\n\t\t\tEvent.add(DOM.doc, 'mousedown', t.hideMenu, t);\n\t\t\tt.setState('Selected', 1);\n\n\t\t\tt.isMenuVisible = 1;\n\t\t},\n\n\t\t/**\n\t\t * Renders the menu to the DOM.\n\t\t *\n\t\t * @method renderMenu\n\t\t */\n\t\trenderMenu : function() {\n\t\t\tvar t = this, m;\n\n\t\t\tm = t.settings.control_manager.createDropMenu(t.id + '_menu', {\n\t\t\t\tmenu_line : 1,\n\t\t\t\t'class' : this.classPrefix + 'Menu',\n\t\t\t\ticons : t.settings.icons\n\t\t\t});\n\n\t\t\tm.onHideMenu.add(function() {\n\t\t\t\tt.hideMenu();\n\t\t\t\tt.focus();\n\t\t\t});\n\n\t\t\tt.onRenderMenu.dispatch(t, m);\n\t\t\tt.menu = m;\n\t\t},\n\n\t\t/**\n\t\t * Hides the menu. The optional event parameter is used to check where the event occurred so it\n\t\t * doesn't close them menu if it was a event inside the menu.\n\t\t *\n\t\t * @method hideMenu\n\t\t * @param {Event} e Optional event object.\n\t\t */\n\t\thideMenu : function(e) {\n\t\t\tvar t = this;\n\n\t\t\t// Prevent double toogles by canceling the mouse click event to the button\n\t\t\tif (e && e.type == \"mousedown\" && DOM.getParent(e.target, function(e) {return e.id === t.id || e.id === t.id + '_open';}))\n\t\t\t\treturn;\n\n\t\t\tif (!e || !DOM.getParent(e.target, '.mceMenu')) {\n\t\t\t\tt.setState('Selected', 0);\n\t\t\t\tEvent.remove(DOM.doc, 'mousedown', t.hideMenu, t);\n\t\t\t\tif (t.menu)\n\t\t\t\t\tt.menu.hideMenu();\n\t\t\t}\n\n\t\t\tt.isMenuVisible = 0;\n\t\t},\n\n\t\t/**\n\t\t * Post render handler. This function will be called after the UI has been\n\t\t * rendered so that events can be added.\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender : function() {\n\t\t\tvar t = this, s = t.settings;\n\n\t\t\tEvent.add(t.id, 'click', function() {\n\t\t\t\tif (!t.isDisabled()) {\n\t\t\t\t\tif (s.onclick)\n\t\t\t\t\t\ts.onclick(t.value);\n\n\t\t\t\t\tt.showMenu();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/ui/DropMenu.js":"/**\n * DropMenu.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event, Element = tinymce.dom.Element;\n\n\t/**\n\t * This class is used to create drop menus, a drop menu can be a\n\t * context menu, or a menu for a list box or a menu bar.\n\t *\n\t * @class tinymce.ui.DropMenu\n\t * @extends tinymce.ui.Menu\n\t * @example\n\t * // Adds a menu to the currently active editor instance\n\t * var dm = tinyMCE.activeEditor.controlManager.createDropMenu('somemenu');\n\t * \n\t * // Add some menu items\n\t * dm.add({title : 'Menu 1', onclick : function() {\n\t *     alert('Item 1 was clicked.');\n\t * }});\n\t * \n\t * dm.add({title : 'Menu 2', onclick : function() {\n\t *     alert('Item 2 was clicked.');\n\t * }});\n\t * \n\t * // Adds a submenu\n\t * var sub1 = dm.addMenu({title : 'Menu 3'});\n\t * sub1.add({title : 'Menu 1.1', onclick : function() {\n\t *     alert('Item 1.1 was clicked.');\n\t * }});\n\t * \n\t * // Adds a horizontal separator\n\t * sub1.addSeparator();\n\t * \n\t * sub1.add({title : 'Menu 1.2', onclick : function() {\n\t *     alert('Item 1.2 was clicked.');\n\t * }});\n\t * \n\t * // Adds a submenu to the submenu\n\t * var sub2 = sub1.addMenu({title : 'Menu 1.3'});\n\t * \n\t * // Adds items to the sub sub menu\n\t * sub2.add({title : 'Menu 1.3.1', onclick : function() {\n\t *     alert('Item 1.3.1 was clicked.');\n\t * }});\n\t * \n\t * sub2.add({title : 'Menu 1.3.2', onclick : function() {\n\t *     alert('Item 1.3.2 was clicked.');\n\t * }});\n\t * \n\t * dm.add({title : 'Menu 4', onclick : function() {\n\t *     alert('Item 3 was clicked.');\n\t * }});\n\t * \n\t * // Display the menu at position 100, 100\n\t * dm.showMenu(100, 100);\n\t */\n\ttinymce.create('tinymce.ui.DropMenu:tinymce.ui.Menu', {\n\t\t/**\n\t\t * Constructs a new drop menu control instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method DropMenu\n\t\t * @param {String} id Button control id for the button.\n\t\t * @param {Object} s Optional name/value settings object.\n\t\t */\n\t\tDropMenu : function(id, s) {\n\t\t\ts = s || {};\n\t\t\ts.container = s.container || DOM.doc.body;\n\t\t\ts.offset_x = s.offset_x || 0;\n\t\t\ts.offset_y = s.offset_y || 0;\n\t\t\ts.vp_offset_x = s.vp_offset_x || 0;\n\t\t\ts.vp_offset_y = s.vp_offset_y || 0;\n\n\t\t\tif (is(s.icons) && !s.icons)\n\t\t\t\ts['class'] += ' mceNoIcons';\n\n\t\t\tthis.parent(id, s);\n\t\t\tthis.onShowMenu = new tinymce.util.Dispatcher(this);\n\t\t\tthis.onHideMenu = new tinymce.util.Dispatcher(this);\n\t\t\tthis.classPrefix = 'mceMenu';\n\t\t},\n\n\t\t/**\n\t\t * Created a new sub menu for the drop menu control.\n\t\t *\n\t\t * @method createMenu\n\t\t * @param {Object} s Optional name/value settings object.\n\t\t * @return {tinymce.ui.DropMenu} New drop menu instance.\n\t\t */\n\t\tcreateMenu : function(s) {\n\t\t\tvar t = this, cs = t.settings, m;\n\n\t\t\ts.container = s.container || cs.container;\n\t\t\ts.parent = t;\n\t\t\ts.constrain = s.constrain || cs.constrain;\n\t\t\ts['class'] = s['class'] || cs['class'];\n\t\t\ts.vp_offset_x = s.vp_offset_x || cs.vp_offset_x;\n\t\t\ts.vp_offset_y = s.vp_offset_y || cs.vp_offset_y;\n\t\t\ts.keyboard_focus = cs.keyboard_focus;\n\t\t\tm = new tinymce.ui.DropMenu(s.id || DOM.uniqueId(), s);\n\n\t\t\tm.onAddItem.add(t.onAddItem.dispatch, t.onAddItem);\n\n\t\t\treturn m;\n\t\t},\n\t\t\n\t\tfocus : function() {\n\t\t\tvar t = this;\n\t\t\tif (t.keyboardNav) {\n\t\t\t\tt.keyboardNav.focus();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Repaints the menu after new items have been added dynamically.\n\t\t *\n\t\t * @method update\n\t\t */\n\t\tupdate : function() {\n\t\t\tvar t = this, s = t.settings, tb = DOM.get('menu_' + t.id + '_tbl'), co = DOM.get('menu_' + t.id + '_co'), tw, th;\n\n\t\t\ttw = s.max_width ? Math.min(tb.clientWidth, s.max_width) : tb.clientWidth;\n\t\t\tth = s.max_height ? Math.min(tb.clientHeight, s.max_height) : tb.clientHeight;\n\n\t\t\tif (!DOM.boxModel)\n\t\t\t\tt.element.setStyles({width : tw + 2, height : th + 2});\n\t\t\telse\n\t\t\t\tt.element.setStyles({width : tw, height : th});\n\n\t\t\tif (s.max_width)\n\t\t\t\tDOM.setStyle(co, 'width', tw);\n\n\t\t\tif (s.max_height) {\n\t\t\t\tDOM.setStyle(co, 'height', th);\n\n\t\t\t\tif (tb.clientHeight < s.max_height)\n\t\t\t\t\tDOM.setStyle(co, 'overflow', 'hidden');\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Displays the menu at the specified cordinate.\n\t\t *\n\t\t * @method showMenu\n\t\t * @param {Number} x Horizontal position of the menu.\n\t\t * @param {Number} y Vertical position of the menu.\n\t\t * @param {Numner} px Optional parent X position used when menus are cascading.\n\t\t */\n\t\tshowMenu : function(x, y, px) {\n\t\t\tvar t = this, s = t.settings, co, vp = DOM.getViewPort(), w, h, mx, my, ot = 2, dm, tb, cp = t.classPrefix;\n\n\t\t\tt.collapse(1);\n\n\t\t\tif (t.isMenuVisible)\n\t\t\t\treturn;\n\n\t\t\tif (!t.rendered) {\n\t\t\t\tco = DOM.add(t.settings.container, t.renderNode());\n\n\t\t\t\teach(t.items, function(o) {\n\t\t\t\t\to.postRender();\n\t\t\t\t});\n\n\t\t\t\tt.element = new Element('menu_' + t.id, {blocker : 1, container : s.container});\n\t\t\t} else\n\t\t\t\tco = DOM.get('menu_' + t.id);\n\n\t\t\t// Move layer out of sight unless it's Opera since it scrolls to top of page due to an bug\n\t\t\tif (!tinymce.isOpera)\n\t\t\t\tDOM.setStyles(co, {left : -0xFFFF , top : -0xFFFF});\n\n\t\t\tDOM.show(co);\n\t\t\tt.update();\n\n\t\t\tx += s.offset_x || 0;\n\t\t\ty += s.offset_y || 0;\n\t\t\tvp.w -= 4;\n\t\t\tvp.h -= 4;\n\n\t\t\t// Move inside viewport if not submenu\n\t\t\tif (s.constrain) {\n\t\t\t\tw = co.clientWidth - ot;\n\t\t\t\th = co.clientHeight - ot;\n\t\t\t\tmx = vp.x + vp.w;\n\t\t\t\tmy = vp.y + vp.h;\n\n\t\t\t\tif ((x + s.vp_offset_x + w) > mx)\n\t\t\t\t\tx = px ? px - w : Math.max(0, (mx - s.vp_offset_x) - w);\n\n\t\t\t\tif ((y + s.vp_offset_y + h) > my)\n\t\t\t\t\ty = Math.max(0, (my - s.vp_offset_y) - h);\n\t\t\t}\n\n\t\t\tDOM.setStyles(co, {left : x , top : y});\n\t\t\tt.element.update();\n\n\t\t\tt.isMenuVisible = 1;\n\t\t\tt.mouseClickFunc = Event.add(co, 'click', function(e) {\n\t\t\t\tvar m;\n\n\t\t\t\te = e.target;\n\n\t\t\t\tif (e && (e = DOM.getParent(e, 'tr')) && !DOM.hasClass(e, cp + 'ItemSub')) {\n\t\t\t\t\tm = t.items[e.id];\n\n\t\t\t\t\tif (m.isDisabled())\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\tdm = t;\n\n\t\t\t\t\twhile (dm) {\n\t\t\t\t\t\tif (dm.hideMenu)\n\t\t\t\t\t\t\tdm.hideMenu();\n\n\t\t\t\t\t\tdm = dm.settings.parent;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m.settings.onclick)\n\t\t\t\t\t\tm.settings.onclick(e);\n\n\t\t\t\t\treturn Event.cancel(e); // Cancel to fix onbeforeunload problem\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (t.hasMenus()) {\n\t\t\t\tt.mouseOverFunc = Event.add(co, 'mouseover', function(e) {\n\t\t\t\t\tvar m, r, mi;\n\n\t\t\t\t\te = e.target;\n\t\t\t\t\tif (e && (e = DOM.getParent(e, 'tr'))) {\n\t\t\t\t\t\tm = t.items[e.id];\n\n\t\t\t\t\t\tif (t.lastMenu)\n\t\t\t\t\t\t\tt.lastMenu.collapse(1);\n\n\t\t\t\t\t\tif (m.isDisabled())\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\tif (e && DOM.hasClass(e, cp + 'ItemSub')) {\n\t\t\t\t\t\t\t//p = DOM.getPos(s.container);\n\t\t\t\t\t\t\tr = DOM.getRect(e);\n\t\t\t\t\t\t\tm.showMenu((r.x + r.w - ot), r.y - ot, r.x);\n\t\t\t\t\t\t\tt.lastMenu = m;\n\t\t\t\t\t\t\tDOM.addClass(DOM.get(m.id).firstChild, cp + 'ItemActive');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tEvent.add(co, 'keydown', t._keyHandler, t);\n\n\t\t\tt.onShowMenu.dispatch(t);\n\n\t\t\tif (s.keyboard_focus) { \n\t\t\t\tt._setupKeyboardNav(); \n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Hides the displayed menu.\n\t\t *\n\t\t * @method hideMenu\n\t\t */\n\t\thideMenu : function(c) {\n\t\t\tvar t = this, co = DOM.get('menu_' + t.id), e;\n\n\t\t\tif (!t.isMenuVisible)\n\t\t\t\treturn;\n\n\t\t\tif (t.keyboardNav) t.keyboardNav.destroy();\n\t\t\tEvent.remove(co, 'mouseover', t.mouseOverFunc);\n\t\t\tEvent.remove(co, 'click', t.mouseClickFunc);\n\t\t\tEvent.remove(co, 'keydown', t._keyHandler);\n\t\t\tDOM.hide(co);\n\t\t\tt.isMenuVisible = 0;\n\n\t\t\tif (!c)\n\t\t\t\tt.collapse(1);\n\n\t\t\tif (t.element)\n\t\t\t\tt.element.hide();\n\n\t\t\tif (e = DOM.get(t.id))\n\t\t\t\tDOM.removeClass(e.firstChild, t.classPrefix + 'ItemActive');\n\n\t\t\tt.onHideMenu.dispatch(t);\n\t\t},\n\n\t\t/**\n\t\t * Adds a new menu, menu item or sub classes of them to the drop menu.\n\t\t *\n\t\t * @method add\n\t\t * @param {tinymce.ui.Control} o Menu or menu item to add to the drop menu.\n\t\t * @return {tinymce.ui.Control} Same as the input control, the menu or menu item.\n\t\t */\n\t\tadd : function(o) {\n\t\t\tvar t = this, co;\n\n\t\t\to = t.parent(o);\n\n\t\t\tif (t.isRendered && (co = DOM.get('menu_' + t.id)))\n\t\t\t\tt._add(DOM.select('tbody', co)[0], o);\n\n\t\t\treturn o;\n\t\t},\n\n\t\t/**\n\t\t * Collapses the menu, this will hide the menu and all menu items.\n\t\t *\n\t\t * @method collapse\n\t\t * @param {Boolean} d Optional deep state. If this is set to true all children will be collapsed as well.\n\t\t */\n\t\tcollapse : function(d) {\n\t\t\tthis.parent(d);\n\t\t\tthis.hideMenu(1);\n\t\t},\n\n\t\t/**\n\t\t * Removes a specific sub menu or menu item from the drop menu.\n\t\t *\n\t\t * @method remove\n\t\t * @param {tinymce.ui.Control} o Menu item or menu to remove from drop menu.\n\t\t * @return {tinymce.ui.Control} Control instance or null if it wasn't found.\n\t\t */\n\t\tremove : function(o) {\n\t\t\tDOM.remove(o.id);\n\t\t\tthis.destroy();\n\n\t\t\treturn this.parent(o);\n\t\t},\n\n\t\t/**\n\t\t * Destroys the menu. This will remove the menu from the DOM and any events added to it etc.\n\t\t *\n\t\t * @method destroy\n\t\t */\n\t\tdestroy : function() {\n\t\t\tvar t = this, co = DOM.get('menu_' + t.id);\n\n\t\t\tif (t.keyboardNav) t.keyboardNav.destroy();\n\t\t\tEvent.remove(co, 'mouseover', t.mouseOverFunc);\n\t\t\tEvent.remove(DOM.select('a', co), 'focus', t.mouseOverFunc);\n\t\t\tEvent.remove(co, 'click', t.mouseClickFunc);\n\t\t\tEvent.remove(co, 'keydown', t._keyHandler);\n\n\t\t\tif (t.element)\n\t\t\t\tt.element.remove();\n\n\t\t\tDOM.remove(co);\n\t\t},\n\n\t\t/**\n\t\t * Renders the specified menu node to the dom.\n\t\t *\n\t\t * @method renderNode\n\t\t * @return {Element} Container element for the drop menu.\n\t\t */\n\t\trenderNode : function() {\n\t\t\tvar t = this, s = t.settings, n, tb, co, w;\n\n\t\t\tw = DOM.create('div', {role: 'listbox', id : 'menu_' + t.id, 'class' : s['class'], 'style' : 'position:absolute;left:0;top:0;z-index:200000;outline:0'});\n\t\t\tif (t.settings.parent) {\n\t\t\t\tDOM.setAttrib(w, 'aria-parent', 'menu_' + t.settings.parent.id);\n\t\t\t}\n\t\t\tco = DOM.add(w, 'div', {role: 'presentation', id : 'menu_' + t.id + '_co', 'class' : t.classPrefix + (s['class'] ? ' ' + s['class'] : '')});\n\t\t\tt.element = new Element('menu_' + t.id, {blocker : 1, container : s.container});\n\n\t\t\tif (s.menu_line)\n\t\t\t\tDOM.add(co, 'span', {'class' : t.classPrefix + 'Line'});\n\n//\t\t\tn = DOM.add(co, 'div', {id : 'menu_' + t.id + '_co', 'class' : 'mceMenuContainer'});\n\t\t\tn = DOM.add(co, 'table', {role: 'presentation', id : 'menu_' + t.id + '_tbl', border : 0, cellPadding : 0, cellSpacing : 0});\n\t\t\ttb = DOM.add(n, 'tbody');\n\n\t\t\teach(t.items, function(o) {\n\t\t\t\tt._add(tb, o);\n\t\t\t});\n\n\t\t\tt.rendered = true;\n\n\t\t\treturn w;\n\t\t},\n\n\t\t// Internal functions\n\t\t_setupKeyboardNav : function(){\n\t\t\tvar contextMenu, menuItems, t=this; \n\t\t\tcontextMenu = DOM.select('#menu_' + t.id)[0];\n\t\t\tmenuItems = DOM.select('a[role=option]', 'menu_' + t.id);\n\t\t\tmenuItems.splice(0,0,contextMenu);\n\t\t\tt.keyboardNav = new tinymce.ui.KeyboardNavigation({\n\t\t\t\troot: 'menu_' + t.id,\n\t\t\t\titems: menuItems,\n\t\t\t\tonCancel: function() {\n\t\t\t\t\tt.hideMenu();\n\t\t\t\t},\n\t\t\t\tenableUpDown: true\n\t\t\t});\n\t\t\tcontextMenu.focus();\n\t\t},\n\n\t\t_keyHandler : function(evt) {\n\t\t\tvar t = this, e;\n\t\t\tswitch (evt.keyCode) {\n\t\t\t\tcase 37: // Left\n\t\t\t\t\tif (t.settings.parent) {\n\t\t\t\t\t\tt.hideMenu();\n\t\t\t\t\t\tt.settings.parent.focus();\n\t\t\t\t\t\tEvent.cancel(evt);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 39: // Right\n\t\t\t\t\tif (t.mouseOverFunc)\n\t\t\t\t\t\tt.mouseOverFunc(evt);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\n\t\t_add : function(tb, o) {\n\t\t\tvar n, s = o.settings, a, ro, it, cp = this.classPrefix, ic;\n\n\t\t\tif (s.separator) {\n\t\t\t\tro = DOM.add(tb, 'tr', {id : o.id, 'class' : cp + 'ItemSeparator'});\n\t\t\t\tDOM.add(ro, 'td', {'class' : cp + 'ItemSeparator'});\n\n\t\t\t\tif (n = ro.previousSibling)\n\t\t\t\t\tDOM.addClass(n, 'mceLast');\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tn = ro = DOM.add(tb, 'tr', {id : o.id, 'class' : cp + 'Item ' + cp + 'ItemEnabled'});\n\t\t\tn = it = DOM.add(n, s.titleItem ? 'th' : 'td');\n\t\t\tn = a = DOM.add(n, 'a', {id: o.id + '_aria',  role: s.titleItem ? 'presentation' : 'option', href : 'javascript:;', onclick : \"return false;\", onmousedown : 'return false;'});\n\n\t\t\tif (s.parent) {\n\t\t\t\tDOM.setAttrib(a, 'aria-haspopup', 'true');\n\t\t\t\tDOM.setAttrib(a, 'aria-owns', 'menu_' + o.id);\n\t\t\t}\n\n\t\t\tDOM.addClass(it, s['class']);\n//\t\t\tn = DOM.add(n, 'span', {'class' : 'item'});\n\n\t\t\tic = DOM.add(n, 'span', {'class' : 'mceIcon' + (s.icon ? ' mce_' + s.icon : '')});\n\n\t\t\tif (s.icon_src)\n\t\t\t\tDOM.add(ic, 'img', {src : s.icon_src});\n\n\t\t\tn = DOM.add(n, s.element || 'span', {'class' : 'mceText', title : o.settings.title}, o.settings.title);\n\n\t\t\tif (o.settings.style)\n\t\t\t\tDOM.setAttrib(n, 'style', o.settings.style);\n\n\t\t\tif (tb.childNodes.length == 1)\n\t\t\t\tDOM.addClass(ro, 'mceFirst');\n\n\t\t\tif ((n = ro.previousSibling) && DOM.hasClass(n, cp + 'ItemSeparator'))\n\t\t\t\tDOM.addClass(ro, 'mceFirst');\n\n\t\t\tif (o.collapse)\n\t\t\t\tDOM.addClass(ro, cp + 'ItemSub');\n\n\t\t\tif (n = ro.previousSibling)\n\t\t\t\tDOM.removeClass(n, 'mceLast');\n\n\t\t\tDOM.addClass(ro, 'mceLast');\n\t\t}\n\t});\n})(tinymce);","Magento_Tinymce3/tiny_mce/classes/ui/Control.js":"/**\n * Control.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\t// Shorten class names\n\tvar DOM = tinymce.DOM, is = tinymce.is;\n\n\t/**\n\t * This class is the base class for all controls like buttons, toolbars, containers. This class should not\n\t * be instantiated directly other controls should inherit from this one.\n\t *\n\t * @class tinymce.ui.Control\n\t */\n\ttinymce.create('tinymce.ui.Control', {\n\t\t/**\n\t\t * Constructs a new control instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method Control\n\t\t * @param {String} id Control id.\n\t\t * @param {Object} s Optional name/value settings object.\n\t\t */\n\t\tControl : function(id, s, editor) {\n\t\t\tthis.id = id;\n\t\t\tthis.settings = s = s || {};\n\t\t\tthis.rendered = false;\n\t\t\tthis.onRender = new tinymce.util.Dispatcher(this);\n\t\t\tthis.classPrefix = '';\n\t\t\tthis.scope = s.scope || this;\n\t\t\tthis.disabled = 0;\n\t\t\tthis.active = 0;\n\t\t\tthis.editor = editor;\n\t\t},\n\t\t\n\t\tsetAriaProperty : function(property, value) {\n\t\t\tvar element = DOM.get(this.id + '_aria') || DOM.get(this.id);\n\t\t\tif (element) {\n\t\t\t\tDOM.setAttrib(element, 'aria-' + property, !!value);\n\t\t\t}\n\t\t},\n\t\t\n\t\tfocus : function() {\n\t\t\tDOM.get(this.id).focus();\n\t\t},\n\n\t\t/**\n\t\t * Sets the disabled state for the control. This will add CSS classes to the\n\t\t * element that contains the control. So that it can be disabled visually.\n\t\t *\n\t\t * @method setDisabled\n\t\t * @param {Boolean} s Boolean state if the control should be disabled or not.\n\t\t */\n\t\tsetDisabled : function(s) {\n\t\t\tif (s != this.disabled) {\n\t\t\t\tthis.setAriaProperty('disabled', s);\n\n\t\t\t\tthis.setState('Disabled', s);\n\t\t\t\tthis.setState('Enabled', !s);\n\t\t\t\tthis.disabled = s;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the control is disabled or not. This is a method since you can then\n\t\t * choose to check some class or some internal bool state in subclasses.\n\t\t *\n\t\t * @method isDisabled\n\t\t * @return {Boolean} true/false if the control is disabled or not.\n\t\t */\n\t\tisDisabled : function() {\n\t\t\treturn this.disabled;\n\t\t},\n\n\t\t/**\n\t\t * Sets the activated state for the control. This will add CSS classes to the\n\t\t * element that contains the control. So that it can be activated visually.\n\t\t *\n\t\t * @method setActive\n\t\t * @param {Boolean} s Boolean state if the control should be activated or not.\n\t\t */\n\t\tsetActive : function(s) {\n\t\t\tif (s != this.active) {\n\t\t\t\tthis.setState('Active', s);\n\t\t\t\tthis.active = s;\n\t\t\t\tthis.setAriaProperty('pressed', s);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the control is disabled or not. This is a method since you can then\n\t\t * choose to check some class or some internal bool state in subclasses.\n\t\t *\n\t\t * @method isActive\n\t\t * @return {Boolean} true/false if the control is disabled or not.\n\t\t */\n\t\tisActive : function() {\n\t\t\treturn this.active;\n\t\t},\n\n\t\t/**\n\t\t * Sets the specified class state for the control.\n\t\t *\n\t\t * @method setState\n\t\t * @param {String} c Class name to add/remove depending on state.\n\t\t * @param {Boolean} s True/false state if the class should be removed or added.\n\t\t */\n\t\tsetState : function(c, s) {\n\t\t\tvar n = DOM.get(this.id);\n\n\t\t\tc = this.classPrefix + c;\n\n\t\t\tif (s)\n\t\t\t\tDOM.addClass(n, c);\n\t\t\telse\n\t\t\t\tDOM.removeClass(n, c);\n\t\t},\n\n\t\t/**\n\t\t * Returns true/false if the control has been rendered or not.\n\t\t *\n\t\t * @method isRendered\n\t\t * @return {Boolean} State if the control has been rendered or not.\n\t\t */\n\t\tisRendered : function() {\n\t\t\treturn this.rendered;\n\t\t},\n\n\t\t/**\n\t\t * Renders the control as a HTML string. This method is much faster than using the DOM and when\n\t\t * creating a whole toolbar with buttons it does make a lot of difference.\n\t\t *\n\t\t * @method renderHTML\n\t\t * @return {String} HTML for the button control element.\n\t\t */\n\t\trenderHTML : function() {\n\t\t},\n\n\t\t/**\n\t\t * Renders the control to the specified container element.\n\t\t *\n\t\t * @method renderTo\n\t\t * @param {Element} n HTML DOM element to add control to.\n\t\t */\n\t\trenderTo : function(n) {\n\t\t\tDOM.setHTML(n, this.renderHTML());\n\t\t},\n\n\t\t/**\n\t\t * Post render event. This will be executed after the control has been rendered and can be used to\n\t\t * set states, add events to the control etc. It's recommended for subclasses of the control to call this method by using this.parent().\n\t\t *\n\t\t * @method postRender\n\t\t */\n\t\tpostRender : function() {\n\t\t\tvar t = this, b;\n\n\t\t\t// Set pending states\n\t\t\tif (is(t.disabled)) {\n\t\t\t\tb = t.disabled;\n\t\t\t\tt.disabled = -1;\n\t\t\t\tt.setDisabled(b);\n\t\t\t}\n\n\t\t\tif (is(t.active)) {\n\t\t\t\tb = t.active;\n\t\t\t\tt.active = -1;\n\t\t\t\tt.setActive(b);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Removes the control. This means it will be removed from the DOM and any\n\t\t * events tied to it will also be removed.\n\t\t *\n\t\t * @method remove\n\t\t */\n\t\tremove : function() {\n\t\t\tDOM.remove(this.id);\n\t\t\tthis.destroy();\n\t\t},\n\n\t\t/**\n\t\t * Destroys the control will free any memory by removing event listeners etc.\n\t\t *\n\t\t * @method destroy\n\t\t */\n\t\tdestroy : function() {\n\t\t\ttinymce.dom.Event.clear(this.id);\n\t\t}\n\t});\n})(tinymce);","Magento_Tinymce3/tiny_mce/classes/firebug/firebug-lite.js":"var firebug = {\n  version:[1.23,20090309],\n  el:{}, \n  env:{ \n    \"cache\":{},\n    \"extConsole\":null,\n    \"css\":\"http://getfirebug.com/releases/lite/1.2/firebug-lite.css\", \n    \"debug\":true,\n    \"detectFirebug\":true,\n    \"dIndex\":\"console\", \n    \"height\":295,\n    \"hideDOMFunctions\":false,\n    \"init\":false, \n    \"isPopup\":false,\n    \"liteFilename\":\"firebug-lite.js\",\n    \"minimized\":false,\n    \"openInPopup\": false,\n    \"override\":true,\n    \"ml\":false,\n    \"popupWin\":null,\n    \"showIconWhenHidden\":true,\n    \"targetWindow\":undefined,\n    \"popupTop\":1,\n    \"popupLeft\":1,\n    \"popupWidth\":undefined,\n    \"popupHeight\":undefined\n  },\n  initConsole:function(){\n    /* \n     * initialize the console - user defined values are not available within this method because FBLite is not yet initialized\n     */\n    var command;\n    try{\n      if((!window.console || (window.console && !window.console.firebug)) || (firebug.env.override && !(/Firefox\\/3/i.test(navigator.userAgent)))){\n        window.console = { \"provider\":\"Firebug Lite\" };\n\n        for(command in firebug.d.console.cmd){\n          window.console[command] = firebug.lib.util.Curry(firebug.d.console.run,window,command);\n        };\n      }\n      /*window.onerror = function(_message,_file,_line){\n        firebug.d.console.run('error',firebug.lib.util.String.format('{0} ({1},{2})',_message,firebug.getFileName(_file),_line));\n      };*/\n      } catch(e){}\n  },\n  overrideConsole:function(){\n    with (firebug){\n      env.override=true;\n      try{\n        env.extConsole=window.console;\n      } catch(e){}\n      initConsole();\n    }\n  },\n  restoreConsole:function(){\n    with(firebug){\n      if(env.extConsole){\n        env.override=false;\n        try{\n          window.console=env.extConsole;\n        } catch(e){}\n        env.extConsole=null;\n      }\n    }\n  },\n  init:function(_css){\n    var iconTitle = \"Click here or press F12, (CTRL|CMD)+SHIFT+L or SHIFT+ENTER to show Firebug Lite. CTRL|CMD click this icon to hide it.\";\n  \n    with(firebug){\n      if(document.getElementsByTagName('html')[0].attributes.getNamedItem('debug')){\n        env.debug = document.getElementsByTagName('html')[0].attributes.getNamedItem('debug').nodeValue !== \"false\";\n      }\n            \n      if(env.isPopup) {\n        env.openInPopup = false;\n        env.targetWindow = window.opener;\n        env.popupWidth = window.opener.firebug.env.popupWidth || window.opener.firebug.lib.util.GetViewport().width;\n        env.popupHeight = window.opener.firebug.env.popupHeight || window.opener.firebug.lib.util.GetViewport().height;\n      } else {\n        env.targetWindow = window;\n        env.popupWidth = env.popupWidth || lib.util.GetViewport().width;\n        env.popupHeight = env.popupHeight || lib.util.GetViewport().height;\n      }\n\n      settings.readCookie();\n      \n      if(env.init || (env.detectFirebug && window.console && window.console.firebug)) {\n        return;\n      }\n\n      document.getElementsByTagName(\"head\")[0].appendChild(\n        new lib.element(\"link\").attribute.set(\"rel\",\"stylesheet\").attribute.set(\"type\",\"text/css\").attribute.set(\"href\",env.css).element\n      );\n\n      if(env.override){\n        overrideConsole();\n      }\n      \n      /* \n       * Firebug Icon\n       */\n      el.firebugIcon = new lib.element(\"div\").attribute.set(\"id\",\"firebugIconDiv\").attribute.set(\"title\",iconTitle).attribute.set(\"alt\",iconTitle).event.addListener(\"mousedown\",win.iconClicked).insert(document.body);\n      \n      /* \n       * main interface\n       */\n      el.content = {};\n      el.mainiframe = new lib.element(\"IFRAME\").attribute.set(\"id\",\"FirebugIFrame\").environment.addStyle({ \"display\":\"none\", \"width\":lib.util.GetViewport().width+\"px\" }).insert(document.body);\n      el.main = new lib.element(\"DIV\").attribute.set(\"id\",\"Firebug\").environment.addStyle({ \"display\":\"none\", \"width\":lib.util.GetViewport().width+\"px\" }).insert(document.body);\n      if(!env.isPopup){\n        el.resizer = new lib.element(\"DIV\").attribute.addClass(\"Resizer\").event.addListener(\"mousedown\",win.resizer.start).insert(el.main);\n      }\n      el.header = new lib.element(\"DIV\").attribute.addClass(\"Header\").insert(el.main);\n      el.left = {};\n      el.left.container = new lib.element(\"DIV\").attribute.addClass(\"Left\").insert(el.main);\n      el.right = {};\n      el.right.container = new lib.element(\"DIV\").attribute.addClass(\"Right\").insert(el.main);\n      el.main.child.add(new lib.element(\"DIV\").attribute.addClass('Clear'));\n\n      /*\n       * buttons\n       */\n      el.button = {};\n      el.button.container = new lib.element(\"DIV\").attribute.addClass(\"ButtonContainer\").insert(el.header);\n      el.button.logo = new lib.element(\"A\").attribute.set(\"title\",\"Firebug Lite\").attribute.set(\"target\",\"_blank\").attribute.set(\"href\",\"http://getfirebug.com/lite.html\").update(\"&nbsp;\").attribute.addClass(\"Button Logo\").insert(el.button.container);\n      el.button.inspect = new lib.element(\"A\").attribute.addClass(\"Button\").event.addListener(\"click\",env.targetWindow.firebug.d.inspector.toggle).update(\"Inspect\").insert(el.button.container);\n      el.button.dock = new lib.element(\"A\").attribute.addClass(\"Button Dock\").event.addListener(\"click\", win.dock).insert(el.button.container);\n      el.button.newWindow = new lib.element(\"A\").attribute.addClass(\"Button NewWindow\").event.addListener(\"click\", win.newWindow).insert(el.button.container);\n\n      if(!env.isPopup){\n        el.button.maximize = new lib.element(\"A\").attribute.addClass(\"Button Maximize\").event.addListener(\"click\",win.maximize).insert(el.button.container);\n        el.button.minimize = new lib.element(\"A\").attribute.addClass(\"Button Minimize\").event.addListener(\"click\",win.minimize).insert(el.button.container);\n        el.button.close = new lib.element(\"A\").attribute.addClass(\"Button Close\").event.addListener(\"click\",win.hide).insert(el.button.container);\n      }\n\n      if(lib.env.ie||lib.env.webkit){\n        el.button.container.environment.addStyle({ \"paddingTop\":\"12px\" });\n      }\n\n      /*\n       * navigation\n       */\n      el.nav = {};\n      el.nav.container = new lib.element(\"DIV\").attribute.addClass(\"Nav\").insert(el.left.container);\n      el.nav.console = new lib.element(\"A\").attribute.addClass(\"Tab Selected\").event.addListener(\"click\",lib.util.Curry(d.navigate,window,\"console\")).update(\"Console\").insert(el.nav.container);\n      el.nav.html = new lib.element(\"A\").attribute.addClass(\"Tab\").update(\"HTML\").event.addListener(\"click\",lib.util.Curry(d.navigate,window,\"html\")).insert(el.nav.container);\n      el.nav.css = new lib.element(\"A\").attribute.addClass(\"Tab\").update(\"CSS\").event.addListener(\"click\",lib.util.Curry(d.navigate,window,\"css\")).insert(el.nav.container);\n      if(!env.isPopup){\n        el.nav.scripts = new lib.element(\"A\").attribute.addClass(\"Tab\").update(\"Script\").event.addListener(\"click\",lib.util.Curry(d.navigate,window,\"scripts\")).insert(el.nav.container);\n      }\n      el.nav.dom = new lib.element(\"A\").attribute.addClass(\"Tab\").update(\"DOM\").event.addListener(\"click\",lib.util.Curry(d.navigate,env.targetWindow,\"dom\")).insert(el.nav.container);\n      el.nav.xhr = new lib.element(\"A\").attribute.addClass(\"Tab\").update(\"XHR\").event.addListener(\"click\",lib.util.Curry(d.navigate,window,\"xhr\")).insert(el.nav.container);\n      el.nav.optionsdiv = new lib.element(\"DIV\").attribute.addClass(\"Settings\").insert(el.nav.container);\n      el.nav.options = new lib.element(\"A\").attribute.addClass(\"Tab\").update(\"Options&nbsp;&or;\").event.addListener(\"click\", settings.toggle).insert(el.nav.optionsdiv);\n      \n      /*\n       * inspector\n       */\n      el.borderInspector = new lib.element(\"DIV\").attribute.set(\"id\",\"FirebugBorderInspector\").event.addListener(\"click\",listen.inspector).insert(document.body);\n      el.bgInspector = new lib.element(\"DIV\").attribute.set(\"id\",\"FirebugBGInspector\").insert(document.body);\n\n      /*\n       * console\n       */\n      el.left.console = {};\n      el.left.console.container = new lib.element(\"DIV\").attribute.addClass(\"Console\").insert(el.left.container);\n      el.left.console.mlButton = new lib.element(\"A\").attribute.addClass(\"MLButton\").event.addListener(\"click\",d.console.toggleML).insert(el.left.console.container);\n      el.left.console.monitor = new lib.element(\"DIV\").insert(\n          new lib.element(\"DIV\").attribute.addClass(\"Monitor\").insert(el.left.console.container)\n      );\n      el.left.console.container.child.add(\n          new lib.element(\"DIV\").attribute.addClass(\"InputArrow\").update(\">>>\")\n      );\n      el.left.console.input = new lib.element(\"INPUT\").attribute.set(\"type\",\"text\").attribute.addClass(\"Input\").event.addListener(\"keydown\",listen.consoleTextbox).insert(\n          new lib.element(\"DIV\").attribute.addClass(\"InputContainer\").insert(el.left.console.container)\n      );\n\n      el.right.console = {};\n      el.right.console.container = new lib.element(\"DIV\").attribute.addClass(\"Console Container\").insert(el.right.container);\n      el.right.console.mlButton = new lib.element(\"A\").attribute.addClass(\"MLButton CloseML\").event.addListener(\"click\",d.console.toggleML).insert(el.right.console.container);\n      el.right.console.input = new lib.element(\"TEXTAREA\").attribute.addClass(\"Input\").insert(el.right.console.container);\n      el.right.console.input.event.addListener(\"keydown\",lib.util.Curry(tab,window,el.right.console.input.element));\n      el.right.console.run = new lib.element(\"A\").attribute.addClass(\"Button\").event.addListener(\"click\",listen.runMultiline).update(\"Run\").insert(el.right.console.container);\n      el.right.console.clear = new lib.element(\"A\").attribute.addClass(\"Button\").event.addListener(\"click\",lib.util.Curry(d.clean,window,el.right.console.input)).update(\"Clear\").insert(el.right.console.container);\n\n      el.button.console = {};\n      el.button.console.container = new lib.element(\"DIV\").attribute.addClass(\"ButtonSet\").insert(el.button.container);\n      el.button.console.clear = new lib.element(\"A\").attribute.addClass(\"Button\").event.addListener(\"click\",d.console.clear).update(\"Clear\").insert(el.button.console.container);\n\n      /*\n       * html\n       */\n\n      el.left.html = {};\n      el.left.html.container = new lib.element(\"DIV\").attribute.addClass(\"HTML\").insert(el.left.container);\n\n      el.right.html = {};\n      el.right.html.container = new lib.element(\"DIV\").attribute.addClass(\"HTML Container\").insert(el.right.container);\n\n      el.right.html.nav = {};\n      el.right.html.nav.container = new lib.element(\"DIV\").attribute.addClass(\"Nav\").insert(el.right.html.container);\n      el.right.html.nav.computedStyle = new lib.element(\"A\").attribute.addClass(\"Tab Selected\").event.addListener(\"click\",lib.util.Curry(d.html.navigate,firebug,\"computedStyle\")).update(\"Computed Style\").insert(el.right.html.nav.container);\n      el.right.html.nav.dom = new lib.element(\"A\").attribute.addClass(\"Tab\").event.addListener(\"click\",lib.util.Curry(d.html.navigate,firebug,\"dom\")).update(\"DOM\").insert(el.right.html.nav.container);\n\n      el.right.html.content = new lib.element(\"DIV\").attribute.addClass(\"Content\").insert(el.right.html.container);\n\n      el.button.html = {};\n      el.button.html.container = new lib.element(\"DIV\").attribute.addClass(\"ButtonSet HTML\").insert(el.button.container);\n\n      /*\n       * css\n       */\n\n      el.left.css = {};\n      el.left.css.container = new lib.element(\"DIV\").attribute.addClass(\"CSS\").insert(el.left.container);\n\n      el.right.css = {};\n      el.right.css.container = new lib.element(\"DIV\").attribute.addClass(\"CSS Container\").insert(el.right.container);\n\n      el.right.css.nav = {};\n      el.right.css.nav.container = new lib.element(\"DIV\").attribute.addClass(\"Nav\").insert(el.right.css.container);\n      el.right.css.nav.runCSS = new lib.element(\"A\").attribute.addClass(\"Tab Selected\").update(\"Run CSS\").insert(el.right.css.nav.container);\n\n      el.right.css.mlButton = new lib.element(\"A\").attribute.addClass(\"MLButton CloseML\").event.addListener(\"click\",d.console.toggleML).insert(el.right.css.container);\n      el.right.css.input = new lib.element(\"TEXTAREA\").attribute.addClass(\"Input\").insert(el.right.css.container);\n      el.right.css.input.event.addListener(\"keydown\",lib.util.Curry(firebug.tab,window,el.right.css.input.element));\n      el.right.css.run = new lib.element(\"A\").attribute.addClass(\"Button\").event.addListener(\"click\",listen.runCSS).update(\"Run\").insert(el.right.css.container);\n      el.right.css.clear = new lib.element(\"A\").attribute.addClass(\"Button\").event.addListener(\"click\",lib.util.Curry(d.clean,window,el.right.css.input)).update(\"Clear\").insert(el.right.css.container);\n\n      el.button.css = {};\n      el.button.css.container = new lib.element(\"DIV\").attribute.addClass(\"ButtonSet CSS\").insert(el.button.container);\n      el.button.css.selectbox = new lib.element(\"SELECT\").event.addListener(\"change\",listen.cssSelectbox).insert(el.button.css.container);\n\n      /*\n       * scripts\n       */\n\n      el.left.scripts = {};\n      el.left.scripts.container = new lib.element(\"DIV\").attribute.addClass(\"Scripts\").insert(el.left.container);\n\n      el.right.scripts = {};\n      el.right.scripts.container = new lib.element(\"DIV\").attribute.addClass(\"Scripts Container\").insert(el.right.container);\n\n      el.button.scripts = {};\n      el.button.scripts.container = new lib.element(\"DIV\").attribute.addClass(\"ButtonSet Scripts\").insert(el.button.container);\n      el.button.scripts.selectbox = new lib.element(\"SELECT\").event.addListener(\"change\",listen.scriptsSelectbox).insert(el.button.scripts.container);\n      el.button.scripts.lineNumbers = new lib.element(\"A\").attribute.addClass(\"Button\").event.addListener(\"click\",d.scripts.toggleLineNumbers).update(\"Show Line Numbers\").insert(el.button.scripts.container);\n\n      /*\n       * dom\n       */\n\n      el.left.dom = {};\n      el.left.dom.container = new lib.element(\"DIV\").attribute.addClass(\"DOM\").insert(el.left.container);\n\n      el.right.dom = {};\n      el.right.dom.container = new lib.element(\"DIV\").attribute.addClass(\"DOM Container\").insert(el.right.container);\n\n      el.button.dom = {};\n      el.button.dom.container = new lib.element(\"DIV\").attribute.addClass(\"ButtonSet DOM\").insert(el.button.container);\n      el.button.dom.label = new lib.element(\"LABEL\").update(\"Object Path:\").insert(el.button.dom.container);\n      el.button.dom.textbox = new lib.element(\"INPUT\").event.addListener(\"keydown\",listen.domTextbox).update(env.isPopup?\"window.opener\":\"window\").insert(el.button.dom.container);\n\n      /*\n       * str\n       */\n      el.left.str = {};\n      el.left.str.container = new lib.element(\"DIV\").attribute.addClass(\"STR\").insert(el.left.container);\n\n      el.right.str = {};\n      el.right.str.container = new lib.element(\"DIV\").attribute.addClass(\"STR\").insert(el.left.container);\n\n      el.button.str = {};\n      el.button.str.container = new lib.element(\"DIV\").attribute.addClass(\"ButtonSet XHR\").insert(el.button.container);\n      el.button.str.watch = new lib.element(\"A\").attribute.addClass(\"Button\").event.addListener(\"click\",lib.util.Curry(d.navigate,window,\"xhr\")).update(\"Back\").insert(el.button.str.container);\n\n      /*\n       * xhr\n       */\n      el.left.xhr = {};\n      el.left.xhr.container = new lib.element(\"DIV\").attribute.addClass(\"XHR\").insert(el.left.container);\n\n      el.right.xhr = {};\n      el.right.xhr.container = new lib.element(\"DIV\").attribute.addClass(\"XHR\").insert(el.left.container);\n\n\n      el.button.xhr = {};\n      el.button.xhr.container = new lib.element(\"DIV\").attribute.addClass(\"ButtonSet XHR\").insert(el.button.container);\n      el.button.xhr.label = new lib.element(\"LABEL\").update(\"XHR Path:\").insert(el.button.xhr.container);\n      el.button.xhr.textbox = new lib.element(\"INPUT\").event.addListener(\"keydown\",listen.xhrTextbox).insert(el.button.xhr.container);\n      el.button.xhr.watch = new lib.element(\"A\").attribute.addClass(\"Button\").event.addListener(\"click\",listen.addXhrObject).update(\"Watch\").insert(el.button.xhr.container);\n\n      /*\n       * settings\n       */\n      el.settings = {};\n      el.settings.container = new lib.element(\"DIV\").child.add(\n        new lib.element(\"DIV\").attribute.addClass(\"Header\").child.add(\n          new lib.element().attribute.addClass(\"Title\").update('Firebug Lite Settings')\n        )\n      ).attribute.addClass(\"SettingsDiv\").insert(el.main);\n      el.settings.content = new lib.element(\"DIV\").attribute.addClass(\"Content\").insert(el.settings.container);\n      el.settings.progressDiv = new lib.element(\"DIV\").attribute.addClass(\"ProgressDiv\").insert(el.settings.content);\n      el.settings.progress = new lib.element(\"DIV\").attribute.addClass(\"Progress\").insert(el.settings.progressDiv);\n      el.settings.cbxDebug = new lib.element(\"INPUT\").attribute.set(\"type\",\"checkbox\").attribute.addClass(\"SettingsCBX\").insert(el.settings.content);\n      el.settings.content.child.add(document.createTextNode(\"Start visible\"));\n      new lib.element(\"BR\").insert(el.settings.content);\n      el.settings.cbxDetectFirebug = new lib.element(\"INPUT\").attribute.set(\"type\",\"checkbox\").attribute.addClass(\"SettingsCBX\").insert(el.settings.content);\n      el.settings.content.child.add(document.createTextNode(\"Hide when Firebug active\"));\n      new lib.element(\"BR\").insert(el.settings.content);\n      el.settings.cbxHideDOMFunctions = new lib.element(\"INPUT\").attribute.set(\"type\",\"checkbox\").attribute.addClass(\"SettingsCBX\").insert(el.settings.content);\n      el.settings.content.child.add(document.createTextNode(\"Hide DOM functions\"));\n      new lib.element(\"BR\").insert(el.settings.content);\n      el.settings.cbxOverride = new lib.element(\"INPUT\").attribute.set(\"type\",\"checkbox\").attribute.addClass(\"SettingsCBX\").insert(el.settings.content);\n      el.settings.content.child.add(document.createTextNode(\"Override window.console\"));\n      new lib.element(\"BR\").insert(el.settings.content);\n      el.settings.cbxShowIcon = new lib.element(\"INPUT\").attribute.set(\"type\",\"checkbox\").attribute.addClass(\"SettingsCBX\").insert(el.settings.content);\n      el.settings.content.child.add(document.createTextNode(\"Show icon when hidden\"));\n      new lib.element(\"BR\").insert(el.settings.content);\n      el.settings.cbxOpenInPopup = new lib.element(\"INPUT\").attribute.set(\"type\",\"checkbox\").attribute.addClass(\"SettingsCBX\").insert(el.settings.content);\n      el.settings.content.child.add(document.createTextNode(\"Open in popup\"));\n      el.settings.buttonDiv = new lib.element(\"DIV\").insert(el.settings.content);\n      el.settings.buttonLeftDiv = new lib.element(\"DIV\").attribute.addClass(\"ButtonsLeft\").insert(el.settings.buttonDiv);\n      el.settings.resetButton = new lib.element(\"INPUT\").attribute.set(\"type\",\"button\").update(\"Reset\").event.addListener(\"click\",settings.reset).insert(el.settings.buttonLeftDiv);\n      el.settings.buttonRightDiv = new lib.element(\"DIV\").attribute.addClass(\"ButtonsRight\").insert(el.settings.buttonDiv);\n      el.settings.cancelButton = new lib.element(\"INPUT\").attribute.set(\"type\",\"button\").update(\"Cancel\").event.addListener(\"click\",settings.hide).insert(el.settings.buttonRightDiv);\n      el.settings.buttonRightDiv.child.add(document.createTextNode(\" \"));\n      el.settings.saveButton = new lib.element(\"INPUT\").attribute.set(\"type\",\"button\").update(\"Save\").event.addListener(\"click\",settings.saveClicked).insert(el.settings.buttonRightDiv);\n\n      lib.util.AddEvent(document,\"mousemove\",listen.mouse)(\"mousemove\",win.resizer.resize)(\"mouseup\",win.resizer.stop)(\"keydown\",listen.keyboard);\n\n      env.init = true;\n\n      for(var i=0, len=d.console.cache.length; i<len; i++){\n        var item = d.console.cache[i];\n        d.console.cmd[item.command].apply(window,item.arg);\n      };\n\n      if(lib.env.ie6){\n        window.onscroll = lib.util.Curry(win.setVerticalPosition,window,null);\n        var buttons = [\n          el.button.inspect,\n          el.button.close,\n          el.button.inspect,\n          el.button.console.clear,\n          el.right.console.run,\n          el.right.console.clear,\n          el.right.css.run,\n          el.right.css.clear\n          ];\n        for(var i=0, len=buttons.length; i<len; i++)\n          buttons[i].attribute.set(\"href\",\"#\");\n        win.refreshSize();\n      }\n     \n      if(env.showIconWhenHidden) {\n        if(!env.popupWin) {\n          el.firebugIcon.environment.addStyle({ \"display\": env.debug&&'none'||'block' });\n        }\n      }\n\n      lib.util.AddEvent(window, \"unload\", win.unload);\n\n      if (env.isPopup) {\n        env.height=lib.util.GetViewport().height;\n        lib.util.AddEvent(window, \"resize\", win.fitToPopup);\n        win.fitToPopup();\n      } else {\n        lib.util.AddEvent(window, \"resize\", win.refreshSize);\n      }\n\n      win.setHeight(env.height);\n\n      if(env.openInPopup&&!env.isPopup) {\n        win.newWindow();\n      } else {\n        el.main.environment.addStyle({ \"display\":env.debug&&'block'||'none' });\n        el.mainiframe.environment.addStyle({ \"display\":env.debug&&'block'||'none' });\n      }\n    }  \n  },\n  inspect:function(){\n    return firebug.d.html.inspect.apply(window,arguments);\n  },\n  watchXHR:function(){\n    with(firebug){\n      d.xhr.addObject.apply(window,arguments);\n      if(env.dIndex!=\"xhr\"){\n        d.navigate(\"xhr\");\n      }\n    }\n  },\n  settings:{\n    isVisible:false,\n    show: function() {\n      with(firebug){\n        var posXY=lib.util.Element.getPosition(firebug.el.nav.options.element);\n        settings.refreshForm();\n\n        el.settings.container.environment.addStyle({\n          \"display\": \"block\",\n          \"left\": (posXY.offsetLeft-125)+\"px\"\n        });\n        el.settings.progressDiv.environment.addStyle({\n          \"display\": \"none\"\n        });\n        firebug.settings.isVisible = true;\n      }\n    },\n    hide: function() {\n      with(firebug){\n        firebug.el.settings.container.environment.addStyle({\n          \"display\": \"none\"\n        });\n        firebug.settings.isVisible = false;\n      }\n    },\n    toggle: function(){\n      with(firebug){\n        settings[!settings.isVisible && 'show' || 'hide']();\n      }\n    },\n    saveClicked: function() {\n      firebug.el.settings.progressDiv.environment.addStyle({\n        \"display\": \"block\"\n      });\n      setTimeout(firebug.settings.formToSettings,0);\n    },\n    formToSettings: function() {\n      var fe=firebug.env,\n        ofe,\n        elSet=firebug.el.settings,\n        exdate;\n\n      fe.debug=elSet.cbxDebug.element.checked;\n      fe.detectFirebug=elSet.cbxDetectFirebug.element.checked;\n      fe.hideDOMFunctions=elSet.cbxHideDOMFunctions.element.checked;\n      fe.override=elSet.cbxOverride.element.checked;\n      fe.showIconWhenHidden=elSet.cbxShowIcon.element.checked;\n      fe.openInPopup=elSet.cbxOpenInPopup.element.checked;\n\n      if(fe.isPopup) {\n        ofe=window.opener.firebug.env;\n        ofe.debug=fe.debug;\n        ofe.detectFirebug=fe.detectFirebug;\n        ofe.hideDOMFunctions=fe.hideDOMFunctions;\n        ofe.override=fe.override;\n        ofe.showIconWhenHidden=fe.showIconWhenHidden;\n        ofe.openInPopup=fe.openInPopup;\n        ofe.popupTop=fe.popupTop;\n        ofe.popupLeft=fe.popupLeft;\n        ofe.popupWidth=fe.popupWidth;\n        ofe.popupHeight=fe.popupHeight;\n      }\n\n      with(firebug) {\n        settings.writeCookie();\n        settings.hide();\n        win.refreshDOM();\n      }\n    },\n    reset: function() {\n      var exdate=new Date();\n\n      exdate.setTime(exdate.getTime()-1);\n      document.cookie='FBLiteSettings=;expires='+exdate.toUTCString();\n      location.reload(true);\n    },\n    readCookie: function() {\n      var i,cookieArr,valueArr,item,value;\n\n      with(firebug.env){\n        if(targetWindow.document.cookie.length>0) {\n          cookieArr=targetWindow.document.cookie.split('; ');\n          \n          for(i=0;i<cookieArr.length;i++) {\n            if(cookieArr[i].split('=')[0]=='FBLiteSettings') {\n              valueArr=cookieArr[i].split('=')[1].split(',');\n            }\n          }\n\n          if(valueArr) {\n            for(i=0;i<valueArr.length;i++) {\n              item=valueArr[i].split(':')[0];\n              value=valueArr[i].split(':')[1];\n              \n              switch(item) {\n                case 'debug':\n                  debug=value==\"true\";\n                  break;\n                case 'detectFirebug':\n                  detectFirebug=value==\"true\";\n                  break;\n                case 'hideDOMFunctions':\n                  hideDOMFunctions=value==\"true\";\n                  break;\n                case 'override':\n                  override=value==\"true\";\n                  break;\n                case 'showIconWhenHidden':\n                  showIconWhenHidden=value==\"true\";\n                  break;\n                case 'openInPopup':\n                  openInPopup=value==\"true\";\n                  break;\n                case 'popupTop':\n                  popupTop=parseInt(value,10);\n                  break;\n                case 'popupLeft':\n                  popupLeft=parseInt(value,10);\n                  break;\n                case 'popupWidth':\n                  popupWidth=parseInt(value,10);\n                  break;\n                case 'popupHeight':\n                  popupHeight=parseInt(value,10);\n                  break;\n                case 'height':\n                  height=parseInt(value,10);\n                  break;\n              }\n            }\n          }\n        }\n      }\n    },\n    writeCookie: function() {\n      var values;\n      \n      with(firebug.env){\n        values='debug:'+debug+',';\n        values+='detectFirebug:'+detectFirebug+',';\n        values+='hideDOMFunctions:'+hideDOMFunctions+',';\n        values+='override:'+override+',';\n        values+='showIconWhenHidden:'+showIconWhenHidden+',';\n        values+='openInPopup:'+openInPopup+',';\n\n        if(isPopup) {\n          if(window.outerWidth===undefined) {\n            values+='popupTop:'+(window.screenTop-56)+',';\n            values+='popupLeft:'+(window.screenLeft-8)+',';\n            values+='popupWidth:'+document.body.clientWidth+',';\n            values+='popupHeight:'+document.body.clientHeight+',';\n          } else {\n            values+='popupTop:'+window.screenY+',';\n            values+='popupLeft:'+window.screenX+',';\n            values+='popupWidth:'+window.outerWidth+',';\n            values+='popupHeight:'+window.outerHeight+',';\n          }\n        } else {\n          values+='popupTop:'+popupTop+',';\n          values+='popupLeft:'+popupLeft+',';\n          values+='popupWidth:'+popupWidth+',';\n          values+='popupHeight:'+popupHeight+',';\n        }\n        \n        values+='height:'+(parseInt(targetWindow.firebug.el.main.element.style.height.replace(/px/,''),10)-38);\n\n        exdate=new Date();\n        exdate.setDate(exdate.getDate()+365);\n        targetWindow.document.cookie='FBLiteSettings='+values+';expires='+exdate.toUTCString();\n      }\n    },\n    refreshForm: function() {\n      var fe=firebug.env,\n          elSet=firebug.el.settings;\n\n      elSet.cbxDebug.element.checked=fe.debug;\n      elSet.cbxDetectFirebug.element.checked=fe.detectFirebug;\n      elSet.cbxHideDOMFunctions.element.checked=fe.hideDOMFunctions;\n      elSet.cbxOverride.element.checked=fe.override;\n      elSet.cbxShowIcon.element.checked=fe.showIconWhenHidden;\n      elSet.cbxOpenInPopup.element.checked=fe.openInPopup;\n    }\n  },\n  win:{\n    hide:function(){\n      with(firebug){\n        el.main.environment.addStyle({\n          \"display\": \"none\"\n        });\n        el.mainiframe.environment.addStyle({\n          \"display\": \"none\"\n        });\n        if(env.showIconWhenHidden) {\n          el.firebugIcon.environment.addStyle({\n            \"display\": \"block\"\n          });\n        }\n      }\n    },\n    show:function(){\n      with(firebug){\n        el.main.environment.addStyle({\n          \"display\": \"block\"\n        });\n        el.mainiframe.environment.addStyle({\n          \"display\": \"block\"\n        });\n        if(env.showIconWhenHidden) {\n          el.firebugIcon.environment.addStyle({\n            \"display\": \"none\"\n          });\n        }\n      }\n    },\n    iconClicked:function(_event) {\n        with(firebug) {\n            if(_event.ctrlKey==true||_event.metaKey==true) {\n                el.firebugIcon.environment.addStyle({ \"display\": \"none\" });\n                env.showIconWhenHidden=false;\n            } else {\n                win.show();\n            }\n        }\n    },\n    minimize:function(){\n      with(firebug){\n        env.minimized=true;\n        el.main.environment.addStyle({ \"height\":\"35px\" });\n        el.mainiframe.environment.addStyle({ \"height\":\"35px\" });\n        el.button.maximize.environment.addStyle({ \"display\":\"block\" });\n        el.button.minimize.environment.addStyle({ \"display\":\"none\" });\n        win.refreshSize();\n      }\n    },\n    maximize:function(){\n      with(firebug){\n        env.minimized=false;\n        el.button.minimize.environment.addStyle({ \"display\":\"block\" });\n        el.button.maximize.environment.addStyle({ \"display\":\"none\" });\n        win.setHeight(env.height);\n      }\n    },\n    newWindow: function() {\n      var interval,scripts,script,scriptPath,\n          fe=firebug.env;\n\n      if (!fe.popupWin) {\n        scripts = document.getElementsByTagName('script');\n        \n        fe.popupWin = window.open(\"\", \"_firebug\", \n          \"status=0,menubar=0,resizable=1,top=\"+fe.popupTop+\",left=\"+fe.popupLeft+\",width=\" + fe.popupWidth + \n          \",height=\" + fe.popupHeight + \",scrollbars=0,addressbar=0,outerWidth=\"+fe.popupWidth+\",outerHeight=\"+fe.popupHeight+\n          \"toolbar=0,location=0,directories=0,dialog=0\");\n        \n        if(!fe.popupWin) {\n          alert(\"Firebug Lite could not open a pop-up window, most likely because of a popup blocker.\\nPlease enable popups for this domain\");\n        } else {\n          firebug.settings.hide();\n        \n          for (i=0,len=scripts.length; i<len; i++) {\n            if (scripts[i].src.indexOf(fe.liteFilename) > -1) {\n              scriptPath = scripts[i].src;\n              break;\n            }\n          }\n\n          if (scriptPath) {\n            script = fe.popupWin.document.createElement('script'), done = false;\n            script.type = 'text/javascript';\n            script.src = scriptPath;\n\n            script[firebug.lib.env.ie?\"onreadystatechange\":\"onload\"] = function(){\n              if(!done && (!firebug.lib.env.ie || this.readyState == \"complete\" || this.readyState==\"loaded\")){\n                done = true;\n                if(fe.popupWin.firebug) {\n                  with(fe.popupWin.firebug) {\n                    env.isPopup = true;\n                    env.css = fe.css;\n                    init();\n                    el.button.dock.environment.addStyle({ \"display\": \"block\"});\n                    el.button.newWindow.environment.addStyle({ \"display\": \"none\"});\n                  }\n                }\n              }\n            };\n\n            if (!done && firebug.lib.env.webkit) {\n              fe.popupWin.document.write('<html><head></head><body></body></html>');\n              interval = setInterval(function() {\n                if (fe.popupWin.firebug) {\n                  clearInterval(interval);\n                  done = true;\n                  with(fe.popupWin.firebug) {\n                    env.isPopup = true;\n                    env.css = fe.css;\n                    init();\n                    el.button.dock.environment.addStyle({ \"display\": \"block\"});\n                    el.button.newWindow.environment.addStyle({ \"display\": \"none\"});\n                  }\n                }\n              }, 10);\n            };\n\n            if (!done) {\n              fe.popupWin.document.getElementsByTagName('head')[0].appendChild(script);\n              firebug.el.main.environment.addStyle({\"display\": \"none\"});\n              firebug.el.mainiframe.environment.addStyle({\"display\": \"none\"});\n            }\n          } else {\n            alert(\"Unable to detect the following script \\\"\" + fe.liteFilename +\n                  \"\\\" ... if the script has been renamed then please set the value of firebug.env.liteFilename to reflect this change\");\n            fe.popupWin.close();\n            fe.popupWin=null;\n          }\n        }\n      }\n    },\n    dock: function() {\n      with(opener.firebug) {\n        env.popupWin = null;\n        el.main.environment.addStyle({\n          \"display\": \"block\"\n        });\n        el.mainiframe.environment.addStyle({\n          \"display\": \"block\"\n        });\n        settings.readCookie();\n        window.close();\n      };\n    },\n    unload: function() {\n      with(firebug){\n        if(env.isPopup) {\n          win.dock();\n        } else if(env.popupWin) {\n          env.popupWin.close();\n        }\n      }\n    },\n    fitToPopup: function() {\n      with(firebug) {\n        var viewport = lib.util.GetViewport(window);\n        win.setHeight((window.innerHeight||viewport.height) - 38);\n        el.main.environment.addStyle({\n          \"width\": (viewport.width) + \"px\"\n        });\n        el.mainiframe.environment.addStyle({\n          \"width\": (viewport.width) + \"px\"\n        });\n      }\n    },\n    resizer:{\n      y:[], enabled:false,\n      start:function(_event){\n        with(firebug){\n          if(env.minimized)return;\n          win.resizer.y=[el.main.element.offsetHeight,_event.clientY];\n          if(lib.env.ie6){\n            win.resizer.y[3]=parseInt(el.main.environment.getPosition().top);\n          }\n          win.resizer.enabled=true;\n        }\n      },\n      resize:function(_event){\n        with(firebug){\n          if(!win.resizer.enabled)return;\n          win.resizer.y[2]=(win.resizer.y[0]+(win.resizer.y[1]-_event.clientY));\n          el.main.environment.addStyle({ \"height\":win.resizer.y[2]+\"px\" });\n          el.mainiframe.environment.addStyle({ \"height\":win.resizer.y[2]+\"px\" });\n          if(lib.env.ie6){\n            el.main.environment.addStyle({ \"top\":win.resizer.y[3]-(win.resizer.y[1]-_event.clientY)+\"px\" });\n            el.mainiframe.environment.addStyle({ \"top\":win.resizer.y[3]-(win.resizer.y[1]-_event.clientY)+\"px\" });\n          }\n        }\n      },\n      stop:function(_event){\n        with(firebug){\n          if(win.resizer.enabled){\n            win.resizer.enabled=false;\n            win.setHeight(win.resizer.y[2]-35);\n          }\n        }\n      }\n    },\n    setHeight:function(_height){\n      with(firebug){\n        env.height=_height;\n\n        el.left.container.environment.addStyle({ \"height\":_height+\"px\" });\n        el.right.container.environment.addStyle({ \"height\":_height+\"px\" });\n        el.main.environment.addStyle({ \"height\":_height+38+\"px\" });\n        el.mainiframe.environment.addStyle({ \"height\":_height+38+\"px\" });\n\n        win.refreshSize();\n\n        // console\n        el.left.console.monitor.element.parentNode.style.height=_height-47+\"px\";\n        el.left.console.mlButton.environment.addStyle({ \"top\":_height+19+\"px\" });\n        el.right.console.mlButton.environment.addStyle({ \"top\":_height+19+\"px\" });\n        el.right.console.input.environment.addStyle({ \"height\":_height-29+\"px\" });\n\n        // html\n        el.left.html.container.environment.addStyle({\"height\":_height-23+\"px\"});\n        el.right.html.content.environment.addStyle({\"height\":_height-23+\"px\"});\n\n        // css\n        el.left.css.container.environment.addStyle({\"height\":_height-33+\"px\"});\n        el.right.css.input.environment.addStyle({ \"height\":_height-55+\"px\" });\n\n        // script\n        el.left.scripts.container.environment.addStyle({\"height\":_height-23+\"px\"});\n\n        // dom\n        el.left.dom.container.environment.addStyle({\"height\":_height-31+\"px\"});\n\n        // xhr\n        el.left.xhr.container.environment.addStyle({\"height\":_height-32+\"px\"});\n\n        // string\n        el.left.str.container.environment.addStyle({\"height\":_height-32+\"px\"});\n      }\n    },\n    refreshDOM:function(){\n      with(firebug){\n        d.dom.open(eval(el.button.dom.textbox.environment.getElement().value),el.left.dom.container);\n        if(d.html.nIndex==\"dom\"){\n          firebug.d.html.navigate(\"dom\")\n        }\n      }\n    },\n    refreshSize:function(){\n      with(firebug){\n        if(!env.init)\n          return;\n\n        var dim = lib.util.GetViewport();\n        el.main.environment.addStyle({ \"width\":dim.width+\"px\"});\n        el.mainiframe.environment.addStyle({ \"width\":dim.width+\"px\"});\n        if(lib.env.ie6)\n          win.setVerticalPosition(dim);\n      }\n    },\n    setVerticalPosition:function(_dim,_event){\n      with(firebug){\n        var dim = _dim||lib.util.GetViewport();\n        el.main.environment.addStyle({ \"top\":dim.height-el.main.environment.getSize().offsetHeight+Math.max(document.documentElement.scrollTop,document.body.scrollTop)+\"px\" });\n        el.mainiframe.environment.addStyle({ \"top\":dim.height-el.main.environment.getSize().offsetHeight+Math.max(document.documentElement.scrollTop,document.body.scrollTop)+\"px\" });\n      }\n    }\n  },\n  d: {\n    clean:function(_element){\n      with(firebug){\n        _element.update(\"\");\n      }\n    },\n    console:{\n      addLine:function(){\n        with (firebug) {\n          return new lib.element(\"DIV\").attribute.addClass(\"Row\").insert(el.left.console.monitor);\n        }\n      },\n      cache:[],\n      clear:function(){\n        with(firebug){\n          d.clean(el.left.console.monitor);\n          d.console.cache = [];\n        }\n      },\n      formatArgs:function(){\n        with(firebug){\n          var content = [];\n          for(var i=0, len=arguments.length; i<len; i++){\n            content.push( d.highlight(arguments[i],false,false,true) );\n          }\n          return content.join(\" \");\n        }\n      },\n      history:[], historyIndex:0,\n      openObject:function(_index){\n        with (firebug) {\n          d.dom.open(d.console.cache[_index], el.left.dom.container, lib.env.ie);\n          d.navigate(\"dom\");\n        }\n      },\n      print: function(_cmd,_text){\n        with (firebug){\n          d.console.addLine().attribute.addClass(\"Arrow\").update(\">>> \"+_cmd);\n          d.console.addLine().update(d.highlight(_text,false,false,true));\n          d.console.scroll();\n        }\n      },\n      printException: function(_exception){\n        with(firebug){\n          var message = _exception.description||_exception.message||_exception;\n          if(_exception.fileName){\n            message+=' ('+(_exception.name&&(_exception.name+', ')||'')+getFileName(_exception.fileName)+', '+_exception.lineNumber+')';\n          }\n          d.console.addLine().attribute.addClass(\"Error\").update(\"<strong>Error: </strong>\"+message,true);\n        }\n      },\n      eval:function(_cmd){\n        var result;\n        with(firebug){\n          if(_cmd.length==0)\n            return;\n\n          el.left.console.input.environment.getElement().value = \"\";\n          d.console.historyIndex = d.console.history.push(_cmd);\n\n          try {\n            if(_cmd==='console.firebug') {\n              d.console.addLine().attribute.addClass(\"Arrow\").update(firebug.version);\n            } else {  \n              result = eval.call(window,_cmd);\n              d.console.print(_cmd,result);\n            }\n          } catch(e){\n            d.console.addLine().attribute.addClass(\"Arrow\").update(\">>> \"+_cmd);\n            d.console.printException(e);\n          }\n          d.console.scroll();\n        }\n      },\n      scroll:function(){\n        with(firebug){\n          el.left.console.monitor.environment.getElement().parentNode.scrollTop = Math.abs(el.left.console.monitor.environment.getSize().offsetHeight-(el.left.console.monitor.element.parentNode.offsetHeight-11));\n        }\n      },\n      run:function(_command){\n        with(firebug){\n          if(!env.init){\n            d.console.cache.push({ \"command\":_command, \"arg\":Array.prototype.slice.call(arguments,1) });\n          } else {\n            d.console.cmd[_command].apply(window,Array.prototype.slice.call(arguments,1));\n          }\n        }\n      },\n      toggleML:function(){\n        with(firebug){\n          var open = !env.ml;\n          env.ml = !env.ml;\n          d.navigateRightColumn(\"console\",open);\n          el[open?\"left\":\"right\"].console.mlButton.environment.addStyle({ display:\"none\" });\n          el[!open?\"left\":\"right\"].console.mlButton.environment.addStyle({ display:\"block\" });\n          el.left.console.mlButton.attribute[(open?\"add\":\"remove\")+\"Class\"](\"CloseML\");\n        }\n      },\n      countMap:{}, timeMap: {},\n      cmd:{\n        log: function(_value){\n          with(firebug){\n            var args = d.console.formatArgs.apply(window,arguments);\n            d.console.addLine().attribute.addClass(\"Log\").update(args);\n            d.console.scroll();\n          }\n        },\n        warn: function(_value){\n          with(firebug){\n            var args = d.console.formatArgs.apply(window,arguments);\n            d.console.addLine().attribute.addClass(\"Warn\").update(args);\n            d.console.scroll();\n          }\n        },\n        info: function(_value){\n          with(firebug){\n            var args = d.console.formatArgs.apply(window,arguments);\n            d.console.addLine().attribute.addClass(\"Info\").update(args);\n            d.console.scroll();\n          }\n        },\n        debug: function(_value){\n          with(firebug){\n            var args = d.console.formatArgs.apply(window,arguments);\n            d.console.addLine().attribute.addClass(\"Debug\").update(args);\n            d.console.scroll();\n          }\n        },\n        error: function(_value){\n          with(firebug){\n            var args = d.console.formatArgs.apply(window,arguments);\n            d.console.addLine().attribute.addClass(\"Error\").update(args);\n            d.console.scroll();\n          }\n        },\n        trace: function(_value){\n          with(firebug){\n            var stackAmt = 3, f = arguments.caller, isArray = lib.util.IsArray(f); //function that called trace\n\n            if((!isArray&&f)||(isArray&&f.length>0)){\n              d.console.addLine().attribute.addClass(\"Arrow\").update(\">>> console.trace(stack)\");\n              for(var i=0;i<stackAmt;i++){\n                var func = f.toString(), args = f.arguments;\n                d.dom.open({\"function\":func, \"arguments\":args},d.console.addLine());\n                f = f.caller;\n              }\n            }\n          }\n        },\n        dir:function(_value){\n          with(firebug){\n            d.console.addLine().attribute.addClass(\"Arrow\").update(\">>> console.dir(\"+_value+\")\");\n            d.dom.open(_value,d.console.addLine());\n          }\n        },\n        dirxml: function(){\n          with(firebug){\n            d.console.cmd.log.apply(this, arguments);\n          }\n        },\n        time: function(_name){\n          with(firebug){\n            d.console.timeMap[_name] = new Date().getTime();\n          }\n        },\n        timeEnd: function(_name){\n          with(firebug){\n            if(_name in d.console.timeMap){\n              var delta = new Date().getTime() - d.console.timeMap[_name],\n              args = d.console.formatArgs.apply(window,[_name+\":\", delta+\"ms\"]);\n              d.console.addLine().attribute.addClass(\"log\").update(args);\n              delete d.console.timeMap[_name];\n            }\n          }\n        },\n        count: function(_name){\n          with(firebug){\n            if(!d.console.countMap[_name])\n              d.console.countMap[_name] = 0;\n            d.console.countMap[_name]++;\n            d.console.cmd.log.apply(window, [_name, d.console.countMap[_name]]);\n          }\n        },\n        group:function(){\n          with(firebug){\n            d.console.cmd.log.apply(this, [\"console.group is not supported\"]);\n          }\n        },\n        groupEnd:function(){\n          with(firebug){\n            d.console.cmd.log.apply(this, [\"console.groupEnd is not supported\"]);\n          }\n        },\n        profile:function(){\n          with(firebug){\n            d.console.cmd.log.apply(this, [\"console.profile is not supported\"]);\n          }\n        },\n        profileEnd:function(){\n          with(firebug){\n            d.console.cmd.log.apply(this, [\"console.profileEnd is not supported\"]);\n          }\n        }\n      }\n    },\n    css:{\n      index:-1,\n      open:function(_index){\n        with (firebug) {\n          var item = env.targetWindow.document.styleSheets[_index],\n          uri = item.href;\n          try {\n            var rules = item[lib.env.ie ? \"rules\" : \"cssRules\"], str = \"\";\n            for (var i=0; i<rules.length; i++) {\n              var item = rules[i];\n              var selector = item.selectorText;\n              var cssText = lib.env.ie?item.style.cssText:item.cssText.match(/\\{(.*)\\}/)[1];\n              str+=d.css.printRule(selector, cssText.split(\";\"), el.left.css.container);\n            }\n          } catch(e) {\n            str=\"<em>Access to restricted URI denied</em>\";\n          }\n          el.left.css.container.update(str);\n        }\n      },\n      printRule:function(_selector,_css,_layer){\n        with(firebug){\n          var str = \"<div class='Selector'>\"+_selector+\" {</div>\";\n          for(var i=0,len=_css.length; i<len; i++){\n            var item = _css[i];\n            str += \"<div class='CSSText'>\"+item.replace(/(.+\\:)(.+)/,\"<span class='CSSProperty'>$1</span><span class='CSSValue'>$2;</span>\")+\"</div>\";\n          }\n          str+=\"<div class='Selector'>}</div>\";\n          return str;\n        }\n      },\n      refresh:function(){\n        with(firebug){\n          el.button.css.selectbox.update(\"\");\n          var collection = env.targetWindow.document.styleSheets;\n          for(var i=0,len=collection.length; i<len; i++){\n            var uri = getFileName(collection[i].href);\n            d.css.index=d.css.index<0?i:d.css.index;\n            el.button.css.selectbox.child.add(\n                new lib.element(\"OPTION\").attribute.set(\"value\",i).update(uri)\n            )\n          };\n          d.css.open(d.css.index);\n        }\n      }\n    },\n    dom: {\n      open: function(_object,_layer){\n        with (firebug) {\n          _layer.clean();\n          var container = new lib.element(\"DIV\").attribute.addClass(\"DOMContent\").insert(_layer);\n          d.dom.print(_object, container);\n        }\n      },\n      print:function(_object,_parent, _inTree){\n        with (firebug) {\n          var obj = _object || window, parentElement = _parent;\n          parentElement.update(\"\");\n\n          if(parentElement.opened&&parentElement!=el.left.dom.container){\n            parentElement.environment.getParent().lib.child.get()[0].lib.child.get()[0].lib.attribute.removeClass(\"Opened\");\n            parentElement.opened = false;\n            parentElement.environment.addStyle({ \"display\":\"none\" });\n            return;\n          }\n          if(_inTree)\n            parentElement.environment.getParent().lib.child.get()[0].lib.child.get()[0].lib.attribute.addClass(\"Opened\");\n          parentElement.opened = true;\n\n          for (var key in obj) {\n            try {\n              if (env.hideDOMFunctions && typeof(obj[key]) == \"function\") continue;\n              var value = obj[key], property = key, container = new lib.element(\"DIV\").attribute.addClass(\"DOMRow\").insert(parentElement),\n              left = new lib.element(\"DIV\").attribute.addClass(\"DOMRowLeft\").insert(container), right = new lib.element(\"DIV\").attribute.addClass(\"DOMRowRight\").insert(container);\n\n              container.child.add(\n                  new lib.element(\"DIV\").attribute.addClass('Clear')\n              );\n\n              var link = new lib.element(\"A\").attribute.addClass(\n                  typeof value==\"object\"&&Boolean(value)?\"Property Object\":\"Property\"\n              ).update(property).insert(left);\n\n              right.update(d.highlight(value,false,true));\n\n              var subContainer = new lib.element(\"DIV\").attribute.addClass(\"DOMRowSubContainer\").insert(container);\n\n              if(typeof value!=\"object\"||Boolean(value)==false)\n                continue;\n\n              link.event.addListener(\"click\",lib.util.Curry(d.dom.print,window,value, subContainer, true));\n            }catch(e){\n            }\n          }\n          parentElement.environment.addStyle({ \"display\":\"block\" });\n        }\n      }\n    },\n    highlight:function(_value,_inObject,_inArray,_link){\n      with(firebug){\n        var isArray = false, isHash, isElement = false, vtype=typeof _value, result=[];\n        \n        if(vtype==\"object\"){\n          if(Object.prototype.toString.call(_value) === \"[object Date]\"){\n            vtype = \"date\";\n          } else if(Object.prototype.toString.call(_value) === \"[object String]\"){\n            vtype = \"string\";\n          } else if(Object.prototype.toString.call(_value) === \"[object Boolean]\"){\n            vtype = \"boolean\";\n          } else if(Object.prototype.toString.call(_value) === \"[object RegExp]\"){\n            vtype = \"regexp\";\n          }\n        }\n        \n        try {\n          isArray = lib.util.IsArray(_value);\n          isHash = lib.util.IsHash(_value);\n          isElement = _value!=undefined&&Boolean(_value.nodeName)&&Boolean(_value.nodeType);\n\n          // number, string, boolean, null, function\n          if(_value==null||vtype==\"number\"||vtype==\"string\"||vtype==\"boolean\"||vtype==\"function\"||vtype==\"regexp\"||vtype==\"date\"){\n            if(_value==null){\n              result.push(\"<span class='Null'>null</span>\");\n            }else if (vtype==\"regexp\") {\n              result.push(\"<span class='Maroon'>\" + _value + \"</span>\");\n            }else if (vtype==\"date\") {\n              result.push(\"<span class='DarkBlue'>'\" + _value + \"'</span>\");\n            } else if (vtype==\"boolean\"||vtype==\"number\") {\n              result.push(\"<span class='DarkBlue'>\" + _value + \"</span>\");\n            } else if(vtype==\"function\"){\n              result.push(\"<span class='\"+(_inObject?\"Italic Gray\":\"Green\")+\"'>function()</span>\");\n            } else {\n              result.push(\"<span class='Red'>\\\"\"+( !_inObject&&!_inArray?_value : _value.substring(0,35)+(_value.length>35?\" ...\":\"\") ).replace(/\\n/g,\"\\\\n\").replace(/\\s/g,\"&nbsp;\").replace(/>/g,\"&#62;\").replace(/</g,\"&#60;\")+\"\\\"</span>\");\n            }\n          }\n          // element\n          else if(isElement){\n\n            if(_value.nodeType==3)\n              result.push(d.highlight(_value.nodeValue));\n            else if(_inObject){\n              result.push(\"<span class='Gray Italic'>\"+_value.nodeName.toLowerCase()+\"</span>\");\n            } else {\n              result.push(\"<span class='Blue\"+ ( !_link?\"'\":\" ObjectLink' onmouseover='this.className=this.className.replace(\\\"ObjectLink\\\",\\\"ObjectLinkHover\\\")' onmouseout='this.className=this.className.replace(\\\"ObjectLinkHover\\\",\\\"ObjectLink\\\")' onclick='firebug.d.html.inspect(firebug.d.console.cache[\" +( d.console.cache.push( _value ) -1 )+\"])'\" ) + \"'>\");\n\n              if(_inArray){\n                result.push(_value.nodeName.toLowerCase());\n                if(_value.getAttribute){\n                  if(_value.getAttribute&&_value.getAttribute(\"id\"))\n                    result.push(\"<span class='DarkBlue'>#\"+_value.getAttribute(\"id\")+\"</span>\");\n                  var elClass = _value.getAttribute(lib.env.ie&&!lib.env.ie8?\"className\":\"class\")||\"\";\n                  result.push(!elClass?\"\":\"<span class='Red'>.\"+elClass.split(\" \")[0]+\"</span>\");\n                }\n                result.push(\"</span>\");\n              } else {\n                result.push(\"<span class='DarkBlue'>&#60;<span class='Blue TagName'>\"+ _value.nodeName.toLowerCase());\n\n                if(_value.attributes){\n                  for(var i=0,len=_value.attributes.length; i<len; i++){\n                    var item = _value.attributes[i];\n\n                    if(!lib.env.ie||item.nodeValue)\n                      result.push(\" <span class='DarkBlue'>\"+item.nodeName+\"=\\\"<span class='Red'>\"+item.nodeValue+\"</span>\\\"</span>\");\n                  }\n                }\n\n                result.push(\"</span>&#62;</span>\");\n              }\n            }\n          } \n          // array, hash\n          else if(isArray||isHash){\n            if(isArray){\n              if(_inObject){\n                result.push(\"<span class='Gray Italic'>[\"+_value.length+\"]</span>\");\n              } else {\n                result.push(\"<span class='Strong'>[ \");\n\n                for(var i=0,len=_value.length; i<len; i++){\n                  if((_inObject||_inArray)&&i>3){\n                    result.push(\", <span class='Strong Gray'>\"+(len-4)+\" More...</span>\");\n                    break;\n                  }\n                  result.push( (i > 0 ? \", \" : \"\") + d.highlight(_value[i], false, true, true) );\n                }\n\n                result.push(\" ]</span>\");\n              }\n            } else if(_inObject){\n              result.push(\"<span class='Gray Italic'>Object</span>\");\n            } else {  \n              result.push(\"<span class='Strong Green\"+ ( !_link?\"'\":\" ObjectLink' onmouseover='this.className=this.className.replace(\\\"ObjectLink\\\",\\\"ObjectLinkHover\\\")' onmouseout='this.className=this.className.replace(\\\"ObjectLinkHover\\\",\\\"ObjectLink\\\")' onclick='firebug.d.console.openObject(\" +( d.console.cache.push( _value ) -1 )+\")'\" ) + \">Object\");\n              var i=0;\n              for(var key in _value){\n                var value = _value[key];\n                if((_inObject||_inArray)&&i>3){\n                  result.push(\" <span class='Strong Gray'>More...</span>\");\n                  break;\n                }\n                result.push(\" \"+key+\"=\"+d.highlight(value,true));\n                i++;\n              }\n              result.push(\"</span>\");\n            } \n          } else {\n            result.push([\"<span class'Gray Italic'>\"+_value+\"</span>\"]);\n          }\n        } catch(e){\n          result.push(\"..\"); \n        }\n        return result.join(\"\");\n      }\n    },\n    html:{\n      nIndex:\"computedStyle\",\n      current:null,\n      highlight:function(_element,_clear,_event){\n        with(firebug){\n          if(_element.firebugElement){\n            return;\n          }\n          if(_clear){\n            env.targetWindow.firebug.el.bgInspector.environment.addStyle({ \"display\":\"none\" });\n            return;\n          }\n          d.inspector.inspect(_element,true);\n        }\n      },\n      inspect:function(_element){\n        var map = [],\n        parentLayer,\n        t,\n        tagName,\n        parent = _element;\n        while (parent) {\n          map.push(parent);\n          if (parent == firebug.env.targetWindow.document.body) break;\n          parent = parent.parentNode;\n        }\n        map = map.reverse();\n        with(firebug) {\n          if (env.dIndex != \"html\") {\n            env.targetWindow.firebug.d.navigate(\"html\");\n          }\n\n          env.targetWindow.firebug.d.inspector.toggle(false);\n\n          for (t = 0; t < el.left.html.container.child.get().length; t++) {\n            if (el.left.html.container.child.get()[t].childNodes[0].childNodes[1].childNodes[0].childNodes[0]) {\n              if (el.left.html.container.child.get()[t].childNodes[0].childNodes[1].childNodes[0].childNodes[0].innerText) {\n                tagName = el.left.html.container.child.get()[t].childNodes[0].childNodes[1].childNodes[0].childNodes[0].innerText;\n              } else {\n                tagName = el.left.html.container.child.get()[t].childNodes[0].childNodes[1].childNodes[0].childNodes[0].textContent;\n              }\n\n              if (/<body/i.test(tagName)) {\n                parentLayer = el.left.html.container.child.get()[t].childNodes[1].lib;\n                break;\n              }\n            }\n          }\n\n          if (!parentLayer) {\n            parentLayer = el.left.html.container.child.get()[3].childNodes[1].lib;\n          }\n\n          for (t = 0, len = map.length; map[t]; t++) {\n            if (t == len - 1) {\n              var link = parentLayer.environment.getElement().previousSibling.lib;\n              link.attribute.addClass(\"Selected\");\n\n              if (d.html.current) {\n                d.html.current[1].attribute.removeClass(\"Selected\");\n              }\n              d.html.current = [_element, link];\n              return;\n            }\n            parentLayer = d.html.openHtmlTree(map[t], parentLayer, map[t + 1]);\n          }\n        }\n      },\n      navigate:function(_index,_element){\n        with(firebug){\n          el.right.html.nav[d.html.nIndex].attribute.removeClass(\"Selected\");\n          el.right.html.nav[_index].attribute.addClass(\"Selected\");\n          d.html.nIndex = _index;\n          d.html.openProperties();\n        }\n      },\n      openHtmlTree:function(_element,_parent,_returnParentElementByElement,_event){\n        with(firebug){\n          var element = _element || env.targetWindow.document.documentElement, \n              parent = _parent || el.left.html.container, \n              returnParentEl = _returnParentElementByElement || null, \n              returnParentVal = null,\n              len = element.childNodes.length,\n              nodeLink;\n\n          if(parent!=el.left.html.container){\n            nodeLink = parent.environment.getParent().lib.child.get()[0].lib;\n            if (d.html.current) {\n              d.html.current[1].attribute.removeClass(\"Selected\");\n            }\n            nodeLink.attribute.addClass(\"Selected\");\n\n            d.html.current = [_element,nodeLink];\n            d.html.openProperties();\n          };\n\n          if(element.childNodes&&(len==0||(len==1&&element.childNodes[0].nodeType==3)))return;\n          parent.clean();\n\n          if(parent.opened&&Boolean(_returnParentElementByElement)==false){\n            parent.opened = false;\n            parent.element.previousSibling.lib.attribute.removeClass(\"Open\");\n            parent.element.lib.attribute.removeClass(\"OpenSubContainer\");\n            return;\n          };\n\n          if (parent != el.left.html.container) {\n            parent.element.previousSibling.lib.attribute.addClass(\"Open\");\n            parent.element.lib.attribute.addClass(\"OpenSubContainer\");\n            parent.opened = true;\n          };\n\n          if(element==document.documentElement){\n            new lib.element(\"A\").attribute.addClass(\"Block\").update(\"<span class='DarkBlue'>&#60;<span class='Blue'>html</span>&#62;\").insert(parent);\n          };\n\n          for(var i=0; i<=len; i++){\n            if(i==len){\n              new lib.element(\"A\").attribute.addClass(\"Block\").update(\"<span class='DarkBlue'>&#60;/<span class='Blue'>\"+element.nodeName.toLowerCase()+\"</span>&#62;\").insert(container);\n              break;\n            } \n            var item = element.childNodes[i];\n\n            if (item.nodeType != 3){\n              var container = new lib.element().attribute.addClass(\"Block\").insert(parent), \n              link = new lib.element(\"A\").attribute.addClass(\"Link\").insert(container), \n              spacer = new lib.element(\"SPAN\").attribute.addClass(\"Spacer\").update(\"&nbsp;\").insert(link),\n              html = new lib.element(\"SPAN\").attribute.addClass(\"Content\").update(d.highlight(item)).insert(link),\n              subContainer = new lib.element(\"DIV\").attribute.addClass(\"SubContainer\").insert(container),\n              view = lib.util.Element.getView(item);\n\n              link.event.addListener(\"click\", lib.util.Curry(d.html.openHtmlTree, window, item, subContainer, false));\n              link.event.addListener(\"mouseover\", lib.util.Curry(d.html.highlight, window, item, false));\n              link.event.addListener(\"mouseout\", lib.util.Curry(d.html.highlight, window, item, true));\n\n              returnParentVal = returnParentEl == item ? subContainer : returnParentVal;\n\n              if(d.html.current==null&&item==document.body){\n                link.attribute.addClass(\"Selected\");\n                d.html.current = [item,link];\n                d.html.openHtmlTree(item,subContainer);\n              }\n\n              if(element.nodeName!=\"HEAD\"&&element!=document.documentElement&&(view.visibility==\"hidden\"||view.display==\"none\")){\n                container.attribute.addClass(\"Unvisible\");\n              };\n\n              if (item.childNodes){\n                var childLen = item.childNodes.length;\n                if (childLen == 1 && item.childNodes[0].nodeType == 3) {\n                  html.child.add(document.createTextNode(item.childNodes[0].nodeValue.substring(0, 50)));\n                  html.child.add(document.createTextNode(\"</\"));\n                  html.child.add(new lib.element(\"span\").attribute.addClass(\"Blue\").update(item.nodeName.toLowerCase()).environment.getElement());\n                  html.child.add(document.createTextNode(\">\"));\n                  continue;\n                }\n                else \n                  if (childLen > 0) {\n                    link.attribute.addClass(\"Parent\");\n                  }\n              }\n            }\n          };\n          return returnParentVal;\n        }\n      },\n      openProperties:function(){\n        with(firebug){\n          var index = d.html.nIndex;\n          var node = d.html.current[0];\n          d.clean(el.right.html.content);\n          var str = \"\";\n          switch(index){\n            case \"computedStyle\":\n              var property = [\"opacity\",\"filter\",\"azimuth\",\"background\",\"backgroundAttachment\",\"backgroundColor\",\"backgroundImage\",\"backgroundPosition\",\"backgroundRepeat\",\"border\",\"borderCollapse\",\"borderColor\",\"borderSpacing\",\"borderStyle\",\"borderTop\",\"borderRight\",\"borderBottom\",\"borderLeft\",\"borderTopColor\",\"borderRightColor\",\"borderBottomColor\",\"borderLeftColor\",\"borderTopStyle\",\"borderRightStyle\",\"borderBottomStyle\",\"borderLeftStyle\",\"borderTopWidth\",\"borderRightWidth\",\"borderBottomWidth\",\"borderLeftWidth\",\"borderWidth\",\"bottom\",\"captionSide\",\"clear\",\"clip\",\"color\",\"content\",\"counterIncrement\",\"counterReset\",\"cue\",\"cueAfter\",\"cueBefore\",\"cursor\",\"direction\",\"display\",\"elevation\",\"emptyCells\",\"cssFloat\",\"font\",\"fontFamily\",\"fontSize\",\"fontSizeAdjust\",\"fontStretch\",\"fontStyle\",\"fontVariant\",\"fontWeight\",\"height\",\"left\",\"letterSpacing\",\"lineHeight\",\"listStyle\",\"listStyleImage\",\"listStylePosition\",\"listStyleType\",\"margin\",\"marginTop\",\"marginRight\",\"marginBottom\",\"marginLeft\",\"markerOffset\",\"marks\",\"maxHeight\",\"maxWidth\",\"minHeight\",\"minWidth\",\"orphans\",\"outline\",\"outlineColor\",\"outlineStyle\",\"outlineWidth\",\"overflow\",\"padding\",\"paddingTop\",\"paddingRight\",\"paddingBottom\",\"paddingLeft\",\"page\",\"pageBreakAfter\",\"pageBreakBefore\",\"pageBreakInside\",\"pause\",\"pauseAfter\",\"pauseBefore\",\"pitch\",\"pitchRange\",\"playDuring\",\"position\",\"quotes\",\"richness\",\"right\",\"size\",\"speak\",\"speakHeader\",\"speakNumeral\",\"speakPunctuation\",\"speechRate\",\"stress\",\"tableLayout\",\"textAlign\",\"textDecoration\",\"textIndent\",\"textShadow\",\"textTransform\",\"top\",\"unicodeBidi\",\"verticalAlign\",\"visibility\",\"voiceFamily\",\"volume\",\"whiteSpace\",\"widows\",\"width\",\"wordSpacing\",\"zIndex\"].sort();\n              var view = document.defaultView?document.defaultView.getComputedStyle(node,null):node.currentStyle;\n              for(var i=0,len=property.length; i<len; i++){\n                var item = property[i];\n                if(!view[item])continue;\n                str+=\"<div class='CSSItem'><div class='CSSProperty'>\"+item+\"</div><div class='CSSValue'>\"+d.highlight(view[item])+\"</div></div>\";\n              }\n              el.right.html.content.update(str);\n              break;\n            case \"dom\":\n              d.dom.open(node,el.right.html.content,lib.env.ie);\n              break;\n          }\n        }\n      }\n    },\n    inspector:{\n      enabled:false,\n      el:null,\n      inspect:function(_element,_bgInspector){\n        with(firebug){\n          var pos = env.targetWindow.firebug.lib.util.Element.getPosition(_element);\n\n          env.targetWindow.firebug.el[_bgInspector&&\"bgInspector\"||\"borderInspector\"].environment.addStyle({ \n            \"width\":_element.offsetWidth+\"px\", \"height\":_element.offsetHeight+\"px\",\n            \"top\":pos.offsetTop-(_bgInspector?0:2)+\"px\", \"left\":pos.offsetLeft-(_bgInspector?0:2)+\"px\",\n            \"display\":\"block\"\n          });\n9\n          if(!_bgInspector){\n            d.inspector.el = _element;\n          }\n        };\n      },\n      toggle:function(_absoluteValue,_event){\n        with (firebug) {\n          if(_absoluteValue==d.inspector.enabled)\n            return;\n          d.inspector.enabled = _absoluteValue!=undefined&&!_absoluteValue.clientX?_absoluteValue:!d.inspector.enabled;\n          el.button.inspect.attribute[(d.inspector.enabled ? \"add\" : \"remove\") + \"Class\"](\"Enabled\");\n          if(d.inspector.enabled==false){\n            el.borderInspector.environment.addStyle({ \"display\":\"none\" });\n            d.inspector.el = null;\n          } else if(lib.env.dIndex!=\"html\") {\n            if (env.popupWin) {\n              env.popupWin.firebug.d.navigate(\"html\");\n            } else {\n              d.navigate(\"html\");\n            }\n          }\n        }\n      }\n    },\n    scripts:{\n      index:-1,\n      lineNumbers:false,\n      open:function(_index){\n        with(firebug){\n          d.scripts.index = _index;\n          el.left.scripts.container.update(\"\");\n          var script = document.getElementsByTagName(\"script\")[_index],uri = script.src||document.location.href,source;\n          try {\n            if(uri!=document.location.href){\n              source = env.cache[uri]||lib.xhr.get(uri).responseText;\n              env.cache[uri] = source;\n            } else {\n              source = script.innerHTML;\n            }\n            source = source.replace(/<|>/g,function(_ch){\n              return ({\"<\":\"&#60;\",\">\":\"&#62;\"})[_ch];\n            });\n          \n            if(!d.scripts.lineNumbers) \n              el.left.scripts.container.child.add(\n                  new lib.element(\"DIV\").attribute.addClass(\"CodeContainer\").update(source)\n              );\n            else {\n              source = source.split(\"<br />\");\n              for (var i = 0; i < source.length; i++) {\n                el.left.scripts.container.child.add(new lib.element(\"DIV\").child.add(new lib.element(\"DIV\").attribute.addClass(\"LineNumber\").update(i + 1), new lib.element(\"DIV\").attribute.addClass(\"Code\").update(\"&nbsp;\" + source[i]), new lib.element(\"DIV\").attribute.addClass('Clear')));\n              };\n            };\n          } catch(e){\n            el.left.scripts.container.child.add(\n              new lib.element(\"DIV\").attribute.addClass(\"CodeContainer\").update(\"<em>Access to restricted URI denied</em>\")\n            );\n          }\n        }\n      },\n      toggleLineNumbers:function(){\n        with(firebug){\n          d.scripts.lineNumbers = !d.scripts.lineNumbers;\n          el.button.scripts.lineNumbers.attribute[(d.scripts.lineNumbers ? \"add\" : \"remove\") + \"Class\"](\"Enabled\");\n          d.scripts.open( d.scripts.index );\n        }\n      },\n      refresh:function(){\n        with(firebug){\n          el.button.scripts.selectbox.clean();\n          var collection = env.targetWindow.document.getElementsByTagName(\"script\");\n          for(var i=0,len=collection.length; i<len; i++){\n            var item = collection[i],\n            fileName = getFileName(item.src||item.baseURI||\"..\");\n            d.scripts.index=d.scripts.index<0?i:d.scripts.index;\n            el.button.scripts.selectbox.child.add(\n                new lib.element(\"OPTION\").attribute.set(\"value\",i).update(fileName)\n            );\n          }\n          d.scripts.open( d.scripts.index );\n        }\n      }\n    },\n    str: {\n      open:function(_str){\n        with(firebug){\n          d.navigate(\"str\");\n          el.left.str.container.update(_str.replace(/\\n/g,\"<br />\"))\n        }\n      }\n    },\n    xhr:{\n      objects:[],\n      addObject:function(){\n        with(firebug){\n          for(var i=0,len=arguments.length; i<len; i++){\n            try {\n              var item = arguments[i],\n                  val = env.targetWindow.eval(item);\n              d.xhr.objects.push([item, val]);\n            } catch(e){\n              continue;\n            }\n          }\n        }\n      },\n      open:function(){\n        with(firebug){\n          el.left.xhr.container.update(\"\");\n          el.left.xhr.name = new lib.element(\"DIV\").attribute.addClass(\"BlockContent\").insert(new lib.element(\"DIV\").attribute.addClass(\"Block\").environment.addStyle({ \"width\":\"20%\" }).insert(el.left.xhr.container));\n          el.left.xhr.nameTitle = new lib.element(\"STRONG\").update(\"Object Name:\").insert(el.left.xhr.name);\n          el.left.xhr.nameContent = new lib.element(\"DIV\").insert(el.left.xhr.name);\n          el.left.xhr.status = new lib.element(\"DIV\").attribute.addClass(\"BlockContent\").insert(new lib.element(\"DIV\").attribute.addClass(\"Block\").environment.addStyle({ \"width\":\"10%\" }).insert(el.left.xhr.container));\n          el.left.xhr.statusTitle = new lib.element(\"STRONG\").update(\"Status:\").insert(el.left.xhr.status);\n          el.left.xhr.statusContent = new lib.element(\"DIV\").insert(el.left.xhr.status);\n          el.left.xhr.readystate = new lib.element(\"DIV\").attribute.addClass(\"BlockContent\").insert(new lib.element(\"DIV\").environment.addStyle({ \"width\":\"15%\" }).attribute.addClass(\"Block\").insert(el.left.xhr.container));\n          el.left.xhr.readystateTitle =el.left.xhr.nameTitle = new lib.element(\"STRONG\").update(\"Ready State:\").insert(el.left.xhr.readystate);\n          el.left.xhr.readystateContent = new lib.element(\"DIV\").insert(el.left.xhr.readystate);\n          el.left.xhr.response = new lib.element(\"DIV\").attribute.addClass(\"BlockContent\").insert(new lib.element(\"DIV\").environment.addStyle({ \"width\":(lib.env.ie?\"50\":\"55\")+\"%\" }).attribute.addClass(\"Block\").insert(el.left.xhr.container));\n          el.left.xhr.responseTitle = new lib.element(\"STRONG\").update(\"Response:\").insert(el.left.xhr.response);\n          el.left.xhr.responseContent = new lib.element(\"DIV\").insert(el.left.xhr.response);\n          setTimeout(d.xhr.refresh,500);\n        }\n      },\n      refresh:function(){\n        with(firebug){\n          el.left.xhr.nameContent.update(\"\");\n          el.left.xhr.statusContent.update(\"\");\n          el.left.xhr.readystateContent.update(\"\");\n          el.left.xhr.responseContent.update(\"\");\n          for(var i=0,len=d.xhr.objects.length; i<len; i++){\n            var item = d.xhr.objects[i],\n                response = item[1].responseText;\n            if(Boolean(item[1])==false)continue;\n            el.left.xhr.nameContent.child.add(new lib.element(\"span\").update(item[0]));\n            try {\n              el.left.xhr.statusContent.child.add(new lib.element(\"span\").update(item[1].status));\n            } catch(e){ el.left.xhr.statusContent.child.add(new lib.element(\"span\").update(\"&nbsp;\")); }\n            el.left.xhr.readystateContent.child.add(new lib.element(\"span\").update(item[1].readyState));\n\n            el.left.xhr.responseContent.child.add(new lib.element(\"span\").child.add(\n                new lib.element(\"A\").event.addListener(\"click\",lib.util.Curry(d.str.open,window,response)).update(\"&nbsp;\"+response.substring(0,50))\n            ));\n          };\n          if(env.dIndex==\"xhr\")\n            setTimeout(d.xhr.refresh,500);\n        }\n      }\n    },\n    navigateRightColumn:function(_index,_open){\n      with(firebug){\n        el.left.container.environment.addStyle({ \"width\":_open?\"70%\":\"100%\" });\n        el.right.container.environment.addStyle({ \"display\":_open?\"block\":\"none\" });\n      }\n    },\n    navigate:function(_index){\n      with(firebug){\n        var open = _index, close = env.dIndex;\n        env.dIndex = open;\n\n        settings.hide();\n\n        el.button[close].container.environment.addStyle({ \"display\":\"none\" });\n        el.left[close].container.environment.addStyle({ \"display\":\"none\" });\n        el.right[close].container.environment.addStyle({ \"display\":\"none\" });\n\n        el.button[open].container.environment.addStyle({ \"display\":\"inline\" });\n        el.left[open].container.environment.addStyle({ \"display\":\"block\" });\n        el.right[open].container.environment.addStyle({ \"display\":\"block\" });\n\n        if(el.nav[close])\n          el.nav[close].attribute.removeClass(\"Selected\");\n        if(el.nav[open])\n          el.nav[open].attribute.addClass(\"Selected\");\n\n        switch(open){\n          case \"console\":\n            d.navigateRightColumn(_index);\n            break;\n          case \"html\":\n            d.navigateRightColumn(_index,true);\n            if(!d.html.current){\n              var t=Number(new Date);\n              d.html.openHtmlTree();\n            }\n            break;\n          case \"css\":\n            d.navigateRightColumn(_index,true);\n            d.css.refresh();\n            break;\n          case \"scripts\":\n            d.navigateRightColumn(_index);\n            d.scripts.refresh();\n            break;\n          case \"dom\":\n            d.navigateRightColumn(_index);\n            if(el.left.dom.container.environment.getElement().innerHTML==\"\"){\n              var t=Number(new Date);\n              d.dom.open(eval(el.button.dom.textbox.environment.getElement().value),el.left.dom.container);\n            }\n            break;\n          case \"xhr\":\n            d.navigateRightColumn(_index);\n            d.xhr.open();\n            break;\n        }\n      }\n    }\n  },\n  getFileName:function(_path){\n    var match = _path&&_path.match(/[\\w\\-\\.\\?\\=\\&]+$/);\n    return match&&match[0]||_path;\n  },\n  cancelEvent:function(_event){\n    if(_event.stopPropagation)\n      _event.stopPropagation();\n    if(_event.preventDefault)\n      _event.preventDefault();\n  },\n  getSelection:function(_el){\n    with(firebug){\n      if(lib.env.ie){\n        var range = document.selection.createRange(),stored = range.duplicate();\n        stored.moveToElementText(_el);\n        stored.setEndPoint('EndToEnd', range);\n        _el.selectionStart = stored.text.length - range.text.length;\n        _el.selectionEnd = _el.selectionStart + range.text.length;\n      }\n      return {\n        start:_el.selectionStart,\n        length:_el.selectionEnd-_el.selectionStart\n      }\n    }\n  },\n  tab:function(_el,_event){\n    with(firebug){\n      if(_event.keyCode==9){\n        if(_el.setSelectionRange){\n          var position = firebug.getSelection(_el);\n          _el.value = _el.value.substring(0,position.start) + String.fromCharCode(9) + _el.value.substring(position.start+position.length,_el.value.length);\n          _el.setSelectionRange(position.start+1,position.start+1);\n        } else if(document.selection) {  \n          var range = document.selection.createRange(), isCollapsed = range.text == '';\n          range.text = String.fromCharCode(9);\n          range.moveStart('character', -1);\n        }\n        firebug.cancelEvent(_event);\n        if(lib.env.ie)\n          setTimeout(_el.focus,100);\n      };\n    }\n  },\n  listen: {\n    addXhrObject:function(){\n      with(firebug){\n        d.xhr.addObject.apply(env.targetWindow, el.button.xhr.textbox.environment.getElement().value.split(\",\"));\n      }\n    },\n    consoleTextbox:function(_event){\n      with(firebug){\n        if(_event.keyCode==13&&(env.multilinemode==false||_event.shiftKey==false)){\n          d.console.historyIndex = d.console.history.length;\n          d.console.eval(el.left.console.input.environment.getElement().value);\n          return false;\n        }\n\n        switch(_event.keyCode){\n          case 40:\n            if(d.console.history[d.console.historyIndex+1]){\n              d.console.historyIndex+=1;\n              el.left.console.input.update( d.console.history[d.console.historyIndex] );\n            }\n            break;\n          case 38:\n            if(d.console.history[d.console.historyIndex-1]){\n              d.console.historyIndex-=1;\n              el.left.console.input.update( d.console.history[d.console.historyIndex] );\n            }\n            break;\n        }\n      }\n    },\n    cssSelectbox:function(){\n      with(firebug){\n        d.css.open(el.button.css.selectbox.environment.getElement().selectedIndex);\n      }\n    },\n    domTextbox:function(_event){\n      with(firebug){\n        if(_event.keyCode==13){\n          d.dom.open(eval(el.button.dom.textbox.environment.getElement().value),el.left.dom.container);\n        }\n      }\n    },\n    inspector:function(){\n      with(firebug){\n        if (env.popupWin) {\n          env.popupWin.firebug.d.html.inspect(firebug.d.inspector.el);\n        } else {\n          firebug.d.html.inspect(firebug.d.inspector.el);\n        }\n      }\n    },\n    keyboard:function(_event){\n      with(firebug){\n        if(_event.keyCode==27 && d.inspector.enabled){\n          d.inspector.toggle();\n        } else if(_event.keyCode === 123 && _event.ctrlKey || _event.metaKey) {\n          if(env.isPopup){\n            win.dock();\n          }else {\n            win.newWindow();\n          }\n        } else if(\n            (_event.keyCode === 123 && !_event.ctrlKey && !_event.metaKey) || \n            (_event.keyCode === 76 && (_event.ctrlKey || _event.metaKey) && _event.shiftKey) ||\n            (_event.keyCode === 13 && _event.shiftKey)) {\n\n          if(env.isPopup){\n            win.dock();\n          } else if (el.main.environment.getStyle(\"display\") === 'none') {\n            win.show();\n          } else {\n            win.hide();\n          }\n        }\n      }\n    },\n    mouse:function(_event){\n      with(firebug){\n        var target;\n        \n        if(document.elementFromPoint) {\n          target = document.elementFromPoint(_event.clientX, _event.clientY);\n        } else {\n          if(lib.env.ie) {\n            target = _event.srcElement;\n          } else {\n            target = _event.explicitOriginalTarget || _event.target;\n          }\n        }\n        \n        if( d.inspector.enabled&&\n          target!=document.body&&\n          target!=document.firstChild&&\n          target!=document.childNodes[1]&&\n          target!=el.borderInspector.environment.getElement()&&\n          target!=el.main.environment.getElement()&&\n          target.offsetParent!=el.main.environment.getElement() ) {\n            d.inspector.inspect(target);\n        }\n      }\n    },\n    runMultiline:function(){\n      with(firebug){\n        d.console.eval.call(window,el.right.console.input.environment.getElement().value);\n      }\n    },\n    runCSS:function(){\n      with(firebug){\n        var source = el.right.css.input.environment.getElement().value.replace(/\\n|\\t/g,\"\").split(\"}\");\n        for(var i=0, len=source.length; i<len; i++){\n          var item = source[i]+\"}\", rule = !lib.env.ie?item:item.split(/{|}/),\n              styleSheet = document.styleSheets[0];\n          console.log(rule);\n          if(item.match(/.+\\{.+\\}/)){\n            if(lib.env.ie)\n              styleSheet.addRule(rule[0],rule[1]);\n            else\n              styleSheet.insertRule( rule, styleSheet.cssRules.length );\n          }\n        }\n      }\n    },\n    scriptsSelectbox:function(){\n      with(firebug){\n        d.scripts.open(parseInt(el.button.scripts.selectbox.environment.getElement().value));\n      }\n    },\n    xhrTextbox:function(_event){\n      with(firebug){\n        if(_event.keyCode==13){\n          d.xhr.addObject.apply(env.targetWindow, el.button.xhr.textbox.environment.getElement().value.split(\",\"));\n        }\n      }\n    }\n  }\n};\n\n(function(_scope){\n  _scope.lib = {};\n  var pi  = _scope.lib; pi.version = [1.1,2008091000];\n\n  pi.env = {\n    ie: /MSIE/i.test(navigator.userAgent),\n    ie6: /MSIE 6/i.test(navigator.userAgent),\n    ie7: /MSIE 7/i.test(navigator.userAgent),\n    ie8: /MSIE 8/i.test(navigator.userAgent),\n    firefox: /Firefox/i.test(navigator.userAgent),\n    opera: /Opera/i.test(navigator.userAgent),\n    webkit: /Webkit/i.test(navigator.userAgent),\n    camino: /Camino/i.test(navigator.userAgent)\n  };\n\n  pi.get = function(){\n    return document.getElementById(arguments[0]);\n  };\n  pi.get.byTag = function(){\n    return document.getElementsByTagName(arguments[0]);\n  };\n  pi.get.byClass = function(){ return document.getElementsByClassName.apply(document,arguments); };\n\n  pi.util = {\n    Array:{\n      clone:function(_array,_undeep){\n        var tmp = [];\n        Array.prototype.push.apply(tmp,_array);\n        pi.util.Array.forEach(tmp,function(_item,_index,_source){\n          if(_item instanceof Array&&!_undeep)\n            _source[_index] = pi.util.Array.clone(_source[_index]);\n        });\n        return tmp;\n      },\n      count:function(_array,_value){\n        var count = 0;\n        pi.util.Array.forEach(_array,function(){\n          count+=Number(arguments[0]==_value);\n        });\n        return count;\n      },\n      forEach:function(_array,_function){\n        if(_array.forEach)\n          return _array.forEach(_function);\n        for(var i=0,len=_array.length; i<len; i++)\n          _function.apply(_array,[_array[i],i,_array]);   \n      },\n      getLatest:function(_array){\n        return _array[_array.length-1];\n      },\n      indexOf:function(_array,_value){\n        if(!pi.env.ie){\n          return _array.indexOf(_value);\n        };\n\n        var index = -1;\n        for(var i=0, len=_array.length; i<len; i++){\n          if(_array[i]==_value){\n            index = i;\n            break;\n          }\n        }\n        return index;\n      },\n      remove:function(_array,_index){\n        var result = _array.slice(0,_index);\n        _array = Array.prototype.push.apply(result,_array.slice(_index+1));\n        return result;\n      }\n    },\n    Curry:function(_fn,_scope){\n      var fn = _fn, scope = _scope||window, args = Array.prototype.slice.call(arguments,2);\n      return function(){ \n        return fn.apply(scope,args.concat( Array.prototype.slice.call(arguments,0) )); \n      };\n    },\n    Extend:function(_superClass,_prototype,_skipClonning){\n      var object = new pi.base;\n      if(_prototype[\"$Init\"]){\n        object.init = _prototype[\"$Init\"];\n        delete _prototype[\"$Init\"];\n      };\n\n      object.body = _superClass==pi.base?_prototype:pi.util.Hash.merge(_prototype,_superClass.prototype);\n      object.init=object.init||function(){\n        if(_superClass!=pi.base)\n          _superClass.apply(this,arguments);\n      };\n\n      return object.build(_skipClonning);\n    },\n    IsArray:function(_object){\n      if(_object===null){\n        return false;\n      }\n      if(window.NodeList&&window.NamedNodeMap&&!pi.env.ie8){\n        if(_object instanceof Array||_object instanceof NodeList||_object instanceof NamedNodeMap||(window.HTMLCollection&&_object instanceof HTMLCollection))\n          return true;\n      };\n      if(!_object||_object==window||typeof _object==\"function\"||typeof _object==\"string\"||typeof _object.length!=\"number\"){\n        return false\n      };\n      var len = _object.length;\n      if(len>0&&_object[0]!=undefined&&_object[len-1]!=undefined){\n        return true;\n      } else {\n        for(var key in _object){\n          if(key!=\"item\"&&key!=\"length\"&&key!=\"setNamedItemNS\"&&key!=\"setNamedItem\"&&key!=\"getNamedItem\"&&key!=\"removeNamedItem\"&&key!=\"getNamedItemNS\"&&key!=\"removeNamedItemNS\"&&key!=\"tags\"){\n            return false;\n          }\n        }\n        return true\n      };\n    },\n    IsHash:function(_object){\n      return _object && typeof _object==\"object\"&&(_object==window||_object instanceof Object)&&!_object.nodeName&&!pi.util.IsArray(_object)\n    },\n    Init:[],\n    AddEvent: function(_element,_eventName,_fn,_useCapture){\n      _element[pi.env.ie?\"attachEvent\":\"addEventListener\"]((pi.env.ie?\"on\":\"\")+_eventName,_fn,_useCapture||false);\n      return pi.util.Curry(pi.util.AddEvent,this,_element);\n    },\n    RemoveEvent: function(_element,_eventName,_fn,_useCapture){\n      _element[pi.env.ie?\"detachEvent\":\"removeEventListener\"]((pi.env.ie?\"on\":\"\")+_eventName,_fn,_useCapture||false);\n      return pi.util.Curry(pi.util.RemoveEvent,this,_element);\n    },\n    Element:{\n      addClass:function(_element,_class){\n        if( !pi.util.Element.hasClass(_element,_class) )\n          pi.util.Element.setClass(_element, pi.util.Element.getClass(_element) + \" \" + _class );\n      },\n      getClass:function(_element){\n        return _element.getAttribute(pi.env.ie&&!pi.env.ie8?\"className\":\"class\")||\"\";\n      },\n      hasClass:function(_element,_class){\n        return pi.util.Array.indexOf(pi.util.Element.getClass(_element).split(\" \"),_class)>-1;\n      },\n      removeClass:function(_element,_class){\n        if( pi.util.Element.hasClass(_element,_class) ){\n          var names = pi.util.Element.getClass(_element,_class).split(\" \");\n          pi.util.Element.setClass(\n              _element, \n              pi.util.Array.remove(names,pi.util.Array.indexOf(names,_class)).join(\" \")\n          );\n        }\n      },\n      setClass:function(_element,_value){\n        if(pi.env.ie8){\n          _element.setAttribute(\"className\", _value );\n          _element.setAttribute(\"class\", _value );\n        } else {\n          _element.setAttribute(pi.env.ie?\"className\":\"class\", _value );\n        }\n      },\n      toggleClass:function(){\n        if(pi.util.Element.hasClass.apply(this,arguments))\n          pi.util.Element.removeClass.apply(this,arguments);\n        else\n          pi.util.Element.addClass.apply(this,arguments);\n      },\n      getOpacity:function(_styleObject){\n        var styleObject = _styleObject;\n        if(!pi.env.ie)\n          return styleObject[\"opacity\"];\n\n        var alpha = styleObject[\"filter\"].match(/opacity\\=(\\d+)/i);\n        return alpha?alpha[1]/100:1;\n      },\n      setOpacity:function(_element,_value){\n        if(!pi.env.ie)\n          return pi.util.Element.addStyle(_element,{ \"opacity\":_value });\n        _value*=100;\n        pi.util.Element.addStyle(_element,{ \"filter\":\"alpha(opacity=\"+_value+\")\" });\n        return this._parent_;\n      },\n      getPosition:function(_element){\n        var parent = _element,offsetLeft = document.body.offsetLeft, offsetTop = document.body.offsetTop, view = pi.util.Element.getView(_element);\n        while(parent&&parent!=document.body&&parent!=document.firstChild){\n          offsetLeft +=parseInt(parent.offsetLeft);\n          offsetTop += parseInt(parent.offsetTop);\n          parent = parent.offsetParent;\n        };\n        return {\n          \"bottom\":view[\"bottom\"],\n          \"clientLeft\":_element.clientLeft,\n          \"clientTop\":_element.clientTop,\n          \"left\":view[\"left\"],\n          \"marginTop\":view[\"marginTop\"],\n          \"marginLeft\":view[\"marginLeft\"],\n          \"offsetLeft\":offsetLeft,\n          \"offsetTop\":offsetTop,\n          \"position\":view[\"position\"],\n          \"right\":view[\"right\"],\n          \"top\":view[\"top\"],\n          \"zIndex\":view[\"zIndex\"]\n        };\n      },\n      getSize:function(_element){\n        var view = pi.util.Element.getView(_element);\n        return {\n          \"height\":view[\"height\"],\n          \"clientHeight\":_element.clientHeight,\n          \"clientWidth\":_element.clientWidth,\n          \"offsetHeight\":_element.offsetHeight,\n          \"offsetWidth\":_element.offsetWidth,\n          \"width\":view[\"width\"]\n        }\n      },\n      addStyle:function(_element,_style){\n        for(var key in _style){\n          key = key==\"float\"?pi.env.ie?\"styleFloat\":\"cssFloat\":key;\n          if (key == \"opacity\" && pi.env.ie) {\n            pi.util.Element.setOpacity(_element,_style[key]);\n            continue;\n          }\n          try {\n            _element.style[key] = _style[key];\n          }catch(e){}     \n        }\n      },\n      getStyle:function(_element,_property){\n        _property = _property==\"float\"?pi.env.ie?\"styleFloat\":\"cssFloat\":_property;\n        if(_property==\"opacity\"&&pi.env.ie)\n          return pi.util.Element.getOpacity(_element.style);\n        return typeof _property==\"string\"?_element.style[_property]:_element.style;\n      },\n      getValue:function(_element){\n        switch(_element.nodeName.toLowerCase()){\n          case \"input\":\n          case \"textarea\":\n            return _element.value;\n          case \"select\":\n            return _element.options[_element.selectedIndex].value;\n          default:\n            return _element.innerHTML;\n          break;\n        }\n      },\n      getView:function(_element,_property){\n        var view = document.defaultView?document.defaultView.getComputedStyle(_element,null):_element.currentStyle;\n        _property = _property==\"float\"?pi.env.ie?\"styleFloat\":\"cssFloat\":_property;\n        if(_property==\"opacity\"&&pi.env.ie)\n          return pi.util.Element.getOpacity(_element,view);\n        return typeof _property==\"string\"?view[_property]:view;\n      }\n    },\n    Hash: {\n      clone:function(_hash,_undeep){\n        var tmp = {};\n        for(var key in _hash){\n          if( !_undeep&&pi.util.IsArray( _hash[key] ) ){\n            tmp[key] = pi.util.Array.clone( _hash[key] );\n          } else if( !_undeep&&pi.util.IsHash( _hash[key] ) ){\n            tmp[ key ] = pi.util.Hash.clone(_hash[key]);\n          } else {\n            tmp[key] = _hash[key];\n          }\n        }\n        return tmp;\n      },\n      merge:function(_hash,_source,_undeep){\n        for(var key in _source){\n          var value = _source[key];\n          if (!_undeep&&pi.util.IsArray(_source[key])) {\n            if(pi.util.IsArray( _hash[key] )){\n              Array.prototype.push.apply( _source[key], _hash[key] )\n            }\n            else\n              value = pi.util.Array.clone(_source[key]);\n          }\n          else if (!_undeep&&pi.util.IsHash(_source[key])) {\n            if (pi.util.IsHash(_hash[key])) {\n              value = pi.util.Hash.merge(_hash[key], _source[key]);\n            } else {\n              value = pi.util.Hash.clone( _source[key] );\n            }\n          } else if( _hash[key] )\n            value = _hash[ key ];\n          _hash[key] = value;\n        };\n        return _hash;\n      }\n    },\n    String:{\n      format:function(_str){\n        var values = Array.prototype.slice.call(arguments,1);\n        return _str.replace(/\\{(\\d)\\}/g,function(){\n          return values[arguments[1]];\n        })\n      }\n    },\n    GetViewport:function(){\n      return {\n        height:document.documentElement.clientHeight||document.body.clientHeight,\n        width:document.documentElement.clientWidth||document.body.clientWidth\n      }\n    }\n  };\n\n  pi.base = function(){\n    this.body = {};\n    this.init = null;\n\n    this.build = function(_skipClonning){\n      var base = this, skipClonning = _skipClonning||false, _private = {},\n      fn = function(){\n        var _p = pi.util.Hash.clone(_private);\n        if(!skipClonning){\n          for(var key in this){\n            if(pi.util.IsArray( this[ key ] ) ){\n              this[key] = pi.util.Array.clone( this[key] );\n            } else\n              if( pi.util.IsHash(this[key]) ){\n                this[key] = pi.util.Hash.clone( \n                    this[ key ],\n                    function(_key,_object){\n                      this[ _key ]._parent_ = this;\n                    }\n                );\n                //this[key]._parent_ = this;\n              }\n          }\n        };\n        base.createAccessors( _p, this );\n        if(base.init)\n          return base.init.apply(this,arguments);\n        return this;\n      };\n      this.movePrivateMembers(this.body,_private);\n      if(this.init){\n        fn[\"$Init\"] = this.init;\n      };\n      fn.prototype = this.body;\n      return fn;\n    };\n\n    this.createAccessors = function(_p, _branch){\n      var getter = function(_property){ return this[_property]; },\n      setter = function(_property,_value){ this[_property] = _value; return _branch._parent_||_branch; };\n\n      for (var name in _p) {\n        var isPrivate = name.substring(0, 1) == \"_\", title = name.substring(1, 2).toUpperCase() + name.substring(2);\n\n        if (isPrivate) {\n          _branch[(_branch[\"get\" + title]?\"_\":\"\")+\"get\" + title] = pi.util.Curry(getter,_p,name);\n          _branch[(_branch[\"set\" + title]?\"_\":\"\")+\"set\" + title] = pi.util.Curry(setter,_p,name);\n        }\n        else \n          if (pi.util.IsHash(_p[name])){\n            _branch[name]._parent_ = _branch;\n            if(!_branch[name])\n              _branch[name] = {};\n            this.createAccessors(_p[name], _branch[name]);\n          }   \n      };\n    };\n\n    this.movePrivateMembers = function(_object, _branch){\n      for (var name in _object) {\n        var isPrivate = name.substring(0, 1) == \"_\";\n\n        if (isPrivate) {\n          _branch[name] = _object[name];\n          delete _object[name];\n        }\n        else \n          if (pi.util.IsHash(_object[name])){\n            _branch[name] = {};\n            this.movePrivateMembers(_object[name], _branch[name]);\n          }\n      };\n    };\n  };\n\n  pi.element = new pi.base;\n  pi.element.init = function(_val){\n    this.environment.setElement(\n        typeof _val==\"string\"||!_val?\n            document.createElement(_val||\"DIV\"):\n              _val\n    );\n    return this;\n  };\n\n  pi.element.body = {\n    \"addStyle\":function(){\n      return this.environment.addStyle.apply(this.environment,arguments);\n    },\n    \"clean\":function(){\n      var childs = this.child.get();\n      while(childs.length){\n        childs[0].parentNode.removeChild(childs[0]);\n      }\n    },\n    \"clone\":function(_deep){\n      return this.environment.getElement().cloneNode(_deep);\n    },\n    \"insert\":function(_element){\n      _element = _element.environment?_element.environment.getElement():_element;\n      _element.appendChild(this.environment.getElement());\n      return this;\n    },\n    \"insertAfter\":function(_referenceElement){\n      _referenceElement = _referenceElement.environment?_referenceElement.environment.getElement():_referenceElement;\n      _referenceElement.nextSibling?this.insertBefore(_referenceElement.nextSibling):this.insert(_referenceElement.parentNode);\n      return this;\n    },\n    \"insertBefore\":function(_referenceElement){\n      _referenceElement = _referenceElement.environment?_referenceElement.environment.getElement():_referenceElement;\n      _referenceElement.parentNode.insertBefore(this.environment.getElement(),_referenceElement);\n      return this;\n    },\n    \"query\":function(_expression,_resultType,namespaceResolver,_result){\n      return pi.xpath(_expression,_resultType||\"ORDERED_NODE_SNAPSHOT_TYPE\",this.environment.getElement(),_namespaceResolver,_result);\n    },\n    \"remove\":function(){\n      if (this.environment.getParent()) {\n        this.environment.getParent().removeChild(this.environment.getElement());\n      }\n    },\n    \"update\":function(_value){\n      this.element[this.element.nodeName.toLowerCase()==\"textarea\"||this.element.nodeName.toLowerCase()==\"input\"?\"value\":\"innerHTML\"]=_value;\n      return this;\n    },\n    \"attribute\":{\n      \"getAll\":function(){\n        return this._parent_.environment.getElement().attributes;\n      },\n      \"clear\":function(_name){\n        this.set(_name,\"\");\n        return this._parent_;\n      },\n      \"get\":function(_name){\n        return this._parent_.environment.getElement().getAttribute(_name);\n      },\n      \"has\":function(_name){\n        return pi.env.ie?(this.get(_name)!=null):this._parent_.environment.getElement().hasAttribute(_name);\n      },\n      \"remove\":function(_name){\n        this._parent_.environment.getElement().removeAttribute(_name);\n        return this._parent_;\n      },\n      \"set\":function(_name,_value){\n        this._parent_.environment.getElement().setAttribute(_name,_value);\n        return this._parent_;\n      },\n      \"addClass\":function(_classes){\n        for(var i=0,len=arguments.length; i<len; i++){\n          pi.util.Element.addClass(this._parent_.environment.getElement(),arguments[i]);\n        };\n        return this._parent_;\n      },\n      \"clearClass\":function(){\n        this.setClass(\"\");\n        this._parent_;\n      },\n      \"getClass\":function(){\n        return pi.util.Element.getClass( this._parent_.environment.getElement() );\n      },\n      \"hasClass\":function(_class){\n        return pi.util.Element.hasClass( this._parent_.environment.getElement(), _class );\n      },\n      \"setClass\":function(_value){\n        return pi.util.Element.setClass( this._parent_.environment.getElement(), _value );\n      },\n      \"removeClass\":function(_class){\n        pi.util.Element.removeClass( this._parent_.environment.getElement(), _class );\n        return this._parent_;\n      },\n      \"toggleClass\":function(_class){\n        pi.util.Element.toggleClass( this._parent_.environment.getElement(), _class );\n      }\n    },\n    \"child\":{\n      \"get\":function(){\n        return this._parent_.environment.getElement().childNodes;\n      },\n      \"add\":function(_elements){\n        for (var i = 0; i < arguments.length; i++) {\n          var el = arguments[i];\n          this._parent_.environment.getElement().appendChild(\n              el.environment ? el.environment.getElement() : el\n          );\n        }\n        return this._parent_;\n      },\n      \"addAfter\":function(_element,_referenceElement){\n        this.addBefore(\n            _element.environment?_element.environment.getElement():_element,\n                (_referenceElement.environment?_referenceElement.environment.getElement():_referenceElement).nextSibling\n        );\n        return this._parent_;\n      },\n      \"addBefore\":function(_element,_referenceElement){\n        this._parent_.environment.getElement().insertBefore(\n            _element.environment?_element.environment.getElement():_element,\n                _referenceElement.environment?_referenceElement.environment.getElement():_referenceElement\n        );\n        return this._parent_;\n      },\n      \"remove\":function(_element){\n        this._parent_.environment.getElement().removeChild(_element.environment?_element.environment.getElement():_element);\n      }\n    },\n    \"environment\":{\n      \"_element\":null,\n      \"setElement\":function(_value){\n        this._parent_.element = _value;\n        this._parent_.element.lib = this._parent_;\n        this._parent_.element.firebugElement = true;\n        this._setElement(_value);\n      },\n      \"getParent\":function(){\n        return this.getElement().parentNode;\n      },\n      \"getPosition\":function(){\n        return pi.util.Element.getPosition(this.getElement());\n      },\n      \"getSize\":function(){\n        return pi.util.Element.getSize( this.getElement() );\n      },\n      \"addStyle\":function(_styleObject){\n        pi.util.Element.addStyle(this.getElement(),_styleObject);\n        return this._parent_;\n      },\n      \"getStyle\":function(_property){\n        return pi.util.Element.getStyle(this.getElement(),_property);\n      },\n      \"getName\":function(){\n        return this.getElement().nodeName;\n      },\n      \"getType\":function(){\n        return this.getElement().nodeType;\n      },\n      \"getValue\":function(){\n        return pi.util.Element.getValue(this.getElement());\n      },\n      \"getView\":function(_property){\n        return pi.util.Element.getView(this.getElement(),_property);\n      }\n    },\n    \"event\":{\n      \"addListener\":function(_event,_fn,_useCapture){\n        pi.util.AddEvent(this._parent_.environment.getElement(),_event,_fn,_useCapture);\n        return this._parent_;\n      },\n      \"removeListener\":function(_event,_fn,_useCapture){\n        pi.util.RemoveEvent(this._parent_.environment.getElement(),_event,_fn,_useCapture);\n        return this._parent_;\n      }\n    }\n  };\n  pi.element = pi.element.build();\n\n  pi.xhr = new pi.base;\n  pi.xhr.init = function(_url){\n    if(!window.XMLHttpRequest){\n      var names = [\"Msxml2.XMLHTTP.6.0\",\"Msxml2.XMLHTTP.3.0\",\"Msxml2.XMLHTTP\",\"Microsoft.XMLHTTP\"];\n      for (var i = 0; i < names.length; i++) {\n        try {\n          this.environment.setApi(new ActiveXObject(names[i]));\n          break;\n        } catch (e) { continue; }\n      }\n    }\n    else {\n      this.environment.setApi(new XMLHttpRequest());\n    }\n    this.environment.getApi().onreadystatechange=pi.util.Curry(this.event.readystatechange,this);\n    this.environment.setUrl(_url);\n    this.environment.setCallback([]);\n\n    return this;\n  };\n  pi.xhr.body = {\n    \"addCallback\": function(){\n      return this.environment.addCallback.apply(this.environment,arguments);\n    },\n    \"addData\": function(){\n      return this.environment.addData.apply(this.environment,arguments);\n    },\n    \"abort\":function(){\n      this.environment.getApi().abort();\n      return this;\n    },\n    \"send\":function(){\n      var url = this.environment.getUrl(), data = this.environment.getData(),dataUrl = \"\"; \n\n      if(!this.environment.getCache())\n        data[\"forceCache\"] = Number(new Date);\n\n      for (var key in data)\n        dataUrl += pi.util.String.format(\"{0}={1}&\",key, data[key]);\n\n      if (this.environment.getType()==\"GET\")\n        url += (url.search(\"\\\\?\")==-1?\"?\":\"&\")+pi.util.String.format(\"{0}\",dataUrl);\n\n      this.api.open(this.environment.getType(),url,this.environment.getAsync());\n      if(this.environment.getType()==\"POST\"){\n        this.api.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\");\n      };\n      this.api.send(this.environment.getType()==\"GET\"?\"\":dataUrl);\n      return this;\n    }\n  };\n  pi.xhr.body.environment = {\n    \"_async\":true, \"_api\":null, \"_cache\":true, \"_callback\":null, \"_data\":{}, \"_type\":\"GET\", \"_url\":\"\",\n    \"setApi\":function(_value){\n      this._parent_.api = _value;\n      this._setApi(_value);\n    },\n    \"addCallback\": function(_readyState,_fn){\n      this.getCallback().push({ \"fn\":_fn, \"readyState\":_readyState  });\n      return this._parent_;\n    },\n    \"addData\": function(_key,_value){\n      this.getData()[_key] = _value;\n      return this._parent_;\n    },\n    \"setType\": function(_value){\n      this._setType(_value);\n      return this._parent_;\n    }\n  };\n  pi.xhr.body.event = {\n    \"readystatechange\":function(){\n      var readyState = this.environment.getApi().readyState, callback=this.environment.getCallback();\n      for (var i = 0, len=callback.length; i < len; i++) {\n        if(pi.util.Array.indexOf(callback[i].readyState,readyState)>-1){\n          callback[i].fn.apply(this);\n        }\n      }\n    }\n  };\n  pi.xhr = pi.xhr.build();\n\n  /*\n   * xml.xhr.get\n   */\n\n  pi.xhr.get = function(_url,_returnPiObject){\n    var request = new pi.xhr();\n    request.environment.setAsync(false);\n    request.environment.setUrl(_url);\n    request.send();\n    return _returnPiObject?request:request.environment.getApi();\n  };\n\n  /*\n   * registering onload event for init functions\n   */\n  pi.util.AddEvent(\n    pi.env.ie?window:document,\n    pi.env.ie?\"load\":\"DOMContentLoaded\",\n    function(){\n      for(var i=0,len=pi.util.Init.length; i<len; i++){\n        pi.util.Init[ i ]();\n      }\n    }\n  );\n})(firebug);\n\nwith(firebug){\n  initConsole();\n  lib.util.Init.push(firebug.init);\n}\n","Magento_Tinymce3/tiny_mce/classes/util/Quirks.js":"(function(tinymce) {\n\tvar VK = tinymce.VK, BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE;\n\n\t/**\n\t * Fixes a WebKit bug when deleting contents using backspace or delete key.\n\t * WebKit will produce a span element if you delete across two block elements.\n\t *\n\t * Example:\n\t * <h1>a</h1><p>|b</p>\n\t *\n\t * Will produce this on backspace:\n\t * <h1>a<span class=\"Apple-style-span\" style=\"<all runtime styles>\">b</span></p>\n\t *\n\t * This fixes the backspace to produce:\n\t * <h1>a|b</p>\n\t *\n\t * See bug: https://bugs.webkit.org/show_bug.cgi?id=45784\n\t *\n\t * This code is a bit of a hack and hopefully it will be fixed soon in WebKit.\n\t */\n\tfunction cleanupStylesWhenDeleting(ed) {\n\t\tvar dom = ed.dom, selection = ed.selection;\n\n\t\ted.onKeyDown.add(function(ed, e) {\n\t\t\tvar rng, blockElm, node, clonedSpan, isDelete;\n\n\t\t\tisDelete = e.keyCode == DELETE;\n\t\t\tif (isDelete || e.keyCode == BACKSPACE) {\n\t\t\t\te.preventDefault();\n\t\t\t\trng = selection.getRng();\n\n\t\t\t\t// Find root block\n\t\t\t\tblockElm = dom.getParent(rng.startContainer, dom.isBlock);\n\n\t\t\t\t// On delete clone the root span of the next block element\n\t\t\t\tif (isDelete)\n\t\t\t\t\tblockElm = dom.getNext(blockElm, dom.isBlock);\n\n\t\t\t\t// Locate root span element and clone it since it would otherwise get merged by the \"apple-style-span\" on delete/backspace\n\t\t\t\tif (blockElm) {\n\t\t\t\t\tnode = blockElm.firstChild;\n\n\t\t\t\t\t// Ignore empty text nodes\n\t\t\t\t\twhile (node && node.nodeType == 3 && node.nodeValue.length == 0)\n\t\t\t\t\t\tnode = node.nextSibling;\n\n\t\t\t\t\tif (node && node.nodeName === 'SPAN') {\n\t\t\t\t\t\tclonedSpan = node.cloneNode(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Do the backspace/delete actiopn\n\t\t\t\ted.getDoc().execCommand(isDelete ? 'ForwardDelete' : 'Delete', false, null);\n\n\t\t\t\t// Find all odd apple-style-spans\n\t\t\t\tblockElm = dom.getParent(rng.startContainer, dom.isBlock);\n\t\t\t\ttinymce.each(dom.select('span.Apple-style-span,font.Apple-style-span', blockElm), function(span) {\n\t\t\t\t\tvar bm = selection.getBookmark();\n\n\t\t\t\t\tif (clonedSpan) {\n\t\t\t\t\t\tdom.replace(clonedSpan.cloneNode(false), span, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdom.remove(span, true);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Restore the selection\n\t\t\t\t\tselection.moveToBookmark(bm);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * WebKit and IE doesn't empty the editor if you select all contents and hit backspace or delete. This fix will check if the body is empty\n\t * like a <h1></h1> or <p></p> and then forcefully remove all contents.\n\t */\n\tfunction emptyEditorWhenDeleting(ed) {\n\t\ted.onKeyUp.add(function(ed, e) {\n\t\t\tvar keyCode = e.keyCode;\n\n\t\t\tif (keyCode == DELETE || keyCode == BACKSPACE) {\n\t\t\t\tif (ed.dom.isEmpty(ed.getBody())) {\n\t\t\t\t\ted.setContent('', {format : 'raw'});\n\t\t\t\t\ted.nodeChanged();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * WebKit on MacOS X has a weird issue where it some times fails to properly convert keypresses to input method keystrokes.\n\t * So a fix where we just get the range and set the range back seems to do the trick.\n\t */\n\tfunction inputMethodFocus(ed) {\n\t\ted.dom.bind(ed.getDoc(), 'focusin', function() {\n\t\t\ted.selection.setRng(ed.selection.getRng());\n\t\t});\n\t};\n\n\t/**\n\t * Backspacing in FireFox/IE from a paragraph into a horizontal rule results in a floating text node because the\n\t * browser just deletes the paragraph - the browser fails to merge the text node with a horizontal rule so it is\n\t * left there. TinyMCE sees a floating text node and wraps it in a paragraph on the key up event (ForceBlocks.js\n\t * addRootBlocks), meaning the action does nothing. With this code, FireFox/IE matche the behaviour of other\n     * browsers\n\t */\n\tfunction removeHrOnBackspace(ed) {\n\t\ted.onKeyDown.add(function(ed, e) {\n\t\t\tif (e.keyCode === BACKSPACE) {\n\t\t\t\tif (ed.selection.isCollapsed() && ed.selection.getRng(true).startOffset === 0) {\n\t\t\t\t\tvar node = ed.selection.getNode();\n\t\t\t\t\tvar previousSibling = node.previousSibling;\n\t\t\t\t\tif (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === \"hr\") {\n\t\t\t\t\t\ted.dom.remove(previousSibling);\n\t\t\t\t\t\ttinymce.dom.Event.cancel(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Firefox 3.x has an issue where the body element won't get proper focus if you click out\n\t * side it's rectangle.\n\t */\n\tfunction focusBody(ed) {\n\t\t// Fix for a focus bug in FF 3.x where the body element\n\t\t// wouldn't get proper focus if the user clicked on the HTML element\n\t\tif (!Range.prototype.getClientRects) { // Detect getClientRects got introduced in FF 4\n\t\t\ted.onMouseDown.add(function(ed, e) {\n\t\t\t\tif (e.target.nodeName === \"HTML\") {\n\t\t\t\t\tvar body = ed.getBody();\n\n\t\t\t\t\t// Blur the body it's focused but not correctly focused\n\t\t\t\t\tbody.blur();\n\n\t\t\t\t\t// Refocus the body after a little while\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tbody.focus();\n\t\t\t\t\t}, 0);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * WebKit has a bug where it isn't possible to select image, hr or anchor elements\n\t * by clicking on them so we need to fake that.\n\t */\n\tfunction selectControlElements(ed) {\n\t\ted.onClick.add(function(ed, e) {\n\t\t\te = e.target;\n\n\t\t\tif (/^(IMG|HR)$/.test(e.nodeName))\n\t\t\t\ted.selection.select(e);\n\n\t\t\tif (e.nodeName == 'A' && ed.dom.hasClass(e, 'mceItemAnchor'))\n\t\t\t\ted.selection.select(e);\n\n\t\t\ted.nodeChanged();\n\t\t});\n\t};\n\n\t/**\n\t * Fire a nodeChanged when the selection is changed on WebKit this fixes selection issues on iOS5. It only fires the nodeChange\n\t * event every 50ms since it would other wise update the UI when you type and it hogs the CPU.\n\t */\n\tfunction selectionChangeNodeChanged(ed) {\n\t\tvar lastRng, selectionTimer;\n\n\t\ted.dom.bind(ed.getDoc(), 'selectionchange', function() {\n\t\t\tif (selectionTimer) {\n\t\t\t\tclearTimeout(selectionTimer);\n\t\t\t\tselectionTimer = 0;\n\t\t\t}\n\n\t\t\tselectionTimer = window.setTimeout(function() {\n\t\t\t\tvar rng = ed.selection.getRng();\n\n\t\t\t\t// Compare the ranges to see if it was a real change or not\n\t\t\t\tif (!lastRng || !tinymce.dom.RangeUtils.compareRanges(rng, lastRng)) {\n\t\t\t\t\ted.nodeChanged();\n\t\t\t\t\tlastRng = rng;\n\t\t\t\t}\n\t\t\t}, 50);\n\t\t});\n\t}\n\n\t/**\n\t * Screen readers on IE needs to have the role application set on the body.\n\t */\n\tfunction ensureBodyHasRoleApplication(ed) {\n\t\tdocument.body.setAttribute(\"role\", \"application\");\n\t}\n\n\ttinymce.create('tinymce.util.Quirks', {\n\t\tQuirks: function(ed) {\n\t\t\t// WebKit\n\t\t\tif (tinymce.isWebKit) {\n\t\t\t\tcleanupStylesWhenDeleting(ed);\n\t\t\t\temptyEditorWhenDeleting(ed);\n\t\t\t\tinputMethodFocus(ed);\n\t\t\t\tselectControlElements(ed);\n\n\t\t\t\t// iOS\n\t\t\t\tif (tinymce.isIDevice) {\n\t\t\t\t\tselectionChangeNodeChanged(ed);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// IE\n\t\t\tif (tinymce.isIE) {\n\t\t\t\tremoveHrOnBackspace(ed);\n\t\t\t\temptyEditorWhenDeleting(ed);\n\t\t\t\tensureBodyHasRoleApplication(ed);\n\t\t\t}\n\n\t\t\t// Gecko\n\t\t\tif (tinymce.isGecko) {\n\t\t\t\tremoveHrOnBackspace(ed);\n\t\t\t\tfocusBody(ed);\n\t\t\t}\n\t\t}\n\t});\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/util/JSONP.js":"/**\n * JSONP.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\ntinymce.create('static tinymce.util.JSONP', {\n\tcallbacks : {},\n\tcount : 0,\n\n\tsend : function(o) {\n\t\tvar t = this, dom = tinymce.DOM, count = o.count !== undefined ? o.count : t.count, id = 'tinymce_jsonp_' + count;\n\n\t\tt.callbacks[count] = function(json) {\n\t\t\tdom.remove(id);\n\t\t\tdelete t.callbacks[count];\n\n\t\t\to.callback(json);\n\t\t};\n\n\t\tdom.add(dom.doc.body, 'script', {id : id , src : o.url, type : 'text/javascript'});\n\t\tt.count++;\n\t}\n});\n","Magento_Tinymce3/tiny_mce/classes/util/XHR.js":"/**\n * XHR.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n/**\n * This class enables you to send XMLHTTPRequests cross browser.\n * @class tinymce.util.XHR\n * @static\n * @example\n * // Sends a low level Ajax request\n * tinymce.util.XHR.send({\n *    url : 'someurl',\n *    success : function(text) {\n *       console.debug(text);\n *    }\n * });\n */\ntinymce.create('static tinymce.util.XHR', {\n\t/**\n\t * Sends a XMLHTTPRequest.\n\t * Consult the Wiki for details on what settings this method takes.\n\t *\n\t * @method send\n\t * @param {Object} o Object will target URL, callbacks and other info needed to make the request.\n\t */\n\tsend : function(o) {\n\t\tvar x, t, w = window, c = 0;\n\n\t\t// Default settings\n\t\to.scope = o.scope || this;\n\t\to.success_scope = o.success_scope || o.scope;\n\t\to.error_scope = o.error_scope || o.scope;\n\t\to.async = o.async === false ? false : true;\n\t\to.data = o.data || '';\n\n\t\tfunction get(s) {\n\t\t\tx = 0;\n\n\t\t\ttry {\n\t\t\t\tx = new ActiveXObject(s);\n\t\t\t} catch (ex) {\n\t\t\t}\n\n\t\t\treturn x;\n\t\t};\n\n\t\tx = w.XMLHttpRequest ? new XMLHttpRequest() : get('Microsoft.XMLHTTP') || get('Msxml2.XMLHTTP');\n\n\t\tif (x) {\n\t\t\tif (x.overrideMimeType)\n\t\t\t\tx.overrideMimeType(o.content_type);\n\n\t\t\tx.open(o.type || (o.data ? 'POST' : 'GET'), o.url, o.async);\n\n\t\t\tif (o.content_type)\n\t\t\t\tx.setRequestHeader('Content-Type', o.content_type);\n\n\t\t\tx.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n\n\t\t\tx.send(o.data);\n\n\t\t\tfunction ready() {\n\t\t\t\tif (!o.async || x.readyState == 4 || c++ > 10000) {\n\t\t\t\t\tif (o.success && c < 10000 && x.status == 200)\n\t\t\t\t\t\to.success.call(o.success_scope, '' + x.responseText, x, o);\n\t\t\t\t\telse if (o.error)\n\t\t\t\t\t\to.error.call(o.error_scope, c > 10000 ? 'TIMED_OUT' : 'GENERAL', x, o);\n\n\t\t\t\t\tx = null;\n\t\t\t\t} else\n\t\t\t\t\tw.setTimeout(ready, 10);\n\t\t\t};\n\n\t\t\t// Syncronous request\n\t\t\tif (!o.async)\n\t\t\t\treturn ready();\n\n\t\t\t// Wait for response, onReadyStateChange can not be used since it leaks memory in IE\n\t\t\tt = w.setTimeout(ready, 10);\n\t\t}\n\t}\n});\n","Magento_Tinymce3/tiny_mce/classes/util/JSONRequest.js":"/**\n * JSONRequest.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function() {\n\tvar extend = tinymce.extend, JSON = tinymce.util.JSON, XHR = tinymce.util.XHR;\n\n\t/**\n\t * This class enables you to use JSON-RPC to call backend methods.\n\t *\n\t * @class tinymce.util.JSONRequest\n\t * @example\n\t * var json = new tinymce.util.JSONRequest({\n\t *     url : 'somebackend.php'\n\t * });\n\t * \n\t * // Send RPC call 1\n\t * json.send({\n\t *     method : 'someMethod1',\n\t *     params : ['a', 'b'],\n\t *     success : function(result) {\n\t *         console.dir(result);\n\t *     }\n\t * });\n\t * \n\t * // Send RPC call 2\n\t * json.send({\n\t *     method : 'someMethod2',\n\t *     params : ['a', 'b'],\n\t *     success : function(result) {\n\t *         console.dir(result);\n\t *     }\n\t * });\n\t */\n\ttinymce.create('tinymce.util.JSONRequest', {\n\t\t/**\n\t\t * Constructs a new JSONRequest instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method JSONRequest\n\t\t * @param {Object} s Optional settings object.\n\t\t */\n\t\tJSONRequest : function(s) {\n\t\t\tthis.settings = extend({\n\t\t\t}, s);\n\t\t\tthis.count = 0;\n\t\t},\n\n\t\t/**\n\t\t * Sends a JSON-RPC call. Consult the Wiki API documentation for more details on what you can pass to this function.\n\t\t *\n\t\t * @method send\n\t\t * @param {Object} o Call object where there are three field id, method and params this object should also contain callbacks etc.\n\t\t */\n\t\tsend : function(o) {\n\t\t\tvar ecb = o.error, scb = o.success;\n\n\t\t\to = extend(this.settings, o);\n\n\t\t\to.success = function(c, x) {\n\t\t\t\tc = JSON.parse(c);\n\n\t\t\t\tif (typeof(c) == 'undefined') {\n\t\t\t\t\tc = {\n\t\t\t\t\t\terror : 'JSON Parse error.'\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (c.error)\n\t\t\t\t\tecb.call(o.error_scope || o.scope, c.error, x);\n\t\t\t\telse\n\t\t\t\t\tscb.call(o.success_scope || o.scope, c.result);\n\t\t\t};\n\n\t\t\to.error = function(ty, x) {\n\t\t\t\tif (ecb)\n\t\t\t\t\tecb.call(o.error_scope || o.scope, ty, x);\n\t\t\t};\n\n\t\t\to.data = JSON.serialize({\n\t\t\t\tid : o.id || 'c' + (this.count++),\n\t\t\t\tmethod : o.method,\n\t\t\t\tparams : o.params\n\t\t\t});\n\n\t\t\t// JSON content type for Ruby on rails. Bug: #1883287\n\t\t\to.content_type = 'application/json';\n\n\t\t\tXHR.send(o);\n\t\t},\n\n\t\t'static' : {\n\t\t\t/**\n\t\t\t * Simple helper function to send a JSON-RPC request without the need to initialize an object.\n\t\t\t * Consult the Wiki API documentation for more details on what you can pass to this function.\n\t\t\t *\n\t\t\t * @method sendRPC\n\t\t\t * @static\n\t\t\t * @param {Object} o Call object where there are three field id, method and params this object should also contain callbacks etc.\n\t\t\t */\n\t\t\tsendRPC : function(o) {\n\t\t\t\treturn new tinymce.util.JSONRequest().send(o);\n\t\t\t}\n\t\t}\n\t});\n}());","Magento_Tinymce3/tiny_mce/classes/util/URI.js":"/**\n * URI.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function() {\n\tvar each = tinymce.each;\n\n\t/**\n\t * This class handles parsing, modification and serialization of URI/URL strings.\n\t * @class tinymce.util.URI\n\t */\n\ttinymce.create('tinymce.util.URI', {\n\t\t/**\n\t\t * Constucts a new URI instance.\n\t\t *\n\t\t * @constructor\n\t\t * @method URI\n\t\t * @param {String} u URI string to parse.\n\t\t * @param {Object} s Optional settings object.\n\t\t */\n\t\tURI : function(u, s) {\n\t\t\tvar t = this, o, a, b, base_url;\n\n\t\t\t// Trim whitespace\n\t\t\tu = tinymce.trim(u);\n\n\t\t\t// Default settings\n\t\t\ts = t.settings = s || {};\n\n\t\t\t// Strange app protocol that isn't http/https or local anchor\n\t\t\t// For example: mailto,skype,tel etc.\n\t\t\tif (/^([\\w\\-]+):([^\\/]{2})/i.test(u) || /^\\s*#/.test(u)) {\n\t\t\t\tt.source = u;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Absolute path with no host, fake host and protocol\n\t\t\tif (u.indexOf('/') === 0 && u.indexOf('//') !== 0)\n\t\t\t\tu = (s.base_uri ? s.base_uri.protocol || 'http' : 'http') + '://mce_host' + u;\n\n\t\t\t// Relative path http:// or protocol relative //path\n\t\t\tif (!/^[\\w-]*:?\\/\\//.test(u)) {\n\t\t\t\tbase_url = s.base_uri ? s.base_uri.path : new tinymce.util.URI(location.href).directory;\n\t\t\t\tu = ((s.base_uri && s.base_uri.protocol) || 'http') + '://mce_host' + t.toAbsPath(base_url, u);\n\t\t\t}\n\n\t\t\t// Parse URL (Credits goes to Steave, http://blog.stevenlevithan.com/archives/parseuri)\n\t\t\tu = u.replace(/@@/g, '(mce_at)'); // Zope 3 workaround, they use @@something\n\t\t\tu = /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/.exec(u);\n\t\t\teach([\"source\",\"protocol\",\"authority\",\"userInfo\",\"user\",\"password\",\"host\",\"port\",\"relative\",\"path\",\"directory\",\"file\",\"query\",\"anchor\"], function(v, i) {\n\t\t\t\tvar s = u[i];\n\n\t\t\t\t// Zope 3 workaround, they use @@something\n\t\t\t\tif (s)\n\t\t\t\t\ts = s.replace(/\\(mce_at\\)/g, '@@');\n\n\t\t\t\tt[v] = s;\n\t\t\t});\n\n\t\t\tif (b = s.base_uri) {\n\t\t\t\tif (!t.protocol)\n\t\t\t\t\tt.protocol = b.protocol;\n\n\t\t\t\tif (!t.userInfo)\n\t\t\t\t\tt.userInfo = b.userInfo;\n\n\t\t\t\tif (!t.port && t.host == 'mce_host')\n\t\t\t\t\tt.port = b.port;\n\n\t\t\t\tif (!t.host || t.host == 'mce_host')\n\t\t\t\t\tt.host = b.host;\n\n\t\t\t\tt.source = '';\n\t\t\t}\n\n\t\t\t//t.path = t.path || '/';\n\t\t},\n\n\t\t/**\n\t\t * Sets the internal path part of the URI.\n\t\t *\n\t\t * @method setPath\n\t\t * @param {string} p Path string to set.\n\t\t */\n\t\tsetPath : function(p) {\n\t\t\tvar t = this;\n\n\t\t\tp = /^(.*?)\\/?(\\w+)?$/.exec(p);\n\n\t\t\t// Update path parts\n\t\t\tt.path = p[0];\n\t\t\tt.directory = p[1];\n\t\t\tt.file = p[2];\n\n\t\t\t// Rebuild source\n\t\t\tt.source = '';\n\t\t\tt.getURI();\n\t\t},\n\n\t\t/**\n\t\t * Converts the specified URI into a relative URI based on the current URI instance location.\n\t\t *\n\t\t * @method toRelative\n\t\t * @param {String} u URI to convert into a relative path/URI.\n\t\t * @return {String} Relative URI from the point specified in the current URI instance.\n\t\t * @example\n\t\t * // Converts an absolute URL to an relative URL url will be somedir/somefile.htm\n\t\t * var url = new tinymce.util.URI('http://www.site.com/dir/').toRelative('http://www.site.com/dir/somedir/somefile.htm');\n\t\t */\n\t\ttoRelative : function(u) {\n\t\t\tvar t = this, o;\n\n\t\t\tif (u === \"./\")\n\t\t\t\treturn u;\n\n\t\t\tu = new tinymce.util.URI(u, {base_uri : t});\n\n\t\t\t// Not on same domain/port or protocol\n\t\t\tif ((u.host != 'mce_host' && t.host != u.host && u.host) || t.port != u.port || t.protocol != u.protocol)\n\t\t\t\treturn u.getURI();\n\n\t\t\to = t.toRelPath(t.path, u.path);\n\n\t\t\t// Add query\n\t\t\tif (u.query)\n\t\t\t\to += '?' + u.query;\n\n\t\t\t// Add anchor\n\t\t\tif (u.anchor)\n\t\t\t\to += '#' + u.anchor;\n\n\t\t\treturn o;\n\t\t},\n\t\n\t\t/**\n\t\t * Converts the specified URI into a absolute URI based on the current URI instance location.\n\t\t *\n\t\t * @method toAbsolute\n\t\t * @param {String} u URI to convert into a relative path/URI.\n\t\t * @param {Boolean} nh No host and protocol prefix.\n\t\t * @return {String} Absolute URI from the point specified in the current URI instance.\n\t\t * @example\n\t\t * // Converts an relative URL to an absolute URL url will be http://www.site.com/dir/somedir/somefile.htm\n\t\t * var url = new tinymce.util.URI('http://www.site.com/dir/').toAbsolute('somedir/somefile.htm');\n\t\t */\n\t\ttoAbsolute : function(u, nh) {\n\t\t\tvar u = new tinymce.util.URI(u, {base_uri : this});\n\n\t\t\treturn u.getURI(this.host == u.host && this.protocol == u.protocol ? nh : 0);\n\t\t},\n\n\t\t/**\n\t\t * Converts a absolute path into a relative path.\n\t\t *\n\t\t * @method toRelPath\n\t\t * @param {String} base Base point to convert the path from.\n\t\t * @param {String} path Absolute path to convert into a relative path.\n\t\t */\n\t\ttoRelPath : function(base, path) {\n\t\t\tvar items, bp = 0, out = '', i, l;\n\n\t\t\t// Split the paths\n\t\t\tbase = base.substring(0, base.lastIndexOf('/'));\n\t\t\tbase = base.split('/');\n\t\t\titems = path.split('/');\n\n\t\t\tif (base.length >= items.length) {\n\t\t\t\tfor (i = 0, l = base.length; i < l; i++) {\n\t\t\t\t\tif (i >= items.length || base[i] != items[i]) {\n\t\t\t\t\t\tbp = i + 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (base.length < items.length) {\n\t\t\t\tfor (i = 0, l = items.length; i < l; i++) {\n\t\t\t\t\tif (i >= base.length || base[i] != items[i]) {\n\t\t\t\t\t\tbp = i + 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (bp == 1)\n\t\t\t\treturn path;\n\n\t\t\tfor (i = 0, l = base.length - (bp - 1); i < l; i++)\n\t\t\t\tout += \"../\";\n\n\t\t\tfor (i = bp - 1, l = items.length; i < l; i++) {\n\t\t\t\tif (i != bp - 1)\n\t\t\t\t\tout += \"/\" + items[i];\n\t\t\t\telse\n\t\t\t\t\tout += items[i];\n\t\t\t}\n\n\t\t\treturn out;\n\t\t},\n\n\t\t/**\n\t\t * Converts a relative path into a absolute path.\n\t\t *\n\t\t * @method toAbsPath\n\t\t * @param {String} base Base point to convert the path from.\n\t\t * @param {String} path Relative path to convert into an absolute path.\n\t\t */\n\t\ttoAbsPath : function(base, path) {\n\t\t\tvar i, nb = 0, o = [], tr, outPath;\n\n\t\t\t// Split paths\n\t\t\ttr = /\\/$/.test(path) ? '/' : '';\n\t\t\tbase = base.split('/');\n\t\t\tpath = path.split('/');\n\n\t\t\t// Remove empty chunks\n\t\t\teach(base, function(k) {\n\t\t\t\tif (k)\n\t\t\t\t\to.push(k);\n\t\t\t});\n\n\t\t\tbase = o;\n\n\t\t\t// Merge relURLParts chunks\n\t\t\tfor (i = path.length - 1, o = []; i >= 0; i--) {\n\t\t\t\t// Ignore empty or .\n\t\t\t\tif (path[i].length == 0 || path[i] == \".\")\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// Is parent\n\t\t\t\tif (path[i] == '..') {\n\t\t\t\t\tnb++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Move up\n\t\t\t\tif (nb > 0) {\n\t\t\t\t\tnb--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\to.push(path[i]);\n\t\t\t}\n\n\t\t\ti = base.length - nb;\n\n\t\t\t// If /a/b/c or /\n\t\t\tif (i <= 0)\n\t\t\t\toutPath = o.reverse().join('/');\n\t\t\telse\n\t\t\t\toutPath = base.slice(0, i).join('/') + '/' + o.reverse().join('/');\n\n\t\t\t// Add front / if it's needed\n\t\t\tif (outPath.indexOf('/') !== 0)\n\t\t\t\toutPath = '/' + outPath;\n\n\t\t\t// Add traling / if it's needed\n\t\t\tif (tr && outPath.lastIndexOf('/') !== outPath.length - 1)\n\t\t\t\toutPath += tr;\n\n\t\t\treturn outPath;\n\t\t},\n\n\t\t/**\n\t\t * Returns the full URI of the internal structure.\n\t\t *\n\t\t * @method getURI\n\t\t * @param {Boolean} nh Optional no host and protocol part. Defaults to false.\n\t\t */\n\t\tgetURI : function(nh) {\n\t\t\tvar s, t = this;\n\n\t\t\t// Rebuild source\n\t\t\tif (!t.source || nh) {\n\t\t\t\ts = '';\n\n\t\t\t\tif (!nh) {\n\t\t\t\t\tif (t.protocol)\n\t\t\t\t\t\ts += t.protocol + '://';\n\n\t\t\t\t\tif (t.userInfo)\n\t\t\t\t\t\ts += t.userInfo + '@';\n\n\t\t\t\t\tif (t.host)\n\t\t\t\t\t\ts += t.host;\n\n\t\t\t\t\tif (t.port)\n\t\t\t\t\t\ts += ':' + t.port;\n\t\t\t\t}\n\n\t\t\t\tif (t.path)\n\t\t\t\t\ts += t.path;\n\n\t\t\t\tif (t.query)\n\t\t\t\t\ts += '?' + t.query;\n\n\t\t\t\tif (t.anchor)\n\t\t\t\t\ts += '#' + t.anchor;\n\n\t\t\t\tt.source = s;\n\t\t\t}\n\n\t\t\treturn t.source;\n\t\t}\n\t});\n})();\n","Magento_Tinymce3/tiny_mce/classes/util/Cookie.js":"/**\n * Cookie.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function() {\n\tvar each = tinymce.each;\n\n\t/**\n\t * This class contains simple cookie manangement functions.\n\t *\n\t * @class tinymce.util.Cookie\n\t * @static\n\t * @example\n\t * // Gets a cookie from the browser\n\t * console.debug(tinymce.util.Cookie.get('mycookie'));\n\t *\n\t * // Gets a hash table cookie from the browser and takes out the x parameter from it\n\t * console.debug(tinymce.util.Cookie.getHash('mycookie').x);\n\t *\n\t * // Sets a hash table cookie to the browser\n\t * tinymce.util.Cookie.setHash({x : '1', y : '2'});\n\t */\n\ttinymce.create('static tinymce.util.Cookie', {\n\t\t/**\n\t\t * Parses the specified query string into an name/value object.\n\t\t *\n\t\t * @method getHash\n\t\t * @param {String} n String to parse into a n Hashtable object.\n\t\t * @return {Object} Name/Value object with items parsed from querystring.\n\t\t */\n\t\tgetHash : function(n) {\n\t\t\tvar v = this.get(n), h;\n\n\t\t\tif (v) {\n\t\t\t\teach(v.split('&'), function(v) {\n\t\t\t\t\tv = v.split('=');\n\t\t\t\t\th = h || {};\n\t\t\t\t\th[unescape(v[0])] = unescape(v[1]);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn h;\n\t\t},\n\n\t\t/**\n\t\t * Sets a hashtable name/value object to a cookie.\n\t\t *\n\t\t * @method setHash\n\t\t * @param {String} n Name of the cookie.\n\t\t * @param {Object} v Hashtable object to set as cookie.\n\t\t * @param {Date} e Optional date object for the expiration of the cookie.\n\t\t * @param {String} p Optional path to restrict the cookie to.\n\t\t * @param {String} d Optional domain to restrict the cookie to.\n\t\t * @param {String} s Is the cookie secure or not.\n\t\t */\n\t\tsetHash : function(n, v, e, p, d, s) {\n\t\t\tvar o = '';\n\n\t\t\teach(v, function(v, k) {\n\t\t\t\to += (!o ? '' : '&') + escape(k) + '=' + escape(v);\n\t\t\t});\n\n\t\t\tthis.set(n, o, e, p, d, s);\n\t\t},\n\n\t\t/**\n\t\t * Gets the raw data of a cookie by name.\n\t\t *\n\t\t * @method get\n\t\t * @param {String} n Name of cookie to retrieve.\n\t\t * @return {String} Cookie data string.\n\t\t */\n\t\tget : function(n) {\n\t\t\tvar c = document.cookie, e, p = n + \"=\", b;\n\n\t\t\t// Strict mode\n\t\t\tif (!c)\n\t\t\t\treturn;\n\n\t\t\tb = c.indexOf(\"; \" + p);\n\n\t\t\tif (b == -1) {\n\t\t\t\tb = c.indexOf(p);\n\n\t\t\t\tif (b != 0)\n\t\t\t\t\treturn null;\n\t\t\t} else\n\t\t\t\tb += 2;\n\n\t\t\te = c.indexOf(\";\", b);\n\n\t\t\tif (e == -1)\n\t\t\t\te = c.length;\n\n\t\t\treturn unescape(c.substring(b + p.length, e));\n\t\t},\n\n\t\t/**\n\t\t * Sets a raw cookie string.\n\t\t *\n\t\t * @method set\n\t\t * @param {String} n Name of the cookie.\n\t\t * @param {String} v Raw cookie data.\n\t\t * @param {Date} e Optional date object for the expiration of the cookie.\n\t\t * @param {String} p Optional path to restrict the cookie to.\n\t\t * @param {String} d Optional domain to restrict the cookie to.\n\t\t * @param {String} s Is the cookie secure or not.\n\t\t */\n\t\tset : function(n, v, e, p, d, s) {\n\t\t\tdocument.cookie = n + \"=\" + escape(v) +\n\t\t\t\t((e) ? \"; expires=\" + e.toUTCString() : \"\") +\n\t\t\t\t((p) ? \"; path=\" + escape(p) : \"\") +\n\t\t\t\t((d) ? \"; domain=\" + d : \"\") +\n\t\t\t\t((s) ? \"; secure\" : \"\");\n\t\t},\n\n\t\t/**\n\t\t * Removes/deletes a cookie by name.\n\t\t *\n\t\t * @method remove\n\t\t * @param {String} n Cookie name to remove/delete.\n\t\t * @param {Strong} p Optional path to remove the cookie from.\n\t\t */\n\t\tremove : function(n, p) {\n\t\t\tvar d = new Date();\n\n\t\t\td.setTime(d.getTime() - 1000);\n\n\t\t\tthis.set(n, '', d, p, d);\n\t\t}\n\t});\n})();\n","Magento_Tinymce3/tiny_mce/classes/util/Dispatcher.js":"/**\n * Dispatcher.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n/**\n * This class is used to dispatch event to observers/listeners.\n * All internal events inside TinyMCE uses this class.\n *\n * @class tinymce.util.Dispatcher\n * @example\n * // Creates a custom event\n * this.onSomething = new tinymce.util.Dispatcher(this);\n * \n * // Dispatch/fire the event\n * this.onSomething.dispatch('some string');\n */\ntinymce.create('tinymce.util.Dispatcher', {\n\tscope : null,\n\tlisteners : null,\n\n\t/**\n\t * Constructs a new event dispatcher object.\n\t *\n\t * @constructor\n\t * @method Dispatcher\n\t * @param {Object} s Optional default execution scope for all observer functions.\n\t */\n\tDispatcher : function(s) {\n\t\tthis.scope = s || this;\n\t\tthis.listeners = [];\n\t},\n\n\t/**\n\t * Add an observer function to be executed when a dispatch call is done.\n\t *\n\t * @method add\n\t * @param {function} cb Callback function to execute when a dispatch event occurs.\n\t * @param {Object} s Optional execution scope, defaults to the one specified in the class constructor.\n\t * @return {function} Returns the same function as the one passed on.\n\t */\n\tadd : function(cb, s) {\n\t\tthis.listeners.push({cb : cb, scope : s || this.scope});\n\n\t\treturn cb;\n\t},\n\n\t/**\n\t * Add an observer function to be executed to the top of the list of observers.\n\t *\n\t * @method addToTop\n\t * @param {function} cb Callback function to execute when a dispatch event occurs.\n\t * @param {Object} s Optional execution scope, defaults to the one specified in the class constructor.\n\t * @return {function} Returns the same function as the one passed on.\n\t */\n\taddToTop : function(cb, s) {\n\t\tthis.listeners.unshift({cb : cb, scope : s || this.scope});\n\n\t\treturn cb;\n\t},\n\n\t/**\n\t * Removes an observer function.\n\t *\n\t * @method remove\n\t * @param {function} cb Observer function to remove.\n\t * @return {function} The same function that got passed in or null if it wasn't found.\n\t */\n\tremove : function(cb) {\n\t\tvar l = this.listeners, o = null;\n\n\t\ttinymce.each(l, function(c, i) {\n\t\t\tif (cb == c.cb) {\n\t\t\t\to = cb;\n\t\t\t\tl.splice(i, 1);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t\treturn o;\n\t},\n\n\t/**\n\t * Dispatches an event to all observers/listeners.\n\t *\n\t * @method dispatch\n\t * @param {Object} .. Any number of arguments to dispatch.\n\t * @return {Object} Last observer functions return value.\n\t */\n\tdispatch : function() {\n\t\tvar s, a = arguments, i, li = this.listeners, c;\n\n\t\t// Needs to be a real loop since the listener count might change while looping\n\t\t// And this is also more efficient\n\t\tfor (i = 0; i<li.length; i++) {\n\t\t\tc = li[i];\n\t\t\ts = c.cb.apply(c.scope, a);\n\n\t\t\tif (s === false)\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn s;\n\t}\n\n\t/**#@-*/\n});\n","Magento_Tinymce3/tiny_mce/classes/util/JSON.js":"/**\n * JSON.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function() {\n\tfunction serialize(o, quote) {\n\t\tvar i, v, t;\n\n\t\tquote = quote || '\"';\n\n\t\tif (o == null)\n\t\t\treturn 'null';\n\n\t\tt = typeof o;\n\n\t\tif (t == 'string') {\n\t\t\tv = '\\bb\\tt\\nn\\ff\\rr\\\"\"\\'\\'\\\\\\\\';\n\n\t\t\treturn quote + o.replace(/([\\u0080-\\uFFFF\\x00-\\x1f\\\"\\'\\\\])/g, function(a, b) {\n\t\t\t\t// Make sure single quotes never get encoded inside double quotes for JSON compatibility\n\t\t\t\tif (quote === '\"' && a === \"'\")\n\t\t\t\t\treturn a;\n\n\t\t\t\ti = v.indexOf(b);\n\n\t\t\t\tif (i + 1)\n\t\t\t\t\treturn '\\\\' + v.charAt(i + 1);\n\n\t\t\t\ta = b.charCodeAt().toString(16);\n\n\t\t\t\treturn '\\\\u' + '0000'.substring(a.length) + a;\n\t\t\t}) + quote;\n\t\t}\n\n\t\tif (t == 'object') {\n\t\t\tif (o.hasOwnProperty && o instanceof Array) {\n\t\t\t\t\tfor (i=0, v = '['; i<o.length; i++)\n\t\t\t\t\t\tv += (i > 0 ? ',' : '') + serialize(o[i], quote);\n\n\t\t\t\t\treturn v + ']';\n\t\t\t\t}\n\n\t\t\t\tv = '{';\n\n\t\t\t\tfor (i in o) {\n\t\t\t\t\tif (o.hasOwnProperty(i)) {\n\t\t\t\t\t\tv += typeof o[i] != 'function' ? (v.length > 1 ? ',' + quote : quote) + i + quote +':' + serialize(o[i], quote) : '';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn v + '}';\n\t\t}\n\n\t\treturn '' + o;\n\t};\n\n\t/**\n\t * JSON parser and serializer class.\n\t *\n\t * @class tinymce.util.JSON\n\t * @static\n\t * @example\n\t * // JSON parse a string into an object\n\t * var obj = tinymce.util.JSON.parse(somestring);\n\t * \n\t * // JSON serialize a object into an string\n\t * var str = tinymce.util.JSON.serialize(obj);\n\t */\n\ttinymce.util.JSON = {\n\t\t/**\n\t\t * Serializes the specified object as a JSON string.\n\t\t *\n\t\t * @method serialize\n\t\t * @param {Object} obj Object to serialize as a JSON string.\n\t\t * @param {String} quote Optional quote string defaults to \".\n\t\t * @return {string} JSON string serialized from input.\n\t\t */\n\t\tserialize: serialize,\n\n\t\t/**\n\t\t * Unserializes/parses the specified JSON string into a object.\n\t\t *\n\t\t * @method parse\n\t\t * @param {string} s JSON String to parse into a JavaScript object.\n\t\t * @return {Object} Object from input JSON string or undefined if it failed.\n\t\t */\n\t\tparse: function(s) {\n\t\t\ttry {\n\t\t\t\treturn eval('(' + s + ')');\n\t\t\t} catch (ex) {\n\t\t\t\t// Ignore\n\t\t\t}\n\t\t}\n\n\t\t/**#@-*/\n\t};\n})();\n","Magento_Tinymce3/tiny_mce/classes/util/VK.js":"/**\n * This file exposes a set of the common KeyCodes for use.  Please grow it as needed.\n */\n\n(function(tinymce){\n\ttinymce.VK = {\n\t\tDELETE: 46,\n\t\tBACKSPACE: 8,\n\t\tENTER: 13,\n\t\tTAB: 9,\n        SPACEBAR: 32,\n\t\tUP: 38,\n\t\tDOWN: 40\n\t}\n})(tinymce);\n","Magento_Tinymce3/tiny_mce/classes/xml/Parser.js":"/**\n * Parser.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function() {\n\t/**\n\t * XML Parser class. This class is only available for the dev version of TinyMCE.\n\t */\n\ttinymce.create('tinymce.xml.Parser', {\n\t\t/**\n\t\t * Constucts a new XML parser instance.\n\t\t *\n\t\t * @param {Object} Optional settings object.\n\t\t */\n\t\tParser : function(s) {\n\t\t\tthis.settings = tinymce.extend({\n\t\t\t\tasync : true\n\t\t\t}, s);\n\t\t},\n\n\t\t/**\n\t\t * Parses the specified document and executed the callback ones it's parsed.\n\t\t *\n\t\t * @param {String} u URL to XML file to parse.\n\t\t * @param {function} cb Optional callback to execute ones the XML file is loaded.\n\t\t * @param {Object} s Optional scope for the callback execution.\n\t\t */\n\t\tload : function(u, cb, s) {\n\t\t\tvar doc, t, w = window, c = 0;\n\n\t\t\ts = s || this;\n\n\t\t\t// Explorer, use XMLDOM since it can be used on local fs\n\t\t\tif (window.ActiveXObject) {\n\t\t\t\tdoc = new ActiveXObject(\"Microsoft.XMLDOM\");\n\t\t\t\tdoc.async = this.settings.async;\n\n\t\t\t\t// Wait for response\n\t\t\t\tif (doc.async) {\n\t\t\t\t\tfunction check() {\n\t\t\t\t\t\tif (doc.readyState == 4 || c++ > 10000)\n\t\t\t\t\t\t\treturn cb.call(s, doc);\n\n\t\t\t\t\t\tw.setTimeout(check, 10);\n\t\t\t\t\t};\n\n\t\t\t\t\tt = w.setTimeout(check, 10);\n\t\t\t\t}\n\n\t\t\t\tdoc.load(u);\n\n\t\t\t\tif (!doc.async)\n\t\t\t\t\tcb.call(s, doc);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// W3C using XMLHttpRequest\n\t\t\tif (window.XMLHttpRequest) {\n\t\t\t\ttry {\n\t\t\t\t\tdoc = new window.XMLHttpRequest();\n\t\t\t\t\tdoc.open('GET', u, this.settings.async);\n\t\t\t\t\tdoc.async = this.settings.async;\n\n\t\t\t\t\tdoc.onload = function() {\n\t\t\t\t\t\tcb.call(s, doc.responseXML);\n\t\t\t\t\t};\n\n\t\t\t\t\tdoc.send('');\n\t\t\t\t} catch (ex) {\n\t\t\t\t\tcb.call(s, null, ex);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Parses the specified XML string.\n\t\t *\n\t\t * @param {String} xml XML String to parse.\n\t\t * @return {Document} XML Document instance.\n\t\t */\n\t\tloadXML : function(xml) {\n\t\t\tvar doc;\n\n\t\t\t// W3C\n\t\t\tif (window.DOMParser)\n\t\t\t\treturn new DOMParser().parseFromString(xml, \"text/xml\");\n\n\t\t\t// Explorer\n\t\t\tif (window.ActiveXObject) {\n\t\t\t\tdoc = new ActiveXObject(\"Microsoft.XMLDOM\");\n\t\t\t\tdoc.async = \"false\";\n\t\t\t\tdoc.loadXML(xml);\n\n\t\t\t\treturn doc;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns all string contents of a element concated together.\n\t\t *\n\t\t * @param {XMLNode} el XML element to retrieve text from.\n\t\t * @return {string} XML element text contents.\n\t\t */\n\t\tgetText : function(el) {\n\t\t\tvar o = '';\n\n\t\t\tif (!el)\n\t\t\t\treturn '';\n\n\t\t\tif (el.hasChildNodes()) {\n\t\t\t\tel = el.firstChild;\n\n\t\t\t\tdo {\n\t\t\t\t\tif (el.nodeType == 3 || el.nodeType == 4)\n\t\t\t\t\t\to += el.nodeValue;\n\t\t\t\t} while(el = el.nextSibling);\n\t\t\t}\n\n\t\t\treturn o;\n\t\t}\n\t});\n})();\n","Magento_Tinymce3/tiny_mce/classes/adapter/jquery/adapter.js":"/**\n * adapter.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n// #ifdef jquery_adapter\n\n(function($, tinymce) {\n\tvar is = tinymce.is, attrRegExp = /^(href|src|style)$/i, undefined;\n\n\t// jQuery is undefined\n\tif (!$ && window.console) {\n\t\treturn console.log(\"Load jQuery first!\");\n\t}\n\n\t// Stick jQuery into the tinymce namespace\n\ttinymce.$ = $;\n\n\t// Setup adapter\n\ttinymce.adapter = {\n\t\tpatchEditor : function(editor) {\n\t\t\tvar fn = $.fn;\n\n\t\t\t// Adapt the css function to make sure that the data-mce-style\n\t\t\t// attribute gets updated with the new style information\n\t\t\tfunction css(name, value) {\n\t\t\t\tvar self = this;\n\n\t\t\t\t// Remove data-mce-style when set operation occurs\n\t\t\t\tif (value)\n\t\t\t\t\tself.removeAttr('data-mce-style');\n\n\t\t\t\treturn fn.css.apply(self, arguments);\n\t\t\t};\n\n\t\t\t// Apapt the attr function to make sure that it uses the data-mce- prefixed variants\n\t\t\tfunction attr(name, value) {\n\t\t\t\tvar self = this;\n\n\t\t\t\t// Update/retrieve data-mce- attribute variants\n\t\t\t\tif (attrRegExp.test(name)) {\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\t// Use TinyMCE behavior when setting the specifc attributes\n\t\t\t\t\t\tself.each(function(i, node) {\n\t\t\t\t\t\t\teditor.dom.setAttrib(node, name, value);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn self;\n\t\t\t\t\t} else\n\t\t\t\t\t\treturn self.attr('data-mce-' + name);\n\t\t\t\t}\n\n\t\t\t\t// Default behavior\n\t\t\t\treturn fn.attr.apply(self, arguments);\n\t\t\t};\n\n\t\t\tfunction htmlPatchFunc(func) {\n\t\t\t\t// Returns a modified function that processes\n\t\t\t\t// the HTML before executing the action this makes sure\n\t\t\t\t// that href/src etc gets moved into the data-mce- variants\n\t\t\t\treturn function(content) {\n\t\t\t\t\tif (content)\n\t\t\t\t\t\tcontent = editor.dom.processHTML(content);\n\n\t\t\t\t\treturn func.call(this, content);\n\t\t\t\t};\n\t\t\t};\n\n\t\t\t// Patch various jQuery functions to handle tinymce specific attribute and content behavior\n\t\t\t// we don't patch the jQuery.fn directly since it will most likely break compatibility\n\t\t\t// with other jQuery logic on the page. Only instances created by TinyMCE should be patched.\n\t\t\tfunction patch(jq) {\n\t\t\t\t// Patch some functions, only patch the object once\n\t\t\t\tif (jq.css !== css) {\n\t\t\t\t\t// Patch css/attr to use the data-mce- prefixed attribute variants\n\t\t\t\t\tjq.css = css;\n\t\t\t\t\tjq.attr = attr;\n\n\t\t\t\t\t// Patch HTML functions to use the DOMUtils.processHTML filter logic\n\t\t\t\t\tjq.html = htmlPatchFunc(fn.html);\n\t\t\t\t\tjq.append = htmlPatchFunc(fn.append);\n\t\t\t\t\tjq.prepend = htmlPatchFunc(fn.prepend);\n\t\t\t\t\tjq.after = htmlPatchFunc(fn.after);\n\t\t\t\t\tjq.before = htmlPatchFunc(fn.before);\n\t\t\t\t\tjq.replaceWith = htmlPatchFunc(fn.replaceWith);\n\t\t\t\t\tjq.tinymce = editor;\n\n\t\t\t\t\t// Each pushed jQuery instance needs to be patched\n\t\t\t\t\t// as well for example when traversing the DOM\n\t\t\t\t\tjq.pushStack = function() {\n\t\t\t\t\t\treturn patch(fn.pushStack.apply(this, arguments));\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn jq;\n\t\t\t};\n\n\t\t\t// Add a $ function on each editor instance this one is scoped for the editor document object\n\t\t\t// this way you can do chaining like this tinymce.get(0).$('p').append('text').css('color', 'red');\n\t\t\teditor.$ = function(selector, scope) {\n\t\t\t\tvar doc = editor.getDoc();\n\n\t\t\t\treturn patch($(selector || doc, doc || scope));\n\t\t\t};\n\t\t}\n\t};\n\n\t// Patch in core NS functions\n\ttinymce.extend = $.extend;\n\ttinymce.extend(tinymce, {\n\t\tmap : $.map,\n\t\tgrep : function(a, f) {return $.grep(a, f || function(){return 1;});},\n\t\tinArray : function(a, v) {return $.inArray(v, a || []);}\n\n\t\t/* Didn't iterate stylesheets\n\t\teach : function(o, cb, s) {\n\t\t\tif (!o)\n\t\t\t\treturn 0;\n\n\t\t\tvar r = 1;\n\n\t\t\t$.each(o, function(nr, el){\n\t\t\t\tif (cb.call(s, el, nr, o) === false) {\n\t\t\t\t\tr = 0;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn r;\n\t\t}*/\n\t});\n\n\t// Patch in functions in various clases\n\t// Add a \"#ifndefjquery\" statement around each core API function you add below\n\tvar patches = {\n\t\t'tinymce.dom.DOMUtils' : {\n\t\t\t/*\n\t\t\taddClass : function(e, c) {\n\t\t\t\tif (is(e, 'array') && is(e[0], 'string'))\n\t\t\t\t\te = e.join(',#');\n\t\t\t\treturn (e && $(is(e, 'string') ? '#' + e : e)\n\t\t\t\t\t.addClass(c)\n\t\t\t\t\t.attr('class')) || false;\n\t\t\t},\n\n\t\t\thasClass : function(n, c) {\n\t\t\t\treturn $(is(n, 'string') ? '#' + n : n).hasClass(c);\n\t\t\t},\n\n\t\t\tremoveClass : function(e, c) {\n\t\t\t\tif (!e)\n\t\t\t\t\treturn false;\n\n\t\t\t\tvar r = [];\n\n\t\t\t\t$(is(e, 'string') ? '#' + e : e)\n\t\t\t\t\t.removeClass(c)\n\t\t\t\t\t.each(function(){\n\t\t\t\t\t\tr.push(this.className);\n\t\t\t\t\t});\n\n\t\t\t\treturn r.length == 1 ? r[0] : r;\n\t\t\t},\n\t\t\t*/\n\n\t\t\tselect : function(pattern, scope) {\n\t\t\t\tvar t = this;\n\n\t\t\t\treturn $.find(pattern, t.get(scope) || t.get(t.settings.root_element) || t.doc, []);\n\t\t\t},\n\n\t\t\tis : function(n, patt) {\n\t\t\t\treturn $(this.get(n)).is(patt);\n\t\t\t}\n\n\t\t\t/*\n\t\t\tshow : function(e) {\n\t\t\t\tif (is(e, 'array') && is(e[0], 'string'))\n\t\t\t\t\te = e.join(',#');\n\n\t\t\t\t$(is(e, 'string') ? '#' + e : e).css('display', 'block');\n\t\t\t},\n\n\t\t\thide : function(e) {\n\t\t\t\tif (is(e, 'array') && is(e[0], 'string'))\n\t\t\t\t\te = e.join(',#');\n\n\t\t\t\t$(is(e, 'string') ? '#' + e : e).css('display', 'none');\n\t\t\t},\n\n\t\t\tisHidden : function(e) {\n\t\t\t\treturn $(is(e, 'string') ? '#' + e : e).is(':hidden');\n\t\t\t},\n\n\t\t\tinsertAfter : function(n, e) {\n\t\t\t\treturn $(is(e, 'string') ? '#' + e : e).after(n);\n\t\t\t},\n\n\t\t\treplace : function(o, n, k) {\n\t\t\t\tn = $(is(n, 'string') ? '#' + n : n);\n\n\t\t\t\tif (k)\n\t\t\t\t\tn.children().appendTo(o);\n\n\t\t\t\tn.replaceWith(o);\n\t\t\t},\n\n\t\t\tsetStyle : function(n, na, v) {\n\t\t\t\tif (is(n, 'array') && is(n[0], 'string'))\n\t\t\t\t\tn = n.join(',#');\n\n\t\t\t\t$(is(n, 'string') ? '#' + n : n).css(na, v);\n\t\t\t},\n\n\t\t\tgetStyle : function(n, na, c) {\n\t\t\t\treturn $(is(n, 'string') ? '#' + n : n).css(na);\n\t\t\t},\n\n\t\t\tsetStyles : function(e, o) {\n\t\t\t\tif (is(e, 'array') && is(e[0], 'string'))\n\t\t\t\t\te = e.join(',#');\n\t\t\t\t$(is(e, 'string') ? '#' + e : e).css(o);\n\t\t\t},\n\n\t\t\tsetAttrib : function(e, n, v) {\n\t\t\t\tvar t = this, s = t.settings;\n\n\t\t\t\tif (is(e, 'array') && is(e[0], 'string'))\n\t\t\t\t\te = e.join(',#');\n\n\t\t\t\te = $(is(e, 'string') ? '#' + e : e);\n\n\t\t\t\tswitch (n) {\n\t\t\t\t\tcase \"style\":\n\t\t\t\t\t\te.each(function(i, v){\n\t\t\t\t\t\t\tif (s.keep_values)\n\t\t\t\t\t\t\t\t$(v).attr('data-mce-style', v);\n\n\t\t\t\t\t\t\tv.style.cssText = v;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"class\":\n\t\t\t\t\t\te.each(function(){\n\t\t\t\t\t\t\tthis.className = v;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"src\":\n\t\t\t\t\tcase \"href\":\n\t\t\t\t\t\te.each(function(i, v){\n\t\t\t\t\t\t\tif (s.keep_values) {\n\t\t\t\t\t\t\t\tif (s.url_converter)\n\t\t\t\t\t\t\t\t\tv = s.url_converter.call(s.url_converter_scope || t, v, n, v);\n\n\t\t\t\t\t\t\t\tt.setAttrib(v, 'data-mce-' + n, v);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (v !== null && v.length !== 0)\n\t\t\t\t\te.attr(n, '' + v);\n\t\t\t\telse\n\t\t\t\t\te.removeAttr(n);\n\t\t\t},\n\n\t\t\tsetAttribs : function(e, o) {\n\t\t\t\tvar t = this;\n\n\t\t\t\t$.each(o, function(n, v){\n\t\t\t\t\tt.setAttrib(e,n,v);\n\t\t\t\t});\n\t\t\t}\n\t\t\t*/\n\t\t}\n\n/*\n\t\t'tinymce.dom.Event' : {\n\t\t\tadd : function (o, n, f, s) {\n\t\t\t\tvar lo, cb;\n\n\t\t\t\tcb = function(e) {\n\t\t\t\t\te.target = e.target || this;\n\t\t\t\t\tf.call(s || this, e);\n\t\t\t\t};\n\n\t\t\t\tif (is(o, 'array') && is(o[0], 'string'))\n\t\t\t\t\to = o.join(',#');\n\t\t\t\to = $(is(o, 'string') ? '#' + o : o);\n\t\t\t\tif (n == 'init') {\n\t\t\t\t\to.ready(cb, s);\n\t\t\t\t} else {\n\t\t\t\t\tif (s) {\n\t\t\t\t\t\to.bind(n, s, cb);\n\t\t\t\t\t} else {\n\t\t\t\t\t\to.bind(n, cb);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlo = this._jqLookup || (this._jqLookup = []);\n\t\t\t\tlo.push({func : f, cfunc : cb});\n\n\t\t\t\treturn cb;\n\t\t\t},\n\n\t\t\tremove : function(o, n, f) {\n\t\t\t\t// Find cfunc\n\t\t\t\t$(this._jqLookup).each(function() {\n\t\t\t\t\tif (this.func === f)\n\t\t\t\t\t\tf = this.cfunc;\n\t\t\t\t});\n\n\t\t\t\tif (is(o, 'array') && is(o[0], 'string'))\n\t\t\t\t\to = o.join(',#');\n\n\t\t\t\t$(is(o, 'string') ? '#' + o : o).unbind(n,f);\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n*/\n\t};\n\n\t// Patch functions after a class is created\n\ttinymce.onCreate = function(ty, c, p) {\n\t\ttinymce.extend(p, patches[c]);\n\t};\n})(window.jQuery, tinymce);\n\n// #endif\n","Magento_Tinymce3/tiny_mce/classes/adapter/jquery/jquery.tinymce.js":"/**\n * jquery.tinymce.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function($) {\n\tvar undefined,\n\t\tlazyLoading,\n\t\tdelayedInits = [],\n\t\twin = window;\n\n\t$.fn.tinymce = function(settings) {\n\t\tvar self = this, url, ed, base, pos, lang, query = \"\", suffix = \"\";\n\n\t\t// No match then just ignore the call\n\t\tif (!self.length)\n\t\t\treturn self;\n\n\t\t// Get editor instance\n\t\tif (!settings)\n\t\t\treturn tinyMCE.get(self[0].id);\n\n\t\tself.css('visibility', 'hidden'); // Hide textarea to avoid flicker\n\n\t\tfunction init() {\n\t\t\tvar editors = [], initCount = 0;\n\n\t\t\t// Apply patches to the jQuery object, only once\n\t\t\tif (applyPatch) {\n\t\t\t\tapplyPatch();\n\t\t\t\tapplyPatch = null;\n\t\t\t}\n\n\t\t\t// Create an editor instance for each matched node\n\t\t\tself.each(function(i, node) {\n\t\t\t\tvar ed, id = node.id, oninit = settings.oninit;\n\n\t\t\t\t// Generate unique id for target element if needed\n\t\t\t\tif (!id)\n\t\t\t\t\tnode.id = id = tinymce.DOM.uniqueId();\n\n\t\t\t\t// Create editor instance and render it\n\t\t\t\ted = new tinymce.Editor(id, settings);\n\t\t\t\teditors.push(ed);\n\n\t\t\t\ted.onInit.add(function() {\n\t\t\t\t\tvar scope, func = oninit;\n\n\t\t\t\t\tself.css('visibility', '');\n\n\t\t\t\t\t// Run this if the oninit setting is defined\n\t\t\t\t\t// this logic will fire the oninit callback ones each\n\t\t\t\t\t// matched editor instance is initialized\n\t\t\t\t\tif (oninit) {\n\t\t\t\t\t\t// Fire the oninit event ones each editor instance is initialized\n\t\t\t\t\t\tif (++initCount == editors.length) {\n\t\t\t\t\t\t\tif (tinymce.is(func, \"string\")) {\n\t\t\t\t\t\t\t\tscope = (func.indexOf(\".\") === -1) ? null : tinymce.resolve(func.replace(/\\.\\w+$/, \"\"));\n\t\t\t\t\t\t\t\tfunc = tinymce.resolve(func);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Call the oninit function with the object\n\t\t\t\t\t\t\tfunc.apply(scope || tinymce, editors);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// Render the editor instances in a separate loop since we\n\t\t\t// need to have the full editors array used in the onInit calls\n\t\t\t$.each(editors, function(i, ed) {\n\t\t\t\ted.render();\n\t\t\t});\n\t\t}\n\n\t\t// Load TinyMCE on demand, if we need to\n\t\tif (!win[\"tinymce\"] && !lazyLoading && (url = settings.script_url)) {\n\t\t\tlazyLoading = 1;\n\t\t\tbase = url.substring(0, url.lastIndexOf(\"/\"));\n\n\t\t\t// Check if it's a dev/src version they want to load then\n\t\t\t// make sure that all plugins, themes etc are loaded in source mode aswell\n\t\t\tif (/_(src|dev)\\.js/g.test(url))\n\t\t\t\tsuffix = \"_src\";\n\n\t\t\t// Parse out query part, this will be appended to all scripts, css etc to clear browser cache\n\t\t\tpos = url.lastIndexOf(\"?\");\n\t\t\tif (pos != -1)\n\t\t\t\tquery = url.substring(pos + 1);\n\n\t\t\t// Setup tinyMCEPreInit object this will later be used by the TinyMCE\n\t\t\t// core script to locate other resources like CSS files, dialogs etc\n\t\t\t// You can also predefined a tinyMCEPreInit object and then it will use that instead\n\t\t\twin.tinyMCEPreInit = win.tinyMCEPreInit || {\n\t\t\t\tbase : base,\n\t\t\t\tsuffix : suffix,\n\t\t\t\tquery : query\n\t\t\t};\n\n\t\t\t// url contains gzip then we assume it's a compressor\n\t\t\tif (url.indexOf('gzip') != -1) {\n\t\t\t\tlang = settings.language || \"en\";\n\t\t\t\turl = url + (/\\?/.test(url) ? '&' : '?') + \"js=true&core=true&suffix=\" + escape(suffix) + \"&themes=\" + escape(settings.theme) + \"&plugins=\" + escape(settings.plugins) + \"&languages=\" + lang;\n\n\t\t\t\t// Check if compressor script is already loaded otherwise setup a basic one\n\t\t\t\tif (!win[\"tinyMCE_GZ\"]) {\n\t\t\t\t\ttinyMCE_GZ = {\n\t\t\t\t\t\tstart : function() {\n\t\t\t\t\t\t\ttinymce.suffix = suffix;\n\n\t\t\t\t\t\t\tfunction load(url) {\n\t\t\t\t\t\t\t\ttinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(url));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Add core languages\n\t\t\t\t\t\t\tload(\"langs/\" + lang + \".js\");\n\n\t\t\t\t\t\t\t// Add themes with languages\n\t\t\t\t\t\t\tload(\"themes/\" + settings.theme + \"/editor_template\" + suffix + \".js\");\n\t\t\t\t\t\t\tload(\"themes/\" + settings.theme + \"/langs/\" + lang + \".js\");\n\n\t\t\t\t\t\t\t// Add plugins with languages\n\t\t\t\t\t\t\t$.each(settings.plugins.split(\",\"), function(i, name) {\n\t\t\t\t\t\t\t\tif (name) {\n\t\t\t\t\t\t\t\t\tload(\"plugins/\" + name + \"/editor_plugin\" + suffix + \".js\");\n\t\t\t\t\t\t\t\t\tload(\"plugins/\" + name + \"/langs/\" + lang + \".js\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\n\t\t\t\t\t\tend : function() {\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Load the script cached and execute the inits once it's done\n\t\t\t$.ajax({\n\t\t\t\ttype : \"GET\",\n\t\t\t\turl : url,\n\t\t\t\tdataType : \"script\",\n\t\t\t\tcache : true,\n\t\t\t\tsuccess : function() {\n\t\t\t\t\ttinymce.dom.Event.domLoaded = 1;\n\t\t\t\t\tlazyLoading = 2;\n\n\t\t\t\t\t// Execute callback after mainscript has been loaded and before the initialization occurs\n\t\t\t\t\tif (settings.script_loaded)\n\t\t\t\t\t\tsettings.script_loaded();\n\n\t\t\t\t\tinit();\n\n\t\t\t\t\t$.each(delayedInits, function(i, init) {\n\t\t\t\t\t\tinit();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\t// Delay the init call until tinymce is loaded\n\t\t\tif (lazyLoading === 1)\n\t\t\t\tdelayedInits.push(init);\n\t\t\telse\n\t\t\t\tinit();\n\t\t}\n\n\t\treturn self;\n\t};\n\n\t// Add :tinymce psuedo selector this will select elements that has been converted into editor instances\n\t// it's now possible to use things like $('*:tinymce') to get all TinyMCE bound elements.\n\t$.extend($.expr[\":\"], {\n\t\ttinymce : function(e) {\n\t\t\treturn e.id && !!tinyMCE.get(e.id);\n\t\t}\n\t});\n\n\t// This function patches internal jQuery functions so that if\n\t// you for example remove an div element containing an editor it's\n\t// automatically destroyed by the TinyMCE API\n\tfunction applyPatch() {\n\t\t// Removes any child editor instances by looking for editor wrapper elements\n\t\tfunction removeEditors(name) {\n\t\t\t// If the function is remove\n\t\t\tif (name === \"remove\") {\n\t\t\t\tthis.each(function(i, node) {\n\t\t\t\t\tvar ed = tinyMCEInstance(node);\n\n\t\t\t\t\tif (ed)\n\t\t\t\t\t\ted.remove();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.find(\"span.mceEditor,div.mceEditor\").each(function(i, node) {\n\t\t\t\tvar ed = tinyMCE.get(node.id.replace(/_parent$/, \"\"));\n\n\t\t\t\tif (ed)\n\t\t\t\t\ted.remove();\n\t\t\t});\n\t\t}\n\n\t\t// Loads or saves contents from/to textarea if the value\n\t\t// argument is defined it will set the TinyMCE internal contents\n\t\tfunction loadOrSave(value) {\n\t\t\tvar self = this, ed;\n\n\t\t\t// Handle set value\n\t\t\tif (value !== undefined) {\n\t\t\t\tremoveEditors.call(self);\n\n\t\t\t\t// Saves the contents before get/set value of textarea/div\n\t\t\t\tself.each(function(i, node) {\n\t\t\t\t\tvar ed;\n\n\t\t\t\t\tif (ed = tinyMCE.get(node.id))\n\t\t\t\t\t\ted.setContent(value);\n\t\t\t\t});\n\t\t\t} else if (self.length > 0) {\n\t\t\t\t// Handle get value\n\t\t\t\tif (ed = tinyMCE.get(self[0].id))\n\t\t\t\t\treturn ed.getContent();\n\t\t\t}\n\t\t}\n\n\t\t// Returns tinymce instance for the specified element or null if it wasn't found\n\t\tfunction tinyMCEInstance(element) {\n\t\t\tvar ed = null;\n\n\t\t\t(element) && (element.id) && (win[\"tinymce\"]) && (ed = tinyMCE.get(element.id));\n\n\t\t\treturn ed;\n\t\t}\n\n\t\t// Checks if the specified set contains tinymce instances\n\t\tfunction containsTinyMCE(matchedSet) {\n\t\t\treturn !!((matchedSet) && (matchedSet.length) && (win[\"tinymce\"]) && (matchedSet.is(\":tinymce\")));\n\t\t}\n\n\t\t// Patch various jQuery functions\n\t\tvar jQueryFn = {};\n\n\t\t// Patch some setter/getter functions these will\n\t\t// now be able to set/get the contents of editor instances for\n\t\t// example $('#editorid').html('Content'); will update the TinyMCE iframe instance\n\t\t$.each([\"text\", \"html\", \"val\"], function(i, name) {\n\t\t\tvar origFn = jQueryFn[name] = $.fn[name],\n\t\t\t\ttextProc = (name === \"text\");\n\n\t\t\t $.fn[name] = function(value) {\n\t\t\t\tvar self = this;\n\n\t\t\t\tif (!containsTinyMCE(self))\n\t\t\t\t\treturn origFn.apply(self, arguments);\n\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tloadOrSave.call(self.filter(\":tinymce\"), value);\n\t\t\t\t\torigFn.apply(self.not(\":tinymce\"), arguments);\n\n\t\t\t\t\treturn self; // return original set for chaining\n\t\t\t\t} else {\n\t\t\t\t\tvar ret = \"\";\n\t\t\t\t\tvar args = arguments;\n\t\t\t\t\t\n\t\t\t\t\t(textProc ? self : self.eq(0)).each(function(i, node) {\n\t\t\t\t\t\tvar ed = tinyMCEInstance(node);\n\n\t\t\t\t\t\tret += ed ? (textProc ? ed.getContent().replace(/<(?:\"[^\"]*\"|'[^']*'|[^'\">])*>/g, \"\") : ed.getContent()) : origFn.apply($(node), args);\n\t\t\t\t\t});\n\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\t\t\t };\n\t\t});\n\n\t\t// Makes it possible to use $('#id').append(\"content\"); to append contents to the TinyMCE editor iframe\n\t\t$.each([\"append\", \"prepend\"], function(i, name) {\n\t\t\tvar origFn = jQueryFn[name] = $.fn[name],\n\t\t\t\tprepend = (name === \"prepend\");\n\n\t\t\t $.fn[name] = function(value) {\n\t\t\t\tvar self = this;\n\n\t\t\t\tif (!containsTinyMCE(self))\n\t\t\t\t\treturn origFn.apply(self, arguments);\n\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\tself.filter(\":tinymce\").each(function(i, node) {\n\t\t\t\t\t\tvar ed = tinyMCEInstance(node);\n\n\t\t\t\t\t\ted && ed.setContent(prepend ? value + ed.getContent() : ed.getContent() + value);\n\t\t\t\t\t});\n\n\t\t\t\t\torigFn.apply(self.not(\":tinymce\"), arguments);\n\n\t\t\t\t\treturn self; // return original set for chaining\n\t\t\t\t}\n\t\t\t };\n\t\t});\n\n\t\t// Makes sure that the editor instance gets properly destroyed when the parent element is removed\n\t\t$.each([\"remove\", \"replaceWith\", \"replaceAll\", \"empty\"], function(i, name) {\n\t\t\tvar origFn = jQueryFn[name] = $.fn[name];\n\n\t\t\t$.fn[name] = function() {\n\t\t\t\tremoveEditors.call(this, name);\n\n\t\t\t\treturn origFn.apply(this, arguments);\n\t\t\t};\n\t\t});\n\n\t\tjQueryFn.attr = $.fn.attr;\n\n\t\t// Makes sure that $('#tinymce_id').attr('value') gets the editors current HTML contents\n\t\t$.fn.attr = function(name, value, type) {\n\t\t\tvar self = this;\n\n\t\t\tif ((!name) || (name !== \"value\") || (!containsTinyMCE(self)))\n\t\t\t\treturn jQueryFn.attr.call(self, name, value, type);\n\n\t\t\tif (value !== undefined) {\n\t\t\t\tloadOrSave.call(self.filter(\":tinymce\"), value);\n\t\t\t\tjQueryFn.attr.call(self.not(\":tinymce\"), name, value, type);\n\n\t\t\t\treturn self; // return original set for chaining\n\t\t\t} else {\n\t\t\t\tvar node = self[0], ed = tinyMCEInstance(node);\n\n\t\t\t\treturn ed ? ed.getContent() : jQueryFn.attr.call($(node), name, value, type);\n\t\t\t}\n\t\t};\n\t}\n})(jQuery);","Magento_Tinymce3/tiny_mce/classes/adapter/prototype/adapter.js":"/**\n * adapter.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n// #ifdef prototype_adapter\n\n(function() {\n\tif (!window.Prototype)\n\t\treturn alert(\"Load prototype first!\");\n\n\t// Patch in core NS functions\n\ttinymce.extend(tinymce, {\n\t\ttrim : function(s) {return s ? s.strip() : '';},\n\t\tinArray : function(a, v) {return a && a.indexOf ? a.indexOf(v) : -1;}\n\t});\n\n\t// Patch in functions in various clases\n\t// Add a \"#ifndefjquery\" statement around each core API function you add below\n\tvar patches = {\n\t\t'tinymce.util.JSON' : {\n\t\t\t/*serialize : function(o) {\n\t\t\t\treturn o.toJSON();\n\t\t\t}*/\n\t\t},\n\t};\n\n\t// Patch functions after a class is created\n\ttinymce.onCreate = function(ty, c, p) {\n\t\ttinymce.extend(p, patches[c]);\n\t};\n})();\n\n// #endif\n","Magento_Tinymce3/tiny_mce/langs/en.js":"tinyMCE.addI18n({en:{common:{\"more_colors\":\"More Colors...\",\"invalid_data\":\"Error: Invalid values entered, these are marked in red.\",\"popup_blocked\":\"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.\",\"clipboard_no_support\":\"Currently not supported by your browser, use keyboard shortcuts instead.\",\"clipboard_msg\":\"Copy/Cut/Paste is not available in Mozilla and Firefox.\\nDo you want more information about this issue?\",\"not_set\":\"-- Not Set --\",\"class_name\":\"Class\",browse:\"Browse\",close:\"Close\",cancel:\"Cancel\",update:\"Update\",insert:\"Insert\",apply:\"Apply\",\"edit_confirm\":\"Do you want to use the WYSIWYG mode for this textarea?\",\"invalid_data_number\":\"{#field} must be a number\",\"invalid_data_min\":\"{#field} must be a number greater than {#min}\",\"invalid_data_size\":\"{#field} must be a number or percentage\",value:\"(value)\"},contextmenu:{full:\"Full\",right:\"Right\",center:\"Center\",left:\"Left\",align:\"Alignment\"},insertdatetime:{\"day_short\":\"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun\",\"day_long\":\"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday\",\"months_short\":\"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec\",\"months_long\":\"January,February,March,April,May,June,July,August,September,October,November,December\",\"inserttime_desc\":\"Insert Time\",\"insertdate_desc\":\"Insert Date\",\"time_fmt\":\"%H:%M:%S\",\"date_fmt\":\"%Y-%m-%d\"},print:{\"print_desc\":\"Print\"},preview:{\"preview_desc\":\"Preview\"},directionality:{\"rtl_desc\":\"Direction Right to Left\",\"ltr_desc\":\"Direction Left to Right\"},layer:{content:\"New layer...\",\"absolute_desc\":\"Toggle Absolute Positioning\",\"backward_desc\":\"Move Backward\",\"forward_desc\":\"Move Forward\",\"insertlayer_desc\":\"Insert New Layer\"},save:{\"save_desc\":\"Save\",\"cancel_desc\":\"Cancel All Changes\"},nonbreaking:{\"nonbreaking_desc\":\"Insert Non-Breaking Space Character\"},iespell:{download:\"ieSpell not detected. Do you want to install it now?\",\"iespell_desc\":\"Check Spelling\"},advhr:{\"delta_height\":\"\",\"delta_width\":\"\",\"advhr_desc\":\"Insert Horizontal Line\"},emotions:{\"delta_height\":\"\",\"delta_width\":\"\",\"emotions_desc\":\"Emotions\"},searchreplace:{\"replace_desc\":\"Find/Replace\",\"delta_width\":\"\",\"delta_height\":\"\",\"search_desc\":\"Find\"},advimage:{\"delta_width\":\"\",\"image_desc\":\"Insert/Edit Image\",\"delta_height\":\"\"},advlink:{\"delta_height\":\"\",\"delta_width\":\"\",\"link_desc\":\"Insert/Edit Link\"},xhtmlxtras:{\"attribs_delta_height\":\"\",\"attribs_delta_width\":\"\",\"ins_delta_height\":\"\",\"ins_delta_width\":\"\",\"del_delta_height\":\"\",\"del_delta_width\":\"\",\"acronym_delta_height\":\"\",\"acronym_delta_width\":\"\",\"abbr_delta_height\":\"\",\"abbr_delta_width\":\"\",\"cite_delta_height\":\"\",\"cite_delta_width\":\"\",\"attribs_desc\":\"Insert/Edit Attributes\",\"ins_desc\":\"Insertion\",\"del_desc\":\"Deletion\",\"acronym_desc\":\"Acronym\",\"abbr_desc\":\"Abbreviation\",\"cite_desc\":\"Citation\"},style:{\"delta_height\":\"\",\"delta_width\":\"\",desc:\"Edit CSS Style\"},paste:{\"plaintext_mode_stick\":\"Paste is now in plain text mode. Click again to toggle back to regular paste mode.\",\"plaintext_mode\":\"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.\",\"selectall_desc\":\"Select All\",\"paste_word_desc\":\"Paste from Word\",\"paste_text_desc\":\"Paste as Plain Text\"},\"paste_dlg\":{\"word_title\":\"Use Ctrl+V on your keyboard to paste the text into the window.\",\"text_linebreaks\":\"Keep Linebreaks\",\"text_title\":\"Use Ctrl+V on your keyboard to paste the text into the window.\"},table:{\"merge_cells_delta_height\":\"\",\"merge_cells_delta_width\":\"\",\"table_delta_height\":\"\",\"table_delta_width\":\"\",\"cellprops_delta_height\":\"\",\"cellprops_delta_width\":\"\",\"rowprops_delta_height\":\"\",\"rowprops_delta_width\":\"\",cell:\"Cell\",col:\"Column\",row:\"Row\",del:\"Delete Table\",\"copy_row_desc\":\"Copy Table Row\",\"cut_row_desc\":\"Cut Table Row\",\"paste_row_after_desc\":\"Paste Table Row After\",\"paste_row_before_desc\":\"Paste Table Row Before\",\"props_desc\":\"Table Properties\",\"cell_desc\":\"Table Cell Properties\",\"row_desc\":\"Table Row Properties\",\"merge_cells_desc\":\"Merge Table Cells\",\"split_cells_desc\":\"Split Merged Table Cells\",\"delete_col_desc\":\"Delete Column\",\"col_after_desc\":\"Insert Column After\",\"col_before_desc\":\"Insert Column Before\",\"delete_row_desc\":\"Delete Row\",\"row_after_desc\":\"Insert Row After\",\"row_before_desc\":\"Insert Row Before\",desc:\"Insert/Edit Table\"},autosave:{\"warning_message\":\"If you restore the saved content, you will lose all the content that is currently in the editor.\\n\\nAre you sure you want to restore the saved content?\",\"restore_content\":\"Restore auto-saved content.\",\"unload_msg\":\"The changes you made will be lost if you navigate away from this page.\"},fullscreen:{desc:\"Toggle Full Screen Mode\"},media:{\"delta_height\":\"\",\"delta_width\":\"\",edit:\"Edit Embedded Media\",desc:\"Insert/Edit Embedded Media\"},fullpage:{desc:\"Document Properties\",\"delta_width\":\"\",\"delta_height\":\"\"},template:{desc:\"Insert Predefined Template Content\"},visualchars:{desc:\"Show/Hide Visual Control Characters\"},spellchecker:{desc:\"Toggle Spell Checker\",menu:\"Spell Checker Settings\",\"ignore_word\":\"Ignore Word\",\"ignore_words\":\"Ignore All\",langs:\"Languages\",wait:\"Please wait...\",sug:\"Suggestions\",\"no_sug\":\"No Suggestions\",\"no_mpell\":\"No misspellings found.\",\"learn_word\":\"Learn word\"},pagebreak:{desc:\"Insert Page Break for Printing\"},advlist:{types:\"Types\",def:\"Default\",\"lower_alpha\":\"Lower Alpha\",\"lower_greek\":\"Lower Greek\",\"lower_roman\":\"Lower Roman\",\"upper_alpha\":\"Upper Alpha\",\"upper_roman\":\"Upper Roman\",circle:\"Circle\",disc:\"Disc\",square:\"Square\"},colors:{\"333300\":\"Dark olive\",\"993300\":\"Burnt orange\",\"000000\":\"Black\",\"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\":\"Brown\",C0C0C0:\"Silver\",FF99CC:\"Pink\",FFCC99:\"Peach\",FFFF99:\"Light yellow\",CCFFCC:\"Pale green\",CCFFFF:\"Pale cyan\",\"99CCFF\":\"Light sky blue\",CC99FF:\"Plum\",FFFFFF:\"White\"},aria:{\"rich_text_area\":\"Rich Text Area\"},wordcount:{words:\"Words:\"}}});","Magento_Tinymce3/tiny_mce/themes/advanced/editor_template_src.js":"/**\n * editor_template_src.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function(tinymce) {\n\tvar DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;\n\n\t// Tell it to load theme specific language pack(s)\n\ttinymce.ThemeManager.requireLangPack('advanced');\n\n\ttinymce.create('tinymce.themes.AdvancedTheme', {\n\t\tsizes : [8, 10, 12, 14, 18, 24, 36],\n\n\t\t// Control name lookup, format: title, command\n\t\tcontrols : {\n\t\t\tbold : ['bold_desc', 'Bold'],\n\t\t\titalic : ['italic_desc', 'Italic'],\n\t\t\tunderline : ['underline_desc', 'Underline'],\n\t\t\tstrikethrough : ['striketrough_desc', 'Strikethrough'],\n\t\t\tjustifyleft : ['justifyleft_desc', 'JustifyLeft'],\n\t\t\tjustifycenter : ['justifycenter_desc', 'JustifyCenter'],\n\t\t\tjustifyright : ['justifyright_desc', 'JustifyRight'],\n\t\t\tjustifyfull : ['justifyfull_desc', 'JustifyFull'],\n\t\t\tbullist : ['bullist_desc', 'InsertUnorderedList'],\n\t\t\tnumlist : ['numlist_desc', 'InsertOrderedList'],\n\t\t\toutdent : ['outdent_desc', 'Outdent'],\n\t\t\tindent : ['indent_desc', 'Indent'],\n\t\t\tcut : ['cut_desc', 'Cut'],\n\t\t\tcopy : ['copy_desc', 'Copy'],\n\t\t\tpaste : ['paste_desc', 'Paste'],\n\t\t\tundo : ['undo_desc', 'Undo'],\n\t\t\tredo : ['redo_desc', 'Redo'],\n\t\t\tlink : ['link_desc', 'mceLink'],\n\t\t\tunlink : ['unlink_desc', 'unlink'],\n\t\t\timage : ['image_desc', 'mceImage'],\n\t\t\tcleanup : ['cleanup_desc', 'mceCleanup'],\n\t\t\thelp : ['help_desc', 'mceHelp'],\n\t\t\tcode : ['code_desc', 'mceCodeEditor'],\n\t\t\thr : ['hr_desc', 'InsertHorizontalRule'],\n\t\t\tremoveformat : ['removeformat_desc', 'RemoveFormat'],\n\t\t\tsub : ['sub_desc', 'subscript'],\n\t\t\tsup : ['sup_desc', 'superscript'],\n\t\t\tforecolor : ['forecolor_desc', 'ForeColor'],\n\t\t\tforecolorpicker : ['forecolor_desc', 'mceForeColor'],\n\t\t\tbackcolor : ['backcolor_desc', 'HiliteColor'],\n\t\t\tbackcolorpicker : ['backcolor_desc', 'mceBackColor'],\n\t\t\tcharmap : ['charmap_desc', 'mceCharMap'],\n\t\t\tvisualaid : ['visualaid_desc', 'mceToggleVisualAid'],\n\t\t\tanchor : ['anchor_desc', 'mceInsertAnchor'],\n\t\t\tnewdocument : ['newdocument_desc', 'mceNewDocument'],\n\t\t\tblockquote : ['blockquote_desc', 'mceBlockQuote']\n\t\t},\n\n\t\tstateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'],\n\n\t\tinit : function(ed, url) {\n\t\t\tvar t = this, s, v, o;\n\t\n\t\t\tt.editor = ed;\n\t\t\tt.url = url;\n\t\t\tt.onResolveName = new tinymce.util.Dispatcher(this);\n\n\t\t\ted.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast();\n\t\t\ted.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin;\n\n\t\t\t// Default settings\n\t\t\tt.settings = s = extend({\n\t\t\t\ttheme_advanced_path : true,\n\t\t\t\ttheme_advanced_toolbar_location : 'bottom',\n\t\t\t\ttheme_advanced_buttons1 : \"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect\",\n\t\t\t\ttheme_advanced_buttons2 : \"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code\",\n\t\t\t\ttheme_advanced_buttons3 : \"hr,removeformat,visualaid,|,sub,sup,|,charmap\",\n\t\t\t\ttheme_advanced_blockformats : \"p,address,pre,h1,h2,h3,h4,h5,h6\",\n\t\t\t\ttheme_advanced_toolbar_align : \"center\",\n\t\t\t\ttheme_advanced_fonts : \"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats\",\n\t\t\t\ttheme_advanced_more_colors : 1,\n\t\t\t\ttheme_advanced_row_height : 23,\n\t\t\t\ttheme_advanced_resize_horizontal : 1,\n\t\t\t\ttheme_advanced_resizing_use_cookie : 1,\n\t\t\t\ttheme_advanced_font_sizes : \"1,2,3,4,5,6,7\",\n\t\t\t\ttheme_advanced_font_selector : \"span\",\n\t\t\t\ttheme_advanced_show_current_color: 0,\n\t\t\t\treadonly : ed.settings.readonly\n\t\t\t}, ed.settings);\n\n\t\t\t// Setup default font_size_style_values\n\t\t\tif (!s.font_size_style_values)\n\t\t\t\ts.font_size_style_values = \"8pt,10pt,12pt,14pt,18pt,24pt,36pt\";\n\n\t\t\tif (tinymce.is(s.theme_advanced_font_sizes, 'string')) {\n\t\t\t\ts.font_size_style_values = tinymce.explode(s.font_size_style_values);\n\t\t\t\ts.font_size_classes = tinymce.explode(s.font_size_classes || '');\n\n\t\t\t\t// Parse string value\n\t\t\t\to = {};\n\t\t\t\ted.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes;\n\t\t\t\teach(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) {\n\t\t\t\t\tvar cl;\n\n\t\t\t\t\tif (k == v && v >= 1 && v <= 7) {\n\t\t\t\t\t\tk = v + ' (' + t.sizes[v - 1] + 'pt)';\n\t\t\t\t\t\tcl = s.font_size_classes[v - 1];\n\t\t\t\t\t\tv = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');\n\t\t\t\t\t}\n\n\t\t\t\t\tif (/^\\s*\\./.test(v))\n\t\t\t\t\t\tcl = v.replace(/\\./g, '');\n\n\t\t\t\t\to[k] = cl ? {'class' : cl} : {fontSize : v};\n\t\t\t\t});\n\n\t\t\t\ts.theme_advanced_font_sizes = o;\n\t\t\t}\n\n\t\t\tif ((v = s.theme_advanced_path_location) && v != 'none')\n\t\t\t\ts.theme_advanced_statusbar_location = s.theme_advanced_path_location;\n\n\t\t\tif (s.theme_advanced_statusbar_location == 'none')\n\t\t\t\ts.theme_advanced_statusbar_location = 0;\n\n\t\t\tif (ed.settings.content_css !== false)\n\t\t\t\ted.contentCSS.push(ed.baseURI.toAbsolute(url + \"/skins/\" + ed.settings.skin + \"/content.css\"));\n\n\t\t\t// Init editor\n\t\t\ted.onInit.add(function() {\n\t\t\t\tif (!ed.settings.readonly) {\n\t\t\t\t\ted.onNodeChange.add(t._nodeChanged, t);\n\t\t\t\t\ted.onKeyUp.add(t._updateUndoStatus, t);\n\t\t\t\t\ted.onMouseUp.add(t._updateUndoStatus, t);\n\t\t\t\t\ted.dom.bind(ed.dom.getRoot(), 'dragend', function() {\n\t\t\t\t\t\tt._updateUndoStatus(ed);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\ted.onSetProgressState.add(function(ed, b, ti) {\n\t\t\t\tvar co, id = ed.id, tb;\n\n\t\t\t\tif (b) {\n\t\t\t\t\tt.progressTimer = setTimeout(function() {\n\t\t\t\t\t\tco = ed.getContainer();\n\t\t\t\t\t\tco = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild);\n\t\t\t\t\t\ttb = DOM.get(ed.id + '_tbl');\n\n\t\t\t\t\t\tDOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});\n\t\t\t\t\t\tDOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});\n\t\t\t\t\t}, ti || 0);\n\t\t\t\t} else {\n\t\t\t\t\tDOM.remove(id + '_blocker');\n\t\t\t\t\tDOM.remove(id + '_progress');\n\t\t\t\t\tclearTimeout(t.progressTimer);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tDOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + \"/skins/\" + ed.settings.skin + \"/ui.css\");\n\n\t\t\tif (s.skin_variant)\n\t\t\t\tDOM.loadCSS(url + \"/skins/\" + ed.settings.skin + \"/ui_\" + s.skin_variant + \".css\");\n\t\t},\n\n\t\t_isHighContrast : function() {\n\t\t\tvar actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'});\n\n\t\t\tactualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, '');\n\t\t\tDOM.remove(div);\n\n\t\t\treturn actualColor != 'rgb(171,239,86)' && actualColor != '#abef56';\n\t\t},\n\n\t\tcreateControl : function(n, cf) {\n\t\t\tvar cd, c;\n\n\t\t\tif (c = cf.createControl(n))\n\t\t\t\treturn c;\n\n\t\t\tswitch (n) {\n\t\t\t\tcase \"styleselect\":\n\t\t\t\t\treturn this._createStyleSelect();\n\n\t\t\t\tcase \"formatselect\":\n\t\t\t\t\treturn this._createBlockFormats();\n\n\t\t\t\tcase \"fontselect\":\n\t\t\t\t\treturn this._createFontSelect();\n\n\t\t\t\tcase \"fontsizeselect\":\n\t\t\t\t\treturn this._createFontSizeSelect();\n\n\t\t\t\tcase \"forecolor\":\n\t\t\t\t\treturn this._createForeColorMenu();\n\n\t\t\t\tcase \"backcolor\":\n\t\t\t\t\treturn this._createBackColorMenu();\n\t\t\t}\n\n\t\t\tif ((cd = this.controls[n]))\n\t\t\t\treturn cf.createButton(n, {title : \"advanced.\" + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]});\n\t\t},\n\n\t\texecCommand : function(cmd, ui, val) {\n\t\t\tvar f = this['_' + cmd];\n\n\t\t\tif (f) {\n\t\t\t\tf.call(this, ui, val);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\n\t\t_importClasses : function(e) {\n\t\t\tvar ed = this.editor, ctrl = ed.controlManager.get('styleselect');\n\n\t\t\tif (ctrl.getLength() == 0) {\n\t\t\t\teach(ed.dom.getClasses(), function(o, idx) {\n\t\t\t\t\tvar name = 'style_' + idx;\n\n\t\t\t\t\ted.formatter.register(name, {\n\t\t\t\t\t\tinline : 'span',\n\t\t\t\t\t\tattributes : {'class' : o['class']},\n\t\t\t\t\t\tselector : '*'\n\t\t\t\t\t});\n\n\t\t\t\t\tctrl.add(o['class'], name);\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\t_createStyleSelect : function(n) {\n\t\t\tvar t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;\n\n\t\t\t// Setup style select box\n\t\t\tctrl = ctrlMan.createListBox('styleselect', {\n\t\t\t\ttitle : 'advanced.style_select',\n\t\t\t\tonselect : function(name) {\n\t\t\t\t\tvar matches, formatNames = [];\n\n\t\t\t\t\teach(ctrl.items, function(item) {\n\t\t\t\t\t\tformatNames.push(item.value);\n\t\t\t\t\t});\n\n\t\t\t\t\ted.focus();\n\t\t\t\t\ted.undoManager.add();\n\n\t\t\t\t\t// Toggle off the current format\n\t\t\t\t\tmatches = ed.formatter.matchAll(formatNames);\n\t\t\t\t\tif (!name || matches[0] == name) {\n\t\t\t\t\t\tif (matches[0]) \n\t\t\t\t\t\t\ted.formatter.remove(matches[0]);\n\t\t\t\t\t} else\n\t\t\t\t\t\ted.formatter.apply(name);\n\n\t\t\t\t\ted.undoManager.add();\n\t\t\t\t\ted.nodeChanged();\n\n\t\t\t\t\treturn false; // No auto select\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Handle specified format\n\t\t\ted.onInit.add(function() {\n\t\t\t\tvar counter = 0, formats = ed.getParam('style_formats');\n\n\t\t\t\tif (formats) {\n\t\t\t\t\teach(formats, function(fmt) {\n\t\t\t\t\t\tvar name, keys = 0;\n\n\t\t\t\t\t\teach(fmt, function() {keys++;});\n\n\t\t\t\t\t\tif (keys > 1) {\n\t\t\t\t\t\t\tname = fmt.name = fmt.name || 'style_' + (counter++);\n\t\t\t\t\t\t\ted.formatter.register(name, fmt);\n\t\t\t\t\t\t\tctrl.add(fmt.title, name);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tctrl.add(fmt.title);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\teach(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {\n\t\t\t\t\t\tvar name;\n\n\t\t\t\t\t\tif (val) {\n\t\t\t\t\t\t\tname = 'style_' + (counter++);\n\n\t\t\t\t\t\t\ted.formatter.register(name, {\n\t\t\t\t\t\t\t\tinline : 'span',\n\t\t\t\t\t\t\t\tclasses : val,\n\t\t\t\t\t\t\t\tselector : '*'\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tctrl.add(t.editor.translate(key), name);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Auto import classes if the ctrl box is empty\n\t\t\tif (ctrl.getLength() == 0) {\n\t\t\t\tctrl.onPostRender.add(function(ed, n) {\n\t\t\t\t\tif (!ctrl.NativeListBox) {\n\t\t\t\t\t\tEvent.add(n.id + '_text', 'focus', t._importClasses, t);\n\t\t\t\t\t\tEvent.add(n.id + '_text', 'mousedown', t._importClasses, t);\n\t\t\t\t\t\tEvent.add(n.id + '_open', 'focus', t._importClasses, t);\n\t\t\t\t\t\tEvent.add(n.id + '_open', 'mousedown', t._importClasses, t);\n\t\t\t\t\t} else\n\t\t\t\t\t\tEvent.add(n.id, 'focus', t._importClasses, t);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn ctrl;\n\t\t},\n\n\t\t_createFontSelect : function() {\n\t\t\tvar c, t = this, ed = t.editor;\n\n\t\t\tc = ed.controlManager.createListBox('fontselect', {\n\t\t\t\ttitle : 'advanced.fontdefault',\n\t\t\t\tonselect : function(v) {\n\t\t\t\t\tvar cur = c.items[c.selectedIndex];\n\n\t\t\t\t\tif (!v && cur) {\n\t\t\t\t\t\ted.execCommand('FontName', false, cur.value);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\ted.execCommand('FontName', false, v);\n\n\t\t\t\t\t// Fake selection, execCommand will fire a nodeChange and update the selection\n\t\t\t\t\tc.select(function(sv) {\n\t\t\t\t\t\treturn v == sv;\n\t\t\t\t\t});\n\n\t\t\t\t\tif (cur && cur.value == v) {\n\t\t\t\t\t\tc.select(null);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false; // No auto select\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (c) {\n\t\t\t\teach(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) {\n\t\t\t\t\tc.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn c;\n\t\t},\n\n\t\t_createFontSizeSelect : function() {\n\t\t\tvar t = this, ed = t.editor, c, i = 0, cl = [];\n\n\t\t\tc = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {\n\t\t\t\tvar cur = c.items[c.selectedIndex];\n\n\t\t\t\tif (!v && cur) {\n\t\t\t\t\tcur = cur.value;\n\n\t\t\t\t\tif (cur['class']) {\n\t\t\t\t\t\ted.formatter.toggle('fontsize_class', {value : cur['class']});\n\t\t\t\t\t\ted.undoManager.add();\n\t\t\t\t\t\ted.nodeChanged();\n\t\t\t\t\t} else {\n\t\t\t\t\t\ted.execCommand('FontSize', false, cur.fontSize);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (v['class']) {\n\t\t\t\t\ted.focus();\n\t\t\t\t\ted.undoManager.add();\n\t\t\t\t\ted.formatter.toggle('fontsize_class', {value : v['class']});\n\t\t\t\t\ted.undoManager.add();\n\t\t\t\t\ted.nodeChanged();\n\t\t\t\t} else\n\t\t\t\t\ted.execCommand('FontSize', false, v.fontSize);\n\n\t\t\t\t// Fake selection, execCommand will fire a nodeChange and update the selection\n\t\t\t\tc.select(function(sv) {\n\t\t\t\t\treturn v == sv;\n\t\t\t\t});\n\n\t\t\t\tif (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] == v['class'])) {\n\t\t\t\t\tc.select(null);\n\t\t\t\t}\n\n\t\t\t\treturn false; // No auto select\n\t\t\t}});\n\n\t\t\tif (c) {\n\t\t\t\teach(t.settings.theme_advanced_font_sizes, function(v, k) {\n\t\t\t\t\tvar fz = v.fontSize;\n\n\t\t\t\t\tif (fz >= 1 && fz <= 7)\n\t\t\t\t\t\tfz = t.sizes[parseInt(fz) - 1] + 'pt';\n\n\t\t\t\t\tc.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn c;\n\t\t},\n\n\t\t_createBlockFormats : function() {\n\t\t\tvar c, fmts = {\n\t\t\t\tp : 'advanced.paragraph',\n\t\t\t\taddress : 'advanced.address',\n\t\t\t\tpre : 'advanced.pre',\n\t\t\t\th1 : 'advanced.h1',\n\t\t\t\th2 : 'advanced.h2',\n\t\t\t\th3 : 'advanced.h3',\n\t\t\t\th4 : 'advanced.h4',\n\t\t\t\th5 : 'advanced.h5',\n\t\t\t\th6 : 'advanced.h6',\n\t\t\t\tdiv : 'advanced.div',\n\t\t\t\tblockquote : 'advanced.blockquote',\n\t\t\t\tcode : 'advanced.code',\n\t\t\t\tdt : 'advanced.dt',\n\t\t\t\tdd : 'advanced.dd',\n\t\t\t\tsamp : 'advanced.samp'\n\t\t\t}, t = this;\n\n\t\t\tc = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) {\n\t\t\t\tt.editor.execCommand('FormatBlock', false, v);\n\t\t\t\treturn false;\n\t\t\t}});\n\n\t\t\tif (c) {\n\t\t\t\teach(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) {\n\t\t\t\t\tc.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn c;\n\t\t},\n\n\t\t_createForeColorMenu : function() {\n\t\t\tvar c, t = this, s = t.settings, o = {}, v;\n\n\t\t\tif (s.theme_advanced_more_colors) {\n\t\t\t\to.more_colors_func = function() {\n\t\t\t\t\tt._mceColorPicker(0, {\n\t\t\t\t\t\tcolor : c.value,\n\t\t\t\t\t\tfunc : function(co) {\n\t\t\t\t\t\t\tc.setColor(co);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (v = s.theme_advanced_text_colors)\n\t\t\t\to.colors = v;\n\n\t\t\tif (s.theme_advanced_default_foreground_color)\n\t\t\t\to.default_color = s.theme_advanced_default_foreground_color;\n\n\t\t\to.title = 'advanced.forecolor_desc';\n\t\t\to.cmd = 'ForeColor';\n\t\t\to.scope = this;\n\n\t\t\tc = t.editor.controlManager.createColorSplitButton('forecolor', o);\n\n\t\t\treturn c;\n\t\t},\n\n\t\t_createBackColorMenu : function() {\n\t\t\tvar c, t = this, s = t.settings, o = {}, v;\n\n\t\t\tif (s.theme_advanced_more_colors) {\n\t\t\t\to.more_colors_func = function() {\n\t\t\t\t\tt._mceColorPicker(0, {\n\t\t\t\t\t\tcolor : c.value,\n\t\t\t\t\t\tfunc : function(co) {\n\t\t\t\t\t\t\tc.setColor(co);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (v = s.theme_advanced_background_colors)\n\t\t\t\to.colors = v;\n\n\t\t\tif (s.theme_advanced_default_background_color)\n\t\t\t\to.default_color = s.theme_advanced_default_background_color;\n\n\t\t\to.title = 'advanced.backcolor_desc';\n\t\t\to.cmd = 'HiliteColor';\n\t\t\to.scope = this;\n\n\t\t\tc = t.editor.controlManager.createColorSplitButton('backcolor', o);\n\n\t\t\treturn c;\n\t\t},\n\n\t\trenderUI : function(o) {\n\t\t\tvar n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;\n\n\t\t\tif (ed.settings) {\n\t\t\t\ted.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut');\n\t\t\t}\n\n\t\t\t// TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for.\n\t\t\t// Maybe actually inherit it from the original textara?\n\t\t\tn = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')});\n\t\t\tDOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label);\n\n\t\t\tif (!DOM.boxModel)\n\t\t\t\tn = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'});\n\n\t\t\tn = sc = DOM.add(n, 'table', {role : \"presentation\", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});\n\t\t\tn = tb = DOM.add(n, 'tbody');\n\n\t\t\tswitch ((s.theme_advanced_layout_manager || '').toLowerCase()) {\n\t\t\t\tcase \"rowlayout\":\n\t\t\t\t\tic = t._rowLayout(s, tb, o);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"customlayout\":\n\t\t\t\t\tic = ed.execCallback(\"theme_advanced_custom_layout\", s, tb, o, p);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tic = t._simpleLayout(s, tb, o, p);\n\t\t\t}\n\n\t\t\tn = o.targetNode;\n\n\t\t\t// Add classes to first and last TRs\n\t\t\tnl = sc.rows;\n\t\t\tDOM.addClass(nl[0], 'mceFirst');\n\t\t\tDOM.addClass(nl[nl.length - 1], 'mceLast');\n\n\t\t\t// Add classes to first and last TDs\n\t\t\teach(DOM.select('tr', tb), function(n) {\n\t\t\t\tDOM.addClass(n.firstChild, 'mceFirst');\n\t\t\t\tDOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast');\n\t\t\t});\n\n\t\t\tif (DOM.get(s.theme_advanced_toolbar_container))\n\t\t\t\tDOM.get(s.theme_advanced_toolbar_container).appendChild(p);\n\t\t\telse\n\t\t\t\tDOM.insertAfter(p, n);\n\n\t\t\tEvent.add(ed.id + '_path_row', 'click', function(e) {\n\t\t\t\te = e.target;\n\n\t\t\t\tif (e.nodeName == 'A') {\n\t\t\t\t\tt._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1'));\n\n\t\t\t\t\treturn Event.cancel(e);\n\t\t\t\t}\n\t\t\t});\n/*\n\t\t\tif (DOM.get(ed.id + '_path_row')) {\n\t\t\t\tEvent.add(ed.id + '_tbl', 'mouseover', function(e) {\n\t\t\t\t\tvar re;\n\t\n\t\t\t\t\te = e.target;\n\n\t\t\t\t\tif (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {\n\t\t\t\t\t\tre = DOM.get(ed.id + '_path_row');\n\t\t\t\t\t\tt.lastPath = re.innerHTML;\n\t\t\t\t\t\tDOM.setHTML(re, e.parentNode.title);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tEvent.add(ed.id + '_tbl', 'mouseout', function(e) {\n\t\t\t\t\tif (t.lastPath) {\n\t\t\t\t\t\tDOM.setHTML(ed.id + '_path_row', t.lastPath);\n\t\t\t\t\t\tt.lastPath = 0;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n*/\n\n\t\t\tif (!ed.getParam('accessibility_focus'))\n\t\t\t\tEvent.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), 'focus', function() {tinyMCE.get(ed.id).focus();});\n\n\t\t\tif (s.theme_advanced_toolbar_location == 'external')\n\t\t\t\to.deltaHeight = 0;\n\n\t\t\tt.deltaHeight = o.deltaHeight;\n\t\t\to.targetNode = null;\n\n\t\t\ted.onKeyDown.add(function(ed, evt) {\n\t\t\t\tvar DOM_VK_F10 = 121, DOM_VK_F11 = 122;\n\n\t\t\t\tif (evt.altKey) {\n\t\t \t\t\tif (evt.keyCode === DOM_VK_F10) {\n\t\t\t\t\t\t// Make sure focus is given to toolbar in Safari.\n\t\t\t\t\t\t// We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame\n\t\t\t\t\t\tif (tinymce.isWebKit) {\n\t\t\t\t\t\t\twindow.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tt.toolbarGroup.focus();\n\t\t\t\t\t\treturn Event.cancel(evt);\n\t\t\t\t\t} else if (evt.keyCode === DOM_VK_F11) {\n\t\t\t\t\t\tDOM.get(ed.id + '_path_row').focus();\n\t\t\t\t\t\treturn Event.cancel(evt);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// alt+0 is the UK recommended shortcut for accessing the list of access controls.\n\t\t\ted.addShortcut('alt+0', '', 'mceShortcuts', t);\n\n\t\t\treturn {\n\t\t\t\tiframeContainer : ic,\n\t\t\t\teditorContainer : ed.id + '_parent',\n\t\t\t\tsizeContainer : sc,\n\t\t\t\tdeltaHeight : o.deltaHeight\n\t\t\t};\n\t\t},\n\n\t\tgetInfo : function() {\n\t\t\treturn {\n\t\t\t\tlongname : 'Advanced theme',\n\t\t\t\tauthor : 'Moxiecode Systems AB',\n\t\t\t\tauthorurl : 'http://tinymce.moxiecode.com',\n\t\t\t\tversion : tinymce.majorVersion + \".\" + tinymce.minorVersion\n\t\t\t}\n\t\t},\n\n\t\tresizeBy : function(dw, dh) {\n\t\t\tvar e = DOM.get(this.editor.id + '_ifr');\n\n\t\t\tthis.resizeTo(e.clientWidth + dw, e.clientHeight + dh);\n\t\t},\n\n\t\tresizeTo : function(w, h, store) {\n\t\t\tvar ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr');\n\n\t\t\t// Boundery fix box\n\t\t\tw = Math.max(s.theme_advanced_resizing_min_width || 100, w);\n\t\t\th = Math.max(s.theme_advanced_resizing_min_height || 100, h);\n\t\t\tw = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w);\n\t\t\th = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h);\n\n\t\t\t// Resize iframe and container\n\t\t\tDOM.setStyle(e, 'height', '');\n\t\t\tDOM.setStyle(ifr, 'height', h);\n\n\t\t\tif (s.theme_advanced_resize_horizontal) {\n\t\t\t\tDOM.setStyle(e, 'width', '');\n\t\t\t\tDOM.setStyle(ifr, 'width', w);\n\n\t\t\t\t// Make sure that the size is never smaller than the over all ui\n\t\t\t\tif (w < e.clientWidth) {\n\t\t\t\t\tw = e.clientWidth;\n\t\t\t\t\tDOM.setStyle(ifr, 'width', e.clientWidth);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Store away the size\n\t\t\tif (store && s.theme_advanced_resizing_use_cookie) {\n\t\t\t\tCookie.setHash(\"TinyMCE_\" + ed.id + \"_size\", {\n\t\t\t\t\tcw : w,\n\t\t\t\t\tch : h\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\tdestroy : function() {\n\t\t\tvar id = this.editor.id;\n\n\t\t\tEvent.clear(id + '_resize');\n\t\t\tEvent.clear(id + '_path_row');\n\t\t\tEvent.clear(id + '_external_close');\n\t\t},\n\n\t\t// Internal functions\n\n\t\t_simpleLayout : function(s, tb, o, p) {\n\t\t\tvar t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;\n\n\t\t\tif (s.readonly) {\n\t\t\t\tn = DOM.add(tb, 'tr');\n\t\t\t\tn = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});\n\t\t\t\treturn ic;\n\t\t\t}\n\n\t\t\t// Create toolbar container at top\n\t\t\tif (lo == 'top')\n\t\t\t\tt._addToolbars(tb, o);\n\n\t\t\t// Create external toolbar\n\t\t\tif (lo == 'external') {\n\t\t\t\tn = c = DOM.create('div', {style : 'position:relative'});\n\t\t\t\tn = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'});\n\t\t\t\tDOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'});\n\t\t\t\tn = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0});\n\t\t\t\tetb = DOM.add(n, 'tbody');\n\n\t\t\t\tif (p.firstChild.className == 'mceOldBoxModel')\n\t\t\t\t\tp.firstChild.appendChild(c);\n\t\t\t\telse\n\t\t\t\t\tp.insertBefore(c, p.firstChild);\n\n\t\t\t\tt._addToolbars(etb, o);\n\n\t\t\t\ted.onMouseUp.add(function() {\n\t\t\t\t\tvar e = DOM.get(ed.id + '_external');\n\t\t\t\t\tDOM.show(e);\n\n\t\t\t\t\tDOM.hide(lastExtID);\n\n\t\t\t\t\tvar f = Event.add(ed.id + '_external_close', 'click', function() {\n\t\t\t\t\t\tDOM.hide(ed.id + '_external');\n\t\t\t\t\t\tEvent.remove(ed.id + '_external_close', 'click', f);\n\t\t\t\t\t});\n\n\t\t\t\t\tDOM.show(e);\n\t\t\t\t\tDOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1);\n\n\t\t\t\t\t// Fixes IE rendering bug\n\t\t\t\t\tDOM.hide(e);\n\t\t\t\t\tDOM.show(e);\n\t\t\t\t\te.style.filter = '';\n\n\t\t\t\t\tlastExtID = ed.id + '_external';\n\n\t\t\t\t\te = null;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (sl == 'top')\n\t\t\t\tt._addStatusBar(tb, o);\n\n\t\t\t// Create iframe container\n\t\t\tif (!s.theme_advanced_toolbar_container) {\n\t\t\t\tn = DOM.add(tb, 'tr');\n\t\t\t\tn = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});\n\t\t\t}\n\n\t\t\t// Create toolbar container at bottom\n\t\t\tif (lo == 'bottom')\n\t\t\t\tt._addToolbars(tb, o);\n\n\t\t\tif (sl == 'bottom')\n\t\t\t\tt._addStatusBar(tb, o);\n\n\t\t\treturn ic;\n\t\t},\n\n\t\t_rowLayout : function(s, tb, o) {\n\t\t\tvar t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a;\n\n\t\t\tdc = s.theme_advanced_containers_default_class || '';\n\t\t\tda = s.theme_advanced_containers_default_align || 'center';\n\n\t\t\teach(explode(s.theme_advanced_containers || ''), function(c, i) {\n\t\t\t\tvar v = s['theme_advanced_container_' + c] || '';\n\n\t\t\t\tswitch (c.toLowerCase()) {\n\t\t\t\t\tcase 'mceeditor':\n\t\t\t\t\t\tn = DOM.add(tb, 'tr');\n\t\t\t\t\t\tn = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'mceelementpath':\n\t\t\t\t\t\tt._addStatusBar(tb, o);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ta = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();\n\t\t\t\t\t\ta = 'mce' + t._ufirst(a);\n\n\t\t\t\t\t\tn = DOM.add(DOM.add(tb, 'tr'), 'td', {\n\t\t\t\t\t\t\t'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tto = cf.createToolbar(\"toolbar\" + i);\n\t\t\t\t\t\tt._addControls(v, to);\n\t\t\t\t\t\tDOM.setHTML(n, to.renderHTML());\n\t\t\t\t\t\to.deltaHeight -= s.theme_advanced_row_height;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn ic;\n\t\t},\n\n\t\t_addControls : function(v, tb) {\n\t\t\tvar t = this, s = t.settings, di, cf = t.editor.controlManager;\n\n\t\t\tif (s.theme_advanced_disable && !t._disabled) {\n\t\t\t\tdi = {};\n\n\t\t\t\teach(explode(s.theme_advanced_disable), function(v) {\n\t\t\t\t\tdi[v] = 1;\n\t\t\t\t});\n\n\t\t\t\tt._disabled = di;\n\t\t\t} else\n\t\t\t\tdi = t._disabled;\n\n\t\t\teach(explode(v), function(n) {\n\t\t\t\tvar c;\n\n\t\t\t\tif (di && di[n])\n\t\t\t\t\treturn;\n\n\t\t\t\t// Compatiblity with 2.x\n\t\t\t\tif (n == 'tablecontrols') {\n\t\t\t\t\teach([\"table\",\"|\",\"row_props\",\"cell_props\",\"|\",\"row_before\",\"row_after\",\"delete_row\",\"|\",\"col_before\",\"col_after\",\"delete_col\",\"|\",\"split_cells\",\"merge_cells\"], function(n) {\n\t\t\t\t\t\tn = t.createControl(n, cf);\n\n\t\t\t\t\t\tif (n)\n\t\t\t\t\t\t\ttb.add(n);\n\t\t\t\t\t});\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tc = t.createControl(n, cf);\n\n\t\t\t\tif (c)\n\t\t\t\t\ttb.add(c);\n\t\t\t});\n\t\t},\n\n\t\t_addToolbars : function(c, o) {\n\t\t\tvar t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup;\n\n\t\t\ttoolbarGroup = cf.createToolbarGroup('toolbargroup', {\n\t\t\t\t'name': ed.getLang('advanced.toolbar'),\n\t\t\t\t'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar')\n\t\t\t});\n\n\t\t\tt.toolbarGroup = toolbarGroup;\n\n\t\t\ta = s.theme_advanced_toolbar_align.toLowerCase();\n\t\t\ta = 'mce' + t._ufirst(a);\n\n\t\t\tn = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, \"role\":\"presentation\"});\n\n\t\t\t// Create toolbar and add the controls\n\t\t\tfor (i=1; (v = s['theme_advanced_buttons' + i]); i++) {\n\t\t\t\ttb = cf.createToolbar(\"toolbar\" + i, {'class' : 'mceToolbarRow' + i});\n\n\t\t\t\tif (s['theme_advanced_buttons' + i + '_add'])\n\t\t\t\t\tv += ',' + s['theme_advanced_buttons' + i + '_add'];\n\n\t\t\t\tif (s['theme_advanced_buttons' + i + '_add_before'])\n\t\t\t\t\tv = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v;\n\n\t\t\t\tt._addControls(v, tb);\n\t\t\t\ttoolbarGroup.add(tb);\n\n\t\t\t\to.deltaHeight -= s.theme_advanced_row_height;\n\t\t\t}\n\t\t\th.push(toolbarGroup.renderHTML());\n\t\t\th.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang(\"advanced.toolbar_focus\"), onfocus : 'tinyMCE.getInstanceById(\\'' + ed.id + '\\').focus();'}, '<!-- IE -->'));\n\t\t\tDOM.setHTML(n, h.join(''));\n\t\t},\n\n\t\t_addStatusBar : function(tb, o) {\n\t\t\tvar n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;\n\n\t\t\tn = DOM.add(tb, 'tr');\n\t\t\tn = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); \n\t\t\tn = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'});\n\t\t\tif (s.theme_advanced_path) {\n\t\t\t\tDOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path'));\n\t\t\t\tDOM.add(n, 'span', {}, ': ');\n\t\t\t} else {\n\t\t\t\tDOM.add(n, 'span', {}, '&#160;');\n\t\t\t}\n\t\t\t\n\n\t\t\tif (s.theme_advanced_resizing) {\n\t\t\t\tDOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : \"return false;\", 'class' : 'mceResize', tabIndex:\"-1\"});\n\n\t\t\t\tif (s.theme_advanced_resizing_use_cookie) {\n\t\t\t\t\ted.onPostRender.add(function() {\n\t\t\t\t\t\tvar o = Cookie.getHash(\"TinyMCE_\" + ed.id + \"_size\"), c = DOM.get(ed.id + '_tbl');\n\n\t\t\t\t\t\tif (!o)\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\tt.resizeTo(o.cw, o.ch);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\ted.onPostRender.add(function() {\n\t\t\t\t\tEvent.add(ed.id + '_resize', 'click', function(e) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t});\n\n\t\t\t\t\tEvent.add(ed.id + '_resize', 'mousedown', function(e) {\n\t\t\t\t\t\tvar mouseMoveHandler1, mouseMoveHandler2,\n\t\t\t\t\t\t\tmouseUpHandler1, mouseUpHandler2,\n\t\t\t\t\t\t\tstartX, startY, startWidth, startHeight, width, height, ifrElm;\n\n\t\t\t\t\t\tfunction resizeOnMove(e) {\n\t\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t\twidth = startWidth + (e.screenX - startX);\n\t\t\t\t\t\t\theight = startHeight + (e.screenY - startY);\n\n\t\t\t\t\t\t\tt.resizeTo(width, height);\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tfunction endResize(e) {\n\t\t\t\t\t\t\t// Stop listening\n\t\t\t\t\t\t\tEvent.remove(DOM.doc, 'mousemove', mouseMoveHandler1);\n\t\t\t\t\t\t\tEvent.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2);\n\t\t\t\t\t\t\tEvent.remove(DOM.doc, 'mouseup', mouseUpHandler1);\n\t\t\t\t\t\t\tEvent.remove(ed.getDoc(), 'mouseup', mouseUpHandler2);\n\n\t\t\t\t\t\t\twidth = startWidth + (e.screenX - startX);\n\t\t\t\t\t\t\theight = startHeight + (e.screenY - startY);\n\t\t\t\t\t\t\tt.resizeTo(width, height, true);\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t// Get the current rect size\n\t\t\t\t\t\tstartX = e.screenX;\n\t\t\t\t\t\tstartY = e.screenY;\n\t\t\t\t\t\tifrElm = DOM.get(t.editor.id + '_ifr');\n\t\t\t\t\t\tstartWidth = width = ifrElm.clientWidth;\n\t\t\t\t\t\tstartHeight = height = ifrElm.clientHeight;\n\n\t\t\t\t\t\t// Register envent handlers\n\t\t\t\t\t\tmouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove);\n\t\t\t\t\t\tmouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove);\n\t\t\t\t\t\tmouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize);\n\t\t\t\t\t\tmouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\to.deltaHeight -= 21;\n\t\t\tn = tb = null;\n\t\t},\n\n\t\t_updateUndoStatus : function(ed) {\n\t\t\tvar cm = ed.controlManager, um = ed.undoManager;\n\n\t\t\tcm.setDisabled('undo', !um.hasUndo() && !um.typing);\n\t\t\tcm.setDisabled('redo', !um.hasRedo());\n\t\t},\n\n\t\t_nodeChanged : function(ed, cm, n, co, ob) {\n\t\t\tvar t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches;\n\n\t\t\ttinymce.each(t.stateControls, function(c) {\n\t\t\t\tcm.setActive(c, ed.queryCommandState(t.controls[c][1]));\n\t\t\t});\n\n\t\t\tfunction getParent(name) {\n\t\t\t\tvar i, parents = ob.parents, func = name;\n\n\t\t\t\tif (typeof(name) == 'string') {\n\t\t\t\t\tfunc = function(node) {\n\t\t\t\t\t\treturn node.nodeName == name;\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < parents.length; i++) {\n\t\t\t\t\tif (func(parents[i]))\n\t\t\t\t\t\treturn parents[i];\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tcm.setActive('visualaid', ed.hasVisual);\n\t\t\tt._updateUndoStatus(ed);\n\t\t\tcm.setDisabled('outdent', !ed.queryCommandState('Outdent'));\n\n\t\t\tp = getParent('A');\n\t\t\tif (c = cm.get('link')) {\n\t\t\t\tif (!p || !p.name) {\n\t\t\t\t\tc.setDisabled(!p && co);\n\t\t\t\t\tc.setActive(!!p);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (c = cm.get('unlink')) {\n\t\t\t\tc.setDisabled(!p && co);\n\t\t\t\tc.setActive(!!p && !p.name);\n\t\t\t}\n\n\t\t\tif (c = cm.get('anchor')) {\n\t\t\t\tc.setActive(!co && !!p && p.name);\n\t\t\t}\n\n\t\t\tp = getParent('IMG');\n\t\t\tif (c = cm.get('image'))\n\t\t\t\tc.setActive(!co && !!p && n.className.indexOf('mceItem') == -1);\n\n\t\t\tif (c = cm.get('styleselect')) {\n\t\t\t\tt._importClasses();\n\n\t\t\t\tformatNames = [];\n\t\t\t\teach(c.items, function(item) {\n\t\t\t\t\tformatNames.push(item.value);\n\t\t\t\t});\n\n\t\t\t\tmatches = ed.formatter.matchAll(formatNames);\n\t\t\t\tc.select(matches[0]);\n\t\t\t}\n\n\t\t\tif (c = cm.get('formatselect')) {\n\t\t\t\tp = getParent(DOM.isBlock);\n\n\t\t\t\tif (p)\n\t\t\t\t\tc.select(p.nodeName.toLowerCase());\n\t\t\t}\n\n\t\t\t// Find out current fontSize, fontFamily and fontClass\n\t\t\tgetParent(function(n) {\n\t\t\t\tif (n.nodeName === 'SPAN') {\n\t\t\t\t\tif (!cl && n.className)\n\t\t\t\t\t\tcl = n.className;\n\t\t\t\t}\n\n\t\t\t\tif (ed.dom.is(n, s.theme_advanced_font_selector)) {\n\t\t\t\t\tif (!fz && n.style.fontSize)\n\t\t\t\t\t\tfz = n.style.fontSize;\n\n\t\t\t\t\tif (!fn && n.style.fontFamily)\n\t\t\t\t\t\tfn = n.style.fontFamily.replace(/[\\\"\\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();\n\t\t\t\t\t\n\t\t\t\t\tif (!fc && n.style.color)\n\t\t\t\t\t\tfc = n.style.color;\n\n\t\t\t\t\tif (!bc && n.style.backgroundColor)\n\t\t\t\t\t\tbc = n.style.backgroundColor;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\tif (c = cm.get('fontselect')) {\n\t\t\t\tc.select(function(v) {\n\t\t\t\t\treturn v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Select font size\n\t\t\tif (c = cm.get('fontsizeselect')) {\n\t\t\t\t// Use computed style\n\t\t\t\tif (s.theme_advanced_runtime_fontsize && !fz && !cl)\n\t\t\t\t\tfz = ed.dom.getStyle(n, 'fontSize', true);\n\n\t\t\t\tc.select(function(v) {\n\t\t\t\t\tif (v.fontSize && v.fontSize === fz)\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t\tif (v['class'] && v['class'] === cl)\n\t\t\t\t\t\treturn true;\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tif (s.theme_advanced_show_current_color) {\n\t\t\t\tfunction updateColor(controlId, color) {\n\t\t\t\t\tif (c = cm.get(controlId)) {\n\t\t\t\t\t\tif (!color)\n\t\t\t\t\t\t\tcolor = c.settings.default_color;\n\t\t\t\t\t\tif (color !== c.value) {\n\t\t\t\t\t\t\tc.displayColor(color);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tupdateColor('forecolor', fc);\n\t\t\t\tupdateColor('backcolor', bc);\n\t\t\t}\n\n\t\t\tif (s.theme_advanced_show_current_color) {\n\t\t\t\tfunction updateColor(controlId, color) {\n\t\t\t\t\tif (c = cm.get(controlId)) {\n\t\t\t\t\t\tif (!color)\n\t\t\t\t\t\t\tcolor = c.settings.default_color;\n\t\t\t\t\t\tif (color !== c.value) {\n\t\t\t\t\t\t\tc.displayColor(color);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tupdateColor('forecolor', fc);\n\t\t\t\tupdateColor('backcolor', bc);\n\t\t\t}\n\n\t\t\tif (s.theme_advanced_path && s.theme_advanced_statusbar_location) {\n\t\t\t\tp = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});\n\n\t\t\t\tif (t.statusKeyboardNavigation) {\n\t\t\t\t\tt.statusKeyboardNavigation.destroy();\n\t\t\t\t\tt.statusKeyboardNavigation = null;\n\t\t\t\t}\n\n\t\t\t\tDOM.setHTML(p, '');\n\n\t\t\t\tgetParent(function(n) {\n\t\t\t\t\tvar na = n.nodeName.toLowerCase(), u, pi, ti = '';\n\n\t\t\t\t\t// Ignore non element and bogus/hidden elements\n\t\t\t\t\tif (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t// Handle prefix\n\t\t\t\t\tif (tinymce.isIE && n.scopeName !== 'HTML')\n\t\t\t\t\t\tna = n.scopeName + ':' + na;\n\n\t\t\t\t\t// Remove internal prefix\n\t\t\t\t\tna = na.replace(/mce\\:/g, '');\n\n\t\t\t\t\t// Handle node name\n\t\t\t\t\tswitch (na) {\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\t\tna = 'strong';\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'i':\n\t\t\t\t\t\t\tna = 'em';\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'img':\n\t\t\t\t\t\t\tif (v = DOM.getAttrib(n, 'src'))\n\t\t\t\t\t\t\t\tti += 'src: ' + v + ' ';\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\t\tif (v = DOM.getAttrib(n, 'name')) {\n\t\t\t\t\t\t\t\tti += 'name: ' + v + ' ';\n\t\t\t\t\t\t\t\tna += '#' + v;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (v = DOM.getAttrib(n, 'href'))\n\t\t\t\t\t\t\t\tti += 'href: ' + v + ' ';\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'font':\n\t\t\t\t\t\t\tif (v = DOM.getAttrib(n, 'face'))\n\t\t\t\t\t\t\t\tti += 'font: ' + v + ' ';\n\n\t\t\t\t\t\t\tif (v = DOM.getAttrib(n, 'size'))\n\t\t\t\t\t\t\t\tti += 'size: ' + v + ' ';\n\n\t\t\t\t\t\t\tif (v = DOM.getAttrib(n, 'color'))\n\t\t\t\t\t\t\t\tti += 'color: ' + v + ' ';\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'span':\n\t\t\t\t\t\t\tif (v = DOM.getAttrib(n, 'style'))\n\t\t\t\t\t\t\t\tti += 'style: ' + v + ' ';\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (v = DOM.getAttrib(n, 'id'))\n\t\t\t\t\t\tti += 'id: ' + v + ' ';\n\n\t\t\t\t\tif (v = n.className) {\n\t\t\t\t\t\tv = v.replace(/\\b\\s*(webkit|mce|Apple-)\\w+\\s*\\b/g, '')\n\n\t\t\t\t\t\tif (v) {\n\t\t\t\t\t\t\tti += 'class: ' + v + ' ';\n\n\t\t\t\t\t\t\tif (DOM.isBlock(n) || na == 'img' || na == 'span')\n\t\t\t\t\t\t\t\tna += '.' + v;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tna = na.replace(/(html:)/g, '');\n\t\t\t\t\tna = {name : na, node : n, title : ti};\n\t\t\t\t\tt.onResolveName.dispatch(t, na);\n\t\t\t\t\tti = na.title;\n\t\t\t\t\tna = na.name;\n\n\t\t\t\t\t//u = \"javascript:tinymce.EditorManager.get('\" + ed.id + \"').theme._sel('\" + (de++) + \"');\";\n\t\t\t\t\tpi = DOM.create('a', {'href' : \"javascript:;\", role: 'button', onmousedown : \"return false;\", title : ti, 'class' : 'mcePath_' + (de++)}, na);\n\n\t\t\t\t\tif (p.hasChildNodes()) {\n\t\t\t\t\t\tp.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\\u00a0\\u00bb '), p.firstChild);\n\t\t\t\t\t\tp.insertBefore(pi, p.firstChild);\n\t\t\t\t\t} else\n\t\t\t\t\t\tp.appendChild(pi);\n\t\t\t\t}, ed.getBody());\n\n\t\t\t\tif (DOM.select('a', p).length > 0) {\n\t\t\t\t\tt.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({\n\t\t\t\t\t\troot: ed.id + \"_path_row\",\n\t\t\t\t\t\titems: DOM.select('a', p),\n\t\t\t\t\t\texcludeFromTabOrder: true,\n\t\t\t\t\t\tonCancel: function() {\n\t\t\t\t\t\t\ted.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, DOM);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Commands gets called by execCommand\n\n\t\t_sel : function(v) {\n\t\t\tthis.editor.execCommand('mceSelectNodeDepth', false, v);\n\t\t},\n\n\t\t_mceInsertAnchor : function(ui, v) {\n\t\t\tvar ed = this.editor;\n\n\t\t\ted.windowManager.open({\n\t\t\t\turl : this.url + '/anchor.htm',\n\t\t\t\twidth : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)),\n\t\t\t\theight : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)),\n\t\t\t\tinline : true\n\t\t\t}, {\n\t\t\t\ttheme_url : this.url\n\t\t\t});\n\t\t},\n\n\t\t_mceCharMap : function() {\n\t\t\tvar ed = this.editor;\n\n\t\t\ted.windowManager.open({\n\t\t\t\turl : this.url + '/charmap.htm',\n\t\t\t\twidth : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),\n\t\t\t\theight : 260 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)),\n\t\t\t\tinline : true\n\t\t\t}, {\n\t\t\t\ttheme_url : this.url\n\t\t\t});\n\t\t},\n\n\t\t_mceHelp : function() {\n\t\t\tvar ed = this.editor;\n\n\t\t\ted.windowManager.open({\n\t\t\t\turl : this.url + '/about.htm',\n\t\t\t\twidth : 480,\n\t\t\t\theight : 380,\n\t\t\t\tinline : true\n\t\t\t}, {\n\t\t\t\ttheme_url : this.url\n\t\t\t});\n\t\t},\n\n\t\t_mceShortcuts : function() {\n\t\t\tvar ed = this.editor;\n\t\t\ted.windowManager.open({\n\t\t\t\turl: this.url + '/shortcuts.htm',\n\t\t\t\twidth: 480,\n\t\t\t\theight: 380,\n\t\t\t\tinline: true\n\t\t\t}, {\n\t\t\t\ttheme_url: this.url\n\t\t\t});\n\t\t},\n\n\t\t_mceColorPicker : function(u, v) {\n\t\t\tvar ed = this.editor;\n\n\t\t\tv = v || {};\n\n\t\t\ted.windowManager.open({\n\t\t\t\turl : this.url + '/color_picker.htm',\n\t\t\t\twidth : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)),\n\t\t\t\theight : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)),\n\t\t\t\tclose_previous : false,\n\t\t\t\tinline : true\n\t\t\t}, {\n\t\t\t\tinput_color : v.color,\n\t\t\t\tfunc : v.func,\n\t\t\t\ttheme_url : this.url\n\t\t\t});\n\t\t},\n\n\t\t_mceCodeEditor : function(ui, val) {\n\t\t\tvar ed = this.editor;\n\n\t\t\ted.windowManager.open({\n\t\t\t\turl : this.url + '/source_editor.htm',\n\t\t\t\twidth : parseInt(ed.getParam(\"theme_advanced_source_editor_width\", 720)),\n\t\t\t\theight : parseInt(ed.getParam(\"theme_advanced_source_editor_height\", 580)),\n\t\t\t\tinline : true,\n\t\t\t\tresizable : true,\n\t\t\t\tmaximizable : true\n\t\t\t}, {\n\t\t\t\ttheme_url : this.url\n\t\t\t});\n\t\t},\n\n\t\t_mceImage : function(ui, val) {\n\t\t\tvar ed = this.editor;\n\n\t\t\t// Internal image object like a flash placeholder\n\t\t\tif (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1)\n\t\t\t\treturn;\n\n\t\t\ted.windowManager.open({\n\t\t\t\turl : this.url + '/image.htm',\n\t\t\t\twidth : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)),\n\t\t\t\theight : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)),\n\t\t\t\tinline : true\n\t\t\t}, {\n\t\t\t\ttheme_url : this.url\n\t\t\t});\n\t\t},\n\n\t\t_mceLink : function(ui, val) {\n\t\t\tvar ed = this.editor;\n\n\t\t\ted.windowManager.open({\n\t\t\t\turl : this.url + '/link.htm',\n\t\t\t\twidth : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)),\n\t\t\t\theight : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)),\n\t\t\t\tinline : true\n\t\t\t}, {\n\t\t\t\ttheme_url : this.url\n\t\t\t});\n\t\t},\n\n\t\t_mceNewDocument : function() {\n\t\t\tvar ed = this.editor;\n\n\t\t\ted.windowManager.confirm('advanced.newdocument', function(s) {\n\t\t\t\tif (s)\n\t\t\t\t\ted.execCommand('mceSetContent', false, '');\n\t\t\t});\n\t\t},\n\n\t\t_mceForeColor : function() {\n\t\t\tvar t = this;\n\n\t\t\tthis._mceColorPicker(0, {\n\t\t\t\tcolor: t.fgColor,\n\t\t\t\tfunc : function(co) {\n\t\t\t\t\tt.fgColor = co;\n\t\t\t\t\tt.editor.execCommand('ForeColor', false, co);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t_mceBackColor : function() {\n\t\t\tvar t = this;\n\n\t\t\tthis._mceColorPicker(0, {\n\t\t\t\tcolor: t.bgColor,\n\t\t\t\tfunc : function(co) {\n\t\t\t\t\tt.bgColor = co;\n\t\t\t\t\tt.editor.execCommand('HiliteColor', false, co);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t_ufirst : function(s) {\n\t\t\treturn s.substring(0, 1).toUpperCase() + s.substring(1);\n\t\t}\n\t});\n\n\ttinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);\n}(tinymce));\n","Magento_Tinymce3/tiny_mce/themes/advanced/editor_template.js":"(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack(\"advanced\");e.create(\"tinymce.themes.AdvancedTheme\",{sizes:[8,10,12,14,18,24,36],controls:{bold:[\"bold_desc\",\"Bold\"],italic:[\"italic_desc\",\"Italic\"],underline:[\"underline_desc\",\"Underline\"],strikethrough:[\"striketrough_desc\",\"Strikethrough\"],justifyleft:[\"justifyleft_desc\",\"JustifyLeft\"],justifycenter:[\"justifycenter_desc\",\"JustifyCenter\"],justifyright:[\"justifyright_desc\",\"JustifyRight\"],justifyfull:[\"justifyfull_desc\",\"JustifyFull\"],bullist:[\"bullist_desc\",\"InsertUnorderedList\"],numlist:[\"numlist_desc\",\"InsertOrderedList\"],outdent:[\"outdent_desc\",\"Outdent\"],indent:[\"indent_desc\",\"Indent\"],cut:[\"cut_desc\",\"Cut\"],copy:[\"copy_desc\",\"Copy\"],paste:[\"paste_desc\",\"Paste\"],undo:[\"undo_desc\",\"Undo\"],redo:[\"redo_desc\",\"Redo\"],link:[\"link_desc\",\"mceLink\"],unlink:[\"unlink_desc\",\"unlink\"],image:[\"image_desc\",\"mceImage\"],cleanup:[\"cleanup_desc\",\"mceCleanup\"],help:[\"help_desc\",\"mceHelp\"],code:[\"code_desc\",\"mceCodeEditor\"],hr:[\"hr_desc\",\"InsertHorizontalRule\"],removeformat:[\"removeformat_desc\",\"RemoveFormat\"],sub:[\"sub_desc\",\"subscript\"],sup:[\"sup_desc\",\"superscript\"],forecolor:[\"forecolor_desc\",\"ForeColor\"],forecolorpicker:[\"forecolor_desc\",\"mceForeColor\"],backcolor:[\"backcolor_desc\",\"HiliteColor\"],backcolorpicker:[\"backcolor_desc\",\"mceBackColor\"],charmap:[\"charmap_desc\",\"mceCharMap\"],visualaid:[\"visualaid_desc\",\"mceToggleVisualAid\"],anchor:[\"anchor_desc\",\"mceInsertAnchor\"],newdocument:[\"newdocument_desc\",\"mceNewDocument\"],blockquote:[\"blockquote_desc\",\"mceBlockQuote\"]},stateControls:[\"bold\",\"italic\",\"underline\",\"strikethrough\",\"bullist\",\"numlist\",\"justifyleft\",\"justifycenter\",\"justifyright\",\"justifyfull\",\"sub\",\"sup\",\"blockquote\"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);j.forcedHighContrastMode=j.settings.detect_highcontrast&&l._isHighContrast();j.settings.skin=j.forcedHighContrastMode?\"highcontrast\":j.settings.skin;l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:\"bottom\",theme_advanced_buttons1:\"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect\",theme_advanced_buttons2:\"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code\",theme_advanced_buttons3:\"hr,removeformat,visualaid,|,sub,sup,|,charmap\",theme_advanced_blockformats:\"p,address,pre,h1,h2,h3,h4,h5,h6\",theme_advanced_toolbar_align:\"center\",theme_advanced_fonts:\"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats\",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:\"1,2,3,4,5,6,7\",theme_advanced_font_selector:\"span\",theme_advanced_show_current_color:0,readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values=\"8pt,10pt,12pt,14pt,18pt,24pt,36pt\"}if(e.is(m.theme_advanced_font_sizes,\"string\")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||\"\");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam(\"theme_advanced_font_sizes\",\"\",\"hash\"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+\" (\"+l.sizes[q-1]+\"pt)\";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+\"pt\")}if(/^\\s*\\./.test(q)){o=q.replace(/\\./g,\"\")}n[p]=o?{\"class\":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!=\"none\"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location==\"none\"){m.theme_advanced_statusbar_location=0}if(j.settings.content_css!==false){j.contentCSS.push(j.baseURI.toAbsolute(k+\"/skins/\"+j.settings.skin+\"/content.css\"))}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l);j.onKeyUp.add(l._updateUndoStatus,l);j.onMouseUp.add(l._updateUndoStatus,l);j.dom.bind(j.dom.getRoot(),\"dragend\",function(){l._updateUndoStatus(j)})}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create(\"DIV\",{style:\"position:relative\"}),s.firstChild);p=d.get(q.id+\"_tbl\");d.add(s,\"div\",{id:t+\"_blocker\",\"class\":\"mceBlocker\",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,\"div\",{id:t+\"_progress\",\"class\":\"mceProgress\",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+\"_blocker\");d.remove(t+\"_progress\");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+\"/skins/\"+j.settings.skin+\"/ui.css\");if(m.skin_variant){d.loadCSS(k+\"/skins/\"+j.settings.skin+\"/ui_\"+m.skin_variant+\".css\")}},_isHighContrast:function(){var i,j=d.add(d.getRoot(),\"div\",{style:\"background-color: rgb(171,239,86);\"});i=(d.getStyle(j,\"background-color\",true)+\"\").toLowerCase().replace(/ /g,\"\");d.remove(j);return i!=\"rgb(171,239,86)\"&&i!=\"#abef56\"},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case\"styleselect\":return this._createStyleSelect();case\"formatselect\":return this._createBlockFormats();case\"fontselect\":return this._createFontSelect();case\"fontsizeselect\":return this._createFontSizeSelect();case\"forecolor\":return this._createForeColorMenu();case\"backcolor\":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:\"advanced.\"+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this[\"_\"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get(\"styleselect\");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m=\"style_\"+l;i.formatter.register(m,{inline:\"span\",attributes:{\"class\":n[\"class\"]},selector:\"*\"});j.add(n[\"class\"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox(\"styleselect\",{title:\"advanced.style_select\",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(!o||p[0]==o){if(p[0]){i.formatter.remove(p[0])}}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam(\"style_formats\");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||\"style_\"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam(\"theme_advanced_styles\",\"\",\"hash\"),function(r,q){var p;if(r){p=\"style_\"+(o++);i.formatter.register(p,{inline:\"span\",classes:r,selector:\"*\"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+\"_text\",\"focus\",k._importClasses,k);b.add(p.id+\"_text\",\"mousedown\",k._importClasses,k);b.add(p.id+\"_open\",\"focus\",k._importClasses,k);b.add(p.id+\"_open\",\"mousedown\",k._importClasses,k)}else{b.add(p.id,\"focus\",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox(\"fontselect\",{title:\"advanced.fontdefault\",onselect:function(l){var m=k.items[k.selectedIndex];if(!l&&m){i.execCommand(\"FontName\",false,m.value);return}i.execCommand(\"FontName\",false,l);k.select(function(n){return l==n});if(m&&m.value==l){k.select(null)}return false}});if(k){f(i.getParam(\"theme_advanced_fonts\",j.settings.theme_advanced_fonts,\"hash\"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf(\"dings\")==-1?\"font-family:\"+m:\"\"})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox(\"fontsizeselect\",{title:\"advanced.font_size\",onselect:function(i){var o=n.items[n.selectedIndex];if(!i&&o){o=o.value;if(o[\"class\"]){k.formatter.toggle(\"fontsize_class\",{value:o[\"class\"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand(\"FontSize\",false,o.fontSize)}return}if(i[\"class\"]){k.focus();k.undoManager.add();k.formatter.toggle(\"fontsize_class\",{value:i[\"class\"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand(\"FontSize\",false,i.fontSize)}n.select(function(p){return i==p});if(o&&(o.value.fontSize==i.fontSize||o.value[\"class\"]==i[\"class\"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+\"pt\"}n.add(i,o,{style:\"font-size:\"+p,\"class\":\"mceFontSize\"+(l++)+(\" \"+(o[\"class\"]||\"\"))})})}return n},_createBlockFormats:function(){var k,i={p:\"advanced.paragraph\",address:\"advanced.address\",pre:\"advanced.pre\",h1:\"advanced.h1\",h2:\"advanced.h2\",h3:\"advanced.h3\",h4:\"advanced.h4\",h5:\"advanced.h5\",h6:\"advanced.h6\",div:\"advanced.div\",blockquote:\"advanced.blockquote\",code:\"advanced.code\",dt:\"advanced.dt\",dd:\"advanced.dd\",samp:\"advanced.samp\"},j=this;k=j.editor.controlManager.createListBox(\"formatselect\",{title:\"advanced.block\",onselect:function(l){j.editor.execCommand(\"FormatBlock\",false,l);return false}});if(k){f(j.editor.getParam(\"theme_advanced_blockformats\",j.settings.theme_advanced_blockformats,\"hash\"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{\"class\":\"mce_formatPreview mce_\"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title=\"advanced.forecolor_desc\";l.cmd=\"ForeColor\";l.scope=this;m=j.editor.controlManager.createColorSplitButton(\"forecolor\",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title=\"advanced.backcolor_desc\";l.cmd=\"HiliteColor\";l.scope=this;m=j.editor.controlManager.createColorSplitButton(\"backcolor\",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;if(r.settings){r.settings.aria_label=w.aria_label+r.getLang(\"advanced.help_shortcut\")}m=j=d.create(\"span\",{role:\"application\",\"aria-labelledby\":r.id+\"_voice\",id:r.id+\"_parent\",\"class\":\"mceEditor \"+r.settings.skin+\"Skin\"+(w.skin_variant?\" \"+r.settings.skin+\"Skin\"+v._ufirst(w.skin_variant):\"\")});d.add(m,\"span\",{\"class\":\"mceVoiceLabel\",style:\"display:none;\",id:r.id+\"_voice\"},w.aria_label);if(!d.boxModel){m=d.add(m,\"div\",{\"class\":\"mceOldBoxModel\"})}m=u=d.add(m,\"table\",{role:\"presentation\",id:r.id+\"_tbl\",\"class\":\"mceLayout\",cellSpacing:0,cellPadding:0});m=q=d.add(m,\"tbody\");switch((w.theme_advanced_layout_manager||\"\").toLowerCase()){case\"rowlayout\":l=v._rowLayout(w,q,k);break;case\"customlayout\":l=r.execCallback(\"theme_advanced_custom_layout\",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=u.rows;d.addClass(i[0],\"mceFirst\");d.addClass(i[i.length-1],\"mceLast\");f(d.select(\"tr\",q),function(o){d.addClass(o.firstChild,\"mceFirst\");d.addClass(o.childNodes[o.childNodes.length-1],\"mceLast\")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+\"_path_row\",\"click\",function(n){n=n.target;if(n.nodeName==\"A\"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,\"$1\"));return b.cancel(n)}});if(!r.getParam(\"accessibility_focus\")){b.add(d.add(j,\"a\",{href:\"#\"},\"<!-- IE -->\"),\"focus\",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location==\"external\"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;r.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(e.isWebKit){window.focus()}v.toolbarGroup.focus();return b.cancel(n)}else{if(n.keyCode===o){d.get(p.id+\"_path_row\").focus();return b.cancel(n)}}}});r.addShortcut(\"alt+0\",\"\",\"mceShortcuts\",v);return{iframeContainer:l,editorContainer:r.id+\"_parent\",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:\"Advanced theme\",author:\"Moxiecode Systems AB\",authorurl:\"http://tinymce.moxiecode.com\",version:e.majorVersion+\".\"+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+\"_ifr\");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,m,k){var j=this.editor,l=this.settings,n=d.get(j.id+\"_tbl\"),o=d.get(j.id+\"_ifr\");i=Math.max(l.theme_advanced_resizing_min_width||100,i);m=Math.max(l.theme_advanced_resizing_min_height||100,m);i=Math.min(l.theme_advanced_resizing_max_width||65535,i);m=Math.min(l.theme_advanced_resizing_max_height||65535,m);d.setStyle(n,\"height\",\"\");d.setStyle(o,\"height\",m);if(l.theme_advanced_resize_horizontal){d.setStyle(n,\"width\",\"\");d.setStyle(o,\"width\",i);if(i<n.clientWidth){i=n.clientWidth;d.setStyle(o,\"width\",n.clientWidth)}}if(k&&l.theme_advanced_resizing_use_cookie){a.setHash(\"TinyMCE_\"+j.id+\"_size\",{cw:i,ch:m})}},destroy:function(){var i=this.editor.id;b.clear(i+\"_resize\");b.clear(i+\"_path_row\");b.clear(i+\"_external_close\")},_simpleLayout:function(y,r,k,i){var x=this,u=x.editor,v=y.theme_advanced_toolbar_location,m=y.theme_advanced_statusbar_location,l,j,q,w;if(y.readonly){l=d.add(r,\"tr\");l=j=d.add(l,\"td\",{\"class\":\"mceIframeContainer\"});return j}if(v==\"top\"){x._addToolbars(r,k)}if(v==\"external\"){l=w=d.create(\"div\",{style:\"position:relative\"});l=d.add(l,\"div\",{id:u.id+\"_external\",\"class\":\"mceExternalToolbar\"});d.add(l,\"a\",{id:u.id+\"_external_close\",href:\"javascript:;\",\"class\":\"mceExternalClose\"});l=d.add(l,\"table\",{id:u.id+\"_tblext\",cellSpacing:0,cellPadding:0});q=d.add(l,\"tbody\");if(i.firstChild.className==\"mceOldBoxModel\"){i.firstChild.appendChild(w)}else{i.insertBefore(w,i.firstChild)}x._addToolbars(q,k);u.onMouseUp.add(function(){var o=d.get(u.id+\"_external\");d.show(o);d.hide(g);var n=b.add(u.id+\"_external_close\",\"click\",function(){d.hide(u.id+\"_external\");b.remove(u.id+\"_external_close\",\"click\",n)});d.show(o);d.setStyle(o,\"top\",0-d.getRect(u.id+\"_tblext\").h-1);d.hide(o);d.show(o);o.style.filter=\"\";g=u.id+\"_external\";o=null})}if(m==\"top\"){x._addStatusBar(r,k)}if(!y.theme_advanced_toolbar_container){l=d.add(r,\"tr\");l=j=d.add(l,\"td\",{\"class\":\"mceIframeContainer\"})}if(v==\"bottom\"){x._addToolbars(r,k)}if(m==\"bottom\"){x._addStatusBar(r,k)}return j},_rowLayout:function(w,m,k){var v=this,p=v.editor,u,x,i=p.controlManager,l,j,r,q;u=w.theme_advanced_containers_default_class||\"\";x=w.theme_advanced_containers_default_align||\"center\";f(c(w.theme_advanced_containers||\"\"),function(s,o){var n=w[\"theme_advanced_container_\"+s]||\"\";switch(s.toLowerCase()){case\"mceeditor\":l=d.add(m,\"tr\");l=j=d.add(l,\"td\",{\"class\":\"mceIframeContainer\"});break;case\"mceelementpath\":v._addStatusBar(m,k);break;default:q=(w[\"theme_advanced_container_\"+s+\"_align\"]||x).toLowerCase();q=\"mce\"+v._ufirst(q);l=d.add(d.add(m,\"tr\"),\"td\",{\"class\":\"mceToolbar \"+(w[\"theme_advanced_container_\"+s+\"_class\"]||u)+\" \"+q||x});r=i.createToolbar(\"toolbar\"+o);v._addControls(n,r);d.setHTML(l,r.renderHTML());k.deltaHeight-=w.theme_advanced_row_height}});return j},_addControls:function(j,i){var k=this,l=k.settings,m,n=k.editor.controlManager;if(l.theme_advanced_disable&&!k._disabled){m={};f(c(l.theme_advanced_disable),function(o){m[o]=1});k._disabled=m}else{m=k._disabled}f(c(j),function(p){var o;if(m&&m[p]){return}if(p==\"tablecontrols\"){f([\"table\",\"|\",\"row_props\",\"cell_props\",\"|\",\"row_before\",\"row_after\",\"delete_row\",\"|\",\"col_before\",\"col_after\",\"delete_col\",\"|\",\"split_cells\",\"merge_cells\"],function(q){q=k.createControl(q,n);if(q){i.add(q)}});return}o=k.createControl(p,n);if(o){i.add(o)}})},_addToolbars:function(x,k){var A=this,p,m,r=A.editor,B=A.settings,z,j=r.controlManager,u,l,q=[],y,w;w=j.createToolbarGroup(\"toolbargroup\",{name:r.getLang(\"advanced.toolbar\"),tab_focus_toolbar:r.getParam(\"theme_advanced_tab_focus_toolbar\")});A.toolbarGroup=w;y=B.theme_advanced_toolbar_align.toLowerCase();y=\"mce\"+A._ufirst(y);l=d.add(d.add(x,\"tr\",{role:\"presentation\"}),\"td\",{\"class\":\"mceToolbar \"+y,role:\"presentation\"});for(p=1;(z=B[\"theme_advanced_buttons\"+p]);p++){m=j.createToolbar(\"toolbar\"+p,{\"class\":\"mceToolbarRow\"+p});if(B[\"theme_advanced_buttons\"+p+\"_add\"]){z+=\",\"+B[\"theme_advanced_buttons\"+p+\"_add\"]}if(B[\"theme_advanced_buttons\"+p+\"_add_before\"]){z=B[\"theme_advanced_buttons\"+p+\"_add_before\"]+\",\"+z}A._addControls(z,m);w.add(m);k.deltaHeight-=B.theme_advanced_row_height}q.push(w.renderHTML());q.push(d.createHTML(\"a\",{href:\"#\",accesskey:\"z\",title:r.getLang(\"advanced.toolbar_focus\"),onfocus:\"tinyMCE.getInstanceById('\"+r.id+\"').focus();\"},\"<!-- IE -->\"));d.setHTML(l,q.join(\"\"))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,\"tr\");k=l=d.add(k,\"td\",{\"class\":\"mceStatusbar\"});k=d.add(k,\"div\",{id:p.id+\"_path_row\",role:\"group\",\"aria-labelledby\":p.id+\"_path_voice\"});if(w.theme_advanced_path){d.add(k,\"span\",{id:p.id+\"_path_voice\"},p.translate(\"advanced.path\"));d.add(k,\"span\",{},\": \")}else{d.add(k,\"span\",{},\"&#160;\")}if(w.theme_advanced_resizing){d.add(l,\"a\",{id:p.id+\"_resize\",href:\"javascript:;\",onclick:\"return false;\",\"class\":\"mceResize\",tabIndex:\"-1\"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash(\"TinyMCE_\"+p.id+\"_size\"),r=d.get(p.id+\"_tbl\");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+\"_resize\",\"click\",function(n){n.preventDefault()});b.add(p.id+\"_resize\",\"mousedown\",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){G.preventDefault();n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,\"mousemove\",t);b.remove(p.getDoc(),\"mousemove\",r);b.remove(d.doc,\"mouseup\",s);b.remove(p.getDoc(),\"mouseup\",o);n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E,true)}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+\"_ifr\");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,\"mousemove\",y);r=b.add(p.getDoc(),\"mousemove\",y);s=b.add(d.doc,\"mouseup\",B);o=b.add(p.getDoc(),\"mouseup\",B)})})}j.deltaHeight-=21;k=m=null},_updateUndoStatus:function(j){var i=j.controlManager,k=j.undoManager;i.setDisabled(\"undo\",!k.hasUndo()&&!k.typing);i.setDisabled(\"redo\",!k.hasRedo())},_nodeChanged:function(m,r,D,q,E){var y=this,C,F=0,x,G,z=y.settings,w,k,u,B,l,j,i;e.each(y.stateControls,function(n){r.setActive(n,m.queryCommandState(y.controls[n][1]))});function o(p){var s,n=E.parents,t=p;if(typeof(p)==\"string\"){t=function(v){return v.nodeName==p}}for(s=0;s<n.length;s++){if(t(n[s])){return n[s]}}}r.setActive(\"visualaid\",m.hasVisual);y._updateUndoStatus(m);r.setDisabled(\"outdent\",!m.queryCommandState(\"Outdent\"));C=o(\"A\");if(G=r.get(\"link\")){if(!C||!C.name){G.setDisabled(!C&&q);G.setActive(!!C)}}if(G=r.get(\"unlink\")){G.setDisabled(!C&&q);G.setActive(!!C&&!C.name)}if(G=r.get(\"anchor\")){G.setActive(!q&&!!C&&C.name)}C=o(\"IMG\");if(G=r.get(\"image\")){G.setActive(!q&&!!C&&D.className.indexOf(\"mceItem\")==-1)}if(G=r.get(\"styleselect\")){y._importClasses();j=[];f(G.items,function(n){j.push(n.value)});i=m.formatter.matchAll(j);G.select(i[0])}if(G=r.get(\"formatselect\")){C=o(d.isBlock);if(C){G.select(C.nodeName.toLowerCase())}}o(function(p){if(p.nodeName===\"SPAN\"){if(!w&&p.className){w=p.className}}if(m.dom.is(p,z.theme_advanced_font_selector)){if(!k&&p.style.fontSize){k=p.style.fontSize}if(!u&&p.style.fontFamily){u=p.style.fontFamily.replace(/[\\\"\\']+/g,\"\").replace(/^([^,]+).*/,\"$1\").toLowerCase()}if(!B&&p.style.color){B=p.style.color}if(!l&&p.style.backgroundColor){l=p.style.backgroundColor}}return false});if(G=r.get(\"fontselect\")){G.select(function(n){return n.replace(/^([^,]+).*/,\"$1\").toLowerCase()==u})}if(G=r.get(\"fontsizeselect\")){if(z.theme_advanced_runtime_fontsize&&!k&&!w){k=m.dom.getStyle(D,\"fontSize\",true)}G.select(function(n){if(n.fontSize&&n.fontSize===k){return true}if(n[\"class\"]&&n[\"class\"]===w){return true}})}if(z.theme_advanced_show_current_color){function A(p,n){if(G=r.get(p)){if(!n){n=G.settings.default_color}if(n!==G.value){G.displayColor(n)}}}A(\"forecolor\",B);A(\"backcolor\",l)}if(z.theme_advanced_show_current_color){function A(p,n){if(G=r.get(p)){if(!n){n=G.settings.default_color}if(n!==G.value){G.displayColor(n)}}}A(\"forecolor\",B);A(\"backcolor\",l)}if(z.theme_advanced_path&&z.theme_advanced_statusbar_location){C=d.get(m.id+\"_path\")||d.add(m.id+\"_path_row\",\"span\",{id:m.id+\"_path\"});if(y.statusKeyboardNavigation){y.statusKeyboardNavigation.destroy();y.statusKeyboardNavigation=null}d.setHTML(C,\"\");o(function(H){var p=H.nodeName.toLowerCase(),s,v,t=\"\";if(H.nodeType!=1||p===\"br\"||H.getAttribute(\"data-mce-bogus\")||d.hasClass(H,\"mceItemHidden\")||d.hasClass(H,\"mceItemRemoved\")){return}if(e.isIE&&H.scopeName!==\"HTML\"){p=H.scopeName+\":\"+p}p=p.replace(/mce\\:/g,\"\");switch(p){case\"b\":p=\"strong\";break;case\"i\":p=\"em\";break;case\"img\":if(x=d.getAttrib(H,\"src\")){t+=\"src: \"+x+\" \"}break;case\"a\":if(x=d.getAttrib(H,\"name\")){t+=\"name: \"+x+\" \";p+=\"#\"+x}if(x=d.getAttrib(H,\"href\")){t+=\"href: \"+x+\" \"}break;case\"font\":if(x=d.getAttrib(H,\"face\")){t+=\"font: \"+x+\" \"}if(x=d.getAttrib(H,\"size\")){t+=\"size: \"+x+\" \"}if(x=d.getAttrib(H,\"color\")){t+=\"color: \"+x+\" \"}break;case\"span\":if(x=d.getAttrib(H,\"style\")){t+=\"style: \"+x+\" \"}break}if(x=d.getAttrib(H,\"id\")){t+=\"id: \"+x+\" \"}if(x=H.className){x=x.replace(/\\b\\s*(webkit|mce|Apple-)\\w+\\s*\\b/g,\"\");if(x){t+=\"class: \"+x+\" \";if(d.isBlock(H)||p==\"img\"||p==\"span\"){p+=\".\"+x}}}p=p.replace(/(html:)/g,\"\");p={name:p,node:H,title:t};y.onResolveName.dispatch(y,p);t=p.title;p=p.name;v=d.create(\"a\",{href:\"javascript:;\",role:\"button\",onmousedown:\"return false;\",title:t,\"class\":\"mcePath_\"+(F++)},p);if(C.hasChildNodes()){C.insertBefore(d.create(\"span\",{\"aria-hidden\":\"true\"},\"\\u00a0\\u00bb \"),C.firstChild);C.insertBefore(v,C.firstChild)}else{C.appendChild(v)}},m.getBody());if(d.select(\"a\",C).length>0){y.statusKeyboardNavigation=new e.ui.KeyboardNavigation({root:m.id+\"_path_row\",items:d.select(\"a\",C),excludeFromTabOrder:true,onCancel:function(){m.focus()}},d)}}},_sel:function(i){this.editor.execCommand(\"mceSelectNodeDepth\",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:this.url+\"/anchor.htm\",width:320+parseInt(i.getLang(\"advanced.anchor_delta_width\",0)),height:90+parseInt(i.getLang(\"advanced.anchor_delta_height\",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:this.url+\"/charmap.htm\",width:550+parseInt(i.getLang(\"advanced.charmap_delta_width\",0)),height:260+parseInt(i.getLang(\"advanced.charmap_delta_height\",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:this.url+\"/about.htm\",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var i=this.editor;i.windowManager.open({url:this.url+\"/shortcuts.htm\",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:this.url+\"/color_picker.htm\",width:375+parseInt(i.getLang(\"advanced.colorpicker_delta_width\",0)),height:250+parseInt(i.getLang(\"advanced.colorpicker_delta_height\",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+\"/source_editor.htm\",width:parseInt(i.getParam(\"theme_advanced_source_editor_width\",720)),height:parseInt(i.getParam(\"theme_advanced_source_editor_height\",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),\"class\").indexOf(\"mceItem\")!=-1){return}i.windowManager.open({url:this.url+\"/image.htm\",width:355+parseInt(i.getLang(\"advanced.image_delta_width\",0)),height:275+parseInt(i.getLang(\"advanced.image_delta_height\",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+\"/link.htm\",width:310+parseInt(i.getLang(\"advanced.link_delta_width\",0)),height:200+parseInt(i.getLang(\"advanced.link_delta_height\",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm(\"advanced.newdocument\",function(j){if(j){i.execCommand(\"mceSetContent\",false,\"\")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand(\"ForeColor\",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand(\"HiliteColor\",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add(\"advanced\",e.themes.AdvancedTheme)}(tinymce));","Magento_Tinymce3/tiny_mce/themes/advanced/js/source_editor.js":"tinyMCEPopup.requireLangPack();\ntinyMCEPopup.onInit.add(onLoadInit);\n\nfunction saveContent() {\n\ttinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true});\n\ttinyMCEPopup.close();\n}\n\nfunction onLoadInit() {\n\ttinyMCEPopup.resizeToInnerSize();\n\n\t// Remove Gecko spellchecking\n\tif (tinymce.isGecko)\n\t\tdocument.body.spellcheck = tinyMCEPopup.editor.getParam(\"gecko_spellcheck\");\n\n\tdocument.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true});\n\n\tif (tinyMCEPopup.editor.getParam(\"theme_advanced_source_editor_wrap\", true)) {\n\t\tsetWrap('soft');\n\t\tdocument.getElementById('wraped').checked = true;\n\t}\n\n\tresizeInputs();\n}\n\nfunction setWrap(val) {\n\tvar v, n, s = document.getElementById('htmlSource');\n\n\ts.wrap = val;\n\n\tif (!tinymce.isIE) {\n\t\tv = s.value;\n\t\tn = s.cloneNode(false);\n\t\tn.setAttribute(\"wrap\", val);\n\t\ts.parentNode.replaceChild(n, s);\n\t\tn.value = v;\n\t}\n}\n\nfunction toggleWordWrap(elm) {\n\tif (elm.checked)\n\t\tsetWrap('soft');\n\telse\n\t\tsetWrap('off');\n}\n\nfunction resizeInputs() {\n\tvar vp = tinyMCEPopup.dom.getViewPort(window), el;\n\n\tel = document.getElementById('htmlSource');\n\n\tif (el) {\n\t\tel.style.width = (vp.w - 20) + 'px';\n\t\tel.style.height = (vp.h - 65) + 'px';\n\t}\n}\n","Magento_Tinymce3/tiny_mce/themes/advanced/js/image.js":"var ImageDialog = {\n\tpreInit : function() {\n\t\tvar url;\n\n\t\ttinyMCEPopup.requireLangPack();\n\n\t\tif (url = tinyMCEPopup.getParam(\"external_image_list_url\"))\n\t\t\tdocument.write('<script language=\"javascript\" type=\"text/javascript\" src=\"' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '\"></script>');\n\t},\n\n\tinit : function() {\n\t\tvar f = document.forms[0], ed = tinyMCEPopup.editor;\n\n\t\t// Setup browse button\n\t\tdocument.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');\n\t\tif (isVisible('srcbrowser'))\n\t\t\tdocument.getElementById('src').style.width = '180px';\n\n\t\te = ed.selection.getNode();\n\n\t\tthis.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'));\n\n\t\tif (e.nodeName == 'IMG') {\n\t\t\tf.src.value = ed.dom.getAttrib(e, 'src');\n\t\t\tf.alt.value = ed.dom.getAttrib(e, 'alt');\n\t\t\tf.border.value = this.getAttrib(e, 'border');\n\t\t\tf.vspace.value = this.getAttrib(e, 'vspace');\n\t\t\tf.hspace.value = this.getAttrib(e, 'hspace');\n\t\t\tf.width.value = ed.dom.getAttrib(e, 'width');\n\t\t\tf.height.value = ed.dom.getAttrib(e, 'height');\n\t\t\tf.insert.value = ed.getLang('update');\n\t\t\tthis.styleVal = ed.dom.getAttrib(e, 'style');\n\t\t\tselectByValue(f, 'image_list', f.src.value);\n\t\t\tselectByValue(f, 'align', this.getAttrib(e, 'align'));\n\t\t\tthis.updateStyle();\n\t\t}\n\t},\n\n\tfillFileList : function(id, l) {\n\t\tvar dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;\n\n\t\tl = typeof(l) === 'function' ? l() : window[l];\n\n\t\tif (l && l.length > 0) {\n\t\t\tlst.options[lst.options.length] = new Option('', '');\n\n\t\t\ttinymce.each(l, function(o) {\n\t\t\t\tlst.options[lst.options.length] = new Option(o[0], o[1]);\n\t\t\t});\n\t\t} else\n\t\t\tdom.remove(dom.getParent(id, 'tr'));\n\t},\n\n\tupdate : function() {\n\t\tvar f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;\n\n\t\ttinyMCEPopup.restoreSelection();\n\n\t\tif (f.src.value === '') {\n\t\t\tif (ed.selection.getNode().nodeName == 'IMG') {\n\t\t\t\ted.dom.remove(ed.selection.getNode());\n\t\t\t\ted.execCommand('mceRepaint');\n\t\t\t}\n\n\t\t\ttinyMCEPopup.close();\n\t\t\treturn;\n\t\t}\n\n\t\tif (!ed.settings.inline_styles) {\n\t\t\targs = tinymce.extend(args, {\n\t\t\t\tvspace : nl.vspace.value,\n\t\t\t\thspace : nl.hspace.value,\n\t\t\t\tborder : nl.border.value,\n\t\t\t\talign : getSelectValue(f, 'align')\n\t\t\t});\n\t\t} else\n\t\t\targs.style = this.styleVal;\n\n\t\ttinymce.extend(args, {\n\t\t\tsrc : f.src.value.replace(/ /g, '%20'),\n\t\t\talt : f.alt.value,\n\t\t\twidth : f.width.value,\n\t\t\theight : f.height.value\n\t\t});\n\n\t\tel = ed.selection.getNode();\n\n\t\tif (el && el.nodeName == 'IMG') {\n\t\t\ted.dom.setAttribs(el, args);\n\t\t\ttinyMCEPopup.editor.execCommand('mceRepaint');\n\t\t\ttinyMCEPopup.editor.focus();\n\t\t} else {\n\t\t\ttinymce.each(args, function(value, name) {\n\t\t\t\tif (value === \"\") {\n\t\t\t\t\tdelete args[name];\n\t\t\t\t}\n\t\t\t});\n\n\t\t\ted.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});\n\t\t\ted.undoManager.add();\n\t\t}\n\n\t\ttinyMCEPopup.close();\n\t},\n\n\tupdateStyle : function() {\n\t\tvar dom = tinyMCEPopup.dom, st, v, f = document.forms[0];\n\n\t\tif (tinyMCEPopup.editor.settings.inline_styles) {\n\t\t\tst = tinyMCEPopup.dom.parseStyle(this.styleVal);\n\n\t\t\t// Handle align\n\t\t\tv = getSelectValue(f, 'align');\n\t\t\tif (v) {\n\t\t\t\tif (v == 'left' || v == 'right') {\n\t\t\t\t\tst['float'] = v;\n\t\t\t\t\tdelete st['vertical-align'];\n\t\t\t\t} else {\n\t\t\t\t\tst['vertical-align'] = v;\n\t\t\t\t\tdelete st['float'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdelete st['float'];\n\t\t\t\tdelete st['vertical-align'];\n\t\t\t}\n\n\t\t\t// Handle border\n\t\t\tv = f.border.value;\n\t\t\tif (v || v == '0') {\n\t\t\t\tif (v == '0')\n\t\t\t\t\tst['border'] = '0';\n\t\t\t\telse\n\t\t\t\t\tst['border'] = v + 'px solid black';\n\t\t\t} else\n\t\t\t\tdelete st['border'];\n\n\t\t\t// Handle hspace\n\t\t\tv = f.hspace.value;\n\t\t\tif (v) {\n\t\t\t\tdelete st['margin'];\n\t\t\t\tst['margin-left'] = v + 'px';\n\t\t\t\tst['margin-right'] = v + 'px';\n\t\t\t} else {\n\t\t\t\tdelete st['margin-left'];\n\t\t\t\tdelete st['margin-right'];\n\t\t\t}\n\n\t\t\t// Handle vspace\n\t\t\tv = f.vspace.value;\n\t\t\tif (v) {\n\t\t\t\tdelete st['margin'];\n\t\t\t\tst['margin-top'] = v + 'px';\n\t\t\t\tst['margin-bottom'] = v + 'px';\n\t\t\t} else {\n\t\t\t\tdelete st['margin-top'];\n\t\t\t\tdelete st['margin-bottom'];\n\t\t\t}\n\n\t\t\t// Merge\n\t\t\tst = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');\n\t\t\tthis.styleVal = dom.serializeStyle(st, 'img');\n\t\t}\n\t},\n\n\tgetAttrib : function(e, at) {\n\t\tvar ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;\n\n\t\tif (ed.settings.inline_styles) {\n\t\t\tswitch (at) {\n\t\t\t\tcase 'align':\n\t\t\t\t\tif (v = dom.getStyle(e, 'float'))\n\t\t\t\t\t\treturn v;\n\n\t\t\t\t\tif (v = dom.getStyle(e, 'vertical-align'))\n\t\t\t\t\t\treturn v;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'hspace':\n\t\t\t\t\tv = dom.getStyle(e, 'margin-left')\n\t\t\t\t\tv2 = dom.getStyle(e, 'margin-right');\n\t\t\t\t\tif (v && v == v2)\n\t\t\t\t\t\treturn parseInt(v.replace(/[^0-9]/g, ''));\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'vspace':\n\t\t\t\t\tv = dom.getStyle(e, 'margin-top')\n\t\t\t\t\tv2 = dom.getStyle(e, 'margin-bottom');\n\t\t\t\t\tif (v && v == v2)\n\t\t\t\t\t\treturn parseInt(v.replace(/[^0-9]/g, ''));\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'border':\n\t\t\t\t\tv = 0;\n\n\t\t\t\t\ttinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {\n\t\t\t\t\t\tsv = dom.getStyle(e, 'border-' + sv + '-width');\n\n\t\t\t\t\t\t// False or not the same as prev\n\t\t\t\t\t\tif (!sv || (sv != v && v !== 0)) {\n\t\t\t\t\t\t\tv = 0;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (sv)\n\t\t\t\t\t\t\tv = sv;\n\t\t\t\t\t});\n\n\t\t\t\t\tif (v)\n\t\t\t\t\t\treturn parseInt(v.replace(/[^0-9]/g, ''));\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (v = dom.getAttrib(e, at))\n\t\t\treturn v;\n\n\t\treturn '';\n\t},\n\n\tresetImageData : function() {\n\t\tvar f = document.forms[0];\n\n\t\tf.width.value = f.height.value = \"\";\t\n\t},\n\n\tupdateImageData : function() {\n\t\tvar f = document.forms[0], t = ImageDialog;\n\n\t\tif (f.width.value == \"\")\n\t\t\tf.width.value = t.preloadImg.width;\n\n\t\tif (f.height.value == \"\")\n\t\t\tf.height.value = t.preloadImg.height;\n\t},\n\n\tgetImageData : function() {\n\t\tvar f = document.forms[0];\n\n\t\tthis.preloadImg = new Image();\n\t\tthis.preloadImg.onload = this.updateImageData;\n\t\tthis.preloadImg.onerror = this.resetImageData;\n\t\tthis.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value);\n\t}\n};\n\nImageDialog.preInit();\ntinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);\n","Magento_Tinymce3/tiny_mce/themes/advanced/js/color_picker.js":"tinyMCEPopup.requireLangPack();\n\nvar detail = 50, strhex = \"0123456789abcdef\", i, isMouseDown = false, isMouseOver = false;\n\nvar colors = [\n\t\"#000000\",\"#000033\",\"#000066\",\"#000099\",\"#0000cc\",\"#0000ff\",\"#330000\",\"#330033\",\n\t\"#330066\",\"#330099\",\"#3300cc\",\"#3300ff\",\"#660000\",\"#660033\",\"#660066\",\"#660099\",\n\t\"#6600cc\",\"#6600ff\",\"#990000\",\"#990033\",\"#990066\",\"#990099\",\"#9900cc\",\"#9900ff\",\n\t\"#cc0000\",\"#cc0033\",\"#cc0066\",\"#cc0099\",\"#cc00cc\",\"#cc00ff\",\"#ff0000\",\"#ff0033\",\n\t\"#ff0066\",\"#ff0099\",\"#ff00cc\",\"#ff00ff\",\"#003300\",\"#003333\",\"#003366\",\"#003399\",\n\t\"#0033cc\",\"#0033ff\",\"#333300\",\"#333333\",\"#333366\",\"#333399\",\"#3333cc\",\"#3333ff\",\n\t\"#663300\",\"#663333\",\"#663366\",\"#663399\",\"#6633cc\",\"#6633ff\",\"#993300\",\"#993333\",\n\t\"#993366\",\"#993399\",\"#9933cc\",\"#9933ff\",\"#cc3300\",\"#cc3333\",\"#cc3366\",\"#cc3399\",\n\t\"#cc33cc\",\"#cc33ff\",\"#ff3300\",\"#ff3333\",\"#ff3366\",\"#ff3399\",\"#ff33cc\",\"#ff33ff\",\n\t\"#006600\",\"#006633\",\"#006666\",\"#006699\",\"#0066cc\",\"#0066ff\",\"#336600\",\"#336633\",\n\t\"#336666\",\"#336699\",\"#3366cc\",\"#3366ff\",\"#666600\",\"#666633\",\"#666666\",\"#666699\",\n\t\"#6666cc\",\"#6666ff\",\"#996600\",\"#996633\",\"#996666\",\"#996699\",\"#9966cc\",\"#9966ff\",\n\t\"#cc6600\",\"#cc6633\",\"#cc6666\",\"#cc6699\",\"#cc66cc\",\"#cc66ff\",\"#ff6600\",\"#ff6633\",\n\t\"#ff6666\",\"#ff6699\",\"#ff66cc\",\"#ff66ff\",\"#009900\",\"#009933\",\"#009966\",\"#009999\",\n\t\"#0099cc\",\"#0099ff\",\"#339900\",\"#339933\",\"#339966\",\"#339999\",\"#3399cc\",\"#3399ff\",\n\t\"#669900\",\"#669933\",\"#669966\",\"#669999\",\"#6699cc\",\"#6699ff\",\"#999900\",\"#999933\",\n\t\"#999966\",\"#999999\",\"#9999cc\",\"#9999ff\",\"#cc9900\",\"#cc9933\",\"#cc9966\",\"#cc9999\",\n\t\"#cc99cc\",\"#cc99ff\",\"#ff9900\",\"#ff9933\",\"#ff9966\",\"#ff9999\",\"#ff99cc\",\"#ff99ff\",\n\t\"#00cc00\",\"#00cc33\",\"#00cc66\",\"#00cc99\",\"#00cccc\",\"#00ccff\",\"#33cc00\",\"#33cc33\",\n\t\"#33cc66\",\"#33cc99\",\"#33cccc\",\"#33ccff\",\"#66cc00\",\"#66cc33\",\"#66cc66\",\"#66cc99\",\n\t\"#66cccc\",\"#66ccff\",\"#99cc00\",\"#99cc33\",\"#99cc66\",\"#99cc99\",\"#99cccc\",\"#99ccff\",\n\t\"#cccc00\",\"#cccc33\",\"#cccc66\",\"#cccc99\",\"#cccccc\",\"#ccccff\",\"#ffcc00\",\"#ffcc33\",\n\t\"#ffcc66\",\"#ffcc99\",\"#ffcccc\",\"#ffccff\",\"#00ff00\",\"#00ff33\",\"#00ff66\",\"#00ff99\",\n\t\"#00ffcc\",\"#00ffff\",\"#33ff00\",\"#33ff33\",\"#33ff66\",\"#33ff99\",\"#33ffcc\",\"#33ffff\",\n\t\"#66ff00\",\"#66ff33\",\"#66ff66\",\"#66ff99\",\"#66ffcc\",\"#66ffff\",\"#99ff00\",\"#99ff33\",\n\t\"#99ff66\",\"#99ff99\",\"#99ffcc\",\"#99ffff\",\"#ccff00\",\"#ccff33\",\"#ccff66\",\"#ccff99\",\n\t\"#ccffcc\",\"#ccffff\",\"#ffff00\",\"#ffff33\",\"#ffff66\",\"#ffff99\",\"#ffffcc\",\"#ffffff\"\n];\n\nvar named = {\n\t'#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',\n\t'#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',\n\t'#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',\n\t'#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',\n\t'#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',\n\t'#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',\n\t'#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',\n\t'#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',\n\t'#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',\n\t'#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',\n\t'#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',\n\t'#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',\n\t'#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',\n\t'#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',\n\t'#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',\n\t'#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',\n\t'#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',\n\t'#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',\n\t'#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',\n\t'#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',\n\t'#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',\n\t'#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',\n\t'#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'\n};\n\nvar namedLookup = {};\n\nfunction init() {\n\tvar inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;\n\n\ttinyMCEPopup.resizeToInnerSize();\n\n\tgeneratePicker();\n\tgenerateWebColors();\n\tgenerateNamedColors();\n\n\tif (inputColor) {\n\t\tchangeFinalColor(inputColor);\n\n\t\tcol = convertHexToRGB(inputColor);\n\n\t\tif (col)\n\t\t\tupdateLight(col.r, col.g, col.b);\n\t}\n\t\n\tfor (key in named) {\n\t\tvalue = named[key];\n\t\tnamedLookup[value.replace(/\\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();\n\t}\n}\n\nfunction toHexColor(color) {\n\tvar matches, red, green, blue, toInt = parseInt;\n\n\tfunction hex(value) {\n\t\tvalue = parseInt(value).toString(16);\n\n\t\treturn value.length > 1 ? value : '0' + value; // Padd with leading zero\n\t};\n\n\tcolor = color.replace(/[\\s#]+/g, '').toLowerCase();\n\tcolor = namedLookup[color] || color;\n\tmatches = /^rgb\\((\\d{1,3}),(\\d{1,3}),(\\d{1,3})\\)|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})|([a-f0-9])([a-f0-9])([a-f0-9])$/.exec(color);\n\n\tif (matches) {\n\t\tif (matches[1]) {\n\t\t\tred = toInt(matches[1]);\n\t\t\tgreen = toInt(matches[2]);\n\t\t\tblue = toInt(matches[3]);\n\t\t} else if (matches[4]) {\n\t\t\tred = toInt(matches[4], 16);\n\t\t\tgreen = toInt(matches[5], 16);\n\t\t\tblue = toInt(matches[6], 16);\n\t\t} else if (matches[7]) {\n\t\t\tred = toInt(matches[7] + matches[7], 16);\n\t\t\tgreen = toInt(matches[8] + matches[8], 16);\n\t\t\tblue = toInt(matches[9] + matches[9], 16);\n\t\t}\n\n\t\treturn '#' + hex(red) + hex(green) + hex(blue);\n\t}\n\n\treturn '';\n}\n\nfunction insertAction() {\n\tvar color = document.getElementById(\"color\").value, f = tinyMCEPopup.getWindowArg('func');\n\n\ttinyMCEPopup.restoreSelection();\n\n\tif (f)\n\t\tf(toHexColor(color));\n\n\ttinyMCEPopup.close();\n}\n\nfunction showColor(color, name) {\n\tif (name)\n\t\tdocument.getElementById(\"colorname\").innerHTML = name;\n\n\tdocument.getElementById(\"preview\").style.backgroundColor = color;\n\tdocument.getElementById(\"color\").value = color.toUpperCase();\n}\n\nfunction convertRGBToHex(col) {\n\tvar re = new RegExp(\"rgb\\\\s*\\\\(\\\\s*([0-9]+).*,\\\\s*([0-9]+).*,\\\\s*([0-9]+).*\\\\)\", \"gi\");\n\n\tif (!col)\n\t\treturn col;\n\n\tvar rgb = col.replace(re, \"$1,$2,$3\").split(',');\n\tif (rgb.length == 3) {\n\t\tr = parseInt(rgb[0]).toString(16);\n\t\tg = parseInt(rgb[1]).toString(16);\n\t\tb = parseInt(rgb[2]).toString(16);\n\n\t\tr = r.length == 1 ? '0' + r : r;\n\t\tg = g.length == 1 ? '0' + g : g;\n\t\tb = b.length == 1 ? '0' + b : b;\n\n\t\treturn \"#\" + r + g + b;\n\t}\n\n\treturn col;\n}\n\nfunction convertHexToRGB(col) {\n\tif (col.indexOf('#') != -1) {\n\t\tcol = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');\n\n\t\tr = parseInt(col.substring(0, 2), 16);\n\t\tg = parseInt(col.substring(2, 4), 16);\n\t\tb = parseInt(col.substring(4, 6), 16);\n\n\t\treturn {r : r, g : g, b : b};\n\t}\n\n\treturn null;\n}\n\nfunction generatePicker() {\n\tvar el = document.getElementById('light'), h = '', i;\n\n\tfor (i = 0; i < detail; i++){\n\t\th += '<div id=\"gs'+i+'\" style=\"background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;\"'\n\t\t+ ' onclick=\"changeFinalColor(this.style.backgroundColor)\"'\n\t\t+ ' onmousedown=\"isMouseDown = true; return false;\"'\n\t\t+ ' onmouseup=\"isMouseDown = false;\"'\n\t\t+ ' onmousemove=\"if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;\"'\n\t\t+ ' onmouseover=\"isMouseOver = true;\"'\n\t\t+ ' onmouseout=\"isMouseOver = false;\"'\n\t\t+ '></div>';\n\t}\n\n\tel.innerHTML = h;\n}\n\nfunction generateWebColors() {\n\tvar el = document.getElementById('webcolors'), h = '', i;\n\n\tif (el.className == 'generated')\n\t\treturn;\n\n\t// TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.\n\th += '<div role=\"listbox\" aria-labelledby=\"webcolors_title\" tabindex=\"0\"><table role=\"presentation\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">'\n\t\t+ '<tr>';\n\n\tfor (i=0; i<colors.length; i++) {\n\t\th += '<td bgcolor=\"' + colors[i] + '\" width=\"10\" height=\"10\">'\n\t\t\t+ '<a href=\"javascript:insertAction();\" role=\"option\" tabindex=\"-1\" aria-labelledby=\"web_colors_' + i + '\" onfocus=\"showColor(\\'' + colors[i] + '\\');\" onmouseover=\"showColor(\\'' + colors[i] + '\\');\" style=\"display:block;width:10px;height:10px;overflow:hidden;\">';\n\t\tif (tinyMCEPopup.editor.forcedHighContrastMode) {\n\t\t\th += '<canvas class=\"mceColorSwatch\" height=\"10\" width=\"10\" data-color=\"' + colors[i] + '\"></canvas>';\n\t\t}\n\t\th += '<span class=\"mceVoiceLabel\" style=\"display:none;\" id=\"web_colors_' + i + '\">' + colors[i].toUpperCase() + '</span>';\n\t\th += '</a></td>';\n\t\tif ((i+1) % 18 == 0)\n\t\t\th += '</tr><tr>';\n\t}\n\n\th += '</table></div>';\n\n\tel.innerHTML = h;\n\tel.className = 'generated';\n\n\tpaintCanvas(el);\n\tenableKeyboardNavigation(el.firstChild);\n}\n\nfunction paintCanvas(el) {\n\ttinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {\n\t\tvar context;\n\t\tif (canvas.getContext && (context = canvas.getContext(\"2d\"))) {\n\t\t\tcontext.fillStyle = canvas.getAttribute('data-color');\n\t\t\tcontext.fillRect(0, 0, 10, 10);\n\t\t}\n\t});\n}\nfunction generateNamedColors() {\n\tvar el = document.getElementById('namedcolors'), h = '', n, v, i = 0;\n\n\tif (el.className == 'generated')\n\t\treturn;\n\n\tfor (n in named) {\n\t\tv = named[n];\n\t\th += '<a href=\"javascript:insertAction();\" role=\"option\" tabindex=\"-1\" aria-labelledby=\"named_colors_' + i + '\" onfocus=\"showColor(\\'' + n + '\\',\\'' + v + '\\');\" onmouseover=\"showColor(\\'' + n + '\\',\\'' + v + '\\');\" style=\"background-color: ' + n + '\">';\n\t\tif (tinyMCEPopup.editor.forcedHighContrastMode) {\n\t\t\th += '<canvas class=\"mceColorSwatch\" height=\"10\" width=\"10\" data-color=\"' + colors[i] + '\"></canvas>';\n\t\t}\n\t\th += '<span class=\"mceVoiceLabel\" style=\"display:none;\" id=\"named_colors_' + i + '\">' + v + '</span>';\n\t\th += '</a>';\n\t\ti++;\n\t}\n\n\tel.innerHTML = h;\n\tel.className = 'generated';\n\n\tpaintCanvas(el);\n\tenableKeyboardNavigation(el);\n}\n\nfunction enableKeyboardNavigation(el) {\n\ttinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {\n\t\troot: el,\n\t\titems: tinyMCEPopup.dom.select('a', el)\n\t}, tinyMCEPopup.dom);\n}\n\nfunction dechex(n) {\n\treturn strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);\n}\n\nfunction computeColor(e) {\n\tvar x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);\n\n\tx = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);\n\ty = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);\n\n\tpartWidth = document.getElementById('colors').width / 6;\n\tpartDetail = detail / 2;\n\timHeight = document.getElementById('colors').height;\n\n\tr = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;\n\tg = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255\t+ (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);\n\tb = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);\n\n\tcoef = (imHeight - y) / imHeight;\n\tr = 128 + (r - 128) * coef;\n\tg = 128 + (g - 128) * coef;\n\tb = 128 + (b - 128) * coef;\n\n\tchangeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));\n\tupdateLight(r, g, b);\n}\n\nfunction updateLight(r, g, b) {\n\tvar i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;\n\n\tfor (i=0; i<detail; i++) {\n\t\tif ((i>=0) && (i<partDetail)) {\n\t\t\tfinalCoef = i / partDetail;\n\t\t\tfinalR = dechex(255 - (255 - r) * finalCoef);\n\t\t\tfinalG = dechex(255 - (255 - g) * finalCoef);\n\t\t\tfinalB = dechex(255 - (255 - b) * finalCoef);\n\t\t} else {\n\t\t\tfinalCoef = 2 - i / partDetail;\n\t\t\tfinalR = dechex(r * finalCoef);\n\t\t\tfinalG = dechex(g * finalCoef);\n\t\t\tfinalB = dechex(b * finalCoef);\n\t\t}\n\n\t\tcolor = finalR + finalG + finalB;\n\n\t\tsetCol('gs' + i, '#'+color);\n\t}\n}\n\nfunction changeFinalColor(color) {\n\tif (color.indexOf('#') == -1)\n\t\tcolor = convertRGBToHex(color);\n\n\tsetCol('preview', color);\n\tdocument.getElementById('color').value = color;\n}\n\nfunction setCol(e, c) {\n\ttry {\n\t\tdocument.getElementById(e).style.backgroundColor = c;\n\t} catch (ex) {\n\t\t// Ignore IE warning\n\t}\n}\n\ntinyMCEPopup.onInit.add(init);\n","Magento_Tinymce3/tiny_mce/themes/advanced/js/about.js":"tinyMCEPopup.requireLangPack();\n\nfunction init() {\n\tvar ed, tcont;\n\n\ttinyMCEPopup.resizeToInnerSize();\n\ted = tinyMCEPopup.editor;\n\n\t// Give FF some time\n\twindow.setTimeout(insertHelpIFrame, 10);\n\n\ttcont = document.getElementById('plugintablecontainer');\n\tdocument.getElementById('plugins_tab').style.display = 'none';\n\n\tvar html = \"\";\n\thtml += '<table id=\"plugintable\">';\n\thtml += '<thead>';\n\thtml += '<tr>';\n\thtml += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>';\n\thtml += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>';\n\thtml += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>';\n\thtml += '</tr>';\n\thtml += '</thead>';\n\thtml += '<tbody>';\n\n\ttinymce.each(ed.plugins, function(p, n) {\n\t\tvar info;\n\n\t\tif (!p.getInfo)\n\t\t\treturn;\n\n\t\thtml += '<tr>';\n\n\t\tinfo = p.getInfo();\n\n\t\tif (info.infourl != null && info.infourl != '')\n\t\t\thtml += '<td width=\"50%\" title=\"' + n + '\"><a href=\"' + info.infourl + '\" target=\"_blank\">' + info.longname + '</a></td>';\n\t\telse\n\t\t\thtml += '<td width=\"50%\" title=\"' + n + '\">' + info.longname + '</td>';\n\n\t\tif (info.authorurl != null && info.authorurl != '')\n\t\t\thtml += '<td width=\"35%\"><a href=\"' + info.authorurl + '\" target=\"_blank\">' + info.author + '</a></td>';\n\t\telse\n\t\t\thtml += '<td width=\"35%\">' + info.author + '</td>';\n\n\t\thtml += '<td width=\"15%\">' + info.version + '</td>';\n\t\thtml += '</tr>';\n\n\t\tdocument.getElementById('plugins_tab').style.display = '';\n\n\t});\n\n\thtml += '</tbody>';\n\thtml += '</table>';\n\n\ttcont.innerHTML = html;\n\n\ttinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + \".\" + tinymce.minorVersion;\n\ttinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;\n}\n\nfunction insertHelpIFrame() {\n\tvar html;\n\n\tif (tinyMCEPopup.getParam('docs_url')) {\n\t\thtml = '<iframe width=\"100%\" height=\"300\" src=\"' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '\"></iframe>';\n\t\tdocument.getElementById('iframecontainer').innerHTML = html;\n\t\tdocument.getElementById('help_tab').style.display = 'block';\n\t\tdocument.getElementById('help_tab').setAttribute(\"aria-hidden\", \"false\");\n\t}\n}\n\ntinyMCEPopup.onInit.add(init);\n","Magento_Tinymce3/tiny_mce/themes/advanced/js/link.js":"tinyMCEPopup.requireLangPack();\n\nvar LinkDialog = {\n\tpreInit : function() {\n\t\tvar url;\n\n\t\tif (url = tinyMCEPopup.getParam(\"external_link_list_url\"))\n\t\t\tdocument.write('<script language=\"javascript\" type=\"text/javascript\" src=\"' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '\"></script>');\n\t},\n\n\tinit : function() {\n\t\tvar f = document.forms[0], ed = tinyMCEPopup.editor;\n\n\t\t// Setup browse button\n\t\tdocument.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link');\n\t\tif (isVisible('hrefbrowser'))\n\t\t\tdocument.getElementById('href').style.width = '180px';\n\n\t\tthis.fillClassList('class_list');\n\t\tthis.fillFileList('link_list', 'tinyMCELinkList');\n\t\tthis.fillTargetList('target_list');\n\n\t\tif (e = ed.dom.getParent(ed.selection.getNode(), 'A')) {\n\t\t\tf.href.value = ed.dom.getAttrib(e, 'href');\n\t\t\tf.linktitle.value = ed.dom.getAttrib(e, 'title');\n\t\t\tf.insert.value = ed.getLang('update');\n\t\t\tselectByValue(f, 'link_list', f.href.value);\n\t\t\tselectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target'));\n\t\t\tselectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class'));\n\t\t}\n\t},\n\n\tupdate : function() {\n\t\tvar f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20');\n\n\t\ttinyMCEPopup.restoreSelection();\n\t\te = ed.dom.getParent(ed.selection.getNode(), 'A');\n\n\t\t// Remove element if there is no href\n\t\tif (!f.href.value) {\n\t\t\tif (e) {\n\t\t\t\tb = ed.selection.getBookmark();\n\t\t\t\ted.dom.remove(e, 1);\n\t\t\t\ted.selection.moveToBookmark(b);\n\t\t\t\ttinyMCEPopup.execCommand(\"mceEndUndoLevel\");\n\t\t\t\ttinyMCEPopup.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Create new anchor elements\n\t\tif (e == null) {\n\t\t\ted.getDoc().execCommand(\"unlink\", false, null);\n\t\t\ttinyMCEPopup.execCommand(\"mceInsertLink\", false, \"#mce_temp_url#\", {skip_undo : 1});\n\n\t\t\ttinymce.each(ed.dom.select(\"a\"), function(n) {\n\t\t\t\tif (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {\n\t\t\t\t\te = n;\n\n\t\t\t\t\ted.dom.setAttribs(e, {\n\t\t\t\t\t\thref : href,\n\t\t\t\t\t\ttitle : f.linktitle.value,\n\t\t\t\t\t\ttarget : f.target_list ? getSelectValue(f, \"target_list\") : null,\n\t\t\t\t\t\t'class' : f.class_list ? getSelectValue(f, \"class_list\") : null\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\ted.dom.setAttribs(e, {\n\t\t\t\thref : href,\n\t\t\t\ttitle : f.linktitle.value,\n\t\t\t\ttarget : f.target_list ? getSelectValue(f, \"target_list\") : null,\n\t\t\t\t'class' : f.class_list ? getSelectValue(f, \"class_list\") : null\n\t\t\t});\n\t\t}\n\n\t\t// Don't move caret if selection was image\n\t\tif (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') {\n\t\t\ted.focus();\n\t\t\ted.selection.select(e);\n\t\t\ted.selection.collapse(0);\n\t\t\ttinyMCEPopup.storeSelection();\n\t\t}\n\n\t\ttinyMCEPopup.execCommand(\"mceEndUndoLevel\");\n\t\ttinyMCEPopup.close();\n\t},\n\n\tcheckPrefix : function(n) {\n\t\tif (n.value && Validator.isEmail(n) && !/^\\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))\n\t\t\tn.value = 'mailto:' + n.value;\n\n\t\tif (/^\\s*www\\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))\n\t\t\tn.value = 'http://' + n.value;\n\t},\n\n\tfillFileList : function(id, l) {\n\t\tvar dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;\n\n\t\tl = window[l];\n\n\t\tif (l && l.length > 0) {\n\t\t\tlst.options[lst.options.length] = new Option('', '');\n\n\t\t\ttinymce.each(l, function(o) {\n\t\t\t\tlst.options[lst.options.length] = new Option(o[0], o[1]);\n\t\t\t});\n\t\t} else\n\t\t\tdom.remove(dom.getParent(id, 'tr'));\n\t},\n\n\tfillClassList : function(id) {\n\t\tvar dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;\n\n\t\tif (v = tinyMCEPopup.getParam('theme_advanced_styles')) {\n\t\t\tcl = [];\n\n\t\t\ttinymce.each(v.split(';'), function(v) {\n\t\t\t\tvar p = v.split('=');\n\n\t\t\t\tcl.push({'title' : p[0], 'class' : p[1]});\n\t\t\t});\n\t\t} else\n\t\t\tcl = tinyMCEPopup.editor.dom.getClasses();\n\n\t\tif (cl.length > 0) {\n\t\t\tlst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');\n\n\t\t\ttinymce.each(cl, function(o) {\n\t\t\t\tlst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);\n\t\t\t});\n\t\t} else\n\t\t\tdom.remove(dom.getParent(id, 'tr'));\n\t},\n\n\tfillTargetList : function(id) {\n\t\tvar dom = tinyMCEPopup.dom, lst = dom.get(id), v;\n\n\t\tlst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');\n\t\tlst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self');\n\t\tlst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank');\n\n\t\tif (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) {\n\t\t\ttinymce.each(v.split(','), function(v) {\n\t\t\t\tv = v.split('=');\n\t\t\t\tlst.options[lst.options.length] = new Option(v[0], v[1]);\n\t\t\t});\n\t\t}\n\t}\n};\n\nLinkDialog.preInit();\ntinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog);\n","Magento_Tinymce3/tiny_mce/themes/advanced/js/anchor.js":"tinyMCEPopup.requireLangPack();\n\nvar AnchorDialog = {\n\tinit : function(ed) {\n\t\tvar action, elm, f = document.forms[0];\n\n\t\tthis.editor = ed;\n\t\telm = ed.dom.getParent(ed.selection.getNode(), 'A');\n\t\tv = ed.dom.getAttrib(elm, 'name');\n\n\t\tif (v) {\n\t\t\tthis.action = 'update';\n\t\t\tf.anchorName.value = v;\n\t\t}\n\n\t\tf.insert.value = ed.getLang(elm ? 'update' : 'insert');\n\t},\n\n\tupdate : function() {\n\t\tvar ed = this.editor, elm, name = document.forms[0].anchorName.value;\n\n\t\tif (!name || !/^[a-z][a-z0-9\\-\\_:\\.]*$/i.test(name)) {\n\t\t\ttinyMCEPopup.alert('advanced_dlg.anchor_invalid');\n\t\t\treturn;\n\t\t}\n\n\t\ttinyMCEPopup.restoreSelection();\n\n\t\tif (this.action != 'update')\n\t\t\ted.selection.collapse(1);\n\n\t\telm = ed.dom.getParent(ed.selection.getNode(), 'A');\n\t\tif (elm) {\n\t\t\telm.setAttribute('name', name);\n\t\t\telm.name = name;\n\t\t} else\n\t\t\ted.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, ''));\n\n\t\ttinyMCEPopup.close();\n\t}\n};\n\ntinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);\n","Magento_Tinymce3/tiny_mce/themes/advanced/js/charmap.js":"/**\n * charmap.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\ntinyMCEPopup.requireLangPack();\n\nvar charmap = [\n\t['&nbsp;',    '&#160;',  true, 'no-break space'],\n\t['&amp;',     '&#38;',   true, 'ampersand'],\n\t['&quot;',    '&#34;',   true, 'quotation mark'],\n// finance\n\t['&cent;',    '&#162;',  true, 'cent sign'],\n\t['&euro;',    '&#8364;', true, 'euro sign'],\n\t['&pound;',   '&#163;',  true, 'pound sign'],\n\t['&yen;',     '&#165;',  true, 'yen sign'],\n// signs\n\t['&copy;',    '&#169;',  true, 'copyright sign'],\n\t['&reg;',     '&#174;',  true, 'registered sign'],\n\t['&trade;',   '&#8482;', true, 'trade mark sign'],\n\t['&permil;',  '&#8240;', true, 'per mille sign'],\n\t['&micro;',   '&#181;',  true, 'micro sign'],\n\t['&middot;',  '&#183;',  true, 'middle dot'],\n\t['&bull;',    '&#8226;', true, 'bullet'],\n\t['&hellip;',  '&#8230;', true, 'three dot leader'],\n\t['&prime;',   '&#8242;', true, 'minutes / feet'],\n\t['&Prime;',   '&#8243;', true, 'seconds / inches'],\n\t['&sect;',    '&#167;',  true, 'section sign'],\n\t['&para;',    '&#182;',  true, 'paragraph sign'],\n\t['&szlig;',   '&#223;',  true, 'sharp s / ess-zed'],\n// quotations\n\t['&lsaquo;',  '&#8249;', true, 'single left-pointing angle quotation mark'],\n\t['&rsaquo;',  '&#8250;', true, 'single right-pointing angle quotation mark'],\n\t['&laquo;',   '&#171;',  true, 'left pointing guillemet'],\n\t['&raquo;',   '&#187;',  true, 'right pointing guillemet'],\n\t['&lsquo;',   '&#8216;', true, 'left single quotation mark'],\n\t['&rsquo;',   '&#8217;', true, 'right single quotation mark'],\n\t['&ldquo;',   '&#8220;', true, 'left double quotation mark'],\n\t['&rdquo;',   '&#8221;', true, 'right double quotation mark'],\n\t['&sbquo;',   '&#8218;', true, 'single low-9 quotation mark'],\n\t['&bdquo;',   '&#8222;', true, 'double low-9 quotation mark'],\n\t['&lt;',      '&#60;',   true, 'less-than sign'],\n\t['&gt;',      '&#62;',   true, 'greater-than sign'],\n\t['&le;',      '&#8804;', true, 'less-than or equal to'],\n\t['&ge;',      '&#8805;', true, 'greater-than or equal to'],\n\t['&ndash;',   '&#8211;', true, 'en dash'],\n\t['&mdash;',   '&#8212;', true, 'em dash'],\n\t['&macr;',    '&#175;',  true, 'macron'],\n\t['&oline;',   '&#8254;', true, 'overline'],\n\t['&curren;',  '&#164;',  true, 'currency sign'],\n\t['&brvbar;',  '&#166;',  true, 'broken bar'],\n\t['&uml;',     '&#168;',  true, 'diaeresis'],\n\t['&iexcl;',   '&#161;',  true, 'inverted exclamation mark'],\n\t['&iquest;',  '&#191;',  true, 'turned question mark'],\n\t['&circ;',    '&#710;',  true, 'circumflex accent'],\n\t['&tilde;',   '&#732;',  true, 'small tilde'],\n\t['&deg;',     '&#176;',  true, 'degree sign'],\n\t['&minus;',   '&#8722;', true, 'minus sign'],\n\t['&plusmn;',  '&#177;',  true, 'plus-minus sign'],\n\t['&divide;',  '&#247;',  true, 'division sign'],\n\t['&frasl;',   '&#8260;', true, 'fraction slash'],\n\t['&times;',   '&#215;',  true, 'multiplication sign'],\n\t['&sup1;',    '&#185;',  true, 'superscript one'],\n\t['&sup2;',    '&#178;',  true, 'superscript two'],\n\t['&sup3;',    '&#179;',  true, 'superscript three'],\n\t['&frac14;',  '&#188;',  true, 'fraction one quarter'],\n\t['&frac12;',  '&#189;',  true, 'fraction one half'],\n\t['&frac34;',  '&#190;',  true, 'fraction three quarters'],\n// math / logical\n\t['&fnof;',    '&#402;',  true, 'function / florin'],\n\t['&int;',     '&#8747;', true, 'integral'],\n\t['&sum;',     '&#8721;', true, 'n-ary sumation'],\n\t['&infin;',   '&#8734;', true, 'infinity'],\n\t['&radic;',   '&#8730;', true, 'square root'],\n\t['&sim;',     '&#8764;', false,'similar to'],\n\t['&cong;',    '&#8773;', false,'approximately equal to'],\n\t['&asymp;',   '&#8776;', true, 'almost equal to'],\n\t['&ne;',      '&#8800;', true, 'not equal to'],\n\t['&equiv;',   '&#8801;', true, 'identical to'],\n\t['&isin;',    '&#8712;', false,'element of'],\n\t['&notin;',   '&#8713;', false,'not an element of'],\n\t['&ni;',      '&#8715;', false,'contains as member'],\n\t['&prod;',    '&#8719;', true, 'n-ary product'],\n\t['&and;',     '&#8743;', false,'logical and'],\n\t['&or;',      '&#8744;', false,'logical or'],\n\t['&not;',     '&#172;',  true, 'not sign'],\n\t['&cap;',     '&#8745;', true, 'intersection'],\n\t['&cup;',     '&#8746;', false,'union'],\n\t['&part;',    '&#8706;', true, 'partial differential'],\n\t['&forall;',  '&#8704;', false,'for all'],\n\t['&exist;',   '&#8707;', false,'there exists'],\n\t['&empty;',   '&#8709;', false,'diameter'],\n\t['&nabla;',   '&#8711;', false,'backward difference'],\n\t['&lowast;',  '&#8727;', false,'asterisk operator'],\n\t['&prop;',    '&#8733;', false,'proportional to'],\n\t['&ang;',     '&#8736;', false,'angle'],\n// undefined\n\t['&acute;',   '&#180;',  true, 'acute accent'],\n\t['&cedil;',   '&#184;',  true, 'cedilla'],\n\t['&ordf;',    '&#170;',  true, 'feminine ordinal indicator'],\n\t['&ordm;',    '&#186;',  true, 'masculine ordinal indicator'],\n\t['&dagger;',  '&#8224;', true, 'dagger'],\n\t['&Dagger;',  '&#8225;', true, 'double dagger'],\n// alphabetical special chars\n\t['&Agrave;',  '&#192;',  true, 'A - grave'],\n\t['&Aacute;',  '&#193;',  true, 'A - acute'],\n\t['&Acirc;',   '&#194;',  true, 'A - circumflex'],\n\t['&Atilde;',  '&#195;',  true, 'A - tilde'],\n\t['&Auml;',    '&#196;',  true, 'A - diaeresis'],\n\t['&Aring;',   '&#197;',  true, 'A - ring above'],\n\t['&AElig;',   '&#198;',  true, 'ligature AE'],\n\t['&Ccedil;',  '&#199;',  true, 'C - cedilla'],\n\t['&Egrave;',  '&#200;',  true, 'E - grave'],\n\t['&Eacute;',  '&#201;',  true, 'E - acute'],\n\t['&Ecirc;',   '&#202;',  true, 'E - circumflex'],\n\t['&Euml;',    '&#203;',  true, 'E - diaeresis'],\n\t['&Igrave;',  '&#204;',  true, 'I - grave'],\n\t['&Iacute;',  '&#205;',  true, 'I - acute'],\n\t['&Icirc;',   '&#206;',  true, 'I - circumflex'],\n\t['&Iuml;',    '&#207;',  true, 'I - diaeresis'],\n\t['&ETH;',     '&#208;',  true, 'ETH'],\n\t['&Ntilde;',  '&#209;',  true, 'N - tilde'],\n\t['&Ograve;',  '&#210;',  true, 'O - grave'],\n\t['&Oacute;',  '&#211;',  true, 'O - acute'],\n\t['&Ocirc;',   '&#212;',  true, 'O - circumflex'],\n\t['&Otilde;',  '&#213;',  true, 'O - tilde'],\n\t['&Ouml;',    '&#214;',  true, 'O - diaeresis'],\n\t['&Oslash;',  '&#216;',  true, 'O - slash'],\n\t['&OElig;',   '&#338;',  true, 'ligature OE'],\n\t['&Scaron;',  '&#352;',  true, 'S - caron'],\n\t['&Ugrave;',  '&#217;',  true, 'U - grave'],\n\t['&Uacute;',  '&#218;',  true, 'U - acute'],\n\t['&Ucirc;',   '&#219;',  true, 'U - circumflex'],\n\t['&Uuml;',    '&#220;',  true, 'U - diaeresis'],\n\t['&Yacute;',  '&#221;',  true, 'Y - acute'],\n\t['&Yuml;',    '&#376;',  true, 'Y - diaeresis'],\n\t['&THORN;',   '&#222;',  true, 'THORN'],\n\t['&agrave;',  '&#224;',  true, 'a - grave'],\n\t['&aacute;',  '&#225;',  true, 'a - acute'],\n\t['&acirc;',   '&#226;',  true, 'a - circumflex'],\n\t['&atilde;',  '&#227;',  true, 'a - tilde'],\n\t['&auml;',    '&#228;',  true, 'a - diaeresis'],\n\t['&aring;',   '&#229;',  true, 'a - ring above'],\n\t['&aelig;',   '&#230;',  true, 'ligature ae'],\n\t['&ccedil;',  '&#231;',  true, 'c - cedilla'],\n\t['&egrave;',  '&#232;',  true, 'e - grave'],\n\t['&eacute;',  '&#233;',  true, 'e - acute'],\n\t['&ecirc;',   '&#234;',  true, 'e - circumflex'],\n\t['&euml;',    '&#235;',  true, 'e - diaeresis'],\n\t['&igrave;',  '&#236;',  true, 'i - grave'],\n\t['&iacute;',  '&#237;',  true, 'i - acute'],\n\t['&icirc;',   '&#238;',  true, 'i - circumflex'],\n\t['&iuml;',    '&#239;',  true, 'i - diaeresis'],\n\t['&eth;',     '&#240;',  true, 'eth'],\n\t['&ntilde;',  '&#241;',  true, 'n - tilde'],\n\t['&ograve;',  '&#242;',  true, 'o - grave'],\n\t['&oacute;',  '&#243;',  true, 'o - acute'],\n\t['&ocirc;',   '&#244;',  true, 'o - circumflex'],\n\t['&otilde;',  '&#245;',  true, 'o - tilde'],\n\t['&ouml;',    '&#246;',  true, 'o - diaeresis'],\n\t['&oslash;',  '&#248;',  true, 'o slash'],\n\t['&oelig;',   '&#339;',  true, 'ligature oe'],\n\t['&scaron;',  '&#353;',  true, 's - caron'],\n\t['&ugrave;',  '&#249;',  true, 'u - grave'],\n\t['&uacute;',  '&#250;',  true, 'u - acute'],\n\t['&ucirc;',   '&#251;',  true, 'u - circumflex'],\n\t['&uuml;',    '&#252;',  true, 'u - diaeresis'],\n\t['&yacute;',  '&#253;',  true, 'y - acute'],\n\t['&thorn;',   '&#254;',  true, 'thorn'],\n\t['&yuml;',    '&#255;',  true, 'y - diaeresis'],\n\t['&Alpha;',   '&#913;',  true, 'Alpha'],\n\t['&Beta;',    '&#914;',  true, 'Beta'],\n\t['&Gamma;',   '&#915;',  true, 'Gamma'],\n\t['&Delta;',   '&#916;',  true, 'Delta'],\n\t['&Epsilon;', '&#917;',  true, 'Epsilon'],\n\t['&Zeta;',    '&#918;',  true, 'Zeta'],\n\t['&Eta;',     '&#919;',  true, 'Eta'],\n\t['&Theta;',   '&#920;',  true, 'Theta'],\n\t['&Iota;',    '&#921;',  true, 'Iota'],\n\t['&Kappa;',   '&#922;',  true, 'Kappa'],\n\t['&Lambda;',  '&#923;',  true, 'Lambda'],\n\t['&Mu;',      '&#924;',  true, 'Mu'],\n\t['&Nu;',      '&#925;',  true, 'Nu'],\n\t['&Xi;',      '&#926;',  true, 'Xi'],\n\t['&Omicron;', '&#927;',  true, 'Omicron'],\n\t['&Pi;',      '&#928;',  true, 'Pi'],\n\t['&Rho;',     '&#929;',  true, 'Rho'],\n\t['&Sigma;',   '&#931;',  true, 'Sigma'],\n\t['&Tau;',     '&#932;',  true, 'Tau'],\n\t['&Upsilon;', '&#933;',  true, 'Upsilon'],\n\t['&Phi;',     '&#934;',  true, 'Phi'],\n\t['&Chi;',     '&#935;',  true, 'Chi'],\n\t['&Psi;',     '&#936;',  true, 'Psi'],\n\t['&Omega;',   '&#937;',  true, 'Omega'],\n\t['&alpha;',   '&#945;',  true, 'alpha'],\n\t['&beta;',    '&#946;',  true, 'beta'],\n\t['&gamma;',   '&#947;',  true, 'gamma'],\n\t['&delta;',   '&#948;',  true, 'delta'],\n\t['&epsilon;', '&#949;',  true, 'epsilon'],\n\t['&zeta;',    '&#950;',  true, 'zeta'],\n\t['&eta;',     '&#951;',  true, 'eta'],\n\t['&theta;',   '&#952;',  true, 'theta'],\n\t['&iota;',    '&#953;',  true, 'iota'],\n\t['&kappa;',   '&#954;',  true, 'kappa'],\n\t['&lambda;',  '&#955;',  true, 'lambda'],\n\t['&mu;',      '&#956;',  true, 'mu'],\n\t['&nu;',      '&#957;',  true, 'nu'],\n\t['&xi;',      '&#958;',  true, 'xi'],\n\t['&omicron;', '&#959;',  true, 'omicron'],\n\t['&pi;',      '&#960;',  true, 'pi'],\n\t['&rho;',     '&#961;',  true, 'rho'],\n\t['&sigmaf;',  '&#962;',  true, 'final sigma'],\n\t['&sigma;',   '&#963;',  true, 'sigma'],\n\t['&tau;',     '&#964;',  true, 'tau'],\n\t['&upsilon;', '&#965;',  true, 'upsilon'],\n\t['&phi;',     '&#966;',  true, 'phi'],\n\t['&chi;',     '&#967;',  true, 'chi'],\n\t['&psi;',     '&#968;',  true, 'psi'],\n\t['&omega;',   '&#969;',  true, 'omega'],\n// symbols\n\t['&alefsym;', '&#8501;', false,'alef symbol'],\n\t['&piv;',     '&#982;',  false,'pi symbol'],\n\t['&real;',    '&#8476;', false,'real part symbol'],\n\t['&thetasym;','&#977;',  false,'theta symbol'],\n\t['&upsih;',   '&#978;',  false,'upsilon - hook symbol'],\n\t['&weierp;',  '&#8472;', false,'Weierstrass p'],\n\t['&image;',   '&#8465;', false,'imaginary part'],\n// arrows\n\t['&larr;',    '&#8592;', true, 'leftwards arrow'],\n\t['&uarr;',    '&#8593;', true, 'upwards arrow'],\n\t['&rarr;',    '&#8594;', true, 'rightwards arrow'],\n\t['&darr;',    '&#8595;', true, 'downwards arrow'],\n\t['&harr;',    '&#8596;', true, 'left right arrow'],\n\t['&crarr;',   '&#8629;', false,'carriage return'],\n\t['&lArr;',    '&#8656;', false,'leftwards double arrow'],\n\t['&uArr;',    '&#8657;', false,'upwards double arrow'],\n\t['&rArr;',    '&#8658;', false,'rightwards double arrow'],\n\t['&dArr;',    '&#8659;', false,'downwards double arrow'],\n\t['&hArr;',    '&#8660;', false,'left right double arrow'],\n\t['&there4;',  '&#8756;', false,'therefore'],\n\t['&sub;',     '&#8834;', false,'subset of'],\n\t['&sup;',     '&#8835;', false,'superset of'],\n\t['&nsub;',    '&#8836;', false,'not a subset of'],\n\t['&sube;',    '&#8838;', false,'subset of or equal to'],\n\t['&supe;',    '&#8839;', false,'superset of or equal to'],\n\t['&oplus;',   '&#8853;', false,'circled plus'],\n\t['&otimes;',  '&#8855;', false,'circled times'],\n\t['&perp;',    '&#8869;', false,'perpendicular'],\n\t['&sdot;',    '&#8901;', false,'dot operator'],\n\t['&lceil;',   '&#8968;', false,'left ceiling'],\n\t['&rceil;',   '&#8969;', false,'right ceiling'],\n\t['&lfloor;',  '&#8970;', false,'left floor'],\n\t['&rfloor;',  '&#8971;', false,'right floor'],\n\t['&lang;',    '&#9001;', false,'left-pointing angle bracket'],\n\t['&rang;',    '&#9002;', false,'right-pointing angle bracket'],\n\t['&loz;',     '&#9674;', true, 'lozenge'],\n\t['&spades;',  '&#9824;', true, 'black spade suit'],\n\t['&clubs;',   '&#9827;', true, 'black club suit'],\n\t['&hearts;',  '&#9829;', true, 'black heart suit'],\n\t['&diams;',   '&#9830;', true, 'black diamond suit'],\n\t['&ensp;',    '&#8194;', false,'en space'],\n\t['&emsp;',    '&#8195;', false,'em space'],\n\t['&thinsp;',  '&#8201;', false,'thin space'],\n\t['&zwnj;',    '&#8204;', false,'zero width non-joiner'],\n\t['&zwj;',     '&#8205;', false,'zero width joiner'],\n\t['&lrm;',     '&#8206;', false,'left-to-right mark'],\n\t['&rlm;',     '&#8207;', false,'right-to-left mark'],\n\t['&shy;',     '&#173;',  false,'soft hyphen']\n];\n\ntinyMCEPopup.onInit.add(function() {\n\ttinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());\n\taddKeyboardNavigation();\n});\n\nfunction addKeyboardNavigation(){\n\tvar tableElm, cells, settings;\n\n\tcells = tinyMCEPopup.dom.select(\"a.charmaplink\", \"charmapgroup\");\n\n\tsettings ={\n\t\troot: \"charmapgroup\",\n\t\titems: cells\n\t};\n\tcells[0].tabindex=0;\n\ttinyMCEPopup.dom.addClass(cells[0], \"mceFocus\");\n\tif (tinymce.isGecko) {\n\t\tcells[0].focus();\t\t\n\t} else {\n\t\tsetTimeout(function(){\n\t\t\tcells[0].focus();\n\t\t}, 100);\n\t}\n\ttinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom);\n}\n\nfunction renderCharMapHTML() {\n\tvar charsPerRow = 20, tdWidth=20, tdHeight=20, i;\n\tvar html = '<div id=\"charmapgroup\" aria-labelledby=\"charmap_label\" tabindex=\"0\" role=\"listbox\">'+\n\t'<table role=\"presentation\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"' + (tdWidth*charsPerRow) + \n\t'\"><tr height=\"' + tdHeight + '\">';\n\tvar cols=-1;\n\n\tfor (i=0; i<charmap.length; i++) {\n\t\tvar previewCharFn;\n\n\t\tif (charmap[i][2]==true) {\n\t\t\tcols++;\n\t\t\tpreviewCharFn = 'previewChar(\\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\\',\\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\\',\\'' + charmap[i][3] + '\\');';\n\t\t\thtml += ''\n\t\t\t\t+ '<td class=\"charmap\">'\n\t\t\t\t+ '<a class=\"charmaplink\" role=\"button\" onmouseover=\"'+previewCharFn+'\" onfocus=\"'+previewCharFn+'\" href=\"javascript:void(0)\" onclick=\"insertChar(\\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\\');\" onclick=\"return false;\" onmousedown=\"return false;\" title=\"' + charmap[i][3] + ' '+ tinyMCEPopup.editor.translate(\"advanced_dlg.charmap_usage\")+'\">'\n\t\t\t\t+ charmap[i][1]\n\t\t\t\t+ '</a></td>';\n\t\t\tif ((cols+1) % charsPerRow == 0)\n\t\t\t\thtml += '</tr><tr height=\"' + tdHeight + '\">';\n\t\t}\n\t }\n\n\tif (cols % charsPerRow > 0) {\n\t\tvar padd = charsPerRow - (cols % charsPerRow);\n\t\tfor (var i=0; i<padd-1; i++)\n\t\t\thtml += '<td width=\"' + tdWidth + '\" height=\"' + tdHeight + '\" class=\"charmap\">&nbsp;</td>';\n\t}\n\n\thtml += '</tr></table></div>';\n\thtml = html.replace(/<tr height=\"20\"><\\/tr>/g, '');\n\n\treturn html;\n}\n\nfunction insertChar(chr) {\n\ttinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';');\n\n\t// Refocus in window\n\tif (tinyMCEPopup.isWindow)\n\t\twindow.focus();\n\n\ttinyMCEPopup.editor.focus();\n\ttinyMCEPopup.close();\n}\n\nfunction previewChar(codeA, codeB, codeN) {\n\tvar elmA = document.getElementById('codeA');\n\tvar elmB = document.getElementById('codeB');\n\tvar elmV = document.getElementById('codeV');\n\tvar elmN = document.getElementById('codeN');\n\n\tif (codeA=='#160;') {\n\t\telmV.innerHTML = '__';\n\t} else {\n\t\telmV.innerHTML = '&' + codeA;\n\t}\n\n\telmB.innerHTML = '&amp;' + codeA;\n\telmA.innerHTML = '&amp;' + codeB;\n\telmN.innerHTML = codeN;\n}\n","Magento_Tinymce3/tiny_mce/themes/advanced/langs/en_dlg.js":"tinyMCE.addI18n('en.advanced_dlg', {\"link_list\":\"Link List\",\"link_is_external\":\"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?\",\"link_is_email\":\"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?\",\"link_titlefield\":\"Title\",\"link_target_blank\":\"Open Link in a New Window\",\"link_target_same\":\"Open Link in the Same Window\",\"link_target\":\"Target\",\"link_url\":\"Link URL\",\"link_title\":\"Insert/Edit Link\",\"image_align_right\":\"Right\",\"image_align_left\":\"Left\",\"image_align_textbottom\":\"Text Bottom\",\"image_align_texttop\":\"Text Top\",\"image_align_bottom\":\"Bottom\",\"image_align_middle\":\"Middle\",\"image_align_top\":\"Top\",\"image_align_baseline\":\"Baseline\",\"image_align\":\"Alignment\",\"image_hspace\":\"Horizontal Space\",\"image_vspace\":\"Vertical Space\",\"image_dimensions\":\"Dimensions\",\"image_alt\":\"Image Description\",\"image_list\":\"Image List\",\"image_border\":\"Border\",\"image_src\":\"Image URL\",\"image_title\":\"Insert/Edit Image\",\"charmap_title\":\"Select Special Character\", \"charmap_usage\":\"Use left and right arrows to navigate.\",\"colorpicker_name\":\"Name:\",\"colorpicker_color\":\"Color:\",\"colorpicker_named_title\":\"Named Colors\",\"colorpicker_named_tab\":\"Named\",\"colorpicker_palette_title\":\"Palette Colors\",\"colorpicker_palette_tab\":\"Palette\",\"colorpicker_picker_title\":\"Color Picker\",\"colorpicker_picker_tab\":\"Picker\",\"colorpicker_title\":\"Select a Color\",\"code_wordwrap\":\"Word Wrap\",\"code_title\":\"HTML Source Editor\",\"anchor_name\":\"Anchor Name\",\"anchor_title\":\"Insert/Edit Anchor\",\"about_loaded\":\"Loaded Plugins\",\"about_version\":\"Version\",\"about_author\":\"Author\",\"about_plugin\":\"Plugin\",\"about_plugins\":\"Plugins\",\"about_license\":\"License\",\"about_help\":\"Help\",\"about_general\":\"About\",\"about_title\":\"About TinyMCE\",\"anchor_invalid\":\"Please specify a valid anchor name.\",\"accessibility_help\":\"Accessibility Help\",\"accessibility_usage_title\":\"General Usage\",\"\":\"\"});\n","Magento_Tinymce3/tiny_mce/themes/advanced/langs/en.js":"tinyMCE.addI18n('en.advanced',{\"underline_desc\":\"Underline (Ctrl+U)\",\"italic_desc\":\"Italic (Ctrl+I)\",\"bold_desc\":\"Bold (Ctrl+B)\",dd:\"Definition Description\",dt:\"Definition Term \",samp:\"Code Sample\",code:\"Code\",blockquote:\"Block Quote\",h6:\"Heading 6\",h5:\"Heading 5\",h4:\"Heading 4\",h3:\"Heading 3\",h2:\"Heading 2\",h1:\"Heading 1\",pre:\"Preformatted\",address:\"Address\",div:\"DIV\",paragraph:\"Paragraph\",block:\"Format\",fontdefault:\"Font Family\",\"font_size\":\"Font Size\",\"style_select\":\"Styles\",\"anchor_delta_height\":\"\",\"anchor_delta_width\":\"\",\"charmap_delta_height\":\"\",\"charmap_delta_width\":\"\",\"colorpicker_delta_height\":\"\",\"colorpicker_delta_width\":\"\",\"link_delta_height\":\"\",\"link_delta_width\":\"\",\"image_delta_height\":\"\",\"image_delta_width\":\"\",\"more_colors\":\"More Colors...\",\"toolbar_focus\":\"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X\",newdocument:\"Are you sure you want clear all contents?\",path:\"Path\",\"clipboard_msg\":\"Copy/Cut/Paste is not available in Mozilla and Firefox.\\nDo you want more information about this issue?\",\"blockquote_desc\":\"Block Quote\",\"help_desc\":\"Help\",\"newdocument_desc\":\"New Document\",\"image_props_desc\":\"Image Properties\",\"paste_desc\":\"Paste (Ctrl+V)\",\"copy_desc\":\"Copy (Ctrl+C)\",\"cut_desc\":\"Cut (Ctrl+X)\",\"anchor_desc\":\"Insert/Edit Anchor\",\"visualaid_desc\":\"show/Hide Guidelines/Invisible Elements\",\"charmap_desc\":\"Insert Special Character\",\"backcolor_desc\":\"Select Background Color\",\"forecolor_desc\":\"Select Text Color\",\"custom1_desc\":\"Your Custom Description Here\",\"removeformat_desc\":\"Remove Formatting\",\"hr_desc\":\"Insert Horizontal Line\",\"sup_desc\":\"Superscript\",\"sub_desc\":\"Subscript\",\"code_desc\":\"Edit HTML Source\",\"cleanup_desc\":\"Cleanup Messy Code\",\"image_desc\":\"Insert/Edit Image\",\"unlink_desc\":\"Unlink\",\"link_desc\":\"Insert/Edit Link\",\"redo_desc\":\"Redo (Ctrl+Y)\",\"undo_desc\":\"Undo (Ctrl+Z)\",\"indent_desc\":\"Increase Indent\",\"outdent_desc\":\"Decrease Indent\",\"numlist_desc\":\"Insert/Remove Numbered List\",\"bullist_desc\":\"Insert/Remove Bulleted List\",\"justifyfull_desc\":\"Align Full\",\"justifyright_desc\":\"Align Right\",\"justifycenter_desc\":\"Align Center\",\"justifyleft_desc\":\"Align Left\",\"striketrough_desc\":\"Strikethrough\",\"help_shortcut\":\"Press ALT-F10 for toolbar. Press ALT-0 for help\",\"rich_text_area\":\"Rich Text Area\",\"shortcuts_desc\":\"Accessability Help\",toolbar:\"Toolbar\"});","Magento_Tinymce3/tiny_mce/themes/simple/editor_template_src.js":"/**\n * editor_template_src.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n(function() {\n\tvar DOM = tinymce.DOM;\n\n\t// Tell it to load theme specific language pack(s)\n\ttinymce.ThemeManager.requireLangPack('simple');\n\n\ttinymce.create('tinymce.themes.SimpleTheme', {\n\t\tinit : function(ed, url) {\n\t\t\tvar t = this, states = ['Bold', 'Italic', 'Underline', 'Strikethrough', 'InsertUnorderedList', 'InsertOrderedList'], s = ed.settings;\n\n\t\t\tt.editor = ed;\n\t\t\ted.contentCSS.push(url + \"/skins/\" + s.skin + \"/content.css\");\n\n\t\t\ted.onInit.add(function() {\n\t\t\t\ted.onNodeChange.add(function(ed, cm) {\n\t\t\t\t\ttinymce.each(states, function(c) {\n\t\t\t\t\t\tcm.get(c.toLowerCase()).setActive(ed.queryCommandState(c));\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tDOM.loadCSS((s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : '') || url + \"/skins/\" + s.skin + \"/ui.css\");\n\t\t},\n\n\t\trenderUI : function(o) {\n\t\t\tvar t = this, n = o.targetNode, ic, tb, ed = t.editor, cf = ed.controlManager, sc;\n\n\t\t\tn = DOM.insertAfter(DOM.create('span', {id : ed.id + '_container', 'class' : 'mceEditor ' + ed.settings.skin + 'SimpleSkin'}), n);\n\t\t\tn = sc = DOM.add(n, 'table', {cellPadding : 0, cellSpacing : 0, 'class' : 'mceLayout'});\n\t\t\tn = tb = DOM.add(n, 'tbody');\n\n\t\t\t// Create iframe container\n\t\t\tn = DOM.add(tb, 'tr');\n\t\t\tn = ic = DOM.add(DOM.add(n, 'td'), 'div', {'class' : 'mceIframeContainer'});\n\n\t\t\t// Create toolbar container\n\t\t\tn = DOM.add(DOM.add(tb, 'tr', {'class' : 'last'}), 'td', {'class' : 'mceToolbar mceLast', align : 'center'});\n\n\t\t\t// Create toolbar\n\t\t\ttb = t.toolbar = cf.createToolbar(\"tools1\");\n\t\t\ttb.add(cf.createButton('bold', {title : 'simple.bold_desc', cmd : 'Bold'}));\n\t\t\ttb.add(cf.createButton('italic', {title : 'simple.italic_desc', cmd : 'Italic'}));\n\t\t\ttb.add(cf.createButton('underline', {title : 'simple.underline_desc', cmd : 'Underline'}));\n\t\t\ttb.add(cf.createButton('strikethrough', {title : 'simple.striketrough_desc', cmd : 'Strikethrough'}));\n\t\t\ttb.add(cf.createSeparator());\n\t\t\ttb.add(cf.createButton('undo', {title : 'simple.undo_desc', cmd : 'Undo'}));\n\t\t\ttb.add(cf.createButton('redo', {title : 'simple.redo_desc', cmd : 'Redo'}));\n\t\t\ttb.add(cf.createSeparator());\n\t\t\ttb.add(cf.createButton('cleanup', {title : 'simple.cleanup_desc', cmd : 'mceCleanup'}));\n\t\t\ttb.add(cf.createSeparator());\n\t\t\ttb.add(cf.createButton('insertunorderedlist', {title : 'simple.bullist_desc', cmd : 'InsertUnorderedList'}));\n\t\t\ttb.add(cf.createButton('insertorderedlist', {title : 'simple.numlist_desc', cmd : 'InsertOrderedList'}));\n\t\t\ttb.renderTo(n);\n\n\t\t\treturn {\n\t\t\t\tiframeContainer : ic,\n\t\t\t\teditorContainer : ed.id + '_container',\n\t\t\t\tsizeContainer : sc,\n\t\t\t\tdeltaHeight : -20\n\t\t\t};\n\t\t},\n\n\t\tgetInfo : function() {\n\t\t\treturn {\n\t\t\t\tlongname : 'Simple theme',\n\t\t\t\tauthor : 'Moxiecode Systems AB',\n\t\t\t\tauthorurl : 'http://tinymce.moxiecode.com',\n\t\t\t\tversion : tinymce.majorVersion + \".\" + tinymce.minorVersion\n\t\t\t}\n\t\t}\n\t});\n\n\ttinymce.ThemeManager.add('simple', tinymce.themes.SimpleTheme);\n})();","Magento_Tinymce3/tiny_mce/themes/simple/editor_template.js":"(function(){var a=tinymce.DOM;tinymce.ThemeManager.requireLangPack(\"simple\");tinymce.create(\"tinymce.themes.SimpleTheme\",{init:function(c,d){var e=this,b=[\"Bold\",\"Italic\",\"Underline\",\"Strikethrough\",\"InsertUnorderedList\",\"InsertOrderedList\"],f=c.settings;e.editor=c;c.contentCSS.push(d+\"/skins/\"+f.skin+\"/content.css\");c.onInit.add(function(){c.onNodeChange.add(function(h,g){tinymce.each(b,function(i){g.get(i.toLowerCase()).setActive(h.queryCommandState(i))})})});a.loadCSS((f.editor_css?c.documentBaseURI.toAbsolute(f.editor_css):\"\")||d+\"/skins/\"+f.skin+\"/ui.css\")},renderUI:function(h){var e=this,i=h.targetNode,b,c,d=e.editor,f=d.controlManager,g;i=a.insertAfter(a.create(\"span\",{id:d.id+\"_container\",\"class\":\"mceEditor \"+d.settings.skin+\"SimpleSkin\"}),i);i=g=a.add(i,\"table\",{cellPadding:0,cellSpacing:0,\"class\":\"mceLayout\"});i=c=a.add(i,\"tbody\");i=a.add(c,\"tr\");i=b=a.add(a.add(i,\"td\"),\"div\",{\"class\":\"mceIframeContainer\"});i=a.add(a.add(c,\"tr\",{\"class\":\"last\"}),\"td\",{\"class\":\"mceToolbar mceLast\",align:\"center\"});c=e.toolbar=f.createToolbar(\"tools1\");c.add(f.createButton(\"bold\",{title:\"simple.bold_desc\",cmd:\"Bold\"}));c.add(f.createButton(\"italic\",{title:\"simple.italic_desc\",cmd:\"Italic\"}));c.add(f.createButton(\"underline\",{title:\"simple.underline_desc\",cmd:\"Underline\"}));c.add(f.createButton(\"strikethrough\",{title:\"simple.striketrough_desc\",cmd:\"Strikethrough\"}));c.add(f.createSeparator());c.add(f.createButton(\"undo\",{title:\"simple.undo_desc\",cmd:\"Undo\"}));c.add(f.createButton(\"redo\",{title:\"simple.redo_desc\",cmd:\"Redo\"}));c.add(f.createSeparator());c.add(f.createButton(\"cleanup\",{title:\"simple.cleanup_desc\",cmd:\"mceCleanup\"}));c.add(f.createSeparator());c.add(f.createButton(\"insertunorderedlist\",{title:\"simple.bullist_desc\",cmd:\"InsertUnorderedList\"}));c.add(f.createButton(\"insertorderedlist\",{title:\"simple.numlist_desc\",cmd:\"InsertOrderedList\"}));c.renderTo(i);return{iframeContainer:b,editorContainer:d.id+\"_container\",sizeContainer:g,deltaHeight:-20}},getInfo:function(){return{longname:\"Simple theme\",author:\"Moxiecode Systems AB\",authorurl:\"http://tinymce.moxiecode.com\",version:tinymce.majorVersion+\".\"+tinymce.minorVersion}}});tinymce.ThemeManager.add(\"simple\",tinymce.themes.SimpleTheme)})();","Magento_Tinymce3/tiny_mce/themes/simple/langs/en.js":"tinyMCE.addI18n('en.simple',{\"cleanup_desc\":\"Cleanup Messy Code\",\"redo_desc\":\"Redo (Ctrl+Y)\",\"undo_desc\":\"Undo (Ctrl+Z)\",\"numlist_desc\":\"Insert/Remove Numbered List\",\"bullist_desc\":\"Insert/Remove Bulleted List\",\"striketrough_desc\":\"Strikethrough\",\"underline_desc\":\"Underline (Ctrl+U)\",\"italic_desc\":\"Italic (Ctrl+I)\",\"bold_desc\":\"Bold (Ctrl+B)\"});","Magento_Tinymce3/tiny_mce/utils/validate.js":"/**\n * validate.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\n/**\n\t// String validation:\n\n\tif (!Validator.isEmail('myemail'))\n\t\talert('Invalid email.');\n\n\t// Form validation:\n\n\tvar f = document.forms['myform'];\n\n\tif (!Validator.isEmail(f.myemail))\n\t\talert('Invalid email.');\n*/\n\nvar Validator = {\n\tisEmail : function(s) {\n\t\treturn this.test(s, '^[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\\'*+\\\\/0-9=?A-Z^_`a-z{|}~]+\\.[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+$');\n\t},\n\n\tisAbsUrl : function(s) {\n\t\treturn this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\\\.]+\\\\/?.*$');\n\t},\n\n\tisSize : function(s) {\n\t\treturn this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$');\n\t},\n\n\tisId : function(s) {\n\t\treturn this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');\n\t},\n\n\tisEmpty : function(s) {\n\t\tvar nl, i;\n\n\t\tif (s.nodeName == 'SELECT' && s.selectedIndex < 1)\n\t\t\treturn true;\n\n\t\tif (s.type == 'checkbox' && !s.checked)\n\t\t\treturn true;\n\n\t\tif (s.type == 'radio') {\n\t\t\tfor (i=0, nl = s.form.elements; i<nl.length; i++) {\n\t\t\t\tif (nl[i].type == \"radio\" && nl[i].name == s.name && nl[i].checked)\n\t\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn new RegExp('^\\\\s*$').test(s.nodeType == 1 ? s.value : s);\n\t},\n\n\tisNumber : function(s, d) {\n\t\treturn !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\\\.[0-9]*$'));\n\t},\n\n\ttest : function(s, p) {\n\t\ts = s.nodeType == 1 ? s.value : s;\n\n\t\treturn s == '' || new RegExp(p).test(s);\n\t}\n};\n\nvar AutoValidator = {\n\tsettings : {\n\t\tid_cls : 'id',\n\t\tint_cls : 'int',\n\t\turl_cls : 'url',\n\t\tnumber_cls : 'number',\n\t\temail_cls : 'email',\n\t\tsize_cls : 'size',\n\t\trequired_cls : 'required',\n\t\tinvalid_cls : 'invalid',\n\t\tmin_cls : 'min',\n\t\tmax_cls : 'max'\n\t},\n\n\tinit : function(s) {\n\t\tvar n;\n\n\t\tfor (n in s)\n\t\t\tthis.settings[n] = s[n];\n\t},\n\n\tvalidate : function(f) {\n\t\tvar i, nl, s = this.settings, c = 0;\n\n\t\tnl = this.tags(f, 'label');\n\t\tfor (i=0; i<nl.length; i++) {\n\t\t\tthis.removeClass(nl[i], s.invalid_cls);\n\t\t\tnl[i].setAttribute('aria-invalid', false);\n\t\t}\n\n\t\tc += this.validateElms(f, 'input');\n\t\tc += this.validateElms(f, 'select');\n\t\tc += this.validateElms(f, 'textarea');\n\n\t\treturn c == 3;\n\t},\n\n\tinvalidate : function(n) {\n\t\tthis.mark(n.form, n);\n\t},\n\t\n\tgetErrorMessages : function(f) {\n\t\tvar nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;\n\t\tnl = this.tags(f, \"label\");\n\t\tfor (i=0; i<nl.length; i++) {\n\t\t\tif (this.hasClass(nl[i], s.invalid_cls)) {\n\t\t\t\tfield = document.getElementById(nl[i].getAttribute(\"for\"));\n\t\t\t\tvalues = { field: nl[i].textContent };\n\t\t\t\tif (this.hasClass(field, s.min_cls, true)) {\n\t\t\t\t\tmessage = ed.getLang('invalid_data_min');\n\t\t\t\t\tvalues.min = this.getNum(field, s.min_cls);\n\t\t\t\t} else if (this.hasClass(field, s.number_cls)) {\n\t\t\t\t\tmessage = ed.getLang('invalid_data_number');\n\t\t\t\t} else if (this.hasClass(field, s.size_cls)) {\n\t\t\t\t\tmessage = ed.getLang('invalid_data_size');\n\t\t\t\t} else {\n\t\t\t\t\tmessage = ed.getLang('invalid_data');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmessage = message.replace(/{\\#([^}]+)\\}/g, function(a, b) {\n\t\t\t\t\treturn values[b] || '{#' + b + '}';\n\t\t\t\t});\n\t\t\t\tmessages.push(message);\n\t\t\t}\n\t\t}\n\t\treturn messages;\n\t},\n\n\treset : function(e) {\n\t\tvar t = ['label', 'input', 'select', 'textarea'];\n\t\tvar i, j, nl, s = this.settings;\n\n\t\tif (e == null)\n\t\t\treturn;\n\n\t\tfor (i=0; i<t.length; i++) {\n\t\t\tnl = this.tags(e.form ? e.form : e, t[i]);\n\t\t\tfor (j=0; j<nl.length; j++) {\n\t\t\t\tthis.removeClass(nl[j], s.invalid_cls);\n\t\t\t\tnl[j].setAttribute('aria-invalid', false);\n\t\t\t}\n\t\t}\n\t},\n\n\tvalidateElms : function(f, e) {\n\t\tvar nl, i, n, s = this.settings, st = true, va = Validator, v;\n\n\t\tnl = this.tags(f, e);\n\t\tfor (i=0; i<nl.length; i++) {\n\t\t\tn = nl[i];\n\n\t\t\tthis.removeClass(n, s.invalid_cls);\n\n\t\t\tif (this.hasClass(n, s.required_cls) && va.isEmpty(n))\n\t\t\t\tst = this.mark(f, n);\n\n\t\t\tif (this.hasClass(n, s.number_cls) && !va.isNumber(n))\n\t\t\t\tst = this.mark(f, n);\n\n\t\t\tif (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))\n\t\t\t\tst = this.mark(f, n);\n\n\t\t\tif (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))\n\t\t\t\tst = this.mark(f, n);\n\n\t\t\tif (this.hasClass(n, s.email_cls) && !va.isEmail(n))\n\t\t\t\tst = this.mark(f, n);\n\n\t\t\tif (this.hasClass(n, s.size_cls) && !va.isSize(n))\n\t\t\t\tst = this.mark(f, n);\n\n\t\t\tif (this.hasClass(n, s.id_cls) && !va.isId(n))\n\t\t\t\tst = this.mark(f, n);\n\n\t\t\tif (this.hasClass(n, s.min_cls, true)) {\n\t\t\t\tv = this.getNum(n, s.min_cls);\n\n\t\t\t\tif (isNaN(v) || parseInt(n.value) < parseInt(v))\n\t\t\t\t\tst = this.mark(f, n);\n\t\t\t}\n\n\t\t\tif (this.hasClass(n, s.max_cls, true)) {\n\t\t\t\tv = this.getNum(n, s.max_cls);\n\n\t\t\t\tif (isNaN(v) || parseInt(n.value) > parseInt(v))\n\t\t\t\t\tst = this.mark(f, n);\n\t\t\t}\n\t\t}\n\n\t\treturn st;\n\t},\n\n\thasClass : function(n, c, d) {\n\t\treturn new RegExp('\\\\b' + c + (d ? '[0-9]+' : '') + '\\\\b', 'g').test(n.className);\n\t},\n\n\tgetNum : function(n, c) {\n\t\tc = n.className.match(new RegExp('\\\\b' + c + '([0-9]+)\\\\b', 'g'))[0];\n\t\tc = c.replace(/[^0-9]/g, '');\n\n\t\treturn c;\n\t},\n\n\taddClass : function(n, c, b) {\n\t\tvar o = this.removeClass(n, c);\n\t\tn.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;\n\t},\n\n\tremoveClass : function(n, c) {\n\t\tc = n.className.replace(new RegExp(\"(^|\\\\s+)\" + c + \"(\\\\s+|$)\"), ' ');\n\t\treturn n.className = c != ' ' ? c : '';\n\t},\n\n\ttags : function(f, s) {\n\t\treturn f.getElementsByTagName(s);\n\t},\n\n\tmark : function(f, n) {\n\t\tvar s = this.settings;\n\n\t\tthis.addClass(n, s.invalid_cls);\n\t\tn.setAttribute('aria-invalid', 'true');\n\t\tthis.markLabels(f, n, s.invalid_cls);\n\n\t\treturn false;\n\t},\n\n\tmarkLabels : function(f, n, ic) {\n\t\tvar nl, i;\n\n\t\tnl = this.tags(f, \"label\");\n\t\tfor (i=0; i<nl.length; i++) {\n\t\t\tif (nl[i].getAttribute(\"for\") == n.id || nl[i].htmlFor == n.id)\n\t\t\t\tthis.addClass(nl[i], ic);\n\t\t}\n\n\t\treturn null;\n\t}\n};\n","Magento_Tinymce3/tiny_mce/utils/mctabs.js":"/**\n * mctabs.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\nfunction MCTabs() {\n\tthis.settings = [];\n\tthis.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');\n};\n\nMCTabs.prototype.init = function(settings) {\n\tthis.settings = settings;\n};\n\nMCTabs.prototype.getParam = function(name, default_value) {\n\tvar value = null;\n\n\tvalue = (typeof(this.settings[name]) == \"undefined\") ? default_value : this.settings[name];\n\n\t// Fix bool values\n\tif (value == \"true\" || value == \"false\")\n\t\treturn (value == \"true\");\n\n\treturn value;\n};\n\nMCTabs.prototype.showTab =function(tab){\n\ttab.className = 'current';\n\ttab.setAttribute(\"aria-selected\", true);\n\ttab.setAttribute(\"aria-expanded\", true);\n\ttab.tabIndex = 0;\n};\n\nMCTabs.prototype.hideTab =function(tab){\n\tvar t=this;\n\n\ttab.className = '';\n\ttab.setAttribute(\"aria-selected\", false);\n\ttab.setAttribute(\"aria-expanded\", false);\n\ttab.tabIndex = -1;\n};\n\nMCTabs.prototype.showPanel = function(panel) {\n\tpanel.className = 'current'; \n\tpanel.setAttribute(\"aria-hidden\", false);\n};\n\nMCTabs.prototype.hidePanel = function(panel) {\n\tpanel.className = 'panel';\n\tpanel.setAttribute(\"aria-hidden\", true);\n}; \n\nMCTabs.prototype.getPanelForTab = function(tabElm) {\n\treturn tinyMCEPopup.dom.getAttrib(tabElm, \"aria-controls\");\n};\n\nMCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) {\n\tvar panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;\n\n\ttabElm = document.getElementById(tab_id);\n\n\tif (panel_id === undefined) {\n\t\tpanel_id = t.getPanelForTab(tabElm);\n\t}\n\n\tpanelElm= document.getElementById(panel_id);\n\tpanelContainerElm = panelElm ? panelElm.parentNode : null;\n\ttabContainerElm = tabElm ? tabElm.parentNode : null;\n\tselectionClass = t.getParam('selection_class', 'current');\n\n\tif (tabElm && tabContainerElm) {\n\t\tnodes = tabContainerElm.childNodes;\n\n\t\t// Hide all other tabs\n\t\tfor (i = 0; i < nodes.length; i++) {\n\t\t\tif (nodes[i].nodeName == \"LI\") {\n\t\t\t\tt.hideTab(nodes[i]);\n\t\t\t}\n\t\t}\n\n\t\t// Show selected tab\n\t\tt.showTab(tabElm);\n\t}\n\n\tif (panelElm && panelContainerElm) {\n\t\tnodes = panelContainerElm.childNodes;\n\n\t\t// Hide all other panels\n\t\tfor (i = 0; i < nodes.length; i++) {\n\t\t\tif (nodes[i].nodeName == \"DIV\")\n\t\t\t\tt.hidePanel(nodes[i]);\n\t\t}\n\n\t\tif (!avoid_focus) { \n\t\t\ttabElm.focus();\n\t\t}\n\n\t\t// Show selected panel\n\t\tt.showPanel(panelElm);\n\t}\n};\n\nMCTabs.prototype.getAnchor = function() {\n\tvar pos, url = document.location.href;\n\n\tif ((pos = url.lastIndexOf('#')) != -1)\n\t\treturn url.substring(pos + 1);\n\n\treturn \"\";\n};\n\n\n//Global instance\nvar mcTabs = new MCTabs();\n\ntinyMCEPopup.onInit.add(function() {\n\tvar tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;\n\n\teach(dom.select('div.tabs'), function(tabContainerElm) {\n\t\tvar keyNav;\n\n\t\tdom.setAttrib(tabContainerElm, \"role\", \"tablist\"); \n\n\t\tvar items = tinyMCEPopup.dom.select('li', tabContainerElm);\n\t\tvar action = function(id) {\n\t\t\tmcTabs.displayTab(id, mcTabs.getPanelForTab(id));\n\t\t\tmcTabs.onChange.dispatch(id);\n\t\t};\n\n\t\teach(items, function(item) {\n\t\t\tdom.setAttrib(item, 'role', 'tab');\n\t\t\tdom.bind(item, 'click', function(evt) {\n\t\t\t\taction(item.id);\n\t\t\t});\n\t\t});\n\n\t\tdom.bind(dom.getRoot(), 'keydown', function(evt) {\n\t\t\tif (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab\n\t\t\t\tkeyNav.moveFocus(evt.shiftKey ? -1 : 1);\n\t\t\t\ttinymce.dom.Event.cancel(evt);\n\t\t\t}\n\t\t});\n\n\t\teach(dom.select('a', tabContainerElm), function(a) {\n\t\t\tdom.setAttrib(a, 'tabindex', '-1');\n\t\t});\n\n\t\tkeyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {\n\t\t\troot: tabContainerElm,\n\t\t\titems: items,\n\t\t\tonAction: action,\n\t\t\tactOnFocus: true,\n\t\t\tenableLeftRight: true,\n\t\t\tenableUpDown: true\n\t\t}, tinyMCEPopup.dom);\n\t});\n});","Magento_Tinymce3/tiny_mce/utils/editable_selects.js":"/**\n * editable_selects.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\nvar TinyMCE_EditableSelects = {\n\teditSelectElm : null,\n\n\tinit : function() {\n\t\tvar nl = document.getElementsByTagName(\"select\"), i, d = document, o;\n\n\t\tfor (i=0; i<nl.length; i++) {\n\t\t\tif (nl[i].className.indexOf('mceEditableSelect') != -1) {\n\t\t\t\to = new Option(tinyMCEPopup.editor.translate('value'), '__mce_add_custom__');\n\n\t\t\t\to.className = 'mceAddSelectValue';\n\n\t\t\t\tnl[i].options[nl[i].options.length] = o;\n\t\t\t\tnl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;\n\t\t\t}\n\t\t}\n\t},\n\n\tonChangeEditableSelect : function(e) {\n\t\tvar d = document, ne, se = window.event ? window.event.srcElement : e.target;\n\n\t\tif (se.options[se.selectedIndex].value == '__mce_add_custom__') {\n\t\t\tne = d.createElement(\"input\");\n\t\t\tne.id = se.id + \"_custom\";\n\t\t\tne.name = se.name + \"_custom\";\n\t\t\tne.type = \"text\";\n\n\t\t\tne.style.width = se.offsetWidth + 'px';\n\t\t\tse.parentNode.insertBefore(ne, se);\n\t\t\tse.style.display = 'none';\n\t\t\tne.focus();\n\t\t\tne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;\n\t\t\tne.onkeydown = TinyMCE_EditableSelects.onKeyDown;\n\t\t\tTinyMCE_EditableSelects.editSelectElm = se;\n\t\t}\n\t},\n\n\tonBlurEditableSelectInput : function() {\n\t\tvar se = TinyMCE_EditableSelects.editSelectElm;\n\n\t\tif (se) {\n\t\t\tif (se.previousSibling.value != '') {\n\t\t\t\taddSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);\n\t\t\t\tselectByValue(document.forms[0], se.id, se.previousSibling.value);\n\t\t\t} else\n\t\t\t\tselectByValue(document.forms[0], se.id, '');\n\n\t\t\tse.style.display = 'inline';\n\t\t\tse.parentNode.removeChild(se.previousSibling);\n\t\t\tTinyMCE_EditableSelects.editSelectElm = null;\n\t\t}\n\t},\n\n\tonKeyDown : function(e) {\n\t\te = e || window.event;\n\n\t\tif (e.keyCode == 13)\n\t\t\tTinyMCE_EditableSelects.onBlurEditableSelectInput();\n\t}\n};\n","Magento_Tinymce3/tiny_mce/utils/form_utils.js":"/**\n * form_utils.js\n *\n * Copyright 2009, Moxiecode Systems AB\n * Released under LGPL License.\n *\n * License: http://tinymce.moxiecode.com/license\n * Contributing: http://tinymce.moxiecode.com/contributing\n */\n\nvar themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam(\"theme\"));\n\nfunction getColorPickerHTML(id, target_form_element) {\n\tvar h = \"\", dom = tinyMCEPopup.dom;\n\n\tif (label = dom.select('label[for=' + target_form_element + ']')[0]) {\n\t\tlabel.id = label.id || dom.uniqueId();\n\t}\n\n\th += '<a role=\"button\" aria-labelledby=\"' + id + '_label\" id=\"' + id + '_link\" href=\"javascript:;\" onclick=\"tinyMCEPopup.pickColor(event,\\'' + target_form_element +'\\');\" onmousedown=\"return false;\" class=\"pickcolor\">';\n\th += '<span id=\"' + id + '\" title=\"' + tinyMCEPopup.getLang('browse') + '\">&nbsp;<span id=\"' + id + '_label\" class=\"mceVoiceLabel mceIconOnly\" style=\"display:none;\">' + tinyMCEPopup.getLang('browse') + '</span></span></a>';\n\n\treturn h;\n}\n\nfunction updateColor(img_id, form_element_id) {\n\tdocument.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;\n}\n\nfunction setBrowserDisabled(id, state) {\n\tvar img = document.getElementById(id);\n\tvar lnk = document.getElementById(id + \"_link\");\n\n\tif (lnk) {\n\t\tif (state) {\n\t\t\tlnk.setAttribute(\"realhref\", lnk.getAttribute(\"href\"));\n\t\t\tlnk.removeAttribute(\"href\");\n\t\t\ttinyMCEPopup.dom.addClass(img, 'disabled');\n\t\t} else {\n\t\t\tif (lnk.getAttribute(\"realhref\"))\n\t\t\t\tlnk.setAttribute(\"href\", lnk.getAttribute(\"realhref\"));\n\n\t\t\ttinyMCEPopup.dom.removeClass(img, 'disabled');\n\t\t}\n\t}\n}\n\nfunction getBrowserHTML(id, target_form_element, type, prefix) {\n\tvar option = prefix + \"_\" + type + \"_browser_callback\", cb, html;\n\n\tcb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam(\"file_browser_callback\"));\n\n\tif (!cb)\n\t\treturn \"\";\n\n\thtml = \"\";\n\thtml += '<a id=\"' + id + '_link\" href=\"javascript:openBrowser(\\'' + id + '\\',\\'' + target_form_element + '\\', \\'' + type + '\\',\\'' + option + '\\');\" onmousedown=\"return false;\" class=\"browse\">';\n\thtml += '<span id=\"' + id + '\" title=\"' + tinyMCEPopup.getLang('browse') + '\">&nbsp;</span></a>';\n\n\treturn html;\n}\n\nfunction openBrowser(img_id, target_form_element, type, option) {\n\tvar img = document.getElementById(img_id);\n\n\tif (img.className != \"mceButtonDisabled\")\n\t\ttinyMCEPopup.openBrowser(target_form_element, type, option);\n}\n\nfunction selectByValue(form_obj, field_name, value, add_custom, ignore_case) {\n\tif (!form_obj || !form_obj.elements[field_name])\n\t\treturn;\n\n\tif (!value)\n\t\tvalue = \"\";\n\n\tvar sel = form_obj.elements[field_name];\n\n\tvar found = false;\n\tfor (var i=0; i<sel.options.length; i++) {\n\t\tvar option = sel.options[i];\n\n\t\tif (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {\n\t\t\toption.selected = true;\n\t\t\tfound = true;\n\t\t} else\n\t\t\toption.selected = false;\n\t}\n\n\tif (!found && add_custom && value != '') {\n\t\tvar option = new Option(value, value);\n\t\toption.selected = true;\n\t\tsel.options[sel.options.length] = option;\n\t\tsel.selectedIndex = sel.options.length - 1;\n\t}\n\n\treturn found;\n}\n\nfunction getSelectValue(form_obj, field_name) {\n\tvar elm = form_obj.elements[field_name];\n\n\tif (elm == null || elm.options == null || elm.selectedIndex === -1)\n\t\treturn \"\";\n\n\treturn elm.options[elm.selectedIndex].value;\n}\n\nfunction addSelectValue(form_obj, field_name, name, value) {\n\tvar s = form_obj.elements[field_name];\n\tvar o = new Option(name, value);\n\ts.options[s.options.length] = o;\n}\n\nfunction addClassesToList(list_id, specific_option) {\n\t// Setup class droplist\n\tvar styleSelectElm = document.getElementById(list_id);\n\tvar styles = tinyMCEPopup.getParam('theme_advanced_styles', false);\n\tstyles = tinyMCEPopup.getParam(specific_option, styles);\n\n\tif (styles) {\n\t\tvar stylesAr = styles.split(';');\n\n\t\tfor (var i=0; i<stylesAr.length; i++) {\n\t\t\tif (stylesAr != \"\") {\n\t\t\t\tvar key, value;\n\n\t\t\t\tkey = stylesAr[i].split('=')[0];\n\t\t\t\tvalue = stylesAr[i].split('=')[1];\n\n\t\t\t\tstyleSelectElm.options[styleSelectElm.length] = new Option(key, value);\n\t\t\t}\n\t\t}\n\t} else {\n\t\ttinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {\n\t\t\tstyleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);\n\t\t});\n\t}\n}\n\nfunction isVisible(element_id) {\n\tvar elm = document.getElementById(element_id);\n\n\treturn elm && elm.style.display != \"none\";\n}\n\nfunction convertRGBToHex(col) {\n\tvar re = new RegExp(\"rgb\\\\s*\\\\(\\\\s*([0-9]+).*,\\\\s*([0-9]+).*,\\\\s*([0-9]+).*\\\\)\", \"gi\");\n\n\tvar rgb = col.replace(re, \"$1,$2,$3\").split(',');\n\tif (rgb.length == 3) {\n\t\tr = parseInt(rgb[0]).toString(16);\n\t\tg = parseInt(rgb[1]).toString(16);\n\t\tb = parseInt(rgb[2]).toString(16);\n\n\t\tr = r.length == 1 ? '0' + r : r;\n\t\tg = g.length == 1 ? '0' + g : g;\n\t\tb = b.length == 1 ? '0' + b : b;\n\n\t\treturn \"#\" + r + g + b;\n\t}\n\n\treturn col;\n}\n\nfunction convertHexToRGB(col) {\n\tif (col.indexOf('#') != -1) {\n\t\tcol = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');\n\n\t\tr = parseInt(col.substring(0, 2), 16);\n\t\tg = parseInt(col.substring(2, 4), 16);\n\t\tb = parseInt(col.substring(4, 6), 16);\n\n\t\treturn \"rgb(\" + r + \",\" + g + \",\" + b + \")\";\n\t}\n\n\treturn col;\n}\n\nfunction trimSize(size) {\n\treturn size.replace(/([0-9\\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2');\n}\n\nfunction getCSSSize(size) {\n\tsize = trimSize(size);\n\n\tif (size == \"\")\n\t\treturn \"\";\n\n\t// Add px\n\tif (/^[0-9]+$/.test(size))\n\t\tsize += 'px';\n\t// Sanity check, IE doesn't like broken values\n\telse if (!(/^[0-9\\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size)))\n\t\treturn \"\";\n\n\treturn size;\n}\n\nfunction getStyle(elm, attrib, style) {\n\tvar val = tinyMCEPopup.dom.getAttrib(elm, attrib);\n\n\tif (val != '')\n\t\treturn '' + val;\n\n\tif (typeof(style) == 'undefined')\n\t\tstyle = attrib;\n\n\treturn tinyMCEPopup.dom.getStyle(elm, style);\n}\n","Magento_Translation/add-class.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine(['jquery'], function ($) {\n    'use strict';\n\n    return function (config, element) {\n        $(element).addClass(config.class);\n    };\n});\n","Magento_Translation/js/add-class.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine(['jquery'], function ($) {\n    'use strict';\n\n    return function (config, element) {\n        $(element).addClass(config.class);\n    };\n});\n","Magento_Translation/js/i18n-config.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n(function () {\n    'use strict';\n\n    require.config({\n        config: {\n            'Magento_Ui/js/lib/knockout/bindings/i18n': {\n                inlineTranslation: true\n            }\n        }\n    });\n})();\n","Magento_Ui/js/block-loader.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'ko',\n    'jquery',\n    'Magento_Ui/js/lib/knockout/template/loader',\n    'mage/template'\n], function (ko, $, templateLoader, template) {\n    'use strict';\n\n    var blockLoaderTemplatePath = 'ui/block-loader',\n        blockContentLoadingClass = '_block-content-loading',\n        blockLoader,\n        blockLoaderClass,\n        loaderImageHref;\n\n    templateLoader.loadTemplate(blockLoaderTemplatePath).done(function (blockLoaderTemplate) {\n        blockLoader = template($.trim(blockLoaderTemplate), {\n            loaderImageHref: loaderImageHref\n        });\n        blockLoader = $(blockLoader);\n        blockLoaderClass = '.' + blockLoader.attr('class');\n    });\n\n    /**\n     * Helper function to check if blockContentLoading class should be applied.\n     * @param {Object} element\n     * @returns {Boolean}\n     */\n    function isLoadingClassRequired(element) {\n        var position = element.css('position');\n\n        if (position === 'absolute' || position === 'fixed') {\n            return false;\n        }\n\n        return true;\n    }\n\n    /**\n     * Add loader to block.\n     * @param {Object} element\n     */\n    function addBlockLoader(element) {\n        element.find(':focus').blur();\n        element.find('input:disabled, select:disabled').addClass('_disabled');\n        element.find('input, select').prop('disabled', true);\n\n        if (isLoadingClassRequired(element)) {\n            element.addClass(blockContentLoadingClass);\n        }\n        element.append(blockLoader.clone());\n    }\n\n    /**\n     * Remove loader from block.\n     * @param {Object} element\n     */\n    function removeBlockLoader(element) {\n        if (!element.has(blockLoaderClass).length) {\n            return;\n        }\n        element.find(blockLoaderClass).remove();\n        element.find('input:not(\"._disabled\"), select:not(\"._disabled\")').prop('disabled', false);\n        element.find('input:disabled, select:disabled').removeClass('_disabled');\n        element.removeClass(blockContentLoadingClass);\n    }\n\n    return function (loaderHref) {\n        loaderImageHref = loaderHref;\n        ko.bindingHandlers.blockLoader = {\n            /**\n             * Process loader for block\n             * @param {String} element\n             * @param {Boolean} displayBlockLoader\n             */\n            update: function (element, displayBlockLoader) {\n                element = $(element);\n\n                if (ko.unwrap(displayBlockLoader())) {\n                    addBlockLoader(element);\n                } else {\n                    removeBlockLoader(element);\n                }\n            }\n        };\n    };\n});\n","Magento_Ui/js/lib/collapsible.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([\n    'uiComponent'\n], function (Component) {\n    'use strict';\n\n    return Component.extend({\n        defaults: {\n            opened: false,\n            collapsible: true\n        },\n\n        /**\n         * Initializes observable properties.\n         *\n         * @returns {Collapsible} Chainable.\n         */\n        initObservable: function () {\n            this._super()\n                .observe('opened');\n\n            return this;\n        },\n\n        /**\n         * Toggles value of the 'opened' property.\n         *\n         * @returns {Collapsible} Chainable.\n         */\n        toggleOpened: function () {\n            this.opened() ?\n                this.close() :\n                this.open();\n\n            return this;\n        },\n\n        /**\n         * Sets 'opened' flag to false.\n         *\n         * @returns {Collapsible} Chainable.\n         */\n        close: function () {\n            if (this.collapsible) {\n                this.opened(false);\n            }\n\n            return this;\n        },\n\n        /**\n         * Sets 'opened' flag to true.\n         *\n         * @returns {Collapsible} Chainable.\n         */\n        open: function () {\n            if (this.collapsible) {\n                this.opened(true);\n            }\n\n            return this;\n        }\n    });\n});\n","Magento_Ui/js/lib/spinner.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery'\n], function ($) {\n    'use strict';\n\n    var selector = '[data-role=\"spinner\"]',\n        spinner = $(selector);\n\n    return {\n        /**\n         * Show spinner.\n         */\n        show: function () {\n            spinner.show();\n        },\n\n        /**\n         * Hide spinner.\n         */\n        hide: function () {\n            spinner.hide();\n        },\n\n        /**\n         * Get spinner by selector.\n         *\n         * @param {String} id\n         * @return {jQuery}\n         */\n        get: function (id) {\n            return $(selector + '[data-component=\"' + id + '\"]');\n        }\n    };\n});\n","Magento_Ui/js/lib/key-codes.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/**\n * @api\n */\ndefine([], function () {\n    'use strict';\n\n    return {\n        13: 'enterKey',\n        27: 'escapeKey',\n        40: 'pageDownKey',\n        38: 'pageUpKey',\n        32: 'spaceKey',\n        9:  'tabKey',\n        37: 'pageLeftKey',\n        39: 'pageRightKey',\n        17: 'ctrlKey',\n        18: 'altKey',\n        16: 'shiftKey',\n        66: 'bKey',\n        73: 'iKey',\n        85: 'uKey'\n    };\n});\n","Magento_Ui/js/lib/knockout/bootstrap.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n/** Loads all available knockout bindings, sets custom template engine, initializes knockout on page */\n\ndefine([\n    'ko',\n    './template/engine',\n    'knockoutjs/knockout-es5',\n    './bindings/bootstrap',\n    './extender/observable_array',\n    './extender/bound-nodes',\n    'domReady!'\n], function (ko, templateEngine) {\n    'use strict';\n\n    ko.uid = 0;\n\n    ko.setTemplateEngine(templateEngine);\n    ko.applyBindings();\n});\n","Magento_Ui/js/lib/knockout/extender/observable_array.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'ko',\n    'underscore'\n], function (ko, _) {\n    'use strict';\n\n    /**\n     * Iterator function.\n     *\n     * @param {String} callback\n     * @param {Array} args\n     * @param {Object} elem\n     * @returns {*}\n     */\n    function iterator(callback, args, elem) {\n        callback = elem[callback];\n\n        if (_.isFunction(callback)) {\n            return callback.apply(elem, args);\n        }\n\n        return callback;\n    }\n\n    /**\n     * Wrapper function.\n     *\n     * @param {String} method\n     * @returns {Function}\n     */\n    function wrapper(method) {\n        return function (iteratee) {\n            var callback = iteratee,\n                elems = this(),\n                args = _.toArray(arguments);\n\n            if (_.isString(iteratee)) {\n                callback = iterator.bind(null, iteratee, args.slice(1));\n\n                args.unshift(callback);\n            }\n\n            args.unshift(elems);\n\n            return _[method].apply(_, args);\n        };\n    }\n\n    _.extend(ko.observableArray.fn, {\n        each: wrapper('each'),\n\n        map: wrapper('map'),\n\n        filter: wrapper('filter'),\n\n        some: wrapper('some'),\n\n        every: wrapper('every'),\n\n        groupBy: wrapper('groupBy'),\n\n        sortBy: wrapper('sortBy'),\n\n        /**\n         * Wrapper for underscore findWhere function.\n         *\n         * @param {Object} properties\n         * @return {Object}\n         */\n        findWhere: function (properties) {\n            return _.findWhere(this(), properties);\n        },\n\n        /**\n         * Wrapper for underscore contains function.\n         *\n         * @param {*} value\n         * @return {Boolean}\n         */\n        contains: function (value) {\n            return _.contains(this(), value);\n        },\n\n        /**\n         * Inverse contains call.\n         *\n         * @return {Boolean}\n         */\n        hasNo: function () {\n            return !this.contains.apply(this, arguments);\n        },\n\n        /**\n         * Getter for length property.\n         *\n         * @return {Number}\n         */\n        getLength: function () {\n            return this().length;\n        },\n\n        /**\n         * Create object with keys that gets from each object property.\n         *\n         * @return {Object}\n         */\n        indexBy: function (key) {\n            return _.indexBy(this(), key);\n        },\n\n        /**\n         * Returns a copy of the array with all instances of the values removed.\n         *\n         * @return {Array}\n         */\n        without: function () {\n            var args = Array.prototype.slice.call(arguments);\n\n            args.unshift(this());\n\n            return _.without.apply(_, args);\n        },\n\n        /**\n         * Returns the first element of an array.\n         *\n         * @return {*}\n         */\n        first: function () {\n            return _.first(this());\n        },\n\n        /**\n         * Returns the last element of an array\n         *\n         * @return {*}\n         */\n        last: function () {\n            return _.last(this());\n        },\n\n        /**\n         * Iterate and pick provided properties.\n         *\n         * @return {Array}\n         */\n        pluck: function () {\n            var args = Array.prototype.slice.call(arguments);\n\n            args.unshift(this());\n\n            return _.pluck.apply(_, args);\n        }\n    });\n});\n","Magento_Ui/js/lib/knockout/extender/bound-nodes.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\n/* global WeakMap */\ndefine([\n    'ko',\n    'underscore',\n    'mage/utils/wrapper',\n    'uiEvents',\n    'es6-collections'\n], function (ko, _, wrapper, Events) {\n    'use strict';\n\n    var nodesMap = new WeakMap();\n\n    /**\n     * Returns a array of nodes associated with a specified model.\n     *\n     * @param {Object} model\n     * @returns {Undefined|Array}\n     */\n    function getBounded(model) {\n        return nodesMap.get(model);\n    }\n\n    /**\n     * Removes specified node to models' associations list, if it's\n     * a root node (node is not a descendant of any previously added nodes).\n     * Triggers 'addNode' event.\n     *\n     * @param {Object} model\n     * @param {HTMLElement} node\n     */\n    function addBounded(model, node) {\n        var nodes = getBounded(model),\n            isRoot;\n\n        if (!nodes) {\n            nodesMap.set(model, [node]);\n\n            Events.trigger.call(model, 'addNode', node);\n\n            return;\n        }\n\n        isRoot = nodes.every(function (bounded) {\n            return !bounded.contains(node);\n        });\n\n        if (isRoot) {\n            nodes.push(node);\n\n            Events.trigger.call(model, 'addNode', node);\n        }\n    }\n\n    /**\n     * Removes specified node from models' associations list.\n     * Triggers 'removeNode' event.\n     *\n     * @param {Object} model\n     * @param {HTMLElement} node\n     */\n    function removeBounded(model, node) {\n        var nodes = getBounded(model),\n            index;\n\n        if (!nodes) {\n            return;\n        }\n\n        index = nodes.indexOf(node);\n\n        if (~index) {\n            nodes.splice(index, 0);\n\n            Events.trigger.call(model, 'removeNode', node);\n        }\n\n        if (!nodes.length) {\n            nodesMap.delete(model);\n        }\n    }\n\n    /**\n     * Returns node's first sibling of 'element' type within the common component scope\n     *\n     * @param {HTMLElement} node\n     * @param {*} data\n     * @returns {HTMLElement}\n     */\n    function getElement(node, data) {\n        var elem;\n\n        while (node.nextElementSibling) {\n            node = node.nextElementSibling;\n\n            if (node.nodeType === 1 && ko.dataFor(node) === data) {\n                elem = node;\n                break;\n            }\n        }\n\n        return elem;\n    }\n\n    wrapper.extend(ko, {\n\n        /**\n         * Extends knockouts' 'applyBindings'\n         * to track nodes associated with model.\n         *\n         * @param {Function} orig - Original 'applyBindings' method.\n         * @param {Object} ctx\n         * @param {HTMLElement} node - Original 'applyBindings' method.\n         */\n        applyBindings: function (orig, ctx, node) {\n            var result = orig(),\n                data = ctx && (ctx.$data || ctx);\n\n            if (node && node.nodeType === 8) {\n                node = getElement(node, data);\n            }\n\n            if (!node || node.nodeType !== 1) {\n                return result;\n            }\n\n            if (data && data.registerNodes) {\n                addBounded(data, node);\n            }\n\n            return result;\n        },\n\n        /**\n         * Extends knockouts' cleanNode\n         * to track nodes associated with model.\n         *\n         * @param {Function} orig - Original 'cleanNode' method.\n         * @param {HTMLElement} node - Original 'cleanNode' method.\n         */\n        cleanNode: function (orig, node) {\n            var result = orig(),\n                data;\n\n            if (node.nodeType !== 1) {\n                return result;\n            }\n\n            data = ko.dataFor(node);\n\n            if (data && data.registerNodes) {\n                removeBounded(data, node);\n            }\n\n            return result;\n        }\n    });\n\n    return {\n\n        /**\n         * Returns root nodes associated with a model. If callback is provided,\n         * will iterate through all of the present nodes triggering callback\n         * for each of it. Also it will subscribe to the 'addNode' event.\n         *\n         * @param {Object} model\n         * @param {Function} [callback]\n         * @returns {Array|Undefined}\n         */\n        get: function (model, callback) {\n            var nodes = getBounded(model) || [];\n\n            if (!_.isFunction(callback)) {\n                return nodes;\n            }\n\n            nodes.forEach(function (node) {\n                callback(node);\n            });\n\n            this.add.apply(this, arguments);\n        },\n\n        /**\n         * Subscribes to adding of nodes associated with a model.\n         *\n         * @param {Object} model\n         */\n        add: function (model) {\n            var args = _.toArray(arguments).slice(1);\n\n            args.unshift('addNode');\n\n            Events.on.apply(model, args);\n        },\n\n        /**\n         * Subscribes to removal of nodes associated with a model.\n         *\n         * @param {Object} model\n         */\n        remove: function (model) {\n            var args = _.toArray(arguments).slice(1);\n\n            args.unshift('removeNode');\n\n            Events.on.apply(model, args);\n        },\n\n        /**\n         * Removes subscriptions from the model.\n         *\n         * @param {Object} model\n         */\n        off: function (model) {\n            var args = _.toArray(arguments).slice(1);\n\n            Events.off.apply(model, args);\n        }\n    };\n});\n","Magento_Ui/js/lib/knockout/template/observable_source.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n/**\n * Is being used by knockout template engine to store template to.\n */\ndefine([\n    'ko',\n    'uiClass'\n], function (ko, Class) {\n    'use strict';\n\n    return Class.extend({\n\n        /**\n         * Initializes templateName, _data, nodes properties.\n         *\n         * @param  {template} template - identifier of template\n         */\n        initialize: function (template) {\n            this.templateName = template;\n            this._data = {};\n            this.nodes = ko.observable([]);\n        },\n\n        /**\n         * Data setter. If only one arguments passed, returns corresponding value.\n         * Else, writes into it.\n         * @param  {String} key - key to write to or to read from\n         * @param  {*} value\n         * @return {*} - if 1 arg provided, Returns _data[key] property\n         */\n        data: function (key, value) {\n            if (arguments.length === 1) {\n                return this._data[key];\n            }\n\n            this._data[key] = value;\n        }\n    });\n});\n","Magento_Ui/js/lib/knockout/template/loader.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery'\n], function ($) {\n    'use strict';\n\n    var licenseRegExp   = /<!--[\\s\\S]*?-->/,\n        defaultPlugin   = 'text',\n        defaultExt      = 'html';\n\n    /**\n     * Checks of provided string contains a file extension.\n     *\n     * @param {String} str - String to be checked.\n     * @returns {Boolean}\n     */\n    function hasFileExtension(str) {\n        return !!~str.indexOf('.') && !!str.split('.').pop();\n    }\n\n    /**\n     * Checks if provided string contains a requirejs's plugin reference.\n     *\n     * @param {String} str - String to be checked.\n     * @returns {Boolean}\n     */\n    function hasPlugin(str) {\n        return !!~str.indexOf('!');\n    }\n\n    /**\n     * Checks if provided string is a full path to the file.\n     *\n     * @param {String} str - String to be checked.\n     * @returns {Boolean}\n     */\n    function isFullPath(str) {\n        return !!~str.indexOf('://');\n    }\n\n    /**\n     * Removes license comment from the provided string.\n     *\n     * @param {String} content - String to be processed.\n     * @returns {String}\n     */\n    function removeLicense(content) {\n        return content.replace(licenseRegExp, function (match) {\n            return ~match.indexOf('/**') ? '' : match;\n        });\n    }\n\n    return {\n\n        /**\n         * Attempts to extract template by provided path from\n         * a DOM element and falls back to a file loading if\n         * none of the DOM nodes was found.\n         *\n         * @param {String} path - Path to the template or a DOM selector.\n         * @returns {jQueryPromise}\n         */\n        loadTemplate: function (path) {\n            var content = this.loadFromNode(path),\n                defer;\n\n            if (content) {\n                defer = $.Deferred();\n\n                defer.resolve(content);\n\n                return defer.promise();\n            }\n\n            return this.loadFromFile(path);\n        },\n\n        /**\n         * Loads template from external file by provided\n         * path, which will be preliminary formatted.\n         *\n         * @param {String} path - Path to the template.\n         * @returns {jQueryPromise}\n         */\n        loadFromFile: function (path) {\n            var loading = $.Deferred();\n\n            path = this.formatPath(path);\n\n            require([path], function (template) {\n                template = removeLicense(template);\n                loading.resolve(template);\n            }, function (err) {\n                loading.reject(err);\n            });\n\n            return loading.promise();\n        },\n\n        /**\n         * Attempts to extract content of a node found by provided selector.\n         *\n         * @param {String} selector - Node's selector (not necessary valid).\n         * @returns {String|Boolean} If specified node doesn't exists\n         *      'false' will be returned, otherwise returns node's content.\n         */\n        loadFromNode: function (selector) {\n            var node;\n\n            try {\n                node =\n                    document.getElementById(selector) ||\n                    document.querySelector(selector);\n\n                return node ? node.innerHTML : false;\n            } catch (e) {\n                return false;\n            }\n        },\n\n        /**\n         * Adds requirejs's plugin and file extension to\n         * to the provided string if it's necessary.\n         *\n         * @param {String} path - Path to be processed.\n         * @returns {String} Formatted path.\n         */\n        formatPath: function (path) {\n            var result = path;\n\n            if (!hasPlugin(path)) {\n                result = defaultPlugin + '!' + result;\n            }\n\n            if (isFullPath(path)) {\n                return result;\n            }\n\n            if (!hasFileExtension(path)) {\n                result += '.' + defaultExt;\n            }\n\n            return result.replace(/^([^\\/]+)/g, '$1/template');\n        }\n    };\n});\n","Magento_Ui/js/lib/knockout/template/engine.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery',\n    'ko',\n    'underscore',\n    './observable_source',\n    './renderer',\n    '../../logger/console-logger'\n], function ($, ko, _, Source, renderer, consoleLogger) {\n    'use strict';\n\n    var RemoteTemplateEngine,\n        NativeTemplateEngine = ko.nativeTemplateEngine,\n        sources = {};\n\n    /**\n     * Remote template engine class. Is used to be able to load remote templates via knockout template binding.\n     */\n    RemoteTemplateEngine = function () {\n        // Instance reference for closure.\n        var engine = this,\n        // Decorate the builtin Knockout \"template\" binding to track synchronous template renders.\n        origUpdate = ko.bindingHandlers.template.update;\n\n        /**\n         * Counter to track the number of currently running render tasks (both synchronous and asynchronous).\n         * @type {Number}\n         * @private\n         */\n        this._rendersOutstanding = 0;\n\n        /**\n         * Use a jQuery object as an event bus (but any event emitter with on/off/emit methods could work)\n         * @type {jQuery}\n         * @private\n         */\n        this._events = $(this);\n\n        /**\n         * Rendered templates\n         * @type {Object}\n         * @private\n         */\n        this._templatesRendered = {};\n\n        /*eslint-disable no-unused-vars*/\n        /**\n         * Decorate update method\n         *\n         * @param {HTMLElement} element\n         * @param {Function} valueAccessor\n         * @param {Object} allBindings\n         * @param {Object} viewModel\n         * @param {ko.bindingContext} bindingContext\n         * @returns {*}\n         */\n        ko.bindingHandlers.template.update = function (element, valueAccessor, allBindings, viewModel, bindingContext) {\n            /*eslint-enable no-unused-vars*/\n            var options = ko.utils.peekObservable(valueAccessor()),\n                templateName,\n                isSync,\n                updated;\n\n            if (typeof options === 'object') {\n                if (options.templateEngine && options.templateEngine !== engine) {\n                    return origUpdate.apply(this, arguments);\n                }\n\n                if (!options.name) {\n                    consoleLogger.error('Could not find template name', options);\n                }\n                templateName = options.name;\n            } else if (typeof options === 'string') {\n                templateName = options;\n            } else {\n                consoleLogger.error('Could not build a template binding', options);\n            }\n            engine._trackRender(templateName);\n            isSync = engine._hasTemplateLoaded(templateName);\n            updated = origUpdate.apply(this, arguments);\n\n            if (isSync) {\n                engine._releaseRender(templateName, 'sync');\n            }\n\n            return updated;\n        };\n    };\n\n    /**\n     * Creates unique template identifier based on template name and it's extenders (optional)\n     * @param  {String} templateName\n     * @return {String} - unique template identifier\n     */\n    function createTemplateIdentifier(templateName) {\n        return templateName;\n    }\n\n    RemoteTemplateEngine.prototype = new NativeTemplateEngine;\n    RemoteTemplateEngine.prototype.constructor = RemoteTemplateEngine;\n\n    /**\n     * When an asynchronous render task begins, increment the internal counter for tracking when renders are complete.\n     * @private\n     */\n    RemoteTemplateEngine.prototype._trackRender = function (templateName) {\n        var rendersForTemplate = this._templatesRendered[templateName] !== undefined ?\n            this._templatesRendered[templateName] : 0;\n\n        this._rendersOutstanding++;\n        this._templatesRendered[templateName] = rendersForTemplate + 1;\n        this._resolveRenderWaits();\n    };\n\n    /**\n     * When an asynchronous render task ends, decrement the internal counter for tracking when renders are complete.\n     * @private\n     */\n    RemoteTemplateEngine.prototype._releaseRender = function (templateName) {\n        var rendersForTemplate = this._templatesRendered[templateName];\n\n        this._rendersOutstanding--;\n        this._templatesRendered[templateName] = rendersForTemplate - 1;\n        this._resolveRenderWaits();\n    };\n\n    /**\n     * Check to see if renders are complete and trigger events for listeners.\n     * @private\n     */\n    RemoteTemplateEngine.prototype._resolveRenderWaits = function () {\n        if (this._rendersOutstanding === 0) {\n            this._events.triggerHandler('finishrender');\n        }\n    };\n\n    /**\n     * Get a promise for the end of the current run of renders, both sync and async.\n     * @return {jQueryPromise} - promise that resolves when render completes\n     */\n    RemoteTemplateEngine.prototype.waitForFinishRender = function () {\n        var defer = $.Deferred();\n\n        this._events.one('finishrender', defer.resolve);\n\n        return defer.promise();\n    };\n\n    /**\n     * Returns true if this template has already been asynchronously loaded and will be synchronously rendered.\n     * @param {String} templateName\n     * @returns {Boolean}\n     * @private\n     */\n    RemoteTemplateEngine.prototype._hasTemplateLoaded = function (templateName) {\n        // Sources object will have cached template once makeTemplateSource has run\n        return sources.hasOwnProperty(templateName);\n    };\n\n    /**\n     * Overrided method of native knockout template engine.\n     * Caches template after it's unique name and renders in once.\n     * If template name is not typeof string, delegates work to knockout.templateSources.anonymousTemplate.\n     * @param  {*} template\n     * @param  {HTMLElement} templateDocument - document\n     * @param  {Object} options - options, passed to template binding\n     * @param  {ko.bindingContext} bindingContext\n     * @returns {TemplateSource} Object with methods 'nodes' and 'data'.\n     */\n    RemoteTemplateEngine.prototype.makeTemplateSource = function (template, templateDocument, options, bindingContext) {\n        var engine = this,\n            source,\n            templateId;\n\n        if (typeof template === 'string') {\n            templateId = createTemplateIdentifier(template);\n            source = sources[templateId];\n\n            if (!source) {\n                source = new Source(template);\n                source.requestedBy = bindingContext.$data.name;\n                sources[templateId] = source;\n\n                consoleLogger.info('templateStartLoading', {\n                    template: templateId,\n                    component: bindingContext.$data.name\n                });\n\n                renderer.render(template).then(function (rendered) {\n                    consoleLogger.info('templateLoadedFromServer', {\n                        template: templateId,\n                        component: bindingContext.$data.name\n                    });\n                    source.nodes(rendered);\n                    engine._releaseRender(templateId, 'async');\n                }).fail(function () {\n                    consoleLogger.error('templateLoadingFail', {\n                        template: templateId,\n                        component: bindingContext.$data.name\n                    });\n                });\n            }\n\n            if (source.requestedBy !== bindingContext.$data.name) {\n                consoleLogger.info('templateLoadedFromCache', {\n                    template: templateId,\n                    component: bindingContext.$data.name\n                });\n            }\n\n            return source;\n        } else if (template.nodeType === 1 || template.nodeType === 8) {\n            source = new ko.templateSources.anonymousTemplate(template);\n\n            return source;\n        }\n\n        throw new Error('Unknown template type: ' + template);\n    };\n\n    /**\n     * Overrided method of native knockout template engine.\n     * Should return array of html elements.\n     * @param  {TemplateSource} templateSource - object with methods 'nodes' and 'data'.\n     * @return {Array} - array of html elements\n     */\n    RemoteTemplateEngine.prototype.renderTemplateSource = function (templateSource) {\n        var nodes = templateSource.nodes();\n\n        return ko.utils.cloneNodes(nodes);\n    };\n\n    /**\n     * Overrided method of native knockout template engine.\n     * Created in order to invoke makeTemplateSource method with custom set of params.\n     * @param  {*} template - template identifier\n     * @param  {ko.bindingContext} bindingContext\n     * @param  {Object} options - options, passed to template binding\n     * @param  {HTMLElement} templateDocument - document\n     * @return {Array} - array of html elements\n     */\n    RemoteTemplateEngine.prototype.renderTemplate = function (template, bindingContext, options, templateDocument) {\n        var templateSource = this.makeTemplateSource(template, templateDocument, options, bindingContext);\n\n        return this.renderTemplateSource(templateSource);\n    };\n\n    return new RemoteTemplateEngine;\n});\n","Magento_Ui/js/lib/knockout/template/renderer.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'jquery',\n    'underscore',\n    './loader'\n], function ($, _, loader) {\n    'use strict';\n\n    var colonReg       = /\\\\:/g,\n        renderedTemplatePromises = {},\n        attributes     = {},\n        elements       = {},\n        globals        = [],\n        renderer,\n        preset;\n\n    renderer = {\n\n        /**\n         * Loads template by provided path and\n         * than converts it's content to html.\n         *\n         * @param {String} tmplPath - Path to the template.\n         * @returns {jQueryPromise}\n         * @alias getRendered\n         */\n        render: function (tmplPath) {\n            var cachedPromise = renderedTemplatePromises[tmplPath];\n\n            if (!cachedPromise) {\n                cachedPromise = renderedTemplatePromises[tmplPath] = loader\n                    .loadTemplate(tmplPath)\n                    .then(renderer.parseTemplate);\n            }\n\n            return cachedPromise;\n        },\n\n        /**\n         * @ignore\n         */\n        getRendered: function (tmplPath) {\n            return renderer.render(tmplPath);\n        },\n\n        /**\n         * Parses provided string as html content\n         * and returns an array of DOM elements.\n         *\n         * @param {String} html - String to be processed.\n         * @returns {Array}\n         */\n        parseTemplate: function (html) {\n            var fragment = document.createDocumentFragment();\n\n            $(fragment).append(html);\n\n            return renderer.normalize(fragment);\n        },\n\n        /**\n         * Processes custom attributes and nodes of provided DOM element.\n         *\n         * @param {HTMLElement} content - Element to be processed.\n         * @returns {Array} An array of content's child nodes.\n         */\n        normalize: function (content) {\n            globals.forEach(function (handler) {\n                handler(content);\n            });\n\n            return _.toArray(content.childNodes);\n        },\n\n        /**\n         * Adds new global content handler.\n         *\n         * @param {Function} handler - Function which will be invoked for\n         *      an every content passed to 'normalize' method.\n         * @returns {Renderer} Chainable.\n         */\n        addGlobal: function (handler) {\n            if (!_.contains(globals, handler)) {\n                globals.push(handler);\n            }\n\n            return this;\n        },\n\n        /**\n         * Removes specified global content handler.\n         *\n         * @param {Function} handler - Handler to be removed.\n         * @returns {Renderer} Chainable.\n         */\n        removeGlobal: function (handler) {\n            var index = globals.indexOf(handler);\n\n            if (~index) {\n                globals.splice(index, 1);\n            }\n\n            return this;\n        },\n\n        /**\n         * Adds new custom attribute handler.\n         *\n         * @param {String} id - Attribute identifier.\n         * @param {(Object|Function)} [config={}]\n         * @returns {Renderer} Chainable.\n         */\n        addAttribute: function (id, config) {\n            var data = {\n                name: id,\n                binding: id,\n                handler: renderer.handlers.attribute\n            };\n\n            if (_.isFunction(config)) {\n                data.handler = config;\n            } else if (_.isObject(config)) {\n                _.extend(data, config);\n            }\n\n            data.id = id;\n            attributes[id] = data;\n\n            return this;\n        },\n\n        /**\n         * Removes specified attribute handler.\n         *\n         * @param {String} id - Attribute identifier.\n         * @returns {Renderer} Chainable.\n         */\n        removeAttribute: function (id) {\n            delete attributes[id];\n\n            return this;\n        },\n\n        /**\n         * Adds new custom node handler.\n         *\n         * @param {String} id - Node identifier.\n         * @param {(Object|Function)} [config={}]\n         * @returns {Renderer} Chainable.\n         */\n        addNode: function (id, config) {\n            var data = {\n                name: id,\n                binding: id,\n                handler: renderer.handlers.node\n            };\n\n            if (_.isFunction(config)) {\n                data.handler = config;\n            } else if (_.isObject(config)) {\n                _.extend(data, config);\n            }\n\n            data.id = id;\n            elements[id] = data;\n\n            return this;\n        },\n\n        /**\n         * Removes specified custom node handler.\n         *\n         * @param {String} id - Node identifier.\n         * @returns {Renderer} Chainable.\n         */\n        removeNode: function (id) {\n            delete elements[id];\n\n            return this;\n        },\n\n        /**\n         * Checks if provided DOM element is a custom node.\n         *\n         * @param {HTMLElement} node - Node to be checked.\n         * @returns {Boolean}\n         */\n        isCustomNode: function (node) {\n            return _.some(elements, function (elem) {\n                return elem.name.toUpperCase() === node.tagName;\n            });\n        },\n\n        /**\n         * Processes custom attributes of a content's child nodes.\n         *\n         * @param {HTMLElement} content - DOM element to be processed.\n         */\n        processAttributes: function (content) {\n            var repeat;\n\n            repeat = _.some(attributes, function (attr) {\n                var attrName = attr.name,\n                    nodes    = content.querySelectorAll('[' + attrName + ']'),\n                    handler  = attr.handler;\n\n                return _.toArray(nodes).some(function (node) {\n                    var data = node.getAttribute(attrName);\n\n                    return handler(node, data, attr) === true;\n                });\n            });\n\n            if (repeat) {\n                renderer.processAttributes(content);\n            }\n        },\n\n        /**\n         * Processes custom nodes of a provided content.\n         *\n         * @param {HTMLElement} content - DOM element to be processed.\n         */\n        processNodes: function (content) {\n            var repeat;\n\n            repeat = _.some(elements, function (element) {\n                var nodes   = content.querySelectorAll(element.name),\n                    handler = element.handler;\n\n                return _.toArray(nodes).some(function (node) {\n                    var data = node.getAttribute('args');\n\n                    return handler(node, data, element) === true;\n                });\n            });\n\n            if (repeat) {\n                renderer.processNodes(content);\n            }\n        },\n\n        /**\n         * Wraps provided string in curly braces if it's necessary.\n         *\n         * @param {String} args - String to be wrapped.\n         * @returns {String} Wrapped string.\n         */\n        wrapArgs: function (args) {\n            if (~args.indexOf('\\\\:')) {\n                args = args.replace(colonReg, ':');\n            } else if (~args.indexOf(':') && !~args.indexOf('}')) {\n                args = '{' + args + '}';\n            }\n\n            return args;\n        },\n\n        /**\n         * Wraps child nodes of provided DOM element\n         * with knockout's comment tag.\n         *\n         * @param {HTMLElement} node - Node whose children should be wrapped.\n         * @param {String} binding - Name of the binding for the opener comment tag.\n         * @param {String} data - Data associated with a binding.\n         *\n         * @example\n         *      <div id=\"example\"><span/></div>\n         *      wrapChildren(document.getElementById('example'), 'foreach', 'data');\n         *      =>\n         *      <div id=\"example\">\n         *      <!-- ko foreach: data -->\n         *          <span></span>\n         *      <!-- /ko -->\n         *      </div>\n         */\n        wrapChildren: function (node, binding, data) {\n            var tag = this.createComment(binding, data),\n                $node = $(node);\n\n            $node.prepend(tag.open);\n            $node.append(tag.close);\n        },\n\n        /**\n         * Wraps specified node with knockout's comment tag.\n         *\n         * @param {HTMLElement} node - Node to be wrapped.\n         * @param {String} binding - Name of the binding for the opener comment tag.\n         * @param {String} data - Data associated with a binding.\n         *\n         * @example\n         *      <div id=\"example\"></div>\n         *      wrapNode(document.getElementById('example'), 'foreach', 'data');\n         *      =>\n         *      <!-- ko foreach: data -->\n         *          <div id=\"example\"></div>\n         *      <!-- /ko -->\n         */\n        wrapNode: function (node, binding, data) {\n            var tag = this.createComment(binding, data),\n                $node = $(node);\n\n            $node.before(tag.open);\n            $node.after(tag.close);\n        },\n\n        /**\n         * Creates knockouts' comment tag for the provided binding.\n         *\n         * @param {String} binding - Name of the binding.\n         * @param {String} data - Data associated with a binding.\n         * @returns {Object} Object with an open and close comment elements.\n         */\n        createComment: function (binding, data) {\n            return {\n                open: document.createComment(' ko ' + binding + ': ' + data + ' '),\n                close: document.createComment(' /ko ')\n            };\n        }\n    };\n\n    renderer.handlers = {\n\n        /**\n         * Basic node handler. Replaces custom nodes\n         * with a corresponding knockout's comment tag.\n         *\n         * @param {HTMLElement} node - Node to be processed.\n         * @param {String} data\n         * @param {Object} element\n         * @returns {Boolean} True\n         *\n         * @example Sample syntaxes conversions.\n         *      <with args=\"model\">\n         *          <span/>\n         *      </with>\n         *      =>\n         *      <!-- ko with: model-->\n         *          <span/>\n         *      <!-- /ko -->\n         */\n        node: function (node, data, element) {\n            data = renderer.wrapArgs(data);\n\n            renderer.wrapNode(node, element.binding, data);\n            $(node).replaceWith(node.childNodes);\n\n            return true;\n        },\n\n        /**\n         * Base attribute handler. Replaces custom attributes with\n         * a corresponding knockouts' data binding.\n         *\n         * @param {HTMLElement} node - Node to be processed.\n         * @param {String} data - Data associated with a binding.\n         * @param {Object} attr - Attribute definition.\n         *\n         * @example Sample syntaxes conversions.\n         *      <div text=\"label\"></div>\n         *      =>\n         *      <div data-bind=\"text: label\"></div>\n         */\n        attribute: function (node, data, attr) {\n            data = renderer.wrapArgs(data);\n\n            renderer.bindings.add(node, attr.binding, data);\n            node.removeAttribute(attr.name);\n        },\n\n        /**\n         * Wraps provided node with a knockouts' comment tag.\n         *\n         * @param {HTMLElement} node - Node that will be wrapped.\n         * @param {String} data - Data associated with a binding.\n         * @param {Object} attr - Attribute definition.\n         *\n         * @example\n         *      <div outereach=\"data\" class=\"test\"></div>\n         *      =>\n         *      <!-- ko foreach: data -->\n         *          <div class=\"test\"></div>\n         *      <!-- /ko -->\n         */\n        wrapAttribute: function (node, data, attr) {\n            data = renderer.wrapArgs(data);\n\n            renderer.wrapNode(node, attr.binding, data);\n            node.removeAttribute(attr.name);\n        }\n    };\n\n    renderer.bindings = {\n\n        /**\n         * Appends binding string to the current\n         * 'data-bind' attribute of provided node.\n         *\n         * @param {HTMLElement} node - DOM element whose 'data-bind' attribute will be extended.\n         * @param {String} name - Name of a binding.\n         * @param {String} data - Data associated with the binding.\n         */\n        add: function (node, name, data) {\n            var bindings = this.get(node);\n\n            if (bindings) {\n                bindings += ', ';\n            }\n\n            bindings += name;\n\n            if (data) {\n                bindings += ': ' + data;\n            }\n\n            this.set(node, bindings);\n        },\n\n        /**\n         * Extracts value of a 'data-bind' attribute from provided node.\n         *\n         * @param {HTMLElement} node - Node whose attribute to be extracted.\n         * @returns {String}\n         */\n        get: function (node) {\n            return node.getAttribute('data-bind') || '';\n        },\n\n        /**\n         * Sets 'data-bind' attribute of the specified node\n         * to the provided value.\n         *\n         * @param {HTMLElement} node - Node whose attribute will be altered.\n         * @param {String} bindings - New value of 'data-bind' attribute.\n         */\n        set: function (node, bindings) {\n            node.setAttribute('data-bind', bindings);\n        }\n    };\n\n    renderer\n        .addGlobal(renderer.processAttributes)\n        .addGlobal(renderer.processNodes);\n\n    /**\n     * Collection of default binding conversions.\n     */\n    preset = {\n        nodes: _.object([\n            'if',\n            'text',\n            'with',\n            'scope',\n            'ifnot',\n            'foreach',\n            'component'\n        ], Array.prototype),\n        attributes: _.object([\n            'css',\n            'attr',\n            'html',\n            'with',\n            'text',\n            'click',\n            'event',\n            'submit',\n            'enable',\n            'disable',\n            'options',\n            'visible',\n            'template',\n            'hasFocus',\n            'textInput',\n            'component',\n            'uniqueName',\n            'optionsText',\n            'optionsValue',\n            'checkedValue',\n            'selectedOptions'\n        ], Array.prototype)\n    };\n\n    _.extend(preset.attributes, {\n        if: renderer.handlers.wrapAttribute,\n        ifnot: renderer.handlers.wrapAttribute,\n        innerif: {\n            binding: 'if'\n        },\n        innerifnot: {\n            binding: 'ifnot'\n        },\n        outereach: {\n            binding: 'foreach',\n            handler: renderer.handlers.wrapAttribute\n        },\n        foreach: {\n            name: 'each'\n        },\n        value: {\n            name: 'ko-value'\n        },\n        style: {\n            name: 'ko-style'\n        },\n        checked: {\n            name: 'ko-checked'\n        },\n        disabled: {\n            name: 'ko-disabled',\n            binding: 'disable'\n        },\n        focused: {\n            name: 'ko-focused',\n            binding: 'hasFocus'\n        },\n\n        /**\n         * Custom 'render' attrobute handler function. Wraps child elements\n         * of a node with knockout's 'ko template:' comment tag.\n         *\n         * @param {HTMLElement} node - Element to be processed.\n         * @param {String} data - Data specified in 'render' attribute of a node.\n         */\n        render: function (node, data) {\n            data = data || 'getTemplate()';\n            data = renderer.wrapArgs(data);\n\n            renderer.wrapChildren(node, 'template', data);\n            node.removeAttribute('render');\n        }\n    });\n\n    _.extend(preset.nodes, {\n        foreach: {\n            name: 'each'\n        },\n\n        /**\n         * Custom 'render' node handler function.\n         * Replaces node with knockout's 'ko template:' comment tag.\n         *\n         * @param {HTMLElement} node - Element to be processed.\n         * @param {String} data - Data specified in 'args' attribute of a node.\n         */\n        render: function (node, data) {\n            data = data || 'getTemplate()';\n            data = renderer.wrapArgs(data);\n\n            renderer.wrapNode(node, 'template', data);\n            $(node).replaceWith(node.childNodes);\n        }\n    });\n\n    _.each(preset.attributes, function (data, id) {\n        renderer.addAttribute(id, data);\n    });\n\n    _.each(preset.nodes, function (data, id) {\n        renderer.addNode(id, data);\n    });\n\n    return renderer;\n});\n","Magento_Ui/js/lib/knockout/bindings/collapsible.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'ko',\n    'jquery',\n    'underscore',\n    '../template/renderer'\n], function (ko, $, _, renderer) {\n    'use strict';\n\n    var collapsible,\n        defaults;\n\n    defaults = {\n        closeOnOuter: true,\n        onTarget: false,\n        openClass: '_active',\n        as: '$collapsible'\n    };\n\n    collapsible = {\n\n        /**\n         * Sets 'opened' property to true.\n         */\n        open: function () {\n            this.opened(true);\n        },\n\n        /**\n         * Sets 'opened' property to false.\n         */\n        close: function () {\n            this.opened(false);\n        },\n\n        /**\n         * Toggles value of the 'opened' property.\n         */\n        toggle: function () {\n            this.opened(!this.opened());\n        }\n    };\n\n    /**\n     * Document click handler which in case if event target is not\n     * a descendant of provided container element, closes collapsible model.\n     *\n     * @param {HTMLElement} container\n     * @param {Object} model\n     * @param {EventObject} e\n     */\n    function onOuterClick(container, model, e) {\n        var target = e.target;\n\n        if (target !== container && !container.contains(target)) {\n            model.close();\n        }\n    }\n\n    /**\n     * Creates 'css' binding which toggles\n     * class specified in 'name' parameter.\n     *\n     * @param {Object} model\n     * @param {String} name\n     * @returns {Object}\n     */\n    function getClassBinding(model, name) {\n        var binding = {};\n\n        binding[name] = model.opened;\n\n        return {\n            css: binding\n        };\n    }\n\n    /**\n     * Prepares configuration for the binding based\n     * on a default properties and provided options.\n     *\n     * @param {Object} [options={}]\n     * @returns {Object} Complete instance configuration.\n     */\n    function buildConfig(options) {\n        if (typeof options !== 'object') {\n            options = {};\n        }\n\n        return _.extend({}, defaults, options);\n    }\n\n    ko.bindingHandlers.collapsible = {\n\n        /**\n         * Initializes 'collapsible' binding.\n         */\n        init: function (element, valueAccessor, allBindings, viewModel, bindingCtx) {\n            var $collapsible = Object.create(collapsible),\n                config = buildConfig(valueAccessor()),\n                outerClick,\n                bindings;\n\n            _.bindAll($collapsible, 'open', 'close', 'toggle');\n\n            $collapsible.opened = ko.observable(!!config.opened);\n\n            bindingCtx[config.as] = $collapsible;\n\n            if (config.closeOnOuter) {\n                outerClick = onOuterClick.bind(null, element, $collapsible);\n\n                $(document).on('click', outerClick);\n\n                ko.utils.domNodeDisposal.addDisposeCallback(element, function () {\n                    $(document).off('click', outerClick);\n                });\n            }\n\n            if (config.openClass) {\n                bindings = getClassBinding($collapsible, config.openClass);\n\n                ko.applyBindingsToNode(element, bindings, bindingCtx);\n            }\n\n            if (config.onTarget) {\n                $(element).on('click', $collapsible.toggle);\n            }\n\n            if (viewModel && _.isFunction(viewModel.on)) {\n                viewModel.on({\n                    close:          $collapsible.close,\n                    open:           $collapsible.open,\n                    toggleOpened:   $collapsible.toggle\n                });\n            }\n        }\n    };\n\n    ko.bindingHandlers.closeCollapsible = {\n\n        /**\n         * Creates listener for the click event on provided DOM element,\n         * which closes associated with it collapsible model.\n         */\n        init: function (element, valueAccessor, allBindings, viewModel, bindingCtx) {\n            var name = valueAccessor() || defaults.as,\n                $collapsible = bindingCtx[name];\n\n            if ($collapsible) {\n                $(element).on('click', $collapsible.close);\n            }\n        }\n    };\n\n    ko.bindingHandlers.openCollapsible = {\n\n        /**\n         * Creates listener for the click event on provided DOM element,\n         * which opens associated with it collapsible model.\n         */\n        init: function (element, valueAccessor, allBindings, viewModel, bindingCtx) {\n            var name = valueAccessor() || defaults.as,\n                $collapsible = bindingCtx[name];\n\n            if ($collapsible) {\n                $(element).on('click', $collapsible.open);\n            }\n        }\n    };\n\n    ko.bindingHandlers.toggleCollapsible = {\n\n        /**\n         * Creates listener for the click event on provided DOM element,\n         * which toggles associated with it collapsible model.\n         */\n        init: function (element, valueAccessor, allBindings, viewModel, bindingCtx) {\n            var name = valueAccessor() || defaults.as,\n                $collapsible = bindingCtx[name];\n\n            if ($collapsible) {\n                $(element).on('click', $collapsible.toggle);\n            }\n        }\n    };\n\n    renderer\n        .addAttribute('collapsible')\n        .addAttribute('openCollapsible')\n        .addAttribute('closeCollapsible')\n        .addAttribute('toggleCollapsible');\n});\n","Magento_Ui/js/lib/knockout/bindings/color-picker.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'ko',\n    'jquery',\n    '../template/renderer',\n    'spectrum',\n    'tinycolor'\n], function (ko, $, renderer, spectrum, tinycolor) {\n    'use strict';\n\n    /**\n     * Change color picker status to be enabled or disabled\n     *\n     * @param {HTMLElement} element - Element to apply colorpicker enable/disable status to.\n     * @param {Object} viewModel - Object, which represents view model binded to el.\n     */\n    function changeColorPickerStateBasedOnViewModel(element, viewModel) {\n        $(element).spectrum(viewModel.disabled() ? 'disable' : 'enable');\n    }\n\n    ko.bindingHandlers.colorPicker = {\n        /**\n         * Binding init callback.\n         *\n         * @param {*} element\n         * @param {Function} valueAccessor\n         * @param {Function} allBindings\n         * @param {Object} viewModel\n         */\n        init: function (element, valueAccessor, allBindings, viewModel) {\n            var config = valueAccessor(),\n\n                /** change value */\n                changeValue = function (value) {\n                    if (value == null) {\n                        value = '';\n                    }\n                    config.value(value.toString());\n                };\n\n            config.change = changeValue;\n\n            config.hide = changeValue;\n\n            /** show value */\n            config.show = function () {\n                if (!viewModel.focused()) {\n                    viewModel.focused(true);\n                }\n\n                return true;\n            };\n\n            $(element).spectrum(config);\n\n            changeColorPickerStateBasedOnViewModel(element, viewModel);\n        },\n\n        /**\n         * Reads params passed to binding, parses component declarations.\n         * Fetches for those found and attaches them to the new context.\n         *\n         * @param {HTMLElement} element - Element to apply bindings to.\n         * @param {Function} valueAccessor - Function that returns value, passed to binding.\n         * @param {Object} allBindings - Object, which represents all bindings applied to element.\n         * @param {Object} viewModel - Object, which represents view model binded to element.\n         */\n        update: function (element, valueAccessor, allBindings, viewModel) {\n            var config = valueAccessor();\n\n            if (tinycolor(config.value()).isValid() || config.value() === '') {\n                $(element).spectrum('set', config.value());\n\n                if (config.value() !== '') {\n                    config.value($(element).spectrum('get').toString());\n                }\n            }\n\n            changeColorPickerStateBasedOnViewModel(element, viewModel);\n        }\n    };\n\n    renderer.addAttribute('colorPicker');\n});\n","Magento_Ui/js/lib/knockout/bindings/i18n.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'ko',\n    'module',\n    '../template/renderer',\n    'mage/translate'\n], function ($, ko, module, renderer) {\n    'use strict';\n\n    var locations = {\n            'legend': 'Caption for the fieldset element',\n            'label': 'Label for an input element.',\n            'button': 'Push button',\n            'a': 'Link label',\n            'b': 'Bold text',\n            'strong': 'Strong emphasized text',\n            'i': 'Italic text',\n            'em': 'Emphasized text',\n            'u': 'Underlined text',\n            'sup': 'Superscript text',\n            'sub': 'Subscript text',\n            'span': 'Span element',\n            'small': 'Smaller text',\n            'big': 'Bigger text',\n            'address': 'Contact information',\n            'blockquote': 'Long quotation',\n            'q': 'Short quotation',\n            'cite': 'Citation',\n            'caption': 'Table caption',\n            'abbr': 'Abbreviated phrase',\n            'acronym': 'An acronym',\n            'var': 'Variable part of a text',\n            'dfn': 'Term',\n            'strike': 'Strikethrough text',\n            'del': 'Deleted text',\n            'ins': 'Inserted text',\n            'h1': 'Heading level 1',\n            'h2': 'Heading level 2',\n            'h3': 'Heading level 3',\n            'h4': 'Heading level 4',\n            'h5': 'Heading level 5',\n            'h6': 'Heading level 6',\n            'center': 'Centered text',\n            'select': 'List options',\n            'img': 'Image',\n            'input': 'Form element'\n        },\n\n        /**\n         * Generates [data-translate] attribute's value\n         * @param {Object} translationData\n         * @param {String} location\n         */\n        composeTranslateAttr = function (translationData, location) {\n            var obj = [{\n                'shown': translationData.shown,\n                'translated': translationData.translated,\n                'original': translationData.original,\n                'location': locations[location] || 'Text'\n            }];\n\n            return JSON.stringify(obj);\n        },\n\n        /**\n         * Sets text for the element\n         * @param {Object} el\n         * @param {String} text\n         */\n        setText = function (el, text) {\n            $(el).text(text);\n        },\n\n        /**\n         * Sets [data-translate] attribute for the element\n         * @param {Object} el - The element which is binded\n         * @param {String} original - The original value of the element\n         */\n        setTranslateProp = function (el, original) {\n            var location = $(el).prop('tagName').toLowerCase(),\n                translated = $.mage.__(original),\n                translationData = {\n                    shown: translated,\n                    translated: translated,\n                    original: original\n                },\n                translateAttr = composeTranslateAttr(translationData, location);\n\n            $(el).attr('data-translate', translateAttr);\n\n            setText(el, translationData.shown);\n        },\n\n        /**\n         * Checks if node represents ko virtual node (nodeType === 8, nodeName === '#comment').\n         *\n         * @param {HTMLElement} node\n         * @returns {Boolean}\n         */\n        isVirtualElement = function (node) {\n            return node.nodeType === 8;\n        },\n\n        /**\n        * Checks if it's real DOM element\n        * in case of virtual element, returns span wrapper\n        * @param {Object} el\n        * @param {bool} isUpdate\n        * @return {Object} el\n        */\n        getRealElement = function (el, isUpdate) {\n            if (isVirtualElement(el)) {\n                if (isUpdate) {\n                    return $(el).next('span');\n                }\n\n                return $('<span/>').insertAfter(el);\n            }\n\n            return el;\n        },\n\n        /**\n         * execute i18n binding\n         * @param {Object} element\n         * @param {Function} valueAccessor\n         * @param {bool} isUpdate\n         */\n        execute = function (element, valueAccessor, isUpdate) {\n            var original = ko.unwrap(valueAccessor() || ''),\n                el = getRealElement(element, isUpdate),\n                inlineTranslation = (module.config() || {}).inlineTranslation;\n\n            if (inlineTranslation) {\n                setTranslateProp(el, original);\n            } else {\n                setText(el, $.mage.__(original));\n            }\n        };\n\n    /**\n     * i18n binding\n     * @property {Function}  init\n     * @property {Function}  update\n     */\n    ko.bindingHandlers.i18n = {\n\n        /**\n         * init i18n binding\n         * @param {Object} element\n         * @param {Function} valueAccessor\n         */\n        init: function (element, valueAccessor) {\n            execute(element, valueAccessor);\n        },\n\n        /**\n         * update i18n binding\n         * @param {Object} element\n         * @param {Function} valueAccessor\n         */\n        update: function (element, valueAccessor) {\n            execute(element, valueAccessor, true);\n        }\n    };\n\n    ko.virtualElements.allowedBindings.i18n = true;\n\n    renderer\n        .addNode('translate', {\n            binding: 'i18n'\n        })\n        .addAttribute('translate', {\n            binding: 'i18n'\n        });\n});\n","Magento_Ui/js/lib/knockout/bindings/scope.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n/** Creates scope binding and registers in to ko.bindingHandlers object */\ndefine([\n    'ko',\n    'uiRegistry',\n    'mage/translate',\n    '../template/renderer',\n    'jquery',\n    '../../logger/console-logger'\n], function (ko, registry, $t, renderer, $, consoleLogger) {\n    'use strict';\n\n    /**\n     * Creates child context with passed component param as $data. Extends context with $t helper.\n     * Applies bindings to descendant nodes.\n     * @param {HTMLElement} el - element to apply bindings to.\n     * @param {ko.bindingContext} bindingContext - instance of ko.bindingContext, passed to binding initially.\n     * @param {Promise} promise - instance of jQuery promise\n     * @param {Object} component - component instance to attach to new context\n     */\n    function applyComponents(el, bindingContext, promise, component) {\n        promise.resolve();\n        component = bindingContext.createChildContext(component);\n\n        ko.utils.extend(component, {\n            $t: $t\n        });\n\n        ko.utils.arrayForEach(el.childNodes, ko.cleanNode);\n\n        ko.applyBindingsToDescendants(component, el);\n    }\n\n    ko.bindingHandlers.scope = {\n\n        /**\n         * Scope binding's init method.\n         * @returns {Object} - Knockout declaration for it to let binding control descendants.\n         */\n        init: function () {\n            return {\n                controlsDescendantBindings: true\n            };\n        },\n\n        /**\n         * Reads params passed to binding, parses component declarations.\n         * Fetches for those found and attaches them to the new context.\n         * @param {HTMLElement} el - Element to apply bindings to.\n         * @param {Function} valueAccessor - Function that returns value, passed to binding.\n         * @param {Object} allBindings - Object, which represents all bindings applied to element.\n         * @param {Object} viewModel - Object, which represents view model binded to el.\n         * @param {ko.bindingContext} bindingContext - Instance of ko.bindingContext, passed to binding initially.\n         */\n        update: function (el, valueAccessor, allBindings, viewModel, bindingContext) {\n            var component = valueAccessor(),\n                promise = $.Deferred(),\n                apply = applyComponents.bind(this, el, bindingContext, promise),\n                loggerUtils = consoleLogger.utils;\n\n            if (typeof component === 'string') {\n                loggerUtils.asyncLog(\n                    promise,\n                    {\n                        data: {\n                            component: component\n                        },\n                        messages: loggerUtils.createMessages(\n                            'requestingComponent',\n                            'requestingComponentIsLoaded',\n                            'requestingComponentIsFailed'\n                        )\n                    }\n                );\n\n                registry.get(component, apply);\n            } else if (typeof component === 'function') {\n                component(apply);\n            }\n        }\n    };\n\n    ko.virtualElements.allowedBindings.scope = true;\n\n    renderer\n        .addNode('scope')\n        .addAttribute('scope', {\n            name: 'ko-scope'\n        });\n});\n","Magento_Ui/js/lib/knockout/bindings/optgroup.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'ko',\n    'mageUtils'\n    ], function (ko, utils) {\n    'use strict';\n\n    var captionPlaceholder = {},\n        optgroupTmpl = '<optgroup label=\"${ $.label }\"></optgroup>',\n        nbspRe = /&nbsp;/g,\n        optionsText,\n        optionsValue,\n        optionTitle;\n\n    ko.bindingHandlers.optgroup = {\n        /**\n         * @param {*} element\n         * @returns {Object}\n         */\n        init: function (element) {\n            if (ko.utils.tagNameLower(element) !== 'select') {\n                throw new Error('options binding applies only to SELECT elements');\n            }\n\n            // Remove all existing <option>s.\n            while (element.length > 0) {\n                element.remove(0);\n            }\n\n            // Ensures that the binding processor doesn't try to bind the options\n            return {\n                'controlsDescendantBindings': true\n            };\n        },\n\n        /**\n         * @param {*} element\n         * @param {*} valueAccessor\n         * @param {*} allBindings\n         */\n        update: function (element, valueAccessor, allBindings) {\n            var selectWasPreviouslyEmpty = element.length === 0,\n                previousScrollTop = !selectWasPreviouslyEmpty && element.multiple ? element.scrollTop : null,\n                includeDestroyed = allBindings.get('optionsIncludeDestroyed'),\n                arrayToDomNodeChildrenOptions = {},\n                captionValue,\n                unwrappedArray = ko.utils.unwrapObservable(valueAccessor()),\n                filteredArray,\n                previousSelectedValues,\n                itemUpdate = false,\n                callback = setSelectionCallback,//eslint-disable-line no-use-before-define\n                nestedOptionsLevel = -1;\n\n            optionsText = ko.utils.unwrapObservable(allBindings.get('optionsText')) || 'text';\n            optionsValue = ko.utils.unwrapObservable(allBindings.get('optionsValue')) || 'value';\n            optionTitle = optionsText + 'title';\n\n            if (element.multiple) {\n                previousSelectedValues = ko.utils.arrayMap(\n                    selectedOptions(),//eslint-disable-line no-use-before-define\n                    ko.selectExtensions.readValue\n                );\n            } else {\n                previousSelectedValues = element.selectedIndex >= 0 ?\n                    [ko.selectExtensions.readValue(element.options[element.selectedIndex])] :\n                    [];\n            }\n\n            if (unwrappedArray) {\n                if (typeof unwrappedArray.length === 'undefined') { // Coerce single value into array\n                    unwrappedArray = [unwrappedArray];\n                }\n\n                // Filter out any entries marked as destroyed\n                filteredArray = ko.utils.arrayFilter(unwrappedArray, function (item) {\n                    if (item && !item.label) {\n                        return false;\n                    }\n\n                    return includeDestroyed ||\n                        item === undefined ||\n                        item === null ||\n                        !ko.utils.unwrapObservable(item._destroy);\n                });\n                filteredArray.map(recursivePathBuilder, null);//eslint-disable-line no-use-before-define\n            }\n\n            /**\n             * @param {*} option\n             */\n            arrayToDomNodeChildrenOptions.beforeRemove = function (option) {\n                element.removeChild(option);\n            };\n\n            if (allBindings.has('optionsAfterRender')) {\n\n                /**\n                 * @param {*} arrayEntry\n                 * @param {*} newOptions\n                 */\n                callback = function (arrayEntry, newOptions) {\n                    setSelectionCallback(arrayEntry, newOptions);//eslint-disable-line no-use-before-define\n                    ko.dependencyDetection.ignore(\n                        allBindings.get('optionsAfterRender'),\n                        null,\n                        [newOptions[0],\n                        arrayEntry !== captionPlaceholder ? arrayEntry : undefined]\n                    );\n                };\n            }\n\n            filteredArray = formatOptions(filteredArray);//eslint-disable-line no-use-before-define\n            ko.utils.setDomNodeChildrenFromArrayMapping(\n                element,\n                filteredArray,\n                optionNodeFromArray,//eslint-disable-line no-use-before-define\n                arrayToDomNodeChildrenOptions,\n                callback\n            );\n\n            ko.dependencyDetection.ignore(function () {\n                var selectionChanged;\n\n                if (allBindings.get('valueAllowUnset') && allBindings.has('value')) {\n                    // The model value is authoritative, so make sure its value is the one selected\n                    ko.selectExtensions.writeValue(\n                        element,\n                        ko.utils.unwrapObservable(allBindings.get('value')),\n                        true /* allowUnset */\n                    );\n                } else {\n                    // Determine if the selection has changed as a result of updating the options list\n                    if (element.multiple) {\n                        // For a multiple-select box, compare the new selection count to the previous one\n                        // But if nothing was selected before, the selection can't have changed\n                        selectionChanged = previousSelectedValues.length &&\n                            selectedOptions().length < //eslint-disable-line no-use-before-define\n                            previousSelectedValues.length;\n                    } else {\n                        // For a single-select box, compare the current value to the previous value\n                        // But if nothing was selected before or nothing is selected now,\n                        // just look for a change in selection\n                        selectionChanged = previousSelectedValues.length && element.selectedIndex >= 0 ?\n                            ko.selectExtensions.readValue(element.options[element.selectedIndex]) !==\n                            previousSelectedValues[0] : previousSelectedValues.length || element.selectedIndex >= 0;\n                    }\n\n                    // Ensure consistency between model value and selected option.\n                    // If the dropdown was changed so that selection is no longer the same,\n                    // notify the value or selectedOptions binding.\n                    if (selectionChanged) {\n                        ko.utils.triggerEvent(element, 'change');\n                    }\n                }\n            });\n\n            /*eslint-enable max-len, no-use-before-define*/\n\n            if (previousScrollTop && Math.abs(previousScrollTop - element.scrollTop) > 20) {\n                element.scrollTop = previousScrollTop;\n            }\n\n            /**\n             * @returns {*}\n             */\n            function selectedOptions() {\n                return ko.utils.arrayFilter(element.options, function (node) {\n                    return node.selected;\n                });\n            }\n\n            /**\n             * @param {*} object\n             * @param {*} predicate\n             * @param {*} defaultValue\n             * @returns {*}\n             */\n            function applyToObject(object, predicate, defaultValue) {\n                var predicateType = typeof predicate;\n\n                if (predicateType === 'function') {   // run it against the data value\n                    return predicate(object);\n                } else if (predicateType === 'string') { // treat it as a property name on the data value\n                    return object[predicate];\n                }\n\n                return defaultValue;\n            }\n\n            /**\n             * @param {*} obj\n             */\n            function recursivePathBuilder(obj) {\n\n                obj[optionTitle] = (this && this[optionTitle] ? this[optionTitle] + '/' : '') + obj[optionsText].trim();\n\n                if (Array.isArray(obj[optionsValue])) {\n                    obj[optionsValue].map(recursivePathBuilder, obj);\n                }\n            }\n\n            /**\n             * @param {Array} arrayEntry\n             * @param {*} oldOptions\n             * @returns {*[]}\n             */\n            function optionNodeFromArray(arrayEntry, oldOptions) {\n                var option;\n\n                if (oldOptions.length) {\n                    previousSelectedValues = oldOptions[0].selected ?\n                        [ko.selectExtensions.readValue(oldOptions[0])] : [];\n                    itemUpdate = true;\n                }\n\n                if (arrayEntry === captionPlaceholder) { // empty value, label === caption\n                    option = element.ownerDocument.createElement('option');\n                    ko.utils.setTextContent(option, allBindings.get('optionsCaption'));\n                    ko.selectExtensions.writeValue(option, undefined);\n                } else if (typeof arrayEntry[optionsValue] === 'undefined') { // empty value === optgroup\n                    option = utils.template(optgroupTmpl, {\n                        label: arrayEntry[optionsText],\n                        title: arrayEntry[optionsText + 'title']\n                    });\n                    option = ko.utils.parseHtmlFragment(option)[0];\n\n                } else {\n                    option = element.ownerDocument.createElement('option');\n                    option.setAttribute('data-title', arrayEntry[optionsText + 'title']);\n                    ko.selectExtensions.writeValue(option, arrayEntry[optionsValue]);\n                    ko.utils.setTextContent(option, arrayEntry[optionsText]);\n                }\n\n                return [option];\n            }\n\n            /**\n             * @param {*} newOptions\n             */\n            function setSelectionCallback(newOptions) {\n                var isSelected;\n\n                // IE6 doesn't like us to assign selection to OPTION nodes before they're added to the document.\n                // That's why we first added them without selection. Now it's time to set the selection.\n                if (previousSelectedValues.length) {\n                    isSelected = ko.utils.arrayIndexOf(\n                        previousSelectedValues,\n                        ko.selectExtensions.readValue(newOptions.value)\n                    ) >= 0;\n\n                    ko.utils.setOptionNodeSelectionState(newOptions.value, isSelected);\n\n                    // If this option was changed from being selected during a single-item update, notify the change\n                    if (itemUpdate && !isSelected) {\n                        ko.dependencyDetection.ignore(ko.utils.triggerEvent, null, [element, 'change']);\n                    }\n                }\n            }\n\n            /**\n             * @param {*} string\n             * @param {Number} times\n             * @returns {Array}\n             */\n            function strPad(string, times) {\n                return (new Array(times + 1)).join(string);\n            }\n\n            /**\n             * @param {*} options\n             * @returns {Array}\n             */\n            function formatOptions(options) {\n                var res = [];\n\n                nestedOptionsLevel++;\n\n                if (!nestedOptionsLevel) { // zero level\n                    // If caption is included, add it to the array\n                    if (allBindings.has('optionsCaption')) {\n                        captionValue = ko.utils.unwrapObservable(allBindings.get('optionsCaption'));\n                        // If caption value is null or undefined, don't show a caption\n                        if (//eslint-disable-line max-depth\n                            captionValue !== null &&\n                            captionValue !== undefined &&\n                            captionValue !== false\n                        ) {\n                            res.push(captionPlaceholder);\n                        }\n                    }\n                }\n\n                ko.utils.arrayForEach(options, function (option) {\n                    var value = applyToObject(option, optionsValue, option),\n                        label = applyToObject(option, optionsText, value) || '',\n                        disabled = applyToObject(option, 'disabled', false) || false,\n                        obj = {},\n                        space = '\\u2007\\u2007\\u2007';\n\n                    obj[optionTitle] = applyToObject(option, optionsText + 'title', value);\n\n                    if (disabled) {\n                        obj.disabled = disabled;\n                    }\n\n                    label = label.replace(nbspRe, '').trim();\n\n                    if (Array.isArray(value)) {\n                        obj[optionsText] = strPad('&nbsp;', nestedOptionsLevel * 4) + label;\n                        res.push(obj);\n                        res = res.concat(formatOptions(value));\n                    } else {\n                        obj[optionsText] = strPad(space, nestedOptionsLevel * 2) + label;\n                        obj[optionsValue] = value;\n                        res.push(obj);\n                    }\n                });\n                nestedOptionsLevel--;\n\n                return res;\n            }\n        }\n    };\n    ko.bindingHandlers.selectedOptions.after.push('optgroup');\n});\n","Magento_Ui/js/lib/knockout/bindings/bootstrap.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine(function (require) {\n    'use strict';\n\n    var renderer = require('../template/renderer');\n\n    renderer.addAttribute('repeat', renderer.handlers.wrapAttribute);\n\n    renderer.addAttribute('outerfasteach', {\n        binding: 'fastForEach',\n        handler: renderer.handlers.wrapAttribute\n    });\n\n    renderer\n        .addNode('repeat')\n        .addNode('fastForEach');\n\n    return {\n        resizable:      require('./resizable'),\n        i18n:           require('./i18n'),\n        scope:          require('./scope'),\n        range:          require('./range'),\n        mageInit:       require('./mage-init'),\n        keyboard:       require('./keyboard'),\n        optgroup:       require('./optgroup'),\n        afterRender:     require('./after-render'),\n        autoselect:     require('./autoselect'),\n        datepicker:     require('./datepicker'),\n        outerClick:     require('./outer_click'),\n        fadeVisible:    require('./fadeVisible'),\n        collapsible:    require('./collapsible'),\n        staticChecked:  require('./staticChecked'),\n        simpleChecked:  require('./simple-checked'),\n        bindHtml:       require('./bind-html'),\n        tooltip:        require('./tooltip'),\n        repeat:         require('knockoutjs/knockout-repeat'),\n        fastForEach:    require('knockoutjs/knockout-fast-foreach'),\n        colorPicker:    require('./color-picker')\n    };\n});\n","Magento_Ui/js/lib/knockout/bindings/simple-checked.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'ko',\n    '../template/renderer'\n], function (ko, renderer) {\n    'use strict';\n\n    ko.bindingHandlers.simpleChecked = {\n        'after': ['attr'],\n\n        /**\n         * Implements same functionality as a standard 'simpleChecked' binding,\n         * but with a difference that it wont' change values array if\n         * value of DOM element changes.\n         */\n        init: function (element, valueAccessor) {\n            var isCheckbox = element.type === 'checkbox',\n                isRadio = element.type === 'radio',\n                updateView,\n                updateModel;\n\n            if (!isCheckbox && !isRadio) {\n                return;\n            }\n\n            /**\n             * Updates checked observable\n             */\n            updateModel = function () {\n                var  modelValue = ko.dependencyDetection.ignore(valueAccessor),\n                    isChecked = element.checked;\n\n                if (ko.computedContext.isInitial()) {\n                    return;\n                }\n\n                if (modelValue.peek() === isChecked) {\n                    return;\n                }\n\n                if (isRadio && !isChecked) {\n                    return;\n                }\n\n                modelValue(isChecked);\n            };\n\n            /**\n             * Updates checkbox state\n             */\n            updateView = function () {\n                var modelValue = ko.utils.unwrapObservable(valueAccessor());\n\n                element.checked = !!modelValue;\n            };\n\n            ko.utils.registerEventHandler(element, 'change', updateModel);\n\n            ko.computed(updateModel, null, {\n                disposeWhenNodeIsRemoved: element\n            });\n            ko.computed(updateView, null, {\n                disposeWhenNodeIsRemoved: element\n            });\n        }\n    };\n\n    ko.expressionRewriting._twoWayBindings.simpleChecked = true;\n\n    renderer.addAttribute('simpleChecked');\n    renderer.addAttribute('simple-checked', {\n        binding: 'simpleChecked'\n    });\n});\n","Magento_Ui/js/lib/knockout/bindings/tooltip.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'ko',\n    'underscore',\n    'mage/template',\n    'text!ui/template/tooltip/tooltip.html',\n    '../template/renderer'\n], function ($, ko, _, template, tooltipTmpl, renderer) {\n    'use strict';\n\n    var tooltip,\n        defaults,\n        positions,\n        transformProp,\n        checkedPositions = {},\n        iterator = 0,\n        previousTooltip,\n        tooltipData,\n        positionData = {},\n        tooltipsCollection = {},\n        isTouchDevice = (function () {\n            return 'ontouchstart' in document.documentElement;\n        })(),\n        CLICK_EVENT = (function () {\n            return isTouchDevice ? 'touchstart' : 'click';\n        })();\n\n    defaults = {\n        tooltipWrapper: '[data-tooltip=tooltip-wrapper]',\n        tooltipContentBlock: 'data-tooltip-content',\n        closeButtonClass: 'action-close',\n        tailClass: 'data-tooltip-tail',\n        action: 'hover',\n        delay: 300,\n        track: false,\n        step: 20,\n        position: 'top',\n        closeButton: false,\n        showed: false,\n        strict: true,\n        center: false,\n        closeOnScroll: true\n    };\n\n    tooltipData = {\n        tooltipClasses: '',\n        trigger: false,\n        timeout: 0,\n        element: false,\n        event: false,\n        targetElement: {},\n        showed: false,\n        currentID: 0\n    };\n\n    /**\n     * Polyfill for css transform\n     */\n    transformProp = (function () {\n        var style = document.createElement('div').style,\n            base = 'Transform',\n            vendors = ['webkit', 'moz', 'ms', 'o'],\n            vi = vendors.length,\n            property;\n\n        if (typeof style.transform !== 'undefined') {\n            return 'transform';\n        }\n\n        while (vi--) {\n            property = vendors[vi] + base;\n\n            if (typeof style[property] !== 'undefined') {\n                return property;\n            }\n        }\n    })();\n\n    positions = {\n\n        /*eslint max-depth: [0, 0]*/\n\n        map: {\n            horizontal: {\n                s: 'w',\n                p: 'left'\n            },\n            vertical: {\n                s: 'h',\n                p: 'top'\n            }\n        },\n\n        /**\n         * Wrapper function to get tooltip data (position, className, etc)\n         *\n         * @param {Object} s - object with sizes and positions elements\n         * @returns {Object} tooltip data (position, className, etc)\n         */\n        top: function (s) {\n            return positions._topLeftChecker(s, positions.map, 'vertical', '_bottom', 'top', 'right');\n        },\n\n        /**\n         * Wrapper function to get tooltip data (position, className, etc)\n         *\n         * @param {Object} s - object with sizes and positions elements\n         * @returns {Object} tooltip data (position, className, etc)\n         */\n        left: function (s) {\n            return positions._topLeftChecker(s, positions.map, 'horizontal', '_right', 'left', 'top');\n        },\n\n        /**\n         * Wrapper function to get tooltip data (position, className, etc)\n         *\n         * @param {Object} s - object with sizes and positions elements\n         * @returns {Object} tooltip data (position, className, etc)\n         */\n        bottom: function (s) {\n            return positions._bottomRightChecker(s, positions.map, 'vertical', '_top', 'bottom', 'left');\n        },\n\n        /**\n         * Wrapper function to get tooltip data (position, className, etc)\n         *\n         * @param {Object} s - object with sizes and positions elements\n         * @returns {Object} tooltip data (position, className, etc)\n         */\n        right: function (s) {\n            return positions._bottomRightChecker(s, positions.map, 'horizontal', '_left', 'right', 'bottom');\n        },\n\n        /**\n         * Check can tooltip setted on current position or not. If can't setted - delegate call.\n         *\n         * @param {Object} s - object with sizes and positions elements\n         * @param {Object} map - mapping for get direction positions\n         * @param {String} direction - vertical or horizontal\n         * @param {String} className - class whats should be setted to tooltip\n         * @param {String} side - parent method name\n         * @param {String} delegate - method name if tooltip can't be setted in current position\n         * @returns {Object} tooltip data (position, className, etc)\n         */\n        _topLeftChecker: function (s, map, direction, className, side, delegate) {\n            var result = {\n                    position: {}\n                },\n                config = tooltip.getTooltip(tooltipData.currentID),\n                startPosition = !config.strict ? s.eventPosition : s.elementPosition,\n                changedDirection;\n\n            checkedPositions[side] = true;\n\n            if (\n                startPosition[map[direction].p] - s.tooltipSize[map[direction].s] - config.step >\n                s.scrollPosition[map[direction].p]\n            ) {\n                result.position[map[direction].p] = startPosition[map[direction].p] - s.tooltipSize[map[direction].s] -\n                    config.step;\n                result.className = className;\n                result.side = side;\n                changedDirection = direction === 'vertical' ? 'horizontal' : 'vertical';\n                result = positions._normalize(s, result, config, delegate, map, changedDirection);\n            } else if (!checkedPositions[delegate]) {\n                result = positions[delegate].apply(null, arguments);\n            } else {\n                result = positions.positionCenter(s, result);\n            }\n\n            return result;\n        },\n\n        /**\n         * Check can tooltip setted on current position or not. If can't setted - delegate call.\n         *\n         * @param {Object} s - object with sizes and positions elements\n         * @param {Object} map - mapping for get direction positions\n         * @param {String} direction - vertical or horizontal\n         * @param {String} className - class whats should be setted to tooltip\n         * @param {String} side - parent method name\n         * @param {String} delegate - method name if tooltip can't be setted in current position\n         * @returns {Object} tooltip data (position, className, etc)\n         */\n        _bottomRightChecker: function (s, map, direction, className, side, delegate) {\n            var result = {\n                    position: {}\n                },\n                config = tooltip.getTooltip(tooltipData.currentID),\n                startPosition = !config.strict ? s.eventPosition : {\n                    top: s.elementPosition.top + s.elementSize.h,\n                    left: s.elementPosition.left + s.elementSize.w\n                },\n                changedDirection;\n\n            checkedPositions[side] = true;\n\n            if (\n                startPosition[map[direction].p] + s.tooltipSize[map[direction].s] + config.step <\n                s.scrollPosition[map[direction].p] + s.windowSize[map[direction].s]\n            ) {\n                result.position[map[direction].p] = startPosition[map[direction].p] + config.step;\n                result.className = className;\n                result.side = side;\n                changedDirection = direction === 'vertical' ? 'horizontal' : 'vertical';\n                result = positions._normalize(s, result, config, delegate, map, changedDirection);\n            } else if (!checkedPositions[delegate]) {\n                result = positions[delegate].apply(null, arguments);\n            } else {\n                result = positions.positionCenter(s, result);\n            }\n\n            return result;\n        },\n\n        /**\n         * Centered tooltip if tooltip does not fit in window\n         *\n         * @param {Object} s - object with sizes and positions elements\n         * @param {Object} data - current data (position, className, etc)\n         * @returns {Object} tooltip data (position, className, etc)\n         */\n        positionCenter: function (s, data) {\n            data = positions._positionCenter(s, data, 'horizontal', positions.map);\n            data = positions._positionCenter(s, data, 'vertical', positions.map);\n\n            return data;\n        },\n\n        /**\n         * Centered tooltip side\n         *\n         * @param {Object} s - object with sizes and positions elements\n         * @param {Object} data - current data (position, className, etc)\n         * @param {String} direction - vertical or horizontal\n         * @param {Object} map - mapping for get direction positions\n         * @returns {Object} tooltip data (position, className, etc)\n         */\n        _positionCenter: function (s, data, direction, map) {\n            if (s.tooltipSize[map[direction].s] < s.windowSize[map[direction].s]) {\n                data.position[map[direction].p] = (s.windowSize[map[direction].s] -\n                    s.tooltipSize[map[direction].s]) / 2 + s.scrollPosition[map[direction].p];\n            } else {\n                data.position[map[direction].p] = s.scrollPosition[map[direction].p];\n                data.tooltipSize = {};\n                data.tooltipSize[map[direction].s] = s.windowSize[map[direction].s];\n            }\n\n            return data;\n        },\n\n        /**\n         * Normalize horizontal or vertical position.\n         *\n         * @param {Object} s - object with sizes and positions elements\n         * @param {Object} data - current data (position, className, etc)\n         * @param {Object} config - tooltip config\n         * @param {String} delegate - method name if tooltip can't be setted in current position\n         * @param {Object} map - mapping for get direction positions\n         * @param {String} direction - vertical or horizontal\n         * @returns {Object} tooltip data (position, className, etc)\n         */\n        _normalize: function (s, data, config, delegate, map, direction) {\n            var startPosition = !config.center ? s.eventPosition : {\n                    left: s.elementPosition.left + s.elementSize.w / 2,\n                    top: s.elementPosition.top + s.elementSize.h / 2\n                },\n                depResult;\n\n            if (startPosition[map[direction].p] - s.tooltipSize[map[direction].s] / 2 >\n                s.scrollPosition[map[direction].p] && startPosition[map[direction].p] +\n                s.tooltipSize[map[direction].s] / 2 <\n                s.scrollPosition[map[direction].p] + s.windowSize[map[direction].s]\n            ) {\n                data.position[map[direction].p] = startPosition[map[direction].p] - s.tooltipSize[map[direction].s] / 2;\n            } else {\n\n                /*eslint-disable no-lonely-if*/\n                if (!checkedPositions[delegate]) {\n                    depResult = positions[delegate].apply(null, arguments);\n\n                    if (depResult.hasOwnProperty('className')) {\n                        data = depResult;\n                    } else {\n                        data = positions._normalizeTail(s, data, config, delegate, map, direction, startPosition);\n                    }\n                } else {\n                    data = positions._normalizeTail(s, data, config, delegate, map, direction, startPosition);\n                }\n            }\n\n            return data;\n        },\n\n        /**\n         * Calc tail position.\n         *\n         * @param {Object} s - object with sizes and positions elements\n         * @param {Object} data - current data (position, className, etc)\n         * @param {Object} config - tooltip config\n         * @param {String} delegate - method name if tooltip can't be setted in current position\n         * @param {Object} map - mapping for get direction positions\n         * @param {String} direction - vertical or horizontal\n         * @param {Object} startPosition - start position\n         * @returns {Object} tooltip data (position, className, etc)\n         */\n        _normalizeTail: function (s, data, config, delegate, map, direction, startPosition) {\n            data.tail = {};\n\n            if (s.tooltipSize[map[direction].s] < s.windowSize[map[direction].s]) {\n\n                if (\n                    startPosition[map[direction].p] >\n                    s.windowSize[map[direction].s] / 2 + s.scrollPosition[map[direction].p]\n                ) {\n                    data.position[map[direction].p] = s.windowSize[map[direction].s] +\n                        s.scrollPosition[map[direction].p] - s.tooltipSize[map[direction].s];\n                    data.tail[map[direction].p] = startPosition[map[direction].p] -\n                        s.tooltipSize[map[direction].s] / 2 - data.position[map[direction].p];\n                } else {\n                    data.position[map[direction].p] = s.scrollPosition[map[direction].p];\n                    data.tail[map[direction].p] = startPosition[map[direction].p] -\n                        s.tooltipSize[map[direction].s] / 2 - data.position[map[direction].p];\n                }\n            } else {\n                data.position[map[direction].p] = s.scrollPosition[map[direction].p];\n                data.tail[map[direction].p] = s.eventPosition[map[direction].p] - s.windowSize[map[direction].s] / 2;\n                data.tooltipSize = {};\n                data.tooltipSize[map[direction].s] = s.windowSize[map[direction].s];\n            }\n\n            return data;\n        }\n    };\n\n    tooltip = {\n\n        /**\n         * Set new tooltip to tooltipCollection, save config, and add unic id\n         *\n         * @param {Object} config - tooltip config\n         * @returns {String} tooltip id\n         */\n        setTooltip: function (config) {\n            var property = 'id-' + iterator;\n\n            tooltipsCollection[property] = config;\n            iterator++;\n\n            return property;\n        },\n\n        /**\n         * Get tooltip config by id\n         *\n         * @param {String} id - tooltip id\n         * @returns {Object} tooltip config\n         */\n        getTooltip: function (id) {\n            return tooltipsCollection[id];\n        },\n\n        /**\n         * Set content to current tooltip\n         *\n         * @param {Object} tooltipElement - tooltip element\n         * @param {Object} viewModel - tooltip view model\n         * @param {String} id - tooltip id\n         * @param {Object} bindingCtx - tooltip context\n         * @param {Object} event - action event\n         */\n        setContent: function (tooltipElement, viewModel, id, bindingCtx, event) {\n            var html = $(tooltipElement).html(),\n                config = tooltip.getTooltip(id),\n                body = $('body');\n\n            tooltipData.currentID = id;\n            tooltipData.trigger = $(event.currentTarget);\n            tooltip.setTargetData(event);\n            body.on('mousemove.setTargetData', tooltip.setTargetData);\n            tooltip.clearTimeout(id);\n\n            tooltipData.timeout = _.delay(function () {\n                body.off('mousemove.setTargetData', tooltip.setTargetData);\n\n                if (tooltipData.trigger[0] === tooltipData.targetElement) {\n                    tooltip.destroy(id);\n                    event.stopPropagation();\n                    tooltipElement = tooltip.createTooltip(id);\n                    tooltipElement.find('.' + defaults.tooltipContentBlock).append(html);\n                    tooltipElement.applyBindings(bindingCtx);\n                    tooltip.setHandlers(id);\n                    tooltip.setPosition(tooltipElement, id);\n                    previousTooltip = id;\n                }\n\n            }, config.delay);\n        },\n\n        /**\n         * Set position to current tooltip\n         *\n         * @param {Object} tooltipElement - tooltip element\n         * @param {String} id - tooltip id\n         */\n        setPosition: function (tooltipElement, id) {\n            var config = tooltip.getTooltip(id);\n\n            tooltip.sizeData = {\n                windowSize: {\n                    h: $(window).outerHeight(),\n                    w: $(window).outerWidth()\n                },\n                scrollPosition: {\n                    top: $(window).scrollTop(),\n                    left: $(window).scrollLeft()\n                },\n                tooltipSize: {\n                    h: tooltipElement.outerHeight(),\n                    w: tooltipElement.outerWidth()\n                },\n                elementSize: {\n                    h: tooltipData.trigger.outerHeight(),\n                    w: tooltipData.trigger.outerWidth()\n                },\n                elementPosition: tooltipData.trigger.offset(),\n                eventPosition: this.getEventPosition(tooltipData.event)\n            };\n\n            _.extend(positionData, positions[config.position](tooltip.sizeData));\n            tooltipElement.css(positionData.position);\n            tooltipElement.addClass(positionData.className);\n            tooltip._setTooltipSize(positionData, tooltipElement);\n            tooltip._setTailPosition(positionData, tooltipElement);\n            checkedPositions = {};\n        },\n\n        /**\n         * Check position data and change tooltip size if needs\n         *\n         * @param {Object} data - position data\n         * @param {Object} tooltipElement - tooltip element\n         */\n        _setTooltipSize: function (data, tooltipElement) {\n            if (data.tooltipSize) {\n                data.tooltipSize.w ?\n                    tooltipElement.css('width', data.tooltipSize.w) :\n                    tooltipElement.css('height', data.tooltipSize.h);\n            }\n        },\n\n        /**\n         * Check position data and set position to tail\n         *\n         * @param {Object} data - position data\n         * @param {Object} tooltipElement - tooltip element\n         */\n        _setTailPosition: function (data, tooltipElement) {\n            var tail,\n                tailMargin;\n\n            if (data.tail) {\n                tail = tooltipElement.find('.' + defaults.tailClass);\n\n                if (data.tail.left) {\n                    tailMargin = parseInt(tail.css('margin-left'), 10);\n                    tail.css('margin-left', tailMargin + data.tail.left);\n                } else {\n                    tailMargin = parseInt(tail.css('margin-top'), 10);\n                    tail.css('margin-top', tailMargin + data.tail.top);\n                }\n            }\n        },\n\n        /**\n         * Resolves position for tooltip\n         *\n         * @param {Object} event\n         * @returns {Object}\n         */\n        getEventPosition: function (event) {\n            var position = {\n                left: event.originalEvent && event.originalEvent.pageX || 0,\n                top: event.originalEvent && event.originalEvent.pageY || 0\n            };\n\n            if (position.left === 0 && position.top === 0) {\n                _.extend(position, event.target.getBoundingClientRect());\n            }\n\n            return position;\n        },\n\n        /**\n         * Close tooltip if action happened outside handler and tooltip element\n         *\n         * @param {String} id - tooltip id\n         * @param {Object} event - action event\n         */\n        outerClick: function (id, event) {\n            var tooltipElement = $(event.target).parents(defaults.tooltipWrapper)[0],\n                isTrigger = event.target === tooltipData.trigger[0] || $.contains(tooltipData.trigger[0], event.target);\n\n            if (tooltipData.showed && tooltipElement !== tooltipData.element[0] && !isTrigger) {\n                tooltip.destroy(id);\n            }\n        },\n\n        /**\n         * Parse keydown event and if event trigger is escape key - close tooltip\n         *\n         * @param {Object} event - action event\n         */\n        keydownHandler: function (event) {\n            if (tooltipData.showed && event.keyCode === 27) {\n                tooltip.destroy(tooltipData.currentID);\n            }\n        },\n\n        /**\n         * Change tooltip position when track is enabled\n         *\n         * @param {Object} event - current event\n         */\n        track: function (event) {\n            var inequality = {},\n                map = positions.map,\n                translate = {\n                    left: 'translateX',\n                    top: 'translateY'\n                },\n                eventPosition = {\n                    left: event.pageX,\n                    top: event.pageY\n                },\n                tooltipSize = {\n                    w: tooltipData.element.outerWidth(),\n                    h: tooltipData.element.outerHeight()\n                },\n                direction = positionData.side === 'bottom' || positionData.side === 'top' ? 'horizontal' : 'vertical';\n\n            inequality[map[direction].p] = eventPosition[map[direction].p] - (positionData.position[map[direction].p] +\n                tooltipSize[map[direction].s] / 2);\n\n            if (positionData.position[map[direction].p] + inequality[map[direction].p] +\n                tooltip.sizeData.tooltipSize[map[direction].s] >\n                tooltip.sizeData.windowSize[map[direction].s] + tooltip.sizeData.scrollPosition[map[direction].p] ||\n                inequality[map[direction].p] + positionData.position[map[direction].p] <\n                tooltip.sizeData.scrollPosition[map[direction].p]) {\n\n                return false;\n            }\n\n            tooltipData.element[0].style[transformProp] = translate[map[direction].p] +\n                '(' + inequality[map[direction].p] + 'px)';\n        },\n\n        /**\n         * Set handlers to tooltip\n         *\n         * @param {String} id - tooltip id\n         */\n        setHandlers: function (id) {\n            var config = tooltip.getTooltip(id);\n\n            if (config.track) {\n                tooltipData.trigger.on('mousemove.track', tooltip.track);\n            }\n\n            if (config.action === 'click') {\n                $(window).on(CLICK_EVENT + '.outerClick', tooltip.outerClick.bind(null, id));\n            }\n\n            if (config.closeButton) {\n                $('.' + config.closeButtonClass).on('click.closeButton', tooltip.destroy.bind(null, id));\n            }\n\n            if (config.closeOnScroll) {\n                document.addEventListener('scroll', tooltip.destroy, true);\n                $(window).on('scroll.tooltip', tooltip.outerClick.bind(null, id));\n            }\n\n            $(window).on('keydown.tooltip', tooltip.keydownHandler);\n            $(window).on('resize.outerClick', tooltip.outerClick.bind(null, id));\n        },\n\n        /**\n         * Toggle tooltip\n         *\n         * @param {Object} tooltipElement - tooltip element\n         * @param {Object} viewModel - tooltip view model\n         * @param {String} id - tooltip id\n         */\n        toggleTooltip: function (tooltipElement, viewModel, id) {\n            if (previousTooltip === id && tooltipData.showed) {\n                tooltip.destroy(id);\n\n                return false;\n            }\n\n            tooltip.setContent.apply(null, arguments);\n\n            return false;\n        },\n\n        /**\n         * Create tooltip and append to DOM\n         *\n         * @param {String} id - tooltip id\n         * @returns {Object} tooltip element\n         */\n        createTooltip: function (id) {\n            var body = $('body'),\n                config = tooltip.getTooltip(id);\n\n            $(template(tooltipTmpl, {\n                data: config\n            })).appendTo(body);\n\n            tooltipData.showed = true;\n            tooltipData.element = $(config.tooltipWrapper);\n\n            return tooltipData.element;\n        },\n\n        /**\n         * Check action and clean timeout\n         *\n         * @param {String} id - tooltip id\n         */\n        clearTimeout: function (id) {\n            var config = tooltip.getTooltip(id);\n\n            if (config.action === 'hover') {\n                clearTimeout(tooltipData.timeout);\n            }\n        },\n\n        /**\n         * Check previous tooltip\n         */\n        checkPreviousTooltip: function () {\n            if (!tooltipData.timeout) {\n                tooltip.destroy();\n            }\n        },\n\n        /**\n         * Destroy tooltip instance\n         */\n        destroy: function () {\n            if (tooltipData.element) {\n                tooltipData.element.remove();\n                tooltipData.showed = false;\n            }\n\n            positionData = {};\n            tooltipData.timeout = false;\n            tooltip.removeHandlers();\n        },\n\n        /**\n         * Remove tooltip handlers\n         */\n        removeHandlers: function () {\n            $('.' + defaults.closeButtonClass).off('click.closeButton');\n            tooltipData.trigger.off('mousemove.track');\n            document.removeEventListener('scroll', tooltip.destroy, true);\n            $(window).off('scroll.tooltip');\n            $(window).off(CLICK_EVENT + '.outerClick');\n            $(window).off('keydown.tooltip');\n            $(window).off('resize.outerClick');\n        },\n\n        /**\n         * Set target element\n         *\n         * @param {Object} event - current event\n         */\n        setTargetData: function (event) {\n            tooltipData.event = event;\n\n            //TODO: bug chrome v.49; Link to issue https://bugs.chromium.org/p/chromium/issues/detail?id=161464\n            if (event.timeStamp - (tooltipData.timestamp || 0) < 1) {\n                return;\n            }\n\n            if (event.type === 'mousemove') {\n                tooltipData.targetElement = event.target;\n            } else {\n                tooltipData.targetElement = event.currentTarget;\n                tooltipData.timestamp = event.timeStamp;\n            }\n        },\n\n        /**\n         * Merged user config with defaults configuration\n         *\n         * @param {Object} config - user config\n         * @returns {Object} merged config\n         */\n        processingConfig: function (config) {\n            return _.extend({}, defaults, config);\n        }\n    };\n\n    ko.bindingHandlers.tooltip = {\n\n        /**\n         * Initialize tooltip\n         *\n         * @param {Object} elem - tooltip DOM element\n         * @param {Function} valueAccessor - ko observable property, tooltip data\n         * @param {Object} allBindings - all bindings on current element\n         * @param {Object} viewModel - current element viewModel\n         * @param {Object} bindingCtx - current element binding context\n         */\n        init: function (elem, valueAccessor, allBindings, viewModel, bindingCtx) {\n            var config = tooltip.processingConfig(valueAccessor()),\n                $parentScope = config.parentScope ? $(config.parentScope) : $(elem).parent(),\n                tooltipId;\n\n            $(elem).addClass('hidden');\n\n            if (isTouchDevice) {\n                config.action = 'click';\n            }\n            tooltipId = tooltip.setTooltip(config);\n\n            if (config.action === 'hover') {\n                $parentScope.on(\n                    'mouseenter',\n                    config.trigger,\n                    tooltip.setContent.bind(null, elem, viewModel, tooltipId, bindingCtx)\n                );\n                $parentScope.on(\n                    'mouseleave',\n                    config.trigger,\n                    tooltip.checkPreviousTooltip.bind(null, tooltipId)\n                );\n            } else if (config.action === 'click') {\n                $parentScope.on(\n                    'click',\n                    config.trigger,\n                    tooltip.toggleTooltip.bind(null, elem, viewModel, tooltipId, bindingCtx)\n                );\n            }\n\n            return {\n                controlsDescendantBindings: true\n            };\n        }\n    };\n\n    renderer.addAttribute('tooltip');\n});\n","Magento_Ui/js/lib/knockout/bindings/fadeVisible.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'jquery',\n    'ko'\n], function ($, ko) {\n    'use strict';\n\n    ko.bindingHandlers.fadeVisible = {\n        /**\n         * Initially set the element to be instantly visible/hidden depending on the value.\n         *\n         * @param {HTMLElement} element\n         * @param {Function} valueAccessor\n         */\n        init: function (element, valueAccessor) {\n            var value = valueAccessor();\n\n            // Use \"unwrapObservable\" so we can handle values that may or may not be observable\n            $(element).toggle(ko.unwrap(value));\n        },\n\n        /**\n         * Whenever the value subsequently changes, slowly fade the element in or out.\n         *\n         * @param {HTMLElement} element\n         * @param {Function} valueAccessor\n         */\n        update: function (element, valueAccessor) {\n            var value = valueAccessor();\n\n            ko.unwrap(value) ? $(element).fadeIn() : $(element).fadeOut();\n        }\n    };\n});\n","Magento_Ui/js/lib/knockout/bindings/bind-html.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'ko',\n    'underscore',\n    'mage/apply/main',\n    '../template/renderer'\n], function (ko, _, mage, renderer) {\n    'use strict';\n\n    /**\n     * Set html to node element.\n     *\n     * @param {HTMLElement} el - Element to apply bindings to.\n     * @param {Function} html - Observable html content.\n     */\n    function setHtml(el, html) {\n        ko.utils.emptyDomNode(el);\n        html = ko.utils.unwrapObservable(html);\n\n        if (!_.isNull(html) && !_.isUndefined(html)) {\n            if (!_.isString(html)) {\n                html = html.toString();\n            }\n\n            el.innerHTML = html;\n        }\n    }\n\n    /**\n     * Apply bindings and call magento attributes parser.\n     *\n     * @param {HTMLElement} el - Element to apply bindings to.\n     * @param {ko.bindingContext} ctx - Instance of ko.bindingContext, passed to binding initially.\n     */\n    function applyComponents(el, ctx) {\n        ko.utils.arrayForEach(el.childNodes, ko.cleanNode);\n        ko.applyBindingsToDescendants(ctx, el);\n        mage.apply();\n    }\n\n    ko.bindingHandlers.bindHtml = {\n        /**\n         * Scope binding's init method.\n         *\n         * @returns {Object} - Knockout declaration for it to let binding control descendants.\n         */\n        init: function () {\n            return {\n                controlsDescendantBindings: true\n            };\n        },\n\n        /**\n         * Reads params passed to binding.\n         * Set html to node element, apply bindings and call magento attributes parser.\n         *\n         * @param {HTMLElement} el - Element to apply bindings to.\n         * @param {Function} valueAccessor - Function that returns value, passed to binding.\n         * @param {Object} allBindings - Object, which represents all bindings applied to element.\n         * @param {Object} viewModel - Object, which represents view model binded to el.\n         * @param {ko.bindingContext} bindingContext - Instance of ko.bindingContext, passed to binding initially.\n         */\n        update: function (el, valueAccessor, allBindings, viewModel, bindingContext) {\n            setHtml(el, valueAccessor());\n            applyComponents(el, bindingContext);\n        }\n    };\n\n    renderer.addAttribute('bindHtml');\n});\n","Magento_Ui/js/lib/knockout/bindings/keyboard.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'ko',\n    '../template/renderer'\n], function (ko, renderer) {\n    'use strict';\n\n    ko.bindingHandlers.keyboard = {\n\n        /**\n         * Attaches keypress handlers to element\n         * @param {HTMLElement} el - Element, that binding is applied to\n         * @param {Function} valueAccessor - Function that returns value, passed to binding\n         * @param  {Object} allBindings - all bindings object\n         * @param  {Object} viewModel - reference to viewmodel\n         */\n        init: function (el, valueAccessor, allBindings, viewModel) {\n            var map = valueAccessor();\n\n            ko.utils.registerEventHandler(el, 'keyup', function (e) {\n                var callback = map[e.keyCode];\n\n                if (callback) {\n                    return callback.call(viewModel, e);\n                }\n            });\n        }\n    };\n\n    renderer.addAttribute('keyboard');\n});\n","Magento_Ui/js/lib/knockout/bindings/staticChecked.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'ko',\n    '../template/renderer'\n], function (ko, renderer) {\n    'use strict';\n\n    ko.bindingHandlers.staticChecked = {\n        'after': ['value', 'attr'],\n\n        /**\n         * Implements same functionality as a standard 'checked' binding,\n         * but with a difference that it wont' change values array if\n         * value of DOM element changes.\n         */\n        init: function (element, valueAccessor, allBindings) {\n            var isCheckbox = element.type === 'checkbox',\n                isRadio = element.type === 'radio',\n                isValueArray,\n                oldElemValue,\n                useCheckedValue,\n                checkedValue,\n                updateModel,\n                updateView;\n\n            if (!isCheckbox && !isRadio) {\n                return;\n            }\n\n            checkedValue = ko.pureComputed(function () {\n                if (allBindings.has('checkedValue')) {\n                    return ko.utils.unwrapObservable(allBindings.get('checkedValue'));\n                } else if (allBindings.has('value')) {\n                    return ko.utils.unwrapObservable(allBindings.get('value'));\n                }\n\n                return element.value;\n            });\n\n            isValueArray = isCheckbox && ko.utils.unwrapObservable(valueAccessor()) instanceof Array;\n            oldElemValue = isValueArray ? checkedValue() : undefined;\n            useCheckedValue = isRadio || isValueArray;\n\n            /**\n             * Updates values array if it's necessary.\n             */\n            updateModel = function () {\n                var isChecked = element.checked,\n                    elemValue = useCheckedValue ? checkedValue() : isChecked,\n                    modelValue;\n\n                if (ko.computedContext.isInitial()) {\n                    return;\n                }\n\n                if (isRadio && !isChecked) {\n                    return;\n                }\n\n                modelValue = ko.dependencyDetection.ignore(valueAccessor);\n\n                if (isValueArray) {\n                    if (oldElemValue !== elemValue) {\n                        oldElemValue = elemValue;\n                    } else {\n                        ko.utils.addOrRemoveItem(modelValue, elemValue, isChecked);\n                    }\n                } else {\n                    ko.expressionRewriting.writeValueToProperty(modelValue, allBindings, 'checked', elemValue, true);\n                }\n            };\n\n            /**\n             * Updates checkbox state.\n             */\n            updateView = function () {\n                var modelValue = ko.utils.unwrapObservable(valueAccessor());\n\n                if (isValueArray) {\n                    element.checked = ko.utils.arrayIndexOf(modelValue, checkedValue()) >= 0;\n                } else if (isCheckbox) {\n                    element.checked = modelValue;\n                } else {\n                    element.checked = checkedValue() === modelValue;\n                }\n            };\n\n            ko.computed(updateModel, null, {\n                disposeWhenNodeIsRemoved: element\n            });\n\n            ko.utils.registerEventHandler(element, 'click', updateModel);\n\n            ko.computed(updateView, null, {\n                disposeWhenNodeIsRemoved: element\n            });\n        }\n    };\n\n    ko.expressionRewriting._twoWayBindings.staticChecked = true;\n\n    renderer.addAttribute('staticChecked');\n});\n","Magento_Ui/js/lib/knockout/bindings/after-render.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'ko',\n    '../template/renderer'\n], function (ko, renderer) {\n    'use strict';\n\n    ko.bindingHandlers.afterRender = {\n\n        /**\n         * Binding init callback.\n         */\n        init: function (element, valueAccessor, allBindings, viewModel) {\n            var callback = valueAccessor();\n\n            if (typeof callback === 'function') {\n                callback.call(viewModel, element, viewModel);\n            }\n        }\n    };\n\n    renderer.addAttribute('afterRender');\n});\n","Magento_Ui/js/lib/knockout/bindings/range.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'ko',\n    'jquery',\n    'underscore',\n    '../template/renderer',\n    'jquery/ui'\n], function (ko, $, _, renderer) {\n    'use strict';\n\n    var isTouchDevice = !_.isUndefined(document.ontouchstart),\n        sliderFn = 'slider';\n\n    ko.bindingHandlers.range = {\n\n        /**\n         * Initializes binding and a slider update.\n         *\n         * @param {HTMLElement} element\n         * @param {Function} valueAccessor\n         */\n        init: function (element, valueAccessor) {\n            var config  = valueAccessor(),\n                value   = config.value;\n\n            _.extend(config, {\n                value: value(),\n\n                /**\n                 * Callback which is being called when sliders' value changes.\n                 *\n                 * @param {Event} event\n                 * @param {Object} ui\n                 */\n                slide: function (event, ui) {\n                    value(ui.value);\n                }\n            });\n\n            $(element)[sliderFn](config);\n        },\n\n        /**\n         * Updates sliders' plugin configuration.\n         *\n         * @param {HTMLElement} element\n         * @param {Function} valueAccessor\n         */\n        update: function (element, valueAccessor) {\n            var config = valueAccessor();\n\n            config.value = ko.unwrap(config.value);\n\n            $(element)[sliderFn]('option', config);\n        }\n    };\n\n    renderer.addAttribute('range');\n\n    if (!isTouchDevice) {\n        return;\n    }\n\n    $.widget('mage.touchSlider', $.ui.slider, {\n\n        /**\n         * Creates instance of widget.\n         *\n         * @override\n         */\n        _create: function () {\n            _.bindAll(\n                this,\n                '_mouseDown',\n                '_mouseMove',\n                '_onTouchEnd'\n            );\n\n            return this._superApply(arguments);\n        },\n\n        /**\n         * Initializes mouse events on element.\n         * @override\n         */\n        _mouseInit: function () {\n            var result = this._superApply(arguments);\n\n            this.element\n                .off('mousedown.' + this.widgetName)\n                .on('touchstart.' + this.widgetName, this._mouseDown);\n\n            return result;\n        },\n\n        /**\n         * Elements' 'mousedown' event handler polyfill.\n         * @override\n         */\n        _mouseDown: function (event) {\n            var prevDelegate = this._mouseMoveDelegate,\n                result;\n\n            event = this._touchToMouse(event);\n            result = this._super(event);\n\n            if (prevDelegate === this._mouseMoveDelegate) {\n                return result;\n            }\n\n            $(document)\n                .off('mousemove.' + this.widgetName)\n                .off('mouseup.' + this.widgetName);\n\n            $(document)\n                .on('touchmove.' + this.widgetName, this._mouseMove)\n                .on('touchend.' + this.widgetName, this._onTouchEnd)\n                .on('tochleave.' + this.widgetName, this._onTouchEnd);\n\n            return result;\n        },\n\n        /**\n         * Documents' 'mousemove' event handler polyfill.\n         *\n         * @override\n         * @param {Event} event - Touch event object.\n         */\n        _mouseMove: function (event) {\n            event = this._touchToMouse(event);\n\n            return this._super(event);\n        },\n\n        /**\n         * Documents' 'touchend' event handler.\n         */\n        _onTouchEnd: function (event) {\n            $(document).trigger('mouseup');\n\n            return this._mouseUp(event);\n        },\n\n        /**\n         * Removes previously assigned touch handlers.\n         *\n         * @override\n         */\n        _mouseUp: function () {\n            this._removeTouchHandlers();\n\n            return this._superApply(arguments);\n        },\n\n        /**\n         * Removes previously assigned touch handlers.\n         *\n         * @override\n         */\n        _mouseDestroy: function () {\n            this._removeTouchHandlers();\n\n            return this._superApply(arguments);\n        },\n\n        /**\n         * Removes touch events from document object.\n         */\n        _removeTouchHandlers: function () {\n            $(document)\n                .off('touchmove.' + this.widgetName)\n                .off('touchend.' + this.widgetName)\n                .off('touchleave.' + this.widgetName);\n        },\n\n        /**\n         * Adds properties to the touch event to mimic mouse event.\n         *\n         * @param {Event} event - Touch event object.\n         * @returns {Event}\n         */\n        _touchToMouse: function (event) {\n            var orig = event.originalEvent,\n                touch = orig.touches[0];\n\n            return _.extend(event, {\n                which:      1,\n                pageX:      touch.pageX,\n                pageY:      touch.pageY,\n                clientX:    touch.clientX,\n                clientY:    touch.clientY,\n                screenX:    touch.screenX,\n                screenY:    touch.screenY\n            });\n        }\n    });\n\n    sliderFn = 'touchSlider';\n});\n","Magento_Ui/js/lib/knockout/bindings/datepicker.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n/** Creates datepicker binding and registers in to ko.bindingHandlers object */\ndefine([\n    'ko',\n    'underscore',\n    'jquery',\n    'mage/translate',\n    'mage/calendar',\n    'moment',\n    'mageUtils'\n], function (ko, _, $, $t, calendar, moment, utils) {\n    'use strict';\n\n    var defaults = {\n        dateFormat: 'mm\\/dd\\/yyyy',\n        showsTime: false,\n        timeFormat: null,\n        buttonImage: null,\n        buttonImageOnly: null,\n        buttonText: $t('Select Date')\n    };\n\n    ko.bindingHandlers.datepicker = {\n        /**\n         * Initializes calendar widget on element and stores it's value to observable property.\n         * Datepicker binding takes either observable property or object\n         *  { storage: {ko.observable}, options: {Object} }.\n         * For more info about options take a look at \"mage/calendar\" and jquery.ui.datepicker widget.\n         * @param {HTMLElement} el - Element, that binding is applied to\n         * @param {Function} valueAccessor - Function that returns value, passed to binding\n         */\n        init: function (el, valueAccessor) {\n            var config = valueAccessor(),\n                observable,\n                options = {};\n\n            _.extend(options, defaults);\n\n            if (typeof config === 'object') {\n                observable = config.storage;\n\n                _.extend(options, config.options);\n            } else {\n                observable = config;\n            }\n\n            $(el).calendar(options);\n\n            observable() && $(el).datepicker(\n                'setDate',\n                moment(\n                    observable(),\n                    utils.convertToMomentFormat(\n                        options.dateFormat + (options.showsTime ? ' ' + options.timeFormat : '')\n                    )\n                ).toDate()\n            );\n\n            $(el).blur();\n\n            ko.utils.registerEventHandler(el, 'change', function () {\n                observable(this.value);\n            });\n        }\n    };\n});\n","Magento_Ui/js/lib/knockout/bindings/mage-init.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\ndefine([\n    'ko',\n    'underscore',\n    'mage/apply/main'\n], function (ko, _, mage) {\n    'use strict';\n\n    ko.bindingHandlers.mageInit = {\n        /**\n         * Initializes components assigned to HTML elements.\n         *\n         * @param {HTMLElement} el\n         * @param {Function} valueAccessor\n         */\n        init: function (el, valueAccessor) {\n            var data = valueAccessor();\n\n            _.each(data, function (config, component) {\n                mage.applyFor(el, config, component);\n            });\n        }\n    };\n});\n","Magento_Ui/js/lib/knockout/bindings/outer_click.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n/** Creates outerClick binding and registers in to ko.bindingHandlers object */\ndefine([\n    'ko',\n    'jquery',\n    'underscore',\n    '../template/renderer'\n], function (ko, $, _, renderer) {\n    'use strict';\n\n    var defaults = {\n        onlyIfVisible: true\n    };\n\n    /**\n     * Checks if element sis visible.\n     *\n     * @param {Element} el\n     * @returns {Boolean}\n     */\n    function isVisible(el) {\n        var style = window.getComputedStyle(el),\n            visibility = {\n                display: 'none',\n                visibility: 'hidden',\n                opacity: '0'\n            },\n            visible = true;\n\n        _.each(visibility, function (val, key) {\n            if (style[key] === val) {\n                visible = false;\n            }\n        });\n\n        return visible;\n    }\n\n    /**\n     * Document click handler which in case if event target is not\n     * a descendant of provided container element,\n     * invokes specified in configuration callback.\n     *\n     * @param {HTMLElement} container\n     * @param {Object} config\n     * @param {EventObject} e\n     */\n    function onOuterClick(container, config, e) {\n        var target = e.target,\n            callback = config.callback;\n\n        if (container === target || container.contains(target)) {\n            return;\n        }\n\n        if (config.onlyIfVisible) {\n            if (!_.isNull(container.offsetParent) && isVisible(container)) {\n                callback();\n            }\n        } else {\n            callback();\n        }\n    }\n\n    /**\n     * Prepares configuration for the binding based\n     * on a default properties and provided options.\n     *\n     * @param {(Object|Function)} [options={}]\n     * @returns {Object}\n     */\n    function buildConfig(options) {\n        var config = {};\n\n        if (_.isFunction(options)) {\n            options = {\n                callback: options\n            };\n        } else if (!_.isObject(options)) {\n            options = {};\n        }\n\n        return _.extend(config, defaults, options);\n    }\n\n    ko.bindingHandlers.outerClick = {\n\n        /**\n         * Initializes outer click binding.\n         */\n        init: function (element, valueAccessor) {\n            var config = buildConfig(valueAccessor()),\n                outerClick = onOuterClick.bind(null, element, config),\n                isTouchDevice = typeof document.ontouchstart !== 'undefined';\n\n            if (isTouchDevice) {\n                $(document).on('touchstart', outerClick);\n\n                ko.utils.domNodeDisposal.addDisposeCallback(element, function () {\n                    $(document).off('touchstart', outerClick);\n                });\n            } else {\n                $(document).on('click', outerClick);\n\n                ko.utils.domNodeDisposal.addDisposeCallback(element, function () {\n                    $(document).off('click', outerClick);\n                });\n            }\n        }\n    };\n\n    renderer.addAttribute('outerClick');\n});\n","Magento_Ui/js/lib/knockout/bindings/resizable.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'ko',\n    'jquery',\n    'Magento_Ui/js/lib/view/utils/async',\n    'uiRegistry',\n    'underscore',\n    '../template/renderer',\n    'jquery/ui'\n], function (ko, $, async, registry, _, renderer) {\n    'use strict';\n\n    var sizeOptions = [\n            'minHeight',\n            'maxHeight',\n            'minWidth',\n            'maxWidth'\n        ],\n\n        handles = {\n            height: '.ui-resizable-s, .ui-resizable-n',\n            width: '.ui-resizable-w, .ui-resizable-e'\n        };\n\n    /**\n     * Recalcs visibility of handles, width and height of resizable based on content\n     * @param {HTMLElement} element\n     */\n    function adjustSize(element) {\n        var maxHeight,\n            maxWidth;\n\n        element = $(element);\n        maxHeight = element.resizable('option').maxHeight;\n        maxWidth = element.resizable('option').maxWidth;\n\n        if (maxHeight && element.height() > maxHeight) {\n            element.height(maxHeight + 1);\n            $(handles.height).hide();\n        } else {\n            $(handles.height).show();\n        }\n\n        if (maxWidth && element.width() > maxWidth) {\n            element.width(maxWidth + 1);\n            $(handles.width).hide();\n        } else {\n            $(handles.width).show();\n        }\n    }\n\n    /**\n     * Recalcs allowed min, max width and height based on configured selectors\n     * @param {Object} sizeConstraints\n     * @param {String} componentName\n     * @param {HTMLElement} element\n     * @param {Boolean} hasWidthUpdate\n     */\n    function recalcAllowedSize(sizeConstraints, componentName, element, hasWidthUpdate) {\n        var size;\n\n        element = $(element);\n\n        if (!element.data('resizable')) {\n            return;\n        }\n\n        if (!hasWidthUpdate) {\n            element.css('width', 'auto');\n        }\n\n        _.each(sizeConstraints, function (selector, key) {\n            async.async({\n                component: componentName,\n                selector: selector\n            }, function (elem) {\n                size = key.indexOf('Height') !== -1 ? $(elem).outerHeight(true) : $(elem).outerWidth(true);\n\n                if (element.data('resizable')) {\n                    element.resizable('option', key, size + 1);\n                }\n            });\n        }, this);\n\n        adjustSize(element);\n    }\n\n    /**\n     * Preprocess config to separate options,\n     * which must be processed further before applying\n     *\n     * @param {Object} config\n     * @param {Object} viewModel\n     * @param {*} element\n     * @return {Object} config\n     */\n    function processConfig(config, viewModel, element) {\n        var sizeConstraint,\n            sizeConstraints = {},\n            recalc,\n            hasWidthUpdate;\n\n        if (_.isEmpty(config)) {\n            return {};\n        }\n        _.each(sizeOptions, function (key) {\n            sizeConstraint = config[key];\n\n            if (sizeConstraint && !_.isNumber(sizeConstraint)) {\n                sizeConstraints[key] = sizeConstraint;\n                delete config[key];\n            }\n        });\n        hasWidthUpdate =  _.some(sizeConstraints, function (value, key) {\n            return key.indexOf('Width') !== -1;\n        });\n\n        recalc = recalcAllowedSize.bind(null, sizeConstraints, viewModel.name, element, hasWidthUpdate);\n        config.start = recalc;\n        $(window).on('resize.resizable', recalc);\n        registry.get(viewModel.provider).on('reloaded', recalc);\n\n        return config;\n    }\n\n    ko.bindingHandlers.resizable = {\n\n        /**\n         * Binding init callback.\n         *\n         * @param {*} element\n         * @param {Function} valueAccessor\n         * @param {Function} allBindings\n         * @param {Object} viewModel\n         */\n        init: function (element, valueAccessor, allBindings, viewModel) {\n            var config = processConfig(valueAccessor(), viewModel, element);\n\n            $(element).resizable(config);\n        }\n    };\n\n    renderer.addAttribute('resizable');\n});\n","Magento_Ui/js/lib/knockout/bindings/autoselect.js":"/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\ndefine([\n    'ko',\n    'jquery',\n    '../template/renderer'\n], function (ko, $, renderer) {\n    'use strict';\n\n    /**\n     * 'Focus' event handler.\n     *\n     * @param {EventObject} e\n     */\n    function onFocus(e) {\n        e.target.select();\n    }\n\n    ko.bindingHandlers.autoselect = {\n\n        /**\n         * Adds event handler which automatically\n         * selects inputs' element text when field gets focused.\n         */\n        init: function (element, valueAccessor) {\n            var enabled = ko.unwrap(valueAccessor());\n\n            if (enabled !== false) {\n                $(element).on('focus', onFocus);\n            }\n        }\n    };\n\n    renderer.addAttribute('autoselect');\n});\n"}
}});