smoothly 0.1.84 → 0.1.88

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 (84) hide show
  1. package/dist/cjs/{generate-a6821b82.js → generate-f9a36f25.js} +1 -1
  2. package/dist/cjs/{index-fc82954f.js → index-ac32385c.js} +230 -184
  3. package/dist/cjs/index-bc3845e8.js +1670 -0
  4. package/dist/cjs/index.cjs.js +214 -116
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/smoothly-accordion_47.cjs.entry.js +1163 -19143
  7. package/dist/cjs/smoothly-calendar.cjs.entry.js +40 -12
  8. package/dist/cjs/smoothly-display-amount.cjs.entry.js +1 -1
  9. package/dist/cjs/smoothly-display.cjs.entry.js +2 -1
  10. package/dist/cjs/smoothly-input-date-range.cjs.entry.js +10 -11
  11. package/dist/cjs/smoothly-input-date.cjs.entry.js +6 -2
  12. package/dist/cjs/smoothly-input-month.cjs.entry.js +2 -2
  13. package/dist/cjs/smoothly-input.cjs.entry.js +17 -10
  14. package/dist/cjs/smoothly-select-demo.cjs.entry.js +2 -2
  15. package/dist/cjs/smoothly.cjs.js +1 -1
  16. package/dist/collection/components/calendar/index.js +80 -11
  17. package/dist/collection/components/display/index.js +1 -1
  18. package/dist/collection/components/input/index.js +17 -10
  19. package/dist/collection/components/input-date/index.js +12 -1
  20. package/dist/collection/components/input-date/style.css +4 -0
  21. package/dist/collection/components/input-date-range/index.js +14 -15
  22. package/dist/collection/components/input-date-range/style.css +4 -0
  23. package/dist/collection/components/select-demo/index.js +2 -2
  24. package/dist/collection/index.js +1 -1
  25. package/dist/collection/utilities/Cosmetic/Color/CommaRgb.js +90 -0
  26. package/dist/collection/utilities/Cosmetic/Color/Hex.js +11 -0
  27. package/dist/collection/utilities/Cosmetic/Color/Hsl.js +32 -0
  28. package/dist/collection/utilities/{colorNames.js → Cosmetic/Color/Name.js} +9 -1
  29. package/dist/collection/utilities/Cosmetic/Color/Rgb.js +19 -0
  30. package/dist/collection/utilities/Cosmetic/Color/index.js +23 -0
  31. package/dist/collection/utilities/Cosmetic/index.js +40 -0
  32. package/dist/collection/utilities/index.js +1 -1
  33. package/dist/custom-elements/index.js +1539 -19619
  34. package/dist/esm/{generate-776b3b0f.js → generate-50b98474.js} +1 -1
  35. package/dist/esm/index-37a67c97.js +1668 -0
  36. package/dist/{smoothly/index-a28d88cf.js → esm/index-a5a08f46.js} +230 -184
  37. package/dist/esm/index.js +215 -116
  38. package/dist/esm/loader.js +1 -1
  39. package/dist/esm/smoothly-accordion_47.entry.js +1163 -19143
  40. package/dist/esm/smoothly-calendar.entry.js +40 -12
  41. package/dist/esm/smoothly-display-amount.entry.js +1 -1
  42. package/dist/esm/smoothly-display.entry.js +2 -1
  43. package/dist/esm/smoothly-input-date-range.entry.js +10 -11
  44. package/dist/esm/smoothly-input-date.entry.js +6 -2
  45. package/dist/esm/smoothly-input-month.entry.js +2 -2
  46. package/dist/esm/smoothly-input.entry.js +17 -10
  47. package/dist/esm/smoothly-select-demo.entry.js +2 -2
  48. package/dist/esm/smoothly.js +1 -1
  49. package/dist/smoothly/{generate-776b3b0f.js → generate-50b98474.js} +1 -1
  50. package/dist/smoothly/index-37a67c97.js +1668 -0
  51. package/dist/{esm/index-a28d88cf.js → smoothly/index-a5a08f46.js} +230 -184
  52. package/dist/smoothly/index.esm.js +215 -116
  53. package/dist/smoothly/p-0286085b.entry.js +1 -0
  54. package/dist/smoothly/smoothly-calendar.entry.js +40 -12
  55. package/dist/smoothly/smoothly-display-amount.entry.js +1 -1
  56. package/dist/smoothly/smoothly-display.entry.js +2 -1
  57. package/dist/smoothly/smoothly-input-date-range.entry.js +10 -11
  58. package/dist/smoothly/smoothly-input-date.entry.js +6 -2
  59. package/dist/smoothly/smoothly-input-month.entry.js +2 -2
  60. package/dist/smoothly/smoothly-input.entry.js +17 -10
  61. package/dist/smoothly/smoothly-select-demo.entry.js +2 -2
  62. package/dist/smoothly/smoothly.esm.js +1 -1
  63. package/dist/types/components/calendar/index.d.ts +6 -1
  64. package/dist/types/components/input/index.d.ts +1 -0
  65. package/dist/types/components/input-date/index.d.ts +1 -0
  66. package/dist/types/components/input-date-range/index.d.ts +2 -2
  67. package/dist/types/components.d.ts +3 -1
  68. package/dist/types/index.d.ts +1 -1
  69. package/dist/types/utilities/Cosmetic/Color/CommaRgb.d.ts +11 -0
  70. package/dist/types/utilities/Cosmetic/Color/Hex.d.ts +4 -0
  71. package/dist/types/utilities/Cosmetic/Color/Hsl.d.ts +4 -0
  72. package/dist/types/utilities/Cosmetic/Color/Name.d.ts +155 -0
  73. package/dist/types/utilities/Cosmetic/Color/Rgb.d.ts +4 -0
  74. package/dist/types/utilities/Cosmetic/Color/index.d.ts +170 -0
  75. package/dist/types/utilities/Cosmetic/index.d.ts +23 -0
  76. package/dist/types/utilities/index.d.ts +1 -1
  77. package/package.json +3 -3
  78. package/dist/cjs/index-42db74b3.js +0 -19931
  79. package/dist/collection/utilities/colorTransform.js +0 -120
  80. package/dist/esm/index-36a04e8c.js +0 -19929
  81. package/dist/smoothly/index-36a04e8c.js +0 -19929
  82. package/dist/smoothly/p-5ca32c49.entry.js +0 -1
  83. package/dist/types/utilities/colorNames.d.ts +0 -3
  84. package/dist/types/utilities/colorTransform.d.ts +0 -8
