use-mask-input 3.0.6 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +13 -19
  2. package/dist/index.cjs +191 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.ts +34 -3
  5. package/dist/index.js +184 -1
  6. package/dist/index.js.map +1 -1
  7. package/package.json +49 -48
  8. package/src/index.tsx +3 -2
  9. package/src/types.ts +6 -0
  10. package/src/useMaskInput.ts +12 -9
  11. package/src/utils.spec.ts +14 -0
  12. package/src/utils.ts +23 -0
  13. package/src/withHookFormMask.ts +8 -17
  14. package/src/withMask.ts +5 -6
  15. package/dist/example/App.example.d.ts +0 -3
  16. package/dist/example/index.d.ts +0 -1
  17. package/dist/index.modern.js +0 -2
  18. package/dist/index.modern.js.map +0 -1
  19. package/dist/index.umd.js +0 -2
  20. package/dist/index.umd.js.map +0 -1
  21. package/dist/useMaskInput.d.ts +0 -9
  22. package/dist/withHookFormMask.d.ts +0 -16
  23. package/dist/withMask.d.ts +0 -3
  24. package/node_modules/inputmask/LICENSE.txt +0 -7
  25. package/node_modules/inputmask/README.md +0 -1279
  26. package/node_modules/inputmask/bundle.js +0 -6
  27. package/node_modules/inputmask/dist/bindings/inputmask.binding.js +0 -26
  28. package/node_modules/inputmask/dist/inputmask.es6.js +0 -5
  29. package/node_modules/inputmask/dist/inputmask.js +0 -3031
  30. package/node_modules/inputmask/dist/inputmask.min.js +0 -8
  31. package/node_modules/inputmask/dist/jquery.inputmask.js +0 -2985
  32. package/node_modules/inputmask/dist/jquery.inputmask.min.js +0 -8
  33. package/node_modules/inputmask/lib/bindings/inputmask.binding.js +0 -26
  34. package/node_modules/inputmask/lib/bindings/inputmask.es6.js +0 -5
  35. package/node_modules/inputmask/lib/canUseDOM.js +0 -7
  36. package/node_modules/inputmask/lib/defaults.js +0 -101
  37. package/node_modules/inputmask/lib/definitions.js +0 -13
  38. package/node_modules/inputmask/lib/dependencyLibs/data.js +0 -8
  39. package/node_modules/inputmask/lib/dependencyLibs/events.js +0 -199
  40. package/node_modules/inputmask/lib/dependencyLibs/extend.js +0 -58
  41. package/node_modules/inputmask/lib/dependencyLibs/inputmask.dependencyLib.jquery.js +0 -13
  42. package/node_modules/inputmask/lib/dependencyLibs/inputmask.dependencyLib.js +0 -41
  43. package/node_modules/inputmask/lib/environment.js +0 -9
  44. package/node_modules/inputmask/lib/escapeRegex.js +0 -4
  45. package/node_modules/inputmask/lib/eventhandlers.js +0 -513
  46. package/node_modules/inputmask/lib/eventruler.js +0 -124
  47. package/node_modules/inputmask/lib/extensions/inputmask.date.extensions.js +0 -588
  48. package/node_modules/inputmask/lib/extensions/inputmask.extensions.js +0 -133
  49. package/node_modules/inputmask/lib/extensions/inputmask.numeric.extensions.js +0 -631
  50. package/node_modules/inputmask/lib/global/window.js +0 -3
  51. package/node_modules/inputmask/lib/inputHandling.js +0 -252
  52. package/node_modules/inputmask/lib/inputmask.js +0 -355
  53. package/node_modules/inputmask/lib/inputmaskElement.js +0 -33
  54. package/node_modules/inputmask/lib/jquery.inputmask.js +0 -81
  55. package/node_modules/inputmask/lib/keycode.json +0 -25
  56. package/node_modules/inputmask/lib/mask-lexer.js +0 -467
  57. package/node_modules/inputmask/lib/mask.js +0 -244
  58. package/node_modules/inputmask/lib/masktoken.js +0 -13
  59. package/node_modules/inputmask/lib/polyfills/Array.includes.js +0 -48
  60. package/node_modules/inputmask/lib/polyfills/Object.getPrototypeOf.js +0 -7
  61. package/node_modules/inputmask/lib/positioning.js +0 -348
  62. package/node_modules/inputmask/lib/validation-tests.js +0 -597
  63. package/node_modules/inputmask/lib/validation.js +0 -664
  64. package/node_modules/inputmask/package.json +0 -60
  65. package/src/example/App.example.tsx +0 -68
  66. package/src/example/index.tsx +0 -5
