formtastic-jquery_inputmask 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/.bowerrc +3 -0
  3. data/bower.json +19 -0
  4. data/lib/formtastic/jquery_inputmask/engine.rb +1 -1
  5. data/lib/formtastic/jquery_inputmask/version.rb +1 -1
  6. data/vendor/inputmask/.bower.json +59 -0
  7. data/vendor/inputmask/bower.json +40 -0
  8. data/vendor/inputmask/dist/inputmask/bindings/inputmask.binding.js +21 -0
  9. data/vendor/inputmask/dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js +62 -0
  10. data/vendor/inputmask/dist/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.js +13 -0
  11. data/vendor/inputmask/dist/inputmask/dependencyLibs/inputmask.dependencyLib.js +133 -0
  12. data/vendor/inputmask/dist/inputmask/global/document.js +11 -0
  13. data/vendor/inputmask/dist/inputmask/global/window.js +11 -0
  14. data/vendor/inputmask/dist/inputmask/inputmask.date.extensions.js +490 -0
  15. data/vendor/inputmask/dist/inputmask/inputmask.extensions.js +97 -0
  16. data/vendor/inputmask/dist/inputmask/inputmask.js +1643 -0
  17. data/vendor/inputmask/dist/inputmask/inputmask.numeric.extensions.js +347 -0
  18. data/vendor/inputmask/dist/inputmask/inputmask.phone.extensions.js +61 -0
  19. data/vendor/inputmask/dist/inputmask/inputmask.regex.extensions.js +115 -0
  20. data/vendor/inputmask/dist/inputmask/jquery.inputmask.js +62 -0
  21. data/vendor/inputmask/dist/inputmask/phone-codes/phone-be.js +244 -0
  22. data/vendor/inputmask/dist/inputmask/phone-codes/phone-nl.js +924 -0
  23. data/vendor/inputmask/dist/inputmask/phone-codes/phone-ru.js +19240 -0
  24. data/vendor/inputmask/dist/inputmask/phone-codes/phone-uk.js +1009 -0
  25. data/vendor/inputmask/dist/inputmask/phone-codes/phone.js +2111 -0
  26. data/vendor/inputmask/dist/jquery.inputmask.bundle.js +3085 -0
  27. data/vendor/inputmask/dist/min/inputmask/inputmask.date.extensions.min.js +9 -0
  28. data/vendor/inputmask/dist/min/inputmask/inputmask.extensions.min.js +9 -0
  29. data/vendor/inputmask/dist/min/inputmask/inputmask.min.js +10 -0
  30. data/vendor/inputmask/dist/min/inputmask/inputmask.numeric.extensions.min.js +9 -0
  31. data/vendor/inputmask/dist/min/inputmask/inputmask.phone.extensions.min.js +9 -0
  32. data/vendor/inputmask/dist/min/inputmask/inputmask.regex.extensions.min.js +9 -0
  33. data/vendor/inputmask/dist/min/inputmask/jquery.inputmask.min.js +9 -0
  34. data/vendor/inputmask/dist/min/jquery.inputmask.bundle.min.js +11 -0
  35. data/vendor/jquery/.bower.json +25 -0
  36. data/vendor/jquery/AUTHORS.txt +301 -0
  37. data/vendor/jquery/LICENSE.txt +36 -0
  38. data/vendor/jquery/README.md +67 -0
  39. data/vendor/jquery/bower.json +14 -0
  40. data/vendor/jquery/dist/core.js +476 -0
  41. data/vendor/jquery/dist/jquery.js +10253 -0
  42. data/vendor/jquery/dist/jquery.min.js +4 -0
  43. data/vendor/jquery/dist/jquery.min.map +1 -0
  44. data/vendor/jquery/dist/jquery.slim.js +8160 -0
  45. data/vendor/jquery/dist/jquery.slim.min.js +4 -0
  46. data/vendor/jquery/dist/jquery.slim.min.map +1 -0
  47. data/vendor/jquery/external/sizzle/LICENSE.txt +36 -0
  48. data/vendor/jquery/external/sizzle/dist/sizzle.js +2272 -0
  49. data/vendor/jquery/external/sizzle/dist/sizzle.min.js +3 -0
  50. data/vendor/jquery/external/sizzle/dist/sizzle.min.map +1 -0
  51. data/vendor/jquery/src/.eslintrc.json +5 -0
  52. data/vendor/jquery/src/ajax.js +855 -0
  53. data/vendor/jquery/src/ajax/jsonp.js +102 -0
  54. data/vendor/jquery/src/ajax/load.js +76 -0
  55. data/vendor/jquery/src/ajax/parseXML.js +30 -0
  56. data/vendor/jquery/src/ajax/script.js +77 -0
  57. data/vendor/jquery/src/ajax/var/location.js +5 -0
  58. data/vendor/jquery/src/ajax/var/nonce.js +7 -0
  59. data/vendor/jquery/src/ajax/var/rquery.js +5 -0
  60. data/vendor/jquery/src/ajax/xhr.js +169 -0
  61. data/vendor/jquery/src/attributes.js +13 -0
  62. data/vendor/jquery/src/attributes/attr.js +141 -0
  63. data/vendor/jquery/src/attributes/classes.js +174 -0
  64. data/vendor/jquery/src/attributes/prop.js +143 -0
  65. data/vendor/jquery/src/attributes/support.js +33 -0
  66. data/vendor/jquery/src/attributes/val.js +190 -0
  67. data/vendor/jquery/src/callbacks.js +234 -0
  68. data/vendor/jquery/src/core.js +476 -0
  69. data/vendor/jquery/src/core/DOMEval.js +16 -0
  70. data/vendor/jquery/src/core/access.js +70 -0
  71. data/vendor/jquery/src/core/init.js +128 -0
  72. data/vendor/jquery/src/core/nodeName.js +13 -0
  73. data/vendor/jquery/src/core/parseHTML.js +65 -0
  74. data/vendor/jquery/src/core/ready-no-deferred.js +96 -0
  75. data/vendor/jquery/src/core/ready.js +86 -0
  76. data/vendor/jquery/src/core/readyException.js +13 -0
  77. data/vendor/jquery/src/core/stripAndCollapse.js +14 -0
  78. data/vendor/jquery/src/core/support.js +20 -0
  79. data/vendor/jquery/src/core/var/rsingleTag.js +6 -0
  80. data/vendor/jquery/src/css.js +438 -0
  81. data/vendor/jquery/src/css/addGetHookIf.js +26 -0
  82. data/vendor/jquery/src/css/adjustCSS.js +71 -0
  83. data/vendor/jquery/src/css/curCSS.js +65 -0
  84. data/vendor/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  85. data/vendor/jquery/src/css/showHide.js +105 -0
  86. data/vendor/jquery/src/css/support.js +89 -0
  87. data/vendor/jquery/src/css/var/cssExpand.js +5 -0
  88. data/vendor/jquery/src/css/var/getStyles.js +17 -0
  89. data/vendor/jquery/src/css/var/isHiddenWithinTree.js +34 -0
  90. data/vendor/jquery/src/css/var/rmargin.js +5 -0
  91. data/vendor/jquery/src/css/var/rnumnonpx.js +7 -0
  92. data/vendor/jquery/src/css/var/swap.js +26 -0
  93. data/vendor/jquery/src/data.js +179 -0
  94. data/vendor/jquery/src/data/Data.js +161 -0
  95. data/vendor/jquery/src/data/var/acceptData.js +19 -0
  96. data/vendor/jquery/src/data/var/dataPriv.js +7 -0
  97. data/vendor/jquery/src/data/var/dataUser.js +7 -0
  98. data/vendor/jquery/src/deferred.js +391 -0
  99. data/vendor/jquery/src/deferred/exceptionHook.js +21 -0
  100. data/vendor/jquery/src/deprecated.js +40 -0
  101. data/vendor/jquery/src/dimensions.js +56 -0
  102. data/vendor/jquery/src/effects.js +699 -0
  103. data/vendor/jquery/src/effects/Tween.js +123 -0
  104. data/vendor/jquery/src/effects/animatedSelector.js +15 -0
  105. data/vendor/jquery/src/event.js +746 -0
  106. data/vendor/jquery/src/event/ajax.js +22 -0
  107. data/vendor/jquery/src/event/alias.js +29 -0
  108. data/vendor/jquery/src/event/focusin.js +55 -0
  109. data/vendor/jquery/src/event/support.js +11 -0
  110. data/vendor/jquery/src/event/trigger.js +185 -0
  111. data/vendor/jquery/src/exports/amd.js +26 -0
  112. data/vendor/jquery/src/exports/global.js +34 -0
  113. data/vendor/jquery/src/jquery.js +41 -0
  114. data/vendor/jquery/src/manipulation.js +488 -0
  115. data/vendor/jquery/src/manipulation/_evalUrl.js +23 -0
  116. data/vendor/jquery/src/manipulation/buildFragment.js +104 -0
  117. data/vendor/jquery/src/manipulation/getAll.js +32 -0
  118. data/vendor/jquery/src/manipulation/setGlobalEval.js +22 -0
  119. data/vendor/jquery/src/manipulation/support.js +35 -0
  120. data/vendor/jquery/src/manipulation/var/rcheckableType.js +5 -0
  121. data/vendor/jquery/src/manipulation/var/rscriptType.js +5 -0
  122. data/vendor/jquery/src/manipulation/var/rtagName.js +5 -0
  123. data/vendor/jquery/src/manipulation/wrapMap.js +29 -0
  124. data/vendor/jquery/src/offset.js +229 -0
  125. data/vendor/jquery/src/queue.js +145 -0
  126. data/vendor/jquery/src/queue/delay.js +24 -0
  127. data/vendor/jquery/src/selector-native.js +237 -0
  128. data/vendor/jquery/src/selector-sizzle.js +19 -0
  129. data/vendor/jquery/src/selector.js +3 -0
  130. data/vendor/jquery/src/serialize.js +130 -0
  131. data/vendor/jquery/src/traversing.js +191 -0
  132. data/vendor/jquery/src/traversing/findFilter.js +106 -0
  133. data/vendor/jquery/src/traversing/var/dir.js +22 -0
  134. data/vendor/jquery/src/traversing/var/rneedsContext.js +8 -0
  135. data/vendor/jquery/src/traversing/var/siblings.js +17 -0
  136. data/vendor/jquery/src/var/ObjectFunctionString.js +7 -0
  137. data/vendor/jquery/src/var/arr.js +5 -0
  138. data/vendor/jquery/src/var/class2type.js +6 -0
  139. data/vendor/jquery/src/var/concat.js +7 -0
  140. data/vendor/jquery/src/var/document.js +5 -0
  141. data/vendor/jquery/src/var/documentElement.js +7 -0
  142. data/vendor/jquery/src/var/fnToString.js +7 -0
  143. data/vendor/jquery/src/var/getProto.js +5 -0
  144. data/vendor/jquery/src/var/hasOwn.js +7 -0
  145. data/vendor/jquery/src/var/indexOf.js +7 -0
  146. data/vendor/jquery/src/var/pnum.js +5 -0
  147. data/vendor/jquery/src/var/push.js +7 -0
  148. data/vendor/jquery/src/var/rcssNum.js +9 -0
  149. data/vendor/jquery/src/var/rnothtmlwhite.js +8 -0
  150. data/vendor/jquery/src/var/slice.js +7 -0
  151. data/vendor/jquery/src/var/support.js +6 -0
  152. data/vendor/jquery/src/var/toString.js +7 -0
  153. data/vendor/jquery/src/wrap.js +77 -0
  154. metadata +152 -3
  155. data/.gitmodules +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d7868a51903c885712e82e3a8081507b3c3e6a2
