@schukai/monster 1.26.1 → 1.29.0

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 (198) hide show
  1. package/CHANGELOG +38 -1
  2. package/README.md +4 -4
  3. package/dist/modules/constants.js +1 -1
  4. package/dist/modules/constraints/abstract.js +1 -1
  5. package/dist/modules/constraints/abstractoperator.js +1 -1
  6. package/dist/modules/constraints/andoperator.js +1 -1
  7. package/dist/modules/constraints/invalid.js +1 -1
  8. package/dist/modules/constraints/isarray.js +1 -1
  9. package/dist/modules/constraints/isobject.js +1 -1
  10. package/dist/modules/constraints/namespace.js +1 -1
  11. package/dist/modules/constraints/oroperator.js +1 -1
  12. package/dist/modules/constraints/valid.js +1 -1
  13. package/dist/modules/data/buildmap.js +2 -2
  14. package/dist/modules/data/buildtree.js +2 -2
  15. package/dist/modules/data/datasource/namespace.js +1 -1
  16. package/dist/modules/data/datasource/restapi/writeerror.js +1 -1
  17. package/dist/modules/data/datasource/restapi.js +1 -1
  18. package/dist/modules/data/datasource/storage/localstorage.js +1 -1
  19. package/dist/modules/data/datasource/storage/namespace.js +1 -1
  20. package/dist/modules/data/datasource/storage/sessionstorage.js +1 -1
  21. package/dist/modules/data/datasource/storage.js +1 -1
  22. package/dist/modules/data/datasource.js +1 -1
  23. package/dist/modules/data/diff.js +1 -1
  24. package/dist/modules/data/extend.js +1 -1
  25. package/dist/modules/data/namespace.js +1 -1
  26. package/dist/modules/data/pathfinder.js +1 -1
  27. package/dist/modules/data/pipe.js +1 -1
  28. package/dist/modules/data/transformer.js +1 -1
  29. package/dist/modules/dom/assembler.js +1 -1
  30. package/dist/modules/dom/attributes.js +2 -2
  31. package/dist/modules/dom/constants.js +2 -2
  32. package/dist/modules/dom/customcontrol.js +1 -1
  33. package/dist/modules/dom/customelement.js +2 -2
  34. package/dist/modules/dom/events.js +2 -2
  35. package/dist/modules/dom/focusmanager.js +1 -1
  36. package/dist/modules/dom/locale.js +1 -1
  37. package/dist/modules/dom/namespace.js +1 -1
  38. package/dist/modules/dom/resource/data.js +1 -1
  39. package/dist/modules/dom/resource/link/stylesheet.js +1 -1
  40. package/dist/modules/dom/resource/link.js +1 -1
  41. package/dist/modules/dom/resource/script.js +1 -1
  42. package/dist/modules/dom/resource.js +1 -1
  43. package/dist/modules/dom/resourcemanager.js +1 -1
  44. package/dist/modules/dom/template.js +2 -2
  45. package/dist/modules/dom/theme.js +1 -1
  46. package/dist/modules/dom/updater.js +2 -2
  47. package/dist/modules/dom/util.js +1 -1
  48. package/dist/modules/dom/worker/factory.js +1 -1
  49. package/dist/modules/i18n/formatter.js +1 -1
  50. package/dist/modules/i18n/locale.js +1 -1
  51. package/dist/modules/i18n/namespace.js +1 -1
  52. package/dist/modules/i18n/provider.js +1 -1
  53. package/dist/modules/i18n/providers/fetch.js +1 -1
  54. package/dist/modules/i18n/providers/namespace.js +1 -1
  55. package/dist/modules/i18n/translations.js +1 -1
  56. package/dist/modules/logging/handler/console.js +1 -1
  57. package/dist/modules/logging/handler/namespace.js +1 -1
  58. package/dist/modules/logging/handler.js +1 -1
  59. package/dist/modules/logging/logentry.js +1 -1
  60. package/dist/modules/logging/logger.js +1 -1
  61. package/dist/modules/logging/namespace.js +1 -1
  62. package/dist/modules/math/namespace.js +1 -1
  63. package/dist/modules/math/random.js +1 -1
  64. package/dist/modules/monster.js +1 -1
  65. package/dist/modules/namespace.js +1 -1
  66. package/dist/modules/text/formatter.js +1 -1
  67. package/dist/modules/text/namespace.js +1 -1
  68. package/dist/modules/types/base.js +1 -1
  69. package/dist/modules/types/basewithoptions.js +1 -1
  70. package/dist/modules/types/binary.js +1 -1
  71. package/dist/modules/types/dataurl.js +1 -1
  72. package/dist/modules/types/global.js +1 -1
  73. package/dist/modules/types/id.js +1 -1
  74. package/dist/modules/types/is.js +1 -1
  75. package/dist/modules/types/mediatype.js +1 -1
  76. package/dist/modules/types/namespace.js +1 -1
  77. package/dist/modules/types/node.js +2 -2
  78. package/dist/modules/types/nodelist.js +2 -2
  79. package/dist/modules/types/noderecursiveiterator.js +2 -2
  80. package/dist/modules/types/observer.js +1 -1
  81. package/dist/modules/types/observerlist.js +1 -1
  82. package/dist/modules/types/proxyobserver.js +1 -1
  83. package/dist/modules/types/queue.js +1 -1
  84. package/dist/modules/types/randomid.js +1 -1
  85. package/dist/modules/types/regex.js +1 -1
  86. package/dist/modules/types/stack.js +1 -1
  87. package/dist/modules/types/tokenlist.js +1 -1
  88. package/dist/modules/types/typeof.js +1 -1
  89. package/dist/modules/types/uniquequeue.js +1 -1
  90. package/dist/modules/types/uuid.js +1 -1
  91. package/dist/modules/types/validate.js +1 -1
  92. package/dist/modules/types/version.js +2 -2
  93. package/dist/modules/util/clone.js +1 -1
  94. package/dist/modules/util/comparator.js +1 -1
  95. package/dist/modules/util/deadmansswitch.js +2 -0
  96. package/dist/modules/util/freeze.js +1 -1
  97. package/dist/modules/util/namespace.js +1 -1
  98. package/dist/modules/util/processing.js +1 -1
  99. package/dist/modules/util/trimspaces.js +1 -1
  100. package/dist/monster.dev.js +906 -619
  101. package/dist/monster.dev.js.map +1 -1
  102. package/dist/monster.js +2 -2
  103. package/package.json +1 -1
  104. package/source/constraints/andoperator.js +5 -5
  105. package/source/constraints/invalid.js +3 -3
  106. package/source/constraints/isarray.js +3 -3
  107. package/source/constraints/isobject.js +3 -3
  108. package/source/constraints/oroperator.js +5 -5
  109. package/source/constraints/valid.js +3 -3
  110. package/source/data/buildmap.js +10 -11
  111. package/source/data/buildtree.js +51 -17
  112. package/source/data/datasource/restapi.js +3 -3
  113. package/source/data/datasource/storage/localstorage.js +2 -2
  114. package/source/data/datasource/storage/sessionstorage.js +2 -2
  115. package/source/data/datasource/storage.js +3 -3
  116. package/source/data/datasource.js +3 -3
  117. package/source/data/diff.js +3 -3
  118. package/source/data/extend.js +2 -2
  119. package/source/data/pathfinder.js +4 -4
  120. package/source/data/pipe.js +3 -3
  121. package/source/data/transformer.js +3 -3
  122. package/source/dom/assembler.js +2 -2
  123. package/source/dom/attributes.js +111 -28
  124. package/source/dom/constants.js +17 -1
  125. package/source/dom/customcontrol.js +1 -1
  126. package/source/dom/customelement.js +27 -13
  127. package/source/dom/events.js +68 -12
  128. package/source/dom/focusmanager.js +2 -2
  129. package/source/dom/locale.js +2 -2
  130. package/source/dom/resource/data.js +2 -2
  131. package/source/dom/resource/link/stylesheet.js +2 -2
  132. package/source/dom/resource/link.js +2 -2
  133. package/source/dom/resource/script.js +2 -2
  134. package/source/dom/resource.js +2 -2
  135. package/source/dom/resourcemanager.js +2 -2
  136. package/source/dom/template.js +41 -11
  137. package/source/dom/theme.js +3 -3
  138. package/source/dom/updater.js +183 -100
  139. package/source/dom/util.js +6 -6
  140. package/source/dom/worker/factory.js +2 -2
  141. package/source/i18n/formatter.js +4 -4
  142. package/source/i18n/locale.js +4 -4
  143. package/source/i18n/provider.js +2 -2
  144. package/source/i18n/providers/fetch.js +3 -3
  145. package/source/i18n/translations.js +4 -4
  146. package/source/logging/handler/console.js +2 -2
  147. package/source/logging/handler.js +2 -2
  148. package/source/logging/logentry.js +2 -2
  149. package/source/logging/logger.js +2 -2
  150. package/source/math/random.js +2 -2
  151. package/source/namespace.js +1 -1
  152. package/source/text/formatter.js +3 -3
  153. package/source/types/base.js +2 -2
  154. package/source/types/basewithoptions.js +2 -2
  155. package/source/types/binary.js +4 -4
  156. package/source/types/dataurl.js +4 -4
  157. package/source/types/global.js +4 -4
  158. package/source/types/id.js +2 -2
  159. package/source/types/is.js +20 -20
  160. package/source/types/mediatype.js +4 -4
  161. package/source/types/node.js +33 -2
  162. package/source/types/nodelist.js +9 -5
  163. package/source/types/noderecursiveiterator.js +29 -7
  164. package/source/types/observer.js +5 -13
  165. package/source/types/observerlist.js +2 -2
  166. package/source/types/proxyobserver.js +5 -5
  167. package/source/types/queue.js +3 -3
  168. package/source/types/randomid.js +2 -2
  169. package/source/types/regex.js +2 -2
  170. package/source/types/stack.js +2 -2
  171. package/source/types/tokenlist.js +2 -2
  172. package/source/types/typeof.js +3 -3
  173. package/source/types/uniquequeue.js +2 -2
  174. package/source/types/uuid.js +2 -2
  175. package/source/types/validate.js +20 -20
  176. package/source/types/version.js +6 -6
  177. package/source/util/clone.js +2 -2
  178. package/source/util/comparator.js +3 -3
  179. package/source/util/deadmansswitch.js +124 -0
  180. package/source/util/freeze.js +2 -2
  181. package/source/util/processing.js +3 -3
  182. package/source/util/trimspaces.js +2 -2
  183. package/test/cases/data/buildtree.js +84 -21
  184. package/test/cases/dom/attributes.js +29 -6
  185. package/test/cases/dom/events.js +66 -1
  186. package/test/cases/dom/template.js +72 -14
  187. package/test/cases/dom/updater.js +102 -75
  188. package/test/cases/math/random.js +3 -0
  189. package/test/cases/monster.js +1 -1
  190. package/test/cases/types/node.js +57 -1
  191. package/test/cases/types/nodelist.js +7 -0
  192. package/test/cases/types/noderecursiveiterator.js +21 -0
  193. package/test/cases/util/deadmansswitch.js +71 -0
  194. package/test/web/import.js +1 -0
  195. package/test/web/monster-dev.html +3 -3
  196. package/test/web/monster.html +2 -2
  197. package/test/web/test.html +3 -3
  198. package/test/web/tests.js +2 -2
@@ -1,4 +1,4 @@
1
- /** Monster 1.26.1, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
1
+ /** Monster 1.29.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
2
2
  (function webpackUniversalModuleDefinition(root, factory) {
3
3
  if(typeof exports === 'object' && typeof module === 'object')
4
4
  module.exports = factory();
@@ -140,7 +140,7 @@ var Monster = new Namespace("Monster");
140
140
  *
141
141
  * ```
142
142
  * <script type="module">
143
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
143
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
144
144
  * function hello() {
145
145
  * console.log('Hello World!');
146
146
  * }
@@ -387,7 +387,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
387
387
  *
388
388
  * ```
389
389
  * <script type="module">
390
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
390
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
391
391
  * new Monster.Types.Base()
392
392
  * </script>
393
393
  * ```
@@ -396,7 +396,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
396
396
  *
397
397
  * ```
398
398
  * <script type="module">
399
- * import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/base.js';
399
+ * import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/base.js';
400
400
  * new Base()
401
401
  * </script>
402
402
  * ```
@@ -568,7 +568,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
568
568
  *
569
569
  * ```
570
570
  * <script type="module">
571
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
571
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
572
572
  * new Monster.Constraint.AndOperator();
573
573
  * </script>
574
574
  * ```
@@ -577,16 +577,16 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
577
577
  *
578
578
  * ```
579
579
  * <script type="module">
580
- * import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/andoperator.js';
580
+ * import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/andoperator.js';
581
581
  * new AndOperator();
582
582
  * </script>
583
583
  * ```
584
584
  *
585
585
  * @example
586
586
  *
587
- * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/valid.js';
588
- * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/invalid.js';
589
- * import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/andoperator.js';
587
+ * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/valid.js';
588
+ * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/invalid.js';
589
+ * import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/andoperator.js';
590
590
  *
591
591
  * new AndOperator(
592
592
  * new Valid(), new Valid()).isValid()
@@ -688,7 +688,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
688
688
  *
689
689
  * ```
690
690
  * <script type="module">
691
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
691
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
692
692
  * new Monster.Constraint.Invalid();
693
693
  * </script>
694
694
  * ```
@@ -697,14 +697,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
697
697
  *
698
698
  * ```
699
699
  * <script type="module">
700
- * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/invalid.js';
700
+ * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/invalid.js';
701
701
  * new Invalid();
702
702
  * </script>
703
703
  * ```
704
704
  *
705
705
  * @example
706
706
  *
707
- * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/invalid.js';
707
+ * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/invalid.js';
708
708
  *
709
709
  * new Invalid().isValid()
710
710
  * .then(()=>console.log(true))
@@ -799,7 +799,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
799
799
  *
800
800
  * ```
801
801
  * <script type="module">
802
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
802
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
803
803
  * new Monster.Constraint.IsArray()
804
804
  * </script>
805
805
  * ```
@@ -808,14 +808,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
808
808
  *
809
809
  * ```
810
810
  * <script type="module">
811
- * import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/isarray.js';
811
+ * import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/isarray.js';
812
812
  * console.log(new IsArray())
813
813
  * </script>
814
814
  * ```
815
815
  *
816
816
  * @example
817
817
  *
818
- * import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/isarray.js';
818
+ * import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/isarray.js';
819
819
  *
820
820
  * new IsArray()
821
821
  * .isValid([])
@@ -904,7 +904,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
904
904
  *
905
905
  * ```
906
906
  * <script type="module">
907
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
907
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
908
908
  * Monster.Types.isIterable(null) // ↦ false
909
909
  * Monster.Types.isIterable('hello') // ↦ true
910
910
  * Monster.Types.isIterable([]) // ↦ true
@@ -915,7 +915,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
915
915
  *
916
916
  * ```
917
917
  * <script type="module">
918
- * import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/is.js';
918
+ * import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/is.js';
919
919
  * isIterable(null) // ↦ false
920
920
  * isIterable('hello') // ↦ true
921
921
  * isIterable([]) // ↦ true
@@ -943,7 +943,7 @@ function isIterable(value) {
943
943
  *
944
944
  * ```
945
945
  * <script type="module">
946
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
946
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
947
947
  * Monster.Types.isPrimitive('2') // ↦ false
948
948
  * Monster.Types.isPrimitive([]) // ↦ true
949
949
  * </script>
@@ -953,7 +953,7 @@ function isIterable(value) {
953
953
  *
954
954
  * ```
955
955
  * <script type="module">
956
- * import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/is.js';
956
+ * import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/is.js';
957
957
  * isPrimitive('2')) // ↦ true
958
958
  * isPrimitive([])) // ↦ false
959
959
  * </script>
@@ -991,7 +991,7 @@ function isPrimitive(value) {
991
991
  *
992
992
  * ```
993
993
  * <script type="module">
994
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
994
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
995
995
  * Monster.Types.isSymbol('2') // ↦ false
996
996
  * Monster.Types.isSymbol(Symbol('test') // ↦ true
997
997
  * </script>
@@ -1001,7 +1001,7 @@ function isPrimitive(value) {
1001
1001
  *
1002
1002
  * ```
1003
1003
  * <script type="module">
1004
- * import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/is.js';
1004
+ * import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/is.js';
1005
1005
  * isSymbol(Symbol('a'))) // ↦ true
1006
1006
  * isSymbol([]) // ↦ false
1007
1007
  * </script>
@@ -1027,7 +1027,7 @@ function isSymbol(value) {
1027
1027
  *
1028
1028
  * ```
1029
1029
  * <script type="module">
1030
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
1030
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
1031
1031
  * Monster.Types.isBoolean('2') // ↦ false
1032
1032
  * Monster.Types.isBoolean([]) // ↦ false
1033
1033
  * Monster.Types.isBoolean(true) // ↦ true
@@ -1038,7 +1038,7 @@ function isSymbol(value) {
1038
1038
  *
1039
1039
  * ```
1040
1040
  * <script type="module">
1041
- * import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/is.js';
1041
+ * import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/is.js';
1042
1042
  * isBoolean('2')) // ↦ false
1043
1043
  * isBoolean([])) // ↦ false
1044
1044
  * isBoolean(2>4)) // ↦ true
@@ -1069,7 +1069,7 @@ function isBoolean(value) {
1069
1069
  *
1070
1070
  * ```
1071
1071
  * <script type="module">
1072
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
1072
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
1073
1073
  * Monster.Types.isString('2') // ↦ true
1074
1074
  * Monster.Types.isString([]) // ↦ false
1075
1075
  * </script>
@@ -1079,7 +1079,7 @@ function isBoolean(value) {
1079
1079
  *
1080
1080
  * ```
1081
1081
  * <script type="module">
1082
- * import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/is.js';
1082
+ * import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/is.js';
1083
1083
  * isString('2')) // ↦ true
1084
1084
  * isString([])) // ↦ false
1085
1085
  * </script>
@@ -1109,7 +1109,7 @@ function isString(value) {
1109
1109
  *
1110
1110
  * ```
1111
1111
  * <script type="module">
1112
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
1112
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
1113
1113
  * Monster.Types.isObject('2') // ↦ false
1114
1114
  * Monster.Types.isObject([]) // ↦ false
1115
1115
  * Monster.Types.isObject({}) // ↦ true
@@ -1120,7 +1120,7 @@ function isString(value) {
1120
1120
  *
1121
1121
  * ```
1122
1122
  * <script type="module">
1123
- * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/is.js';
1123
+ * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/is.js';
1124
1124
  * isObject('2')) // ↦ false
1125
1125
  * isObject([])) // ↦ false
1126
1126
  * </script>
@@ -1153,7 +1153,7 @@ function isObject(value) {
1153
1153
  *
1154
1154
  * ```
1155
1155
  * <script type="module">
1156
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
1156
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
1157
1157
  * Monster.Types.isInstance('2') // ↦ false
1158
1158
  * Monster.Types.isInstance([]) // ↦ false
1159
1159
  * Monster.Types.isInstance({}) // ↦ true
@@ -1164,7 +1164,7 @@ function isObject(value) {
1164
1164
  *
1165
1165
  * ```
1166
1166
  * <script type="module">
1167
- * import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/is.js';
1167
+ * import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/is.js';
1168
1168
  * isInstance('2')) // ↦ false
1169
1169
  * isInstance([])) // ↦ false
1170
1170
  * </script>
@@ -1194,7 +1194,7 @@ function isInstance(value, instance) {
1194
1194
  *
1195
1195
  * ```
1196
1196
  * <script type="module">
1197
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
1197
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
1198
1198
  * Monster.Types.isArray('2') // ↦ false
1199
1199
  * Monster.Types.isArray([]) // ↦ true
1200
1200
  * </script>
@@ -1204,7 +1204,7 @@ function isInstance(value, instance) {
1204
1204
  *
1205
1205
  * ```
1206
1206
  * <script type="module">
1207
- * import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/is.js';
1207
+ * import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/is.js';
1208
1208
  * isArray('2')) // ↦ false
1209
1209
  * isArray([])) // ↦ true
1210
1210
  * </script>
@@ -1231,7 +1231,7 @@ function isArray(value) {
1231
1231
  *
1232
1232
  * ```
1233
1233
  * <script type="module">
1234
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
1234
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
1235
1235
  * Monster.Types.isFunction(()=>{}) // ↦ true
1236
1236
  * Monster.Types.isFunction('2') // ↦ false
1237
1237
  * Monster.Types.isFunction([]) // ↦ false
@@ -1242,7 +1242,7 @@ function isArray(value) {
1242
1242
  *
1243
1243
  * ```
1244
1244
  * <script type="module">
1245
- * import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/is.js';
1245
+ * import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/is.js';
1246
1246
  * isFunction(()=>{}) // ↦ true
1247
1247
  * isFunction('2')) // ↦ false
1248
1248
  * isFunction([])) // ↦ false
@@ -1276,7 +1276,7 @@ function isFunction(value) {
1276
1276
  *
1277
1277
  * ```
1278
1278
  * <script type="module">
1279
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
1279
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
1280
1280
  * Monster.Types.isInteger(()=>{}) // ↦ true
1281
1281
  * Monster.Types.isInteger('2') // ↦ false
1282
1282
  * Monster.Types.isInteger(2) // ↦ true
@@ -1287,7 +1287,7 @@ function isFunction(value) {
1287
1287
  *
1288
1288
  * ```
1289
1289
  * <script type="module">
1290
- * import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/is.js';
1290
+ * import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/is.js';
1291
1291
  * isInteger(()=>{}) // ↦ true
1292
1292
  * isInteger('2')) // ↦ false
1293
1293
  * isInteger(2)) // ↦ true
@@ -1360,7 +1360,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
1360
1360
  *
1361
1361
  * ```
1362
1362
  * <script type="module">
1363
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
1363
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
1364
1364
  * console.log(new Monster.Constraint.IsObject())
1365
1365
  * </script>
1366
1366
  * ```
@@ -1369,14 +1369,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
1369
1369
  *
1370
1370
  * ```
1371
1371
  * <script type="module">
1372
- * import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/isobject.js';
1372
+ * import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/isobject.js';
1373
1373
  * console.log(new IsObject())
1374
1374
  * </script>
1375
1375
  * ```
1376
1376
  *
1377
1377
  * @example
1378
1378
  *
1379
- * import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/isobject.js';
1379
+ * import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/isobject.js';
1380
1380
  *
1381
1381
  * new IsObject()
1382
1382
  * .isValid({})
@@ -1479,7 +1479,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
1479
1479
  *
1480
1480
  * ```
1481
1481
  * <script type="module">
1482
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
1482
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
1483
1483
  * new Monster.Constraint.OrOperator();
1484
1484
  * </script>
1485
1485
  * ```
@@ -1488,16 +1488,16 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
1488
1488
  *
1489
1489
  * ```
1490
1490
  * <script type="module">
1491
- * import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraint/oroperator.js';
1491
+ * import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraint/oroperator.js';
1492
1492
  * new OrOperator();
1493
1493
  * </script>
1494
1494
  * ```
1495
1495
  *
1496
1496
  * @example
1497
1497
  *
1498
- * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/valid.js';
1499
- * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/invalid.js';
1500
- * import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/oroperator.js';
1498
+ * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/valid.js';
1499
+ * import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/invalid.js';
1500
+ * import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/oroperator.js';
1501
1501
  *
1502
1502
  * new OrOperator(
1503
1503
  * new Valid(), new Invalid()).isValid()
@@ -1622,7 +1622,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
1622
1622
  *
1623
1623
  * ```
1624
1624
  * <script type="module">
1625
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
1625
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
1626
1626
  * new Monster.Constraint.Valid();
1627
1627
  * </script>
1628
1628
  * ```
@@ -1631,14 +1631,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
1631
1631
  *
1632
1632
  * ```
1633
1633
  * <script type="module">
1634
- * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/valid.js';
1634
+ * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/valid.js';
1635
1635
  * new Valid();
1636
1636
  * </script>
1637
1637
  * ```
1638
1638
  *
1639
1639
  * @example
1640
1640
  *
1641
- * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/constraints/valid.js';
1641
+ * import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/constraints/valid.js';
1642
1642
  *
1643
1643
  * new Valid().isValid()
1644
1644
  * .then(()=>console.log(true))
@@ -1747,7 +1747,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
1747
1747
  *
1748
1748
  * ```
1749
1749
  * <script type="module">
1750
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
1750
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
1751
1751
  * console.log(Monster.Data.buildMap())
1752
1752
  * </script>
1753
1753
  * ```
@@ -1756,7 +1756,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
1756
1756
  *
1757
1757
  * ```
1758
1758
  * <script type="module">
1759
- * import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/buildmap.js';
1759
+ * import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/buildmap.js';
1760
1760
  * console.log(buildMap())
1761
1761
  * </script>
1762
1762
  * ```
@@ -1767,7 +1767,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
1767
1767
  *
1768
1768
  * @example
1769
1769
  *
1770
- * import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/buildmap.js';
1770
+ * import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/buildmap.js';
1771
1771
  * // a typical data structure as reported by an api
1772
1772
  *
1773
1773
  * let map;
@@ -1859,7 +1859,8 @@ function buildMap(subject, selector, valueTemplate, keyTemplate, filter) {
1859
1859
  * @param {string|Monster.Data~exampleSelectorCallback} selector
1860
1860
  * @param {Monster.Data~exampleFilterCallback} [filter]
1861
1861
  * @param {function} callback
1862
- * @return {*}
1862
+ * @return {Map}
1863
+ * @throws {TypeError} selector is neither a string nor a function
1863
1864
  */
