{"version":3,"file":"autoNumeric.js","sources":["webpack://AutoNumeric/webpack/universalModuleDefinition","webpack://AutoNumeric/webpack/bootstrap","webpack://AutoNumeric/./src/AutoNumeric.js","webpack://AutoNumeric/./src/AutoNumericDefaultSettings.js","webpack://AutoNumeric/./src/AutoNumericEnum.js","webpack://AutoNumeric/./src/AutoNumericEvents.js","webpack://AutoNumeric/./src/AutoNumericHelper.js","webpack://AutoNumeric/./src/AutoNumericOptions.js","webpack://AutoNumeric/./src/AutoNumericPredefinedOptions.js","webpack://AutoNumeric/./src/main.js","webpack://AutoNumeric/./src/maths/ASTNode.js","webpack://AutoNumeric/./src/maths/Evaluator.js","webpack://AutoNumeric/./src/maths/Lexer.js","webpack://AutoNumeric/./src/maths/Parser.js","webpack://AutoNumeric/./src/maths/Token.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"AutoNumeric\"] = factory();\n\telse\n\t\troot[\"AutoNumeric\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/main.js\");\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\n * AutoNumeric.js\n *\n * @version 4.5.1\n * @date 2018-10-28 UTC 07:14\n *\n * @authors Bob Knothe, Alexandre Bonneau\n * @contributors Sokolov Yura and others, cf. AUTHORS\n * @copyright 2009 Robert J. Knothe\n * @since 2009-08-09\n *\n * @summary autoNumeric is a standalone Javascript library\n * that provides live *as-you-type* formatting for\n * international numbers and currencies.\n *\n * @link http://autonumeric.org\n *\n * Note : Some functions are borrowed from big.js\n * @see https://github.com/MikeMcl/big.js/\n *\n * Please report any bugs to https://github.com/autoNumeric/autoNumeric\n *\n * @license Released under the MIT License\n * @link http://www.opensource.org/licenses/mit-license.php\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sub license, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n\n//TODO Prevent having to enter relative path in the js files (ie. using `./AutoNumericHelper` instead of just `AutoNumericHelper`) (cf. http://moduscreate.com/es6-es2015-import-no-relative-path-webpack/)\n\n\nvar _AutoNumericHelper = require('./AutoNumericHelper');\n\nvar _AutoNumericHelper2 = _interopRequireDefault(_AutoNumericHelper);\n\nvar _AutoNumericEnum = require('./AutoNumericEnum');\n\nvar _AutoNumericEnum2 = _interopRequireDefault(_AutoNumericEnum);\n\nvar _Evaluator = require('./maths/Evaluator');\n\nvar _Evaluator2 = _interopRequireDefault(_Evaluator);\n\nvar _Parser = require('./maths/Parser');\n\nvar _Parser2 = _interopRequireDefault(_Parser);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Class declaration for the AutoNumeric object.\n *\n * An AutoNumeric element is an object wrapper that keeps a reference to the DOM element it manages (usually an one), and provides autoNumeric-specific variables and functions.\n */\nvar AutoNumeric = function () {\n /**\n * Initialize the AutoNumeric object onto the given DOM element, and attach the settings and related event listeners to it.\n * The options passed as a parameter is an object that contains the settings (ie. {digitGroupSeparator: \".\", decimalCharacter: \",\", currencySymbol: '€ '})\n *\n * @example\n * anElement = new AutoNumeric(domElement); // With the default options\n * anElement = new AutoNumeric(domElement, { options }); // With one option object\n * anElement = new AutoNumeric(domElement, 'euroPos'); // With a named pre-defined string\n * anElement = new AutoNumeric(domElement, [{ options1 }, 'euroPos', { options2 }]); // With multiple option objects (the latest option overwriting the previous ones)\n * anElement = new AutoNumeric(domElement, null, { options }); // With one option object, and a failed initial value\n * anElement = new AutoNumeric(domElement).french(); // With one pre-defined language object\n * anElement = new AutoNumeric(domElement).french({ options });// With one pre-defined language object and additional options that will override the defaults\n *\n * // ...or init and set the value in one call :\n * anElement = new AutoNumeric(domElement, 12345.789); // With the default options, and an initial value\n * anElement = new AutoNumeric(domElement, 12345.789, { options });\n * anElement = new AutoNumeric(domElement, '12345.789', { options });\n * anElement = new AutoNumeric(domElement, 12345.789, 'euroPos');\n * anElement = new AutoNumeric(domElement, 12345.789, [{ options1 }, 'euroPos', { options2 }]);\n * anElement = new AutoNumeric(domElement, 12345.789).french({ options });\n * anElement = new AutoNumeric(domElement, 12345.789, { options }).french({ options }); // Not really helpful, but possible\n *\n * // The AutoNumeric constructor class can also accept a string as a css selector. Under the hood this use `QuerySelector` and limit itself to only the first element it finds.\n * anElement = new AutoNumeric('.myCssClass > input');\n * anElement = new AutoNumeric('.myCssClass > input', { options });\n * anElement = new AutoNumeric('.myCssClass > input', 'euroPos');\n * anElement = new AutoNumeric('.myCssClass > input', [{ options1 }, 'euroPos', { options2 }]);\n * anElement = new AutoNumeric('.myCssClass > input', 12345.789);\n * anElement = new AutoNumeric('.myCssClass > input', 12345.789, { options });\n * anElement = new AutoNumeric('.myCssClass > input', 12345.789, 'euroPos');\n * anElement = new AutoNumeric('.myCssClass > input', 12345.789, [{ options1 }, 'euroPos', { options2 }]);\n * anElement = new AutoNumeric('.myCssClass > input', null, { options }); // With a failed initial value\n * anElement = new AutoNumeric('.myCssClass > input', 12345.789).french({ options });\n *\n * @param {object|Array|number|string} arg1\n * @param {object|Array|number|string|null} arg2\n * @param {object|Array|number|string|null} arg3\n * @throws\n */\n function AutoNumeric() {\n var arg1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n var _this = this;\n\n var arg2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var arg3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n _classCallCheck(this, AutoNumeric);\n\n // --------------------------------------------------------\n // -------------- Initialization\n // Initialize the arguments\n var _AutoNumeric$_setArgu = AutoNumeric._setArgumentsValues(arg1, arg2, arg3),\n domElement = _AutoNumeric$_setArgu.domElement,\n initialValue = _AutoNumeric$_setArgu.initialValue,\n userOptions = _AutoNumeric$_setArgu.userOptions;\n\n // Initialize the element\n\n\n this.domElement = domElement;\n\n // Generate the settings\n this.defaultRawValue = ''; // The default raw value to set when initializing an AutoNumeric object\n this._setSettings(userOptions, false);\n //TODO If `styleRules` is not null, add by default a class 'autoNumeric' that adds transition to color, background-color, border-color properties\n // Check if the DOM element is supported\n this._checkElement();\n\n // Store the additional attributes inside the AutoNumeric object\n // Note: This variable is needed and not a duplicate of `initialValueOnKeydown` nor `valueOnFocus` since it serves a different purpose and has a different lifecycle\n this.savedCancellableValue = null;\n\n // Initialize the undo/redo variables\n this.historyTable = []; // Keep track of *all* valid states of the element value\n this.historyTableIndex = -1; // Pointer to the current undo/redo state. This will be set to '0' during initialization since it first adds itself.\n this.onGoingRedo = false; // Variable that keeps track if a 'redo' is ongoing (in order to prevent an 'undo' to be launch when releasing the shift key before the ctrl key after a 'redo' shortcut)\n\n // Initialize the parent form element, if any\n this.parentForm = this._getParentForm();\n\n // Set the initial value if it exists and if the `formatOnPageLoad` option will allow it\n if (!this.runOnce && this.settings.formatOnPageLoad) {\n // Format the element value if needed\n this._formatDefaultValueOnPageLoad(initialValue);\n } else {\n // Otherwise set the `rawValue` and the element value, but do not format the latter yet\n var valueToSet = void 0;\n if (_AutoNumericHelper2.default.isNull(initialValue)) {\n switch (this.settings.emptyInputBehavior) {\n case AutoNumeric.options.emptyInputBehavior.min:\n valueToSet = this.settings.minimumValue;\n break;\n case AutoNumeric.options.emptyInputBehavior.max:\n valueToSet = this.settings.maximumValue;\n break;\n case AutoNumeric.options.emptyInputBehavior.zero:\n valueToSet = '0';\n break;\n // In order to stay consistent when `formatOnPageLoad` is set to `true`, it's still impossible to set the `null` value as the initial value\n case AutoNumeric.options.emptyInputBehavior.focus:\n case AutoNumeric.options.emptyInputBehavior.press:\n case AutoNumeric.options.emptyInputBehavior.always:\n case AutoNumeric.options.emptyInputBehavior.null:\n valueToSet = '';\n break;\n // When `emptyInputBehavior` is a number or a string representing a number\n default:\n valueToSet = this.settings.emptyInputBehavior;\n }\n } else {\n valueToSet = initialValue;\n }\n\n this._setElementAndRawValue(valueToSet);\n }\n\n this.runOnce = true;\n\n // Add the events listeners only on input or editable elements\n this.hasEventListeners = false;\n if (this.isInputElement || this.isContentEditable) {\n if (!this.settings.noEventListeners) {\n //XXX Here we make sure the global list is created after creating the event listeners, to only create the event listeners on `document` once\n this._createEventListeners();\n }\n\n this._setWritePermissions(true);\n }\n\n // Save the initial values (html attribute + element.value) for the pristine test\n this._saveInitialValues(initialValue);\n\n // Setup the data for the persistent storage solution (ie. sessionStorage or cookies)\n this.sessionStorageAvailable = this.constructor._storageTest();\n this.storageNamePrefix = 'AUTO_'; // The prefix for the raw value storage name variable can be modified here\n this._setPersistentStorageName();\n\n // --------------------------------------------------------\n // -------------- Tracking\n // Keep track if the element is currently focused\n this.isFocused = false;\n // Keep track if a mouse wheel event is currently ongoing\n this.isWheelEvent = false;\n // Keep track if a drop event is currently ongoing\n this.isDropEvent = false;\n // Keep track if the user is currently editing the element\n this.isEditing = false;\n // Keep track of the rawValue (needed to define if a change event must be sent on blur or enter key)\n this.rawValueOnFocus = void 0;\n // Watch any external changes to the element value/textContent/nodeValue and `set()` the new value so that it gets formatted/saved in the history\n this.internalModification = false; // This is temporarily set to `true` only when the AutoNumeric object does update the element value\n this.attributeToWatch = this._getAttributeToWatch();\n this.getterSetter = Object.getOwnPropertyDescriptor(this.domElement.__proto__, this.attributeToWatch);\n this._addWatcher();\n\n if (this.settings.createLocalList) {\n // Keep track of every AutoNumeric elements that this object initialized\n this._createLocalList();\n }\n\n // Keep track of all AutoNumeric elements in the current web page\n this.constructor._addToGlobalList(this);\n\n // --------------------------------------------------------\n // -------------- Methods\n // Create the global functions\n this.global = {\n /**\n * Set the same given element value for each elements in the local AutoNumeric element list, and format those elements immediately\n *\n * @param {number|string} newValue The value must be a number or a numeric string\n * @param {object} options A settings object that will override the current settings. Note: the update is done only if the `newValue` is defined.\n */\n set: function set(newValue) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n _this.autoNumericLocalList.forEach(function (aNObject) {\n aNObject.set(newValue, options);\n });\n },\n\n /**\n * Set the value given value directly as the DOM element value, without formatting it beforehand.\n * This sets the same unformatted value for each elements in the local AutoNumeric element list.\n *\n * @param {number|string} value\n * @param {object} options\n */\n setUnformatted: function setUnformatted(value) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n _this.autoNumericLocalList.forEach(function (aNObject) {\n aNObject.setUnformatted(value, options);\n });\n },\n\n /**\n * This is an alias of the `getNumericString()` function, and should not be used anymore.\n *\n * @param {function|null} callback If a callback is passed, then the result is passed to it as its first argument, and the AutoNumeric object has its second\n * @returns {Array}\n * @deprecated\n */\n get: function get() {\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n var result = [];\n _this.autoNumericLocalList.forEach(function (aNObject) {\n result.push(aNObject.get());\n });\n _this._executeCallback(result, callback);\n\n return result;\n },\n\n /**\n * Return an array of the unformatted values (as a string) of each AutoNumeric element of the local AutoNumeric element list\n *\n * @param {function|null} callback If a callback is passed, then the result is passed to it as its first argument, and the AutoNumeric object has its second\n * @returns {Array}\n */\n getNumericString: function getNumericString() {\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n var result = [];\n _this.autoNumericLocalList.forEach(function (aNObject) {\n result.push(aNObject.getNumericString());\n });\n _this._executeCallback(result, callback);\n\n return result;\n },\n\n /**\n * Return an array of the current formatted values (as a string) of each AutoNumeric element of the local AutoNumeric element list\n *\n * @param {function|null} callback If a callback is passed, then the result is passed to it as its first argument, and the AutoNumeric object has its second\n * @returns {Array}\n */\n getFormatted: function getFormatted() {\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n var result = [];\n _this.autoNumericLocalList.forEach(function (aNObject) {\n result.push(aNObject.getFormatted());\n });\n _this._executeCallback(result, callback);\n\n return result;\n },\n\n /**\n * Return an array of the element unformatted values (as a real Javascript number), for each element of the local AutoNumeric element list\n *\n * @param {function|null} callback If a callback is passed, then the result is passed to it as its first argument, and the AutoNumeric object has its second\n * @returns {Array}\n */\n getNumber: function getNumber() {\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n var result = [];\n _this.autoNumericLocalList.forEach(function (aNObject) {\n result.push(aNObject.getNumber());\n });\n _this._executeCallback(result, callback);\n\n return result;\n },\n\n /**\n * Returns the unformatted values (following the `outputFormat` setting) of each element of the local AutoNumeric element list into an array\n *\n * @param {function|null} callback If a callback is passed, then the result is passed to it as its first argument, and the AutoNumeric object has its second\n * @returns {Array}\n */\n getLocalized: function getLocalized() {\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n var result = [];\n _this.autoNumericLocalList.forEach(function (aNObject) {\n result.push(aNObject.getLocalized());\n });\n _this._executeCallback(result, callback);\n\n return result;\n },\n\n /**\n * Force each element of the local AutoNumeric element list to reformat its value\n */\n reformat: function reformat() {\n _this.autoNumericLocalList.forEach(function (aNObject) {\n aNObject.reformat();\n });\n },\n\n /**\n * Remove the formatting and keep only the raw unformatted value (as a numericString) in each elements of the local AutoNumeric element list\n */\n unformat: function unformat() {\n _this.autoNumericLocalList.forEach(function (aNObject) {\n aNObject.unformat();\n });\n },\n\n /**\n * Remove the formatting and keep only the localized unformatted value in the element, with the option to override the default outputFormat if needed\n *\n * @param {null|string} forcedOutputFormat If set to something different than `null`, then this is used as an overriding outputFormat option\n */\n unformatLocalized: function unformatLocalized() {\n var forcedOutputFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n _this.autoNumericLocalList.forEach(function (aNObject) {\n aNObject.unformatLocalized(forcedOutputFormat);\n });\n },\n\n /**\n * Updates the AutoNumeric settings, and immediately format the elements accordingly, for each elements of the local AutoNumeric element list\n *\n * @param {object} newOptions This can be either one or more option objects\n */\n update: function update() {\n for (var _len = arguments.length, newOptions = Array(_len), _key = 0; _key < _len; _key++) {\n newOptions[_key] = arguments[_key];\n }\n\n _this.autoNumericLocalList.forEach(function (aNObject) {\n aNObject.update.apply(aNObject, newOptions);\n });\n },\n\n /**\n * Return `true` if *all* the autoNumeric-managed elements are pristine, if their raw value hasn't changed.\n * By default, this returns `true` if the raw unformatted value is still the same even if the formatted one has changed (due to a configuration update for instance).\n *\n * @param {boolean} checkOnlyRawValue If set to `true`, the pristine value is done on the raw unformatted value, not the formatted one. If set to `false`, this also checks that the formatted value hasn't changed.\n * @returns {boolean}\n */\n isPristine: function isPristine() {\n var checkOnlyRawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n var isPristine = true;\n _this.autoNumericLocalList.forEach(function (aNObject) {\n if (isPristine && !aNObject.isPristine(checkOnlyRawValue)) {\n isPristine = false;\n }\n });\n\n return isPristine;\n },\n\n /**\n * Execute the `clear()` method on each AutoNumeric object in the local AutoNumeric element list\n *\n * @param {boolean} forceClearAll\n */\n clear: function clear() {\n var forceClearAll = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n _this.autoNumericLocalList.forEach(function (aNObject) {\n aNObject.clear(forceClearAll);\n });\n },\n\n /**\n * Execute the `remove()` method on each AutoNumeric object in the local AutoNumeric element list\n */\n remove: function remove() {\n _this.autoNumericLocalList.forEach(function (aNObject) {\n aNObject.remove();\n });\n },\n\n /**\n * Execute the `wipe()` method on each AutoNumeric object in the local AutoNumeric element list\n */\n wipe: function wipe() {\n _this.autoNumericLocalList.forEach(function (aNObject) {\n aNObject.wipe();\n });\n },\n\n /**\n * Execute the `nuke()` method on each AutoNumeric object in the local AutoNumeric element list\n */\n nuke: function nuke() {\n _this.autoNumericLocalList.forEach(function (aNObject) {\n aNObject.nuke();\n });\n },\n\n /**\n * Return `true` if the given AutoNumeric object (or DOM element) is in the local AutoNumeric element list\n *\n * @param {HTMLElement|HTMLInputElement|AutoNumeric} domElementOrAutoNumericObject\n * @returns {*}\n */\n has: function has(domElementOrAutoNumericObject) {\n var result = void 0;\n if (domElementOrAutoNumericObject instanceof AutoNumeric) {\n result = _this.autoNumericLocalList.has(domElementOrAutoNumericObject.node());\n } else {\n result = _this.autoNumericLocalList.has(domElementOrAutoNumericObject);\n }\n\n return result;\n },\n\n /**\n * Add an existing AutoNumeric object (or DOM element) to the local AutoNumeric element list, using the DOM element as the key.\n * This manages the case where `addObject` is used on an AutoNumeric object that already has multiple elements in its local list.\n *\n * @param {HTMLElement|HTMLInputElement|AutoNumeric} domElementOrAutoNumericObject\n */\n addObject: function addObject(domElementOrAutoNumericObject) {\n // Start with the same data, whatever the user passed as arguments\n var domElement = void 0;\n var otherAutoNumericObject = void 0;\n if (domElementOrAutoNumericObject instanceof AutoNumeric) {\n domElement = domElementOrAutoNumericObject.node();\n otherAutoNumericObject = domElementOrAutoNumericObject;\n } else {\n domElement = domElementOrAutoNumericObject;\n otherAutoNumericObject = AutoNumeric.getAutoNumericElement(domElement);\n }\n\n // Check if the current autoNumeric object has a local list\n if (!_this._hasLocalList()) {\n _this._createLocalList();\n }\n\n // Check if the other autoNumeric object has a local list...\n var otherANLocalList = otherAutoNumericObject._getLocalList();\n if (otherANLocalList.size === 0) {\n // Special case if the other AutoNumeric object has an empty local list, then populate itself to it\n otherAutoNumericObject._createLocalList();\n otherANLocalList = otherAutoNumericObject._getLocalList(); // Update the other local list\n }\n\n var mergedLocalLists = void 0;\n if (otherANLocalList instanceof Map) {\n // ...If it does, merge the local lists together\n mergedLocalLists = _AutoNumericHelper2.default.mergeMaps(_this._getLocalList(), otherANLocalList);\n } else {\n // ...If not, just set the current local list onto the other AutoNumeric object\n // We need to specify the AutoNumeric object, otherwise the `_addToLocalList` function would not correctly add the AutoNumeric object since we would not have a reference to it, but a reference to the current AutoNumeric object on which is called this method.\n _this._addToLocalList(domElement, otherAutoNumericObject);\n mergedLocalLists = _this._getLocalList();\n }\n\n // Update the resulting list, on all the objects of that local list (so that we can indifferently use `init()` on any object belonging to that list)\n mergedLocalLists.forEach(function (aNObject) {\n aNObject._setLocalList(mergedLocalLists);\n });\n },\n\n /**\n * Remove the given AutoNumeric object (or DOM element) from the local AutoNumeric element list, using the DOM element as the key.\n * If this function attempts to remove the current AutoNumeric object from the local list, a warning is shown, but the deletion is still done.\n *\n * Special cases :\n * - If the current object removes itself, then it's removed from the shared local list, then a new empty local list is used/created\n * - If another object remove this object, then a local list with only this object is used/created\n *\n * @param {HTMLElement|HTMLInputElement|AutoNumeric} domElementOrAutoNumericObject\n * @param {boolean} keepCurrentANObject If set to `false`, then the function will also remove the current AutoNumeric object if asked, otherwise it will ignore it and print a warning message\n */\n removeObject: function removeObject(domElementOrAutoNumericObject) {\n var keepCurrentANObject = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n // Start with the same data, whatever the user passed as arguments\n var domElement = void 0;\n var otherAutoNumericObject = void 0;\n if (domElementOrAutoNumericObject instanceof AutoNumeric) {\n domElement = domElementOrAutoNumericObject.node();\n otherAutoNumericObject = domElementOrAutoNumericObject;\n } else {\n domElement = domElementOrAutoNumericObject;\n otherAutoNumericObject = AutoNumeric.getAutoNumericElement(domElement);\n }\n\n // Remove the other object from the local list\n var initialCompleteLocalList = _this.autoNumericLocalList;\n _this.autoNumericLocalList.delete(domElement);\n\n // Update the local list for all objects in it\n initialCompleteLocalList.forEach(function (aNObject) {\n aNObject._setLocalList(_this.autoNumericLocalList);\n });\n\n if (!keepCurrentANObject && domElement === _this.node()) {\n // This object is removed by itself\n // Empty the object local list\n otherAutoNumericObject._setLocalList(new Map());\n } else {\n // This object is removed by another object\n // Set the local list for the removed object, with only this object in it\n otherAutoNumericObject._createLocalList();\n }\n },\n\n /**\n * Remove all elements from the shared list, effectively emptying it.\n * This is the equivalent of calling `detach()` on each of its elements.\n *\n * @param {boolean} keepEachANObjectInItsOwnList If set to `true`, then instead of completely emptying the local list of each AutoNumeric objects, each one of those keeps itself in its own local list\n */\n empty: function empty() {\n var keepEachANObjectInItsOwnList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var initialCompleteLocalList = _this.autoNumericLocalList;\n\n // Update the local list for all objects in it\n initialCompleteLocalList.forEach(function (aNObject) {\n if (keepEachANObjectInItsOwnList) {\n aNObject._createLocalList();\n } else {\n aNObject._setLocalList(new Map());\n }\n });\n },\n\n /**\n * Return an array containing all the AutoNumeric DOM elements that have been initialized by each other\n *\n * @returns {Array}\n */\n elements: function elements() {\n var result = [];\n _this.autoNumericLocalList.forEach(function (aNObject) {\n result.push(aNObject.node());\n });\n\n return result;\n },\n\n /**\n * Return the `Map` object directly\n * @returns {Map}\n */\n getList: function getList() {\n return _this.autoNumericLocalList;\n },\n\n /**\n * Return the number of element in the local AutoNumeric element list\n * @returns {number}\n */\n size: function size() {\n return _this.autoNumericLocalList.size;\n }\n };\n\n // Create the functions that will allow to change each setting one by one\n /**\n * For each options, we define if we need to reformat the element content (does changing the options should change the way its value is displayed?).\n * If yes, then we use the `update()` for force a reformat, otherwise, we just update the `settings` object.\n */\n this.options = {\n /**\n * Reset any options set previously, by overwriting them with the default settings\n *\n * @returns {AutoNumeric}\n */\n reset: function reset() {\n //TODO Add a `settings` parameter so that the user can reset to a specific set of settings. This is different than update since it drops any non-default settings before using those new settings.\n _this.settings = { rawValue: _this.defaultRawValue }; // Here we pass the default rawValue in order to prevent showing a warning that we try to set an `undefined` value\n _this.update(AutoNumeric.defaultSettings);\n\n return _this;\n },\n allowDecimalPadding: function allowDecimalPadding(_allowDecimalPadding) {\n _this.update({ allowDecimalPadding: _allowDecimalPadding });\n\n return _this;\n },\n alwaysAllowDecimalCharacter: function alwaysAllowDecimalCharacter(_alwaysAllowDecimalCharacter) {\n //FIXME Test this\n _this.update({ alwaysAllowDecimalCharacter: _alwaysAllowDecimalCharacter });\n\n return _this;\n },\n caretPositionOnFocus: function caretPositionOnFocus(_caretPositionOnFocus) {\n //FIXME test this\n _this.settings.caretPositionOnFocus = _caretPositionOnFocus;\n\n return _this;\n },\n createLocalList: function createLocalList(_createLocalList2) {\n _this.settings.createLocalList = _createLocalList2;\n\n // Delete the local list when this is set to `false`, create it if this is set to `true` and there is not pre-existing list\n if (_this.settings.createLocalList) {\n if (!_this._hasLocalList()) {\n _this._createLocalList();\n }\n } else {\n _this._deleteLocalList();\n }\n\n return _this;\n },\n currencySymbol: function currencySymbol(_currencySymbol) {\n _this.update({ currencySymbol: _currencySymbol });\n\n return _this;\n },\n currencySymbolPlacement: function currencySymbolPlacement(_currencySymbolPlacement) {\n _this.update({ currencySymbolPlacement: _currencySymbolPlacement });\n\n return _this;\n },\n decimalCharacter: function decimalCharacter(_decimalCharacter) {\n _this.update({ decimalCharacter: _decimalCharacter });\n\n return _this;\n },\n decimalCharacterAlternative: function decimalCharacterAlternative(_decimalCharacterAlternative) {\n _this.settings.decimalCharacterAlternative = _decimalCharacterAlternative;\n\n return _this;\n },\n /**\n * Update the decimal places globally, which means this override any previously set number of decimal shown on focus, on blur, or in the raw value.\n *\n * @param {int} decimalPlaces\n * @returns {AutoNumeric}\n */\n decimalPlaces: function decimalPlaces(_decimalPlaces) {\n _AutoNumericHelper2.default.warning('Using `options.decimalPlaces()` instead of calling the specific `options.decimalPlacesRawValue()`, `options.decimalPlacesShownOnFocus()` and `options.decimalPlacesShownOnBlur()` methods will reset those options.\\nPlease call the specific methods if you do not want to reset those.', _this.settings.showWarnings);\n _this.update({ decimalPlaces: _decimalPlaces });\n\n return _this;\n },\n decimalPlacesRawValue: function decimalPlacesRawValue(_decimalPlacesRawValue) {\n //FIXME test this\n _this.update({ decimalPlacesRawValue: _decimalPlacesRawValue });\n\n return _this;\n },\n decimalPlacesShownOnBlur: function decimalPlacesShownOnBlur(_decimalPlacesShownOnBlur) {\n _this.update({ decimalPlacesShownOnBlur: _decimalPlacesShownOnBlur });\n\n return _this;\n },\n decimalPlacesShownOnFocus: function decimalPlacesShownOnFocus(_decimalPlacesShownOnFocus) {\n _this.update({ decimalPlacesShownOnFocus: _decimalPlacesShownOnFocus });\n\n return _this;\n },\n defaultValueOverride: function defaultValueOverride(_defaultValueOverride) {\n _this.update({ defaultValueOverride: _defaultValueOverride });\n\n return _this;\n },\n digitalGroupSpacing: function digitalGroupSpacing(_digitalGroupSpacing) {\n _this.update({ digitalGroupSpacing: _digitalGroupSpacing });\n\n return _this;\n },\n digitGroupSeparator: function digitGroupSeparator(_digitGroupSeparator) {\n _this.update({ digitGroupSeparator: _digitGroupSeparator });\n\n return _this;\n },\n divisorWhenUnfocused: function divisorWhenUnfocused(_divisorWhenUnfocused) {\n _this.update({ divisorWhenUnfocused: _divisorWhenUnfocused });\n\n return _this;\n },\n emptyInputBehavior: function emptyInputBehavior(_emptyInputBehavior) {\n if (_this.rawValue === null && _emptyInputBehavior !== AutoNumeric.options.emptyInputBehavior.null) {\n // Special case : if the current `rawValue` is `null` and the `emptyInputBehavior` is changed to something else than `'null'`, then it makes that `rawValue` invalid.\n // Here we can either prevent the option update and throw an error, or still accept the option update and update the value from `null` to `''`.\n // We cannot keep `rawValue` to `null` since if `emptyInputBehavior` is not set to `null`, lots of function assume `rawValue` is a string.\n _AutoNumericHelper2.default.warning('You are trying to modify the `emptyInputBehavior` option to something different than `\\'null\\'` (' + _emptyInputBehavior + '), but the element raw value is currently set to `null`. This would result in an invalid `rawValue`. In order to fix that, the element value has been changed to the empty string `\\'\\'`.', _this.settings.showWarnings);\n _this.rawValue = '';\n }\n\n _this.update({ emptyInputBehavior: _emptyInputBehavior });\n\n return _this;\n },\n eventBubbles: function eventBubbles(_eventBubbles) {\n _this.settings.eventBubbles = _eventBubbles;\n\n return _this;\n },\n eventIsCancelable: function eventIsCancelable(_eventIsCancelable) {\n _this.settings.eventIsCancelable = _eventIsCancelable;\n\n return _this;\n },\n failOnUnknownOption: function failOnUnknownOption(_failOnUnknownOption) {\n _this.settings.failOnUnknownOption = _failOnUnknownOption; //FIXME test this\n\n return _this;\n },\n formatOnPageLoad: function formatOnPageLoad(_formatOnPageLoad) {\n _this.settings.formatOnPageLoad = _formatOnPageLoad; //FIXME test this\n\n return _this;\n },\n formulaMode: function formulaMode(_formulaMode) {\n _this.settings.formulaMode = _formulaMode; //FIXME Test this\n\n return _this;\n },\n historySize: function historySize(_historySize) {\n _this.settings.historySize = _historySize;\n\n return _this;\n },\n isCancellable: function isCancellable(_isCancellable) {\n _this.settings.isCancellable = _isCancellable; //FIXME test this\n\n return _this;\n },\n leadingZero: function leadingZero(_leadingZero) {\n _this.update({ leadingZero: _leadingZero });\n\n return _this;\n },\n maximumValue: function maximumValue(_maximumValue) {\n _this.update({ maximumValue: _maximumValue });\n\n return _this;\n },\n minimumValue: function minimumValue(_minimumValue) {\n _this.update({ minimumValue: _minimumValue });\n\n return _this;\n },\n modifyValueOnWheel: function modifyValueOnWheel(_modifyValueOnWheel) {\n _this.settings.modifyValueOnWheel = _modifyValueOnWheel; //FIXME test this\n\n return _this;\n },\n negativeBracketsTypeOnBlur: function negativeBracketsTypeOnBlur(_negativeBracketsTypeOnBlur) {\n _this.update({ negativeBracketsTypeOnBlur: _negativeBracketsTypeOnBlur });\n\n return _this;\n },\n negativePositiveSignPlacement: function negativePositiveSignPlacement(_negativePositiveSignPlacement) {\n _this.update({ negativePositiveSignPlacement: _negativePositiveSignPlacement });\n\n return _this;\n },\n negativeSignCharacter: function negativeSignCharacter(_negativeSignCharacter) {\n _this.update({ negativeSignCharacter: _negativeSignCharacter });\n\n return _this;\n },\n noEventListeners: function noEventListeners(_noEventListeners) {\n //FIXME test this\n if (_noEventListeners === AutoNumeric.options.noEventListeners.noEvents && _this.settings.noEventListeners === AutoNumeric.options.noEventListeners.addEvents) {\n // Remove the events once\n _this._removeEventListeners();\n }\n\n _this.update({ noEventListeners: _noEventListeners });\n\n return _this;\n },\n onInvalidPaste: function onInvalidPaste(_onInvalidPaste) {\n _this.settings.onInvalidPaste = _onInvalidPaste; //FIXME test this\n\n return _this;\n },\n outputFormat: function outputFormat(_outputFormat) {\n _this.settings.outputFormat = _outputFormat;\n\n return _this;\n },\n overrideMinMaxLimits: function overrideMinMaxLimits(_overrideMinMaxLimits) {\n _this.update({ overrideMinMaxLimits: _overrideMinMaxLimits });\n\n return _this;\n },\n positiveSignCharacter: function positiveSignCharacter(_positiveSignCharacter) {\n _this.update({ positiveSignCharacter: _positiveSignCharacter });\n\n return _this;\n },\n rawValueDivisor: function rawValueDivisor(_rawValueDivisor) {\n _this.update({ rawValueDivisor: _rawValueDivisor });\n\n return _this;\n },\n readOnly: function readOnly(_readOnly) {\n // When changing the readOnly attribute, the raw and formatted values do not change, so no need to call the costly 'update()` method\n _this.settings.readOnly = _readOnly;\n _this._setWritePermissions();\n\n return _this;\n },\n roundingMethod: function roundingMethod(_roundingMethod) {\n _this.update({ roundingMethod: _roundingMethod });\n\n return _this;\n },\n saveValueToSessionStorage: function saveValueToSessionStorage(_saveValueToSessionStorage) {\n _this.update({ saveValueToSessionStorage: _saveValueToSessionStorage });\n\n return _this;\n },\n symbolWhenUnfocused: function symbolWhenUnfocused(_symbolWhenUnfocused) {\n _this.update({ symbolWhenUnfocused: _symbolWhenUnfocused });\n\n return _this;\n },\n selectNumberOnly: function selectNumberOnly(_selectNumberOnly) {\n _this.settings.selectNumberOnly = _selectNumberOnly; //FIXME test this\n\n return _this;\n },\n selectOnFocus: function selectOnFocus(_selectOnFocus) {\n _this.settings.selectOnFocus = _selectOnFocus; //FIXME test this\n\n return _this;\n },\n serializeSpaces: function serializeSpaces(_serializeSpaces) {\n _this.settings.serializeSpaces = _serializeSpaces; //FIXME test this\n\n return _this;\n },\n showOnlyNumbersOnFocus: function showOnlyNumbersOnFocus(_showOnlyNumbersOnFocus) {\n _this.update({ showOnlyNumbersOnFocus: _showOnlyNumbersOnFocus });\n\n return _this;\n },\n showPositiveSign: function showPositiveSign(_showPositiveSign) {\n _this.update({ showPositiveSign: _showPositiveSign });\n\n return _this;\n },\n showWarnings: function showWarnings(_showWarnings) {\n _this.settings.showWarnings = _showWarnings; //FIXME test this\n\n return _this;\n },\n styleRules: function styleRules(_styleRules) {\n _this.update({ styleRules: _styleRules });\n\n return _this;\n },\n suffixText: function suffixText(_suffixText) {\n _this.update({ suffixText: _suffixText });\n\n return _this;\n },\n unformatOnHover: function unformatOnHover(_unformatOnHover) {\n _this.settings.unformatOnHover = _unformatOnHover; //FIXME test this\n\n return _this;\n },\n unformatOnSubmit: function unformatOnSubmit(_unformatOnSubmit2) {\n _this.settings.unformatOnSubmit = _unformatOnSubmit2; //FIXME test this\n\n return _this;\n },\n valuesToStrings: function valuesToStrings(_valuesToStrings) {\n _this.update({ valuesToStrings: _valuesToStrings });\n\n return _this;\n },\n watchExternalChanges: function watchExternalChanges(_watchExternalChanges) {\n //FIXME test this\n _this.update({ watchExternalChanges: _watchExternalChanges });\n\n return _this;\n },\n wheelOn: function wheelOn(_wheelOn) {\n _this.settings.wheelOn = _wheelOn; //FIXME test this\n\n return _this;\n },\n wheelStep: function wheelStep(_wheelStep) {\n _this.settings.wheelStep = _wheelStep; //FIXME test this\n\n return _this;\n }\n };\n\n // Once the autoNumeric element has been initialized, broadcast that message with additional info.\n // Note: When using `AutoNumeric.multiple()`, one event is sent *per* element initialized\n this._triggerEvent(AutoNumeric.events.initialized, this.domElement, {\n newValue: _AutoNumericHelper2.default.getElementValue(this.domElement),\n newRawValue: this.rawValue,\n error: null,\n aNElement: this\n });\n }\n\n /**\n * Return the autoNumeric version number (for debugging purpose)\n *\n * @returns {string}\n */\n\n\n _createClass(AutoNumeric, [{\n key: '_saveInitialValues',\n\n\n /**\n * Save the initial element values for later use in the pristine test.\n * Those values are :\n * - the html attribute (ie. ), and\n * - the script `value` (ie. `let domElement.value`)\n *\n * @param {null|number|string} initialValue\n * @private\n */\n value: function _saveInitialValues(initialValue) {\n // Keep the very first initial values (in the html attribute and set by the script). This is needed to check if the element is pristine.\n // Save the html attribute 'value'\n this.initialValueHtmlAttribute = _AutoNumericHelper2.default.scientificToDecimal(this.domElement.getAttribute('value'));\n if (_AutoNumericHelper2.default.isNull(this.initialValueHtmlAttribute)) {\n // Set the default empty value attribute instead of `null`, since if the initial value is null, the empty string is used\n this.initialValueHtmlAttribute = '';\n }\n\n // Save the 'script' value\n this.initialValue = initialValue;\n if (_AutoNumericHelper2.default.isNull(this.initialValue)) {\n // Same as above\n this.initialValue = '';\n }\n }\n\n /**\n * Generate all the event listeners for the given DOM element\n * @private\n */\n\n }, {\n key: '_createEventListeners',\n value: function _createEventListeners() {\n var _this2 = this;\n\n this.formulaMode = false;\n // Create references to the event handler functions, so we can then cleanly removes those listeners if needed\n // That would not be possible if we used closures directly in the event handler declarations\n this._onFocusInFunc = function (e) {\n _this2._onFocusIn(e);\n };\n this._onFocusInAndMouseEnterFunc = function (e) {\n _this2._onFocusInAndMouseEnter(e);\n };\n this._onFocusFunc = function () {\n _this2._onFocus();\n };\n this._onKeydownFunc = function (e) {\n _this2._onKeydown(e);\n };\n this._onKeypressFunc = function (e) {\n _this2._onKeypress(e);\n };\n this._onKeyupFunc = function (e) {\n _this2._onKeyup(e);\n };\n this._onFocusOutAndMouseLeaveFunc = function (e) {\n _this2._onFocusOutAndMouseLeave(e);\n };\n this._onPasteFunc = function (e) {\n _this2._onPaste(e);\n };\n this._onWheelFunc = function (e) {\n _this2._onWheel(e);\n };\n this._onDropFunc = function (e) {\n _this2._onDrop(e);\n };\n this._onKeydownGlobalFunc = function (e) {\n _this2._onKeydownGlobal(e);\n };\n this._onKeyupGlobalFunc = function (e) {\n _this2._onKeyupGlobal(e);\n };\n\n // Add the event listeners\n this.domElement.addEventListener('focusin', this._onFocusInFunc, false);\n this.domElement.addEventListener('focus', this._onFocusInAndMouseEnterFunc, false);\n this.domElement.addEventListener('focus', this._onFocusFunc, false);\n this.domElement.addEventListener('mouseenter', this._onFocusInAndMouseEnterFunc, false);\n this.domElement.addEventListener('keydown', this._onKeydownFunc, false);\n this.domElement.addEventListener('keypress', this._onKeypressFunc, false);\n this.domElement.addEventListener('keyup', this._onKeyupFunc, false);\n this.domElement.addEventListener('blur', this._onFocusOutAndMouseLeaveFunc, false);\n this.domElement.addEventListener('mouseleave', this._onFocusOutAndMouseLeaveFunc, false);\n this.domElement.addEventListener('paste', this._onPasteFunc, false);\n this.domElement.addEventListener('wheel', this._onWheelFunc, false);\n this.domElement.addEventListener('drop', this._onDropFunc, false);\n this._setupFormListener();\n\n // Keep track if the event listeners have been initialized on this object\n this.hasEventListeners = true;\n\n // Create one global event listener for the keyup event on the document object, which will be shared by all the autoNumeric elements\n if (!AutoNumeric._doesGlobalListExists()) {\n document.addEventListener('keydown', this._onKeydownGlobalFunc, false);\n document.addEventListener('keyup', this._onKeyupGlobalFunc, false);\n }\n }\n\n /**\n * Remove all the autoNumeric-related event listeners for the given DOM element\n * @private\n */\n\n }, {\n key: '_removeEventListeners',\n value: function _removeEventListeners() {\n this.domElement.removeEventListener('focusin', this._onFocusInFunc, false);\n this.domElement.removeEventListener('focus', this._onFocusInAndMouseEnterFunc, false);\n this.domElement.removeEventListener('focus', this._onFocusFunc, false);\n this.domElement.removeEventListener('mouseenter', this._onFocusInAndMouseEnterFunc, false);\n this.domElement.removeEventListener('blur', this._onFocusOutAndMouseLeaveFunc, false);\n this.domElement.removeEventListener('mouseleave', this._onFocusOutAndMouseLeaveFunc, false);\n this.domElement.removeEventListener('keydown', this._onKeydownFunc, false);\n this.domElement.removeEventListener('keypress', this._onKeypressFunc, false);\n this.domElement.removeEventListener('keyup', this._onKeyupFunc, false);\n this.domElement.removeEventListener('paste', this._onPasteFunc, false);\n this.domElement.removeEventListener('wheel', this._onWheelFunc, false);\n this.domElement.removeEventListener('drop', this._onDropFunc, false);\n this._removeFormListener();\n\n // Keep track if the event listeners have been initialized on this object\n this.hasEventListeners = false;\n\n document.removeEventListener('keydown', this._onKeydownGlobalFunc, false);\n document.removeEventListener('keyup', this._onKeyupGlobalFunc, false);\n }\n\n /**\n * Toggle the event listeners according to the `noEventListeners` option, if those were not activated/deactivated before\n * @private\n */\n\n }, {\n key: '_updateEventListeners',\n value: function _updateEventListeners() {\n if (!this.settings.noEventListeners && !this.hasEventListeners) {\n // Special case where an update is done on an element that did not activate its event listeners in the first place\n // ie. when an element is first created with `contenteditable=\"false\"`, then an update is done with `anElement.french()`\n this._createEventListeners();\n }\n\n if (this.settings.noEventListeners && this.hasEventListeners) {\n this._removeEventListeners();\n }\n }\n\n /**\n * Mark the parent