4
- data.tar.gz: 775a6a09d83fb2a2e7332d8e2e067f44bd0f61a8
3
+ metadata.gz: 329e645b3729b701b8a519ce148f14db9622a0f9
4
+ data.tar.gz: 90d18391cd9e4ca845778c3d15b01c7c98f869d4
5
5
  SHA512:
6
- metadata.gz: ca65180e35b7f2c8f1fbf8fc914a480bf6387889459d99323b7462736782dae0a5b5fa105da41a98606a74dd4fe9ceb200d9bf6d6fd4f15820f6adc1ecbfaba2
7
- data.tar.gz: 2a0572b2178db13985c9715c0a9a6047dc087d7a121637af15383c97c3432e8e4f4dd4f9ac461faa2b4f7912786fec40b1040cf0aeea51c6a6134762243fdba7
6
+ metadata.gz: 98dbd6009f9790ea1f0df083a921f83675521637e2e88d1cbc9e7d8eaf3b85c87783c6d7ea3cde05794268aa97a656b8c934fc78ae95d35b3222e894751f30c4
7
+ data.tar.gz: a9a635b47a3a9bb5d3b3b48f57b3a2a5e7ff0f4ca9488c9f70a3b7f1a21de9660aa61cb1c3a29e2ed64511176c22e0eb630adef6aa2cfa06f261136726039239
data/.bowerrc ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "directory" : "vendor"
3
+ }
data/bower.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "formtastic-jquery_inputmask",
3
+ "homepage": "https://github.com/dhyegofernando/formtastic-jquery_inputmask",
4
+ "authors": [
5
+ "Dhyego Fernando <dhyegofernando@gmail.com>"
6
+ ],
7
+ "license": "MIT",
8
+ "private": true,
9
+ "ignore": [
10
+ "**/.*",
11
+ "node_modules",
12
+ "bower_components",
13
+ "test",
14
+ "tests"
15
+ ],
16
+ "dependencies": {
17
+ "inputmask": "^3.3.9"
18
+ }
19
+ }
@@ -2,7 +2,7 @@ module Formtastic
2
2
  module JqueryInputmask
3
3
  class Engine < ::Rails::Engine
4
4
  initializer 'formtastic.assets.paths' do |app|
5
- app.config.assets.paths << File.join(File.dirname(__FILE__), '../../../vendor/Inputmask/dist')
5
+ app.config.assets.paths << File.join(File.dirname(__FILE__), '../../../vendor/inputmask/dist')
6
6
  end