1864
1865
 
1865
1866
 
@@ -1877,7 +1878,7 @@ function assembleParts(subject, selector, filter, callback) {
1877
1878
  map = new Map();
1878
1879
  buildFlatMap.call(map, subject, selector);
1879
1880
  } else {
1880
- throw new TypeError('value is neither a string nor a function');
1881
+ throw new TypeError('selector is neither a string nor a function');
1881
1882
  }
1882
1883
 
1883
1884
  if (!(map instanceof Map)) {
@@ -1943,7 +1944,7 @@ function buildFlatMap(subject, selector, key, parentMap) {
1943
1944
  var kk = copyKey.join(_pathfinder_js__WEBPACK_IMPORTED_MODULE_4__.DELIMITER);
1944
1945
  var sub = buildFlatMap.call(result, o, parts.join(_pathfinder_js__WEBPACK_IMPORTED_MODULE_4__.DELIMITER), copyKey, o);
1945
1946
 
1946
- if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_1__.isObject)(sub)) {
1947
+ if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_1__.isObject)(sub) && parentMap !== undefined) {
1947
1948
  sub['^'] = parentMap;
1948
1949
  }
1949
1950
 
@@ -1997,7 +1998,7 @@ function buildFlatMap(subject, selector, key, parentMap) {
1997
1998
  * Alternatively to a string selector a callback can be specified. this must return a map.
1998
1999
  *
1999
2000
  * @example
2000
- * import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/buildmap.js';
2001
+ * import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/buildmap.js';
2001
2002
  *
2002
2003
  * let obj = {
2003
2004
  * "data": [
@@ -2200,7 +2201,7 @@ __webpack_require__.r(__webpack_exports__);
2200
2201
  *
2201
2202
  * ```
2202
2203
  * <script type="module">
2203
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2204
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2204
2205
  * console.log(Monster.Types.validateIterable('2')) // ↦ TypeError
2205
2206
  * console.log(Monster.Types.validateIterable([])) // ↦ value
2206
2207
  * </script>
@@ -2210,7 +2211,7 @@ __webpack_require__.r(__webpack_exports__);
2210
2211
  *
2211
2212
  * ```
2212
2213
  * <script type="module">
2213
- * import {validateIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/validate.js';
2214
+ * import {validateIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/validate.js';
2214
2215
  * console.log(validateIterable('2')) // ↦ TypeError
2215
2216
  * console.log(validateIterable([])) // ↦ value
2216
2217
  * </script>
@@ -2241,7 +2242,7 @@ function validateIterable(value) {
2241
2242
  *
2242
2243
  * ```
2243
2244
  * <script type="module">
2244
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2245
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2245
2246
  * console.log(Monster.Types.validatePrimitive('2')) // ↦ value
2246
2247
  * console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError
2247
2248
  * </script>
@@ -2251,7 +2252,7 @@ function validateIterable(value) {
2251
2252
  *
2252
2253
  * ```
2253
2254
  * <script type="module">
2254
- * import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/validate.js';
2255
+ * import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/validate.js';
2255
2256
  * console.log(validatePrimitive('2')) // ↦ value
2256
2257
  * console.log(validatePrimitive([])) // ↦ TypeError
2257
2258
  * </script>
@@ -2283,7 +2284,7 @@ function validatePrimitive(value) {
2283
2284
  *
2284
2285
  * ```
2285
2286
  * <script type="module">
2286
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2287
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2287
2288
  * console.log(Monster.Types.validateBoolean(true)) // ↦ value
2288
2289
  * console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError
2289
2290
  * console.log(Monster.Types.validateBoolean([])) // ↦ TypeError
@@ -2294,7 +2295,7 @@ function validatePrimitive(value) {
2294
2295
  *
2295
2296
  * ```
2296
2297
  * <script type="module">
2297
- * import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/validate.js';
2298
+ * import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/validate.js';
2298
2299
  * console.log(validateBoolean(false)) // ↦ value
2299
2300
  * console.log(validateBoolean('2')) // ↦ TypeError
2300
2301
  * console.log(validateBoolean([])) // ↦ TypeError
@@ -2325,7 +2326,7 @@ function validateBoolean(value) {
2325
2326
  *
2326
2327
  * ```
2327
2328
  * <script type="module">
2328
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2329
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2329
2330
  * console.log(Monster.Types.validateString('2')) // ↦ value
2330
2331
  * console.log(Monster.Types.validateString([])) // ↦ TypeError
2331
2332
  * </script>
@@ -2335,7 +2336,7 @@ function validateBoolean(value) {
2335
2336
  *
2336
2337
  * ```
2337
2338
  * <script type="module">
2338
- * import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/validate.js';
2339
+ * import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/validate.js';
2339
2340
  * console.log(validateString('2')) // ↦ value
2340
2341
  * console.log(validateString([])) // ↦ TypeError
2341
2342
  * </script>
@@ -2364,7 +2365,7 @@ function validateString(value) {
2364
2365
  *
2365
2366
  * ```
2366
2367
  * <script type="module">
2367
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2368
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2368
2369
  * console.log(Monster.Types.validateObject({})) // ↦ value
2369
2370
  * console.log(Monster.Types.validateObject('2')) // ↦ TypeError
2370
2371
  * console.log(Monster.Types.validateObject([])) // ↦ TypeError
@@ -2375,7 +2376,7 @@ function validateString(value) {
2375
2376
  *
2376
2377
  * ```
2377
2378
  * <script type="module">
2378
- * import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/validate.js';
2379
+ * import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/validate.js';
2379
2380
  * console.log(validateObject({})) // ↦ value
2380
2381
  * console.log(validateObject('2')) // ↦ TypeError
2381
2382
  * console.log(validateObject([])) // ↦ TypeError
@@ -2405,7 +2406,7 @@ function validateObject(value) {
2405
2406
  *
2406
2407
  * ```
2407
2408
  * <script type="module">
2408
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2409
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2409
2410
  * console.log(Monster.Types.validateInstance({}, Object)) // ↦ value
2410
2411
  * console.log(Monster.Types.validateInstance('2', Object)) // ↦ TypeError
2411
2412
  * console.log(Monster.Types.validateInstance([], Object)) // ↦ TypeError
@@ -2416,7 +2417,7 @@ function validateObject(value) {
2416
2417
  *
2417
2418
  * ```
2418
2419
  * <script type="module">
2419
- * import {validateInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/validate.js';
2420
+ * import {validateInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/validate.js';
2420
2421
  * console.log(validateInstance({}, Object)) // ↦ value
2421
2422
  * console.log(validateInstance('2', Object)) // ↦ TypeError
2422
2423
  * console.log(validateInstance([], Object)) // ↦ TypeError
@@ -2456,7 +2457,7 @@ function validateInstance(value, instance) {
2456
2457
  *
2457
2458
  * ```
2458
2459
  * <script type="module">
2459
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2460
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2460
2461
  * console.log(Monster.Types.validateArray('2')) // ↦ TypeError
2461
2462
  * console.log(Monster.Types.validateArray([])) // ↦ value
2462
2463
  * </script>
@@ -2466,7 +2467,7 @@ function validateInstance(value, instance) {
2466
2467
  *
2467
2468
  * ```
2468
2469
  * <script type="module">
2469
- * import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/validate.js';
2470
+ * import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/validate.js';
2470
2471
  * console.log(validateArray('2')) // ↦ TypeError
2471
2472
  * console.log(validateArray([])) // ↦ value
2472
2473
  * </script>
@@ -2495,7 +2496,7 @@ function validateArray(value) {
2495
2496
  *
2496
2497
  * ```
2497
2498
  * <script type="module">
2498
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2499
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2499
2500
  * console.log(Monster.Types.validateSymbol('2')) // ↦ TypeError
2500
2501
  * console.log(Monster.Types.validateSymbol([])) // ↦ value
2501
2502
  * </script>
@@ -2505,7 +2506,7 @@ function validateArray(value) {
2505
2506
  *
2506
2507
  * ```
2507
2508
  * <script type="module">
2508
- * import {validateSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/validate.js';
2509
+ * import {validateSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/validate.js';
2509
2510
  * console.log(validateSymbol('2')) // ↦ TypeError
2510
2511
  * console.log(validateSymbol()) // ↦ value
2511
2512
  * </script>
@@ -2534,7 +2535,7 @@ function validateSymbol(value) {
2534
2535
  *
2535
2536
  * ```
2536
2537
  * <script type="module">
2537
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2538
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2538
2539
  * console.log(Monster.Types.validateFunction(()=>{})) // ↦ value
2539
2540
  * console.log(Monster.Types.validateFunction('2')) // ↦ TypeError
2540
2541
  * console.log(Monster.Types.validateFunction([])) // ↦ TypeError
@@ -2545,7 +2546,7 @@ function validateSymbol(value) {
2545
2546
  *
2546
2547
  * ```
2547
2548
  * <script type="module">
2548
- * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/validate.js';
2549
+ * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/validate.js';
2549
2550
  * console.log(validateFunction(()=>{})) // ↦ value
2550
2551
  * console.log(validateFunction('2')) // ↦ TypeError
2551
2552
  * console.log(validateFunction([])) // ↦ TypeError
@@ -2575,7 +2576,7 @@ function validateFunction(value) {
2575
2576
  *
2576
2577
  * ```
2577
2578
  * <script type="module">
2578
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2579
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2579
2580
  * console.log(Monster.Types.validateInteger(true)) // ↦ TypeError
2580
2581
  * console.log(Monster.Types.validateInteger('2')) // ↦ TypeError
2581
2582
  * console.log(Monster.Types.validateInteger(2)) // ↦ value
@@ -2586,7 +2587,7 @@ function validateFunction(value) {
2586
2587
  *
2587
2588
  * ```
2588
2589
  * <script type="module">
2589
- * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/validate.js';
2590
+ * import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/validate.js';
2590
2591
  * console.log(validateInteger(true)) // ↦ TypeError
2591
2592
  * console.log(validateInteger('2')) // ↦ TypeError
2592
2593
  * console.log(validateInteger(2)) // ↦ value
@@ -2652,7 +2653,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
2652
2653
  *
2653
2654
  * ```
2654
2655
  * <script type="module">
2655
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2656
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2656
2657
  * Monster.Util.clone({})
2657
2658
  * </script>
2658
2659
  * ```
@@ -2661,7 +2662,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
2661
2662
  *
2662
2663
  * ```
2663
2664
  * <script type="module">
2664
- * import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/util/clone.js';
2665
+ * import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/util/clone.js';
2665
2666
  * clone({})
2666
2667
  * </script>
2667
2668
  * ```
@@ -2873,7 +2874,7 @@ function getGlobal() {
2873
2874
  *
2874
2875
  * ```
2875
2876
  * <script type="module">
2876
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2877
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2877
2878
  * Monster.Types.getGlobalObject('document')
2878
2879
  * // ↦ { }
2879
2880
  * </script>
@@ -2883,7 +2884,7 @@ function getGlobal() {
2883
2884
  *
2884
2885
  * ```
2885
2886
  * <script type="module">
2886
- * import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/global.js';
2887
+ * import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/global.js';
2887
2888
  * getGlobalObject('document')
2888
2889
  * // ↦ { }
2889
2890
  * </script>
@@ -2915,7 +2916,7 @@ function getGlobalObject(name) {
2915
2916
  *
2916
2917
  * ```
2917
2918
  * <script type="module">
2918
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2919
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2919
2920
  * console.log(Monster.Types.getGlobalFunction('parseInt')) // ↦ f parseInt() { }
2920
2921
  * </script>
2921
2922
  * ```
@@ -2924,7 +2925,7 @@ function getGlobalObject(name) {
2924
2925
  *
2925
2926
  * ```
2926
2927
  * <script type="module">
2927
- * import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/global.js';
2928
+ * import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/global.js';
2928
2929
  * console.log(getGlobalFunction('parseInt')) // ↦ f parseInt() { }
2929
2930
  * </script>
2930
2931
  * ```
@@ -2975,7 +2976,7 @@ __webpack_require__.r(__webpack_exports__);
2975
2976
  *
2976
2977
  * ```
2977
2978
  * <script type="module">
2978
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
2979
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
2979
2980
  * console.log(Monster.Types.typeOf())
2980
2981
  * </script>
2981
2982
  * ```
@@ -2984,14 +2985,14 @@ __webpack_require__.r(__webpack_exports__);
2984
2985
  *
2985
2986
  * ```
2986
2987
  * <script type="module">
2987
- * import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/typeof.js';
2988
+ * import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/typeof.js';
2988
2989
  * console.log(typeOf())
2989
2990
  * </script>
2990
2991
  * ```
2991
2992
  *
2992
2993
  * @example
2993
2994
  *
2994
- * import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/typeof.js';
2995
+ * import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/typeof.js';
2995
2996
  *
2996
2997
  * console.log(typeOf(undefined)); // ↦ undefined
2997
2998
  * console.log(typeOf("")); // ↦ string
@@ -3110,7 +3111,7 @@ var WILDCARD = '*';
3110
3111
  *
3111
3112
  * ```
3112
3113
  * <script type="module">
3113
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
3114
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
3114
3115
  * console.log(new Monster.Data.Pathfinder())
3115
3116
  * </script>
3116
3117
  * ```
@@ -3119,7 +3120,7 @@ var WILDCARD = '*';
3119
3120
  *
3120
3121
  * ```
3121
3122
  * <script type="module">
3122
- * import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/pathfinder.js';
3123
+ * import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/pathfinder.js';
3123
3124
  * console.log(new Pathfinder())
3124
3125
  * </script>
3125
3126
  * ```
@@ -3161,7 +3162,7 @@ var WILDCARD = '*';
3161
3162
  *
3162
3163
  * @example
3163
3164
  *
3164
- * import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/pathfinder.js';
3165
+ * import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/pathfinder.js';
3165
3166
  *
3166
3167
  * let value = new Pathfinder({
3167
3168
  * a: {
@@ -3187,7 +3188,7 @@ var WILDCARD = '*';
3187
3188
  *
3188
3189
  * @example
3189
3190
  *
3190
- * import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/pathfinder.js';
3191
+ * import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/pathfinder.js';
3191
3192
  *
3192
3193
  * let p = new Pathfinder({
3193
3194
  * a: {
@@ -3602,7 +3603,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
3602
3603
  *
3603
3604
  * ```
3604
3605
  * <script type="module">
3605
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
3606
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
3606
3607
  * console.log(new Monster.Types.Stack())
3607
3608
  * </script>
3608
3609
  * ```
@@ -3611,7 +3612,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
3611
3612
  *
3612
3613
  * ```
3613
3614
  * <script type="module">
3614
- * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/stack.js';
3615
+ * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/stack.js';
3615
3616
  * console.log(new Stack())
3616
3617
  * </script>
3617
3618
  * ```
@@ -3746,7 +3747,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
3746
3747
  *
3747
3748
  * ```
3748
3749
  * <script type="module">
3749
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
3750
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
3750
3751
  * Monster.Data.Diff(a, b)
3751
3752
  * </script>
3752
3753
  * ```
@@ -3755,14 +3756,14 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
3755
3756
  *
3756
3757
  * ```
3757
3758
  * <script type="module">
3758
- * import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/diff.js';
3759
+ * import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/diff.js';
3759
3760
  * Diff(a, b)
3760
3761
  * </script>
3761
3762
  * ```
3762
3763
  *
3763
3764
  * @example
3764
3765
  *
3765
- * import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/diff.js';
3766
+ * import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/diff.js';
3766
3767
  *
3767
3768
  * // given are two objects x and y.
3768
3769
  *
@@ -4008,7 +4009,7 @@ __webpack_require__.r(__webpack_exports__);
4008
4009
  *
4009
4010
  * ```
4010
4011
  * <script type="module">
4011
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
4012
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
4012
4013
  * Monster.Data.extend(a, b)
4013
4014
  * </script>
4014
4015
  * ```
@@ -4017,7 +4018,7 @@ __webpack_require__.r(__webpack_exports__);
4017
4018
  *
4018
4019
  * ```
4019
4020
  * <script type="module">
4020
- * import {extend} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/extend.js';
4021
+ * import {extend} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/extend.js';
4021
4022
  * extend(a, b)
4022
4023
  * </script>
4023
4024
  * ```
@@ -4146,7 +4147,7 @@ var DELIMITER = '|';
4146
4147
  *
4147
4148
  * ```
4148
4149
  * <script type="module">
4149
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
4150
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
4150
4151
  * new Monster.Data.Pipe()
4151
4152
  * </script>
4152
4153
  * ```
@@ -4155,7 +4156,7 @@ var DELIMITER = '|';
4155
4156
  *
4156
4157
  * ```
4157
4158
  * <script type="module">
4158
- * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/pipe.js';
4159
+ * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/pipe.js';
4159
4160
  * new Pipe()
4160
4161
  * </script>
4161
4162
  * ```
@@ -4166,7 +4167,7 @@ var DELIMITER = '|';
4166
4167
  * the word is then converted to uppercase letters and a prefix Hello is added. the two backslash safe the space char.
4167
4168
  *
4168
4169
  * @example
4169
- * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/pipe.js';
4170
+ * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/pipe.js';
4170
4171
  *
4171
4172
  * let obj = {
4172
4173
  * a: {
@@ -4328,7 +4329,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
4328
4329
  *
4329
4330
  * ```
4330
4331
  * <script type="module">
4331
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
4332
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
4332
4333
  * new Monster.Data.Transformer()
4333
4334
  * </script>
4334
4335
  * ```
@@ -4337,7 +4338,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
4337
4338
  *
4338
4339
  * ```
4339
4340
  * <script type="module">
4340
- * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/transformer.js';
4341
+ * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/transformer.js';
4341
4342
  * new Transformer()
4342
4343
  * </script>
4343
4344
  * ```
@@ -4423,7 +4424,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
4423
4424
  *
4424
4425
  * @example
4425
4426
  *
4426
- * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/data/transformer.js';
4427
+ * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/data/transformer.js';
4427
4428
  *
4428
4429
  * const transformer = new Transformer("tolower")
4429
4430
  *
@@ -4956,7 +4957,7 @@ var internalCounter = new Map();
4956
4957
  *
4957
4958
  * ```
4958
4959
  * <script type="module">
4959
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
4960
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
4960
4961
  * console.log(new Monster.Types.ID())
4961
4962
  * </script>
4962
4963
  * ```
@@ -4965,7 +4966,7 @@ var internalCounter = new Map();
4965
4966
  *
4966
4967
  * ```
4967
4968
  * <script type="module">
4968
- * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/id.js';
4969
+ * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/id.js';
4969
4970
  * console.log(new ID())
4970
4971
  * </script>
4971
4972
  * ```
@@ -5088,7 +5089,7 @@ var ATTRIBUTEPREFIX = "data-monster-";
5088
5089
  *
5089
5090
  * ```
5090
5091
  * <script type="module">
5091
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
5092
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
5092
5093
  * console.log(new Monster.DOM.Assembler())
5093
5094
  * </script>
5094
5095
  * ```
@@ -5097,7 +5098,7 @@ var ATTRIBUTEPREFIX = "data-monster-";
5097
5098
  *
5098
5099
  * ```
5099
5100
  * <script type="module">
5100
- * import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/assembler.js';
5101
+ * import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/assembler.js';
5101
5102
  * console.log(new Assembler())
5102
5103
  * </script>
5103
5104
  * ```
@@ -5238,7 +5239,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
5238
5239
  *
5239
5240
  * ```
5240
5241
  * <script type="module">
5241
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
5242
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
5242
5243
  * new Monster.Types.ProxyObserver()
5243
5244
  * </script>
5244
5245
  * ```
@@ -5247,7 +5248,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
5247
5248
  *
5248
5249
  * ```
5249
5250
  * <script type="module">
5250
- * import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/proxyobserver.js';
5251
+ * import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/proxyobserver.js';
5251
5252
  * new ProxyObserver()
5252
5253
  * </script>
5253
5254
  * ```
@@ -5258,9 +5259,9 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
5258
5259
  *
5259
5260
  * @example
5260
5261
  *
5261
- * import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/proxyobserver.js';
5262
- * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/observer.js';
5263
- * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/is.js';
5262
+ * import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/proxyobserver.js';
5263
+ * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/observer.js';
5264
+ * import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/is.js';
5264
5265
  *
5265
5266
  * const o = new Observer(function () {
5266
5267
  * if (isObject(this) && this instanceof ProxyObserver) {
@@ -5585,26 +5586,21 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
5585
5586
  * You can call the method via the monster namespace `new Monster.Types.Observer()`.
5586
5587
  *
5587
5588
  * ```
5588
- * <script type="module">
5589
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
5590
- * console.log(new Monster.Types.Observer())
5591
- * </script>
5589
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
5590
+ * new Monster.Types.Observer()
5592
5591
  * ```
5593
5592
  *
5594
5593
  * Alternatively, you can also integrate this function individually.
5595
5594
  *
5596
5595
  * ```
5597
- * <script type="module">
5598
- * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/observer.js';
5599
- * console.log(new Observer())
5600
- * </script>
5596
+ * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/observer.js';
5597
+ * new Observer()
5601
5598
  * ```
5602
5599
  *
5603
5600
  * The update method is called with the subject object as this pointer. For this reason the callback should not
5604
5601
  * be an arrow function, because it gets the this pointer of its own context.
5605
5602
  *
5606
5603
  * ```
5607
- * <script>
5608
5604
  * new Observer(()=>{
5609
5605
  * // this is not subject
5610
5606
  * })
@@ -5612,24 +5608,21 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
5612
5608
  * new Observer(function() {
5613
5609
  * // this is subject
5614
5610
  * })
5615
- * </script>
5616
5611
  * ```
5617
5612
  *
5618
5613
  * Additional arguments can be passed to the callback. To do this, simply specify them.
5619
5614
  *
5620
5615
  * ```
5621
- * <script>
5622
5616
  * Observer(function(a, b, c) {
5623
5617
  * console.log(a, b, c); // ↦ "a", 2, true
5624
5618
  * }, "a", 2, true)
5625
- * </script>
5626
5619
  * ```
5627
5620
  *
5628
5621
  * The callback function must have as many parameters as arguments are given.
5629
5622
  *
5630
5623
  * @example
5631
5624
  *
5632
- * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/observer.js';
5625
+ * import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/observer.js';
5633
5626
  *
5634
5627
  * const observer = new Observer(function(a, b, c) {
5635
5628
  * console.log(this, a, b, c); // ↦ "a", 2, true
@@ -5829,7 +5822,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
5829
5822
  *
5830
5823
  * ```
5831
5824
  * <script type="module">
5832
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
5825
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
5833
5826
  * new Monster.Types.TokenList("myclass row")
5834
5827
  * </script>
5835
5828
  * ```
@@ -5838,7 +5831,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
5838
5831
  *
5839
5832
  * ```
5840
5833
  * <script type="module">
5841
- * import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/tokenlist.js';
5834
+ * import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/tokenlist.js';
5842
5835
  * new TokenList("myclass row")
5843
5836
  * </script>
5844
5837
  * ```
@@ -6261,7 +6254,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
6261
6254
  *
6262
6255
  * ```
6263
6256
  * <script type="module">
6264
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
6257
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
6265
6258
  * new Monster.Types.UniqueQueue()
6266
6259
  * </script>
6267
6260
  * ```
@@ -6270,7 +6263,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
6270
6263
  *
6271
6264
  * ```
6272
6265
  * <script type="module">
6273
- * import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/uniquequeue.js';
6266
+ * import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/uniquequeue.js';
6274
6267
  * new UniqueQueue()
6275
6268
  * </script>
6276
6269
  * ```
@@ -6405,7 +6398,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
6405
6398
  *
6406
6399
  * ```
6407
6400
  * <script type="module">
6408
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
6401
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
6409
6402
  * new Monster.Types.Queue()
6410
6403
  * </script>
6411
6404
  * ```
@@ -6414,14 +6407,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
6414
6407
  *
6415
6408
  * ```
6416
6409
  * <script type="module">
6417
- * import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/queue.js';
6410
+ * import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/queue.js';
6418
6411
  * new Queue()
6419
6412
  * </script>
6420
6413
  * ```
6421
6414
  *
6422
6415
  * @example
6423
6416
  *
6424
- * import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/queue.js';
6417
+ * import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/queue.js';
6425
6418
  *
6426
6419
  * const queue = new Queue;
6427
6420
  *
@@ -6590,7 +6583,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
6590
6583
  *
6591
6584
  * ```
6592
6585
  * <script type="module">
6593
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
6586
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
6594
6587
  * console.log(new Monster.Types.ObserverList())
6595
6588
  * console.log(new Monster.Types.ObserverList())
6596
6589
  * </script>
@@ -6600,7 +6593,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
6600
6593
  *
6601
6594
  * ```
6602
6595
  * <script type="module">
6603
- * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/observerlist.js';
6596
+ * import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/observerlist.js';
6604
6597
  * console.log(ObserverList())
6605
6598
  * console.log(ObserverList())
6606
6599
  * </script>
@@ -6732,7 +6725,8 @@ __webpack_require__.r(__webpack_exports__);
6732
6725
  /* harmony export */ "addAttributeToken": function() { return /* binding */ addAttributeToken; },
6733
6726
  /* harmony export */ "toggleAttributeToken": function() { return /* binding */ toggleAttributeToken; },
6734
6727
  /* harmony export */ "getLinkedObjects": function() { return /* binding */ getLinkedObjects; },
6735
- /* harmony export */ "findClosestObjectLink": function() { return /* binding */ findClosestObjectLink; }
6728
+ /* harmony export */ "findClosestObjectLink": function() { return /* binding */ findClosestObjectLink; },
6729
+ /* harmony export */ "findClosestByClass": function() { return /* binding */ findClosestByClass; }
6736
6730
  /* harmony export */ });
6737
6731
  /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
6738
6732
  /* harmony import */ var _types_global_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
@@ -6759,7 +6753,7 @@ __webpack_require__.r(__webpack_exports__);
6759
6753
  *
6760
6754
  * ```
6761
6755
  * <script type="module">
6762
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
6756
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
6763
6757
  * console.log(Monster.DOM.findClosestObjectLink())
6764
6758
  * </script>
6765
6759
  * ```
@@ -6768,7 +6762,7 @@ __webpack_require__.r(__webpack_exports__);
6768
6762
  *
6769
6763
  * ```
6770
6764
  * <script type="module">
6771
- * import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/updater.js';
6765
+ * import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/updater.js';
6772
6766
  * console.log(findClosestObjectLink())
6773
6767
  * </script>
6774
6768
  * ```
@@ -6789,7 +6783,7 @@ function findClosestObjectLink(element) {
6789
6783
  *
6790
6784
  * ```
6791
6785
  * <script type="module">
6792
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
6786
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
6793
6787
  * Monster.DOM.addToObjectLink();
6794
6788
  * </script>
6795
6789
  * ```
@@ -6798,7 +6792,7 @@ function findClosestObjectLink(element) {
6798
6792
  *
6799
6793
  * ```
6800
6794
  * <script type="module">
6801
- * import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/attributes.js';
6795
+ * import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/attributes.js';
6802
6796
  * addToObjectLink();
6803
6797
  * </script>
6804
6798
  * ```
@@ -6830,7 +6824,7 @@ function addToObjectLink(element, symbol, object) {
6830
6824
  *
6831
6825
  * ```
6832
6826
  * <script type="module">
6833
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
6827
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
6834
6828
  * Monster.DOM.removeObjectLink();
6835
6829
  * </script>
6836
6830
  * ```
@@ -6839,7 +6833,7 @@ function addToObjectLink(element, symbol, object) {
6839
6833
  *
6840
6834
  * ```
6841
6835
  * <script type="module">
6842
- * import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/attributes.js';
6836
+ * import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/attributes.js';
6843
6837
  * removeObjectLink();
6844
6838
  * </script>
6845
6839
  * ```
@@ -6870,7 +6864,7 @@ function removeObjectLink(element, symbol) {
6870
6864
  *
6871
6865
  * ```
6872
6866
  * <script type="module">
6873
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
6867
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
6874
6868
  * Monster.DOM.hasObjectLink();
6875
6869
  * </script>
6876
6870
  * ```
@@ -6879,7 +6873,7 @@ function removeObjectLink(element, symbol) {
6879
6873
  *
6880
6874
  * ```
6881
6875
  * <script type="module">
6882
- * import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/attributes.js';
6876
+ * import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/attributes.js';
6883
6877
  * hasObjectLink();
6884
6878
  * </script>
6885
6879
  * ```
@@ -6915,7 +6909,7 @@ function hasObjectLink(element, symbol) {
6915
6909
  *
6916
6910
  * ```
6917
6911
  * <script type="module">
6918
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
6912
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
6919
6913
  * Monster.DOM.getLinkedObjects();
6920
6914
  * </script>
6921
6915
  * ```
@@ -6924,7 +6918,7 @@ function hasObjectLink(element, symbol) {
6924
6918
  *
6925
6919
  * ```
6926
6920
  * <script type="module">
6927
- * import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/attributes.js';
6921
+ * import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/attributes.js';
6928
6922
  * getLinkedObjects();
6929
6923
  * </script>
6930
6924
  * ```
@@ -6958,7 +6952,7 @@ function getLinkedObjects(element, symbol) {
6958
6952
  *
6959
6953
  * ```
6960
6954
  * <script type="module">
6961
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
6955
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
6962
6956
  * Monster.DOM.toggleAttributeToken();
6963
6957
  * </script>
6964
6958
  * ```
@@ -6967,7 +6961,7 @@ function getLinkedObjects(element, symbol) {
6967
6961
  *
6968
6962
  * ```
6969
6963
  * <script type="module">
6970
- * import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/attributes.js';
6964
+ * import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/attributes.js';
6971
6965
  * toggleAttributeToken();
6972
6966
  * </script>
6973
6967
  * ```
@@ -7002,7 +6996,7 @@ function toggleAttributeToken(element, key, token) {
7002
6996
  *
7003
6997
  * ```
7004
6998
  * <script type="module">
7005
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
6999
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
7006
7000
  * Monster.DOM.addAttributeToken();
7007
7001
  * </script>
7008
7002
  * ```
@@ -7011,7 +7005,7 @@ function toggleAttributeToken(element, key, token) {
7011
7005
  *
7012
7006
  * ```
7013
7007
  * <script type="module">
7014
- * import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/attributes.js';
7008
+ * import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/attributes.js';
7015
7009
  * addAttributeToken();
7016
7010
  * </script>
7017
7011
  * ```
@@ -7048,7 +7042,7 @@ function addAttributeToken(element, key, token) {
7048
7042
  *
7049
7043
  * ```
7050
7044
  * <script type="module">
7051
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
7045
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
7052
7046
  * Monster.DOM.removeAttributeToken();
7053
7047
  * </script>
7054
7048
  * ```
@@ -7057,7 +7051,7 @@ function addAttributeToken(element, key, token) {
7057
7051
  *
7058
7052
  * ```
7059
7053
  * <script type="module">
7060
- * import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/attributes.js';
7054
+ * import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/attributes.js';
7061
7055
  * removeAttributeToken();
7062
7056
  * </script>
7063
7057
  * ```
@@ -7093,7 +7087,7 @@ function removeAttributeToken(element, key, token) {
7093
7087
  *
7094
7088
  * ```
7095
7089
  * <script type="module">
7096
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
7090
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
7097
7091
  * Monster.DOM.containsAttributeToken();
7098
7092
  * </script>
7099
7093
  * ```
@@ -7102,7 +7096,7 @@ function removeAttributeToken(element, key, token) {
7102
7096
  *
7103
7097
  * ```
7104
7098
  * <script type="module">
7105
- * import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/attributes.js';
7099
+ * import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/attributes.js';
7106
7100
  * containsAttributeToken();
7107
7101
  * </script>
7108
7102
  * ```
@@ -7135,7 +7129,7 @@ function containsAttributeToken(element, key, token) {
7135
7129
  *
7136
7130
  * ```
7137
7131
  * <script type="module">
7138
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
7132
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
7139
7133
  * Monster.DOM.replaceAttributeToken();
7140
7134
  * </script>
7141
7135
  * ```
@@ -7144,7 +7138,7 @@ function containsAttributeToken(element, key, token) {
7144
7138
  *
7145
7139
  * ```
7146
7140
  * <script type="module">
7147
- * import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/attributes.js';
7141
+ * import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/attributes.js';
7148
7142
  * replaceAttributeToken();
7149
7143
  * </script>
7150
7144
  * ```
@@ -7180,7 +7174,7 @@ function replaceAttributeToken(element, key, from, to) {
7180
7174
  *
7181
7175
  * ```
7182
7176
  * <script type="module">
7183
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
7177
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
7184
7178
  * Monster.DOM.clearAttributeTokens();
7185
7179
  * </script>
7186
7180
  * ```
@@ -7189,7 +7183,7 @@ function replaceAttributeToken(element, key, from, to) {
7189
7183
  *
7190
7184
  * ```
7191
7185
  * <script type="module">
7192
- * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/attributes.js';
7186
+ * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/attributes.js';
7193
7187
  * clearAttributeTokens();
7194
7188
  * </script>
7195
7189
  * ```
@@ -7215,11 +7209,29 @@ function clearAttributeTokens(element, key) {
7215
7209
  return element;
7216
7210
  }
7217
7211
  /**
7212
+ * This function searches, starting from an `HTMLElemement`, for the next element that has a certain attribute.
7213
+ *
7214
+ * ```html
7215
+ * <div data-my-attribute="2" id="2">
7216
+ * <div id="1"></div>
7217
+ * </div>
7218
+ * ```
7219
+ *
7220
+ * ```javascript
7221
+ * // if no value is specified (undefined), then only the attribute is checked.
7222
+ * findClosestByAttribute(document.getElementById('1'),'data-my-attribute'); // ↦ node with id 2
7223
+ * findClosestByAttribute(document.getElementById('2'),'data-my-attribute'); // ↦ node with id 2
7224
+ *
7225
+ * // if a value is specified, for example an empty string, then the name and the value are checked.
7226
+ * findClosestByAttribute(document.getElementById('1'),'data-my-attribute', ''); // ↦ undefined
7227
+ * findClosestByAttribute(document.getElementById('1'),'data-my-attribute', '2'); // ↦ node with id 2
7228
+ * ```
7229
+ *
7218
7230
  * You can call the method via the monster namespace `new Monster.DOM.findClosestByAttribute()`.
7219
7231
  *
7220
7232
  * ```
7221
7233
  * <script type="module">
7222
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
7234
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
7223
7235
  * Monster.DOM.findClosestByAttribute();
7224
7236
  * </script>
7225
7237
  * ```
@@ -7228,7 +7240,7 @@ function clearAttributeTokens(element, key) {
7228
7240
  *
7229
7241
  * ```
7230
7242
  * <script type="module">
7231
- * import {findClosestByAttribute} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/attributes.js';
7243
+ * import {findClosestByAttribute} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/attributes.js';
7232
7244
  * findClosestByAttribute();
7233
7245
  * </script>
7234
7246
  * ```
@@ -7240,14 +7252,21 @@ function clearAttributeTokens(element, key) {
7240
7252
  * @param {string} key
7241
7253
  * @param {string|undefined} value
7242
7254
  * @return {HTMLElement|undefined}
7255
+ * @summary find closest node
7243
7256
  */
7244
7257
 
7245
7258
 
7246
7259
  function findClosestByAttribute(element, key, value) {
7247
7260
  (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateInstance)(element, (0,_types_global_js__WEBPACK_IMPORTED_MODULE_1__.getGlobalFunction)('HTMLElement'));
7248
7261
 
7249
- if (element.hasAttribute(key) && element.getAttribute(key) === value) {
7250
- return element;
7262
+ if (element.hasAttribute(key)) {
7263
+ if (value === undefined) {
7264
+ return element;
7265
+ }
7266
+
7267
+ if (element.getAttribute(key) === value) {
7268
+ return element;
7269
+ }
7251
7270
  }
7252
7271
 
7253
7272
  var selector = (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateString)(key);
@@ -7258,11 +7277,71 @@ function findClosestByAttribute(element, key, value) {
7258
7277
  return result;
7259
7278
  }
7260
7279
 
7280
+ return undefined;
7281
+ }
7282
+ /**
7283
+ * This function searches, starting from an `HTMLElemement`, for the next element that has a certain attribute.
7284
+ *
7285
+ * ```html
7286
+ * <div class="myclass" id="2">
7287
+ * <div id="1"></div>
7288
+ * </div>
7289
+ * ```
7290
+ *
7291
+ * ```javascript
7292
+ * // if no value is specified (undefined), then only the attribute is checked.
7293
+ * findClosestByClass(document.getElementById('1'),'myclass'); // ↦ node with id 2
7294
+ * findClosestByClass(document.getElementById('2'),'myclass'); // ↦ node with id 2
7295
+ * ```
7296
+ *
7297
+ * You can call the method via the monster namespace `new Monster.DOM.findClosestByClass()`.
7298
+ *
7299
+ * ```
7300
+ * <script type="module">
7301
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
7302
+ * Monster.DOM.findClosestByClass();
7303
+ * </script>
7304
+ * ```
7305
+ *
7306
+ * Alternatively, you can also integrate this function individually.
7307
+ *
7308
+ * ```
7309
+ * <script type="module">
7310
+ * import {findClosestByClass} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/attributes.js';
7311
+ * findClosestByClass();
7312
+ * </script>
7313
+ * ```
7314
+ *
7315
+ * @since 1.27.0
7316
+ * @copyright schukai GmbH
7317
+ * @memberOf Monster.DOM
7318
+ * @param {HTMLElement} element
7319
+ * @param {string} className
7320
+ * @return {HTMLElement|undefined}
7321
+ * @summary find closest node
7322
+ */
7323
+
7324
+
7325
+ function findClosestByClass(element, className) {
7326
+ var _element$classList;
7327
+
7328
+ (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateInstance)(element, (0,_types_global_js__WEBPACK_IMPORTED_MODULE_1__.getGlobalFunction)('HTMLElement'));
7329
+
7330
+ if (element !== null && element !== void 0 && (_element$classList = element.classList) !== null && _element$classList !== void 0 && _element$classList.contains((0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateString)(className))) {
7331
+ return element;
7332
+ }
7333
+
7334
+ var result = element.closest('.' + className);
7335
+
7336
+ if (result instanceof HTMLElement) {
7337
+ return result;
7338
+ }
7339
+
7261
7340
  return undefined;
7262
7341
  } // exports
7263
7342
 
7264
7343
 
7265
- (0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.DOM', getLinkedObjects, addToObjectLink, removeObjectLink, findClosestByAttribute, hasObjectLink, clearAttributeTokens, replaceAttributeToken, containsAttributeToken, removeAttributeToken, addAttributeToken, toggleAttributeToken);
7344
+ (0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.DOM', findClosestByClass, getLinkedObjects, addToObjectLink, removeObjectLink, findClosestByAttribute, hasObjectLink, clearAttributeTokens, replaceAttributeToken, containsAttributeToken, removeAttributeToken, addAttributeToken, toggleAttributeToken);
7266
7345
 
7267
7346
 
7268
7347
  /***/ }),
@@ -7320,7 +7399,9 @@ __webpack_require__.r(__webpack_exports__);
7320
7399
  /* harmony export */ "ATTRIBUTE_DISABLED": function() { return /* binding */ ATTRIBUTE_DISABLED; },
7321
7400
  /* harmony export */ "ATTRIBUTE_ERRORMESSAGE": function() { return /* binding */ ATTRIBUTE_ERRORMESSAGE; },
7322
7401
  /* harmony export */ "ATTRIBUTE_VALUE": function() { return /* binding */ ATTRIBUTE_VALUE; },
7323
- /* harmony export */ "objectUpdaterLinkSymbol": function() { return /* binding */ objectUpdaterLinkSymbol; }
7402
+ /* harmony export */ "objectUpdaterLinkSymbol": function() { return /* binding */ objectUpdaterLinkSymbol; },
7403
+ /* harmony export */ "ATTRIBUTE_TEMPLATE_PREFIX": function() { return /* binding */ ATTRIBUTE_TEMPLATE_PREFIX; },
7404
+ /* harmony export */ "ATTRIBUTE_UPDATER_SELECT_THIS": function() { return /* binding */ ATTRIBUTE_UPDATER_SELECT_THIS; }
7324
7405
  /* harmony export */ });
7325
7406
  /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
7326
7407
 
@@ -7373,6 +7454,13 @@ var ATTRIBUTE_THEME_NAME = ATTRIBUTE_THEME_PREFIX + 'name';
7373
7454
  */
7374
7455
 
7375
7456
  var ATTRIBUTE_UPDATER_ATTRIBUTES = ATTRIBUTE_PREFIX + 'attributes';
7457
+ /**
7458
+ * @memberOf Monster.DOM
7459
+ * @type {string}
7460
+ * @since 1.27.1
7461
+ */
7462
+
7463
+ var ATTRIBUTE_UPDATER_SELECT_THIS = ATTRIBUTE_PREFIX + 'select-this';
7376
7464
  /**
7377
7465
  * @memberOf Monster.DOM
7378
7466
  * @type {string}
@@ -7408,6 +7496,13 @@ var ATTRIBUTE_UPDATER_REMOVE = ATTRIBUTE_PREFIX + 'remove';
7408
7496
  */
7409
7497
 
7410
7498
  var ATTRIBUTE_UPDATER_BIND = ATTRIBUTE_PREFIX + 'bind';
7499
+ /**
7500
+ * @memberOf Monster.DOM
7501
+ * @type {string}
7502
+ * @since 1.27.0
7503
+ */
7504
+
7505
+ var ATTRIBUTE_TEMPLATE_PREFIX = ATTRIBUTE_PREFIX + 'template-prefix';
7411
7506
  /**
7412
7507
  * @memberOf Monster.DOM
7413
7508
  * @type {string}
@@ -7746,7 +7841,7 @@ var attachedInternalSymbol = Symbol('attachedInternal');
7746
7841
  *
7747
7842
  * ```
7748
7843
  * <script type="module">
7749
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
7844
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
7750
7845
  * document.createElement('monster-')
7751
7846
  * </script>
7752
7847
  * ```
@@ -8120,7 +8215,8 @@ __webpack_require__.r(__webpack_exports__);
8120
8215
  /* harmony export */ "initMethodSymbol": function() { return /* binding */ initMethodSymbol; },
8121
8216
  /* harmony export */ "assembleMethodSymbol": function() { return /* binding */ assembleMethodSymbol; },
8122
8217
  /* harmony export */ "assignUpdaterToElement": function() { return /* binding */ assignUpdaterToElement; },
8123
- /* harmony export */ "attributeObserverSymbol": function() { return /* binding */ attributeObserverSymbol; }
8218
+ /* harmony export */ "attributeObserverSymbol": function() { return /* binding */ attributeObserverSymbol; },
8219
+ /* harmony export */ "getSlottedElements": function() { return /* binding */ getSlottedElements; }
8124
8220
  /* harmony export */ });
8125
8221
  /* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
8126
8222
  /* harmony import */ var _data_extend_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
@@ -8281,7 +8377,7 @@ var attributeObserverSymbol = Symbol('attributeObserver');
8281
8377
  *
8282
8378
  * ```
8283
8379
  * <script type="module">
8284
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
8380
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
8285
8381
  * document.createElement('monster-')
8286
8382
  * </script>
8287
8383
  * ```
@@ -8738,14 +8834,16 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
8738
8834
  }( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
8739
8835
  /**
8740
8836
  * @private
8741
- * @param {String} filter
8837
+ * @param {String|undefined} query
8838
+ * @param {String|undefined|null} name name of the slot (if the parameter is undefined, all slots are searched, if the parameter has the value null, all slots without a name are searched. if a string is specified, the slots with this name are searched.)
8742
8839
  * @return {*}
8743
8840
  * @this CustomElement
8744
8841
  * @since 1.23.0
8842
+ * @throws {Error} query must be a string
8745
8843
  */
8746
8844
 
8747
8845
 
8748
- function getSlottedElements(filter) {
8846
+ function getSlottedElements(query, name) {
8749
8847
  var self = this;
8750
8848
  var result = new Set();
8751
8849
 
@@ -8753,7 +8851,17 @@ function getSlottedElements(filter) {
8753
8851
  return result;
8754
8852
  }
8755
8853
 
8756
- var slots = self.shadowRoot.querySelectorAll('slot');
8854
+ var selector = 'slot';
8855
+
8856
+ if (name !== undefined) {
8857
+ if (name === null) {
8858
+ selector += ':not([name])';
8859
+ } else {
8860
+ selector += '[name=' + (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_9__.validateString)(name) + ']';
8861
+ }
8862
+ }
8863
+
8864
+ var slots = self.shadowRoot.querySelectorAll(selector);
8757
8865
 
8758
8866
  for (var _i = 0, _Object$entries = Object.entries(slots); _i < _Object$entries.length; _i++) {
8759
8867
  var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
@@ -8762,14 +8870,16 @@ function getSlottedElements(filter) {
8762
8870
  slot.assignedElements().forEach(function (node) {
8763
8871
  if (!(node instanceof HTMLElement)) return;
8764
8872
 
8765
- if (filter !== undefined) {
8766
- node.querySelectorAll(filter).forEach(function (n) {
8873
+ if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isString)(query)) {
8874
+ node.querySelectorAll(query).forEach(function (n) {
8767
8875
  result.add(n);
8768
8876
  });
8769
8877
 
8770
- if (node.matches(filter)) {
8878
+ if (node.matches(query)) {
8771
8879
  result.add(node);
8772
8880
  }
8881
+ } else if (query !== undefined) {
8882
+ throw new Error('query must be a string');
8773
8883
  } else {
8774
8884
  result.add(node);
8775
8885
  }
@@ -9147,7 +9257,7 @@ var internal = Symbol('internal');
9147
9257
  *
9148
9258
  * ```
9149
9259
  * <script type="module">
9150
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
9260
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
9151
9261
  * new Monster.Types.DataUrl()
9152
9262
  * </script>
9153
9263
  * ```
@@ -9156,7 +9266,7 @@ var internal = Symbol('internal');
9156
9266
  *
9157
9267
  * ```
9158
9268
  * <script type="module">
9159
- * import {DataUrl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/dataurl.js';
9269
+ * import {DataUrl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/dataurl.js';
9160
9270
  * new DataUrl()
9161
9271
  * </script>
9162
9272
  * ```
@@ -9236,7 +9346,7 @@ var DataUrl = /*#__PURE__*/function (_Base) {
9236
9346
  *
9237
9347
  * ```
9238
9348
  * <script type="module">
9239
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
9349
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
9240
9350
  * console.log(Monster.Types.parseDataURL())
9241
9351
  * </script>
9242
9352
  * ```
@@ -9245,7 +9355,7 @@ var DataUrl = /*#__PURE__*/function (_Base) {
9245
9355
  *
9246
9356
  * ```
9247
9357
  * <script type="module">
9248
- * import {parseDataURL} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/dataurl.js';
9358
+ * import {parseDataURL} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/dataurl.js';
9249
9359
  * console.log(parseDataURL())
9250
9360
  * </script>
9251
9361
  * ```
@@ -9383,7 +9493,7 @@ var internal = Symbol('internal');
9383
9493
  *
9384
9494
  * ```
9385
9495
  * <script type="module">
9386
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
9496
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
9387
9497
  * console.log(new Monster.Types.MediaType())
9388
9498
  * </script>
9389
9499
  * ```
@@ -9392,7 +9502,7 @@ var internal = Symbol('internal');
9392
9502
  *
9393
9503
  * ```
9394
9504
  * <script type="module">
9395
- * import {MediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/mediatype.js';
9505
+ * import {MediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/mediatype.js';
9396
9506
  * console.log(new MediaType())
9397
9507
  * </script>
9398
9508
  * ```
@@ -9510,7 +9620,7 @@ var MediaType = /*#__PURE__*/function (_Base) {
9510
9620
  *
9511
9621
  * ```
9512
9622
  * <script type="module">
9513
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
9623
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
9514
9624
  * console.log(Monster.Types.parseMediaType())
9515
9625
  * </script>
9516
9626
  * ```
@@ -9519,7 +9629,7 @@ var MediaType = /*#__PURE__*/function (_Base) {
9519
9629
  *
9520
9630
  * ```
9521
9631
  * <script type="module">
9522
- * import {parseMediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/dataurl.js';
9632
+ * import {parseMediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/dataurl.js';
9523
9633
  * console.log(parseMediaType())
9524
9634
  * </script>
9525
9635
  * ```
@@ -9618,7 +9728,8 @@ __webpack_require__.r(__webpack_exports__);
9618
9728
  /* harmony import */ var _types_base_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
9619
9729
  /* harmony import */ var _types_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
9620
9730
  /* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
9621
- /* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39);
9731
+ /* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(33);
9732
+ /* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39);
9622
9733
 
9623
9734
  /**
9624
9735
  * @author schukai GmbH
@@ -9651,12 +9762,13 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
9651
9762
 
9652
9763
 
9653
9764
 
9765
+
9654
9766
  /**
9655
9767
  * you can call the method via the monster namespace `new Monster.DOM.Template()`.
9656
9768
  *
9657
9769
  * ```
9658
9770
  * <script type="module">
9659
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
9771
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
9660
9772
  * new Monster.DOM.Template()
9661
9773
  * </script>
9662
9774
  * ```
@@ -9665,7 +9777,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
9665
9777
  *
9666
9778
  * ```
9667
9779
  * <script type="module">
9668
- * import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/template.js';
9780
+ * import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/template.js';
9669
9781
  * new Template()
9670
9782
  * </script>
9671
9783
  * ```
@@ -9743,7 +9855,7 @@ var Template = /*#__PURE__*/function (_Base) {
9743
9855
  *
9744
9856
  * ```
9745
9857
  * <script type="module">
9746
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
9858
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
9747
9859
  * Monster.DOM.findDocumentTemplate()
9748
9860
  * </script>
9749
9861
  * ```
@@ -9752,14 +9864,14 @@ var Template = /*#__PURE__*/function (_Base) {
9752
9864
  *
9753
9865
  * ```
9754
9866
  * <script type="module">
9755
- * import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/template.js';
9867
+ * import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/template.js';
9756
9868
  * findDocumentTemplate()
9757
9869
  * </script>
9758
9870
  * ```
9759
9871
  *
9760
9872
  * @example
9761
9873
  *
9762
- * import { findDocumentTemplate } from "https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/template.js";
9874
+ * import { findDocumentTemplate } from "https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/template.js";
9763
9875
  *
9764
9876
  * const template = document.createElement("template");
9765
9877
  * template.id = "myTemplate";
@@ -9800,9 +9912,18 @@ var Template = /*#__PURE__*/function (_Base) {
9800
9912
 
9801
9913
  function findDocumentTemplate(id, currentNode) {
9802
9914
  (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateString)(id);
9915
+ var document = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalObject)('document');
9916
+ var HTMLTemplateElement = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalFunction)('HTMLTemplateElement');
9917
+ var DocumentFragment = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalFunction)('DocumentFragment');
9918
+ var Document = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalFunction)('Document');
9919
+ var prefixID;
9803
9920
 
9804
9921
  if (!(currentNode instanceof Document || currentNode instanceof DocumentFragment)) {
9805
9922
  if (currentNode instanceof Node) {
9923
+ if (currentNode.hasAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_TEMPLATE_PREFIX)) {
9924
+ prefixID = currentNode.getAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_TEMPLATE_PREFIX);
9925
+ }
9926
+
9806
9927
  currentNode = currentNode.getRootNode();
9807
9928
 
9808
9929
  if (!(currentNode instanceof Document || currentNode instanceof DocumentFragment)) {
@@ -9811,22 +9932,40 @@ function findDocumentTemplate(id, currentNode) {
9811
9932
  }
9812
9933
 
9813
9934
  if (!(currentNode instanceof Document || currentNode instanceof DocumentFragment)) {
9814
- currentNode = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalObject)('document');
9935
+ currentNode = document;
9936
+ }
9937
+ }
9938
+
9939
+ var template;
9940
+ var theme = (0,_theme_js__WEBPACK_IMPORTED_MODULE_5__.getDocumentTheme)();
9941
+
9942
+ if (prefixID) {
9943
+ var themedPrefixID = prefixID + '-' + id + '-' + theme.getName(); // current + themedPrefixID
9944
+
9945
+ template = currentNode.getElementById(themedPrefixID);
9946
+
9947
+ if (template instanceof HTMLTemplateElement) {
9948
+ return new Template(template);
9949
+ } // document + themedPrefixID
9950
+
9951
+
9952
+ template = document.getElementById(themedPrefixID);
9953
+
9954
+ if (template instanceof HTMLTemplateElement) {
9955
+ return new Template(template);
9815
9956
  }
9816
9957
  }
9817
9958
 
9818
- var HTMLTemplateElement = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalFunction)('HTMLTemplateElement');
9819
- var theme = (0,_theme_js__WEBPACK_IMPORTED_MODULE_4__.getDocumentTheme)();
9820
9959
  var themedID = id + '-' + theme.getName(); // current + themedID
9821
9960
 
9822
- var template = currentNode.getElementById(themedID);
9961
+ template = currentNode.getElementById(themedID);
9823
9962
 
9824
9963
  if (template instanceof HTMLTemplateElement) {
9825
9964
  return new Template(template);
9826
9965
  } // document + themedID
9827
9966
 
9828
9967
 
9829
- template = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalObject)('document').getElementById(themedID);
9968
+ template = document.getElementById(themedID);
9830
9969
 
9831
9970
  if (template instanceof HTMLTemplateElement) {
9832
9971
  return new Template(template);
@@ -9840,7 +9979,7 @@ function findDocumentTemplate(id, currentNode) {
9840
9979
  } // document + ID
9841
9980
 
9842
9981
 
9843
- template = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalObject)('document').getElementById(id);
9982
+ template = document.getElementById(id);
9844
9983
 
9845
9984
  if (template instanceof HTMLTemplateElement) {
9846
9985
  return new Template(template);
@@ -9904,7 +10043,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
9904
10043
  *
9905
10044
  * ```
9906
10045
  * <script type="module">
9907
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
10046
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
9908
10047
  * console.log(new Monster.DOM.Theme())
9909
10048
  * </script>
9910
10049
  * ```
@@ -9913,14 +10052,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
9913
10052
  *
9914
10053
  * ```
9915
10054
  * <script type="module">
9916
- * import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/theme.js';
10055
+ * import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/theme.js';
9917
10056
  * console.log(new Theme())
9918
10057
  * </script>
9919
10058
  * ```
9920
10059
  *
9921
10060
  * @example
9922
10061
  *
9923
- * import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/theme.js';
10062
+ * import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/theme.js';
9924
10063
  *
9925
10064
  * const theme = getDocumentTheme();
9926
10065
  * console.log(theme.getName());
@@ -10010,23 +10149,25 @@ function getDocumentTheme() {
10010
10149
 
10011
10150
  __webpack_require__.r(__webpack_exports__);
10012
10151
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10013
- /* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_4__.Monster; },
10152
+ /* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_5__.Monster; },
10014
10153
  /* harmony export */ "Updater": function() { return /* binding */ Updater; }
10015
10154
  /* harmony export */ });
10016
- /* harmony import */ var _data_diff_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
10017
- /* harmony import */ var _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
10018
- /* harmony import */ var _data_pipe_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22);
10019
- /* harmony import */ var _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(33);
10020
- /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2);
10021
- /* harmony import */ var _types_base_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4);
10022
- /* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9);
10023
- /* harmony import */ var _types_observer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(27);
10024
- /* harmony import */ var _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(26);
10025
- /* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(14);
10026
- /* harmony import */ var _util_clone_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(15);
10027
- /* harmony import */ var _util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(41);
10028
- /* harmony import */ var _template_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(38);
10029
- /* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(42);
10155
+ /* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
10156
+ /* harmony import */ var _data_diff_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
10157
+ /* harmony import */ var _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
10158
+ /* harmony import */ var _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22);
10159
+ /* harmony import */ var _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(33);
10160
+ /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2);
10161
+ /* harmony import */ var _types_base_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4);
10162
+ /* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9);
10163
+ /* harmony import */ var _types_observer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(27);
10164
+ /* harmony import */ var _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(26);
10165
+ /* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14);
10166
+ /* harmony import */ var _util_clone_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(15);
10167
+ /* harmony import */ var _util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(41);
10168
+ /* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(42);
10169
+ /* harmony import */ var _template_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(38);
10170
+ /* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(43);
10030
10171
 
10031
10172
  /**
10032
10173
  * @author schukai GmbH
@@ -10090,17 +10231,22 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
10090
10231
 
10091
10232
 
10092
10233
 
10234
+
10235
+
10093
10236
  /**
10094
10237
  * The updater class connects an object with the dom. In this way, structures and contents in the DOM can be programmatically adapted via attributes.
10095
10238
  *
10096
10239
  * For example, to include a string from an object, the attribute `data-monster-replace` can be used.
10097
10240
  * a further explanation can be found under {@tutorial dom-based-templating-implementation}.
10098
10241
  *
10242
+ * Changes to attributes are made only when the direct values are changed. If you want to assign changes to other values
10243
+ * as well, you have to insert the attribute `data-monster-select-this`. This should be done with care, as it can reduce performance.
10244
+ *
10099
10245
  * You can create an object of this class using the monster namespace `new Monster.DOM.Updater()`.
10100
10246
  *
10101
10247
  * ```
10102
10248
  * <script type="module">
10103
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
10249
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
10104
10250
  * new Monster.DOM.Updater()
10105
10251
  * </script>
10106
10252
  * ```
@@ -10109,14 +10255,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
10109
10255
  *
10110
10256
  * ```
10111
10257
  * <script type="module">
10112
- * import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/updater.js';
10258
+ * import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/updater.js';
10113
10259
  * new Updater()
10114
10260
  * </script>
10115
10261
  * ```
10116
10262
  *
10117
10263
  * @example
10118
10264
  *
10119
- * import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/updater.js';
10265
+ * import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/updater.js';
10120
10266
  *
10121
10267
  * // First we prepare the html document.
10122
10268
  * // This is done here via script, but can also be inserted into the document as pure html.
@@ -10130,7 +10276,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
10130
10276
  * let obj = {
10131
10277
  * headline: "Hello World",
10132
10278
  * };
10133
- *
10279
+ *
10134
10280
  * // Now comes the real magic. we pass the updater the parent HTMLElement
10135
10281
  * // and the desired data structure.
10136
10282
  * const updater = new Updater(body, obj);
@@ -10175,28 +10321,27 @@ var Updater = /*#__PURE__*/function (_Base) {
10175
10321
  * @type {HTMLElement}
10176
10322
  */
10177
10323
 
10178
- _this.element = (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_9__.validateInstance)(element, HTMLElement);
10179
10324
  if (subject === undefined) subject = {};
10180
- var a = subject;
10181
10325
 
10182
- if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isInstance)(subject, _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_8__.ProxyObserver)) {
10183
- subject = new _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_8__.ProxyObserver(subject);
10326
+ if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isInstance)(subject, _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_9__.ProxyObserver)) {
10327
+ subject = new _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_9__.ProxyObserver(subject);
10184
10328
  }
10185
10329
 
10186
- _this.last = {};
10187
- _this.callbacks = new Map();
10188
-
10189
- _this.callbacks.set('checkstate', getCheckStateCallback.call(_assertThisInitialized(_this)));
10190
- /**
10191
- * @type {object}
10192
- */
10330
+ _this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol] = {
10331
+ element: (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_10__.validateInstance)(element, HTMLElement),
10332
+ last: {},
10333
+ callbacks: new Map(),
10334
+ eventTypes: ['keyup', 'click', 'change', 'drop', 'touchend', 'input'],
10335
+ subject: subject
10336
+ };
10193
10337
 
10338
+ _this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.set('checkstate', getCheckStateCallback.call(_assertThisInitialized(_this)));
10194
10339
 
10195
- _this.subject = subject.attachObserver(new _types_observer_js__WEBPACK_IMPORTED_MODULE_7__.Observer(function () {
10196
- var s = _this.subject.getRealSubject();
10340
+ _this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.attachObserver(new _types_observer_js__WEBPACK_IMPORTED_MODULE_8__.Observer(function () {
10341
+ var s = _this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject();
10197
10342
 
10198
- var diffResult = (0,_data_diff_js__WEBPACK_IMPORTED_MODULE_0__.diff)(_this.last, s);
10199
- _this.last = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(s);
10343
+ var diffResult = (0,_data_diff_js__WEBPACK_IMPORTED_MODULE_1__.diff)(_this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].last, s);
10344
+ _this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].last = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(s);
10200
10345
 
10201
10346
  for (var _i = 0, _Object$entries = Object.entries(diffResult); _i < _Object$entries.length; _i++) {
10202
10347
  var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
@@ -10208,7 +10353,7 @@ var Updater = /*#__PURE__*/function (_Base) {
10208
10353
  updateAttributes.call(_assertThisInitialized(_this), change);
10209
10354
  }
10210
10355
  }));
10211
- _this.eventTypes = ['keyup', 'click', 'change', 'drop', 'touchend', 'input'];
10356
+
10212
10357
  return _this;
10213
10358
  }
10214
10359
  /**
@@ -10224,7 +10369,7 @@ var Updater = /*#__PURE__*/function (_Base) {
10224
10369
  _createClass(Updater, [{
10225
10370
  key: "setEventTypes",
10226
10371
  value: function setEventTypes(types) {
10227
- this.eventTypes = (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_9__.validateArray)(types);
10372
+ this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].eventTypes = (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_10__.validateArray)(types);
10228
10373
  return this;
10229
10374
  }
10230
10375
  /**
@@ -10238,6 +10383,7 @@ var Updater = /*#__PURE__*/function (_Base) {
10238
10383
  *
10239
10384
  * @since 1.9.0
10240
10385
  * @return {Updater}
10386
+ * @throws {Error} the bind argument must start as a value with a path
10241
10387
  */
10242
10388
 
10243
10389
  }, {
@@ -10245,13 +10391,17 @@ var Updater = /*#__PURE__*/function (_Base) {
10245
10391
  value: function enableEventProcessing() {
10246
10392
  this.disableEventProcessing();
10247
10393
 
10248
- var _iterator = _createForOfIteratorHelper(this.eventTypes),
10394
+ var _iterator = _createForOfIteratorHelper(this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].eventTypes),
10249
10395
  _step;
10250
10396
 
10251
10397
  try {
10252
10398
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
10253
10399
  var type = _step.value;
10254
- this.element.addEventListener(type, getControlEventHandler.call(this));
10400
+ // @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
10401
+ this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.addEventListener(type, getControlEventHandler.call(this), {
10402
+ capture: true,
10403
+ passive: true
10404
+ });
10255
10405
  }
10256
10406
  } catch (err) {
10257
10407
  _iterator.e(err);
@@ -10271,13 +10421,13 @@ var Updater = /*#__PURE__*/function (_Base) {
10271
10421
  }, {
10272
10422
  key: "disableEventProcessing",
10273
10423
  value: function disableEventProcessing() {
10274
- var _iterator2 = _createForOfIteratorHelper(this.eventTypes),
10424
+ var _iterator2 = _createForOfIteratorHelper(this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].eventTypes),
10275
10425
  _step2;
10276
10426
 
10277
10427
  try {
10278
10428
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
10279
10429
  var type = _step2.value;
10280
- this.element.removeEventListener(type, getControlEventHandler.call(this));
10430
+ this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.removeEventListener(type, getControlEventHandler.call(this));
10281
10431
  }
10282
10432
  } catch (err) {
10283
10433
  _iterator2.e(err);
@@ -10306,10 +10456,23 @@ var Updater = /*#__PURE__*/function (_Base) {
10306
10456
  value: function run() {
10307
10457
  // the key __init__has no further meaning and is only
10308
10458
  // used to create the diff for empty objects.
10309
- this.last = {
10459
+ this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].last = {
10310
10460
  '__init__': true
10311
10461
  };
10312
- return this.subject.notifyObservers();
10462
+ return this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.notifyObservers();
10463
+ }
10464
+ /**
10465
+ * Gets the values of bound elements and changes them in subject
10466
+ *
10467
+ * @since 1.27.0
10468
+ * @return {Monster.DOM.Updater}
10469
+ */
10470
+
10471
+ }, {
10472
+ key: "retrieve",
10473
+ value: function retrieve() {
10474
+ retrieveFromBindings.call(this);
10475
+ return this;
10313
10476
  }
10314
10477
  /**
10315
10478
  * If you have passed a ProxyObserver in the constructor, you will get the object that the ProxyObserver manages here.
@@ -10324,7 +10487,7 @@ var Updater = /*#__PURE__*/function (_Base) {
10324
10487
  }, {
10325
10488
  key: "getSubject",
10326
10489
  value: function getSubject() {
10327
- return this.subject.getSubject();
10490
+ return this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getSubject();
10328
10491
  }
10329
10492
  /**
10330
10493
  * This method can be used to register commands that can be called via call: instruction.
@@ -10340,13 +10503,13 @@ var Updater = /*#__PURE__*/function (_Base) {
10340
10503
  }, {
10341
10504
  key: "setCallback",
10342
10505
  value: function setCallback(name, callback) {
10343
- this.callbacks.set(name, callback);
10506
+ this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.set(name, callback);
10344
10507
  return this;
10345
10508
  }
10346
10509
  }]);
10347
10510
 
10348
10511
  return Updater;
10349
- }(_types_base_js__WEBPACK_IMPORTED_MODULE_5__.Base);
10512
+ }(_types_base_js__WEBPACK_IMPORTED_MODULE_6__.Base);
10350
10513
  /**
10351
10514
  * @private
10352
10515
  * @since 1.9.0
@@ -10358,12 +10521,13 @@ var Updater = /*#__PURE__*/function (_Base) {
10358
10521
  function getCheckStateCallback() {
10359
10522
  var self = this;
10360
10523
  return function (current) {
10524
+ // this is a reference to the current object (therefore no array function here)
10361
10525
  if (this instanceof HTMLInputElement) {
10362
10526
  if (['radio', 'checkbox'].indexOf(this.type) !== -1) {
10363
10527
  return this.value + "" === current + "" ? 'true' : undefined;
10364
10528
  }
10365
10529
  } else if (this instanceof HTMLOptionElement) {
10366
- if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isArray)(current) && current.indexOf(this.value) !== -1) {
10530
+ if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(current) && current.indexOf(this.value) !== -1) {
10367
10531
  return 'true';
10368
10532
  }
10369
10533
 
@@ -10381,6 +10545,7 @@ var symbol = Symbol('EventHandler');
10381
10545
  * @private
10382
10546
  * @return {function}
10383
10547
  * @this Updater
10548
+ * @throws {Error} the bind argument must start as a value with a path
10384
10549
  */
10385
10550
 
10386
10551
  function getControlEventHandler() {
@@ -10389,97 +10554,115 @@ function getControlEventHandler() {
10389
10554
  if (self[symbol]) {
10390
10555
  return self[symbol];
10391
10556
  }
10392
-
10393
- var pathfinder = new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_1__.Pathfinder(this.subject.getSubject());
10394
10557
  /**
10395
10558
  * @throws {Error} the bind argument must start as a value with a path.
10396
10559
  * @throws {Error} unsupported object
10397
10560
  * @param {Event} event
10398
10561
  */
10399
10562
 
10400
- self[symbol] = function (event) {
10401
- var _element$constructor, _Object$getOwnPropert;
10402
10563
 
10403
- var element = event.target;
10564
+ self[symbol] = function (event) {
10565
+ var element = (0,_events_js__WEBPACK_IMPORTED_MODULE_13__.findTargetElementFromEvent)(event, _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_BIND);
10404
10566
 
10405
- if (!element.hasAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_BIND)) {
10567
+ if (element === undefined) {
10406
10568
  return;
10407
10569
  }
10408
10570
 
10409
- var path = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_BIND);
10571
+ retrieveAndSetValue.call(self, element);
10572
+ };
10410
10573
 
10411
- if (path.indexOf('path:') !== 0) {
10412
- throw new Error('the bind argument must start as a value with a path.');
10413
- }
10574
+ return self[symbol];
10575
+ }
10576
+ /**
10577
+ * @throws {Error} the bind argument must start as a value with a path
10578
+ * @param {HTMLElement} element
10579
+ * @return void
10580
+ * @memberOf Monster.DOM
10581
+ * @private
10582
+ */
10414
10583
 
10415
- path = path.substr(5);
10416
- var value;
10417
10584
 
10418
- if (element instanceof HTMLInputElement) {
10419
- switch (element.type) {
10420
- case 'checkbox':
10421
- value = element.checked ? element.value : undefined;
10422
- break;
10585
+ function retrieveAndSetValue(element) {
10586
+ var _element$constructor, _Object$getOwnPropert;
10423
10587
 
10424
- default:
10425
- value = element.value;
10426
- break;
10427
- }
10428
- } else if (element instanceof HTMLTextAreaElement) {
10429
- value = element.value;
10430
- } else if (element instanceof HTMLSelectElement) {
10431
- switch (element.type) {
10432
- case 'select-one':
10433
- value = element.value;
10434
- break;
10435
-
10436
- case 'select-multiple':
10437
- value = element.value;
10438
- var options = element === null || element === void 0 ? void 0 : element.selectedOptions;
10439
- if (options === undefined) options = element.querySelectorAll(":scope option:checked");
10440
- value = Array.from(options).map(function (_ref) {
10441
- var value = _ref.value;
10442
- return value;
10443
- });
10444
- break;
10445
- } // values from customelements
10588
+ var self = this;
10589
+ var pathfinder = new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_2__.Pathfinder(self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getSubject());
10590
+ var path = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_BIND);
10446
10591
 
10447
- } else if (element !== null && element !== void 0 && (_element$constructor = element.constructor) !== null && _element$constructor !== void 0 && _element$constructor.prototype && !!((_Object$getOwnPropert = Object.getOwnPropertyDescriptor(element.constructor.prototype, 'value')) !== null && _Object$getOwnPropert !== void 0 && _Object$getOwnPropert['get']) || element.hasOwnProperty('value')) {
10448
- value = element === null || element === void 0 ? void 0 : element['value'];
10449
- } else {
10450
- throw new Error("unsupported object");
10451
- }
10592
+ if (path.indexOf('path:') !== 0) {
10593
+ throw new Error('the bind argument must start as a value with a path');
10594
+ }
10595
+
10596
+ path = path.substr(5);
10597
+ var value;
10452
10598
 
10453
- var copy = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(self.subject.getRealSubject());
10454
- var pf = new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_1__.Pathfinder(copy);
10455
- pf.setVia(path, value);
10456
- var diffResult = (0,_data_diff_js__WEBPACK_IMPORTED_MODULE_0__.diff)(copy, self.subject.getRealSubject());
10599
+ if (element instanceof HTMLInputElement) {
10600
+ switch (element.type) {
10601
+ case 'checkbox':
10602
+ value = element.checked ? element.value : undefined;
10603
+ break;
10457
10604
 
10458
- if (diffResult.length > 0) {
10459
- pathfinder.setVia(path, value);
10605
+ default:
10606
+ value = element.value;
10607
+ break;
10460
10608
  }
10461
- };
10609
+ } else if (element instanceof HTMLTextAreaElement) {
10610
+ value = element.value;
10611
+ } else if (element instanceof HTMLSelectElement) {
10612
+ switch (element.type) {
10613
+ case 'select-one':
10614
+ value = element.value;
10615
+ break;
10462
10616
 
10463
- return self[symbol];
10617
+ case 'select-multiple':
10618
+ value = element.value;
10619
+ var options = element === null || element === void 0 ? void 0 : element.selectedOptions;
10620
+ if (options === undefined) options = element.querySelectorAll(":scope option:checked");
10621
+ value = Array.from(options).map(function (_ref) {
10622
+ var value = _ref.value;
10623
+ return value;
10624
+ });
10625
+ break;
10626
+ } // values from customelements
10627
+
10628
+ } else if (element !== null && element !== void 0 && (_element$constructor = element.constructor) !== null && _element$constructor !== void 0 && _element$constructor.prototype && !!((_Object$getOwnPropert = Object.getOwnPropertyDescriptor(element.constructor.prototype, 'value')) !== null && _Object$getOwnPropert !== void 0 && _Object$getOwnPropert['get']) || element.hasOwnProperty('value')) {
10629
+ value = element === null || element === void 0 ? void 0 : element['value'];
10630
+ } else {
10631
+ throw new Error("unsupported object");
10632
+ }
10633
+
10634
+ var copy = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject());
10635
+ var pf = new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_2__.Pathfinder(copy);
10636
+ pf.setVia(path, value);
10637
+ var diffResult = (0,_data_diff_js__WEBPACK_IMPORTED_MODULE_1__.diff)(copy, self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject());
10638
+
10639
+ if (diffResult.length > 0) {
10640
+ pathfinder.setVia(path, value);
10641
+ }
10464
10642
  }
10465
10643
  /**
10644
+ * @since 1.27.0
10645
+ * @return void
10466
10646
  * @private
10467
- * @since 1.8.0
10468
- * @param {object} change
10469
- * @return {void}
10470
10647
  */
10471
10648
 
10472
10649
 
10473
- function removeElement(change) {
10474
- var _iterator3 = _createForOfIteratorHelper(this.element.querySelectorAll(':scope [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_REMOVE + ']').entries()),
10650
+ function retrieveFromBindings() {
10651
+ var self = this;
10652
+
10653
+ if (self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.matches('[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_BIND + ']')) {
10654
+ retrieveAndSetValue.call(self, element);
10655
+ }
10656
+
10657
+ var _iterator3 = _createForOfIteratorHelper(self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.querySelectorAll('[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_BIND + ']').entries()),
10475
10658
  _step3;
10476
10659
 
10477
10660
  try {
10478
10661
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
10479
10662
  var _step3$value = _slicedToArray(_step3.value, 2),
10480
- element = _step3$value[1];
10663
+ _element = _step3$value[1];
10481
10664
 
10482
- element.parentNode.removeChild(element);
10665
+ retrieveAndSetValue.call(self, _element);
10483
10666
  }
10484
10667
  } catch (err) {
10485
10668
  _iterator3.e(err);
@@ -10487,6 +10670,33 @@ function removeElement(change) {
10487
10670
  _iterator3.f();
10488
10671
  }
10489
10672
  }
10673
+ /**
10674
+ * @private
10675
+ * @since 1.8.0
10676
+ * @param {object} change
10677
+ * @return {void}
10678
+ */
10679
+
10680
+
10681
+ function removeElement(change) {
10682
+ var self = this;
10683
+
10684
+ var _iterator4 = _createForOfIteratorHelper(self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.querySelectorAll(':scope [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REMOVE + ']').entries()),
10685
+ _step4;
10686
+
10687
+ try {
10688
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
10689
+ var _step4$value = _slicedToArray(_step4.value, 2),
10690
+ _element2 = _step4$value[1];
10691
+
10692
+ _element2.parentNode.removeChild(_element2);
10693
+ }
10694
+ } catch (err) {
10695
+ _iterator4.e(err);
10696
+ } finally {
10697
+ _iterator4.f();
10698
+ }
10699
+ }
10490
10700
  /**
10491
10701
  * @private
10492
10702
  * @since 1.8.0
@@ -10501,59 +10711,66 @@ function removeElement(change) {
10501
10711
 
10502
10712
 
10503
10713
  function insertElement(change) {
10504
- var _this2 = this;
10505
-
10506
10714
  var self = this;
10507
- var subject = self.subject.getRealSubject();
10508
- var document = (0,_util_js__WEBPACK_IMPORTED_MODULE_13__.getDocument)();
10715
+ var subject = self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject();
10716
+ var document = (0,_util_js__WEBPACK_IMPORTED_MODULE_15__.getDocument)();
10509
10717
  var mem = new WeakSet();
10510
10718
  var wd = 0;
10719
+ var container = self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element;
10511
10720
 
10512
10721
  while (true) {
10513
10722
  var found = false;
10514
10723
  wd++;
10515
- var p = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(change === null || change === void 0 ? void 0 : change['path']);
10516
- if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isArray)(p)) return this;
10724
+ var p = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(change === null || change === void 0 ? void 0 : change['path']);
10725
+ if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(p)) return self;
10517
10726
 
10518
10727
  while (p.length > 0) {
10519
10728
  var current = p.join('.');
10520
- var list = this.element.querySelectorAll(':scope [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_INSERT + '*="path:' + current + '"]').entries();
10729
+ var iterator = new Set();
10730
+ var query = '[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT + '*="path:' + current + '"]';
10731
+ var e = container.querySelectorAll(query);
10732
+
10733
+ if (e.length > 0) {
10734
+ iterator = new Set(_toConsumableArray(e));
10735
+ }
10521
10736
 
10522
- var _iterator4 = _createForOfIteratorHelper(list),
10523
- _step4;
10737
+ if (container.matches(query)) {
10738
+ iterator.add(container);
10739
+ }
10740
+
10741
+ var _iterator5 = _createForOfIteratorHelper(iterator.entries()),
10742
+ _step5;
10524
10743
 
10525
10744
  try {
10526
10745
  var _loop = function _loop() {
10527
- var _step4$value = _slicedToArray(_step4.value, 2),
10528
- containerElement = _step4$value[1];
10746
+ var _step5$value = _slicedToArray(_step5.value, 2),
10747
+ containerElement = _step5$value[1];
10529
10748
 
10530
10749
  if (mem.has(containerElement)) return "continue";
10531
10750
  mem.add(containerElement);
10532
10751
  found = true;
10533
- var attributes = containerElement.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_INSERT);
10534
- var def = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(attributes);
10752
+ var attributes = containerElement.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT);
10753
+ var def = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(attributes);
10535
10754
  var i = def.indexOf(' ');
10536
- var key = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(def.substr(0, i));
10755
+ var key = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def.substr(0, i));
10537
10756
  var refPrefix = key + '-';
10538
- var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(def.substr(i)); // this case is actually excluded by the query but is nevertheless checked again here
10757
+ var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def.substr(i)); // this case is actually excluded by the query but is nevertheless checked again here
10539
10758
 
10540
10759
  if (cmd.indexOf('|') > 0) {
10541
10760
  throw new Error("pipes are not allowed when cloning a node.");
10542
10761
  }
10543
10762
 
10544
- var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_2__.Pipe(cmd);
10545
-
10546
- _this2.callbacks.forEach(function (f, n) {
10763
+ var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
10764
+ self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
10547
10765
  pipe.setCallback(n, f);
10548
10766
  });
10549
-
10550
10767
  var value = void 0;
10551
10768
 
10552
10769
  try {
10553
- containerElement.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_ERRORMESSAGE);
10770
+ containerElement.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE);
10554
10771
  value = pipe.run(subject);
10555
10772
  } catch (e) {
10556
- containerElement.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_ERRORMESSAGE, e.message);
10773
+ containerElement.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, e.message);
10557
10774
  }
10558
10775
 
10559
10776
  var dataPath = cmd.split(':').pop();
@@ -10563,7 +10780,7 @@ function insertElement(change) {
10563
10780
  insertPoint = containerElement.lastChild;
10564
10781
  }
10565
10782
 
10566
- if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isIterable)(value)) {
10783
+ if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isIterable)(value)) {
10567
10784
  throw new Error('the value is not iterable');
10568
10785
  }
10569
10786
 
@@ -10577,7 +10794,7 @@ function insertElement(change) {
10577
10794
  var ref = refPrefix + _i3;
10578
10795
  var currentPath = dataPath + "." + _i3;
10579
10796
  available.add(ref);
10580
- var refElement = containerElement.querySelector('[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_INSERT_REFERENCE + '="' + ref + '"]');
10797
+ var refElement = containerElement.querySelector('[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT_REFERENCE + '="' + ref + '"]');
10581
10798
 
10582
10799
  if (refElement instanceof HTMLElement) {
10583
10800
  insertPoint = refElement;
@@ -10587,27 +10804,29 @@ function insertElement(change) {
10587
10804
  appendNewDocumentFragment(containerElement, key, ref, currentPath);
10588
10805
  }
10589
10806
 
10590
- var nodes = containerElement.querySelectorAll('[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_INSERT_REFERENCE + '*="' + refPrefix + '"]');
10807
+ var nodes = containerElement.querySelectorAll('[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT_REFERENCE + '*="' + refPrefix + '"]');
10591
10808
 
10592
10809
  for (var _i4 = 0, _Object$entries3 = Object.entries(nodes); _i4 < _Object$entries3.length; _i4++) {
10593
10810
  var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i4], 2),
10594
10811
  node = _Object$entries3$_i[1];
10595
10812
 
10596
- if (!available.has(node.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_INSERT_REFERENCE))) {
10597
- containerElement.removeChild(node);
10813
+ if (!available.has(node.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT_REFERENCE))) {
10814
+ try {
10815
+ containerElement.removeChild(node);
10816
+ } catch (e) {}
10598
10817
  }
10599
10818
  }
10600
10819
  };
10601
10820
 
10602
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
10821
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
10603
10822
  var _ret = _loop();
10604
10823
 
10605
10824
  if (_ret === "continue") continue;
10606
10825
  }
10607
10826
  } catch (err) {
10608
- _iterator4.e(err);
10827
+ _iterator5.e(err);
10609
10828
  } finally {
10610
- _iterator4.f();
10829
+ _iterator5.f();
10611
10830
  }
10612
10831
 
10613
10832
  p.pop();
@@ -10633,7 +10852,7 @@ function insertElement(change) {
10633
10852
 
10634
10853
 
10635
10854
  function appendNewDocumentFragment(container, key, ref, path) {
10636
- var template = (0,_template_js__WEBPACK_IMPORTED_MODULE_12__.findDocumentTemplate)(key, container);
10855
+ var template = (0,_template_js__WEBPACK_IMPORTED_MODULE_14__.findDocumentTemplate)(key, container);
10637
10856
  var nodes = template.createDocumentFragment();
10638
10857
 
10639
10858
  for (var _i5 = 0, _Object$entries4 = Object.entries(nodes.childNodes); _i5 < _Object$entries4.length; _i5++) {
@@ -10642,7 +10861,7 @@ function appendNewDocumentFragment(container, key, ref, path) {
10642
10861
 
10643
10862
  if (node instanceof HTMLElement) {
10644
10863
  applyRecursive(node, key, path);
10645
- node.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_INSERT_REFERENCE, ref);
10864
+ node.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT_REFERENCE, ref);
10646
10865
  }
10647
10866
 
10648
10867
  container.appendChild(node);
@@ -10660,15 +10879,15 @@ function appendNewDocumentFragment(container, key, ref, path) {
10660
10879
 
10661
10880
  function applyRecursive(node, key, path) {
10662
10881
  if (node instanceof HTMLElement) {
10663
- if (node.hasAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_REPLACE)) {
10664
- var value = node.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_REPLACE);
10665
- node.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_REPLACE, value.replaceAll("path:" + key, "path:" + path));
10882
+ if (node.hasAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE)) {
10883
+ var value = node.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE);
10884
+ node.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE, value.replaceAll("path:" + key, "path:" + path));
10666
10885
  }
10667
10886
 
10668
- if (node.hasAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_ATTRIBUTES)) {
10669
- var _value = node.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_ATTRIBUTES);
10887
+ if (node.hasAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES)) {
10888
+ var _value = node.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES);
10670
10889
 
10671
- node.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_ATTRIBUTES, _value.replaceAll("path:" + key, "path:" + path));
10890
+ node.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES, _value.replaceAll("path:" + key, "path:" + path));
10672
10891
  }
10673
10892
 
10674
10893
  for (var _i6 = 0, _Object$entries5 = Object.entries(node.childNodes); _i6 < _Object$entries5.length; _i6++) {
@@ -10690,10 +10909,10 @@ function applyRecursive(node, key, path) {
10690
10909
 
10691
10910
  function updateContent(change) {
10692
10911
  var self = this;
10693
- var subject = self.subject.getRealSubject();
10694
- var p = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(change === null || change === void 0 ? void 0 : change['path']);
10695
- runUpdateContent.call(this, this.element, p, subject);
10696
- var slots = this.element.querySelectorAll('slot');
10912
+ var subject = self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject();
10913
+ var p = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(change === null || change === void 0 ? void 0 : change['path']);
10914
+ runUpdateContent.call(this, this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element, p, subject);
10915
+ var slots = this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.querySelectorAll('slot');
10697
10916
 
10698
10917
  if (slots.length > 0) {
10699
10918
  for (var _i7 = 0, _Object$entries6 = Object.entries(slots); _i7 < _Object$entries6.length; _i7++) {
@@ -10702,9 +10921,9 @@ function updateContent(change) {
10702
10921
 
10703
10922
  for (var _i8 = 0, _Object$entries7 = Object.entries(slot.assignedNodes()); _i8 < _Object$entries7.length; _i8++) {
10704
10923
  var _Object$entries7$_i = _slicedToArray(_Object$entries7[_i8], 2),
10705
- element = _Object$entries7$_i[1];
10924
+ _element3 = _Object$entries7$_i[1];
10706
10925
 
10707
- runUpdateContent.call(this, element, p, subject);
10926
+ runUpdateContent.call(this, _element3, p, subject);
10708
10927
  }
10709
10928
  }
10710
10929
  }
@@ -10720,18 +10939,18 @@ function updateContent(change) {
10720
10939
 
10721
10940
 
10722
10941
  function runUpdateContent(container, parts, subject) {
10723
- var _this3 = this;
10942
+ var _this2 = this;
10724
10943
 
10725
- if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isArray)(parts)) return;
10944
+ if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(parts)) return;
10726
10945
  if (!(container instanceof HTMLElement)) return;
10727
- parts = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(parts);
10946
+ parts = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(parts);
10728
10947
  var mem = new WeakSet();
10729
10948
 
10730
10949
  while (parts.length > 0) {
10731
10950
  var current = parts.join('.');
10732
10951
  parts.pop(); // Unfortunately, static data is always changed as well, since it is not possible to react to changes here.
10733
10952
 
10734
- var query = '[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_REPLACE + '^="path:' + current + '"], [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_REPLACE + '^="static:"]';
10953
+ var query = '[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE + '^="path:' + current + '"], [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE + '^="static:"]';
10735
10954
  var e = container.querySelectorAll('' + query);
10736
10955
  var iterator = new Set(_toConsumableArray(e));
10737
10956
 
@@ -10742,21 +10961,21 @@ function runUpdateContent(container, parts, subject) {
10742
10961
  iterator.forEach(function (key, element) {
10743
10962
  if (mem.has(element)) return;
10744
10963
  mem.add(element);
10745
- var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_REPLACE);
10746
- var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(attributes);
10747
- var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_2__.Pipe(cmd);
10964
+ var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE);
10965
+ var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(attributes);
10966
+ var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
10748
10967
 
10749
- _this3.callbacks.forEach(function (f, n) {
10968
+ _this2[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
10750
10969
  pipe.setCallback(n, f);
10751
10970
  });
10752
10971
 
10753
10972
  var value;
10754
10973
 
10755
10974
  try {
10756
- element.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_ERRORMESSAGE);
10975
+ element.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE);
10757
10976
  value = pipe.run(subject);
10758
10977
  } catch (e) {
10759
- element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_ERRORMESSAGE, e.message);
10978
+ element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, e.message);
10760
10979
  }
10761
10980
 
10762
10981
  if (value instanceof HTMLElement) {
@@ -10781,9 +11000,9 @@ function runUpdateContent(container, parts, subject) {
10781
11000
 
10782
11001
 
10783
11002
  function updateAttributes(change) {
10784
- var subject = this.subject.getRealSubject();
10785
- var p = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(change === null || change === void 0 ? void 0 : change['path']);
10786
- runUpdateAttributes.call(this, this.element, p, subject);
11003
+ var subject = this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject();
11004
+ var p = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(change === null || change === void 0 ? void 0 : change['path']);
11005
+ runUpdateAttributes.call(this, this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element, p, subject);
10787
11006
  }
10788
11007
  /**
10789
11008
  * @private
@@ -10796,18 +11015,18 @@ function updateAttributes(change) {
10796
11015
 
10797
11016
 
10798
11017
  function runUpdateAttributes(container, parts, subject) {
10799
- var _this4 = this;
11018
+ var _this3 = this;
10800
11019
 
10801
11020
  var self = this;
10802
- if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isArray)(parts)) return;
10803
- parts = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(parts);
11021
+ if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(parts)) return;
11022
+ parts = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(parts);
10804
11023
  var mem = new WeakSet();
10805
11024
 
10806
11025
  while (parts.length > 0) {
10807
11026
  var current = parts.join('.');
10808
11027
  parts.pop();
10809
11028
  var iterator = new Set();
10810
- var query = '[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_ATTRIBUTES + '*="path:' + current + '"], [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_ATTRIBUTES + '^="static:"]';
11029
+ var query = '[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_SELECT_THIS + '], [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES + '*="path:' + current + '"], [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES + '^="static:"]';
10811
11030
  var e = container.querySelectorAll(query);
10812
11031
 
10813
11032
  if (e.length > 0) {
@@ -10821,27 +11040,27 @@ function runUpdateAttributes(container, parts, subject) {
10821
11040
  iterator.forEach(function (key, element) {
10822
11041
  if (mem.has(element)) return;
10823
11042
  mem.add(element);
10824
- var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_ATTRIBUTES);
11043
+ var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES);
10825
11044
 
10826
11045
  var _loop2 = function _loop2() {
10827
11046
  var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i9], 2),
10828
11047
  def = _Object$entries8$_i[1];
10829
11048
 
10830
- def = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(def);
11049
+ def = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def);
10831
11050
  var i = def.indexOf(' ');
10832
- var name = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(def.substr(0, i));
10833
- var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(def.substr(i));
10834
- var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_2__.Pipe(cmd);
10835
- self.callbacks.forEach(function (f, n) {
11051
+ var name = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def.substr(0, i));
11052
+ var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def.substr(i));
11053
+ var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
11054
+ self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
10836
11055
  pipe.setCallback(n, f, element);
10837
11056
  });
10838
11057
  var value = void 0;
10839
11058
 
10840
11059
  try {
10841
- element.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_ERRORMESSAGE);
11060
+ element.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE);
10842
11061
  value = pipe.run(subject);
10843
11062
  } catch (e) {
10844
- element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_ERRORMESSAGE, e.message);
11063
+ element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, e.message);
10845
11064
  }
10846
11065
 
10847
11066
  if (value === undefined) {
@@ -10850,7 +11069,7 @@ function runUpdateAttributes(container, parts, subject) {
10850
11069
  element.setAttribute(name, value);
10851
11070
  }
10852
11071
 
10853
- handleInputControlAttributeUpdate.call(_this4, element, name, value);
11072
+ handleInputControlAttributeUpdate.call(_this3, element, name, value);
10854
11073
  };
10855
11074
 
10856
11075
  for (var _i9 = 0, _Object$entries8 = Object.entries(attributes.split(',')); _i9 < _Object$entries8.length; _i9++) {
@@ -10907,19 +11126,23 @@ function handleInputControlAttributeUpdate(element, name, value) {
10907
11126
  } else if (element instanceof HTMLInputElement) {
10908
11127
  switch (element.type) {
10909
11128
  case 'radio':
10910
- if (name === 'checked' && value !== undefined) {
10911
- element.checked = true;
10912
- } else {
10913
- element.checked = false;
11129
+ if (name === 'checked') {
11130
+ if (value !== undefined) {
11131
+ element.checked = true;
11132
+ } else {
11133
+ element.checked = false;
11134
+ }
10914
11135
  }
10915
11136
 
10916
11137
  break;
10917
11138
 
10918
11139
  case 'checkbox':
10919
- if (name === 'checked' && value !== undefined) {
10920
- element.checked = true;
10921
- } else {
10922
- element.checked = false;
11140
+ if (name === 'checked') {
11141
+ if (value !== undefined) {
11142
+ element.checked = true;
11143
+ } else {
11144
+ element.checked = false;
11145
+ }
10923
11146
  }
10924
11147
 
10925
11148
  break;
@@ -10939,7 +11162,7 @@ function handleInputControlAttributeUpdate(element, name, value) {
10939
11162
  }
10940
11163
  }
10941
11164
 
10942
- (0,_namespace_js__WEBPACK_IMPORTED_MODULE_4__.assignToNamespace)('Monster.DOM', Updater);
11165
+ (0,_namespace_js__WEBPACK_IMPORTED_MODULE_5__.assignToNamespace)('Monster.DOM', Updater);
10943
11166
 
10944
11167
 
10945
11168
  /***/ }),
@@ -10985,7 +11208,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
10985
11208
  *
10986
11209
  * ```
10987
11210
  * <script type="module">
10988
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
11211
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
10989
11212
  * Monster.Util.trimSpaces(" hello ")
10990
11213
  * </script>
10991
11214
  * ```
@@ -10994,7 +11217,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
10994
11217
  *
10995
11218
  * ```
10996
11219
  * <script type="module">
10997
- * import {trimSpaces} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/util/trimspaces.js';
11220
+ * import {trimSpaces} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/util/trimspaces.js';
10998
11221
  * trimSpaces(' hello \\ ')
10999
11222
  * </script>
11000
11223
  * ```
@@ -11071,30 +11294,36 @@ function trimSpaces(value) {
11071
11294
  __webpack_require__.r(__webpack_exports__);
11072
11295
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11073
11296
  /* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
11074
- /* harmony export */ "getWindow": function() { return /* binding */ getWindow; },
11075
- /* harmony export */ "getDocument": function() { return /* binding */ getDocument; },
11076
- /* harmony export */ "getDocumentFragmentFromString": function() { return /* binding */ getDocumentFragmentFromString; }
11297
+ /* harmony export */ "findTargetElementFromEvent": function() { return /* binding */ findTargetElementFromEvent; },
11298
+ /* harmony export */ "fireEvent": function() { return /* binding */ fireEvent; },
11299
+ /* harmony export */ "fireCustomEvent": function() { return /* binding */ fireCustomEvent; }
11077
11300
  /* harmony export */ });
11078
11301
  /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
11079
- /* harmony import */ var _types_global_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
11302
+ /* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
11080
11303
  /* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
11304
+ /* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43);
11081
11305
 
11082
11306
  /**
11083
11307
  * @author schukai GmbH
11084
11308
  */
11085
11309
 
11086
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
11310
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
11311
+
11312
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11313
+
11314
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
11315
+
11087
11316
 
11088
11317
 
11089
11318
 
11090
11319
 
11091
11320
  /**
11092
- * this method fetches the document object
11321
+ * You can call the function via the monster namespace `new Monster.DOM.fireEvent()`.
11093
11322
  *
11094
11323
  * ```
11095
11324
  * <script type="module">
11096
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
11097
- * console.log(Monster.DOM.getDocument())
11325
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
11326
+ * new Monster.DOM.fireEvent()
11098
11327
  * </script>
11099
11328
  * ```
11100
11329
  *
@@ -11102,47 +11331,256 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
11102
11331
  *
11103
11332
  * ```
11104
11333
  * <script type="module">
11105
- * import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/util.js';
11106
- * console.log(getDocument())
11334
+ * import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/events.js';
11335
+ * fireEvent()
11107
11336
  * </script>
11108
11337
  * ```
11109
11338
  *
11110
- * in nodejs this functionality can be performed with [jsdom](https://www.npmjs.com/package/jsdom).
11111
- *
11112
- * ```
11113
- * import {JSDOM} from "jsdom"
11114
- * if (typeof window !== "object") {
11115
- * const {window} = new JSDOM('', {
11116
- * url: 'http://example.com/',
11117
- * pretendToBeVisual: true
11118
- * });
11119
- *
11120
- * [
11121
- * 'self',
11122
- * 'document',
11123
- * 'Document',
11124
- * 'Node',
11125
- * 'Element',
11126
- * 'HTMLElement',
11127
- * 'DocumentFragment',
11128
- * 'DOMParser',
11129
- * 'XMLSerializer',
11130
- * 'NodeFilter',
11131
- * 'InputEvent',
11132
- * 'CustomEvent'
11133
- * ].forEach(key => (getGlobal()[key] = window[key]));
11134
- * }
11135
- * ```
11136
- *
11137
- * @returns {object}
11138
- * @since 1.6.0
11339
+ * @param {HTMLElement|HTMLCollection|NodeList} element
11340
+ * @param {string} type
11341
+ * @return {void}
11342
+ * @since 1.10.0
11139
11343
  * @copyright schukai GmbH
11140
11344
  * @memberOf Monster.DOM
11141
- * @throws {Error} not supported environment
11345
+ * @throws {TypeError} value is not an instance of HTMLElement or HTMLCollection
11346
+ * @summary Construct and send and event
11142
11347
  */
11143
11348
 
11144
- function getDocument() {
11145
- var _getGlobal;
11349
+ function fireEvent(element, type) {
11350
+ var document = (0,_util_js__WEBPACK_IMPORTED_MODULE_3__.getDocument)();
11351
+
11352
+ if (element instanceof HTMLElement) {
11353
+ if (type === 'click') {
11354
+ element.click();
11355
+ return;
11356
+ }
11357
+
11358
+ var event = new Event((0,_types_validate_js__WEBPACK_IMPORTED_MODULE_2__.validateString)(type), {
11359
+ bubbles: true,
11360
+ cancelable: true
11361
+ });
11362
+ element.dispatchEvent(event);
11363
+ } else if (element instanceof HTMLCollection || element instanceof NodeList) {
11364
+ var _iterator = _createForOfIteratorHelper(element),
11365
+ _step;
11366
+
11367
+ try {
11368
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
11369
+ var e = _step.value;
11370
+ fireEvent(e, type);
11371
+ }
11372
+ } catch (err) {
11373
+ _iterator.e(err);
11374
+ } finally {
11375
+ _iterator.f();
11376
+ }
11377
+ } else {
11378
+ throw new TypeError('value is not an instance of HTMLElement or HTMLCollection');
11379
+ }
11380
+ }
11381
+ /**
11382
+ * You can call the function via the monster namespace `new Monster.DOM.fireCustomEvent()`.
11383
+ *
11384
+ * ```
11385
+ * <script type="module">
11386
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
11387
+ * new Monster.DOM.fireCustomEvent()
11388
+ * </script>
11389
+ * ```
11390
+ *
11391
+ * Alternatively, you can also integrate this function individually.
11392
+ *
11393
+ * ```
11394
+ * <script type="module">
11395
+ * import {fireCustomEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/events.js';
11396
+ * fireCustomEvent()
11397
+ * </script>
11398
+ * ```
11399
+ *
11400
+ * @param {HTMLElement|HTMLCollection|NodeList} element
11401
+ * @param {string} type
11402
+ * @return {void}
11403
+ * @since 1.29.0
11404
+ * @copyright schukai GmbH
11405
+ * @memberOf Monster.DOM
11406
+ * @throws {TypeError} value is not an instance of HTMLElement or HTMLCollection
11407
+ * @summary Construct and send and event
11408
+ */
11409
+
11410
+
11411
+ function fireCustomEvent(element, type, detail) {
11412
+ var document = (0,_util_js__WEBPACK_IMPORTED_MODULE_3__.getDocument)();
11413
+
11414
+ if (element instanceof HTMLElement) {
11415
+ if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_1__.isObject)(detail)) {
11416
+ detail = {
11417
+ detail: detail
11418
+ };
11419
+ }
11420
+
11421
+ var event = new CustomEvent((0,_types_validate_js__WEBPACK_IMPORTED_MODULE_2__.validateString)(type), {
11422
+ bubbles: true,
11423
+ cancelable: true,
11424
+ detail: detail
11425
+ });
11426
+ element.dispatchEvent(event);
11427
+ } else if (element instanceof HTMLCollection || element instanceof NodeList) {
11428
+ var _iterator2 = _createForOfIteratorHelper(element),
11429
+ _step2;
11430
+
11431
+ try {
11432
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
11433
+ var e = _step2.value;
11434
+ fireCustomEvent(e, type, detail);
11435
+ }
11436
+ } catch (err) {
11437
+ _iterator2.e(err);
11438
+ } finally {
11439
+ _iterator2.f();
11440
+ }
11441
+ } else {
11442
+ throw new TypeError('value is not an instance of HTMLElement or HTMLCollection');
11443
+ }
11444
+ }
11445
+ /**
11446
+ * This function gets the path `Event.composedPath()` from an event and tries to find the next element
11447
+ * up the tree `element.closest()` with the attribute and value. If no value, or a value that is undefined or null,
11448
+ * is specified, only the attribute is searched.
11449
+ *
11450
+ * You can call the function via the monster namespace `new Monster.DOM.findTargetElementFromEvent()`.
11451
+ *
11452
+ * ```
11453
+ * <script type="module">
11454
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
11455
+ * new Monster.DOM.findTargetElementFromEvent()
11456
+ * </script>
11457
+ * ```
11458
+ *
11459
+ * Alternatively, you can also integrate this function individually.
11460
+ *
11461
+ * ```
11462
+ * <script type="module">
11463
+ * import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/events.js';
11464
+ * findTargetElementFromEvent()
11465
+ * </script>
11466
+ * ```
11467
+ *
11468
+ * @since 1.14.0
11469
+ * @param {Event} event
11470
+ * @param {string} attributeName
11471
+ * @param {string|null|undefined} attributeValue
11472
+ * @throws {Error} unsupported event
11473
+ * @memberOf Monster.DOM
11474
+ * @throws {TypeError} value is not a string
11475
+ * @throws {TypeError} value is not an instance of HTMLElement
11476
+ * @summary Help function to find the appropriate control
11477
+ */
11478
+
11479
+
11480
+ function findTargetElementFromEvent(event, attributeName, attributeValue) {
11481
+ (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_2__.validateInstance)(event, Event);
11482
+
11483
+ if (typeof event.composedPath !== 'function') {
11484
+ throw new Error('unsupported event');
11485
+ }
11486
+
11487
+ var path = event.composedPath(); // closest cannot be used here, because closest is not correct for slotted elements
11488
+
11489
+ if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(path)) {
11490
+ for (var i = 0; i < path.length; i++) {
11491
+ var o = path[i];
11492
+
11493
+ if (o instanceof HTMLElement && o.hasAttribute(attributeName) && (attributeValue === undefined || o.getAttribute(attributeName) === attributeValue)) {
11494
+ return o;
11495
+ }
11496
+ }
11497
+ }
11498
+
11499
+ return undefined;
11500
+ }
11501
+
11502
+ (0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.DOM', findTargetElementFromEvent, fireEvent, fireCustomEvent);
11503
+
11504
+
11505
+ /***/ }),
11506
+ /* 43 */
11507
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
11508
+
11509
+ __webpack_require__.r(__webpack_exports__);
11510
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11511
+ /* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
11512
+ /* harmony export */ "getWindow": function() { return /* binding */ getWindow; },
11513
+ /* harmony export */ "getDocument": function() { return /* binding */ getDocument; },
11514
+ /* harmony export */ "getDocumentFragmentFromString": function() { return /* binding */ getDocumentFragmentFromString; }
11515
+ /* harmony export */ });
11516
+ /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
11517
+ /* harmony import */ var _types_global_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
11518
+ /* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
11519
+
11520
+ /**
11521
+ * @author schukai GmbH
11522
+ */
11523
+
11524
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
11525
+
11526
+
11527
+
11528
+
11529
+ /**
11530
+ * this method fetches the document object
11531
+ *
11532
+ * ```
11533
+ * <script type="module">
11534
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
11535
+ * console.log(Monster.DOM.getDocument())
11536
+ * </script>
11537
+ * ```
11538
+ *
11539
+ * Alternatively, you can also integrate this function individually.
11540
+ *
11541
+ * ```
11542
+ * <script type="module">
11543
+ * import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/util.js';
11544
+ * console.log(getDocument())
11545
+ * </script>
11546
+ * ```
11547
+ *
11548
+ * in nodejs this functionality can be performed with [jsdom](https://www.npmjs.com/package/jsdom).
11549
+ *
11550
+ * ```
11551
+ * import {JSDOM} from "jsdom"
11552
+ * if (typeof window !== "object") {
11553
+ * const {window} = new JSDOM('', {
11554
+ * url: 'http://example.com/',
11555
+ * pretendToBeVisual: true
11556
+ * });
11557
+ *
11558
+ * [
11559
+ * 'self',
11560
+ * 'document',
11561
+ * 'Document',
11562
+ * 'Node',
11563
+ * 'Element',
11564
+ * 'HTMLElement',
11565
+ * 'DocumentFragment',
11566
+ * 'DOMParser',
11567
+ * 'XMLSerializer',
11568
+ * 'NodeFilter',
11569
+ * 'InputEvent',
11570
+ * 'CustomEvent'
11571
+ * ].forEach(key => (getGlobal()[key] = window[key]));
11572
+ * }
11573
+ * ```
11574
+ *
11575
+ * @returns {object}
11576
+ * @since 1.6.0
11577
+ * @copyright schukai GmbH
11578
+ * @memberOf Monster.DOM
11579
+ * @throws {Error} not supported environment
11580
+ */
11581
+
11582
+ function getDocument() {
11583
+ var _getGlobal;
11146
11584
 
11147
11585
  var document = (_getGlobal = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_1__.getGlobal)()) === null || _getGlobal === void 0 ? void 0 : _getGlobal['document'];
11148
11586
 
@@ -11157,7 +11595,7 @@ function getDocument() {
11157
11595
  *
11158
11596
  * ```
11159
11597
  * <script type="module">
11160
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
11598
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
11161
11599
  * console.log(Monster.DOM.getWindow())
11162
11600
  * </script>
11163
11601
  * ```
@@ -11166,7 +11604,7 @@ function getDocument() {
11166
11604
  *
11167
11605
  * ```
11168
11606
  * <script type="module">
11169
- * import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/util.js';
11607
+ * import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/util.js';
11170
11608
  * console.log(getWindow(null))
11171
11609
  * </script>
11172
11610
  * ```
@@ -11226,7 +11664,7 @@ function getWindow() {
11226
11664
  *
11227
11665
  * ```
11228
11666
  * <script type="module">
11229
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
11667
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
11230
11668
  * console.log(Monster.DOM.getDocumentFragmentFromString())
11231
11669
  * </script>
11232
11670
  * ```
@@ -11235,7 +11673,7 @@ function getWindow() {
11235
11673
  *
11236
11674
  * ```
11237
11675
  * <script type="module">
11238
- * import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/util.js';
11676
+ * import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/util.js';
11239
11677
  * console.log(getDocumentFragmentFromString('<div></div>'))
11240
11678
  * </script>
11241
11679
  * ```
@@ -11287,157 +11725,6 @@ function getDocumentFragmentFromString(html) {
11287
11725
  (0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.DOM', getWindow, getDocument, getDocumentFragmentFromString);
11288
11726
 
11289
11727
 
11290
- /***/ }),
11291
- /* 43 */
11292
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
11293
-
11294
- __webpack_require__.r(__webpack_exports__);
11295
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11296
- /* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
11297
- /* harmony export */ "findTargetElementFromEvent": function() { return /* binding */ findTargetElementFromEvent; },
11298
- /* harmony export */ "fireEvent": function() { return /* binding */ fireEvent; }
11299
- /* harmony export */ });
11300
- /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
11301
- /* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
11302
- /* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
11303
- /* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
11304
-
11305
- /**
11306
- * @author schukai GmbH
11307
- */
11308
-
11309
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
11310
-
11311
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11312
-
11313
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
11314
-
11315
-
11316
-
11317
-
11318
-
11319
- /**
11320
- * You can call the function via the monster namespace `new Monster.DOM.fireEvent()`.
11321
- *
11322
- * ```
11323
- * <script type="module">
11324
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
11325
- * console.log(new Monster.DOM.fireEvent())
11326
- * </script>
11327
- * ```
11328
- *
11329
- * Alternatively, you can also integrate this function individually.
11330
- *
11331
- * ```
11332
- * <script type="module">
11333
- * import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/events.js';
11334
- * console.log(fireEvent())
11335
- * </script>
11336
- * ```
11337
- *
11338
- * @param {HTMLElement|HTMLCollection|NodeList} element
11339
- * @param {string} type
11340
- * @return {void}
11341
- * @since 1.10.0
11342
- * @copyright schukai GmbH
11343
- * @memberOf Monster.DOM
11344
- * @throws {TypeError} value is not an instance of HTMLElement or HTMLCollection
11345
- * @summary Construct and send and event
11346
- */
11347
-
11348
- function fireEvent(element, type) {
11349
- var document = (0,_util_js__WEBPACK_IMPORTED_MODULE_3__.getDocument)();
11350
-
11351
- if (element instanceof HTMLElement) {
11352
- if (type === 'click') {
11353
- element.click();
11354
- return;
11355
- }
11356
-
11357
- var event = new Event((0,_types_validate_js__WEBPACK_IMPORTED_MODULE_2__.validateString)(type), {
11358
- bubbles: true,
11359
- cancelable: true
11360
- });
11361
- element.dispatchEvent(event);
11362
- } else if (element instanceof HTMLCollection || element instanceof NodeList) {
11363
- var _iterator = _createForOfIteratorHelper(element),
11364
- _step;
11365
-
11366
- try {
11367
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
11368
- var e = _step.value;
11369
- fireEvent(e, type);
11370
- }
11371
- } catch (err) {
11372
- _iterator.e(err);
11373
- } finally {
11374
- _iterator.f();
11375
- }
11376
- } else {
11377
- throw new TypeError('value is not an instance of HTMLElement or HTMLCollection');
11378
- }
11379
- }
11380
- /**
11381
- * This function gets the path `Event.composedPath()` from an event and tries to find the next element
11382
- * up the tree `element.closest()` with the attribute and value. If no value, or a value that is undefined or null,
11383
- * is specified, only the attribute is searched.
11384
- *
11385
- * You can call the function via the monster namespace `new Monster.DOM.findTargetElementFromEvent()`.
11386
- *
11387
- * ```
11388
- * <script type="module">
11389
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
11390
- * console.log(new Monster.DOM.findTargetElementFromEvent())
11391
- * </script>
11392
- * ```
11393
- *
11394
- * Alternatively, you can also integrate this function individually.
11395
- *
11396
- * ```
11397
- * <script type="module">
11398
- * import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/events.js';
11399
- * console.log(findTargetElementFromEvent())
11400
- * </script>
11401
- * ```
11402
- *
11403
- * @since 1.14.0
11404
- * @param {Event} event
11405
- * @param {string} attributeName
11406
- * @param {string|null|undefined} attributeValue
11407
- * @throws {Error} unsupported event
11408
- * @memberOf Monster.DOM
11409
- * @throws {TypeError} value is not a string
11410
- * @throws {TypeError} value is not an instance of HTMLElement
11411
- * @summary Help function to find the appropriate control
11412
- */
11413
-
11414
-
11415
- function findTargetElementFromEvent(event, attributeName, attributeValue) {
11416
- (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_2__.validateInstance)(event, Event);
11417
-
11418
- if (typeof event.composedPath !== 'function') {
11419
- throw new Error('unsupported event');
11420
- }
11421
-
11422
- var path = event.composedPath();
11423
- var element = path === null || path === void 0 ? void 0 : path[0]; // closest cannot be used here, because closest is not correct for slotted elements
11424
-
11425
- if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(path)) {
11426
- for (var i = 0; i < path.length; i++) {
11427
- var o = path[i];
11428
-
11429
- if (o instanceof HTMLElement && o.hasAttribute(attributeName) && (attributeValue === undefined || o.getAttribute(attributeName) === attributeValue)) {
11430
- return o;
11431
- }
11432
- }
11433
- }
11434
-
11435
- return undefined;
11436
- }
11437
-
11438
- (0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.DOM', findTargetElementFromEvent, fireEvent);
11439
-
11440
-
11441
11728
  /***/ }),
11442
11729
  /* 44 */
11443
11730
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@@ -11449,7 +11736,7 @@ __webpack_require__.r(__webpack_exports__);
11449
11736
  /* harmony export */ });
11450
11737
  /* harmony import */ var _i18n_locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
11451
11738
  /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
11452
- /* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
11739
+ /* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43);
11453
11740
 
11454
11741
  /**
11455
11742
  * @author schukai GmbH
@@ -11476,7 +11763,7 @@ var DEFAULT_LANGUAGE = 'en';
11476
11763
  *
11477
11764
  * ```
11478
11765
  * <script type="module">
11479
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
11766
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
11480
11767
  * new Monster.DOM.getLocaleOfDocument()
11481
11768
  * </script>
11482
11769
  * ```
@@ -11485,7 +11772,7 @@ var DEFAULT_LANGUAGE = 'en';
11485
11772
  *
11486
11773
  * ```
11487
11774
  * <script type="module">
11488
- * import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/locale.js';
11775
+ * import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/dom/locale.js';
11489
11776
  * new getLocaleOfDocument()
11490
11777
  * </script>
11491
11778
  * ```
@@ -11578,7 +11865,7 @@ var localeStringSymbol = Symbol('localeString');
11578
11865
  *
11579
11866
  * ```
11580
11867
  * <script type="module">
11581
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
11868
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
11582
11869
  * new Monster.I18n.Locale()
11583
11870
  * </script>
11584
11871
  * ```
@@ -11587,7 +11874,7 @@ var localeStringSymbol = Symbol('localeString');
11587
11874
  *
11588
11875
  * ```
11589
11876
  * <script type="module">
11590
- * import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/i18n/locale.js';
11877
+ * import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/i18n/locale.js';
11591
11878
  * new Locale()
11592
11879
  * </script>
11593
11880
  * ```
@@ -11780,7 +12067,7 @@ var Locale = /*#__PURE__*/function (_Base) {
11780
12067
  *
11781
12068
  * ```
11782
12069
  * <script type="module">
11783
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
12070
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
11784
12071
  * new Monster.I18n.createLocale()
11785
12072
  * </script>
11786
12073
  * ```
@@ -11789,7 +12076,7 @@ var Locale = /*#__PURE__*/function (_Base) {
11789
12076
  *
11790
12077
  * ```
11791
12078
  * <script type="module">
11792
- * import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/i18n/locale.js';
12079
+ * import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/i18n/locale.js';
11793
12080
  * createLocale()
11794
12081
  * </script>
11795
12082
  * ```
@@ -11965,7 +12252,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
11965
12252
  *
11966
12253
  * ```
11967
12254
  * <script type="module">
11968
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
12255
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
11969
12256
  * new Monster.I18n.Provider()
11970
12257
  * </script>
11971
12258
  * ```
@@ -11974,7 +12261,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
11974
12261
  *
11975
12262
  * ```
11976
12263
  * <script type="module">
11977
- * import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/i18n/provider.js';
12264
+ * import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/i18n/provider.js';
11978
12265
  * new Provider()
11979
12266
  * </script>
11980
12267
  * ```
@@ -12075,7 +12362,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
12075
12362
  *
12076
12363
  * ```
12077
12364
  * <script type="module">
12078
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
12365
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
12079
12366
  * new Monster.Types.BaseWithOptions()
12080
12367
  * </script>
12081
12368
  * ```
@@ -12084,7 +12371,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
12084
12371
  *
12085
12372
  * ```
12086
12373
  * <script type="module">
12087
- * import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/basewithoptions.js';
12374
+ * import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/basewithoptions.js';
12088
12375
  * new BaseWithOptions()
12089
12376
  * </script>
12090
12377
  * ```
@@ -12225,7 +12512,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
12225
12512
  *
12226
12513
  * ```
12227
12514
  * <script type="module">
12228
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
12515
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
12229
12516
  * new Monster.I18n.Translations()
12230
12517
  * </script>
12231
12518
  * ```
@@ -12234,15 +12521,15 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
12234
12521
  *
12235
12522
  * ```
12236
12523
  * <script type="module">
12237
- * import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/i18n/translations.js';
12524
+ * import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/i18n/translations.js';
12238
12525
  * new Translations()
12239
12526
  * </script>
12240
12527
  * ```
12241
12528
  *
12242
12529
  * @example
12243
12530
  *
12244
- * import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/i18n/translations.js';
12245
- * import {parseLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/i18n/locale.js';
12531
+ * import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/i18n/translations.js';
12532
+ * import {parseLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/i18n/locale.js';
12246
12533
  *
12247
12534
  * const translation = new Translations(parseLocale('en-GB'));
12248
12535
  *
@@ -12514,7 +12801,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
12514
12801
  *
12515
12802
  * ```
12516
12803
  * <script type="module">
12517
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
12804
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
12518
12805
  * new Monster.I18n.Providers.Fetch()
12519
12806
  * </script>
12520
12807
  * ```
@@ -12523,14 +12810,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
12523
12810
  *
12524
12811
  * ```
12525
12812
  * <script type="module">
12526
- * import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/i18n/providers/fetch.js';
12813
+ * import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/i18n/providers/fetch.js';
12527
12814
  * new Fetch()
12528
12815
  * </script>
12529
12816
  * ```
12530
12817
  *
12531
12818
  * @example <caption>das ist ein test</caption>
12532
12819
  *
12533
- * import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/i18n/providers/fetch.js';
12820
+ * import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/i18n/providers/fetch.js';
12534
12821
  *
12535
12822
  * // fetch from API
12536
12823
  * const translation = new Fetch('https://example.com/${language}.json').getTranslation('en-GB');
@@ -12760,7 +13047,7 @@ var workingDataSymbol = Symbol('workingData');
12760
13047
  *
12761
13048
  * ```
12762
13049
  * <script type="module">
12763
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
13050
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
12764
13051
  * new Monster.Text.Formatter()
12765
13052
  * </script>
12766
13053
  * ```
@@ -12769,7 +13056,7 @@ var workingDataSymbol = Symbol('workingData');
12769
13056
  *
12770
13057
  * ```
12771
13058
  * <script type="module">
12772
- * import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/text/formatter.js';
13059
+ * import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/text/formatter.js';
12773
13060
  * new Formatter()
12774
13061
  * </script>
12775
13062
  * ```
@@ -12814,7 +13101,7 @@ var workingDataSymbol = Symbol('workingData');
12814
13101
  *
12815
13102
  * @example
12816
13103
  *
12817
- * import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/text/formatter.js';
13104
+ * import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/text/formatter.js';
12818
13105
  *
12819
13106
  * new Formatter({
12820
13107
  * a: {
@@ -13159,7 +13446,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
13159
13446
  *
13160
13447
  * ```
13161
13448
  * <script type="module">
13162
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
13449
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
13163
13450
  * console.log(new Monster.Logging.Handler())
13164
13451
  * </script>
13165
13452
  * ```
@@ -13168,7 +13455,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
13168
13455
  *
13169
13456
  * ```
13170
13457
  * <script type="module">
13171
- * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/logging/handler.js';
13458
+ * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/logging/handler.js';
13172
13459
  * console.log(new Handler())
13173
13460
  * </script>
13174
13461
  * ```
@@ -13406,7 +13693,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
13406
13693
  *
13407
13694
  * ```
13408
13695
  * <script type="module">
13409
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
13696
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
13410
13697
  * console.log(new Monster.Logging.LogEntry())
13411
13698
  * </script>
13412
13699
  * ```
@@ -13415,7 +13702,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
13415
13702
  *
13416
13703
  * ```
13417
13704
  * <script type="module">
13418
- * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/logging/logentry.js';
13705
+ * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/logging/logentry.js';
13419
13706
  * console.log(new LogEntry())
13420
13707
  * </script>
13421
13708
  * ```
@@ -13601,7 +13888,7 @@ var OFF = 0;
13601
13888
  *
13602
13889
  * ```
13603
13890
  * <script type="module">
13604
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
13891
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
13605
13892
  * new Monster.Logging.Logger()
13606
13893
  * </script>
13607
13894
  * ```
@@ -13610,7 +13897,7 @@ var OFF = 0;
13610
13897
  *
13611
13898
  * ```
13612
13899
  * <script type="module">
13613
- * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/logging/logger.js';
13900
+ * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/logging/logger.js';
13614
13901
  * new Logger()
13615
13902
  * </script>
13616
13903
  * ```
@@ -13910,7 +14197,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
13910
14197
  *
13911
14198
  * ```
13912
14199
  * <script type="module">
13913
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
14200
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
13914
14201
  * console.log(new Monster.Logging.Handler.ConsoleHandler())
13915
14202
  * </script>
13916
14203
  * ```
@@ -13919,7 +14206,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
13919
14206
  *
13920
14207
  * ```
13921
14208
  * <script type="module">
13922
- * import {ConsoleHandler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/logging/handler/console.js';
14209
+ * import {ConsoleHandler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/logging/handler/console.js';
13923
14210
  * console.log(new ConsoleHandler())
13924
14211
  * </script>
13925
14212
  * ```
@@ -13995,7 +14282,7 @@ __webpack_require__.r(__webpack_exports__);
13995
14282
  *
13996
14283
  * ```
13997
14284
  * <script type="module">
13998
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
14285
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
13999
14286
  * Monster.Math.random(1,10)
14000
14287
  * // ↦ 5
14001
14288
  * </script>
@@ -14005,7 +14292,7 @@ __webpack_require__.r(__webpack_exports__);
14005
14292
  *
14006
14293
  * ```
14007
14294
  * <script type="module">
14008
- * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/math/random.js';
14295
+ * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/math/random.js';
14009
14296
  * random(1,10)
14010
14297
  * // ↦ 5
14011
14298
  * </script>
@@ -14162,7 +14449,7 @@ var internalCounter = 0;
14162
14449
  *
14163
14450
  * ```
14164
14451
  * <script type="module">
14165
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
14452
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
14166
14453
  * console.log(new Monster.Types.RandomID())
14167
14454
  * </script>
14168
14455
  * ```
@@ -14171,7 +14458,7 @@ var internalCounter = 0;
14171
14458
  *
14172
14459
  * ```
14173
14460
  * <script type="module">
14174
- * import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/randomid.js';
14461
+ * import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/randomid.js';
14175
14462
  * console.log(new RandomID())
14176
14463
  * </script>
14177
14464
  * ```
@@ -14254,7 +14541,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
14254
14541
  *
14255
14542
  * ```
14256
14543
  * <script type="module">
14257
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
14544
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
14258
14545
  * console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3
14259
14546
  * console.log(new Monster.Types.Version('1')) // ↦ 1.0.0
14260
14547
  * </script>
@@ -14264,7 +14551,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
14264
14551
  *
14265
14552
  * ```
14266
14553
  * <script type="module">
14267
- * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/version.js';
14554
+ * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/version.js';
14268
14555
  * console.log(new Version('1.2.3')) // ↦ 1.2.3
14269
14556
  * console.log(new Version('1')) // ↦ 1.0.0
14270
14557
  * </script>
@@ -14272,7 +14559,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
14272
14559
  *
14273
14560
  * @example
14274
14561
  *
14275
- * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/version.js';
14562
+ * import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/version.js';
14276
14563
  *
14277
14564
  * new Version('1.0.0') // ↦ 1.0.0
14278
14565
  * new Version(1) // ↦ 1.0.0
@@ -14406,7 +14693,7 @@ var monsterVersion;
14406
14693
  *
14407
14694
  * ```
14408
14695
  * <script type="module">
14409
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
14696
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
14410
14697
  * console.log(Monster.getVersion())
14411
14698
  * </script>
14412
14699
  * ```
@@ -14415,7 +14702,7 @@ var monsterVersion;
14415
14702
  *
14416
14703
  * ```
14417
14704
  * <script type="module">
14418
- * import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/types/version.js';
14705
+ * import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/types/version.js';
14419
14706
  * console.log(getVersion())
14420
14707
  * </script>
14421
14708
  * ```
@@ -14434,7 +14721,7 @@ function getVersion() {
14434
14721
  /**#@+ dont touch, replaced by make with package.json version */
14435
14722
 
14436
14723
 
14437
- monsterVersion = new Version('1.26.1');
14724
+ monsterVersion = new Version('1.29.0');
14438
14725
  /**#@-*/
14439
14726
 
14440
14727
  return monsterVersion;
@@ -14490,7 +14777,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
14490
14777
  *
14491
14778
  * ```
14492
14779
  * <script type="module">
14493
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
14780
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
14494
14781
  * new Monster.Util.Comparator()
14495
14782
  * </script>
14496
14783
  * ```
@@ -14499,7 +14786,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
14499
14786
  *
14500
14787
  * ```
14501
14788
  * <script type="module">
14502
- * import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/util/comparator.js';
14789
+ * import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/util/comparator.js';
14503
14790
  * console.log(new Comparator())
14504
14791
  * </script>
14505
14792
  * ```
@@ -14524,7 +14811,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
14524
14811
  *
14525
14812
  * @example
14526
14813
  *
14527
- * import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/util/comparator.js';
14814
+ * import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/util/comparator.js';
14528
14815
  *
14529
14816
  * console.log(new Comparator().lessThanOrEqual(2, 5))
14530
14817
  * // ↦ true
@@ -14737,7 +15024,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
14737
15024
  *
14738
15025
  * ```
14739
15026
  * <script type="module">
14740
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
15027
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/monster.js';
14741
15028
  * Monster.Util.deepFreeze({})
14742
15029
  * </script>
14743
15030
  * ```
@@ -14746,7 +15033,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
14746
15033
  *
14747
15034
  * ```
14748
15035
  * <script type="module">
14749
- * import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/util/freeze.js';
15036
+ * import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.29.0/dist/modules/util/freeze.js';
14750
15037
  * deepFreeze({})
14751
15038
  * </script>
14752
15039
  * ```
@@ -14869,12 +15156,12 @@ __webpack_require__.r(__webpack_exports__);
14869
15156
  /* harmony import */ var _dom_constants_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(33);
14870
15157
  /* harmony import */ var _dom_customcontrol_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(34);
14871
15158
  /* harmony import */ var _dom_customelement_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(35);
14872
- /* harmony import */ var _dom_events_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(43);
15159
+ /* harmony import */ var _dom_events_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(42);
14873
15160
  /* harmony import */ var _dom_locale_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(44);
14874
15161
  /* harmony import */ var _dom_template_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(38);
14875
15162
  /* harmony import */ var _dom_theme_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(39);
14876
15163
  /* harmony import */ var _dom_updater_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(40);
14877
- /* harmony import */ var _dom_util_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(42);
15164
+ /* harmony import */ var _dom_util_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(43);
14878
15165
  /* harmony import */ var _i18n_locale_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(45);
14879
15166
  /* harmony import */ var _i18n_provider_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(46);
14880
15167
  /* harmony import */ var _i18n_providers_fetch_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(49);