1/*! 2* jquery.inputmask.bundle.js 3* https://github.com/RobinHerbots/Inputmask 4* Copyright (c) 2010 - 2017 Robin Herbots 5* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) 6* Version: 3.3.11 7*/ 8 9!function(modules) { 10 function __webpack_require__(moduleId) { 11 if (installedModules[moduleId]) return installedModules[moduleId].exports; 12 var module = installedModules[moduleId] = { 13 i: moduleId, 14 l: !1, 15 exports: {} 16 }; 17 return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), 18 module.l = !0, module.exports; 19 } 20 var installedModules = {}; 21 __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function(exports, name, getter) { 22 __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { 23 configurable: !1, 24 enumerable: !0, 25 get: getter 26 }); 27 }, __webpack_require__.n = function(module) { 28 var getter = module && module.__esModule ? function() { 29 return module.default; 30 } : function() { 31 return module; 32 }; 33 return __webpack_require__.d(getter, "a", getter), getter; 34 }, __webpack_require__.o = function(object, property) { 35 return Object.prototype.hasOwnProperty.call(object, property); 36 }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 3); 37}([ function(module, exports, __webpack_require__) { 38 "use strict"; 39 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 40 "function" == typeof Symbol && Symbol.iterator; 41 !function(factory) { 42 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2) ], void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = factory) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 43 }(function($) { 44 return $; 45 }); 46}, function(module, exports, __webpack_require__) { 47 "use strict"; 48 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__, _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { 49 return typeof obj; 50 } : function(obj) { 51 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 52 }; 53 !function(factory) { 54 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(0), __webpack_require__(10), __webpack_require__(11) ], 55 void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = factory) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 56 }(function($, window, document, undefined) { 57 function Inputmask(alias, options, internal) { 58 if (!(this instanceof Inputmask)) return new Inputmask(alias, options, internal); 59 this.el = undefined, this.events = {}, this.maskset = undefined, this.refreshValue = !1, 60 !0 !== internal && ($.isPlainObject(alias) ? options = alias : (options = options || {}).alias = alias, 61 this.opts = $.extend(!0, {}, this.defaults, options), this.noMasksCache = options && options.definitions !== undefined, 62 this.userOptions = options || {}, this.isRTL = this.opts.numericInput, resolveAlias(this.opts.alias, options, this.opts)); 63 } 64 function resolveAlias(aliasStr, options, opts) { 65 var aliasDefinition = Inputmask.prototype.aliases[aliasStr]; 66 return aliasDefinition ? (aliasDefinition.alias && resolveAlias(aliasDefinition.alias, undefined, opts), 67 $.extend(!0, opts, aliasDefinition), $.extend(!0, opts, options), !0) : (null === opts.mask && (opts.mask = aliasStr), 68 !1); 69 } 70 function generateMaskSet(opts, nocache) { 71 function generateMask(mask, metadata, opts) { 72 var regexMask = !1; 73 if (null !== mask && "" !== mask || ((regexMask = null !== opts.regex) ? mask = (mask = opts.regex).replace(/^(\^)(.*)(\$)$/, "$2") : (regexMask = !0, 74 mask = ".*")), 1 === mask.length && !1 === opts.greedy && 0 !== opts.repeat && (opts.placeholder = ""), 75 opts.repeat > 0 || "*" === opts.repeat || "+" === opts.repeat) { 76 var repeatStart = "*" === opts.repeat ? 0 : "+" === opts.repeat ? 1 : opts.repeat; 77 mask = opts.groupmarker.start + mask + opts.groupmarker.end + opts.quantifiermarker.start + repeatStart + "," + opts.repeat + opts.quantifiermarker.end; 78 } 79 var masksetDefinition, maskdefKey = regexMask ? "regex_" + opts.regex : opts.numericInput ? mask.split("").reverse().join("") : mask; 80 return Inputmask.prototype.masksCache[maskdefKey] === undefined || !0 === nocache ? (masksetDefinition = { 81 mask: mask,
82 maskToken: Inputmask.prototype.analyseMask(mask, regexMask, opts), 83 validPositions: {}, 84 _buffer: undefined, 85 buffer: undefined, 86 tests: {}, 87 metadata: metadata, 88 maskLength: undefined 89 }, !0 !== nocache && (Inputmask.prototype.masksCache[maskdefKey] = masksetDefinition, 90 masksetDefinition = $.extend(!0, {}, Inputmask.prototype.masksCache[maskdefKey]))) : masksetDefinition = $.extend(!0, {}, Inputmask.prototype.masksCache[maskdefKey]), 91 masksetDefinition; 92 } 93 if ($.isFunction(opts.mask) && (opts.mask = opts.mask(opts)), $.isArray(opts.mask)) { 94 if (opts.mask.length > 1) { 95 opts.keepStatic = null === opts.keepStatic || opts.keepStatic; 96 var altMask = opts.groupmarker.start; 97 return $.each(opts.numericInput ? opts.mask.reverse() : opts.mask, function(ndx, msk) { 98 altMask.length > 1 && (altMask += opts.groupmarker.end + opts.alternatormarker + opts.groupmarker.start), 99 msk.mask === undefined || $.isFunction(msk.mask) ? altMask += msk : altMask += msk.mask; 100 }), altMask += opts.groupmarker.end, generateMask(altMask, opts.mask, opts); 101 } 102 opts.mask = opts.mask.pop(); 103 } 104 return opts.mask && opts.mask.mask !== undefined && !$.isFunction(opts.mask.mask) ? generateMask(opts.mask.mask, opts.mask, opts) : generateMask(opts.mask, opts.mask, opts); 105 } 106 function maskScope(actionObj, maskset, opts) { 107 function getMaskTemplate(baseOnInput, minimalPos, includeMode) { 108 minimalPos = minimalPos || 0; 109 var ndxIntlzr, test, testPos, maskTemplate = [], pos = 0, lvp = getLastValidPosition(); 110 do { 111 !0 === baseOnInput && getMaskSet().validPositions[pos] ? (test = (testPos = getMaskSet().validPositions[pos]).match, 112 ndxIntlzr = testPos.locator.slice(), maskTemplate.push(!0 === includeMode ? testPos.input : !1 === includeMode ? test.nativeDef : getPlaceholder(pos, test))) : (test = (testPos = getTestTemplate(pos, ndxIntlzr, pos - 1)).match, 113 ndxIntlzr = testPos.locator.slice(), (!1 === opts.jitMasking || pos < lvp || "number" == typeof opts.jitMasking && isFinite(opts.jitMasking) && opts.jitMasking > pos) && maskTemplate.push(!1 === includeMode ? test.nativeDef : getPlaceholder(pos, test))), 114 pos++; 115 } while ((maxLength === undefined || pos < maxLength) && (null !== test.fn || "" !== test.def) || minimalPos > pos); 116 return "" === maskTemplate[maskTemplate.length - 1] && maskTemplate.pop(), getMaskSet().maskLength = pos + 1, 117 maskTemplate; 118 } 119 function getMaskSet() { 120 return maskset; 121 } 122 function resetMaskSet(soft) { 123 var maskset = getMaskSet(); 124 maskset.buffer = undefined, !0 !== soft && (maskset.validPositions = {}, maskset.p = 0); 125 } 126 function getLastValidPosition(closestTo, strict, validPositions) { 127 var before = -1, after = -1, valids = validPositions || getMaskSet().validPositions; 128 closestTo === undefined && (closestTo = -1); 129 for (var posNdx in valids) { 130 var psNdx = parseInt(posNdx); 131 valids[psNdx] && (strict || !0 !== valids[psNdx].generatedInput) && (psNdx <= closestTo && (before = psNdx), 132 psNdx >= closestTo && (after = psNdx)); 133 } 134 return -1 !== before && closestTo - before > 1 || after < closestTo ? before : after; 135 } 136 function stripValidPositions(start, end, nocheck, strict) { 137 var i, startPos = start, positionsClone = $.extend(!0, {}, getMaskSet().validPositions), needsValidation = !1; 138 for (getMaskSet().p = start, i = end - 1; i >= startPos; i--) getMaskSet().validPositions[i] !== undefined && (!0 !== nocheck && (!getMaskSet().validPositions[i].match.optionality && function(pos) { 139 var posMatch = getMaskSet().validPositions[pos]; 140 if (posMatch !== undefined && null === posMatch.match.fn) { 141 var prevMatch = getMaskSet().validPositions[pos - 1], nextMatch = getMaskSet().validPositions[pos + 1]; 142 return prevMatch !== undefined && nextMatch !== undefined; 143 } 144 return !1; 145 }(i) || !1 === opts.canClearPosition(getMaskSet(), i, getLastValidPosition(), str
145ict, opts)) || delete getMaskSet().validPositions[i]); 146 for (resetMaskSet(!0), i = startPos + 1; i <= getLastValidPosition(); ) { 147 for (;getMaskSet().validPositions[startPos] !== undefined; ) startPos++; 148 if (i < startPos && (i = startPos + 1), getMaskSet().validPositions[i] === undefined && isMask(i)) i++; else { 149 var t = getTestTemplate(i); 150 !1 === needsValidation && positionsClone[startPos] && positionsClone[startPos].match.def === t.match.def ? (getMaskSet().validPositions[startPos] = $.extend(!0, {}, positionsClone[startPos]), 151 getMaskSet().validPositions[startPos].input = t.input, delete getMaskSet().validPositions[i], 152 i++) : positionCanMatchDefinition(startPos, t.match.def) ? !1 !== isValid(startPos, t.input || getPlaceholder(i), !0) && (delete getMaskSet().validPositions[i], 153 i++, needsValidation = !0) : isMask(i) || (i++, startPos--), startPos++; 154 } 155 } 156 resetMaskSet(!0); 157 } 158 function determineTestTemplate(tests, guessNextBest) { 159 for (var testPos, testPositions = tests, lvp = getLastValidPosition(), lvTest = getMaskSet().validPositions[lvp] || getTests(0)[0], lvTestAltArr = lvTest.alternation !== undefined ? lvTest.locator[lvTest.alternation].toString().split(",") : [], ndx = 0; ndx < testPositions.length && (!((testPos = testPositions[ndx]).match && (opts.greedy && !0 !== testPos.match.optionalQuantifier || (!1 === testPos.match.optionality || !1 === testPos.match.newBlockMarker) && !0 !== testPos.match.optionalQuantifier) && (lvTest.alternation === undefined || lvTest.alternation !== testPos.alternation || testPos.locator[lvTest.alternation] !== undefined && checkAlternationMatch(testPos.locator[lvTest.alternation].toString().split(","), lvTestAltArr))) || !0 === guessNextBest && (null !== testPos.match.fn || /[0-9a-bA-Z]/.test(testPos.match.def))); ndx++) ; 160 return testPos; 161 } 162 function getTestTemplate(pos, ndxIntlzr, tstPs) { 163 return getMaskSet().validPositions[pos] || determineTestTemplate(getTests(pos, ndxIntlzr ? ndxIntlzr.slice() : ndxIntlzr, tstPs)); 164 } 165 function getTest(pos) { 166 return getMaskSet().validPositions[pos] ? getMaskSet().validPositions[pos] : getTests(pos)[0]; 167 } 168 function positionCanMatchDefinition(pos, def) { 169 for (var valid = !1, tests = getTests(pos), tndx = 0; tndx < tests.length; tndx++) if (tests[tndx].match && tests[tndx].match.def === def) { 170 valid = !0; 171 break; 172 } 173 return valid; 174 } 175 function getTests(pos, ndxIntlzr, tstPs) { 176 function resolveTestFromToken(maskToken, ndxInitializer, loopNdx, quantifierRecurse) { 177 function handleMatch(match, loopNdx, quantifierRecurse) { 178 function isFirstMatch(latestMatch, tokenGroup) { 179 var firstMatch = 0 === $.inArray(latestMatch, tokenGroup.matches); 180 return firstMatch || $.each(tokenGroup.matches, function(ndx, match) { 181 if (!0 === match.isQuantifier && (firstMatch = isFirstMatch(latestMatch, tokenGroup.matches[ndx - 1]))) return !1; 182 }), firstMatch; 183 } 184 function resolveNdxInitializer(pos, alternateNdx, targetAlternation) { 185 var bestMatch, indexPos; 186 if (getMaskSet().validPositions[pos - 1] && targetAlternation && getMaskSet().tests[pos]) for (var vpAlternation = getMaskSet().validPositions[pos - 1].locator, tpAlternation = getMaskSet().tests[pos][0].locator, i = 0; i < targetAlternation; i++) if (vpAlternation[i] !== tpAlternation[i]) return vpAlternation.slice(targetAlternation + 1); 187 return (getMaskSet().tests[pos] || getMaskSet().validPositions[pos]) && $.each(getMaskSet().tests[pos] || [ getMaskSet().validPositions[pos] ], function(ndx, lmnt) { 188 var alternation = targetAlternation !== undefined ? targetAlternation : lmnt.alternation, ndxPos = lmnt.locator[alternation] !== undefined ? lmnt.locator[alternation].toString().indexOf(alternateNdx) : -1; 189 (indexPos === undefined || ndxPos < indexPos) && -1 !== ndxPos && (bestMatch = lmnt, 190 indexPos = ndxPos); 191 }), bestMatch ? bestMatch.locator.slice((targetAlternation !== undefined ? targetAlternation : bestMatch.alternation) + 1) : targetAlternation !== undefined ? resolveNdxInitializer(pos, alternateNdx) : undefined; 192 } 193 if (testPos > 1e4) throw "Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. " + getMaskSet().mask; 194 if (testPos === pos && match.matches === undefined) return matches.push({ 195 match: match, 196 locator: loopNdx.reverse(), 197 cd: cacheDependency 198 }), !0; 199 if (match.matches !== undefined) { 200 if (match.isGroup && quantifierRecurse !== match) { 201 if (match = handleMatch(maskToken.matches[$.inArray(match, maskToken.matches) + 1], loopNdx)) return !0; 202 } else if (match.isOptional) { 203 var optionalToken = match; 204 if (match = resolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse)) { 205 if (latestMatch = matches[matches.length - 1].match, !isFirstMatch(latestMatch, optionalToken)) return !0; 206 insertStop = !0, testPos = pos; 207 } 208 } else if (match.isAlternator) { 209 var maltMatches, alternateToken = match, malternateMatches = [], currentMatches = matches.slice(), loopNdxCnt = loopNdx.length, altIndex = ndxInitializer.length > 0 ? ndxInitializer.shift() : -1; 210 if (-1 === altIndex || "string" == typeof altIndex) { 211 var amndx, currentPos = testPos, ndxInitializerClone = ndxInitializer.slice(), altIndexArr = []; 212 if ("string" == typeof altIndex) altIndexArr = altIndex.split(","); else for (amndx = 0;
212 amndx < alternateToken.matches.length; amndx++) altIndexArr.push(amndx); 213 for (var ndx = 0; ndx < altIndexArr.length; ndx++) { 214 if (amndx = parseInt(altIndexArr[ndx]), matches = [], ndxInitializer = resolveNdxInitializer(testPos, amndx, loopNdxCnt) || ndxInitializerClone.slice(), 215 !0 !== (match = handleMatch(alternateToken.matches[amndx] || maskToken.matches[amndx], [ amndx ].concat(loopNdx), quantifierRecurse) || match) && match !== undefined && altIndexArr[altIndexArr.length - 1] < alternateToken.matches.length) { 216 var ntndx = $.inArray(match, maskToken.matches) + 1; 217 maskToken.matches.length > ntndx && (match = handleMatch(maskToken.matches[ntndx], [ ntndx ].concat(loopNdx.slice(1, loopNdx.length)), quantifierRecurse)) && (altIndexArr.push(ntndx.toString()), 218 $.each(matches, function(ndx, lmnt) { 219 lmnt.alternation = loopNdx.length - 1; 220 })); 221 } 222 maltMatches = matches.slice(), testPos = currentPos, matches = []; 223 for (var ndx1 = 0; ndx1 < maltMatches.length; ndx1++) { 224 var altMatch = maltMatches[ndx1], dropMatch = !1; 225 altMatch.alternation = altMatch.alternation || loopNdxCnt; 226 for (var ndx2 = 0; ndx2 < malternateMatches.length; ndx2++) { 227 var altMatch2 = malternateMatches[ndx2]; 228 if ("string" != typeof altIndex || -1 !== $.inArray(altMatch.locator[altMatch.alternation].toString(), altIndexArr)) { 229 if (function(source, target) { 230 return source.match.nativeDef === target.match.nativeDef || source.match.def === target.match.nativeDef || source.match.nativeDef === target.match.def; 231 }(altMatch, altMatch2)) { 232 dropMatch = !0, altMatch.alternation === altMatch2.alternation && -1 === altMatch2.locator[altMatch2.alternation].toString().indexOf(altMatch.locator[altMatch.alternation]) && (altMatch2.locator[altMatch2.alternation] = altMatch2.locator[altMatch2.alternation] + "," + altMatch.locator[altMatch.alternation], 233 altMatch2.alternation = altMatch.alternation), altMatch.match.nativeDef === altMatch2.match.def && (altMatch.locator[altMatch.alternation] = altMatch2.locator[altMatch2.alternation], 234 malternateMatches.splice(malternateMatches.indexOf(altMatch2), 1, altMatch)); 235 break; 236 } 237 if (altMatch.match.def === altMatch2.match.def) { 238 dropMatch = !1; 239 break; 240 } 241 if (function(source, target) { 242 return null === source.match.fn && null !== target.match.fn && target.match.fn.test(source.match.def, getMaskSet(), pos, !1, opts, !1); 243 }(altMatch, altMatch2) || function(source, target) { 244 return null !== source.match.fn && null !== target.match.fn && target.match.fn.test(source.match.def.replace(/[\[\]]/g, ""), getMaskSet(), pos, !1, opts, !1); 245 }(altMatch, altMatch2)) { 246 altMatch.alternation === altMatch2.alternation && -1 === altMatch.locator[altMatch.alternation].toString().indexOf(altMatch2.locator[altMatch2.alternation].toString().split("")[0]) && (altMatch.na = altMatch.na || altMatch.locator[altMatch.alternation].toString(), 247 -1 === altMatch.na.indexOf(altMatch.locator[altMatch.alternation].toString().split("")[0]) && (altMatch.na = altMatch.na + "," + altMatch.locator[altMatch2.alternation].toString().split("")[0]), 248 dropMatch = !0, altMatch.locator[altMatch.alternation] = altMatch2.locator[altMatch2.alternation].toString().split("")[0] + "," + altMatch.locator[altMatch.alternation], 249 malternateMatches.splice(malternateMatches.indexOf(altMatch2), 0, altMatch)); 250 break; 251 } 252 } 253 } 254 dropMatch || malternateMatches.push(altMatch); 255 } 256 } 257 "string" == typeof altIndex && (malternateMatches = $.map(malternateMatches, function(lmnt, ndx) { 258 if (isFinite(ndx)) { 259 var alternation = lmnt.alternation, altLocArr = lmnt.locator[alternation].toString().split(","); 260 lmnt.locator[alternation] = undefined, lmnt.alternation = undefined; 261 for (var alndx = 0; alndx < altLocArr.length; alndx++) -1 !== $.inArray(altLocArr[alndx], altIndexArr) && (lmnt.locator[alternation] !== undefined ? (lmnt.locator[alternation] += ",", 262 lmnt.locator[alternation] += altLocArr[alndx]) : lmnt.locator[alternation] = parseInt(altLocArr[alndx]), 263 lmnt.alternation = alternation); 264 if (lmnt.locator[alternation] !== undefined) return lmnt; 265 } 266 })), matches = currentMatches.concat(malternateMatches), testPos = pos, insertStop = matches.length > 0, 267 match = malternateMatches.length > 0, ndxInitializer = ndxInitializerClone.slice(); 268 } else match = handleMatch(alternateToken.matches[altIndex] || maskToken.matches[altIndex], [ altIndex ].concat(loopNdx), quantifierRecurse); 269 if (match) return !0; 270 } else if (match.isQuantifier && quantifierRecurse !== maskToken.matches[$.inArray(match, maskToken.matches) - 1]) for (var qt = match, qndx = ndxInitializer.length > 0 ? ndxInitializer.shift() : 0; qndx < (isNaN(qt.quantifier.max) ? qndx + 1 : qt.quantifier.max) && testPos <= pos; qndx++) { 271 var tokenGroup = maskToken.matches[$.inArray(qt, maskToken.matches) - 1]; 272 if (match = handleMatch(tokenGroup, [ qndx ].concat(loopNdx), tokenGroup)) { 273 if (latestMatch = matches[matches.length - 1].match, latestMatch.optionalQuantifier = qndx > qt.quantifier.min - 1, 274 isFirstMatch(latestMatch, tokenGroup)) { 275 if (qndx > qt.quantifier.min - 1) { 276 insertStop = !0, testPos = pos; 277 break; 278 } 279 return !0; 280 } 281 return !0; 282 } 283 } else if (match = resolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse)) return !0; 284 } else testPos++; 285 } 286 for (var tndx = ndxInitializer.length > 0 ? ndxInitializer.shift() : 0; tndx < maskToken.matches.length; tndx++) if (!0 !== maskToken.matches[tndx].isQuantifier) { 287 var match = handleMatch(maskToken.matches[tndx], [ tndx ].concat(loopNdx), quantifierRecurse); 288 if (match && testPos === pos) return match; 289 if (testPos > pos) break; 290 } 291 } 292 function filterTests(tests) { 293 if (opts.keepStatic && pos > 0 && tests.length > 1 + ("" === tests[tests.length - 1].match.def ? 1 : 0) && !0 !== tests[0].match.optionality && !0 !== tests[0].match.optionalQuantifier && null === tests[0].match.fn && !/[0-9a-bA-Z]/.test(tests[0].match.def)) { 294 if (getMaskSet().validPositions[pos - 1] === undefined) return [ determineTestTemplate(tests) ]; 295 if (getMaskSet().validPositions[pos - 1].alternation === tests[0].alternation) return [ determineTestTemplate(tests) ]; 296 if (getMaskSet().validPositions[pos - 1]) return [ determineTestTemplate(tests) ]; 297 } 298 return tests; 299 } 300 var latestMatch, maskTokens = getMaskSet().maskToken, testPos = ndxIntlzr ? tstPs : 0, ndxInitializer = ndxIntlzr ? ndxIntlzr.slice() : [ 0 ], matches = [], insertStop = !1, cacheDependency = ndxIntlzr ? ndxIntlzr.join("") : ""; 301 if (pos > -1) { 302 if (ndxIntlzr === undefined) { 303 for (var test, previousPos = pos - 1; (test = getMaskSet().validPositions[previousPos] || getMaskSet().tests[previousPos]) === undefined && previousPos > -1; ) previousPos--; 304 test !== undefined && previousPos > -1 && (ndxInitializer = function(tests) { 305 var locator = []; 306 return $.isArray(tests) || (tests = [ tests ]), tests.length > 0 && (tests[0].alternation === undefined ? 0 === (locator = determineTestTemplate(tests.slice()).locator.slice()).length && (locator = tests[0].locator.slice()) : $.each(tests, function(ndx, tst) { 307 if ("" !== tst.def) if (0 === locator.length) locator = t
307st.locator.slice(); else for (var i = 0; i < locator.length; i++) tst.locator[i] && -1 === locator[i].toString().indexOf(tst.locator[i]) && (locator[i] += "," + tst.locator[i]); 308 })), locator; 309 }(test), cacheDependency = ndxInitializer.join(""), testPos = previousPos); 310 } 311 if (getMaskSet().tests[pos] && getMaskSet().tests[pos][0].cd === cacheDependency) return filterTests(getMaskSet().tests[pos]); 312 for (var mtndx = ndxInitializer.shift(); mtndx < maskTokens.length && !(resolveTestFromToken(maskTokens[mtndx], ndxInitializer, [ mtndx ]) && testPos === pos || testPos > pos); mtndx++) ; 313 } 314 return (0 === matches.length || insertStop) && matches.push({ 315 match: { 316 fn: null, 317 cardinality: 0, 318 optionality: !0, 319 casing: null, 320 def: "", 321 placeholder: "" 322 }, 323 locator: [], 324 cd: cacheDependency 325 }), ndxIntlzr !== undefined && getMaskSet().tests[pos] ? filterTests($.extend(!0, [], matches)) : (getMaskSet().tests[pos] = $.extend(!0, [], matches), 326 filterTests(getMaskSet().tests[pos])); 327 } 328 function getBufferTemplate() { 329 return getMaskSet()._buffer === undefined && (getMaskSet()._buffer = getMaskTemplate(!1, 1), 330 getMaskSet().buffer === undefined && (getMaskSet().buffer = getMaskSet()._buffer.slice())), 331 getMaskSet()._buffer; 332 } 333 function getBuffer(noCache) { 334 return getMaskSet().buffer !== undefined && !0 !== noCache || (getMaskSet().buffer = getMaskTemplate(!0, getLastValidPosition(), !0)), 335 getMaskSet().buffer; 336 } 337 function refreshFromBuffer(start, end, buffer) { 338 var i, p; 339 if (!0 === start) resetMaskSet(), start = 0, end = buffer.length; else for (i = start; i < end; i++) delete getMaskSet().validPositions[i]; 340 for (p = start, i = start; i < end; i++) if (resetMaskSet(!0), buffer[i] !== opts.skipOptionalPartCharacter) { 341 var valResult = isValid(p, buffer[i], !0, !0); 342 !1 !== valResult && (resetMaskSet(!0), p = valResult.caret !== undefined ? valResult.caret : valResult.pos + 1); 343 } 344 } 345 function casing(elem, test, pos) { 346 switch (opts.casing || test.casing) { 347 case "upper": 348 elem = elem.toUpperCase(); 349 break; 350 351 case "lower": 352 elem = elem.toLowerCase(); 353 break; 354 355 case "title": 356 var posBefore = getMaskSet().validPositions[pos - 1]; 357 elem = 0 === pos || posBefore && posBefore.input === String.fromCharCode(Inputmask.keyCode.SPACE) ? elem.toUpperCase() : elem.toLowerCase(); 358 break; 359 360 default: 361 if ($.isFunction(opts.casing)) { 362 var args = Array.prototype.slice.call(arguments); 363 args.push(getMaskSet().validPositions), elem = opts.casing.apply(this, args); 364 } 365 } 366 return elem; 367 } 368 function checkAlternationMatch(altArr1, altArr2, na) { 369 for (var naNdx, altArrC = opts.greedy ? altArr2 : altArr2.slice(0, 1), isMatch = !1, naArr = na !== undefined ? na.split(",") : [], i = 0; i < naArr.length; i++) -1 !== (naNdx = altArr1.indexOf(naArr[i])) && altArr1.splice(naNdx, 1); 370 for (var alndx = 0; alndx < altArr1.length; alndx++) if (-1 !== $.inArray(altArr1[alndx], altArrC)) { 371 isMatch = !0; 372 break; 373 } 374 return isMatch; 375 } 376 function isValid(pos, c, strict, fromSetValid, fromAlternate, validateOnly) { 377 function isSelection(posObj) { 378 var selection = isRTL ? posObj.begin - posObj.end > 1 || posObj.begin - posObj.end == 1 : posObj.end - posObj.begin > 1 || posObj.end - posObj.begin == 1; 379 return selection && 0 === posObj.begin && posObj.end === getMaskSet().maskLength ? "full" : selection; 380 } 381 function _isValid(position, c, strict) { 382 var rslt = !1; 383 return $.each(getTests(position), function(ndx, tst) { 384 for (var test = tst.match, loopend = c ? 1 : 0, chrs = "", i = test.cardinality; i > loopend; i--) chrs += getBufferElement(position - (i - 1)); 385 if (c && (chrs += c), getBuffer(!0), !1 !== (rslt = null != test.fn ? test.fn.test(chrs, getMaskSet(), position, strict, opts, isSelection(pos)) : (c === test.def || c === opts.skipOptionalPartCharacter) && "" !== test.def && {
386 c: getPlaceholder(position, test, !0) || test.def, 387 pos: position 388 })) { 389 var elem = rslt.c !== undefined ? rslt.c : c; 390 elem = elem === opts.skipOptionalPartCharacter && null === test.fn ? getPlaceholder(position, test, !0) || test.def : elem; 391 var validatedPos = position, possibleModifiedBuffer = getBuffer(); 392 if (rslt.remove !== undefined && ($.isArray(rslt.remove) || (rslt.remove = [ rslt.remove ]), 393 $.each(rslt.remove.sort(function(a, b) { 394 return b - a; 395 }), function(ndx, lmnt) { 396 stripValidPositions(lmnt, lmnt + 1, !0); 397 })), rslt.insert !== undefined && ($.isArray(rslt.insert) || (rslt.insert = [ rslt.insert ]), 398 $.each(rslt.insert.sort(function(a, b) { 399 return a - b; 400 }), function(ndx, lmnt) { 401 isValid(lmnt.pos, lmnt.c, !0, fromSetValid); 402 })), rslt.refreshFromBuffer) { 403 var refresh = rslt.refreshFromBuffer; 404 if (refreshFromBuffer(!0 === refresh ? refresh : refresh.start, refresh.end, possibleModifiedBuffer), 405 rslt.pos === undefined && rslt.c === undefined) return rslt.pos = getLastValidPosition(), 406 !1; 407 if ((validatedPos = rslt.pos !== undefined ? rslt.pos : position) !== position) return rslt = $.extend(rslt, isValid(validatedPos, elem, !0, fromSetValid)), 408 !1; 409 } else if (!0 !== rslt && rslt.pos !== undefined && rslt.pos !== position && (validatedPos = rslt.pos, 410 refreshFromBuffer(position, validatedPos, getBuffer().slice()), validatedPos !== position)) return rslt = $.extend(rslt, isValid(validatedPos, elem, !0)), 411 !1; 412 return (!0 === rslt || rslt.pos !== undefined || rslt.c !== undefined) && (ndx > 0 && resetMaskSet(!0), 413 setValidPosition(validatedPos, $.extend({}, tst, { 414 input: casing(elem, test, validatedPos) 415 }), fromSetValid, isSelection(pos)) || (rslt = !1), !1); 416 } 417 }), rslt; 418 } 419 function setValidPosition(pos, validTest, fromSetValid, isSelection) { 420 if (isSelection || opts.insertMode && getMaskSet().validPositions[pos] !== undefined && fromSetValid === undefined) { 421 var i, positionsClone = $.extend(!0, {}, getMaskSet().validPositions), lvp = getLastValidPosition(undefined, !0); 422 for (i = pos; i <= lvp; i++) delete getMaskSet().validPositions[i]; 423 getMaskSet().validPositions[pos] = $.extend(!0, {}, validTest); 424 var j, valid = !0, vps = getMaskSet().validPositions, needsValidation = !1, initialLength = getMaskSet().maskLength; 425 for (i = j = pos; i <= lvp; i++) { 426 var t = positionsClone[i]; 427 if (t !== undefined) for (var posMatch = j; posMatch < getMaskSet().maskLength && (null === t.match.fn && vps[i] && (!0 === vps[i].match.optionalQuantifier || !0 === vps[i].match.optionality) || null != t.match.fn); ) { 428 if (posMatch++, !1 === needsValidation && positionsClone[posMatch] && positionsClone[posMatch].match.def === t.match.def) getMaskSet().validPositions[posMatch] = $.extend(!0, {}, positionsClone[posMatch]), 429 getMaskSet().validPositions[posMatch].input = t.input, fillMissingNonMask(posMatch), 430 j = posMatch, valid = !0; else if (positionCanMatchDefinition(posMatch, t.match.def)) { 431 var result = isValid(posMatch, t.input, !0, !0); 432 valid = !1 !== result, j = result.caret || result.insert ? getLastValidPosition() : posMatch, 433 needsValidation = !0; 434 } else if (!(valid = !0 === t.generatedInput) && posMatch >= getMaskSet().maskLength - 1) break; 435 if (getMaskSet().maskLength < initialLength && (getMaskSet().maskLength = initialLength), 436 valid) break; 437 } 438 if (!valid) break; 439 } 440 if (!valid) return getMaskSet().validPositions = $.extend(!0, {}, positionsClone), 441 resetMaskSet(!0), !1; 442 } else getMaskSet().validPositions[pos] = $.extend(!0, {}, validTest); 443 return resetMaskSet(!0), !0; 444 } 445 function fillMissingNonMask(maskPos) { 446 for (var pndx = maskPos - 1; pndx > -1 && !getMaskSet().validPositions[pndx]; pndx--) ; 447 var testTemplate, testsFromPos; 448 for (pndx++;
448 pndx < maskPos; pndx++) getMaskSet().validPositions[pndx] === undefined && (!1 === opts.jitMasking || opts.jitMasking > pndx) && ("" === (testsFromPos = getTests(pndx, getTestTemplate(pndx - 1).locator, pndx - 1).slice())[testsFromPos.length - 1].match.def && testsFromPos.pop(), 449 (testTemplate = determineTestTemplate(testsFromPos)) && (testTemplate.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)) && !1 !== (result = _isValid(pndx, getPlaceholder(pndx, testTemplate.match, !0) || (null == testTemplate.match.fn ? testTemplate.match.def : "" !== getPlaceholder(pndx) ? getPlaceholder(pndx) : getBuffer()[pndx]), !0)) && (getMaskSet().validPositions[result.pos || pndx].generatedInput = !0)); 450 } 451 strict = !0 === strict; 452 var maskPos = pos; 453 pos.begin !== undefined && (maskPos = isRTL && !isSelection(pos) ? pos.end : pos.begin); 454 var result = !0, positionsClone = $.extend(!0, {}, getMaskSet().validPositions); 455 if ($.isFunction(opts.preValidation) && !strict && !0 !== fromSetValid && !0 !== validateOnly && (result = opts.preValidation(getBuffer(), maskPos, c, isSelection(pos), opts)), 456 !0 === result) { 457 if (fillMissingNonMask(maskPos), isSelection(pos) && (handleRemove(undefined, Inputmask.keyCode.DELETE, pos, !0, !0), 458 maskPos = getMaskSet().p), maskPos < getMaskSet().maskLength && (maxLength === undefined || maskPos < maxLength) && (result = _isValid(maskPos, c, strict), 459 (!strict || !0 === fromSetValid) && !1 === result && !0 !== validateOnly)) { 460 var currentPosValid = getMaskSet().validPositions[maskPos]; 461 if (!currentPosValid || null !== currentPosValid.match.fn || currentPosValid.match.def !== c && c !== opts.skipOptionalPartCharacter) { 462 if ((opts.insertMode || getMaskSet().validPositions[seekNext(maskPos)] === undefined) && !isMask(maskPos, !0)) for (var nPos = maskPos + 1, snPos = seekNext(maskPos); nPos <= snPos; nPos++) if (!1 !== (result = _isValid(nPos, c, strict))) { 463 !function(originalPos, newPos) { 464 var vp = getMaskSet().validPositions[newPos]; 465 if (vp) for (var targetLocator = vp.locator, tll = targetLocator.length, ps = originalPos; ps < newPos; ps++) if (getMaskSet().validPositions[ps] === undefined && !isMask(ps, !0)) { 466 var tests = getTests(ps).slice(), bestMatch = determineTestTemplate(tests, !0), equality = -1; 467 "" === tests[tests.length - 1].match.def && tests.pop(), $.each(tests, function(ndx, tst) { 468 for (var i = 0; i < tll; i++) { 469 if (tst.locator[i] === undefined || !checkAlternationMatch(tst.locator[i].toString().split(","), targetLocator[i].toString().split(","), tst.na)) { 470 var targetAI = targetLocator[i], bestMatchAI = bestMatch.locator[i], tstAI = tst.locator[i]; 471 targetAI - bestMatchAI > Math.abs(targetAI - tstAI) && (bestMatch = tst); 472 break; 473 } 474 equality < i && (equality = i, bestMatch = tst); 475 } 476 }), (bestMatch = $.extend({}, bestMatch, { 477 input: getPlaceholder(ps, bestMatch.match, !0) || bestMatch.match.def 478 })).generatedInput = !0, setValidPosition(ps, bestMatch, !0), getMaskSet().validPositions[newPos] = undefined, 479 _isValid(newPos, vp.input, !0); 480 } 481 }(maskPos, result.pos !== undefined ? result.pos : nPos), maskPos = nPos; 482 break; 483 } 484 } else result = { 485 caret: seekNext(maskPos) 486 }; 487 } 488 !1 === result && opts.keepStatic && !strict && !0 !== fromAlternate && (result = function(pos, c, strict) { 489 var lastAlt, alternation, altPos, prevAltPos, i, validPos, altNdxs, decisionPos, validPsClone = $.extend(!0, {}, getMaskSet().validPositions), isValidRslt = !1, lAltPos = getLastValidPosition(); 490 for (prevAltPos = getMaskSet().validPositions[lAltPos]; lAltPos >= 0; lAltPos--) if ((altPos = getMaskSet().validPositions[lAltPos]) && altPos.alternation !== undefined) { 491 if (lastAlt = lAltPos, alternation = getMaskSet().validPositions[lastAlt].alternation, 492 prevAltPos.locator[altPos.alternation] !== altPos.locator[altPos.alternation]) break; 493 prevAltPos = altPos; 494 } 495 if (alternation !== undefined) { 496 decisionPos = parseInt(lastAlt); 497 var decisionTaker = prevAltPos.locator[prevAltPos.alternation || alternation] !== undefined ? prevAltPos.locator[prevAltPos.alternation || alternation] : altNdxs[0]; 498 decisionTaker.length > 0 && (decisionTaker = decisionTaker.split(",")[0]); 499 var possibilityPos = getMaskSet().validPositions[decisionPos], prevPos = getMaskSet().validPositions[decisionPos - 1]; 500 $.each(getTests(decisionPos, prevPos ? prevPos.locator : undefined, decisionPos - 1), function(ndx, test) { 501 altNdxs = test.locator[alternation] ? test.locator[alternation].toString().split(",") : []; 502 for (var mndx = 0; mndx < altNdxs.length; mndx++) {
503 var validInputs = [], staticInputsBeforePos = 0, staticInputsBeforePosAlternate = 0, verifyValidInput = !1; 504 if (decisionTaker < altNdxs[mndx] && (test.na === undefined || -1 === $.inArray(altNdxs[mndx], test.na.split(",")) || -1 === $.inArray(decisionTaker.toString(), altNdxs))) { 505 getMaskSet().validPositions[decisionPos] = $.extend(!0, {}, test); 506 var possibilities = getMaskSet().validPositions[decisionPos].locator; 507 for (getMaskSet().validPositions[decisionPos].locator[alternation] = parseInt(altNdxs[mndx]), 508 null == test.match.fn ? (possibilityPos.input !== test.match.def && (verifyValidInput = !0, 509 !0 !== possibilityPos.generatedInput && validInputs.push(possibilityPos.input)), 510 staticInputsBeforePosAlternate++, getMaskSet().validPositions[decisionPos].generatedInput = !/[0-9a-bA-Z]/.test(test.match.def), 511 getMaskSet().validPositions[decisionPos].input = test.match.def) : getMaskSet().validPositions[decisionPos].input = possibilityPos.input, 512 i = decisionPos + 1; i < getLastValidPosition(undefined, !0) + 1; i++) (validPos = getMaskSet().validPositions[i]) && !0 !== validPos.generatedInput && /[0-9a-bA-Z]/.test(validPos.input) ? validInputs.push(validPos.input) : i < pos && staticInputsBeforePos++, 513 delete getMaskSet().validPositions[i]; 514 for (verifyValidInput && validInputs[0] === test.match.def && validInputs.shift(), 515 resetMaskSet(!0), isValidRslt = !0; validInputs.length > 0; ) { 516 var input = validInputs.shift(); 517 if (input !== opts.skipOptionalPartCharacter && !(isValidRslt = isValid(getLastValidPosition(undefined, !0) + 1, input, !1, fromSetValid, !0))) break; 518 } 519 if (isValidRslt) { 520 getMaskSet().validPositions[decisionPos].locator = possibilities; 521 var targetLvp = getLastValidPosition(pos) + 1; 522 for (i = decisionPos + 1; i < getLastValidPosition() + 1; i++) ((validPos = getMaskSet().validPositions[i]) === undefined || null == validPos.match.fn) && i < pos + (staticInputsBeforePosAlternate - staticInputsBeforePos) && staticInputsBeforePosAlternate++; 523 isValidRslt = isValid((pos += staticInputsBeforePosAlternate - staticInputsBeforePos) > targetLvp ? targetLvp : pos, c, strict, fromSetValid, !0); 524 } 525 if (isValidRslt) return !1; 526 resetMaskSet(), getMaskSet().validPositions = $.extend(!0, {}, validPsClone); 527 } 528 } 529 }); 530 } 531 return isValidRslt; 532 }(maskPos, c, strict)), !0 === result && (result = { 533 pos: maskPos 534 }); 535 } 536 if ($.isFunction(opts.postValidation) && !1 !== result && !strict && !0 !== fromSetValid && !0 !== validateOnly) { 537 var postResult = opts.postValidation(getBuffer(!0), result, opts); 538 if (postResult.refreshFromBuffer && postResult.buffer) { 539 var refresh = postResult.refreshFromBuffer; 540 refreshFromBuffer(!0 === refresh ? refresh : refresh.start, refresh.end, postResult.buffer); 541 } 542 result = !0 === postResult ? result : postResult; 543 } 544 return result && result.pos === undefined && (result.pos = maskPos), !1 !== result && !0 !== validateOnly || (resetMaskSet(!0), 545 getMaskSet().validPositions = $.extend(!0, {}, positionsClone)), result; 546 } 547 function isMask(pos, strict) { 548 var test = getTestTemplate(pos).match; 549 if ("" === test.def && (test = getTest(pos).match), null != test.fn) return test.fn; 550 if (!0 !== strict && pos > -1) { 551 var tests = getTests(pos); 552 return tests.length > 1 + ("" === tests[tests.length - 1].match.def ? 1 : 0); 553 } 554 return !1; 555 } 556 function seekNext(pos, newBlock) { 557 var maskL = getMaskSet().maskLength; 558 if (pos >= maskL) return maskL; 559 var position = pos; 560 for (getTests(maskL + 1).length > 1 && (getMaskTemplate(!0, maskL + 1, !0), maskL = getMaskSet().maskLength); ++position < maskL && (!0 === newBlock && (!0 !== getTest(position).match.newBlockMarker || !isMask(position)) || !0 !== newBlock && !isMask(position)); ) ; 561 return position; 562 } 563 function seekPrevious(pos, newBlock) { 564 var tests, position = pos; 565 if (position <= 0) return 0; 566 for (;
566--position > 0 && (!0 === newBlock && !0 !== getTest(position).match.newBlockMarker || !0 !== newBlock && !isMask(position) && ((tests = getTests(position)).length < 2 || 2 === tests.length && "" === tests[1].match.def)); ) ; 567 return position; 568 } 569 function getBufferElement(position) { 570 return getMaskSet().validPositions[position] === undefined ? getPlaceholder(position) : getMaskSet().validPositions[position].input; 571 } 572 function writeBuffer(input, buffer, caretPos, event, triggerInputEvent) { 573 if (event && $.isFunction(opts.onBeforeWrite)) { 574 var result = opts.onBeforeWrite.call(inputmask, event, buffer, caretPos, opts); 575 if (result) { 576 if (result.refreshFromBuffer) { 577 var refresh = result.refreshFromBuffer; 578 refreshFromBuffer(!0 === refresh ? refresh : refresh.start, refresh.end, result.buffer || buffer), 579 buffer = getBuffer(!0); 580 } 581 caretPos !== undefined && (caretPos = result.caret !== undefined ? result.caret : caretPos); 582 } 583 } 584 input !== undefined && (input.inputmask._valueSet(buffer.join("")), caretPos === undefined || event !== undefined && "blur" === event.type ? renderColorMask(input, caretPos, 0 === buffer.length) : android && event && "input" === event.type ? setTimeout(function() { 585 caret(input, caretPos); 586 }, 0) : caret(input, caretPos), !0 === triggerInputEvent && (skipInputEvent = !0, 587 $(input).trigger("input"))); 588 } 589 function getPlaceholder(pos, test, returnPL) { 590 if ((test = test || getTest(pos).match).placeholder !== undefined || !0 === returnPL) return $.isFunction(test.placeholder) ? test.placeholder(opts) : test.placeholder; 591 if (null === test.fn) { 592 if (pos > -1 && getMaskSet().validPositions[pos] === undefined) { 593 var prevTest, tests = getTests(pos), staticAlternations = []; 594 if (tests.length > 1 + ("" === tests[tests.length - 1].match.def ? 1 : 0)) for (var i = 0; i < tests.length; i++) if (!0 !== tests[i].match.optionality && !0 !== tests[i].match.optionalQuantifier && (null === tests[i].match.fn || prevTest === undefined || !1 !== tests[i].match.fn.test(prevTest.match.def, getMaskSet(), pos, !0, opts)) && (staticAlternations.push(tests[i]), 595 null === tests[i].match.fn && (prevTest = tests[i]), staticAlternations.length > 1 && /[0-9a-bA-Z]/.test(staticAlternations[0].match.def))) return opts.placeholder.charAt(pos % opts.placeholder.length); 596 } 597 return test.def; 598 } 599 return opts.placeholder.charAt(pos % opts.placeholder.length); 600 } 601 function checkVal(input, writeOut, strict, nptvl, initiatingEvent) { 602 function isTemplateMatch(ndx, charCodes) { 603 return -1 !== getBufferTemplate().slice(ndx, seekNext(ndx)).join("").indexOf(charCodes) && !isMask(ndx) && getTest(ndx).match.nativeDef === charCodes.charAt(charCodes.length - 1); 604 } 605 var inputValue = nptvl.slice(), charCodes = "", initialNdx = -1, result = undefined; 606 if (resetMaskSet(), strict || !0 === opts.autoUnmask) initialNdx = seekNext(initialNdx); else { 607 var staticInput = getBufferTemplate().slice(0, seekNext(-1)).join(""), matches = inputValue.join("").match(new RegExp("^" + Inputmask.escapeRegex(staticInput), "g")); 608 matches && matches.length > 0 && (inputValue.splice(0, matches.length * staticInput.length), 609 initialNdx = seekNext(initialNdx)); 610 } 611 if (-1 === initialNdx ? (getMaskSet().p = seekNext(initialNdx), initialNdx = 0) : getMaskSet().p = initialNdx,
612 $.each(inputValue, function(ndx, charCode) { 613 if (charCode !== undefined) if (getMaskSet().validPositions[ndx] === undefined && inputValue[ndx] === getPlaceholder(ndx) && isMask(ndx, !0) && !1 === isValid(ndx, inputValue[ndx], !0, undefined, undefined, !0)) getMaskSet().p++; else { 614 var keypress = new $.Event("_checkval"); 615 keypress.which = charCode.charCodeAt(0), charCodes += charCode; 616 var lvp = getLastValidPosition(undefined, !0), lvTest = getMaskSet().validPositions[lvp], nextTest = getTestTemplate(lvp + 1, lvTest ? lvTest.locator.slice() : undefined, lvp); 617 if (!isTemplateMatch(initialNdx, charCodes) || strict || opts.autoUnmask) { 618 var pos = strict ? ndx : null == nextTest.match.fn && nextTest.match.optionality && lvp + 1 < getMaskSet().p ? lvp + 1 : getMaskSet().p; 619 result = EventHandlers.keypressEvent.call(input, keypress, !0, !1, strict, pos), 620 initialNdx = pos + 1, charCodes = ""; 621 } else result = EventHandlers.keypressEvent.call(input, keypress, !0, !1, !0, lvp + 1); 622 if (!1 !== result && !strict && $.isFunction(opts.onBeforeWrite)) { 623 var origResult = result; 624 if (result = opts.onBeforeWrite.call(inputmask, keypress, getBuffer(), result.forwardPosition, opts), 625 (result = $.extend(origResult, result)) && result.refreshFromBuffer) { 626 var refresh = result.refreshFromBuffer; 627 refreshFromBuffer(!0 === refresh ? refresh : refresh.start, refresh.end, result.buffer), 628 resetMaskSet(!0), result.caret && (getMaskSet().p = result.caret, result.forwardPosition = result.caret); 629 } 630 } 631 } 632 }), writeOut) { 633 var caretPos = undefined; 634 document.activeElement === input && result && (caretPos = opts.numericInput ? seekPrevious(result.forwardPosition) : result.forwardPosition), 635 writeBuffer(input, getBuffer(), caretPos, initiatingEvent || new $.Event("checkval"), initiatingEvent && "input" === initiatingEvent.type); 636 } 637 } 638 function unmaskedvalue(input) { 639 if (input) { 640 if (input.inputmask === undefined) return input.value; 641 input.inputmask && input.inputmask.refreshValue && EventHandlers.setValueEvent.call(input); 642 } 643 var umValue = [], vps = getMaskSet().validPositions; 644 for (var pndx in vps) vps[pndx].match && null != vps[pndx].match.fn && umValue.push(vps[pndx].input); 645 var unmaskedValue = 0 === umValue.length ? "" : (isRTL ? umValue.reverse() : umValue).join(""); 646 if ($.isFunction(opts.onUnMask)) { 647 var bufferValue = (isRTL ? getBuffer().slice().reverse() : getBuffer()).join(""); 648 unmaskedValue = opts.onUnMask.call(inputmask, bufferValue, unmaskedValue, opts); 649 } 650 return unmaskedValue; 651 } 652 function caret(input, begin, end, notranslate) { 653 function translatePosition(pos) { 654 return !0 === notranslate || !isRTL || "number" != typeof pos || opts.greedy && "" === opts.placeholder || (pos = getBuffer().join("").length - pos), 655 pos; 656 } 657 var range; 658 if (begin === undefined) return input.setSelectionRange ? (begin = input.selectionStart, 659 end = input.selectionEnd) : window.getSelection ? (range = window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode !== input && range.commonAncestorContainer !== input || (begin = range.startOffset, 660 end = range.endOffset) : document.selection && document.selection.createRange && (end = (begin = 0 - (range = document.selection.createRange()).duplicate().moveStart("character", -input.inputmask._valueGet().length)) + range.text.length), 661 { 662 begin: translatePosition(begin),
663 end: translatePosition(end) 664 }; 665 if (begin.begin !== undefined && (end = begin.end, begin = begin.begin), "number" == typeof begin) { 666 begin = translatePosition(begin), end = "number" == typeof (end = translatePosition(end)) ? end : begin; 667 var scrollCalc = parseInt(((input.ownerDocument.defaultView || window).getComputedStyle ? (input.ownerDocument.defaultView || window).getComputedStyle(input, null) : input.currentStyle).fontSize) * end; 668 if (input.scrollLeft = scrollCalc > input.scrollWidth ? scrollCalc : 0, mobile || !1 !== opts.insertMode || begin !== end || end++, 669 input.setSelectionRange) input.selectionStart = begin, input.selectionEnd = end; else if (window.getSelection) { 670 if (range = document.createRange(), input.firstChild === undefined || null === input.firstChild) { 671 var textNode = document.createTextNode(""); 672 input.appendChild(textNode); 673 } 674 range.setStart(input.firstChild, begin < input.inputmask._valueGet().length ? begin : input.inputmask._valueGet().length), 675 range.setEnd(input.firstChild, end < input.inputmask._valueGet().length ? end : input.inputmask._valueGet().length), 676 range.collapse(!0); 677 var sel = window.getSelection(); 678 sel.removeAllRanges(), sel.addRange(range); 679 } else input.createTextRange && ((range = input.createTextRange()).collapse(!0), 680 range.moveEnd("character", end), range.moveStart("character", begin), range.select()); 681 renderColorMask(input, { 682 begin: begin, 683 end: end 684 }); 685 } 686 } 687 function determineLastRequiredPosition(returnDefinition) { 688 var pos, testPos, buffer = getBuffer(), bl = buffer.length, lvp = getLastValidPosition(), positions = {}, lvTest = getMaskSet().validPositions[lvp], ndxIntlzr = lvTest !== undefined ? lvTest.locator.slice() : undefined; 689 for (pos = lvp + 1; pos < buffer.length; pos++) ndxIntlzr = (testPos = getTestTemplate(pos, ndxIntlzr, pos - 1)).locator.slice(), 690 positions[pos] = $.extend(!0, {}, testPos); 691 var lvTestAlt = lvTest && lvTest.alternation !== undefined ? lvTest.locator[lvTest.alternation] : undefined; 692 for (pos = bl - 1; pos > lvp && (((testPos = positions[pos]).match.optionality || testPos.match.optionalQuantifier && testPos.match.newBlockMarker || lvTestAlt && (lvTestAlt !== positions[pos].locator[lvTest.alternation] && null != testPos.match.fn || null === testPos.match.fn && testPos.locator[lvTest.alternation] && checkAlternationMatch(testPos.locator[lvTest.alternation].toString().split(","), lvTestAlt.toString().split(",")) && "" !== getTests(pos)[0].def)) && buffer[pos] === getPlaceholder(pos, testPos.match)); pos--) bl--; 693 return returnDefinition ? { 694 l: bl, 695 def: positions[bl] ? positions[bl].match : undefined 696 } : bl; 697 } 698 function clearOptionalTail(buffer) { 699 for (var validPos, rl = determineLastRequiredPosition(), bl = buffer.length, lv = getMaskSet().validPositions[getLastValidPosition()]; rl < bl && !isMask(rl, !0) && (validPos = lv !== undefined ? getTestTemplate(rl, lv.locator.slice(""), lv) : getTest(rl)) && !0 !== validPos.match.optionality && (!0 !== validPos.match.optionalQuantifier && !0 !== validPos.match.newBlockMarker || rl + 1 === bl && "" === (lv !== undefined ? getTestTemplate(rl + 1, lv.locator.slice(""), lv) : getTest(rl + 1)).match.def); ) rl++; 700 for (;(validPos = getMaskSet().validPositions[rl - 1]) && validPos && validPos.match.optionality && validPos.input === opts.skipOptionalPartCharacter; ) rl--; 701 return buffer.splice(rl), buffer; 702 } 703 function isComplete(buffer) { 704 if ($.isFunction(opts.isComplete)) return opts.isComplete(buffer, opts); 705 if ("*" === opts.repeat) return undefined; 706 var complete = !1, lrp = determineLastRequiredPosition(!0), aml = seekPrevious(lrp.l); 707 if (lrp.def === undefined || lrp.def.newBlockMarker || lrp.def.optionality || lrp.def.optionalQuantifier) { 708 complete = !0; 709 for (var i = 0; i <= aml; i++) { 710 var test = getTestTemplate(i).match; 711 if (null !== test.fn && getMaskSet().validPositions[i] === undefined && !0 !== test.optionality && !0 !== test.optionalQuantifier || null === test.fn && buffer[i] !== getPlaceholder(i, test)) { 712 complete = !1; 713 break; 714 } 715 } 716 } 717 return complete; 718 } 719 function handleRemove(input, k, pos, strict, fromIsValid) { 720 if ((opts.numericInput || isRTL) && (k === Inputmask.keyCode.BACKSPACE ? k = Inputmask.keyCode.DELETE : k === Inputmask.keyCode.DELETE && (k = Inputmask.keyCode.BACKSPACE), 721 isRTL)) { 722 var pend = pos.end; 723 pos.end = pos.begin, pos.begin = pend; 724 } 725 k === Inputmask.keyCode.BACKSPACE && (pos.end - pos.begin < 1 || !1 === opts.insertMode) ? (pos.begin = seekPrevious(pos.begin), 726 getMaskSet().validPositions[pos.begin] !== undefined && getMaskSet().validPositions[pos.begin].input === opts.groupSeparator && pos.begin--) : k === Inputmask.keyCode.DELETE && pos.begin === pos.end && (pos.end = isMask(pos.end, !0) && getMaskSet().validPositions[pos.end] && getMaskSet().validPositions[pos.end].input !== opts.radixPoint ? pos.end + 1 : seekNext(pos.end) + 1, 727 getMaskSet().validPositions[pos.begin] !== undefined && getMaskSet().validPositions[pos.begin].input === opts.groupSeparator && pos.end++),
728 stripValidPositions(pos.begin, pos.end, !1, strict), !0 !== strict && function() { 729 if (opts.keepStatic) { 730 for (var validInputs = [], lastAlt = getLastValidPosition(-1, !0), positionsClone = $.extend(!0, {}, getMaskSet().validPositions), prevAltPos = getMaskSet().validPositions[lastAlt]; lastAlt >= 0; lastAlt--) { 731 var altPos = getMaskSet().validPositions[lastAlt]; 732 if (altPos) { 733 if (!0 !== altPos.generatedInput && /[0-9a-bA-Z]/.test(altPos.input) && validInputs.push(altPos.input), 734 delete getMaskSet().validPositions[lastAlt], altPos.alternation !== undefined && altPos.locator[altPos.alternation] !== prevAltPos.locator[altPos.alternation]) break; 735 prevAltPos = altPos; 736 } 737 } 738 if (lastAlt > -1) for (getMaskSet().p = seekNext(getLastValidPosition(-1, !0)); validInputs.length > 0; ) { 739 var keypress = new $.Event("keypress"); 740 keypress.which = validInputs.pop().charCodeAt(0), EventHandlers.keypressEvent.call(input, keypress, !0, !1, !1, getMaskSet().p); 741 } else getMaskSet().validPositions = $.extend(!0, {}, positionsClone); 742 } 743 }(); 744 var lvp = getLastValidPosition(pos.begin, !0); 745 if (lvp < pos.begin) getMaskSet().p = seekNext(lvp); else if (!0 !== strict && (getMaskSet().p = pos.begin, 746 !0 !== fromIsValid)) for (;getMaskSet().p < lvp && getMaskSet().validPositions[getMaskSet().p] === undefined; ) getMaskSet().p++; 747 } 748 function initializeColorMask(input) { 749 function findCaretPos(clientx) { 750 var caretPos, e = document.createElement("span"); 751 for (var style in computedStyle) isNaN(style) && -1 !== style.indexOf("font") && (e.style[style] = computedStyle[style]); 752 e.style.textTransform = computedStyle.textTransform, e.style.letterSpacing = computedStyle.letterSpacing, 753 e.style.position = "absolute", e.style.height = "auto", e.style.width = "auto", 754 e.style.visibility = "hidden", e.style.whiteSpace = "nowrap", document.body.appendChild(e); 755 var itl, inputText = input.inputmask._valueGet(), previousWidth = 0; 756 for (caretPos = 0, itl = inputText.length; caretPos <= itl; caretPos++) { 757 if (e.innerHTML += inputText.charAt(caretPos) || "_", e.offsetWidth >= clientx) { 758 var offset1 = clientx - previousWidth, offset2 = e.offsetWidth - clientx; 759 e.innerHTML = inputText.charAt(caretPos), caretPos = (offset1 -= e.offsetWidth / 3) < offset2 ? caretPos - 1 : caretPos; 760 break; 761 } 762 previousWidth = e.offsetWidth; 763 } 764 return document.body.removeChild(e), caretPos; 765 } 766 var computedStyle = (input.ownerDocument.defaultView || window).getComputedStyle(input, null), template = document.createElement("div"); 767 template.style.width = computedStyle.width, template.style.textAlign = computedStyle.textAlign, 768 (colorMask = document.createElement("div")).className = "im-colormask", input.parentNode.insertBefore(colorMask, input), 769 input.parentNode.removeChild(input), colorMask.appendChild(template), colorMask.appendChild(input), 770 input.style.left = template.offsetLeft + "px", $(input).on("click", function(e) { 771 return caret(input, findCaretPos(e.clientX)), EventHandlers.clickEvent.call(input, [ e ]); 772 }), $(input).on("keydown", function(e) { 773 e.shiftKey || !1 === opts.insertMode || setTimeout(function() { 774 renderColorMask(input); 775 }, 0); 776 }); 777 } 778 function renderColorMask(input, caretPos, clear) { 779 function handleStatic() { 780 isStatic || null !== test.fn && testPos.input !== undefined ? isStatic && (null !== test.fn && testPos.input !== undefined || "" === test.def) && (isStatic = !1, 781 maskTemplate += "</span>") : (isStatic = !0, maskTemplate += "<span class='im-static'>"); 782 } 783 function handleCaret(force) { 784 !0 !== force && pos !== caretPos.begin || document.activeElement !== input || (maskTemplate += "<span class='im-caret' style='border-right-width: 1px;border-right-style: solid;'></span>"); 785 } 786 var test, testPos, ndxIntlzr, maskTemplate = "", isStatic = !1, pos = 0; 787 if (colorMask !== undefined) { 788 var buffer = getBuffer(); 789 if (caretPos === undefined ? caretPos = caret(input) : caretPos.begin === undefined && (caretPos = { 790 begin: caretPos, 791 end: caretPos 792 }), !0 !== clear) { 793 var lvp = getLastValidPosition(); 794 do { 795 handleCaret(), getMaskSet().validPositions[pos] ? (testPos = getMaskSet().validPositions[pos], 796 test = testPos.match, ndxIntlzr = testPos.locator.slice(), handleStatic(), maskTemplate += buffer[pos]) : (testPos = getTestTemplate(pos, ndxIntlzr, pos - 1), 797 test = testPos.match, ndxIntlzr = testPos.locator.slice(), (!1 === opts.jitMasking || pos < lvp || "number" == typeof opts.jitMasking && isFinite(opts.jitMasking) && opts.jitMasking > pos) && (handleStatic(), 798 maskTemplate += getPlaceholder(pos, test))), pos++; 799 } while ((maxLength === undefined || pos < maxLength) && (null !== test.fn || "" !== test.def) || lvp > pos || isStatic); 800 -1 === maskTemplate.indexOf("im-caret") && handleCaret(!0), isStatic && handleStatic(); 801 } 802 var template = colorMask.getElementsByTagName("div")[0]; 803 template.innerHTML = maskTemplate, input.inputmask.positionColorMask(input, template); 804 } 805 } 806 maskset = maskset || this.maskset, opts = opts || this.opts;
vendor: 6,566 bytes, lines 807-885
807 var undoValue, $el, maxLength, colorMask, inputmask = this, el = this.el, isRTL = this.isRTL, skipKeyPressEvent = !1, skipInputEvent = !1, ignorable = !1, mouseEnter = !1, EventRuler = { 808 on: function(input, eventName, eventHandler) { 809 var ev = function(e) { 810 if (this.inputmask === undefined && "FORM" !== this.nodeName) { 811 var imOpts = $.data(this, "_inputmask_opts"); 812 imOpts ? new Inputmask(imOpts).mask(this) : EventRuler.off(this); 813 } else { 814 if ("setvalue" === e.type || "FORM" === this.nodeName || !(this.disabled || this.readOnly && !("keydown" === e.type && e.ctrlKey && 67 === e.keyCode || !1 === opts.tabThrough && e.keyCode === Inputmask.keyCode.TAB))) { 815 switch (e.type) { 816 case "input": 817 if (!0 === skipInputEvent) return skipInputEvent = !1, e.preventDefault(); 818 break; 819 820 case "keydown": 821 skipKeyPressEvent = !1, skipInputEvent = !1; 822 break; 823 824 case "keypress": 825 if (!0 === skipKeyPressEvent) return e.preventDefault(); 826 skipKeyPressEvent = !0; 827 break; 828 829 case "click": 830 if (iemobile || iphone) { 831 var that = this, args = arguments; 832 return setTimeout(function() { 833 eventHandler.apply(that, args); 834 }, 0), !1; 835 } 836 } 837 var returnVal = eventHandler.apply(this, arguments); 838 return !1 === returnVal && (e.preventDefault(), e.stopPropagation()), returnVal; 839 } 840 e.preventDefault(); 841 } 842 }; 843 input.inputmask.events[eventName] = input.inputmask.events[eventName] || [], input.inputmask.events[eventName].push(ev), 844 -1 !== $.inArray(eventName, [ "submit", "reset" ]) ? null !== input.form && $(input.form).on(eventName, ev) : $(input).on(eventName, ev); 845 }, 846 off: function(input, event) { 847 if (input.inputmask && input.inputmask.events) { 848 var events; 849 event ? (events = [])[event] = input.inputmask.events[event] : events = input.inputmask.events, 850 $.each(events, function(eventName, evArr) { 851 for (;evArr.length > 0; ) { 852 var ev = evArr.pop(); 853 -1 !== $.inArray(eventName, [ "submit", "reset" ]) ? null !== input.form && $(input.form).off(eventName, ev) : $(input).off(eventName, ev); 854 } 855 delete input.inputmask.events[eventName]; 856 }); 857 } 858 } 859 }, EventHandlers = { 860 keydownEvent: function(e) { 861 var input = this, $input = $(input), k = e.keyCode, pos = caret(input); 862 if (k === Inputmask.keyCode.BACKSPACE || k === Inputmask.keyCode.DELETE || iphone && k === Inputmask.keyCode.BACKSPACE_SAFARI || e.ctrlKey && k === Inputmask.keyCode.X && !function(eventName) { 863 var el = document.createElement("input"), evName = "on" + eventName, isSupported = evName in el; 864 return isSupported || (el.setAttribute(evName, "return;"), isSupported = "function" == typeof el[evName]), 865 el = null, isSupported; 866 }("cut")) e.preventDefault(), handleRemove(input, k, pos), writeBuffer(input, getBuffer(!0), getMaskSet().p, e, input.inputmask._valueGet() !== getBuffer().join("")), 867 input.inputmask._valueGet() === getBufferTemplate().join("") ? $input.trigger("cleared") : !0 === isComplete(getBuffer()) && $input.trigger("complete"); else if (k === Inputmask.keyCode.END || k === Inputmask.keyCode.PAGE_DOWN) { 868 e.preventDefault(); 869 var caretPos = seekNext(getLastValidPosition()); 870 opts.insertMode || caretPos !== getMaskSet().maskLength || e.shiftKey || caretPos--, 871 caret(input, e.shiftKey ? pos.begin : caretPos, caretPos, !0); 872 } else k === Inputmask.keyCode.HOME && !e.shiftKey || k === Inputmask.keyCode.PAGE_UP ? (e.preventDefault(), 873 caret(input, 0, e.shiftKey ? pos.begin : 0, !0)) : (opts.undoOnEscape && k === Inputmask.keyCode.ESCAPE || 90 === k && e.ctrlKey) && !0 !== e.altKey ? (checkVal(input, !0, !1, undoValue.split("")), 874 $input.trigger("click")) : k !== Inputmask.keyCode.INSERT || e.shiftKey || e.ctrlKey ? !0 === opts.tabThrough && k === Inputmask.keyCode.TAB ? (!0 === e.shiftKey ? (null === getTest(pos.begin).match.fn && (pos.begin = seekNext(pos.begin)), 875 pos.end = seekPrevious(pos.begin, !0), pos.begin = seekPrevious(pos.end, !0)) : (pos.begin = seekNext(pos.begin, !0), 876 pos.end = seekNext(pos.begin, !0), pos.end < getMaskSet().maskLength && pos.end--), 877 pos.begin < getMaskSet().maskLength && (e.preventDefault(), caret(input, pos.begin, pos.end))) : e.shiftKey || !1 === opts.insertMode && (k === Inputmask.keyCode.RIGHT ? setTimeout(function() { 878 var caretPos = caret(input); 879 caret(input, caretPos.begin); 880 }, 0) : k === Inputmask.keyCode.LEFT && setTimeout(function() { 881 var caretPos = caret(input); 882 caret(input, isRTL ? caretPos.begin + 1 : caretPos.begin - 1); 883 }, 0)) : (opts.insertMode = !opts.insertMode, caret(input, opts.insertMode || pos.begin !== getMaskSet().maskLength ? pos.begin : pos.begin - 1)); 884 opts.onKeyDown.call(this, e, getBuffer(), caret(input).begin, opts), ignorable = -1 !== $.inArray(k, opts.ignorables); 885 },
886 keypressEvent: function(e, checkval, writeOut, strict, ndx) { 887 var input = this, $input = $(input), k = e.which || e.charCode || e.keyCode; 888 if (!(!0 === checkval || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || ignorable)) return k === Inputmask.keyCode.ENTER && undoValue !== getBuffer().join("") && (undoValue = getBuffer().join(""), 889 setTimeout(function() { 890 $input.trigger("change"); 891 }, 0)), !0; 892 if (k) { 893 46 === k && !1 === e.shiftKey && "" !== opts.radixPoint && (k = opts.radixPoint.charCodeAt(0)); 894 var forwardPosition, pos = checkval ? { 895 begin: ndx, 896 end: ndx 897 } : caret(input), c = String.fromCharCode(k); 898 getMaskSet().writeOutBuffer = !0; 899 var valResult = isValid(pos, c, strict); 900 if (!1 !== valResult && (resetMaskSet(!0), forwardPosition = valResult.caret !== undefined ? valResult.caret : checkval ? valResult.pos + 1 : seekNext(valResult.pos), 901 getMaskSet().p = forwardPosition), !1 !== writeOut && (setTimeout(function() { 902 opts.onKeyValidation.call(input, k, valResult, opts); 903 }, 0), getMaskSet().writeOutBuffer && !1 !== valResult)) { 904 var buffer = getBuffer(); 905 writeBuffer(input, buffer, opts.numericInput && valResult.caret === undefined ? seekPrevious(forwardPosition) : forwardPosition, e, !0 !== checkval), 906 !0 !== checkval && setTimeout(function() { 907 !0 === isComplete(buffer) && $input.trigger("complete"); 908 }, 0); 909 } 910 if (e.preventDefault(), checkval) return !1 !== valResult && (valResult.forwardPosition = forwardPosition), 911 valResult; 912 } 913 }, 914 pasteEvent: function(e) { 915 var tempValue, input = this, ev = e.originalEvent || e, $input = $(input), inputValue = input.inputmask._valueGet(!0), caretPos = caret(input); 916 isRTL && (tempValue = caretPos.end, caretPos.end = caretPos.begin, caretPos.begin = tempValue); 917 var valueBeforeCaret = inputValue.substr(0, caretPos.begin), valueAfterCaret = inputValue.substr(caretPos.end, inputValue.length); 918 if (valueBeforeCaret === (isRTL ? getBufferTemplate().reverse() : getBufferTemplate()).slice(0, caretPos.begin).join("") && (valueBeforeCaret = ""), 919 valueAfterCaret === (isRTL ? getBufferTemplate().reverse() : getBufferTemplate()).slice(caretPos.end).join("") && (valueAfterCaret = ""), 920 isRTL && (tempValue = valueBeforeCaret, valueBeforeCaret = valueAfterCaret, valueAfterCaret = tempValue), 921 window.clipboardData && window.clipboardData.getData) inputValue = valueBeforeCaret + window.clipboardData.getData("Text") + valueAfterCaret; else { 922 if (!ev.clipboardData || !ev.clipboardData.getData) return !0; 923 inputValue = valueBeforeCaret + ev.clipboardData.getData("text/plain") + valueAfterCaret; 924 } 925 var pasteValue = inputValue; 926 if ($.isFunction(opts.onBeforePaste)) { 927 if (!1 === (pasteValue = opts.onBeforePaste.call(inputmask, inputValue, opts))) return e.preventDefault(); 928 pasteValue || (pasteValue = inputValue); 929 } 930 return checkVal(input, !1, !1, isRTL ? pasteValue.split("").reverse() : pasteValue.toString().split("")), 931 writeBuffer(input, getBuffer(), seekNext(getLastValidPosition()), e, undoValue !== getBuffer().join("")), 932 !0 === isComplete(getBuffer()) && $input.trigger("complete"), e.preventDefault(); 933 }, 934 inputFallBackEvent: function(e) { 935 var input = this, inputValue = input.inputmask._valueGet(); 936 if (getBuffer().join("") !== inputValue) { 937 var caretPos = caret(input); 938 if (!1 === function(input, inputValue, caretPos) { 939 if ("." === inputValue.charAt(caretPos.begin - 1) && "" !== opts.radixPoint && ((inputValue = inputValue.split(""))[caretPos.begin - 1] = opts.radixPoint.charAt(0), 940 inputValue = inputValue.join("")), inputValue.charAt(caretPos.begin - 1) === opts.radixPoint && inputValue.length > getBuffer().length) { 941 var keypress = new $.Event("keypress"); 942 return keypress.which = opts.radixPoint.charCodeAt(0), EventHandlers.keypressEvent.call(input, keypress, !0, !0, !1, caretPos.begin - 1), 943 !1; 944 } 945 }(input, inputValue, caretPos)) return !1; 946 if (inputValue = inputValue.replace(new RegExp("(" + Inputmask.escapeRegex(getBufferTemplate().join("")) + ")*"), ""), 947 !1 === function(input, inputValue, caretPos) { 948 if (iemobile) { 949 var inputChar = inputValue.replace(getBuffer().join(""), ""); 950 if (1 === inputChar.length) { 951 var keypress = new $.Event("keypress"); 952 return keypress.which = inputChar.charCodeAt(0), EventHandlers.keypressEvent.call(input, keypress, !0, !0, !1, getMaskSet().validPositions[caretPos.begin - 1] ? caretPos.begin : caretPos.begin - 1), 953 !1; 954 } 955 } 956 }(input, inputValue, caretPos)) return !1; 957 caretPos.begin > inputValue.length && (caret(input, inputValue.length), caretPos = caret(input)); 958 var buffer = getBuffer().join(""), frontPart = inputValue.substr(0, caretPos.begin), backPart = inputValue.substr(caretPos.begin), frontBufferPart = buffer.substr(0, caretPos.begin), backBufferPart = buffer.substr(caretPos.begin), selection = caretPos, entries = "", isEntry = !1; 959 if (frontPart !== frontBufferPart) { 960 selection.begin = 0; 961 for (var fpl = (isEntry = frontPart.length >= frontBufferPart.length) ? frontPart.length : frontBufferPart.length, i = 0; frontPart.charAt(i) === frontBufferPart.charAt(i) && i < fpl; i++) selection.begin++; 962 isEntry && (entries += frontPart.slice(selection.begin, selection.end)); 963 } 964 backPart !== backBufferPart && (backPart.length > backBufferPart.length ? isEntry && (selection.end = selection.begin) : backPart.length < backBufferPart.length ? selection.end += backBufferPart.length - backPart.length : backPart.charAt(0) !== backBufferPart.charAt(0) && selection.end++), 965 writeBuffer(input, getBuffer(), selection), entr
965ies.length > 0 ? $.each(entries.split(""), function(ndx, entry) { 966 var keypress = new $.Event("keypress"); 967 keypress.which = entry.charCodeAt(0), ignorable = !1, EventHandlers.keypressEvent.call(input, keypress); 968 }) : (selection.begin === selection.end - 1 && caret(input, seekPrevious(selection.begin + 1), selection.end), 969 e.keyCode = Inputmask.keyCode.DELETE, EventHandlers.keydownEvent.call(input, e)), 970 e.preventDefault(); 971 } 972 }, 973 setValueEvent: function(e) { 974 this.inputmask.refreshValue = !1; 975 var input = this, value = input.inputmask._valueGet(!0); 976 $.isFunction(opts.onBeforeMask) && (value = opts.onBeforeMask.call(inputmask, value, opts) || value), 977 value = value.split(""), checkVal(input, !0, !1, isRTL ? value.reverse() : value), 978 undoValue = getBuffer().join(""), (opts.clearMaskOnLostFocus || opts.clearIncomplete) && input.inputmask._valueGet() === getBufferTemplate().join("") && input.inputmask._valueSet(""); 979 }, 980 focusEvent: function(e) { 981 var input = this, nptValue = input.inputmask._valueGet(); 982 opts.showMaskOnFocus && (!opts.showMaskOnHover || opts.showMaskOnHover && "" === nptValue) && (input.inputmask._valueGet() !== getBuffer().join("") ? writeBuffer(input, getBuffer(), seekNext(getLastValidPosition())) : !1 === mouseEnter && caret(input, seekNext(getLastValidPosition()))), 983 !0 === opts.positionCaretOnTab && !1 === mouseEnter && "" !== nptValue && (writeBuffer(input, getBuffer(), caret(input)), 984 EventHandlers.clickEvent.apply(input, [ e, !0 ])), undoValue = getBuffer().join(""); 985 }, 986 mouseleaveEvent: function(e) { 987 var input = this; 988 if (mouseEnter = !1, opts.clearMaskOnLostFocus && document.activeElement !== input) { 989 var buffer = getBuffer().slice(), nptValue = input.inputmask._valueGet(); 990 nptValue !== input.getAttribute("placeholder") && "" !== nptValue && (-1 === getLastValidPosition() && nptValue === getBufferTemplate().join("") ? buffer = [] : clearOptionalTail(buffer), 991 writeBuffer(input, buffer)); 992 } 993 }, 994 clickEvent: function(e, tabbed) { 995 function doRadixFocus(clickPos) { 996 if ("" !== opts.radixPoint) { 997 var vps = getMaskSet().validPositions; 998 if (vps[clickPos] === undefined || vps[clickPos].input === getPlaceholder(clickPos)) { 999 if (clickPos < seekNext(-1)) return !0; 1000 var radixPos = $.inArray(opts.radixPoint, getBuffer()); 1001 if (-1 !== radixPos) { 1002 for (var vp in vps) if (radixPos < vp && vps[vp].input !== getPlaceholder(vp)) return !1; 1003 return !0; 1004 } 1005 } 1006 } 1007 return !1; 1008 } 1009 var input = this; 1010 setTimeout(function() { 1011 if (document.activeElement === input) { 1012 var selectedCaret = caret(input); 1013 if (tabbed && (isRTL ? selectedCaret.end = selectedCaret.begin : selectedCaret.begin = selectedCaret.end), 1014 selectedCaret.begin === selectedCaret.end) switch (opts.positionCaretOnClick) { 1015 case "none": 1016 break; 1017 1018 case "radixFocus": 1019 if (doRadixFocus(selectedCaret.begin)) { 1020 var radixPos = getBuffer().join("").indexOf(opts.radixPoint); 1021 caret(input, opts.numericInput ? seekNext(radixPos) : radixPos); 1022 break; 1023 } 1024 1025 default: 1026 var clickPosition = selectedCaret.begin, lvclickPosition = getLastValidPosition(clickPosition, !0), lastPosition = seekNext(lvclickPosition); 1027 if (clickPosition < lastPosition) caret(input, isMask(clickPosition, !0) || isMask(clickPosition - 1, !0) ? clickPosition : seekNext(clickPosition)); else { 1028 var lvp = getMaskSet().validPositions[lvclickPosition], tt = getTestTemplate(lastPosition, lvp ? lvp.match.locator : undefined, lvp), placeholder = getPlaceholder(lastPosition, tt.match); 1029 if ("" !== placeholder && getBuffer()[lastPosition] !== placeholder && !0 !== tt.match.optionalQuantifier && !0 !== tt.match.newBlockMarker || !isMask(lastPosition, !0) && tt.match.def === placeholder) { 1030 var newPos = seekNext(lastPosition); 1031 (clickPosition >= newPos || clickPosition === lastPosition) && (lastPosition = newPos); 1032 } 1033 caret(input, lastPosition); 1034 } 1035 } 1036 } 1037 }, 0); 1038 }, 1039 dblclickEvent: function(e) { 1040 var input = this; 1041 setTimeout(function() { 1042 caret(input, 0, seekNext(getLastValidPosition())); 1043 }, 0); 1044 }, 1045 cutEvent: function(e) { 1046 var input = this, $input = $(input), pos = caret(input), ev = e.originalEvent || e, clipboardData = window.clipboardData || ev.clipboardData, clipData = isRTL ? getBuffer().slice(pos.end, pos.begin) : getBuffer().slice(pos.begin, pos.end); 1047 clipboardData.setData("text", isRTL ? clipData.reverse().join("") : clip
1047Data.join("")), 1048 document.execCommand && document.execCommand("copy"), handleRemove(input, Inputmask.keyCode.DELETE, pos), 1049 writeBuffer(input, getBuffer(), getMaskSet().p, e, undoValue !== getBuffer().join("")), 1050 input.inputmask._valueGet() === getBufferTemplate().join("") && $input.trigger("cleared"); 1051 }, 1052 blurEvent: function(e) { 1053 var $input = $(this), input = this; 1054 if (input.inputmask) { 1055 var nptValue = input.inputmask._valueGet(), buffer = getBuffer().slice(); 1056 "" !== nptValue && (opts.clearMaskOnLostFocus && (-1 === getLastValidPosition() && nptValue === getBufferTemplate().join("") ? buffer = [] : clearOptionalTail(buffer)), 1057 !1 === isComplete(buffer) && (setTimeout(function() { 1058 $input.trigger("incomplete"); 1059 }, 0), opts.clearIncomplete && (resetMaskSet(), buffer = opts.clearMaskOnLostFocus ? [] : getBufferTemplate().slice())), 1060 writeBuffer(input, buffer, undefined, e)), undoValue !== getBuffer().join("") && (undoValue = buffer.join(""), 1061 $input.trigger("change")); 1062 } 1063 }, 1064 mouseenterEvent: function(e) { 1065 var input = this; 1066 mouseEnter = !0, document.activeElement !== input && opts.showMaskOnHover && input.inputmask._valueGet() !== getBuffer().join("") && writeBuffer(input, getBuffer()); 1067 }, 1068 submitEvent: function(e) { 1069 undoValue !== getBuffer().join("") && $el.trigger("change"), opts.clearMaskOnLostFocus && -1 === getLastValidPosition() && el.inputmask._valueGet && el.inputmask._valueGet() === getBufferTemplate().join("") && el.inputmask._valueSet(""), 1070 opts.removeMaskOnSubmit && (el.inputmask._valueSet(el.inputmask.unmaskedvalue(), !0), 1071 setTimeout(function() { 1072 writeBuffer(el, getBuffer()); 1073 }, 0)); 1074 }, 1075 resetEvent: function(e) { 1076 el.inputmask.refreshValue = !0, setTimeout(function() { 1077 $el.trigger("setvalue"); 1078 }, 0); 1079 } 1080 }; 1081 Inputmask.prototype.positionColorMask = function(input, template) { 1082 input.style.left = template.offsetLeft + "px"; 1083 }; 1084 var valueBuffer; 1085 if (actionObj !== undefined) switch (actionObj.action) { 1086 case "isComplete": 1087 return el = actionObj.el, isComplete(getBuffer()); 1088 1089 case "unmaskedvalue": 1090 return el !== undefined && actionObj.value === undefined || (valueBuffer = actionObj.value, 1091 valueBuffer = ($.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(inputmask, valueBuffer, opts) || valueBuffer : valueBuffer).split(""), 1092 checkVal(undefined, !1, !1, isRTL ? valueBuffer.reverse() : valueBuffer), $.isFunction(opts.onBeforeWrite) && opts.onBeforeWrite.call(inputmask, undefined, getBuffer(), 0, opts)), 1093 unmaskedvalue(el); 1094 1095 case "mask": 1096 !function(elem) { 1097 EventRuler.off(elem); 1098 var isSupported = function(input, opts) { 1099 var elementType = input.getAttribute("type"), isSupported = "INPUT" === input.tagName && -1 !== $.inArray(elementType, opts.supportsInputType) || input.isContentEditable || "TEXTAREA" === input.tagName; 1100 if (!isSupported) if ("INPUT" === input.tagName) { 1101 var el = document.createElement("input"); 1102 el.setAttribute("type", elementType), isSupported = "text" === el.type, el = null; 1103 } else isSupported = "partial"; 1104 return !1 !== isSupported ? function(npt) { 1105 function getter() { 1106 return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : -1 !== getLastValidPosition() || !0 !== opts.nullable ? document.activeElement === this && opts.clearMaskOnLostFocus ? (isRTL ? clearOptionalTail(getBuffer().slice()).reverse() : clearOptionalTail(getBuffer().slice())).join("") : valueGet.call(this) : "" : valueGet.call(this); 1107 } 1108 function setter(value) { 1109 valueSet.call(this, value), this.inputmask && $(this).trigger("setvalue"); 1110 } 1111 var valueGet, valueSet; 1112 if (!npt.inputmask.__valueGet) { 1113 if (!0 !== opts.noValuePatching) { 1114 if (Object.getOwnPropertyDescriptor) { 1115 "function" != typeof Object.getPrototypeOf && (Object.getPrototypeOf = "object" === _typeof("test".__proto__) ? function(object) { 1116 return object.__proto__; 1117 } : function(object) { 1118 return object.constructor.prototype; 1119 }); 1120 var valueProperty = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(npt), "value") : undefined; 1121 valueProperty && valueProperty.get && valueProperty.set ? (valueGet = valueProperty.get, 1122 valueSet = valueProperty.set, Object.defineProperty(npt, "value", { 1123 get: getter, 1124 set: setter, 1125 configurable: !0 1126 })) : "INPUT" !== npt.tagName && (valueGet = function() { 1127 return this.textContent; 1128 }, valueSet = function(value) { 1129 this.textContent = value; 1130 }, Object.defineProperty(npt, "value", { 1131 get: getter, 1132 set: setter, 1133 configurable: !0 1134 })); 1135 } else document.__lookupGetter__ && npt.__lookupGetter__("value") && (valueGet = npt.__lookupGetter__("value"), 1136 valueSet = npt.__lookupSetter__("value"), npt.__defineGetter__("value", getter), 1137 npt.__defineSetter__("value", setter)); 1138 npt.inputmask.__valueGet = valueGet, npt.inputmask.__valueSet = valueSet; 1139 } 1140 npt.inputmask._valueGet = function(overruleRTL) { 1141 return isRTL && !0 !== overruleRTL ? valueGet.call(this.el).split("").reverse().join("") : valueGet.call(this.el); 1142 }, npt.inputmask._valueSet = function(value, overruleRTL) { 1143 valueSet.call(this.el, null === value || value === undefined ? "" : !0 !== overruleRTL && isRTL ? value.split("").reverse().join("") : value); 1144 }, valueGet === undefined && (valueGet = function() { 1145 return this.value; 1146 }, valueSet = function(value) { 1147 this.value = value; 1148 }, function(type) { 1149 if ($.valHooks && ($.valHooks[type] === undefined || !0 !== $.valHooks[type].inputmaskpatch)) { 1150 var valhookGet = $.valHooks[type] && $.valHooks[type].get ? $.valHooks[type].get : function(elem) { 1151 return elem.value; 1152 }, valhookSet = $.valHooks[type] && $.valHooks[type].set ? $.valHooks[type].set : function(elem, value) { 1153 return elem.value = value, elem; 1154 }; 1155 $.valHooks[type] = { 1156 get: function(elem) { 1157 if (elem.inputmask) { 1158 if (elem.inputmask.opts.autoUnmask) return elem.inputmask.unmaskedvalue(); 1159 var result = valhookGet(elem); 1160 return -1 !== getLastValidPosition(undefined, undefined, elem.inputmask.maskset.validPositions) || !0 !== opts.nullable ? result : ""; 1161 } 1162 return valhookGet(elem); 1163 }, 1164 set: function(elem, value) { 1165 var result, $elem = $(elem); 1166 return result = valhookSet(elem, value), elem.inputmask && $elem.trigger("setvalue"), 1167 result; 1168 }, 1169 inputmaskpatch: !0 1170 }; 1171 } 1172 }(npt.type), function(npt) { 1173 EventRuler.on(npt, "mouseenter", function(event) { 1174 var $input = $(this); 1175 this.inputmask._valueGet() !== getBuffer().join("") && $input.trigger("setvalue"); 1176 }); 1177 }(npt)); 1178 } 1179 }(input) : input.inputmask = undefined, isSupported; 1180 }(elem, opts); 1181 if (!1 !== isSupported && (el = elem, $el = $(el), -1 === (maxLength = el !== undefined ? el.maxLength : undefined) && (maxLength = undefined), 1182 !0 === opts.colorMask && initializeColorMask(el), android && (el.hasOwnProperty("inputmode") && (el.inputmode = opts.inputmode, 1183 el.setAttribute("inputmode", opts.inputmode)), "rtfm" === opts.androidHack && (!0 !== opts.colorMask && initializeColorMask(el), 1184 el.type = "password")), !0 === isSupported && (EventRuler.on(el, "submit", EventHandlers.submitEvent), 1185 EventRuler.on(el, "reset", EventHandlers.resetEvent), EventRuler.on(el, "mouseenter", EventHandlers.mouseenterEvent), 1186 EventRuler.on(el, "blur", EventHandlers.blurEvent), EventRuler.on(el, "focus", EventHandlers.focusEvent), 1187 EventRuler.on(el, "mouseleave", EventHandlers.mouseleaveEvent), !0 !== opts.colorMask && EventRuler.on(el, "click", EventHandlers.clickEvent), 1188 EventRuler.on(el, "dblclick", EventHandlers.dblclickEvent), EventRuler.on(el, "paste", EventHandlers.pasteEvent), 1189 EventRuler.on(el, "dragdrop", EventHandlers.pasteEvent), EventRuler.on(el, "drop", EventHandlers.pasteEvent), 1190 EventRuler.on(el, "cut", EventHandlers.cutEvent), EventRuler.on(el, "complete", opts.oncomplete), 1191 EventRuler.on(el, "incomplete", opts.onincomplete), EventRuler.on(el, "cleared", opts.oncleared), 1192 android || !0 === opts.inputEventOnly ? el.removeAttribute("maxLength") : (EventRuler.on(el, "keydown", EventHandlers.keydownEvent), 1193 EventRuler.on(el, "keypress", EventHandlers.keypressEvent)), EventRuler.on(el, "compositionstart", $.noop), 1194 EventRuler.on(el, "compositionupdate", $.noop), EventRuler.on(el, "compositionend", $.noop), 1195 EventRuler.on(el, "keyup", $.noop), EventRuler.on(el, "input", EventHandlers.inputFallBackEvent), 1196 EventRuler.on(el, "beforeinput", $.noop)), EventRuler.on(el, "setvalue", EventHandlers.setValueEvent), 1197 undoValue = getBufferTemplate().join(""), "" !== el.inputmask._valueGet(!0) || !1 === opts.clearMaskOnLostFocus || document.activeElement === el)) { 1198 var initialValue = $.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(inputmask, el.inputmask._valueGet(!0), opts) || el.inputmask._valueGet(!0) : el.inputmask._valueGet(!0); 1199 "" !== initialValue && checkVal(el, !0, !1, isRTL ? initialValue.split("").reverse() : initialValue.split("")); 1200 var buffer = getBuffer().slice(); 1201 undoValue = buffer.join(""), !1 === isComplete(buffer) && opts.clearIncomplete && resetMaskSet(), 1202 opts.clearMaskOnLostFocus && document.activeElement !== el && (-1 === getLastValidPosition() ? buffer = [] : clearOptionalTail(buffer)), 1203 writeBuffer(el, buffer), document.activeElement === el && caret(el, seekNext(getLastValidPosition())); 1204 } 1205 }(el); 1206 break; 1207 1208 case "format": 1209 return valueBuffer = ($.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(inputmask, actionObj.value, opts) || actionObj.value : actionObj.value).split(""), 1210 checkVal(undefined, !0, !1, isRTL ? valueBuffer.reverse() : valueBuffer), actionObj.metadata ? { 1211 value: isRTL ? getBuffer().slice().reverse().join("") : getBuffer().join(""), 1212 metadata: maskScope.call(this, { 1213 action: "getmetadata" 1214 }, maskset, opts) 1215 } : isRTL ? getBuffer().slice().reverse().join("") : getBuffer().join(""); 1216 1217 case "isValid": 1218 actionObj.value ? (valueBuffer = actionObj.value.split(""), checkVal(undefined, !0, !0, isRTL ? valueBuffer.reverse() : valueBuffer)) : actionObj.value = getBuffer().join(""); 1219 for (var buffer = getBuffer(), rl = determineLastRequiredPosition(), lmib = buffer.length - 1; lmib > rl && !isMask(lmib); lmib--) ; 1220 return buffer.splice(rl, lmib + 1 - rl), isComplete(buffer) && actionObj.value === getBuffer().join(""); 1221 1222 case "getemptymask": 1223 return getBufferTemplate().join(""); 1224 1225 case "remove": 1226 if (el && el.inputmask) { 1227 $el = $(el), el.inputmask._valueSet(opts.autoUnmask ? unmaskedvalue(el) : el.inputmask._valueGet(!0)), 1228 EventRuler.off(el);
1229 Object.getOwnPropertyDescriptor && Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(el), "value") && el.inputmask.__valueGet && Object.defineProperty(el, "value", { 1230 get: el.inputmask.__valueGet, 1231 set: el.inputmask.__valueSet, 1232 configurable: !0 1233 }) : document.__lookupGetter__ && el.__lookupGetter__("value") && el.inputmask.__valueGet && (el.__defineGetter__("value", el.inputmask.__valueGet), 1234 el.__defineSetter__("value", el.inputmask.__valueSet)), el.inputmask = undefined; 1235 } 1236 return el; 1237 1238 case "getmetadata": 1239 if ($.isArray(maskset.metadata)) { 1240 var maskTarget = getMaskTemplate(!0, 0, !1).join(""); 1241 return $.each(maskset.metadata, function(ndx, mtdt) { 1242 if (mtdt.mask === maskTarget) return maskTarget = mtdt, !1; 1243 }), maskTarget; 1244 } 1245 return maskset.metadata; 1246 } 1247 } 1248 var ua = navigator.userAgent, mobile = /mobile/i.test(ua), iemobile = /iemobile/i.test(ua), iphone = /iphone/i.test(ua) && !iemobile, android = /android/i.test(ua) && !iemobile; 1249 return Inputmask.prototype = { 1250 dataAttribute: "data-inputmask", 1251 defaults: { 1252 placeholder: "_", 1253 optionalmarker: { 1254 start: "[", 1255 end: "]" 1256 }, 1257 quantifiermarker: { 1258 start: "{", 1259 end: "}" 1260 }, 1261 groupmarker: { 1262 start: "(", 1263 end: ")" 1264 }, 1265 alternatormarker: "|", 1266 escapeChar: "\\", 1267 mask: null, 1268 regex: null, 1269 oncomplete: $.noop, 1270 onincomplete: $.noop, 1271 oncleared: $.noop, 1272 repeat: 0, 1273 greedy: !0, 1274 autoUnmask: !1, 1275 removeMaskOnSubmit: !1, 1276 clearMaskOnLostFocus: !0, 1277 insertMode: !0, 1278 clearIncomplete: !1, 1279 alias: null, 1280 onKeyDown: $.noop, 1281 onBeforeMask: null, 1282 onBeforePaste: function(pastedValue, opts) { 1283 return $.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(this, pastedValue, opts) : pastedValue; 1284 }, 1285 onBeforeWrite: null, 1286 onUnMask: null, 1287 showMaskOnFocus: !0, 1288 showMaskOnHover: !0, 1289 onKeyValidation: $.noop, 1290 skipOptionalPartCharacter: " ", 1291 numericInput: !1, 1292 rightAlign: !1, 1293 undoOnEscape: !0, 1294 radixPoint: "", 1295 radixPointDefinitionSymbol: undefined, 1296 groupSeparator: "", 1297 keepStatic: null, 1298 positionCaretOnTab: !0, 1299 tabThrough: !1, 1300 supportsInputType: [ "text", "tel", "password" ], 1301 ignorables: [ 8, 9, 13, 19, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 0, 229 ], 1302 isComplete: null, 1303 canClearPosition: $.noop, 1304 preValidation: null, 1305 postValidation: null, 1306 staticDefinitionSymbol: undefined, 1307 jitMasking: !1, 1308 nullable: !0, 1309 inputEventOnly: !1, 1310 noValuePatching: !1, 1311 positionCaretOnClick: "lvp", 1312 casing: null, 1313 inputmode: "verbatim", 1314 colorMask: !1, 1315 androidHack: !1, 1316 importDataAttributes: !0 1317 }, 1318 definitions: { 1319 "9": { 1320 validator: "[0-9ï¼-ï¼]", 1321 cardinality: 1, 1322 definitionSymbol: "*" 1323 }, 1324 a: { 1325 validator: "[A-Za-zÐ-ÑÐÑÃ-ÿµ]", 1326 cardinality: 1, 1327 definitionSymbol: "*" 1328 }, 1329 "*": { 1330 validator: "[0-9ï¼-ï¼A-Za-zÐ-ÑÐÑÃ-ÿµ]", 1331 cardinality: 1 1332 } 1333 }, 1334 aliases: {}, 1335 masksCache: {}, 1336 mask: function(elems) { 1337 function importAttributeOptions(npt, opts, userOptions, dataAttribute) { 1338 if (!0 === opts.importDataAttributes) { 1339 var option, dataoptions, optionData, p, importOption = function(option, optionData) { 1340 null !== (optionData = optionData !== undefined ? optionData : npt.getAttribute(dataAttribute + "-" + option)) && ("string" == typeof optionData && (0 === option.indexOf("on") ? optionData = window[optionData] : "false" === optionData ? optionData = !1 : "true" === optionData && (
1340optionData = !0)), 1341 userOptions[option] = optionData); 1342 }, attrOptions = npt.getAttribute(dataAttribute); 1343 if (attrOptions && "" !== attrOptions && (attrOptions = attrOptions.replace(new RegExp("'", "g"), '"'), 1344 dataoptions = JSON.parse("{" + attrOptions + "}")), dataoptions) { 1345 optionData = undefined; 1346 for (p in dataoptions) if ("alias" === p.toLowerCase()) { 1347 optionData = dataoptions[p]; 1348 break; 1349 } 1350 } 1351 importOption("alias", optionData), userOptions.alias && resolveAlias(userOptions.alias, userOptions, opts); 1352 for (option in opts) { 1353 if (dataoptions) { 1354 optionData = undefined; 1355 for (p in dataoptions) if (p.toLowerCase() === option.toLowerCase()) { 1356 optionData = dataoptions[p]; 1357 break; 1358 } 1359 } 1360 importOption(option, optionData); 1361 } 1362 } 1363 return $.extend(!0, opts, userOptions), ("rtl" === npt.dir || opts.rightAlign) && (npt.style.textAlign = "right"), 1364 ("rtl" === npt.dir || opts.numericInput) && (npt.dir = "ltr", npt.removeAttribute("dir"), 1365 opts.isRTL = !0), opts; 1366 } 1367 var that = this; 1368 return "string" == typeof elems && (elems = document.getElementById(elems) || document.querySelectorAll(elems)), 1369 elems = elems.nodeName ? [ elems ] : elems, $.each(elems, function(ndx, el) { 1370 var scopedOpts = $.extend(!0, {}, that.opts); 1371 importAttributeOptions(el, scopedOpts, $.extend(!0, {}, that.userOptions), that.dataAttribute); 1372 var maskset = generateMaskSet(scopedOpts, that.noMasksCache); 1373 maskset !== undefined && (el.inputmask !== undefined && (el.inputmask.opts.autoUnmask = !0, 1374 el.inputmask.remove()), el.inputmask = new Inputmask(undefined, undefined, !0), 1375 el.inputmask.opts = scopedOpts, el.inputmask.noMasksCache = that.noMasksCache, el.inputmask.userOptions = $.extend(!0, {}, that.userOptions), 1376 el.inputmask.isRTL = scopedOpts.isRTL || scopedOpts.numericInput, el.inputmask.el = el, 1377 el.inputmask.maskset = maskset, $.data(el, "_inputmask_opts", scopedOpts), maskScope.call(el.inputmask, { 1378 action: "mask" 1379 })); 1380 }), elems && elems[0] ? elems[0].inputmask || this : this; 1381 }, 1382 option: function(options, noremask) { 1383 return "string" == typeof options ? this.opts[options] : "object" === (void 0 === options ? "undefined" : _typeof(options)) ? ($.extend(this.userOptions, options), 1384 this.el && !0 !== noremask && this.mask(this.el), this) : void 0; 1385 }, 1386 unmaskedvalue: function(value) { 1387 return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), 1388 maskScope.call(this, { 1389 action: "unmaskedvalue", 1390 value: value 1391 }); 1392 }, 1393 remove: function() { 1394 return maskScope.call(this, { 1395 action: "remove" 1396 }); 1397 }, 1398 getemptymask: function() { 1399 return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), 1400 maskScope.call(this, { 1401 action: "getemptymask" 1402 }); 1403 }, 1404 hasMaskedValue: function() { 1405 return !this.opts.autoUnmask; 1406 }, 1407 isComplete: function() { 1408 return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), 1409 maskScope.call(this, { 1410 action: "isComplete" 1411 }); 1412 }, 1413 getmetadata: function() { 1414 return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), 1415 maskScope.call(this, { 1416 action: "getmetadata" 1417 }); 1418 }, 1419 isValid: function(value) { 1420 return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), 1421 maskScope.call(this, { 1422 action: "isValid", 1423 value: value 1424 }); 1425 }, 1426 format: function(value, metadata) { 1427 return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), 1428 maskScope.call(this, { 1429 action: "format", 1430 value: value, 1431 metadata: metadata 1432 }); 1433 }, 1434 analyseMask: function(mask, regexMask, opts) { 1435 function MaskToken(isGroup, isOptional, isQuantifier, isAlternator) { 1436 this.matches = [], this.openGroup = isGroup || !1, this.alternatorGroup = !1, this.isGroup = isGroup || !1, 1437 this.isOptional = isOptional || !1, this.isQuantifier = is
1437Quantifier || !1, this.isAlternator = isAlternator || !1, 1438 this.quantifier = { 1439 min: 1, 1440 max: 1 1441 }; 1442 } 1443 function insertTestDefinition(mtoken, element, position) { 1444 position = position !== undefined ? position : mtoken.matches.length; 1445 var prevMatch = mtoken.matches[position - 1]; 1446 if (regexMask) 0 === element.indexOf("[") || escaped && /\\d|\\s|\\w]/i.test(element) || "." === element ? mtoken.matches.splice(position++, 0, { 1447 fn: new RegExp(element, opts.casing ? "i" : ""), 1448 cardinality: 1, 1449 optionality: mtoken.isOptional, 1450 newBlockMarker: prevMatch === undefined || prevMatch.def !== element, 1451 casing: null, 1452 def: element, 1453 placeholder: undefined, 1454 nativeDef: element 1455 }) : (escaped && (element = element[element.length - 1]), $.each(element.split(""), function(ndx, lmnt) { 1456 prevMatch = mtoken.matches[position - 1], mtoken.matches.splice(position++, 0, { 1457 fn: null, 1458 cardinality: 0, 1459 optionality: mtoken.isOptional, 1460 newBlockMarker: prevMatch === undefined || prevMatch.def !== lmnt && null !== prevMatch.fn, 1461 casing: null, 1462 def: opts.staticDefinitionSymbol || lmnt, 1463 placeholder: opts.staticDefinitionSymbol !== undefined ? lmnt : undefined, 1464 nativeDef: lmnt 1465 }); 1466 })), escaped = !1; else { 1467 var maskdef = (opts.definitions ? opts.definitions[element] : undefined) || Inputmask.prototype.definitions[element]; 1468 if (maskdef && !escaped) { 1469 for (var prevalidators = maskdef.prevalidator, prevalidatorsL = prevalidators ? prevalidators.length : 0, i = 1; i < maskdef.cardinality; i++) { 1470 var prevalidator = prevalidatorsL >= i ? prevalidators[i - 1] : [], validator = prevalidator.validator, cardinality = prevalidator.cardinality; 1471 mtoken.matches.splice(position++, 0, { 1472 fn: validator ? "string" == typeof validator ? new RegExp(validator, opts.casing ? "i" : "") : new function() { 1473 this.test = validator; 1474 }() : new RegExp("."), 1475 cardinality: cardinality || 1, 1476 optionality: mtoken.isOptional, 1477 newBlockMarker: prevMatch === undefined || prevMatch.def !== (maskdef.definitionSymbol || element), 1478 casing: maskdef.casing, 1479 def: maskdef.definitionSymbol || element, 1480 placeholder: maskdef.placeholder, 1481 nativeDef: element 1482 }), prevMatch = mtoken.matches[position - 1]; 1483 } 1484 mtoken.matches.splice(position++, 0, { 1485 fn: maskdef.validator ? "string" == typeof maskdef.validator ? new RegExp(maskdef.validator, opts.casing ? "i" : "") : new function() { 1486 this.test = maskdef.validator; 1487 }() : new RegExp("."), 1488 cardinality: maskdef.cardinality, 1489 optionality: mtoken.isOptional, 1490 newBlockMarker: prevMatch === undefined || prevMatch.def !== (maskdef.definitionSymbol || element), 1491 casing: maskdef.casing, 1492 def: maskdef.definitionSymbol || element, 1493 placeholder: maskdef.placeholder, 1494 nativeDef: element 1495 }); 1496 } else mtoken.matches.splice(position++, 0, { 1497 fn: null, 1498 cardinality: 0, 1499 optionality: mtoken.isOptional, 1500 newBlockMarker: prevMatch === undefined || prevMatch.def !== element && null !== prevMatch.fn, 1501 casing: null, 1502 def: opts.staticDefinitionSymbol || element, 1503 placeholder: opts.staticDefinitionSymbol !== undefined ? element : undefined, 1504 nativeDef: element 1505 }), escaped = !1; 1506 } 1507 } 1508 function verifyGroupMarker(maskToken) { 1509 maskToken && maskToken.matches && $.each(maskToken.matches, function(ndx, token) { 1510 var nextToken = maskToken.matches[ndx + 1]; 1511 (nextToken === undefined || nextToken.matches === undefined || !1 === nextToken.isQuantifier) && token && token.isGroup && (token.isGroup = !1, 1512 regexMask || (insertTestDefinition(token, opts.groupmarker.start, 0), !0 !== token.openGroup && insertTestDefinition(token, opts.groupmarker.end))), 1513 verifyGroupMarker(token); 1514 }); 1515 } 1516 function defaultCase() { 1517 if (openenings.length > 0) { 1518 if (currentOpeningToken = openenings[openenings.length - 1], insertTestDefinition(currentOpeningToken, m), 1519 currentOpeningToken.isAlternator) { 1520 alternator = openenings.pop(); 1521 for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup = !1; 1522 openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1]).matches.push(alternator) : currentToken.matches.push(alternator); 1523 } 1524 } else insertTestDefinition(currentToken, m); 1525 } 1526 function reverseTokens(maskToken) { 1527 maskToken.matches = maskToken.matches.reverse(); 1528 for (var match in maskToken.matches) if (maskToken.matches.hasOwnProperty(match)) { 1529 var intMatch = parseInt(match); 1530 if (maskToken.matches[match].isQuantifier && maskToken.matches[intMatch + 1] && maskToken.matches[intMatch + 1].isGroup) { 1531 var qt = maskToken.matches[match]; 1532 maskToken.matches.splice(match, 1), maskToken.matches.splice(intMatch + 1, 0, qt); 1533 } 1534 maskToken.matches[match].matches !== undefined ? maskToken.matches[match] = reverseTokens(maskToken.matches[match]) : maskToken.matches[match] = function(st) { 1535 return st === opts.optionalmarker.start ? st = opts.optionalmarker.end : st === opts.optionalmarker.end ? st = opts.optionalmarker.start : st === opts.groupmarker.start ? st = opts.groupmarker.end : st === opts.groupmarker.end && (st = opts.groupmarker.start), 1536 st; 1537 }(maskToken.matches[match]); 1538 } 1539 return maskToken; 1540 } 1541 var match, m, openingToken, currentOpeningToken, alternator, lastMatch, groupToken, tokenizer = /(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g, regexTokenizer = /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g, escaped = !1, currentToken = new MaskToken(), openenings = [], maskTokens = []; 1542 for (regexMask && (opts.optionalmarker.start = undefined, opts.optionalmarker.end = undefined); match = regexMask ? regexTokenizer.exec(mask) : tokenizer.exec(mask); ) { 1543 if (m = match[0], regexMask) switch (m.charAt(0)) { 1544 case "?": 1545 m = "{0,1}"; 1546 break; 1547 1548 case "+": 1549 case "*": 1550 m = "{" + m + "}"; 1551 } 1552 if (escaped) defaultCase(); else switch (m.charAt(0)) { 1553 case opts.escapeChar: 1554 escaped = !0, regexMask && defaultCase(); 1555 break; 1556 1557 case opts.optionalmarker.end: 1558 case opts.groupmarker.end: 1559 if (openingToken = openenings.pop(), openingToken.openGroup = !1, openingToken !== undefined) if (openenings.length > 0) { 1560 if ((currentOpeningToken = openenings[openenings.length - 1]).matches.push(openingToken), 1561 currentOpeningToken.isAlternator) { 1562 alternator = openenings.pop(); 1563 for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup = !1, 1564 alternator.matches[mndx].alternatorGroup = !1; 1565 openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1]).matches.push(alternator) : currentToken.matches.push(alternator); 1566 } 1567 } else currentToken.matches.push(openingToken); else defaultCase(); 1568 break; 1569 1570 case opts.optionalmarker.start: 1571 openenings.push(new MaskToken(!1, !0)); 1572 break; 1573 1574 case opts.groupmarker.start: 1575 openenings.push(new MaskToken(!0)); 1576 break; 1577 1578 case opts.quantifiermarker.start: 1579 var quantifier = new MaskToken(!1, !1, !0), mq = (m = m.replace(/[{}]/g, "")).split(","), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = 1 === mq.length ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]); 1580 if ("*" !== mq1 && "+" !== mq1 || (mq0 = "*" === mq1 ? 0 : 1), quantifier.quantifier = { 1581 min: mq0, 1582 max: mq1 1583 }, openenings.length > 0) { 1584 var matches = openenings[openenings.length - 1].matches; 1585 (match = matches.pop()).isGroup || ((groupToken = new MaskToken(!0)).matches.push(match), 1586 match = groupToken), matches.push(match), matches.push(quantifier); 1587 } else (match = currentToken.matches.pop()).isGroup || (regexMask && null === match.fn && "." === match.def && (match.fn = new RegExp(match.def, opts.casing ? "i" : "")), 1588 (groupToken = new MaskToken(!0)).matches.push(match), match = groupToken), currentToken.matches.push(match), 1589 currentToken.matches.push(quantifier); 1590 break; 1591 1592 case opts.alternatormarker: 1593 if (openenings.length > 0) { 1594 var subToken = (currentOpeningToken = openenings[openenings.length - 1]).matches[currentOpeningToken.matches.length - 1]; 1595 lastMatch = currentOpeningToken.openGroup && (subToken.matches === undefined || !1 === subToken.isGroup && !1 === subToken.isAlternator) ? openenings.pop() : currentOpeningToken.matches.pop(); 1596 } else lastMatch = currentToken.matches.pop(); 1597 if (lastMatch.isAlternator) openenings.push(lastMatch); else if (lastMatch.alternatorGroup ? (alternator = openenings.pop(), 1598 lastMatch.alternatorGroup = !1) : alternator = new MaskToken(!1, !1, !1, !0), alternator.matches.push(lastMatch), 1599 openenings.push(alternator), lastMatch.openGroup) { 1600 lastMatch.openGroup = !1; 1601 var alternatorGroup = new MaskToken(!0); 1602 alternatorGroup.alternatorGroup = !0, openenings.push(alternatorGroup); 1603 } 1604 break; 1605 1606 default: 1607 defaultCase(); 1608 } 1609 } 1610 for (;openenings.length > 0; ) openingToken = openenings.pop(), currentToken.matches.push(openingToken); 1611 return currentToken.matches.length > 0 && (verifyGroupMarker(currentToken), maskTokens.push(currentToken)), 1612 (opts.numericInput || opts.isRTL) && reverseTokens(maskTokens[0]), maskTokens; 1613 } 1614 }, Inputmask.extendDefaults = function(options) { 1615 $.extend(!0, Inputmask.prototype.defaults, options); 1616 }, Inputmask.extendDefinitions = function(definition) { 1617 $.extend(!0, Inputmask.prototype.definitions, definition); 1618 }, Inputmask.extendAliases = function(alias) { 1619 $.extend(!0, Inputmask.prototype.aliases, alias); 1620 }, Inputmask.format = function(value, options, metadata) { 1621 return Inputmask(options).format(value, metadata); 1622 }, Inputmask.unmask = function(value, options) { 1623 return Inputmask(options).unmaskedvalue(value); 1624 }, Inputmask.isValid = function(value, options) { 1625 return Inputmask(options).isValid(value); 1626 }, Inputmask.remove = function(elems) { 1627 $.each(elems, function(ndx, el) { 1628 el.inputmask && el.inputmask.remove(); 1629 }); 1630 }, Inputmask.escapeRegex = function(str) { 1631 var specials = [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^" ]; 1632 return str.replace(new RegExp("(\\" + specials.join("|\\") + ")", "gim"), "\\$1"); 1633 }, Inputmask.keyCode = { 1634 ALT: 18, 1635 BACKSPACE: 8, 1636 BACKSPACE_SAFARI: 127, 1637 CAPS_LOCK: 20, 1638 COMMA: 188, 1639 COMMAND: 91, 1640 COMMAND_LEFT: 91, 1641 COMMAND_RIGHT: 93, 1642 CONTROL: 17, 1643 DELETE: 46, 1644 DOWN: 40, 1645 END: 35, 1646 ENTER: 13, 1647 ESCAPE: 27, 1648 HOME: 36, 1649 INSERT: 45, 1650 LEFT: 37, 1651 MENU: 93, 1652 NUMPAD_ADD: 107, 1653 NUMPAD_DECIMAL: 110, 1654 NUMPAD_DIVIDE: 111, 1655 NUMPAD_ENTER: 108, 1656 NUMPAD_MULTIPLY: 106, 1657 NUMPAD_SUBTRACT: 109, 1658 PAGE_DOWN: 34, 1659 PAGE_UP: 33, 1660 PERIOD: 190, 1661 RIGHT: 39, 1662 SHIFT: 16, 1663 SPACE: 32, 1664 TAB: 9, 1665 UP: 38, 1666 WINDOWS: 91, 1667 X: 88 1668 }, Inputmask; 1669 }); 1670}
1670, function(module, exports) { 1671 module.exports = jQuery; 1672}, function(module, exports, __webpack_require__) { 1673 "use strict"; 1674 function _interopRequireDefault(obj) { 1675 return obj && obj.__esModule ? obj : { 1676 default: obj 1677 }; 1678 } 1679 __webpack_require__(4), __webpack_require__(9), __webpack_require__(12), __webpack_require__(13), 1680 __webpack_require__(14), __webpack_require__(15); 1681 var _inputmask2 = _interopRequireDefault(__webpack_require__(1)), _inputmask4 = _interopRequireDefault(__webpack_require__(0)), _jquery2 = _interopRequireDefault(__webpack_require__(2)); 1682 _inputmask4.default === _jquery2.default && __webpack_require__(16), window.Inputmask = _inputmask2.default; 1683}, function(module, exports, __webpack_require__) { 1684 var content = __webpack_require__(5); 1685 "string" == typeof content && (content = [ [ module.i, content, "" ] ]); 1686 var options = { 1687 hmr: !0 1688 }; 1689 options.transform = void 0; 1690 __webpack_require__(7)(content, options); 1691 content.locals && (module.exports = content.locals); 1692}, function(module, exports, __webpack_require__) { 1693 (module.exports = __webpack_require__(6)(void 0)).push([ module.i, "span.im-caret {\r\n -webkit-animation: 1s blink step-end infinite;\r\n animation: 1s blink step-end infinite;\r\n}\r\n\r\n@keyframes blink {\r\n from, to {\r\n border-right-color: black;\r\n }\r\n 50% {\r\n border-right-color: transparent;\r\n }\r\n}\r\n\r\n@-webkit-keyframes blink {\r\n from, to {\r\n border-right-color: black;\r\n }\r\n 50% {\r\n border-right-color: transparent;\r\n }\r\n}\r\n\r\nspan.im-static {\r\n color: grey;\r\n}\r\n\r\ndiv.im-colormask {\r\n display: inline-block;\r\n border-style: inset;\r\n border-width: 2px;\r\n -webkit-appearance: textfield;\r\n -moz-appearance: textfield;\r\n appearance: textfield;\r\n}\r\n\r\ndiv.im-colormask > input {\r\n position: absolute;\r\n display: inline-block;\r\n background-color: transparent;\r\n color: transparent;\r\n -webkit-appearance: caret;\r\n -moz-appearance: caret;\r\n appearance: caret;\r\n border-style: none;\r\n left: 0; /*calculated*/\r\n}\r\n\r\ndiv.im-colormask > input:focus {\r\n outline: none;\r\n}\r\n\r\ndiv.im-colormask > input::-moz-selection{\r\n background: none;\r\n}\r\n\r\ndiv.im-colormask > input::selection{\r\n background: none;\r\n}\r\ndiv.im-colormask > input::-moz-selection{\r\n background: none;\r\n}\r\n\r\ndiv.im-colormask > div {\r\n color: black;\r\n display: inline-block;\r\n width: 100px; /*calculated*/\r\n}", "" ]); 1694}, function(module, exports) { 1695 function cssWithMappingToString(item, useSourceMap) { 1696 var content = item[1] || "", cssMapping = item[3]; 1697 if (!cssMapping) return content; 1698 if (useSourceMap && "function" == typeof btoa) { 1699 var sourceMapping = toComment(cssMapping), sourceURLs = cssMapping.sources.map(function(source) { 1700 return "/*# sourceURL=" + cssMapping.sourceRoot + source + " */"; 1701 }); 1702 return [ content ].concat(sourceURLs).concat([ sourceMapping ]).join("\n"); 1703 } 1704 return [ content ].join("\n"); 1705 } 1706 function toComment(sourceMap) { 1707 return "/*# " + ("sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))))) + " */"; 1708 } 1709 module.exports = function(useSourceMap) { 1710 var list = []; 1711 return list.toString = function() { 1712 return this.map(function(item) { 1713 var content = cssWithMappingToString(item, useSourceMap); 1714 return item[2] ? "@media " + item[2] + "{" + content + "}" : content; 1715 }).join(""); 1716 }, list.i = function(modules, mediaQuery) { 1717 "string" == typeof modules && (modules = [ [ null, modules, "" ] ]); 1718 for (var alreadyImportedModules = {}, i = 0; i < this.length; i++) { 1719 var id = this[i][0]; 1720 "number" == typeof id && (alreadyImportedModules[id] = !0); 1721 } 1722 for (i = 0; i < modules.length; i++) { 1723 var item = modules[i]; 1724 "number" == typeof item[0] && alreadyImportedModules[item[0]] || (mediaQuery && !item[2] ? item[2] = mediaQuery : mediaQuery && (item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"), 1725 list.push(item)); 1726 } 1727 }, list; 1728 }; 1729}, function(module, exports, __webpack_require__) { 1730 function addStylesToDom(styles, options) { 1731 for (var i = 0; i < styles.length; i++) { 1732 var item = styles[i], domStyle = stylesInDom[item.id]; 1733 if (domStyle) { 1734 domStyle.refs++; 1735 for (j = 0; j < domStyle.parts.length; j++) domStyle.parts[j](item.parts[j]); 1736 for (;j < item.parts.length; j++) domStyle.parts.push(addStyle(item.parts[j], options)); 1737 } else { 1738 for (var parts = [], j = 0; j < item.parts.length; j++) parts.push(addStyle(item.parts[j], options)); 1739 stylesInDom[item.id] = { 1740 id: item.id, 1741 refs: 1, 1742 parts: parts 1743 }; 1744 } 1745 } 1746 } 1747 function listToStyles(list, options) { 1748 for (var styles = [], newStyles = {}, i = 0; i < list.length; i++) { 1749 var item = list[i], id = options.base ? item[0] + options.base : item[0], part = { 1750 css: item[1], 1751 media: item[2], 1752 sourceMap: item[3] 1753 }; 1754 newStyles[id] ? newStyles[id].parts.push(part) : styles.push(newStyles[id] = { 1755 id: id, 1756 parts: [ part ] 1757 }); 1758 } 1759 return styles; 1760 } 1761 function insertStyleElement(options, style) { 1762 var target = getElement(options.insertInto); 1763 if (!target) throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invali
vendor: 4,427 bytes, lines 1763-1833
1763d."); 1764 var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1]; 1765 if ("top" === options.insertAt) lastStyleElementInsertedAtTop ? lastStyleElementInsertedAtTop.nextSibling ? target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling) : target.appendChild(style) : target.insertBefore(style, target.firstChild), 1766 stylesInsertedAtTop.push(style); else if ("bottom" === options.insertAt) target.appendChild(style); else { 1767 if ("object" != typeof options.insertAt || !options.insertAt.before) throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n"); 1768 var nextSibling = getElement(options.insertInto + " " + options.insertAt.before); 1769 target.insertBefore(style, nextSibling); 1770 } 1771 } 1772 function removeStyleElement(style) { 1773 if (null === style.parentNode) return !1; 1774 style.parentNode.removeChild(style); 1775 var idx = stylesInsertedAtTop.indexOf(style); 1776 idx >= 0 && stylesInsertedAtTop.splice(idx, 1); 1777 } 1778 function createStyleElement(options) { 1779 var style = document.createElement("style"); 1780 return options.attrs.type = "text/css", addAttrs(style, options.attrs), insertStyleElement(options, style), 1781 style; 1782 } 1783 function createLinkElement(options) { 1784 var link = document.createElement("link"); 1785 return options.attrs.type = "text/css", options.attrs.rel = "stylesheet", addAttrs(link, options.attrs), 1786 insertStyleElement(options, link), link; 1787 } 1788 function addAttrs(el, attrs) { 1789 Object.keys(attrs).forEach(function(key) { 1790 el.setAttribute(key, attrs[key]); 1791 }); 1792 } 1793 function addStyle(obj, options) { 1794 var style, update, remove, result; 1795 if (options.transform && obj.css) { 1796 if (!(result = options.transform(obj.css))) return function() {}; 1797 obj.css = result; 1798 } 1799 if (options.singleton) { 1800 var styleIndex = singletonCounter++; 1801 style = singleton || (singleton = createStyleElement(options)), update = applyToSingletonTag.bind(null, style, styleIndex, !1), 1802 remove = applyToSingletonTag.bind(null, style, styleIndex, !0); 1803 } else obj.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa ? (style = createLinkElement(options), 1804 update = updateLink.bind(null, style, options), remove = function() { 1805 removeStyleElement(style), style.href && URL.revokeObjectURL(style.href); 1806 }) : (style = createStyleElement(options), update = applyToTag.bind(null, style), 1807 remove = function() { 1808 removeStyleElement(style); 1809 }); 1810 return update(obj), function(newObj) { 1811 if (newObj) { 1812 if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) return; 1813 update(obj = newObj); 1814 } else remove(); 1815 }; 1816 } 1817 function applyToSingletonTag(style, index, remove, obj) { 1818 var css = remove ? "" : obj.css; 1819 if (style.styleSheet) style.styleSheet.cssText = replaceText(index, css); else { 1820 var cssNode = document.createTextNode(css), childNodes = style.childNodes; 1821 childNodes[index] && style.removeChild(childNodes[index]), childNodes.length ? style.insertBefore(cssNode, childNodes[index]) : style.appendChild(cssNode); 1822 } 1823 } 1824 function applyToTag(style, obj) { 1825 var css = obj.css, media = obj.media; 1826 if (media && style.setAttribute("media", media), style.styleSheet) style.styleSheet.cssText = css; else { 1827 for (;style.firstChild; ) style.removeChild(style.firstChild); 1828 style.appendChild(document.createTextNode(css)); 1829 } 1830 } 1831 function updateLink(link, options, obj) { 1832 var css = obj.css, sourceMap = obj.sourceMap, autoFixUrls = void 0 === options.convertToAbsoluteUrls && sourceMap; 1833 (options.convertToAbsoluteUrls || autoFixUrls) && (css = fixUrls(css)), sourceMap && (css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)
1833))) + " */"); 1834 var blob = new Blob([ css ], { 1835 type: "text/css" 1836 }), oldSrc = link.href; 1837 link.href = URL.createObjectURL(blob), oldSrc && URL.revokeObjectURL(oldSrc); 1838 } 1839 var stylesInDom = {}, isOldIE = function(fn) { 1840 var memo; 1841 return function() { 1842 return void 0 === memo && (memo = fn.apply(this, arguments)), memo; 1843 }; 1844 }(function() { 1845 return window && document && document.all && !window.atob; 1846 }), getElement = function(fn) { 1847 var memo = {}; 1848 return function(selector) { 1849 if (void 0 === memo[selector]) { 1850 var styleTarget = fn.call(this, selector); 1851 if (styleTarget instanceof window.HTMLIFrameElement) try { 1852 styleTarget = styleTarget.contentDocument.head; 1853 } catch (e) { 1854 styleTarget = null; 1855 } 1856 memo[selector] = styleTarget; 1857 } 1858 return memo[selector]; 1859 }; 1860 }(function(target) { 1861 return document.querySelector(target); 1862 }), singleton = null, singletonCounter = 0, stylesInsertedAtTop = [], fixUrls = __webpack_require__(8); 1863 module.exports = function(list, options) { 1864 if ("undefined" != typeof DEBUG && DEBUG && "object" != typeof document) throw new Error("The style-loader cannot be used in a non-browser environment"); 1865 (options = options || {}).attrs = "object" == typeof options.attrs ? options.attrs : {}, 1866 options.singleton || (options.singleton = isOldIE()), options.insertInto || (options.insertInto = "head"), 1867 options.insertAt || (options.insertAt = "bottom"); 1868 var styles = listToStyles(list, options); 1869 return addStylesToDom(styles, options), function(newList) { 1870 for (var mayRemove = [], i = 0; i < styles.length; i++) { 1871 var item = styles[i]; 1872 (domStyle = stylesInDom[item.id]).refs--, mayRemove.push(domStyle); 1873 } 1874 newList && addStylesToDom(listToStyles(newList, options), options); 1875 for (i = 0; i < mayRemove.length; i++) { 1876 var domStyle = mayRemove[i]; 1877 if (0 === domStyle.refs) { 1878 for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j](); 1879 delete stylesInDom[domStyle.id]; 1880 } 1881 } 1882 }; 1883 }; 1884 var replaceText = function() { 1885 var textStore = []; 1886 return function(index, replacement) { 1887 return textStore[index] = replacement, textStore.filter(Boolean).join("\n"); 1888 }; 1889 }(); 1890}, function(module, exports) { 1891 module.exports = function(css) { 1892 var location = "undefined" != typeof window && window.location; 1893 if (!location) throw new Error("fixUrls requires window.location"); 1894 if (!css || "string" != typeof css) return css; 1895 var baseUrl = location.protocol + "//" + location.host, currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/"); 1896 return css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) { 1897 var unquotedOrigUrl = origUrl.trim().replace(/^"(.*)"$/, function(o, $1) { 1898 return $1; 1899 }).replace(/^'(.*)'$/, function(o, $1) { 1900 return $1; 1901 }); 1902 if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) return fullMatch; 1903 var newUrl; 1904 return newUrl = 0 === unquotedOrigUrl.indexOf("//") ? unquotedOrigUrl : 0 === unquotedOrigUrl.indexOf("/") ? baseUrl + unquotedOrigUrl : currentDir + unquotedOrigUrl.replace(/^\.\//, ""), 1905 "url(" + JSON.stringify(newUrl) + ")"; 1906 }); 1907 }; 1908}, function(module, exports, __webpack_require__) { 1909 "use strict"; 1910 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 1911 "function" == typeof Symbol && Symbol.iterator; 1912 !function(factory) { 1913 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(0), __webpack_require__(1) ], 1914 void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = factory) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 1915 }(function($, Inputmask) { 1916 function isLeapYear(year) { 1917 return isNaN(year) || 29 === new Date(year, 2, 0).getDate(); 1918 } 1919 return Inputmask.extendAliases({ 1920 "dd/mm/yyyy": { 1921 mask: "1/2/y", 1922 placeholder: "dd/mm/yyyy", 1923 regex: { 1924 val1pre: new RegExp("[0-3]"),
vendor: 21,552 bytes, lines 1925-2293
1925 val1: new RegExp("0[1-9]|[12][0-9]|3[01]"), 1926 val2pre: function(separator) { 1927 var escapedSeparator = Inputmask.escapeRegex.call(this, separator); 1928 return new RegExp("((0[1-9]|[12][0-9]|3[01])" + escapedSeparator + "[01])"); 1929 }, 1930 val2: function(separator) { 1931 var escapedSeparator = Inputmask.escapeRegex.call(this, separator); 1932 return new RegExp("((0[1-9]|[12][0-9])" + escapedSeparator + "(0[1-9]|1[012]))|(30" + escapedSeparator + "(0[13-9]|1[012]))|(31" + escapedSeparator + "(0[13578]|1[02]))"); 1933 } 1934 }, 1935 leapday: "29/02/", 1936 separator: "/", 1937 yearrange: { 1938 minyear: 1900, 1939 maxyear: 2099 1940 }, 1941 isInYearRange: function(chrs, minyear, maxyear) { 1942 if (isNaN(chrs)) return !1; 1943 var enteredyear = parseInt(chrs.concat(minyear.toString().slice(chrs.length))), enteredyear2 = parseInt(chrs.concat(maxyear.toString().slice(chrs.length))); 1944 return !isNaN(enteredyear) && (minyear <= enteredyear && enteredyear <= maxyear) || !isNaN(enteredyear2) && (minyear <= enteredyear2 && enteredyear2 <= maxyear); 1945 }, 1946 determinebaseyear: function(minyear, maxyear, hint) { 1947 var currentyear = new Date().getFullYear(); 1948 if (minyear > currentyear) return minyear; 1949 if (maxyear < currentyear) { 1950 for (var maxYearPrefix = maxyear.toString().slice(0, 2), maxYearPostfix = maxyear.toString().slice(2, 4); maxyear < maxYearPrefix + hint; ) maxYearPrefix--; 1951 var maxxYear = maxYearPrefix + maxYearPostfix; 1952 return minyear > maxxYear ? minyear : maxxYear; 1953 } 1954 if (minyear <= currentyear && currentyear <= maxyear) { 1955 for (var currentYearPrefix = currentyear.toString().slice(0, 2); maxyear < currentYearPrefix + hint; ) currentYearPrefix--; 1956 var currentYearAndHint = currentYearPrefix + hint; 1957 return currentYearAndHint < minyear ? minyear : currentYearAndHint; 1958 } 1959 return currentyear; 1960 }, 1961 onKeyDown: function(e, buffer, caretPos, opts) { 1962 var $input = $(this); 1963 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) { 1964 var today = new Date(); 1965 $input.val(today.getDate().toString() + (today.getMonth() + 1).toString() + today.getFullYear().toString()), 1966 $input.trigger("setvalue"); 1967 } 1968 }, 1969 getFrontValue: function(mask, buffer, opts) { 1970 for (var start = 0, length = 0, i = 0; i < mask.length && "2" !== mask.charAt(i); i++) { 1971 var definition = opts.definitions[mask.charAt(i)]; 1972 definition ? (start += length, length = definition.cardinality) : length++; 1973 } 1974 return buffer.join("").substr(start, length); 1975 }, 1976 postValidation: function(buffer, currentResult, opts) { 1977 var dayMonthValue, year, bufferStr = buffer.join(""); 1978 return 0 === opts.mask.indexOf("y") ? (year = bufferStr.substr(0, 4), dayMonthValue = bufferStr.substring(4, 10)) : (year = bufferStr.substring(6, 10), 1979 dayMonthValue = bufferStr.substr(0, 6)), currentResult && (dayMonthValue !== opts.leapday || isLeapYear(year)); 1980 }, 1981 definitions: { 1982 "1": { 1983 validator: function(chrs, maskset, pos, strict, opts) { 1984 var isValid = opts.regex.val1.test(chrs); 1985 return strict || isValid || chrs.charAt(1) !== opts.separator && -1 === "-./".indexOf(chrs.charAt(1)) || !(isValid = opts.regex.val1.test("0" + chrs.charAt(0))) ? isValid : (maskset.buffer[pos - 1] = "0", 1986 { 1987 refreshFromBuffer: { 1988 start: pos - 1, 1989 end: pos 1990 }, 1991 pos: pos, 1992 c: chrs.charAt(0) 1993 }); 1994 }, 1995 cardinality: 2, 1996 prevalidator: [ { 1997 validator: function(chrs, maskset, pos, strict, opts) { 1998 var pchrs = chrs; 1999 isNaN(maskset.buffer[pos + 1]) || (pchrs += maskset.buffer[pos + 1]); 2000 var isValid = 1 === pchrs.length ? opts.regex.val1pre.test(pchrs) : opts.regex.val1.test(pchrs); 2001 if (isValid && maskset.validPositions[pos] && (opts.regex.val2(opts.separator).test(chrs + maskset.validPositions[pos].input) || (maskset.validPositions[pos].input = "0" === chrs ? "1" : "0")), 2002 !strict && !isValid) { 2003 if (isValid = opts.regex.val1.test(chrs + "0")) return maskset.buffer[pos] = chrs, 2004 maskset.buffer[++pos] = "0", { 2005 pos: pos, 2006 c: "0" 2007 }; 2008 if (isValid = opts.regex.val1.test("0" + chrs)) return maskset.buffer[pos] = "0", 2009 pos++, { 2010 pos: pos 2011 }; 2012 } 2013 return isValid; 2014 }, 2015 cardinality: 1 2016 } ] 2017 }, 2018 "2": { 2019 validator: function(chrs, maskset, pos, strict, opts) { 2020 var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts); 2021 -1 !== frontValue.indexOf(opts.placeholder[0]) && (frontValue = "01" + opts.separator); 2022 var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs); 2023 return strict || isValid || chrs.charAt(1) !== opts.separator && -1 === "-./".indexOf(chrs.charAt(1)) || !(isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs.charAt(0))) ? isValid : (maskset.buffer[pos - 1] = "0", 2024 { 2025 refreshFromBuffer: { 2026 start: pos - 1, 2027 end: pos 2028 }, 2029 pos: pos, 2030 c: chrs.charAt(0) 2031 }); 2032 }, 2033 cardinality: 2, 2034 prevalidator: [ { 2035 validator: function(chrs, maskset, pos, strict, opts) { 2036 isNaN(maskset.buffer[pos + 1]) || (chrs += maskset.buffer[pos + 1]); 2037 var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts); 2038 -1 !== frontValue.indexOf(opts.placeholder[0]) && (frontValue = "01" + opts.separator); 2039 var isValid = 1 === chrs.length ? opts.regex.val2pre(opts.separator).test(frontValue + chrs) : opts.regex.val2(opts.separator).test(frontValue + chrs); 2040 return isValid && maskset.validPositions[pos] && (opts.regex.val2(opts.separator).test(chrs + maskset.validPositions[pos].input) || (maskset.validPositions[pos].input = "0" === chrs ? "1" : "0")), 2041 strict || isValid || !(isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs)) ? isValid : (maskset.buffer[pos] = "0", 2042 pos++, { 2043 pos: pos 2044 }); 2045 }, 2046 cardinality: 1 2047 } ] 2048 }, 2049 y: { 2050 validator: function(chrs, maskset, pos, strict, opts) { 2051 return opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear); 2052 }, 2053 cardinality: 4, 2054 prevalidator: [ { 2055 validator: function(chrs, maskset, pos, strict, opts) { 2056 var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear); 2057 if (!strict && !isValid) { 2058 var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + "0").toString().slice(0, 1); 2059 if (isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0), 2060 { 2061 pos: pos 2062 }; 2063 if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + "0").toString().slice(0, 2), 2064 isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0), 2065 maskset.buffer[pos++] = yearPrefix.charAt(1), { 2066 pos: pos 2067 }; 2068 } 2069 return isValid; 2070 }, 2071 cardinality: 1 2072 }, { 2073 validator: function(chrs, maskset, pos, strict, opts) { 2074 var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear); 2075 if (!strict && !isValid) { 2076 var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2); 2077 if (isValid = opts.isInYearRange(chrs[0] + yearPrefix[1] + chrs[1], opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(1), 2078 { 2079 pos: pos 2080 }; 2081 if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2), 2082 isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos - 1] = yearPrefix.charAt(0), 2083 maskset.buffer[pos++] = yearPrefix.charAt(1), maskset.buffer[pos++] = chrs.charAt(0), 2084 { 2085 refreshFromBuffer: { 2086 start: pos - 3, 2087 end: pos 2088 }, 2089 pos: pos 2090 }; 2091 } 2092 return isValid; 2093 }, 2094 cardinality: 2 2095 }, { 2096 validator: function(chrs, maskset, pos, strict, opts) { 2097 return opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear); 2098 }, 2099 cardinality: 3 2100 } ] 2101 } 2102 }, 2103 insertMode: !1, 2104 autoUnmask: !1 2105 }, 2106 "mm/dd/yyyy": { 2107 placeholder: "mm/dd/yyyy", 2108 alias: "dd/mm/yyyy", 2109 regex: { 2110 val2pre: function(separator) { 2111 var escapedSeparator = Inputmask.escapeRegex.call(this, separator); 2112 return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])"); 2113 }, 2114 val2: function(separator) { 2115 var escapedSeparator = Inputmask.escapeRegex.call(this, separator); 2116 return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)"); 2117 }, 2118 val1pre: new RegExp("[01]"), 2119 val1: new RegExp("0[1-9]|1[012]") 2120 }, 2121 leapday: "02/29/", 2122 onKeyDown: function(e, buffer, caretPos, opts) { 2123 var $input = $(this); 2124 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) { 2125 var today = new Date(); 2126 $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()), 2127 $input.trigger("setvalue"); 2128 } 2129 } 2130 }, 2131 "yyyy/mm/dd": { 2132 mask: "y/1/2", 2133 placeholder: "yyyy/mm/dd", 2134 alias: "mm/dd/yyyy", 2135 leapday: "/02/29", 2136 onKeyDown: function(e, buffer, caretPos, opts) { 2137 var $input = $(this); 2138 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) { 2139 var today = new Date(); 2140 $input.val(today.getFullYear().toString() + (today.getMonth() + 1).toString() + today.getDate().toString()), 2141 $input.trigger("setvalue"); 2142 } 2143 } 2144 }, 2145 "dd.mm.yyyy": { 2146 mask: "1.2.y", 2147 placeholder: "dd.mm.yyyy", 2148 leapday: "29.02.", 2149 separator: ".", 2150 alias: "dd/mm/yyyy" 2151 }, 2152 "dd-mm-yyyy": { 2153 mask: "1-2-y", 2154 placeholder: "dd-mm-yyyy", 2155 leapday: "29-02-", 2156 separator: "-", 2157 alias: "dd/mm/yyyy" 2158 }, 2159 "mm.dd.yyyy": { 2160 mask: "1.2.y", 2161 placeholder: "mm.dd.yyyy", 2162 leapday: "02.29.", 2163 separator: ".", 2164 alias: "mm/dd/yyyy" 2165 }, 2166 "mm-dd-yyyy": { 2167 mask: "1-2-y", 2168 placeholder: "mm-dd-yyyy", 2169 leapday: "02-29-", 2170 separator: "-", 2171 alias: "mm/dd/yyyy" 2172 }, 2173 "yyyy.mm.dd": { 2174 mask: "y.1.2", 2175 placeholder: "yyyy.mm.dd", 2176 leapday: ".02.29", 2177 separator: ".", 2178 alias: "yyyy/mm/dd" 2179 }, 2180 "yyyy-mm-dd": { 2181 mask: "y-1-2", 2182 placeholder: "yyyy-mm-dd", 2183 leapday: "-02-29", 2184 separator: "-", 2185 alias: "yyyy/mm/dd" 2186 }, 2187 datetime: { 2188 mask: "1/2/y h:s", 2189 placeholder: "dd/mm/yyyy hh:mm", 2190 alias: "dd/mm/yyyy", 2191 regex: { 2192 hrspre: new RegExp("[012]"), 2193 hrs24: new RegExp("2[0-4]|1[3-9]"), 2194 hrs: new RegExp("[01][0-9]|2[0-4]"), 2195 ampm: new RegExp("^[a|p|A|P][m|M]"), 2196 mspre: new RegExp("[0-5]"), 2197 ms: new RegExp("[0-5][0-9]") 2198 }, 2199 timeseparator: ":", 2200 hourFormat: "24", 2201 definitions: { 2202 h: { 2203 validator: function(chrs, maskset, pos, strict, opts) { 2204 if ("24" === opts.hourFormat && 24 === parseInt(chrs, 10)) return maskset.buffer[pos - 1] = "0", 2205 maskset.buffer[pos] = "0", { 2206 refreshFromBuffer: { 2207 start: pos - 1, 2208 end: pos 2209 }, 2210 c: "0" 2211 }; 2212 var isValid = opts.regex.hrs.test(chrs); 2213 if (!strict && !isValid && (chrs.charAt(1) === opts.timeseparator || -1 !== "-.:".indexOf(chrs.charAt(1))) && (isValid = opts.regex.hrs.test("0" + chrs.charAt(0)))) return maskset.buffer[pos - 1] = "0", 2214 maskset.buffer[pos] = chrs.charAt(0), pos++, { 2215 refreshFromBuffer: { 2216 start: pos - 2, 2217 end: pos 2218 }, 2219 pos: pos, 2220 c: opts.timeseparator 2221 }; 2222 if (isValid && "24" !== opts.hourFormat && opts.regex.hrs24.test(chrs)) { 2223 var tmp = parseInt(chrs, 10); 2224 return 24 === tmp ? (maskset.buffer[pos + 5] = "a", maskset.buffer[pos + 6] = "m") : (maskset.buffer[pos + 5] = "p", 2225 maskset.buffer[pos + 6] = "m"), (tmp -= 12) < 10 ? (maskset.buffer[pos] = tmp.toString(), 2226 maskset.buffer[pos - 1] = "0") : (maskset.buffer[pos] = tmp.toString().charAt(1), 2227 maskset.buffer[pos - 1] = tmp.toString().charAt(0)), { 2228 refreshFromBuffer: { 2229 start: pos - 1, 2230 end: pos + 6 2231 }, 2232 c: maskset.buffer[pos] 2233 }; 2234 } 2235 return isValid; 2236 }, 2237 cardinality: 2, 2238 prevalidator: [ { 2239 validator: function(chrs, maskset, pos, strict, opts) { 2240 var isValid = opts.regex.hrspre.test(chrs); 2241 return strict || isValid || !(isValid = opts.regex.hrs.test("0" + chrs)) ? isValid : (maskset.buffer[pos] = "0", 2242 pos++, { 2243 pos: pos 2244 }); 2245 }, 2246 cardinality: 1 2247 } ] 2248 }, 2249 s: { 2250 validator: "[0-5][0-9]", 2251 cardinality: 2, 2252 prevalidator: [ { 2253 validator: function(chrs, maskset, pos, strict, opts) { 2254 var isValid = opts.regex.mspre.test(chrs); 2255 return strict || isValid || !(isValid = opts.regex.ms.test("0" + chrs)) ? isValid : (maskset.buffer[pos] = "0", 2256 pos++, { 2257 pos: pos 2258 }); 2259 }, 2260 cardinality: 1 2261 } ] 2262 }, 2263 t: { 2264 validator: function(chrs, maskset, pos, strict, opts) { 2265 return opts.regex.ampm.test(chrs + "m"); 2266 }, 2267 casing: "lower", 2268 cardinality: 1 2269 } 2270 }, 2271 insertMode: !1, 2272 autoUnmask: !1 2273 }, 2274 datetime12: { 2275 mask: "1/2/y h:s t\\m", 2276 placeholder: "dd/mm/yyyy hh:mm xm", 2277 alias: "datetime", 2278 hourFormat: "12" 2279 }, 2280 "mm/dd/yyyy hh:mm xm": { 2281 mask: "1/2/y h:s t\\m", 2282 placeholder: "mm/dd/yyyy hh:mm xm", 2283 alias: "datetime12", 2284 regex: { 2285 val2pre: function(separator) { 2286 var escapedSeparator = Inputmask.escapeRegex.call(this, separator); 2287 return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])"); 2288 }, 2289 val2: function(separator) { 2290 var escapedSeparator = Inputmask.escapeRegex.call(this, separator); 2291 return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)"); 2292 }, 2293 val1pre: new RegExp("[01]"),
vendor: 7,910 bytes, lines 2294-2476
2294 val1: new RegExp("0[1-9]|1[012]") 2295 }, 2296 leapday: "02/29/", 2297 onKeyDown: function(e, buffer, caretPos, opts) { 2298 var $input = $(this); 2299 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) { 2300 var today = new Date(); 2301 $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()), 2302 $input.trigger("setvalue"); 2303 } 2304 } 2305 }, 2306 "hh:mm t": { 2307 mask: "h:s t\\m", 2308 placeholder: "hh:mm xm", 2309 alias: "datetime", 2310 hourFormat: "12" 2311 }, 2312 "h:s t": { 2313 mask: "h:s t\\m", 2314 placeholder: "hh:mm xm", 2315 alias: "datetime", 2316 hourFormat: "12" 2317 }, 2318 "hh:mm:ss": { 2319 mask: "h:s:s", 2320 placeholder: "hh:mm:ss", 2321 alias: "datetime", 2322 autoUnmask: !1 2323 }, 2324 "hh:mm": { 2325 mask: "h:s", 2326 placeholder: "hh:mm", 2327 alias: "datetime", 2328 autoUnmask: !1 2329 }, 2330 date: { 2331 alias: "dd/mm/yyyy" 2332 }, 2333 "mm/yyyy": { 2334 mask: "1/y", 2335 placeholder: "mm/yyyy", 2336 leapday: "donotuse", 2337 separator: "/", 2338 alias: "mm/dd/yyyy" 2339 }, 2340 shamsi: { 2341 regex: { 2342 val2pre: function(separator) { 2343 var escapedSeparator = Inputmask.escapeRegex.call(this, separator); 2344 return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "[0-3])"); 2345 }, 2346 val2: function(separator) { 2347 var escapedSeparator = Inputmask.escapeRegex.call(this, separator); 2348 return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[1-9]|1[012])" + escapedSeparator + "30)|((0[1-6])" + escapedSeparator + "31)"); 2349 }, 2350 val1pre: new RegExp("[01]"), 2351 val1: new RegExp("0[1-9]|1[012]") 2352 }, 2353 yearrange: { 2354 minyear: 1300, 2355 maxyear: 1499 2356 }, 2357 mask: "y/1/2", 2358 leapday: "/12/30", 2359 placeholder: "yyyy/mm/dd", 2360 alias: "mm/dd/yyyy", 2361 clearIncomplete: !0 2362 }, 2363 "yyyy-mm-dd hh:mm:ss": { 2364 mask: "y-1-2 h:s:s", 2365 placeholder: "yyyy-mm-dd hh:mm:ss", 2366 alias: "datetime", 2367 separator: "-", 2368 leapday: "-02-29", 2369 regex: { 2370 val2pre: function(separator) { 2371 var escapedSeparator = Inputmask.escapeRegex.call(this, separator); 2372 return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])"); 2373 }, 2374 val2: function(separator) { 2375 var escapedSeparator = Inputmask.escapeRegex.call(this, separator); 2376 return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)"); 2377 }, 2378 val1pre: new RegExp("[01]"), 2379 val1: new RegExp("0[1-9]|1[012]") 2380 }, 2381 onKeyDown: function(e, buffer, caretPos, opts) {} 2382 } 2383 }), Inputmask; 2384 }); 2385}, function(module, exports, __webpack_require__) { 2386 "use strict"; 2387 var __WEBPACK_AMD_DEFINE_RESULT__; 2388 "function" == typeof Symbol && Symbol.iterator; 2389 void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = function() { 2390 return window; 2391 }.call(exports, __webpack_require__, exports, module)) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2392}, function(module, exports, __webpack_require__) { 2393 "use strict"; 2394 var __WEBPACK_AMD_DEFINE_RESULT__; 2395 "function" == typeof Symbol && Symbol.iterator; 2396 void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = function() { 2397 return document; 2398 }.call(exports, __webpack_require__, exports, module)) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2399}, function(module, exports, __webpack_require__) { 2400 "use strict"; 2401 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 2402 "function" == typeof Symbol && Symbol.iterator; 2403 !function(factory) { 2404 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(0), __webpack_require__(1) ], 2405 void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = factory) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2406 }(function($, Inputmask) { 2407 return Inputmask.extendDefinitions({ 2408 A: { 2409 validator: "[A-Za-zÐ-ÑÐÑÃ-ÿµ]", 2410 cardinality: 1, 2411 casing: "upper" 2412 }, 2413 "&": { 2414 validator: "[0-9A-Za-zÐ-ÑÐÑÃ-ÿµ]", 2415 cardinality: 1, 2416 casing: "upper" 2417 }, 2418 "#": { 2419 validator: "[0-9A-Fa-f]", 2420 cardinality: 1, 2421 casing: "upper" 2422 } 2423 }), Inputmask.extendAliases({ 2424 url: { 2425 definitions: { 2426 i: { 2427 validator: ".", 2428 cardinality: 1 2429 } 2430 }, 2431 mask: "(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}", 2432 insertMode: !1, 2433 autoUnmask: !1, 2434 inputmode: "url" 2435 }, 2436 ip: { 2437 mask: "i[i[i]].i[i[i]].i[i[i]].i[i[i]]", 2438 definitions: { 2439 i: { 2440 validator: function(chrs, maskset, pos, strict, opts) { 2441 return pos - 1 > -1 && "." !== maskset.buffer[pos - 1] ? (chrs = maskset.buffer[pos - 1] + chrs, 2442 chrs = pos - 2 > -1 && "." !== maskset.buffer[pos - 2] ? maskset.buffer[pos - 2] + chrs : "0" + chrs) : chrs = "00" + chrs, 2443 new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs); 2444 }, 2445 cardinality: 1 2446 } 2447 }, 2448 onUnMask: function(maskedValue, unmaskedValue, opts) { 2449 return maskedValue; 2450 }, 2451 inputmode: "numeric" 2452 }, 2453 email: { 2454 mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]", 2455 greedy: !1, 2456 onBeforePaste: function(pastedValue, opts) { 2457 return (pastedValue = pastedValue.toLowerCase()).replace("mailto:", ""); 2458 }, 2459 definitions: { 2460 "*": { 2461 validator: "[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]", 2462 cardinality: 1, 2463 casing: "lower" 2464 }, 2465 "-": { 2466 validator: "[0-9A-Za-z-]", 2467 cardinality: 1, 2468 casing: "lower" 2469 } 2470 }, 2471 onUnMask: function(maskedValue, unmaskedValue, opts) { 2472 return maskedValue; 2473 }, 2474 inputmode: "email" 2475 }, 2476 mac: {
2477 mask: "##:##:##:##:##:##" 2478 }, 2479 vin: { 2480 mask: "V{13}9{4}", 2481 definitions: { 2482 V: { 2483 validator: "[A-HJ-NPR-Za-hj-npr-z\\d]", 2484 cardinality: 1, 2485 casing: "upper" 2486 } 2487 }, 2488 clearIncomplete: !0, 2489 autoUnmask: !0 2490 } 2491 }), Inputmask; 2492 }); 2493}, function(module, exports, __webpack_require__) { 2494 "use strict"; 2495 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 2496 "function" == typeof Symbol && Symbol.iterator; 2497 !function(factory) { 2498 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(0), __webpack_require__(1) ], 2499 void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = factory) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2500 }(function($, Inputmask, undefined) { 2501 function autoEscape(txt, opts) { 2502 for (var escapedTxt = "", i = 0; i < txt.length; i++) Inputmask.prototype.definitions[txt.charAt(i)] || opts.definitions[txt.charAt(i)] || opts.optionalmarker.start === txt.charAt(i) || opts.optionalmarker.end === txt.charAt(i) || opts.quantifiermarker.start === txt.charAt(i) || opts.quantifiermarker.end === txt.charAt(i) || opts.groupmarker.start === txt.charAt(i) || opts.groupmarker.end === txt.charAt(i) || opts.alternatormarker === txt.charAt(i) ? escapedTxt += "\\" + txt.charAt(i) : escapedTxt += txt.charAt(i); 2503 return escapedTxt; 2504 } 2505 return Inputmask.extendAliases({ 2506 numeric: { 2507 mask: function(opts) { 2508 if (0 !== opts.repeat && isNaN(opts.integerDigits) && (opts.integerDigits = opts.repeat), 2509 opts.repeat = 0, opts.groupSeparator === opts.radixPoint && ("." === opts.radixPoint ? opts.groupSeparator = "," : "," === opts.radixPoint ? opts.groupSeparator = "." : opts.groupSeparator = ""), 2510 " " === opts.groupSeparator && (opts.skipOptionalPartCharacter = undefined), opts.autoGroup = opts.autoGroup && "" !== opts.groupSeparator, 2511 opts.autoGroup && ("string" == typeof opts.groupSize && isFinite(opts.groupSize) && (opts.groupSize = parseInt(opts.groupSize)), 2512 isFinite(opts.integerDigits))) { 2513 var seps = Math.floor(opts.integerDigits / opts.groupSize), mod = opts.integerDigits % opts.groupSize; 2514 opts.integerDigits = parseInt(opts.integerDigits) + (0 === mod ? seps - 1 : seps), 2515 opts.integerDigits < 1 && (opts.integerDigits = "*"); 2516 } 2517 opts.placeholder.length > 1 && (opts.placeholder = opts.placeholder.charAt(0)), 2518 "radixFocus" === opts.positionCaretOnClick && "" === opts.placeholder && !1 === opts.integerOptional && (opts.positionCaretOnClick = "lvp"), 2519 opts.definitions[";"] = opts.definitions["~"], opts.definitions[";"].definitionSymbol = "~", 2520 !0 === opts.numericInput && (opts.positionCaretOnClick = "radixFocus" === opts.positionCaretOnClick ? "lvp" : opts.positionCaretOnClick, 2521 opts.digitsOptional = !1, isNaN(opts.digits) && (opts.digits = 2), opts.decimalProtect = !1); 2522 var mask = "[+]"; 2523 if (mask += autoEscape(opts.prefix, opts), !0 === opts.integerOptional ? mask += "~{1," + opts.integerDigits + "}" : mask += "~{" + opts.integerDigits + "}", 2524 opts.digits !== undefined) { 2525 opts.radixPointDefinitionSymbol = opts.decimalProtect ? ":" : opts.radixPoint; 2526 var dq = opts.digits.toString().split(","); 2527 isFinite(dq[0] && dq[1] && isFinite(dq[1])) ? mask += opts.radixPointDefinitionSymbol + ";{" + opts.digits + "}" : (isNaN(opts.digits) || parseInt(opts.digits) > 0) && (opts.digitsOptional ? mask += "[" + opts.radixPointDefinitionSymbol + ";{1," + opts.digits + "}]" : mask += opts.radixPointDefinitionSymbol + ";{" + opts.digits + "}"); 2528 } 2529 return mask += autoEscape(opts.suffix, opts), mask += "[-]", opts.greedy = !1, mask; 2530 }, 2531 placeholder: "", 2532 greedy: !1, 2533 digits: "*", 2534 digitsOptional: !0, 2535 enforceDigitsOnBlur: !1, 2536 radixPoint: ".", 2537 positionCaretOnClick: "radixFocus", 2538 groupSize: 3, 2539 groupSeparator: "", 2540 autoGroup: !1, 2541 allowMinus: !0, 2542 negationSymbol: { 2543 front: "-", 2544 back: "" 2545 }, 2546 integerDigits: "+", 2547 integerOptional: !0, 2548 prefix: "", 2549 suffix: "", 2550 rightAlign: !0, 2551 decimalProtect: !0, 2552 min: null, 2553 max: null, 2554 step: 1, 2555 insertMode: !0, 2556 autoUnmask: !1, 2557 unmaskAsNumber: !1, 2558 inputmode: "numeric", 2559 preValidation: function(buffer, pos, c, isSelection, opts) { 2560 if ("-" === c || c === opts.negationSymbol.front) return !0 === opts.allowMinus && (opts.isNegative = opts.isNegative === undefined || !opts.isNegative, 2561 "" === buffer.join("") || { 2562 caret: pos, 2563 dopost: !0 2564 }); 2565 if (!1 === isSelection && c === opts.radixPoint && opts.digits !== undefined && (isNaN(opts.digits) || parseInt(opts.digits) > 0)) { 2566 var radixPos = $.inArray(opts.radixPoint, buffer); 2567 if (-1 !== radixPos) return !0 === opts.numericInput ? pos === radixPos : { 2568 caret: radixPos + 1 2569 }; 2570 } 2571 return !0; 2572 }, 2573 postValidation: function(buffer, currentResult, opts) { 2574 var suffix = opts.suffix.split(""), prefix = opts.prefix.split(""); 2575 if (currentResult.pos === undefined && currentResult.caret !== undefined && !0 !== currentResult.dopost) return currentResult; 2576 var caretPos = currentResult.caret !== undefined ? currentResult.caret : currentResult.pos, maskedValue = buffer.slice(); 2577 opts.numericInput && (caretPos = maskedValue.length - caretPos - 1, maskedValue = maskedValue.reverse()); 2578 var charAtPos = maskedValue[caretPos]; 2579 if (charAtPos === opts.groupSeparator && (charAtPos = maskedValue[caretPos += 1]), 2580 caretPos === maskedValue.length - opts.suffix.length - 1 && charAtPos === opts.radixPoint) return currentResult; 2581 charAtPos !== undefined && charAtPos !== opts.radixPoint && charAtPos !== opts.negationSymbol.front && charAtPos !== opts.negationSymbol.back && (maskedValue[caretPos] = "?", 2582 opts.prefix.length > 0 && caretPos >= (!1 === opts.isNegative ? 1 : 0) && caretPos < opts.prefix.length - 1 + (!1 === opts.isNegative ? 1 : 0) ? prefix[caretPos - (!1 === opts.isNegative ? 1 : 0)] = "?" : opts.suffix.length > 0 && caretPos >= maskedValue.length - opts.suffix.length - (!1 === opts.isNegative ? 1 : 0) && (suffix[caretPos - (maskedValue.length - opts.suffix.length - (!1 === opts.isNegative ? 1 : 0))] = "?")), 2583 prefix = prefix.join(""), suffix = suffix.join(""); 2584 var processValue = maskedValue.join("").replace(prefix, ""); 2585 if (processValue = processValue.replace(suffix, ""), processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""), 2586 processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), ""), 2587 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""), 2588 isNaN(opts.placeholder) && (processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.placeholder), "g"), "")), 2589 processValue.length > 1 && 1 !== processValue.indexOf(opts.radixPoint) && ("0" === charAtPos && (processValue = processValue.replace(/^\?/g, "")), 2590 processValue = processValue.replace(/^0/g, "")), processValue.charAt(0) === opts.radixPoint && "" !== opts.radixPoint && !0 !== opts.numericInput && (processValue = "0" + processValue), 2591 "" !== processValue) { 2592 if (processValue = processValue.split(""), (!opts.digitsOptional || opts.enforceDigitsOnBlur && "blur" === currentResult.event) && isFinite(opts.digits)) { 2593 var radixPosition = $.inArray(opts.radixPoint, processValue), rpb = $.inArray(opts.radixPoint, maskedValue); 2594 -1 === radixPosition && (processValue.push(opts.radixPoint), radixPosition = processValue.length - 1); 2595 for (var i = 1; i <= opts.digits; i++) opts.digitsOptional && (!opts.enforceDigitsOnBlur || "blur" !== currentResult.event) || processValue[radixPosition + i] !== undefined && processValue[radixPosition + i] !== opts.placeholder.charAt(0) ? -1 !== rpb && maskedValue[rpb + i] !== undefined && (processValue[radixPosition + i] = processValue[radixPosition + i] || maskedValue[rpb + i]) : processValue[radixPosition + i] = currentResult.placeholder || opts.placeholder.charAt(0); 2596 } 2597 if (!0 !== opts.autoGroup || "" === opts.groupSeparator || charAtPos === opts.radixPoint && currentResult.pos === undefined && !currentResult.dopost) processValue = processValue.join(""); else { 2598 var addRadix = processValue[processValue.length - 1] === opts.radixPoint && currentResult.c === opts.radixPoint; 2599 processValue = Inputmask(function(buffer, opts) { 2600 var postMask = ""; 2601 if (postMask += "(" + opts.groupSeparator + "*{" + opts.groupSize + "}){*}", "" !== opts.radixPoint) { 2602 var radixSplit = buffer.join("").split(opts.radixPoint); 2603 radixSplit[1] && (postMask += opts.radixPoint + "*{" + radixSplit[1].match(/^\d*\??\d*/)[0].length + "}"); 2604 } 2605 return postMask; 2606 }(processValue, opts), { 2607 numericInput: !0, 2608 jitMasking: !0, 2609 definitions: { 2610 "*": { 2611 validator: "[0-9?]", 2612 cardinality: 1 2613 } 2614 } 2615 }).format(processValue.join("")), addRadix && (processValue += opts.radixPoint), 2616 processValue.charAt(0) === opts.groupSeparator && processValue.substr(1); 2617 } 2618 } 2619 if (opts.isNegative && "blur" === currentResult.event && (opts.isNegative = "0" !== processValue), 2620 processValue = prefix + processValue, processValue += suffix, opts.isNegative && (processValue = opts.negationSymbol.front + processValue, 2621 processValue += opts.negationSymbol.back), processValue = processValue.split(""), 2622 charAtPos !== undefined) if (charAtPos !== opts.radixPoint && charAtPos !== opts.negationSymbol.front && charAtPos !== opts.negationSymbol.back) (caretPos = $.inArray("?", processValue)) > -1 ? processValue[caretPos] = charAtPos : caretPos = currentResult.caret || 0; else if (charAtPos === opts.radixPoint || charAtPos === opts.negationSymbol.front || charAtPos === opts.negationSymbol.back) { 2623 var newCaretPos = $.inArray(charAtPos, processValue); 2624 -1 !== newCaretPos && (caretPos = newCaretPos); 2625 } 2626 opts.numericInput && (caretPos = processValue.length - caretPos - 1, processValue = processValue.reverse()); 2627 var rslt = { 2628 caret: charAtPos === undefined || currentResult.pos !== undefined ? caretPos + (opts.numericInput ? -1 : 1) : caretPos, 2629 buffer: processValue, 2630 refreshFromBuffer: currentResult.dopost || buffer.join("") !== processValue.join("") 2631 }; 2632 return rslt.refreshFromBuffer ? rslt : currentResult; 2633 }, 2634 onBeforeWrite: function(e, buffer, caretPos, opts) { 2635 if (e) switch (e.type) { 2636 case "keydown": 2637 return opts.postValidation(buffer, { 2638 caret: caretPos, 2639 dopost: !0 2640 }, opts); 2641 2642 case "blur": 2643 case "checkval": 2644 var unmasked; 2645 if (function(opts) { 2646 opts.parseMinMaxOptions === undefined && (null !== opts.min && (opts.min = opts.min.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""), 2647 "," === opts.radixPoint && (opts.min = opts.min.replace(opts.radixPoint, ".")), 2648 opts.min = isFinite(opts.min) ? parseFloat(opts.min) : NaN, isNaN(opts.min) && (opts.min = Number.MIN_VALUE)), 2649 null !== opts.max && (opts.max = opts.max.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""), 2650 "," === opts.radixPoint && (opts.max = opts.max.replace(opts.radixPoint, ".")), 2651 opts.max = isFinite(opts.max) ? parseFloat(opts.max) : NaN, isNaN(opts.max) && (opts.max = Number.MAX_VALUE)), 2652 opts.parseMinMaxOptions = "done"); 2653 }(opts), null !== opts.min || null !== opts.max) { 2654 if (unmasked = opts.onUnMask(buffer.join(""), undefined, $.extend({}, opts, { 2655 unmaskAsNumber: !0 2656 })), null !== opts.min && unmasked < opts.min) return opts.isNegative = opts.min < 0, 2657 opts.postValidation(opts.min.toString().replace(".", opts.radixPoint).split(""), { 2658 caret: caretPos, 2659 dopost: !0, 2660 placeholder: "0" 2661 }, opts); 2662 if (null !== opts.max && unmasked > opts.max) return opts.isNegative = opts.max < 0, 2663 opts.postValidation(opts.max.toString().replace(".", opts.radixPoint).split(""), { 2664 caret: caretPos, 2665 dopost: !0, 2666 placeholder: "0" 2667 }, opts); 2668 } 2669 return opts.postValidation(buffer, { 2670 caret: caretPos, 2671 placeholder: "0", 2672 event: "blur" 2673 }, opts); 2674 2675 case "_checkval": 2676 return { 2677 caret: caretPos 2678 }; 2679 } 2680 }, 2681 regex: { 2682 integerPart: function(opts, emptyCheck) { 2683 return emptyCheck ? new RegExp("[" + Inputmask.escapeRegex(opts.negationSymbol.front) + "+]?") : new RegExp("[" + Inputmask.escapeRegex(opts.negationSymbol.front) + "+]?\\d+"); 2684 }, 2685 integerNPart: function(opts) { 2686 return new RegExp("[\\d"
2686+ Inputmask.escapeRegex(opts.groupSeparator) + Inputmask.escapeRegex(opts.placeholder.charAt(0)) + "]+"); 2687 } 2688 }, 2689 definitions: { 2690 "~": { 2691 validator: function(chrs, maskset, pos, strict, opts, isSelection) { 2692 var isValid = strict ? new RegExp("[0-9" + Inputmask.escapeRegex(opts.groupSeparator) + "]").test(chrs) : new RegExp("[0-9]").test(chrs); 2693 if (!0 === isValid) { 2694 if (!0 !== opts.numericInput && maskset.validPositions[pos] !== undefined && "~" === maskset.validPositions[pos].match.def && !isSelection) { 2695 var processValue = maskset.buffer.join(""), pvRadixSplit = (processValue = (processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), "")).replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), "")).split(opts.radixPoint); 2696 pvRadixSplit.length > 1 && (pvRadixSplit[1] = pvRadixSplit[1].replace(/0/g, opts.placeholder.charAt(0))), 2697 "0" === pvRadixSplit[0] && (pvRadixSplit[0] = pvRadixSplit[0].replace(/0/g, opts.placeholder.charAt(0))), 2698 processValue = pvRadixSplit[0] + opts.radixPoint + pvRadixSplit[1] || ""; 2699 var bufferTemplate = maskset._buffer.join(""); 2700 for (processValue === opts.radixPoint && (processValue = bufferTemplate); null === processValue.match(Inputmask.escapeRegex(bufferTemplate) + "$"); ) bufferTemplate = bufferTemplate.slice(1); 2701 isValid = (processValue = (processValue = processValue.replace(bufferTemplate, "")).split(""))[pos] === undefined ? { 2702 pos: pos, 2703 remove: pos 2704 } : { 2705 pos: pos 2706 }; 2707 } 2708 } else strict || chrs !== opts.radixPoint || maskset.validPositions[pos - 1] !== undefined || (maskset.buffer[pos] = "0", 2709 isValid = { 2710 pos: pos + 1 2711 }); 2712 return isValid; 2713 }, 2714 cardinality: 1 2715 }, 2716 "+": { 2717 validator: function(chrs, maskset, pos, strict, opts) { 2718 return opts.allowMinus && ("-" === chrs || chrs === opts.negationSymbol.front); 2719 }, 2720 cardinality: 1, 2721 placeholder: "" 2722 }, 2723 "-": { 2724 validator: function(chrs, maskset, pos, strict, opts) { 2725 return opts.allowMinus && chrs === opts.negationSymbol.back; 2726 }, 2727 cardinality: 1, 2728 placeholder: "" 2729 }, 2730 ":": { 2731 validator: function(chrs, maskset, pos, strict, opts) { 2732 var radix = "[" + Inputmask.escapeRegex(opts.radixPoint) + "]", isValid = new RegExp(radix).test(chrs); 2733 return isValid && maskset.validPositions[pos] && maskset.validPositions[pos].match.placeholder === opts.radixPoint && (isValid = { 2734 caret: pos + 1 2735 }), isValid; 2736 }, 2737 cardinality: 1, 2738 placeholder: function(opts) { 2739 return opts.radixPoint; 2740 } 2741 } 2742 }, 2743 onUnMask: function(maskedValue, unmaskedValue, opts) { 2744 if ("" === unmaskedValue && !0 === opts.nullable) return unmaskedValue; 2745 var processValue = maskedValue.replace(opts.prefix, ""); 2746 return processValue = processValue.replace(opts.suffix, ""), processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""), 2747 "" !== opts.placeholder.charAt(0) && (processValue = processValue.replace(new RegExp(opts.placeholder.charAt(0), "g"), "0")), 2748 opts.unmaskAsNumber ? ("" !== opts.radixPoint && -1 !== processValue.indexOf(opts.radixPoint) && (processValue = processValue.replace(Inputmask.escapeRegex.call(this, opts.radixPoint), ".")), 2749 processValue = processValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-"), 2750 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""), 2751 Number(processValue)) : processValue; 2752 }, 2753 isComplete: function(buffer, opts) { 2754 var maskedValue = buffer.join(""); 2755 if (buffer.slice().join("") !== maskedValue) return !1; 2756 var processValue = maskedValue.replace(opts.prefix, ""); 2757 return processValue = processValue.replace(opts.suffix, ""), processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""), 2758 "," === opts.radixPoint && (processValue = processValue.replace(Inputmask.escapeRegex(opts.radixPoint), ".")), 2759 isFinite(processValue); 2760 }, 2761 onBeforeMask: function(initialValue, opts) { 2762 if (opts.isNegative = undefined, initialValue = initialValue.toString().charAt(initialValue.length - 1) === opts.radixPoint ? initialValue.toString().substr(0, initialValue.length - 1) : initialValue.toString(), 2763 "" !== opts.radixPoint && isFinite(initialValue)) { 2764 var vs = initialValue.split("."), groupSize = "" !== opts.groupSeparator ? parseInt(opts.groupSize) : 0; 2765 2 === vs.length && (vs[0].length > groupSize || vs[1].length > groupSize || vs[0].length <= groupSize && vs[1].length < groupSize) && (initialValue = initialValue.replace(".", opts.radixPoint)); 2766 } 2767 var kommaMatches = initialValue.match(/,/g), dotMatches = initialValue.match(/\./g); 2768 if (initialValue = dotMatches && kommaMatches ? dotMatches.length > kommaMatches.length ? (initialValue = initialValue.replace(/\./g, "")).replace(",", opts.radixPoint) : kommaMatches.length > dotMatches.length ? (initialValue = initialValue.replace(/,/g, "")).replace(".", opts.radixPoint) : initialValue.indexOf(".") < initialValue.indexOf(",") ? initialValue.replace(/\./g, "") : initialValue.replace(/,/g, "") : initialValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""), 2769 0 === opts.digits && (-1 !== initialValue.indexOf(".") ? initialValue = initialValue.substring(0, initialValue.indexOf(".")) : -1 !== initialValue.indexOf(",") && (initialValue = initialValue.substring(0, initialValue.indexOf(",")))), 2770 "" !== opts.radixPoint && isFinite(opts.digits) && -1 !== initialValue.indexOf(opts.radixPoint)) { 2771 var decPart = initialValue.split(opts.radixPoint)[1].match(new RegExp("\\d*"))[0]; 2772 if (parseInt(opts.digits) < decPart.toString().length) { 2773 var digitsFactor = Math.pow(10, parseInt(opts.digits)); 2774 initialValue = initialValue.replace(Inputmask.escapeRegex(opts.radixPoint), "."), 2775 initialValue = (initialValue = Math.round(parseFloat(initialValue) * digitsFactor) / digitsFactor).toString().replace(".", opts.radixPoint); 2776 } 2777 } 2778 return initialValue; 2779 }, 2780 canClearPosition: function(maskset, position, lvp, strict, opts) { 2781 var vp = maskset.validPositions[position], canClear = vp.input !== opts.radixPoint || null !== maskset.validPositions[position].match.fn && !1 === opts.decimalProtect || vp.input === opts.radixPoint && maskset.validPositions[position + 1] && null === maskset.validPositions[position + 1].match.fn || isFinite(vp.input) || position === lvp || vp.input === opts.groupSeparator || vp.input === opts.negationSymbol.front || vp.input === opts.negationSymbol.back; 2782 return !canClear || "+" !== vp.match.nativeDef && "-" !== vp.match.nativeDef || (opts.isNegative = !1), 2783 canClear; 2784 }, 2785 onKeyDown: function(e, buffer, caretPos, opts) { 2786 var $input = $(this); 2787 if (e.ctrlKey) switch (e.keyCode) { 2788 case Inputmask.keyCode.UP: 2789 $input.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(opts.step)), $input.trigger("setvalue"); 2790 break; 2791 2792 case Inputmask.keyCode.DOWN: 2793 $input.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(opts.step)), $input.trigger("setvalue"); 2794 } 2795 } 2796 }, 2797 currency: { 2798 prefix: "$ ", 2799 groupSeparator: ",", 2800 alias: "numeric", 2801 placeholder: "0", 2802 autoGroup: !0, 2803 digits: 2, 2804 digitsOptional: !1, 2805 clearMaskOnLostFocus: !1 2806 },
2807 decimal: { 2808 alias: "numeric" 2809 }, 2810 integer: { 2811 alias: "numeric", 2812 digits: 0, 2813 radixPoint: "" 2814 }, 2815 percentage: { 2816 alias: "numeric", 2817 digits: 2, 2818 digitsOptional: !0, 2819 radixPoint: ".", 2820 placeholder: "0", 2821 autoGroup: !1, 2822 min: 0, 2823 max: 100, 2824 suffix: " %", 2825 allowMinus: !1 2826 } 2827 }), Inputmask; 2828 }); 2829}, function(module, exports, __webpack_require__) { 2830 "use strict"; 2831 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 2832 "function" == typeof Symbol && Symbol.iterator; 2833 !function(factory) { 2834 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(0), __webpack_require__(1) ], 2835 void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = factory) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2836 }(function($, Inputmask) { 2837 function maskSort(a, b) { 2838 var maska = (a.mask || a).replace(/#/g, "9").replace(/\)/, "9").replace(/[+()#-]/g, ""), maskb = (b.mask || b).replace(/#/g, "9").replace(/\)/, "9").replace(/[+()#-]/g, ""), maskas = (a.mask || a).split("#")[0], maskbs = (b.mask || b).split("#")[0]; 2839 return 0 === maskbs.indexOf(maskas) ? -1 : 0 === maskas.indexOf(maskbs) ? 1 : maska.localeCompare(maskb); 2840 } 2841 var analyseMaskBase = Inputmask.prototype.analyseMask; 2842 return Inputmask.prototype.analyseMask = function(mask, regexMask, opts) { 2843 function reduceVariations(masks, previousVariation, previousmaskGroup) { 2844 previousVariation = previousVariation || "", previousmaskGroup = previousmaskGroup || maskGroups, 2845 "" !== previousVariation && (previousmaskGroup[previousVariation] = {}); 2846 for (var variation = "", maskGroup = previousmaskGroup[previousVariation] || previousmaskGroup, i = masks.length - 1; i >= 0; i--) maskGroup[variation = (mask = masks[i].mask || masks[i]).substr(0, 1)] = maskGroup[variation] || [], 2847 maskGroup[variation].unshift(mask.substr(1)), masks.splice(i, 1); 2848 for (var ndx in maskGroup) maskGroup[ndx].length > 500 && reduceVariations(maskGroup[ndx].slice(), ndx, maskGroup); 2849 } 2850 function rebuild(maskGroup) { 2851 var mask = "", submasks = []; 2852 for (var ndx in maskGroup) $.isArray(maskGroup[ndx]) ? 1 === maskGroup[ndx].length ? submasks.push(ndx + maskGroup[ndx]) : submasks.push(ndx + opts.groupmarker.start + maskGroup[ndx].join(opts.groupmarker.end + opts.alternatormarker + opts.groupmarker.start) + opts.groupmarker.end) : submasks.push(ndx + rebuild(maskGroup[ndx])); 2853 return 1 === submasks.length ? mask += submasks[0] : mask += opts.groupmarker.start + submasks.join(opts.groupmarker.end + opts.alternatormarker + opts.groupmarker.start) + opts.groupmarker.end, 2854 mask; 2855 } 2856 var maskGroups = {}; 2857 return opts.phoneCodes && (opts.phoneCodes && opts.phoneCodes.length > 1e3 && (reduceVariations((mask = mask.substr(1, mask.length - 2)).split(opts.groupmarker.end + opts.alternatormarker + opts.groupmarker.start)), 2858 mask = rebuild(maskGroups)), mask = mask.replace(/9/g, "\\9")), analyseMaskBase.call(this, mask, regexMask, opts); 2859 }, Inputmask.extendAliases({ 2860 abstractphone: { 2861 groupmarker: { 2862 start: "<", 2863 end: ">" 2864 }, 2865 countrycode: "", 2866 phoneCodes: [], 2867 mask: function(opts) { 2868 return opts.definitions = { 2869 "#": Inputmask.prototype.definitions[9] 2870 }, opts.phoneCodes.sort(maskSort); 2871 }, 2872 keepStatic: !0, 2873 onBeforeMask: function(value, opts) { 2874 var processedValue = value.replace(/^0{1,2}/, "").replace(/[\s]/g, ""); 2875 return (processedValue.indexOf(opts.countrycode) > 1 || -1 === processedValue.indexOf(opts.countrycode)) && (processedValue = "+" + opts.c
vendor: 11,707 bytes, lines 2875-3055
2875ountrycode + processedValue), 2876 processedValue; 2877 }, 2878 onUnMask: function(maskedValue, unmaskedValue, opts) { 2879 return maskedValue.replace(/[()#-]/g, ""); 2880 }, 2881 inputmode: "tel" 2882 } 2883 }), Inputmask; 2884 }); 2885}, function(module, exports, __webpack_require__) { 2886 "use strict"; 2887 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 2888 "function" == typeof Symbol && Symbol.iterator; 2889 !function(factory) { 2890 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(0), __webpack_require__(1) ], 2891 void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = factory) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2892 }(function($, Inputmask) { 2893 return Inputmask.extendAliases({ 2894 Regex: { 2895 mask: "r", 2896 greedy: !1, 2897 repeat: "*", 2898 regex: null, 2899 regexTokens: null, 2900 tokenizer: /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g, 2901 quantifierFilter: /[0-9]+[^,]/, 2902 isComplete: function(buffer, opts) { 2903 return new RegExp(opts.regex, opts.casing ? "i" : "").test(buffer.join("")); 2904 }, 2905 definitions: { 2906 r: { 2907 validator: function(chrs, maskset, pos, strict, opts) { 2908 function RegexToken(isGroup, isQuantifier) { 2909 this.matches = [], this.isGroup = isGroup || !1, this.isQuantifier = isQuantifier || !1, 2910 this.quantifier = { 2911 min: 1, 2912 max: 1 2913 }, this.repeaterPart = void 0; 2914 } 2915 function validateRegexToken(token, fromGroup) { 2916 var isvalid = !1; 2917 fromGroup && (regexPart += "(", openGroupCount++); 2918 for (var mndx = 0; mndx < token.matches.length; mndx++) { 2919 var matchToken = token.matches[mndx]; 2920 if (!0 === matchToken.isGroup) isvalid = validateRegexToken(matchToken, !0); else if (!0 === matchToken.isQuantifier) { 2921 var crrntndx = $.inArray(matchToken, token.matches), matchGroup = token.matches[crrntndx - 1], regexPartBak = regexPart; 2922 if (isNaN(matchToken.quantifier.max)) { 2923 for (;matchToken.repeaterPart && matchToken.repeaterPart !== regexPart && matchToken.repeaterPart.length > regexPart.length && !(isvalid = validateRegexToken(matchGroup, !0)); ) ; 2924 (isvalid = isvalid || validateRegexToken(matchGroup, !0)) && (matchToken.repeaterPart = regexPart), 2925 regexPart = regexPartBak + matchToken.quantifier.max; 2926 } else { 2927 for (var i = 0, qm = matchToken.quantifier.max - 1; i < qm && !(isvalid = validateRegexToken(matchGroup, !0)); i++) ; 2928 regexPart = regexPartBak + "{" + matchToken.quantifier.min + "," + matchToken.quantifier.max + "}"; 2929 } 2930 } else if (void 0 !== matchToken.matches) for (var k = 0; k < matchToken.length && !(isvalid = validateRegexToken(matchToken[k], fromGroup)); k++) ; else { 2931 var testExp; 2932 if ("[" == matchToken.charAt(0)) { 2933 testExp = regexPart, testExp += matchToken; 2934 for (j = 0; j < openGroupCount; j++) testExp += ")"; 2935 isvalid = (exp = new RegExp("^(" + testExp + ")$", opts.casing ? "i" : "")).test(bufferStr); 2936 } else for (var l = 0, tl = matchToken.length; l < tl; l++) if ("\\" !== matchToken.charAt(l)) { 2937 testExp = regexPart, testExp = (testExp += matchToken.substr(0, l + 1)).replace(/\|$/, ""); 2938 for (var j = 0; j < openGroupCount; j++) testExp += ")"; 2939 var exp = new RegExp("^(" + testExp + ")$", opts.casing ? "i" : ""); 2940 if (isvalid = exp.test(bufferStr)) break; 2941 } 2942 regexPart += matchToken; 2943 } 2944 if (isvalid) break; 2945 } 2946 return fromGroup && (regexPart += ")", openGroupCount--), isvalid; 2947 } 2948 var bufferStr, groupToken, cbuffer = maskset.buffer.slice(), regexPart = "", isValid = !1, openGroupCount = 0; 2949 null === opts.regexTokens && function() { 2950 var match, m, currentToken = new RegexToken(), opengroups = []; 2951 for (opts.regexTokens = []; match = opts.tokenizer.exec(opts.regex); ) switch ((m = match[0]).charAt(0)) { 2952 case "(": 2953 opengroups.push(new RegexToken(!0)); 2954 break; 2955 2956 case ")": 2957 groupToken = opengroups.pop(), opengroups.length > 0 ? opengroups[opengroups.length - 1].matches.push(groupToken) : currentToken.matches.push(groupToken); 2958 break; 2959 2960 case "{": 2961 case "+": 2962 case "*": 2963 var quantifierToken = new RegexToken(!1, !0), mq = (m = m.replace(/[{}]/g, "")).split(","), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = 1 === mq.length ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]); 2964 if (quantifierToken.quantifier = { 2965 min: mq0, 2966 max: mq1 2967 }, opengroups.length > 0) { 2968 var matches = opengroups[opengroups.length - 1].matches; 2969 (match = matches.pop()).isGroup || ((groupToken = new RegexToken(!0)).matches.push(match), 2970 match = groupToken), matches.push(match), matches.push(quantifierToken); 2971 } else (match = currentToken.matches.pop()).isGroup || ((groupToken = new RegexToken(!0)).matches.push(match), 2972 match = groupToken), currentToken.matches.push(match), currentToken.matches.push(quantifierToken); 2973 break; 2974 2975 default: 2976 opengroups.length > 0 ? opengroups[opengroups.length - 1].matches.push(m) : currentToken.matches.push(m); 2977 } 2978 currentToken.matches.length > 0 && opts.regexTokens.push(currentToken); 2979 }(), cbuffer.splice(pos, 0, chrs), bufferStr = cbuffer.join(""); 2980 for (var i = 0; i < opts.regexTokens.length; i++) { 2981 var regexToken = opts.regexTokens[i]; 2982 if (isValid = validateRegexToken(regexToken, regexToken.isGroup)) break; 2983 } 2984 return isValid; 2985 }, 2986 cardinality: 1 2987 } 2988 } 2989 } 2990 }), Inputmask; 2991 }); 2992}, function(module, exports, __webpack_require__) { 2993 "use strict"; 2994 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__, _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { 2995 return typeof obj; 2996 } : function(obj) { 2997 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 2998 }; 2999 !function(factory) { 3000 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2), __webpack_require__(1) ], 3001 void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = factory) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 3002 }(function($, Inputmask) { 3003 return void 0 === $.fn.inputmask && ($.fn.inputmask = function(fn, options) { 3004 var nptmask, input = this[0]; 3005 if (void 0 === options && (options = {}), "string" == typeof fn) switch (fn) { 3006 case "unmaskedvalue": 3007 return input && input.inputmask ? input.inputmask.unmaskedvalue() : $(input).val(); 3008 3009 case "remove": 3010 return this.each(function() { 3011 this.inputmask && this.inputmask.remove(); 3012 }); 3013 3014 case "getemptymask": 3015 return input && input.inputmask ? input.inputmask.getemptymask() : ""; 3016 3017 case "hasMaskedValue": 3018 return !(!input || !input.inputmask) && input.inputmask.hasMaskedValue(); 3019 3020 case "isComplete": 3021 return !input || !input.inputmask || input.inputmask.isComplete(); 3022 3023 case "getmetadata": 3024 return input && input.inputmask ? input.inputmask.getmetadata() : void 0; 3025 3026 case "setvalue": 3027 $(input).val(options), input && void 0 === input.inputmask && $(input).triggerHandler("setvalue"); 3028 break; 3029 3030 case "option": 3031 if ("string" != typeof options) return this.each(function() { 3032 if (void 0 !== this.inputmask) return this.inputmask.option(options); 3033 }); 3034 if (input && void 0 !== input.inputmask) return input.inputmask.option(options); 3035 break; 3036 3037 default: 3038 return options.alias = fn, nptmask = new Inputmask(options), this.each(function() { 3039 nptmask.mask(this); 3040 }); 3041 } else { 3042 if ("object" == (void 0 === fn ? "undefined" : _typeof(fn))) return nptmask = new Inputmask(fn), 3043 void 0 === fn.mask && void 0 === fn.alias ? this.each(function() { 3044 if (void 0 !== this.inputmask) return this.inputmask.option(fn); 3045 nptmask.mask(this); 3046 }) : this.each(function() { 3047 nptmask.mask(this); 3048 }); 3049 if (void 0 === fn) return this.each(function() { 3050 (nptmask = new Inputmask(options)).mask(this); 3051 }); 3052 } 3053 }), $.fn.inputmask; 3054 }); 3055} ]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.