7
7
  end
8
8
  end
@@ -3,7 +3,7 @@ module Formtastic
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- PATCH = 0
6
+ PATCH = 1
7
7
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
8
8
  end
9
9
  end
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "inputmask",
3
+ "version": "3.3.9",
4
+ "main": [
5
+ "./dist/inputmask/inputmask.js",
6
+ "./dist/inputmask/inputmask.extensions.js",
7
+ "./dist/inputmask/inputmask.date.extensions.js",
8
+ "./dist/inputmask/inputmask.numeric.extensions.js",
9
+ "./dist/inputmask/inputmask.phone.extensions.js",
10
+ "./dist/inputmask/jquery.inputmask.js",
11
+ "./dist/inputmask/global/document.js",
12
+ "./dist/inputmask/global/window.js",
13
+ "./dist/inputmask/phone-codes/phone.js",
14
+ "./dist/inputmask/phone-codes/phone-be.js",
15
+ "./dist/inputmask/phone-codes/phone-nl.js",
16
+ "./dist/inputmask/phone-codes/phone-ru.js",
17
+ "./dist/inputmask/phone-codes/phone-uk.js",
18
+ "./dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js",
19
+ "./dist/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.js",
20
+ "./dist/inputmask/dependencyLibs/inputmask.dependencyLib.js",
21
+ "./dist/inputmask/bindings/inputmask.binding.js"
22
+ ],
23
+ "keywords": [
24
+ "jquery",
25
+ "plugins",
26
+ "input",
27
+ "form",
28
+ "inputmask",
29
+ "mask"
30
+ ],
31
+ "description": "Inputmask is a javascript library which creates an input mask. Inputmask can run against vanilla javascript, jQuery and jqlite.",
32
+ "license": "http://opensource.org/licenses/mit-license.php",
33
+ "ignore": [
34
+ "**/*",
35
+ "!dist/*",
36
+ "!dist/inputmask/*",
37
+ "!dist/min/*",
38
+ "!dist/min/inputmask/*"
39
+ ],
40
+ "dependencies": {
41
+ "jquery": ">=1.7"
42
+ },
43
+ "authors": [
44
+ {
45
+ "name": "Robin Herbots"
46
+ }
47
+ ],
48
+ "homepage": "http://robinherbots.github.io/Inputmask",
49
+ "_release": "3.3.9",
50
+ "_resolution": {
51
+ "type": "version",
52
+ "tag": "3.3.9",
53
+ "commit": "ebc2ff41c859c8380578d0059dad130a53a18223"
54
+ },
55
+ "_source": "https://github.com/RobinHerbots/Inputmask.git",
56
+ "_target": "^3.3.9",
57
+ "_originalSource": "inputmask",
58
+ "_direct": true
59
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "inputmask",
3
+ "version": "3.3.9",
4
+ "main": [
5
+ "./dist/inputmask/inputmask.js",
6
+ "./dist/inputmask/inputmask.extensions.js",
7
+ "./dist/inputmask/inputmask.date.extensions.js",
8
+ "./dist/inputmask/inputmask.numeric.extensions.js",
9
+ "./dist/inputmask/inputmask.phone.extensions.js",
10
+ "./dist/inputmask/jquery.inputmask.js",
11
+ "./dist/inputmask/global/document.js",
12
+ "./dist/inputmask/global/window.js",
13
+ "./dist/inputmask/phone-codes/phone.js",
14
+ "./dist/inputmask/phone-codes/phone-be.js",
15
+ "./dist/inputmask/phone-codes/phone-nl.js",
16
+ "./dist/inputmask/phone-codes/phone-ru.js",
17
+ "./dist/inputmask/phone-codes/phone-uk.js",
18
+ "./dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js",
19
+ "./dist/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.js",
20
+ "./dist/inputmask/dependencyLibs/inputmask.dependencyLib.js",
21
+ "./dist/inputmask/bindings/inputmask.binding.js"
22
+ ],
23
+ "keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
24
+ "description": "Inputmask is a javascript library which creates an input mask. Inputmask can run against vanilla javascript, jQuery and jqlite.",
25
+ "license": "http://opensource.org/licenses/mit-license.php",
26
+ "ignore": [
27
+ "**/*",
28
+ "!dist/*",
29
+ "!dist/inputmask/*",
30
+ "!dist/min/*",
31
+ "!dist/min/inputmask/*"
32
+ ],
33
+ "dependencies": {
34
+ "jquery": ">=1.7"
35
+ },
36
+ "authors": [{
37
+ "name": "Robin Herbots"
38
+ }],
39
+ "homepage": "http://robinherbots.github.io/Inputmask"
40
+ }
@@ -0,0 +1,21 @@
1
+ /*!
2
+ * bindings/inputmask.binding.js
3
+ * https://github.com/RobinHerbots/Inputmask
4
+ * Copyright (c) 2010 - 2017 Robin Herbots
5
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ * Version: 3.3.9
7
+ */
8
+
9
+ !function(factory) {
10
+ "function" == typeof define && define.amd ? define([ "jquery", "../inputmask", "../global/document" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("../inputmask"), require("../global/document")) : factory(jQuery, window.Inputmask, document);
11
+ }(function($, Inputmask, document) {
12
+ $(document).ajaxComplete(function(event, xmlHttpRequest, ajaxOptions) {
13
+ -1 !== $.inArray("html", ajaxOptions.dataTypes) && $(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias]").each(function(ndx, lmnt) {
14
+ void 0 === lmnt.inputmask && Inputmask().mask(lmnt);
15
+ });
16
+ }).ready(function() {
17
+ $(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias]").each(function(ndx, lmnt) {
18
+ void 0 === lmnt.inputmask && Inputmask().mask(lmnt);
19
+ });
20
+ });
21
+ });
@@ -0,0 +1,62 @@
1
+ /*!
2
+ * dependencyLibs/inputmask.dependencyLib.jqlite.js
3
+ * https://github.com/RobinHerbots/Inputmask
4
+ * Copyright (c) 2010 - 2017 Robin Herbots
5
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ * Version: 3.3.9
7
+ */
8
+
9
+ !function(factory) {
10
+ "function" == typeof define && define.amd ? define([ "jqlite", "../global/window", "../global/document]" ], factory) : "object" == typeof exports ? module.exports = factory(require("jqlite"), require("../global/window"), require("../global/document")) : window.dependencyLib = factory(jqlite, window, document);
11
+ }(function($, window, document) {
12
+ function indexOf(list, elem) {
13
+ for (var i = 0, len = list.length; i < len; i++) if (list[i] === elem) return i;
14
+ return -1;
15
+ }
16
+ function type(obj) {
17
+ return null == obj ? obj + "" : "object" == typeof obj || "function" == typeof obj ? class2type[class2type.toString.call(obj)] || "object" : typeof obj;
18
+ }
19
+ function isWindow(obj) {
20
+ return null != obj && obj === obj.window;
21
+ }
22
+ function isArraylike(obj) {
23
+ var length = "length" in obj && obj.length, ltype = type(obj);
24
+ return "function" !== ltype && !isWindow(obj) && (!(1 !== obj.nodeType || !length) || ("array" === ltype || 0 === length || "number" == typeof length && length > 0 && length - 1 in obj));
25
+ }
26
+ for (var class2type = {}, classTypes = "Boolean Number String Function Array Date RegExp Object Error".split(" "), nameNdx = 0; nameNdx < classTypes.length; nameNdx++) class2type["[object " + classTypes[nameNdx] + "]"] = classTypes[nameNdx].toLowerCase();
27
+ return $.inArray = function(elem, arr, i) {
28
+ return null == arr ? -1 : indexOf(arr, elem);
29
+ }, $.isFunction = function(obj) {
30
+ return "function" === type(obj);
31
+ }, $.isArray = Array.isArray, $.isPlainObject = function(obj) {
32
+ return "object" === type(obj) && !obj.nodeType && !isWindow(obj) && !(obj.constructor && !class2type.hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf"));
33
+ }, $.extend = function() {
34
+ var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = !1;
35
+ for ("boolean" == typeof target && (deep = target, target = arguments[i] || {},
36
+ i++), "object" == typeof target || $.isFunction(target) || (target = {}), i === length && (target = this,
37
+ i--); i < length; i++) if (null != (options = arguments[i])) for (name in options) src = target[name],
38
+ copy = options[name], target !== copy && (deep && copy && ($.isPlainObject(copy) || (copyIsArray = $.isArray(copy))) ? (copyIsArray ? (copyIsArray = !1,
39
+ clone = src && $.isArray(src) ? src : []) : clone = src && $.isPlainObject(src) ? src : {},
40
+ target[name] = $.extend(deep, clone, copy)) : void 0 !== copy && (target[name] = copy));
41
+ return target;
42
+ }, $.each = function(obj, callback) {
43
+ var i = 0;
44
+ if (isArraylike(obj)) for (var length = obj.length; i < length && !1 !== callback.call(obj[i], i, obj[i]); i++) ; else for (i in obj) if (!1 === callback.call(obj[i], i, obj[i])) break;
45
+ return obj;
46
+ }, $.map = function(elems, callback) {
47
+ var value, i = 0, length = elems.length, isArray = isArraylike(elems), ret = [];
48
+ if (isArray) for (;i < length; i++) null != (value = callback(elems[i], i)) && ret.push(value); else for (i in elems) null != (value = callback(elems[i], i)) && ret.push(value);
49
+ return [].concat(ret);
50
+ }, $.data = function(elem, name, data) {
51
+ return $(elem).data(name, data);
52
+ }, $.Event = $.Event || function(event, params) {
53
+ params = params || {
54
+ bubbles: !1,
55
+ cancelable: !1,
56
+ detail: void 0
57
+ };
58
+ var evt = document.createEvent("CustomEvent");
59
+ return evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail),
60
+ evt;
61
+ }, $.Event.prototype = window.Event.prototype, $;
62
+ });
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * dependencyLibs/inputmask.dependencyLib.jquery.js
3
+ * https://github.com/RobinHerbots/Inputmask
4
+ * Copyright (c) 2010 - 2017 Robin Herbots
5
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ * Version: 3.3.9
7
+ */
8
+
9
+ !function(factory) {
10
+ "function" == typeof define && define.amd ? define([ "jquery" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery")) : window.dependencyLib = factory(jQuery);
11
+ }(function($) {
12
+ return $;
13
+ });
@@ -0,0 +1,133 @@
1
+ /*!
2
+ * dependencyLibs/inputmask.dependencyLib.js
3
+ * https://github.com/RobinHerbots/Inputmask
4
+ * Copyright (c) 2010 - 2017 Robin Herbots
5
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ * Version: 3.3.9
7
+ */
8
+
9
+ !function(factory) {
10
+ "function" == typeof define && define.amd ? define([ "../global/window", "../global/document" ], factory) : "object" == typeof exports ? module.exports = factory(require("../global/window"), require("../global/document")) : window.dependencyLib = factory(window, document);
11
+ }(function(window, document) {
12
+ function indexOf(list, elem) {
13
+ for (var i = 0, len = list.length; i < len; i++) if (list[i] === elem) return i;
14
+ return -1;
15
+ }
16
+ function type(obj) {
17
+ return null == obj ? obj + "" : "object" == typeof obj || "function" == typeof obj ? class2type[class2type.toString.call(obj)] || "object" : typeof obj;
18
+ }
19
+ function isWindow(obj) {
20
+ return null != obj && obj === obj.window;
21
+ }
22
+ function isArraylike(obj) {
23
+ var length = "length" in obj && obj.length, ltype = type(obj);
24
+ return "function" !== ltype && !isWindow(obj) && (!(1 !== obj.nodeType || !length) || ("array" === ltype || 0 === length || "number" == typeof length && length > 0 && length - 1 in obj));
25
+ }
26
+ function isValidElement(elem) {
27
+ return elem instanceof Element;
28
+ }
29
+ function DependencyLib(elem) {
30
+ return elem instanceof DependencyLib ? elem : this instanceof DependencyLib ? void (void 0 !== elem && null !== elem && elem !== window && (this[0] = elem.nodeName ? elem : void 0 !== elem[0] && elem[0].nodeName ? elem[0] : document.querySelector(elem),
31
+ void 0 !== this[0] && null !== this[0] && (this[0].eventRegistry = this[0].eventRegistry || {}))) : new DependencyLib(elem);
32
+ }
33
+ for (var class2type = {}, classTypes = "Boolean Number String Function Array Date RegExp Object Error".split(" "), nameNdx = 0; nameNdx < classTypes.length; nameNdx++) class2type["[object " + classTypes[nameNdx] + "]"] = classTypes[nameNdx].toLowerCase();
34
+ return DependencyLib.prototype = {
35
+ on: function(events, handler) {
36
+ if (isValidElement(this[0])) for (var eventRegistry = this[0].eventRegistry, elem = this[0], _events = events.split(" "), endx = 0; endx < _events.length; endx++) {
37
+ var nsEvent = _events[endx].split("."), ev = nsEvent[0], namespace = nsEvent[1] || "global";
38
+ !function(ev, namespace) {
39
+ elem.addEventListener ? elem.addEventListener(ev, handler, !1) : elem.attachEvent && elem.attachEvent("on" + ev, handler),
40
+ eventRegistry[ev] = eventRegistry[ev] || {}, eventRegistry[ev][namespace] = eventRegistry[ev][namespace] || [],
41
+ eventRegistry[ev][namespace].push(handler);
42
+ }(ev, namespace);
43
+ }
44
+ return this;
45
+ },
46
+ off: function(events, handler) {
47
+ if (isValidElement(this[0])) for (var eventRegistry = this[0].eventRegistry, elem = this[0], _events = events.split(" "), endx = 0; endx < _events.length; endx++) for (var nsEvent = _events[endx].split("."), offEvents = function(ev, namespace) {
48
+ var hndx, hndL, evts = [];
49
+ if (ev.length > 0) if (void 0 === handler) for (hndx = 0, hndL = eventRegistry[ev][namespace].length; hndx < hndL; hndx++) evts.push({
50
+ ev: ev,
51
+ namespace: namespace && namespace.length > 0 ? namespace : "global",
52
+ handler: eventRegistry[ev][namespace][hndx]
53
+ }); else evts.push({
54
+ ev: ev,
55
+ namespace: namespace && namespace.length > 0 ? namespace : "global",
56
+ handler: handler
57
+ }); else if (namespace.length > 0) for (var evNdx in eventRegistry) for (var nmsp in eventRegistry[evNdx]) if (nmsp === namespace) if (void 0 === handler) for (hndx = 0,
58
+ hndL = eventRegistry[evNdx][nmsp].length; hndx < hndL; hndx++) evts.push({
59
+ ev: evNdx,
60
+ namespace: nmsp,
61
+ handler: eventRegistry[evNdx][nmsp][hndx]
62
+ }); else evts.push({
63
+ ev: evNdx,
64
+ namespace: nmsp,
65
+ handler: handler
66
+ });
67
+ return evts;
68
+ }(nsEvent[0], nsEvent[1]), i = 0, offEventsL = offEvents.length; i < offEventsL; i++) !function(ev, namespace, handler) {
69
+ if (ev in eventRegistry == 1) if (elem.removeEventListener ? elem.removeEventListener(ev, handler, !1) : elem.detachEvent && elem.detachEvent("on" + ev, handler),
70
+ "global" === namespace) for (var nmsp in eventRegistry[ev]) eventRegistry[ev][nmsp].splice(eventRegistry[ev][nmsp].indexOf(handler), 1); else eventRegistry[ev][namespace].splice(eventRegistry[ev][namespace].indexOf(handler), 1);
71
+ }(offEvents[i].ev, offEvents[i].namespace, offEvents[i].handler);
72
+ return this;
73
+ },
74
+ trigger: function(events) {
75
+ if (isValidElement(this[0])) for (var eventRegistry = this[0].eventRegistry, elem = this[0], _events = "string" == typeof events ? events.split(" ") : [ events.type ], endx = 0; endx < _events.length; endx++) {
76
+ var nsEvent = _events[endx].split("."), ev = nsEvent[0], namespace = nsEvent[1] || "global";
77
+ if (void 0 !== document && "global" === namespace) {
78
+ var evnt, i, params = {
79
+ bubbles: !0,
80
+ cancelable: !0,
81
+ detail: Array.prototype.slice.call(arguments, 1)
82
+ };
83
+ if (document.createEvent) {
84
+ try {
85
+ evnt = new CustomEvent(ev, params);
86
+ } catch (e) {
87
+ evnt = document.createEvent("CustomEvent"), evnt.initCustomEvent(ev, params.bubbles, params.cancelable, params.detail);
88
+ }
89
+ events.type && DependencyLib.extend(evnt, events), elem.dispatchEvent(evnt);
90
+ } else evnt = document.createEventObject(), evnt.eventType = ev, events.type && DependencyLib.extend(evnt, events),
91
+ elem.fireEvent("on" + evnt.eventType, evnt);
92
+ } else if (void 0 !== eventRegistry[ev]) if (arguments[0] = arguments[0].type ? arguments[0] : DependencyLib.Event(arguments[0]),
93
+ "global" === namespace) for (var nmsp in eventRegistry[ev]) for (i = 0; i < eventRegistry[ev][nmsp].length; i++) eventRegistry[ev][nmsp][i].apply(elem, arguments); else for (i = 0; i < eventRegistry[ev][namespace].length; i++) eventRegistry[ev][namespace][i].apply(elem, arguments);
94
+ }
95
+ return this;
96
+ }
97
+ }, DependencyLib.isFunction = function(obj) {
98
+ return "function" === type(obj);
99
+ }, DependencyLib.noop = function() {}, DependencyLib.isArray = Array.isArray, DependencyLib.inArray = function(elem, arr, i) {
100
+ return null == arr ? -1 : indexOf(arr, elem);
101
+ }, DependencyLib.valHooks = void 0, DependencyLib.isPlainObject = function(obj) {
102
+ return "object" === type(obj) && !obj.nodeType && !isWindow(obj) && !(obj.constructor && !class2type.hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf"));
103
+ }, DependencyLib.extend = function() {
104
+ var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = !1;
105
+ for ("boolean" == typeof target && (deep = target, target = arguments[i] || {},
106
+ i++), "object" == typeof target || DependencyLib.isFunction(target) || (target = {}),
107
+ i === length && (target = this, i--); i < length; i++) if (null != (options = arguments[i])) for (name in options) src = target[name],
108
+ copy = options[name], target !== copy && (deep && copy && (DependencyLib.isPlainObject(copy) || (copyIsArray = DependencyLib.isArray(copy))) ? (copyIsArray ? (copyIsArray = !1,
109
+ clone = src && DependencyLib.isArray(src) ? src : []) : clone = src && DependencyLib.isPlainObject(src) ? src : {},
110
+ target[name] = DependencyLib.extend(deep, clone, copy)) : void 0 !== copy && (target[name] = copy));
111
+ return target;
112
+ }, DependencyLib.each = function(obj, callback) {
113
+ var i = 0;
114
+ if (isArraylike(obj)) for (var length = obj.length; i < length && !1 !== callback.call(obj[i], i, obj[i]); i++) ; else for (i in obj) if (!1 === callback.call(obj[i], i, obj[i])) break;
115
+ return obj;
116
+ }, DependencyLib.map = function(elems, callback) {
117
+ var value, i = 0, length = elems.length, isArray = isArraylike(elems), ret = [];
118
+ if (isArray) for (;i < length; i++) null != (value = callback(elems[i], i)) && ret.push(value); else for (i in elems) null != (value = callback(elems[i], i)) && ret.push(value);
119
+ return [].concat(ret);
120
+ }, DependencyLib.data = function(owner, key, value) {
121
+ if (void 0 === value) return owner.__data ? owner.__data[key] : null;
122
+ owner.__data = owner.__data || {}, owner.__data[key] = value;
123
+ }, "function" == typeof window.CustomEvent ? DependencyLib.Event = window.CustomEvent : (DependencyLib.Event = function(event, params) {
124
+ params = params || {
125
+ bubbles: !1,
126
+ cancelable: !1,
127
+ detail: void 0
128
+ };
129
+ var evt = document.createEvent("CustomEvent");
130
+ return evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail),
131
+ evt;
132
+ }, DependencyLib.Event.prototype = window.Event.prototype), DependencyLib;
133
+ });
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * global/document.js
3
+ * https://github.com/RobinHerbots/Inputmask
4
+ * Copyright (c) 2010 - 2017 Robin Herbots
5
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ * Version: 3.3.9
7
+ */
8
+
9
+ "function" == typeof define && define.amd ? define(function() {
10
+ return document;
11
+ }) : "object" == typeof exports && (module.exports = document);
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * global/window.js
3
+ * https://github.com/RobinHerbots/Inputmask
4
+ * Copyright (c) 2010 - 2017 Robin Herbots
5
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ * Version: 3.3.9
7
+ */
8
+
9
+ "function" == typeof define && define.amd ? define(function() {
10
+ return window;
11
+ }) : "object" == typeof exports && (module.exports = window);
@@ -0,0 +1,490 @@
1
+ /*!
2
+ * inputmask.date.extensions.js
3
+ * https://github.com/RobinHerbots/Inputmask
4
+ * Copyright (c) 2010 - 2017 Robin Herbots
5
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ * Version: 3.3.9
7
+ */
8
+
9
+ !function(factory) {
10
+ "function" == typeof define && define.amd ? define([ "./dependencyLibs/inputmask.dependencyLib", "./inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./dependencyLibs/inputmask.dependencyLib"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
11
+ }(function($, Inputmask) {
12
+ function isLeapYear(year) {
13
+ return isNaN(year) || 29 === new Date(year, 2, 0).getDate();
14
+ }
15
+ return Inputmask.extendAliases({
16
+ "dd/mm/yyyy": {
17
+ mask: "1/2/y",
18
+ placeholder: "dd/mm/yyyy",
19
+ regex: {
20
+ val1pre: new RegExp("[0-3]"),
21
+ val1: new RegExp("0[1-9]|[12][0-9]|3[01]"),
22
+ val2pre: function(separator) {
23
+ var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
24
+ return new RegExp("((0[1-9]|[12][0-9]|3[01])" + escapedSeparator + "[01])");
25
+ },
26
+ val2: function(separator) {
27
+ var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
28
+ return new RegExp("((0[1-9]|[12][0-9])" + escapedSeparator + "(0[1-9]|1[012]))|(30" + escapedSeparator + "(0[13-9]|1[012]))|(31" + escapedSeparator + "(0[13578]|1[02]))");
29
+ }
30
+ },
31
+ leapday: "29/02/",
32
+ separator: "/",
33
+ yearrange: {
34
+ minyear: 1900,
35
+ maxyear: 2099
36
+ },
37
+ isInYearRange: function(chrs, minyear, maxyear) {
38
+ if (isNaN(chrs)) return !1;
39
+ var enteredyear = parseInt(chrs.concat(minyear.toString().slice(chrs.length))), enteredyear2 = parseInt(chrs.concat(maxyear.toString().slice(chrs.length)));
40
+ return !isNaN(enteredyear) && (minyear <= enteredyear && enteredyear <= maxyear) || !isNaN(enteredyear2) && (minyear <= enteredyear2 && enteredyear2 <= maxyear);
41
+ },
42
+ determinebaseyear: function(minyear, maxyear, hint) {
43
+ var currentyear = new Date().getFullYear();
44
+ if (minyear > currentyear) return minyear;
45
+ if (maxyear < currentyear) {
46
+ for (var maxYearPrefix = maxyear.toString().slice(0, 2), maxYearPostfix = maxyear.toString().slice(2, 4); maxyear < maxYearPrefix + hint; ) maxYearPrefix--;
47
+ var maxxYear = maxYearPrefix + maxYearPostfix;
48
+ return minyear > maxxYear ? minyear : maxxYear;
49
+ }
50
+ if (minyear <= currentyear && currentyear <= maxyear) {
51
+ for (var currentYearPrefix = currentyear.toString().slice(0, 2); maxyear < currentYearPrefix + hint; ) currentYearPrefix--;
52
+ var currentYearAndHint = currentYearPrefix + hint;
53
+ return currentYearAndHint < minyear ? minyear : currentYearAndHint;
54
+ }
55
+ return currentyear;
56
+ },
57
+ onKeyDown: function(e, buffer, caretPos, opts) {
58
+ var $input = $(this);
59
+ if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
60
+ var today = new Date();
61
+ $input.val(today.getDate().toString() + (today.getMonth() + 1).toString() + today.getFullYear().toString()),
62
+ $input.trigger("setvalue");
63
+ }
64
+ },
65
+ getFrontValue: function(mask, buffer, opts) {
66
+ for (var start = 0, length = 0, i = 0; i < mask.length && "2" !== mask.charAt(i); i++) {
67
+ var definition = opts.definitions[mask.charAt(i)];
68
+ definition ? (start += length, length = definition.cardinality) : length++;
69
+ }
70
+ return buffer.join("").substr(start, length);
71
+ },
72
+ postValidation: function(buffer, currentResult, opts) {
73
+ var dayMonthValue, year, bufferStr = buffer.join("");
74
+ return 0 === opts.mask.indexOf("y") ? (year = bufferStr.substr(0, 4), dayMonthValue = bufferStr.substring(4, 10)) : (year = bufferStr.substring(6, 10),
75
+ dayMonthValue = bufferStr.substr(0, 6)), currentResult && (dayMonthValue !== opts.leapday || isLeapYear(year));
76
+ },
77
+ definitions: {
78
+ "1": {
79
+ validator: function(chrs, maskset, pos, strict, opts) {
80
+ if ("3" == chrs.charAt(0)) {
81
+ if (new RegExp("[2-9]").test(chrs.charAt(1))) return chrs = "30", maskset.buffer[pos] = "0",
82
+ pos++, {
83
+ pos: pos
84
+ };
85
+ }
86
+ var isValid = opts.regex.val1.test(chrs);
87
+ return strict || isValid || chrs.charAt(1) !== opts.separator && -1 === "-./".indexOf(chrs.charAt(1)) || !(isValid = opts.regex.val1.test("0" + chrs.charAt(0))) ? isValid : (maskset.buffer[pos - 1] = "0",
88
+ {
89
+ refreshFromBuffer: {
90
+ start: pos - 1,
91
+ end: pos
92
+ },
93
+ pos: pos,
94
+ c: chrs.charAt(0)
95
+ });
96
+ },
97
+ cardinality: 2,
98
+ prevalidator: [ {
99
+ validator: function(chrs, maskset, pos, strict, opts) {
100
+ var pchrs = chrs;
101
+ isNaN(maskset.buffer[pos + 1]) || (pchrs += maskset.buffer[pos + 1]);
102
+ var isValid = 1 === pchrs.length ? opts.regex.val1pre.test(pchrs) : opts.regex.val1.test(pchrs);
103
+ if (!strict && !isValid) {
104
+ if (isValid = opts.regex.val1.test(chrs + "0")) return maskset.buffer[pos] = chrs,
105
+ maskset.buffer[++pos] = "0", {
106
+ pos: pos,
107
+ c: "0"
108
+ };
109
+ if (isValid = opts.regex.val1.test("0" + chrs)) return maskset.buffer[pos] = "0",
110
+ pos++, {
111
+ pos: pos
112
+ };
113
+ }
114
+ return isValid;
115
+ },
116
+ cardinality: 1
117
+ } ]
118
+ },
119
+ "2": {
120
+ validator: function(chrs, maskset, pos, strict, opts) {
121
+ var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts);
122
+ if (-1 !== frontValue.indexOf(opts.placeholder[0]) && (frontValue = "01" + opts.separator),
123
+ "1" == chrs.charAt(0)) {
124
+ if (new RegExp("[3-9]").test(chrs.charAt(1))) return chrs = "10", maskset.buffer[pos] = "0",
125
+ pos++, {
126
+ pos: pos
127
+ };
128
+ }
129
+ var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs);
130
+ return strict || isValid || chrs.charAt(1) !== opts.separator && -1 === "-./".indexOf(chrs.charAt(1)) || !(isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs.charAt(0))) ? isValid : (maskset.buffer[pos - 1] = "0",
131
+ {
132
+ refreshFromBuffer: {
133
+ start: pos - 1,
134
+ end: pos
135
+ },
136
+ pos: pos,
137
+ c: chrs.charAt(0)
138
+ });
139
+ },
140
+ cardinality: 2,
141
+ prevalidator: [ {
142
+ validator: function(chrs, maskset, pos, strict, opts) {
143
+ isNaN(maskset.buffer[pos + 1]) || (chrs += maskset.buffer[pos + 1]);
144
+ var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts);
145
+ -1 !== frontValue.indexOf(opts.placeholder[0]) && (frontValue = "01" + opts.separator);
146
+ var isValid = 1 === chrs.length ? opts.regex.val2pre(opts.separator).test(frontValue + chrs) : opts.regex.val2(opts.separator).test(frontValue + chrs);
147
+ return strict || isValid || !(isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
148
+ pos++, {
149
+ pos: pos
150
+ });
151
+ },
152
+ cardinality: 1
153
+ } ]
154
+ },
155
+ y: {
156
+ validator: function(chrs, maskset, pos, strict, opts) {
157
+ return opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
158
+ },
159
+ cardinality: 4,
160
+ prevalidator: [ {
161
+ validator: function(chrs, maskset, pos, strict, opts) {
162
+ var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
163
+ if (!strict && !isValid) {
164
+ var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + "0").toString().slice(0, 1);
165
+ if (isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0),
166
+ {
167
+ pos: pos
168
+ };
169
+ if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + "0").toString().slice(0, 2),
170
+ isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0),
171
+ maskset.buffer[pos++] = yearPrefix.charAt(1), {
172
+ pos: pos
173
+ };
174
+ }
175
+ return isValid;
176
+ },
177
+ cardinality: 1
178
+ }, {
179
+ validator: function(chrs, maskset, pos, strict, opts) {
180
+ var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
181
+ if (!strict && !isValid) {
182
+ var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2);
183
+ if (isValid = opts.isInYearRange(chrs[0] + yearPrefix[1] + chrs[1], opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(1),
184
+ {
185
+ pos: pos
186
+ };
187
+ if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2),
188
+ isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos - 1] = yearPrefix.charAt(0),
189
+ maskset.buffer[pos++] = yearPrefix.charAt(1), maskset.buffer[pos++] = chrs.charAt(0),
190
+ {
191
+ refreshFromBuffer: {
192
+ start: pos - 3,
193
+ end: pos
194
+ },
195
+ pos: pos
196
+ };
197
+ }
198
+ return isValid;
199
+ },
200
+ cardinality: 2
201
+ }, {
202
+ validator: function(chrs, maskset, pos, strict, opts) {
203
+ return opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
204
+ },
205
+ cardinality: 3
206
+ } ]
207
+ }
208
+ },
209
+ insertMode: !1,
210
+ autoUnmask: !1
211
+ },
212
+ "mm/dd/yyyy": {
213
+ placeholder: "mm/dd/yyyy",
214
+ alias: "dd/mm/yyyy",
215
+ regex: {
216
+ val2pre: function(separator) {
217
+ var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
218
+ return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])");
219
+ },
220
+ val2: function(separator) {
221
+ var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
222
+ return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)");
223
+ },
224
+ val1pre: new RegExp("[01]"),
225
+ val1: new RegExp("0[1-9]|1[012]")
226
+ },
227
+ leapday: "02/29/",
228
+ onKeyDown: function(e, buffer, caretPos, opts) {
229
+ var $input = $(this);
230
+ if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
231
+ var today = new Date();
232
+ $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()),
233
+ $input.trigger("setvalue");
234
+ }
235
+ }
236
+ },
237
+ "yyyy/mm/dd": {
238
+ mask: "y/1/2",
239
+ placeholder: "yyyy/mm/dd",
240
+ alias: "mm/dd/yyyy",
241
+ leapday: "/02/29",
242
+ onKeyDown: function(e, buffer, caretPos, opts) {
243
+ var $input = $(this);
244
+ if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
245
+ var today = new Date();
246
+ $input.val(today.getFullYear().toString() + (today.getMonth() + 1).toString() + today.getDate().toString()),
247
+ $input.trigger("setvalue");
248
+ }
249
+ }
250
+ },
251
+ "dd.mm.yyyy": {
252
+ mask: "1.2.y",
253
+ placeholder: "dd.mm.yyyy",
254
+ leapday: "29.02.",
255
+ separator: ".",
256
+ alias: "dd/mm/yyyy"
257
+ },
258
+ "dd-mm-yyyy": {
259
+ mask: "1-2-y",
260
+ placeholder: "dd-mm-yyyy",
261
+ leapday: "29-02-",
262
+ separator: "-",
263
+ alias: "dd/mm/yyyy"
264
+ },
265
+ "mm.dd.yyyy": {
266
+ mask: "1.2.y",
267
+ placeholder: "mm.dd.yyyy",
268
+ leapday: "02.29.",
269
+ separator: ".",
270
+ alias: "mm/dd/yyyy"
271
+ },
272
+ "mm-dd-yyyy": {
273
+ mask: "1-2-y",
274
+ placeholder: "mm-dd-yyyy",
275
+ leapday: "02-29-",
276
+ separator: "-",
277
+ alias: "mm/dd/yyyy"
278
+ },
279
+ "yyyy.mm.dd": {
280
+ mask: "y.1.2",
281
+ placeholder: "yyyy.mm.dd",
282
+ leapday: ".02.29",
283
+ separator: ".",
284
+ alias: "yyyy/mm/dd"
285
+ },
286
+ "yyyy-mm-dd": {
287
+ mask: "y-1-2",
288
+ placeholder: "yyyy-mm-dd",
289
+ leapday: "-02-29",
290
+ separator: "-",
291
+ alias: "yyyy/mm/dd"
292
+ },
293
+ datetime: {
294
+ mask: "1/2/y h:s",
295
+ placeholder: "dd/mm/yyyy hh:mm",
296
+ alias: "dd/mm/yyyy",
297
+ regex: {
298
+ hrspre: new RegExp("[012]"),
299
+ hrs24: new RegExp("2[0-4]|1[3-9]"),
300
+ hrs: new RegExp("[01][0-9]|2[0-4]"),
301
+ ampm: new RegExp("^[a|p|A|P][m|M]"),
302
+ mspre: new RegExp("[0-5]"),
303
+ ms: new RegExp("[0-5][0-9]")
304
+ },
305
+ timeseparator: ":",
306
+ hourFormat: "24",
307
+ definitions: {
308
+ h: {
309
+ validator: function(chrs, maskset, pos, strict, opts) {
310
+ if ("24" === opts.hourFormat && 24 === parseInt(chrs, 10)) return maskset.buffer[pos - 1] = "0",
311
+ maskset.buffer[pos] = "0", {
312
+ refreshFromBuffer: {
313
+ start: pos - 1,
314
+ end: pos
315
+ },
316
+ c: "0"
317
+ };
318
+ var isValid = opts.regex.hrs.test(chrs);
319
+ if (!strict && !isValid && (chrs.charAt(1) === opts.timeseparator || -1 !== "-.:".indexOf(chrs.charAt(1))) && (isValid = opts.regex.hrs.test("0" + chrs.charAt(0)))) return maskset.buffer[pos - 1] = "0",
320
+ maskset.buffer[pos] = chrs.charAt(0), pos++, {
321
+ refreshFromBuffer: {
322
+ start: pos - 2,
323
+ end: pos
324
+ },
325
+ pos: pos,
326
+ c: opts.timeseparator
327
+ };
328
+ if (isValid && "24" !== opts.hourFormat && opts.regex.hrs24.test(chrs)) {
329
+ var tmp = parseInt(chrs, 10);
330
+ return 24 === tmp ? (maskset.buffer[pos + 5] = "a", maskset.buffer[pos + 6] = "m") : (maskset.buffer[pos + 5] = "p",
331
+ maskset.buffer[pos + 6] = "m"), tmp -= 12, tmp < 10 ? (maskset.buffer[pos] = tmp.toString(),
332
+ maskset.buffer[pos - 1] = "0") : (maskset.buffer[pos] = tmp.toString().charAt(1),
333
+ maskset.buffer[pos - 1] = tmp.toString().charAt(0)), {
334
+ refreshFromBuffer: {
335
+ start: pos - 1,
336
+ end: pos + 6
337
+ },
338
+ c: maskset.buffer[pos]
339
+ };
340
+ }
341
+ return isValid;
342
+ },
343
+ cardinality: 2,
344
+ prevalidator: [ {
345
+ validator: function(chrs, maskset, pos, strict, opts) {
346
+ var isValid = opts.regex.hrspre.test(chrs);
347
+ return strict || isValid || !(isValid = opts.regex.hrs.test("0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
348
+ pos++, {
349
+ pos: pos
350
+ });
351
+ },
352
+ cardinality: 1
353
+ } ]
354
+ },
355
+ s: {
356
+ validator: "[0-5][0-9]",
357
+ cardinality: 2,
358
+ prevalidator: [ {
359
+ validator: function(chrs, maskset, pos, strict, opts) {
360
+ var isValid = opts.regex.mspre.test(chrs);
361
+ return strict || isValid || !(isValid = opts.regex.ms.test("0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
362
+ pos++, {
363
+ pos: pos
364
+ });
365
+ },
366
+ cardinality: 1
367
+ } ]
368
+ },
369
+ t: {
370
+ validator: function(chrs, maskset, pos, strict, opts) {
371
+ return opts.regex.ampm.test(chrs + "m");
372
+ },
373
+ casing: "lower",
374
+ cardinality: 1
375
+ }
376
+ },
377
+ insertMode: !1,
378
+ autoUnmask: !1
379
+ },
380
+ datetime12: {
381
+ mask: "1/2/y h:s t\\m",
382
+ placeholder: "dd/mm/yyyy hh:mm xm",
383
+ alias: "datetime",
384
+ hourFormat: "12"
385
+ },
386
+ "mm/dd/yyyy hh:mm xm": {
387
+ mask: "1/2/y h:s t\\m",
388
+ placeholder: "mm/dd/yyyy hh:mm xm",
389
+ alias: "datetime12",
390
+ regex: {
391
+ val2pre: function(separator) {
392
+ var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
393
+ return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])");
394
+ },
395
+ val2: function(separator) {
396
+ var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
397
+ return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)");
398
+ },
399
+ val1pre: new RegExp("[01]"),
400
+ val1: new RegExp("0[1-9]|1[012]")
401
+ },
402
+ leapday: "02/29/",
403
+ onKeyDown: function(e, buffer, caretPos, opts) {
404
+ var $input = $(this);
405
+ if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
406
+ var today = new Date();
407
+ $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()),
408
+ $input.trigger("setvalue");
409
+ }
410
+ }
411
+ },
412
+ "hh:mm t": {
413
+ mask: "h:s t\\m",
414
+ placeholder: "hh:mm xm",
415
+ alias: "datetime",
416
+ hourFormat: "12"
417
+ },
418
+ "h:s t": {
419
+ mask: "h:s t\\m",
420
+ placeholder: "hh:mm xm",
421
+ alias: "datetime",
422
+ hourFormat: "12"
423
+ },
424
+ "hh:mm:ss": {
425
+ mask: "h:s:s",
426
+ placeholder: "hh:mm:ss",
427
+ alias: "datetime",
428
+ autoUnmask: !1
429
+ },
430
+ "hh:mm": {
431
+ mask: "h:s",
432
+ placeholder: "hh:mm",
433
+ alias: "datetime",
434
+ autoUnmask: !1
435
+ },
436
+ date: {
437
+ alias: "dd/mm/yyyy"
438
+ },
439
+ "mm/yyyy": {
440
+ mask: "1/y",
441
+ placeholder: "mm/yyyy",
442
+ leapday: "donotuse",
443
+ separator: "/",
444
+ alias: "mm/dd/yyyy"
445
+ },
446
+ shamsi: {
447
+ regex: {
448
+ val2pre: function(separator) {
449
+ var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
450
+ return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "[0-3])");
451
+ },
452
+ val2: function(separator) {
453
+ var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
454
+ return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[1-9]|1[012])" + escapedSeparator + "30)|((0[1-6])" + escapedSeparator + "31)");
455
+ },
456
+ val1pre: new RegExp("[01]"),
457
+ val1: new RegExp("0[1-9]|1[012]")
458
+ },
459
+ yearrange: {
460
+ minyear: 1300,
461
+ maxyear: 1499
462
+ },
463
+ mask: "y/1/2",
464
+ leapday: "/12/30",
465
+ placeholder: "yyyy/mm/dd",
466
+ alias: "mm/dd/yyyy",
467
+ clearIncomplete: !0
468
+ },
469
+ "yyyy-mm-dd hh:mm:ss": {
470
+ mask: "y-1-2 h:s:s",
471
+ placeholder: "yyyy-mm-dd hh:mm:ss",
472
+ alias: "datetime",
473
+ separator: "-",
474
+ leapday: "-02-29",
475
+ regex: {
476
+ val2pre: function(separator) {
477
+ var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
478
+ return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])");
479
+ },
480
+ val2: function(separator) {
481
+ var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
482
+ return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)");
483
+ },
484
+ val1pre: new RegExp("[01]"),
485
+ val1: new RegExp("0[1-9]|1[012]")
486
+ },
487
+ onKeyDown: function(e, buffer, caretPos, opts) {}
488
+ }
489
+ }), Inputmask;
490
+ });