(alias, options, internal)
| 9 | export function factory($, window, document, undefined) { |
| 10 | var ua = navigator.userAgent, ie = ua.indexOf("MSIE ") > 0 || ua.indexOf("Trident/") > 0, mobile = isInputEventSupported("touchstart"), iemobile = /iemobile/i.test(ua), iphone = /iphone/i.test(ua) && !iemobile; |
| 11 | function Inputmask(alias, options, internal) { |
| 12 | if (!(this instanceof Inputmask)) { |
| 13 | return new Inputmask(alias, options, internal); |
| 14 | } |
| 15 | this.el = undefined; |
| 16 | this.events = {}; |
| 17 | this.maskset = undefined; |
| 18 | this.refreshValue = false; |
| 19 | if (internal !== true) { |
| 20 | if ($.isPlainObject(alias)) { |
| 21 | options = alias; |
| 22 | } else { |
| 23 | options = options || {}; |
| 24 | if (alias) options.alias = alias; |
| 25 | } |
| 26 | this.opts = $.extend(true, {}, this.defaults, options); |
| 27 | this.noMasksCache = options && options.definitions !== undefined; |
| 28 | this.userOptions = options || {}; |
| 29 | this.isRTL = this.opts.numericInput; |
| 30 | resolveAlias(this.opts.alias, options, this.opts); |
| 31 | } |
| 32 | } |
| 33 | Inputmask.prototype = { |
| 34 | dataAttribute: "data-inputmask", |
| 35 | defaults: { |
no test coverage detected