|
|
@@ -3,7 +3,7 @@
|
|
|
* http://github.com/RobinHerbots/jquery.inputmask
|
|
|
* Copyright (c) 2010 - 2015 Robin Herbots
|
|
|
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-* Version: 3.1.63-11
|
|
|
+* Version: 3.1.63-18
|
|
|
*/
|
|
|
!function(factory) {
|
|
|
"function" == typeof define && define.amd ? define([ "jquery" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery")) : factory(jQuery);
|
|
|
@@ -375,11 +375,8 @@
|
|
|
var maskTokens = getMaskSet().maskToken, testPos = ndxIntlzr ? tstPs : 0, ndxInitializer = ndxIntlzr || [ 0 ], matches = [], insertStop = !1;
|
|
|
if (cacheable === !0 && getMaskSet().tests[pos]) return getMaskSet().tests[pos];
|
|
|
if (void 0 == ndxIntlzr) {
|
|
|
- for (var test, previousPos = pos - 1; void 0 == (test = getMaskSet().validPositions[previousPos]) && previousPos > -1; ) previousPos--;
|
|
|
- if (void 0 != test && previousPos > -1) testPos = previousPos, ndxInitializer = test.locator.slice(); else {
|
|
|
- for (previousPos = pos - 1; void 0 == (test = getMaskSet().tests[previousPos]) && previousPos > -1; ) previousPos--;
|
|
|
- void 0 != test && previousPos > -1 && (testPos = previousPos, ndxInitializer = test[0].locator.slice());
|
|
|
- }
|
|
|
+ for (var test, previousPos = pos - 1; void 0 == (test = getMaskSet().validPositions[previousPos]) && previousPos > -1 && (!getMaskSet().tests[previousPos] || void 0 == (test = getMaskSet().tests[previousPos][0])); ) previousPos--;
|
|
|
+ void 0 != test && previousPos > -1 && (testPos = previousPos, ndxInitializer = test.locator.slice());
|
|
|
}
|
|
|
for (var mtndx = ndxInitializer.shift(); mtndx < maskTokens.length; mtndx++) {
|
|
|
var match = ResolveTestFromToken(maskTokens[mtndx], ndxInitializer, [ mtndx ]);
|
|
|
@@ -475,8 +472,8 @@
|
|
|
break;
|
|
|
}
|
|
|
if (void 0 != alternation) for (var decisionPos in getMaskSet().validPositions) if (altPos = getMaskSet().validPositions[decisionPos],
|
|
|
- parseInt(decisionPos) > parseInt(lastAlt) && altPos.alternation) {
|
|
|
- for (var decisionTaker = altPos.locator[alternation], altNdxs = getMaskSet().validPositions[lastAlt].locator[alternation].toString().split(","), mndx = 0; mndx < altNdxs.length; mndx++) if (decisionTaker < altNdxs[mndx]) {
|
|
|
+ parseInt(decisionPos) > parseInt(lastAlt) && void 0 != altPos.alternation) {
|
|
|
+ for (var altNdxs = getMaskSet().validPositions[lastAlt].locator[alternation].toString().split(","), decisionTaker = altPos.locator[alternation] || altNdxs[0], mndx = 0; mndx < altNdxs.length; mndx++) if (decisionTaker < altNdxs[mndx]) {
|
|
|
for (var possibilityPos, possibilities, dp = decisionPos - 1; dp >= 0; dp--) if (possibilityPos = getMaskSet().validPositions[dp],
|
|
|
void 0 != possibilityPos) {
|
|
|
possibilities = possibilityPos.locator[alternation], possibilityPos.locator[alternation] = parseInt(altNdxs[mndx]);
|
|
|
@@ -493,8 +490,11 @@
|
|
|
if (input != opts.skipOptionalPartCharacter && !(isValidRslt = isValid(getLastValidPosition() + 1, input, !1, !0))) break;
|
|
|
}
|
|
|
if (possibilityPos.alternation = alternation, possibilityPos.locator[alternation] = possibilities,
|
|
|
- isValidRslt && (isValidRslt = isValid(pos, c, strict, fromSetValid)), opts.keepStatic = !opts.keepStatic,
|
|
|
- isValidRslt) return isValidRslt;
|
|
|
+ isValidRslt) {
|
|
|
+ var targetLvp = getLastValidPosition(pos) + 1;
|
|
|
+ isValidRslt = isValid(pos > targetLvp ? targetLvp : pos, c, strict, fromSetValid);
|
|
|
+ }
|
|
|
+ if (opts.keepStatic = !opts.keepStatic, isValidRslt) return isValidRslt;
|
|
|
resetMaskSet(), getMaskSet().validPositions = $.extend(!0, {}, validPsClone);
|
|
|
}
|
|
|
}
|