@@ -1,3031 +0,0 @@
1
- /*!
2
- * dist/inputmask
3
- * https://github.com/RobinHerbots/Inputmask
4
- * Copyright (c) 2010 - 2021 Robin Herbots
5
- * Licensed under the MIT license
6
- * Version: 5.0.7
7
- */
8
- !function(e, t) {
9
- if ("object" == typeof exports && "object" == typeof module) module.exports = t(); else if ("function" == typeof define && define.amd) define([], t); else {
10
- var i = t();
11
- for (var a in i) ("object" == typeof exports ? exports : e)[a] = i[a];
12
- }
13
- }(self, (function() {
14
- return function() {
15
- "use strict";
16
- var e = {
17
- 8741: function(e, t) {
18
- Object.defineProperty(t, "__esModule", {
19
- value: !0
20
- }), t.default = void 0;
21
- var i = !("undefined" == typeof window || !window.document || !window.document.createElement);
22
- t.default = i;
23
- },
24
- 3976: function(e, t, i) {
25
- Object.defineProperty(t, "__esModule", {
26
- value: !0
27
- }), t.default = void 0;
28
- var a, n = (a = i(5581)) && a.__esModule ? a : {
29
- default: a
30
- };
31
- var r = {
32
- _maxTestPos: 500,
33
- placeholder: "_",
34
- optionalmarker: [ "[", "]" ],
35
- quantifiermarker: [ "{", "}" ],
36
- groupmarker: [ "(", ")" ],
37
- alternatormarker: "|",
38
- escapeChar: "\\",
39
- mask: null,
40
- regex: null,
41
- oncomplete: function() {},
42
- onincomplete: function() {},
43
- oncleared: function() {},
44
- repeat: 0,
45
- greedy: !1,
46
- autoUnmask: !1,
47
- removeMaskOnSubmit: !1,
48
- clearMaskOnLostFocus: !0,
49
- insertMode: !0,
50
- insertModeVisual: !0,
51
- clearIncomplete: !1,
52
- alias: null,
53
- onKeyDown: function() {},
54
- onBeforeMask: null,
55
- onBeforePaste: function(e, t) {
56
- return "function" == typeof t.onBeforeMask ? t.onBeforeMask.call(this, e, t) : e;
57
- },
58
- onBeforeWrite: null,
59
- onUnMask: null,
60
- showMaskOnFocus: !0,
61
- showMaskOnHover: !0,
62
- onKeyValidation: function() {},
63
- skipOptionalPartCharacter: " ",
64
- numericInput: !1,
65
- rightAlign: !1,
66
- undoOnEscape: !0,
67
- radixPoint: "",
68
- _radixDance: !1,
69
- groupSeparator: "",
70
- keepStatic: null,
71
- positionCaretOnTab: !0,
72
- tabThrough: !1,
73
- supportsInputType: [ "text", "tel", "url", "password", "search" ],
74
- 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 ],
75
- isComplete: null,
76
- preValidation: null,
77
- postValidation: null,
78
- staticDefinitionSymbol: void 0,
79
- jitMasking: !1,
80
- nullable: !0,
81
- inputEventOnly: !1,
82
- noValuePatching: !1,
83
- positionCaretOnClick: "lvp",
84
- casing: null,
85
- inputmode: "text",
86
- importDataAttributes: !0,
87
- shiftPositions: !0,
88
- usePrototypeDefinitions: !0,
89
- validationEventTimeOut: 3e3,
90
- substitutes: {}
91
- };
92
- t.default = r;
93
- },
94
- 7392: function(e, t) {
95
- Object.defineProperty(t, "__esModule", {
96
- value: !0
97
- }), t.default = void 0;
98
- t.default = {
99
- 9: {
100
- validator: "[0-9\uff10-\uff19]",
101
- definitionSymbol: "*"
102
- },
103
- a: {
104
- validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
105
- definitionSymbol: "*"
106
- },
107
- "*": {
108
- validator: "[0-9\uff10-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]"
109
- }
110
- };
111
- },
112
- 253: function(e, t) {
113
- Object.defineProperty(t, "__esModule", {
114
- value: !0
115
- }), t.default = function(e, t, i) {
116
- if (void 0 === i) return e.__data ? e.__data[t] : null;
117
- e.__data = e.__data || {}, e.__data[t] = i;
118
- };
119
- },
120
- 3776: function(e, t, i) {
121
- Object.defineProperty(t, "__esModule", {
122
- value: !0
123
- }), t.Event = void 0, t.off = function(e, t) {
124
- var i, a;
125
- function n(e, t, n) {
126
- if (e in i == !0) if (a.removeEventListener ? a.removeEventListener(e, n, !1) : a.detachEvent && a.detachEvent("on" + e, n),
127
- "global" === t) for (var r in i[e]) i[e][r].splice(i[e][r].indexOf(n), 1); else i[e][t].splice(i[e][t].indexOf(n), 1);
128
- }
129
- function r(e, a) {
130
- var n, r, o = [];
131
- if (e.length > 0) if (void 0 === t) for (n = 0, r = i[e][a].length; n < r; n++) o.push({
132
- ev: e,
133
- namespace: a && a.length > 0 ? a : "global",
134
- handler: i[e][a][n]
135
- }); else o.push({
136
- ev: e,
137
- namespace: a && a.length > 0 ? a : "global",
138
- handler: t
139
- }); else if (a.length > 0) for (var l in i) for (var s in i[l]) if (s === a) if (void 0 === t) for (n = 0,
140
- r = i[l][s].length; n < r; n++) o.push({
141
- ev: l,
142
- namespace: s,
143
- handler: i[l][s][n]
144
- }); else o.push({
145
- ev: l,
146
- namespace: s,
147
- handler: t
148
- });
149
- return o;
150
- }
151
- if (u(this[0]) && e) {
152
- i = this[0].eventRegistry, a = this[0];
153
- for (var o = e.split(" "), l = 0; l < o.length; l++) for (var s = o[l].split("."), c = r(s[0], s[1]), f = 0, d = c.length; f < d; f++) n(c[f].ev, c[f].namespace, c[f].handler);
154
- }
155
- return this;
156
- }, t.on = function(e, t) {
157
- function i(e, i) {
158
- n.addEventListener ? n.addEventListener(e, t, !1) : n.attachEvent && n.attachEvent("on" + e, t),
159
- a[e] = a[e] || {}, a[e][i] = a[e][i] || [], a[e][i].push(t);
160
- }
161
- if (u(this[0])) for (var a = this[0].eventRegistry, n = this[0], r = e.split(" "), o = 0; o < r.length; o++) {
162
- var l = r[o].split("."), s = l[0], c = l[1] || "global";
163
- i(s, c);
164
- }
165
- return this;
166
- }, t.trigger = function(e) {
167
- if (u(this[0])) for (var t = this[0].eventRegistry, i = this[0], a = "string" == typeof e ? e.split(" ") : [ e.type ], r = 0; r < a.length; r++) {
168
- var l = a[r].split("."), s = l[0], c = l[1] || "global";
169
- if (void 0 !== document && "global" === c) {
170
- var f, d, p = {
171
- bubbles: !0,
172
- cancelable: !0,
173
- detail: arguments[1]
174
- };
175
- if (document.createEvent) {
176
- try {
177
- if ("input" === s) p.inputType = "insertText", f = new InputEvent(s, p); else f = new CustomEvent(s, p);
178
- } catch (e) {
179
- (f = document.createEvent("CustomEvent")).initCustomEvent(s, p.bubbles, p.cancelable, p.detail);
180
- }
181
- e.type && (0, n.default)(f, e), i.dispatchEvent(f);
182
- } else (f = document.createEventObject()).eventType = s, f.detail = arguments[1],
183
- e.type && (0, n.default)(f, e), i.fireEvent("on" + f.eventType, f);
184
- } else if (void 0 !== t[s]) if (arguments[0] = arguments[0].type ? arguments[0] : o.default.Event(arguments[0]),
185
- arguments[0].detail = arguments.slice(1), "global" === c) for (var h in t[s]) for (d = 0; d < t[s][h].length; d++) t[s][h][d].apply(i, arguments); else for (d = 0; d < t[s][c].length; d++) t[s][c][d].apply(i, arguments);
186
- }
187
- return this;
188
- };
189
- var a, n = s(i(600)), r = s(i(9380)), o = s(i(4963)), l = s(i(8741));
190
- function s(e) {
191
- return e && e.__esModule ? e : {
192
- default: e
193
- };
194
- }
195
- function u(e) {
196
- return e instanceof Element;
197
- }
198
- t.Event = a, "function" == typeof r.default.CustomEvent ? t.Event = a = r.default.CustomEvent : l.default && (t.Event = a = function(e, t) {
199
- t = t || {
200
- bubbles: !1,
201
- cancelable: !1,
202
- detail: void 0
203
- };
204
- var i = document.createEvent("CustomEvent");
205
- return i.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), i;
206
- }, a.prototype = r.default.Event.prototype);
207
- },
208
- 600: function(e, t) {
209
- function i(e) {
210
- return i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
211
- return typeof e;
212
- } : function(e) {
213
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
214
- }, i(e);
215
- }
216
- Object.defineProperty(t, "__esModule", {
217
- value: !0
218
- }), t.default = function e() {
219
- var t, a, n, r, o, l, s = arguments[0] || {}, u = 1, c = arguments.length, f = !1;
220
- "boolean" == typeof s && (f = s, s = arguments[u] || {}, u++);
221
- "object" !== i(s) && "function" != typeof s && (s = {});
222
- for (;u < c; u++) if (null != (t = arguments[u])) for (a in t) n = s[a], r = t[a],
223
- s !== r && (f && r && ("[object Object]" === Object.prototype.toString.call(r) || (o = Array.isArray(r))) ? (o ? (o = !1,
224
- l = n && Array.isArray(n) ? n : []) : l = n && "[object Object]" === Object.prototype.toString.call(n) ? n : {},
225
- s[a] = e(f, l, r)) : void 0 !== r && (s[a] = r));
226
- return s;
227
- };
228
- },
229
- 4963: function(e, t, i) {
230
- Object.defineProperty(t, "__esModule", {
231
- value: !0
232
- }), t.default = void 0;
233
- var a = l(i(600)), n = l(i(9380)), r = l(i(253)), o = i(3776);
234
- function l(e) {
235
- return e && e.__esModule ? e : {
236
- default: e
237
- };
238
- }
239
- var s = n.default.document;
240
- function u(e) {
241
- return e instanceof u ? e : this instanceof u ? void (null != e && e !== n.default && (this[0] = e.nodeName ? e : void 0 !== e[0] && e[0].nodeName ? e[0] : s.querySelector(e),
242
- void 0 !== this[0] && null !== this[0] && (this[0].eventRegistry = this[0].eventRegistry || {}))) : new u(e);
243
- }
244
- u.prototype = {
245
- on: o.on,
246
- off: o.off,
247
- trigger: o.trigger
248
- }, u.extend = a.default, u.data = r.default, u.Event = o.Event;
249
- var c = u;
250
- t.default = c;
251
- },
252
- 9845: function(e, t, i) {
253
- Object.defineProperty(t, "__esModule", {
254
- value: !0
255
- }), t.ua = t.mobile = t.iphone = t.iemobile = t.ie = void 0;
256
- var a, n = (a = i(9380)) && a.__esModule ? a : {
257
- default: a
258
- };
259
- var r = n.default.navigator && n.default.navigator.userAgent || "", o = r.indexOf("MSIE ") > 0 || r.indexOf("Trident/") > 0, l = "ontouchstart" in n.default, s = /iemobile/i.test(r), u = /iphone/i.test(r) && !s;
260
- t.iphone = u, t.iemobile = s, t.mobile = l, t.ie = o, t.ua = r;
261
- },
262
- 7184: function(e, t) {
263
- Object.defineProperty(t, "__esModule", {
264
- value: !0
265
- }), t.default = function(e) {
266
- return e.replace(i, "\\$1");
267
- };
268
- var i = new RegExp("(\\" + [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^" ].join("|\\") + ")", "gim");
269
- },
270
- 6030: function(e, t, i) {
271
- Object.defineProperty(t, "__esModule", {
272
- value: !0
273
- }), t.EventHandlers = void 0;
274
- var a, n = i(8711), r = (a = i(5581)) && a.__esModule ? a : {
275
- default: a
276
- }, o = i(9845), l = i(7215), s = i(7760), u = i(4713);
277
- function c(e, t) {
278
- var i = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
279
- if (!i) {
280
- if (Array.isArray(e) || (i = function(e, t) {
281
- if (!e) return;
282
- if ("string" == typeof e) return f(e, t);
283
- var i = Object.prototype.toString.call(e).slice(8, -1);
284
- "Object" === i && e.constructor && (i = e.constructor.name);
285
- if ("Map" === i || "Set" === i) return Array.from(e);
286
- if ("Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return f(e, t);
287
- }(e)) || t && e && "number" == typeof e.length) {
288
- i && (e = i);
289
- var a = 0, n = function() {};
290
- return {
291
- s: n,
292
- n: function() {
293
- return a >= e.length ? {
294
- done: !0
295
- } : {
296
- done: !1,
297
- value: e[a++]
298
- };
299
- },
300
- e: function(e) {
301
- throw e;
302
- },
303
- f: n
304
- };
305
- }
306
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
307
- }
308
- var r, o = !0, l = !1;
309
- return {
310
- s: function() {
311
- i = i.call(e);
312
- },
313
- n: function() {
314
- var e = i.next();
315
- return o = e.done, e;
316
- },
317
- e: function(e) {
318
- l = !0, r = e;
319
- },
320
- f: function() {
321
- try {
322
- o || null == i.return || i.return();
323
- } finally {
324
- if (l) throw r;
325
- }
326
- }
327
- };
328
- }
329
- function f(e, t) {
330
- (null == t || t > e.length) && (t = e.length);
331
- for (var i = 0, a = new Array(t); i < t; i++) a[i] = e[i];
332
- return a;
333
- }
334
- var d = {
335
- keydownEvent: function(e) {
336
- var t = this.inputmask, i = t.opts, a = t.dependencyLib, c = t.maskset, f = this, d = a(f), p = e.keyCode, h = n.caret.call(t, f), v = i.onKeyDown.call(this, e, n.getBuffer.call(t), h, i);
337
- if (void 0 !== v) return v;
338
- 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(),
339
- l.handleRemove.call(t, f, p, h), (0, s.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) {
340
- e.preventDefault();
341
- var m = n.seekNext.call(t, n.getLastValidPosition.call(t));
342
- n.caret.call(t, f, e.shiftKey ? h.begin : m, m, !0);
343
- } else p === r.default.HOME && !e.shiftKey || p === r.default.PAGE_UP ? (e.preventDefault(),
344
- n.caret.call(t, f, 0, e.shiftKey ? h.begin : 0, !0)) : i.undoOnEscape && p === r.default.ESCAPE && !0 !== e.altKey ? ((0,
345
- s.checkVal)(f, !0, !1, t.undoValue.split("")), d.trigger("click")) : p !== r.default.INSERT || e.shiftKey || e.ctrlKey || void 0 !== t.userOptions.insertMode ? !0 === i.tabThrough && p === r.default.TAB ? !0 === e.shiftKey ? (h.end = n.seekPrevious.call(t, h.end, !0),
346
- !0 === u.getTest.call(t, h.end - 1).match.static && h.end--, h.begin = n.seekPrevious.call(t, h.end, !0),
347
- 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),
348
- h.end = n.seekNext.call(t, h.begin, !0), h.end < c.maskLength && h.end--, h.begin <= c.maskLength && (e.preventDefault(),
349
- n.caret.call(t, f, h.begin, h.end))) : e.shiftKey || i.insertModeVisual && !1 === i.insertMode && (p === r.default.RIGHT ? setTimeout((function() {
350
- var e = n.caret.call(t, f);
351
- n.caret.call(t, f, e.begin);
352
- }), 0) : p === r.default.LEFT && setTimeout((function() {
353
- var e = n.translatePosition.call(t, f.inputmask.caretPos.begin);
354
- n.translatePosition.call(t, f.inputmask.caretPos.end);
355
- t.isRTL ? n.caret.call(t, f, e + (e === c.maskLength ? 0 : 1)) : n.caret.call(t, f, e - (0 === e ? 0 : 1));
356
- }), 0)) : l.isSelection.call(t, h) ? i.insertMode = !i.insertMode : (i.insertMode = !i.insertMode,
357
- n.caret.call(t, f, h.begin, h.begin));
358
- t.ignorable = i.ignorables.includes(p);
359
- },
360
- keypressEvent: function(e, t, i, a, o) {
361
- var u = this.inputmask || this, c = u.opts, f = u.dependencyLib, d = u.maskset, p = u.el, h = f(p), v = e.keyCode;
362
- if (!(!0 === t || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || u.ignorable)) return v === r.default.ENTER && u.undoValue !== u._valueGet(!0) && (u.undoValue = u._valueGet(!0),
363
- setTimeout((function() {
364
- h.trigger("change");
365
- }), 0)), u.skipInputEvent = !0, !0;
366
- if (v) {
367
- 44 !== v && 46 !== v || 3 !== e.location || "" === c.radixPoint || (v = c.radixPoint.charCodeAt(0));
368
- var m, g = t ? {
369
- begin: o,
370
- end: o
371
- } : n.caret.call(u, p), k = String.fromCharCode(v);
372
- k = c.substitutes[k] || k, d.writeOutBuffer = !0;
373
- var y = l.isValid.call(u, g, k, a, void 0, void 0, void 0, t);
374
- if (!1 !== y && (n.resetMaskSet.call(u, !0), m = void 0 !== y.caret ? y.caret : n.seekNext.call(u, y.pos.begin ? y.pos.begin : y.pos),
375
- d.p = m), m = c.numericInput && void 0 === y.caret ? n.seekPrevious.call(u, m) : m,
376
- !1 !== i && (setTimeout((function() {
377
- c.onKeyValidation.call(p, v, y);
378
- }), 0), d.writeOutBuffer && !1 !== y)) {
379
- var b = n.getBuffer.call(u);
380
- (0, s.writeBuffer)(p, b, m, e, !0 !== t);
381
- }
382
- if (e.preventDefault(), t) return !1 !== y && (y.forwardPosition = m), y;
383
- }
384
- },
385
- keyupEvent: function(e) {
386
- var t = this.inputmask;
387
- !t.isComposing || e.keyCode !== r.default.KEY_229 && e.keyCode !== r.default.ENTER || t.$el.trigger("input");
388
- },
389
- pasteEvent: function(e) {
390
- var t, i = this.inputmask, a = i.opts, r = i._valueGet(!0), o = n.caret.call(i, this);
391
- i.isRTL && (t = o.end, o.end = n.translatePosition.call(i, o.begin), o.begin = n.translatePosition.call(i, t));
392
- var l = r.substr(0, o.begin), u = r.substr(o.end, r.length);
393
- if (l == (i.isRTL ? n.getBufferTemplate.call(i).slice().reverse() : n.getBufferTemplate.call(i)).slice(0, o.begin).join("") && (l = ""),
394
- u == (i.isRTL ? n.getBufferTemplate.call(i).slice().reverse() : n.getBufferTemplate.call(i)).slice(o.end).join("") && (u = ""),
395
- window.clipboardData && window.clipboardData.getData) r = l + window.clipboardData.getData("Text") + u; else {
396
- if (!e.clipboardData || !e.clipboardData.getData) return !0;
397
- r = l + e.clipboardData.getData("text/plain") + u;
398
- }
399
- var f = r;
400
- if (i.isRTL) {
401
- f = f.split("");
402
- var d, p = c(n.getBufferTemplate.call(i));
403
- try {
404
- for (p.s(); !(d = p.n()).done; ) {
405
- var h = d.value;
406
- f[0] === h && f.shift();
407
- }
408
- } catch (e) {
409
- p.e(e);
410
- } finally {
411
- p.f();
412
- }
413
- f = f.join("");
414
- }
415
- if ("function" == typeof a.onBeforePaste) {
416
- if (!1 === (f = a.onBeforePaste.call(i, f, a))) return !1;
417
- f || (f = r);
418
- }
419
- (0, s.checkVal)(this, !0, !1, f.toString().split(""), e), e.preventDefault();
420
- },
421
- inputFallBackEvent: function(e) {
422
- var t = this.inputmask, i = t.opts, a = t.dependencyLib;
423
- var l = this, c = l.inputmask._valueGet(!0), f = (t.isRTL ? n.getBuffer.call(t).slice().reverse() : n.getBuffer.call(t)).join(""), p = n.caret.call(t, l, void 0, void 0, !0);
424
- if (f !== c) {
425
- c = function(e, i, a) {
426
- if (o.iemobile) {
427
- var r = i.replace(n.getBuffer.call(t).join(""), "");
428
- if (1 === r.length) {
429
- var l = i.split("");
430
- l.splice(a.begin, 0, r), i = l.join("");
431
- }
432
- }
433
- return i;
434
- }(0, c, p);
435
- var h = function(e, a, r) {
436
- for (var o, l, s, c = e.substr(0, r.begin).split(""), f = e.substr(r.begin).split(""), d = a.substr(0, r.begin).split(""), p = a.substr(r.begin).split(""), h = c.length >= d.length ? c.length : d.length, v = f.length >= p.length ? f.length : p.length, m = "", g = [], k = "~"; c.length < h; ) c.push(k);
437
- for (;d.length < h; ) d.push(k);
438
- for (;f.length < v; ) f.unshift(k);
439
- for (;p.length < v; ) p.unshift(k);
440
- var y = c.concat(f), b = d.concat(p);
441
- for (l = 0, o = y.length; l < o; l++) switch (s = u.getPlaceholder.call(t, n.translatePosition.call(t, l)),
442
- m) {
443
- case "insertText":
444
- b[l - 1] === y[l] && r.begin == y.length - 1 && g.push(y[l]), l = o;
445
- break;
446
-
447
- case "insertReplacementText":
448
- case "deleteContentBackward":
449
- y[l] === k ? r.end++ : l = o;
450
- break;
451
-
452
- default:
453
- y[l] !== b[l] && (y[l + 1] !== k && y[l + 1] !== s && void 0 !== y[l + 1] || (b[l] !== s || b[l + 1] !== k) && b[l] !== k ? b[l + 1] === k && b[l] === y[l + 1] ? (m = "insertText",
454
- g.push(y[l]), r.begin--, r.end--) : y[l] !== s && y[l] !== k && (y[l + 1] === k || b[l] !== y[l] && b[l + 1] === y[l + 1]) ? (m = "insertReplacementText",
455
- g.push(y[l]), r.begin--) : y[l] === k ? (m = "deleteContentBackward", (n.isMask.call(t, n.translatePosition.call(t, l), !0) || b[l] === i.radixPoint) && r.end++) : l = o : (m = "insertText",
456
- g.push(y[l]), r.begin--, r.end--));
457
- }
458
- return {
459
- action: m,
460
- data: g,
461
- caret: r
462
- };
463
- }(c, f, p);
464
- switch ((l.inputmask.shadowRoot || l.ownerDocument).activeElement !== l && l.focus(),
465
- (0, s.writeBuffer)(l, n.getBuffer.call(t)), n.caret.call(t, l, p.begin, p.end, !0),
466
- h.action) {
467
- case "insertText":
468
- case "insertReplacementText":
469
- h.data.forEach((function(e, i) {
470
- var n = new a.Event("keypress");
471
- n.keyCode = e.charCodeAt(0), t.ignorable = !1, d.keypressEvent.call(l, n);
472
- })), setTimeout((function() {
473
- t.$el.trigger("keyup");
474
- }), 0);
475
- break;
476
-
477
- case "deleteContentBackward":
478
- var v = new a.Event("keydown");
479
- v.keyCode = r.default.BACKSPACE, d.keydownEvent.call(l, v);
480
- break;
481
-
482
- default:
483
- (0, s.applyInputValue)(l, c);
484
- }
485
- e.preventDefault();
486
- }
487
- },
488
- compositionendEvent: function(e) {
489
- var t = this.inputmask;
490
- t.isComposing = !1, t.$el.trigger("input");
491
- },
492
- setValueEvent: function(e) {
493
- var t = this.inputmask, i = this, a = e && e.detail ? e.detail[0] : arguments[1];
494
- void 0 === a && (a = i.inputmask._valueGet(!0)), (0, s.applyInputValue)(i, a), (e.detail && void 0 !== e.detail[1] || void 0 !== arguments[2]) && n.caret.call(t, i, e.detail ? e.detail[1] : arguments[2]);
495
- },
496
- focusEvent: function(e) {
497
- var t = this.inputmask, i = t.opts, a = this, r = a.inputmask._valueGet();
498
- i.showMaskOnFocus && r !== n.getBuffer.call(t).join("") && (0, s.writeBuffer)(a, n.getBuffer.call(t), n.seekNext.call(t, n.getLastValidPosition.call(t))),
499
- !0 !== i.positionCaretOnTab || !1 !== t.mouseEnter || l.isComplete.call(t, n.getBuffer.call(t)) && -1 !== n.getLastValidPosition.call(t) || d.clickEvent.apply(a, [ e, !0 ]),
500
- t.undoValue = t._valueGet(!0);
501
- },
502
- invalidEvent: function(e) {
503
- this.inputmask.validationEvent = !0;
504
- },
505
- mouseleaveEvent: function() {
506
- var e = this.inputmask, t = e.opts, i = this;
507
- e.mouseEnter = !1, t.clearMaskOnLostFocus && (i.inputmask.shadowRoot || i.ownerDocument).activeElement !== i && (0,
508
- s.HandleNativePlaceholder)(i, e.originalPlaceholder);
509
- },
510
- clickEvent: function(e, t) {
511
- var i = this.inputmask, a = this;
512
- if ((a.inputmask.shadowRoot || a.ownerDocument).activeElement === a) {
513
- var r = n.determineNewCaretPosition.call(i, n.caret.call(i, a), t);
514
- void 0 !== r && n.caret.call(i, a, r);
515
- }
516
- },
517
- cutEvent: function(e) {
518
- var t = this.inputmask, i = t.maskset, a = this, o = n.caret.call(t, a), u = t.isRTL ? n.getBuffer.call(t).slice(o.end, o.begin) : n.getBuffer.call(t).slice(o.begin, o.end), c = t.isRTL ? u.reverse().join("") : u.join("");
519
- window.navigator.clipboard ? window.navigator.clipboard.writeText(c) : window.clipboardData && window.clipboardData.getData && window.clipboardData.setData("Text", c),
520
- l.handleRemove.call(t, a, r.default.DELETE, o), (0, s.writeBuffer)(a, n.getBuffer.call(t), i.p, e, t.undoValue !== t._valueGet(!0));
521
- },
522
- blurEvent: function(e) {
523
- var t = this.inputmask, i = t.opts, a = (0, t.dependencyLib)(this), r = this;
524
- if (r.inputmask) {
525
- (0, s.HandleNativePlaceholder)(r, t.originalPlaceholder);
526
- var o = r.inputmask._valueGet(), u = n.getBuffer.call(t).slice();
527
- "" !== o && (i.clearMaskOnLostFocus && (-1 === n.getLastValidPosition.call(t) && o === n.getBufferTemplate.call(t).join("") ? u = [] : s.clearOptionalTail.call(t, u)),
528
- !1 === l.isComplete.call(t, u) && (setTimeout((function() {
529
- a.trigger("incomplete");
530
- }), 0), i.clearIncomplete && (n.resetMaskSet.call(t), u = i.clearMaskOnLostFocus ? [] : n.getBufferTemplate.call(t).slice())),
531
- (0, s.writeBuffer)(r, u, void 0, e)), t.undoValue !== t._valueGet(!0) && (t.undoValue = t._valueGet(!0),
532
- a.trigger("change"));
533
- }
534
- },
535
- mouseenterEvent: function() {
536
- var e = this.inputmask, t = e.opts, i = this;
537
- if (e.mouseEnter = !0, (i.inputmask.shadowRoot || i.ownerDocument).activeElement !== i) {
538
- var a = (e.isRTL ? n.getBufferTemplate.call(e).slice().reverse() : n.getBufferTemplate.call(e)).join("");
539
- e.placeholder !== a && i.placeholder !== e.originalPlaceholder && (e.originalPlaceholder = i.placeholder),
540
- t.showMaskOnHover && (0, s.HandleNativePlaceholder)(i, a);
541
- }
542
- },
543
- submitEvent: function() {
544
- var e = this.inputmask, t = e.opts;
545
- e.undoValue !== e._valueGet(!0) && e.$el.trigger("change"), -1 === n.getLastValidPosition.call(e) && e._valueGet && e._valueGet() === n.getBufferTemplate.call(e).join("") && e._valueSet(""),
546
- t.clearIncomplete && !1 === l.isComplete.call(e, n.getBuffer.call(e)) && e._valueSet(""),
547
- t.removeMaskOnSubmit && (e._valueSet(e.unmaskedvalue(), !0), setTimeout((function() {
548
- (0, s.writeBuffer)(e.el, n.getBuffer.call(e));
549
- }), 0));
550
- },
551
- resetEvent: function() {
552
- var e = this.inputmask;
553
- e.refreshValue = !0, setTimeout((function() {
554
- (0, s.applyInputValue)(e.el, e._valueGet(!0));
555
- }), 0);
556
- }
557
- };
558
- t.EventHandlers = d;
559
- },
560
- 9716: function(e, t, i) {
561
- Object.defineProperty(t, "__esModule", {
562
- value: !0
563
- }), t.EventRuler = void 0;
564
- var a = l(i(2394)), n = l(i(5581)), r = i(8711), o = i(7760);
565
- function l(e) {
566
- return e && e.__esModule ? e : {
567
- default: e
568
- };
569
- }
570
- var s = {
571
- on: function(e, t, i) {
572
- var l = e.inputmask.dependencyLib, s = function(t) {
573
- t.originalEvent && (t = t.originalEvent || t, arguments[0] = t);
574
- var s, u = this, c = u.inputmask, f = c ? c.opts : void 0;
575
- if (void 0 === c && "FORM" !== this.nodeName) {
576
- var d = l.data(u, "_inputmask_opts");
577
- l(u).off(), d && new a.default(d).mask(u);
578
- } else {
579
- 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))) {
580
- switch (t.type) {
581
- case "input":
582
- if (!0 === c.skipInputEvent || t.inputType && "insertCompositionText" === t.inputType) return c.skipInputEvent = !1,
583
- t.preventDefault();
584
- break;
585
-
586
- case "keydown":
587
- c.skipKeyPressEvent = !1, c.skipInputEvent = c.isComposing = t.keyCode === n.default.KEY_229;
588
- break;
589
-
590
- case "keyup":
591
- case "compositionend":
592
- c.isComposing && (c.skipInputEvent = !1);
593
- break;
594
-
595
- case "keypress":
596
- if (!0 === c.skipKeyPressEvent) return t.preventDefault();
597
- c.skipKeyPressEvent = !0;
598
- break;
599
-
600
- case "click":
601
- case "focus":
602
- 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("")),
603
- setTimeout((function() {
604
- e.focus();
605
- }), f.validationEventTimeOut), !1) : (s = arguments, setTimeout((function() {
606
- e.inputmask && i.apply(u, s);
607
- }), 0), !1);
608
- }
609
- var p = i.apply(u, arguments);
610
- return !1 === p && (t.preventDefault(), t.stopPropagation()), p;
611
- }
612
- t.preventDefault();
613
- }
614
- };
615
- [ "submit", "reset" ].includes(t) ? (s = s.bind(e), null !== e.form && l(e.form).on(t, s)) : l(e).on(t, s),
616
- e.inputmask.events[t] = e.inputmask.events[t] || [], e.inputmask.events[t].push(s);
617
- },
618
- off: function(e, t) {
619
- if (e.inputmask && e.inputmask.events) {
620
- var i = e.inputmask.dependencyLib, a = e.inputmask.events;
621
- for (var n in t && ((a = [])[t] = e.inputmask.events[t]), a) {
622
- for (var r = a[n]; r.length > 0; ) {
623
- var o = r.pop();
624
- [ "submit", "reset" ].includes(n) ? null !== e.form && i(e.form).off(n, o) : i(e).off(n, o);
625
- }
626
- delete e.inputmask.events[n];
627
- }
628
- }
629
- }
630
- };
631
- t.EventRuler = s;
632
- },
633
- 219: function(e, t, i) {
634
- var a = d(i(2394)), n = d(i(5581)), r = d(i(7184)), o = i(8711), l = i(4713);
635
- function s(e) {
636
- return s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
637
- return typeof e;
638
- } : function(e) {
639
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
640
- }, s(e);
641
- }
642
- function u(e, t) {
643
- return function(e) {
644
- if (Array.isArray(e)) return e;
645
- }(e) || function(e, t) {
646
- var i = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
647
- if (null == i) return;
648
- var a, n, r = [], o = !0, l = !1;
649
- try {
650
- for (i = i.call(e); !(o = (a = i.next()).done) && (r.push(a.value), !t || r.length !== t); o = !0) ;
651
- } catch (e) {
652
- l = !0, n = e;
653
- } finally {
654
- try {
655
- o || null == i.return || i.return();
656
- } finally {
657
- if (l) throw n;
658
- }
659
- }
660
- return r;
661
- }(e, t) || function(e, t) {
662
- if (!e) return;
663
- if ("string" == typeof e) return c(e, t);
664
- var i = Object.prototype.toString.call(e).slice(8, -1);
665
- "Object" === i && e.constructor && (i = e.constructor.name);
666
- if ("Map" === i || "Set" === i) return Array.from(e);
667
- if ("Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return c(e, t);
668
- }(e, t) || function() {
669
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
670
- }();
671
- }
672
- function c(e, t) {
673
- (null == t || t > e.length) && (t = e.length);
674
- for (var i = 0, a = new Array(t); i < t; i++) a[i] = e[i];
675
- return a;
676
- }
677
- function f(e, t) {
678
- for (var i = 0; i < t.length; i++) {
679
- var a = t[i];
680
- a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0),
681
- Object.defineProperty(e, a.key, a);
682
- }
683
- }
684
- function d(e) {
685
- return e && e.__esModule ? e : {
686
- default: e
687
- };
688
- }
689
- var p = a.default.dependencyLib, h = function() {
690
- function e(t, i, a) {
691
- !function(e, t) {
692
- if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
693
- }(this, e), this.mask = t, this.format = i, this.opts = a, this._date = new Date(1, 0, 1),
694
- this.initDateObject(t, this.opts);
695
- }
696
- var t, i, a;
697
- return t = e, (i = [ {
698
- key: "date",
699
- get: function() {
700
- return void 0 === this._date && (this._date = new Date(1, 0, 1), this.initDateObject(void 0, this.opts)),
701
- this._date;
702
- }
703
- }, {
704
- key: "initDateObject",
705
- value: function(e, t) {
706
- var i;
707
- for (P(t).lastIndex = 0; i = P(t).exec(this.format); ) {
708
- var a = new RegExp("\\d+$").exec(i[0]), n = a ? i[0][0] + "x" : i[0], r = void 0;
709
- if (void 0 !== e) {
710
- if (a) {
711
- var o = P(t).lastIndex, l = O(i.index, t);
712
- P(t).lastIndex = o, r = e.slice(0, e.indexOf(l.nextMatch[0]));
713
- } else r = e.slice(0, n.length);
714
- e = e.slice(r.length);
715
- }
716
- Object.prototype.hasOwnProperty.call(g, n) && this.setValue(this, r, n, g[n][2], g[n][1]);
717
- }
718
- }
719
- }, {
720
- key: "setValue",
721
- value: function(e, t, i, a, n) {
722
- if (void 0 !== t && (e[a] = "ampm" === a ? t : t.replace(/[^0-9]/g, "0"), e["raw" + a] = t.replace(/\s/g, "_")),
723
- void 0 !== n) {
724
- var r = e[a];
725
- ("day" === a && 29 === parseInt(r) || "month" === a && 2 === parseInt(r)) && (29 !== parseInt(e.day) || 2 !== parseInt(e.month) || "" !== e.year && void 0 !== e.year || e._date.setFullYear(2012, 1, 29)),
726
- "day" === a && (m = !0, 0 === parseInt(r) && (r = 1)), "month" === a && (m = !0),
727
- "year" === a && (m = !0, r.length < 4 && (r = _(r, 4, !0))), "" === r || isNaN(r) || n.call(e._date, r),
728
- "ampm" === a && n.call(e._date, r);
729
- }
730
- }
731
- }, {
732
- key: "reset",
733
- value: function() {
734
- this._date = new Date(1, 0, 1);
735
- }
736
- }, {
737
- key: "reInit",
738
- value: function() {
739
- this._date = void 0, this.date;
740
- }
741
- } ]) && f(t.prototype, i), a && f(t, a), Object.defineProperty(t, "prototype", {
742
- writable: !1
743
- }), e;
744
- }(), v = (new Date).getFullYear(), m = !1, g = {
745
- d: [ "[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", Date.prototype.getDate ],
746
- dd: [ "0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function() {
747
- return _(Date.prototype.getDate.call(this), 2);
748
- } ],
749
- ddd: [ "" ],
750
- dddd: [ "" ],
751
- m: [ "[1-9]|1[012]", function(e) {
752
- var t = e ? parseInt(e) : 0;
753
- return t > 0 && t--, Date.prototype.setMonth.call(this, t);
754
- }, "month", function() {
755
- return Date.prototype.getMonth.call(this) + 1;
756
- } ],
757
- mm: [ "0[1-9]|1[012]", function(e) {
758
- var t = e ? parseInt(e) : 0;
759
- return t > 0 && t--, Date.prototype.setMonth.call(this, t);
760
- }, "month", function() {
761
- return _(Date.prototype.getMonth.call(this) + 1, 2);
762
- } ],
763
- mmm: [ "" ],
764
- mmmm: [ "" ],
765
- yy: [ "[0-9]{2}", Date.prototype.setFullYear, "year", function() {
766
- return _(Date.prototype.getFullYear.call(this), 2);
767
- } ],
768
- yyyy: [ "[0-9]{4}", Date.prototype.setFullYear, "year", function() {
769
- return _(Date.prototype.getFullYear.call(this), 4);
770
- } ],
771
- h: [ "[1-9]|1[0-2]", Date.prototype.setHours, "hours", Date.prototype.getHours ],
772
- hh: [ "0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function() {
773
- return _(Date.prototype.getHours.call(this), 2);
774
- } ],
775
- hx: [ function(e) {
776
- return "[0-9]{".concat(e, "}");
777
- }, Date.prototype.setHours, "hours", function(e) {
778
- return Date.prototype.getHours;
779
- } ],
780
- H: [ "1?[0-9]|2[0-3]", Date.prototype.setHours, "hours", Date.prototype.getHours ],
781
- HH: [ "0[0-9]|1[0-9]|2[0-3]", Date.prototype.setHours, "hours", function() {
782
- return _(Date.prototype.getHours.call(this), 2);
783
- } ],
784
- Hx: [ function(e) {
785
- return "[0-9]{".concat(e, "}");
786
- }, Date.prototype.setHours, "hours", function(e) {
787
- return function() {
788
- return _(Date.prototype.getHours.call(this), e);
789
- };
790
- } ],
791
- M: [ "[1-5]?[0-9]", Date.prototype.setMinutes, "minutes", Date.prototype.getMinutes ],
792
- MM: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setMinutes, "minutes", function() {
793
- return _(Date.prototype.getMinutes.call(this), 2);
794
- } ],
795
- s: [ "[1-5]?[0-9]", Date.prototype.setSeconds, "seconds", Date.prototype.getSeconds ],
796
- ss: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setSeconds, "seconds", function() {
797
- return _(Date.prototype.getSeconds.call(this), 2);
798
- } ],
799
- l: [ "[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function() {
800
- return _(Date.prototype.getMilliseconds.call(this), 3);
801
- } ],
802
- L: [ "[0-9]{2}", Date.prototype.setMilliseconds, "milliseconds", function() {
803
- return _(Date.prototype.getMilliseconds.call(this), 2);
804
- } ],
805
- t: [ "[ap]", y, "ampm", b, 1 ],
806
- tt: [ "[ap]m", y, "ampm", b, 2 ],
807
- T: [ "[AP]", y, "ampm", b, 1 ],
808
- TT: [ "[AP]M", y, "ampm", b, 2 ],
809
- Z: [ ".*", void 0, "Z", function() {
810
- var e = this.toString().match(/\((.+)\)/)[1];
811
- e.includes(" ") && (e = (e = e.replace("-", " ").toUpperCase()).split(" ").map((function(e) {
812
- return u(e, 1)[0];
813
- })).join(""));
814
- return e;
815
- } ],
816
- o: [ "" ],
817
- S: [ "" ]
818
- }, k = {
819
- isoDate: "yyyy-mm-dd",
820
- isoTime: "HH:MM:ss",
821
- isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
822
- isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
823
- };
824
- function y(e) {
825
- var t = this.getHours();
826
- e.toLowerCase().includes("p") ? this.setHours(t + 12) : e.toLowerCase().includes("a") && t >= 12 && this.setHours(t - 12);
827
- }
828
- function b() {
829
- var e = this.getHours();
830
- return (e = e || 12) >= 12 ? "PM" : "AM";
831
- }
832
- function x(e) {
833
- var t = new RegExp("\\d+$").exec(e[0]);
834
- if (t && void 0 !== t[0]) {
835
- var i = g[e[0][0] + "x"].slice("");
836
- return i[0] = i[0](t[0]), i[3] = i[3](t[0]), i;
837
- }
838
- if (g[e[0]]) return g[e[0]];
839
- }
840
- function P(e) {
841
- if (!e.tokenizer) {
842
- var t = [], i = [];
843
- for (var a in g) if (/\.*x$/.test(a)) {
844
- var n = a[0] + "\\d+";
845
- -1 === i.indexOf(n) && i.push(n);
846
- } else -1 === t.indexOf(a[0]) && t.push(a[0]);
847
- e.tokenizer = "(" + (i.length > 0 ? i.join("|") + "|" : "") + t.join("+|") + ")+?|.",
848
- e.tokenizer = new RegExp(e.tokenizer, "g");
849
- }
850
- return e.tokenizer;
851
- }
852
- function E(e, t, i) {
853
- if (!m) return !0;
854
- 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 && (!isFinite(e.rawyear) || void 0 === e.rawyear || "" === e.rawyear) || new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day) return t;
855
- if ("29" == e.day) {
856
- var a = O(t.pos, i);
857
- if ("yyyy" === a.targetMatch[0] && t.pos - a.targetMatchIndex == 2) return t.remove = t.pos + 1,
858
- t;
859
- } else if ("02" == e.month && "30" == e.day && void 0 !== t.c) return e.day = "03",
860
- e.date.setDate(3), e.date.setMonth(1), t.insert = [ {
861
- pos: t.pos,
862
- c: "0"
863
- }, {
864
- pos: t.pos + 1,
865
- c: t.c
866
- } ], t.caret = o.seekNext.call(this, t.pos + 1), t;
867
- return !1;
868
- }
869
- function S(e, t, i, a) {
870
- var n, o, l = "";
871
- for (P(i).lastIndex = 0; n = P(i).exec(e); ) {
872
- if (void 0 === t) if (o = x(n)) l += "(" + o[0] + ")"; else switch (n[0]) {
873
- case "[":
874
- l += "(";
875
- break;
876
-
877
- case "]":
878
- l += ")?";
879
- break;
880
-
881
- default:
882
- l += (0, r.default)(n[0]);
883
- } else if (o = x(n)) if (!0 !== a && o[3]) l += o[3].call(t.date); else o[2] ? l += t["raw" + o[2]] : l += n[0]; else l += n[0];
884
- }
885
- return l;
886
- }
887
- function _(e, t, i) {
888
- for (e = String(e), t = t || 2; e.length < t; ) e = i ? e + "0" : "0" + e;
889
- return e;
890
- }
891
- function w(e, t, i) {
892
- return "string" == typeof e ? new h(e, t, i) : e && "object" === s(e) && Object.prototype.hasOwnProperty.call(e, "date") ? e : void 0;
893
- }
894
- function M(e, t) {
895
- return S(t.inputFormat, {
896
- date: e
897
- }, t);
898
- }
899
- function O(e, t) {
900
- var i, a, n = 0, r = 0;
901
- for (P(t).lastIndex = 0; a = P(t).exec(t.inputFormat); ) {
902
- var o = new RegExp("\\d+$").exec(a[0]);
903
- if ((n += r = o ? parseInt(o[0]) : a[0].length) >= e + 1) {
904
- i = a, a = P(t).exec(t.inputFormat);
905
- break;
906
- }
907
- }
908
- return {
909
- targetMatchIndex: n - r,
910
- nextMatch: a,
911
- targetMatch: i
912
- };
913
- }
914
- a.default.extendAliases({
915
- datetime: {
916
- mask: function(e) {
917
- return e.numericInput = !1, g.S = e.i18n.ordinalSuffix.join("|"), e.inputFormat = k[e.inputFormat] || e.inputFormat,
918
- e.displayFormat = k[e.displayFormat] || e.displayFormat || e.inputFormat, e.outputFormat = k[e.outputFormat] || e.outputFormat || e.inputFormat,
919
- e.placeholder = "" !== e.placeholder ? e.placeholder : e.inputFormat.replace(/[[\]]/, ""),
920
- e.regex = S(e.inputFormat, void 0, e), e.min = w(e.min, e.inputFormat, e), e.max = w(e.max, e.inputFormat, e),
921
- null;
922
- },
923
- placeholder: "",
924
- inputFormat: "isoDateTime",
925
- displayFormat: null,
926
- outputFormat: null,
927
- min: null,
928
- max: null,
929
- skipOptionalPartCharacter: "",
930
- i18n: {
931
- dayNames: [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ],
932
- 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" ],
933
- ordinalSuffix: [ "st", "nd", "rd", "th" ]
934
- },
935
- preValidation: function(e, t, i, a, n, r, o, l) {
936
- if (l) return !0;
937
- if (isNaN(i) && e[t] !== i) {
938
- var s = O(t, n);
939
- if (s.nextMatch && s.nextMatch[0] === i && s.targetMatch[0].length > 1) {
940
- var u = g[s.targetMatch[0]][0];
941
- if (new RegExp(u).test("0" + e[t - 1])) return e[t] = e[t - 1], e[t - 1] = "0",
942
- {
943
- fuzzy: !0,
944
- buffer: e,
945
- refreshFromBuffer: {
946
- start: t - 1,
947
- end: t + 1
948
- },
949
- pos: t + 1
950
- };
951
- }
952
- }
953
- return !0;
954
- },
955
- postValidation: function(e, t, i, a, n, r, o, s) {
956
- var u, c;
957
- if (o) return !0;
958
- if (!1 === a && (((u = O(t + 1, n)).targetMatch && u.targetMatchIndex === t && u.targetMatch[0].length > 1 && void 0 !== g[u.targetMatch[0]] || (u = O(t + 2, n)).targetMatch && u.targetMatchIndex === t + 1 && u.targetMatch[0].length > 1 && void 0 !== g[u.targetMatch[0]]) && (c = g[u.targetMatch[0]][0]),
959
- void 0 !== c && (void 0 !== r.validPositions[t + 1] && new RegExp(c).test(i + "0") ? (e[t] = i,
960
- e[t + 1] = "0", a = {
961
- pos: t + 2,
962
- caret: t
963
- }) : new RegExp(c).test("0" + i) && (e[t] = "0", e[t + 1] = i, a = {
964
- pos: t + 2
965
- })), !1 === a)) return a;
966
- if (a.fuzzy && (e = a.buffer, t = a.pos), (u = O(t, n)).targetMatch && u.targetMatch[0] && void 0 !== g[u.targetMatch[0]]) {
967
- var f = g[u.targetMatch[0]];
968
- c = f[0];
969
- var d = e.slice(u.targetMatchIndex, u.targetMatchIndex + u.targetMatch[0].length);
970
- if (!1 === new RegExp(c).test(d.join("")) && 2 === u.targetMatch[0].length && r.validPositions[u.targetMatchIndex] && r.validPositions[u.targetMatchIndex + 1] && (r.validPositions[u.targetMatchIndex + 1].input = "0"),
971
- "year" == f[2]) for (var p = l.getMaskTemplate.call(this, !1, 1, void 0, !0), h = t + 1; h < e.length; h++) e[h] = p[h],
972
- delete r.validPositions[h];
973
- }
974
- var m = a, k = w(e.join(""), n.inputFormat, n);
975
- return m && k.date.getTime() == k.date.getTime() && (n.prefillYear && (m = function(e, t, i) {
976
- if (e.year !== e.rawyear) {
977
- var a = v.toString(), n = e.rawyear.replace(/[^0-9]/g, ""), r = a.slice(0, n.length), o = a.slice(n.length);
978
- if (2 === n.length && n === r) {
979
- var l = new Date(v, e.month - 1, e.day);
980
- e.day == l.getDate() && (!i.max || i.max.date.getTime() >= l.getTime()) && (e.date.setFullYear(v),
981
- e.year = a, t.insert = [ {
982
- pos: t.pos + 1,
983
- c: o[0]
984
- }, {
985
- pos: t.pos + 2,
986
- c: o[1]
987
- } ]);
988
- }
989
- }
990
- return t;
991
- }(k, m, n)), m = function(e, t, i, a, n) {
992
- if (!t) return t;
993
- if (t && i.min && i.min.date.getTime() == i.min.date.getTime()) {
994
- var r;
995
- for (e.reset(), P(i).lastIndex = 0; r = P(i).exec(i.inputFormat); ) {
996
- var o;
997
- if ((o = x(r)) && o[3]) {
998
- for (var l = o[1], s = e[o[2]], u = i.min[o[2]], c = i.max ? i.max[o[2]] : u, f = [], d = !1, p = 0; p < u.length; p++) void 0 !== a.validPositions[p + r.index] || d ? (f[p] = s[p],
999
- d = d || s[p] > u[p]) : (f[p] = u[p], "year" === o[2] && s.length - 1 == p && u != c && (f = (parseInt(f.join("")) + 1).toString().split("")),
1000
- "ampm" === o[2] && u != c && i.min.date.getTime() > e.date.getTime() && (f[p] = c[p]));
1001
- l.call(e._date, f.join(""));
1002
- }
1003
- }
1004
- t = i.min.date.getTime() <= e.date.getTime(), e.reInit();
1005
- }
1006
- return t && i.max && i.max.date.getTime() == i.max.date.getTime() && (t = i.max.date.getTime() >= e.date.getTime()),
1007
- t;
1008
- }(k, m = E.call(this, k, m, n), n, r)), void 0 !== t && m && a.pos !== t ? {
1009
- buffer: S(n.inputFormat, k, n).split(""),
1010
- refreshFromBuffer: {
1011
- start: t,
1012
- end: a.pos
1013
- },
1014
- pos: a.caret || a.pos
1015
- } : m;
1016
- },
1017
- onKeyDown: function(e, t, i, a) {
1018
- e.ctrlKey && e.keyCode === n.default.RIGHT && (this.inputmask._valueSet(M(new Date, a)),
1019
- p(this).trigger("setvalue"));
1020
- },
1021
- onUnMask: function(e, t, i) {
1022
- return t ? S(i.outputFormat, w(e, i.inputFormat, i), i, !0) : t;
1023
- },
1024
- casing: function(e, t, i, a) {
1025
- return 0 == t.nativeDef.indexOf("[ap]") ? e.toLowerCase() : 0 == t.nativeDef.indexOf("[AP]") ? e.toUpperCase() : e;
1026
- },
1027
- onBeforeMask: function(e, t) {
1028
- return "[object Date]" === Object.prototype.toString.call(e) && (e = M(e, t)), e;
1029
- },
1030
- insertMode: !1,
1031
- shiftPositions: !1,
1032
- keepStatic: !1,
1033
- inputmode: "numeric",
1034
- prefillYear: !0
1035
- }
1036
- });
1037
- },
1038
- 3851: function(e, t, i) {
1039
- var a, n = (a = i(2394)) && a.__esModule ? a : {
1040
- default: a
1041
- }, r = i(8711), o = i(4713);
1042
- n.default.extendDefinitions({
1043
- A: {
1044
- validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
1045
- casing: "upper"
1046
- },
1047
- "&": {
1048
- validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
1049
- casing: "upper"
1050
- },
1051
- "#": {
1052
- validator: "[0-9A-Fa-f]",
1053
- casing: "upper"
1054
- }
1055
- });
1056
- var l = new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]");
1057
- function s(e, t, i, a, n) {
1058
- return i - 1 > -1 && "." !== t.buffer[i - 1] ? (e = t.buffer[i - 1] + e, e = i - 2 > -1 && "." !== t.buffer[i - 2] ? t.buffer[i - 2] + e : "0" + e) : e = "00" + e,
1059
- l.test(e);
1060
- }
1061
- n.default.extendAliases({
1062
- cssunit: {
1063
- regex: "[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"
1064
- },
1065
- url: {
1066
- regex: "(https?|ftp)://.*",
1067
- autoUnmask: !1,
1068
- keepStatic: !1,
1069
- tabThrough: !0
1070
- },
1071
- ip: {
1072
- mask: "i{1,3}.j{1,3}.k{1,3}.l{1,3}",
1073
- definitions: {
1074
- i: {
1075
- validator: s
1076
- },
1077
- j: {
1078
- validator: s
1079
- },
1080
- k: {
1081
- validator: s
1082
- },
1083
- l: {
1084
- validator: s
1085
- }
1086
- },
1087
- onUnMask: function(e, t, i) {
1088
- return e;
1089
- },
1090
- inputmode: "decimal",
1091
- substitutes: {
1092
- ",": "."
1093
- }
1094
- },
1095
- email: {
1096
- mask: function(e) {
1097
- var t = "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]", i = t;
1098
- if (e.separator) for (var a = 0; a < e.quantifier; a++) i += "[".concat(e.separator).concat(t, "]");
1099
- return i;
1100
- },
1101
- greedy: !1,
1102
- casing: "lower",
1103
- separator: null,
1104
- quantifier: 5,
1105
- skipOptionalPartCharacter: "",
1106
- onBeforePaste: function(e, t) {
1107
- return (e = e.toLowerCase()).replace("mailto:", "");
1108
- },
1109
- definitions: {
1110
- "*": {
1111
- validator: "[0-9\uff11-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5!#$%&'*+/=?^_`{|}~-]"
1112
- },
1113
- "-": {
1114
- validator: "[0-9A-Za-z-]"
1115
- }
1116
- },
1117
- onUnMask: function(e, t, i) {
1118
- return e;
1119
- },
1120
- inputmode: "email"
1121
- },
1122
- mac: {
1123
- mask: "##:##:##:##:##:##"
1124
- },
1125
- vin: {
1126
- mask: "V{13}9{4}",
1127
- definitions: {
1128
- V: {
1129
- validator: "[A-HJ-NPR-Za-hj-npr-z\\d]",
1130
- casing: "upper"
1131
- }
1132
- },
1133
- clearIncomplete: !0,
1134
- autoUnmask: !0
1135
- },
1136
- ssn: {
1137
- mask: "999-99-9999",
1138
- postValidation: function(e, t, i, a, n, l, s) {
1139
- var u = o.getMaskTemplate.call(this, !0, r.getLastValidPosition.call(this), !0, !0);
1140
- return /^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(u.join(""));
1141
- }
1142
- }
1143
- });
1144
- },
1145
- 207: function(e, t, i) {
1146
- var a = l(i(2394)), n = l(i(5581)), r = l(i(7184)), o = i(8711);
1147
- function l(e) {
1148
- return e && e.__esModule ? e : {
1149
- default: e
1150
- };
1151
- }
1152
- var s = a.default.dependencyLib;
1153
- function u(e, t) {
1154
- for (var i = "", n = 0; n < e.length; n++) a.default.prototype.definitions[e.charAt(n)] || t.definitions[e.charAt(n)] || t.optionalmarker[0] === e.charAt(n) || t.optionalmarker[1] === e.charAt(n) || t.quantifiermarker[0] === e.charAt(n) || t.quantifiermarker[1] === e.charAt(n) || t.groupmarker[0] === e.charAt(n) || t.groupmarker[1] === e.charAt(n) || t.alternatormarker === e.charAt(n) ? i += "\\" + e.charAt(n) : i += e.charAt(n);
1155
- return i;
1156
- }
1157
- function c(e, t, i, a) {
1158
- if (e.length > 0 && t > 0 && (!i.digitsOptional || a)) {
1159
- var n = e.indexOf(i.radixPoint), r = !1;
1160
- i.negationSymbol.back === e[e.length - 1] && (r = !0, e.length--), -1 === n && (e.push(i.radixPoint),
1161
- n = e.length - 1);
1162
- for (var o = 1; o <= t; o++) isFinite(e[n + o]) || (e[n + o] = "0");
1163
- }
1164
- return r && e.push(i.negationSymbol.back), e;
1165
- }
1166
- function f(e, t) {
1167
- var i = 0;
1168
- if ("+" === e) {
1169
- for (i in t.validPositions) ;
1170
- i = o.seekNext.call(this, parseInt(i));
1171
- }
1172
- for (var a in t.tests) if ((a = parseInt(a)) >= i) for (var n = 0, r = t.tests[a].length; n < r; n++) if ((void 0 === t.validPositions[a] || "-" === e) && t.tests[a][n].match.def === e) return a + (void 0 !== t.validPositions[a] && "-" !== e ? 1 : 0);
1173
- return i;
1174
- }
1175
- function d(e, t) {
1176
- var i = -1;
1177
- for (var a in t.validPositions) {
1178
- var n = t.validPositions[a];
1179
- if (n && n.match.def === e) {
1180
- i = parseInt(a);
1181
- break;
1182
- }
1183
- }
1184
- return i;
1185
- }
1186
- function p(e, t, i, a, n) {
1187
- var r = t.buffer ? t.buffer.indexOf(n.radixPoint) : -1, o = (-1 !== r || a && n.jitMasking) && new RegExp(n.definitions[9].validator).test(e);
1188
- return n._radixDance && -1 !== r && o && null == t.validPositions[r] ? {
1189
- insert: {
1190
- pos: r === i ? r + 1 : r,
1191
- c: n.radixPoint
1192
- },
1193
- pos: i
1194
- } : o;
1195
- }
1196
- a.default.extendAliases({
1197
- numeric: {
1198
- mask: function(e) {
1199
- e.repeat = 0, e.groupSeparator === e.radixPoint && e.digits && "0" !== e.digits && ("." === e.radixPoint ? e.groupSeparator = "," : "," === e.radixPoint ? e.groupSeparator = "." : e.groupSeparator = ""),
1200
- " " === e.groupSeparator && (e.skipOptionalPartCharacter = void 0), e.placeholder.length > 1 && (e.placeholder = e.placeholder.charAt(0)),
1201
- "radixFocus" === e.positionCaretOnClick && "" === e.placeholder && (e.positionCaretOnClick = "lvp");
1202
- var t = "0", i = e.radixPoint;
1203
- !0 === e.numericInput && void 0 === e.__financeInput ? (t = "1", e.positionCaretOnClick = "radixFocus" === e.positionCaretOnClick ? "lvp" : e.positionCaretOnClick,
1204
- e.digitsOptional = !1, isNaN(e.digits) && (e.digits = 2), e._radixDance = !1, i = "," === e.radixPoint ? "?" : "!",
1205
- "" !== e.radixPoint && void 0 === e.definitions[i] && (e.definitions[i] = {}, e.definitions[i].validator = "[" + e.radixPoint + "]",
1206
- e.definitions[i].placeholder = e.radixPoint, e.definitions[i].static = !0, e.definitions[i].generated = !0)) : (e.__financeInput = !1,
1207
- e.numericInput = !0);
1208
- var a, n = "[+]";
1209
- if (n += u(e.prefix, e), "" !== e.groupSeparator ? (void 0 === e.definitions[e.groupSeparator] && (e.definitions[e.groupSeparator] = {},
1210
- e.definitions[e.groupSeparator].validator = "[" + e.groupSeparator + "]", e.definitions[e.groupSeparator].placeholder = e.groupSeparator,
1211
- e.definitions[e.groupSeparator].static = !0, e.definitions[e.groupSeparator].generated = !0),
1212
- n += e._mask(e)) : n += "9{+}", void 0 !== e.digits && 0 !== e.digits) {
1213
- var o = e.digits.toString().split(",");
1214
- isFinite(o[0]) && o[1] && isFinite(o[1]) ? n += i + t + "{" + e.digits + "}" : (isNaN(e.digits) || parseInt(e.digits) > 0) && (e.digitsOptional || e.jitMasking ? (a = n + i + t + "{0," + e.digits + "}",
1215
- e.keepStatic = !0) : n += i + t + "{" + e.digits + "}");
1216
- } else e.inputmode = "numeric";
1217
- return n += u(e.suffix, e), n += "[-]", a && (n = [ a + u(e.suffix, e) + "[-]", n ]),
1218
- e.greedy = !1, function(e) {
1219
- void 0 === e.parseMinMaxOptions && (null !== e.min && (e.min = e.min.toString().replace(new RegExp((0,
1220
- r.default)(e.groupSeparator), "g"), ""), "," === e.radixPoint && (e.min = e.min.replace(e.radixPoint, ".")),
1221
- e.min = isFinite(e.min) ? parseFloat(e.min) : NaN, isNaN(e.min) && (e.min = Number.MIN_VALUE)),
1222
- null !== e.max && (e.max = e.max.toString().replace(new RegExp((0, r.default)(e.groupSeparator), "g"), ""),
1223
- "," === e.radixPoint && (e.max = e.max.replace(e.radixPoint, ".")), e.max = isFinite(e.max) ? parseFloat(e.max) : NaN,
1224
- isNaN(e.max) && (e.max = Number.MAX_VALUE)), e.parseMinMaxOptions = "done");
1225
- }(e), "" !== e.radixPoint && (e.substitutes["." == e.radixPoint ? "," : "."] = e.radixPoint),
1226
- n;
1227
- },
1228
- _mask: function(e) {
1229
- return "(" + e.groupSeparator + "999){+|1}";
1230
- },
1231
- digits: "*",
1232
- digitsOptional: !0,
1233
- enforceDigitsOnBlur: !1,
1234
- radixPoint: ".",
1235
- positionCaretOnClick: "radixFocus",
1236
- _radixDance: !0,
1237
- groupSeparator: "",
1238
- allowMinus: !0,
1239
- negationSymbol: {
1240
- front: "-",
1241
- back: ""
1242
- },
1243
- prefix: "",
1244
- suffix: "",
1245
- min: null,
1246
- max: null,
1247
- SetMaxOnOverflow: !1,
1248
- step: 1,
1249
- inputType: "text",
1250
- unmaskAsNumber: !1,
1251
- roundingFN: Math.round,
1252
- inputmode: "decimal",
1253
- shortcuts: {
1254
- k: "1000",
1255
- m: "1000000"
1256
- },
1257
- placeholder: "0",
1258
- greedy: !1,
1259
- rightAlign: !0,
1260
- insertMode: !0,
1261
- autoUnmask: !1,
1262
- skipOptionalPartCharacter: "",
1263
- usePrototypeDefinitions: !1,
1264
- stripLeadingZeroes: !0,
1265
- definitions: {
1266
- 0: {
1267
- validator: p
1268
- },
1269
- 1: {
1270
- validator: p,
1271
- definitionSymbol: "9"
1272
- },
1273
- 9: {
1274
- validator: "[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]",
1275
- definitionSymbol: "*"
1276
- },
1277
- "+": {
1278
- validator: function(e, t, i, a, n) {
1279
- return n.allowMinus && ("-" === e || e === n.negationSymbol.front);
1280
- }
1281
- },
1282
- "-": {
1283
- validator: function(e, t, i, a, n) {
1284
- return n.allowMinus && e === n.negationSymbol.back;
1285
- }
1286
- }
1287
- },
1288
- preValidation: function(e, t, i, a, n, r, o, l) {
1289
- if (!1 !== n.__financeInput && i === n.radixPoint) return !1;
1290
- var s = e.indexOf(n.radixPoint), u = t;
1291
- if (t = function(e, t, i, a, n) {
1292
- return n._radixDance && n.numericInput && t !== n.negationSymbol.back && e <= i && (i > 0 || t == n.radixPoint) && (void 0 === a.validPositions[e - 1] || a.validPositions[e - 1].input !== n.negationSymbol.back) && (e -= 1),
1293
- e;
1294
- }(t, i, s, r, n), "-" === i || i === n.negationSymbol.front) {
1295
- if (!0 !== n.allowMinus) return !1;
1296
- var c = !1, p = d("+", r), h = d("-", r);
1297
- return -1 !== p && (c = [ p, h ]), !1 !== c ? {
1298
- remove: c,
1299
- caret: u - n.negationSymbol.back.length
1300
- } : {
1301
- insert: [ {
1302
- pos: f.call(this, "+", r),
1303
- c: n.negationSymbol.front,
1304
- fromIsValid: !0
1305
- }, {
1306
- pos: f.call(this, "-", r),
1307
- c: n.negationSymbol.back,
1308
- fromIsValid: void 0
1309
- } ],
1310
- caret: u + n.negationSymbol.back.length
1311
- };
1312
- }
1313
- if (i === n.groupSeparator) return {
1314
- caret: u
1315
- };
1316
- if (l) return !0;
1317
- if (-1 !== s && !0 === n._radixDance && !1 === a && i === n.radixPoint && void 0 !== n.digits && (isNaN(n.digits) || parseInt(n.digits) > 0) && s !== t) return {
1318
- caret: n._radixDance && t === s - 1 ? s + 1 : s
1319
- };
1320
- if (!1 === n.__financeInput) if (a) {
1321
- if (n.digitsOptional) return {
1322
- rewritePosition: o.end
1323
- };
1324
- if (!n.digitsOptional) {
1325
- if (o.begin > s && o.end <= s) return i === n.radixPoint ? {
1326
- insert: {
1327
- pos: s + 1,
1328
- c: "0",
1329
- fromIsValid: !0
1330
- },
1331
- rewritePosition: s
1332
- } : {
1333
- rewritePosition: s + 1
1334
- };
1335
- if (o.begin < s) return {
1336
- rewritePosition: o.begin - 1
1337
- };
1338
- }
1339
- } else if (!n.showMaskOnHover && !n.showMaskOnFocus && !n.digitsOptional && n.digits > 0 && "" === this.__valueGet.call(this.el)) return {
1340
- rewritePosition: s
1341
- };
1342
- return {
1343
- rewritePosition: t
1344
- };
1345
- },
1346
- postValidation: function(e, t, i, a, n, r, o) {
1347
- if (!1 === a) return a;
1348
- if (o) return !0;
1349
- if (null !== n.min || null !== n.max) {
1350
- var l = n.onUnMask(e.slice().reverse().join(""), void 0, s.extend({}, n, {
1351
- unmaskAsNumber: !0
1352
- }));
1353
- if (null !== n.min && l < n.min && (l.toString().length > n.min.toString().length || l < 0)) return !1;
1354
- if (null !== n.max && l > n.max) return !!n.SetMaxOnOverflow && {
1355
- refreshFromBuffer: !0,
1356
- buffer: c(n.max.toString().replace(".", n.radixPoint).split(""), n.digits, n).reverse()
1357
- };
1358
- }
1359
- return a;
1360
- },
1361
- onUnMask: function(e, t, i) {
1362
- if ("" === t && !0 === i.nullable) return t;
1363
- var a = e.replace(i.prefix, "");
1364
- return a = (a = a.replace(i.suffix, "")).replace(new RegExp((0, r.default)(i.groupSeparator), "g"), ""),
1365
- "" !== i.placeholder.charAt(0) && (a = a.replace(new RegExp(i.placeholder.charAt(0), "g"), "0")),
1366
- i.unmaskAsNumber ? ("" !== i.radixPoint && -1 !== a.indexOf(i.radixPoint) && (a = a.replace(r.default.call(this, i.radixPoint), ".")),
1367
- a = (a = a.replace(new RegExp("^" + (0, r.default)(i.negationSymbol.front)), "-")).replace(new RegExp((0,
1368
- r.default)(i.negationSymbol.back) + "$"), ""), Number(a)) : a;
1369
- },
1370
- isComplete: function(e, t) {
1371
- var i = (t.numericInput ? e.slice().reverse() : e).join("");
1372
- return i = (i = (i = (i = (i = i.replace(new RegExp("^" + (0, r.default)(t.negationSymbol.front)), "-")).replace(new RegExp((0,
1373
- r.default)(t.negationSymbol.back) + "$"), "")).replace(t.prefix, "")).replace(t.suffix, "")).replace(new RegExp((0,
1374
- r.default)(t.groupSeparator) + "([0-9]{3})", "g"), "$1"), "," === t.radixPoint && (i = i.replace((0,
1375
- r.default)(t.radixPoint), ".")), isFinite(i);
1376
- },
1377
- onBeforeMask: function(e, t) {
1378
- var i = t.radixPoint || ",";
1379
- isFinite(t.digits) && (t.digits = parseInt(t.digits)), "number" != typeof e && "number" !== t.inputType || "" === i || (e = e.toString().replace(".", i));
1380
- var a = "-" === e.charAt(0) || e.charAt(0) === t.negationSymbol.front, n = e.split(i), o = n[0].replace(/[^\-0-9]/g, ""), l = n.length > 1 ? n[1].replace(/[^0-9]/g, "") : "", s = n.length > 1;
1381
- e = o + ("" !== l ? i + l : l);
1382
- var u = 0;
1383
- if ("" !== i && (u = t.digitsOptional ? t.digits < l.length ? t.digits : l.length : t.digits,
1384
- "" !== l || !t.digitsOptional)) {
1385
- var f = Math.pow(10, u || 1);
1386
- e = e.replace((0, r.default)(i), "."), isNaN(parseFloat(e)) || (e = (t.roundingFN(parseFloat(e) * f) / f).toFixed(u)),
1387
- e = e.toString().replace(".", i);
1388
- }
1389
- if (0 === t.digits && -1 !== e.indexOf(i) && (e = e.substring(0, e.indexOf(i))),
1390
- null !== t.min || null !== t.max) {
1391
- var d = e.toString().replace(i, ".");
1392
- null !== t.min && d < t.min ? e = t.min.toString().replace(".", i) : null !== t.max && d > t.max && (e = t.max.toString().replace(".", i));
1393
- }
1394
- return a && "-" !== e.charAt(0) && (e = "-" + e), c(e.toString().split(""), u, t, s).join("");
1395
- },
1396
- onBeforeWrite: function(e, t, i, a) {
1397
- function n(e, t) {
1398
- if (!1 !== a.__financeInput || t) {
1399
- var i = e.indexOf(a.radixPoint);
1400
- -1 !== i && e.splice(i, 1);
1401
- }
1402
- if ("" !== a.groupSeparator) for (;-1 !== (i = e.indexOf(a.groupSeparator)); ) e.splice(i, 1);
1403
- return e;
1404
- }
1405
- var o, l;
1406
- if (a.stripLeadingZeroes && (l = function(e, t) {
1407
- var i = new RegExp("(^" + ("" !== t.negationSymbol.front ? (0, r.default)(t.negationSymbol.front) + "?" : "") + (0,
1408
- r.default)(t.prefix) + ")(.*)(" + (0, r.default)(t.suffix) + ("" != t.negationSymbol.back ? (0,
1409
- r.default)(t.negationSymbol.back) + "?" : "") + "$)").exec(e.slice().reverse().join("")), a = i ? i[2] : "", n = !1;
1410
- return a && (a = a.split(t.radixPoint.charAt(0))[0], n = new RegExp("^[0" + t.groupSeparator + "]*").exec(a)),
1411
- !(!n || !(n[0].length > 1 || n[0].length > 0 && n[0].length < a.length)) && n;
1412
- }(t, a))) for (var u = t.join("").lastIndexOf(l[0].split("").reverse().join("")) - (l[0] == l.input ? 0 : 1), f = l[0] == l.input ? 1 : 0, d = l[0].length - f; d > 0; d--) delete this.maskset.validPositions[u + d],
1413
- delete t[u + d];
1414
- if (e) switch (e.type) {
1415
- case "blur":
1416
- case "checkval":
1417
- if (null !== a.min) {
1418
- var p = a.onUnMask(t.slice().reverse().join(""), void 0, s.extend({}, a, {
1419
- unmaskAsNumber: !0
1420
- }));
1421
- if (null !== a.min && p < a.min) return {
1422
- refreshFromBuffer: !0,
1423
- buffer: c(a.min.toString().replace(".", a.radixPoint).split(""), a.digits, a).reverse()
1424
- };
1425
- }
1426
- if (t[t.length - 1] === a.negationSymbol.front) {
1427
- var h = new RegExp("(^" + ("" != a.negationSymbol.front ? (0, r.default)(a.negationSymbol.front) + "?" : "") + (0,
1428
- r.default)(a.prefix) + ")(.*)(" + (0, r.default)(a.suffix) + ("" != a.negationSymbol.back ? (0,
1429
- r.default)(a.negationSymbol.back) + "?" : "") + "$)").exec(n(t.slice(), !0).reverse().join(""));
1430
- 0 == (h ? h[2] : "") && (o = {
1431
- refreshFromBuffer: !0,
1432
- buffer: [ 0 ]
1433
- });
1434
- } else if ("" !== a.radixPoint) {
1435
- t.indexOf(a.radixPoint) === a.suffix.length && (o && o.buffer ? o.buffer.splice(0, 1 + a.suffix.length) : (t.splice(0, 1 + a.suffix.length),
1436
- o = {
1437
- refreshFromBuffer: !0,
1438
- buffer: n(t)
1439
- }));
1440
- }
1441
- if (a.enforceDigitsOnBlur) {
1442
- var v = (o = o || {}) && o.buffer || t.slice().reverse();
1443
- o.refreshFromBuffer = !0, o.buffer = c(v, a.digits, a, !0).reverse();
1444
- }
1445
- }
1446
- return o;
1447
- },
1448
- onKeyDown: function(e, t, i, a) {
1449
- var r, o, l = s(this), u = String.fromCharCode(e.keyCode).toLowerCase();
1450
- if ((o = a.shortcuts && a.shortcuts[u]) && o.length > 1) return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) * parseInt(o)),
1451
- l.trigger("setvalue"), !1;
1452
- if (e.ctrlKey) switch (e.keyCode) {
1453
- case n.default.UP:
1454
- return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) + parseInt(a.step)),
1455
- l.trigger("setvalue"), !1;
1456
-
1457
- case n.default.DOWN:
1458
- return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) - parseInt(a.step)),
1459
- l.trigger("setvalue"), !1;
1460
- }
1461
- if (!e.shiftKey && (e.keyCode === n.default.DELETE || e.keyCode === n.default.BACKSPACE || e.keyCode === n.default.BACKSPACE_SAFARI) && i.begin !== t.length) {
1462
- if (t[e.keyCode === n.default.DELETE ? i.begin - 1 : i.end] === a.negationSymbol.front) return r = t.slice().reverse(),
1463
- "" !== a.negationSymbol.front && r.shift(), "" !== a.negationSymbol.back && r.pop(),
1464
- l.trigger("setvalue", [ r.join(""), i.begin ]), !1;
1465
- if (!0 === a._radixDance) {
1466
- var f = t.indexOf(a.radixPoint);
1467
- if (a.digitsOptional) {
1468
- if (0 === f) return (r = t.slice().reverse()).pop(), l.trigger("setvalue", [ r.join(""), i.begin >= r.length ? r.length : i.begin ]),
1469
- !1;
1470
- } else if (-1 !== f && (i.begin < f || i.end < f || e.keyCode === n.default.DELETE && i.begin === f)) return i.begin !== i.end || e.keyCode !== n.default.BACKSPACE && e.keyCode !== n.default.BACKSPACE_SAFARI || i.begin++,
1471
- (r = t.slice().reverse()).splice(r.length - i.begin, i.begin - i.end + 1), r = c(r, a.digits, a).join(""),
1472
- l.trigger("setvalue", [ r, i.begin >= r.length ? f + 1 : i.begin ]), !1;
1473
- }
1474
- }
1475
- }
1476
- },
1477
- currency: {
1478
- prefix: "",
1479
- groupSeparator: ",",
1480
- alias: "numeric",
1481
- digits: 2,
1482
- digitsOptional: !1
1483
- },
1484
- decimal: {
1485
- alias: "numeric"
1486
- },
1487
- integer: {
1488
- alias: "numeric",
1489
- inputmode: "numeric",
1490
- digits: 0
1491
- },
1492
- percentage: {
1493
- alias: "numeric",
1494
- min: 0,
1495
- max: 100,
1496
- suffix: " %",
1497
- digits: 0,
1498
- allowMinus: !1
1499
- },
1500
- indianns: {
1501
- alias: "numeric",
1502
- _mask: function(e) {
1503
- return "(" + e.groupSeparator + "99){*|1}(" + e.groupSeparator + "999){1|1}";
1504
- },
1505
- groupSeparator: ",",
1506
- radixPoint: ".",
1507
- placeholder: "0",
1508
- digits: 2,
1509
- digitsOptional: !1
1510
- }
1511
- });
1512
- },
1513
- 9380: function(e, t, i) {
1514
- var a;
1515
- Object.defineProperty(t, "__esModule", {
1516
- value: !0
1517
- }), t.default = void 0;
1518
- var n = ((a = i(8741)) && a.__esModule ? a : {
1519
- default: a
1520
- }).default ? window : {};
1521
- t.default = n;
1522
- },
1523
- 7760: function(e, t, i) {
1524
- Object.defineProperty(t, "__esModule", {
1525
- value: !0
1526
- }), t.HandleNativePlaceholder = function(e, t) {
1527
- var i = e ? e.inputmask : this;
1528
- if (s.ie) {
1529
- if (e.inputmask._valueGet() !== t && (e.placeholder !== t || "" === e.placeholder)) {
1530
- var a = o.getBuffer.call(i).slice(), n = e.inputmask._valueGet();
1531
- if (n !== t) {
1532
- var r = o.getLastValidPosition.call(i);
1533
- -1 === r && n === o.getBufferTemplate.call(i).join("") ? a = [] : -1 !== r && f.call(i, a),
1534
- p(e, a);
1535
- }
1536
- }
1537
- } else e.placeholder !== t && (e.placeholder = t, "" === e.placeholder && e.removeAttribute("placeholder"));
1538
- }, t.applyInputValue = c, t.checkVal = d, t.clearOptionalTail = f, t.unmaskedvalue = function(e) {
1539
- var t = e ? e.inputmask : this, i = t.opts, a = t.maskset;
1540
- if (e) {
1541
- if (void 0 === e.inputmask) return e.value;
1542
- e.inputmask && e.inputmask.refreshValue && c(e, e.inputmask._valueGet(!0));
1543
- }
1544
- var n = [], r = a.validPositions;
1545
- for (var l in r) r[l] && r[l].match && (1 != r[l].match.static || Array.isArray(a.metadata) && !0 !== r[l].generatedInput) && n.push(r[l].input);
1546
- var s = 0 === n.length ? "" : (t.isRTL ? n.reverse() : n).join("");
1547
- if ("function" == typeof i.onUnMask) {
1548
- var u = (t.isRTL ? o.getBuffer.call(t).slice().reverse() : o.getBuffer.call(t)).join("");
1549
- s = i.onUnMask.call(t, u, s, i);
1550
- }
1551
- return s;
1552
- }, t.writeBuffer = p;
1553
- var a, n = (a = i(5581)) && a.__esModule ? a : {
1554
- default: a
1555
- }, r = i(4713), o = i(8711), l = i(7215), s = i(9845), u = i(6030);
1556
- function c(e, t) {
1557
- var i = e ? e.inputmask : this, a = i.opts;
1558
- e.inputmask.refreshValue = !1, "function" == typeof a.onBeforeMask && (t = a.onBeforeMask.call(i, t, a) || t),
1559
- d(e, !0, !1, t = t.toString().split("")), i.undoValue = i._valueGet(!0), (a.clearMaskOnLostFocus || a.clearIncomplete) && e.inputmask._valueGet() === o.getBufferTemplate.call(i).join("") && -1 === o.getLastValidPosition.call(i) && e.inputmask._valueSet("");
1560
- }
1561
- function f(e) {
1562
- e.length = 0;
1563
- for (var t, i = r.getMaskTemplate.call(this, !0, 0, !0, void 0, !0); void 0 !== (t = i.shift()); ) e.push(t);
1564
- return e;
1565
- }
1566
- function d(e, t, i, a, n) {
1567
- var s = e ? e.inputmask : this, c = s.maskset, f = s.opts, d = s.dependencyLib, h = a.slice(), v = "", m = -1, g = void 0, k = f.skipOptionalPartCharacter;
1568
- f.skipOptionalPartCharacter = "", o.resetMaskSet.call(s), c.tests = {}, m = f.radixPoint ? o.determineNewCaretPosition.call(s, {
1569
- begin: 0,
1570
- end: 0
1571
- }, !1, !1 === f.__financeInput ? "radixFocus" : void 0).begin : 0, c.p = m, s.caretPos = {
1572
- begin: m
1573
- };
1574
- var y = [], b = s.caretPos;
1575
- if (h.forEach((function(e, t) {
1576
- if (void 0 !== e) {
1577
- var a = new d.Event("_checkval");
1578
- a.keyCode = e.toString().charCodeAt(0), v += e;
1579
- var n = o.getLastValidPosition.call(s, void 0, !0);
1580
- !function(e, t) {
1581
- for (var i = r.getMaskTemplate.call(s, !0, 0).slice(e, o.seekNext.call(s, e, !1, !1)).join("").replace(/'/g, ""), a = i.indexOf(t); a > 0 && " " === i[a - 1]; ) a--;
1582
- var n = 0 === a && !o.isMask.call(s, e) && (r.getTest.call(s, e).match.nativeDef === t.charAt(0) || !0 === r.getTest.call(s, e).match.static && r.getTest.call(s, e).match.nativeDef === "'" + t.charAt(0) || " " === r.getTest.call(s, e).match.nativeDef && (r.getTest.call(s, e + 1).match.nativeDef === t.charAt(0) || !0 === r.getTest.call(s, e + 1).match.static && r.getTest.call(s, e + 1).match.nativeDef === "'" + t.charAt(0)));
1583
- if (!n && a > 0 && !o.isMask.call(s, e, !1, !0)) {
1584
- var l = o.seekNext.call(s, e);
1585
- s.caretPos.begin < l && (s.caretPos = {
1586
- begin: l
1587
- });
1588
- }
1589
- return n;
1590
- }(m, v) ? (g = u.EventHandlers.keypressEvent.call(s, a, !0, !1, i, s.caretPos.begin)) && (m = s.caretPos.begin + 1,
1591
- v = "") : g = u.EventHandlers.keypressEvent.call(s, a, !0, !1, i, n + 1), g ? (void 0 !== g.pos && c.validPositions[g.pos] && !0 === c.validPositions[g.pos].match.static && void 0 === c.validPositions[g.pos].alternation && (y.push(g.pos),
1592
- s.isRTL || (g.forwardPosition = g.pos + 1)), p.call(s, void 0, o.getBuffer.call(s), g.forwardPosition, a, !1),
1593
- s.caretPos = {
1594
- begin: g.forwardPosition,
1595
- end: g.forwardPosition
1596
- }, b = s.caretPos) : void 0 === c.validPositions[t] && h[t] === r.getPlaceholder.call(s, t) && o.isMask.call(s, t, !0) ? s.caretPos.begin++ : s.caretPos = b;
1597
- }
1598
- })), y.length > 0) {
1599
- var x, P, E = o.seekNext.call(s, -1, void 0, !1);
1600
- if (!l.isComplete.call(s, o.getBuffer.call(s)) && y.length <= E || l.isComplete.call(s, o.getBuffer.call(s)) && y.length > 0 && y.length !== E && 0 === y[0]) for (var S = E; void 0 !== (x = y.shift()); ) {
1601
- var _ = new d.Event("_checkval");
1602
- if ((P = c.validPositions[x]).generatedInput = !0, _.keyCode = P.input.charCodeAt(0),
1603
- (g = u.EventHandlers.keypressEvent.call(s, _, !0, !1, i, S)) && void 0 !== g.pos && g.pos !== x && c.validPositions[g.pos] && !0 === c.validPositions[g.pos].match.static) y.push(g.pos); else if (!g) break;
1604
- S++;
1605
- }
1606
- }
1607
- t && p.call(s, e, o.getBuffer.call(s), g ? g.forwardPosition : s.caretPos.begin, n || new d.Event("checkval"), n && ("input" === n.type && s.undoValue !== o.getBuffer.call(s).join("") || "paste" === n.type)),
1608
- f.skipOptionalPartCharacter = k;
1609
- }
1610
- function p(e, t, i, a, r) {
1611
- var s = e ? e.inputmask : this, u = s.opts, c = s.dependencyLib;
1612
- if (a && "function" == typeof u.onBeforeWrite) {
1613
- var f = u.onBeforeWrite.call(s, a, t, i, u);
1614
- if (f) {
1615
- if (f.refreshFromBuffer) {
1616
- var d = f.refreshFromBuffer;
1617
- l.refreshFromBuffer.call(s, !0 === d ? d : d.start, d.end, f.buffer || t), t = o.getBuffer.call(s, !0);
1618
- }
1619
- void 0 !== i && (i = void 0 !== f.caret ? f.caret : i);
1620
- }
1621
- }
1622
- if (void 0 !== e && (e.inputmask._valueSet(t.join("")), void 0 === i || void 0 !== a && "blur" === a.type || o.caret.call(s, e, i, void 0, void 0, void 0 !== a && "keydown" === a.type && (a.keyCode === n.default.DELETE || a.keyCode === n.default.BACKSPACE)),
1623
- !0 === r)) {
1624
- var p = c(e), h = e.inputmask._valueGet();
1625
- e.inputmask.skipInputEvent = !0, p.trigger("input"), setTimeout((function() {
1626
- h === o.getBufferTemplate.call(s).join("") ? p.trigger("cleared") : !0 === l.isComplete.call(s, t) && p.trigger("complete");
1627
- }), 0);
1628
- }
1629
- }
1630
- },
1631
- 2394: function(e, t, i) {
1632
- Object.defineProperty(t, "__esModule", {
1633
- value: !0
1634
- }), t.default = void 0, i(7149), i(3194);
1635
- var a = i(157), n = m(i(4963)), r = m(i(9380)), o = i(2391), l = i(4713), s = i(8711), u = i(7215), c = i(7760), f = i(9716), d = m(i(7392)), p = m(i(3976)), h = m(i(8741));
1636
- function v(e) {
1637
- return v = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1638
- return typeof e;
1639
- } : function(e) {
1640
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1641
- }, v(e);
1642
- }
1643
- function m(e) {
1644
- return e && e.__esModule ? e : {
1645
- default: e
1646
- };
1647
- }
1648
- var g = r.default.document, k = "_inputmask_opts";
1649
- function y(e, t, i) {
1650
- if (h.default) {
1651
- if (!(this instanceof y)) return new y(e, t, i);
1652
- this.dependencyLib = n.default, this.el = void 0, this.events = {}, this.maskset = void 0,
1653
- !0 !== i && ("[object Object]" === Object.prototype.toString.call(e) ? t = e : (t = t || {},
1654
- e && (t.alias = e)), this.opts = n.default.extend(!0, {}, this.defaults, t), this.noMasksCache = t && void 0 !== t.definitions,
1655
- this.userOptions = t || {}, b(this.opts.alias, t, this.opts)), this.refreshValue = !1,
1656
- this.undoValue = void 0, this.$el = void 0, this.skipKeyPressEvent = !1, this.skipInputEvent = !1,
1657
- this.validationEvent = !1, this.ignorable = !1, this.maxLength, this.mouseEnter = !1,
1658
- this.originalPlaceholder = void 0, this.isComposing = !1;
1659
- }
1660
- }
1661
- function b(e, t, i) {
1662
- var a = y.prototype.aliases[e];
1663
- return a ? (a.alias && b(a.alias, void 0, i), n.default.extend(!0, i, a), n.default.extend(!0, i, t),
1664
- !0) : (null === i.mask && (i.mask = e), !1);
1665
- }
1666
- y.prototype = {
1667
- dataAttribute: "data-inputmask",
1668
- defaults: p.default,
1669
- definitions: d.default,
1670
- aliases: {},
1671
- masksCache: {},
1672
- get isRTL() {
1673
- return this.opts.isRTL || this.opts.numericInput;
1674
- },
1675
- mask: function(e) {
1676
- var t = this;
1677
- return "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)),
1678
- (e = e.nodeName ? [ e ] : Array.isArray(e) ? e : Array.from(e)).forEach((function(e, i) {
1679
- var l = n.default.extend(!0, {}, t.opts);
1680
- if (function(e, t, i, a) {
1681
- function o(t, n) {
1682
- var o = "" === a ? t : a + "-" + t;
1683
- null !== (n = void 0 !== n ? n : e.getAttribute(o)) && ("string" == typeof n && (0 === t.indexOf("on") ? n = r.default[n] : "false" === n ? n = !1 : "true" === n && (n = !0)),
1684
- i[t] = n);
1685
- }
1686
- if (!0 === t.importDataAttributes) {
1687
- var l, s, u, c, f = e.getAttribute(a);
1688
- if (f && "" !== f && (f = f.replace(/'/g, '"'), s = JSON.parse("{" + f + "}")),
1689
- s) for (c in u = void 0, s) if ("alias" === c.toLowerCase()) {
1690
- u = s[c];
1691
- break;
1692
- }
1693
- for (l in o("alias", u), i.alias && b(i.alias, i, t), t) {
1694
- if (s) for (c in u = void 0, s) if (c.toLowerCase() === l.toLowerCase()) {
1695
- u = s[c];
1696
- break;
1697
- }
1698
- o(l, u);
1699
- }
1700
- }
1701
- n.default.extend(!0, t, i), ("rtl" === e.dir || t.rightAlign) && (e.style.textAlign = "right");
1702
- ("rtl" === e.dir || t.numericInput) && (e.dir = "ltr", e.removeAttribute("dir"),
1703
- t.isRTL = !0);
1704
- return Object.keys(i).length;
1705
- }(e, l, n.default.extend(!0, {}, t.userOptions), t.dataAttribute)) {
1706
- var s = (0, o.generateMaskSet)(l, t.noMasksCache);
1707
- void 0 !== s && (void 0 !== e.inputmask && (e.inputmask.opts.autoUnmask = !0, e.inputmask.remove()),
1708
- e.inputmask = new y(void 0, void 0, !0), e.inputmask.opts = l, e.inputmask.noMasksCache = t.noMasksCache,
1709
- e.inputmask.userOptions = n.default.extend(!0, {}, t.userOptions), e.inputmask.el = e,
1710
- e.inputmask.$el = (0, n.default)(e), e.inputmask.maskset = s, n.default.data(e, k, t.userOptions),
1711
- a.mask.call(e.inputmask));
1712
- }
1713
- })), e && e[0] && e[0].inputmask || this;
1714
- },
1715
- option: function(e, t) {
1716
- return "string" == typeof e ? this.opts[e] : "object" === v(e) ? (n.default.extend(this.userOptions, e),
1717
- this.el && !0 !== t && this.mask(this.el), this) : void 0;
1718
- },
1719
- unmaskedvalue: function(e) {
1720
- if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache),
1721
- void 0 === this.el || void 0 !== e) {
1722
- var t = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split("");
1723
- c.checkVal.call(this, void 0, !1, !1, t), "function" == typeof this.opts.onBeforeWrite && this.opts.onBeforeWrite.call(this, void 0, s.getBuffer.call(this), 0, this.opts);
1724
- }
1725
- return c.unmaskedvalue.call(this, this.el);
1726
- },
1727
- remove: function() {
1728
- if (this.el) {
1729
- n.default.data(this.el, k, null);
1730
- var e = this.opts.autoUnmask ? (0, c.unmaskedvalue)(this.el) : this._valueGet(this.opts.autoUnmask);
1731
- e !== s.getBufferTemplate.call(this).join("") ? this._valueSet(e, this.opts.autoUnmask) : this._valueSet(""),
1732
- f.EventRuler.off(this.el), Object.getOwnPropertyDescriptor && Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el), "value") && this.__valueGet && Object.defineProperty(this.el, "value", {
1733
- get: this.__valueGet,
1734
- set: this.__valueSet,
1735
- configurable: !0
1736
- }) : g.__lookupGetter__ && this.el.__lookupGetter__("value") && this.__valueGet && (this.el.__defineGetter__("value", this.__valueGet),
1737
- this.el.__defineSetter__("value", this.__valueSet)), this.el.inputmask = void 0;
1738
- }
1739
- return this.el;
1740
- },
1741
- getemptymask: function() {
1742
- return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache),
1743
- s.getBufferTemplate.call(this).join("");
1744
- },
1745
- hasMaskedValue: function() {
1746
- return !this.opts.autoUnmask;
1747
- },
1748
- isComplete: function() {
1749
- return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache),
1750
- u.isComplete.call(this, s.getBuffer.call(this));
1751
- },
1752
- getmetadata: function() {
1753
- if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache),
1754
- Array.isArray(this.maskset.metadata)) {
1755
- var e = l.getMaskTemplate.call(this, !0, 0, !1).join("");
1756
- return this.maskset.metadata.forEach((function(t) {
1757
- return t.mask !== e || (e = t, !1);
1758
- })), e;
1759
- }
1760
- return this.maskset.metadata;
1761
- },
1762
- isValid: function(e) {
1763
- if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache),
1764
- e) {
1765
- var t = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split("");
1766
- c.checkVal.call(this, void 0, !0, !1, t);
1767
- } else e = this.isRTL ? s.getBuffer.call(this).slice().reverse().join("") : s.getBuffer.call(this).join("");
1768
- for (var i = s.getBuffer.call(this), a = s.determineLastRequiredPosition.call(this), n = i.length - 1; n > a && !s.isMask.call(this, n); n--) ;
1769
- return i.splice(a, n + 1 - a), u.isComplete.call(this, i) && e === (this.isRTL ? s.getBuffer.call(this).slice().reverse().join("") : s.getBuffer.call(this).join(""));
1770
- },
1771
- format: function(e, t) {
1772
- this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache);
1773
- var i = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split("");
1774
- c.checkVal.call(this, void 0, !0, !1, i);
1775
- var a = this.isRTL ? s.getBuffer.call(this).slice().reverse().join("") : s.getBuffer.call(this).join("");
1776
- return t ? {
1777
- value: a,
1778
- metadata: this.getmetadata()
1779
- } : a;
1780
- },
1781
- setValue: function(e) {
1782
- this.el && (0, n.default)(this.el).trigger("setvalue", [ e ]);
1783
- },
1784
- analyseMask: o.analyseMask
1785
- }, y.extendDefaults = function(e) {
1786
- n.default.extend(!0, y.prototype.defaults, e);
1787
- }, y.extendDefinitions = function(e) {
1788
- n.default.extend(!0, y.prototype.definitions, e);
1789
- }, y.extendAliases = function(e) {
1790
- n.default.extend(!0, y.prototype.aliases, e);
1791
- }, y.format = function(e, t, i) {
1792
- return y(t).format(e, i);
1793
- }, y.unmask = function(e, t) {
1794
- return y(t).unmaskedvalue(e);
1795
- }, y.isValid = function(e, t) {
1796
- return y(t).isValid(e);
1797
- }, y.remove = function(e) {
1798
- "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) {
1799
- e.inputmask && e.inputmask.remove();
1800
- }));
1801
- }, y.setValue = function(e, t) {
1802
- "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) {
1803
- e.inputmask ? e.inputmask.setValue(t) : (0, n.default)(e).trigger("setvalue", [ t ]);
1804
- }));
1805
- }, y.dependencyLib = n.default, r.default.Inputmask = y;
1806
- var x = y;
1807
- t.default = x;
1808
- },
1809
- 5296: function(e, t, i) {
1810
- function a(e) {
1811
- return a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1812
- return typeof e;
1813
- } : function(e) {
1814
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1815
- }, a(e);
1816
- }
1817
- var n = h(i(9380)), r = h(i(2394)), o = h(i(8741));
1818
- function l(e, t) {
1819
- for (var i = 0; i < t.length; i++) {
1820
- var a = t[i];
1821
- a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0),
1822
- Object.defineProperty(e, a.key, a);
1823
- }
1824
- }
1825
- function s(e, t) {
1826
- if (t && ("object" === a(t) || "function" == typeof t)) return t;
1827
- if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
1828
- return function(e) {
1829
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1830
- return e;
1831
- }(e);
1832
- }
1833
- function u(e) {
1834
- var t = "function" == typeof Map ? new Map : void 0;
1835
- return u = function(e) {
1836
- if (null === e || (i = e, -1 === Function.toString.call(i).indexOf("[native code]"))) return e;
1837
- var i;
1838
- if ("function" != typeof e) throw new TypeError("Super expression must either be null or a function");
1839
- if (void 0 !== t) {
1840
- if (t.has(e)) return t.get(e);
1841
- t.set(e, a);
1842
- }
1843
- function a() {
1844
- return c(e, arguments, p(this).constructor);
1845
- }
1846
- return a.prototype = Object.create(e.prototype, {
1847
- constructor: {
1848
- value: a,
1849
- enumerable: !1,
1850
- writable: !0,
1851
- configurable: !0
1852
- }
1853
- }), d(a, e);
1854
- }, u(e);
1855
- }
1856
- function c(e, t, i) {
1857
- return c = f() ? Reflect.construct : function(e, t, i) {
1858
- var a = [ null ];
1859
- a.push.apply(a, t);
1860
- var n = new (Function.bind.apply(e, a));
1861
- return i && d(n, i.prototype), n;
1862
- }, c.apply(null, arguments);
1863
- }
1864
- function f() {
1865
- if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
1866
- if (Reflect.construct.sham) return !1;
1867
- if ("function" == typeof Proxy) return !0;
1868
- try {
1869
- return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))),
1870
- !0;
1871
- } catch (e) {
1872
- return !1;
1873
- }
1874
- }
1875
- function d(e, t) {
1876
- return d = Object.setPrototypeOf || function(e, t) {
1877
- return e.__proto__ = t, e;
1878
- }, d(e, t);
1879
- }
1880
- function p(e) {
1881
- return p = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
1882
- return e.__proto__ || Object.getPrototypeOf(e);
1883
- }, p(e);
1884
- }
1885
- function h(e) {
1886
- return e && e.__esModule ? e : {
1887
- default: e
1888
- };
1889
- }
1890
- var v = n.default.document;
1891
- if (o.default && v && v.head && v.head.attachShadow && n.default.customElements && void 0 === n.default.customElements.get("input-mask")) {
1892
- var m = function(e) {
1893
- !function(e, t) {
1894
- if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
1895
- Object.defineProperty(e, "prototype", {
1896
- value: Object.create(t && t.prototype, {
1897
- constructor: {
1898
- value: e,
1899
- writable: !0,
1900
- configurable: !0
1901
- }
1902
- }),
1903
- writable: !1
1904
- }), t && d(e, t);
1905
- }(c, e);
1906
- var t, i, a, n, o, u = (t = c, i = f(), function() {
1907
- var e, a = p(t);
1908
- if (i) {
1909
- var n = p(this).constructor;
1910
- e = Reflect.construct(a, arguments, n);
1911
- } else e = a.apply(this, arguments);
1912
- return s(this, e);
1913
- });
1914
- function c() {
1915
- var e;
1916
- !function(e, t) {
1917
- if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
1918
- }(this, c);
1919
- var t = (e = u.call(this)).getAttributeNames(), i = e.attachShadow({
1920
- mode: "closed"
1921
- }), a = v.createElement("input");
1922
- for (var n in a.type = "text", i.appendChild(a), t) Object.prototype.hasOwnProperty.call(t, n) && a.setAttribute(t[n], e.getAttribute(t[n]));
1923
- var o = new r.default;
1924
- return o.dataAttribute = "", o.mask(a), a.inputmask.shadowRoot = i, e;
1925
- }
1926
- return a = c, n && l(a.prototype, n), o && l(a, o), Object.defineProperty(a, "prototype", {
1927
- writable: !1
1928
- }), a;
1929
- }(u(HTMLElement));
1930
- n.default.customElements.define("input-mask", m);
1931
- }
1932
- },
1933
- 2391: function(e, t, i) {
1934
- Object.defineProperty(t, "__esModule", {
1935
- value: !0
1936
- }), t.analyseMask = function(e, t, i) {
1937
- var a, o, l, s, u, c, f = /(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g, d = /\[\^?]?(?:[^\\\]]+|\\[\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, p = !1, h = new n.default, v = [], m = [], g = !1;
1938
- function k(e, a, n) {
1939
- n = void 0 !== n ? n : e.matches.length;
1940
- var o = e.matches[n - 1];
1941
- if (t) 0 === a.indexOf("[") || p && /\\d|\\s|\\w/i.test(a) || "." === a ? e.matches.splice(n++, 0, {
1942
- fn: new RegExp(a, i.casing ? "i" : ""),
1943
- static: !1,
1944
- optionality: !1,
1945
- newBlockMarker: void 0 === o ? "master" : o.def !== a,
1946
- casing: null,
1947
- def: a,
1948
- placeholder: void 0,
1949
- nativeDef: a
1950
- }) : (p && (a = a[a.length - 1]), a.split("").forEach((function(t, a) {
1951
- o = e.matches[n - 1], e.matches.splice(n++, 0, {
1952
- fn: /[a-z]/i.test(i.staticDefinitionSymbol || t) ? new RegExp("[" + (i.staticDefinitionSymbol || t) + "]", i.casing ? "i" : "") : null,
1953
- static: !0,
1954
- optionality: !1,
1955
- newBlockMarker: void 0 === o ? "master" : o.def !== t && !0 !== o.static,
1956
- casing: null,
1957
- def: i.staticDefinitionSymbol || t,
1958
- placeholder: void 0 !== i.staticDefinitionSymbol ? t : void 0,
1959
- nativeDef: (p ? "'" : "") + t
1960
- });
1961
- }))), p = !1; else {
1962
- var l = i.definitions && i.definitions[a] || i.usePrototypeDefinitions && r.default.prototype.definitions[a];
1963
- l && !p ? e.matches.splice(n++, 0, {
1964
- fn: l.validator ? "string" == typeof l.validator ? new RegExp(l.validator, i.casing ? "i" : "") : new function() {
1965
- this.test = l.validator;
1966
- } : new RegExp("."),
1967
- static: l.static || !1,
1968
- optionality: l.optional || !1,
1969
- newBlockMarker: void 0 === o || l.optional ? "master" : o.def !== (l.definitionSymbol || a),
1970
- casing: l.casing,
1971
- def: l.definitionSymbol || a,
1972
- placeholder: l.placeholder,
1973
- nativeDef: a,
1974
- generated: l.generated
1975
- }) : (e.matches.splice(n++, 0, {
1976
- fn: /[a-z]/i.test(i.staticDefinitionSymbol || a) ? new RegExp("[" + (i.staticDefinitionSymbol || a) + "]", i.casing ? "i" : "") : null,
1977
- static: !0,
1978
- optionality: !1,
1979
- newBlockMarker: void 0 === o ? "master" : o.def !== a && !0 !== o.static,
1980
- casing: null,
1981
- def: i.staticDefinitionSymbol || a,
1982
- placeholder: void 0 !== i.staticDefinitionSymbol ? a : void 0,
1983
- nativeDef: (p ? "'" : "") + a
1984
- }), p = !1);
1985
- }
1986
- }
1987
- function y() {
1988
- if (v.length > 0) {
1989
- if (k(s = v[v.length - 1], o), s.isAlternator) {
1990
- u = v.pop();
1991
- for (var e = 0; e < u.matches.length; e++) u.matches[e].isGroup && (u.matches[e].isGroup = !1);
1992
- v.length > 0 ? (s = v[v.length - 1]).matches.push(u) : h.matches.push(u);
1993
- }
1994
- } else k(h, o);
1995
- }
1996
- function b(e) {
1997
- var t = new n.default(!0);
1998
- return t.openGroup = !1, t.matches = e, t;
1999
- }
2000
- function x() {
2001
- if ((l = v.pop()).openGroup = !1, void 0 !== l) if (v.length > 0) {
2002
- if ((s = v[v.length - 1]).matches.push(l), s.isAlternator) {
2003
- for (var e = (u = v.pop()).matches[0].matches ? u.matches[0].matches.length : 1, t = 0; t < u.matches.length; t++) u.matches[t].isGroup = !1,
2004
- u.matches[t].alternatorGroup = !1, null === i.keepStatic && e < (u.matches[t].matches ? u.matches[t].matches.length : 1) && (i.keepStatic = !0),
2005
- e = u.matches[t].matches ? u.matches[t].matches.length : 1;
2006
- v.length > 0 ? (s = v[v.length - 1]).matches.push(u) : h.matches.push(u);
2007
- }
2008
- } else h.matches.push(l); else y();
2009
- }
2010
- function P(e) {
2011
- var t = e.pop();
2012
- return t.isQuantifier && (t = b([ e.pop(), t ])), t;
2013
- }
2014
- t && (i.optionalmarker[0] = void 0, i.optionalmarker[1] = void 0);
2015
- for (;a = t ? d.exec(e) : f.exec(e); ) {
2016
- if (o = a[0], t) {
2017
- switch (o.charAt(0)) {
2018
- case "?":
2019
- o = "{0,1}";
2020
- break;
2021
-
2022
- case "+":
2023
- case "*":
2024
- o = "{" + o + "}";
2025
- break;
2026
-
2027
- case "|":
2028
- if (0 === v.length) {
2029
- var E = b(h.matches);
2030
- E.openGroup = !0, v.push(E), h.matches = [], g = !0;
2031
- }
2032
- }
2033
- if ("\\d" === o) o = "[0-9]";
2034
- }
2035
- if (p) y(); else switch (o.charAt(0)) {
2036
- case "$":
2037
- case "^":
2038
- t || y();
2039
- break;
2040
-
2041
- case i.escapeChar:
2042
- p = !0, t && y();
2043
- break;
2044
-
2045
- case i.optionalmarker[1]:
2046
- case i.groupmarker[1]:
2047
- x();
2048
- break;
2049
-
2050
- case i.optionalmarker[0]:
2051
- v.push(new n.default(!1, !0));
2052
- break;
2053
-
2054
- case i.groupmarker[0]:
2055
- v.push(new n.default(!0));
2056
- break;
2057
-
2058
- case i.quantifiermarker[0]:
2059
- var S = new n.default(!1, !1, !0), _ = (o = o.replace(/[{}?]/g, "")).split("|"), w = _[0].split(","), M = isNaN(w[0]) ? w[0] : parseInt(w[0]), O = 1 === w.length ? M : isNaN(w[1]) ? w[1] : parseInt(w[1]), T = isNaN(_[1]) ? _[1] : parseInt(_[1]);
2060
- "*" !== M && "+" !== M || (M = "*" === O ? 0 : 1), S.quantifier = {
2061
- min: M,
2062
- max: O,
2063
- jit: T
2064
- };
2065
- var C = v.length > 0 ? v[v.length - 1].matches : h.matches;
2066
- if ((a = C.pop()).isAlternator) {
2067
- C.push(a), C = a.matches;
2068
- var A = new n.default(!0), D = C.pop();
2069
- C.push(A), C = A.matches, a = D;
2070
- }
2071
- a.isGroup || (a = b([ a ])), C.push(a), C.push(S);
2072
- break;
2073
-
2074
- case i.alternatormarker:
2075
- if (v.length > 0) {
2076
- var j = (s = v[v.length - 1]).matches[s.matches.length - 1];
2077
- c = s.openGroup && (void 0 === j.matches || !1 === j.isGroup && !1 === j.isAlternator) ? v.pop() : P(s.matches);
2078
- } else c = P(h.matches);
2079
- if (c.isAlternator) v.push(c); else if (c.alternatorGroup ? (u = v.pop(), c.alternatorGroup = !1) : u = new n.default(!1, !1, !1, !0),
2080
- u.matches.push(c), v.push(u), c.openGroup) {
2081
- c.openGroup = !1;
2082
- var B = new n.default(!0);
2083
- B.alternatorGroup = !0, v.push(B);
2084
- }
2085
- break;
2086
-
2087
- default:
2088
- y();
2089
- }
2090
- }
2091
- g && x();
2092
- for (;v.length > 0; ) l = v.pop(), h.matches.push(l);
2093
- h.matches.length > 0 && (!function e(a) {
2094
- a && a.matches && a.matches.forEach((function(n, r) {
2095
- var o = a.matches[r + 1];
2096
- (void 0 === o || void 0 === o.matches || !1 === o.isQuantifier) && n && n.isGroup && (n.isGroup = !1,
2097
- t || (k(n, i.groupmarker[0], 0), !0 !== n.openGroup && k(n, i.groupmarker[1]))),
2098
- e(n);
2099
- }));
2100
- }(h), m.push(h));
2101
- (i.numericInput || i.isRTL) && function e(t) {
2102
- for (var a in t.matches = t.matches.reverse(), t.matches) if (Object.prototype.hasOwnProperty.call(t.matches, a)) {
2103
- var n = parseInt(a);
2104
- if (t.matches[a].isQuantifier && t.matches[n + 1] && t.matches[n + 1].isGroup) {
2105
- var r = t.matches[a];
2106
- t.matches.splice(a, 1), t.matches.splice(n + 1, 0, r);
2107
- }
2108
- void 0 !== t.matches[a].matches ? t.matches[a] = e(t.matches[a]) : t.matches[a] = ((o = t.matches[a]) === i.optionalmarker[0] ? o = i.optionalmarker[1] : o === i.optionalmarker[1] ? o = i.optionalmarker[0] : o === i.groupmarker[0] ? o = i.groupmarker[1] : o === i.groupmarker[1] && (o = i.groupmarker[0]),
2109
- o);
2110
- }
2111
- var o;
2112
- return t;
2113
- }(m[0]);
2114
- return m;
2115
- }, t.generateMaskSet = function(e, t) {
2116
- var i;
2117
- function n(e, i, n) {
2118
- var o, l, s = !1;
2119
- if (null !== e && "" !== e || ((s = null !== n.regex) ? e = (e = n.regex).replace(/^(\^)(.*)(\$)$/, "$2") : (s = !0,
2120
- e = ".*")), 1 === e.length && !1 === n.greedy && 0 !== n.repeat && (n.placeholder = ""),
2121
- n.repeat > 0 || "*" === n.repeat || "+" === n.repeat) {
2122
- var u = "*" === n.repeat ? 0 : "+" === n.repeat ? 1 : n.repeat;
2123
- e = n.groupmarker[0] + e + n.groupmarker[1] + n.quantifiermarker[0] + u + "," + n.repeat + n.quantifiermarker[1];
2124
- }
2125
- return l = s ? "regex_" + n.regex : n.numericInput ? e.split("").reverse().join("") : e,
2126
- null !== n.keepStatic && (l = "ks_" + n.keepStatic + l), void 0 === r.default.prototype.masksCache[l] || !0 === t ? (o = {
2127
- mask: e,
2128
- maskToken: r.default.prototype.analyseMask(e, s, n),
2129
- validPositions: {},
2130
- _buffer: void 0,
2131
- buffer: void 0,
2132
- tests: {},
2133
- excludes: {},
2134
- metadata: i,
2135
- maskLength: void 0,
2136
- jitOffset: {}
2137
- }, !0 !== t && (r.default.prototype.masksCache[l] = o, o = a.default.extend(!0, {}, r.default.prototype.masksCache[l]))) : o = a.default.extend(!0, {}, r.default.prototype.masksCache[l]),
2138
- o;
2139
- }
2140
- "function" == typeof e.mask && (e.mask = e.mask(e));
2141
- if (Array.isArray(e.mask)) {
2142
- if (e.mask.length > 1) {
2143
- null === e.keepStatic && (e.keepStatic = !0);
2144
- var o = e.groupmarker[0];
2145
- return (e.isRTL ? e.mask.reverse() : e.mask).forEach((function(t) {
2146
- o.length > 1 && (o += e.alternatormarker), void 0 !== t.mask && "function" != typeof t.mask ? o += t.mask : o += t;
2147
- })), n(o += e.groupmarker[1], e.mask, e);
2148
- }
2149
- e.mask = e.mask.pop();
2150
- }
2151
- i = e.mask && void 0 !== e.mask.mask && "function" != typeof e.mask.mask ? n(e.mask.mask, e.mask, e) : n(e.mask, e.mask, e);
2152
- null === e.keepStatic && (e.keepStatic = !1);
2153
- return i;
2154
- };
2155
- var a = o(i(4963)), n = o(i(9695)), r = o(i(2394));
2156
- function o(e) {
2157
- return e && e.__esModule ? e : {
2158
- default: e
2159
- };
2160
- }
2161
- },
2162
- 157: function(e, t, i) {
2163
- Object.defineProperty(t, "__esModule", {
2164
- value: !0
2165
- }), t.mask = function() {
2166
- var e = this, t = this.opts, i = this.el, a = this.dependencyLib;
2167
- l.EventRuler.off(i);
2168
- var f = function(t, i) {
2169
- "textarea" !== t.tagName.toLowerCase() && i.ignorables.push(n.default.ENTER);
2170
- var s = t.getAttribute("type"), u = "input" === t.tagName.toLowerCase() && i.supportsInputType.includes(s) || t.isContentEditable || "textarea" === t.tagName.toLowerCase();
2171
- if (!u) if ("input" === t.tagName.toLowerCase()) {
2172
- var c = document.createElement("input");
2173
- c.setAttribute("type", s), u = "text" === c.type, c = null;
2174
- } else u = "partial";
2175
- return !1 !== u ? function(t) {
2176
- var n, s;
2177
- function u() {
2178
- return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : -1 !== r.getLastValidPosition.call(e) || !0 !== i.nullable ? (this.inputmask.shadowRoot || this.ownerDocument).activeElement === this && i.clearMaskOnLostFocus ? (e.isRTL ? o.clearOptionalTail.call(e, r.getBuffer.call(e).slice()).reverse() : o.clearOptionalTail.call(e, r.getBuffer.call(e).slice())).join("") : n.call(this) : "" : n.call(this);
2179
- }
2180
- function c(e) {
2181
- s.call(this, e), this.inputmask && (0, o.applyInputValue)(this, e);
2182
- }
2183
- if (!t.inputmask.__valueGet) {
2184
- if (!0 !== i.noValuePatching) {
2185
- if (Object.getOwnPropertyDescriptor) {
2186
- var f = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t), "value") : void 0;
2187
- f && f.get && f.set ? (n = f.get, s = f.set, Object.defineProperty(t, "value", {
2188
- get: u,
2189
- set: c,
2190
- configurable: !0
2191
- })) : "input" !== t.tagName.toLowerCase() && (n = function() {
2192
- return this.textContent;
2193
- }, s = function(e) {
2194
- this.textContent = e;
2195
- }, Object.defineProperty(t, "value", {
2196
- get: u,
2197
- set: c,
2198
- configurable: !0
2199
- }));
2200
- } else document.__lookupGetter__ && t.__lookupGetter__("value") && (n = t.__lookupGetter__("value"),
2201
- s = t.__lookupSetter__("value"), t.__defineGetter__("value", u), t.__defineSetter__("value", c));
2202
- t.inputmask.__valueGet = n, t.inputmask.__valueSet = s;
2203
- }
2204
- t.inputmask._valueGet = function(t) {
2205
- return e.isRTL && !0 !== t ? n.call(this.el).split("").reverse().join("") : n.call(this.el);
2206
- }, t.inputmask._valueSet = function(t, i) {
2207
- s.call(this.el, null == t ? "" : !0 !== i && e.isRTL ? t.split("").reverse().join("") : t);
2208
- }, void 0 === n && (n = function() {
2209
- return this.value;
2210
- }, s = function(e) {
2211
- this.value = e;
2212
- }, function(t) {
2213
- if (a.valHooks && (void 0 === a.valHooks[t] || !0 !== a.valHooks[t].inputmaskpatch)) {
2214
- var n = a.valHooks[t] && a.valHooks[t].get ? a.valHooks[t].get : function(e) {
2215
- return e.value;
2216
- }, l = a.valHooks[t] && a.valHooks[t].set ? a.valHooks[t].set : function(e, t) {
2217
- return e.value = t, e;
2218
- };
2219
- a.valHooks[t] = {
2220
- get: function(t) {
2221
- if (t.inputmask) {
2222
- if (t.inputmask.opts.autoUnmask) return t.inputmask.unmaskedvalue();
2223
- var a = n(t);
2224
- return -1 !== r.getLastValidPosition.call(e, void 0, void 0, t.inputmask.maskset.validPositions) || !0 !== i.nullable ? a : "";
2225
- }
2226
- return n(t);
2227
- },
2228
- set: function(e, t) {
2229
- var i = l(e, t);
2230
- return e.inputmask && (0, o.applyInputValue)(e, t), i;
2231
- },
2232
- inputmaskpatch: !0
2233
- };
2234
- }
2235
- }(t.type), function(t) {
2236
- l.EventRuler.on(t, "mouseenter", (function() {
2237
- var t = this.inputmask._valueGet(!0);
2238
- t !== (e.isRTL ? r.getBuffer.call(e).reverse() : r.getBuffer.call(e)).join("") && (0,
2239
- o.applyInputValue)(this, t);
2240
- }));
2241
- }(t));
2242
- }
2243
- }(t) : t.inputmask = void 0, u;
2244
- }(i, t);
2245
- if (!1 !== f) {
2246
- e.originalPlaceholder = i.placeholder, e.maxLength = void 0 !== i ? i.maxLength : void 0,
2247
- -1 === e.maxLength && (e.maxLength = void 0), "inputMode" in i && null === i.getAttribute("inputmode") && (i.inputMode = t.inputmode,
2248
- i.setAttribute("inputmode", t.inputmode)), !0 === f && (t.showMaskOnFocus = t.showMaskOnFocus && -1 === [ "cc-number", "cc-exp" ].indexOf(i.autocomplete),
2249
- s.iphone && (t.insertModeVisual = !1), l.EventRuler.on(i, "submit", c.EventHandlers.submitEvent),
2250
- l.EventRuler.on(i, "reset", c.EventHandlers.resetEvent), l.EventRuler.on(i, "blur", c.EventHandlers.blurEvent),
2251
- l.EventRuler.on(i, "focus", c.EventHandlers.focusEvent), l.EventRuler.on(i, "invalid", c.EventHandlers.invalidEvent),
2252
- l.EventRuler.on(i, "click", c.EventHandlers.clickEvent), l.EventRuler.on(i, "mouseleave", c.EventHandlers.mouseleaveEvent),
2253
- l.EventRuler.on(i, "mouseenter", c.EventHandlers.mouseenterEvent), l.EventRuler.on(i, "paste", c.EventHandlers.pasteEvent),
2254
- l.EventRuler.on(i, "cut", c.EventHandlers.cutEvent), l.EventRuler.on(i, "complete", t.oncomplete),
2255
- l.EventRuler.on(i, "incomplete", t.onincomplete), l.EventRuler.on(i, "cleared", t.oncleared),
2256
- !0 !== t.inputEventOnly && (l.EventRuler.on(i, "keydown", c.EventHandlers.keydownEvent),
2257
- l.EventRuler.on(i, "keypress", c.EventHandlers.keypressEvent), l.EventRuler.on(i, "keyup", c.EventHandlers.keyupEvent)),
2258
- (s.mobile || t.inputEventOnly) && i.removeAttribute("maxLength"), l.EventRuler.on(i, "input", c.EventHandlers.inputFallBackEvent),
2259
- l.EventRuler.on(i, "compositionend", c.EventHandlers.compositionendEvent)), l.EventRuler.on(i, "setvalue", c.EventHandlers.setValueEvent),
2260
- r.getBufferTemplate.call(e).join(""), e.undoValue = e._valueGet(!0);
2261
- var d = (i.inputmask.shadowRoot || i.ownerDocument).activeElement;
2262
- if ("" !== i.inputmask._valueGet(!0) || !1 === t.clearMaskOnLostFocus || d === i) {
2263
- (0, o.applyInputValue)(i, i.inputmask._valueGet(!0), t);
2264
- var p = r.getBuffer.call(e).slice();
2265
- !1 === u.isComplete.call(e, p) && t.clearIncomplete && r.resetMaskSet.call(e), t.clearMaskOnLostFocus && d !== i && (-1 === r.getLastValidPosition.call(e) ? p = [] : o.clearOptionalTail.call(e, p)),
2266
- (!1 === t.clearMaskOnLostFocus || t.showMaskOnFocus && d === i || "" !== i.inputmask._valueGet(!0)) && (0,
2267
- o.writeBuffer)(i, p), d === i && r.caret.call(e, i, r.seekNext.call(e, r.getLastValidPosition.call(e)));
2268
- }
2269
- }
2270
- };
2271
- var a, n = (a = i(5581)) && a.__esModule ? a : {
2272
- default: a
2273
- }, r = i(8711), o = i(7760), l = i(9716), s = i(9845), u = i(7215), c = i(6030);
2274
- },
2275
- 9695: function(e, t) {
2276
- Object.defineProperty(t, "__esModule", {
2277
- value: !0
2278
- }), t.default = function(e, t, i, a) {
2279
- this.matches = [], this.openGroup = e || !1, this.alternatorGroup = !1, this.isGroup = e || !1,
2280
- this.isOptional = t || !1, this.isQuantifier = i || !1, this.isAlternator = a || !1,
2281
- this.quantifier = {
2282
- min: 1,
2283
- max: 1
2284
- };
2285
- };
2286
- },
2287
- 3194: function() {
2288
- Array.prototype.includes || Object.defineProperty(Array.prototype, "includes", {
2289
- value: function(e, t) {
2290
- if (null == this) throw new TypeError('"this" is null or not defined');
2291
- var i = Object(this), a = i.length >>> 0;
2292
- if (0 === a) return !1;
2293
- for (var n = 0 | t, r = Math.max(n >= 0 ? n : a - Math.abs(n), 0); r < a; ) {
2294
- if (i[r] === e) return !0;
2295
- r++;
2296
- }
2297
- return !1;
2298
- }
2299
- });
2300
- },
2301
- 7149: function() {
2302
- function e(t) {
2303
- return e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
2304
- return typeof e;
2305
- } : function(e) {
2306
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2307
- }, e(t);
2308
- }
2309
- "function" != typeof Object.getPrototypeOf && (Object.getPrototypeOf = "object" === e("test".__proto__) ? function(e) {
2310
- return e.__proto__;
2311
- } : function(e) {
2312
- return e.constructor.prototype;
2313
- });
2314
- },
2315
- 8711: function(e, t, i) {
2316
- Object.defineProperty(t, "__esModule", {
2317
- value: !0
2318
- }), t.caret = function(e, t, i, a, n) {
2319
- var r, o = this, l = this.opts;
2320
- if (void 0 === t) return "selectionStart" in e && "selectionEnd" in e ? (t = e.selectionStart,
2321
- i = e.selectionEnd) : window.getSelection ? (r = window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode !== e && r.commonAncestorContainer !== e || (t = r.startOffset,
2322
- i = r.endOffset) : document.selection && document.selection.createRange && (r = document.selection.createRange(),
2323
- t = 0 - r.duplicate().moveStart("character", -e.inputmask._valueGet().length), i = t + r.text.length),
2324
- {
2325
- begin: a ? t : u.call(o, t),
2326
- end: a ? i : u.call(o, i)
2327
- };
2328
- if (Array.isArray(t) && (i = o.isRTL ? t[0] : t[1], t = o.isRTL ? t[1] : t[0]),
2329
- void 0 !== t.begin && (i = o.isRTL ? t.begin : t.end, t = o.isRTL ? t.end : t.begin),
2330
- "number" == typeof t) {
2331
- t = a ? t : u.call(o, t), i = "number" == typeof (i = a ? i : u.call(o, i)) ? i : t;
2332
- var s = parseInt(((e.ownerDocument.defaultView || window).getComputedStyle ? (e.ownerDocument.defaultView || window).getComputedStyle(e, null) : e.currentStyle).fontSize) * i;
2333
- if (e.scrollLeft = s > e.scrollWidth ? s : 0, e.inputmask.caretPos = {
2334
- begin: t,
2335
- end: i
2336
- }, l.insertModeVisual && !1 === l.insertMode && t === i && (n || i++), e === (e.inputmask.shadowRoot || e.ownerDocument).activeElement) if ("setSelectionRange" in e) e.setSelectionRange(t, i); else if (window.getSelection) {
2337
- if (r = document.createRange(), void 0 === e.firstChild || null === e.firstChild) {
2338
- var c = document.createTextNode("");
2339
- e.appendChild(c);
2340
- }
2341
- r.setStart(e.firstChild, t < e.inputmask._valueGet().length ? t : e.inputmask._valueGet().length),
2342
- r.setEnd(e.firstChild, i < e.inputmask._valueGet().length ? i : e.inputmask._valueGet().length),
2343
- r.collapse(!0);
2344
- var f = window.getSelection();
2345
- f.removeAllRanges(), f.addRange(r);
2346
- } else e.createTextRange && ((r = e.createTextRange()).collapse(!0), r.moveEnd("character", i),
2347
- r.moveStart("character", t), r.select());
2348
- }
2349
- }, t.determineLastRequiredPosition = function(e) {
2350
- var t, i, r = this, l = this.maskset, s = this.dependencyLib, u = a.getMaskTemplate.call(r, !0, o.call(r), !0, !0), c = u.length, f = o.call(r), d = {}, p = l.validPositions[f], h = void 0 !== p ? p.locator.slice() : void 0;
2351
- for (t = f + 1; t < u.length; t++) i = a.getTestTemplate.call(r, t, h, t - 1), h = i.locator.slice(),
2352
- d[t] = s.extend(!0, {}, i);
2353
- var v = p && void 0 !== p.alternation ? p.locator[p.alternation] : void 0;
2354
- for (t = c - 1; t > f && (((i = d[t]).match.optionality || i.match.optionalQuantifier && i.match.newBlockMarker || v && (v !== d[t].locator[p.alternation] && 1 != i.match.static || !0 === i.match.static && i.locator[p.alternation] && n.checkAlternationMatch.call(r, i.locator[p.alternation].toString().split(","), v.toString().split(",")) && "" !== a.getTests.call(r, t)[0].def)) && u[t] === a.getPlaceholder.call(r, t, i.match)); t--) c--;
2355
- return e ? {
2356
- l: c,
2357
- def: d[c] ? d[c].match : void 0
2358
- } : c;
2359
- }, t.determineNewCaretPosition = function(e, t, i) {
2360
- var n = this, u = this.maskset, c = this.opts;
2361
- t && (n.isRTL ? e.end = e.begin : e.begin = e.end);
2362
- if (e.begin === e.end) {
2363
- switch (i = i || c.positionCaretOnClick) {
2364
- case "none":
2365
- break;
2366
-
2367
- case "select":
2368
- e = {
2369
- begin: 0,
2370
- end: r.call(n).length
2371
- };
2372
- break;
2373
-
2374
- case "ignore":
2375
- e.end = e.begin = s.call(n, o.call(n));
2376
- break;
2377
-
2378
- case "radixFocus":
2379
- if (function(e) {
2380
- if ("" !== c.radixPoint && 0 !== c.digits) {
2381
- var t = u.validPositions;
2382
- if (void 0 === t[e] || t[e].input === a.getPlaceholder.call(n, e)) {
2383
- if (e < s.call(n, -1)) return !0;
2384
- var i = r.call(n).indexOf(c.radixPoint);
2385
- if (-1 !== i) {
2386
- for (var o in t) if (t[o] && i < o && t[o].input !== a.getPlaceholder.call(n, o)) return !1;
2387
- return !0;
2388
- }
2389
- }
2390
- }
2391
- return !1;
2392
- }(e.begin)) {
2393
- var f = r.call(n).join("").indexOf(c.radixPoint);
2394
- e.end = e.begin = c.numericInput ? s.call(n, f) : f;
2395
- break;
2396
- }
2397
-
2398
- default:
2399
- var d = e.begin, p = o.call(n, d, !0), h = s.call(n, -1 !== p || l.call(n, 0) ? p : -1);
2400
- if (d <= h) e.end = e.begin = l.call(n, d, !1, !0) ? d : s.call(n, d); else {
2401
- var v = u.validPositions[p], m = a.getTestTemplate.call(n, h, v ? v.match.locator : void 0, v), g = a.getPlaceholder.call(n, h, m.match);
2402
- if ("" !== g && r.call(n)[h] !== g && !0 !== m.match.optionalQuantifier && !0 !== m.match.newBlockMarker || !l.call(n, h, c.keepStatic, !0) && m.match.def === g) {
2403
- var k = s.call(n, h);
2404
- (d >= k || d === h) && (h = k);
2405
- }
2406
- e.end = e.begin = h;
2407
- }
2408
- }
2409
- return e;
2410
- }
2411
- }, t.getBuffer = r, t.getBufferTemplate = function() {
2412
- var e = this.maskset;
2413
- void 0 === e._buffer && (e._buffer = a.getMaskTemplate.call(this, !1, 1), void 0 === e.buffer && (e.buffer = e._buffer.slice()));
2414
- return e._buffer;
2415
- }, t.getLastValidPosition = o, t.isMask = l, t.resetMaskSet = function(e) {
2416
- var t = this.maskset;
2417
- t.buffer = void 0, !0 !== e && (t.validPositions = {}, t.p = 0);
2418
- }, t.seekNext = s, t.seekPrevious = function(e, t) {
2419
- var i = this, n = e - 1;
2420
- if (e <= 0) return 0;
2421
- for (;n > 0 && (!0 === t && (!0 !== a.getTest.call(i, n).match.newBlockMarker || !l.call(i, n, void 0, !0)) || !0 !== t && !l.call(i, n, void 0, !0)); ) n--;
2422
- return n;
2423
- }, t.translatePosition = u;
2424
- var a = i(4713), n = i(7215);
2425
- function r(e) {
2426
- var t = this.maskset;
2427
- return void 0 !== t.buffer && !0 !== e || (t.buffer = a.getMaskTemplate.call(this, !0, o.call(this), !0),
2428
- void 0 === t._buffer && (t._buffer = t.buffer.slice())), t.buffer;
2429
- }
2430
- function o(e, t, i) {
2431
- var a = this.maskset, n = -1, r = -1, o = i || a.validPositions;
2432
- for (var l in void 0 === e && (e = -1), o) {
2433
- var s = parseInt(l);
2434
- o[s] && (t || !0 !== o[s].generatedInput) && (s <= e && (n = s), s >= e && (r = s));
2435
- }
2436
- return -1 === n || n == e ? r : -1 == r || e - n < r - e ? n : r;
2437
- }
2438
- function l(e, t, i) {
2439
- var n = this, r = this.maskset, o = a.getTestTemplate.call(n, e).match;
2440
- if ("" === o.def && (o = a.getTest.call(n, e).match), !0 !== o.static) return o.fn;
2441
- if (!0 === i && void 0 !== r.validPositions[e] && !0 !== r.validPositions[e].generatedInput) return !0;
2442
- if (!0 !== t && e > -1) {
2443
- if (i) {
2444
- var l = a.getTests.call(n, e);
2445
- return l.length > 1 + ("" === l[l.length - 1].match.def ? 1 : 0);
2446
- }
2447
- var s = a.determineTestTemplate.call(n, e, a.getTests.call(n, e)), u = a.getPlaceholder.call(n, e, s.match);
2448
- return s.match.def !== u;
2449
- }
2450
- return !1;
2451
- }
2452
- function s(e, t, i) {
2453
- var n = this;
2454
- void 0 === i && (i = !0);
2455
- for (var r = e + 1; "" !== a.getTest.call(n, r).match.def && (!0 === t && (!0 !== a.getTest.call(n, r).match.newBlockMarker || !l.call(n, r, void 0, !0)) || !0 !== t && !l.call(n, r, void 0, i)); ) r++;
2456
- return r;
2457
- }
2458
- function u(e) {
2459
- var t = this.opts, i = this.el;
2460
- return !this.isRTL || "number" != typeof e || t.greedy && "" === t.placeholder || !i || (e = Math.abs(this._valueGet().length - e)),
2461
- e;
2462
- }
2463
- },
2464
- 4713: function(e, t, i) {
2465
- Object.defineProperty(t, "__esModule", {
2466
- value: !0
2467
- }), t.determineTestTemplate = u, t.getDecisionTaker = o, t.getMaskTemplate = function(e, t, i, a, n) {
2468
- var r = this, o = this.opts, c = this.maskset, f = o.greedy;
2469
- n && o.greedy && (o.greedy = !1, r.maskset.tests = {});
2470
- t = t || 0;
2471
- var p, h, v, m, g = [], k = 0;
2472
- do {
2473
- if (!0 === e && c.validPositions[k]) v = n && c.validPositions[k].match.optionality && void 0 === c.validPositions[k + 1] && (!0 === c.validPositions[k].generatedInput || c.validPositions[k].input == o.skipOptionalPartCharacter && k > 0) ? u.call(r, k, d.call(r, k, p, k - 1)) : c.validPositions[k],
2474
- h = v.match, p = v.locator.slice(), g.push(!0 === i ? v.input : !1 === i ? h.nativeDef : l.call(r, k, h)); else {
2475
- v = s.call(r, k, p, k - 1), h = v.match, p = v.locator.slice();
2476
- var y = !0 !== a && (!1 !== o.jitMasking ? o.jitMasking : h.jit);
2477
- (m = (m && h.static && h.def !== o.groupSeparator && null === h.fn || c.validPositions[k - 1] && h.static && h.def !== o.groupSeparator && null === h.fn) && c.tests[k] && 1 === c.tests[k].length) || !1 === y || void 0 === y || "number" == typeof y && isFinite(y) && y > k ? g.push(!1 === i ? h.nativeDef : l.call(r, k, h)) : m = !1;
2478
- }
2479
- k++;
2480
- } while (!0 !== h.static || "" !== h.def || t > k);
2481
- "" === g[g.length - 1] && g.pop();
2482
- !1 === i && void 0 !== c.maskLength || (c.maskLength = k - 1);
2483
- return o.greedy = f, g;
2484
- }, t.getPlaceholder = l, t.getTest = c, t.getTestTemplate = s, t.getTests = d, t.isSubsetOf = f;
2485
- var a, n = (a = i(2394)) && a.__esModule ? a : {
2486
- default: a
2487
- };
2488
- function r(e, t) {
2489
- var i = (null != e.alternation ? e.mloc[o(e)] : e.locator).join("");
2490
- if ("" !== i) for (;i.length < t; ) i += "0";
2491
- return i;
2492
- }
2493
- function o(e) {
2494
- var t = e.locator[e.alternation];
2495
- return "string" == typeof t && t.length > 0 && (t = t.split(",")[0]), void 0 !== t ? t.toString() : "";
2496
- }
2497
- function l(e, t, i) {
2498
- var a = this.opts, n = this.maskset;
2499
- if (void 0 !== (t = t || c.call(this, e).match).placeholder || !0 === i) return "function" == typeof t.placeholder ? t.placeholder(a) : t.placeholder;
2500
- if (!0 === t.static) {
2501
- if (e > -1 && void 0 === n.validPositions[e]) {
2502
- var r, o = d.call(this, e), l = [];
2503
- if (o.length > 1 + ("" === o[o.length - 1].match.def ? 1 : 0)) for (var s = 0; s < o.length; s++) if ("" !== o[s].match.def && !0 !== o[s].match.optionality && !0 !== o[s].match.optionalQuantifier && (!0 === o[s].match.static || void 0 === r || !1 !== o[s].match.fn.test(r.match.def, n, e, !0, a)) && (l.push(o[s]),
2504
- !0 === o[s].match.static && (r = o[s]), l.length > 1 && /[0-9a-bA-Z]/.test(l[0].match.def))) return a.placeholder.charAt(e % a.placeholder.length);
2505
- }
2506
- return t.def;
2507
- }
2508
- return a.placeholder.charAt(e % a.placeholder.length);
2509
- }
2510
- function s(e, t, i) {
2511
- return this.maskset.validPositions[e] || u.call(this, e, d.call(this, e, t ? t.slice() : t, i));
2512
- }
2513
- function u(e, t) {
2514
- var i = this.opts, a = function(e, t) {
2515
- var i = 0, a = !1;
2516
- t.forEach((function(e) {
2517
- e.match.optionality && (0 !== i && i !== e.match.optionality && (a = !0), (0 === i || i > e.match.optionality) && (i = e.match.optionality));
2518
- })), i && (0 == e || 1 == t.length ? i = 0 : a || (i = 0));
2519
- return i;
2520
- }(e, t);
2521
- e = e > 0 ? e - 1 : 0;
2522
- var n, o, l, s = r(c.call(this, e));
2523
- i.greedy && t.length > 1 && "" === t[t.length - 1].match.def && t.pop();
2524
- for (var u = 0; u < t.length; u++) {
2525
- var f = t[u];
2526
- n = r(f, s.length);
2527
- var d = Math.abs(n - s);
2528
- (void 0 === o || "" !== n && d < o || l && !i.greedy && l.match.optionality && l.match.optionality - a > 0 && "master" === l.match.newBlockMarker && (!f.match.optionality || f.match.optionality - a < 1 || !f.match.newBlockMarker) || l && !i.greedy && l.match.optionalQuantifier && !f.match.optionalQuantifier) && (o = d,
2529
- l = f);
2530
- }
2531
- return l;
2532
- }
2533
- function c(e, t) {
2534
- var i = this.maskset;
2535
- return i.validPositions[e] ? i.validPositions[e] : (t || d.call(this, e))[0];
2536
- }
2537
- function f(e, t, i) {
2538
- function a(e) {
2539
- for (var t, i = [], a = -1, n = 0, r = e.length; n < r; n++) if ("-" === e.charAt(n)) for (t = e.charCodeAt(n + 1); ++a < t; ) i.push(String.fromCharCode(a)); else a = e.charCodeAt(n),
2540
- i.push(e.charAt(n));
2541
- return i.join("");
2542
- }
2543
- return e.match.def === t.match.nativeDef || !(!(i.regex || e.match.fn instanceof RegExp && t.match.fn instanceof RegExp) || !0 === e.match.static || !0 === t.match.static) && -1 !== a(t.match.fn.toString().replace(/[[\]/]/g, "")).indexOf(a(e.match.fn.toString().replace(/[[\]/]/g, "")));
2544
- }
2545
- function d(e, t, i) {
2546
- var a, r, o = this, l = this.dependencyLib, s = this.maskset, c = this.opts, d = this.el, p = s.maskToken, h = t ? i : 0, v = t ? t.slice() : [ 0 ], m = [], g = !1, k = t ? t.join("") : "";
2547
- function y(t, i, r, o) {
2548
- function l(r, o, u) {
2549
- function p(e, t) {
2550
- var i = 0 === t.matches.indexOf(e);
2551
- return i || t.matches.every((function(a, n) {
2552
- return !0 === a.isQuantifier ? i = p(e, t.matches[n - 1]) : Object.prototype.hasOwnProperty.call(a, "matches") && (i = p(e, a)),
2553
- !i;
2554
- })), i;
2555
- }
2556
- function v(e, t, i) {
2557
- var a, n;
2558
- if ((s.tests[e] || s.validPositions[e]) && (s.tests[e] || [ s.validPositions[e] ]).every((function(e, r) {
2559
- if (e.mloc[t]) return a = e, !1;
2560
- var o = void 0 !== i ? i : e.alternation, l = void 0 !== e.locator[o] ? e.locator[o].toString().indexOf(t) : -1;
2561
- return (void 0 === n || l < n) && -1 !== l && (a = e, n = l), !0;
2562
- })), a) {
2563
- var r = a.locator[a.alternation];
2564
- return (a.mloc[t] || a.mloc[r] || a.locator).slice((void 0 !== i ? i : a.alternation) + 1);
2565
- }
2566
- return void 0 !== i ? v(e, t) : void 0;
2567
- }
2568
- function b(e, t) {
2569
- var i = e.alternation, a = void 0 === t || i === t.alternation && -1 === e.locator[i].toString().indexOf(t.locator[i]);
2570
- if (!a && i > t.alternation) for (var n = t.alternation; n < i; n++) if (e.locator[n] !== t.locator[n]) {
2571
- i = n, a = !0;
2572
- break;
2573
- }
2574
- if (a) {
2575
- e.mloc = e.mloc || {};
2576
- var r = e.locator[i];
2577
- if (void 0 !== r) {
2578
- if ("string" == typeof r && (r = r.split(",")[0]), void 0 === e.mloc[r] && (e.mloc[r] = e.locator.slice()),
2579
- void 0 !== t) {
2580
- for (var o in t.mloc) "string" == typeof o && (o = o.split(",")[0]), void 0 === e.mloc[o] && (e.mloc[o] = t.mloc[o]);
2581
- e.locator[i] = Object.keys(e.mloc).join(",");
2582
- }
2583
- return !0;
2584
- }
2585
- e.alternation = void 0;
2586
- }
2587
- return !1;
2588
- }
2589
- function x(e, t) {
2590
- if (e.locator.length !== t.locator.length) return !1;
2591
- for (var i = e.alternation + 1; i < e.locator.length; i++) if (e.locator[i] !== t.locator[i]) return !1;
2592
- return !0;
2593
- }
2594
- if (h > e + c._maxTestPos) 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. " + s.mask;
2595
- if (h === e && void 0 === r.matches) {
2596
- if (m.push({
2597
- match: r,
2598
- locator: o.reverse(),
2599
- cd: k,
2600
- mloc: {}
2601
- }), !r.optionality || void 0 !== u || !(c.definitions && c.definitions[r.nativeDef] && c.definitions[r.nativeDef].optional || n.default.prototype.definitions[r.nativeDef] && n.default.prototype.definitions[r.nativeDef].optional)) return !0;
2602
- g = !0, h = e;
2603
- } else if (void 0 !== r.matches) {
2604
- if (r.isGroup && u !== r) {
2605
- if (r = l(t.matches[t.matches.indexOf(r) + 1], o, u)) return !0;
2606
- } else if (r.isOptional) {
2607
- var P = r, E = m.length;
2608
- if (r = y(r, i, o, u)) {
2609
- if (m.forEach((function(e, t) {
2610
- t >= E && (e.match.optionality = e.match.optionality ? e.match.optionality + 1 : 1);
2611
- })), a = m[m.length - 1].match, void 0 !== u || !p(a, P)) return !0;
2612
- g = !0, h = e;
2613
- }
2614
- } else if (r.isAlternator) {
2615
- var S, _ = r, w = [], M = m.slice(), O = o.length, T = !1, C = i.length > 0 ? i.shift() : -1;
2616
- if (-1 === C || "string" == typeof C) {
2617
- var A, D = h, j = i.slice(), B = [];
2618
- if ("string" == typeof C) B = C.split(","); else for (A = 0; A < _.matches.length; A++) B.push(A.toString());
2619
- if (void 0 !== s.excludes[e]) {
2620
- for (var R = B.slice(), L = 0, I = s.excludes[e].length; L < I; L++) {
2621
- var F = s.excludes[e][L].toString().split(":");
2622
- o.length == F[1] && B.splice(B.indexOf(F[0]), 1);
2623
- }
2624
- 0 === B.length && (delete s.excludes[e], B = R);
2625
- }
2626
- (!0 === c.keepStatic || isFinite(parseInt(c.keepStatic)) && D >= c.keepStatic) && (B = B.slice(0, 1));
2627
- for (var N = 0; N < B.length; N++) {
2628
- A = parseInt(B[N]), m = [], i = "string" == typeof C && v(h, A, O) || j.slice();
2629
- var V = _.matches[A];
2630
- if (V && l(V, [ A ].concat(o), u)) r = !0; else if (0 === N && (T = !0), V && V.matches && V.matches.length > _.matches[0].matches.length) break;
2631
- S = m.slice(), h = D, m = [];
2632
- for (var G = 0; G < S.length; G++) {
2633
- var H = S[G], K = !1;
2634
- H.match.jit = H.match.jit || T, H.alternation = H.alternation || O, b(H);
2635
- for (var U = 0; U < w.length; U++) {
2636
- var $ = w[U];
2637
- if ("string" != typeof C || void 0 !== H.alternation && B.includes(H.locator[H.alternation].toString())) {
2638
- if (H.match.nativeDef === $.match.nativeDef) {
2639
- K = !0, b($, H);
2640
- break;
2641
- }
2642
- if (f(H, $, c)) {
2643
- b(H, $) && (K = !0, w.splice(w.indexOf($), 0, H));
2644
- break;
2645
- }
2646
- if (f($, H, c)) {
2647
- b($, H);
2648
- break;
2649
- }
2650
- if (Z = $, !0 === (Q = H).match.static && !0 !== Z.match.static && Z.match.fn.test(Q.match.def, s, e, !1, c, !1)) {
2651
- x(H, $) || void 0 !== d.inputmask.userOptions.keepStatic ? b(H, $) && (K = !0, w.splice(w.indexOf($), 0, H)) : c.keepStatic = !0;
2652
- break;
2653
- }
2654
- }
2655
- }
2656
- K || w.push(H);
2657
- }
2658
- }
2659
- m = M.concat(w), h = e, g = m.length > 0, r = w.length > 0, i = j.slice();
2660
- } else r = l(_.matches[C] || t.matches[C], [ C ].concat(o), u);
2661
- if (r) return !0;
2662
- } else if (r.isQuantifier && u !== t.matches[t.matches.indexOf(r) - 1]) for (var q = r, z = i.length > 0 ? i.shift() : 0; z < (isNaN(q.quantifier.max) ? z + 1 : q.quantifier.max) && h <= e; z++) {
2663
- var W = t.matches[t.matches.indexOf(q) - 1];
2664
- if (r = l(W, [ z ].concat(o), W)) {
2665
- if ((a = m[m.length - 1].match).optionalQuantifier = z >= q.quantifier.min, a.jit = (z + 1) * (W.matches.indexOf(a) + 1) > q.quantifier.jit,
2666
- a.optionalQuantifier && p(a, W)) {
2667
- g = !0, h = e;
2668
- break;
2669
- }
2670
- return a.jit && (s.jitOffset[e] = W.matches.length - W.matches.indexOf(a)), !0;
2671
- }
2672
- } else if (r = y(r, i, o, u)) return !0;
2673
- } else h++;
2674
- var Q, Z;
2675
- }
2676
- for (var u = i.length > 0 ? i.shift() : 0; u < t.matches.length; u++) if (!0 !== t.matches[u].isQuantifier) {
2677
- var p = l(t.matches[u], [ u ].concat(r), o);
2678
- if (p && h === e) return p;
2679
- if (h > e) break;
2680
- }
2681
- }
2682
- if (e > -1) {
2683
- if (void 0 === t) {
2684
- for (var b, x = e - 1; void 0 === (b = s.validPositions[x] || s.tests[x]) && x > -1; ) x--;
2685
- void 0 !== b && x > -1 && (v = function(e, t) {
2686
- var i, a = [];
2687
- return Array.isArray(t) || (t = [ t ]), t.length > 0 && (void 0 === t[0].alternation || !0 === c.keepStatic ? 0 === (a = u.call(o, e, t.slice()).locator.slice()).length && (a = t[0].locator.slice()) : t.forEach((function(e) {
2688
- "" !== e.def && (0 === a.length ? (i = e.alternation, a = e.locator.slice()) : e.locator[i] && -1 === a[i].toString().indexOf(e.locator[i]) && (a[i] += "," + e.locator[i]));
2689
- }))), a;
2690
- }(x, b), k = v.join(""), h = x);
2691
- }
2692
- if (s.tests[e] && s.tests[e][0].cd === k) return s.tests[e];
2693
- for (var P = v.shift(); P < p.length; P++) {
2694
- if (y(p[P], v, [ P ]) && h === e || h > e) break;
2695
- }
2696
- }
2697
- return (0 === m.length || g) && m.push({
2698
- match: {
2699
- fn: null,
2700
- static: !0,
2701
- optionality: !1,
2702
- casing: null,
2703
- def: "",
2704
- placeholder: ""
2705
- },
2706
- locator: [],
2707
- mloc: {},
2708
- cd: k
2709
- }), void 0 !== t && s.tests[e] ? r = l.extend(!0, [], m) : (s.tests[e] = l.extend(!0, [], m),
2710
- r = s.tests[e]), m.forEach((function(e) {
2711
- e.match.optionality = !1;
2712
- })), r;
2713
- }
2714
- },
2715
- 7215: function(e, t, i) {
2716
- Object.defineProperty(t, "__esModule", {
2717
- value: !0
2718
- }), t.alternate = s, t.checkAlternationMatch = function(e, t, i) {
2719
- for (var a, n = this.opts.greedy ? t : t.slice(0, 1), r = !1, o = void 0 !== i ? i.split(",") : [], l = 0; l < o.length; l++) -1 !== (a = e.indexOf(o[l])) && e.splice(a, 1);
2720
- for (var s = 0; s < e.length; s++) if (n.includes(e[s])) {
2721
- r = !0;
2722
- break;
2723
- }
2724
- return r;
2725
- }, t.handleRemove = function(e, t, i, a, l) {
2726
- var u = this, c = this.maskset, f = this.opts;
2727
- if ((f.numericInput || u.isRTL) && (t === r.default.BACKSPACE ? t = r.default.DELETE : t === r.default.DELETE && (t = r.default.BACKSPACE),
2728
- u.isRTL)) {
2729
- var d = i.end;
2730
- i.end = i.begin, i.begin = d;
2731
- }
2732
- var p, h = o.getLastValidPosition.call(u, void 0, !0);
2733
- i.end >= o.getBuffer.call(u).length && h >= i.end && (i.end = h + 1);
2734
- t === r.default.BACKSPACE ? i.end - i.begin < 1 && (i.begin = o.seekPrevious.call(u, i.begin)) : t === r.default.DELETE && i.begin === i.end && (i.end = o.isMask.call(u, i.end, !0, !0) ? i.end + 1 : o.seekNext.call(u, i.end) + 1);
2735
- if (!1 !== (p = m.call(u, i))) {
2736
- if (!0 !== a && !1 !== f.keepStatic || null !== f.regex && -1 !== n.getTest.call(u, i.begin).match.def.indexOf("|")) {
2737
- var v = s.call(u, !0);
2738
- if (v) {
2739
- var g = void 0 !== v.caret ? v.caret : v.pos ? o.seekNext.call(u, v.pos.begin ? v.pos.begin : v.pos) : o.getLastValidPosition.call(u, -1, !0);
2740
- (t !== r.default.DELETE || i.begin > g) && i.begin;
2741
- }
2742
- }
2743
- !0 !== a && (c.p = t === r.default.DELETE ? i.begin + p : i.begin, c.p = o.determineNewCaretPosition.call(u, {
2744
- begin: c.p,
2745
- end: c.p
2746
- }, !1, !1 === f.insertMode && t === r.default.BACKSPACE ? "none" : void 0).begin);
2747
- }
2748
- }, t.isComplete = c, t.isSelection = f, t.isValid = d, t.refreshFromBuffer = h,
2749
- t.revalidateMask = m;
2750
- var a, n = i(4713), r = (a = i(5581)) && a.__esModule ? a : {
2751
- default: a
2752
- }, o = i(8711), l = i(6030);
2753
- function s(e, t, i, a, r, l) {
2754
- var u, c, f, p, h, v, m, g, k, y, b, x = this, P = this.dependencyLib, E = this.opts, S = x.maskset, _ = P.extend(!0, {}, S.validPositions), w = P.extend(!0, {}, S.tests), M = !1, O = !1, T = void 0 !== r ? r : o.getLastValidPosition.call(x);
2755
- if (l && (y = l.begin, b = l.end, l.begin > l.end && (y = l.end, b = l.begin)),
2756
- -1 === T && void 0 === r) u = 0, c = (p = n.getTest.call(x, u)).alternation; else for (;T >= 0; T--) if ((f = S.validPositions[T]) && void 0 !== f.alternation) {
2757
- if (p && p.locator[f.alternation] !== f.locator[f.alternation]) break;
2758
- u = T, c = S.validPositions[u].alternation, p = f;
2759
- }
2760
- if (void 0 !== c) {
2761
- m = parseInt(u), S.excludes[m] = S.excludes[m] || [], !0 !== e && S.excludes[m].push((0,
2762
- n.getDecisionTaker)(p) + ":" + p.alternation);
2763
- var C = [], A = -1;
2764
- for (h = m; h < o.getLastValidPosition.call(x, void 0, !0) + 1; h++) -1 === A && e <= h && void 0 !== t && (C.push(t),
2765
- A = C.length - 1), (v = S.validPositions[h]) && !0 !== v.generatedInput && (void 0 === l || h < y || h >= b) && C.push(v.input),
2766
- delete S.validPositions[h];
2767
- for (-1 === A && void 0 !== t && (C.push(t), A = C.length - 1); void 0 !== S.excludes[m] && S.excludes[m].length < 10; ) {
2768
- for (S.tests = {}, o.resetMaskSet.call(x, !0), M = !0, h = 0; h < C.length && (g = M.caret || o.getLastValidPosition.call(x, void 0, !0) + 1,
2769
- k = C[h], M = d.call(x, g, k, !1, a, !0)); h++) h === A && (O = M), 1 == e && M && (O = {
2770
- caretPos: h
2771
- });
2772
- if (M) break;
2773
- if (o.resetMaskSet.call(x), p = n.getTest.call(x, m), S.validPositions = P.extend(!0, {}, _),
2774
- S.tests = P.extend(!0, {}, w), !S.excludes[m]) {
2775
- O = s.call(x, e, t, i, a, m - 1, l);
2776
- break;
2777
- }
2778
- var D = (0, n.getDecisionTaker)(p);
2779
- if (-1 !== S.excludes[m].indexOf(D + ":" + p.alternation)) {
2780
- O = s.call(x, e, t, i, a, m - 1, l);
2781
- break;
2782
- }
2783
- for (S.excludes[m].push(D + ":" + p.alternation), h = m; h < o.getLastValidPosition.call(x, void 0, !0) + 1; h++) delete S.validPositions[h];
2784
- }
2785
- }
2786
- return O && !1 === E.keepStatic || delete S.excludes[m], O;
2787
- }
2788
- function u(e, t, i) {
2789
- var a = this.opts, n = this.maskset;
2790
- switch (a.casing || t.casing) {
2791
- case "upper":
2792
- e = e.toUpperCase();
2793
- break;
2794
-
2795
- case "lower":
2796
- e = e.toLowerCase();
2797
- break;
2798
-
2799
- case "title":
2800
- var o = n.validPositions[i - 1];
2801
- e = 0 === i || o && o.input === String.fromCharCode(r.default.SPACE) ? e.toUpperCase() : e.toLowerCase();
2802
- break;
2803
-
2804
- default:
2805
- if ("function" == typeof a.casing) {
2806
- var l = Array.prototype.slice.call(arguments);
2807
- l.push(n.validPositions), e = a.casing.apply(this, l);
2808
- }
2809
- }
2810
- return e;
2811
- }
2812
- function c(e) {
2813
- var t = this, i = this.opts, a = this.maskset;
2814
- if ("function" == typeof i.isComplete) return i.isComplete(e, i);
2815
- if ("*" !== i.repeat) {
2816
- var r = !1, l = o.determineLastRequiredPosition.call(t, !0), s = o.seekPrevious.call(t, l.l);
2817
- if (void 0 === l.def || l.def.newBlockMarker || l.def.optionality || l.def.optionalQuantifier) {
2818
- r = !0;
2819
- for (var u = 0; u <= s; u++) {
2820
- var c = n.getTestTemplate.call(t, u).match;
2821
- if (!0 !== c.static && void 0 === a.validPositions[u] && !0 !== c.optionality && !0 !== c.optionalQuantifier || !0 === c.static && e[u] !== n.getPlaceholder.call(t, u, c)) {
2822
- r = !1;
2823
- break;
2824
- }
2825
- }
2826
- }
2827
- return r;
2828
- }
2829
- }
2830
- function f(e) {
2831
- var t = this.opts.insertMode ? 0 : 1;
2832
- return this.isRTL ? e.begin - e.end > t : e.end - e.begin > t;
2833
- }
2834
- function d(e, t, i, a, r, l, p) {
2835
- var g = this, k = this.dependencyLib, y = this.opts, b = g.maskset;
2836
- i = !0 === i;
2837
- var x = e;
2838
- function P(e) {
2839
- if (void 0 !== e) {
2840
- if (void 0 !== e.remove && (Array.isArray(e.remove) || (e.remove = [ e.remove ]),
2841
- e.remove.sort((function(e, t) {
2842
- return t.pos - e.pos;
2843
- })).forEach((function(e) {
2844
- m.call(g, {
2845
- begin: e,
2846
- end: e + 1
2847
- });
2848
- })), e.remove = void 0), void 0 !== e.insert && (Array.isArray(e.insert) || (e.insert = [ e.insert ]),
2849
- e.insert.sort((function(e, t) {
2850
- return e.pos - t.pos;
2851
- })).forEach((function(e) {
2852
- "" !== e.c && d.call(g, e.pos, e.c, void 0 === e.strict || e.strict, void 0 !== e.fromIsValid ? e.fromIsValid : a);
2853
- })), e.insert = void 0), e.refreshFromBuffer && e.buffer) {
2854
- var t = e.refreshFromBuffer;
2855
- h.call(g, !0 === t ? t : t.start, t.end, e.buffer), e.refreshFromBuffer = void 0;
2856
- }
2857
- void 0 !== e.rewritePosition && (x = e.rewritePosition, e = !0);
2858
- }
2859
- return e;
2860
- }
2861
- function E(t, i, r) {
2862
- var l = !1;
2863
- return n.getTests.call(g, t).every((function(s, c) {
2864
- var d = s.match;
2865
- if (o.getBuffer.call(g, !0), !1 !== (l = (!d.jit || void 0 !== b.validPositions[o.seekPrevious.call(g, t)]) && (null != d.fn ? d.fn.test(i, b, t, r, y, f.call(g, e)) : (i === d.def || i === y.skipOptionalPartCharacter) && "" !== d.def && {
2866
- c: n.getPlaceholder.call(g, t, d, !0) || d.def,
2867
- pos: t
2868
- }))) {
2869
- var p = void 0 !== l.c ? l.c : i, h = t;
2870
- return p = p === y.skipOptionalPartCharacter && !0 === d.static ? n.getPlaceholder.call(g, t, d, !0) || d.def : p,
2871
- !0 !== (l = P(l)) && void 0 !== l.pos && l.pos !== t && (h = l.pos), !0 !== l && void 0 === l.pos && void 0 === l.c ? !1 : (!1 === m.call(g, e, k.extend({}, s, {
2872
- input: u.call(g, p, d, h)
2873
- }), a, h) && (l = !1), !1);
2874
- }
2875
- return !0;
2876
- })), l;
2877
- }
2878
- void 0 !== e.begin && (x = g.isRTL ? e.end : e.begin);
2879
- var S = !0, _ = k.extend(!0, {}, b.validPositions);
2880
- if (!1 === y.keepStatic && void 0 !== b.excludes[x] && !0 !== r && !0 !== a) for (var w = x; w < (g.isRTL ? e.begin : e.end); w++) void 0 !== b.excludes[w] && (b.excludes[w] = void 0,
2881
- delete b.tests[w]);
2882
- if ("function" == typeof y.preValidation && !0 !== a && !0 !== l && (S = P(S = y.preValidation.call(g, o.getBuffer.call(g), x, t, f.call(g, e), y, b, e, i || r))),
2883
- !0 === S) {
2884
- if (S = E(x, t, i), (!i || !0 === a) && !1 === S && !0 !== l) {
2885
- var M = b.validPositions[x];
2886
- if (!M || !0 !== M.match.static || M.match.def !== t && t !== y.skipOptionalPartCharacter) {
2887
- if (y.insertMode || void 0 === b.validPositions[o.seekNext.call(g, x)] || e.end > x) {
2888
- var O = !1;
2889
- if (b.jitOffset[x] && void 0 === b.validPositions[o.seekNext.call(g, x)] && !1 !== (S = d.call(g, x + b.jitOffset[x], t, !0, !0)) && (!0 !== r && (S.caret = x),
2890
- O = !0), e.end > x && (b.validPositions[x] = void 0), !O && !o.isMask.call(g, x, y.keepStatic && 0 === x)) for (var T = x + 1, C = o.seekNext.call(g, x, !1, 0 !== x); T <= C; T++) if (!1 !== (S = E(T, t, i))) {
2891
- S = v.call(g, x, void 0 !== S.pos ? S.pos : T) || S, x = T;
2892
- break;
2893
- }
2894
- }
2895
- } else S = {
2896
- caret: o.seekNext.call(g, x)
2897
- };
2898
- }
2899
- !1 !== S || !y.keepStatic || !c.call(g, o.getBuffer.call(g)) && 0 !== x || i || !0 === r ? f.call(g, e) && b.tests[x] && b.tests[x].length > 1 && y.keepStatic && !i && !0 !== r && (S = s.call(g, !0)) : S = s.call(g, x, t, i, a, void 0, e),
2900
- !0 === S && (S = {
2901
- pos: x
2902
- });
2903
- }
2904
- if ("function" == typeof y.postValidation && !0 !== a && !0 !== l) {
2905
- var A = y.postValidation.call(g, o.getBuffer.call(g, !0), void 0 !== e.begin ? g.isRTL ? e.end : e.begin : e, t, S, y, b, i, p);
2906
- void 0 !== A && (S = !0 === A ? S : A);
2907
- }
2908
- S && void 0 === S.pos && (S.pos = x), !1 === S || !0 === l ? (o.resetMaskSet.call(g, !0),
2909
- b.validPositions = k.extend(!0, {}, _)) : v.call(g, void 0, x, !0);
2910
- var D = P(S);
2911
- void 0 !== g.maxLength && (o.getBuffer.call(g).length > g.maxLength && !a && (o.resetMaskSet.call(g, !0),
2912
- b.validPositions = k.extend(!0, {}, _), D = !1));
2913
- return D;
2914
- }
2915
- function p(e, t, i) {
2916
- for (var a = this.maskset, r = !1, o = n.getTests.call(this, e), l = 0; l < o.length; l++) {
2917
- if (o[l].match && (o[l].match.nativeDef === t.match[i.shiftPositions ? "def" : "nativeDef"] && (!i.shiftPositions || !t.match.static) || o[l].match.nativeDef === t.match.nativeDef || i.regex && !o[l].match.static && o[l].match.fn.test(t.input))) {
2918
- r = !0;
2919
- break;
2920
- }
2921
- if (o[l].match && o[l].match.def === t.match.nativeDef) {
2922
- r = void 0;
2923
- break;
2924
- }
2925
- }
2926
- return !1 === r && void 0 !== a.jitOffset[e] && (r = p.call(this, e + a.jitOffset[e], t, i)),
2927
- r;
2928
- }
2929
- function h(e, t, i) {
2930
- var a, n, r = this, s = this.maskset, u = this.opts, c = this.dependencyLib, f = u.skipOptionalPartCharacter, d = r.isRTL ? i.slice().reverse() : i;
2931
- if (u.skipOptionalPartCharacter = "", !0 === e) o.resetMaskSet.call(r), s.tests = {},
2932
- e = 0, t = i.length, n = o.determineNewCaretPosition.call(r, {
2933
- begin: 0,
2934
- end: 0
2935
- }, !1).begin; else {
2936
- for (a = e; a < t; a++) delete s.validPositions[a];
2937
- n = e;
2938
- }
2939
- var p = new c.Event("keypress");
2940
- for (a = e; a < t; a++) {
2941
- p.keyCode = d[a].toString().charCodeAt(0), r.ignorable = !1;
2942
- var h = l.EventHandlers.keypressEvent.call(r, p, !0, !1, !1, n);
2943
- !1 !== h && void 0 !== h && (n = h.forwardPosition);
2944
- }
2945
- u.skipOptionalPartCharacter = f;
2946
- }
2947
- function v(e, t, i) {
2948
- var a = this, r = this.maskset, l = this.dependencyLib;
2949
- if (void 0 === e) for (e = t - 1; e > 0 && !r.validPositions[e]; e--) ;
2950
- for (var s = e; s < t; s++) {
2951
- if (void 0 === r.validPositions[s] && !o.isMask.call(a, s, !1)) if (0 == s ? n.getTest.call(a, s) : r.validPositions[s - 1]) {
2952
- var u = n.getTests.call(a, s).slice();
2953
- "" === u[u.length - 1].match.def && u.pop();
2954
- var c, f = n.determineTestTemplate.call(a, s, u);
2955
- if (f && (!0 !== f.match.jit || "master" === f.match.newBlockMarker && (c = r.validPositions[s + 1]) && !0 === c.match.optionalQuantifier) && ((f = l.extend({}, f, {
2956
- input: n.getPlaceholder.call(a, s, f.match, !0) || f.match.def
2957
- })).generatedInput = !0, m.call(a, s, f, !0), !0 !== i)) {
2958
- var p = r.validPositions[t].input;
2959
- return r.validPositions[t] = void 0, d.call(a, t, p, !0, !0);
2960
- }
2961
- }
2962
- }
2963
- }
2964
- function m(e, t, i, a) {
2965
- var r = this, l = this.maskset, s = this.opts, u = this.dependencyLib;
2966
- function c(e, t, i) {
2967
- var a = t[e];
2968
- if (void 0 !== a && !0 === a.match.static && !0 !== a.match.optionality && (void 0 === t[0] || void 0 === t[0].alternation)) {
2969
- var n = i.begin <= e - 1 ? t[e - 1] && !0 === t[e - 1].match.static && t[e - 1] : t[e - 1], r = i.end > e + 1 ? t[e + 1] && !0 === t[e + 1].match.static && t[e + 1] : t[e + 1];
2970
- return n && r;
2971
- }
2972
- return !1;
2973
- }
2974
- var f = 0, h = void 0 !== e.begin ? e.begin : e, v = void 0 !== e.end ? e.end : e, m = !0;
2975
- if (e.begin > e.end && (h = e.end, v = e.begin), a = void 0 !== a ? a : h, h !== v || s.insertMode && void 0 !== l.validPositions[a] && void 0 === i || void 0 === t || t.match.optionalQuantifier || t.match.optionality) {
2976
- var g, k = u.extend(!0, {}, l.validPositions), y = o.getLastValidPosition.call(r, void 0, !0);
2977
- for (l.p = h, g = y; g >= h; g--) delete l.validPositions[g], void 0 === t && delete l.tests[g + 1];
2978
- var b, x, P = a, E = P;
2979
- for (t && (l.validPositions[a] = u.extend(!0, {}, t), E++, P++), g = t ? v : v - 1; g <= y; g++) {
2980
- if (void 0 !== (b = k[g]) && !0 !== b.generatedInput && (g >= v || g >= h && c(g, k, {
2981
- begin: h,
2982
- end: v
2983
- }))) {
2984
- for (;"" !== n.getTest.call(r, E).match.def; ) {
2985
- if (!1 !== (x = p.call(r, E, b, s)) || "+" === b.match.def) {
2986
- "+" === b.match.def && o.getBuffer.call(r, !0);
2987
- var S = d.call(r, E, b.input, "+" !== b.match.def, !0);
2988
- if (m = !1 !== S, P = (S.pos || E) + 1, !m && x) break;
2989
- } else m = !1;
2990
- if (m) {
2991
- void 0 === t && b.match.static && g === e.begin && f++;
2992
- break;
2993
- }
2994
- if (!m && o.getBuffer.call(r), E > l.maskLength) break;
2995
- E++;
2996
- }
2997
- "" == n.getTest.call(r, E).match.def && (m = !1), E = P;
2998
- }
2999
- if (!m) break;
3000
- }
3001
- if (!m) return l.validPositions = u.extend(!0, {}, k), o.resetMaskSet.call(r, !0),
3002
- !1;
3003
- } else t && n.getTest.call(r, a).match.cd === t.match.cd && (l.validPositions[a] = u.extend(!0, {}, t));
3004
- return o.resetMaskSet.call(r, !0), f;
3005
- }
3006
- },
3007
- 5581: function(e) {
3008
- 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}');
3009
- }
3010
- }, t = {};
3011
- function i(a) {
3012
- var n = t[a];
3013
- if (void 0 !== n) return n.exports;
3014
- var r = t[a] = {
3015
- exports: {}
3016
- };
3017
- return e[a](r, r.exports, i), r.exports;
3018
- }
3019
- var a = {};
3020
- return function() {
3021
- var e, t = a;
3022
- Object.defineProperty(t, "__esModule", {
3023
- value: !0
3024
- }), t.default = void 0, i(3851), i(219), i(207), i(5296);
3025
- var n = ((e = i(2394)) && e.__esModule ? e : {
3026
- default: e
3027
- }).default;
3028
- t.default = n;
3029
- }(), a;
3030
- }();
3031
- }));