ku4web-components 6.4.80 → 6.4.83

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. package/angular/index.js +1 -1
  2. package/angular/index.mjs +1 -1
  3. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  4. package/dist/cjs/css-shim-6ca600c2.js +6 -0
  5. package/dist/cjs/dom-8d415461.js +75 -0
  6. package/dist/cjs/index-652a3cbf.js +14 -0
  7. package/dist/cjs/{index-1e13241e.js → index-a7b6d98c.js} +1 -1
  8. package/dist/cjs/index-c904eb3a.js +10 -0
  9. package/dist/cjs/index-ca4336bd.js +3093 -0
  10. package/dist/cjs/{index-da3ed39d.js → index-f78c109e.js} +1 -1
  11. package/dist/cjs/ku4-carousel-controls.cjs.entry.js +10 -4
  12. package/dist/cjs/ku4-carousel-slide.cjs.entry.js +1 -1
  13. package/dist/cjs/ku4-carousel.cjs.entry.js +14 -7
  14. package/dist/cjs/ku4-col.cjs.entry.js +1 -1
  15. package/dist/cjs/ku4-drawer.cjs.entry.js +1 -1
  16. package/dist/cjs/ku4-feature.cjs.entry.js +2 -2
  17. package/dist/cjs/ku4-focus-trap.cjs.entry.js +26 -26
  18. package/dist/cjs/ku4-form.cjs.entry.js +3 -3
  19. package/dist/cjs/ku4-grid.cjs.entry.js +1 -1
  20. package/dist/cjs/ku4-label.cjs.entry.js +2 -2
  21. package/dist/cjs/ku4-mask.cjs.entry.js +2 -2
  22. package/dist/cjs/ku4-modal.cjs.entry.js +3 -3
  23. package/dist/cjs/ku4-panel.cjs.entry.js +1 -1
  24. package/dist/cjs/ku4-preview.cjs.entry.js +43 -14
  25. package/dist/cjs/ku4-tab-list.cjs.entry.js +4 -4
  26. package/dist/cjs/ku4-tab-panel.cjs.entry.js +3 -3
  27. package/dist/cjs/ku4-tab.cjs.entry.js +3 -3
  28. package/dist/cjs/ku4-table.cjs.entry.js +1 -1
  29. package/dist/cjs/ku4-tooltip.cjs.entry.js +2 -2
  30. package/dist/cjs/ku4-validation.cjs.entry.js +2 -2
  31. package/dist/cjs/ku4web-components.cjs.js +103 -8
  32. package/dist/cjs/loader.cjs.js +19 -3
  33. package/dist/cjs/{shadow-css-8940f82d.js → shadow-css-78860e39.js} +1 -1
  34. package/dist/cjs/{uid-d6942c42.js → uid-97baaecc.js} +1 -1
  35. package/dist/cjs/uid-eb3bec28.js +11 -0
  36. package/dist/collection/capabilities/a11y/aria.js +26 -0
  37. package/dist/collection/capabilities/angular/index.js +24 -0
  38. package/dist/collection/capabilities/decorators/deprecated.js +20 -0
  39. package/dist/collection/capabilities/decorators/index.js +3 -0
  40. package/dist/collection/capabilities/decorators/memoize.js +7 -0
  41. package/dist/collection/capabilities/dom/isFocusable.js +7 -0
  42. package/dist/collection/capabilities/dom/queryFocusable.js +2 -0
  43. package/dist/collection/capabilities/identity/uid.js +6 -0
  44. package/dist/collection/capabilities/mask/index.js +5 -0
  45. package/dist/collection/capabilities/mask/patterns/date.js +40 -0
  46. package/dist/collection/capabilities/mask/patterns/index.js +7 -0
  47. package/dist/collection/capabilities/react/index.js +25 -0
  48. package/dist/collection/capabilities/testing/html.js +14 -0
  49. package/dist/collection/capabilities/testing/styles.js +14 -0
  50. package/dist/collection/capabilities/vue/index.js +28 -0
  51. package/dist/collection/capabilities/vue3/index.js +26 -0
  52. package/dist/collection/collection-manifest.json +31 -0
  53. package/dist/collection/components/ku4-carousel/ku4-carousel.css +221 -0
  54. package/dist/collection/components/ku4-carousel/ku4-carousel.js +369 -0
  55. package/dist/collection/components/ku4-carousel-controls/ku4-carousel-controls.css +32 -0
  56. package/dist/collection/components/ku4-carousel-controls/ku4-carousel-controls.js +112 -0
  57. package/dist/collection/components/ku4-carousel-slide/ku4-carousel-slide.css +3 -0
  58. package/dist/collection/components/ku4-carousel-slide/ku4-carousel-slide.js +159 -0
  59. package/dist/collection/components/ku4-col/ku4-col.css +601 -0
  60. package/dist/collection/components/ku4-col/ku4-col.js +288 -0
  61. package/dist/collection/components/ku4-drawer/ku4-drawer.css +56 -0
  62. package/dist/collection/components/ku4-drawer/ku4-drawer.js +163 -0
  63. package/dist/collection/components/ku4-feature/ku4-feature.js +70 -0
  64. package/dist/collection/components/ku4-focus-trap/ku4-focus-trap.css +3 -0
  65. package/dist/collection/components/ku4-focus-trap/ku4-focus-trap.js +441 -0
  66. package/dist/collection/components/ku4-form/ku4-form.js +225 -0
  67. package/dist/collection/components/ku4-grid/ku4-grid.css +751 -0
  68. package/dist/collection/components/ku4-grid/ku4-grid.js +408 -0
  69. package/dist/collection/components/ku4-label/ku4-label.css +36 -0
  70. package/dist/collection/components/ku4-label/ku4-label.js +115 -0
  71. package/dist/collection/components/ku4-mask/ku4-mask.css +3 -0
  72. package/dist/collection/components/ku4-mask/ku4-mask.js +458 -0
  73. package/dist/collection/components/ku4-modal/ku4-modal.css +85 -0
  74. package/dist/collection/components/ku4-modal/ku4-modal.js +208 -0
  75. package/dist/collection/components/ku4-panel/ku4-panel.css +14 -0
  76. package/dist/collection/components/ku4-panel/ku4-panel.js +119 -0
  77. package/dist/collection/components/ku4-preview/ku4-preview.css +23 -0
  78. package/dist/collection/components/ku4-preview/ku4-preview.js +266 -0
  79. package/dist/collection/components/ku4-tab/ku4-tab.css +82 -0
  80. package/dist/collection/components/ku4-tab/ku4-tab.js +191 -0
  81. package/dist/collection/components/ku4-tab-list/ku4-tab-list.css +6 -0
  82. package/dist/collection/components/ku4-tab-list/ku4-tab-list.js +118 -0
  83. package/dist/collection/components/ku4-tab-panel/ku4-tab-panel.css +26 -0
  84. package/dist/collection/components/ku4-tab-panel/ku4-tab-panel.js +166 -0
  85. package/dist/collection/components/ku4-table/ku4-table.css +116 -0
  86. package/dist/collection/components/ku4-table/ku4-table.js +120 -0
  87. package/dist/collection/components/ku4-tooltip/ku4-tooltip.css +56 -0
  88. package/dist/collection/components/ku4-tooltip/ku4-tooltip.js +274 -0
  89. package/dist/collection/components/ku4-validation/ku4-validation.css +19 -0
  90. package/dist/collection/components/ku4-validation/ku4-validation.js +364 -0
  91. package/dist/collection/components/ku4-validation/validate.js +14 -0
  92. package/dist/collection/index.js +1 -0
  93. package/dist/collection/security.js +27 -0
  94. package/dist/esm/app-globals-0f993ce5.js +3 -0
  95. package/dist/esm/css-shim-e6dd2538.js +4 -0
  96. package/dist/esm/dom-7fc649b0.js +73 -0
  97. package/dist/esm/index-3e1e5aa3.js +3 -0
  98. package/dist/esm/index-7fe386de.js +3057 -0
  99. package/dist/esm/index-7ff6e718.js +3 -0
  100. package/dist/esm/{index-9e3af5f4.js → index-81a98b72.js} +1 -1
  101. package/dist/esm/{index-20c3926d.js → index-bdb0771a.js} +1 -1
  102. package/dist/esm/ku4-carousel-controls.entry.js +10 -4
  103. package/dist/esm/ku4-carousel-slide.entry.js +1 -1
  104. package/dist/esm/ku4-carousel.entry.js +14 -7
  105. package/dist/esm/ku4-col.entry.js +1 -1
  106. package/dist/esm/ku4-drawer.entry.js +1 -1
  107. package/dist/esm/ku4-feature.entry.js +2 -2
  108. package/dist/esm/ku4-focus-trap.entry.js +3 -3
  109. package/dist/esm/ku4-form.entry.js +3 -3
  110. package/dist/esm/ku4-grid.entry.js +1 -1
  111. package/dist/esm/ku4-label.entry.js +2 -2
  112. package/dist/esm/ku4-mask.entry.js +2 -2
  113. package/dist/esm/ku4-modal.entry.js +3 -3
  114. package/dist/esm/ku4-panel.entry.js +1 -1
  115. package/dist/esm/ku4-preview.entry.js +34 -5
  116. package/dist/esm/ku4-tab-list.entry.js +4 -4
  117. package/dist/esm/ku4-tab-panel.entry.js +3 -3
  118. package/dist/esm/ku4-tab.entry.js +3 -3
  119. package/dist/esm/ku4-table.entry.js +1 -1
  120. package/dist/esm/ku4-tooltip.entry.js +2 -2
  121. package/dist/esm/ku4-validation.entry.js +2 -2
  122. package/dist/esm/ku4web-components.js +103 -8
  123. package/dist/esm/loader.js +19 -3
  124. package/dist/esm/{shadow-css-5d2d01ce.js → shadow-css-4d56fa31.js} +1 -1
  125. package/dist/esm/{uid-15f8c937.js → uid-1ec3509b.js} +1 -1
  126. package/dist/esm/uid-9dbd7ad0.js +9 -0
  127. package/dist/esm-es5/{index-9e3af5f4.js → index-81a98b72.js} +1 -1
  128. package/dist/esm-es5/{index-20c3926d.js → index-bdb0771a.js} +1 -1
  129. package/dist/esm-es5/ku4-carousel-controls.entry.js +1 -1
  130. package/dist/esm-es5/ku4-carousel-slide.entry.js +1 -1
  131. package/dist/esm-es5/ku4-carousel.entry.js +1 -1
  132. package/dist/esm-es5/ku4-col.entry.js +1 -1
  133. package/dist/esm-es5/ku4-drawer.entry.js +1 -1
  134. package/dist/esm-es5/ku4-feature.entry.js +1 -1
  135. package/dist/esm-es5/ku4-focus-trap.entry.js +1 -1
  136. package/dist/esm-es5/ku4-form.entry.js +1 -1
  137. package/dist/esm-es5/ku4-grid.entry.js +1 -1
  138. package/dist/esm-es5/ku4-label.entry.js +1 -1
  139. package/dist/esm-es5/ku4-mask.entry.js +1 -1
  140. package/dist/esm-es5/ku4-modal.entry.js +1 -1
  141. package/dist/esm-es5/ku4-panel.entry.js +1 -1
  142. package/dist/esm-es5/ku4-preview.entry.js +1 -1
  143. package/dist/esm-es5/ku4-tab-list.entry.js +1 -1
  144. package/dist/esm-es5/ku4-tab-panel.entry.js +1 -1
  145. package/dist/esm-es5/ku4-tab.entry.js +1 -1
  146. package/dist/esm-es5/ku4-table.entry.js +1 -1
  147. package/dist/esm-es5/ku4-tooltip.entry.js +1 -1
  148. package/dist/esm-es5/ku4-validation.entry.js +1 -1
  149. package/dist/esm-es5/ku4web-components.js +1 -1
  150. package/dist/esm-es5/loader.js +1 -1
  151. package/dist/esm-es5/{shadow-css-5d2d01ce.js → shadow-css-4d56fa31.js} +0 -0
  152. package/dist/esm-es5/uid-1ec3509b.js +1 -0
  153. package/dist/index.js +1 -1
  154. package/dist/ku4web-components/app-globals-0f993ce5.js +3 -0
  155. package/dist/ku4web-components/app-globals-497eb362.system.js +1 -0
  156. package/dist/ku4web-components/css-shim-b6eec689.system.js +1 -0
  157. package/dist/ku4web-components/css-shim-e6dd2538.js +4 -0
  158. package/dist/ku4web-components/dom-7fc649b0.js +73 -0
  159. package/dist/ku4web-components/dom-88962da0.system.js +21 -0
  160. package/dist/ku4web-components/index-380cbe3a.system.js +1 -0
  161. package/dist/ku4web-components/index-3e1e5aa3.js +3 -0
  162. package/dist/ku4web-components/index-5029fd1f.system.js +1 -0
  163. package/dist/ku4web-components/index-7d482e8a.system.js +1 -0
  164. package/dist/ku4web-components/index-7fe386de.js +3057 -0
  165. package/dist/ku4web-components/index-7ff6e718.js +3 -0
  166. package/dist/ku4web-components/index.esm.js +1 -0
  167. package/dist/ku4web-components/index.system.js +1 -0
  168. package/dist/ku4web-components/ku4-carousel-controls.entry.js +89 -0
  169. package/dist/ku4web-components/ku4-carousel-controls.system.entry.js +1 -0
  170. package/dist/ku4web-components/ku4-carousel-slide.entry.js +47 -0
  171. package/dist/ku4web-components/ku4-carousel-slide.system.entry.js +1 -0
  172. package/dist/ku4web-components/ku4-carousel.entry.js +175 -0
  173. package/dist/ku4web-components/ku4-carousel.system.entry.js +1 -0
  174. package/dist/ku4web-components/ku4-col.entry.js +75 -0
  175. package/dist/ku4web-components/ku4-col.system.entry.js +1 -0
  176. package/dist/ku4web-components/ku4-drawer.entry.js +35 -0
  177. package/dist/ku4web-components/ku4-drawer.system.entry.js +1 -0
  178. package/dist/ku4web-components/ku4-feature.entry.js +29 -0
  179. package/dist/ku4web-components/ku4-feature.system.entry.js +1 -0
  180. package/dist/ku4web-components/ku4-focus-trap.entry.js +323 -0
  181. package/dist/ku4web-components/ku4-focus-trap.system.entry.js +1 -0
  182. package/dist/ku4web-components/ku4-form.entry.js +112 -0
  183. package/dist/ku4web-components/ku4-form.system.entry.js +1 -0
  184. package/dist/ku4web-components/ku4-grid.entry.js +108 -0
  185. package/dist/ku4web-components/ku4-grid.system.entry.js +1 -0
  186. package/dist/ku4web-components/ku4-label.entry.js +70 -0
  187. package/dist/ku4web-components/ku4-label.system.entry.js +1 -0
  188. package/dist/ku4web-components/ku4-mask.entry.js +342 -0
  189. package/dist/ku4web-components/ku4-mask.system.entry.js +1 -0
  190. package/dist/ku4web-components/ku4-modal.entry.js +75 -0
  191. package/dist/ku4web-components/ku4-modal.system.entry.js +1 -0
  192. package/dist/ku4web-components/ku4-panel.entry.js +49 -0
  193. package/dist/ku4web-components/ku4-panel.system.entry.js +1 -0
  194. package/dist/ku4web-components/ku4-preview.entry.js +128 -0
  195. package/dist/ku4web-components/ku4-preview.system.entry.js +1 -0
  196. package/dist/ku4web-components/ku4-tab-list.entry.js +76 -0
  197. package/dist/ku4web-components/ku4-tab-list.system.entry.js +1 -0
  198. package/dist/ku4web-components/ku4-tab-panel.entry.js +72 -0
  199. package/dist/ku4web-components/ku4-tab-panel.system.entry.js +1 -0
  200. package/dist/ku4web-components/ku4-tab.entry.js +63 -0
  201. package/dist/ku4web-components/ku4-tab.system.entry.js +1 -0
  202. package/dist/ku4web-components/ku4-table.entry.js +79 -0
  203. package/dist/ku4web-components/ku4-table.system.entry.js +1 -0
  204. package/dist/ku4web-components/ku4-tooltip.entry.js +120 -0
  205. package/dist/ku4web-components/ku4-tooltip.system.entry.js +1 -0
  206. package/dist/ku4web-components/ku4-validation.entry.js +162 -0
  207. package/dist/ku4web-components/ku4-validation.system.entry.js +1 -0
  208. package/dist/ku4web-components/ku4web-components.css +299 -1
  209. package/dist/ku4web-components/ku4web-components.esm.js +129 -1
  210. package/dist/ku4web-components/ku4web-components.js +1 -1
  211. package/dist/ku4web-components/ku4web-components.system.js +1 -0
  212. package/dist/ku4web-components/{p-15ee8b8e.system.entry.js → p-02328d34.system.entry.js} +1 -1
  213. package/dist/ku4web-components/{p-01debe28.system.entry.js → p-050f184b.system.entry.js} +1 -1
  214. package/dist/ku4web-components/{p-8e2fca0b.system.entry.js → p-073cefec.system.entry.js} +1 -1
  215. package/dist/ku4web-components/{p-22eed87f.entry.js → p-097ba217.entry.js} +1 -1
  216. package/dist/ku4web-components/{p-f1cc1b2d.entry.js → p-0adeb8e4.entry.js} +1 -1
  217. package/dist/ku4web-components/{p-840704e4.entry.js → p-0ce97586.entry.js} +1 -1
  218. package/dist/ku4web-components/p-0f77bef9.system.js +1 -0
  219. package/dist/ku4web-components/{p-761b2cbc.system.entry.js → p-136e5a03.system.entry.js} +1 -1
  220. package/dist/ku4web-components/p-17d548db.js +1 -0
  221. package/dist/ku4web-components/{p-c1068ffa.js → p-189cde73.js} +1 -1
  222. package/dist/ku4web-components/{p-2f2d74dc.system.entry.js → p-1d5a1caf.system.entry.js} +1 -1
  223. package/dist/ku4web-components/{p-a5c7f5f7.system.entry.js → p-288482da.system.entry.js} +1 -1
  224. package/dist/ku4web-components/{p-0e010c10.system.entry.js → p-3a0d1ff7.system.entry.js} +1 -1
  225. package/dist/ku4web-components/{p-d360c64a.entry.js → p-3f147a02.entry.js} +1 -1
  226. package/dist/ku4web-components/{p-0f8708f8.entry.js → p-3f2a008c.entry.js} +1 -1
  227. package/dist/ku4web-components/{p-8faad87d.entry.js → p-3f4082d5.entry.js} +1 -1
  228. package/dist/ku4web-components/{p-7273db60.entry.js → p-49275772.entry.js} +1 -1
  229. package/dist/ku4web-components/{p-232787a5.system.entry.js → p-4bfca34b.system.entry.js} +1 -1
  230. package/dist/ku4web-components/{p-04948520.system.entry.js → p-524cef27.system.entry.js} +1 -1
  231. package/dist/ku4web-components/{p-67adc5b1.system.entry.js → p-52d815ab.system.entry.js} +1 -1
  232. package/dist/ku4web-components/{p-2edd35f8.system.entry.js → p-596beaad.system.entry.js} +1 -1
  233. package/dist/ku4web-components/{p-f06bf0ae.entry.js → p-5f9d0077.entry.js} +1 -1
  234. package/dist/ku4web-components/{p-660ebd19.entry.js → p-5fcea805.entry.js} +1 -1
  235. package/dist/ku4web-components/{p-adddaeef.entry.js → p-61214088.entry.js} +1 -1
  236. package/dist/ku4web-components/{p-d6ec34c3.entry.js → p-66b8247f.entry.js} +1 -1
  237. package/dist/ku4web-components/{p-9c0d71af.system.entry.js → p-6b9e3523.system.entry.js} +1 -1
  238. package/dist/ku4web-components/{p-02e342f7.system.entry.js → p-6cfd9011.system.entry.js} +1 -1
  239. package/dist/ku4web-components/{p-8d9eb18b.system.entry.js → p-7bfc256a.system.entry.js} +1 -1
  240. package/dist/ku4web-components/{p-77f1853c.entry.js → p-818caf0f.entry.js} +1 -1
  241. package/dist/ku4web-components/{p-3874127d.entry.js → p-8642aef5.entry.js} +1 -1
  242. package/dist/ku4web-components/{p-f6455ab3.js → p-881e100a.js} +0 -0
  243. package/dist/ku4web-components/{p-19a8c0f6.system.entry.js → p-95698618.system.entry.js} +1 -1
  244. package/dist/ku4web-components/{p-f0b1c07c.system.js → p-96ec7b4f.system.js} +1 -1
  245. package/dist/ku4web-components/{p-ce6eddc3.system.entry.js → p-a0d0c99e.system.entry.js} +1 -1
  246. package/dist/ku4web-components/{p-b4488a7d.system.entry.js → p-acb43765.system.entry.js} +1 -1
  247. package/dist/ku4web-components/{p-c19fd841.entry.js → p-b47bb3d0.entry.js} +1 -1
  248. package/dist/ku4web-components/{p-0785fc39.system.js → p-c3293202.system.js} +1 -1
  249. package/dist/ku4web-components/{p-eb6882c8.entry.js → p-c798faf2.entry.js} +1 -1
  250. package/dist/ku4web-components/{p-3c182b2f.entry.js → p-cd0d0b40.entry.js} +1 -1
  251. package/dist/ku4web-components/p-cd4cdcbb.entry.js +1 -0
  252. package/dist/ku4web-components/{p-8f480cb5.system.entry.js → p-d848909c.system.entry.js} +1 -1
  253. package/dist/ku4web-components/{p-90c37394.entry.js → p-d8868855.entry.js} +1 -1
  254. package/dist/ku4web-components/p-db3040f3.system.js +1 -0
  255. package/dist/ku4web-components/{p-2aac6c90.js → p-e6b3a708.js} +1 -1
  256. package/dist/ku4web-components/{p-c50540ec.system.entry.js → p-ea4b32de.system.entry.js} +1 -1
  257. package/dist/ku4web-components/{p-e4ff1c36.entry.js → p-f3fbe1e6.entry.js} +1 -1
  258. package/dist/ku4web-components/p-f64c1f55.entry.js +1 -0
  259. package/dist/ku4web-components/{p-71d57b8b.system.js → p-fbf3ad1e.system.js} +0 -0
  260. package/dist/ku4web-components/{p-0eb73a0f.system.entry.js → p-fc0c3bf4.system.entry.js} +1 -1
  261. package/dist/ku4web-components/shadow-css-4d56fa31.js +388 -0
  262. package/dist/ku4web-components/shadow-css-d0426811.system.js +13 -0
  263. package/dist/ku4web-components/uid-9dbd7ad0.js +9 -0
  264. package/dist/ku4web-components/uid-fb867945.system.js +1 -0
  265. package/dist/types/components/ku4-carousel/ku4-carousel.d.ts +3 -2
  266. package/dist/types/components/ku4-carousel-controls/ku4-carousel-controls.d.ts +1 -0
  267. package/dist/types/components/ku4-carousel-slide/ku4-carousel-slide.d.ts +6 -0
  268. package/dist/types/components.d.ts +10 -2
  269. package/package.json +15 -15
  270. package/react/index.js +1 -1
  271. package/react/index.mjs +1 -1
  272. package/vue/index.js +1 -1
  273. package/vue/index.mjs +1 -1
  274. package/vue3/index.js +1 -1
  275. package/vue3/index.mjs +1 -1
  276. package/dist/esm-es5/uid-15f8c937.js +0 -1
  277. package/dist/ku4web-components/p-7a47027b.entry.js +0 -1
  278. package/dist/ku4web-components/p-b590da20.entry.js +0 -1
  279. package/dist/ku4web-components/p-be7890a1.system.js +0 -1
  280. package/dist/ku4web-components/p-cbbb4b1b.js +0 -1
  281. package/dist/ku4web-components/p-eb58b04b.system.js +0 -1
