Object.prototype.hasOwnProperty
.\n *\n * @private\n * @type {Function}\n */\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n /**\n * A reference to Array.prototype.slice
.\n *\n * @private\n * @type {Function}\n */\n var slice = Array.prototype.slice;\n\n /**\n * Creates an object which inherits the given prototype
.\n *\n * Optionally, the created object can be extended further with the specified properties
.\n *\n * @param {Object} prototype - the prototype to be inherited by the created object\n * @param {Object} [properties] - the optional properties to be extended by the created object\n * @return {Object} The newly created object.\n * @private\n */\n function createObject(prototype, properties) {\n var result;\n /* istanbul ignore next */\n if (typeof Object.create === 'function') {\n result = Object.create(prototype);\n } else {\n Constructor.prototype = prototype;\n result = new Constructor();\n Constructor.prototype = null;\n }\n\n if (properties) {\n extendObject(true, result, properties);\n }\n\n return result;\n }\n\n /**\n * Extends the constructor to which this method is associated with the prototype
and/or\n * statics
provided.\n *\n * If name
is provided, it will be used as the class name and can be accessed via a special\n * class_
property on the child constructor, otherwise the class name of the super constructor will be used\n * instead. The class name may also be used string representation for instances of the child constructor (via\n * toString
), but this is not applicable to the lite version of Nevis.\n *\n * If constructor
is provided, it will be used as the constructor for the child, otherwise a simple\n * constructor which only calls the super constructor will be used instead.\n *\n * The super constructor can be accessed via a special super_
property on the child constructor.\n *\n * @param {string} [name=this.class_] - the class name to be used for the child constructor\n * @param {Function} [constructor] - the constructor for the child\n * @param {Object} [prototype] - the prototype properties to be defined for the child\n * @param {Object} [statics] - the static properties to be defined for the child\n * @return {Function} The child constructor
provided or the one created if none was given.\n * @public\n */\n function extend(name, constructor, prototype, statics) {\n var superConstructor = this;\n\n if (typeof name !== 'string') {\n statics = prototype;\n prototype = constructor;\n constructor = name;\n name = null;\n }\n\n if (typeof constructor !== 'function') {\n statics = prototype;\n prototype = constructor;\n constructor = function() {\n return superConstructor.apply(this, arguments);\n };\n }\n\n extendObject(false, constructor, superConstructor, statics);\n\n constructor.prototype = createObject(superConstructor.prototype, prototype);\n constructor.prototype.constructor = constructor;\n\n constructor.class_ = name || superConstructor.class_;\n constructor.super_ = superConstructor;\n\n return constructor;\n }\n\n /**\n * Extends the specified target
object with the properties in each of the sources
provided.\n *\n * if any source is null
it will be ignored.\n *\n * @param {boolean} own - true
to only copy own properties from sources
onto\n * target
; otherwise false
\n * @param {Object} target - the target object which should be extended\n * @param {...Object} [sources] - the source objects whose properties are to be copied onto target
\n * @return {void}\n * @private\n */\n function extendObject(own, target, sources) {\n sources = slice.call(arguments, 2);\n\n var property;\n var source;\n\n for (var i = 0, length = sources.length; i < length; i++) {\n source = sources[i];\n\n for (property in source) {\n if (!own || hasOwnProperty.call(source, property)) {\n target[property] = source[property];\n }\n }\n }\n }\n\n var extend_1 = extend;\n\n /**\n * The base class from which all others should extend.\n *\n * @public\n * @constructor\n */\n function Nevis() {}\n Nevis.class_ = 'Nevis';\n Nevis.super_ = Object;\n\n /**\n * Extends the constructor to which this method is associated with the prototype
and/or\n * statics
provided.\n *\n * If name
is provided, it will be used as the class name and can be accessed via a special\n * class_
property on the child constructor, otherwise the class name of the super constructor will be used\n * instead. The class name may also be used string representation for instances of the child constructor (via\n * toString
), but this is not applicable to the lite version of Nevis.\n *\n * If constructor
is provided, it will be used as the constructor for the child, otherwise a simple\n * constructor which only calls the super constructor will be used instead.\n *\n * The super constructor can be accessed via a special super_
property on the child constructor.\n *\n * @param {string} [name=this.class_] - the class name to be used for the child constructor\n * @param {Function} [constructor] - the constructor for the child\n * @param {Object} [prototype] - the prototype properties to be defined for the child\n * @param {Object} [statics] - the static properties to be defined for the child\n * @return {Function} The child constructor
provided or the one created if none was given.\n * @public\n * @static\n * @memberof Nevis\n */\n Nevis.extend = extend_1;\n\n var nevis = Nevis;\n\n var lite = nevis;\n\n /**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n * @class\n * @extends Nevis\n */\n var Utilities = lite.extend(null, {\n\n /**\n * Iterates over own (not inherited) enumerable properties on the specified object
.\n *\n * Nothing happens if object
is null
.\n *\n * @param {Object} object - the object whose own properties are to be iterated over\n * @param {Utilities~ForOwnCallback} callback - the function to be called with the value and key for each own property\n * on object
\n * @param {Object} [context] - the value to use this
when executing callback
\n * @return {void}\n * @public\n * @static\n * @memberof Utilities\n */\n forOwn: function(object, callback, context) {\n if (!object) {\n return;\n }\n\n for (var key in object) {\n if (Utilities.hasOwn(object, key)) {\n callback.call(context, object[key], key, object);\n }\n }\n },\n\n /**\n * Returns whether the specified object
has a property with the specified name
as an own\n * (not inherited) property.\n *\n * @param {Object} object - the object on which the property is to be checked\n * @param {string} name - the name of the property to be checked\n * @return {boolean} true
if object
has an own property with name
.\n * @public\n * @static\n * @memberof Utilities\n */\n hasOwn: function(object, name) {\n return Object.prototype.hasOwnProperty.call(object, name);\n },\n\n /**\n * Left pads the string
provided with the given padding string for the specified number of\n * times
.\n *\n * @param {string} [string=\"\"] - the string to be padded\n * @param {number} [times=0] - the number of times to pad string
\n * @param {string} [padding=\" \"] - the padding string\n * @return {string} The padded string
.\n * @public\n * @static\n * @memberof Utilities\n */\n leftPad: function(string, times, padding) {\n if (string == null) {\n string = '';\n }\n if (times == null) {\n times = 0;\n }\n if (padding == null) {\n padding = ' ';\n }\n if (!padding) {\n return string;\n }\n\n for (var i = 0; i < times; i++) {\n string = padding + string;\n }\n\n return string;\n }\n\n });\n\n var Utilities_1 = Utilities;\n\n /**\n * Called for each own enumerable property on object
.\n *\n * @callback Utilities~ForOwnCallback\n * @param {*} value - the value of the property\n * @param {string} key - the name of the property\n * @param {Object} object - the object to which the property belongs\n * @return {void}\n */\n\n /**\n * Contains contextual information for a single conversion process.\n *\n * @param {Europa} europa - the {@link Europa} instance responsible for this conversion\n * @param {Europa~Options} options - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\n var Conversion = lite.extend(function(europa, options) {\n /**\n * The {@link Europa} instance responsible for this {@link Conversion}.\n *\n * @public\n * @type {Europa}\n * @memberof Conversion#\n */\n this.europa = europa;\n\n /**\n * The options for this {@link Conversion}.\n *\n * @public\n * @type {Europa~Options}\n * @memberof Conversion#\n */\n this.options = options;\n\n /**\n * Whether the buffer is at the start of the current line.\n *\n * @public\n * @type {boolean}\n * @memberof Conversion#\n */\n this.atLeft = true;\n\n /**\n * Whether any white space should be removed from the start of the next output.\n *\n * @public\n * @type {boolean}\n * @memberof Conversion#\n */\n this.atNoWhiteSpace = true;\n\n /**\n * Whether the buffer is at the start of a paragraph.\n *\n * @public\n * @type {boolean}\n * @memberof Conversion#\n */\n this.atParagraph = true;\n\n /**\n * The conversion output buffer to which the Markdown will be written.\n *\n * @public\n * @type {string}\n * @memberof Conversion#\n */\n this.buffer = '';\n\n /**\n * The context for this {@link Conversion}.\n *\n * @public\n * @type {Object.string
to be output.\n *\n * @param {string} string - the string to be appended\n * @return {Conversion} A reference to this {@link Conversion} for chaining purposes.\n * @public\n * @memberof Conversion#\n */\n append: function(string) {\n if (this.last != null) {\n this.buffer += this.last;\n }\n\n this.last = string;\n\n return this;\n },\n\n /**\n * Appends a paragraph to the output buffer.\n *\n * @return {Conversion} A reference to this {@link Conversion} for chaining purposes.\n * @public\n * @memberof Conversion#\n */\n appendParagraph: function() {\n if (this.atParagraph) {\n return this;\n }\n\n if (!this.atLeft) {\n this.append(this.left);\n\n this.atLeft = true;\n }\n\n this.append(this.left);\n\n this.atNoWhiteSpace = true;\n this.atParagraph = true;\n\n return this;\n },\n\n /**\n * Outputs the specified string
to the buffer.\n *\n * Optionally, string
can be \"cleaned\" before being output. Doing so will replace any certain special\n * characters as well as some white space.\n *\n * @param {string} string - the string to be output\n * @param {boolean} [clean=false] - true
to clean string
; otherwise false
\n * @return {Conversion} A reference to this {@link Conversion} for chaining purposes.\n * @public\n * @memberof Conversion#\n */\n output: function(string, clean) {\n if (!string) {\n return this;\n }\n\n string = string.replace(/\\r\\n/g, '\\n');\n\n if (clean) {\n string = string.replace(/\\n([ \\t]*\\n)+/g, '\\n')\n .replace(/\\n[ \\t]+/g, '\\n')\n .replace(/[ \\t]+/g, ' ');\n\n Utilities_1.forOwn(Conversion.replacements, function(value, key) {\n string = string.replace(Conversion.replacementsRegExp[key], value);\n });\n }\n\n if (!this.inPreformattedBlock) {\n if (this.atNoWhiteSpace) {\n string = string.replace(/^[ \\t\\n]+/, '');\n } else if (/^[ \\t]*\\n/.test(string)) {\n string = string.replace(/^[ \\t\\n]+/, '\\n');\n } else {\n string = string.replace(/^[ \\t]+/, ' ');\n }\n }\n\n if (!string) {\n return this;\n }\n\n this.atLeft = /\\n$/.test(string);\n this.atNoWhiteSpace = /[ \\t\\n]$/.test(string);\n this.atParagraph = /\\n{2}$/.test(string);\n\n return this.append(string.replace(/\\n/g, this.left));\n },\n\n /**\n * Replaces the start of the current line with the string
provided.\n *\n * @param {string} string - the string to replace the start of the current line\n * @return {Conversion} A reference to this {@link Conversion} for chaining purposes.\n * @public\n * @memberof Conversion#\n */\n replaceLeft: function(string) {\n if (!this.atLeft) {\n this.append(this.left.replace(/[ ]{2,4}$/, string));\n\n this.atLeft = true;\n this.atNoWhiteSpace = true;\n this.atParagraph = true;\n } else if (this.last) {\n this.last = this.last.replace(/[ ]{2,4}$/, string);\n }\n\n return this;\n }\n\n }, {\n\n /**\n * A map of special characters and their replacements.\n *\n * @public\n * @static\n * @type {Object.element
.\n *\n * @param {Element} element - the current element to be set\n * @return {void}\n * @public\n * @memberof Conversion#\n * @alias element\n */\n set: function(element) {\n this._element = element;\n this._tagName = element && element.tagName ? element.tagName.toLowerCase() : null;\n }\n },\n\n tagName: {\n /**\n * Returns the name of the tag for the current element for this {@link Conversion}.\n *\n * The tag name will always be in lower case, when available.\n *\n * @return {string} The current element's tag name.\n * @public\n * @memberof Conversion#\n * @alias tagName\n */\n get: function() {\n return this._tagName;\n }\n },\n\n window: {\n /**\n * Returns the current window for this {@link Conversion}.\n *\n * This may not be the same window as is associated with the {@link Europa} instance as this window may be nested\n * (e.g. a frame).\n *\n * @return {Window} The current window.\n * @public\n * @memberof Conversion#\n * @alias window\n */\n get: function() {\n return this._window;\n },\n\n /**\n * Sets the current window for this {@link Conversion} to window
.\n *\n * This may not be the same window as is associated with the {@link Europa} instance as this window may be nested\n * (e.g. a frame).\n *\n * @param {Window} window - the window to be set\n * @return {void}\n * @public\n * @memberof Conversion#\n * @alias window\n */\n set: function(window) {\n this._window = window;\n this._document = window ? window.document : null;\n }\n }\n\n });\n\n Utilities_1.forOwn(Conversion.replacements, function(value, key) {\n Conversion.replacementsRegExp[key] = new RegExp(key, 'g');\n });\n\n var Conversion_1 = Conversion;\n\n /**\n * Contains utility methods that are useful when dealing with the DOM.\n *\n * @public\n * @class\n * @extends Nevis\n */\n var DOMUtilities = lite.extend(null, {\n\n /**\n * Checks whether the specified element
is currently visible using the window
provided.\n *\n * This is not a very sophisticated check and could easily be mistaken, but it should catch a lot of the most simple\n * cases.\n *\n * @param {Element} element - the element whose visibility is to be checked\n * @param {Window} window - the window to be used\n * @return {boolean} true
if element
is visible; otherwise false
.\n * @public\n * @static\n * @memberof DOMUtilities\n */\n isVisible: function(element, window) {\n var style = window.getComputedStyle(element);\n\n return style.getPropertyValue('display') !== 'none' && style.getPropertyValue('visibility') !== 'hidden';\n }\n\n });\n\n var DOMUtilities_1 = DOMUtilities;\n\n /**\n * Defines an available option.\n *\n * If defaultValue
is a function, it will be called if/when needed and the return value will be used as the\n * default value. If the default value is to be a function itself, then defaultValue
must return that\n * function.\n *\n * @param {string} name - the name to be used\n * @param {*} [defaultValue] - the default value to be used\n * @public\n * @class\n * @extends Nevis\n */\n var Option = lite.extend(function(name, defaultValue) {\n /**\n * The name for this {@link Option}.\n *\n * @public\n * @type {string}\n * @memberof Option#\n */\n this.name = name;\n\n this._defaultValue = defaultValue;\n });\n\n Object.defineProperty(Option.prototype, 'defaultValue', {\n /**\n * Returns the default value for this {@link Option}.\n *\n * @return {*} The default value.\n * @public\n * @memberof Option#\n * @alias defaultValue\n */\n get: function() {\n var defaultValue = this._defaultValue;\n\n return typeof defaultValue === 'function' ? defaultValue.call(this) : defaultValue;\n }\n });\n\n var Option_1 = Option;\n\n /**\n * Manages multiple {@link Option} instances that are intended to be used by multiple implementations/instances.\n *\n * @param {Option[]} options - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\n var OptionParser = lite.extend(function(options) {\n /**\n * The available options for this {@link OptionParser}.\n *\n * @public\n * @type {Option[]}\n * @memberof OptionParser#\n */\n this.options = options;\n }, {\n\n /**\n * Returns whether an option with the specified name
is available.\n *\n * @param {string} name - the name of the {@link Option} whose existence is to be checked\n * @return {boolean} true
if an {@link Option} exists with name
; otherwise\n * false
.\n * @public\n * @memberof OptionParser#\n */\n exists: function(name) {\n return this.options.some(function(option) {\n return option.name === name;\n });\n },\n\n /**\n * Parses the specified options
, extracting only properties that match valid options and applying default\n * values where required.\n *\n * @param {Object} [options] - the options to be parsed\n * @return {Object.context
can be used to receive any state for a single element conversion from {@link Plugin#before}\n * and {@link Plugin#convert}.\n *\n * @param {Conversion} conversion - the current {@link Conversion}\n * @param {Object.context
can be used to pass any state for a single element conversion to {@link Plugin#convert} and\n * then to {@link Plugin#after}.\n *\n * @param {Conversion} conversion - the current {@link Conversion}\n * @param {Object.conversion
which can be used to provide control over\n * the conversion and returns whether the children of the element should be converted.\n *\n * context
can be used to pass any state for a single element conversion from {@link Plugin#before} to\n * {@link Plugin#after}.\n *\n * @param {Conversion} conversion - the current {@link Conversion}\n * @param {Object.true
if the children of the current element should be converted; otherwise\n * false
.\n * @public\n * @memberof Plugin#\n */\n convert: function(conversion, context) {\n return true;\n },\n\n /**\n * Returns the names of tags with which this {@link Plugin} should be registered to handle.\n *\n * @return {string[]} The names of supported tags.\n * @public\n * @memberof Plugin#\n */\n getTagNames: function() {\n return [];\n }\n\n });\n\n var Plugin_1 = Plugin;\n\n /**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n * @class\n * @extends Nevis\n */\n var ServiceManager = lite.extend(function() {\n this._services = {};\n }, {\n\n /**\n * Returns the {@link Service} being managed with the specified name
.\n *\n * @param {string} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name
.\n * @throws {Error} If no {@link Service} is being managed with name
.\n * @public\n * @memberof ServiceManager#\n */\n getService: function(name) {\n var service = this._services[name];\n if (!service) {\n throw new Error('Service is not being managed with name: ' + name);\n }\n\n return service;\n },\n\n /**\n * Sets the {@link Service} implementation to be managed for the specified name
to the\n * service
provided.\n *\n * @param {string} name - the name of the {@link Service} to be managed with name
\n * @param {Service} service - the {@link Service} implementation to be managed\n * @return {void}\n * @throws {Error} If a {@link Service} is already being managed with the same name
.\n * @public\n * @memberof ServiceManager#\n */\n setService: function(name, service) {\n if (this._services[name]) {\n throw new Error('Service is already managed with name: ' + name);\n }\n\n if (service) {\n this._services[name] = service;\n }\n }\n\n });\n\n var ServiceManager_1 = ServiceManager;\n\n var plugins = {};\n var serviceManager = new ServiceManager_1();\n\n /**\n * Enables configuration of a HTML to Markdown converter that supports HTML strings and DOM elements.\n *\n * @param {Europa~Options} [options] - the options to be used\n * @public\n * @class\n * @extends Nevis\n */\n var Europa = lite.extend(function(options) {\n this._options = new OptionParser_1([\n new Option_1('absolute', false),\n new Option_1('baseUri', function() {\n return serviceManager.getService('window').getDefaultBaseUri();\n }),\n new Option_1('inline', false)\n ])\n .parse(options);\n this._window = null;\n }, {\n\n /**\n * Converts the specified html
into Markdown based on the options configured for this {@link Europa}\n * instance.\n *\n * html
can either be an HTML string or a DOM element whose HTML contents are to be converted into\n * Markdown.\n *\n * @param {Element|string} html - the HTML (or element whose inner HTML is) to be converted into Markdown\n * @return {string} The Markdown converted from html
.\n * @public\n * @memberof Europa#\n */\n convert: function(html) {\n if (!html) {\n return '';\n }\n\n var document = this.document;\n var root;\n\n if (typeof html === 'string') {\n root = document.createElement('div');\n root.innerHTML = html;\n } else {\n root = html;\n }\n\n var conversion = new Conversion_1(this, this._options);\n var wrapper;\n\n if (!document.contains(root)) {\n wrapper = document.createElement('div');\n wrapper.style.display = 'none';\n wrapper.appendChild(root);\n\n document.body.appendChild(wrapper);\n }\n\n try {\n Utilities_1.forOwn(plugins, function(plugin) {\n plugin.beforeAll(conversion);\n });\n\n this.convertElement(root, conversion);\n\n Utilities_1.forOwn(plugins, function(plugin) {\n plugin.afterAll(conversion);\n });\n } finally {\n if (wrapper) {\n document.body.removeChild(wrapper);\n\n wrapper.removeChild(root);\n }\n }\n\n return conversion.append('').buffer.trim();\n },\n\n /**\n * Converts the specified element
and it's children into Markdown using the conversion
\n * provided.\n *\n * Nothing happens if element
is null
or is invisible (simplified detection used).\n *\n * @param {Element} element - the element (along well as it's children) to be converted into Markdown\n * @param {Conversion} conversion - the current {@link Conversion}\n * @return {void}\n * @public\n * @memberof Europa#\n */\n convertElement: function(element, conversion) {\n if (!element) {\n return;\n }\n\n var convertChildren = false;\n var window = this.window;\n var context, i, plugin, value;\n\n if (element.nodeType === window.Node.ELEMENT_NODE) {\n if (!DOMUtilities_1.isVisible(element, window)) {\n return;\n }\n\n conversion.element = element;\n\n context = {};\n plugin = plugins[conversion.tagName];\n convertChildren = true;\n\n if (plugin) {\n plugin.before(conversion, context);\n convertChildren = plugin.convert(conversion, context);\n }\n\n if (convertChildren) {\n for (i = 0; i < element.childNodes.length; i++) {\n this.convertElement(element.childNodes[i], conversion);\n }\n }\n\n if (plugin) {\n plugin.after(conversion, context);\n }\n } else if (element.nodeType === window.Node.TEXT_NODE) {\n value = element.nodeValue || '';\n\n if (conversion.inPreformattedBlock) {\n conversion.output(value);\n } else if (conversion.inCodeBlock) {\n conversion.output(value.replace(/`/g, '\\\\`'));\n } else {\n conversion.output(value, true);\n }\n }\n },\n\n /**\n * Releases the window used by this {@link Europa} instance.\n *\n * This allows closeable {@link WindowService} implementations to close the window and free up resources. However,\n * this instance can and will simply retrieve another window from the {@link WindowService} the next time it is\n * required (i.e. {@link Europa#convert} is called).\n *\n * @return {Europa} A reference to this {@link Europa} for chaining purposes.\n * @public\n * @memberof Europa#\n */\n release: function() {\n if (this._window) {\n serviceManager.getService('window').closeWindow(this._window);\n this._window = null;\n }\n\n return this;\n }\n\n }, {\n\n /**\n * A convient reference to {@link Plugin} exposed on {@link Europa} for cases where Europa Core is bundled.\n *\n * @public\n * @static\n * @type {Function}\n * @memberof Europa\n */\n Plugin: Plugin_1,\n\n /**\n * Registers the specified plugin
to be used by all {@link Europa} instances.\n *\n * If plugin
declares support for a tag name which already has a {@link Plugin} registered for it,\n * plugin
will replace the previously registered plugin, but only for conflicting tag names.\n *\n * @param {Plugin} plugin - the {@link Plugin} to be registered\n * @return {void}\n * @public\n * @static\n * @memberof Europa\n */\n register: function(plugin) {\n plugin.getTagNames().forEach(function(tag) {\n plugins[tag] = plugin;\n });\n },\n\n /**\n * Configures the service
provided to be used by all {@link Europa} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @return {void}\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n * @memberof Europa\n */\n use: function(service) {\n serviceManager.setService(service.getName(), service);\n }\n\n });\n\n Object.defineProperties(Europa.prototype, {\n\n document: {\n /**\n * Returns the document to be used for HTML to Markdown conversion by this {@link Europa} instance.\n *\n * @return {Document} The document.\n * @public\n * @memberof Europa#\n * @alias document\n */\n get: function() {\n return this.window.document;\n }\n },\n\n window: {\n /**\n * Returns the window to be used for HTML to Markdown conversion by this {@link Europa} instance.\n *\n * @return {Window} The window.\n * @public\n * @memberof Europa#\n * @alias window\n */\n get: function() {\n if (!this._window) {\n this._window = serviceManager.getService('window').getWindow(this._options.baseUri);\n }\n\n return this._window;\n }\n }\n\n });\n\n var Europa_1$2 = Europa;\n\n /**\n * The options used by {@link Europa}.\n *\n * @typedef {Object} Europa~Options\n * @property {boolean} [absolute=false] - Whether absolute URLS should be used for anchors/images.\n * @property {string} [baseUri] - The base URI for the window. This is ignored in environments where the base URI cannot\n * be changed.\n * @property {boolean} [inline=false] - Whether anchor/image URLs are to be inserted inline.\n */\n\n /**\n * A {@link Plugin} which extracts the URL from an anchor. Anchors without an href
are treated as plain\n * text.\n *\n * If the absolute
option is enabled, then the URL extracted from the anchor will be absolute. Otherwise,\n * the URL will be exactly as it is in the href
attribute.\n *\n * If the inline
option is enabled, then the URL (and any title
on the anchor) will be\n * inserted immediately after the anchor contents (e.g. [foo](/bar)
). Otherwise, all unique URL and title\n * combinations will be indexed (e.g. [foo][anchor0]
) and the references will be output at the very end.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var AnchorPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n after: function(conversion, context) {\n if (context.value != null) {\n conversion.output(']' + context.value);\n }\n },\n\n /**\n * @override\n */\n afterAll: function(conversion) {\n var anchors = conversion.context.anchors;\n if (!anchors.length) {\n return;\n }\n\n conversion.append('\\n\\n');\n\n for (var i = 0; i < anchors.length; i++) {\n conversion.append('[anchor' + i + ']: ' + anchors[i] + '\\n');\n }\n },\n\n /**\n * @override\n */\n beforeAll: function(conversion) {\n conversion.context.anchorMap = {};\n conversion.context.anchors = [];\n },\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n var element = conversion.element;\n var options = conversion.options;\n var href = options.absolute ? element.href : element.getAttribute('href');\n if (!href) {\n return true;\n }\n\n var anchorMap = conversion.context.anchorMap;\n var anchors = conversion.context.anchors;\n var title = element.getAttribute('title');\n var value = title ? href + ' \"' + title + '\"' : href;\n var index;\n\n if (options.inline) {\n context.value = '(' + value + ')';\n } else {\n index = anchorMap[value];\n if (index == null) {\n index = anchors.push(value) - 1;\n\n anchorMap[value] = index;\n }\n\n context.value = '[anchor' + index + ']';\n }\n\n conversion.output('[');\n\n conversion.atNoWhiteSpace = true;\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [ 'a' ];\n }\n\n });\n\n Europa_1$2.register(new AnchorPlugin());\n\n /**\n * A {@link Plugin} which outputs the contents in a block quote.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var BlockQuotePlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n after: function(conversion, context) {\n conversion.atLeft = false;\n conversion.atParagraph = false;\n conversion.left = context.previousLeft;\n\n conversion.appendParagraph();\n },\n\n /**\n * @override\n */\n before: function(conversion, context) {\n context.previousLeft = conversion.left;\n },\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n var value = '> ';\n\n conversion.left += value;\n\n if (conversion.atParagraph) {\n conversion.append(value);\n } else {\n conversion.appendParagraph();\n }\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [\n 'blockquote',\n 'dd'\n ];\n }\n\n });\n\n Europa_1$2.register(new BlockQuotePlugin());\n\n /**\n * A {@link Plugin} which outputs an inline line break.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var BreakPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n conversion.append(' ' + conversion.left);\n\n conversion.atLeft = true;\n conversion.atNoWhiteSpace = true;\n\n return false;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [ 'br' ];\n }\n\n });\n\n Europa_1$2.register(new BreakPlugin());\n\n /**\n * A {@link Plugin} which outputs the contents in a code block.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var CodePlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n after: function(conversion, context) {\n if (!context.skipped) {\n conversion.inCodeBlock = context.previousInCodeBlock;\n\n conversion.output('`');\n }\n },\n\n /**\n * @override\n */\n before: function(conversion, context) {\n context.previousInCodeBlock = conversion.inCodeBlock;\n },\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n if (conversion.inPreformattedBlock) {\n context.skipped = true;\n } else {\n conversion.output('`');\n\n conversion.inCodeBlock = true;\n }\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [\n 'code',\n 'kbd',\n 'samp'\n ];\n }\n\n });\n\n Europa_1$2.register(new CodePlugin());\n\n /**\n * A {@link Plugin} which outputs a definition term as strong text.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var DefinitionTermPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n after: function(conversion, context) {\n conversion.output('**');\n },\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n conversion.appendParagraph();\n\n conversion.output('**');\n\n conversion.atNoWhiteSpace = true;\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [ 'dt' ];\n }\n\n });\n\n Europa_1$2.register(new DefinitionTermPlugin());\n\n /**\n * A {@link Plugin} which outputs a details section.\n *\n * If the details has an open
attribute then all of its children are converted. Otherwise, only the nested\n * summary
, if any, will be converted.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var DetailsPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n var element = conversion.element;\n\n conversion.appendParagraph();\n\n if (element.hasAttribute('open')) {\n return true;\n }\n\n var summary = element.querySelector('summary');\n conversion.europa.convertElement(summary, conversion);\n\n return false;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [ 'details' ];\n }\n\n });\n\n Europa_1$2.register(new DetailsPlugin());\n\n /**\n * A {@link Plugin} which outputs as emphasised text.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var EmphasisPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n after: function(conversion, context) {\n conversion.output('_');\n },\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n conversion.output('_');\n\n conversion.atNoWhiteSpace = true;\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [\n 'cite',\n 'dfn',\n 'em',\n 'i',\n 'u',\n 'var'\n ];\n }\n\n });\n\n Europa_1$2.register(new EmphasisPlugin());\n\n /**\n * A {@link Plugin} which simply ensures that no children elements are converted.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var EmptyPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n return false;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [\n 'applet',\n 'area',\n 'audio',\n 'button',\n 'canvas',\n 'datalist',\n 'embed',\n 'head',\n 'input',\n 'map',\n 'menu',\n 'meter',\n 'noframes',\n 'noscript',\n 'object',\n 'optgroup',\n 'option',\n 'param',\n 'progress',\n 'rp',\n 'rt',\n 'ruby',\n 'script',\n 'select',\n 'style',\n 'textarea',\n 'title',\n 'video'\n ];\n }\n\n });\n\n Europa_1$2.register(new EmptyPlugin());\n\n /**\n * A {@link Plugin} which outputs the contents of nested frame.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var FramePlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n after: function(conversion, context) {\n conversion.window = context.previousWindow;\n },\n\n /**\n * @override\n */\n before: function(conversion, context) {\n context.previousWindow = conversion.window;\n },\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n var window = conversion.element.contentWindow;\n\n if (window) {\n conversion.window = window;\n\n conversion.europa.convertElement(window.document.body, conversion);\n }\n\n return false;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [ 'frame', 'iframe' ];\n }\n\n });\n\n Europa_1$2.register(new FramePlugin());\n\n /**\n * A {@link Plugin} which outputs a heading of various levels.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var HeadingPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n var level = parseInt(conversion.tagName.match(/([1-6])$/)[1], 10);\n\n conversion.appendParagraph();\n\n var heading = '';\n for (var i = 0; i < level; i++) {\n heading += '#';\n }\n\n conversion.output(heading + ' ');\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6'\n ];\n }\n\n });\n\n Europa_1$2.register(new HeadingPlugin());\n\n /**\n * A {@link Plugin} which outputs a horizontal rule.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var HorizontalRulePlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n conversion\n .appendParagraph()\n .output('---')\n .appendParagraph();\n\n return false;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [ 'hr' ];\n }\n\n });\n\n Europa_1$2.register(new HorizontalRulePlugin());\n\n /**\n * A {@link Plugin} which extracts the URL from an image.\n *\n * If the absolute
option is enabled, then the URL extracted from the image will be absolute. Otherwise,\n * the URL will be exactly as it is in the src
attribute.\n *\n * If the inline
option is enabled, then the URL will be inserted immediately after the alt
on\n * the image (e.g. 
). Otherwise, all unique URLs will be indexed\n * (e.g. ![foo][image0]
) and the references will be output at the very end.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var ImagePlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n afterAll: function(conversion) {\n var images = conversion.context.images;\n if (!images.length) {\n return;\n }\n\n conversion.append('\\n\\n');\n\n for (var i = 0; i < images.length; i++) {\n conversion.append('[image' + i + ']: ' + images[i] + '\\n');\n }\n },\n\n /**\n * @override\n */\n beforeAll: function(conversion) {\n conversion.context.imageMap = {};\n conversion.context.images = [];\n },\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n var element = conversion.element;\n var options = conversion.options;\n var source = options.absolute ? element.src : element.getAttribute('src');\n if (!source) {\n return false;\n }\n\n var alternativeText = element.getAttribute('alt') || '';\n var imageMap = conversion.context.imageMap;\n var images = conversion.context.images;\n var title = element.getAttribute('title');\n var value = title ? source + ' \"' + title + '\"' : source;\n var index;\n\n if (options.inline) {\n value = '(' + value + ')';\n } else {\n index = imageMap[value];\n if (index == null) {\n index = images.push(value) - 1;\n\n imageMap[value] = index;\n }\n\n value = '[image' + index + ']';\n }\n\n conversion.output('![' + alternativeText + ']' + value);\n\n return false;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [ 'img' ];\n }\n\n });\n\n Europa_1$2.register(new ImagePlugin());\n\n /**\n * A {@link Plugin} which outputs a list item. The prefix for the list item will vary depending on what type of list the\n * item is contained within.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var ListItemPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n var value = conversion.inOrderedList ? conversion.listIndex++ + '. ' : '* ';\n\n if (!conversion.atLeft) {\n conversion.append(conversion.left.replace(/[ ]{2,4}$/, '\\n'));\n\n conversion.atLeft = true;\n conversion.atNoWhiteSpace = true;\n conversion.atParagraph = true;\n } else if (conversion.last) {\n conversion.last = conversion.last.replace(/[ ]{2,4}$/, '\\n');\n }\n\n conversion.append(Utilities_1.leftPad(value, (conversion.listDepth - 1) * 2));\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [ 'li' ];\n }\n\n });\n\n Europa_1$2.register(new ListItemPlugin());\n\n /**\n * A {@link Plugin} which outputs an ordered list.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var OrderedListPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n after: function(conversion, context) {\n conversion.inOrderedList = context.previousInOrderedList;\n conversion.listIndex = context.previousListIndex;\n conversion.listDepth--;\n },\n\n /**\n * @override\n */\n before: function(conversion, context) {\n context.previousInOrderedList = conversion.inOrderedList;\n context.previousListIndex = conversion.listIndex;\n },\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n if (conversion.listDepth === 0) {\n conversion.appendParagraph();\n }\n\n conversion.inOrderedList = true;\n conversion.listIndex = 1;\n conversion.listDepth++;\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [ 'ol' ];\n }\n\n });\n\n Europa_1$2.register(new OrderedListPlugin());\n\n /**\n * A {@link Plugin} which outputs a paragraph.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var ParagraphPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n conversion.appendParagraph();\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [\n 'address',\n 'article',\n 'aside',\n 'div',\n 'fieldset',\n 'footer',\n 'header',\n 'nav',\n 'p',\n 'section'\n ];\n }\n\n });\n\n Europa_1$2.register(new ParagraphPlugin());\n\n /**\n * A {@link Plugin} which outputs the contents in a preformatted block.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var PreformattedPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n after: function(conversion, context) {\n conversion.atLeft = false;\n conversion.atParagraph = false;\n conversion.inPreformattedBlock = context.previousInPreformattedBlock;\n conversion.left = context.previousLeft;\n\n conversion.appendParagraph();\n },\n\n /**\n * @override\n */\n before: function(conversion, context) {\n context.previousInPreformattedBlock = conversion.inPreformattedBlock;\n context.previousLeft = conversion.left;\n },\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n var value = ' ';\n\n conversion.left += value;\n\n if (conversion.atParagraph) {\n conversion.append(value);\n } else {\n conversion.appendParagraph();\n }\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [ 'pre' ];\n }\n\n });\n\n Europa_1$2.register(new PreformattedPlugin());\n\n /**\n * A {@link Plugin} which outputs as quoted text.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var QuotePlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n after: function(conversion, context) {\n conversion.output('\"');\n },\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n conversion.output('\"');\n\n conversion.atNoWhiteSpace = true;\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [ 'q' ];\n }\n\n });\n\n Europa_1$2.register(new QuotePlugin());\n\n /**\n * A {@link Plugin} which outputs as strong text.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var StrongPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n after: function(conversion, context) {\n conversion.output('**');\n },\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n conversion.output('**');\n\n conversion.atNoWhiteSpace = true;\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [\n 'b',\n 'strong'\n ];\n }\n\n });\n\n Europa_1$2.register(new StrongPlugin());\n\n /**\n * A {@link Plugin} which outputs an unordered list.\n *\n * @public\n * @class\n * @extends Plugin\n */\n var UnorderedListPlugin = Plugin_1.extend({\n\n /**\n * @override\n */\n after: function(conversion, context) {\n conversion.inOrderedList = context.previousInOrderedList;\n conversion.listIndex = context.previousListIndex;\n conversion.listDepth--;\n },\n\n /**\n * @override\n */\n before: function(conversion, context) {\n context.previousInOrderedList = conversion.inOrderedList;\n context.previousListIndex = conversion.listIndex;\n },\n\n /**\n * @override\n */\n convert: function(conversion, context) {\n if (conversion.listDepth === 0) {\n conversion.appendParagraph();\n }\n\n conversion.inOrderedList = false;\n conversion.listIndex = 1;\n conversion.listDepth++;\n\n return true;\n },\n\n /**\n * @override\n */\n getTagNames: function() {\n return [ 'ul' ];\n }\n\n });\n\n Europa_1$2.register(new UnorderedListPlugin());\n\n var index = Europa_1$2;\n\n /**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n * @class\n * @extends Nevis\n */\n var Service = lite.extend({\n\n /**\n * Returns the name of this {@link Service}.\n *\n * @return {string} The service name.\n * @public\n * @abstract\n * @memberof Service#\n */\n getName: function() {}\n\n });\n\n var Service_1 = Service;\n\n /**\n * A service used to retrieve the window object for converting HTML to Markdown and, optionally, to close it upon\n * destruction of the {@link Europa} instance. This can be useful to free up resources as/when required in an artificial\n * browser environment.\n *\n * @public\n * @class\n * @extends Service\n */\n var WindowService = Service_1.extend({\n\n /**\n * Closes the specified window
but only if this {@link WindowService} is closeable.\n *\n * @param {Window} window - the window to be closed\n * @return {void}\n * @public\n * @memberof WindowService#\n */\n closeWindow: function(window) {\n if (this.isCloseable(window)) {\n window.close();\n }\n },\n\n /**\n * Returns the default base URI for windows provided by this {@link WindowService}.\n *\n * Implementations of {@link WindowService} must override this method with their own specific logic.\n *\n * @return {string} The default base URI.\n * @public\n * @abstract\n * @memberof WindowService#\n */\n getDefaultBaseUri: function() {},\n\n /**\n * @override\n */\n getName: function() {\n return 'window';\n },\n\n /**\n * Returns a window to be used for converting HTML to Markdown using the base URI provided.\n *\n * It's important to note that the base URI cannot be changed in some environments, in which case baseUri
\n * will be ignored.\n *\n * Implementations of {@link WindowService} must override this method with their own specific logic.\n *\n * @param {string} baseUri - the base URI to be used\n * @return {Window} The window.\n * @public\n * @abstract\n * @memberof WindowService#\n */\n getWindow: function(baseUri) {},\n\n /**\n * Returns whether the specified window
which was retrieved by this {@link WindowService} is closeable.\n *\n * The default implementation of this method will always return false
.\n *\n * @param {Window} window - the window to be checked\n * @return {boolean} true
if window
is closeable; otherwise false
.\n * @public\n * @memberof WindowService#\n */\n isCloseable: function(window) {\n return false;\n }\n\n });\n\n var WindowService_1 = WindowService;\n\n /**\n * An implementation of {@link WindowService} intended for use within a browser environment.\n *\n * @public\n * @class\n * @extends WindowService\n */\n var BrowserWindowService = WindowService_1.extend({\n\n /**\n * @override\n */\n getDefaultBaseUri: function() {\n return window.document.baseURI;\n },\n\n /**\n * @override\n */\n getWindow: function(baseUri) {\n return window;\n }\n\n });\n\n var BrowserWindowService_1 = BrowserWindowService;\n\n index.use(new BrowserWindowService_1());\n\n var Europa_1 = index;\n\n return Europa_1;\n\n})));\n\n//# sourceMappingURL=europa.js.map","/*! For license information please see form-render.min.js.LICENSE.txt */\n!function(e){\"use strict\";!function(){var t={946:function(e,t,r){r.r(t);var n=r(933),o=r.n(n),i=r(476),s=r.n(i)()(o());s.push([e.id,'.rendered-form *{box-sizing:border-box}.rendered-form.formbuilder-embedded-bootstrap button,.rendered-form.formbuilder-embedded-bootstrap input,.rendered-form.formbuilder-embedded-bootstrap select,.rendered-form.formbuilder-embedded-bootstrap textarea{font-family:inherit;font-size:inherit;line-height:inherit}.rendered-form.formbuilder-embedded-bootstrap input{line-height:normal}.rendered-form.formbuilder-embedded-bootstrap textarea{overflow:auto}.rendered-form.formbuilder-embedded-bootstrap button,.rendered-form.formbuilder-embedded-bootstrap input,.rendered-form.formbuilder-embedded-bootstrap select,.rendered-form.formbuilder-embedded-bootstrap textarea{font-family:inherit;font-size:inherit;line-height:inherit}.rendered-form.formbuilder-embedded-bootstrap .btn-group{position:relative;display:inline-block;vertical-align:middle}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn{position:relative;float:left}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.rendered-form.formbuilder-embedded-bootstrap .btn-group .btn+.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .btn+.btn-group,.rendered-form.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn-group{margin-left:-1px}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:last-child:not(:first-child),.rendered-form.formbuilder-embedded-bootstrap .btn-group>.dropdown-toggle:not(:first-child),.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group .form-control:last-child,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-addon:last-child,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn:not(:first-child),.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn-group>.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn.active,.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:active,.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:focus,.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:hover{z-index:2}.rendered-form.formbuilder-embedded-bootstrap .btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-image:none;border-radius:4px}.rendered-form.formbuilder-embedded-bootstrap .btn.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.rendered-form.formbuilder-embedded-bootstrap .btn.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.rendered-form.formbuilder-embedded-bootstrap .btn.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.rendered-form.formbuilder-embedded-bootstrap .btn.active,.rendered-form.formbuilder-embedded-bootstrap .btn.btn-active,.rendered-form.formbuilder-embedded-bootstrap .btn:active{background-image:none}.rendered-form.formbuilder-embedded-bootstrap .input-group .form-control:last-child,.rendered-form.formbuilder-embedded-bootstrap .input-group-addon:last-child,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn:not(:first-child),.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn-group>.btn,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.rendered-form.formbuilder-embedded-bootstrap .input-group .form-control,.rendered-form.formbuilder-embedded-bootstrap .input-group-addon,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn{display:table-cell}.rendered-form.formbuilder-embedded-bootstrap .input-group-lg>.form-control,.rendered-form.formbuilder-embedded-bootstrap .input-group-lg>.input-group-addon,.rendered-form.formbuilder-embedded-bootstrap .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333}.rendered-form.formbuilder-embedded-bootstrap .input-group{position:relative;display:table;border-collapse:separate}.rendered-form.formbuilder-embedded-bootstrap .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.rendered-form.formbuilder-embedded-bootstrap .form-control,.rendered-form.formbuilder-embedded-bootstrap output{font-size:14px;line-height:1.42857143;display:block}.rendered-form.formbuilder-embedded-bootstrap textarea.form-control{height:auto}.rendered-form.formbuilder-embedded-bootstrap .form-control{height:34px;display:block;width:100%;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px}.rendered-form.formbuilder-embedded-bootstrap .form-control:focus{outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.rendered-form.formbuilder-embedded-bootstrap .form-group{margin-left:0px;margin-bottom:15px}.rendered-form.formbuilder-embedded-bootstrap .btn,.rendered-form.formbuilder-embedded-bootstrap .form-control{background-image:none}.rendered-form.formbuilder-embedded-bootstrap .pull-right{float:right}.rendered-form.formbuilder-embedded-bootstrap .pull-left{float:left}.rendered-form .formbuilder-required,.rendered-form .required-asterisk{color:#c10000}.rendered-form .formbuilder-checkbox-group input[type=checkbox],.rendered-form .formbuilder-checkbox-group input[type=radio],.rendered-form .formbuilder-radio-group input[type=checkbox],.rendered-form .formbuilder-radio-group input[type=radio]{margin:0 4px 0 0}.rendered-form .formbuilder-checkbox-inline,.rendered-form .formbuilder-radio-inline{margin-right:8px;display:inline-block;vertical-align:middle;padding-left:0}.rendered-form .formbuilder-checkbox-inline label input[type=text],.rendered-form .formbuilder-radio-inline label input[type=text]{margin-top:0}.rendered-form .formbuilder-checkbox-inline:first-child,.rendered-form .formbuilder-radio-inline:first-child{padding-left:0}.rendered-form .formbuilder-autocomplete-list{background-color:#fff;display:none;list-style:none;padding:0;border:1px solid #ccc;border-width:0 1px 1px;position:absolute;z-index:20;max-height:200px;overflow-y:auto}.rendered-form .formbuilder-autocomplete-list li{display:none;cursor:default;padding:5px;margin:0;transition:background-color 200ms ease-in-out}.rendered-form .formbuilder-autocomplete-list li:hover,.rendered-form .formbuilder-autocomplete-list li.active-option{background-color:rgba(0,0,0,.075)}.rendered-form *[tooltip]{position:relative}.rendered-form *[tooltip]:hover::after{background:rgba(0,0,0,.9);border-radius:5px 5px 5px 0;bottom:23px;color:#fff;content:attr(tooltip);padding:10px 5px;position:absolute;z-index:98;left:2px;width:230px;text-shadow:none;font-size:12px;line-height:1.5em;cursor:default}.rendered-form *[tooltip]:hover::before{border:solid;border-color:#222 rgba(0,0,0,0);border-width:6px 6px 0;bottom:17px;content:\"\";left:2px;position:absolute;z-index:99;cursor:default}.rendered-form .tooltip-element{visibility:visible;color:#fff;background:#000;width:16px;height:16px;border-radius:8px;display:inline-block;text-align:center;line-height:16px;margin:0 5px;font-size:12px;cursor:default}.rendered-form .kc-toggle{padding-left:0 !important}.rendered-form .kc-toggle span{position:relative;width:48px;height:24px;background:#e6e6e6;display:inline-block;border-radius:4px;border:1px solid #ccc;padding:2px;overflow:hidden;float:left;margin-right:5px;will-change:transform}.rendered-form .kc-toggle span::after,.rendered-form .kc-toggle span::before{position:absolute;display:inline-block;top:0}.rendered-form .kc-toggle span::after{position:relative;content:\"\";width:50%;height:100%;left:0;border-radius:3px;background:linear-gradient(to bottom, white 0%, #ccc 100%);border:1px solid #999;transition:transform 100ms;transform:translateX(0)}.rendered-form .kc-toggle span::before{border-radius:4px;top:2px;left:2px;content:\"\";width:calc(100% - 4px);height:18px;box-shadow:0 0 1px 1px #b3b3b3 inset;background-color:rgba(0,0,0,0)}.rendered-form .kc-toggle input{height:0;overflow:hidden;width:0;opacity:0;pointer-events:none;margin:0}.rendered-form .kc-toggle input:checked+span::after{transform:translateX(100%)}.rendered-form .kc-toggle input:checked+span::before{background-color:#6fc665}.rendered-form label{font-weight:normal}.rendered-form .form-group .formbuilder-required{color:#c10000}.rendered-form .other-option:checked+label input{display:inline-block}.rendered-form .other-val{margin-left:5px;display:none}.rendered-form .form-control.number{width:auto}.rendered-form .form-control[type=color]{width:60px;padding:2px;display:inline-block}.rendered-form .form-control[multiple]{height:auto}',\"\"]),t.default=s},476:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=\"\",n=void 0!==t[5];return t[4]&&(r+=\"@supports (\".concat(t[4],\") {\")),t[2]&&(r+=\"@media \".concat(t[2],\" {\")),n&&(r+=\"@layer\".concat(t[5].length>0?\" \".concat(t[5]):\"\",\" {\")),r+=e(t),n&&(r+=\"}\"),t[2]&&(r+=\"}\"),t[4]&&(r+=\"}\"),r})).join(\"\")},t.i=function(e,r,n,o,i){\"string\"==typeof e&&(e=[[null,e,void 0]]);var s={};if(n)for(var a=0;a'\n + (escaped ? code : escape(code, true))\n + '
';\n }\n\n return ''\n + (escaped ? code : escape(code, true))\n + '
\\n';\n};\n\nRenderer.prototype.blockquote = function(quote) {\n return '\\n' + quote + '\\n';\n};\n\nRenderer.prototype.html = function(html) {\n return html;\n};\n\nRenderer.prototype.heading = function(text, level, raw) {\n if (this.options.headerIds) {\n return '
' + text + '
\\n';\n};\n\nRenderer.prototype.table = function(header, body) {\n if (body) body = '' + body + '';\n\n return '' + text + '
';\n};\n\nRenderer.prototype.br = function() {\n return this.options.xhtml ? 'An error occurred:
'\n + escape(e.message + '', true)\n + '';\n }\n throw e;\n }\n}\n\n/**\n * Options\n */\n\nmarked.options =\nmarked.setOptions = function(opt) {\n merge(marked.defaults, opt);\n return marked;\n};\n\nmarked.getDefaults = function () {\n return {\n baseUrl: null,\n breaks: false,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: new Renderer(),\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartLists: false,\n smartypants: false,\n tables: true,\n xhtml: false\n };\n};\n\nmarked.defaults = marked.getDefaults();\n\n/**\n * Expose\n */\n\nmarked.Parser = Parser;\nmarked.parser = Parser.parse;\n\nmarked.Renderer = Renderer;\nmarked.TextRenderer = TextRenderer;\n\nmarked.Lexer = Lexer;\nmarked.lexer = Lexer.lex;\n\nmarked.InlineLexer = InlineLexer;\nmarked.inlineLexer = InlineLexer.output;\n\nmarked.parse = marked;\n\nif (typeof module !== 'undefined' && typeof exports === 'object') {\n module.exports = marked;\n} else if (typeof define === 'function' && define.amd) {\n define(function() { return marked; });\n} else {\n root.marked = marked;\n}\n})(this || (typeof window !== 'undefined' ? window : global));\n"],"names":["module","exports","Constructor","hasOwnProperty","Object","prototype","slice","Array","createObject","properties","result","create","extendObject","extend","name","constructor","statics","superConstructor","this","apply","arguments","class_","super_","own","target","sources","property","source","i","length","call","extend_1","Nevis","lite","Utilities","forOwn","object","callback","context","key","hasOwn","leftPad","string","times","padding","Utilities_1","Conversion","europa","options","atLeft","atNoWhiteSpace","atParagraph","buffer","inCodeBlock","inOrderedList","inPreformattedBlock","last","left","listDepth","listIndex","_document","document","_element","_tagName","_window","window","append","appendParagraph","output","clean","replace","replacements","value","replacementsRegExp","test","replaceLeft","defineProperties","get","element","set","tagName","toLowerCase","RegExp","Conversion_1","DOMUtilities_1","isVisible","style","getComputedStyle","getPropertyValue","Option","defaultValue","_defaultValue","defineProperty","Option_1","OptionParser_1","exists","some","option","parse","forEach","Plugin_1","after","conversion","afterAll","before","beforeAll","convert","getTagNames","ServiceManager","_services","getService","service","Error","setService","plugins","serviceManager","Europa","_options","getDefaultBaseUri","html","root","createElement","innerHTML","wrapper","contains","display","appendChild","body","plugin","convertElement","removeChild","trim","convertChildren","nodeType","Node","ELEMENT_NODE","childNodes","TEXT_NODE","nodeValue","release","closeWindow","Plugin","register","tag","use","getName","getWindow","baseUri","Europa_1$2","AnchorPlugin","anchors","anchorMap","href","absolute","getAttribute","index","title","inline","push","BlockQuotePlugin","previousLeft","BreakPlugin","CodePlugin","skipped","previousInCodeBlock","DefinitionTermPlugin","DetailsPlugin","hasAttribute","summary","querySelector","EmphasisPlugin","EmptyPlugin","FramePlugin","previousWindow","contentWindow","HeadingPlugin","level","parseInt","match","heading","HorizontalRulePlugin","ImagePlugin","images","imageMap","src","alternativeText","ListItemPlugin","OrderedListPlugin","previousInOrderedList","previousListIndex","ParagraphPlugin","PreformattedPlugin","previousInPreformattedBlock","QuotePlugin","StrongPlugin","UnorderedListPlugin","BrowserWindowService_1","isCloseable","close","baseURI","factory","e","t","r","n","o","s","id","default","toString","map","concat","join","a","l","d","c","m","enumerable","Symbol","toStringTag","__esModule","bind","p","iterator","isArray","isArrayBuffer","isBuffer","isFormData","FormData","isArrayBufferView","ArrayBuffer","isView","isString","isNumber","isObject","isUndefined","isDate","isFile","isBlob","isFunction","isStream","pipe","isURLSearchParams","URLSearchParams","isStandardBrowserEnv","navigator","product","merge","adapter","XMLHttpRequest","transformRequest","JSON","stringify","transformResponse","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","validateStatus","headers","common","Accept","btoa","Promise","u","data","f","h","XDomainRequest","url","onprogress","ontimeout","auth","b","username","g","password","Authorization","open","method","toUpperCase","params","paramsSerializer","readyState","status","responseURL","indexOf","getAllResponseHeaders","responseType","response","responseText","statusText","config","request","onerror","y","v","withCredentials","read","setRequestHeader","onDownloadProgress","addEventListener","onUploadProgress","upload","cancelToken","promise","then","abort","send","__CANCEL__","message","I18N","configurable","writable","extension","location","langs","locale","override","TypeError","loaded","processConfig","assign","preloaded","entries","reduce","applyLanguage","init","setCurrent","addLanguage","processFile","getValue","getFallbackValue","values","find","makeSafe","put","current","substring","fromFile","split","loadLang","catch","Axios","Cancel","CancelToken","isCancel","all","spread","readFloatLE","_isBuffer","defaults","interceptors","resolve","unshift","fulfilled","rejected","shift","setTimeout","clearTimeout","run","fun","array","nextTick","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","umask","code","encodeURIComponent","toISOString","substr","userAgent","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","String","charCodeAt","write","Date","toGMTString","cookie","decodeURIComponent","remove","now","handlers","eject","throwIfRequested","baseURL","reject","reason","token","cancel","attributes","class","insert","singleton","locals","HTMLIFrameElement","contentDocument","head","identifier","base","css","media","sourceMap","references","updater","nonce","nc","keys","filter","Boolean","styleSheet","cssText","createTextNode","insertBefore","removeAttribute","unescape","firstChild","parentNode","atob","splice","clobberingProtection","form","namespaceAttributes","backendOrder","backends","sanitizer","Sanitizer","dompurify","DOMPurify","setConfig","SANITIZE_DOM","ADD_ATTR","fallback","startsWith","includes","implementation","createHTMLDocument","parseHTML","addBack","each","nodeName","parentElement","from","removeAttr","isSupported","sanitize","setHTML","getOwnPropertySymbols","getOwnPropertyDescriptor","toPrimitive","getOwnPropertyDescriptors","propertyIsEnumerable","fbLoaded","js","fbEditors","quill","tinymce","structuredClone","A","className","w","type","label","x","HTMLElement","dom","O","events","textContent","content","node","function","undefined","L","j","T","k","C","getElementsByTagName","E","DOMParser","parseFromString","userData","S","R","jQuery","P","dataType","cache","ajax","done","Deferred","when","every","N","rel","attr","appendTo","D","q","M","addEventListeners","attrString","camelCase","capitalize","closest","classList","getContentType","escapeAttr","escapeAttrs","escapeHtml","forceNumber","getScripts","getStyles","hyphenCase","isCached","markup","mobileClass","vendor","opera","nameAttr","parsedHtml","parseXML","removeFromArray","safeAttr","safeAttrName","safename","subtract","trimObj","unique","validAttr","titleCase","splitObject","fn","swapWith","F","z","reverse","B","Event","createEvent","initEvent","H","viewData","userDeclined","modalClosed","modalOpened","formSaved","fieldAdded","fieldRemoved","fieldRendered","fieldEditOpened","fieldEditClosed","stageEmptied","$","I","rawConfig","preview","isPreview","required","Math","floor","random","description","controlConfig","subtype","classConfig","disabled","configure","definition","classRegister","error","getRegistered","getRegisteredSubtypes","getClass","loadCustom","fbControls","fbControlsLoaded","mi18n","i18n","active","inactive","icon","build","prerender","render","onRender","U","querySelectorAll","_","disableHTMLLabels","templates","help","noLabel","hidden","field","childElementCount","children","item","isTemplate","layout","processTemplate","for","tooltip","jquery","V","requireValidOption","nextSibling","getActiveOption","Map","getPreviousOption","selectOption","getNextOption","showList","hideList","isOptionValid","preventDefault","keyCode","focus","blur","removeEventListener","input","autocomplete","click","previousSibling","width","offsetWidth","getElementsByClassName","add","next","prev","val","Q","X","super","template","W","J","paragraph","header","G","Z","K","minSelectionRequired","placeholder","other","toggle","multiple","groupRequired","selected","checked","previousElementSibling","setCustomValidity","prop","endsWith","Y","date","file","ee","te","textarea","stopPropagation","re","editorOptions","height","paste_data_images","toolbar","readonly","Number","majorVersion","lastFormBuilderCopiedTinyMCE","setContent","ne","oe","ie","modules","theme","editorConfig","Quill","import","instance","setContents","compose","NATIVE_NAME","ENGLISH_NAME","addOption","allFieldsRemoved","allowMultipleFiles","button","cannotBeEmpty","checkboxGroup","checkbox","checkboxes","clearAllMessage","clear","copy","copyButton","copyButtonTooltip","dateField","descriptionField","devMode","editNames","editorTitle","editXML","enableOther","enableOtherMsg","fieldDeleteWarning","fieldVars","fieldNonEditable","fieldRemoveWarning","fileUpload","formUpdated","getStarted","hide","inlineDesc","labelEmpty","limitRole","mandatory","maxlength","minOptionMessage","multipleFiles","no","noFieldsToClear","number","optionCount","optional","optionLabelPlaceholder","optionValuePlaceholder","optionEmpty","radioGroup","radio","removeMessage","removeOption","richText","roles","rows","save","selectOptions","select","selectColor","selectionsMessage","size","text","textArea","warning","viewJSON","viewXML","yes","se","ae","customRegister","templateControlRegister","def","customControl","attrs","datatype","lookup","le","layoutTemplates","controls","container","formData","messages","formRendered","noFormData","invalidControl","sanitizerOptions","notify","console","log","success","warn","instanceContainers","parseFormData","templatedControls","Element","appendFormFields","getElementById","dispatchEvent","emptyContainer","lastChild","sanitizeField","getElement","disableInjectedStyle","renderControl","forceTemplate","serializeArray","xml","json","setData","formRender","controlRender","CodeMirror","CodeMirrorSpellChecker","marked","isMac","platform","bindings","toggleBold","toggleItalic","drawLink","toggleHeadingSmaller","toggleHeadingBigger","drawImage","toggleBlockquote","toggleOrderedList","toggleUnorderedList","toggleCodeBlock","togglePreview","toggleStrikethrough","toggleHeading1","toggleHeading2","toggleHeading3","cleanBlock","drawTable","drawHorizontalRule","undo","redo","toggleSideBySide","toggleFullScreen","shortcuts","getBindingName","isMobile","check","fixShortcut","createIcon","enableTooltips","el","action","actionName","createTooltip","noDisable","noMobile","tabIndex","createSep","getState","cm","pos","getCursor","stat","getTokenAt","types","ret","bold","getLine","line","quote","italic","strikethrough","link","image","saved_overflow","editor","codemirror","setOption","getOption","overflow","wrap","getWrapperElement","toolbarElements","fullscreen","toolbarButton","sidebyside","_toggleBlock","blockStyles","fenceCharsToInsert","fencing_line","styles","token_state","state","code_type","line_num","firstTok","lastTok","getLineHandle","ch","indentedCode","fencedChars","block_start","block_end","lineCount","cur_start","cur_end","tok","is_code","start","end","replaceRange","setSelection","start_text","start_line","end_text","end_line","fence_chars","operation","search_from","next_line","next_line_last_tok","indentLine","no_sel_and_starting_of_line","sel_multi","start_line_sel","end_line_sel","repl_start","repl_end","_replaceSelection","insertFencingAtSelection","_toggleLine","_toggleHeading","startPoint","endPoint","_cleanBlock","promptURLs","prompt","promptTexts","insertTexts","table","horizontalRule","useSideBySideListener","previewNormal","toolbar_div","sideBySideRenderingFunction","previewRender","refresh","startEnd","getSelection","replaceSelection","direction","currHeadingLevel","listRegexp","whitespacesRegexp","repl","_getChar","_checkChar","char","rt","arr","exec","start_chars","end_chars","_mergeProperties","wordCount","count","toolbarBuiltInButtons","InscrybMDE","parent","autoDownloadFA","autoDownloadFontAwesome","styleSheets","showIcons","plainText","markdown","parsingConfig","highlightFormatting","minHeight","autosave","unique_id","uniqueId","initialValue","foundSavedValue","isLocalStorageAvailable","localStorage","setItem","removeItem","markedOptions","renderingConfig","singleLineBreaks","breaks","codeSyntaxHighlighting","hljs","highlight","highlightAuto","setOptions","_rendered","mode","backdrop","self","keyMaps","event","spellChecker","gitHubSpice","codeMirrorInstance","fromTextArea","tabSize","indentUnit","indentWithTabs","lineNumbers","autofocus","extraKeys","lineWrapping","allowDropFileTypes","styleSelectedText","inputStyle","getScrollerElement","forceSync","gui","createToolbar","statusbar","createStatusbar","enabled","sideBySide","createSideBySide","temp_cm","inscrybmde","getItem","setValue","hh","getHours","getMinutes","dd","autosaveTimeoutId","delay","clearAutosavedValue","syncSideBySidePreviewScroll","cScroll","pScroll","getScrollInfo","clientHeight","ratio","parseFloat","top","move","scrollHeight","scrollTop","onscroll","scrollTo","items","bar","toolbarData","toolbarGuideIcon","hideIcons","nonSeparatorIconsFollow","toolbarTips","onclick","cmWrapper","onUpdate","getDoc","isPreviewActive","isSideBySideActive","isFullscreenActive","toTextArea","block","newline","fences","noop","hr","nptable","blockquote","list","lheading","Lexer","tokens","links","rules","normal","pedantic","gfm","tables","_label","_title","edit","getRegex","bullet","_tag","_comment","lex","loose","cap","bull","listStart","listItems","space","isordered","istask","ischecked","rtrim","lang","depth","splitCells","align","cells","ordered","smartLists","task","pre","escape","autolink","reflink","nolink","strong","em","br","del","InlineLexer","renderer","Renderer","TextRenderer","Parser","encode","escapeTest","escapeReplace","escapeTestNoEncode","escapeReplaceNoEncode","fromCharCode","regex","opt","cleanUrl","prot","originIndependentUrl","baseUrls","resolveUrl","encodeURI","_escapes","_scheme","_email","_attribute","_href","_extended_email","_backpedal","prevCapZero","out","mangle","inLink","inRawBlock","outputLink","escapes","codespan","smartypants","escaped","langPrefix","raw","headerIds","headerPrefix","xhtml","listitem","tablerow","tablecell","flags","baseUrl","inlineText","pop","peek","parseText","row","cell","obj","tableRow","offset","str","curr","invert","suffLen","currChar","pending","err","silent","getDefaults","parser","lexer","inlineLexer"],"sourceRoot":""}