bromcom-ui 2.9.0-rc.1 → 2.9.0-rc.3

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 (242) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-0a28fd61.entry.js → p-02ee5833.entry.js} +1 -1
  3. package/dist/bromcom-ui/{p-f82afa9d.entry.js → p-03134b6f.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-d0b8b715.entry.js → p-04410e89.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-b7d6857f.entry.js → p-139ee01e.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-c41e87a2.entry.js → p-13d9bcdb.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-54bcf02f.js → p-159e5357.js} +1 -1
  8. package/dist/bromcom-ui/{p-abd0ebef.entry.js → p-161864f8.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-23309057.entry.js → p-1647559e.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-43bb2a7c.entry.js → p-178b60e4.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-961dc8e1.entry.js → p-240151d4.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-d78958e3.entry.js → p-259ede50.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-d5b645ba.entry.js → p-276638cd.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-bad06cf8.entry.js → p-290645b8.entry.js} +1 -1
  15. package/dist/bromcom-ui/p-294186b9.js +5 -0
  16. package/dist/bromcom-ui/{p-c6c6529b.entry.js → p-2989694b.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-61f2613f.entry.js → p-2db9415f.entry.js} +1 -1
  18. package/dist/bromcom-ui/{p-76cb3798.entry.js → p-30788121.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-d8cc24f0.entry.js → p-30a3320f.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-465c6839.entry.js → p-327138ea.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-68e2ddc3.entry.js → p-342bc96d.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-f606f90c.entry.js → p-36a1427f.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-a60a2dd0.js → p-3cde7f38.js} +1 -1
  24. package/dist/bromcom-ui/{p-cb6d3c4e.js → p-3d5631ec.js} +1 -1
  25. package/dist/bromcom-ui/{p-f053aa86.entry.js → p-400dcae2.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-9bdcbb1a.entry.js → p-454b49ef.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-62adb1ff.entry.js → p-4876c706.entry.js} +1 -1
  28. package/dist/bromcom-ui/{p-2afef4b5.entry.js → p-48f85544.entry.js} +1 -1
  29. package/dist/bromcom-ui/{p-e150d373.entry.js → p-4a3ce7f3.entry.js} +1 -1
  30. package/dist/bromcom-ui/{p-ff488369.entry.js → p-4a8c583d.entry.js} +1 -1
  31. package/dist/bromcom-ui/{p-f937f362.entry.js → p-4cd8a7c8.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-440afdfa.entry.js → p-4f8b00bc.entry.js} +1 -1
  33. package/dist/bromcom-ui/{p-c23b6240.js → p-54c0916c.js} +1 -1
  34. package/dist/bromcom-ui/{p-f3ed187a.entry.js → p-5648b456.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-92bf3f86.js → p-5f63beda.js} +1 -1
  36. package/dist/bromcom-ui/{p-11e7f04b.entry.js → p-61092688.entry.js} +1 -1
  37. package/dist/bromcom-ui/{p-431b023c.js → p-62e84379.js} +1 -1
  38. package/dist/bromcom-ui/{p-8f78fe1c.entry.js → p-68abefd2.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-05b0bdce.entry.js → p-6ca980dd.entry.js} +1 -1
  40. package/dist/bromcom-ui/{p-da1055cb.js → p-6d7fe687.js} +1 -1
  41. package/dist/bromcom-ui/{p-12543c4f.js → p-73dc124b.js} +1 -1
  42. package/dist/bromcom-ui/p-74b2d896.js +5 -0
  43. package/dist/bromcom-ui/{p-27a8f8cc.entry.js → p-750ae53a.entry.js} +1 -1
  44. package/dist/bromcom-ui/{p-0d9741fc.entry.js → p-7a1e7141.entry.js} +1 -1
  45. package/dist/bromcom-ui/{p-842a5926.entry.js → p-7c6e3ae5.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-53820462.entry.js → p-7ddaedb7.entry.js} +1 -1
  47. package/dist/bromcom-ui/{p-f8c20298.entry.js → p-81eeccfa.entry.js} +1 -1
  48. package/dist/bromcom-ui/{p-c80ab24a.entry.js → p-89e1d8c5.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-7b09e9b1.entry.js → p-8a162271.entry.js} +1 -1
  50. package/dist/bromcom-ui/{p-dc19c6f4.entry.js → p-8c9d109c.entry.js} +1 -1
  51. package/dist/bromcom-ui/{p-037a40a6.entry.js → p-8ded5483.entry.js} +1 -1
  52. package/dist/bromcom-ui/{p-4be5dbb6.entry.js → p-8e66297f.entry.js} +1 -1
  53. package/dist/bromcom-ui/{p-1b8982a8.entry.js → p-96eeadc0.entry.js} +1 -1
  54. package/dist/bromcom-ui/p-9c90a235.entry.js +19 -0
  55. package/dist/bromcom-ui/{p-49105365.entry.js → p-9e1fa716.entry.js} +1 -1
  56. package/dist/bromcom-ui/{p-0c07940d.entry.js → p-9e64286c.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-195c4c41.entry.js → p-a471cdb2.entry.js} +1 -1
  58. package/dist/bromcom-ui/p-a56e8c98.js +5 -0
  59. package/dist/bromcom-ui/{p-cc470d2a.entry.js → p-b198b3d5.entry.js} +1 -1
  60. package/dist/bromcom-ui/{p-cb0afdd3.entry.js → p-b45a0db2.entry.js} +1 -1
  61. package/dist/bromcom-ui/{p-9be7f6be.entry.js → p-baa25b34.entry.js} +1 -1
  62. package/dist/bromcom-ui/{p-bc840f30.entry.js → p-bd51d347.entry.js} +1 -1
  63. package/dist/bromcom-ui/{p-78bfd81b.entry.js → p-c0a97e15.entry.js} +1 -1
  64. package/dist/bromcom-ui/{p-ded0661d.entry.js → p-c165837c.entry.js} +1 -1
  65. package/dist/bromcom-ui/{p-f589ac2d.entry.js → p-c30f52d8.entry.js} +1 -1
  66. package/dist/bromcom-ui/p-c49d038e.js +5 -0
  67. package/dist/bromcom-ui/{p-b640b81a.entry.js → p-c7f37d7a.entry.js} +1 -1
  68. package/dist/bromcom-ui/p-ccc60ce1.js +5 -0
  69. package/dist/bromcom-ui/{p-d18196f9.entry.js → p-cfddaef7.entry.js} +1 -1
  70. package/dist/bromcom-ui/{p-11629904.entry.js → p-d18f5ae5.entry.js} +1 -1
  71. package/dist/bromcom-ui/{p-a1b02a4a.entry.js → p-d230907f.entry.js} +1 -1
  72. package/dist/bromcom-ui/{p-5618ee1e.entry.js → p-d832cf50.entry.js} +1 -1
  73. package/dist/bromcom-ui/{p-f7e29f3e.entry.js → p-d995750a.entry.js} +1 -1
  74. package/dist/bromcom-ui/{p-a104f436.entry.js → p-d9dfbdae.entry.js} +1 -1
  75. package/dist/bromcom-ui/{p-5c059eba.entry.js → p-dc2c4b14.entry.js} +1 -1
  76. package/dist/bromcom-ui/{p-494ebf69.entry.js → p-dc9466d6.entry.js} +1 -1
  77. package/dist/bromcom-ui/{p-908e7c36.entry.js → p-dea8dd34.entry.js} +1 -1
  78. package/dist/bromcom-ui/{p-7ce49866.entry.js → p-dfb4b928.entry.js} +1 -1
  79. package/dist/bromcom-ui/{p-7d662231.entry.js → p-e4477593.entry.js} +1 -1
  80. package/dist/bromcom-ui/{p-3731f4fb.entry.js → p-e74a2576.entry.js} +1 -1
  81. package/dist/bromcom-ui/{p-4fcc0d21.entry.js → p-e9aaa98b.entry.js} +1 -1
  82. package/dist/bromcom-ui/{p-4fcf03c1.entry.js → p-ea4d8a18.entry.js} +1 -1
  83. package/dist/bromcom-ui/{p-043beeb5.entry.js → p-ee3c724a.entry.js} +1 -1
  84. package/dist/bromcom-ui/{p-139b0cfc.entry.js → p-ef14e4b5.entry.js} +1 -1
  85. package/dist/bromcom-ui/{p-63b14659.entry.js → p-f4538abb.entry.js} +1 -1
  86. package/dist/bromcom-ui/{p-d69fb13b.entry.js → p-f619f9f9.entry.js} +1 -1
  87. package/dist/bromcom-ui/{p-25cfdc1c.entry.js → p-feb06aca.entry.js} +1 -1
  88. package/dist/bromcom-ui/static/message-bot.svg +10 -0
  89. package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
  90. package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
  91. package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
  92. package/dist/cjs/bcm-avatar_15.cjs.entry.js +20 -8
  93. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
  94. package/dist/cjs/bcm-button-group.cjs.entry.js +1 -1
  95. package/dist/cjs/bcm-card.cjs.entry.js +1 -1
  96. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +1 -1
  97. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
  98. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +1 -1
  99. package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
  100. package/dist/cjs/bcm-color-input.cjs.entry.js +3 -3
  101. package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
  102. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1 -1
  103. package/dist/cjs/bcm-default.cjs.entry.js +1 -1
  104. package/dist/cjs/bcm-drawer.cjs.entry.js +3 -3
  105. package/dist/cjs/bcm-dropdown.cjs.entry.js +2 -2
  106. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +1 -1
  107. package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
  108. package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
  109. package/dist/cjs/bcm-item.cjs.entry.js +1 -1
  110. package/dist/cjs/bcm-items.cjs.entry.js +1 -1
  111. package/dist/cjs/bcm-menu.cjs.entry.js +4 -4
  112. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +3 -3
  113. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +3 -3
  114. package/dist/cjs/bcm-modal-2.cjs.entry.js +3 -3
  115. package/dist/cjs/bcm-modal.cjs.entry.js +1 -1
  116. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +1 -1
  117. package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
  118. package/dist/cjs/bcm-popover.cjs.entry.js +3 -3
  119. package/dist/cjs/bcm-progress.cjs.entry.js +1 -1
  120. package/dist/cjs/bcm-radio-group.cjs.entry.js +3 -3
  121. package/dist/cjs/bcm-radio.cjs.entry.js +3 -3
  122. package/dist/cjs/bcm-range.cjs.entry.js +1 -1
  123. package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
  124. package/dist/cjs/bcm-step.cjs.entry.js +2 -2
  125. package/dist/cjs/bcm-stepper.cjs.entry.js +4 -4
  126. package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
  127. package/dist/cjs/bcm-tab-group.cjs.entry.js +3 -3
  128. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +3 -3
  129. package/dist/cjs/bcm-tab-item.cjs.entry.js +3 -3
  130. package/dist/cjs/bcm-tag.cjs.entry.js +2 -2
  131. package/dist/cjs/bcm-textarea.cjs.entry.js +2 -2
  132. package/dist/cjs/bcm-time-picker.cjs.entry.js +1 -1
  133. package/dist/cjs/bcm-toast.cjs.entry.js +1 -1
  134. package/dist/cjs/{generate-de243a66.js → generate-28ac852f.js} +1 -1
  135. package/dist/cjs/{input-template-4c532c3a.js → input-template-bcaa86c5.js} +1 -1
  136. package/dist/cjs/{json-parse-decarator-f61061cf.js → json-parse-decarator-0b5727ab.js} +1 -1
  137. package/dist/cjs/{number-helper-dedd64eb.js → number-helper-2fafa94f.js} +1 -1
  138. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +2 -2
  139. package/dist/cjs/old-bcm-popover.cjs.entry.js +1 -1
  140. package/dist/cjs/{stepper-states-faff7944.js → stepper-states-66d5d6c4.js} +1 -1
  141. package/dist/cjs/{tooltip-helper-edce6fd0.js → tooltip-helper-9fc8df71.js} +3 -3
  142. package/dist/cjs/{validators-e5a6ef69.js → validators-b22310ad.js} +1 -1
  143. package/dist/collection/components/atoms/icon/icon.js +15 -3
  144. package/dist/collection/components/atoms/icon/static/message-bot.svg +10 -0
  145. package/dist/components/generate.js +1 -1
  146. package/dist/components/icon.js +15 -3
  147. package/dist/esm/bcm-accordion.entry.js +2 -2
  148. package/dist/esm/bcm-alert.entry.js +3 -3
  149. package/dist/esm/bcm-attendance.entry.js +2 -2
  150. package/dist/esm/bcm-autocomplete.entry.js +1 -1
  151. package/dist/esm/bcm-avatar_15.entry.js +26 -14
  152. package/dist/esm/bcm-box.entry.js +1 -1
  153. package/dist/esm/bcm-breadcrumb.entry.js +2 -2
  154. package/dist/esm/bcm-button-group.entry.js +2 -2
  155. package/dist/esm/bcm-card.entry.js +3 -3
  156. package/dist/esm/bcm-checkbox-group.entry.js +6 -6
  157. package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
  158. package/dist/esm/bcm-checkbox_2.entry.js +5 -5
  159. package/dist/esm/bcm-collapse-group.entry.js +1 -1
  160. package/dist/esm/bcm-collapse.entry.js +2 -2
  161. package/dist/esm/bcm-color-input.entry.js +4 -4
  162. package/dist/esm/bcm-colorpicker.entry.js +1 -1
  163. package/dist/esm/bcm-content.entry.js +1 -1
  164. package/dist/esm/bcm-date-picker.entry.js +3 -3
  165. package/dist/esm/bcm-datetime-picker.entry.js +5 -5
  166. package/dist/esm/bcm-default.entry.js +2 -2
  167. package/dist/esm/bcm-drawer.entry.js +4 -4
  168. package/dist/esm/bcm-dropdown.entry.js +4 -4
  169. package/dist/esm/bcm-error-layout.entry.js +1 -1
  170. package/dist/esm/bcm-expansion-panel.entry.js +2 -2
  171. package/dist/esm/bcm-form-2.entry.js +3 -3
  172. package/dist/esm/bcm-form-group.entry.js +1 -1
  173. package/dist/esm/bcm-input-custom.entry.js +2 -2
  174. package/dist/esm/bcm-item.entry.js +2 -2
  175. package/dist/esm/bcm-items.entry.js +2 -2
  176. package/dist/esm/bcm-link.entry.js +1 -1
  177. package/dist/esm/bcm-menu.entry.js +6 -6
  178. package/dist/esm/bcm-message.entry.js +1 -1
  179. package/dist/esm/bcm-modal-2-footer.entry.js +4 -4
  180. package/dist/esm/bcm-modal-2-header.entry.js +4 -4
  181. package/dist/esm/bcm-modal-2.entry.js +4 -4
  182. package/dist/esm/bcm-modal.entry.js +3 -3
  183. package/dist/esm/bcm-notification.entry.js +1 -1
  184. package/dist/esm/bcm-old-input.entry.js +2 -2
  185. package/dist/esm/bcm-old-tag_2.entry.js +1 -1
  186. package/dist/esm/bcm-overlay_2.entry.js +1 -1
  187. package/dist/esm/bcm-popconfirm-box.entry.js +2 -2
  188. package/dist/esm/bcm-popconfirm.entry.js +2 -2
  189. package/dist/esm/bcm-popover.entry.js +4 -4
  190. package/dist/esm/bcm-progress.entry.js +2 -2
  191. package/dist/esm/bcm-radio-group.entry.js +6 -6
  192. package/dist/esm/bcm-radio.entry.js +4 -4
  193. package/dist/esm/bcm-range.entry.js +2 -2
  194. package/dist/esm/bcm-result.entry.js +1 -1
  195. package/dist/esm/bcm-select-group.entry.js +1 -1
  196. package/dist/esm/bcm-select-option.entry.js +1 -1
  197. package/dist/esm/bcm-select.entry.js +1 -1
  198. package/dist/esm/bcm-skeleton.entry.js +2 -2
  199. package/dist/esm/bcm-step.entry.js +4 -4
  200. package/dist/esm/bcm-stepper.entry.js +6 -6
  201. package/dist/esm/bcm-switch.entry.js +4 -4
  202. package/dist/esm/bcm-tab-group.entry.js +4 -4
  203. package/dist/esm/bcm-tab-item-header.entry.js +4 -4
  204. package/dist/esm/bcm-tab-item.entry.js +4 -4
  205. package/dist/esm/bcm-tab-pane.entry.js +1 -1
  206. package/dist/esm/bcm-tab.entry.js +1 -1
  207. package/dist/esm/bcm-table.entry.js +1 -1
  208. package/dist/esm/bcm-tabs-content.entry.js +1 -1
  209. package/dist/esm/bcm-tabs.entry.js +1 -1
  210. package/dist/esm/bcm-tag.entry.js +3 -3
  211. package/dist/esm/bcm-text.entry.js +2 -2
  212. package/dist/esm/bcm-textarea.entry.js +5 -5
  213. package/dist/esm/bcm-time-picker.entry.js +3 -3
  214. package/dist/esm/bcm-timeline-item.entry.js +1 -1
  215. package/dist/esm/bcm-timeline.entry.js +1 -1
  216. package/dist/esm/bcm-toast.entry.js +2 -2
  217. package/dist/esm/bcm-treeview-group.entry.js +1 -1
  218. package/dist/esm/bromcom-ui.js +2 -2
  219. package/dist/esm/{caption-template-da16ba7b.js → caption-template-34a1cb44.js} +1 -1
  220. package/dist/esm/{generate-61676bf1.js → generate-ce54344e.js} +1 -1
  221. package/dist/esm/{index-93e36fdb.js → index-0052017c.js} +1 -1
  222. package/dist/esm/{index-39133086.js → index-348b16ad.js} +1 -1
  223. package/dist/esm/{input-template-606f7441.js → input-template-c94b6b1f.js} +2 -2
  224. package/dist/esm/{is-load-decorator-bc14ec4b.js → is-load-decorator-07d3502a.js} +1 -1
  225. package/dist/esm/{json-parse-decarator-2303670f.js → json-parse-decarator-1ef87c07.js} +2 -2
  226. package/dist/esm/{label-template-d74fe788.js → label-template-98dafeb3.js} +2 -2
  227. package/dist/esm/loader.js +2 -2
  228. package/dist/esm/{number-helper-4ef4df19.js → number-helper-ec5c12ef.js} +1 -1
  229. package/dist/esm/old-bcm-popover-box.entry.js +3 -3
  230. package/dist/esm/old-bcm-popover.entry.js +2 -2
  231. package/dist/esm/{slot-template-5b2db362.js → slot-template-672e941d.js} +1 -1
  232. package/dist/esm/{stepper-states-9bb5528f.js → stepper-states-cbe1d076.js} +3 -3
  233. package/dist/esm/{tooltip-helper-79e225e7.js → tooltip-helper-92eb0102.js} +3 -3
  234. package/dist/esm/{validators-c4a5912c.js → validators-c4976054.js} +1 -1
  235. package/dist/types/components/atoms/icon/icon.d.ts +1 -0
  236. package/package.json +1 -1
  237. package/dist/bromcom-ui/p-08fb3095.js +0 -5
  238. package/dist/bromcom-ui/p-24aefda6.js +0 -5
  239. package/dist/bromcom-ui/p-799af572.js +0 -5
  240. package/dist/bromcom-ui/p-79fd816c.js +0 -5
  241. package/dist/bromcom-ui/p-b0353da0.entry.js +0 -19
  242. package/dist/bromcom-ui/p-c8e13fd7.js +0 -5
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,c as e,f as i,h as s,H as a,g as n}from"./p-da1055cb.js";import{D as r,E as h}from"./p-7e44e6b5.js";import{c as o}from"./p-d65a1e21.js";import{D as c}from"./p-626a65e9.js";import{d as l}from"./p-8c018ae0.js";import{G as d}from"./p-92bf3f86.js";import{a as p}from"./p-a429e85b.js";import{g as m,s as u}from"./p-dbc4c30c.js";import{L as b}from"./p-24aefda6.js";import{I as g}from"./p-c23b6240.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";import"./p-8d0ca8c2.js";import"./p-79fd816c.js";var x,f,y;!function(t){t.january="january",t.february="february",t.march="march",t.april="april",t.may="may",t.june="june",t.july="july",t.august="august",t.september="september",t.october="october",t.november="november",t.december="december"}(x||(x={})),function(t){t.sunday="sunday",t.monday="monday",t.tuesday="tuesday",t.wednesday="wednesday",t.thursday="thursday",t.friday="friday",t.saturday="saturday"}(f||(f={})),function(t){t.datetime="datetime",t.range="range",t.date="date",t.time="time"}(y||(y={}));const v=JSON.stringify,w=class{constructor(i){t(this,i),this.load=e(this,"bcm-load",7),this.change=e(this,"bcm-change",7),this.bcmOpen=e(this,"bcm-open",7),this.inputId=null,this.emptyState=!1,this.initialized=!1,this.disabledDatesList={min:null,max:null,dates:[]},this.dayNumbers=[],this.valueText=null,this.dataIsValid=!1,this._id=d.UID(),this.date=new Date,this.endDate=null,this.type=y.datetime,this.disabled=!1,this.disabledDates="",this.value=null,this._open=!1,this.hidden=!1,this.name=void 0,this.fullWidth=!1,this.required=!1,this.label=void 0,this.placeholder=void 0,this.minYear=1900,this.maxYear=2200,this.noCaption=!1,this.captionError=void 0,this.caption="",this.captionType="default",this.alignment=void 0,this.placement=p.Placement["bottom-start"],this.linkedComponent=void 0,this.clearable=!1,this.years=[],this.hours=[],this.minutes=[],this.hasDateModule=!1,this.hasTimeModule=!1,this.renderDate=void 0,this.selectedDate=void 0,this.selectedEndDate=void 0,this.error=!1,this.errorText="",this.tick={}}markForCheck(){this.tick=d.UID()}openChanged(){this.bcmOpen.emit(this._open)}componentWillLoad(){if(this.inputId="picker-input-"+this._id,this.hasDateModule=this.type===y.datetime||this.type===y.date||this.type===y.range,this.hasTimeModule=this.type===y.datetime||this.type===y.time,this.prepareDisabledDates(),this.setData(),!this.initialized){for(let t=this.minYear;t<=this.maxYear;t++)this.years.push(t);for(let t=0;t<=23;t++)this.hours.push(t);for(let t=0;t<=59;t++)this.minutes.push(t);this.load.emit()}this.initialized=!0}componentDidRender(){this.hasDateModule&&!this.yearsDragger&&(this.createDragSelection("years",this.yearsElement,this.yearsWrapperElement,this.yearsStripElement,r.y),this.createWheelChange("years",this.yearsWrapperElement,this.yearsStripElement),this.setDragSelection("years",this.currentDate.year)),this.hasTimeModule&&!this.hoursDragger&&(this.createDragSelection("hours",this.hoursElement,this.hoursWrapperElement,this.timeStripElement,r.y),this.createWheelChange("hours",this.hoursWrapperElement,this.timeStripElement),this.setDragSelection("hours",this.currentDate.hour)),this.hasTimeModule&&!this.minutesDragger&&(this.createDragSelection("minutes",this.minutesElement,this.minutesWrapperElement,this.timeStripElement,r.y),this.createWheelChange("minutes",this.minutesWrapperElement,this.timeStripElement),this.setDragSelection("minutes",this.currentDate.minute))}renderDateChange(){this.initialized&&(this.setData(),this.hasDateModule&&this.setDragSelection("years",this.currentDate.year))}openChange(t){t&&(this.calculateLocation(),this.hasDateModule&&(this.createDragSelection("years",this.yearsElement,this.yearsWrapperElement,this.yearsStripElement,r.y),this.createWheelChange("years",this.yearsWrapperElement,this.yearsStripElement),this.setDragSelection("years",this.currentDate.year)),this.hasTimeModule&&(this.createDragSelection("hours",this.hoursElement,this.hoursWrapperElement,this.timeStripElement,r.y),this.createWheelChange("hours",this.hoursWrapperElement,this.timeStripElement),this.setDragSelection("hours",this.currentDate.hour,!0)),this.hasTimeModule&&(this.createDragSelection("minutes",this.minutesElement,this.minutesWrapperElement,this.timeStripElement,r.y),this.createWheelChange("minutes",this.minutesWrapperElement,this.timeStripElement),this.setDragSelection("minutes",this.currentDate.minute,!0)),this.markForCheck(),i(this.el))}valueChange(t,e){const i={isValid:!1,value:this.valueText};if(t)if(this.type!==y.range&&this.error)this.change.emit({isValid:!1,value:this.inputElement.value});else try{if((e&&v(t.dateObject)!==v(e.dateObject)||!e&&t)&&(this.type!==y.date&&this.type!==y.datetime||this.change.emit(t),this.type===y.time&&this.change.emit(t),this.type===y.range)){const e=t.dateObject;e.start.date&&e.end.date?t.isValid&&this.change.emit({isValid:t.isValid,value:t.value,start:e.start,end:e.end}):this.change.emit(i)}}catch(t){}else this.change.emit()}disabledDatesChange(t){t&&this.prepareDisabledDates()}stringToDate(t){return t.getMonth?t:new Date(Date.parse(this.switchDDMM(t)))}dateToString(t){if(!(t instanceof Date))return!1}switchDDMM(t){if(!t)return;const e=t.split("/");return-1===t.indexOf("/")||3!==e.length?t:`${e[1]}/${e[0]}/${e[2]}`}setData(){this.date=this.stringToDate(this.date),this.initialized||this.renderDate||(this.renderDate=this.date&&this.date||new Date),!this.initialized&&this.endDate&&(this.selectedEndDate=this.stringToDate(this.endDate));const t=this.renderDate;if(this.currentDate=this.createDateObject(t),this.dayNumbers=this.getMonthDayNumbers(t).map((e=>({day:e,thisMonth:!0,isWeekend:this.getDayIsWeekend(t,e),today:this.getIsCurrentDate(t,e),date:this.getTargetDayDate(t,e)}))),this.currentDate.year>this.minYear){let e=new Date(new Date(t).setMonth(this.currentDate.month-1,1)),i=this.getMonthDayNumbers(e).reverse(),s=this.currentDate.monthFirstDay;for(let t=1;t<(0===s?7:s);t++){const s=i[t-1];this.dayNumbers.unshift({day:s,prevMonth:!0,isWeekend:this.getDayIsWeekend(e,s),date:this.getTargetDayDate(e,s)})}}if(this.currentDate.year<this.maxYear){let e=new Date(new Date(t).setMonth(this.currentDate.month+1)),i=this.getMonthDayNumbers(e),s=42-this.dayNumbers.length;for(let t=0;t<s;t++){const s=i[t];this.dayNumbers.push({day:s,nextMonth:!0,isWeekend:this.getDayIsWeekend(e,s),date:this.getTargetDayDate(e,s)})}}this.emptyState||(this.valueText=this.getValueText()),i(this.el)}prepareDisabledDates(){if(!this.disabledDates)return;let t=null;if("string"==typeof this.disabledDates)try{t=JSON.parse(this.disabledDates)}catch(t){return}else t=this.disabledDates;if(t.dates&&t.dates.length&&t.dates.length){const e=t.dates.map((t=>{const e=new Date(t);return"invalid date"===e.toString().toLowerCase()?null:e})).filter((t=>t));this.disabledDatesList.dates=e}if(t.min&&t.max&&(t.min.getTime()>t.max.getTime()||t.max.getTime()<t.min.getTime()))return;t.min&&t.min instanceof Date?this.disabledDatesList.min=new Date(t.min.toDateString()):delete this.disabledDatesList.min,t.max&&t.max instanceof Date?this.disabledDatesList.max=new Date(t.max.toDateString()):delete this.disabledDatesList.max;const e=this.inputElement&&this.inputElement.value;e&&this.setDataFromText(e)}createWheelChange(t,e,i){e.addEventListener("wheel",(e=>{const s=e.deltaY>0,a=this[t+"Dragger"].getOffset().top,n=this.getTargetChildByDragPosition({y:a},i);let r=s?n+1:n-1;r<0?r=0:void 0===this[t][r]&&(r=this[t].length-1),"time"!=this.type||this.selectedDate||this.setTime(),this.setDragSelection(t,this[t][r],!0,!0)}))}createDragSelection(t,e,i,s,a){const n=t+"Dragger";this[n]=new h({target:e,trigger:i,direction:a,useTransform:!0,limit:{y:{max:s.offsetTop-s.offsetHeight/2,min:-1*(e.offsetHeight-(s.offsetTop+s.offsetHeight/2))}}}),this[n].on("end",(e=>{const i=this.getTargetChildByDragPosition(e,s);this.selectTargetChildByDragIdx(i,s,this[n]),this.setDragSelection(t,this[t][i],!1)}))}getTargetChildByDragPosition({y:t},e){const i=e.offsetHeight,s=i/2;return Math.floor(-(t-(e.offsetTop-s)-s)/i)}selectTargetChildByDragIdx(t,e,i,s=!0){i.setPosition({y:e.offsetHeight/2+e.offsetTop-(t+1)*e.offsetHeight,anim:s})}setDragSelection(t,e,i=!0,s=!1){const a=this[t].findIndex((t=>t===e));switch(i&&this.selectTargetChildByDragIdx(a,this["years"===t?t+"StripElement":"timeStripElement"],this[t+"Dragger"],s),t){case"years":this.date.setFullYear(e);break;case"hours":this.date.setHours(e);break;case"minutes":this.date.setMinutes(e)}this.renderDate=this.date,this.setData(),this.selectedDate&&this.setValue()}getHours12(){const t=(this.date.getHours()+24)%12||12;return t>12?t-12:t}createDateObject(t,{excludeTime:e=!1,exactMonthNumber:i=!1}={}){const s=t.getFullYear();return Object.assign(Object.assign({year:s>=this.maxYear?this.maxYear:s<=this.minYear?this.minYear:s,day:t.getDate(),month:t.getMonth()+(i?1:0),dayOfWeek:t.getDay(),monthFirstDay:new Date(new Date(t).setDate(1)).getDay()},!e&&{hour:t.getHours()}),!e&&{minute:t.getMinutes()})}generateDaysArrayFromMax(t){return Array.from(Array(t+1).keys()).slice(1)}getMonthDayNumbers(t){const e=this.getDaysInMonth(t.getMonth(),t.getFullYear());return this.generateDaysArrayFromMax(e)}getTargetDayDate(t,e){return new Date(new Date(t).setDate(e))}getDayIsWeekend(t,e){const i=new Date(new Date(t).setDate(e)).getDay();return 6===i||0===i}getClock(t){return{hours:(t=t||new Date).getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),milis:t.getMilliseconds()}}setValue(t){var e,i,s;const a=new Date(this.date.setHours(Number(this.currentDate.hour),Number(this.currentDate.minute)));if(t)this.value=null;else{if(this.dataIsValid=!0,this.type===y.datetime){const t=Object.assign({},this.currentDate);t.month+=1,(null===(e=this.value)||void 0===e?void 0:e.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),dateObject:t,value:this.valueText})}if(this.type===y.date){const t=Object.assign({},this.currentDate);delete t.hour,delete t.minute,t.month+=1,(null===(i=this.value)||void 0===i?void 0:i.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),dateObject:t,value:this.valueText})}if(this.type===y.time){const t=this.getTimeText(),e=Object.assign({},this.currentDate);e.month+=1,this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),time:t,dateObject:e,timeObject:{hours:this.currentDate.hour,minutes:this.currentDate.minute},value:t},this.inputElement.value=t}this.type===y.range&&(null===(s=this.value)||void 0===s?void 0:s.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,dateObject:{start:Object.assign({},this.selectedDate&&{date:this.selectedDate,timestamp:this.selectedDate.getTime(),detail:this.createDateObject(this.selectedDate,{excludeTime:!0,exactMonthNumber:!0})}),end:Object.assign({},this.selectedEndDate&&{date:this.selectedEndDate,timestamp:this.selectedEndDate.getTime(),detail:this.createDateObject(this.selectedEndDate,{excludeTime:!0,exactMonthNumber:!0})})},value:this.valueText})}}setMonth(t){this.renderDate.setDate(1),this.renderDate=new Date(this.renderDate.setMonth(t)),this.setDragSelection("years",this.currentDate.year)}checkRangeValidation({popupClosing:t=!1}={}){return this.type!==y.range||(t&&(!this.selectedDate||this.selectedDate&&!this.selectedEndDate)?(this.setError(!0,"date range invalid"),!1):(t||this.setError(!1),!0))}pad(t,e){return t<e?"0":""}isInputClearable(){return!(!this.inputElement||!this.inputElement.value)}isDisabledDate(t){if(this.disabledDatesList.dates.map((e=>this.isSameDate(e,t))).filter((t=>t)).length)return!0;if(this.disabledDatesList.min){const e=new Date(this.disabledDatesList.min);if(e&&e.getTime()>t.getTime())return!0}if(this.disabledDatesList.max){const e=new Date(this.disabledDatesList.max);if(e&&new Date(e.setDate(e.getDate()+1)).getTime()<t.getTime())return!0}}setDate(t,e,i=!1){const s=this.type===y.range,a=!!this.selectedEndDate;if((this.type!==y.date&&this.type!==y.datetime||!this.isDisabledDate(t))&&(this.emptyState=!1,(!s||s&&!a)&&(this.date=new Date(t.setHours(this.currentDate.hour,this.currentDate.minute))),s&&this.checkRangeValidation(),s&&this.selectedDate&&this.selectedEndDate&&(this.selectedDate=null,this.selectedEndDate=null),e)){const e=new Date(t);s&&this.selectedDate?this.selectedDate.getTime()>e.getTime()?(this.selectedEndDate=this.selectedDate)&&(this.selectedDate=e):this.selectedEndDate=e:this.selectedDate=e,!s&&(this._open=i),this.renderDate=this.date,this.valueText=this.getValueText(),this.setValue();const a=this.valueText.split("/"),n=this.valueText?this.changeFormat(new Date(a[1]+"/"+a[0]+"/"+a[2])):"";this.inputElement.value=n}}setDataFromText(t,e=!1,i=!0){let s=!1,a="";const n=this.parse(t);if(this.type!==y.date&&this.type!==y.datetime||!this.isDisabledDate(n.date)||(n.dateIsValid=!1,a="disabled-date"),this.type===y.datetime&&n.dateIsValid&&n.timeIsValid&&(e&&this.setDate(n.date,!0,i),e&&this.setTime(n.timeSections[0],n.timeSections[1]),s=!0),this.type===y.date&&n.dateIsValid&&(e&&this.setDate(n.date,!0,i),s=!0),this.type===y.time&&n.timeIsValid&&(e&&this.setTime(n.timeSections[0],n.timeSections[1]),s=!0),this.type===y.range&&(n.dateIsValid&&!this.selectedDate&&(e&&this.setDate(n.date,!0,i),s=!0),n.date2IsValid&&!this.selectedEndDate&&(e&&this.setDate(n.date2,!0,i),s=!0),this.selectedDate&&this.selectedEndDate&&n.rangeIsValid&&(this.isSameDate(n.date2,this.selectedEndDate)&&!this.isSameDate(n.date,this.selectedDate)&&(this.selectedDate=null,e&&this.setDate(n.date,!0,i),s=!0),this.isSameDate(n.date,this.selectedDate)&&!this.isSameDate(n.date2,this.selectedEndDate)&&(this.selectedEndDate=null,e&&this.setDate(n.date2,!0,i),s=!0)),this.selectedDate&&this.selectedEndDate&&!n.rangeIsValid&&e&&(this.selectedDate=null,this.selectedEndDate=null)),s)e&&(this.renderDate=this.date),this.setError(!1);else{this.type===y.range&&this.selectedDate&&this.selectedEndDate&&n.rangeIsValid?this.setError(!1):a?this.setError(!0,"disabled-date"===a&&"selected date is not allowed"):(t&&this.setError(!0,(this.type===y.datetime?"invalid date or time":this.type===y.range&&"invalid date range")||this.type===y.date&&"The selected date is not allowed."||this.type===y.time&&"invalid time"),this.setValue(!0));const e=t.split("/"),i=t&&!this.error?this.changeFormat(new Date(e[1]+"/"+e[0]+"/"+e[2])):"";this.inputElement.value=i}}setDateToday(){const t=new Date;this.type===y.range&&(this.selectedDate=null,this.selectedEndDate=null),this.setDate(t,!0,!1)}HourContentDblClick(t){const e=d.findEventPathWithNodeName(t,"SPAN");e&&e.classList.contains("selected")&&(this.setValue(),this._open=!1)}setTime(t,e){this.renderDate=new Date(this.date.setHours(Number(t||this.getClock().hours),Number(e||this.getClock().minutes))),this.type===y.time&&(this.selectedDate=this.date);const i=this.currentDate.hour||(new Date).getHours(),s=this.currentDate.minute||(new Date).getMinutes();this.setDragSelection("hours",i,!0,!0),this.setDragSelection("minutes",s,!0,!0)}setError(t=!1,e=""){this.error=t,this.errorText=t?e:""}getError(){const{error:t,errorText:e}=this;return{valid:!t,error:t,errorText:e}}getDaysInMonth(t,e){return new Date(e,t+1,0).getDate()}getIsCurrentDate(t,e){const i=new Date;return i.getDate()===e&&i.getMonth()===t.getMonth()&&i.getFullYear()===t.getFullYear()}isSameDate(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}getSelected(t,e=!1){const i=new Date(this["selected"+(e?"EndDate":"Date")]),s=i.getFullYear(),a=i.getMonth(),n=i.getDate();return t.getDate()===n&&t.getMonth()===a&&t.getFullYear()===s}getDateIsInRange(t){if(this.type!==y.range||!this.selectedDate||!this.selectedEndDate)return;const e=t.getTime(),i=this.selectedDate.getTime(),s=this.selectedEndDate.getTime();return e>i&&e<s}getMonthText(){return Object.values(x)[this.renderDate.getMonth()]}getCurrentDateText(){const t=Object.values(f)[this.currentDate.dayOfWeek],e=Object.values(x)[this.currentDate.month];return`${t}, ${this.currentDate.day}th ${e} ${this.currentDate.year}`}getTimeText(){const{hour:t,minute:e}=this.currentDate;return`${t<10?"0"+t:t}:${e<10?"0"+e:e}`}getValueText(){if(!this.selectedDate)return"";const t=this.selectedDate,e=t.getFullYear(),i=t.getDate(),s=t.getMonth()+1;let a="";if(this.type!==y.date&&this.type!==y.datetime||(a=`${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`),this.type===y.time&&(a=this.getTimeText()),this.type===y.datetime&&(a=`${a} ${this.getTimeText()}`),this.type===y.range&&(a=`${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`),this.type===y.range&&this.selectedEndDate){const t=this.selectedEndDate,e=t.getFullYear(),i=t.getDate(),s=t.getMonth()+1;a+=`-${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`}return this.setDataFromText(a),a}parse(t){const e=t.split(this.type===y.range?"-":" "),i=this.switchDDMM(e[0]),s=this.switchDDMM(e[1]),a=this.type===y.datetime?e[1]:e[0],n=new Date(i),r=new Date(s),h="invalid date"!==n.toString().toLowerCase(),o="invalid date"!==r.toString().toLowerCase(),c=/^((0?[1-9]|1[0-2])(-|\/)(0?[1-9]|[12]\d|3[01])(-|\/)[12]\d{3})$/,l=c.test(i),d=c.test(s),p=/\b([01][0-9]|2[0-3]):([0-5][0-9])\b/.test(a),m=h&&l,u=o&&d;return{date:n,date2:r,timeSections:p?a.split(":"):"",dateIsValid:m,date2IsValid:u,rangeIsValid:m&&u,timeIsValid:p}}getPrevMonth(){this.setMonth(this.renderDate.getMonth()-1)}getNextMonth(){this.setMonth(this.renderDate.getMonth()+1)}yearClick(t){this.yearsDragger.busy||this.setDragSelection("years",this.years[t],!0,!0)}hourClick(t){this.hoursDragger.busy||(this.selectedDate||this.setTime(),this.setDragSelection("hours",this.hours[t],!0,!0))}minuteClick(t){this.minutesDragger.busy||(this.selectedDate||this.setTime(),this.setDragSelection("minutes",this.minutes[t],!0,!0))}openPicker(){this.disabled||!this._open&&(this._open=!0)}handleDayNumber(t){this.type===y.range&&this.selectedDate&&!this.selectedEndDate&&this.isSameDate(this.selectedDate,t)||this.setDate(t,!0)}handleInputInput(t){this.setDataFromText(t,!0)}handleInputChange(t){this.setDataFromText(this.inputElement.value,!0,!1),t.stopPropagation()}async handleInputClear(){return this.selectedDate=null,this.selectedEndDate=null,this.emptyState=!0,this.renderDate=new Date,this._open=!1,this.setValue(!0),this.setError(),this.getValueText(),await this.inputElement.setClear(),await l(10),Promise.resolve()}handleWheel(t){t.preventDefault()}handleWindowClick(t){if(this._open){const e=document.getElementById(`picker-vp-${this._id}`),i=d.findEventPath(t,this.el),s=!!e&&d.findEventPath(t,e);i||s||(this._open=!1)}}openToggle(){this.disabled||(this._open=!this._open)}async open(){await l(50),this.openToggle()}async close(){this._open=!1}async getValue(){return this.value}async setDisabled(t){this.disabled=t}changeFormat(t,e=!1){if(!t)return;const i=t=>t<10?`0${t}`:t,s=i(new Date(t).getDate()),a=i(new Date(t).getMonth()+1),n=new Date(t).getFullYear(),r=i(new Date(t).getHours()),h=i(new Date(t).getMinutes());return"range"==this.type||"date"==this.type?e?`${a}/${s}/${n}`:`${s}/${a}/${n}`:e?`${a}/${s}/${n} ${r}:${h}`:`${s}/${a}/${n} ${r}:${h}`}isTime(t){return/^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$/.test(t)}getHHMM(t){if(!t)return;const e=t=>t<10?`0${t}`:t;return`${e(new Date(t).getHours())}:${e(new Date(t).getMinutes())}`}async set(t){if(t)if("number"==typeof t&&(t=new Date(t)),"time"==this.type){let e=t;this.isTime(t)||(e=this.getHHMM(t)),this.setDataFromText(e,!0,!1)}else{const i=t.toString().split("-"),s=Date.parse(i[0]);if(i[0]&&!isNaN(s)){var e=this.changeFormat(c.convertTimeStampToDate(new Date(i[0]).getTime()));i[1]&&!isNaN(Date.parse(i[1]))&&(e=e+"-"+this.changeFormat(c.convertTimeStampToDate(new Date(i[1]).getTime()))),this.setDataFromText(e,!0,!1)}else this.setDataFromText("",!0,!1)}else this.setClear()}async get(){var t;return(null===(t=this.value)||void 0===t?void 0:t.timestamp)||null}async setClear(){return await this.handleInputClear(),Promise.resolve()}async getInput(){return this.inputElement}async isValid(){return this.getError()}async resetCaption(){return await l(10),await this.inputElement.resetCaption(),this.captionType="default",this.captionError=null,await l(10),Promise.resolve()}addZeroBefore(t){return(t<10?"0":"")+t}formatDate(t,e){const i={mm:this.addZeroBefore(t.getMonth()+1),dd:this.addZeroBefore(t.getDate()),yyyy:this.addZeroBefore(t.getFullYear()),hh:this.addZeroBefore(t.getHours()),mi:this.addZeroBefore(t.getMinutes())};return e.replace(/mm|dd|yyyy|hh|mi/gi,(t=>i[t]))}handleResize(){this.calculateLocation()}handleWheels(t){if(this._open){const e=document.querySelector(`#picker-vp-${this._id}`);e&&d.findEventPath(t,e)?this.calculateLocation():this._open=!1}}componentDidLoad(){const t=this.el.shadowRoot.querySelector(`#picker-vp-${this._id}`);t&&(document.body.appendChild(t),this.calculateLocation())}disconnectedCallback(){this.el.innerHTML="";const t=document.getElementById(`picker-vp-${this._id}`);t&&t.remove()}async calculateLocation(){const t=document.getElementById(`picker-vp-${this._id}`),e=this.placement.split("-");this.alignment&&(this.placement=e[0]+("right"==this.alignment?"-end":"-start"));var i=this.placement;const s=document.getElementById(this.linkedComponent?this.linkedComponent:this._id);if(s){const e=this.linkedComponent?s:s.shadowRoot.querySelector(`#picker-input-${this._id}`)||s.shadowRoot.querySelector("bcm-datetime-picker").shadowRoot.querySelector(`#picker-input-${this._id}`);if(t&&e){m(t,e,i,(t=>i=t)),await l(10);let s=u(i,e),a=this.noCaption?0:20,n=0;switch(m(t,e,i,(t=>i=t)),await l(10),s=u(i,e),t.style.top=this.linkedComponent?("top"==i.split("-")[0]?s[0]-t.offsetHeight:s[0])+"px":("top"==i.split("-")[0]?s[0]-t.offsetHeight+n:s[0]-a)+"px",i.split("-")[1]){case"start":t.style.left=s[1]+"px";break;case"center":t.style.left=s[1]-t.offsetWidth/2+"px";break;case"end":t.style.left=s[1]-t.offsetWidth+"px"}t.classList.toggle("bcm-list--top","top"==i.split("-")[0])}}}handleKeyDown(t){(t.keyCode||t.which)===p.KeyCode.escape&&this._open&&(this._open=!1,t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.markForCheck())}render(){const t=o("day-numbers"),e=o("datetime-picker","datetime-picker-wrapper",{open:this._open,"no-caption":this.noCaption}),i=o(this.hidden?"hidden":null,{"full-width":this.fullWidth,"linked-component":this.linkedComponent}),n=o("toggle",{disabled:this.disabled}),r="time"==this.type?'<svg style="fill: #595959; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"/></svg>':'<svg style="fill: #595959; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"/></svg>';return s(a,{class:i,"bcm-internal-id":this.inputId},this.label&&s("div",{class:"picker-label",onClick:()=>this.openToggle()},s(b,{size:"medium",type:this.captionType,value:this.label,required:this.required,htmlFor:this._id})),s("bcm-old-input",{ref:t=>this.inputElement=t,placeholder:this.placeholder||"Select "+(this.type===y.datetime?"date and time":"")+(this.type===y.date?"date":"")+(this.type===y.time?"time":"")+(this.type===y.range?"date range":""),value:this.valueText,required:this.required,fullWidth:this.fullWidth,disabled:this.disabled,name:this.name,id:this.inputId,clearable:this.clearable,onClick:()=>this.openPicker(),disableWatchValue:!0,"on-bcm-clear":()=>this.handleInputClear(),"on-bcm-change":t=>this.handleInputChange(t),noCaption:this.noCaption,captionError:this.captionError,caption:this.caption,captionType:this.captionType},this.error&&s("span",{slot:"suffix"},s("span",{id:"error-icon",class:n,innerHTML:'<svg style="fill: #ef4444; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm42-104c0 23.2-18.8 42-42 42s-42-18.8-42-42 18.8-42 42-42 42 18.8 42 42zm-81.4-211.4l6.8 136c.3 6.4 5.6 11.4 12 11.4h41.2c6.4 0 11.7-5.1 12-11.4l6.8-136c.3-6.9-5.1-12.6-12-12.6h-54.8c-6.9 0-12.4 5.7-12 12.6z"/></svg>',title:this.errorText})),s("span",{slot:"suffix",onClick:()=>this.openPicker()},s("span",{id:"calender-icon",class:n,innerHTML:r}))),s("div",{id:"picker-vp-"+this._id,class:e,onWheel:t=>this.handleWheel(t)},s("div",{class:"modules"},this.hasDateModule&&s("div",{class:"date-container"},s("div",{class:"bcm-datetime-picker__header"},s("span",null),s("div",{class:"month-year"},s("button",{onClick:()=>this.getPrevMonth()},s("bcm-icon",{icon:"far fa-chevron-left"})),s("div",{class:"month-year-wrapper"},s("span",{class:"month"},this.getMonthText()),",",s("span",{class:"year"},this.date.getFullYear())),s("button",{onClick:()=>this.getNextMonth()},s("bcm-icon",{icon:"far fa-chevron-right"}))),s("span",{class:"today",onClick:()=>this.setDateToday()},"Today")),s("div",{class:"bcm-datetime-picker__content"},s("div",{class:"years",ref:t=>this.yearsWrapperElement=t},s("div",{class:"items",ref:t=>this.yearsElement=t},this.years.map(((t,e)=>s("span",{onClick:()=>this.yearClick(e)},t)))),s("div",{class:"select-strip",ref:t=>this.yearsStripElement=t})),s("div",{class:"days"},s("div",{class:"day-labels"},s("span",null,"Mo"),s("span",null,"Tu"),s("span",null,"We"),s("span",null,"Th"),s("span",null,"Fr"),s("span",null,"Sa"),s("span",null,"Su")),s("div",{class:t},this.dayNumbers.map((t=>s("span",{class:{"is-disabled-date":(this.type===y.date||this.type===y.datetime)&&this.isDisabledDate(t.date),"not-this-month":!t.thisMonth,"is-weekend":t.isWeekend,today:t.today,selected:this.getSelected(t.date),"selected-start":this.getSelected(t.date)&&this.selectedEndDate&&this.type===y.range,"selected-end":this.getSelected(t.date,!0)&&this.type===y.range,range:this.getDateIsInRange(t.date)&&this.type===y.range},onClick:()=>this.handleDayNumber(t.date)},s("span",{class:"number"},t.day)))))))),this.hasTimeModule&&s("div",{class:"time-container"},s("div",{class:"bcm-datetime-picker__header"},s("div",{class:"month-year"},s("span",{class:"month"},this.getTimeText())),s("span",{class:"now",onClick:()=>{this.setTime(),"time"==this.type&&(this._open=!1)}},"Now")),s("div",{class:"bcm-datetime-picker__content",onDblClick:t=>{this.HourContentDblClick(t)}},s("div",{class:"hours",ref:t=>this.hoursWrapperElement=t},s("div",{class:"items",ref:t=>this.hoursElement=t},this.hours.map(((t,e)=>s("span",{class:this.currentDate.hour===t?"selected":"",onClick:()=>this.hourClick(e)},(t<10&&"0")+t))))),s("div",{class:"minutes",ref:t=>this.minutesWrapperElement=t},s("div",{class:"items",ref:t=>this.minutesElement=t},this.minutes.map(((t,e)=>s("span",{class:this.currentDate.minute===t?"selected":"",onClick:()=>this.minuteClick(e)},(t<10&&"0")+t))))),s("div",{class:"select-strip",ref:t=>this.timeStripElement=t}))))))}get el(){return n(this)}static get watchers(){return{_open:["openChanged","openChange"],renderDate:["renderDateChange"],value:["valueChange"],disabledDates:["disabledDatesChange"]}}};(function(t,e,i,s){var a,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(a=t[h])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)})([g()],w.prototype,"el",void 0),w.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}:host{display:inline-block;position:relative;width:100%;max-width:256px;margin:0;margin-bottom:8px}:host(.full-width){max-width:100%}:host(.hidden){display:none}:host(.linked-component){display:none}.toggle{cursor:pointer}.toggle.disabled{cursor:not-allowed}.modules{display:flex}.picker-label{user-select:none;line-height:1}.datetime-picker{position:absolute;top:-1000px;display:inline-flex;flex-direction:column;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);opacity:0;visibility:hidden;transition:transform 0.2s ease, opacity 0.3s ease;transform:scale(0.8) translateY(-100px);background-color:#ffffff;min-height:356px;max-height:356px;box-sizing:border-box;z-index:-1000}.datetime-picker.alignment-left{left:0}.datetime-picker.alignment-right{right:0}.datetime-picker.open{top:calc(100% - 28px);z-index:10000;opacity:1;visibility:visible;transform:scale(1) translateY(0)}.datetime-picker.open.no-caption{top:100%}.actions{display:flex;align-items:center;justify-content:space-between;padding:8px;margin-top:auto;border-top:1px solid var(--bcm-color-grey-6)}.actions .current-date{font-size:14px;line-height:22px;color:var(--bcm-color-prime-blue-6);text-transform:capitalize}.date-container+.time-container{border-left:1px solid #cecece}.time-container{width:185px}.time-container .bcm-datetime-picker__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;max-height:60px;border-bottom:1px solid var(--bcm-color-grey-4)}.time-container .bcm-datetime-picker__header .now{font-size:14px;line-height:22px;cursor:pointer;color:var(--bcm-color-prime-blue-6);user-select:none}.time-container .bcm-datetime-picker__content{position:relative;display:flex}.time-container .hours,.time-container .minutes,.time-container .time-period{position:relative;flex:1 1 100%;max-width:100%;height:280px;overflow:hidden}.time-container .hours .items>span,.time-container .minutes .items>span,.time-container .time-period .items>span{font-size:14px;color:var(--bcm-color-grey-8)}.time-container .hours .items>span.selected,.time-container .minutes .items>span.selected,.time-container .time-period .items>span.selected{color:var(--bcm-color-prime-blue-6)}.date-container{width:364px;}.date-container .bcm-datetime-picker__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;max-height:60px;border-bottom:1px solid var(--bcm-color-grey-4)}.date-container .bcm-datetime-picker__header .month-year-wrapper{display:flex;align-items:center;justify-content:center;margin:0 4px;min-width:125px}.date-container .bcm-datetime-picker__header .month-year{font-size:16px;line-height:24px}.date-container .bcm-datetime-picker__header .month-year{display:flex;align-items:center}.date-container .bcm-datetime-picker__header .month-year button{display:flex;align-items:center;box-shadow:none;background:transparent;outline:none;appearance:none;border:none;color:var(--bcm-color-prime-blue-6);cursor:pointer}.date-container .bcm-datetime-picker__header .month{text-transform:capitalize}.date-container .bcm-datetime-picker__header .year{padding-left:4px}.date-container .bcm-datetime-picker__header .today{font-size:14px;line-height:22px;cursor:pointer;color:var(--bcm-color-prime-blue-6);user-select:none}.date-container .bcm-datetime-picker__content{display:flex}.date-container .years{position:relative;flex:0 0 70px;max-width:70px;height:280px;overflow:hidden;background-color:var(--bcm-color-grey-2)}.date-container .days{width:100%}.date-container .day-numbers,.date-container .day-labels{display:grid;grid-template-columns:repeat(7, 1fr)}.date-container .day-numbers{padding:24px 24px}.date-container .day-numbers>span,.date-container .day-labels span{text-align:center}.date-container .day-numbers>span{position:relative;padding-bottom:100%;cursor:pointer}.date-container .day-numbers>span.not-this-month{color:var(--bcm-color-grey-4)}.date-container .day-numbers>span.is-weekend{color:var(--bcm-color-prime-blue-3)}.date-container .day-numbers>span.is-disabled-date:not(.today){color:var(--bcm-color-grey-4);cursor:not-allowed}.date-container .day-numbers>span.is-disabled-date:not(.today):before{opacity:0 !important}.date-container .day-numbers>span.today{color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.today:before{opacity:1;background-color:var(--bcm-color-prime-blue-2);border:1px solid var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.selected-start{background:linear-gradient(90deg, white 50%, #8abde2 50%) !important}.date-container .day-numbers>span.selected-end{background:linear-gradient(90deg, #8abde2 50%, white 50%) !important}.date-container .day-numbers>span.range{background:#8abde2}.date-container .day-numbers>span.range:not(.today){color:#ffffff}.date-container .day-numbers>span.range:not(.today):before{background-color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.range.is-weekend:not(.today){color:var(--bcm-color-prime-blue-2)}.date-container .day-numbers>span.selected,.date-container .day-numbers>span.selected-end{color:#ffffff}.date-container .day-numbers>span.selected:before,.date-container .day-numbers>span.selected-end:before{opacity:1;background-color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers.start-1>span:first-child{grid-column:1}.date-container .day-numbers.start-2>span:first-child{grid-column:2}.date-container .day-numbers.start-3>span:first-child{grid-column:3}.date-container .day-numbers.start-4>span:first-child{grid-column:4}.date-container .day-numbers.start-5>span:first-child{grid-column:5}.date-container .day-numbers.start-6>span:first-child{grid-column:6}.date-container .day-numbers.start-7>span:first-child{grid-column:7}.date-container .day-numbers>span:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;background-color:var(--bcm-color-grey-4);opacity:0;box-sizing:border-box}.date-container .day-numbers>span:hover.not-this-month:not(.is-weekend){color:var(--bcm-color-grey-6)}.date-container .day-numbers>span:hover:before{opacity:1}.date-container .day-numbers .number{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.date-container .day-labels{padding:24px 40px 0 40px}.date-container .day-labels span{font-size:12px;color:var(--bcm-color-grey-6)}.date-container .day-labels span:nth-child(7n+6),.date-container .day-labels span:nth-child(7n+7){color:var(--bcm-color-prime-blue-3)}.years .items,.hours .items,.minutes .items,.time-period .items{position:relative;display:flex;flex-direction:column;z-index:0;transform:translateY(0);scroll-behavior:smooth}.years .items>span,.hours .items>span,.minutes .items>span,.time-period .items>span{text-align:center;font-size:12px;min-height:26px;max-height:26px;line-height:26px;color:var(--bcm-color-grey-8);user-select:none}.years:before,.years:after,.hours:before,.hours:after,.minutes:before,.minutes:after,.time-period:before,.time-period:after{content:"";position:absolute;left:0;width:100%;height:40px}.years:before,.hours:before,.minutes:before,.time-period:before{top:-40px;box-shadow:0 10px 100px 70px #ffffff;z-index:1}.years:after,.hours:after,.minutes:after,.time-period:after{bottom:-40px;box-shadow:0 -10px 100px 70px #ffffff;z-index:2}.select-strip{position:absolute;width:100%;top:50%;left:0;transform:translateY(-50%);min-height:26px;max-height:26px;border:1px solid var(--bcm-color-grey-5);border-left:0;border-right:0;pointer-events:none;box-sizing:border-box}';export{w as bcm_datetime_picker}
5
+ import{r as t,c as e,f as i,h as s,H as a,g as n}from"./p-6d7fe687.js";import{D as r,E as h}from"./p-7e44e6b5.js";import{c as o}from"./p-d65a1e21.js";import{D as c}from"./p-626a65e9.js";import{d as l}from"./p-8c018ae0.js";import{G as d}from"./p-5f63beda.js";import{a as p}from"./p-a429e85b.js";import{g as m,s as u}from"./p-dbc4c30c.js";import{L as b}from"./p-c49d038e.js";import{I as g}from"./p-54c0916c.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";import"./p-8d0ca8c2.js";import"./p-74b2d896.js";var x,f,y;!function(t){t.january="january",t.february="february",t.march="march",t.april="april",t.may="may",t.june="june",t.july="july",t.august="august",t.september="september",t.october="october",t.november="november",t.december="december"}(x||(x={})),function(t){t.sunday="sunday",t.monday="monday",t.tuesday="tuesday",t.wednesday="wednesday",t.thursday="thursday",t.friday="friday",t.saturday="saturday"}(f||(f={})),function(t){t.datetime="datetime",t.range="range",t.date="date",t.time="time"}(y||(y={}));const v=JSON.stringify,w=class{constructor(i){t(this,i),this.load=e(this,"bcm-load",7),this.change=e(this,"bcm-change",7),this.bcmOpen=e(this,"bcm-open",7),this.inputId=null,this.emptyState=!1,this.initialized=!1,this.disabledDatesList={min:null,max:null,dates:[]},this.dayNumbers=[],this.valueText=null,this.dataIsValid=!1,this._id=d.UID(),this.date=new Date,this.endDate=null,this.type=y.datetime,this.disabled=!1,this.disabledDates="",this.value=null,this._open=!1,this.hidden=!1,this.name=void 0,this.fullWidth=!1,this.required=!1,this.label=void 0,this.placeholder=void 0,this.minYear=1900,this.maxYear=2200,this.noCaption=!1,this.captionError=void 0,this.caption="",this.captionType="default",this.alignment=void 0,this.placement=p.Placement["bottom-start"],this.linkedComponent=void 0,this.clearable=!1,this.years=[],this.hours=[],this.minutes=[],this.hasDateModule=!1,this.hasTimeModule=!1,this.renderDate=void 0,this.selectedDate=void 0,this.selectedEndDate=void 0,this.error=!1,this.errorText="",this.tick={}}markForCheck(){this.tick=d.UID()}openChanged(){this.bcmOpen.emit(this._open)}componentWillLoad(){if(this.inputId="picker-input-"+this._id,this.hasDateModule=this.type===y.datetime||this.type===y.date||this.type===y.range,this.hasTimeModule=this.type===y.datetime||this.type===y.time,this.prepareDisabledDates(),this.setData(),!this.initialized){for(let t=this.minYear;t<=this.maxYear;t++)this.years.push(t);for(let t=0;t<=23;t++)this.hours.push(t);for(let t=0;t<=59;t++)this.minutes.push(t);this.load.emit()}this.initialized=!0}componentDidRender(){this.hasDateModule&&!this.yearsDragger&&(this.createDragSelection("years",this.yearsElement,this.yearsWrapperElement,this.yearsStripElement,r.y),this.createWheelChange("years",this.yearsWrapperElement,this.yearsStripElement),this.setDragSelection("years",this.currentDate.year)),this.hasTimeModule&&!this.hoursDragger&&(this.createDragSelection("hours",this.hoursElement,this.hoursWrapperElement,this.timeStripElement,r.y),this.createWheelChange("hours",this.hoursWrapperElement,this.timeStripElement),this.setDragSelection("hours",this.currentDate.hour)),this.hasTimeModule&&!this.minutesDragger&&(this.createDragSelection("minutes",this.minutesElement,this.minutesWrapperElement,this.timeStripElement,r.y),this.createWheelChange("minutes",this.minutesWrapperElement,this.timeStripElement),this.setDragSelection("minutes",this.currentDate.minute))}renderDateChange(){this.initialized&&(this.setData(),this.hasDateModule&&this.setDragSelection("years",this.currentDate.year))}openChange(t){t&&(this.calculateLocation(),this.hasDateModule&&(this.createDragSelection("years",this.yearsElement,this.yearsWrapperElement,this.yearsStripElement,r.y),this.createWheelChange("years",this.yearsWrapperElement,this.yearsStripElement),this.setDragSelection("years",this.currentDate.year)),this.hasTimeModule&&(this.createDragSelection("hours",this.hoursElement,this.hoursWrapperElement,this.timeStripElement,r.y),this.createWheelChange("hours",this.hoursWrapperElement,this.timeStripElement),this.setDragSelection("hours",this.currentDate.hour,!0)),this.hasTimeModule&&(this.createDragSelection("minutes",this.minutesElement,this.minutesWrapperElement,this.timeStripElement,r.y),this.createWheelChange("minutes",this.minutesWrapperElement,this.timeStripElement),this.setDragSelection("minutes",this.currentDate.minute,!0)),this.markForCheck(),i(this.el))}valueChange(t,e){const i={isValid:!1,value:this.valueText};if(t)if(this.type!==y.range&&this.error)this.change.emit({isValid:!1,value:this.inputElement.value});else try{if((e&&v(t.dateObject)!==v(e.dateObject)||!e&&t)&&(this.type!==y.date&&this.type!==y.datetime||this.change.emit(t),this.type===y.time&&this.change.emit(t),this.type===y.range)){const e=t.dateObject;e.start.date&&e.end.date?t.isValid&&this.change.emit({isValid:t.isValid,value:t.value,start:e.start,end:e.end}):this.change.emit(i)}}catch(t){}else this.change.emit()}disabledDatesChange(t){t&&this.prepareDisabledDates()}stringToDate(t){return t.getMonth?t:new Date(Date.parse(this.switchDDMM(t)))}dateToString(t){if(!(t instanceof Date))return!1}switchDDMM(t){if(!t)return;const e=t.split("/");return-1===t.indexOf("/")||3!==e.length?t:`${e[1]}/${e[0]}/${e[2]}`}setData(){this.date=this.stringToDate(this.date),this.initialized||this.renderDate||(this.renderDate=this.date&&this.date||new Date),!this.initialized&&this.endDate&&(this.selectedEndDate=this.stringToDate(this.endDate));const t=this.renderDate;if(this.currentDate=this.createDateObject(t),this.dayNumbers=this.getMonthDayNumbers(t).map((e=>({day:e,thisMonth:!0,isWeekend:this.getDayIsWeekend(t,e),today:this.getIsCurrentDate(t,e),date:this.getTargetDayDate(t,e)}))),this.currentDate.year>this.minYear){let e=new Date(new Date(t).setMonth(this.currentDate.month-1,1)),i=this.getMonthDayNumbers(e).reverse(),s=this.currentDate.monthFirstDay;for(let t=1;t<(0===s?7:s);t++){const s=i[t-1];this.dayNumbers.unshift({day:s,prevMonth:!0,isWeekend:this.getDayIsWeekend(e,s),date:this.getTargetDayDate(e,s)})}}if(this.currentDate.year<this.maxYear){let e=new Date(new Date(t).setMonth(this.currentDate.month+1)),i=this.getMonthDayNumbers(e),s=42-this.dayNumbers.length;for(let t=0;t<s;t++){const s=i[t];this.dayNumbers.push({day:s,nextMonth:!0,isWeekend:this.getDayIsWeekend(e,s),date:this.getTargetDayDate(e,s)})}}this.emptyState||(this.valueText=this.getValueText()),i(this.el)}prepareDisabledDates(){if(!this.disabledDates)return;let t=null;if("string"==typeof this.disabledDates)try{t=JSON.parse(this.disabledDates)}catch(t){return}else t=this.disabledDates;if(t.dates&&t.dates.length&&t.dates.length){const e=t.dates.map((t=>{const e=new Date(t);return"invalid date"===e.toString().toLowerCase()?null:e})).filter((t=>t));this.disabledDatesList.dates=e}if(t.min&&t.max&&(t.min.getTime()>t.max.getTime()||t.max.getTime()<t.min.getTime()))return;t.min&&t.min instanceof Date?this.disabledDatesList.min=new Date(t.min.toDateString()):delete this.disabledDatesList.min,t.max&&t.max instanceof Date?this.disabledDatesList.max=new Date(t.max.toDateString()):delete this.disabledDatesList.max;const e=this.inputElement&&this.inputElement.value;e&&this.setDataFromText(e)}createWheelChange(t,e,i){e.addEventListener("wheel",(e=>{const s=e.deltaY>0,a=this[t+"Dragger"].getOffset().top,n=this.getTargetChildByDragPosition({y:a},i);let r=s?n+1:n-1;r<0?r=0:void 0===this[t][r]&&(r=this[t].length-1),"time"!=this.type||this.selectedDate||this.setTime(),this.setDragSelection(t,this[t][r],!0,!0)}))}createDragSelection(t,e,i,s,a){const n=t+"Dragger";this[n]=new h({target:e,trigger:i,direction:a,useTransform:!0,limit:{y:{max:s.offsetTop-s.offsetHeight/2,min:-1*(e.offsetHeight-(s.offsetTop+s.offsetHeight/2))}}}),this[n].on("end",(e=>{const i=this.getTargetChildByDragPosition(e,s);this.selectTargetChildByDragIdx(i,s,this[n]),this.setDragSelection(t,this[t][i],!1)}))}getTargetChildByDragPosition({y:t},e){const i=e.offsetHeight,s=i/2;return Math.floor(-(t-(e.offsetTop-s)-s)/i)}selectTargetChildByDragIdx(t,e,i,s=!0){i.setPosition({y:e.offsetHeight/2+e.offsetTop-(t+1)*e.offsetHeight,anim:s})}setDragSelection(t,e,i=!0,s=!1){const a=this[t].findIndex((t=>t===e));switch(i&&this.selectTargetChildByDragIdx(a,this["years"===t?t+"StripElement":"timeStripElement"],this[t+"Dragger"],s),t){case"years":this.date.setFullYear(e);break;case"hours":this.date.setHours(e);break;case"minutes":this.date.setMinutes(e)}this.renderDate=this.date,this.setData(),this.selectedDate&&this.setValue()}getHours12(){const t=(this.date.getHours()+24)%12||12;return t>12?t-12:t}createDateObject(t,{excludeTime:e=!1,exactMonthNumber:i=!1}={}){const s=t.getFullYear();return Object.assign(Object.assign({year:s>=this.maxYear?this.maxYear:s<=this.minYear?this.minYear:s,day:t.getDate(),month:t.getMonth()+(i?1:0),dayOfWeek:t.getDay(),monthFirstDay:new Date(new Date(t).setDate(1)).getDay()},!e&&{hour:t.getHours()}),!e&&{minute:t.getMinutes()})}generateDaysArrayFromMax(t){return Array.from(Array(t+1).keys()).slice(1)}getMonthDayNumbers(t){const e=this.getDaysInMonth(t.getMonth(),t.getFullYear());return this.generateDaysArrayFromMax(e)}getTargetDayDate(t,e){return new Date(new Date(t).setDate(e))}getDayIsWeekend(t,e){const i=new Date(new Date(t).setDate(e)).getDay();return 6===i||0===i}getClock(t){return{hours:(t=t||new Date).getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),milis:t.getMilliseconds()}}setValue(t){var e,i,s;const a=new Date(this.date.setHours(Number(this.currentDate.hour),Number(this.currentDate.minute)));if(t)this.value=null;else{if(this.dataIsValid=!0,this.type===y.datetime){const t=Object.assign({},this.currentDate);t.month+=1,(null===(e=this.value)||void 0===e?void 0:e.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),dateObject:t,value:this.valueText})}if(this.type===y.date){const t=Object.assign({},this.currentDate);delete t.hour,delete t.minute,t.month+=1,(null===(i=this.value)||void 0===i?void 0:i.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),dateObject:t,value:this.valueText})}if(this.type===y.time){const t=this.getTimeText(),e=Object.assign({},this.currentDate);e.month+=1,this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),time:t,dateObject:e,timeObject:{hours:this.currentDate.hour,minutes:this.currentDate.minute},value:t},this.inputElement.value=t}this.type===y.range&&(null===(s=this.value)||void 0===s?void 0:s.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,dateObject:{start:Object.assign({},this.selectedDate&&{date:this.selectedDate,timestamp:this.selectedDate.getTime(),detail:this.createDateObject(this.selectedDate,{excludeTime:!0,exactMonthNumber:!0})}),end:Object.assign({},this.selectedEndDate&&{date:this.selectedEndDate,timestamp:this.selectedEndDate.getTime(),detail:this.createDateObject(this.selectedEndDate,{excludeTime:!0,exactMonthNumber:!0})})},value:this.valueText})}}setMonth(t){this.renderDate.setDate(1),this.renderDate=new Date(this.renderDate.setMonth(t)),this.setDragSelection("years",this.currentDate.year)}checkRangeValidation({popupClosing:t=!1}={}){return this.type!==y.range||(t&&(!this.selectedDate||this.selectedDate&&!this.selectedEndDate)?(this.setError(!0,"date range invalid"),!1):(t||this.setError(!1),!0))}pad(t,e){return t<e?"0":""}isInputClearable(){return!(!this.inputElement||!this.inputElement.value)}isDisabledDate(t){if(this.disabledDatesList.dates.map((e=>this.isSameDate(e,t))).filter((t=>t)).length)return!0;if(this.disabledDatesList.min){const e=new Date(this.disabledDatesList.min);if(e&&e.getTime()>t.getTime())return!0}if(this.disabledDatesList.max){const e=new Date(this.disabledDatesList.max);if(e&&new Date(e.setDate(e.getDate()+1)).getTime()<t.getTime())return!0}}setDate(t,e,i=!1){const s=this.type===y.range,a=!!this.selectedEndDate;if((this.type!==y.date&&this.type!==y.datetime||!this.isDisabledDate(t))&&(this.emptyState=!1,(!s||s&&!a)&&(this.date=new Date(t.setHours(this.currentDate.hour,this.currentDate.minute))),s&&this.checkRangeValidation(),s&&this.selectedDate&&this.selectedEndDate&&(this.selectedDate=null,this.selectedEndDate=null),e)){const e=new Date(t);s&&this.selectedDate?this.selectedDate.getTime()>e.getTime()?(this.selectedEndDate=this.selectedDate)&&(this.selectedDate=e):this.selectedEndDate=e:this.selectedDate=e,!s&&(this._open=i),this.renderDate=this.date,this.valueText=this.getValueText(),this.setValue();const a=this.valueText.split("/"),n=this.valueText?this.changeFormat(new Date(a[1]+"/"+a[0]+"/"+a[2])):"";this.inputElement.value=n}}setDataFromText(t,e=!1,i=!0){let s=!1,a="";const n=this.parse(t);if(this.type!==y.date&&this.type!==y.datetime||!this.isDisabledDate(n.date)||(n.dateIsValid=!1,a="disabled-date"),this.type===y.datetime&&n.dateIsValid&&n.timeIsValid&&(e&&this.setDate(n.date,!0,i),e&&this.setTime(n.timeSections[0],n.timeSections[1]),s=!0),this.type===y.date&&n.dateIsValid&&(e&&this.setDate(n.date,!0,i),s=!0),this.type===y.time&&n.timeIsValid&&(e&&this.setTime(n.timeSections[0],n.timeSections[1]),s=!0),this.type===y.range&&(n.dateIsValid&&!this.selectedDate&&(e&&this.setDate(n.date,!0,i),s=!0),n.date2IsValid&&!this.selectedEndDate&&(e&&this.setDate(n.date2,!0,i),s=!0),this.selectedDate&&this.selectedEndDate&&n.rangeIsValid&&(this.isSameDate(n.date2,this.selectedEndDate)&&!this.isSameDate(n.date,this.selectedDate)&&(this.selectedDate=null,e&&this.setDate(n.date,!0,i),s=!0),this.isSameDate(n.date,this.selectedDate)&&!this.isSameDate(n.date2,this.selectedEndDate)&&(this.selectedEndDate=null,e&&this.setDate(n.date2,!0,i),s=!0)),this.selectedDate&&this.selectedEndDate&&!n.rangeIsValid&&e&&(this.selectedDate=null,this.selectedEndDate=null)),s)e&&(this.renderDate=this.date),this.setError(!1);else{this.type===y.range&&this.selectedDate&&this.selectedEndDate&&n.rangeIsValid?this.setError(!1):a?this.setError(!0,"disabled-date"===a&&"selected date is not allowed"):(t&&this.setError(!0,(this.type===y.datetime?"invalid date or time":this.type===y.range&&"invalid date range")||this.type===y.date&&"The selected date is not allowed."||this.type===y.time&&"invalid time"),this.setValue(!0));const e=t.split("/"),i=t&&!this.error?this.changeFormat(new Date(e[1]+"/"+e[0]+"/"+e[2])):"";this.inputElement.value=i}}setDateToday(){const t=new Date;this.type===y.range&&(this.selectedDate=null,this.selectedEndDate=null),this.setDate(t,!0,!1)}HourContentDblClick(t){const e=d.findEventPathWithNodeName(t,"SPAN");e&&e.classList.contains("selected")&&(this.setValue(),this._open=!1)}setTime(t,e){this.renderDate=new Date(this.date.setHours(Number(t||this.getClock().hours),Number(e||this.getClock().minutes))),this.type===y.time&&(this.selectedDate=this.date);const i=this.currentDate.hour||(new Date).getHours(),s=this.currentDate.minute||(new Date).getMinutes();this.setDragSelection("hours",i,!0,!0),this.setDragSelection("minutes",s,!0,!0)}setError(t=!1,e=""){this.error=t,this.errorText=t?e:""}getError(){const{error:t,errorText:e}=this;return{valid:!t,error:t,errorText:e}}getDaysInMonth(t,e){return new Date(e,t+1,0).getDate()}getIsCurrentDate(t,e){const i=new Date;return i.getDate()===e&&i.getMonth()===t.getMonth()&&i.getFullYear()===t.getFullYear()}isSameDate(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}getSelected(t,e=!1){const i=new Date(this["selected"+(e?"EndDate":"Date")]),s=i.getFullYear(),a=i.getMonth(),n=i.getDate();return t.getDate()===n&&t.getMonth()===a&&t.getFullYear()===s}getDateIsInRange(t){if(this.type!==y.range||!this.selectedDate||!this.selectedEndDate)return;const e=t.getTime(),i=this.selectedDate.getTime(),s=this.selectedEndDate.getTime();return e>i&&e<s}getMonthText(){return Object.values(x)[this.renderDate.getMonth()]}getCurrentDateText(){const t=Object.values(f)[this.currentDate.dayOfWeek],e=Object.values(x)[this.currentDate.month];return`${t}, ${this.currentDate.day}th ${e} ${this.currentDate.year}`}getTimeText(){const{hour:t,minute:e}=this.currentDate;return`${t<10?"0"+t:t}:${e<10?"0"+e:e}`}getValueText(){if(!this.selectedDate)return"";const t=this.selectedDate,e=t.getFullYear(),i=t.getDate(),s=t.getMonth()+1;let a="";if(this.type!==y.date&&this.type!==y.datetime||(a=`${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`),this.type===y.time&&(a=this.getTimeText()),this.type===y.datetime&&(a=`${a} ${this.getTimeText()}`),this.type===y.range&&(a=`${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`),this.type===y.range&&this.selectedEndDate){const t=this.selectedEndDate,e=t.getFullYear(),i=t.getDate(),s=t.getMonth()+1;a+=`-${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`}return this.setDataFromText(a),a}parse(t){const e=t.split(this.type===y.range?"-":" "),i=this.switchDDMM(e[0]),s=this.switchDDMM(e[1]),a=this.type===y.datetime?e[1]:e[0],n=new Date(i),r=new Date(s),h="invalid date"!==n.toString().toLowerCase(),o="invalid date"!==r.toString().toLowerCase(),c=/^((0?[1-9]|1[0-2])(-|\/)(0?[1-9]|[12]\d|3[01])(-|\/)[12]\d{3})$/,l=c.test(i),d=c.test(s),p=/\b([01][0-9]|2[0-3]):([0-5][0-9])\b/.test(a),m=h&&l,u=o&&d;return{date:n,date2:r,timeSections:p?a.split(":"):"",dateIsValid:m,date2IsValid:u,rangeIsValid:m&&u,timeIsValid:p}}getPrevMonth(){this.setMonth(this.renderDate.getMonth()-1)}getNextMonth(){this.setMonth(this.renderDate.getMonth()+1)}yearClick(t){this.yearsDragger.busy||this.setDragSelection("years",this.years[t],!0,!0)}hourClick(t){this.hoursDragger.busy||(this.selectedDate||this.setTime(),this.setDragSelection("hours",this.hours[t],!0,!0))}minuteClick(t){this.minutesDragger.busy||(this.selectedDate||this.setTime(),this.setDragSelection("minutes",this.minutes[t],!0,!0))}openPicker(){this.disabled||!this._open&&(this._open=!0)}handleDayNumber(t){this.type===y.range&&this.selectedDate&&!this.selectedEndDate&&this.isSameDate(this.selectedDate,t)||this.setDate(t,!0)}handleInputInput(t){this.setDataFromText(t,!0)}handleInputChange(t){this.setDataFromText(this.inputElement.value,!0,!1),t.stopPropagation()}async handleInputClear(){return this.selectedDate=null,this.selectedEndDate=null,this.emptyState=!0,this.renderDate=new Date,this._open=!1,this.setValue(!0),this.setError(),this.getValueText(),await this.inputElement.setClear(),await l(10),Promise.resolve()}handleWheel(t){t.preventDefault()}handleWindowClick(t){if(this._open){const e=document.getElementById(`picker-vp-${this._id}`),i=d.findEventPath(t,this.el),s=!!e&&d.findEventPath(t,e);i||s||(this._open=!1)}}openToggle(){this.disabled||(this._open=!this._open)}async open(){await l(50),this.openToggle()}async close(){this._open=!1}async getValue(){return this.value}async setDisabled(t){this.disabled=t}changeFormat(t,e=!1){if(!t)return;const i=t=>t<10?`0${t}`:t,s=i(new Date(t).getDate()),a=i(new Date(t).getMonth()+1),n=new Date(t).getFullYear(),r=i(new Date(t).getHours()),h=i(new Date(t).getMinutes());return"range"==this.type||"date"==this.type?e?`${a}/${s}/${n}`:`${s}/${a}/${n}`:e?`${a}/${s}/${n} ${r}:${h}`:`${s}/${a}/${n} ${r}:${h}`}isTime(t){return/^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$/.test(t)}getHHMM(t){if(!t)return;const e=t=>t<10?`0${t}`:t;return`${e(new Date(t).getHours())}:${e(new Date(t).getMinutes())}`}async set(t){if(t)if("number"==typeof t&&(t=new Date(t)),"time"==this.type){let e=t;this.isTime(t)||(e=this.getHHMM(t)),this.setDataFromText(e,!0,!1)}else{const i=t.toString().split("-"),s=Date.parse(i[0]);if(i[0]&&!isNaN(s)){var e=this.changeFormat(c.convertTimeStampToDate(new Date(i[0]).getTime()));i[1]&&!isNaN(Date.parse(i[1]))&&(e=e+"-"+this.changeFormat(c.convertTimeStampToDate(new Date(i[1]).getTime()))),this.setDataFromText(e,!0,!1)}else this.setDataFromText("",!0,!1)}else this.setClear()}async get(){var t;return(null===(t=this.value)||void 0===t?void 0:t.timestamp)||null}async setClear(){return await this.handleInputClear(),Promise.resolve()}async getInput(){return this.inputElement}async isValid(){return this.getError()}async resetCaption(){return await l(10),await this.inputElement.resetCaption(),this.captionType="default",this.captionError=null,await l(10),Promise.resolve()}addZeroBefore(t){return(t<10?"0":"")+t}formatDate(t,e){const i={mm:this.addZeroBefore(t.getMonth()+1),dd:this.addZeroBefore(t.getDate()),yyyy:this.addZeroBefore(t.getFullYear()),hh:this.addZeroBefore(t.getHours()),mi:this.addZeroBefore(t.getMinutes())};return e.replace(/mm|dd|yyyy|hh|mi/gi,(t=>i[t]))}handleResize(){this.calculateLocation()}handleWheels(t){if(this._open){const e=document.querySelector(`#picker-vp-${this._id}`);e&&d.findEventPath(t,e)?this.calculateLocation():this._open=!1}}componentDidLoad(){const t=this.el.shadowRoot.querySelector(`#picker-vp-${this._id}`);t&&(document.body.appendChild(t),this.calculateLocation())}disconnectedCallback(){this.el.innerHTML="";const t=document.getElementById(`picker-vp-${this._id}`);t&&t.remove()}async calculateLocation(){const t=document.getElementById(`picker-vp-${this._id}`),e=this.placement.split("-");this.alignment&&(this.placement=e[0]+("right"==this.alignment?"-end":"-start"));var i=this.placement;const s=document.getElementById(this.linkedComponent?this.linkedComponent:this._id);if(s){const e=this.linkedComponent?s:s.shadowRoot.querySelector(`#picker-input-${this._id}`)||s.shadowRoot.querySelector("bcm-datetime-picker").shadowRoot.querySelector(`#picker-input-${this._id}`);if(t&&e){m(t,e,i,(t=>i=t)),await l(10);let s=u(i,e),a=this.noCaption?0:20,n=0;switch(m(t,e,i,(t=>i=t)),await l(10),s=u(i,e),t.style.top=this.linkedComponent?("top"==i.split("-")[0]?s[0]-t.offsetHeight:s[0])+"px":("top"==i.split("-")[0]?s[0]-t.offsetHeight+n:s[0]-a)+"px",i.split("-")[1]){case"start":t.style.left=s[1]+"px";break;case"center":t.style.left=s[1]-t.offsetWidth/2+"px";break;case"end":t.style.left=s[1]-t.offsetWidth+"px"}t.classList.toggle("bcm-list--top","top"==i.split("-")[0])}}}handleKeyDown(t){(t.keyCode||t.which)===p.KeyCode.escape&&this._open&&(this._open=!1,t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.markForCheck())}render(){const t=o("day-numbers"),e=o("datetime-picker","datetime-picker-wrapper",{open:this._open,"no-caption":this.noCaption}),i=o(this.hidden?"hidden":null,{"full-width":this.fullWidth,"linked-component":this.linkedComponent}),n=o("toggle",{disabled:this.disabled}),r="time"==this.type?'<svg style="fill: #595959; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"/></svg>':'<svg style="fill: #595959; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"/></svg>';return s(a,{class:i,"bcm-internal-id":this.inputId},this.label&&s("div",{class:"picker-label",onClick:()=>this.openToggle()},s(b,{size:"medium",type:this.captionType,value:this.label,required:this.required,htmlFor:this._id})),s("bcm-old-input",{ref:t=>this.inputElement=t,placeholder:this.placeholder||"Select "+(this.type===y.datetime?"date and time":"")+(this.type===y.date?"date":"")+(this.type===y.time?"time":"")+(this.type===y.range?"date range":""),value:this.valueText,required:this.required,fullWidth:this.fullWidth,disabled:this.disabled,name:this.name,id:this.inputId,clearable:this.clearable,onClick:()=>this.openPicker(),disableWatchValue:!0,"on-bcm-clear":()=>this.handleInputClear(),"on-bcm-change":t=>this.handleInputChange(t),noCaption:this.noCaption,captionError:this.captionError,caption:this.caption,captionType:this.captionType},this.error&&s("span",{slot:"suffix"},s("span",{id:"error-icon",class:n,innerHTML:'<svg style="fill: #ef4444; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm42-104c0 23.2-18.8 42-42 42s-42-18.8-42-42 18.8-42 42-42 42 18.8 42 42zm-81.4-211.4l6.8 136c.3 6.4 5.6 11.4 12 11.4h41.2c6.4 0 11.7-5.1 12-11.4l6.8-136c.3-6.9-5.1-12.6-12-12.6h-54.8c-6.9 0-12.4 5.7-12 12.6z"/></svg>',title:this.errorText})),s("span",{slot:"suffix",onClick:()=>this.openPicker()},s("span",{id:"calender-icon",class:n,innerHTML:r}))),s("div",{id:"picker-vp-"+this._id,class:e,onWheel:t=>this.handleWheel(t)},s("div",{class:"modules"},this.hasDateModule&&s("div",{class:"date-container"},s("div",{class:"bcm-datetime-picker__header"},s("span",null),s("div",{class:"month-year"},s("button",{onClick:()=>this.getPrevMonth()},s("bcm-icon",{icon:"far fa-chevron-left"})),s("div",{class:"month-year-wrapper"},s("span",{class:"month"},this.getMonthText()),",",s("span",{class:"year"},this.date.getFullYear())),s("button",{onClick:()=>this.getNextMonth()},s("bcm-icon",{icon:"far fa-chevron-right"}))),s("span",{class:"today",onClick:()=>this.setDateToday()},"Today")),s("div",{class:"bcm-datetime-picker__content"},s("div",{class:"years",ref:t=>this.yearsWrapperElement=t},s("div",{class:"items",ref:t=>this.yearsElement=t},this.years.map(((t,e)=>s("span",{onClick:()=>this.yearClick(e)},t)))),s("div",{class:"select-strip",ref:t=>this.yearsStripElement=t})),s("div",{class:"days"},s("div",{class:"day-labels"},s("span",null,"Mo"),s("span",null,"Tu"),s("span",null,"We"),s("span",null,"Th"),s("span",null,"Fr"),s("span",null,"Sa"),s("span",null,"Su")),s("div",{class:t},this.dayNumbers.map((t=>s("span",{class:{"is-disabled-date":(this.type===y.date||this.type===y.datetime)&&this.isDisabledDate(t.date),"not-this-month":!t.thisMonth,"is-weekend":t.isWeekend,today:t.today,selected:this.getSelected(t.date),"selected-start":this.getSelected(t.date)&&this.selectedEndDate&&this.type===y.range,"selected-end":this.getSelected(t.date,!0)&&this.type===y.range,range:this.getDateIsInRange(t.date)&&this.type===y.range},onClick:()=>this.handleDayNumber(t.date)},s("span",{class:"number"},t.day)))))))),this.hasTimeModule&&s("div",{class:"time-container"},s("div",{class:"bcm-datetime-picker__header"},s("div",{class:"month-year"},s("span",{class:"month"},this.getTimeText())),s("span",{class:"now",onClick:()=>{this.setTime(),"time"==this.type&&(this._open=!1)}},"Now")),s("div",{class:"bcm-datetime-picker__content",onDblClick:t=>{this.HourContentDblClick(t)}},s("div",{class:"hours",ref:t=>this.hoursWrapperElement=t},s("div",{class:"items",ref:t=>this.hoursElement=t},this.hours.map(((t,e)=>s("span",{class:this.currentDate.hour===t?"selected":"",onClick:()=>this.hourClick(e)},(t<10&&"0")+t))))),s("div",{class:"minutes",ref:t=>this.minutesWrapperElement=t},s("div",{class:"items",ref:t=>this.minutesElement=t},this.minutes.map(((t,e)=>s("span",{class:this.currentDate.minute===t?"selected":"",onClick:()=>this.minuteClick(e)},(t<10&&"0")+t))))),s("div",{class:"select-strip",ref:t=>this.timeStripElement=t}))))))}get el(){return n(this)}static get watchers(){return{_open:["openChanged","openChange"],renderDate:["renderDateChange"],value:["valueChange"],disabledDates:["disabledDatesChange"]}}};(function(t,e,i,s){var a,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(a=t[h])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)})([g()],w.prototype,"el",void 0),w.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}:host{display:inline-block;position:relative;width:100%;max-width:256px;margin:0;margin-bottom:8px}:host(.full-width){max-width:100%}:host(.hidden){display:none}:host(.linked-component){display:none}.toggle{cursor:pointer}.toggle.disabled{cursor:not-allowed}.modules{display:flex}.picker-label{user-select:none;line-height:1}.datetime-picker{position:absolute;top:-1000px;display:inline-flex;flex-direction:column;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);opacity:0;visibility:hidden;transition:transform 0.2s ease, opacity 0.3s ease;transform:scale(0.8) translateY(-100px);background-color:#ffffff;min-height:356px;max-height:356px;box-sizing:border-box;z-index:-1000}.datetime-picker.alignment-left{left:0}.datetime-picker.alignment-right{right:0}.datetime-picker.open{top:calc(100% - 28px);z-index:10000;opacity:1;visibility:visible;transform:scale(1) translateY(0)}.datetime-picker.open.no-caption{top:100%}.actions{display:flex;align-items:center;justify-content:space-between;padding:8px;margin-top:auto;border-top:1px solid var(--bcm-color-grey-6)}.actions .current-date{font-size:14px;line-height:22px;color:var(--bcm-color-prime-blue-6);text-transform:capitalize}.date-container+.time-container{border-left:1px solid #cecece}.time-container{width:185px}.time-container .bcm-datetime-picker__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;max-height:60px;border-bottom:1px solid var(--bcm-color-grey-4)}.time-container .bcm-datetime-picker__header .now{font-size:14px;line-height:22px;cursor:pointer;color:var(--bcm-color-prime-blue-6);user-select:none}.time-container .bcm-datetime-picker__content{position:relative;display:flex}.time-container .hours,.time-container .minutes,.time-container .time-period{position:relative;flex:1 1 100%;max-width:100%;height:280px;overflow:hidden}.time-container .hours .items>span,.time-container .minutes .items>span,.time-container .time-period .items>span{font-size:14px;color:var(--bcm-color-grey-8)}.time-container .hours .items>span.selected,.time-container .minutes .items>span.selected,.time-container .time-period .items>span.selected{color:var(--bcm-color-prime-blue-6)}.date-container{width:364px;}.date-container .bcm-datetime-picker__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;max-height:60px;border-bottom:1px solid var(--bcm-color-grey-4)}.date-container .bcm-datetime-picker__header .month-year-wrapper{display:flex;align-items:center;justify-content:center;margin:0 4px;min-width:125px}.date-container .bcm-datetime-picker__header .month-year{font-size:16px;line-height:24px}.date-container .bcm-datetime-picker__header .month-year{display:flex;align-items:center}.date-container .bcm-datetime-picker__header .month-year button{display:flex;align-items:center;box-shadow:none;background:transparent;outline:none;appearance:none;border:none;color:var(--bcm-color-prime-blue-6);cursor:pointer}.date-container .bcm-datetime-picker__header .month{text-transform:capitalize}.date-container .bcm-datetime-picker__header .year{padding-left:4px}.date-container .bcm-datetime-picker__header .today{font-size:14px;line-height:22px;cursor:pointer;color:var(--bcm-color-prime-blue-6);user-select:none}.date-container .bcm-datetime-picker__content{display:flex}.date-container .years{position:relative;flex:0 0 70px;max-width:70px;height:280px;overflow:hidden;background-color:var(--bcm-color-grey-2)}.date-container .days{width:100%}.date-container .day-numbers,.date-container .day-labels{display:grid;grid-template-columns:repeat(7, 1fr)}.date-container .day-numbers{padding:24px 24px}.date-container .day-numbers>span,.date-container .day-labels span{text-align:center}.date-container .day-numbers>span{position:relative;padding-bottom:100%;cursor:pointer}.date-container .day-numbers>span.not-this-month{color:var(--bcm-color-grey-4)}.date-container .day-numbers>span.is-weekend{color:var(--bcm-color-prime-blue-3)}.date-container .day-numbers>span.is-disabled-date:not(.today){color:var(--bcm-color-grey-4);cursor:not-allowed}.date-container .day-numbers>span.is-disabled-date:not(.today):before{opacity:0 !important}.date-container .day-numbers>span.today{color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.today:before{opacity:1;background-color:var(--bcm-color-prime-blue-2);border:1px solid var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.selected-start{background:linear-gradient(90deg, white 50%, #8abde2 50%) !important}.date-container .day-numbers>span.selected-end{background:linear-gradient(90deg, #8abde2 50%, white 50%) !important}.date-container .day-numbers>span.range{background:#8abde2}.date-container .day-numbers>span.range:not(.today){color:#ffffff}.date-container .day-numbers>span.range:not(.today):before{background-color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.range.is-weekend:not(.today){color:var(--bcm-color-prime-blue-2)}.date-container .day-numbers>span.selected,.date-container .day-numbers>span.selected-end{color:#ffffff}.date-container .day-numbers>span.selected:before,.date-container .day-numbers>span.selected-end:before{opacity:1;background-color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers.start-1>span:first-child{grid-column:1}.date-container .day-numbers.start-2>span:first-child{grid-column:2}.date-container .day-numbers.start-3>span:first-child{grid-column:3}.date-container .day-numbers.start-4>span:first-child{grid-column:4}.date-container .day-numbers.start-5>span:first-child{grid-column:5}.date-container .day-numbers.start-6>span:first-child{grid-column:6}.date-container .day-numbers.start-7>span:first-child{grid-column:7}.date-container .day-numbers>span:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;background-color:var(--bcm-color-grey-4);opacity:0;box-sizing:border-box}.date-container .day-numbers>span:hover.not-this-month:not(.is-weekend){color:var(--bcm-color-grey-6)}.date-container .day-numbers>span:hover:before{opacity:1}.date-container .day-numbers .number{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.date-container .day-labels{padding:24px 40px 0 40px}.date-container .day-labels span{font-size:12px;color:var(--bcm-color-grey-6)}.date-container .day-labels span:nth-child(7n+6),.date-container .day-labels span:nth-child(7n+7){color:var(--bcm-color-prime-blue-3)}.years .items,.hours .items,.minutes .items,.time-period .items{position:relative;display:flex;flex-direction:column;z-index:0;transform:translateY(0);scroll-behavior:smooth}.years .items>span,.hours .items>span,.minutes .items>span,.time-period .items>span{text-align:center;font-size:12px;min-height:26px;max-height:26px;line-height:26px;color:var(--bcm-color-grey-8);user-select:none}.years:before,.years:after,.hours:before,.hours:after,.minutes:before,.minutes:after,.time-period:before,.time-period:after{content:"";position:absolute;left:0;width:100%;height:40px}.years:before,.hours:before,.minutes:before,.time-period:before{top:-40px;box-shadow:0 10px 100px 70px #ffffff;z-index:1}.years:after,.hours:after,.minutes:after,.time-period:after{bottom:-40px;box-shadow:0 -10px 100px 70px #ffffff;z-index:2}.select-strip{position:absolute;width:100%;top:50%;left:0;transform:translateY(-50%);min-height:26px;max-height:26px;border:1px solid var(--bcm-color-grey-5);border-left:0;border-right:0;pointer-events:none;box-sizing:border-box}';export{w as bcm_datetime_picker}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,c as i,h as e,d as s,H as o,g as r}from"./p-da1055cb.js";import{E as n,D as a}from"./p-7e44e6b5.js";import{c as h}from"./p-d65a1e21.js";import"./p-8c018ae0.js";import"./p-6f56f8ca.js";const p=class{constructor(e){t(this,e),this.change=i(this,"bcm-change",7),this.initialized=!1,this.setColorBeforeInitialized=!1,this._color="#4293CF",this.open=!1,this.value=null,this.label=void 0,this.size="medium",this.noCaption=!1,this.caption=void 0,this.captionError=void 0,this.captionType="default",this.fullWidth=!1,this.disabled=!1,this.hidden=!1,this.required=!1,this.tooltip=void 0,this.h=-1,this.s=1,this.v=1,this.a=1,this.selectedH=-1,this.selectedS=1,this.selectedV=1,this.selectedA=1,this.color={rgba:"",hex:""},this.inputValue="",this.mouseState="up"}componentWillLoad(){const t=this.hextohsv(this._color);this.s=t.s,this.v=t.v,this.h=t.h}componentDidRender(){this.initialized||Promise.all([this.initColorDragger(),this.initColorsDragger(),this.initTransparencyDragger()]).then((()=>{!this.setColorBeforeInitialized&&this._setColor(this._color),this.updateValue(),this.initialized=!0}))}initColorDragger(){if(!this.colorDragger)return this.colorDragger=new n({target:this.colorIndicatorElement,trigger:this.colorElement,direction:a.both,limit:{x:{min:0,max:this.colorElement.offsetWidth},y:{min:0,max:this.colorElement.offsetHeight}},snapOnMouseDown:!0,center:{x:this.colorIndicatorElement.offsetWidth/2,y:this.colorIndicatorElement.offsetHeight/2}}),this.colorDragger.on("drag",(t=>this.colorDrag(t))),Promise.resolve()}initColorsDragger(){if(!this.colorsDragger)return this.colorsDragger=new n({target:this.colorsIndicatorElement,trigger:this.colorsElement,direction:a.x,limit:{x:{min:0,max:this.colorsElement.offsetWidth}},snapOnMouseDown:!0,center:{x:this.colorsIndicatorElement.offsetWidth/2}}),this.colorsDragger.on("drag",(t=>this.colorsDrag(t))),Promise.resolve()}initTransparencyDragger(){}hsvtorgb(t){let i,e,s,o,r,n=t.h%360/60;r=t.v*t.s,o=r*(1-Math.abs(n%2-1)),i=e=s=t.v-r,n=~~n,i+=[r,o,0,0,o,r][n],e+=[o,r,r,o,0,0][n],s+=[0,0,o,r,r,o][n];const a={r:Math.round(255*i),g:Math.round(255*e),b:Math.round(255*s)};return Object.assign(Object.assign({},a),{hex:"#"+(16777216|a.b|a.g<<8|a.r<<16).toString(16).slice(1)})}rgbtohsv(t){let i,e,s,o,r=t.r,n=t.g,a=t.b;return(t.r>1||t.g>1||t.b>1)&&(r/=255,n/=255,a/=255),s=Math.max(r,n,a),o=s-Math.min(r,n,a),i=0==o?null:s==r?(n-a)/o+(n<a?6:0):s==n?(a-r)/o+2:(r-n)/o+4,i=i%6*60,e=0==o?0:o/s,{h:i,s:e,v:s}}hextohsv(t){return this.rgbtohsv(this.hextorgb(t))}hextorgb(t){return{r:parseInt(t.substr(1,2),16),g:parseInt(t.substr(3,2),16),b:parseInt(t.substr(5,2),16)}}colorDrag(t){const i=this.colorElement.offsetHeight;this.selectedS=t.x/this.colorElement.offsetWidth,this.selectedV=(i-t.y)/i,this.updateValue()}colorsDrag(t){this.h=t.x/this.colorsElement.offsetWidth*360,this.s=1,this.v=1,this.selectedH=this.h,this.updateValue()}setHsvColor(){const t=this.hsvtorgb({h:this.selectedH,s:this.selectedS,v:this.selectedV});return this.color={rgba:`rgba(${t.r}, ${t.g}, ${t.b}, ${this.a})`,hex:t.hex},this.color}_setColor(t,i=!1){if(/^#+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t)){4===t.length&&(t=t.split("").map((t=>"#"!==t?t+t:t)).join(""));const e=this.hextohsv(t);this.h=e.h,this.s=1,this.v=1,this.selectedH=e.h,this.selectedS=e.s,this.selectedV=e.v,this.updateIndicators(),this.updateValue(i)}}updateIndicators(){const{colorsElement:t,colorElement:i,colorsIndicatorElement:e}=this;this.colorDragger.setPosition({x:this.selectedS*i.offsetWidth,y:i.offsetHeight-this.selectedV*i.offsetHeight}),this.colorsDragger.setPosition({x:this.selectedH*(t.offsetWidth-2*e.offsetWidth)/360})}updateValue(t=!1){const{selectedH:i,selectedS:e,selectedV:s}=this,o=this.hsvtorgb({h:i,s:e,v:s}).hex;this.value=o,t||this.updateInputValue(o)}updateInputValue(t){this.inputElement&&(this.inputElement.value=t)}handleClick(){this.open=!0}handleColorInputKeyUp(t){var i=t.path||t.composedPath&&t.composedPath();this._setColor(i[0].value,!0)}handleWindowClick(t){const i=t.target,e=i.classList,s=i.tagName.toLowerCase();!e.contains("sc-bcm-colorpicker")&&"bcm-colorpicker"!==s&&"up"===this.mouseState&&(this.open=!1,this.updateInputValue(this.value)),this.mouseState="up"}valueChange(){this.initialized&&this.change.emit(this.value)}async getValue(){return this.value}async setColor(t){this.setColorBeforeInitialized=!0,this._setColor(t)}render(){const{label:t,required:i,noCaption:r,caption:n,captionError:a,captionType:p}=this,l=h("color-picker",{open:this.open}),c=h("size-1","input-caption","caption-"+p);return e(o,null,e("div",{class:l,onClick:()=>this.handleClick()},t&&e("div",null,e("bcm-label",{tooltip:this.tooltip,type:p,value:t,required:i})),e("div",{class:"input"},e("div",{class:"active-color"},e("div",{class:"color-thumb",style:{backgroundColor:this.value}})),e("span",{class:"icon",slot:"suffix"},e("svg",{style:{fill:"#595959",width:" 14px",height:"14px"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},e("path",{d:"M483.89 28.14l-.02-.02-.03-.03c-37.47-37.47-98.26-37.46-135.72.03l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-63.6 63.6c-9.37 9.37-9.37 24.57 0 33.94l16.98 16.98L50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62 16.96 16.96c9.44 9.44 24.65 9.31 33.94 0l63.6-63.6c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.5-37.47 37.5-98.25.02-135.73zM144.8 427.32a15.892 15.892 0 0 1-11.31 4.68H80v-53.49c0-4.27 1.66-8.29 4.69-11.31l126.63-126.62 60.12 60.12L144.8 427.32zm305.14-297.38l-77.09 77.09-33.94 33.94 30.07 30.06-29.66 29.66-128-128 29.66-29.65 30.06 30.07L382.08 62.05c9.05-9.06 21.1-14.05 33.91-14.05 12.82 0 24.86 4.98 33.91 14.04l.04.04C459.01 71.14 464 83.19 464 96.01c0 12.81-5 24.86-14.06 33.93z"})))),!r&&e("div",{class:"caption-area"},"error"==p?e("span",{class:c}," ",a," "):n&&e("span",{class:c}," ",n," ")),e("div",{class:"picker"},e("div",{class:"input"},e("input",{type:"text",class:"color-input",maxlength:"7",ref:t=>this.inputElement=t,onKeyUp:t=>this.handleColorInputKeyUp(t)})),e("div",{class:"color",onMouseDown:()=>this.mouseState="down",style:{backgroundColor:this.hsvtorgb({h:this.h,s:this.s,v:this.v}).hex},ref:t=>this.colorElement=t},e("img",{src:s("./static/color.svg")}),e("div",{class:"color-indicator",ref:t=>this.colorIndicatorElement=t})),e("div",{class:"colors-transparency"},e("div",{class:"colors",onMouseDown:()=>this.mouseState="down",ref:t=>this.colorsElement=t},e("div",{class:"colors-holder"},e("img",{src:s("./static/colors.svg")})),e("div",{class:"colors-indicator",ref:t=>this.colorsIndicatorElement=t}))))))}static get assetsDirs(){return["static"]}get el(){return r(this)}static get watchers(){return{value:["valueChange"]}}};p.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{position:relative;margin:0 0 8px 0}.color-picker{position:relative;width:200px}.color-picker.open .picker{opacity:1;visibility:visible;transform:scale(1) translateY(56px)}.picker{width:300px;position:absolute;top:0;z-index:1;background-color:#ffffff;border:1px solid #F6F6F6;box-shadow:0px 3px 3.6px 0.4px rgba(0, 0, 0, 0.15);opacity:0;visibility:hidden;transition:transform 0.2s ease, opacity 0.3s ease;transform:scale(0.8) translateY(-100px)}.label{display:flex;flex-direction:column;color:var(--bcm-color-grey-9);margin-bottom:4px}.caption-area{min-height:20px}.input-caption{display:block}.input{display:flex;cursor:pointer;border:1px solid var(--bcm-color-grey-5);border-radius:2px}.color{position:relative;width:100%;height:166px;user-select:none}.color img{width:100%;height:100%;user-select:none;pointer-events:none}.color-indicator{position:absolute;top:0;left:0;width:17px;height:17px;border:1px solid rgba(255, 255, 255, 0.82);box-shadow:0px 1px 2px rgba(0, 0, 0, 0.25);transform:translate(0, 0);border-radius:100px;user-select:none;box-sizing:border-box;pointer-events:none}.colors{position:relative;width:100%;height:16px;margin-top:8px}.colors img{width:100%;user-select:none;pointer-events:none}.colors-holder{position:absolute;top:50%;left:0;width:100%;height:8px;overflow:hidden;transform:translateY(-50%);border-radius:8px;user-select:none}.colors-indicator{position:absolute;top:50%;left:0;width:17px;height:17px;border:2px solid rgba(255, 255, 255, 0.82);box-shadow:0px 1px 4px rgba(0, 0, 0, 0.25);transform:translateY(-50%);border-radius:100px;user-select:none;box-sizing:border-box;pointer-events:none}.transparency{position:relative;width:100%;height:16px;margin-top:8px}.transparency-holder{position:absolute;top:50%;left:0;width:100%;height:8px;overflow:hidden;transform:translateY(-50%);border-radius:8px;background:transparent none repeat center center/20px}.transparency-indicator{position:absolute;top:50%;left:0;width:17px;height:17px;border:2px solid rgba(255, 255, 255, 0.82);box-shadow:0px 1px 4px rgba(0, 0, 0, 0.25);transform:translateY(-50%);border-radius:100px;user-select:none;box-sizing:border-box}.colors-transparency{padding:16px}.active-color{display:flex;align-items:center;width:100%;height:30px}.active-color .color-thumb{width:100%;height:100%;background-color:transparent;border-radius:1px 0 0 1px}.active-color .color-text{font-size:14px;color:#656565;margin-left:8px}.icon{display:flex;align-items:center;justify-content:center;cursor:pointer;width:30px;color:var(--bcm-color-grey-6)}.color-input{border:none;width:100%;padding:10px;outline:none;-webkit-tap-highlight-color:transparent}';export{p as bcm_colorpicker}
5
+ import{r as t,c as i,h as e,a as s,H as o,g as r}from"./p-6d7fe687.js";import{E as n,D as a}from"./p-7e44e6b5.js";import{c as h}from"./p-d65a1e21.js";import"./p-8c018ae0.js";import"./p-6f56f8ca.js";const p=class{constructor(e){t(this,e),this.change=i(this,"bcm-change",7),this.initialized=!1,this.setColorBeforeInitialized=!1,this._color="#4293CF",this.open=!1,this.value=null,this.label=void 0,this.size="medium",this.noCaption=!1,this.caption=void 0,this.captionError=void 0,this.captionType="default",this.fullWidth=!1,this.disabled=!1,this.hidden=!1,this.required=!1,this.tooltip=void 0,this.h=-1,this.s=1,this.v=1,this.a=1,this.selectedH=-1,this.selectedS=1,this.selectedV=1,this.selectedA=1,this.color={rgba:"",hex:""},this.inputValue="",this.mouseState="up"}componentWillLoad(){const t=this.hextohsv(this._color);this.s=t.s,this.v=t.v,this.h=t.h}componentDidRender(){this.initialized||Promise.all([this.initColorDragger(),this.initColorsDragger(),this.initTransparencyDragger()]).then((()=>{!this.setColorBeforeInitialized&&this._setColor(this._color),this.updateValue(),this.initialized=!0}))}initColorDragger(){if(!this.colorDragger)return this.colorDragger=new n({target:this.colorIndicatorElement,trigger:this.colorElement,direction:a.both,limit:{x:{min:0,max:this.colorElement.offsetWidth},y:{min:0,max:this.colorElement.offsetHeight}},snapOnMouseDown:!0,center:{x:this.colorIndicatorElement.offsetWidth/2,y:this.colorIndicatorElement.offsetHeight/2}}),this.colorDragger.on("drag",(t=>this.colorDrag(t))),Promise.resolve()}initColorsDragger(){if(!this.colorsDragger)return this.colorsDragger=new n({target:this.colorsIndicatorElement,trigger:this.colorsElement,direction:a.x,limit:{x:{min:0,max:this.colorsElement.offsetWidth}},snapOnMouseDown:!0,center:{x:this.colorsIndicatorElement.offsetWidth/2}}),this.colorsDragger.on("drag",(t=>this.colorsDrag(t))),Promise.resolve()}initTransparencyDragger(){}hsvtorgb(t){let i,e,s,o,r,n=t.h%360/60;r=t.v*t.s,o=r*(1-Math.abs(n%2-1)),i=e=s=t.v-r,n=~~n,i+=[r,o,0,0,o,r][n],e+=[o,r,r,o,0,0][n],s+=[0,0,o,r,r,o][n];const a={r:Math.round(255*i),g:Math.round(255*e),b:Math.round(255*s)};return Object.assign(Object.assign({},a),{hex:"#"+(16777216|a.b|a.g<<8|a.r<<16).toString(16).slice(1)})}rgbtohsv(t){let i,e,s,o,r=t.r,n=t.g,a=t.b;return(t.r>1||t.g>1||t.b>1)&&(r/=255,n/=255,a/=255),s=Math.max(r,n,a),o=s-Math.min(r,n,a),i=0==o?null:s==r?(n-a)/o+(n<a?6:0):s==n?(a-r)/o+2:(r-n)/o+4,i=i%6*60,e=0==o?0:o/s,{h:i,s:e,v:s}}hextohsv(t){return this.rgbtohsv(this.hextorgb(t))}hextorgb(t){return{r:parseInt(t.substr(1,2),16),g:parseInt(t.substr(3,2),16),b:parseInt(t.substr(5,2),16)}}colorDrag(t){const i=this.colorElement.offsetHeight;this.selectedS=t.x/this.colorElement.offsetWidth,this.selectedV=(i-t.y)/i,this.updateValue()}colorsDrag(t){this.h=t.x/this.colorsElement.offsetWidth*360,this.s=1,this.v=1,this.selectedH=this.h,this.updateValue()}setHsvColor(){const t=this.hsvtorgb({h:this.selectedH,s:this.selectedS,v:this.selectedV});return this.color={rgba:`rgba(${t.r}, ${t.g}, ${t.b}, ${this.a})`,hex:t.hex},this.color}_setColor(t,i=!1){if(/^#+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t)){4===t.length&&(t=t.split("").map((t=>"#"!==t?t+t:t)).join(""));const e=this.hextohsv(t);this.h=e.h,this.s=1,this.v=1,this.selectedH=e.h,this.selectedS=e.s,this.selectedV=e.v,this.updateIndicators(),this.updateValue(i)}}updateIndicators(){const{colorsElement:t,colorElement:i,colorsIndicatorElement:e}=this;this.colorDragger.setPosition({x:this.selectedS*i.offsetWidth,y:i.offsetHeight-this.selectedV*i.offsetHeight}),this.colorsDragger.setPosition({x:this.selectedH*(t.offsetWidth-2*e.offsetWidth)/360})}updateValue(t=!1){const{selectedH:i,selectedS:e,selectedV:s}=this,o=this.hsvtorgb({h:i,s:e,v:s}).hex;this.value=o,t||this.updateInputValue(o)}updateInputValue(t){this.inputElement&&(this.inputElement.value=t)}handleClick(){this.open=!0}handleColorInputKeyUp(t){var i=t.path||t.composedPath&&t.composedPath();this._setColor(i[0].value,!0)}handleWindowClick(t){const i=t.target,e=i.classList,s=i.tagName.toLowerCase();!e.contains("sc-bcm-colorpicker")&&"bcm-colorpicker"!==s&&"up"===this.mouseState&&(this.open=!1,this.updateInputValue(this.value)),this.mouseState="up"}valueChange(){this.initialized&&this.change.emit(this.value)}async getValue(){return this.value}async setColor(t){this.setColorBeforeInitialized=!0,this._setColor(t)}render(){const{label:t,required:i,noCaption:r,caption:n,captionError:a,captionType:p}=this,l=h("color-picker",{open:this.open}),c=h("size-1","input-caption","caption-"+p);return e(o,null,e("div",{class:l,onClick:()=>this.handleClick()},t&&e("div",null,e("bcm-label",{tooltip:this.tooltip,type:p,value:t,required:i})),e("div",{class:"input"},e("div",{class:"active-color"},e("div",{class:"color-thumb",style:{backgroundColor:this.value}})),e("span",{class:"icon",slot:"suffix"},e("svg",{style:{fill:"#595959",width:" 14px",height:"14px"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},e("path",{d:"M483.89 28.14l-.02-.02-.03-.03c-37.47-37.47-98.26-37.46-135.72.03l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-63.6 63.6c-9.37 9.37-9.37 24.57 0 33.94l16.98 16.98L50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62 16.96 16.96c9.44 9.44 24.65 9.31 33.94 0l63.6-63.6c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.5-37.47 37.5-98.25.02-135.73zM144.8 427.32a15.892 15.892 0 0 1-11.31 4.68H80v-53.49c0-4.27 1.66-8.29 4.69-11.31l126.63-126.62 60.12 60.12L144.8 427.32zm305.14-297.38l-77.09 77.09-33.94 33.94 30.07 30.06-29.66 29.66-128-128 29.66-29.65 30.06 30.07L382.08 62.05c9.05-9.06 21.1-14.05 33.91-14.05 12.82 0 24.86 4.98 33.91 14.04l.04.04C459.01 71.14 464 83.19 464 96.01c0 12.81-5 24.86-14.06 33.93z"})))),!r&&e("div",{class:"caption-area"},"error"==p?e("span",{class:c}," ",a," "):n&&e("span",{class:c}," ",n," ")),e("div",{class:"picker"},e("div",{class:"input"},e("input",{type:"text",class:"color-input",maxlength:"7",ref:t=>this.inputElement=t,onKeyUp:t=>this.handleColorInputKeyUp(t)})),e("div",{class:"color",onMouseDown:()=>this.mouseState="down",style:{backgroundColor:this.hsvtorgb({h:this.h,s:this.s,v:this.v}).hex},ref:t=>this.colorElement=t},e("img",{src:s("./static/color.svg")}),e("div",{class:"color-indicator",ref:t=>this.colorIndicatorElement=t})),e("div",{class:"colors-transparency"},e("div",{class:"colors",onMouseDown:()=>this.mouseState="down",ref:t=>this.colorsElement=t},e("div",{class:"colors-holder"},e("img",{src:s("./static/colors.svg")})),e("div",{class:"colors-indicator",ref:t=>this.colorsIndicatorElement=t}))))))}static get assetsDirs(){return["static"]}get el(){return r(this)}static get watchers(){return{value:["valueChange"]}}};p.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{position:relative;margin:0 0 8px 0}.color-picker{position:relative;width:200px}.color-picker.open .picker{opacity:1;visibility:visible;transform:scale(1) translateY(56px)}.picker{width:300px;position:absolute;top:0;z-index:1;background-color:#ffffff;border:1px solid #F6F6F6;box-shadow:0px 3px 3.6px 0.4px rgba(0, 0, 0, 0.15);opacity:0;visibility:hidden;transition:transform 0.2s ease, opacity 0.3s ease;transform:scale(0.8) translateY(-100px)}.label{display:flex;flex-direction:column;color:var(--bcm-color-grey-9);margin-bottom:4px}.caption-area{min-height:20px}.input-caption{display:block}.input{display:flex;cursor:pointer;border:1px solid var(--bcm-color-grey-5);border-radius:2px}.color{position:relative;width:100%;height:166px;user-select:none}.color img{width:100%;height:100%;user-select:none;pointer-events:none}.color-indicator{position:absolute;top:0;left:0;width:17px;height:17px;border:1px solid rgba(255, 255, 255, 0.82);box-shadow:0px 1px 2px rgba(0, 0, 0, 0.25);transform:translate(0, 0);border-radius:100px;user-select:none;box-sizing:border-box;pointer-events:none}.colors{position:relative;width:100%;height:16px;margin-top:8px}.colors img{width:100%;user-select:none;pointer-events:none}.colors-holder{position:absolute;top:50%;left:0;width:100%;height:8px;overflow:hidden;transform:translateY(-50%);border-radius:8px;user-select:none}.colors-indicator{position:absolute;top:50%;left:0;width:17px;height:17px;border:2px solid rgba(255, 255, 255, 0.82);box-shadow:0px 1px 4px rgba(0, 0, 0, 0.25);transform:translateY(-50%);border-radius:100px;user-select:none;box-sizing:border-box;pointer-events:none}.transparency{position:relative;width:100%;height:16px;margin-top:8px}.transparency-holder{position:absolute;top:50%;left:0;width:100%;height:8px;overflow:hidden;transform:translateY(-50%);border-radius:8px;background:transparent none repeat center center/20px}.transparency-indicator{position:absolute;top:50%;left:0;width:17px;height:17px;border:2px solid rgba(255, 255, 255, 0.82);box-shadow:0px 1px 4px rgba(0, 0, 0, 0.25);transform:translateY(-50%);border-radius:100px;user-select:none;box-sizing:border-box}.colors-transparency{padding:16px}.active-color{display:flex;align-items:center;width:100%;height:30px}.active-color .color-thumb{width:100%;height:100%;background-color:transparent;border-radius:1px 0 0 1px}.active-color .color-text{font-size:14px;color:#656565;margin-left:8px}.icon{display:flex;align-items:center;justify-content:center;cursor:pointer;width:30px;color:var(--bcm-color-grey-6)}.color-input{border:none;width:100%;padding:10px;outline:none;-webkit-tap-highlight-color:transparent}';export{p as bcm_colorpicker}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as i,c as t,h as e,H as s,g as n}from"./p-da1055cb.js";import{c as a}from"./p-d65a1e21.js";import{C as r}from"./p-c8e13fd7.js";import{d as o}from"./p-8c018ae0.js";import"./p-6f56f8ca.js";let l=0;const c={email:'<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z"/></svg>',tel:'<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M476.5 22.9L382.3 1.2c-21.6-5-43.6 6.2-52.3 26.6l-43.5 101.5c-8 18.6-2.6 40.6 13.1 53.4l40 32.7C311 267.8 267.8 311 215.4 339.5l-32.7-40c-12.8-15.7-34.8-21.1-53.4-13.1L27.7 329.9c-20.4 8.7-31.5 30.7-26.6 52.3l21.7 94.2c4.8 20.9 23.2 35.5 44.6 35.5C312.3 512 512 313.7 512 67.5c0-21.4-14.6-39.8-35.5-44.6zM69.3 464l-20.9-90.7 98.2-42.1 55.7 68.1c98.8-46.4 150.6-98 197-197l-68.1-55.7 42.1-98.2L464 69.3C463 286.9 286.9 463 69.3 464z"/></svg>',search:'<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M508.5 468.9L387.1 347.5c-2.3-2.3-5.3-3.5-8.5-3.5h-13.2c31.5-36.5 50.6-84 50.6-136C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c52 0 99.5-19.1 136-50.6v13.2c0 3.2 1.3 6.2 3.5 8.5l121.4 121.4c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17zM208 368c-88.4 0-160-71.6-160-160S119.6 48 208 48s160 71.6 160 160-71.6 160-160 160z"/></svg>',url:'<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M314.222 197.78c51.091 51.091 54.377 132.287 9.75 187.16-6.242 7.73-2.784 3.865-84.94 86.02-54.696 54.696-143.266 54.745-197.99 0-54.711-54.69-54.734-143.255 0-197.99 32.773-32.773 51.835-51.899 63.409-63.457 7.463-7.452 20.331-2.354 20.486 8.192a173.31 173.31 0 0 0 4.746 37.828c.966 4.029-.272 8.269-3.202 11.198L80.632 312.57c-32.755 32.775-32.887 85.892 0 118.8 32.775 32.755 85.892 32.887 118.8 0l75.19-75.2c32.718-32.725 32.777-86.013 0-118.79a83.722 83.722 0 0 0-22.814-16.229c-4.623-2.233-7.182-7.25-6.561-12.346 1.356-11.122 6.296-21.885 14.815-30.405l4.375-4.375c3.625-3.626 9.177-4.594 13.76-2.294 12.999 6.524 25.187 15.211 36.025 26.049zM470.958 41.04c-54.724-54.745-143.294-54.696-197.99 0-82.156 82.156-78.698 78.29-84.94 86.02-44.627 54.873-41.341 136.069 9.75 187.16 10.838 10.838 23.026 19.525 36.025 26.049 4.582 2.3 10.134 1.331 13.76-2.294l4.375-4.375c8.52-8.519 13.459-19.283 14.815-30.405.621-5.096-1.938-10.113-6.561-12.346a83.706 83.706 0 0 1-22.814-16.229c-32.777-32.777-32.718-86.065 0-118.79l75.19-75.2c32.908-32.887 86.025-32.755 118.8 0 32.887 32.908 32.755 86.025 0 118.8l-45.848 45.84c-2.93 2.929-4.168 7.169-3.202 11.198a173.31 173.31 0 0 1 4.746 37.828c.155 10.546 13.023 15.644 20.486 8.192 11.574-11.558 30.636-30.684 63.409-63.457 54.733-54.735 54.71-143.3-.001-197.991z"/></svg>'},h=class{constructor(e){i(this,e),this.focus=t(this,"bcm-focus",7),this.blur=t(this,"bcm-blur",7),this.clear=t(this,"bcm-clear",7),this.change=t(this,"bcm-change",7),this.input=t(this,"bcm-input",7),this.inputId="input-"+ ++l,this.isBlur=!1,this.type="text",this.value="",this.size="medium",this.label=void 0,this.noCaption=!1,this.noMargin=!1,this.captionError=void 0,this.caption=void 0,this.captionType="default",this.placeholder=void 0,this.fullWidth=!1,this.disabled=!1,this.readonly=!1,this.clearable=!1,this.passwordToggle=void 0,this.noDefaultIcon=void 0,this._id=void 0,this._internal_id=(4*Math.random()).toString(16).replace(".",""),this.name=void 0,this.unit=null,this.unitPrefix=null,this.decimal=void 0,this.min=null,this.max=null,this.step=null,this.hidden=!1,this.required=!1,this.disableWatchValue=!1,this.maxLength=null,this.tooltip=void 0,this.inValid=!1,this.valueCache=void 0,this.captionCache=void 0,this.captionTypeCache=void 0,this.hasFocus=!1,this.isPasswordVisible=!1}async setFocus(){this.inputElement.focus()}async removeFocus(){this.inputElement.blur()}async select(){return this.inputElement.select()}async setValue(i){return this.inputElement.value=i,this.value=i,this.handleChange(),i}async setClear(){return this.inputElement.value="",this.value="",await o(10),Promise.resolve()}async resetCaption(){return await o(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await o(10),Promise.resolve()}async getValue(){return this.value}handleFocus(){this.hasFocus=!0,this.focus.emit()}handleBlur(){this.hasFocus=!1,this.isBlur=!0,"email"==this.type&&this.isEmailValid(),"tel"==this.type&&this.isTelValid(),this.blur.emit()}handleChange(){this.value=this.inputElement.value,this.change.emit(this.value)}handleInput(){"number"==this.type&&(this.inputElement.value=this.inputElement.value.replace("false"==this.decimal?/[^0-9-]/g:/[^0-9.,-]/g,""),this.inputElement.value=this.inputElement.value.replace(/(\..*)\./g,"$1").replace(/(\-.*)\-/g,"$1")),this.value=this.inputElement.value,this.input.emit(this.value)}handleClear(i){this.inputElement.value="",this.value="",this.inputElement.focus(),this.change.emit(this.value),this.clear.emit(i),i.stopPropagation()}changePasswordVisibility(){this.isPasswordVisible=!this.isPasswordVisible}incrementNumber(){if(!this.inValid&&!this.disabled&&!this.readonly){let i=this.getNumberStep(),t=Number(this.value)+Number(i);this.value=this.numberDecimal(t)}}decrementNumber(){if(!this.inValid&&!this.disabled&&!this.readonly){let i=this.getNumberStep(),t=Number(this.value)-Number(i);this.value=this.numberDecimal(t)}}getNumberStep(i=Number(this.step)){let t=1;return i&&Number(i)==i&&(t=i),Number(t)}connectedCallback(){this.changePasswordVisibility=this.changePasswordVisibility.bind(this),this.handleChange=this.handleChange.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleInput=this.handleInput.bind(this),this.handleClear=this.handleClear.bind(this),this.incrementNumber=this.incrementNumber.bind(this),this.decrementNumber=this.decrementNumber.bind(this),this.valueCache=this.value,this.captionCache=this.caption,this.captionTypeCache=this.captionType}validationRange(i=JSON.stringify({value:this.value,min:this.min,max:this.max})){let t=null,e=null,s=!0,n=JSON.parse(i),{length:a,value:r,min:o,max:l}=n;return a=parseFloat(a),r=parseFloat(r),o=parseFloat(o),l=parseFloat(l),0!==a&&r&&(o&&l&&(r<o||r>l)&&(t="Please enter a value between "+o+" and "+l+".",e="error",s=!1)||o&&!l&&r<o&&(t="Please enter a value greater than or equal to "+o+".",e="error",s=!1)||!o&&l&&r>l&&(t="Please enter a value less than or equal to "+l+".",e="error",s=!1)),this.setCaption(t,e),s}setCaption(i=null,t=null){this.caption=i||this.captionCache,this.captionType=t||this.captionTypeCache,this.captionError="error"==t?i:null}isEmailValid(){const{value:i}=this,t=new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);let e=null,s=null;return i&&!t.test(i)?(e="Please enter a valid email address.",s="error",this.inValid=!0):this.inValid=!1,this.setCaption(e,s),this.inValid}isTelValid(){const{value:i}=this,t=new RegExp(/^(?=.*[0-9])[- +()0-9]+$/);let e=null,s=null;return i&&!t.test(i)?(e="Please enter a valid phone number.",s="error",this.inValid=!0):this.inValid=!1,this.setCaption(e,s),this.inValid}isNumberValid(i="Invalid number",t="error"){const{value:e}=this;return e&&Number(e)!=e?(this.inValid=!0,this.setCaption(i,t),!0):(this.inValid=!1,!1)}setNumberUnit(){const{value:i,unit:t}=this;Number(i)==i&&(null==t?void 0:t.length)>0&&!i&&(this.value=0)}numberDecimal(i=""){let t=this.getDecimalLength();return i&&t?parseFloat(i).toFixed(t):i}numberNotDecimal(i=0){return Math.trunc(i)}getDecimalLength(){const{step:i}=this;let t,e,s=0;return i&&Number(i)==i&&(String(i).includes(".")?(t=String(i).split("."),e=t[t.length-1].length):e=0,s=e),Number(s)}componentWillRender(){const{type:i}=this;"number"==i&&this.value&&(this.isNumberValid()||this.validationRange()),this.isBlur&&("email"==i&&this.value&&this.isEmailValid(),"tel"==i&&this.value&&this.isTelValid())}componentWillLoad(){const{type:i,value:t}=this;"number"==i&&Number(t)==t&&(this.value=this.numberDecimal(t))}numberControl(i){if(!this.disabled&&!this.readonly&&"number"==this.type){var t=i.which||0,e=i.key;if(38==t&&(i.preventDefault(),this.incrementNumber()),40==t&&(i.preventDefault(),this.decrementNumber()),"."==e&&String(this.value).includes(".")&&i.preventDefault(),8==t||9==t||13==t||16==t||17==t||18==t||46==t||110==t&&"number"==this.type&&0!=this.decimal||190==t&&"."==e&&"number"==this.type&&0!=this.decimal||189==t&&0==this.inputElement.value.length||109==t&&0==this.inputElement.value.length||t>=35&&t<=40||t>=48&&t<=57||t>=96&&t<=105)return!0;i.preventDefault(),1==this.decimal?this.value=this.numberDecimal(this.value):0==this.decimal&&(this.value=this.numberNotDecimal(this.value))}}whatchHasFocus(){const{type:i,hasFocus:t,value:e,valueCache:s,inValid:n}=this;if("number"==i){this.isNumberValid();let i=!1;1==t?1==n&&(this.value="",i=!0):(""==this.value&&0==n&&(this.value=s,i=!0),e!=s&&0==n&&0==i&&(this.value=e?this.numberDecimal(e):""))}}watchValue(){this.disableWatchValue||"number"==this.type||this.handleChange()}render(){const{value:i,size:t,label:n,type:o,captionType:l,caption:h,captionError:p,placeholder:u,fullWidth:m,disabled:d,readonly:b,clearable:g,passwordToggle:x,isPasswordVisible:f,noDefaultIcon:w,unit:v,inValid:z,hasFocus:y,unitPrefix:k,noCaption:_,required:C}=this,N=a("input-container",{"full-width":m,error:"error"==l}),F=a("input-base","input-"+t,{invalid:z,unit:(null==v?void 0:v.length)>0,focused:y,disabled:d,readonly:b,empty:(null==i?void 0:i.length)<1}),V="large"===t?"size-3":"size-2",L=a(this.hidden?"hidden":null,this.noMargin?"no-margin":null);return e(s,{class:L},e("div",{class:N},n&&e("div",null,e("bcm-label",{tooltip:this.tooltip,type:l,value:n,required:C,htmlFor:this.inputId})),e("div",{class:F},e("span",{class:"input-prefix"},e("slot",{name:"prefix"}),k&&e("span",{class:a(V,"unit-prefix")},k)),e("input",{"bcm-internal-id":this._id,id:this.inputId,class:V,ref:i=>this.inputElement=i,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onInput:this.handleInput,maxLength:this.maxLength,type:"password"===o&&f||"number"===o?"text":o,placeholder:u,value:"number"!==o||this.hasFocus?i:i+(i&&(null==v?void 0:v.length)>0?" "+v:""),disabled:this.disabled,readonly:this.readonly}),g&&!this.disabled&&e("button",{class:"input-clear-button",onClick:this.handleClear},e("svg",{style:{fill:"#595959",width:"14px",height:"14px"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},e("path",{d:"M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z"}))),"password"===o&&x&&e("button",{class:"input-password-toggle",onClick:this.changePasswordVisibility},e("bcm-icon",{icon:f?"far fa-eye-invisible":"far fa-eye"})),Object.keys(c).includes(o)&&!w&&e("span",{class:"input-suffix default-icon",innerHTML:c[o]}),"number"===o&&e("div",{class:a("caret-container",{unit:(null==v?void 0:v.length)>0},{disabled:z},{disabled:b})},e("span",{class:"caret",onClick:0==z&&this.incrementNumber},e("bcm-icon",{icon:"far fa-caret-up"})),e("span",{class:"caret",onClick:0==z&&this.decrementNumber},e("bcm-icon",{icon:"far fa-caret-down"}))),"number"!==o&&e("span",{class:"input-suffix"},e("slot",{name:"suffix"}))),e(r,{noCaption:_,captionType:l,captionError:p,caption:h})))}get el(){return n(this)}static get watchers(){return{hasFocus:["whatchHasFocus"],value:["watchValue"]}}};h.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:inline-block;width:100%;margin:0 0 8px 0}:host(.hidden){display:none}:host(.no-margin){margin:0}.input-container{display:flex;flex-direction:column;width:100%;max-width:256px}.input-container.full-width{max-width:100%}.input-base{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;flex:1 1 auto;display:inline-flex;align-items:stretch;justify-content:start;position:relative;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;vertical-align:middle;overflow:hidden;padding:0 4px;cursor:text}.input-base.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.input-base.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-300)}.input-base.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.input-base.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.input-base:not(.disabled):hover .caret-container,.input-base:not(.disabled).focused .caret-container{opacity:1}.input-base:not(.disabled):hover .input-clear-button,.input-base:not(.disabled).focused .input-clear-button{opacity:1}.input-base:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.input-base:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.input-base.focused:not(.disabled) .caret-container{opacity:1}.input-base.focused:not(.disabled) .input-clear-button{opacity:1}.input-base:hover:not(.disabled) .caret-container{opacity:1}.input-base:hover:not(.disabled) .input-clear-button{opacity:1}.input-base.disabled{cursor:not-allowed}.input-base.readonly{cursor:default}.input-base.empty .input-clear-button{display:none}.input-base.invalid,.input-base.error{border-color:var(--bcm-new-ds-color-red-500)}.error .label{color:var(--bcm-new-ds-color-red-500) !important}.error .input-base{border-color:var(--bcm-new-ds-color-red-500) !important}.input-base input{color:var(--bcm-new-ds-color-slate-600);flex:1 1 auto;width:0%;border:none;border-radius:2px;background:none;box-shadow:none;padding:0;margin:0 4px;font-family:"Inter", sans-serif;cursor:inherit;-webkit-appearance:none;appearance:none}.input-base input::-webkit-search-decoration,.input-base input::-webkit-search-cancel-button,.input-base input::-webkit-search-results-button,.input-base input::-webkit-search-results-decoration{-webkit-appearance:none}.input-base input::placeholder{font-family:"Inter", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.input-base input:focus{outline:none}input::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input[type=number]{-moz-appearance:textfield}.input-prefix,.input-suffix{display:inline-flex;align-items:center;justify-content:center;cursor:default;color:var(--bcm-new-ds-color-slate-500)}.input-prefix ::slotted(*),.input-prefix>span{line-height:1;margin-left:4px}.input-suffix ::slotted(*),.input-suffix>span{line-height:1;margin-right:4px}.input-clear-button,.input-password-toggle{display:inline-flex;align-items:center;border:none;background:none;padding:0;cursor:pointer;margin-right:4px;transition:0.2s opacity}.input-clear-button:last-child,.input-clear-button:last-of-type,.input-password-toggle:last-child,.input-password-toggle:last-of-type{margin-right:8px}.input-clear-button:focus,.input-password-toggle:focus{outline:none}.input-clear-button{opacity:0}.label{display:flex;flex-direction:column;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;color:var(--bcm-new-ds-color-slate-600);margin-bottom:4px}.caption-area{min-height:20px}.input-caption{display:block}.unit.input-suffix{width:24px}.unit-prefix{display:inline-flex;flex:0 0 auto;align-items:center;cursor:default;color:var(--bcm-color-grey-8)}.caret-container{opacity:0;width:30px;display:flex;flex-direction:column;justify-content:center;align-items:center;border-left:1px solid #D9D9D9;border-right:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box;margin-right:4px}.caret-container:last-of-type{margin-right:-space("xxxs");border-right:none}.caret-container .caret{display:inline-flex;height:50%;width:100%;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer}.caret-container .caret:hover{color:var(--bcm-color-prime-blue-6)}.caret-container .caret:active{background-color:var(--bcm-color-grey-3)}.caret-container .caret:last-child{border-top:1px solid #D9D9D9}.caret-container.disabled{background-color:var(--bcm-color-grey-3)}.caret-container.disabled .caret{cursor:not-allowed}.default-icon{margin-right:8px}.input-large{height:40px}.input-medium{height:32px}.input-small{height:24px}';export{h as bcm_old_input}
5
+ import{r as i,c as t,h as e,H as s,g as n}from"./p-6d7fe687.js";import{c as a}from"./p-d65a1e21.js";import{C as r}from"./p-a56e8c98.js";import{d as o}from"./p-8c018ae0.js";import"./p-6f56f8ca.js";let l=0;const c={email:'<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z"/></svg>',tel:'<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M476.5 22.9L382.3 1.2c-21.6-5-43.6 6.2-52.3 26.6l-43.5 101.5c-8 18.6-2.6 40.6 13.1 53.4l40 32.7C311 267.8 267.8 311 215.4 339.5l-32.7-40c-12.8-15.7-34.8-21.1-53.4-13.1L27.7 329.9c-20.4 8.7-31.5 30.7-26.6 52.3l21.7 94.2c4.8 20.9 23.2 35.5 44.6 35.5C312.3 512 512 313.7 512 67.5c0-21.4-14.6-39.8-35.5-44.6zM69.3 464l-20.9-90.7 98.2-42.1 55.7 68.1c98.8-46.4 150.6-98 197-197l-68.1-55.7 42.1-98.2L464 69.3C463 286.9 286.9 463 69.3 464z"/></svg>',search:'<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M508.5 468.9L387.1 347.5c-2.3-2.3-5.3-3.5-8.5-3.5h-13.2c31.5-36.5 50.6-84 50.6-136C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c52 0 99.5-19.1 136-50.6v13.2c0 3.2 1.3 6.2 3.5 8.5l121.4 121.4c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17zM208 368c-88.4 0-160-71.6-160-160S119.6 48 208 48s160 71.6 160 160-71.6 160-160 160z"/></svg>',url:'<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M314.222 197.78c51.091 51.091 54.377 132.287 9.75 187.16-6.242 7.73-2.784 3.865-84.94 86.02-54.696 54.696-143.266 54.745-197.99 0-54.711-54.69-54.734-143.255 0-197.99 32.773-32.773 51.835-51.899 63.409-63.457 7.463-7.452 20.331-2.354 20.486 8.192a173.31 173.31 0 0 0 4.746 37.828c.966 4.029-.272 8.269-3.202 11.198L80.632 312.57c-32.755 32.775-32.887 85.892 0 118.8 32.775 32.755 85.892 32.887 118.8 0l75.19-75.2c32.718-32.725 32.777-86.013 0-118.79a83.722 83.722 0 0 0-22.814-16.229c-4.623-2.233-7.182-7.25-6.561-12.346 1.356-11.122 6.296-21.885 14.815-30.405l4.375-4.375c3.625-3.626 9.177-4.594 13.76-2.294 12.999 6.524 25.187 15.211 36.025 26.049zM470.958 41.04c-54.724-54.745-143.294-54.696-197.99 0-82.156 82.156-78.698 78.29-84.94 86.02-44.627 54.873-41.341 136.069 9.75 187.16 10.838 10.838 23.026 19.525 36.025 26.049 4.582 2.3 10.134 1.331 13.76-2.294l4.375-4.375c8.52-8.519 13.459-19.283 14.815-30.405.621-5.096-1.938-10.113-6.561-12.346a83.706 83.706 0 0 1-22.814-16.229c-32.777-32.777-32.718-86.065 0-118.79l75.19-75.2c32.908-32.887 86.025-32.755 118.8 0 32.887 32.908 32.755 86.025 0 118.8l-45.848 45.84c-2.93 2.929-4.168 7.169-3.202 11.198a173.31 173.31 0 0 1 4.746 37.828c.155 10.546 13.023 15.644 20.486 8.192 11.574-11.558 30.636-30.684 63.409-63.457 54.733-54.735 54.71-143.3-.001-197.991z"/></svg>'},h=class{constructor(e){i(this,e),this.focus=t(this,"bcm-focus",7),this.blur=t(this,"bcm-blur",7),this.clear=t(this,"bcm-clear",7),this.change=t(this,"bcm-change",7),this.input=t(this,"bcm-input",7),this.inputId="input-"+ ++l,this.isBlur=!1,this.type="text",this.value="",this.size="medium",this.label=void 0,this.noCaption=!1,this.noMargin=!1,this.captionError=void 0,this.caption=void 0,this.captionType="default",this.placeholder=void 0,this.fullWidth=!1,this.disabled=!1,this.readonly=!1,this.clearable=!1,this.passwordToggle=void 0,this.noDefaultIcon=void 0,this._id=void 0,this._internal_id=(4*Math.random()).toString(16).replace(".",""),this.name=void 0,this.unit=null,this.unitPrefix=null,this.decimal=void 0,this.min=null,this.max=null,this.step=null,this.hidden=!1,this.required=!1,this.disableWatchValue=!1,this.maxLength=null,this.tooltip=void 0,this.inValid=!1,this.valueCache=void 0,this.captionCache=void 0,this.captionTypeCache=void 0,this.hasFocus=!1,this.isPasswordVisible=!1}async setFocus(){this.inputElement.focus()}async removeFocus(){this.inputElement.blur()}async select(){return this.inputElement.select()}async setValue(i){return this.inputElement.value=i,this.value=i,this.handleChange(),i}async setClear(){return this.inputElement.value="",this.value="",await o(10),Promise.resolve()}async resetCaption(){return await o(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await o(10),Promise.resolve()}async getValue(){return this.value}handleFocus(){this.hasFocus=!0,this.focus.emit()}handleBlur(){this.hasFocus=!1,this.isBlur=!0,"email"==this.type&&this.isEmailValid(),"tel"==this.type&&this.isTelValid(),this.blur.emit()}handleChange(){this.value=this.inputElement.value,this.change.emit(this.value)}handleInput(){"number"==this.type&&(this.inputElement.value=this.inputElement.value.replace("false"==this.decimal?/[^0-9-]/g:/[^0-9.,-]/g,""),this.inputElement.value=this.inputElement.value.replace(/(\..*)\./g,"$1").replace(/(\-.*)\-/g,"$1")),this.value=this.inputElement.value,this.input.emit(this.value)}handleClear(i){this.inputElement.value="",this.value="",this.inputElement.focus(),this.change.emit(this.value),this.clear.emit(i),i.stopPropagation()}changePasswordVisibility(){this.isPasswordVisible=!this.isPasswordVisible}incrementNumber(){if(!this.inValid&&!this.disabled&&!this.readonly){let i=this.getNumberStep(),t=Number(this.value)+Number(i);this.value=this.numberDecimal(t)}}decrementNumber(){if(!this.inValid&&!this.disabled&&!this.readonly){let i=this.getNumberStep(),t=Number(this.value)-Number(i);this.value=this.numberDecimal(t)}}getNumberStep(i=Number(this.step)){let t=1;return i&&Number(i)==i&&(t=i),Number(t)}connectedCallback(){this.changePasswordVisibility=this.changePasswordVisibility.bind(this),this.handleChange=this.handleChange.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleInput=this.handleInput.bind(this),this.handleClear=this.handleClear.bind(this),this.incrementNumber=this.incrementNumber.bind(this),this.decrementNumber=this.decrementNumber.bind(this),this.valueCache=this.value,this.captionCache=this.caption,this.captionTypeCache=this.captionType}validationRange(i=JSON.stringify({value:this.value,min:this.min,max:this.max})){let t=null,e=null,s=!0,n=JSON.parse(i),{length:a,value:r,min:o,max:l}=n;return a=parseFloat(a),r=parseFloat(r),o=parseFloat(o),l=parseFloat(l),0!==a&&r&&(o&&l&&(r<o||r>l)&&(t="Please enter a value between "+o+" and "+l+".",e="error",s=!1)||o&&!l&&r<o&&(t="Please enter a value greater than or equal to "+o+".",e="error",s=!1)||!o&&l&&r>l&&(t="Please enter a value less than or equal to "+l+".",e="error",s=!1)),this.setCaption(t,e),s}setCaption(i=null,t=null){this.caption=i||this.captionCache,this.captionType=t||this.captionTypeCache,this.captionError="error"==t?i:null}isEmailValid(){const{value:i}=this,t=new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);let e=null,s=null;return i&&!t.test(i)?(e="Please enter a valid email address.",s="error",this.inValid=!0):this.inValid=!1,this.setCaption(e,s),this.inValid}isTelValid(){const{value:i}=this,t=new RegExp(/^(?=.*[0-9])[- +()0-9]+$/);let e=null,s=null;return i&&!t.test(i)?(e="Please enter a valid phone number.",s="error",this.inValid=!0):this.inValid=!1,this.setCaption(e,s),this.inValid}isNumberValid(i="Invalid number",t="error"){const{value:e}=this;return e&&Number(e)!=e?(this.inValid=!0,this.setCaption(i,t),!0):(this.inValid=!1,!1)}setNumberUnit(){const{value:i,unit:t}=this;Number(i)==i&&(null==t?void 0:t.length)>0&&!i&&(this.value=0)}numberDecimal(i=""){let t=this.getDecimalLength();return i&&t?parseFloat(i).toFixed(t):i}numberNotDecimal(i=0){return Math.trunc(i)}getDecimalLength(){const{step:i}=this;let t,e,s=0;return i&&Number(i)==i&&(String(i).includes(".")?(t=String(i).split("."),e=t[t.length-1].length):e=0,s=e),Number(s)}componentWillRender(){const{type:i}=this;"number"==i&&this.value&&(this.isNumberValid()||this.validationRange()),this.isBlur&&("email"==i&&this.value&&this.isEmailValid(),"tel"==i&&this.value&&this.isTelValid())}componentWillLoad(){const{type:i,value:t}=this;"number"==i&&Number(t)==t&&(this.value=this.numberDecimal(t))}numberControl(i){if(!this.disabled&&!this.readonly&&"number"==this.type){var t=i.which||0,e=i.key;if(38==t&&(i.preventDefault(),this.incrementNumber()),40==t&&(i.preventDefault(),this.decrementNumber()),"."==e&&String(this.value).includes(".")&&i.preventDefault(),8==t||9==t||13==t||16==t||17==t||18==t||46==t||110==t&&"number"==this.type&&0!=this.decimal||190==t&&"."==e&&"number"==this.type&&0!=this.decimal||189==t&&0==this.inputElement.value.length||109==t&&0==this.inputElement.value.length||t>=35&&t<=40||t>=48&&t<=57||t>=96&&t<=105)return!0;i.preventDefault(),1==this.decimal?this.value=this.numberDecimal(this.value):0==this.decimal&&(this.value=this.numberNotDecimal(this.value))}}whatchHasFocus(){const{type:i,hasFocus:t,value:e,valueCache:s,inValid:n}=this;if("number"==i){this.isNumberValid();let i=!1;1==t?1==n&&(this.value="",i=!0):(""==this.value&&0==n&&(this.value=s,i=!0),e!=s&&0==n&&0==i&&(this.value=e?this.numberDecimal(e):""))}}watchValue(){this.disableWatchValue||"number"==this.type||this.handleChange()}render(){const{value:i,size:t,label:n,type:o,captionType:l,caption:h,captionError:p,placeholder:u,fullWidth:m,disabled:d,readonly:b,clearable:g,passwordToggle:x,isPasswordVisible:f,noDefaultIcon:w,unit:v,inValid:z,hasFocus:y,unitPrefix:k,noCaption:_,required:C}=this,N=a("input-container",{"full-width":m,error:"error"==l}),F=a("input-base","input-"+t,{invalid:z,unit:(null==v?void 0:v.length)>0,focused:y,disabled:d,readonly:b,empty:(null==i?void 0:i.length)<1}),V="large"===t?"size-3":"size-2",L=a(this.hidden?"hidden":null,this.noMargin?"no-margin":null);return e(s,{class:L},e("div",{class:N},n&&e("div",null,e("bcm-label",{tooltip:this.tooltip,type:l,value:n,required:C,htmlFor:this.inputId})),e("div",{class:F},e("span",{class:"input-prefix"},e("slot",{name:"prefix"}),k&&e("span",{class:a(V,"unit-prefix")},k)),e("input",{"bcm-internal-id":this._id,id:this.inputId,class:V,ref:i=>this.inputElement=i,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onInput:this.handleInput,maxLength:this.maxLength,type:"password"===o&&f||"number"===o?"text":o,placeholder:u,value:"number"!==o||this.hasFocus?i:i+(i&&(null==v?void 0:v.length)>0?" "+v:""),disabled:this.disabled,readonly:this.readonly}),g&&!this.disabled&&e("button",{class:"input-clear-button",onClick:this.handleClear},e("svg",{style:{fill:"#595959",width:"14px",height:"14px"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},e("path",{d:"M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z"}))),"password"===o&&x&&e("button",{class:"input-password-toggle",onClick:this.changePasswordVisibility},e("bcm-icon",{icon:f?"far fa-eye-invisible":"far fa-eye"})),Object.keys(c).includes(o)&&!w&&e("span",{class:"input-suffix default-icon",innerHTML:c[o]}),"number"===o&&e("div",{class:a("caret-container",{unit:(null==v?void 0:v.length)>0},{disabled:z},{disabled:b})},e("span",{class:"caret",onClick:0==z&&this.incrementNumber},e("bcm-icon",{icon:"far fa-caret-up"})),e("span",{class:"caret",onClick:0==z&&this.decrementNumber},e("bcm-icon",{icon:"far fa-caret-down"}))),"number"!==o&&e("span",{class:"input-suffix"},e("slot",{name:"suffix"}))),e(r,{noCaption:_,captionType:l,captionError:p,caption:h})))}get el(){return n(this)}static get watchers(){return{hasFocus:["whatchHasFocus"],value:["watchValue"]}}};h.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:inline-block;width:100%;margin:0 0 8px 0}:host(.hidden){display:none}:host(.no-margin){margin:0}.input-container{display:flex;flex-direction:column;width:100%;max-width:256px}.input-container.full-width{max-width:100%}.input-base{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;flex:1 1 auto;display:inline-flex;align-items:stretch;justify-content:start;position:relative;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;vertical-align:middle;overflow:hidden;padding:0 4px;cursor:text}.input-base.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.input-base.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-300)}.input-base.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.input-base.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.input-base:not(.disabled):hover .caret-container,.input-base:not(.disabled).focused .caret-container{opacity:1}.input-base:not(.disabled):hover .input-clear-button,.input-base:not(.disabled).focused .input-clear-button{opacity:1}.input-base:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.input-base:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.input-base.focused:not(.disabled) .caret-container{opacity:1}.input-base.focused:not(.disabled) .input-clear-button{opacity:1}.input-base:hover:not(.disabled) .caret-container{opacity:1}.input-base:hover:not(.disabled) .input-clear-button{opacity:1}.input-base.disabled{cursor:not-allowed}.input-base.readonly{cursor:default}.input-base.empty .input-clear-button{display:none}.input-base.invalid,.input-base.error{border-color:var(--bcm-new-ds-color-red-500)}.error .label{color:var(--bcm-new-ds-color-red-500) !important}.error .input-base{border-color:var(--bcm-new-ds-color-red-500) !important}.input-base input{color:var(--bcm-new-ds-color-slate-600);flex:1 1 auto;width:0%;border:none;border-radius:2px;background:none;box-shadow:none;padding:0;margin:0 4px;font-family:"Inter", sans-serif;cursor:inherit;-webkit-appearance:none;appearance:none}.input-base input::-webkit-search-decoration,.input-base input::-webkit-search-cancel-button,.input-base input::-webkit-search-results-button,.input-base input::-webkit-search-results-decoration{-webkit-appearance:none}.input-base input::placeholder{font-family:"Inter", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.input-base input:focus{outline:none}input::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input[type=number]{-moz-appearance:textfield}.input-prefix,.input-suffix{display:inline-flex;align-items:center;justify-content:center;cursor:default;color:var(--bcm-new-ds-color-slate-500)}.input-prefix ::slotted(*),.input-prefix>span{line-height:1;margin-left:4px}.input-suffix ::slotted(*),.input-suffix>span{line-height:1;margin-right:4px}.input-clear-button,.input-password-toggle{display:inline-flex;align-items:center;border:none;background:none;padding:0;cursor:pointer;margin-right:4px;transition:0.2s opacity}.input-clear-button:last-child,.input-clear-button:last-of-type,.input-password-toggle:last-child,.input-password-toggle:last-of-type{margin-right:8px}.input-clear-button:focus,.input-password-toggle:focus{outline:none}.input-clear-button{opacity:0}.label{display:flex;flex-direction:column;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;color:var(--bcm-new-ds-color-slate-600);margin-bottom:4px}.caption-area{min-height:20px}.input-caption{display:block}.unit.input-suffix{width:24px}.unit-prefix{display:inline-flex;flex:0 0 auto;align-items:center;cursor:default;color:var(--bcm-color-grey-8)}.caret-container{opacity:0;width:30px;display:flex;flex-direction:column;justify-content:center;align-items:center;border-left:1px solid #D9D9D9;border-right:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box;margin-right:4px}.caret-container:last-of-type{margin-right:-space("xxxs");border-right:none}.caret-container .caret{display:inline-flex;height:50%;width:100%;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer}.caret-container .caret:hover{color:var(--bcm-color-prime-blue-6)}.caret-container .caret:active{background-color:var(--bcm-color-grey-3)}.caret-container .caret:last-child{border-top:1px solid #D9D9D9}.caret-container.disabled{background-color:var(--bcm-color-grey-3)}.caret-container.disabled .caret{cursor:not-allowed}.default-icon{margin-right:8px}.input-large{height:40px}.input-medium{height:32px}.input-small{height:24px}';export{h as bcm_old_input}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as e,h as i,H as o,g as t}from"./p-da1055cb.js";import{G as c}from"./p-92bf3f86.js";import{a as r}from"./p-a429e85b.js";import{c as a}from"./p-d65a1e21.js";import{C as l}from"./p-843905c8.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-436364c8.js";import"./p-8c018ae0.js";const s=class{constructor(i){e(this,i),this._id=c.UID(),this.size=r.Size.medium,this.color=void 0,this.static=!1}setColor(e=this.color){if(!e)return;const i="--bcm-item";return"white"==e?{[`${i}-color-default`]:l.dsColor("slate-600"),[`${i}-color-hover`]:l.dsColor("slate-600"),[`${i}-color-focus-visible`]:l.dsColor("slate-600"),[`${i}-color-active`]:l.dsColor("slate-600"),[`${i}-color-disabled`]:l.dsColor("white"),[`${i}-background-color-default`]:l.dsColor("white"),[`${i}-background-color-hover`]:l.dsColor(this.static?"white":"slate-100"),[`${i}-background-color-focus-visible`]:l.dsColor(this.static?"white":"slate-200"),[`${i}-background-color-active`]:l.dsColor(this.static?"white":"slate-300"),[`${i}-background-color-disabled`]:l.dsColor("slate-400")}:{[`${i}-color-default`]:l.dsColor("white"),[`${i}-color-hover`]:l.dsColor("white"),[`${i}-color-focus-visible`]:l.dsColor("white"),[`${i}-color-active`]:l.dsColor("white"),[`${i}-color-disabled`]:l.dsColor("white"),[`${i}-background-color-default`]:l.dsColor(e+"-500"),[`${i}-background-color-hover`]:l.dsColor(e+"-600"),[`${i}-background-color-focus-visible`]:l.dsColor(e+"-700"),[`${i}-background-color-active`]:l.dsColor(e+"-800"),[`${i}-background-color-disabled`]:l.dsColor("slate-400")}}disconnectedCallback(){}render(){const e=a("bcm-item",`bcm-item-size-${this.size}`);return i(o,{class:e,style:this.setColor()},i("slot",null))}get el(){return t(this)}};s.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-item{box-sizing:border-box;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;--bcm-item-color-default:var(--bcm-new-ds-color-white);--bcm-item-background-color-default:var(--bcm-new-ds-color-blue-500);--bcm-item-color-hover:var(--bcm-new-ds-color-white);--bcm-item-background-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-item-color-focus-visible:var(--bcm-new-ds-color-white);--bcm-item-background-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-item-color-active:var(--bcm-new-ds-color-white);--bcm-item-background-color-active:var(--bcm-new-ds-color-blue-700);--bcm-item-color-disabled:var(--bcm-new-ds-color-white);--bcm-item-background-color-disabled:var(--bcm-new-ds-color-slate-400);font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;border-radius:4px;outline:none;color:var(--bcm-item-color-default);background-color:var(--bcm-item-background-color-default)}.bcm-item-size-small{font-size:12px;line-height:calc(12px + 8px);padding:2px 12px;min-height:calc(calc(12px + 8px) + calc(2px) * 2)}.bcm-item-size-medium{font-size:14px;line-height:calc(14px + 8px);padding:5px 12px;min-height:calc(calc(14px + 8px) + calc(5px) * 2)}.bcm-item-size-large{font-size:16px;line-height:calc(16px + 8px);padding:8px 12px;min-height:calc(calc(16px + 8px) + calc(8px) * 2)}.bcm-item:default{color:var(--bcm-item-color-default);background-color:var(--bcm-item-background-color-default)}.bcm-item:hover{color:var(--bcm-item-color-hover);background-color:var(--bcm-item-background-color-hover)}.bcm-item:focus-visible{color:var(--bcm-item-color-focus-visible);background-color:var(--bcm-item-background-color-focus-visible)}.bcm-item:active{color:var(--bcm-item-color-active);background-color:var(--bcm-item-background-color-active)}.bcm-item:disabled{color:var(--bcm-item-color-disabled);background-color:var(--bcm-item-background-color-disabled)}.bcm-item:not(.static):hover{cursor:pointer}';export{s as bcm_item}
5
+ import{r as e,h as i,H as o,g as t}from"./p-6d7fe687.js";import{G as c}from"./p-5f63beda.js";import{a as r}from"./p-a429e85b.js";import{c as a}from"./p-d65a1e21.js";import{C as l}from"./p-843905c8.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-436364c8.js";import"./p-8c018ae0.js";const s=class{constructor(i){e(this,i),this._id=c.UID(),this.size=r.Size.medium,this.color=void 0,this.static=!1}setColor(e=this.color){if(!e)return;const i="--bcm-item";return"white"==e?{[`${i}-color-default`]:l.dsColor("slate-600"),[`${i}-color-hover`]:l.dsColor("slate-600"),[`${i}-color-focus-visible`]:l.dsColor("slate-600"),[`${i}-color-active`]:l.dsColor("slate-600"),[`${i}-color-disabled`]:l.dsColor("white"),[`${i}-background-color-default`]:l.dsColor("white"),[`${i}-background-color-hover`]:l.dsColor(this.static?"white":"slate-100"),[`${i}-background-color-focus-visible`]:l.dsColor(this.static?"white":"slate-200"),[`${i}-background-color-active`]:l.dsColor(this.static?"white":"slate-300"),[`${i}-background-color-disabled`]:l.dsColor("slate-400")}:{[`${i}-color-default`]:l.dsColor("white"),[`${i}-color-hover`]:l.dsColor("white"),[`${i}-color-focus-visible`]:l.dsColor("white"),[`${i}-color-active`]:l.dsColor("white"),[`${i}-color-disabled`]:l.dsColor("white"),[`${i}-background-color-default`]:l.dsColor(e+"-500"),[`${i}-background-color-hover`]:l.dsColor(e+"-600"),[`${i}-background-color-focus-visible`]:l.dsColor(e+"-700"),[`${i}-background-color-active`]:l.dsColor(e+"-800"),[`${i}-background-color-disabled`]:l.dsColor("slate-400")}}disconnectedCallback(){}render(){const e=a("bcm-item",`bcm-item-size-${this.size}`);return i(o,{class:e,style:this.setColor()},i("slot",null))}get el(){return t(this)}};s.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-item{box-sizing:border-box;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;--bcm-item-color-default:var(--bcm-new-ds-color-white);--bcm-item-background-color-default:var(--bcm-new-ds-color-blue-500);--bcm-item-color-hover:var(--bcm-new-ds-color-white);--bcm-item-background-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-item-color-focus-visible:var(--bcm-new-ds-color-white);--bcm-item-background-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-item-color-active:var(--bcm-new-ds-color-white);--bcm-item-background-color-active:var(--bcm-new-ds-color-blue-700);--bcm-item-color-disabled:var(--bcm-new-ds-color-white);--bcm-item-background-color-disabled:var(--bcm-new-ds-color-slate-400);font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;border-radius:4px;outline:none;color:var(--bcm-item-color-default);background-color:var(--bcm-item-background-color-default)}.bcm-item-size-small{font-size:12px;line-height:calc(12px + 8px);padding:2px 12px;min-height:calc(calc(12px + 8px) + calc(2px) * 2)}.bcm-item-size-medium{font-size:14px;line-height:calc(14px + 8px);padding:5px 12px;min-height:calc(calc(14px + 8px) + calc(5px) * 2)}.bcm-item-size-large{font-size:16px;line-height:calc(16px + 8px);padding:8px 12px;min-height:calc(calc(16px + 8px) + calc(8px) * 2)}.bcm-item:default{color:var(--bcm-item-color-default);background-color:var(--bcm-item-background-color-default)}.bcm-item:hover{color:var(--bcm-item-color-hover);background-color:var(--bcm-item-background-color-hover)}.bcm-item:focus-visible{color:var(--bcm-item-color-focus-visible);background-color:var(--bcm-item-background-color-focus-visible)}.bcm-item:active{color:var(--bcm-item-color-active);background-color:var(--bcm-item-background-color-active)}.bcm-item:disabled{color:var(--bcm-item-color-disabled);background-color:var(--bcm-item-background-color-disabled)}.bcm-item:not(.static):hover{cursor:pointer}';export{s as bcm_item}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,c as e,h as i,H as o,g as r}from"./p-da1055cb.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as n}from"./p-92bf3f86.js";import"./p-08fb3095.js";import"./p-8d0ca8c2.js";import"./p-54bcf02f.js";import"./p-7e44e6b5.js";import{B as s}from"./p-a429e85b.js";import{c as a}from"./p-d65a1e21.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const c=class{constructor(i){t(this,i),this.bcmBeforeOpen=e(this,"bcm-before-open",7),this.bcmBeforeClose=e(this,"bcm-before-close",7),this._id=n.UID(),this._title=void 0,this.position=s.Position.right,this.fullWidth=!1,this._open=!1,this._close=!1}async show(){this.bcmBeforeOpen.emit(!0)}async hide(){this.bcmBeforeClose.emit(!0),this._close=!0}_beforeOpen(t){var e;t&&(null===(e=t.target)||void 0===e?void 0:e.id)==this._id&&(this._open=!0)}_beforeClose(t){var e;t&&(null===(e=t.target)||void 0===e?void 0:e.id)==this._id&&(this._open=!1)}_openHandler(){this._open?document.body.classList.add("bcm-disable-scroll"):document.body.classList.remove("bcm-disable-scroll")}keyboardNavigation(t){(t.keyCode||0)==s.KeyCode.escape&&(t.preventDefault(),this.hide())}disconnectedCallback(){this._open=!1,document.body.classList.remove("bcm-disable-scroll"),this.el.remove()}render(){const t=a("bcm-drawer",{"bcm-drawer--open":this._open}),e=a("bcm-drawer__content",`bcm-drawer__content--position-${this.position}`,{"bcm-drawer__content--open":this._open,"bcm-drawer__content--close":this._close,"full-width":this.fullWidth}),r=a("bcm-drawer__overlay",{"bcm-drawer__overlay--open":this._open,"bcm-drawer__overlay--close":this._close});return i(o,{class:t},i("div",{class:r,onClick:()=>this.hide()}),i("div",{class:e},i("div",{class:"bcm-drawer__content-header"},i("bcm-text",{class:"bcm-drawer__content-header-title","font-size":"6",weight:"600",color:"slate-800"},this._title," ",i("slot",{name:"header"})),i("div",{class:"bcm-drawer__content-header-close size-4",onClick:()=>this.hide()},i("bcm-icon",{icon:"fal fa-times"}))),i("div",{style:{overflow:"auto",flex:"1"}},i("div",{class:"bcm-drawer__content-body"},i("slot",null))),i("div",{class:"bcm-drawer__content-footer"},i("slot",{name:"footer"}))))}get el(){return r(this)}static get watchers(){return{_open:["_openHandler"]}}};c.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-drawer{user-select:none;position:absolute;width:100vw;height:100vh;top:-100%;left:-100%;overflow:hidden;visibility:hidden}.bcm-drawer--open{visibility:visible;top:0;left:0}.bcm-drawer__content{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;user-select:text;position:fixed;width:100%;height:100%;background-color:#f1f5f9;z-index:10350;transition:transform 0.2s ease-in-out;transform:translateX(-100%);visibility:hidden;overflow:hidden;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}.bcm-drawer__content-body{padding:0 24px 24px 24px}.bcm-drawer__content.full-width{max-width:100%}.bcm-drawer__content-header{padding:24px 24px 0 24px;display:flex;justify-content:space-between;align-items:flex-start;color:var(--bcm-color-grey-8);margin-bottom:8px}.bcm-drawer__content-header-close{padding:4px 8px;margin-right:-4px;margin-top:-4px;color:var(--bcm-color-grey-7)}.bcm-drawer__content-header-close:hover{cursor:pointer;color:var(--bcm-color-grey-8)}.bcm-drawer__content-footer{padding:12px 24px}.bcm-drawer__content--position-left,.bcm-drawer__content--position-right{max-width:500px}.bcm-drawer__content--position-left.full-width,.bcm-drawer__content--position-right.full-width{max-width:100%}.bcm-drawer__content--position-top,.bcm-drawer__content--position-bottom{max-height:500px}.bcm-drawer__content--position-top.full-width,.bcm-drawer__content--position-bottom.full-width{max-height:100%}.bcm-drawer__content--position-left{transform:translateX(-100%);top:0;left:0}.bcm-drawer__content--position-top{transform:translateY(-100%);top:0;left:0}.bcm-drawer__content--position-right{transform:translateX(100%);top:0;right:0}.bcm-drawer__content--position-bottom{transform:translateY(100%);bottom:0;left:0}.bcm-drawer__content--open{transform:translateX(0);visibility:visible}.bcm-drawer__content--close{visibility:visible}.bcm-drawer__overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);z-index:10349;visibility:hidden;opacity:0;transition:opacity 0.3s ease-in-out}.bcm-drawer__overlay--close{opacity:0;visibility:visible;transform:translateX(-100%)}.bcm-drawer__overlay--open{opacity:1;visibility:visible;transform:translateX(0)}';export{c as bcm_drawer}
5
+ import{r as t,c as e,h as i,H as o,g as r}from"./p-6d7fe687.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as n}from"./p-5f63beda.js";import"./p-294186b9.js";import"./p-8d0ca8c2.js";import"./p-159e5357.js";import"./p-7e44e6b5.js";import{B as s}from"./p-a429e85b.js";import{c as a}from"./p-d65a1e21.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const c=class{constructor(i){t(this,i),this.bcmBeforeOpen=e(this,"bcm-before-open",7),this.bcmBeforeClose=e(this,"bcm-before-close",7),this._id=n.UID(),this._title=void 0,this.position=s.Position.right,this.fullWidth=!1,this._open=!1,this._close=!1}async show(){this.bcmBeforeOpen.emit(!0)}async hide(){this.bcmBeforeClose.emit(!0),this._close=!0}_beforeOpen(t){var e;t&&(null===(e=t.target)||void 0===e?void 0:e.id)==this._id&&(this._open=!0)}_beforeClose(t){var e;t&&(null===(e=t.target)||void 0===e?void 0:e.id)==this._id&&(this._open=!1)}_openHandler(){this._open?document.body.classList.add("bcm-disable-scroll"):document.body.classList.remove("bcm-disable-scroll")}keyboardNavigation(t){(t.keyCode||0)==s.KeyCode.escape&&(t.preventDefault(),this.hide())}disconnectedCallback(){this._open=!1,document.body.classList.remove("bcm-disable-scroll"),this.el.remove()}render(){const t=a("bcm-drawer",{"bcm-drawer--open":this._open}),e=a("bcm-drawer__content",`bcm-drawer__content--position-${this.position}`,{"bcm-drawer__content--open":this._open,"bcm-drawer__content--close":this._close,"full-width":this.fullWidth}),r=a("bcm-drawer__overlay",{"bcm-drawer__overlay--open":this._open,"bcm-drawer__overlay--close":this._close});return i(o,{class:t},i("div",{class:r,onClick:()=>this.hide()}),i("div",{class:e},i("div",{class:"bcm-drawer__content-header"},i("bcm-text",{class:"bcm-drawer__content-header-title","font-size":"6",weight:"600",color:"slate-800"},this._title," ",i("slot",{name:"header"})),i("div",{class:"bcm-drawer__content-header-close size-4",onClick:()=>this.hide()},i("bcm-icon",{icon:"fal fa-times"}))),i("div",{style:{overflow:"auto",flex:"1"}},i("div",{class:"bcm-drawer__content-body"},i("slot",null))),i("div",{class:"bcm-drawer__content-footer"},i("slot",{name:"footer"}))))}get el(){return r(this)}static get watchers(){return{_open:["_openHandler"]}}};c.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-drawer{user-select:none;position:absolute;width:100vw;height:100vh;top:-100%;left:-100%;overflow:hidden;visibility:hidden}.bcm-drawer--open{visibility:visible;top:0;left:0}.bcm-drawer__content{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;user-select:text;position:fixed;width:100%;height:100%;background-color:#f1f5f9;z-index:10350;transition:transform 0.2s ease-in-out;transform:translateX(-100%);visibility:hidden;overflow:hidden;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}.bcm-drawer__content-body{padding:0 24px 24px 24px}.bcm-drawer__content.full-width{max-width:100%}.bcm-drawer__content-header{padding:24px 24px 0 24px;display:flex;justify-content:space-between;align-items:flex-start;color:var(--bcm-color-grey-8);margin-bottom:8px}.bcm-drawer__content-header-close{padding:4px 8px;margin-right:-4px;margin-top:-4px;color:var(--bcm-color-grey-7)}.bcm-drawer__content-header-close:hover{cursor:pointer;color:var(--bcm-color-grey-8)}.bcm-drawer__content-footer{padding:12px 24px}.bcm-drawer__content--position-left,.bcm-drawer__content--position-right{max-width:500px}.bcm-drawer__content--position-left.full-width,.bcm-drawer__content--position-right.full-width{max-width:100%}.bcm-drawer__content--position-top,.bcm-drawer__content--position-bottom{max-height:500px}.bcm-drawer__content--position-top.full-width,.bcm-drawer__content--position-bottom.full-width{max-height:100%}.bcm-drawer__content--position-left{transform:translateX(-100%);top:0;left:0}.bcm-drawer__content--position-top{transform:translateY(-100%);top:0;left:0}.bcm-drawer__content--position-right{transform:translateX(100%);top:0;right:0}.bcm-drawer__content--position-bottom{transform:translateY(100%);bottom:0;left:0}.bcm-drawer__content--open{transform:translateX(0);visibility:visible}.bcm-drawer__content--close{visibility:visible}.bcm-drawer__overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);z-index:10349;visibility:hidden;opacity:0;transition:opacity 0.3s ease-in-out}.bcm-drawer__overlay--close{opacity:0;visibility:visible;transform:translateX(-100%)}.bcm-drawer__overlay--open{opacity:1;visibility:visible;transform:translateX(0)}';export{c as bcm_drawer}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,c as s,h as i,H as h,g as e}from"./p-da1055cb.js";import{C as o}from"./p-843905c8.js";import"./p-626a65e9.js";import{G as a}from"./p-92bf3f86.js";import"./p-08fb3095.js";import{S as r}from"./p-8d0ca8c2.js";import"./p-54bcf02f.js";import"./p-7e44e6b5.js";import{B as c}from"./p-a429e85b.js";import{d as n}from"./p-8c018ae0.js";import{F as w}from"./p-b60bcecf.js";import"./p-436364c8.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";class l{constructor({content:t,message:s,targetId:i,placement:h="top",color:e="slate-700",trigger:c="none",openDelay:l=0,closeDelay:p=0,autoHide:m=!1,emitShow:d=(()=>{}),emitHide:f=(()=>{})}){this.destroy=()=>{this.el=document.getElementById(this.id),this.el&&(this.el.remove(),this.emitHide()),this.removeListener()},this.bgColor=()=>o.twColor(this.color,700),this.exepcitonColors={white:"slate-300",black:"slate-700"},this.target=()=>document.getElementById(this.targetId),this.init=()=>{const t=`<div class="tw-z-[1] tw-rounded tw-py-2 tw-bg-${this.bgColor()}">\n ${this.message?`<div class="tw-font-medium tw-w-full tw-pb-1 tw-px-4">${r.trim(this.message)}</div>`:""}\n ${this.content?`<div class="tw-font-normal tw-px-4">${r.trim(this.content)}</div>`:""}\n </div>`;this.el=a.createElement("div",{id:`${this.targetId}-popover-box`,class:`\n tw-whitespace-normal tw-break-words tw-block tw-font-sans tw-pointer-events-none tw-max-w-[256px] tw-rounded tw-bg-${this.bgColor()} tw-text-white tw-text-3 tw-absolute tw-top-0 tw-left-0 tw-z-tooltip tw-opacity-0 tw-transition-opacity tw-duration-300\n tw-shadow`,role:"popover","aria-hidden":"true",style:`color: ${o.twColorReverse(this.bgColor())}`,innerHTML:t})},this.update=()=>{this.el=document.getElementById(this.id),this.el&&(this.hide(),this.show())},this.listener=()=>{if(window.addEventListener("resize",this.calculatePosition.bind(this)),window.addEventListener("scroll",this.calculatePosition.bind(this),!0),window.addEventListener("wheel",this.calculatePosition.bind(this)),this.trigger&&this.target())switch(this.trigger){case"click":this.target().addEventListener("click",this.toggle.bind(this)),this.autoHide&&this.target().addEventListener("mouseleave",this.hide.bind(this));break;case"hover":this.target().addEventListener("mouseenter",this.show.bind(this)),this.target().addEventListener("mouseleave",this.hide.bind(this));break;case"focus":this.target().addEventListener("focus",this.show.bind(this),!0),this.target().addEventListener("blur",this.hide.bind(this),!0)}this.calculatePosition()},this.removeListener=()=>{window.removeEventListener("resize",this.calculatePosition.bind(this)),window.removeEventListener("scroll",this.calculatePosition.bind(this),!0),window.removeEventListener("wheel",this.calculatePosition.bind(this)),this.target()&&(this.target().removeEventListener("click",this.toggle.bind(this)),this.target().removeEventListener("mouseenter",this.show.bind(this)),this.target().removeEventListener("mouseleave",this.hide.bind(this)),this.target().removeEventListener("focus",this.show.bind(this),!0),this.target().removeEventListener("blur",this.hide.bind(this),!0))},this.calculatePosition=()=>{this.el=document.getElementById(this.id),this.el&&w({ref:this.target(),floating:this.el,placement:this.placement,offset:8,arrow:!0,arrowColor:`tw-bg-${this.bgColor()}`})},this.show=async()=>{this.message?(this.init(),await n(this.openDelay),this.calculatePosition(),this.emitShow()):this.hide()},this.hide=async()=>{this.el=document.getElementById(this.id),this.el&&(await n(this.closeDelay),this.el.remove(),this.emitHide())},this.toggle=()=>{this.el=document.getElementById(this.id),this.el?this.hide():this.show()},this.content=t,this.message=s,this.targetId=i,this.placement=h,this.color=e,this.trigger=c,this.id=i+"-popover-box",this.openDelay=l,this.closeDelay=p,this.autoHide=m,this.emitShow=d,this.emitHide=f}}const p=class{constructor(i){t(this,i),this.bcmPopoverShow=s(this,"bcmPopoverShow",7),this.bcmPopoverHide=s(this,"bcmPopoverHide",7),this._id=a.UID(),this.message="",this.content="",this.placement=c.Placement.top,this.trigger=c.TriggerType.click,this.open=!1,this.color="white",this.openDelay=0,this.closeDelay=0,this.autoHide=!1,this.targetId=void 0,this.popover=void 0}emitShow(){this.bcmPopoverShow.emit()}emitHide(){this.bcmPopoverHide.emit()}connectedCallback(){this.popover=new l({targetId:this.targetId||this._id,content:this.content,message:this.message,placement:this.placement,color:this.color,trigger:this.trigger,openDelay:this.openDelay,closeDelay:this.closeDelay,autoHide:this.autoHide,emitShow:()=>this.emitShow(),emitHide:()=>this.emitHide()})}componentDidLoad(){this.popover.listener()}componentDidRender(){const{content:t,message:s,placement:i,color:h,trigger:e}=this;this.popover.content=t,this.popover.message=s,this.popover.placement=i,this.popover.color=h,this.popover.trigger=e,this.popover.openDelay=this.openDelay,this.popover.closeDelay=this.closeDelay,this.popover.autoHide=this.autoHide,this.popover.update()}disconnectedCallback(){this.popover.destroy()}async show(){this.popover.show()}async hide(){this.popover.hide()}async toggle(){this.popover.toggle()}render(){return i(h,{"aria-describedby":"popover",class:"tw-inline-flex tw-h-fit tw-w-fit"},i("slot",null))}get el(){return e(this)}};export{p as bcm_popover}
5
+ import{r as t,c as s,h as i,H as h,g as e}from"./p-6d7fe687.js";import{C as o}from"./p-843905c8.js";import"./p-626a65e9.js";import{G as a}from"./p-5f63beda.js";import"./p-294186b9.js";import{S as r}from"./p-8d0ca8c2.js";import"./p-159e5357.js";import"./p-7e44e6b5.js";import{B as c}from"./p-a429e85b.js";import{d as n}from"./p-8c018ae0.js";import{F as w}from"./p-b60bcecf.js";import"./p-436364c8.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";class l{constructor({content:t,message:s,targetId:i,placement:h="top",color:e="slate-700",trigger:c="none",openDelay:l=0,closeDelay:p=0,autoHide:d=!1,emitShow:m=(()=>{}),emitHide:u=(()=>{})}){this.destroy=()=>{this.el=document.getElementById(this.id),this.el&&(this.el.remove(),this.emitHide()),this.removeListener()},this.bgColor=()=>o.twColor(this.color,700),this.exepcitonColors={white:"slate-300",black:"slate-700"},this.target=()=>document.getElementById(this.targetId),this.init=()=>{const t=`<div class="tw-z-[1] tw-rounded tw-py-2 tw-bg-${this.bgColor()}">\n ${this.message?`<div class="tw-font-medium tw-w-full tw-pb-1 tw-px-4">${r.trim(this.message)}</div>`:""}\n ${this.content?`<div class="tw-font-normal tw-px-4">${r.trim(this.content)}</div>`:""}\n </div>`;this.el=a.createElement("div",{id:`${this.targetId}-popover-box`,class:`\n tw-whitespace-normal tw-break-words tw-block tw-font-sans tw-pointer-events-none tw-max-w-[256px] tw-rounded tw-bg-${this.bgColor()} tw-text-white tw-text-3 tw-absolute tw-top-0 tw-left-0 tw-z-tooltip tw-opacity-0 tw-transition-opacity tw-duration-300\n tw-shadow`,role:"popover","aria-hidden":"true",style:`color: ${o.twColorReverse(this.bgColor())}`,innerHTML:t})},this.update=()=>{this.el=document.getElementById(this.id),this.el&&(this.hide(),this.show())},this.listener=()=>{if(window.addEventListener("resize",this.calculatePosition.bind(this)),window.addEventListener("scroll",this.calculatePosition.bind(this),!0),window.addEventListener("wheel",this.calculatePosition.bind(this)),this.trigger&&this.target())switch(this.trigger){case"click":this.target().addEventListener("click",this.toggle.bind(this)),this.autoHide&&this.target().addEventListener("mouseleave",this.hide.bind(this));break;case"hover":this.target().addEventListener("mouseenter",this.show.bind(this)),this.target().addEventListener("mouseleave",this.hide.bind(this));break;case"focus":this.target().addEventListener("focus",this.show.bind(this),!0),this.target().addEventListener("blur",this.hide.bind(this),!0)}this.calculatePosition()},this.removeListener=()=>{window.removeEventListener("resize",this.calculatePosition.bind(this)),window.removeEventListener("scroll",this.calculatePosition.bind(this),!0),window.removeEventListener("wheel",this.calculatePosition.bind(this)),this.target()&&(this.target().removeEventListener("click",this.toggle.bind(this)),this.target().removeEventListener("mouseenter",this.show.bind(this)),this.target().removeEventListener("mouseleave",this.hide.bind(this)),this.target().removeEventListener("focus",this.show.bind(this),!0),this.target().removeEventListener("blur",this.hide.bind(this),!0))},this.calculatePosition=()=>{this.el=document.getElementById(this.id),this.el&&w({ref:this.target(),floating:this.el,placement:this.placement,offset:8,arrow:!0,arrowColor:`tw-bg-${this.bgColor()}`})},this.show=async()=>{this.message?(this.init(),await n(this.openDelay),this.calculatePosition(),this.emitShow()):this.hide()},this.hide=async()=>{this.el=document.getElementById(this.id),this.el&&(await n(this.closeDelay),this.el.remove(),this.emitHide())},this.toggle=()=>{this.el=document.getElementById(this.id),this.el?this.hide():this.show()},this.content=t,this.message=s,this.targetId=i,this.placement=h,this.color=e,this.trigger=c,this.id=i+"-popover-box",this.openDelay=l,this.closeDelay=p,this.autoHide=d,this.emitShow=m,this.emitHide=u}}const p=class{constructor(i){t(this,i),this.bcmPopoverShow=s(this,"bcmPopoverShow",7),this.bcmPopoverHide=s(this,"bcmPopoverHide",7),this._id=a.UID(),this.message="",this.content="",this.placement=c.Placement.top,this.trigger=c.TriggerType.click,this.open=!1,this.color="white",this.openDelay=0,this.closeDelay=0,this.autoHide=!1,this.targetId=void 0,this.popover=void 0}emitShow(){this.bcmPopoverShow.emit()}emitHide(){this.bcmPopoverHide.emit()}connectedCallback(){this.popover=new l({targetId:this.targetId||this._id,content:this.content,message:this.message,placement:this.placement,color:this.color,trigger:this.trigger,openDelay:this.openDelay,closeDelay:this.closeDelay,autoHide:this.autoHide,emitShow:()=>this.emitShow(),emitHide:()=>this.emitHide()})}componentDidLoad(){this.popover.listener()}componentDidRender(){const{content:t,message:s,placement:i,color:h,trigger:e}=this;this.popover.content=t,this.popover.message=s,this.popover.placement=i,this.popover.color=h,this.popover.trigger=e,this.popover.openDelay=this.openDelay,this.popover.closeDelay=this.closeDelay,this.popover.autoHide=this.autoHide,this.popover.update()}disconnectedCallback(){this.popover.destroy()}async show(){this.popover.show()}async hide(){this.popover.hide()}async toggle(){this.popover.toggle()}render(){return i(h,{"aria-describedby":"popover",class:"tw-inline-flex tw-h-fit tw-w-fit"},i("slot",null))}get el(){return e(this)}};export{p as bcm_popover}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{a as e,f as t}from"./p-da1055cb.js";const s=e=>!("isConnected"in e)||e.isConnected,n=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(s))})(...t)}),2e3)}})(),o=(s,o)=>{const r=((e,t=((e,t)=>e!==t))=>{let s=new Map(Object.entries(null!=e?e:{}));const n={dispose:[],get:[],set:[],reset:[]},o=()=>{s=new Map(Object.entries(null!=e?e:{})),n.reset.forEach((e=>e()))},r=e=>(n.get.forEach((t=>t(e))),s.get(e)),c=(e,o)=>{const r=s.get(e);t(o,r,e)&&(s.set(e,o),n.set.forEach((t=>t(e,o,r))))},a="undefined"==typeof Proxy?{}:new Proxy(e,{get:(e,t)=>r(t),ownKeys:()=>Array.from(s.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>s.has(t),set:(e,t,s)=>(c(t,s),!0)}),u=(e,t)=>(n[e].push(t),()=>{((e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)})(n[e],t)});return{state:a,get:r,set:c,on:u,onChange:(t,s)=>{const n=u("set",((e,n)=>{e===t&&s(n)})),o=u("reset",(()=>s(e[t])));return()=>{n(),o()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(u("set",t.set)),t.get&&e.push(u("get",t.get)),t.reset&&e.push(u("reset",t.reset)),t.dispose&&e.push(u("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{n.dispose.forEach((e=>e())),o()},reset:o,forceUpdate:e=>{const t=s.get(e);n.set.forEach((s=>s(e,t,t)))}}})(s,o);return r.use((()=>{if("function"!=typeof e)return{};const s=new Map;return{dispose:()=>s.clear(),get:t=>{const n=e();n&&((e,t,s)=>{const n=e.get(t);n?n.includes(s)||n.push(s):e.set(t,[s])})(s,t,n)},set:e=>{const o=s.get(e);o&&s.set(e,o.filter(t)),n(s)},reset:()=>{s.forEach((e=>e.forEach(t))),n(s)}}})()),r};export{o as c}
5
+ import{d as e,f as t}from"./p-6d7fe687.js";const s=e=>!("isConnected"in e)||e.isConnected,n=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(s))})(...t)}),2e3)}})(),o=(s,o)=>{const r=((e,t=((e,t)=>e!==t))=>{let s=new Map(Object.entries(null!=e?e:{}));const n={dispose:[],get:[],set:[],reset:[]},o=()=>{s=new Map(Object.entries(null!=e?e:{})),n.reset.forEach((e=>e()))},r=e=>(n.get.forEach((t=>t(e))),s.get(e)),c=(e,o)=>{const r=s.get(e);t(o,r,e)&&(s.set(e,o),n.set.forEach((t=>t(e,o,r))))},u="undefined"==typeof Proxy?{}:new Proxy(e,{get:(e,t)=>r(t),ownKeys:()=>Array.from(s.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>s.has(t),set:(e,t,s)=>(c(t,s),!0)}),p=(e,t)=>(n[e].push(t),()=>{((e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)})(n[e],t)});return{state:u,get:r,set:c,on:p,onChange:(t,s)=>{const n=p("set",((e,n)=>{e===t&&s(n)})),o=p("reset",(()=>s(e[t])));return()=>{n(),o()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(p("set",t.set)),t.get&&e.push(p("get",t.get)),t.reset&&e.push(p("reset",t.reset)),t.dispose&&e.push(p("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{n.dispose.forEach((e=>e())),o()},reset:o,forceUpdate:e=>{const t=s.get(e);n.set.forEach((s=>s(e,t,t)))}}})(s,o);return r.use((()=>{if("function"!=typeof e)return{};const s=new Map;return{dispose:()=>s.clear(),get:t=>{const n=e();n&&((e,t,s)=>{const n=e.get(t);n?n.includes(s)||n.push(s):e.set(t,[s])})(s,t,n)},set:e=>{const o=s.get(e);o&&s.set(e,o.filter(t)),n(s)},reset:()=>{s.forEach((e=>e.forEach(t))),n(s)}}})()),r};export{o as c}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{h as n}from"./p-da1055cb.js";import{d as e}from"./p-3fac58f7.js";import{a as s}from"./p-a429e85b.js";import{c as a}from"./p-d65a1e21.js";import{s as t}from"./p-92bf3f86.js";const i=({elementType:i,rows:o,id:c,internalId:r,type:l,placeholder:p,value:u,size:f,pattern:d,unit:b,unitPrefix:m,maxLength:x,disabled:w,clearable:h,focused:y,readonly:v,isPasswordVisible:C,passwordToggle:g,noDefaultIcon:j,inValid:_,captionType:k,resize:z,autocomplete:I,_suffix:T,_prefix:L,changePasswordVisibility:D,handleClear:O,steps:P,ref:V,handleBlur:B,handleFocus:F,handleInput:H,handleChange:M,isEyeDropperSupported:E,eyeDropper:S})=>{const q=s.HtmlElementType[i]||s.HtmlElementType.input;l="password"===l&&C?"text":l,u=t((()=>u),""),u=y?u:u+(u&&(null==b?void 0:b.length)>0?" "+b:"");const A="color"===(l=(null==b?void 0:b.length)>0&&!y?"text":l);l="color"===l?"text":l;var G=a("bcm-input__container",q===s.HtmlElementType.textarea&&a("bcm-input__textarea","textarea-size-"+s.Size[f],"resize-"+z,"textarea-"+f),q===s.HtmlElementType.input&&a("input-size-"+s.Size[f]),{focused:y,clearable:h,disabled:w,readonly:v,invalid:_,unit:(null==b?void 0:b.length)>0,error:"error"===k});const J=a("caret-container",{unit:(null==b?void 0:b.length)>0,disabled:w||v||_}),K="bcm-input__container--"+f,N=a(K,"unit-prefix");return n("div",{class:G,id:c+"-container"},n("span",{hidden:!0},n("slot",null)),n("span",{class:"input-prefix"},n("slot",{name:"prefix"}),L&&L.length>0&&n("span",{innerHTML:L}),m&&n("span",{class:N},m),A&&n("i",{class:"tw-flex tw-h-4 tw-w-4 tw-items-center tw-justify-center tw-rounded-full tw-border tw-border-slate-300",style:{backgroundColor:u}})),n(q,Object.assign({tabindex:"0",id:c+"-input","bcm-internal-id":r,class:"bcm-input-element "+K},q===s.HtmlElementType.input&&{type:l,autocomplete:I?"on":"off",pattern:d},q===s.HtmlElementType.textarea&&{rows:o,resize:z},{value:u,maxLength:x,placeholder:p,disabled:w,readOnly:v,ref:n=>V(n),onBlur:n=>(n=>{n.target.parentElement.classList.remove("focused"),B(n)})(n),onFocus:n=>(n=>{n.target.parentElement.classList.add("focused"),F(n)})(n),onInput:n=>H(n),onChange:n=>M(n)})),n("span",{class:"input-suffix-content"},h&&!w&&!v&&n("span",{class:"input-suffix input-suffix-button input-clear-button",onClick:n=>O(n)},n("bcm-icon",{icon:"far fa-times"}))),n("span",{class:"input-suffix-content"},("password"===l||"text"===l)&&g&&n("span",{class:"input-suffix input-suffix-button",onClick:()=>D()},n("bcm-icon",{icon:C?"far fa-eye-slash":"far fa-eye"}))),n("span",{class:"input-suffix-content"},Object.keys(e).includes(l)&&!j&&n("span",{class:"input-suffix"},n("bcm-icon",{icon:e[l]}))),n("span",{class:"input-suffix-content"},"number"===l&&n("div",{class:J},n("span",{class:"bcm-input-caret",onClick:()=>P("up")},n("bcm-icon",{icon:"fas fa-caret-up"})),n("span",{class:"bcm-input-caret",onClick:()=>P("down")},n("bcm-icon",{icon:"fas fa-caret-down"})))),n("span",{class:"input-suffix-content"},"number"!==l&&n("span",{class:"input-suffix"},n("slot",{name:"suffix"}),T&&T.length>0&&n("span",{innerHTML:T})),A&&E()&&n("span",{class:"input-suffix"},n("span",null,n("i",{class:"far fa-eye-dropper",onClick:()=>S()})))))};export{i as I}
5
+ import{h as n}from"./p-6d7fe687.js";import{d as e}from"./p-3fac58f7.js";import{a as s}from"./p-a429e85b.js";import{c as a}from"./p-d65a1e21.js";import{s as t}from"./p-5f63beda.js";const i=({elementType:i,rows:o,id:r,internalId:c,type:l,placeholder:p,value:u,size:f,pattern:d,unit:m,unitPrefix:b,maxLength:x,disabled:w,clearable:h,focused:y,readonly:v,isPasswordVisible:C,passwordToggle:g,noDefaultIcon:j,inValid:_,captionType:k,resize:z,autocomplete:I,_suffix:T,_prefix:L,changePasswordVisibility:D,handleClear:O,steps:P,ref:V,handleBlur:B,handleFocus:F,handleInput:H,handleChange:M,isEyeDropperSupported:E,eyeDropper:S})=>{const q=s.HtmlElementType[i]||s.HtmlElementType.input;l="password"===l&&C?"text":l,u=t((()=>u),""),u=y?u:u+(u&&(null==m?void 0:m.length)>0?" "+m:"");const A="color"===(l=(null==m?void 0:m.length)>0&&!y?"text":l);l="color"===l?"text":l;var G=a("bcm-input__container",q===s.HtmlElementType.textarea&&a("bcm-input__textarea","textarea-size-"+s.Size[f],"resize-"+z,"textarea-"+f),q===s.HtmlElementType.input&&a("input-size-"+s.Size[f]),{focused:y,clearable:h,disabled:w,readonly:v,invalid:_,unit:(null==m?void 0:m.length)>0,error:"error"===k});const J=a("caret-container",{unit:(null==m?void 0:m.length)>0,disabled:w||v||_}),K="bcm-input__container--"+f,N=a(K,"unit-prefix");return n("div",{class:G,id:r+"-container"},n("span",{hidden:!0},n("slot",null)),n("span",{class:"input-prefix"},n("slot",{name:"prefix"}),L&&L.length>0&&n("span",{innerHTML:L}),b&&n("span",{class:N},b),A&&n("i",{class:"tw-flex tw-h-4 tw-w-4 tw-items-center tw-justify-center tw-rounded-full tw-border tw-border-slate-300",style:{backgroundColor:u}})),n(q,Object.assign({tabindex:"0",id:r+"-input","bcm-internal-id":c,class:"bcm-input-element "+K},q===s.HtmlElementType.input&&{type:l,autocomplete:I?"on":"off",pattern:d},q===s.HtmlElementType.textarea&&{rows:o,resize:z},{value:u,maxLength:x,placeholder:p,disabled:w,readOnly:v,ref:n=>V(n),onBlur:n=>(n=>{n.target.parentElement.classList.remove("focused"),B(n)})(n),onFocus:n=>(n=>{n.target.parentElement.classList.add("focused"),F(n)})(n),onInput:n=>H(n),onChange:n=>M(n)})),n("span",{class:"input-suffix-content"},h&&!w&&!v&&n("span",{class:"input-suffix input-suffix-button input-clear-button",onClick:n=>O(n)},n("bcm-icon",{icon:"far fa-times"}))),n("span",{class:"input-suffix-content"},("password"===l||"text"===l)&&g&&n("span",{class:"input-suffix input-suffix-button",onClick:()=>D()},n("bcm-icon",{icon:C?"far fa-eye-slash":"far fa-eye"}))),n("span",{class:"input-suffix-content"},Object.keys(e).includes(l)&&!j&&n("span",{class:"input-suffix"},n("bcm-icon",{icon:e[l]}))),n("span",{class:"input-suffix-content"},"number"===l&&n("div",{class:J},n("span",{class:"bcm-input-caret",onClick:()=>P("up")},n("bcm-icon",{icon:"fas fa-caret-up"})),n("span",{class:"bcm-input-caret",onClick:()=>P("down")},n("bcm-icon",{icon:"fas fa-caret-down"})))),n("span",{class:"input-suffix-content"},"number"!==l&&n("span",{class:"input-suffix"},n("slot",{name:"suffix"}),T&&T.length>0&&n("span",{innerHTML:T})),A&&E()&&n("span",{class:"input-suffix"},n("span",null,n("i",{class:"far fa-eye-dropper",onClick:()=>S()})))))};export{i as I}