@@ -0,0 +1,1668 @@
1
+ import { c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-8fe71198.js';
2
+ import { d as dist$1 } from './index-a5a08f46.js';
3
+
4
+ var getAdjecentWordBreakIndex_1 = createCommonjsModule(function (module, exports) {
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.getAdjecentWordBreakIndex = void 0;
8
+ function getForwardWordBreakIndex(str, index, wordRegex) {
9
+ let result = 0;
10
+ while (wordRegex.exec(str) != null) {
11
+ result = wordRegex.lastIndex;
12
+ if (wordRegex.lastIndex > index)
13
+ break;
14
+ }
15
+ wordRegex.lastIndex <= index && (result = str.length);
16
+ return result;
17
+ }
18
+ function getBackwardWordBreakIndex(str, index, wordRegex) {
19
+ let result = 0;
20
+ let execArray;
21
+ while ((execArray = wordRegex.exec(str)) != null) {
22
+ if (wordRegex.lastIndex - execArray[0].length < index)
23
+ result = wordRegex.lastIndex - execArray[0].length;
24
+ else
25
+ break;
26
+ }
27
+ return result;
28
+ }
29
+ function getAdjecentWordBreakIndex(str, index, direction) {
30
+ const wordRegex = /([\wåäöüéáúíóßðœøæñµçþ_]+|[@-]+)/gi;
31
+ return direction == "backward"
32
+ ? getBackwardWordBreakIndex(str, index, wordRegex)
33
+ : getForwardWordBreakIndex(str, index, wordRegex);
34
+ }
35
+ exports.getAdjecentWordBreakIndex = getAdjecentWordBreakIndex;
36
+ //# sourceMappingURL=getAdjecentWordBreakIndex.js.map
37
+ });
38
+
39
+ const getAdjecentWordBreakIndex = /*@__PURE__*/getDefaultExportFromCjs(getAdjecentWordBreakIndex_1);
40
+
41
+ var Selection_1 = createCommonjsModule(function (module, exports) {
42
+ "use strict";
43
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ exports.Selection = void 0;
45
+ var Selection;
46
+ (function (Selection) {
47
+ function getCursor(selection) {
48
+ return selection.direction == "backward" ? selection.start : selection.end;
49
+ }
50
+ Selection.getCursor = getCursor;
51
+ function getStalker(selection) {
52
+ return selection.direction != "backward" ? selection.start : selection.end;
53
+ }
54
+ Selection.getStalker = getStalker;
55
+ })(Selection = exports.Selection || (exports.Selection = {}));
56
+ //# sourceMappingURL=Selection.js.map
57
+ });
58
+
59
+ const Selection = /*@__PURE__*/getDefaultExportFromCjs(Selection_1);
60
+
61
+ var State_1 = createCommonjsModule(function (module, exports) {
62
+ "use strict";
63
+ Object.defineProperty(exports, "__esModule", { value: true });
64
+ exports.State = void 0;
65
+ var State;
66
+ (function (State) {
67
+ function copy(state) {
68
+ return {
69
+ value: state.value,
70
+ selection: { start: state.selection.start, end: state.selection.end, direction: state.selection.direction },
71
+ };
72
+ }
73
+ State.copy = copy;
74
+ })(State = exports.State || (exports.State = {}));
75
+ //# sourceMappingURL=State.js.map
76
+ });
77
+
78
+ const State = /*@__PURE__*/getDefaultExportFromCjs(State_1);
79
+
80
+ var StateEditor_1 = createCommonjsModule(function (module, exports) {
81
+ "use strict";
82
+ Object.defineProperty(exports, "__esModule", { value: true });
83
+ exports.StateEditor = void 0;
84
+ class StateEditor {
85
+ constructor(state) {
86
+ this.value = state.value;
87
+ this.selection = { start: state.selection.start, end: state.selection.end, direction: state.selection.direction };
88
+ }
89
+ get(index, length = 1) {
90
+ return this.value.substr(index, length);
91
+ }
92
+ is(index, ...character) {
93
+ const c = this.get(index);
94
+ return character.some(d => c == d);
95
+ }
96
+ isDigit(index) {
97
+ const character = this.get(index);
98
+ return character >= "0" && character <= "9";
99
+ }
100
+ match(matcher) {
101
+ return this.value.match(matcher);
102
+ }
103
+ replace(start, end, value) {
104
+ let result;
105
+ if (typeof start == "string" && typeof end == "string") {
106
+ let s;
107
+ result = this;
108
+ while ((s = result.value.search(start)) > -1)
109
+ result = result.replace(s, s + start.length, end);
110
+ }
111
+ else if (typeof start == "number" && typeof end == "number") {
112
+ const state = {
113
+ value: this.value,
114
+ selection: { start: this.selection.start, end: this.selection.end, direction: this.selection.direction },
115
+ };
116
+ if (!value)
117
+ value = "";
118
+ state.value = this.value.slice(0, start) + value + this.value.slice(end, this.value.length);
119
+ if (this.selection.start >= end)
120
+ state.selection.start = this.selection.start + value.length - end + start;
121
+ else if (this.selection.start > start && this.selection.start < end)
122
+ state.selection.start = Math.min(this.selection.start, start + value.length);
123
+ if (this.selection.end >= end)
124
+ state.selection.end = this.selection.end + value.length - end + start;
125
+ else if (this.selection.end > start && this.selection.end < end)
126
+ state.selection.end = Math.min(this.selection.end, start + value.length);
127
+ result = new StateEditor(state);
128
+ }
129
+ return result || this;
130
+ }
131
+ insert(index, value) {
132
+ return this.replace(index, index, value);
133
+ }
134
+ append(value) {
135
+ return this.insert(this.value.length, value);
136
+ }
137
+ prepend(value) {
138
+ return this.insert(0, value);
139
+ }
140
+ suffix(value) {
141
+ return new StateEditor({ value: this.value + value, selection: this.selection });
142
+ }
143
+ delete(start, end) {
144
+ let result;
145
+ if (!this.value)
146
+ result = this;
147
+ else if (typeof start == "string") {
148
+ let s;
149
+ result = this;
150
+ while ((s = result.value.search(start)) > -1)
151
+ result = result.delete(s, s + start.length);
152
+ }
153
+ else
154
+ result = this.replace(start, end || start + 1, "");
155
+ return result;
156
+ }
157
+ truncate(end) {
158
+ return this.value.length >= end ? this.delete(end, this.value.length) : this;
159
+ }
160
+ pad(length, padding, index) {
161
+ let result = this;
162
+ while (length > result.value.length + padding.length)
163
+ result = result.insert(index, padding);
164
+ if (length > result.value.length)
165
+ result = result.insert(index, padding.substring(0, length - result.value.length));
166
+ return result;
167
+ }
168
+ padEnd(length, padding) {
169
+ return this.pad(length, padding, this.value.length);
170
+ }
171
+ padStart(length, padding) {
172
+ return this.pad(length, padding, 0);
173
+ }
174
+ map(mapping) {
175
+ let result = this;
176
+ let j = 0;
177
+ for (let i = 0; i < this.value.length; i++) {
178
+ const replacement = mapping(this.get(i), i);
179
+ result = result.replace(j, j + 1, replacement);
180
+ j += replacement.length;
181
+ }
182
+ return result;
183
+ }
184
+ static copy(state) {
185
+ return new StateEditor(Object.assign({}, state));
186
+ }
187
+ static create() {
188
+ return new StateEditor({ value: "", selection: { start: 0, end: 0 } });
189
+ }
190
+ static modify(state) {
191
+ return new StateEditor(typeof state == "string" ? { value: state, selection: { start: state.length, end: state.length } } : state);
192
+ }
193
+ }
194
+ exports.StateEditor = StateEditor;
195
+ //# sourceMappingURL=StateEditor.js.map
196
+ });
197
+
198
+ const StateEditor = /*@__PURE__*/getDefaultExportFromCjs(StateEditor_1);
199
+
200
+ var Action_1 = createCommonjsModule(function (module, exports) {
201
+ "use strict";
202
+ Object.defineProperty(exports, "__esModule", { value: true });
203
+ exports.Action = void 0;
204
+
205
+
206
+
207
+
208
+ var Action;
209
+ (function (Action) {
210
+ function apply(formatter, state, action) {
211
+ var _a, _b;
212
+ let result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
213
+ if (action) {
214
+ if (action.ctrlKey || action.metaKey) {
215
+ if (action.key == "a")
216
+ select(result, 0, result.value.length, "forward");
217
+ else if (["ArrowLeft", "ArrowRight"].includes(action.key) && ((_a = state) === null || _a === void 0 ? void 0 : _a.type) != "password")
218
+ result = ctrlArrow(formatter, state, action);
219
+ else if (["Delete", "Backspace"].includes(action.key) && ((_b = state) === null || _b === void 0 ? void 0 : _b.type) != "password")
220
+ result = ctrlBackspaceDelete(formatter, state, action);
221
+ }
222
+ else if (["ArrowLeft", "ArrowRight", "Home", "End"].includes(action.key))
223
+ arrowHomeEnd(result, action);
224
+ else if (["Delete", "Backspace"].includes(action.key)) {
225
+ result.selection.start == result.selection.end &&
226
+ select(result, result.selection.start + (action.key == "Backspace" ? -1 : 0), result.selection.end + (action.key == "Delete" ? 1 : 0));
227
+ erase(result);
228
+ }
229
+ else if (action.key != "Unidentified") {
230
+ erase(result);
231
+ formatter.allowed(action.key, result) && replace(result, action.key);
232
+ }
233
+ }
234
+ return formatter.format(StateEditor_1.StateEditor.copy(result));
235
+ }
236
+ Action.apply = apply;
237
+ function ctrlArrow(formatter, state, action) {
238
+ let cursorPosition = Selection_1.Selection.getCursor(state.selection);
239
+ let stalkPosition = Selection_1.Selection.getStalker(state.selection);
240
+ cursorPosition = getAdjecentWordBreakIndex_1.getAdjecentWordBreakIndex(state.value, cursorPosition, action.key == "ArrowLeft" ? "backward" : "forward");
241
+ stalkPosition = action.shiftKey ? stalkPosition : cursorPosition;
242
+ return State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(Object.assign(Object.assign({}, state), { selection: {
243
+ start: Math.min(stalkPosition, cursorPosition),
244
+ end: Math.max(stalkPosition, cursorPosition),
245
+ direction: stalkPosition < cursorPosition ? "forward" : stalkPosition > cursorPosition ? "backward" : "none",
246
+ } }))));
247
+ }
248
+ function ctrlBackspaceDelete(formatter, state, action) {
249
+ const cursorPosition = Selection_1.Selection.getCursor(state.selection);
250
+ const adjecentIndex = getAdjecentWordBreakIndex_1.getAdjecentWordBreakIndex(state.value, cursorPosition, action.key == "Backspace" ? "backward" : "forward");
251
+ const result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(Object.assign(Object.assign({}, state), { selection: {
252
+ start: Math.min(cursorPosition, adjecentIndex),
253
+ end: Math.max(cursorPosition, adjecentIndex),
254
+ direction: "none",
255
+ } }))));
256
+ result.value = result.value.substring(0, result.selection.start) + result.value.substring(result.selection.end);
257
+ result.selection.end = result.selection.start;
258
+ return result;
259
+ }
260
+ function arrowHomeEnd(state, action) {
261
+ let cursorPosition = Selection_1.Selection.getCursor(state.selection);
262
+ let stalkPosition = Selection_1.Selection.getStalker(state.selection);
263
+ cursorPosition =
264
+ action.key == "Home"
265
+ ? 0
266
+ : action.key == "End"
267
+ ? state.value.length
268
+ : state.selection.start == state.selection.end || action.shiftKey
269
+ ? Math.min(Math.max(cursorPosition + (action.key == "ArrowLeft" ? -1 : 1), 0), state.value.length)
270
+ : action.key == "ArrowLeft"
271
+ ? state.selection.start
272
+ : state.selection.end;
273
+ stalkPosition = action.shiftKey ? stalkPosition : cursorPosition;
274
+ state.selection.direction =
275
+ stalkPosition < cursorPosition ? "forward" : stalkPosition > cursorPosition ? "backward" : "none";
276
+ state.selection.start = Math.min(stalkPosition, cursorPosition);
277
+ state.selection.end = Math.max(stalkPosition, cursorPosition);
278
+ }
279
+ function select(state, from, to, direction) {
280
+ state.selection.start = from;
281
+ state.selection.end = to;
282
+ direction && (state.selection.direction = direction);
283
+ }
284
+ function erase(state) {
285
+ replace(state, "");
286
+ }
287
+ function replace(state, insertString) {
288
+ state.value =
289
+ state.value.substring(0, state.selection.start) + insertString + state.value.substring(state.selection.end);
290
+ state.selection.start = state.selection.start + insertString.length;
291
+ state.selection.end = state.selection.start;
292
+ }
293
+ })(Action = exports.Action || (exports.Action = {}));
294
+ //# sourceMappingURL=Action.js.map
295
+ });
296
+
297
+ const Action = /*@__PURE__*/getDefaultExportFromCjs(Action_1);
298
+
299
+ var base = createCommonjsModule(function (module, exports) {
300
+ "use strict";
301
+ Object.defineProperty(exports, "__esModule", { value: true });
302
+ exports.parse = exports.format = exports.get = exports.add = void 0;
303
+
304
+ const handlers = {};
305
+ function add(type, create) {
306
+ handlers[type] = create;
307
+ }
308
+ exports.add = add;
309
+ function get(type, ...argument) {
310
+ const create = handlers[type];
311
+ return create && create(argument);
312
+ }
313
+ exports.get = get;
314
+ function format(data, type, ...argument) {
315
+ const handler = get(type, argument);
316
+ return handler
317
+ ? handler.format(StateEditor_1.StateEditor.modify(handler.toString(typeof data == "string" ? parse(data, type, argument) : data)))
318
+ .value
319
+ : "";
320
+ }
321
+ exports.format = format;
322
+ function parse(value, type, ...argument) {
323
+ const handler = get(type, argument);
324
+ return handler ? handler.fromString(handler.unformat(StateEditor_1.StateEditor.modify(value)).value) : undefined;
325
+ }
326
+ exports.parse = parse;
327
+ //# sourceMappingURL=base.js.map
328
+ });
329
+
330
+ const base$1 = /*@__PURE__*/getDefaultExportFromCjs(base);
331
+
332
+ var cardCsc = createCommonjsModule(function (module, exports) {
333
+ "use strict";
334
+ Object.defineProperty(exports, "__esModule", { value: true });
335
+
336
+ class Handler {
337
+ toString(data) {
338
+ return typeof data == "string" ? data : "";
339
+ }
340
+ fromString(value) {
341
+ return typeof value == "string" ? value : undefined;
342
+ }
343
+ format(unformated) {
344
+ return Object.assign(Object.assign({}, unformated), { type: "text", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
345
+ }
346
+ unformat(formated) {
347
+ return formated;
348
+ }
349
+ allowed(symbol, state) {
350
+ return state.value.length < 3 && symbol >= "0" && symbol <= "9";
351
+ }
352
+ }
353
+ base.add("card-csc", () => new Handler());
354
+ //# sourceMappingURL=card-csc.js.map
355
+ });
356
+
357
+ const cardCsc$1 = /*@__PURE__*/getDefaultExportFromCjs(cardCsc);
358
+
359
+ var cardExpires = createCommonjsModule(function (module, exports) {
360
+ "use strict";
361
+ Object.defineProperty(exports, "__esModule", { value: true });
362
+
363
+ class Handler {
364
+ toString(data) {
365
+ return Array.isArray(data) && data.length == 2 && typeof data[0] == "number" && typeof data[1] == "number"
366
+ ? data[0].toString().padStart(2, "0") + data[1].toString().padStart(2, "0")
367
+ : "";
368
+ }
369
+ fromString(value) {
370
+ return typeof value == "string" && value.length == 4
371
+ ? [Number.parseInt(value.slice(0, 2)), Number.parseInt(value.slice(2))]
372
+ : undefined;
373
+ }
374
+ format(unformated) {
375
+ let result = unformated;
376
+ if (unformated.value.length > 0 && !unformated.is(0, "0", "1"))
377
+ result = result.prepend("0");
378
+ if (result.value.length > 1)
379
+ result = result.insert(2, " / ");
380
+ return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
381
+ }
382
+ unformat(formated) {
383
+ return formated.delete(" / ");
384
+ }
385
+ allowed(symbol, state) {
386
+ return state.value.length < 4 && symbol >= "0" && symbol <= "9";
387
+ }
388
+ }
389
+ base.add("card-expires", () => new Handler());
390
+ //# sourceMappingURL=card-expires.js.map
391
+ });
392
+
393
+ const cardExpires$1 = /*@__PURE__*/getDefaultExportFromCjs(cardExpires);
394
+
395
+ var cardNumber = createCommonjsModule(function (module, exports) {
396
+ "use strict";
397
+ Object.defineProperty(exports, "__esModule", { value: true });
398
+
399
+ class Handler {
400
+ toString(data) {
401
+ return typeof data == "string" ? data : "";
402
+ }
403
+ fromString(value) {
404
+ return typeof value == "string" ? value : undefined;
405
+ }
406
+ format(unformated) {
407
+ const issuer = getIssuer(unformated.value);
408
+ const result = unformated.map((symbol, index) => symbol + (index % 4 == 3 && index + 1 < issuer.length[0] ? " " : ""));
409
+ return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
410
+ }
411
+ unformat(formated) {
412
+ return formated.delete(" ");
413
+ }
414
+ allowed(symbol, state) {
415
+ const issuer = getIssuer(state.value);
416
+ return symbol >= "0" && symbol <= "9" && state.value.length < issuer.length[0];
417
+ }
418
+ }
419
+ base.add("card-number", () => new Handler());
420
+ function getIssuer(value) {
421
+ let result = defaultIssuer;
422
+ for (const key in issuers)
423
+ if (Object.prototype.hasOwnProperty.call(issuers, key) && issuers[key].identification.test(value)) {
424
+ result = Object.assign(Object.assign(Object.assign({}, defaultIssuer), { name: key }), issuers[key]);
425
+ break;
426
+ }
427
+ return result;
428
+ }
429
+ const defaultIssuer = {
430
+ name: "unknown",
431
+ verification: /^\d{19}$/,
432
+ identification: /^\d/,
433
+ length: [16, 16, 19],
434
+ icon: "generic",
435
+ };
436
+ const issuers = {
437
+ amex: {
438
+ verification: /^3[47][0-9]{2}\s[0-9]{4}\s[0-9]{4}\s[0-9]{3}$/,
439
+ identification: /^3[47]/,
440
+ length: [15, 18, 18],
441
+ icon: "amex",
442
+ },
443
+ dankort: {
444
+ verification: /^(5019)\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,
445
+ identification: /^(5019)\d+/,
446
+ length: [16, 19, 19],
447
+ icon: "generic",
448
+ },
449
+ diners: {
450
+ verification: /^3(?:0[0-5]|[68][0-9])[0-9]\s[0-9]{4}\s[0-9]{4}\s[0-9]{2}$/,
451
+ identification: /^3(?:0[0-5]|[68][0-9])/,
452
+ length: [14, 17, 17],
453
+ icon: "diners",
454
+ },
455
+ discover: {
456
+ verification: /^6(?:011|5[0-9]{2})\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,
457
+ identification: /^6(?:011|5[0-9]{2})/,
458
+ length: [16, 19, 19],
459
+ icon: "generic",
460
+ },
461
+ electron: {
462
+ verification: /^((4026|4405|4508|4844|4913|4917)\s[0-9]{4}\s[0-9]{4}\s[0-9]{4})|((4175)\s(00)[0-9]{2}\s[0-9]{4}\s[0-9]{4})$/,
463
+ identification: /^(4026|417500|4405|4508|4844|4913|4917)/,
464
+ length: [16, 19, 19],
465
+ icon: "generic",
466
+ },
467
+ interpayment: {
468
+ verification: /^(636)[0-9]\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,
469
+ identification: /^(636)/,
470
+ length: [16, 19, 19],
471
+ icon: "generic",
472
+ },
473
+ jcb: {
474
+ verification: /^((?:2131|1800)\s[0-9]{4}\s[0-9]{4}\s[0-9]{4})|(35[0-9]{2}\s[0-9]{4}\s[0-9]{4}\s[0-9]{4})$/,
475
+ identification: /^(?:2131|1800|35\d{3})/,
476
+ length: [16, 19, 19],
477
+ icon: "generic",
478
+ },
479
+ unionpay: {
480
+ verification: /^(62|88)[0-9]{2}\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,
481
+ identification: /^(62|88)/,
482
+ length: [16, 19, 19],
483
+ icon: "generic",
484
+ },
485
+ maestro: {
486
+ verification: /^(5018|5020|5038|5612|5893|6304|6759|6761|6762|6763|0604|6390)\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,
487
+ identification: /^(5018|5020|5038|5612|5893|6304|6759|6761|6762|6763|0604|6390)/,
488
+ length: [16, 19, 19],
489
+ icon: "maestro",
490
+ },
491
+ mastercard: {
492
+ verification: /^5[1-5][0-9]{2}\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,
493
+ identification: /^5[1-5][0-9]/,
494
+ length: [16, 19, 19],
495
+ icon: "mastercard",
496
+ },
497
+ visa: {
498
+ verification: /^4[0-9]{3}\s[0-9]{4}\s[0-9]{4}\s[0-9](?:[0-9]{3})?$/,
499
+ identification: /^4[0-9]/,
500
+ length: [16, 16, 19],
501
+ icon: "visa",
502
+ },
503
+ };
504
+ //# sourceMappingURL=card-number.js.map
505
+ });
506
+
507
+ const cardNumber$1 = /*@__PURE__*/getDefaultExportFromCjs(cardNumber);
508
+
509
+ var DateFormat_1 = createCommonjsModule(function (module, exports) {
510
+ "use strict";
511
+ Object.defineProperty(exports, "__esModule", { value: true });
512
+ exports.DateFormat = void 0;
513
+ var DateFormat;
514
+ (function (DateFormat) {
515
+ function fromLocale(locale) {
516
+ let result;
517
+ switch (locale) {
518
+ case "sq-AL":
519
+ case "es-AR":
520
+ case "it-IT":
521
+ case "en-GB":
522
+ case "fr-FR":
523
+ result = "dd/mm/YYYY";
524
+ break;
525
+ case "en-US":
526
+ result = "mm/dd/YYYY";
527
+ break;
528
+ case "et-EE":
529
+ case "de-AT":
530
+ case "de-DE":
531
+ case "he-IL":
532
+ case "is-IS":
533
+ case "lv-LV":
534
+ case "pl-PL":
535
+ case "ru-RU":
536
+ case "fi-FI":
537
+ result = "dd.mm.YYYY";
538
+ break;
539
+ case "hi-IN":
540
+ case "en-IN":
541
+ result = "dd-mm-YYYY";
542
+ break;
543
+ default:
544
+ result = "YYYY-mm-dd";
545
+ break;
546
+ }
547
+ return result;
548
+ }
549
+ DateFormat.fromLocale = fromLocale;
550
+ function toLocale(format) {
551
+ let result;
552
+ switch (format) {
553
+ case "dd/mm/YYYY":
554
+ result = "en-GB";
555
+ break;
556
+ case "mm/dd/YYYY":
557
+ result = "en-US";
558
+ break;
559
+ case "dd.mm.YYYY":
560
+ result = "de-DE";
561
+ break;
562
+ default:
563
+ result = "sv-SE";
564
+ break;
565
+ }
566
+ return result;
567
+ }
568
+ DateFormat.toLocale = toLocale;
569
+ function is(value) {
570
+ return (typeof value == "string" &&
571
+ (value == "YYYY-mm-dd" || value == "dd/mm/YYYY" || value == "dd.mm.YYYY" || value == "mm/dd/YYYY"));
572
+ }
573
+ DateFormat.is = is;
574
+ })(DateFormat = exports.DateFormat || (exports.DateFormat = {}));
575
+ //# sourceMappingURL=DateFormat.js.map
576
+ });
577
+
578
+ const DateFormat = /*@__PURE__*/getDefaultExportFromCjs(DateFormat_1);
579
+
580
+ var Base_1 = createCommonjsModule(function (module, exports) {
581
+ "use strict";
582
+ Object.defineProperty(exports, "__esModule", { value: true });
583
+ exports.register = exports.Base = void 0;
584
+
585
+
586
+
587
+ class Base {
588
+ constructor(seperator) {
589
+ this.seperator = seperator;
590
+ }
591
+ unformat(formated) {
592
+ return formated.delete(this.seperator);
593
+ }
594
+ daysInMonth(value) {
595
+ var _a;
596
+ return (32 -
597
+ Number.parseInt(dist$1.Date.next(((_a = this.fromString(value.padEnd(8, "1"))) !== null && _a !== void 0 ? _a : "1970-01-01").substring(0, 8) + "28", 4).substring(8, 10)));
598
+ }
599
+ validMonth(day, month, year) {
600
+ return (new Date(Number.parseInt(year !== null && year !== void 0 ? year : "2004"), Number.parseInt(month), 0).getDate() >=
601
+ Number.parseInt(day));
602
+ }
603
+ }
604
+ exports.Base = Base;
605
+ const handlers = {};
606
+ function register(format, create) {
607
+ handlers[format] = create;
608
+ }
609
+ exports.register = register;
610
+ base.add("date", (parameters) => {
611
+ var _a;
612
+ const argument = parameters && parameters.length > 0 ? parameters[0] : undefined;
613
+ const format = DateFormat_1.DateFormat.is(argument) ? argument : DateFormat_1.DateFormat.fromLocale(argument);
614
+ const create = (_a = handlers[format]) !== null && _a !== void 0 ? _a : handlers["YYYY-mm-dd"];
615
+ return create();
616
+ });
617
+ //# sourceMappingURL=Base.js.map
618
+ });
619
+
620
+ const Base = /*@__PURE__*/getDefaultExportFromCjs(Base_1);
621
+
622
+ var dmy = createCommonjsModule(function (module, exports) {
623
+ "use strict";
624
+ Object.defineProperty(exports, "__esModule", { value: true });
625
+
626
+
627
+ class Handler extends Base_1.Base {
628
+ constructor(seperator) {
629
+ super(seperator);
630
+ }
631
+ toString(data) {
632
+ return data.length == 10
633
+ ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.seperator)
634
+ : "";
635
+ }
636
+ fromString(value) {
637
+ const result = value.length == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
638
+ return dist$1.Date.is(result) ? result : undefined;
639
+ }
640
+ format(unformatted) {
641
+ let result = unformatted;
642
+ if (result.get(0, 1) > "3")
643
+ result = result.insert(0, "0");
644
+ if (result.value.length > 1)
645
+ result = result.insert(2, this.seperator);
646
+ if (result.get(3, 1) > "1")
647
+ result = result.insert(3, "0");
648
+ if (result.value.length > 4)
649
+ result = result.insert(5, this.seperator);
650
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|[12][0-9]|3[01])", "(0[1-9]|1[012])", "\\d{4}$"].join(this.seperator)) });
651
+ }
652
+ allowed(symbol, state) {
653
+ return state.selection.start == 1 && state.value[0] == "3"
654
+ ? symbol >= "0" && symbol <= "1"
655
+ : state.selection.start == 1 && state.value[0] == "0"
656
+ ? symbol >= "1" && symbol <= "9"
657
+ : state.selection.start == 2
658
+ ? symbol >= "0" &&
659
+ symbol <= "9" &&
660
+ (symbol == "0" || symbol == "1" || this.validMonth(state.value.substring(0, 2), symbol))
661
+ : state.selection.start == 3
662
+ ? symbol >= "0" && symbol <= "9" && this.validMonth(state.value.substring(0, 2), state.value[2] + symbol)
663
+ : state.selection.start == 7
664
+ ? symbol >= "0" &&
665
+ symbol <= "9" &&
666
+ this.validMonth(state.value.substring(0, 2), state.value.substring(2, 4), state.value.substring(4, 7) + symbol)
667
+ : state.selection.start < 8 && symbol >= "0" && symbol <= "9";
668
+ }
669
+ }
670
+ Base_1.register("dd.mm.YYYY", () => new Handler("."));
671
+ Base_1.register("dd/mm/YYYY", () => new Handler("/"));
672
+ Base_1.register("dd-mm-YYYY", () => new Handler("-"));
673
+ //# sourceMappingURL=dmy.js.map
674
+ });
675
+
676
+ const dmy$1 = /*@__PURE__*/getDefaultExportFromCjs(dmy);
677
+
678
+ var mdy = createCommonjsModule(function (module, exports) {
679
+ "use strict";
680
+ Object.defineProperty(exports, "__esModule", { value: true });
681
+
682
+
683
+ class Handler extends Base_1.Base {
684
+ constructor(seperator) {
685
+ super(seperator);
686
+ }
687
+ toString(data) {
688
+ return data.length == 10
689
+ ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.seperator)
690
+ : "";
691
+ }
692
+ fromString(value) {
693
+ const result = value.length == 8 ? `${value.substring(4, 8)}-${value.substring(0, 2)}-${value.substring(2, 4)}` : undefined;
694
+ return dist$1.Date.is(result) ? result : undefined;
695
+ }
696
+ format(unformatted) {
697
+ let result = unformatted;
698
+ if (result.get(0, 1) > "1")
699
+ result = result.insert(0, "0");
700
+ if (result.value.length > 1)
701
+ result = result.insert(2, this.seperator);
702
+ if (result.get(3, 1) > (result.get(0, 2) == "02" ? "2" : "3"))
703
+ result = result.insert(3, "0");
704
+ if (result.value.length > 4)
705
+ result = result.insert(5, this.seperator);
706
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])", "\\d{4}$"].join(this.seperator)) });
707
+ }
708
+ allowed(symbol, state) {
709
+ const result = state.selection.start == 1 && state.value[0] == "1"
710
+ ? symbol >= "0" && symbol <= "2"
711
+ : state.selection.start == 1 && state.value[0] == "0"
712
+ ? symbol >= "1" && symbol <= "9"
713
+ : state.selection.start == 3
714
+ ? symbol >= "0" && symbol <= "9" && this.validMonth(state.value[2] + symbol, state.value.substring(0, 2))
715
+ : state.selection.start == 7
716
+ ? symbol >= "0" &&
717
+ symbol <= "9" &&
718
+ this.validMonth(state.value.substring(2, 4), state.value.substring(0, 2), state.value.substring(4, 7) + symbol)
719
+ : state.selection.start < 8 && symbol >= "0" && symbol <= "9";
720
+ return result;
721
+ }
722
+ }
723
+ Base_1.register("mm/dd/YYYY", () => new Handler("/"));
724
+ //# sourceMappingURL=mdy.js.map
725
+ });
726
+
727
+ const mdy$1 = /*@__PURE__*/getDefaultExportFromCjs(mdy);
728
+
729
+ var ymd = createCommonjsModule(function (module, exports) {
730
+ "use strict";
731
+ Object.defineProperty(exports, "__esModule", { value: true });
732
+
733
+
734
+ class Handler extends Base_1.Base {
735
+ constructor(seperator) {
736
+ super(seperator);
737
+ }
738
+ toString(data) {
739
+ return typeof data != "string" ? "" : data;
740
+ }
741
+ fromString(value) {
742
+ const result = value.length == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
743
+ return dist$1.Date.is(result) ? result : undefined;
744
+ }
745
+ format(unformatted) {
746
+ let result = unformatted;
747
+ if (result.value.length > 3) {
748
+ result = result.insert(4, this.seperator);
749
+ if (result.get(5, 1) > "1")
750
+ result = result.insert(5, "0");
751
+ if (result.value.length > 6) {
752
+ result = result.insert(7, this.seperator);
753
+ if (result.get(8, 1) > this.daysInMonth(unformatted.value).toString().substring(0, 1))
754
+ result = result.insert(8, "0");
755
+ }
756
+ }
757
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^\\d{4}", "(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])$"].join(this.seperator)) });
758
+ }
759
+ allowed(symbol, state) {
760
+ const daysInMonth = this.daysInMonth(state.value);
761
+ return state.selection.start == 5 && state.value[4] == "0"
762
+ ? symbol >= "1" && symbol <= "9"
763
+ : state.selection.start == 5 && state.value[4] == "1"
764
+ ? symbol >= "0" && symbol <= "2"
765
+ : state.selection.start == 7 && state.value[6] == "0"
766
+ ? symbol >= "1" && symbol <= "9"
767
+ : state.selection.start == 7 && ((state.value[6] == "2" && daysInMonth < 30) || state.value[6] == "3")
768
+ ? symbol >= "0" && symbol <= daysInMonth.toString().substring(1)
769
+ : state.selection.start < 8 && symbol >= "0" && symbol <= "9";
770
+ }
771
+ }
772
+ Base_1.register("YYYY-mm-dd", () => new Handler("-"));
773
+ //# sourceMappingURL=ymd.js.map
774
+ });
775
+
776
+ const ymd$1 = /*@__PURE__*/getDefaultExportFromCjs(ymd);
777
+
778
+ var date = createCommonjsModule(function (module, exports) {
779
+ "use strict";
780
+ Object.defineProperty(exports, "__esModule", { value: true });
781
+
782
+
783
+
784
+ //# sourceMappingURL=index.js.map
785
+ });
786
+
787
+ const index$2 = /*@__PURE__*/getDefaultExportFromCjs(date);
788
+
789
+ var dateTime = createCommonjsModule(function (module, exports) {
790
+ "use strict";
791
+ Object.defineProperty(exports, "__esModule", { value: true });
792
+ exports.formatDate = void 0;
793
+
794
+
795
+ class Handler {
796
+ toString(data) {
797
+ return typeof data == "string" ? data : "";
798
+ }
799
+ fromString(value) {
800
+ let result = value.replace(" ", "T");
801
+ const fillerDate = "0000-01-01T00:00:00.000Z";
802
+ if (result === null || result === void 0 ? void 0 : result.match(/-\d$/))
803
+ result = result.substring(0, result.length - 1) + "0" + result.substring(result.length - 1, result.length);
804
+ result = !result.match(/^\d{4}-(0[1-9]|1[012])/)
805
+ ? undefined
806
+ : result + fillerDate.substring(result.length, fillerDate.length);
807
+ return dist$1.DateTime.is(result) ? result : undefined;
808
+ }
809
+ format(unformated) {
810
+ let result = formatDate(unformated);
811
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[\d:.-]$/))
812
+ result = result.insert(10, " ");
813
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 3$/))
814
+ result = result.replace(11, 12, "23:");
815
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) [45]$/))
816
+ result = result.insert(11, "23:");
817
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) [6-9]$/))
818
+ result = result.insert(11, "23:5");
819
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 24$/))
820
+ result = result.replace(10, 13, "00:");
821
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 25$/))
822
+ result = result.insert(12, "3:");
823
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 2[6-9]$/))
824
+ result = result.insert(12, "3:5").append(":");
825
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3])\d[\s\S]$/))
826
+ result = result.insert(13, ":");
827
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[6-9]$/))
828
+ result = result.insert(14, "5");
829
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[0-5]\d\d$/))
830
+ result = result.insert(16, ":");
831
+ if (result.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[0-5]\d:[6-9]$/))
832
+ result = result.insert(17, "5");
833
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 19], pattern: /^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3])(:[0-5]\d){2}$/ });
834
+ }
835
+ unformat(formated) {
836
+ return formated;
837
+ }
838
+ allowed(symbol, state) {
839
+ return (state.value.length < 19 &&
840
+ ((symbol >= "0" && symbol <= "9") || symbol == "-" || symbol == ":" || symbol == "." || symbol == " "));
841
+ }
842
+ }
843
+ base.add("date-time", () => new Handler());
844
+ function formatDate(unformated, format) {
845
+ let result = unformated;
846
+ switch (format) {
847
+ case "dd/mm/YYYY":
848
+ case "dd.mm.YYYY":
849
+ if (!validDate(result.value, format))
850
+ result = result.replace(0, 10, validDate("31" + result.value.substring(2, 10), format)
851
+ ? "31" + result.value.substring(2, 10)
852
+ : validDate("30" + result.value.substring(2, 10), format)
853
+ ? "30" + result.value.substring(2, 10)
854
+ : validDate("29" + result.value.substring(2, 10), format)
855
+ ? "29" + result.value.substring(2, 10)
856
+ : validDate("28" + result.value.substring(2, 10), format)
857
+ ? "28" + result.value.substring(2, 10)
858
+ : result.value);
859
+ break;
860
+ case "mm/dd/YYYY":
861
+ if (!validDate(result.value, format))
862
+ result = result.replace(0, 10, validDate(result.value.substring(0, 3) + "31" + result.value.substring(5, 10), format)
863
+ ? result.value.substring(0, 3) + "31" + result.value.substring(5, 10)
864
+ : validDate(result.value.substring(0, 3) + "30" + result.value.substring(5, 10), format)
865
+ ? result.value.substring(0, 3) + "30" + result.value.substring(5, 10)
866
+ : validDate(result.value.substring(0, 3) + "29" + result.value.substring(5, 10), format)
867
+ ? result.value.substring(0, 3) + "29" + result.value.substring(5, 10)
868
+ : validDate(result.value.substring(0, 3) + "28" + result.value.substring(5, 10), format)
869
+ ? result.value.substring(0, 3) + "28" + result.value.substring(5, 10)
870
+ : result.value);
871
+ break;
872
+ default:
873
+ if (unformated.value.length == 10) {
874
+ if (!validDate(result.value)) {
875
+ result = result.replace(0, 10, validDate(result.value.substring(0, 8) + "31")
876
+ ? result.value.substring(0, 8) + "31"
877
+ : validDate(result.value.substring(0, 8) + "30")
878
+ ? result.value.substring(0, 8) + "30"
879
+ : validDate(result.value.substring(0, 8) + "29")
880
+ ? result.value.substring(0, 8) + "29"
881
+ : validDate(result.value.substring(0, 8) + "28")
882
+ ? result.value.substring(0, 8) + "28"
883
+ : result.value);
884
+ break;
885
+ }
886
+ return unformated;
887
+ }
888
+ }
889
+ return result;
890
+ }
891
+ exports.formatDate = formatDate;
892
+ function validDate(date, format) {
893
+ let year;
894
+ let month;
895
+ let day;
896
+ switch (format) {
897
+ case "dd/mm/YYYY":
898
+ case "dd.mm.YYYY":
899
+ year = parseInt(date.substring(6, 10));
900
+ month = parseInt(date.substring(3, 5));
901
+ day = parseInt(date.substring(0, 2));
902
+ return year && month && day ? day > 0 && daysPerMonth(year, month) >= day : false;
903
+ case "mm/dd/YYYY":
904
+ year = parseInt(date.substring(6, 10));
905
+ month = parseInt(date.substring(0, 2));
906
+ day = parseInt(date.substring(3, 5));
907
+ return year && month && day ? day > 0 && daysPerMonth(year, month) >= day : false;
908
+ default:
909
+ year = parseInt(date.substring(0, 4));
910
+ month = parseInt(date.substring(5, 7));
911
+ day = parseInt(date.substring(8, 10));
912
+ return year && month && day ? day > 0 && daysPerMonth(year, month) >= day : false;
913
+ }
914
+ }
915
+ function daysPerMonth(year, month) {
916
+ let result;
917
+ switch (month) {
918
+ case 1:
919
+ case 3:
920
+ case 5:
921
+ case 7:
922
+ case 8:
923
+ case 10:
924
+ case 12:
925
+ default:
926
+ result = 31;
927
+ break;
928
+ case 4:
929
+ case 6:
930
+ case 9:
931
+ case 11:
932
+ result = 30;
933
+ break;
934
+ case 2:
935
+ result = 28;
936
+ break;
937
+ }
938
+ return result;
939
+ }
940
+ //# sourceMappingURL=date-time.js.map
941
+ });
942
+
943
+ const dateTime$1 = /*@__PURE__*/getDefaultExportFromCjs(dateTime);
944
+
945
+ var divisor = createCommonjsModule(function (module, exports) {
946
+ "use strict";
947
+ Object.defineProperty(exports, "__esModule", { value: true });
948
+
949
+ class Handler {
950
+ toString(data) {
951
+ return Array.isArray(data) && data.length == 2 && typeof data[0] == "number" && typeof data[1] == "number"
952
+ ? data[0].toString() + " / " + data[1].toString()
953
+ : typeof data == "number"
954
+ ? data.toString()
955
+ : "";
956
+ }
957
+ fromString(value) {
958
+ return typeof value == "string" && value.match(/^\d{1,2}\s+\/\s+\d{1,2}$/)
959
+ ? [Number.parseInt(value.slice(0, 2)), Number.parseInt(value.slice(value.length - 2))]
960
+ : typeof value == "string" && value.match(/\d{1,2}/)
961
+ ? Number.parseInt(value)
962
+ : undefined;
963
+ }
964
+ format(unformated) {
965
+ let result = unformated;
966
+ if (unformated.match(/^\d\/$/))
967
+ result = unformated.replace(1, 2, " / ");
968
+ else if (unformated.match(/^\d{1,2}\s$/))
969
+ result = unformated.replace(unformated.value.length - 1, unformated.value.length, " / ");
970
+ else if (unformated.match(/^[\D.]+\/[\D.]+$/))
971
+ result = unformated.delete(0, unformated.value.length);
972
+ else if (unformated.match(/^[\D.]+\/[\D.]+\d$/))
973
+ result = unformated.delete(0, unformated.value.length - 1);
974
+ else if (unformated.match(/^[\D.]+\/[\D.]+\d\d$/))
975
+ result = unformated.delete(0, unformated.value.length - 2);
976
+ else if (unformated.match(/^[\D.]+\//))
977
+ result = unformated.delete(0, unformated.value.search("/") + 1);
978
+ else if (unformated.match(/^\d\d\/$/))
979
+ result = unformated.replace(2, 3, " / ");
980
+ else if (unformated.match(/^\d\d\s+\/$/))
981
+ result = unformated.delete(2, unformated.value.length);
982
+ else if (unformated.match(/^\d\s+\/$/))
983
+ result = unformated.delete(1, unformated.value.length);
984
+ else if (unformated.match(/^\d\d\s\s+\/\s*$/))
985
+ result = unformated.replace(2, unformated.value.length, " / ");
986
+ else if (unformated.match(/^\d\s\s+(\/\s*)?$/))
987
+ result = unformated.replace(1, unformated.value.length, " / ");
988
+ else if (unformated.match(/^\d\s\/\s\d\d.+$/))
989
+ result = unformated.delete(6, unformated.value.length);
990
+ else if (unformated.value.length > 1 && unformated.value.indexOf("/") < 1)
991
+ result = unformated.insert(2, " / ");
992
+ else if (unformated.value.length > 1 && unformated.value.split("/").length > 2)
993
+ result = unformated.delete(unformated.value.lastIndexOf("/"));
994
+ else if (unformated.value.length == 1 && !unformated.isDigit(0))
995
+ result = unformated.delete(0);
996
+ return Object.assign(Object.assign({}, result), { type: "text", length: [1, 7], pattern: /^(\d{1,2}|\d{1,2} \/ \d{1,2})$/ });
997
+ }
998
+ unformat(formated) {
999
+ return formated;
1000
+ }
1001
+ allowed(symbol, state) {
1002
+ return state.value.length < 7 && ((symbol >= "0" && symbol <= "9") || symbol == "/" || symbol == " ");
1003
+ }
1004
+ }
1005
+ base.add("divisor", () => new Handler());
1006
+ //# sourceMappingURL=divisor.js.map
1007
+ });
1008
+
1009
+ const divisor$1 = /*@__PURE__*/getDefaultExportFromCjs(divisor);
1010
+
1011
+ var identityNumber = createCommonjsModule(function (module, exports) {
1012
+ "use strict";
1013
+ Object.defineProperty(exports, "__esModule", { value: true });
1014
+
1015
+ class Handler {
1016
+ constructor(country) {
1017
+ this.country = country;
1018
+ }
1019
+ toString(data) {
1020
+ return typeof data == "string" ? data : "";
1021
+ }
1022
+ fromString(value) {
1023
+ return typeof value == "string" ? value : undefined;
1024
+ }
1025
+ format(unformated) {
1026
+ let result = unformated;
1027
+ const year = new Date().getFullYear().toString();
1028
+ if (unformated.value.length > 1 && unformated.get(0, 2) != "19" && unformated.get(0, 2) != "20")
1029
+ result = result.prepend(unformated.get(0, 2) > year.substr(2, 2) ? "19" : "20");
1030
+ if (result.value.length >= 8)
1031
+ result = result.insert(8, "-");
1032
+ return Object.assign(Object.assign({}, result.truncate(13)), { type: "text", length: [11, 13], pattern: /^\d{6,8}-\d{4}$/ });
1033
+ }
1034
+ unformat(formated) {
1035
+ return formated.delete("-");
1036
+ }
1037
+ allowed(symbol, state) {
1038
+ return state.value.length < 13 && symbol >= "0" && symbol <= "9";
1039
+ }
1040
+ }
1041
+ base.add("identity-number", (argument) => new Handler(argument && argument.length > 0 ? argument[0] : undefined));
1042
+ //# sourceMappingURL=identity-number.js.map
1043
+ });
1044
+
1045
+ const identityNumber$1 = /*@__PURE__*/getDefaultExportFromCjs(identityNumber);
1046
+
1047
+ var password = createCommonjsModule(function (module, exports) {
1048
+ "use strict";
1049
+ Object.defineProperty(exports, "__esModule", { value: true });
1050
+
1051
+ class Handler {
1052
+ toString(data) {
1053
+ return typeof data == "string" ? data : "";
1054
+ }
1055
+ fromString(value) {
1056
+ return typeof value == "string" ? value : undefined;
1057
+ }
1058
+ format(unformated) {
1059
+ return Object.assign(Object.assign({}, unformated), { type: "password", autocomplete: "current-password" });
1060
+ }
1061
+ unformat(formated) {
1062
+ return formated;
1063
+ }
1064
+ allowed(symbol, state) {
1065
+ return true;
1066
+ }
1067
+ }
1068
+ base.add("password", () => new Handler());
1069
+ //# sourceMappingURL=password.js.map
1070
+ });
1071
+
1072
+ const password$1 = /*@__PURE__*/getDefaultExportFromCjs(password);
1073
+
1074
+ var percent = createCommonjsModule(function (module, exports) {
1075
+ "use strict";
1076
+ Object.defineProperty(exports, "__esModule", { value: true });
1077
+
1078
+ class Handler {
1079
+ toString(data) {
1080
+ return data && typeof data == "number" ? (data * 100).toString() : "";
1081
+ }
1082
+ fromString(value) {
1083
+ return typeof value != "string" || !Number.parseFloat(value) ? undefined : Number.parseFloat(value) / 100;
1084
+ }
1085
+ format(unformated) {
1086
+ return Object.assign(Object.assign({}, (unformated.value ? unformated.suffix(" %") : unformated)), { type: "text", length: [3, undefined], pattern: /^\d+(.\d)? %+$/ });
1087
+ }
1088
+ unformat(formated) {
1089
+ return formated.delete(" %");
1090
+ }
1091
+ allowed(symbol, state) {
1092
+ return (symbol >= "0" && symbol <= "9") || (symbol == "." && !state.value.includes("."));
1093
+ }
1094
+ }
1095
+ base.add("percent", () => new Handler());
1096
+ //# sourceMappingURL=percent.js.map
1097
+ });
1098
+
1099
+ const percent$1 = /*@__PURE__*/getDefaultExportFromCjs(percent);
1100
+
1101
+ var phonePrefix = createCommonjsModule(function (module, exports) {
1102
+ "use strict";
1103
+ Object.defineProperty(exports, "__esModule", { value: true });
1104
+ exports.phonePrefix = void 0;
1105
+ exports.phonePrefix = [
1106
+ {
1107
+ countryCode: "+46",
1108
+ areaCodes: [
1109
+ "011",
1110
+ "0120",
1111
+ "0121",
1112
+ "0122",
1113
+ "0123",
1114
+ "0125",
1115
+ "013",
1116
+ "0140",
1117
+ "0141",
1118
+ "0142",
1119
+ "0143",
1120
+ "0144",
1121
+ "0150",
1122
+ "0151",
1123
+ "0152",
1124
+ "0155",
1125
+ "0156",
1126
+ "0157",
1127
+ "0158",
1128
+ "0159",
1129
+ "016",
1130
+ "0171",
1131
+ "0173",
1132
+ "0174",
1133
+ "0175",
1134
+ "0176",
1135
+ "018",
1136
+ "019",
1137
+ "021",
1138
+ "0220",
1139
+ "0221",
1140
+ "0222",
1141
+ "0223",
1142
+ "0224",
1143
+ "0225",
1144
+ "0226",
1145
+ "0227",
1146
+ "023",
1147
+ "0240",
1148
+ "0241",
1149
+ "0243",
1150
+ "0246",
1151
+ "0247",
1152
+ "0248",
1153
+ "0250",
1154
+ "0251",
1155
+ "0253",
1156
+ "0258",
1157
+ "026",
1158
+ "0270",
1159
+ "0271",
1160
+ "0278",
1161
+ "0280",
1162
+ "0281",
1163
+ "0290",
1164
+ "0291",
1165
+ "0292",
1166
+ "0293",
1167
+ "0294",
1168
+ "0295",
1169
+ "0297",
1170
+ "0300",
1171
+ "0301",
1172
+ "0302",
1173
+ "0303",
1174
+ "0304",
1175
+ "031",
1176
+ "0320",
1177
+ "0321",
1178
+ "0322",
1179
+ "0325",
1180
+ "033",
1181
+ "0340",
1182
+ "0345",
1183
+ "0346",
1184
+ "035",
1185
+ "036",
1186
+ "0370",
1187
+ "0371",
1188
+ "0372",
1189
+ "0380",
1190
+ "0381",
1191
+ "0382",
1192
+ "0383",
1193
+ "0390",
1194
+ "0392",
1195
+ "0393",
1196
+ "040",
1197
+ "0410",
1198
+ "0411",
1199
+ "0413",
1200
+ "0414",
1201
+ "0415",
1202
+ "0416",
1203
+ "0417",
1204
+ "0418",
1205
+ "042",
1206
+ "0430",
1207
+ "0431",
1208
+ "0433",
1209
+ "0435",
1210
+ "044",
1211
+ "0451",
1212
+ "0454",
1213
+ "0455",
1214
+ "0456",
1215
+ "0457",
1216
+ "0459",
1217
+ "046",
1218
+ "0470",
1219
+ "0471",
1220
+ "0472",
1221
+ "0474",
1222
+ "0476",
1223
+ "0477",
1224
+ "0478",
1225
+ "0479",
1226
+ "0480",
1227
+ "0481",
1228
+ "0485",
1229
+ "0486",
1230
+ "0490",
1231
+ "0491",
1232
+ "0492",
1233
+ "0493",
1234
+ "0494",
1235
+ "0495",
1236
+ "0496",
1237
+ "0498",
1238
+ "0499",
1239
+ "0500",
1240
+ "0501",
1241
+ "0502",
1242
+ "0503",
1243
+ "0504",
1244
+ "0505",
1245
+ "0506",
1246
+ "0510",
1247
+ "0511",
1248
+ "0512",
1249
+ "0513",
1250
+ "0514",
1251
+ "0515",
1252
+ "0520",
1253
+ "0521",
1254
+ "0522",
1255
+ "0523",
1256
+ "0524",
1257
+ "0525",
1258
+ "0526",
1259
+ "0528",
1260
+ "0530",
1261
+ "0531",
1262
+ "0532",
1263
+ "0533",
1264
+ "0534",
1265
+ "054",
1266
+ "0550",
1267
+ "0551",
1268
+ "0552",
1269
+ "0553",
1270
+ "0554",
1271
+ "0555",
1272
+ "0560",
1273
+ "0563",
1274
+ "0564",
1275
+ "0565",
1276
+ "0570",
1277
+ "0571",
1278
+ "0573",
1279
+ "0580",
1280
+ "0581",
1281
+ "0582",
1282
+ "0583",
1283
+ "0584",
1284
+ "0585",
1285
+ "0586",
1286
+ "0587",
1287
+ "0589",
1288
+ "0590",
1289
+ "0591",
1290
+ "060",
1291
+ "0611",
1292
+ "0612",
1293
+ "0613",
1294
+ "0620",
1295
+ "0621",
1296
+ "0622",
1297
+ "0623",
1298
+ "0624",
1299
+ "063",
1300
+ "0640",
1301
+ "0642",
1302
+ "0643",
1303
+ "0644",
1304
+ "0645",
1305
+ "0647",
1306
+ "0650",
1307
+ "0651",
1308
+ "0652",
1309
+ "0653",
1310
+ "0657",
1311
+ "0660",
1312
+ "0661",
1313
+ "0662",
1314
+ "0663",
1315
+ "0670",
1316
+ "0671",
1317
+ "0672",
1318
+ "0680",
1319
+ "0682",
1320
+ "0684",
1321
+ "0687",
1322
+ "0690",
1323
+ "0691",
1324
+ "0692",
1325
+ "0693",
1326
+ "0695",
1327
+ "0696",
1328
+ "08",
1329
+ "090",
1330
+ "0910",
1331
+ "0911",
1332
+ "0912",
1333
+ "0913",
1334
+ "0914",
1335
+ "0915",
1336
+ "0916",
1337
+ "0918",
1338
+ "0920",
1339
+ "0921",
1340
+ "0922",
1341
+ "0923",
1342
+ "0924",
1343
+ "0925",
1344
+ "0926",
1345
+ "0927",
1346
+ "0928",
1347
+ "0929",
1348
+ "0930",
1349
+ "0932",
1350
+ "0933",
1351
+ "0934",
1352
+ "0935",
1353
+ "0940",
1354
+ "0941",
1355
+ "0942",
1356
+ "0943",
1357
+ "0950",
1358
+ "0951",
1359
+ "0952",
1360
+ "0953",
1361
+ "0954",
1362
+ "0960",
1363
+ "0961",
1364
+ "0970",
1365
+ "0971",
1366
+ "0973",
1367
+ "0975",
1368
+ "0976",
1369
+ "0977",
1370
+ "0978",
1371
+ "0980",
1372
+ "0981",
1373
+ "010",
1374
+ "020",
1375
+ "0378",
1376
+ "070",
1377
+ "072",
1378
+ "073",
1379
+ "076",
1380
+ "079",
1381
+ "0710",
1382
+ "0740",
1383
+ "0746",
1384
+ "0749",
1385
+ "0741",
1386
+ "0742",
1387
+ "0743",
1388
+ "0744",
1389
+ "0745",
1390
+ "0747",
1391
+ "075",
1392
+ "077",
1393
+ "078",
1394
+ "0900",
1395
+ "0939",
1396
+ "0944",
1397
+ "0969",
1398
+ "099",
1399
+ ],
1400
+ },
1401
+ ];
1402
+ //# sourceMappingURL=phonePrefix.js.map
1403
+ });
1404
+
1405
+ const phonePrefix$1 = /*@__PURE__*/getDefaultExportFromCjs(phonePrefix);
1406
+
1407
+ var phone = createCommonjsModule(function (module, exports) {
1408
+ "use strict";
1409
+ Object.defineProperty(exports, "__esModule", { value: true });
1410
+
1411
+
1412
+ class Handler {
1413
+ toString(data) {
1414
+ return typeof data == "string" ? data : "";
1415
+ }
1416
+ fromString(value) {
1417
+ return typeof value == "string" ? value : undefined;
1418
+ }
1419
+ format(unformated) {
1420
+ let result = unformated;
1421
+ if (result.value.startsWith("+")) {
1422
+ for (const country of phonePrefix.phonePrefix)
1423
+ if (result.value.startsWith(country.countryCode))
1424
+ for (let prefix of country.areaCodes) {
1425
+ prefix = prefix.substring(1);
1426
+ if (result.value.startsWith(country.countryCode + prefix) && !result.value.includes("-"))
1427
+ result = result
1428
+ .insert(country.countryCode.length, "-")
1429
+ .insert(country.countryCode.length + 1 + prefix.length, "-");
1430
+ }
1431
+ }
1432
+ else {
1433
+ const first = phonePrefix.phonePrefix[0];
1434
+ for (const prefix of first.areaCodes)
1435
+ if (result.value.startsWith(prefix) && !result.value.includes("-")) {
1436
+ result = result.insert(prefix.length, "-");
1437
+ result = result.delete(0);
1438
+ result = result.insert(0, "-").insert(0, first.countryCode);
1439
+ }
1440
+ }
1441
+ if (result.value.includes("-")) {
1442
+ const digitIndex = result.value.indexOf("-", result.value.indexOf("-") + 1) + 1;
1443
+ const digitCount = result.value.substring(digitIndex, result.value.length + 1).length;
1444
+ switch (digitCount) {
1445
+ case 4:
1446
+ result = result.insert(digitIndex + 2, " ");
1447
+ break;
1448
+ case 5:
1449
+ result = result.insert(digitIndex + 3, " ");
1450
+ break;
1451
+ case 6:
1452
+ result = result.insert(digitIndex + 2, " ");
1453
+ result = result.insert(digitIndex + 5, " ");
1454
+ break;
1455
+ case 7:
1456
+ result = result.insert(digitIndex + 3, " ");
1457
+ result = result.insert(digitIndex + 6, " ");
1458
+ break;
1459
+ case 8:
1460
+ case 9:
1461
+ result = result.insert(digitIndex + 3, " ");
1462
+ result = result.insert(digitIndex + 7, " ");
1463
+ break;
1464
+ default:
1465
+ break;
1466
+ }
1467
+ if (digitCount > 9) {
1468
+ const spaces = Math.ceil(digitCount / 3) - 1;
1469
+ if (spaces > 0) {
1470
+ for (let i = 0; i < spaces; i++) {
1471
+ const position = i * 3 + 3 + i;
1472
+ result = result.insert(position + digitIndex, " ");
1473
+ }
1474
+ }
1475
+ }
1476
+ }
1477
+ return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "tel" });
1478
+ }
1479
+ unformat(formated) {
1480
+ return formated.delete(" ").delete("-");
1481
+ }
1482
+ allowed(symbol, state) {
1483
+ return ((symbol >= "0" && symbol <= "9") || (state.selection.start == 0 && symbol == "+" && !state.value.includes("+")));
1484
+ }
1485
+ }
1486
+ base.add("phone", () => new Handler());
1487
+ //# sourceMappingURL=phone.js.map
1488
+ });
1489
+
1490
+ const phone$1 = /*@__PURE__*/getDefaultExportFromCjs(phone);
1491
+
1492
+ var postalCode = createCommonjsModule(function (module, exports) {
1493
+ "use strict";
1494
+ Object.defineProperty(exports, "__esModule", { value: true });
1495
+
1496
+ class Handler {
1497
+ constructor(country) {
1498
+ this.country = country;
1499
+ }
1500
+ toString(data) {
1501
+ return typeof data == "string" ? data : "";
1502
+ }
1503
+ fromString(value) {
1504
+ return typeof value == "string" ? value : undefined;
1505
+ }
1506
+ format(unformated) {
1507
+ const result = !unformated.value.includes(" ") && unformated.value.length >= 4 ? unformated.insert(3, " ") : unformated;
1508
+ return Object.assign(Object.assign({}, result.truncate(6)), { type: "text", autocomplete: "postal-code", length: [6, 6], pattern: /^\d{3} \d{2}$/ });
1509
+ }
1510
+ unformat(formated) {
1511
+ return formated.delete(" ");
1512
+ }
1513
+ allowed(symbol, state) {
1514
+ return state.value.length <= 5 && symbol >= "0" && symbol <= "9";
1515
+ }
1516
+ }
1517
+ base.add("postal-code", (argument) => new Handler(argument && argument.length > 0 ? argument[0] : undefined));
1518
+ //# sourceMappingURL=postal-code.js.map
1519
+ });
1520
+
1521
+ const postalCode$1 = /*@__PURE__*/getDefaultExportFromCjs(postalCode);
1522
+
1523
+ var price = createCommonjsModule(function (module, exports) {
1524
+ "use strict";
1525
+ Object.defineProperty(exports, "__esModule", { value: true });
1526
+
1527
+
1528
+
1529
+ class Handler {
1530
+ constructor(currency) {
1531
+ this.currency = currency;
1532
+ }
1533
+ toString(data) {
1534
+ return typeof data == "number" ? (isNaN(data) ? "" : data.toString()) : "";
1535
+ }
1536
+ fromString(value) {
1537
+ const result = typeof value == "string" ? Number.parseFloat(value) : undefined;
1538
+ return result && !isNaN(result) ? result : undefined;
1539
+ }
1540
+ format(unformated) {
1541
+ var _a;
1542
+ let separator = unformated.value && unformated.value.includes(".") ? unformated.value.indexOf(".") : undefined;
1543
+ let result = unformated.value == "NaN" ? unformated.replace(0, unformated.value.length, "") : StateEditor_1.StateEditor.copy(unformated);
1544
+ if (separator == 0) {
1545
+ result = result.prepend("0");
1546
+ separator++;
1547
+ }
1548
+ if (separator != undefined) {
1549
+ const adjust = separator +
1550
+ 1 +
1551
+ (!this.currency || dist$1.Currency.decimalDigits(this.currency) == undefined
1552
+ ? 2
1553
+ : (_a = dist$1.Currency.decimalDigits(this.currency)) !== null && _a !== void 0 ? _a : 2) -
1554
+ result.value.length;
1555
+ result = adjust < 0 ? result.truncate(result.value.length + adjust) : result.suffix("0".repeat(adjust));
1556
+ }
1557
+ else
1558
+ separator = result.value.length;
1559
+ const spaces = separator <= 0 ? 0 : Math.ceil(separator / 3) - 1;
1560
+ for (let i = 0; i < spaces; i++) {
1561
+ const position = separator - (spaces - i) * 3;
1562
+ result = result.insert(position, " ");
1563
+ separator++;
1564
+ }
1565
+ if (result.match(/^[0\s]{2,}$/))
1566
+ result = result.replace(0, result.value.length, "0");
1567
+ else if (result.match(/^[0\s]{2,}(\s\w{3}){1}$/))
1568
+ result = result.replace(0, result.value.length - 4, "0");
1569
+ result =
1570
+ this.currency && (result.value.length > 1 || (result.value.length == 1 && result.value.charAt(0) != "."))
1571
+ ? result.suffix(" " + this.currency)
1572
+ : result;
1573
+ return Object.assign(Object.assign({}, result), { type: "text", length: [3, undefined], pattern: new RegExp("^(\\d{0,3})( \\d{3})*(\\.\\d+)?" + (this.currency ? " " + this.currency : "") + "$") });
1574
+ }
1575
+ unformat(formated) {
1576
+ return this.currency ? formated.delete(" ").delete("" + this.currency) : formated.delete(" ");
1577
+ }
1578
+ allowed(symbol, state) {
1579
+ return (symbol >= "0" && symbol <= "9") || (symbol == "." && !state.value.includes("."));
1580
+ }
1581
+ }
1582
+ base.add("price", (argument) => new Handler(argument && argument.length > 0 ? argument[0] : undefined));
1583
+ //# sourceMappingURL=price.js.map
1584
+ });
1585
+
1586
+ const price$1 = /*@__PURE__*/getDefaultExportFromCjs(price);
1587
+
1588
+ var text = createCommonjsModule(function (module, exports) {
1589
+ "use strict";
1590
+ Object.defineProperty(exports, "__esModule", { value: true });
1591
+
1592
+ class Handler {
1593
+ constructor(settings) {
1594
+ this.settings = settings;
1595
+ }
1596
+ toString(data) {
1597
+ return typeof data == "string" ? data : "";
1598
+ }
1599
+ fromString(value) {
1600
+ return typeof value == "string" ? value : undefined;
1601
+ }
1602
+ format(unformated) {
1603
+ return Object.assign(Object.assign(Object.assign({}, unformated), { type: "text" }), this.settings);
1604
+ }
1605
+ unformat(formated) {
1606
+ return formated;
1607
+ }
1608
+ allowed(symbol, state) {
1609
+ return (this.settings.length == undefined ||
1610
+ this.settings.length[1] == undefined ||
1611
+ state.value.length < this.settings.length[1]);
1612
+ }
1613
+ }
1614
+ base.add("text", (settings) => new Handler(settings || {}));
1615
+ base.add("email", (settings) => new Handler(settings || {}));
1616
+ //# sourceMappingURL=text.js.map
1617
+ });
1618
+
1619
+ const text$1 = /*@__PURE__*/getDefaultExportFromCjs(text);
1620
+
1621
+ var Handler = createCommonjsModule(function (module, exports) {
1622
+ "use strict";
1623
+ Object.defineProperty(exports, "__esModule", { value: true });
1624
+ exports.parse = exports.format = exports.get = void 0;
1625
+
1626
+
1627
+
1628
+
1629
+
1630
+
1631
+
1632
+
1633
+
1634
+
1635
+
1636
+
1637
+
1638
+
1639
+ Object.defineProperty(exports, "format", { enumerable: true, get: function () { return base.format; } });
1640
+ Object.defineProperty(exports, "get", { enumerable: true, get: function () { return base.get; } });
1641
+ Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return base.parse; } });
1642
+ //# sourceMappingURL=index.js.map
1643
+ });
1644
+
1645
+ const index$1 = /*@__PURE__*/getDefaultExportFromCjs(Handler);
1646
+
1647
+ var dist = createCommonjsModule(function (module, exports) {
1648
+ "use strict";
1649
+ Object.defineProperty(exports, "__esModule", { value: true });
1650
+ exports.parse = exports.format = exports.get = exports.StateEditor = exports.State = exports.Selection = exports.Action = void 0;
1651
+
1652
+ Object.defineProperty(exports, "Action", { enumerable: true, get: function () { return Action_1.Action; } });
1653
+
1654
+ Object.defineProperty(exports, "format", { enumerable: true, get: function () { return Handler.format; } });
1655
+ Object.defineProperty(exports, "get", { enumerable: true, get: function () { return Handler.get; } });
1656
+ Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return Handler.parse; } });
1657
+
1658
+ Object.defineProperty(exports, "Selection", { enumerable: true, get: function () { return Selection_1.Selection; } });
1659
+
1660
+ Object.defineProperty(exports, "State", { enumerable: true, get: function () { return State_1.State; } });
1661
+
1662
+ Object.defineProperty(exports, "StateEditor", { enumerable: true, get: function () { return StateEditor_1.StateEditor; } });
1663
+ //# sourceMappingURL=index.js.map
1664
+ });
1665
+
1666
+ const index = /*@__PURE__*/getDefaultExportFromCjs(dist);
1667
+
1668
+ export { dist as d };