smssakutoko
Version:
MPWA Multi device beta
810 lines (799 loc) • 181 kB
JavaScript
/*!
* dist/jquery.inputmask
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2021 Robin Herbots
* Licensed under the MIT license
* Version: 5.0.6-beta.56
*/
!function(e, t) {
if ("object" == typeof exports && "object" == typeof module) module.exports = t(require("jquery")); else if ("function" == typeof define && define.amd) define([ "jquery" ], t); else {
var a = "object" == typeof exports ? t(require("jquery")) : t(e.jQuery);
for (var i in a) ("object" == typeof exports ? exports : e)[i] = a[i];
}
}(this, (function(e) {
return function() {
"use strict";
var t = {
4528: function(e) {
e.exports = JSON.parse('{"BACKSPACE":8,"BACKSPACE_SAFARI":127,"DELETE":46,"DOWN":40,"END":35,"ENTER":13,"ESCAPE":27,"HOME":36,"INSERT":45,"LEFT":37,"PAGE_DOWN":34,"PAGE_UP":33,"RIGHT":39,"SPACE":32,"TAB":9,"UP":38,"X":88,"Z":90,"CONTROL":17,"PAUSE/BREAK":19,"WINDOWS_LEFT":91,"WINDOWS_RIGHT":92,"KEY_229":229}');
},
3046: function(e, t, a) {
var i;
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0, a(3851), a(219), a(207), a(5296);
var n = ((i = a(2394)) && i.__esModule ? i : {
default: i
}).default;
t.default = n;
},
8741: function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var a = !("undefined" == typeof window || !window.document || !window.document.createElement);
t.default = a;
},
3976: function(e, t, a) {
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var i, n = (i = a(4528)) && i.__esModule ? i : {
default: i
};
var r = {
_maxTestPos: 500,
placeholder: "_",
optionalmarker: [ "[", "]" ],
quantifiermarker: [ "{", "}" ],
groupmarker: [ "(", ")" ],
alternatormarker: "|",
escapeChar: "\\",
mask: null,
regex: null,
oncomplete: function() {},
onincomplete: function() {},
oncleared: function() {},
repeat: 0,
greedy: !1,
autoUnmask: !1,
removeMaskOnSubmit: !1,
clearMaskOnLostFocus: !0,
insertMode: !0,
insertModeVisual: !0,
clearIncomplete: !1,
alias: null,
onKeyDown: function() {},
onBeforeMask: null,
onBeforePaste: function(e, t) {
return "function" == typeof t.onBeforeMask ? t.onBeforeMask.call(this, e, t) : e;
},
onBeforeWrite: null,
onUnMask: null,
showMaskOnFocus: !0,
showMaskOnHover: !0,
onKeyValidation: function() {},
skipOptionalPartCharacter: " ",
numericInput: !1,
rightAlign: !1,
undoOnEscape: !0,
radixPoint: "",
_radixDance: !1,
groupSeparator: "",
keepStatic: null,
positionCaretOnTab: !0,
tabThrough: !1,
supportsInputType: [ "text", "tel", "url", "password", "search" ],
ignorables: [ n.default.BACKSPACE, n.default.TAB, n.default["PAUSE/BREAK"], n.default.ESCAPE, n.default.PAGE_UP, n.default.PAGE_DOWN, n.default.END, n.default.HOME, n.default.LEFT, n.default.UP, n.default.RIGHT, n.default.DOWN, n.default.INSERT, n.default.DELETE, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 0, 229 ],
isComplete: null,
preValidation: null,
postValidation: null,
staticDefinitionSymbol: void 0,
jitMasking: !1,
nullable: !0,
inputEventOnly: !1,
noValuePatching: !1,
positionCaretOnClick: "lvp",
casing: null,
inputmode: "text",
importDataAttributes: !0,
shiftPositions: !0,
usePrototypeDefinitions: !0,
validationEventTimeOut: 3e3
};
t.default = r;
},
7392: function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
t.default = {
9: {
validator: "[0-9\uff10-\uff19]",
definitionSymbol: "*"
},
a: {
validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
definitionSymbol: "*"
},
"*": {
validator: "[0-9\uff10-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]"
}
};
},
3287: function(e, t, a) {
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var i, n = (i = a(8254)) && i.__esModule ? i : {
default: i
};
if (void 0 === n.default) throw "jQuery not loaded!";
var r = n.default;
t.default = r;
},
9845: function(e, t, a) {
Object.defineProperty(t, "__esModule", {
value: !0
}), t.iphone = t.iemobile = t.mobile = t.ie = t.ua = void 0;
var i, n = (i = a(9380)) && i.__esModule ? i : {
default: i
};
var r = n.default.navigator && n.default.navigator.userAgent || "", o = r.indexOf("MSIE ") > 0 || r.indexOf("Trident/") > 0, s = "ontouchstart" in n.default, l = /iemobile/i.test(r), u = /iphone/i.test(r) && !l;
t.iphone = u, t.iemobile = l, t.mobile = s, t.ie = o, t.ua = r;
},
7184: function(e, t) {
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = function(e) {
return e.replace(a, "\\$1");
};
var a = new RegExp("(\\" + [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^" ].join("|\\") + ")", "gim");
},
6030: function(e, t, a) {
Object.defineProperty(t, "__esModule", {
value: !0
}), t.EventHandlers = void 0;
var i, n = a(8711), r = (i = a(4528)) && i.__esModule ? i : {
default: i
}, o = a(9845), s = a(7215), l = a(7760), u = a(4713);
var c = {
keydownEvent: function(e) {
var t = this.inputmask, a = t.opts, i = t.dependencyLib, c = t.maskset, f = this, d = i(f), p = e.keyCode, h = n.caret.call(t, f), m = a.onKeyDown.call(this, e, n.getBuffer.call(t), h, a);
if (void 0 !== m) return m;
if (p === r.default.BACKSPACE || p === r.default.DELETE || o.iphone && p === r.default.BACKSPACE_SAFARI || e.ctrlKey && p === r.default.X && !("oncut" in f)) e.preventDefault(),
s.handleRemove.call(t, f, p, h), (0, l.writeBuffer)(f, n.getBuffer.call(t, !0), c.p, e, f.inputmask._valueGet() !== n.getBuffer.call(t).join("")); else if (p === r.default.END || p === r.default.PAGE_DOWN) {
e.preventDefault();
var v = n.seekNext.call(t, n.getLastValidPosition.call(t));
n.caret.call(t, f, e.shiftKey ? h.begin : v, v, !0);
} else p === r.default.HOME && !e.shiftKey || p === r.default.PAGE_UP ? (e.preventDefault(),
n.caret.call(t, f, 0, e.shiftKey ? h.begin : 0, !0)) : a.undoOnEscape && p === r.default.ESCAPE && !0 !== e.altKey ? ((0,
l.checkVal)(f, !0, !1, t.undoValue.split("")), d.trigger("click")) : !0 === a.tabThrough && p === r.default.TAB ? !0 === e.shiftKey ? (h.end = n.seekPrevious.call(t, h.end, !0),
!0 === u.getTest.call(t, h.end - 1).match.static && h.end--, h.begin = n.seekPrevious.call(t, h.end, !0),
h.begin >= 0 && h.end > 0 && (e.preventDefault(), n.caret.call(t, f, h.begin, h.end))) : (h.begin = n.seekNext.call(t, h.begin, !0),
h.end = n.seekNext.call(t, h.begin, !0), h.end < c.maskLength && h.end--, h.begin <= c.maskLength && (e.preventDefault(),
n.caret.call(t, f, h.begin, h.end))) : e.shiftKey || a.insertModeVisual && !1 === a.insertMode && (p === r.default.RIGHT ? setTimeout((function() {
var e = n.caret.call(t, f);
n.caret.call(t, f, e.begin);
}), 0) : p === r.default.LEFT && setTimeout((function() {
var e = n.translatePosition.call(t, f.inputmask.caretPos.begin);
n.translatePosition.call(t, f.inputmask.caretPos.end);
t.isRTL ? n.caret.call(t, f, e + (e === c.maskLength ? 0 : 1)) : n.caret.call(t, f, e - (0 === e ? 0 : 1));
}), 0));
t.ignorable = a.ignorables.includes(p);
},
keypressEvent: function(e, t, a, i, o) {
var u = this.inputmask || this, c = u.opts, f = u.dependencyLib, d = u.maskset, p = u.el, h = f(p), m = e.which || e.charCode || e.keyCode;
if (!(!0 === t || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || u.ignorable)) return m === r.default.ENTER && u.undoValue !== u._valueGet(!0) && (u.undoValue = u._valueGet(!0),
setTimeout((function() {
h.trigger("change");
}), 0)), u.skipInputEvent = !0, !0;
if (m) {
44 !== m && 46 !== m || 3 !== e.location || "" === c.radixPoint || (m = c.radixPoint.charCodeAt(0));
var v, g = t ? {
begin: o,
end: o
} : n.caret.call(u, p), k = String.fromCharCode(m);
d.writeOutBuffer = !0;
var y = s.isValid.call(u, g, k, i, void 0, void 0, void 0, t);
if (!1 !== y && (n.resetMaskSet.call(u, !0), v = void 0 !== y.caret ? y.caret : n.seekNext.call(u, y.pos.begin ? y.pos.begin : y.pos),
d.p = v), v = c.numericInput && void 0 === y.caret ? n.seekPrevious.call(u, v) : v,
!1 !== a && (setTimeout((function() {
c.onKeyValidation.call(p, m, y);
}), 0), d.writeOutBuffer && !1 !== y)) {
var b = n.getBuffer.call(u);
(0, l.writeBuffer)(p, b, v, e, !0 !== t);
}
if (e.preventDefault(), t) return !1 !== y && (y.forwardPosition = v), y;
}
},
keyupEvent: function(e) {
var t = this.inputmask;
!t.isComposing || e.keyCode !== r.default.KEY_229 && e.keyCode !== r.default.ENTER || t.$el.trigger("input");
},
pasteEvent: function(e) {
var t, a = this.inputmask, i = a.opts, r = a._valueGet(!0), o = n.caret.call(a, this);
a.isRTL && (t = o.end, o.end = o.begin, o.begin = t);
var s = r.substr(0, o.begin), u = r.substr(o.end, r.length);
if (s == (a.isRTL ? n.getBufferTemplate.call(a).slice().reverse() : n.getBufferTemplate.call(a)).slice(0, o.begin).join("") && (s = ""),
u == (a.isRTL ? n.getBufferTemplate.call(a).slice().reverse() : n.getBufferTemplate.call(a)).slice(o.end).join("") && (u = ""),
window.clipboardData && window.clipboardData.getData) r = s + window.clipboardData.getData("Text") + u; else {
if (!e.clipboardData || !e.clipboardData.getData) return !0;
r = s + e.clipboardData.getData("text/plain") + u;
}
var c = r;
if ("function" == typeof i.onBeforePaste) {
if (!1 === (c = i.onBeforePaste.call(a, r, i))) return e.preventDefault();
c || (c = r);
}
return (0, l.checkVal)(this, !0, !1, c.toString().split(""), e), e.preventDefault();
},
inputFallBackEvent: function(e) {
var t = this.inputmask, a = t.opts, i = t.dependencyLib;
var s = this, f = s.inputmask._valueGet(!0), d = (t.isRTL ? n.getBuffer.call(t).slice().reverse() : n.getBuffer.call(t)).join(""), p = n.caret.call(t, s, void 0, void 0, !0);
if (d !== f) {
var h = function(e, i, r) {
for (var o, s, l, c = e.substr(0, r.begin).split(""), f = e.substr(r.begin).split(""), d = i.substr(0, r.begin).split(""), p = i.substr(r.begin).split(""), h = c.length >= d.length ? c.length : d.length, m = f.length >= p.length ? f.length : p.length, v = "", g = [], k = "~"; c.length < h; ) c.push(k);
for (;d.length < h; ) d.push(k);
for (;f.length < m; ) f.unshift(k);
for (;p.length < m; ) p.unshift(k);
var y = c.concat(f), b = d.concat(p);
for (s = 0, o = y.length; s < o; s++) switch (l = u.getPlaceholder.call(t, n.translatePosition.call(t, s)),
v) {
case "insertText":
b[s - 1] === y[s] && r.begin == y.length - 1 && g.push(y[s]), s = o;
break;
case "insertReplacementText":
case "deleteContentBackward":
y[s] === k ? r.end++ : s = o;
break;
default:
y[s] !== b[s] && (y[s + 1] !== k && y[s + 1] !== l && void 0 !== y[s + 1] || (b[s] !== l || b[s + 1] !== k) && b[s] !== k ? b[s + 1] === k && b[s] === y[s + 1] ? (v = "insertText",
g.push(y[s]), r.begin--, r.end--) : y[s] !== l && y[s] !== k && (y[s + 1] === k || b[s] !== y[s] && b[s + 1] === y[s + 1]) ? (v = "insertReplacementText",
g.push(y[s]), r.begin--) : y[s] === k ? (v = "deleteContentBackward", (n.isMask.call(t, n.translatePosition.call(t, s), !0) || b[s] === a.radixPoint) && r.end++) : s = o : (v = "insertText",
g.push(y[s]), r.begin--, r.end--));
}
return {
action: v,
data: g,
caret: r
};
}(f = function(e, a, i) {
if (o.iemobile) {
var r = a.replace(n.getBuffer.call(t).join(""), "");
if (1 === r.length) {
var s = a.split("");
s.splice(i.begin, 0, r), a = s.join("");
}
}
return a;
}(0, f, p), d, p);
switch ((s.inputmask.shadowRoot || s.ownerDocument).activeElement !== s && s.focus(),
(0, l.writeBuffer)(s, n.getBuffer.call(t)), n.caret.call(t, s, p.begin, p.end, !0),
h.action) {
case "insertText":
case "insertReplacementText":
h.data.forEach((function(e, a) {
var n = new i.Event("keypress");
n.which = e.charCodeAt(0), t.ignorable = !1, c.keypressEvent.call(s, n);
})), setTimeout((function() {
t.$el.trigger("keyup");
}), 0);
break;
case "deleteContentBackward":
var m = new i.Event("keydown");
m.keyCode = r.default.BACKSPACE, c.keydownEvent.call(s, m);
break;
default:
(0, l.applyInputValue)(s, f);
}
e.preventDefault();
}
},
compositionendEvent: function(e) {
var t = this.inputmask;
t.isComposing = !1, t.$el.trigger("input");
},
setValueEvent: function(e) {
var t = this.inputmask, a = this, i = e && e.detail ? e.detail[0] : arguments[1];
void 0 === i && (i = a.inputmask._valueGet(!0)), (0, l.applyInputValue)(a, i), (e.detail && void 0 !== e.detail[1] || void 0 !== arguments[2]) && n.caret.call(t, a, e.detail ? e.detail[1] : arguments[2]);
},
focusEvent: function(e) {
var t = this.inputmask, a = t.opts, i = this, r = i.inputmask._valueGet();
a.showMaskOnFocus && r !== n.getBuffer.call(t).join("") && (0, l.writeBuffer)(i, n.getBuffer.call(t), n.seekNext.call(t, n.getLastValidPosition.call(t))),
!0 !== a.positionCaretOnTab || !1 !== t.mouseEnter || s.isComplete.call(t, n.getBuffer.call(t)) && -1 !== n.getLastValidPosition.call(t) || c.clickEvent.apply(i, [ e, !0 ]),
t.undoValue = t._valueGet(!0);
},
invalidEvent: function(e) {
this.inputmask.validationEvent = !0;
},
mouseleaveEvent: function() {
var e = this.inputmask, t = e.opts, a = this;
e.mouseEnter = !1, t.clearMaskOnLostFocus && (a.inputmask.shadowRoot || a.ownerDocument).activeElement !== a && (0,
l.HandleNativePlaceholder)(a, e.originalPlaceholder);
},
clickEvent: function(e, t) {
var a = this.inputmask, i = this;
if ((i.inputmask.shadowRoot || i.ownerDocument).activeElement === i) {
var r = n.determineNewCaretPosition.call(a, n.caret.call(a, i), t);
void 0 !== r && n.caret.call(a, i, r);
}
},
cutEvent: function(e) {
var t = this.inputmask, a = t.maskset, i = this, o = n.caret.call(t, i), u = window.clipboardData || e.clipboardData, c = t.isRTL ? n.getBuffer.call(t).slice(o.end, o.begin) : n.getBuffer.call(t).slice(o.begin, o.end);
u.setData("text", t.isRTL ? c.reverse().join("") : c.join("")), document.execCommand && document.execCommand("copy"),
s.handleRemove.call(t, i, r.default.DELETE, o), (0, l.writeBuffer)(i, n.getBuffer.call(t), a.p, e, t.undoValue !== t._valueGet(!0));
},
blurEvent: function(e) {
var t = this.inputmask, a = t.opts, i = (0, t.dependencyLib)(this), r = this;
if (r.inputmask) {
(0, l.HandleNativePlaceholder)(r, t.originalPlaceholder);
var o = r.inputmask._valueGet(), u = n.getBuffer.call(t).slice();
"" !== o && (a.clearMaskOnLostFocus && (-1 === n.getLastValidPosition.call(t) && o === n.getBufferTemplate.call(t).join("") ? u = [] : l.clearOptionalTail.call(t, u)),
!1 === s.isComplete.call(t, u) && (setTimeout((function() {
i.trigger("incomplete");
}), 0), a.clearIncomplete && (n.resetMaskSet.call(t), u = a.clearMaskOnLostFocus ? [] : n.getBufferTemplate.call(t).slice())),
(0, l.writeBuffer)(r, u, void 0, e)), t.undoValue !== t._valueGet(!0) && (t.undoValue = t._valueGet(!0),
i.trigger("change"));
}
},
mouseenterEvent: function() {
var e = this.inputmask, t = e.opts, a = this;
if (e.mouseEnter = !0, (a.inputmask.shadowRoot || a.ownerDocument).activeElement !== a) {
var i = (e.isRTL ? n.getBufferTemplate.call(e).slice().reverse() : n.getBufferTemplate.call(e)).join("");
e.placeholder !== i && a.placeholder !== e.originalPlaceholder && (e.originalPlaceholder = a.placeholder),
t.showMaskOnHover && (0, l.HandleNativePlaceholder)(a, i);
}
},
submitEvent: function() {
var e = this.inputmask, t = e.opts;
e.undoValue !== e._valueGet(!0) && e.$el.trigger("change"), t.clearMaskOnLostFocus && -1 === n.getLastValidPosition.call(e) && e._valueGet && e._valueGet() === n.getBufferTemplate.call(e).join("") && e._valueSet(""),
t.clearIncomplete && !1 === s.isComplete.call(e, n.getBuffer.call(e)) && e._valueSet(""),
t.removeMaskOnSubmit && (e._valueSet(e.unmaskedvalue(), !0), setTimeout((function() {
(0, l.writeBuffer)(e.el, n.getBuffer.call(e));
}), 0));
},
resetEvent: function() {
var e = this.inputmask;
e.refreshValue = !0, setTimeout((function() {
(0, l.applyInputValue)(e.el, e._valueGet(!0));
}), 0);
}
};
t.EventHandlers = c;
},
9716: function(e, t, a) {
Object.defineProperty(t, "__esModule", {
value: !0
}), t.EventRuler = void 0;
var i = s(a(2394)), n = s(a(4528)), r = a(8711), o = a(7760);
function s(e) {
return e && e.__esModule ? e : {
default: e
};
}
var l = {
on: function(e, t, a) {
var s = e.inputmask.dependencyLib, l = function(t) {
t.originalEvent && (t = t.originalEvent || t, arguments[0] = t);
var l, u = this, c = u.inputmask, f = c ? c.opts : void 0;
if (void 0 === c && "FORM" !== this.nodeName) {
var d = s.data(u, "_inputmask_opts");
s(u).off(), d && new i.default(d).mask(u);
} else {
if ([ "submit", "reset", "setvalue" ].includes(t.type) || "FORM" === this.nodeName || !(u.disabled || u.readOnly && !("keydown" === t.type && t.ctrlKey && 67 === t.keyCode || !1 === f.tabThrough && t.keyCode === n.default.TAB))) {
switch (t.type) {
case "input":
if (!0 === c.skipInputEvent || t.inputType && "insertCompositionText" === t.inputType) return c.skipInputEvent = !1,
t.preventDefault();
break;
case "keydown":
c.skipKeyPressEvent = !1, c.skipInputEvent = c.isComposing = t.keyCode === n.default.KEY_229;
break;
case "keyup":
case "compositionend":
c.isComposing && (c.skipInputEvent = !1);
break;
case "keypress":
if (!0 === c.skipKeyPressEvent) return t.preventDefault();
c.skipKeyPressEvent = !0;
break;
case "click":
case "focus":
return c.validationEvent ? (c.validationEvent = !1, e.blur(), (0, o.HandleNativePlaceholder)(e, (c.isRTL ? r.getBufferTemplate.call(c).slice().reverse() : r.getBufferTemplate.call(c)).join("")),
setTimeout((function() {
e.focus();
}), f.validationEventTimeOut), !1) : (l = arguments, setTimeout((function() {
e.inputmask && a.apply(u, l);
}), 0), !1);
}
var p = a.apply(u, arguments);
return !1 === p && (t.preventDefault(), t.stopPropagation()), p;
}
t.preventDefault();
}
};
[ "submit", "reset" ].includes(t) ? (l = l.bind(e), null !== e.form && s(e.form).on(t, l)) : s(e).on(t, l),
e.inputmask.events[t] = e.inputmask.events[t] || [], e.inputmask.events[t].push(l);
},
off: function(e, t) {
if (e.inputmask && e.inputmask.events) {
var a = e.inputmask.dependencyLib, i = e.inputmask.events;
for (var n in t && ((i = [])[t] = e.inputmask.events[t]), i) {
for (var r = i[n]; r.length > 0; ) {
var o = r.pop();
[ "submit", "reset" ].includes(n) ? null !== e.form && a(e.form).off(n, o) : a(e).off(n, o);
}
delete e.inputmask.events[n];
}
}
}
};
t.EventRuler = l;
},
219: function(e, t, a) {
var i = l(a(2394)), n = l(a(4528)), r = l(a(7184)), o = a(8711);
function s(e) {
return (s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e;
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
})(e);
}
function l(e) {
return e && e.__esModule ? e : {
default: e
};
}
var u = i.default.dependencyLib, c = (new Date).getFullYear(), f = {
d: [ "[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", Date.prototype.getDate ],
dd: [ "0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function() {
return g(Date.prototype.getDate.call(this), 2);
} ],
ddd: [ "" ],
dddd: [ "" ],
m: [ "[1-9]|1[012]", Date.prototype.setMonth, "month", function() {
return Date.prototype.getMonth.call(this) + 1;
} ],
mm: [ "0[1-9]|1[012]", Date.prototype.setMonth, "month", function() {
return g(Date.prototype.getMonth.call(this) + 1, 2);
} ],
mmm: [ "" ],
mmmm: [ "" ],
yy: [ "[0-9]{2}", Date.prototype.setFullYear, "year", function() {
return g(Date.prototype.getFullYear.call(this), 2);
} ],
yyyy: [ "[0-9]{4}", Date.prototype.setFullYear, "year", function() {
return g(Date.prototype.getFullYear.call(this), 4);
} ],
h: [ "[1-9]|1[0-2]", Date.prototype.setHours, "hours", Date.prototype.getHours ],
hh: [ "0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function() {
return g(Date.prototype.getHours.call(this), 2);
} ],
hx: [ function(e) {
return "[0-9]{".concat(e, "}");
}, Date.prototype.setHours, "hours", function(e) {
return Date.prototype.getHours;
} ],
H: [ "1?[0-9]|2[0-3]", Date.prototype.setHours, "hours", Date.prototype.getHours ],
HH: [ "0[0-9]|1[0-9]|2[0-3]", Date.prototype.setHours, "hours", function() {
return g(Date.prototype.getHours.call(this), 2);
} ],
Hx: [ function(e) {
return "[0-9]{".concat(e, "}");
}, Date.prototype.setHours, "hours", function(e) {
return function() {
return g(Date.prototype.getHours.call(this), e);
};
} ],
M: [ "[1-5]?[0-9]", Date.prototype.setMinutes, "minutes", Date.prototype.getMinutes ],
MM: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setMinutes, "minutes", function() {
return g(Date.prototype.getMinutes.call(this), 2);
} ],
s: [ "[1-5]?[0-9]", Date.prototype.setSeconds, "seconds", Date.prototype.getSeconds ],
ss: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setSeconds, "seconds", function() {
return g(Date.prototype.getSeconds.call(this), 2);
} ],
l: [ "[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function() {
return g(Date.prototype.getMilliseconds.call(this), 3);
} ],
L: [ "[0-9]{2}", Date.prototype.setMilliseconds, "milliseconds", function() {
return g(Date.prototype.getMilliseconds.call(this), 2);
} ],
t: [ "[ap]" ],
tt: [ "[ap]m" ],
T: [ "[AP]" ],
TT: [ "[AP]M" ],
Z: [ "" ],
o: [ "" ],
S: [ "" ]
}, d = {
isoDate: "yyyy-mm-dd",
isoTime: "HH:MM:ss",
isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
};
function p(e) {
var t = new RegExp("\\d+$").exec(e[0]);
if (t && void 0 !== t[0]) {
var a = f[e[0][0] + "x"].slice("");
return a[0] = a[0](t[0]), a[3] = a[3](t[0]), a;
}
if (f[e[0]]) return f[e[0]];
}
function h(e) {
if (!e.tokenizer) {
var t = [], a = [];
for (var i in f) if (/\.*x$/.test(i)) {
var n = i[0] + "\\d+";
-1 === a.indexOf(n) && a.push(n);
} else -1 === t.indexOf(i[0]) && t.push(i[0]);
e.tokenizer = "(" + (a.length > 0 ? a.join("|") + "|" : "") + t.join("+|") + ")+?|.",
e.tokenizer = new RegExp(e.tokenizer, "g");
}
return e.tokenizer;
}
function m(e, t, a) {
if (void 0 === e.rawday || !isFinite(e.rawday) && new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day || "29" == e.day && !Number.isFinite(e.rawyear) || new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day) return t;
if ("29" == e.day) {
var i = b(t.pos, a);
if ("yyyy" === i.targetMatch[0] && t.pos - i.targetMatchIndex == 2) return t.remove = t.pos + 1,
t;
} else if ("02" == e.month && "30" == e.day && void 0 !== t.c) return e.day = "03",
e.date.setDate(3), e.date.setMonth(1), t.insert = [ {
pos: t.pos,
c: "0"
}, {
pos: t.pos + 1,
c: t.c
} ], t.caret = o.seekNext.call(this, t.pos + 1), t;
return !1;
}
function v(e, t, a, i) {
var n, o, s = "";
for (h(a).lastIndex = 0; n = h(a).exec(e); ) {
if (void 0 === t) if (o = p(n)) s += "(" + o[0] + ")"; else switch (n[0]) {
case "[":
s += "(";
break;
case "]":
s += ")?";
break;
default:
s += (0, r.default)(n[0]);
} else if (o = p(n)) if (!0 !== i && o[3]) s += o[3].call(t.date); else o[2] ? s += t["raw" + o[2]] : s += n[0]; else s += n[0];
}
return s;
}
function g(e, t, a) {
for (e = String(e), t = t || 2; e.length < t; ) e = a ? e + "0" : "0" + e;
return e;
}
function k(e, t, a) {
var i, n, r, o = {
date: new Date(1, 0, 1)
}, l = e;
function u(e, t, a) {
if (e[i] = t.replace(/[^0-9]/g, "0"), e["raw" + i] = t, void 0 !== r) {
var n = e[i];
("day" === i && 29 === parseInt(n) || "month" === i && 2 === parseInt(n)) && (29 !== parseInt(e.day) || 2 !== parseInt(e.month) || "" !== e.year && void 0 !== e.year || e.date.setFullYear(2012, 1, 29)),
"day" === i && 0 === parseInt(n) && (n = 1), "month" === i && (n = parseInt(n)) > 0 && (n -= 1),
"year" === i && n.length < 4 && (n = g(n, 4, !0)), "" === n || isNaN(n) || r.call(e.date, n);
}
}
if ("string" == typeof l) {
for (h(a).lastIndex = 0; n = h(a).exec(t); ) {
var c = new RegExp("\\d+$").exec(n[0]), d = c ? n[0][0] + "x" : n[0], p = void 0;
if (c) {
var m = h(a).lastIndex, v = b(n.index, a);
h(a).lastIndex = m, p = l.slice(0, l.indexOf(v.nextMatch[0]));
} else p = l.slice(0, d.length);
Object.prototype.hasOwnProperty.call(f, d) && (i = f[d][2], r = f[d][1], u(o, p)),
l = l.slice(p.length);
}
return o;
}
if (l && "object" === s(l) && Object.prototype.hasOwnProperty.call(l, "date")) return l;
}
function y(e, t) {
return v(t.inputFormat, {
date: e
}, t);
}
function b(e, t) {
var a, i, n = 0, r = 0;
for (h(t).lastIndex = 0; i = h(t).exec(t.inputFormat); ) {
var o = new RegExp("\\d+$").exec(i[0]);
if ((n += r = o ? parseInt(o[0]) : i[0].length) >= e) {
a = i, i = h(t).exec(t.inputFormat);
break;
}
}
return {
targetMatchIndex: n - r,
nextMatch: i,
targetMatch: a
};
}
i.default.extendAliases({
datetime: {
mask: function(e) {
return e.numericInput = !1, f.S = e.i18n.ordinalSuffix.join("|"), e.inputFormat = d[e.inputFormat] || e.inputFormat,
e.displayFormat = d[e.displayFormat] || e.displayFormat || e.inputFormat, e.outputFormat = d[e.outputFormat] || e.outputFormat || e.inputFormat,
e.placeholder = "" !== e.placeholder ? e.placeholder : e.inputFormat.replace(/[[\]]/, ""),
e.regex = v(e.inputFormat, void 0, e), e.min = k(e.min, e.inputFormat, e), e.max = k(e.max, e.inputFormat, e),
null;
},
placeholder: "",
inputFormat: "isoDateTime",
displayFormat: void 0,
outputFormat: void 0,
min: null,
max: null,
skipOptionalPartCharacter: "",
i18n: {
dayNames: [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ],
monthNames: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ],
ordinalSuffix: [ "st", "nd", "rd", "th" ]
},
preValidation: function(e, t, a, i, n, r, o, s) {
if (s) return !0;
if (isNaN(a) && e[t] !== a) {
var l = b(t, n);
if (l.nextMatch && l.nextMatch[0] === a && l.targetMatch[0].length > 1) {
var u = f[l.targetMatch[0]][0];
if (new RegExp(u).test("0" + e[t - 1])) return e[t] = e[t - 1], e[t - 1] = "0",
{
fuzzy: !0,
buffer: e,
refreshFromBuffer: {
start: t - 1,
end: t + 1
},
pos: t + 1
};
}
}
return !0;
},
postValidation: function(e, t, a, i, n, r, o, s) {
var l, u;
if (o) return !0;
if (!1 === i && (((l = b(t + 1, n)).targetMatch && l.targetMatchIndex === t && l.targetMatch[0].length > 1 && void 0 !== f[l.targetMatch[0]] || (l = b(t + 2, n)).targetMatch && l.targetMatchIndex === t + 1 && l.targetMatch[0].length > 1 && void 0 !== f[l.targetMatch[0]]) && (u = f[l.targetMatch[0]][0]),
void 0 !== u && (void 0 !== r.validPositions[t + 1] && new RegExp(u).test(a + "0") ? (e[t] = a,
e[t + 1] = "0", i = {
pos: t + 2,
caret: t
}) : new RegExp(u).test("0" + a) && (e[t] = "0", e[t + 1] = a, i = {
pos: t + 2
})), !1 === i)) return i;
if (i.fuzzy && (e = i.buffer, t = i.pos), (l = b(t, n)).targetMatch && l.targetMatch[0] && void 0 !== f[l.targetMatch[0]]) {
u = f[l.targetMatch[0]][0];
var d = e.slice(l.targetMatchIndex, l.targetMatchIndex + l.targetMatch[0].length);
!1 === new RegExp(u).test(d.join("")) && 2 === l.targetMatch[0].length && r.validPositions[l.targetMatchIndex] && r.validPositions[l.targetMatchIndex + 1] && (r.validPositions[l.targetMatchIndex + 1].input = "0");
}
var p = i, h = k(e.join(""), n.inputFormat, n);
return p && h.date.getTime() == h.date.getTime() && (n.prefillYear && (p = function(e, t, a) {
if (e.year !== e.rawyear) {
var i = c.toString(), n = e.rawyear.replace(/[^0-9]/g, ""), r = i.slice(0, n.length), o = i.slice(n.length);
if (2 === n.length && n === r) {
var s = new Date(c, e.month - 1, e.day);
e.day == s.getDate() && (!a.max || a.max.date.getTime() >= s.getTime()) && (e.date.setFullYear(c),
e.year = i, t.insert = [ {
pos: t.pos + 1,
c: o[0]
}, {
pos: t.pos + 2,
c: o[1]
} ]);
}
}
return t;
}(h, p, n)), p = function(e, t, a, i, n) {
if (!t) return t;
if (a.min) {
if (e.rawyear) {
var r, o = e.rawyear.replace(/[^0-9]/g, ""), s = a.min.year.substr(0, o.length);
if (o < s) {
var l = b(t.pos, a);
if (o = e.rawyear.substr(0, t.pos - l.targetMatchIndex + 1).replace(/[^0-9]/g, "0"),
(s = a.min.year.substr(0, o.length)) <= o) return t.remove = l.targetMatchIndex + o.length,
t;
if (o = "yyyy" === l.targetMatch[0] ? e.rawyear.substr(1, 1) : e.rawyear.substr(0, 1),
s = a.min.year.substr(2, 1), r = a.max ? a.max.year.substr(2, 1) : o, 1 === o.length && s <= o && o <= r && !0 !== n) return "yyyy" === l.targetMatch[0] ? (t.insert = [ {
pos: t.pos + 1,
c: o,
strict: !0
} ], t.caret = t.pos + 2, i.validPositions[t.pos].input = a.min.year[1]) : (t.insert = [ {
pos: t.pos + 1,
c: a.min.year[1],
strict: !0
}, {
pos: t.pos + 2,
c: o,
strict: !0
} ], t.caret = t.pos + 3, i.validPositions[t.pos].input = a.min.year[0]), t;
t = !1;
}
}
t && e.year && e.year === e.rawyear && a.min.date.getTime() == a.min.date.getTime() && (t = a.min.date.getTime() <= e.date.getTime());
}
return t && a.max && a.max.date.getTime() == a.max.date.getTime() && (t = a.max.date.getTime() >= e.date.getTime()),
t;
}(h, p = m.call(this, h, p, n), n, r, s)), void 0 !== t && p && i.pos !== t ? {
buffer: v(n.inputFormat, h, n).split(""),
refreshFromBuffer: {
start: t,
end: i.pos
},
pos: i.caret || i.pos
} : p;
},
onKeyDown: function(e, t, a, i) {
e.ctrlKey && e.keyCode === n.default.RIGHT && (this.inputmask._valueSet(y(new Date, i)),
u(this).trigger("setvalue"));
},
onUnMask: function(e, t, a) {
return t ? v(a.outputFormat, k(e, a.inputFormat, a), a, !0) : t;
},
casing: function(e, t, a, i) {
return 0 == t.nativeDef.indexOf("[ap]") ? e.toLowerCase() : 0 == t.nativeDef.indexOf("[AP]") ? e.toUpperCase() : e;
},
onBeforeMask: function(e, t) {
return "[object Date]" === Object.prototype.toString.call(e) && (e = y(e, t)), e;
},
insertMode: !1,
shiftPositions: !1,
keepStatic: !1,
inputmode: "numeric",
prefillYear: !0
}
});
},
3851: function(e, t, a) {
var i, n = (i = a(2394)) && i.__esModule ? i : {
default: i
}, r = a(8711), o = a(4713);
n.default.extendDefinitions({
A: {
validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
casing: "upper"
},
"&": {
validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
casing: "upper"
},
"#": {
validator: "[0-9A-Fa-f]",
casing: "upper"
}
});
var s = new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]");
function l(e, t, a, i, n) {
return a - 1 > -1 && "." !== t.buffer[a - 1] ? (e = t.buffer[a - 1] + e, e = a - 2 > -1 && "." !== t.buffer[a - 2] ? t.buffer[a - 2] + e : "0" + e) : e = "00" + e,
s.test(e);
}
n.default.extendAliases({
cssunit: {
regex: "[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"
},
url: {
regex: "(https?|ftp)://.*",
autoUnmask: !1,
keepStatic: !1,
tabThrough: !0
},
ip: {
mask: "i[i[i]].j[j[j]].k[k[k]].l[l[l]]",
definitions: {
i: {
validator: l
},
j: {
validator: l
},
k: {
validator: l
},
l: {
validator: l