@@ -0,0 +1,388 @@
1
+ /*
2
+ Stencil Client Platform v2.15.0 | MIT Licensed | https://stenciljs.com
3
+ */
4
+ /**
5
+ * @license
6
+ * Copyright Google Inc. All Rights Reserved.
7
+ *
8
+ * Use of this source code is governed by an MIT-style license that can be
9
+ * found in the LICENSE file at https://angular.io/license
10
+ *
11
+ * This file is a port of shadowCSS from webcomponents.js to TypeScript.
12
+ * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
13
+ * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
14
+ */
15
+ const safeSelector = (selector) => {
16
+ const placeholders = [];
17
+ let index = 0;
18
+ let content;
19
+ // Replaces attribute selectors with placeholders.
20
+ // The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
21
+ selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
22
+ const replaceBy = `__ph-${index}__`;
23
+ placeholders.push(keep);
24
+ index++;
25
+ return replaceBy;
26
+ });
27
+ // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
28
+ // WS and "+" would otherwise be interpreted as selector separators.
29
+ content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
30
+ const replaceBy = `__ph-${index}__`;
31
+ placeholders.push(exp);
32
+ index++;
33
+ return pseudo + replaceBy;
34
+ });
35
+ const ss = {
36
+ content,
37
+ placeholders,
38
+ };
39
+ return ss;
40
+ };
41
+ const restoreSafeSelector = (placeholders, content) => {
42
+ return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
43
+ };
44
+ const _polyfillHost = '-shadowcsshost';
45
+ const _polyfillSlotted = '-shadowcssslotted';
46
+ // note: :host-context pre-processed to -shadowcsshostcontext.
47
+ const _polyfillHostContext = '-shadowcsscontext';
48
+ const _parenSuffix = ')(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';
49
+ const _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');
50
+ const _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');
51
+ const _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');
52
+ const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
53
+ const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
54
+ const _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
55
+ const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$';
56
+ const _polyfillHostRe = /-shadowcsshost/gim;
57
+ const _colonHostRe = /:host/gim;
58
+ const _colonSlottedRe = /::slotted/gim;
59
+ const _colonHostContextRe = /:host-context/gim;
60
+ const _commentRe = /\/\*\s*[\s\S]*?\*\//g;
61
+ const stripComments = (input) => {
62
+ return input.replace(_commentRe, '');
63
+ };
64
+ const _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
65
+ const extractCommentsWithHash = (input) => {
66
+ return input.match(_commentWithHashRe) || [];
67
+ };
68
+ const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
69
+ const _curlyRe = /([{}])/g;
70
+ const _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
71
+ const OPEN_CURLY = '{';
72
+ const CLOSE_CURLY = '}';
73
+ const BLOCK_PLACEHOLDER = '%BLOCK%';
74
+ const processRules = (input, ruleCallback) => {
75
+ const inputWithEscapedBlocks = escapeBlocks(input);
76
+ let nextBlockIndex = 0;
77
+ return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
78
+ const selector = m[2];
79
+ let content = '';
80
+ let suffix = m[4];
81
+ let contentPrefix = '';
82
+ if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
83
+ content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
84
+ suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
85
+ contentPrefix = '{';
86
+ }
87
+ const cssRule = {
88
+ selector,
89
+ content,
90
+ };
91
+ const rule = ruleCallback(cssRule);
92
+ return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
93
+ });
94
+ };
95
+ const escapeBlocks = (input) => {
96
+ const inputParts = input.split(_curlyRe);
97
+ const resultParts = [];
98
+ const escapedBlocks = [];
99
+ let bracketCount = 0;
100
+ let currentBlockParts = [];
101
+ for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
102
+ const part = inputParts[partIndex];
103
+ if (part === CLOSE_CURLY) {
104
+ bracketCount--;
105
+ }
106
+ if (bracketCount > 0) {
107
+ currentBlockParts.push(part);
108
+ }
109
+ else {
110
+ if (currentBlockParts.length > 0) {
111
+ escapedBlocks.push(currentBlockParts.join(''));
112
+ resultParts.push(BLOCK_PLACEHOLDER);
113
+ currentBlockParts = [];
114
+ }
115
+ resultParts.push(part);
116
+ }
117
+ if (part === OPEN_CURLY) {
118
+ bracketCount++;
119
+ }
120
+ }
121
+ if (currentBlockParts.length > 0) {
122
+ escapedBlocks.push(currentBlockParts.join(''));
123
+ resultParts.push(BLOCK_PLACEHOLDER);
124
+ }
125
+ const strEscapedBlocks = {
126
+ escapedString: resultParts.join(''),
127
+ blocks: escapedBlocks,
128
+ };
129
+ return strEscapedBlocks;
130
+ };
131
+ const insertPolyfillHostInCssText = (selector) => {
132
+ selector = selector
133
+ .replace(_colonHostContextRe, _polyfillHostContext)
134
+ .replace(_colonHostRe, _polyfillHost)
135
+ .replace(_colonSlottedRe, _polyfillSlotted);
136
+ return selector;
137
+ };
138
+ const convertColonRule = (cssText, regExp, partReplacer) => {
139
+ // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
140
+ return cssText.replace(regExp, (...m) => {
141
+ if (m[2]) {
142
+ const parts = m[2].split(',');
143
+ const r = [];
144
+ for (let i = 0; i < parts.length; i++) {
145
+ const p = parts[i].trim();
146
+ if (!p)
147
+ break;
148
+ r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
149
+ }
150
+ return r.join(',');
151
+ }
152
+ else {
153
+ return _polyfillHostNoCombinator + m[3];
154
+ }
155
+ });
156
+ };
157
+ const colonHostPartReplacer = (host, part, suffix) => {
158
+ return host + part.replace(_polyfillHost, '') + suffix;
159
+ };
160
+ const convertColonHost = (cssText) => {
161
+ return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
162
+ };
163
+ const colonHostContextPartReplacer = (host, part, suffix) => {
164
+ if (part.indexOf(_polyfillHost) > -1) {
165
+ return colonHostPartReplacer(host, part, suffix);
166
+ }
167
+ else {
168
+ return host + part + suffix + ', ' + part + ' ' + host + suffix;
169
+ }
170
+ };
171
+ const convertColonSlotted = (cssText, slotScopeId) => {
172
+ const slotClass = '.' + slotScopeId + ' > ';
173
+ const selectors = [];
174
+ cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
175
+ if (m[2]) {
176
+ const compound = m[2].trim();
177
+ const suffix = m[3];
178
+ const slottedSelector = slotClass + compound + suffix;
179
+ let prefixSelector = '';
180
+ for (let i = m[4] - 1; i >= 0; i--) {
181
+ const char = m[5][i];
182
+ if (char === '}' || char === ',') {
183
+ break;
184
+ }
185
+ prefixSelector = char + prefixSelector;
186
+ }
187
+ const orgSelector = prefixSelector + slottedSelector;
188
+ const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;
189
+ if (orgSelector.trim() !== addedSelector.trim()) {
190
+ const updatedSelector = `${addedSelector}, ${orgSelector}`;
191
+ selectors.push({
192
+ orgSelector,
193
+ updatedSelector,
194
+ });
195
+ }
196
+ return slottedSelector;
197
+ }
198
+ else {
199
+ return _polyfillHostNoCombinator + m[3];
200
+ }
201
+ });
202
+ return {
203
+ selectors,
204
+ cssText,
205
+ };
206
+ };
207
+ const convertColonHostContext = (cssText) => {
208
+ return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
209
+ };
210
+ const convertShadowDOMSelectors = (cssText) => {
211
+ return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);
212
+ };
213
+ const makeScopeMatcher = (scopeSelector) => {
214
+ const lre = /\[/g;
215
+ const rre = /\]/g;
216
+ scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
217
+ return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
218
+ };
219
+ const selectorNeedsScoping = (selector, scopeSelector) => {
220
+ const re = makeScopeMatcher(scopeSelector);
221
+ return !re.test(selector);
222
+ };
223
+ const injectScopingSelector = (selector, scopingSelector) => {
224
+ return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {
225
+ return before + scopingSelector + colon + after;
226
+ });
227
+ };
228
+ const applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {
229
+ // In Android browser, the lastIndex is not reset when the regex is used in String.replace()
230
+ _polyfillHostRe.lastIndex = 0;
231
+ if (_polyfillHostRe.test(selector)) {
232
+ const replaceBy = `.${hostSelector}`;
233
+ return selector
234
+ .replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))
235
+ .replace(_polyfillHostRe, replaceBy + ' ');
236
+ }
237
+ return scopeSelector + ' ' + selector;
238
+ };
239
+ const applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {
240
+ const isRe = /\[is=([^\]]*)\]/g;
241
+ scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
242
+ const className = '.' + scopeSelector;
243
+ const _scopeSelectorPart = (p) => {
244
+ let scopedP = p.trim();
245
+ if (!scopedP) {
246
+ return '';
247
+ }
248
+ if (p.indexOf(_polyfillHostNoCombinator) > -1) {
249
+ scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);
250
+ }
251
+ else {
252
+ // remove :host since it should be unnecessary
253
+ const t = p.replace(_polyfillHostRe, '');
254
+ if (t.length > 0) {
255
+ scopedP = injectScopingSelector(t, className);
256
+ }
257
+ }
258
+ return scopedP;
259
+ };
260
+ const safeContent = safeSelector(selector);
261
+ selector = safeContent.content;
262
+ let scopedSelector = '';
263
+ let startIndex = 0;
264
+ let res;
265
+ const sep = /( |>|\+|~(?!=))\s*/g;
266
+ // If a selector appears before :host it should not be shimmed as it
267
+ // matches on ancestor elements and not on elements in the host's shadow
268
+ // `:host-context(div)` is transformed to
269
+ // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
270
+ // the `div` is not part of the component in the 2nd selectors and should not be scoped.
271
+ // Historically `component-tag:host` was matching the component so we also want to preserve
272
+ // this behavior to avoid breaking legacy apps (it should not match).
273
+ // The behavior should be:
274
+ // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
275
+ // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
276
+ // `:host-context(tag)`)
277
+ const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
278
+ // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present
279
+ let shouldScope = !hasHost;
280
+ while ((res = sep.exec(selector)) !== null) {
281
+ const separator = res[1];
282
+ const part = selector.slice(startIndex, res.index).trim();
283
+ shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
284
+ const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;
285
+ scopedSelector += `${scopedPart} ${separator} `;
286
+ startIndex = sep.lastIndex;
287
+ }
288
+ const part = selector.substring(startIndex);
289
+ shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
290
+ scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
291
+ // replace the placeholders with their original values
292
+ return restoreSafeSelector(safeContent.placeholders, scopedSelector);
293
+ };
294
+ const scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
295
+ return selector
296
+ .split(',')
297
+ .map((shallowPart) => {
298
+ if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {
299
+ return shallowPart.trim();
300
+ }
301
+ if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
302
+ return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
303
+ }
304
+ else {
305
+ return shallowPart.trim();
306
+ }
307
+ })
308
+ .join(', ');
309
+ };
310
+ const scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
311
+ return processRules(cssText, (rule) => {
312
+ let selector = rule.selector;
313
+ let content = rule.content;
314
+ if (rule.selector[0] !== '@') {
315
+ selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
316
+ }
317
+ else if (rule.selector.startsWith('@media') ||
318
+ rule.selector.startsWith('@supports') ||
319
+ rule.selector.startsWith('@page') ||
320
+ rule.selector.startsWith('@document')) {
321
+ content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
322
+ }
323
+ const cssRule = {
324
+ selector: selector.replace(/\s{2,}/g, ' ').trim(),
325
+ content,
326
+ };
327
+ return cssRule;
328
+ });
329
+ };
330
+ const scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {
331
+ cssText = insertPolyfillHostInCssText(cssText);
332
+ cssText = convertColonHost(cssText);
333
+ cssText = convertColonHostContext(cssText);
334
+ const slotted = convertColonSlotted(cssText, slotScopeId);
335
+ cssText = slotted.cssText;
336
+ cssText = convertShadowDOMSelectors(cssText);
337
+ if (scopeId) {
338
+ cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);
339
+ }
340
+ cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
341
+ cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, ' $1 ');
342
+ return {
343
+ cssText: cssText.trim(),
344
+ slottedSelectors: slotted.selectors,
345
+ };
346
+ };
347
+ const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
348
+ const hostScopeId = scopeId + '-h';
349
+ const slotScopeId = scopeId + '-s';
350
+ const commentsWithHash = extractCommentsWithHash(cssText);
351
+ cssText = stripComments(cssText);
352
+ const orgSelectors = [];
353
+ if (commentOriginalSelector) {
354
+ const processCommentedSelector = (rule) => {
355
+ const placeholder = `/*!@___${orgSelectors.length}___*/`;
356
+ const comment = `/*!@${rule.selector}*/`;
357
+ orgSelectors.push({ placeholder, comment });
358
+ rule.selector = placeholder + rule.selector;
359
+ return rule;
360
+ };
361
+ cssText = processRules(cssText, (rule) => {
362
+ if (rule.selector[0] !== '@') {
363
+ return processCommentedSelector(rule);
364
+ }
365
+ else if (rule.selector.startsWith('@media') ||
366
+ rule.selector.startsWith('@supports') ||
367
+ rule.selector.startsWith('@page') ||
368
+ rule.selector.startsWith('@document')) {
369
+ rule.content = processRules(rule.content, processCommentedSelector);
370
+ return rule;
371
+ }
372
+ return rule;
373
+ });
374
+ }
375
+ const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
376
+ cssText = [scoped.cssText, ...commentsWithHash].join('\n');
377
+ if (commentOriginalSelector) {
378
+ orgSelectors.forEach(({ placeholder, comment }) => {
379
+ cssText = cssText.replace(placeholder, comment);
380
+ });
381
+ }
382
+ scoped.slottedSelectors.forEach((slottedSelector) => {
383
+ cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);
384
+ });
385
+ return cssText;
386
+ };
387
+
388
+ export { scopeCss };
@@ -0,0 +1,13 @@
1
+ var __spreadArray=this&&this.__spreadArray||function(r,t,e){if(e||arguments.length===2)for(var n=0,a=t.length,c;n<a;n++){if(c||!(n in t)){if(!c)c=Array.prototype.slice.call(t,0,n);c[n]=t[n]}}return r.concat(c||Array.prototype.slice.call(t))};System.register([],(function(r){"use strict";return{execute:function(){
2
+ /**
3
+ * @license
4
+ * Copyright Google Inc. All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ *
9
+ * This file is a port of shadowCSS from webcomponents.js to TypeScript.
10
+ * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
11
+ * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
12
+ */
13
+ var t=function(r){var t=[];var e=0;var n;r=r.replace(/(\[[^\]]*\])/g,(function(r,n){var a="__ph-".concat(e,"__");t.push(n);e++;return a}));n=r.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(function(r,n,a){var c="__ph-".concat(e,"__");t.push(a);e++;return n+c}));var a={content:n,placeholders:t};return a};var e=function(r,t){return t.replace(/__ph-(\d+)__/g,(function(t,e){return r[+e]}))};var n="-shadowcsshost";var a="-shadowcssslotted";var c="-shadowcsscontext";var o=")(?:\\(("+"(?:\\([^)(]*\\)|[^)(]*)+?"+")\\))?([^,{]*)";var s=new RegExp("("+n+o,"gim");var i=new RegExp("("+c+o,"gim");var v=new RegExp("("+a+o,"gim");var u=n+"-no-combinator";var l=/-shadowcsshost-no-combinator([^\s]*)/;var f=[/::shadow/g,/::content/g];var p="([>\\s~+[.,{:][\\s\\S]*)?$";var h=/-shadowcsshost/gim;var g=/:host/gim;var d=/::slotted/gim;var m=/:host-context/gim;var _=/\/\*\s*[\s\S]*?\*\//g;var x=function(r){return r.replace(_,"")};var w=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;var S=function(r){return r.match(w)||[]};var b=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;var W=/([{}])/g;var y=/(^.*?[^\\])??((:+)(.*)|$)/;var O="{";var j="}";var E="%BLOCK%";var R=function(r,t){var e=A(r);var n=0;return e.escapedString.replace(b,(function(){var r=[];for(var a=0;a<arguments.length;a++){r[a]=arguments[a]}var c=r[2];var o="";var s=r[4];var i="";if(s&&s.startsWith("{"+E)){o=e.blocks[n++];s=s.substring(E.length+1);i="{"}var v={selector:c,content:o};var u=t(v);return"".concat(r[1]).concat(u.selector).concat(r[3]).concat(i).concat(u.content).concat(s)}))};var A=function(r){var t=r.split(W);var e=[];var n=[];var a=0;var c=[];for(var o=0;o<t.length;o++){var s=t[o];if(s===j){a--}if(a>0){c.push(s)}else{if(c.length>0){n.push(c.join(""));e.push(E);c=[]}e.push(s)}if(s===O){a++}}if(c.length>0){n.push(c.join(""));e.push(E)}var i={escapedString:e.join(""),blocks:n};return i};var k=function(r){r=r.replace(m,c).replace(g,n).replace(d,a);return r};var T=function(r,t,e){return r.replace(t,(function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}if(r[2]){var n=r[2].split(",");var a=[];for(var c=0;c<n.length;c++){var o=n[c].trim();if(!o)break;a.push(e(u,o,r[3]))}return a.join(",")}else{return u+r[3]}}))};var C=function(r,t,e){return r+t.replace(n,"")+e};var L=function(r){return T(r,s,C)};var $=function(r,t,e){if(t.indexOf(n)>-1){return C(r,t,e)}else{return r+t+e+", "+t+" "+r+e}};var B=function(r,t){var e="."+t+" > ";var n=[];r=r.replace(v,(function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}if(r[2]){var a=r[2].trim();var c=r[3];var o=e+a+c;var s="";for(var i=r[4]-1;i>=0;i--){var v=r[5][i];if(v==="}"||v===","){break}s=v+s}var l=s+o;var f="".concat(s.trimRight()).concat(o.trim());if(l.trim()!==f.trim()){var p="".concat(f,", ").concat(l);n.push({orgSelector:l,updatedSelector:p})}return o}else{return u+r[3]}}));return{selectors:n,cssText:r}};var I=function(r){return T(r,i,$)};var K=function(r){return f.reduce((function(r,t){return r.replace(t," ")}),r)};var M=function(r){var t=/\[/g;var e=/\]/g;r=r.replace(t,"\\[").replace(e,"\\]");return new RegExp("^("+r+")"+p,"m")};var U=function(r,t){var e=M(t);return!e.test(r)};var q=function(r,t){return r.replace(y,(function(r,e,n,a,c){if(e===void 0){e=""}if(a===void 0){a=""}if(c===void 0){c=""}return e+t+a+c}))};var z=function(r,t,e){h.lastIndex=0;if(h.test(r)){var n=".".concat(e);return r.replace(l,(function(r,t){return q(t,n)})).replace(h,n+" ")}return t+" "+r};var D=function(r,n,a){var c=/\[is=([^\]]*)\]/g;n=n.replace(c,(function(r){var t=[];for(var e=1;e<arguments.length;e++){t[e-1]=arguments[e]}return t[0]}));var o="."+n;var s=function(r){var t=r.trim();if(!t){return""}if(r.indexOf(u)>-1){t=z(r,n,a)}else{var e=r.replace(h,"");if(e.length>0){t=q(e,o)}}return t};var i=t(r);r=i.content;var v="";var l=0;var f;var p=/( |>|\+|~(?!=))\s*/g;var g=r.indexOf(u)>-1;var d=!g;while((f=p.exec(r))!==null){var m=f[1];var _=r.slice(l,f.index).trim();d=d||_.indexOf(u)>-1;var x=d?s(_):_;v+="".concat(x," ").concat(m," ");l=p.lastIndex}var w=r.substring(l);d=d||w.indexOf(u)>-1;v+=d?s(w):w;return e(i.placeholders,v)};var F=function(r,t,e,n){return r.split(",").map((function(r){if(n&&r.indexOf("."+n)>-1){return r.trim()}if(U(r,t)){return D(r,t,e).trim()}else{return r.trim()}})).join(", ")};var G=function(r,t,e,n,a){return R(r,(function(r){var a=r.selector;var c=r.content;if(r.selector[0]!=="@"){a=F(r.selector,t,e,n)}else if(r.selector.startsWith("@media")||r.selector.startsWith("@supports")||r.selector.startsWith("@page")||r.selector.startsWith("@document")){c=G(r.content,t,e,n)}var o={selector:a.replace(/\s{2,}/g," ").trim(),content:c};return o}))};var H=function(r,t,e,n,a){r=k(r);r=L(r);r=I(r);var c=B(r,n);r=c.cssText;r=K(r);if(t){r=G(r,t,e,n)}r=r.replace(/-shadowcsshost-no-combinator/g,".".concat(e));r=r.replace(/>\s*\*\s+([^{, ]+)/gm," $1 ");return{cssText:r.trim(),slottedSelectors:c.selectors}};var J=r("scopeCss",(function(r,t,e){var n=t+"-h";var a=t+"-s";var c=S(r);r=x(r);var o=[];if(e){var s=function(r){var t="/*!@___".concat(o.length,"___*/");var e="/*!@".concat(r.selector,"*/");o.push({placeholder:t,comment:e});r.selector=t+r.selector;return r};r=R(r,(function(r){if(r.selector[0]!=="@"){return s(r)}else if(r.selector.startsWith("@media")||r.selector.startsWith("@supports")||r.selector.startsWith("@page")||r.selector.startsWith("@document")){r.content=R(r.content,s);return r}return r}))}var i=H(r,t,n,a);r=__spreadArray([i.cssText],c,true).join("\n");if(e){o.forEach((function(t){var e=t.placeholder,n=t.comment;r=r.replace(e,n)}))}i.slottedSelectors.forEach((function(t){r=r.replace(t.orgSelector,t.updatedSelector)}));return r}))}}}));
@@ -0,0 +1,9 @@
1
+ import { R } from './index-3e1e5aa3.js';
2
+
3
+ const uid = () => {
4
+ // @ts-ignore
5
+ let value;
6
+ return (() => { value = R.uid(); })();
7
+ };
8
+
9
+ export { uid as u };
@@ -0,0 +1 @@
1
+ System.register(["./index-380cbe3a.system.js"],(function(t){"use strict";var e;return{setters:[function(t){e=t.R}],execute:function(){var n=t("u",(function(){var t;return function(){t=e.uid()}()}))}}}));
@@ -41,9 +41,9 @@ export declare class Ku4Carousel {
41
41
  previous(): Promise<this>;
42
42
  /**
43
43
  * Slide to the slide number specified.
44
- * @param {number} number - Slide number to slide to.
44
+ * @param {number|string} slide - Slide number or slide name to slide to.
45
45
  */
46
- slideTo(number: any): Promise<void>;
46
+ slideTo(slide: any): Promise<void>;
47
47
  /**
48
48
  * Pause auto slide change
49
49
  */
@@ -52,6 +52,7 @@ export declare class Ku4Carousel {
52
52
  * Start auto slide change
53
53
  */
54
54
  play(): Promise<void>;
55
+ private get slides();
55
56
  private get hasSlides();
56
57
  private get currentSlideNumber();
57
58
  private display;
@@ -9,6 +9,7 @@ export declare class Ku4CarouselControls {
9
9
  * Controls for carousel having id of value
10
10
  */
11
11
  readonly for: string;
12
+ private get slides();
12
13
  private get controls();
13
14
  private handleSlide;
14
15
  private handleChange;
@@ -2,6 +2,12 @@
2
2
  * @description ku4-carousel-slide
3
3
  */
4
4
  export declare class Ku4CarouselSlide {
5
+ /**
6
+ * Name of slide. The value of this property can be used as the
7
+ * value of the "slide" attribute of a ku4-carousel-control to
8
+ * target this slide as the active slide for the target ku4-carousel-control
9
+ */
10
+ readonly name: any;
5
11
  private active;
6
12
  private classList;
7
13
  /**
@@ -37,9 +37,9 @@ export namespace Components {
37
37
  "previous": () => Promise<this>;
38
38
  /**
39
39
  * Slide to the slide number specified.
40
- * @param number - Slide number to slide to.
40
+ * @param slide - Slide number or slide name to slide to.
41
41
  */
42
- "slideTo": (number: any) => Promise<void>;
42
+ "slideTo": (slide: any) => Promise<void>;
43
43
  /**
44
44
  * Sets the distance, in pixels, a touch must travel before activating a swipe.
45
45
  */
@@ -60,6 +60,10 @@ export namespace Components {
60
60
  * Set this slide to inactive.
61
61
  */
62
62
  "deactivate": () => Promise<void>;
63
+ /**
64
+ * Name of slide. The value of this property can be used as the value of the "slide" attribute of a ku4-carousel-control to target this slide as the active slide for the target ku4-carousel-control
65
+ */
66
+ "name": any;
63
67
  /**
64
68
  * Move this slide in to view.
65
69
  * @param direction - Direction to move.
@@ -718,6 +722,10 @@ declare namespace LocalJSX {
718
722
  "for"?: string;
719
723
  }
720
724
  interface Ku4CarouselSlide {
725
+ /**
726
+ * Name of slide. The value of this property can be used as the value of the "slide" attribute of a ku4-carousel-control to target this slide as the active slide for the target ku4-carousel-control
727
+ */
728
+ "name"?: any;
721
729
  }
722
730
  interface Ku4Col {
723
731
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ku4web-components",
3
- "version": "6.4.80",
3
+ "version": "6.4.83",
4
4
  "description": "kodmunki™ Web Components",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.js",
@@ -54,12 +54,12 @@
54
54
  "stencil:test"
55
55
  ],
56
56
  "devDependencies": {
57
- "@babel/core": "^7.17.5",
57
+ "@babel/core": "^7.17.8",
58
58
  "@jest/core": "^27.5.0",
59
59
  "@rollup/plugin-babel": "^5.3.1",
60
- "@rollup/plugin-commonjs": "^21.0.2",
60
+ "@rollup/plugin-commonjs": "^21.0.3",
61
61
  "@rollup/plugin-node-resolve": "^13.1.3",
62
- "@stencil/core": "^2.14.1",
62
+ "@stencil/core": "^2.15.0",
63
63
  "@stencil/eslint-plugin": "^0.4.0",
64
64
  "@stencil/sass": "^1.4.0",
65
65
  "@storybook/addon-actions": "^6.4.19",
@@ -73,37 +73,37 @@
73
73
  "@storybook/react": "^6.4.19",
74
74
  "@storybook/theming": "^6.4.19",
75
75
  "@storybook/web-components": "^6.4.19",
76
- "@types/node": "^17.0.21",
76
+ "@types/node": "^17.0.23",
77
77
  "@types/puppeteer": "^5.4.5",
78
- "@typescript-eslint/eslint-plugin": "^5.14.0",
79
- "@typescript-eslint/parser": "^5.14.0",
78
+ "@typescript-eslint/eslint-plugin": "^5.17.0",
79
+ "@typescript-eslint/parser": "^5.17.0",
80
80
  "acorn": "^8.1.0",
81
- "babel-loader": "^8.2.1",
81
+ "babel-loader": "^8.2.4",
82
82
  "bufferutil": "^4.0.3",
83
- "canvas": "^2.9.0",
83
+ "canvas": "^2.9.1",
84
84
  "core-js": "^3.21.1",
85
85
  "css-loader": "^5.2.7",
86
- "eslint": "^8.10.0",
87
- "eslint-plugin-react": "^7.29.3",
86
+ "eslint": "^8.12.0",
87
+ "eslint-plugin-react": "^7.29.4",
88
88
  "fibers": "^5.0.1",
89
89
  "html-to-react": "^1.4.8",
90
90
  "jest": "^27.5.0",
91
91
  "jest-cli": "^27.5.0",
92
- "ku4es-kernel": "^8.3.16",
92
+ "ku4es-kernel": "^8.4.1",
93
93
  "ku4es-ui-data": "^3.1.7",
94
94
  "ku4es-ui-kernel": "^8.0.7",
95
- "lit-html": "^2.2.0",
95
+ "lit-html": "^2.2.1",
96
96
  "node-sass": "^5.0.0",
97
97
  "pre-commit": "^1.2.2",
98
98
  "puppeteer": "^13.5.1",
99
- "rollup": "^2.70.0",
99
+ "rollup": "^2.70.1",
100
100
  "rollup-plugin-cleanup": "^3.2.1",
101
101
  "rollup-plugin-terser": "^7.0.2",
102
102
  "sass": "^1.49.9",
103
103
  "sass-loader": "^10.2.1",
104
104
  "style-loader": "^2.0.0",
105
105
  "ts-dedent": "^2.0.0",
106
- "typescript": "^4.6.2",
106
+ "typescript": "^4.6.3",
107
107
  "utf-8-validate": "^5.0.9",
108
108
  "vue": "^2.6.12",
109
109
  "webpack": "^4.44.2"
package/react/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";function t(t,r,e,n,i,s,a){try{var u=t[s](a),o=u.value}catch(t){return void e(t)}u.done?r(o):Promise.resolve(o).then(n,i)}function r(r){return function(){var e=this,n=arguments;return new Promise((function(i,s){var a=r.apply(e,n);function u(r){t(a,i,s,u,o,"next",r)}function o(r){t(a,i,s,u,o,"throw",r)}u(void 0)}))}}Object.defineProperty(exports,"__esModule",{value:!0});class e{static isNull(t){return null===t}static isEmpty(t){return e.isString(t)&&""===t||e.isArray(t)&&t.length<1||e.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(e.isUndefined(t)||e.isNull(t))}static isNullOrEmpty(t){return!e.exists(t)||e.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return e.isBool(t)&&!0===t}static isFalse(t){return e.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||e.isFunction(t)&&/^async/.test(t.toString())||e.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return e.exists(t)&&"object"==typeof t&&!(e.isBool(t)||e.isNumber(t)||e.isDate(t)||e.isArray(t)||e.isString(t)||e.isFunction(t))}static isObjectLiteral(t){return e.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!e.isFalsy(t)}static isFalsy(t){return e.isZero(t)||e.isFalse(t)||e.isNullOrEmpty(t)||isNaN(t)}}function n(t){return e.exists(t)&&e.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function i(t){return e.exists(t)&&e.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function s(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function a(t,r=0){return s(t+5*Math.pow(10,r-1),r)}function u(t,r=0){return 0===t?0:s(t-5*Math.pow(10,r-1),r)}function o(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function c(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function l(){return Math.random().toString().substr(2)}function h(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(t,r=0){if(!e.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return n(i(t))},trimStart:n,trimEnd:i,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,n="_"){return e.isFunction(r)?r(t):e.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(n),r)),r)},unmask:function(t,r,n="_"){const i=new RegExp(n);return e.isFunction(r)?r(t):e.isString(r)&&t.split("").reduce(((t,e,n)=>!i.test(e)&&i.test(r.charAt(n))?t+e:t),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:s,roundUp:a,roundDown:u,roundTowardZero:function(t,r=0){return t<0?a(t,r):u(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:o,fib2:c,fibArray:function(t){return Array(t).fill(0).map((()=>o(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>c(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:l,uuid:h,suid:function(){return Symbol(l())},suuid:function(){return Symbol(h())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/#:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?#]+=[^=?#]*(&[^=?#]+=[^=?#]*)*(#.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class f{static isNull(t){return null===t}static isEmpty(t){return f.isString(t)&&""===t||f.isArray(t)&&t.length<1||f.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(f.isUndefined(t)||f.isNull(t))}static isNullOrEmpty(t){return!f.exists(t)||f.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return f.isBool(t)&&!0===t}static isFalse(t){return f.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||f.isFunction(t)&&/^async/.test(t.toString())||f.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return f.exists(t)&&"object"==typeof t&&!(f.isBool(t)||f.isNumber(t)||f.isDate(t)||f.isArray(t)||f.isString(t)||f.isFunction(t))}static isObjectLiteral(t){return f.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!f.isFalsy(t)}static isFalsy(t){return f.isZero(t)||f.isFalse(t)||f.isNullOrEmpty(t)||isNaN(t)}}function p(...t){return"".concat(...t)}function d(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function y(t){return m(g(t))}function m(t){return f.exists(t)&&f.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function g(t){return f.exists(t)&&f.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function _(t,r){try{return t()}catch{return r}}let b;Object.freeze({__proto__:null,build:p,chunk:function(t,r=0){if(!f.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:d,trim:y,trimStart:m,trimEnd:g,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){return f.isFunction(r)?r(t):f.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),r)},unmask:function(t,r,e="_"){const n=new RegExp(e);return f.isFunction(r)?r(t):f.isString(r)&&t.split("").reduce(((t,e,i)=>!n.test(e)&&n.test(r.charAt(i))?t+e:t),"")}}),_.async=async(t,r)=>{try{return await t()}catch{return r}};class w{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>N(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return A(this._year)}get nextDay(){return F(this,1,0,0)}get prevDay(){return F(this,-1,0,0)}get nextMonth(){return F(this,0,1,0)}get prevMonth(){return F(this,0,-1,0)}get nextYear(){return F(this,0,0,1)}get prevYear(){return F(this,0,0,-1)}get firstDayOfMonth(){return new w(this._year,this._month,1)}get lastDayOfMonth(){return new w(this._year,this._month,N(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,s=i(t),a=i(e),u=i(r),o=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,s,t<0?"prevYear":"nextYear"),u,c),a,o)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",s=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return d(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,s),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return f.isString(t)||f.isNumber(t)||f.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof w}static parse(t){if(t instanceof w)return t;let r=f.isString(t)?y(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!f.exists(r)||Number.isNaN(e.valueOf()))throw new Error(d("Cannot parse value= {0}",r));return new w(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return _((()=>w.parse(t)),null)}static assumeNow(t){b=w.parse(t)}static get today(){return b||w.parse(new Date)}}function N(t,r){return 2===t?A(r)?29:28:t<8&&f.isEven(t)||t>7&&f.isOdd(t)?30:31}function A(t){const r=t.toString().split(/\B/);return parseFloat(p(r[r.length-2],r[r.length-1]))%4==0}function F(t,r,e,n){const i=t.month,s=t.year,a=t.date,u=e,o=n;let c=a+r,l=i+u,h=s+o;if(a+r>N(i,s)&&(c=1,l=i+u+1),a+r<1){const r=t.prevMonth;c=N(r.month,r.year),l=i+u-1}return l>12&&(l=1,h=s+o+1),l<1&&(l=12,h=s+o-1),new w(h,l,c)}function v(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function S(t,r=0){return v(t+5*Math.pow(10,r-1),r)}function O(t,r=0){return 0===t?0:v(t-5*Math.pow(10,r-1),r)}function $(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function x(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function z(){return Math.random().toString().substr(2)}function E(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:v,roundUp:S,roundDown:O,roundTowardZero:function(t,r=0){return t<0?S(t,r):O(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:$,fib2:x,fibArray:function(t){return Array(t).fill(0).map((()=>$(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>x(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var M=Object.freeze({__proto__:null,uid:z,uuid:E,suid:function(){return Symbol(z())},suuid:function(){return Symbol(E())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/#:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?#]+=[^=?#]*(&[^=?#]+=[^=?#]*)*(#.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),M.uid(),w.today.nextYear.toDate();const D=t=>new window.FormData(t),j=t=>{const r={};try{D(t).forEach(((t,e)=>{const n=r[e];f.isArray(n)?r[e].push(t):f.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:s}=t;if("file"===n)r[e]=s[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var k=j,P=D;exports.wireForm=function(t,n){if(t&&!t.__ku4wired__)try{var i=t.submit;t.submit=r(regeneratorRuntime.mark((function r(){var s,a,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return s=k(t),a=P(t),r.next=4,n(s,a,t);case 4:u=r.sent,e.isFalse(u)||i.call(t);case 6:case"end":return r.stop()}}),r)}))),t.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};
1
+ "use strict";function t(t,r,e,n,i,s,a){try{var u=t[s](a),o=u.value}catch(t){return void e(t)}u.done?r(o):Promise.resolve(o).then(n,i)}function r(r){return function(){var e=this,n=arguments;return new Promise((function(i,s){var a=r.apply(e,n);function u(r){t(a,i,s,u,o,"next",r)}function o(r){t(a,i,s,u,o,"throw",r)}u(void 0)}))}}Object.defineProperty(exports,"__esModule",{value:!0});class e{static isNull(t){return null===t}static isEmpty(t){return e.isString(t)&&""===t||e.isArray(t)&&t.length<1||e.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(e.isUndefined(t)||e.isNull(t))}static isNullOrEmpty(t){return!e.exists(t)||e.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return e.isBool(t)&&!0===t}static isFalse(t){return e.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||e.isFunction(t)&&/^async/.test(t.toString())||e.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return e.exists(t)&&"object"==typeof t&&!(e.isBool(t)||e.isNumber(t)||e.isDate(t)||e.isArray(t)||e.isString(t)||e.isFunction(t))}static isObjectLiteral(t){return e.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!e.isFalsy(t)}static isFalsy(t){return e.isZero(t)||e.isFalse(t)||e.isNullOrEmpty(t)||isNaN(t)}}function n(t){return e.exists(t)&&e.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function i(t){return e.exists(t)&&e.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function s(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function a(t,r=0){return s(t+5*Math.pow(10,r-1),r)}function u(t,r=0){return 0===t?0:s(t-5*Math.pow(10,r-1),r)}function o(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function c(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function l(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function h(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(t,r=0){if(!e.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return n(i(t))},trimStart:n,trimEnd:i,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,n="_"){return e.isFunction(r)?r(t):e.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(n),r)),r)},unmask:function(t,r,n="_"){const i=new RegExp(n);return e.isFunction(r)?r(t):e.isString(r)&&t.split("").reduce(((t,e,n)=>!i.test(e)&&i.test(r.charAt(n))?t+e:t),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:s,roundUp:a,roundDown:u,roundTowardZero:function(t,r=0){return t<0?a(t,r):u(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:o,fib2:c,fibArray:function(t){return Array(t).fill(0).map((()=>o(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>c(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:l,uuid:h,suid:function(){return Symbol(l())},suuid:function(){return Symbol(h())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/#:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?#]+=[^=?#]*(&[^=?#]+=[^=?#]*)*(#.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class f{static isNull(t){return null===t}static isEmpty(t){return f.isString(t)&&""===t||f.isArray(t)&&t.length<1||f.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(f.isUndefined(t)||f.isNull(t))}static isNullOrEmpty(t){return!f.exists(t)||f.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return f.isBool(t)&&!0===t}static isFalse(t){return f.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||f.isFunction(t)&&/^async/.test(t.toString())||f.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return f.exists(t)&&"object"==typeof t&&!(f.isBool(t)||f.isNumber(t)||f.isDate(t)||f.isArray(t)||f.isString(t)||f.isFunction(t))}static isObjectLiteral(t){return f.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!f.isFalsy(t)}static isFalsy(t){return f.isZero(t)||f.isFalse(t)||f.isNullOrEmpty(t)||isNaN(t)}}function p(...t){return"".concat(...t)}function d(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function y(t){return m(g(t))}function m(t){return f.exists(t)&&f.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function g(t){return f.exists(t)&&f.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function _(t,r){try{return t()}catch{return r}}let b;Object.freeze({__proto__:null,build:p,chunk:function(t,r=0){if(!f.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:d,trim:y,trimStart:m,trimEnd:g,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){return f.isFunction(r)?r(t):f.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),r)},unmask:function(t,r,e="_"){const n=new RegExp(e);return f.isFunction(r)?r(t):f.isString(r)&&t.split("").reduce(((t,e,i)=>!n.test(e)&&n.test(r.charAt(i))?t+e:t),"")}}),_.async=async(t,r)=>{try{return await t()}catch{return r}};class w{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>N(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return A(this._year)}get nextDay(){return F(this,1,0,0)}get prevDay(){return F(this,-1,0,0)}get nextMonth(){return F(this,0,1,0)}get prevMonth(){return F(this,0,-1,0)}get nextYear(){return F(this,0,0,1)}get prevYear(){return F(this,0,0,-1)}get firstDayOfMonth(){return new w(this._year,this._month,1)}get lastDayOfMonth(){return new w(this._year,this._month,N(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,s=i(t),a=i(e),u=i(r),o=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,s,t<0?"prevYear":"nextYear"),u,c),a,o)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",s=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return d(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,s),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return f.isString(t)||f.isNumber(t)||f.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof w}static parse(t){if(t instanceof w)return t;let r=f.isString(t)?y(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!f.exists(r)||Number.isNaN(e.valueOf()))throw new Error(d("Cannot parse value= {0}",r));return new w(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return _((()=>w.parse(t)),null)}static assumeNow(t){b=w.parse(t)}static get today(){return b||w.parse(new Date)}}function N(t,r){return 2===t?A(r)?29:28:t<8&&f.isEven(t)||t>7&&f.isOdd(t)?30:31}function A(t){const r=t.toString().split(/\B/);return parseFloat(p(r[r.length-2],r[r.length-1]))%4==0}function F(t,r,e,n){const i=t.month,s=t.year,a=t.date,u=e,o=n;let c=a+r,l=i+u,h=s+o;if(a+r>N(i,s)&&(c=1,l=i+u+1),a+r<1){const r=t.prevMonth;c=N(r.month,r.year),l=i+u-1}return l>12&&(l=1,h=s+o+1),l<1&&(l=12,h=s+o-1),new w(h,l,c)}function v(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function S(t,r=0){return v(t+5*Math.pow(10,r-1),r)}function O(t,r=0){return 0===t?0:v(t-5*Math.pow(10,r-1),r)}function $(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function x(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function z(){return Math.random().toString().substr(2)}function E(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:v,roundUp:S,roundDown:O,roundTowardZero:function(t,r=0){return t<0?S(t,r):O(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:$,fib2:x,fibArray:function(t){return Array(t).fill(0).map((()=>$(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>x(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var M=Object.freeze({__proto__:null,uid:z,uuid:E,suid:function(){return Symbol(z())},suuid:function(){return Symbol(E())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/#:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?#]+=[^=?#]*(&[^=?#]+=[^=?#]*)*(#.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),M.uid(),w.today.nextYear.toDate();const D=t=>new window.FormData(t),j=t=>{const r={};try{D(t).forEach(((t,e)=>{const n=r[e];f.isArray(n)?r[e].push(t):f.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:s}=t;if("file"===n)r[e]=s[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var k=j,P=D;exports.wireForm=function(t,n){if(t&&!t.__ku4wired__)try{var i=t.submit;t.submit=r(regeneratorRuntime.mark((function r(){var s,a,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return s=k(t),a=P(t),r.next=4,n(s,a,t);case 4:u=r.sent,e.isFalse(u)||i.call(t);case 6:case"end":return r.stop()}}),r)}))),t.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};