|
3 | 3 | * https://github.com/RobinHerbots/jquery.inputmask
|
4 | 4 | * Copyright (c) 2010 - 2016 Robin Herbots
|
5 | 5 | * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
6 |
| -* Version: 3.2.8-11 |
| 6 | +* Version: 3.2.8-15 |
7 | 7 | */
|
8 | 8 | !function(factory) {
|
9 | 9 | "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery")) : factory(window.dependencyLib || jQuery);
|
|
312 | 312 | return !1;
|
313 | 313 | }
|
314 | 314 | var i, startPos = start;
|
315 |
| - for (getMaskSet().p = start, i = startPos; end > i; i++) void 0 !== getMaskSet().validPositions[i] && (nocheck === !0 || !IsEnclosedStatic(i) && opts.canClearPosition(getMaskSet(), i, getLastValidPosition(), strict, opts) !== !1) && delete getMaskSet().validPositions[i]; |
| 315 | + for (getMaskSet().p = start, i = end - 1; i >= startPos; i--) void 0 !== getMaskSet().validPositions[i] && (nocheck === !0 || !IsEnclosedStatic(i) && opts.canClearPosition(getMaskSet(), i, getLastValidPosition(), strict, opts) !== !1) && delete getMaskSet().validPositions[i]; |
316 | 316 | for (resetMaskSet(!0), i = startPos + 1; i <= getLastValidPosition(); ) {
|
317 | 317 | for (;void 0 !== getMaskSet().validPositions[startPos]; ) startPos++;
|
318 | 318 | var s = getMaskSet().validPositions[startPos];
|
|
322 | 322 | i++) : isMask(i) || (i++, startPos--), startPos++;
|
323 | 323 | }
|
324 | 324 | }
|
325 |
| - var lvp = getLastValidPosition(), ml = getMaskLength(); |
326 |
| - for (strict !== !0 && nocheck !== !0 && void 0 !== getMaskSet().validPositions[lvp] && getMaskSet().validPositions[lvp].input === opts.radixPoint && delete getMaskSet().validPositions[lvp], |
327 |
| - i = lvp + 1; ml >= i; i++) getMaskSet().validPositions[i] && delete getMaskSet().validPositions[i]; |
328 | 325 | resetMaskSet(!0);
|
329 | 326 | }
|
330 | 327 | function getTestTemplate(pos, ndxIntlzr, tstPs) {
|
|
616 | 613 | }
|
617 | 614 | strict = strict === !0;
|
618 | 615 | var maskPos = pos;
|
619 |
| - void 0 != pos.begin && (maskPos = isRTL && !isSelection(pos) ? pos.end : pos.begin); |
620 |
| - for (var pndx = maskPos - 1; pndx > -1 && !getMaskSet().validPositions[pndx]; pndx--) ; |
| 616 | + void 0 !== pos.begin && (maskPos = isRTL && !isSelection(pos) ? pos.end : pos.begin); |
| 617 | + for (var result = !1, positionsClone = $.extend(!0, {}, getMaskSet().validPositions), pndx = maskPos - 1; pndx > -1 && !getMaskSet().validPositions[pndx]; pndx--) ; |
621 | 618 | pndx++;
|
622 |
| - for (var testTemplate; maskPos > pndx; pndx++) getBuffer(), void 0 === getMaskSet().validPositions[pndx] && ((testTemplate = getTestTemplate(pndx)).match.def == opts.radixPointDefinitionSymbol || !isMask(pndx, !0) || $.inArray(opts.radixPoint, getBuffer()) < pndx && testTemplate.match.fn && testTemplate.match.fn.test(getPlaceholder(pndx), getMaskSet(), pndx, !1, opts)) && _isValid(pndx, testTemplate.match.placeholder || (null == testTemplate.match.fn ? testTemplate.match.def : getPlaceholder(pndx)), !0, fromSetValid); |
623 |
| - var result = !1, positionsClone = $.extend(!0, {}, getMaskSet().validPositions); |
| 619 | + for (var testTemplate; maskPos > pndx; pndx++) getBuffer(), void 0 === getMaskSet().validPositions[pndx] && ((testTemplate = getTestTemplate(pndx)).match.def === opts.radixPointDefinitionSymbol || !isMask(pndx, !0) || $.inArray(opts.radixPoint, getBuffer()) < pndx && testTemplate.match.fn && testTemplate.match.fn.test(getPlaceholder(pndx), getMaskSet(), pndx, !1, opts)) && _isValid(pndx, testTemplate.match.placeholder || (null == testTemplate.match.fn ? testTemplate.match.def : getPlaceholder(pndx)), !0, fromSetValid); |
624 | 620 | if (isSelection(pos) && (handleRemove(void 0, Inputmask.keyCode.DELETE, pos), maskPos = getMaskSet().p),
|
625 | 621 | maskPos < getMaskLength() && (result = _isValid(maskPos, c, strict, fromSetValid),
|
626 | 622 | (!strict || fromSetValid === !0) && result === !1)) {
|
627 | 623 | var currentPosValid = getMaskSet().validPositions[maskPos];
|
628 | 624 | if (!currentPosValid || null !== currentPosValid.match.fn || currentPosValid.match.def !== c && c !== opts.skipOptionalPartCharacter) {
|
629 | 625 | if ((opts.insertMode || void 0 === getMaskSet().validPositions[seekNext(maskPos)]) && !isMask(maskPos, !0)) {
|
630 |
| - var staticChar = getTestTemplate(maskPos).match, staticChar = staticChar.placeholder || staticChar.def; |
631 |
| - _isValid(maskPos, staticChar, strict, fromSetValid); |
| 626 | + var staticChar = getTestTemplate(maskPos).match; |
| 627 | + staticChar = staticChar.placeholder || staticChar.def, _isValid(maskPos, staticChar, strict, fromSetValid); |
632 | 628 | for (var nPos = maskPos + 1, snPos = seekNext(maskPos); snPos >= nPos; nPos++) if (result = _isValid(nPos, c, strict, fromSetValid),
|
633 | 629 | result !== !1) {
|
634 | 630 | trackbackAlternations(maskPos, nPos), maskPos = nPos;
|
|
648 | 644 | }
|
649 | 645 | function isMask(pos, strict) {
|
650 | 646 | var test;
|
651 |
| - if (strict ? (test = getTestTemplate(pos).match, "" == test.def && (test = getTest(pos))) : test = getTest(pos), |
| 647 | + if (strict ? (test = getTestTemplate(pos).match, "" === test.def && (test = getTest(pos))) : test = getTest(pos), |
652 | 648 | null != test.fn) return test.fn;
|
653 | 649 | if (strict !== !0 && pos > -1 && !opts.keepStatic && void 0 === getMaskSet().validPositions[pos]) {
|
654 | 650 | var tests = getTests(pos);
|
|
0 commit comments