@mhmo91/schmancy 0.7.5 → 0.7.7

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 (399) hide show
  1. package/ai/details.md +309 -44
  2. package/ai/directives.md +214 -7
  3. package/ai/typewriter.md +151 -33
  4. package/dist/ai/details.md +309 -44
  5. package/dist/ai/directives.md +214 -7
  6. package/dist/ai/typewriter.md +151 -33
  7. package/dist/{animated-text-DnFenRS1.cjs → animated-text-Be290e6l.cjs} +2 -2
  8. package/dist/{animated-text-DnFenRS1.cjs.map → animated-text-Be290e6l.cjs.map} +1 -1
  9. package/dist/{animated-text-YBgWXuVJ.js → animated-text-DuLrWJ6O.js} +3 -3
  10. package/dist/{animated-text-YBgWXuVJ.js.map → animated-text-DuLrWJ6O.js.map} +1 -1
  11. package/dist/animated-text.cjs +1 -1
  12. package/dist/animated-text.js +1 -1
  13. package/dist/area.cjs +1 -1
  14. package/dist/{area.component-C_nUxyiY.js → area.component-BzjJiNTJ.js} +47 -39
  15. package/dist/area.component-BzjJiNTJ.js.map +1 -0
  16. package/dist/{area.component-BojFAcRk.cjs → area.component-FL_IUylM.cjs} +4 -4
  17. package/dist/area.component-FL_IUylM.cjs.map +1 -0
  18. package/dist/area.js +1 -1
  19. package/dist/{autocomplete-B8oOdRsV.cjs → autocomplete-CHmGhBNt.cjs} +2 -2
  20. package/dist/{autocomplete-B8oOdRsV.cjs.map → autocomplete-CHmGhBNt.cjs.map} +1 -1
  21. package/dist/{autocomplete-B-X_D8MC.js → autocomplete-FLkd9ju8.js} +5 -5
  22. package/dist/{autocomplete-B-X_D8MC.js.map → autocomplete-FLkd9ju8.js.map} +1 -1
  23. package/dist/autocomplete.cjs +1 -1
  24. package/dist/autocomplete.js +1 -1
  25. package/dist/{avatar-DBdyON6Y.cjs → avatar-B_uJN9WV.cjs} +2 -2
  26. package/dist/{avatar-DBdyON6Y.cjs.map → avatar-B_uJN9WV.cjs.map} +1 -1
  27. package/dist/{avatar-Cro3M4Lw.js → avatar-C8P4lVfa.js} +52 -52
  28. package/dist/{avatar-Cro3M4Lw.js.map → avatar-C8P4lVfa.js.map} +1 -1
  29. package/dist/badge.cjs +1 -1
  30. package/dist/badge.js +1 -1
  31. package/dist/boat-Ma6LW-ny.js +301 -0
  32. package/dist/boat-Ma6LW-ny.js.map +1 -0
  33. package/dist/boat-kYOUec8f.cjs +97 -0
  34. package/dist/boat-kYOUec8f.cjs.map +1 -0
  35. package/dist/boat.cjs +1 -1
  36. package/dist/boat.js +1 -1
  37. package/dist/busy.cjs +1 -1
  38. package/dist/busy.js +1 -1
  39. package/dist/button.cjs +1 -1
  40. package/dist/button.js +1 -1
  41. package/dist/card.cjs +1 -1
  42. package/dist/card.js +1 -1
  43. package/dist/{checkbox-DMfwDgYx.cjs → checkbox-DLZkKaon.cjs} +2 -2
  44. package/dist/{checkbox-DMfwDgYx.cjs.map → checkbox-DLZkKaon.cjs.map} +1 -1
  45. package/dist/{checkbox-BOmazo-k.js → checkbox-x46L-XTG.js} +2 -2
  46. package/dist/{checkbox-BOmazo-k.js.map → checkbox-x46L-XTG.js.map} +1 -1
  47. package/dist/checkbox.cjs +1 -1
  48. package/dist/checkbox.js +1 -1
  49. package/dist/chips.cjs +1 -1
  50. package/dist/chips.js +2 -2
  51. package/dist/code-highlight.cjs +1 -1
  52. package/dist/code-highlight.js +1 -1
  53. package/dist/{code-preview-CbZzYTk2.cjs → code-preview-BsQq77nu.cjs} +2 -2
  54. package/dist/{code-preview-CbZzYTk2.cjs.map → code-preview-BsQq77nu.cjs.map} +1 -1
  55. package/dist/{code-preview-DgyY3Jlw.js → code-preview-C3DLglSl.js} +2 -2
  56. package/dist/{code-preview-DgyY3Jlw.js.map → code-preview-C3DLglSl.js.map} +1 -1
  57. package/dist/components.cjs +1 -1
  58. package/dist/components.js +1 -1
  59. package/dist/content-drawer.cjs +1 -1
  60. package/dist/content-drawer.js +1 -1
  61. package/dist/{date-range-BV0479CW.js → date-range-Cm0TCfwu.js} +3 -3
  62. package/dist/{date-range-BV0479CW.js.map → date-range-Cm0TCfwu.js.map} +1 -1
  63. package/dist/{date-range-47SnbVM6.cjs → date-range-Cy97kOP_.cjs} +2 -2
  64. package/dist/{date-range-47SnbVM6.cjs.map → date-range-Cy97kOP_.cjs.map} +1 -1
  65. package/dist/{date-range-inline-GfLao0NN.js → date-range-inline-CfDu-lIo.js} +3 -3
  66. package/dist/{date-range-inline-GfLao0NN.js.map → date-range-inline-CfDu-lIo.js.map} +1 -1
  67. package/dist/{date-range-inline-HNDLTnYi.cjs → date-range-inline-cGptw0hr.cjs} +2 -2
  68. package/dist/{date-range-inline-HNDLTnYi.cjs.map → date-range-inline-cGptw0hr.cjs.map} +1 -1
  69. package/dist/date-range-inline.cjs +1 -1
  70. package/dist/date-range-inline.js +1 -1
  71. package/dist/date-range.cjs +1 -1
  72. package/dist/date-range.js +1 -1
  73. package/dist/{delay-B40l99jW.js → delay-BINGOQ7f.js} +2 -2
  74. package/dist/{delay-B40l99jW.js.map → delay-BINGOQ7f.js.map} +1 -1
  75. package/dist/{delay-Dr3Fr5YB.cjs → delay-CXFIM6qK.cjs} +2 -2
  76. package/dist/{delay-Dr3Fr5YB.cjs.map → delay-CXFIM6qK.cjs.map} +1 -1
  77. package/dist/delay.cjs +1 -1
  78. package/dist/delay.js +1 -1
  79. package/dist/details-CLRikV4s.cjs +64 -0
  80. package/dist/details-CLRikV4s.cjs.map +1 -0
  81. package/dist/details-bgq2X_hO.js +115 -0
  82. package/dist/details-bgq2X_hO.js.map +1 -0
  83. package/dist/details.cjs +1 -1
  84. package/dist/details.js +1 -1
  85. package/dist/{dialog-content-Emd7BLQA.cjs → dialog-content-B59ekS_y.cjs} +2 -2
  86. package/dist/{dialog-content-Emd7BLQA.cjs.map → dialog-content-B59ekS_y.cjs.map} +1 -1
  87. package/dist/{dialog-content-B_amCfq7.js → dialog-content-Cu7fqN8Y.js} +3 -3
  88. package/dist/{dialog-content-B_amCfq7.js.map → dialog-content-Cu7fqN8Y.js.map} +1 -1
  89. package/dist/dialog.cjs +1 -1
  90. package/dist/dialog.js +1 -1
  91. package/dist/directives.cjs +1 -1
  92. package/dist/directives.js +10 -6
  93. package/dist/divider-8tk2mDbL.cjs +58 -0
  94. package/dist/divider-8tk2mDbL.cjs.map +1 -0
  95. package/dist/divider-Bu6tzwGl.js +84 -0
  96. package/dist/divider-Bu6tzwGl.js.map +1 -0
  97. package/dist/divider.cjs +1 -1
  98. package/dist/divider.js +1 -1
  99. package/dist/{dropdown-content-BpJq8Q1u.cjs → dropdown-content-DFb07S8x.cjs} +2 -2
  100. package/dist/{dropdown-content-BpJq8Q1u.cjs.map → dropdown-content-DFb07S8x.cjs.map} +1 -1
  101. package/dist/{dropdown-content-Bw9jnfCR.js → dropdown-content-fVhnEKdY.js} +3 -3
  102. package/dist/{dropdown-content-Bw9jnfCR.js.map → dropdown-content-fVhnEKdY.js.map} +1 -1
  103. package/dist/dropdown.cjs +1 -1
  104. package/dist/dropdown.js +1 -1
  105. package/dist/{email-recipients-Bxvu6zi9.cjs → email-recipients-BG3GxJvc.cjs} +2 -2
  106. package/dist/{email-recipients-Bxvu6zi9.cjs.map → email-recipients-BG3GxJvc.cjs.map} +1 -1
  107. package/dist/{email-recipients-DZGMhyg4.js → email-recipients-OG52RGiH.js} +6 -6
  108. package/dist/{email-recipients-DZGMhyg4.js.map → email-recipients-OG52RGiH.js.map} +1 -1
  109. package/dist/extra.cjs +1 -1
  110. package/dist/extra.js +1 -1
  111. package/dist/{flex-DUgMxT_9.js → flex-CYQU6Pf8.js} +2 -2
  112. package/dist/{flex-DUgMxT_9.js.map → flex-CYQU6Pf8.js.map} +1 -1
  113. package/dist/{flex-DakK9gco.cjs → flex-DytMcHmq.cjs} +2 -2
  114. package/dist/{flex-DakK9gco.cjs.map → flex-DytMcHmq.cjs.map} +1 -1
  115. package/dist/{form-CPmMvWvE.cjs → form-cWJBcwc6.cjs} +2 -2
  116. package/dist/{form-CPmMvWvE.cjs.map → form-cWJBcwc6.cjs.map} +1 -1
  117. package/dist/{form-yZ1fh3h9.js → form-tpyd1nsT.js} +2 -2
  118. package/dist/{form-yZ1fh3h9.js.map → form-tpyd1nsT.js.map} +1 -1
  119. package/dist/form.cjs +1 -1
  120. package/dist/form.js +1 -1
  121. package/dist/{formField.mixin-Cmb9YpmX.js → formField.mixin-Mx5CwYUh.js} +2 -2
  122. package/dist/{formField.mixin-Cmb9YpmX.js.map → formField.mixin-Mx5CwYUh.js.map} +1 -1
  123. package/dist/{formField.mixin-D51klHq7.cjs → formField.mixin-XlN2pAL0.cjs} +2 -2
  124. package/dist/{formField.mixin-D51klHq7.cjs.map → formField.mixin-XlN2pAL0.cjs.map} +1 -1
  125. package/dist/{icon-Dsa_BddL.cjs → icon-C8Q_XMtJ.cjs} +2 -2
  126. package/dist/{icon-Dsa_BddL.cjs.map → icon-C8Q_XMtJ.cjs.map} +1 -1
  127. package/dist/{icon-DHT8YsE3.js → icon-Y2qLOFqe.js} +2 -2
  128. package/dist/{icon-DHT8YsE3.js.map → icon-Y2qLOFqe.js.map} +1 -1
  129. package/dist/{icon-button-PpRHFLCj.js → icon-button-CJ6AVTv9.js} +19 -19
  130. package/dist/icon-button-CJ6AVTv9.js.map +1 -0
  131. package/dist/{icon-button-BRcfLsJL.cjs → icon-button-IdG1NVgA.cjs} +8 -8
  132. package/dist/icon-button-IdG1NVgA.cjs.map +1 -0
  133. package/dist/icons.cjs +1 -1
  134. package/dist/icons.js +1 -1
  135. package/dist/index.cjs +1 -1
  136. package/dist/index.js +196 -192
  137. package/dist/{input-CYGSlByl.js → input-DDCFZ3cr.js} +4 -4
  138. package/dist/{input-CYGSlByl.js.map → input-DDCFZ3cr.js.map} +1 -1
  139. package/dist/input-UyknNHNr.cjs +51 -0
  140. package/dist/{input-DB269a2X.cjs.map → input-UyknNHNr.cjs.map} +1 -1
  141. package/dist/{input-chip-CKYO8Lww.cjs → input-chip-Bht9MU9G.cjs} +2 -2
  142. package/dist/{input-chip-CKYO8Lww.cjs.map → input-chip-Bht9MU9G.cjs.map} +1 -1
  143. package/dist/{input-chip-CTKPIRVA.js → input-chip-DVE4_1wn.js} +2 -2
  144. package/dist/{input-chip-CTKPIRVA.js.map → input-chip-DVE4_1wn.js.map} +1 -1
  145. package/dist/input.cjs +1 -1
  146. package/dist/input.js +1 -1
  147. package/dist/layout.cjs +1 -1
  148. package/dist/layout.js +1 -1
  149. package/dist/{list-BbzeVuby.js → list-BO1gnjmc.js} +2 -2
  150. package/dist/{list-BbzeVuby.js.map → list-BO1gnjmc.js.map} +1 -1
  151. package/dist/{list-BQVTFNkq.cjs → list-Bac329kq.cjs} +2 -2
  152. package/dist/{list-BQVTFNkq.cjs.map → list-Bac329kq.cjs.map} +1 -1
  153. package/dist/list.cjs +1 -1
  154. package/dist/list.js +1 -1
  155. package/dist/{litElement.mixin-DzCpXwcY.cjs → litElement.mixin-B1WTI3WY.cjs} +2 -2
  156. package/dist/{litElement.mixin-DzCpXwcY.cjs.map → litElement.mixin-B1WTI3WY.cjs.map} +1 -1
  157. package/dist/{litElement.mixin-BzbZQbxa.js → litElement.mixin-CVje6z-M.js} +2 -2
  158. package/dist/{litElement.mixin-BzbZQbxa.js.map → litElement.mixin-CVje6z-M.js.map} +1 -1
  159. package/dist/mailbox.cjs +1 -1
  160. package/dist/mailbox.js +1 -1
  161. package/dist/{map-DuTFI2lm.cjs → map-BlmS6Zfx.cjs} +2 -2
  162. package/dist/{map-DuTFI2lm.cjs.map → map-BlmS6Zfx.cjs.map} +1 -1
  163. package/dist/{map-CgwU5Px4.js → map-C1jVMhlF.js} +2 -2
  164. package/dist/{map-CgwU5Px4.js.map → map-C1jVMhlF.js.map} +1 -1
  165. package/dist/map.cjs +1 -1
  166. package/dist/map.js +1 -1
  167. package/dist/{media-BnktmFRW.js → media-CNMZbEJe.js} +2 -2
  168. package/dist/{media-BnktmFRW.js.map → media-CNMZbEJe.js.map} +1 -1
  169. package/dist/{media-gtpSHRFx.cjs → media-CxfrOjie.cjs} +2 -2
  170. package/dist/{media-gtpSHRFx.cjs.map → media-CxfrOjie.cjs.map} +1 -1
  171. package/dist/menu-CUKV4pVJ.js +61 -0
  172. package/dist/menu-CUKV4pVJ.js.map +1 -0
  173. package/dist/menu-DEa2K7Pk.cjs +26 -0
  174. package/dist/menu-DEa2K7Pk.cjs.map +1 -0
  175. package/dist/menu.cjs +1 -1
  176. package/dist/menu.js +1 -1
  177. package/dist/mixins.cjs +1 -1
  178. package/dist/mixins.js +3 -3
  179. package/dist/nav-drawer.cjs +1 -1
  180. package/dist/nav-drawer.js +1 -1
  181. package/dist/navigation-bar.cjs +1 -1
  182. package/dist/navigation-bar.js +1 -1
  183. package/dist/{navigation-rail-CUMNSz0h.js → navigation-rail-CYKfvZs9.js} +3 -3
  184. package/dist/{navigation-rail-CUMNSz0h.js.map → navigation-rail-CYKfvZs9.js.map} +1 -1
  185. package/dist/{navigation-rail-D8otIR2P.cjs → navigation-rail-DXr4NJnN.cjs} +2 -2
  186. package/dist/{navigation-rail-D8otIR2P.cjs.map → navigation-rail-DXr4NJnN.cjs.map} +1 -1
  187. package/dist/navigation-rail.cjs +1 -1
  188. package/dist/navigation-rail.js +1 -1
  189. package/dist/{notification-service-E16lPsiT.js → notification-service-CZ56fXew.js} +5 -5
  190. package/dist/{notification-service-E16lPsiT.js.map → notification-service-CZ56fXew.js.map} +1 -1
  191. package/dist/{notification-service-CP6kGXVL.cjs → notification-service-DQGs9O0f.cjs} +2 -2
  192. package/dist/{notification-service-CP6kGXVL.cjs.map → notification-service-DQGs9O0f.cjs.map} +1 -1
  193. package/dist/notification.cjs +1 -1
  194. package/dist/notification.js +2 -2
  195. package/dist/{notify-D865xIlu.js → notify-KvHZ-8z9.js} +2 -2
  196. package/dist/{notify-D865xIlu.js.map → notify-KvHZ-8z9.js.map} +1 -1
  197. package/dist/{notify-Czdp7BbG.cjs → notify-VkDx6hMZ.cjs} +2 -2
  198. package/dist/{notify-Czdp7BbG.cjs.map → notify-VkDx6hMZ.cjs.map} +1 -1
  199. package/dist/{option-cJ8fM5qJ.js → option-DnRdbsTb.js} +2 -2
  200. package/dist/{option-cJ8fM5qJ.js.map → option-DnRdbsTb.js.map} +1 -1
  201. package/dist/{option-B1r0hb3H.cjs → option-Eh2AXe-Z.cjs} +2 -2
  202. package/dist/{option-B1r0hb3H.cjs.map → option-Eh2AXe-Z.cjs.map} +1 -1
  203. package/dist/option.cjs +1 -1
  204. package/dist/option.js +1 -1
  205. package/dist/{payment-card-form-EO3auDS8.cjs → payment-card-form-8a4Nqqhy.cjs} +2 -2
  206. package/dist/{payment-card-form-EO3auDS8.cjs.map → payment-card-form-8a4Nqqhy.cjs.map} +1 -1
  207. package/dist/{payment-card-form-RBjpMc2m.js → payment-card-form-EVQEb5OX.js} +3 -3
  208. package/dist/{payment-card-form-RBjpMc2m.js.map → payment-card-form-EVQEb5OX.js.map} +1 -1
  209. package/dist/{progress-4v9FzvOT.js → progress-D5kgn2Fg.js} +2 -2
  210. package/dist/{progress-4v9FzvOT.js.map → progress-D5kgn2Fg.js.map} +1 -1
  211. package/dist/{progress-DnhvJMz_.cjs → progress-yFxoJDYf.cjs} +2 -2
  212. package/dist/{progress-DnhvJMz_.cjs.map → progress-yFxoJDYf.cjs.map} +1 -1
  213. package/dist/progress.cjs +1 -1
  214. package/dist/progress.js +1 -1
  215. package/dist/{radio-button-BVegeFKE.cjs → radio-button-BTdqEOSJ.cjs} +2 -2
  216. package/dist/{radio-button-BVegeFKE.cjs.map → radio-button-BTdqEOSJ.cjs.map} +1 -1
  217. package/dist/{radio-button-DDavzgCz.js → radio-button-QCukBJLy.js} +3 -3
  218. package/dist/{radio-button-DDavzgCz.js.map → radio-button-QCukBJLy.js.map} +1 -1
  219. package/dist/radio-group.cjs +1 -1
  220. package/dist/radio-group.js +1 -1
  221. package/dist/ripple-QoNZUUw_.js +148 -0
  222. package/dist/ripple-QoNZUUw_.js.map +1 -0
  223. package/dist/ripple-Ujq_REH4.cjs +16 -0
  224. package/dist/ripple-Ujq_REH4.cjs.map +1 -0
  225. package/dist/{schmancy-steps-container-s6kZWhcr.cjs → schmancy-steps-container-CtwqkRBU.cjs} +2 -2
  226. package/dist/{schmancy-steps-container-s6kZWhcr.cjs.map → schmancy-steps-container-CtwqkRBU.cjs.map} +1 -1
  227. package/dist/{schmancy-steps-container-DN9c-HeX.js → schmancy-steps-container-NZOamraF.js} +2 -2
  228. package/dist/{schmancy-steps-container-DN9c-HeX.js.map → schmancy-steps-container-NZOamraF.js.map} +1 -1
  229. package/dist/search-B1s7thB0.cjs +2 -0
  230. package/dist/search-B1s7thB0.cjs.map +1 -0
  231. package/dist/search-DxxnLa5u.js +95 -0
  232. package/dist/search-DxxnLa5u.js.map +1 -0
  233. package/dist/{select-DVT_kFNR.cjs → select-C-Kv7ey_.cjs} +2 -2
  234. package/dist/{select-DVT_kFNR.cjs.map → select-C-Kv7ey_.cjs.map} +1 -1
  235. package/dist/{select--D6l5ru7.js → select-DSTQ-Zau.js} +4 -4
  236. package/dist/{select--D6l5ru7.js.map → select-DSTQ-Zau.js.map} +1 -1
  237. package/dist/select.cjs +1 -1
  238. package/dist/select.js +1 -1
  239. package/dist/selector-hook-Cok22ifx.cjs +2 -0
  240. package/dist/selector-hook-Cok22ifx.cjs.map +1 -0
  241. package/dist/selector-hook-l2fe2UO5.js +319 -0
  242. package/dist/selector-hook-l2fe2UO5.js.map +1 -0
  243. package/dist/{sheet-CNn_huhz.js → sheet-DY-z5_tm.js} +14 -14
  244. package/dist/sheet-DY-z5_tm.js.map +1 -0
  245. package/dist/{sheet-Bza5jVS2.cjs → sheet-IzYy3H8n.cjs} +4 -4
  246. package/dist/sheet-IzYy3H8n.cjs.map +1 -0
  247. package/dist/sheet.cjs +1 -1
  248. package/dist/sheet.js +2 -2
  249. package/dist/{sheet.service--zUgftN3.cjs → sheet.service-BNz-ird-.cjs} +2 -2
  250. package/dist/{sheet.service--zUgftN3.cjs.map → sheet.service-BNz-ird-.cjs.map} +1 -1
  251. package/dist/{sheet.service-CmNDL4f6.js → sheet.service-DuVcXyOB.js} +2 -2
  252. package/dist/{sheet.service-CmNDL4f6.js.map → sheet.service-DuVcXyOB.js.map} +1 -1
  253. package/dist/{slider-DPxBmmFD.js → slider-CFtbSQ9Y.js} +3 -3
  254. package/dist/{slider-DPxBmmFD.js.map → slider-CFtbSQ9Y.js.map} +1 -1
  255. package/dist/{slider-Cf0pED-U.cjs → slider-CGE_Qeok.cjs} +2 -2
  256. package/dist/{slider-Cf0pED-U.cjs.map → slider-CGE_Qeok.cjs.map} +1 -1
  257. package/dist/slider.cjs +1 -1
  258. package/dist/slider.js +1 -1
  259. package/dist/{spinner-BDSDxr_W.cjs → spinner-CSPJs8CL.cjs} +3 -3
  260. package/dist/spinner-CSPJs8CL.cjs.map +1 -0
  261. package/dist/{spinner-Dyz6HBFa.js → spinner-DAF-hCvQ.js} +3 -3
  262. package/dist/spinner-DAF-hCvQ.js.map +1 -0
  263. package/dist/steps.cjs +1 -1
  264. package/dist/steps.js +1 -1
  265. package/dist/store.cjs +1 -1
  266. package/dist/store.js +1 -1
  267. package/dist/{suggestion-chip-CCW8g_3S.js → suggestion-chip-CYu-4xrL.js} +3 -3
  268. package/dist/{suggestion-chip-CCW8g_3S.js.map → suggestion-chip-CYu-4xrL.js.map} +1 -1
  269. package/dist/{suggestion-chip-B7COqb4l.cjs → suggestion-chip-Cj8gwZqq.cjs} +2 -2
  270. package/dist/{suggestion-chip-B7COqb4l.cjs.map → suggestion-chip-Cj8gwZqq.cjs.map} +1 -1
  271. package/dist/{surface-B4CxtF38.js → surface-DTOK-0E4.js} +34 -10
  272. package/dist/{surface-B4CxtF38.js.map → surface-DTOK-0E4.js.map} +1 -1
  273. package/dist/{surface-CkzbeSYN.cjs → surface-VX_THUHv.cjs} +27 -3
  274. package/dist/{surface-CkzbeSYN.cjs.map → surface-VX_THUHv.cjs.map} +1 -1
  275. package/dist/surface.cjs +1 -1
  276. package/dist/surface.js +1 -1
  277. package/dist/{table-D-g4ZBys.cjs → table-BV0-o9Wi.cjs} +4 -3
  278. package/dist/{table-D-g4ZBys.cjs.map → table-BV0-o9Wi.cjs.map} +1 -1
  279. package/dist/{table-KPNVMJtn.js → table-CkXbXqi9.js} +14 -10
  280. package/dist/{table-KPNVMJtn.js.map → table-CkXbXqi9.js.map} +1 -1
  281. package/dist/table.cjs +1 -1
  282. package/dist/table.js +1 -1
  283. package/dist/{tabs-compatibility-xUK4vD1M.js → tabs-compatibility-D_BBW655.js} +2 -2
  284. package/dist/{tabs-compatibility-xUK4vD1M.js.map → tabs-compatibility-D_BBW655.js.map} +1 -1
  285. package/dist/{tabs-compatibility-sMoQP12I.cjs → tabs-compatibility-DsfD60U_.cjs} +2 -2
  286. package/dist/{tabs-compatibility-sMoQP12I.cjs.map → tabs-compatibility-DsfD60U_.cjs.map} +1 -1
  287. package/dist/tabs.cjs +1 -1
  288. package/dist/tabs.js +1 -1
  289. package/dist/tailwind.mixin-JFXu3GSo.cjs +2 -0
  290. package/dist/{tailwind.mixin-scDxsqaX.cjs.map → tailwind.mixin-JFXu3GSo.cjs.map} +1 -1
  291. package/dist/tailwind.mixin-wLaKUxf1.js +67 -0
  292. package/dist/{tailwind.mixin-xIIxrXd8.js.map → tailwind.mixin-wLaKUxf1.js.map} +1 -1
  293. package/dist/teleport.cjs +1 -1
  294. package/dist/teleport.js +1 -1
  295. package/dist/{textarea-BSBYVs99.cjs → textarea-B6LDhRed.cjs} +2 -2
  296. package/dist/{textarea-BSBYVs99.cjs.map → textarea-B6LDhRed.cjs.map} +1 -1
  297. package/dist/{textarea-CFrirT5y.js → textarea-TeVnUeIJ.js} +3 -3
  298. package/dist/{textarea-CFrirT5y.js.map → textarea-TeVnUeIJ.js.map} +1 -1
  299. package/dist/textarea.cjs +1 -1
  300. package/dist/textarea.js +1 -1
  301. package/dist/{theme-button-D-LTPh88.js → theme-button-BXXqAu2Y.js} +2 -2
  302. package/dist/{theme-button-D-LTPh88.js.map → theme-button-BXXqAu2Y.js.map} +1 -1
  303. package/dist/{theme-button-B8Xqrz1M.cjs → theme-button-DxMbO3yP.cjs} +2 -2
  304. package/dist/{theme-button-B8Xqrz1M.cjs.map → theme-button-DxMbO3yP.cjs.map} +1 -1
  305. package/dist/theme-button.cjs +1 -1
  306. package/dist/theme-button.js +1 -1
  307. package/dist/{theme-controller-boat-C2F-qRyu.cjs → theme-controller-boat-CCBNOGxF.cjs} +2 -2
  308. package/dist/{theme-controller-boat-C2F-qRyu.cjs.map → theme-controller-boat-CCBNOGxF.cjs.map} +1 -1
  309. package/dist/{theme-controller-boat-BOddzVdU.js → theme-controller-boat-CVS77gnH.js} +3 -3
  310. package/dist/{theme-controller-boat-BOddzVdU.js.map → theme-controller-boat-CVS77gnH.js.map} +1 -1
  311. package/dist/theme.cjs +1 -1
  312. package/dist/theme.js +1 -1
  313. package/dist/{timezone-xHmnktrm.cjs → timezone-D7YOMM8G.cjs} +2 -2
  314. package/dist/{timezone-xHmnktrm.cjs.map → timezone-D7YOMM8G.cjs.map} +1 -1
  315. package/dist/{timezone-BvOWa9Nt.js → timezone-RBV74f85.js} +3 -3
  316. package/dist/{timezone-BvOWa9Nt.js.map → timezone-RBV74f85.js.map} +1 -1
  317. package/dist/{tooltip-D24v5bvM.cjs → tooltip-BH_RLoZI.cjs} +2 -2
  318. package/dist/{tooltip-D24v5bvM.cjs.map → tooltip-BH_RLoZI.cjs.map} +1 -1
  319. package/dist/{tooltip-D3ZZJEAk.js → tooltip-DssL6Qfx.js} +2 -2
  320. package/dist/{tooltip-D3ZZJEAk.js.map → tooltip-DssL6Qfx.js.map} +1 -1
  321. package/dist/tooltip.cjs +1 -1
  322. package/dist/tooltip.js +1 -1
  323. package/dist/{tree-DC_jbDRu.cjs → tree-7Zz1sJKl.cjs} +2 -2
  324. package/dist/{tree-DC_jbDRu.cjs.map → tree-7Zz1sJKl.cjs.map} +1 -1
  325. package/dist/{tree-CfVyhRIH.js → tree-C33t9-0j.js} +2 -2
  326. package/dist/{tree-CfVyhRIH.js.map → tree-C33t9-0j.js.map} +1 -1
  327. package/dist/tree.cjs +1 -1
  328. package/dist/tree.js +1 -1
  329. package/dist/{typewriter-By-3T0Jm.js → typewriter-Dt1Js2lP.js} +247 -118
  330. package/dist/typewriter-Dt1Js2lP.js.map +1 -0
  331. package/dist/typewriter-WbYqfXO7.cjs +124 -0
  332. package/dist/typewriter-WbYqfXO7.cjs.map +1 -0
  333. package/dist/typewriter.cjs +1 -1
  334. package/dist/typewriter.js +1 -1
  335. package/dist/{typography-9lVCjAbj.cjs → typography-Ck-OdI83.cjs} +2 -2
  336. package/dist/{typography-9lVCjAbj.cjs.map → typography-Ck-OdI83.cjs.map} +1 -1
  337. package/dist/{typography-B7kvO8iJ.js → typography-DdG9aEAg.js} +2 -2
  338. package/dist/{typography-B7kvO8iJ.js.map → typography-DdG9aEAg.js.map} +1 -1
  339. package/dist/typography.cjs +1 -1
  340. package/dist/typography.js +1 -1
  341. package/dist/utils.cjs +1 -1
  342. package/dist/utils.js +1 -1
  343. package/package.json +1 -1
  344. package/types/src/area/router.types.d.ts +1 -0
  345. package/types/src/boat/boat.d.ts +0 -1
  346. package/types/src/button/button.d.ts +8 -0
  347. package/types/src/details/details.d.ts +12 -11
  348. package/types/src/directives/drag.d.ts +30 -0
  349. package/types/src/directives/index.d.ts +1 -0
  350. package/types/src/divider/divider.d.ts +6 -1
  351. package/types/src/menu/menu-item.d.ts +0 -1
  352. package/types/src/store/filter-directive.d.ts +1 -1
  353. package/types/src/surface/surface.d.ts +2 -1
  354. package/types/src/types/surface.d.ts +1 -1
  355. package/types/src/typewriter/typewriter.d.ts +15 -0
  356. package/types/src/utils/index.d.ts +4 -4
  357. package/types/src/utils/search.d.ts +39 -1
  358. package/dist/area.component-BojFAcRk.cjs.map +0 -1
  359. package/dist/area.component-C_nUxyiY.js.map +0 -1
  360. package/dist/boat-B7AKN6Ge.js +0 -276
  361. package/dist/boat-B7AKN6Ge.js.map +0 -1
  362. package/dist/boat-BhAuteUk.cjs +0 -93
  363. package/dist/boat-BhAuteUk.cjs.map +0 -1
  364. package/dist/details-CQPpI_la.js +0 -211
  365. package/dist/details-CQPpI_la.js.map +0 -1
  366. package/dist/details-DydvHvfw.cjs +0 -143
  367. package/dist/details-DydvHvfw.cjs.map +0 -1
  368. package/dist/divider-BF9xljgI.cjs +0 -2
  369. package/dist/divider-BF9xljgI.cjs.map +0 -1
  370. package/dist/divider-BHruVdsE.js +0 -23
  371. package/dist/divider-BHruVdsE.js.map +0 -1
  372. package/dist/icon-button-BRcfLsJL.cjs.map +0 -1
  373. package/dist/icon-button-PpRHFLCj.js.map +0 -1
  374. package/dist/input-DB269a2X.cjs +0 -51
  375. package/dist/menu-DA2pO48m.cjs +0 -26
  376. package/dist/menu-DA2pO48m.cjs.map +0 -1
  377. package/dist/menu-DwFriXTu.js +0 -63
  378. package/dist/menu-DwFriXTu.js.map +0 -1
  379. package/dist/ripple-Cy-nvO8W.js +0 -80
  380. package/dist/ripple-Cy-nvO8W.js.map +0 -1
  381. package/dist/ripple-DqQrvaTe.cjs +0 -16
  382. package/dist/ripple-DqQrvaTe.cjs.map +0 -1
  383. package/dist/search-BeEqIiuO.js +0 -53
  384. package/dist/search-BeEqIiuO.js.map +0 -1
  385. package/dist/search-bfOHCuHZ.cjs +0 -2
  386. package/dist/search-bfOHCuHZ.cjs.map +0 -1
  387. package/dist/selector-hook-BG6g_IEN.cjs +0 -2
  388. package/dist/selector-hook-BG6g_IEN.cjs.map +0 -1
  389. package/dist/selector-hook-CrwQCPxL.js +0 -313
  390. package/dist/selector-hook-CrwQCPxL.js.map +0 -1
  391. package/dist/sheet-Bza5jVS2.cjs.map +0 -1
  392. package/dist/sheet-CNn_huhz.js.map +0 -1
  393. package/dist/spinner-BDSDxr_W.cjs.map +0 -1
  394. package/dist/spinner-Dyz6HBFa.js.map +0 -1
  395. package/dist/tailwind.mixin-scDxsqaX.cjs +0 -2
  396. package/dist/tailwind.mixin-xIIxrXd8.js +0 -67
  397. package/dist/typewriter-By-3T0Jm.js.map +0 -1
  398. package/dist/typewriter-vit0P1N1.cjs +0 -9
  399. package/dist/typewriter-vit0P1N1.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"option-B1r0hb3H.cjs","sources":["../src/option/option.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n/**\n * `schmancy-option` is an option element for schmancy-select and schmancy-autocomplete components.\n *\n * @fires click - When the option is clicked\n */\n@customElement('schmancy-option')\nexport default class SchmancyOption extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tcursor: pointer;\n\t\tuser-select: none;\n\t\toutline: none;\n\t}\n\n\t:host(:focus-visible) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: -2px;\n\t}\n\n\t:host([hidden]) {\n\t\tdisplay: none;\n\t}\n\n\t:host([disabled]) {\n\t\topacity: 0.5;\n\t\tpointer-events: none;\n\t}\n`) {\n\t/**\n\t * The value of the option, will be used when selected.\n\t */\n\t@property({ type: String })\n\tvalue: string = ''\n\n\t/**\n\t * The human-readable label for the option.\n\t */\n\t@property({ type: String })\n\tlabel: string = ''\n\n\t/**\n\t * Whether the option is currently selected.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tselected: boolean = false\n\n\t/**\n\t * Whether the option is disabled.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled: boolean = false\n\n\t/**\n\t * Optional group this option belongs to (for option grouping).\n\t */\n\t@property({ type: String })\n\tgroup: string = ''\n\n\t/**\n\t * Optional icon or image to display before the label.\n\t */\n\t@property({ type: String })\n\ticon: string = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Ensure the option has an ID for accessibility\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-option-${Math.random().toString(36).substring(2, 9)}`\n\t\t}\n\n\t\t// If no label was provided, use the text content or value\n\t\tif (!this.label) {\n\t\t\tthis.label = this.textContent?.trim() || this.value\n\t\t}\n\n\t\t// If value wasn't set but there's text content, use that as the value\n\t\tif (!this.value && this.textContent) {\n\t\t\tthis.value = this.textContent.trim()\n\t\t}\n\n\t\t// Make the option clickable\n\t\tfromEvent<MouseEvent>(this, 'click')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tif (this.disabled) return\n\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\t// Handle space and enter as clicks\n\t\t\t\tif (e.key === ' ' || e.key === 'Enter') {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\tif (this.disabled) return\n\t\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tdisconnectedCallback() {\n\t\t// Event listeners are automatically cleaned up via takeUntil(this.disconnecting)\n\t\tsuper.disconnectedCallback()\n\t}\n\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'py-2': true,\n\t\t\t'px-3': true,\n\t\t\trounded: true,\n\t\t\t'text-sm': true,\n\t\t\t'w-full': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t// Selected state\n\t\t\t'bg-primary-container': this.selected,\n\t\t\t'text-primary-onContainer': this.selected,\n\t\t\t// Hover state (when not selected)\n\t\t\t'hover:bg-surface-high': !this.selected,\n\t\t\t// Focus state\n\t\t\t'focus:outline-none': true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=${this.classMap(classes)} role=\"option\" aria-selected=${this.selected} aria-disabled=${this.disabled}>\n\t\t\t\t${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : ''}\n\t\t\t\t<span class=\"flex-1\">${this.label || this.value}</span>\n\t\t\t\t${this.selected\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<span class=\"check\">\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<polyline points=\"20 6 9 17 4 12\"></polyline>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-option': SchmancyOption\n\t}\n}\n"],"names":["SchmancyOption","TailwindElement","css","super","arguments","this","value","label","selected","disabled","group","icon","connectedCallback","id","Math","random","toString","substring","textContent","trim","fromEvent","pipe","takeUntil","disconnecting","subscribe","e","stopPropagation","dispatchEvent","CustomEvent","bubbles","composed","detail","key","preventDefault","disconnectedCallback","render","classes","rounded","flex","html","classMap","__decorateClass","property","type","String","prototype","Boolean","reflect","customElement"],"mappings":"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"}
1
+ {"version":3,"file":"option-Eh2AXe-Z.cjs","sources":["../src/option/option.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n/**\n * `schmancy-option` is an option element for schmancy-select and schmancy-autocomplete components.\n *\n * @fires click - When the option is clicked\n */\n@customElement('schmancy-option')\nexport default class SchmancyOption extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tcursor: pointer;\n\t\tuser-select: none;\n\t\toutline: none;\n\t}\n\n\t:host(:focus-visible) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: -2px;\n\t}\n\n\t:host([hidden]) {\n\t\tdisplay: none;\n\t}\n\n\t:host([disabled]) {\n\t\topacity: 0.5;\n\t\tpointer-events: none;\n\t}\n`) {\n\t/**\n\t * The value of the option, will be used when selected.\n\t */\n\t@property({ type: String })\n\tvalue: string = ''\n\n\t/**\n\t * The human-readable label for the option.\n\t */\n\t@property({ type: String })\n\tlabel: string = ''\n\n\t/**\n\t * Whether the option is currently selected.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tselected: boolean = false\n\n\t/**\n\t * Whether the option is disabled.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled: boolean = false\n\n\t/**\n\t * Optional group this option belongs to (for option grouping).\n\t */\n\t@property({ type: String })\n\tgroup: string = ''\n\n\t/**\n\t * Optional icon or image to display before the label.\n\t */\n\t@property({ type: String })\n\ticon: string = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Ensure the option has an ID for accessibility\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-option-${Math.random().toString(36).substring(2, 9)}`\n\t\t}\n\n\t\t// If no label was provided, use the text content or value\n\t\tif (!this.label) {\n\t\t\tthis.label = this.textContent?.trim() || this.value\n\t\t}\n\n\t\t// If value wasn't set but there's text content, use that as the value\n\t\tif (!this.value && this.textContent) {\n\t\t\tthis.value = this.textContent.trim()\n\t\t}\n\n\t\t// Make the option clickable\n\t\tfromEvent<MouseEvent>(this, 'click')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tif (this.disabled) return\n\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\t// Handle space and enter as clicks\n\t\t\t\tif (e.key === ' ' || e.key === 'Enter') {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\tif (this.disabled) return\n\t\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tdisconnectedCallback() {\n\t\t// Event listeners are automatically cleaned up via takeUntil(this.disconnecting)\n\t\tsuper.disconnectedCallback()\n\t}\n\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'py-2': true,\n\t\t\t'px-3': true,\n\t\t\trounded: true,\n\t\t\t'text-sm': true,\n\t\t\t'w-full': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t// Selected state\n\t\t\t'bg-primary-container': this.selected,\n\t\t\t'text-primary-onContainer': this.selected,\n\t\t\t// Hover state (when not selected)\n\t\t\t'hover:bg-surface-high': !this.selected,\n\t\t\t// Focus state\n\t\t\t'focus:outline-none': true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=${this.classMap(classes)} role=\"option\" aria-selected=${this.selected} aria-disabled=${this.disabled}>\n\t\t\t\t${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : ''}\n\t\t\t\t<span class=\"flex-1\">${this.label || this.value}</span>\n\t\t\t\t${this.selected\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<span class=\"check\">\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<polyline points=\"20 6 9 17 4 12\"></polyline>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-option': SchmancyOption\n\t}\n}\n"],"names":["SchmancyOption","TailwindElement","css","super","arguments","this","value","label","selected","disabled","group","icon","connectedCallback","id","Math","random","toString","substring","textContent","trim","fromEvent","pipe","takeUntil","disconnecting","subscribe","e","stopPropagation","dispatchEvent","CustomEvent","bubbles","composed","detail","key","preventDefault","disconnectedCallback","render","classes","rounded","flex","html","classMap","__decorateClass","property","type","String","prototype","Boolean","reflect","customElement"],"mappings":"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"}
package/dist/option.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";require("./option-B1r0hb3H.cjs");
1
+ "use strict";require("./option-Eh2AXe-Z.cjs");
2
2
  //# sourceMappingURL=option.cjs.map
package/dist/option.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./option-cJ8fM5qJ.js";
1
+ import "./option-DnRdbsTb.js";
2
2
  //# sourceMappingURL=option.js.map
@@ -1,4 +1,4 @@
1
- "use strict";require("rxjs"),require("rxjs/operators"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const h=require("lit/decorators.js");require("./tailwind.mixin-scDxsqaX.cjs");const w=require("./litElement.mixin-DzCpXwcY.cjs"),D=require("lit");var x=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},v=function(e,t,r,i,a,n,o,l,d,p){var s=this;s.numeralDecimalMark=e||".",s.numeralIntegerScale=t>0?t:0,s.numeralDecimalScale=r>=0?r:2,s.numeralThousandsGroupStyle=i||v.groupStyle.thousand,s.numeralPositiveOnly=!!a,s.stripLeadingZeroes=n!==!1,s.prefix=o||o===""?o:"",s.signBeforePrefix=!!l,s.tailPrefix=!!d,s.delimiter=p||p===""?p:",",s.delimiterRE=p?new RegExp("\\"+p,"g"):""};v.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"},v.prototype={getRawValue:function(e){return e.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(e){var t,r,i,a,n=this,o="";switch(e=e.replace(/[A-Za-z]/g,"").replace(n.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",n.numeralPositiveOnly?"":"-").replace("M",n.numeralDecimalMark),n.stripLeadingZeroes&&(e=e.replace(/^(-)?0+(?=\d)/,"$1")),r=e.slice(0,1)==="-"?"-":"",i=n.prefix!==void 0?n.signBeforePrefix?r+n.prefix:n.prefix+r:r,a=e,e.indexOf(n.numeralDecimalMark)>=0&&(a=(t=e.split(n.numeralDecimalMark))[0],o=n.numeralDecimalMark+t[1].slice(0,n.numeralDecimalScale)),r==="-"&&(a=a.slice(1)),n.numeralIntegerScale>0&&(a=a.slice(0,n.numeralIntegerScale)),n.numeralThousandsGroupStyle){case v.groupStyle.lakh:a=a.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+n.delimiter);break;case v.groupStyle.wan:a=a.replace(/(\d)(?=(\d{4})+$)/g,"$1"+n.delimiter);break;case v.groupStyle.thousand:a=a.replace(/(\d)(?=(\d{3})+$)/g,"$1"+n.delimiter)}return n.tailPrefix?r+a.toString()+(n.numeralDecimalScale>0?o.toString():"")+n.prefix:i+a.toString()+(n.numeralDecimalScale>0?o.toString():"")}};var k=v,F=function(e,t,r){var i=this;i.date=[],i.blocks=[],i.datePattern=e,i.dateMin=t.split("-").reverse().map(function(a){return parseInt(a,10)}),i.dateMin.length===2&&i.dateMin.unshift(0),i.dateMax=r.split("-").reverse().map(function(a){return parseInt(a,10)}),i.dateMax.length===2&&i.dateMax.unshift(0),i.initBlocks()};F.prototype={initBlocks:function(){var e=this;e.datePattern.forEach(function(t){t==="Y"?e.blocks.push(4):e.blocks.push(2)})},getISOFormatDate:function(){var e=this,t=e.date;return t[2]?t[2]+"-"+e.addLeadingZero(t[1])+"-"+e.addLeadingZero(t[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(e){var t=this,r="";return e=e.replace(/[^\d]/g,""),t.blocks.forEach(function(i,a){if(e.length>0){var n=e.slice(0,i),o=n.slice(0,1),l=e.slice(i);switch(t.datePattern[a]){case"d":n==="00"?n="01":parseInt(o,10)>3?n="0"+o:parseInt(n,10)>31&&(n="31");break;case"m":n==="00"?n="01":parseInt(o,10)>1?n="0"+o:parseInt(n,10)>12&&(n="12")}r+=n,e=l}}),this.getFixedDateString(r)},getFixedDateString:function(e){var t,r,i,a=this,n=a.datePattern,o=[],l=0,d=0,p=0,s=0,u=0,m=0,y=!1;return e.length===4&&n[0].toLowerCase()!=="y"&&n[1].toLowerCase()!=="y"&&(u=2-(s=n[0]==="d"?0:2),t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),o=this.getFixedDate(t,r,0)),e.length===8&&(n.forEach(function(f,C){switch(f){case"d":l=C;break;case"m":d=C;break;default:p=C}}),m=2*p,s=l<=p?2*l:2*l+2,u=d<=p?2*d:2*d+2,t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+4),10),y=e.slice(m,m+4).length===4,o=this.getFixedDate(t,r,i)),e.length!==4||n[0]!=="y"&&n[1]!=="y"||(m=2-(u=n[0]==="m"?0:2),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),y=e.slice(m,m+2).length===2,o=[0,r,i]),e.length!==6||n[0]!=="Y"&&n[1]!=="Y"||(m=2-.5*(u=n[0]==="m"?0:4),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+4),10),y=e.slice(m,m+4).length===4,o=[0,r,i]),o=a.getRangeFixedDate(o),a.date=o,o.length===0?e:n.reduce(function(f,C){switch(C){case"d":return f+(o[0]===0?"":a.addLeadingZero(o[0]));case"m":return f+(o[1]===0?"":a.addLeadingZero(o[1]));case"y":return f+(y?a.addLeadingZeroForYear(o[2],!1):"");case"Y":return f+(y?a.addLeadingZeroForYear(o[2],!0):"")}},"")},getRangeFixedDate:function(e){var t=this,r=t.datePattern,i=t.dateMin||[],a=t.dateMax||[];return!e.length||i.length<3&&a.length<3||r.find(function(n){return n.toLowerCase()==="y"})&&e[2]===0?e:a.length&&(a[2]<e[2]||a[2]===e[2]&&(a[1]<e[1]||a[1]===e[1]&&a[0]<e[0]))?a:i.length&&(i[2]>e[2]||i[2]===e[2]&&(i[1]>e[1]||i[1]===e[1]&&i[0]>e[0]))?i:e},getFixedDate:function(e,t,r){return e=Math.min(e,31),t=Math.min(t,12),r=parseInt(r||0,10),(t<7&&t%2==0||t>8&&t%2==1)&&(e=Math.min(e,t===2?this.isLeapYear(r)?29:28:30)),[e,t,r]},isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},addLeadingZero:function(e){return(e<10?"0":"")+e},addLeadingZeroForYear:function(e,t){return t?(e<10?"000":e<100?"00":e<1e3?"0":"")+e:(e<10?"0":"")+e}};var V=F,P=function(e,t){var r=this;r.time=[],r.blocks=[],r.timePattern=e,r.timeFormat=t,r.initBlocks()};P.prototype={initBlocks:function(){var e=this;e.timePattern.forEach(function(){e.blocks.push(2)})},getISOFormatTime:function(){var e=this,t=e.time;return t[2]?e.addLeadingZero(t[0])+":"+e.addLeadingZero(t[1])+":"+e.addLeadingZero(t[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){return String(this.timeFormat)==="12"?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(e){var t=this,r="";e=e.replace(/[^\d]/g,"");var i=t.getTimeFormatOptions();return t.blocks.forEach(function(a,n){if(e.length>0){var o=e.slice(0,a),l=o.slice(0,1),d=e.slice(a);switch(t.timePattern[n]){case"h":parseInt(l,10)>i.maxHourFirstDigit?o="0"+l:parseInt(o,10)>i.maxHours&&(o=i.maxHours+"");break;case"m":case"s":parseInt(l,10)>i.maxMinutesFirstDigit?o="0"+l:parseInt(o,10)>i.maxMinutes&&(o=i.maxMinutes+"")}r+=o,e=d}}),this.getFixedTimeString(r)},getFixedTimeString:function(e){var t,r,i,a=this,n=a.timePattern,o=[],l=0,d=0,p=0,s=0,u=0,m=0;return e.length===6&&(n.forEach(function(y,f){switch(y){case"s":l=2*f;break;case"m":d=2*f;break;case"h":p=2*f}}),m=p,u=d,s=l,t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),e.length===4&&a.timePattern.indexOf("s")<0&&(n.forEach(function(y,f){switch(y){case"m":d=2*f;break;case"h":p=2*f}}),m=p,u=d,t=0,r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),a.time=o,o.length===0?e:n.reduce(function(y,f){switch(f){case"s":return y+a.addLeadingZero(o[2]);case"m":return y+a.addLeadingZero(o[1]);case"h":return y+a.addLeadingZero(o[0])}},"")},getFixedTime:function(e,t,r){return r=Math.min(parseInt(r||0,10),60),t=Math.min(t,60),[e=Math.min(e,60),t,r]},addLeadingZero:function(e){return(e<10?"0":"")+e}};var L=P,I=function(e,t){var r=this;r.delimiter=t||t===""?t:" ",r.delimiterRE=t?new RegExp("\\"+t,"g"):"",r.formatter=e};I.prototype={setFormatter:function(e){this.formatter=e},format:function(e){var t=this;t.formatter.clear();for(var r,i="",a=!1,n=0,o=(e=(e=(e=e.replace(/[^\d+]/g,"")).replace(/^\+/,"B").replace(/\+/g,"").replace("B","+")).replace(t.delimiterRE,"")).length;n<o;n++)r=t.formatter.inputDigit(e.charAt(n)),/[\s()-]/g.test(r)?(i=r,a=!0):a||(i=r);return i=(i=i.replace(/[()]/g,"")).replace(/[\s-]/g,t.delimiter)}};var M=I,b={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(e){var t=e.reduce(function(r,i){return r+i},0);return e.concat(19-t)},getInfo:function(e,t){var r=b.blocks,i=b.re;for(var a in t=!!t,i)if(i[a].test(e)){var n=r[a];return{type:a,blocks:t?this.getStrictBlocks(n):n}}return{type:"unknown",blocks:t?this.getStrictBlocks(r.general):r.general}}},N=b,E={noop:function(){},strip:function(e,t){return e.replace(t,"")},getPostDelimiter:function(e,t,r){if(r.length===0)return e.slice(-t.length)===t?t:"";var i="";return r.forEach(function(a){e.slice(-a.length)===a&&(i=a)}),i},getDelimiterREByDelimiter:function(e){return new RegExp(e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(e,t,r,i,a){return t.length===e?r.length:e+this.getPositionOffset(e,t,r,i,a)},getPositionOffset:function(e,t,r,i,a){var n,o,l;return n=this.stripDelimiters(t.slice(0,e),i,a),o=this.stripDelimiters(r.slice(0,e),i,a),(l=n.length-o.length)!==0?l/Math.abs(l):0},stripDelimiters:function(e,t,r){var i=this;if(r.length===0){var a=t?i.getDelimiterREByDelimiter(t):"";return e.replace(a,"")}return r.forEach(function(n){n.split("").forEach(function(o){e=e.replace(i.getDelimiterREByDelimiter(o),"")})}),e},headStr:function(e,t){return e.slice(0,t)},getMaxLength:function(e){return e.reduce(function(t,r){return t+r},0)},getPrefixStrippedValue:function(e,t,r,i,a,n,o,l,d){if(r===0)return e;if(e===t&&e!=="")return"";if(d&&e.slice(0,1)=="-"){var p=i.slice(0,1)=="-"?i.slice(1):i;return"-"+this.getPrefixStrippedValue(e.slice(1),t,r,p,a,n,o,l,d)}if(i.slice(0,r)!==t&&!l||i.slice(-r)!==t&&l)return o&&!i&&e?e:"";var s=this.stripDelimiters(i,a,n);return e.slice(0,r)===t||l?e.slice(-r)!==t&&l?s.slice(0,-r-1):l?e.slice(0,-r):e.slice(r):s.slice(r)},getFirstDiffIndex:function(e,t){for(var r=0;e.charAt(r)===t.charAt(r);)if(e.charAt(r++)==="")return-1;return r},getFormattedValue:function(e,t,r,i,a,n){var o="",l=a.length>0,d="";return r===0?e:(t.forEach(function(p,s){if(e.length>0){var u=e.slice(0,p),m=e.slice(p);d=l?a[n?s-1:s]||d:i,n?(s>0&&(o+=d),o+=u):(o+=u,u.length===p&&s<r-1&&(o+=d)),e=m}}),o)},fixPrefixCursor:function(e,t,r,i){if(e){var a=e.value,n=r||i[0]||" ";if(e.setSelectionRange&&t&&!(t.length+n.length<=a.length)){var o=2*a.length;setTimeout(function(){e.setSelectionRange(o,o)},1)}}},checkFullSelection:function(e){try{return(window.getSelection()||document.getSelection()||{}).toString().length===e.length}catch{}return!1},setSelection:function(e,t,r){if(e===this.getActiveElement(r)&&!(e&&e.value.length<=t))if(e.createTextRange){var i=e.createTextRange();i.move("character",t),i.select()}else try{e.setSelectionRange(t,t)}catch{}},getActiveElement:function(e){var t=e.activeElement;return t&&t.shadowRoot?this.getActiveElement(t.shadowRoot):t},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(e,t){return!!(this.isAndroid()&&e&&t)&&t===e.slice(0,-1)}},T={assign:function(e,t){return t=t||{},(e=e||{}).creditCard=!!t.creditCard,e.creditCardStrictMode=!!t.creditCardStrictMode,e.creditCardType="",e.onCreditCardTypeChanged=t.onCreditCardTypeChanged||function(){},e.phone=!!t.phone,e.phoneRegionCode=t.phoneRegionCode||"AU",e.phoneFormatter={},e.time=!!t.time,e.timePattern=t.timePattern||["h","m","s"],e.timeFormat=t.timeFormat||"24",e.timeFormatter={},e.date=!!t.date,e.datePattern=t.datePattern||["d","m","Y"],e.dateMin=t.dateMin||"",e.dateMax=t.dateMax||"",e.dateFormatter={},e.numeral=!!t.numeral,e.numeralIntegerScale=t.numeralIntegerScale>0?t.numeralIntegerScale:0,e.numeralDecimalScale=t.numeralDecimalScale>=0?t.numeralDecimalScale:2,e.numeralDecimalMark=t.numeralDecimalMark||".",e.numeralThousandsGroupStyle=t.numeralThousandsGroupStyle||"thousand",e.numeralPositiveOnly=!!t.numeralPositiveOnly,e.stripLeadingZeroes=t.stripLeadingZeroes!==!1,e.signBeforePrefix=!!t.signBeforePrefix,e.tailPrefix=!!t.tailPrefix,e.swapHiddenInput=!!t.swapHiddenInput,e.numericOnly=e.creditCard||e.date||!!t.numericOnly,e.uppercase=!!t.uppercase,e.lowercase=!!t.lowercase,e.prefix=e.creditCard||e.date?"":t.prefix||"",e.noImmediatePrefix=!!t.noImmediatePrefix,e.prefixLength=e.prefix.length,e.rawValueTrimPrefix=!!t.rawValueTrimPrefix,e.copyDelimiter=!!t.copyDelimiter,e.initValue=t.initValue!==void 0&&t.initValue!==null?t.initValue.toString():"",e.delimiter=t.delimiter||t.delimiter===""?t.delimiter:t.date?"/":t.time?":":t.numeral?",":(t.phone," "),e.delimiterLength=e.delimiter.length,e.delimiterLazyShow=!!t.delimiterLazyShow,e.delimiters=t.delimiters||[],e.blocks=t.blocks||[],e.blocksLength=e.blocks.length,e.root=typeof x=="object"&&x?x:window,e.document=t.document||e.root.document,e.maxLength=0,e.backspace=!1,e.result="",e.onValueChanged=t.onValueChanged||function(){},e}},c=function(e,t){var r=this;if(typeof e=="string"?(r.element=document.querySelector(e),document.querySelectorAll(e).length>1):e.length!==void 0&&e.length>0?(r.element=e[0],e.length>1):r.element=e,!r.element)throw new Error("[cleave.js] Please check the element");t.initValue=r.element.value,r.properties=c.DefaultProperties.assign({},t),r.init()};c.prototype={init:function(){var e=this,t=e.properties;t.numeral||t.phone||t.creditCard||t.time||t.date||t.blocksLength!==0||t.prefix?(t.maxLength=c.Util.getMaxLength(t.blocks),e.isAndroid=c.Util.isAndroid(),e.lastInputValue="",e.isBackward="",e.onChangeListener=e.onChange.bind(e),e.onKeyDownListener=e.onKeyDown.bind(e),e.onFocusListener=e.onFocus.bind(e),e.onCutListener=e.onCut.bind(e),e.onCopyListener=e.onCopy.bind(e),e.initSwapHiddenInput(),e.element.addEventListener("input",e.onChangeListener),e.element.addEventListener("keydown",e.onKeyDownListener),e.element.addEventListener("focus",e.onFocusListener),e.element.addEventListener("cut",e.onCutListener),e.element.addEventListener("copy",e.onCopyListener),e.initPhoneFormatter(),e.initDateFormatter(),e.initTimeFormatter(),e.initNumeralFormatter(),(t.initValue||t.prefix&&!t.noImmediatePrefix)&&e.onInput(t.initValue)):e.onInput(t.initValue)},initSwapHiddenInput:function(){var e=this;if(e.properties.swapHiddenInput){var t=e.element.cloneNode(!0);e.element.parentNode.insertBefore(t,e.element),e.elementSwapHidden=e.element,e.elementSwapHidden.type="hidden",e.element=t,e.element.id=""}},initNumeralFormatter:function(){var e=this.properties;e.numeral&&(e.numeralFormatter=new c.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter))},initTimeFormatter:function(){var e=this.properties;e.time&&(e.timeFormatter=new c.TimeFormatter(e.timePattern,e.timeFormat),e.blocks=e.timeFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=c.Util.getMaxLength(e.blocks))},initDateFormatter:function(){var e=this.properties;e.date&&(e.dateFormatter=new c.DateFormatter(e.datePattern,e.dateMin,e.dateMax),e.blocks=e.dateFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=c.Util.getMaxLength(e.blocks))},initPhoneFormatter:function(){var e=this.properties;if(e.phone)try{e.phoneFormatter=new c.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch{throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(e){var t=this,r=e.which||e.keyCode;t.lastInputValue=t.element.value,t.isBackward=r===8},onChange:function(e){var t=this,r=t.properties,i=c.Util;t.isBackward=t.isBackward||e.inputType==="deleteContentBackward";var a=i.getPostDelimiter(t.lastInputValue,r.delimiter,r.delimiters);t.isBackward&&a?r.postDelimiterBackspace=a:r.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var e=this,t=e.properties;e.lastInputValue=e.element.value,t.prefix&&t.noImmediatePrefix&&!e.element.value&&this.onInput(t.prefix),c.Util.fixPrefixCursor(e.element,t.prefix,t.delimiter,t.delimiters)},onCut:function(e){c.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(e),this.onInput(""))},onCopy:function(e){c.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(e)},copyClipboardData:function(e){var t=this.properties,r=c.Util,i=this.element.value,a="";a=t.copyDelimiter?i:r.stripDelimiters(i,t.delimiter,t.delimiters);try{e.clipboardData?e.clipboardData.setData("Text",a):window.clipboardData.setData("Text",a),e.preventDefault()}catch{}},onInput:function(e){var t=this,r=t.properties,i=c.Util,a=i.getPostDelimiter(e,r.delimiter,r.delimiters);return r.numeral||!r.postDelimiterBackspace||a||(e=i.headStr(e,e.length-r.postDelimiterBackspace.length)),r.phone?(!r.prefix||r.noImmediatePrefix&&!e.length?r.result=r.phoneFormatter.format(e):r.result=r.prefix+r.phoneFormatter.format(e).slice(r.prefix.length),void t.updateValueState()):r.numeral?(r.prefix&&r.noImmediatePrefix&&e.length===0?r.result="":r.result=r.numeralFormatter.format(e),void t.updateValueState()):(r.date&&(e=r.dateFormatter.getValidatedDate(e)),r.time&&(e=r.timeFormatter.getValidatedTime(e)),e=i.stripDelimiters(e,r.delimiter,r.delimiters),e=i.getPrefixStrippedValue(e,r.prefix,r.prefixLength,r.result,r.delimiter,r.delimiters,r.noImmediatePrefix,r.tailPrefix,r.signBeforePrefix),e=r.numericOnly?i.strip(e,/[^\d]/g):e,e=r.uppercase?e.toUpperCase():e,e=r.lowercase?e.toLowerCase():e,r.prefix&&(r.tailPrefix?e+=r.prefix:e=r.prefix+e,r.blocksLength===0)?(r.result=e,void t.updateValueState()):(r.creditCard&&t.updateCreditCardPropsByValue(e),e=i.headStr(e,r.maxLength),r.result=i.getFormattedValue(e,r.blocks,r.blocksLength,r.delimiter,r.delimiters,r.delimiterLazyShow),void t.updateValueState()))},updateCreditCardPropsByValue:function(e){var t,r=this.properties,i=c.Util;i.headStr(r.result,4)!==i.headStr(e,4)&&(t=c.CreditCardDetector.getInfo(e,r.creditCardStrictMode),r.blocks=t.blocks,r.blocksLength=r.blocks.length,r.maxLength=i.getMaxLength(r.blocks),r.creditCardType!==t.type&&(r.creditCardType=t.type,r.onCreditCardTypeChanged.call(this,r.creditCardType)))},updateValueState:function(){var e=this,t=c.Util,r=e.properties;if(e.element){var i=e.element.selectionEnd,a=e.element.value,n=r.result;i=t.getNextCursorPosition(i,a,n,r.delimiter,r.delimiters),e.isAndroid?window.setTimeout(function(){e.element.value=n,t.setSelection(e.element,i,r.document,!1),e.callOnValueChanged()},1):(e.element.value=n,r.swapHiddenInput&&(e.elementSwapHidden.value=e.getRawValue()),t.setSelection(e.element,i,r.document,!1),e.callOnValueChanged())}},callOnValueChanged:function(){var e=this,t=e.properties;t.onValueChanged.call(e,{target:{name:e.element.name,value:t.result,rawValue:e.getRawValue()}})},setPhoneRegionCode:function(e){var t=this;t.properties.phoneRegionCode=e,t.initPhoneFormatter(),t.onChange()},setRawValue:function(e){var t=this,r=t.properties;e=e!=null?e.toString():"",r.numeral&&(e=e.replace(".",r.numeralDecimalMark)),r.postDelimiterBackspace=!1,t.element.value=e,t.onInput(e)},getRawValue:function(){var e=this.properties,t=c.Util,r=this.element.value;return e.rawValueTrimPrefix&&(r=t.getPrefixStrippedValue(r,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)),r=e.numeral?e.numeralFormatter.getRawValue(r):t.stripDelimiters(r,e.delimiter,e.delimiters)},getISOFormatDate:function(){var e=this.properties;return e.date?e.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var e=this.properties;return e.time?e.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var e=this;e.element.removeEventListener("input",e.onChangeListener),e.element.removeEventListener("keydown",e.onKeyDownListener),e.element.removeEventListener("focus",e.onFocusListener),e.element.removeEventListener("cut",e.onCutListener),e.element.removeEventListener("copy",e.onCopyListener)},toString:function(){return"[Cleave Object]"}},c.NumeralFormatter=k,c.DateFormatter=V,c.TimeFormatter=L,c.PhoneFormatter=M,c.CreditCardDetector=N,c.Util=E,c.DefaultProperties=T,(typeof x=="object"&&x?x:window).Cleave=c;var S=c,B=Object.defineProperty,R=Object.getOwnPropertyDescriptor,g=(e,t,r,i)=>{for(var a,n=i>1?void 0:i?R(t,r):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(i?a(t,r,n):a(n))||n);return i&&n&&B(t,r,n),n};exports.SchmancyPaymentCardForm=class extends w.$LitElement(){constructor(){super(...arguments),this.value={cardName:"",cardNumber:"",expirationDate:"",cvv:""},this.cardType="",this.isCardNameValid=!0,this.isCardNumberValid=!0,this.isExpirationDateValid=!0,this.isCvvValid=!0}firstUpdated(){new S(this.cardNumberInput,{creditCard:!0,creditCardStrictMode:!0,onCreditCardTypeChanged:e=>{this.cardType=e,e==="unknown"?(this.isCardNumberValid=!1,this.cardNumberInput.setCustomValidity("Please enter a valid card number."),this.cardNumberInput.error=!0):(this.isCardNumberValid=!0,this.cardNumberInput.setCustomValidity(""),this.cardNumberInput.error=!1,this.cvvInput.maxlength=e==="amex"?4:3)}}),new S(this.expirationDateInput,{date:!0,datePattern:["m","y"],onValueChanged:e=>{const t=e.target.value;if(!t||t.length<5)this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity("Please enter a valid expiration date (MM/YY)."),this.expirationDateInput.error=!0;else{const[r,i]=t.split("/"),a=new Date,n=a.getFullYear()%100,o=a.getMonth()+1,l=parseInt(r,10),d=parseInt(i,10);d<n||d===n&&l<o?(this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity("Card has expired."),this.expirationDateInput.error=!0):(this.isExpirationDateValid=!0,this.expirationDateInput.setCustomValidity(""),this.expirationDateInput.error=!1)}}}),new S(this.cvvInput,{blocks:[4],numericOnly:!0,onValueChanged:e=>{const t=this.cardType==="amex"?4:3;e.target.value.length<t?(this.isCvvValid=!1,this.cvvInput.setCustomValidity(`Please enter a valid ${t}-digit CVV.`),this.cvvInput.error=!0):(this.isCvvValid=!0,this.cvvInput.setCustomValidity(""),this.cvvInput.error=!1)}}),new S(this.cardNameInput,{uppercase:!0,delimiter:" ",onValueChanged:e=>{!e.target.value||e.target.value.length<3?(this.isCardNameValid=!1,this.cardNameInput.setCustomValidity("Please enter the name as it appears on the card."),this.cardNameInput.error=!0):(this.isCardNameValid=!0,this.cardNameInput.setCustomValidity(""),this.cardNameInput.error=!1)}})}reportValidity(){return this.form.reportValidity()}checkValidity(){return!!this.form.reportValidity()}emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:{...this.value},bubbles:!0}))}render(){const e=this.getCardIcon();return D.html`
1
+ "use strict";require("rxjs"),require("rxjs/operators"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const h=require("lit/decorators.js");require("./tailwind.mixin-JFXu3GSo.cjs");const w=require("./litElement.mixin-B1WTI3WY.cjs"),D=require("lit");var x=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},v=function(e,t,r,i,a,n,o,l,d,p){var s=this;s.numeralDecimalMark=e||".",s.numeralIntegerScale=t>0?t:0,s.numeralDecimalScale=r>=0?r:2,s.numeralThousandsGroupStyle=i||v.groupStyle.thousand,s.numeralPositiveOnly=!!a,s.stripLeadingZeroes=n!==!1,s.prefix=o||o===""?o:"",s.signBeforePrefix=!!l,s.tailPrefix=!!d,s.delimiter=p||p===""?p:",",s.delimiterRE=p?new RegExp("\\"+p,"g"):""};v.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"},v.prototype={getRawValue:function(e){return e.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(e){var t,r,i,a,n=this,o="";switch(e=e.replace(/[A-Za-z]/g,"").replace(n.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",n.numeralPositiveOnly?"":"-").replace("M",n.numeralDecimalMark),n.stripLeadingZeroes&&(e=e.replace(/^(-)?0+(?=\d)/,"$1")),r=e.slice(0,1)==="-"?"-":"",i=n.prefix!==void 0?n.signBeforePrefix?r+n.prefix:n.prefix+r:r,a=e,e.indexOf(n.numeralDecimalMark)>=0&&(a=(t=e.split(n.numeralDecimalMark))[0],o=n.numeralDecimalMark+t[1].slice(0,n.numeralDecimalScale)),r==="-"&&(a=a.slice(1)),n.numeralIntegerScale>0&&(a=a.slice(0,n.numeralIntegerScale)),n.numeralThousandsGroupStyle){case v.groupStyle.lakh:a=a.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+n.delimiter);break;case v.groupStyle.wan:a=a.replace(/(\d)(?=(\d{4})+$)/g,"$1"+n.delimiter);break;case v.groupStyle.thousand:a=a.replace(/(\d)(?=(\d{3})+$)/g,"$1"+n.delimiter)}return n.tailPrefix?r+a.toString()+(n.numeralDecimalScale>0?o.toString():"")+n.prefix:i+a.toString()+(n.numeralDecimalScale>0?o.toString():"")}};var k=v,F=function(e,t,r){var i=this;i.date=[],i.blocks=[],i.datePattern=e,i.dateMin=t.split("-").reverse().map(function(a){return parseInt(a,10)}),i.dateMin.length===2&&i.dateMin.unshift(0),i.dateMax=r.split("-").reverse().map(function(a){return parseInt(a,10)}),i.dateMax.length===2&&i.dateMax.unshift(0),i.initBlocks()};F.prototype={initBlocks:function(){var e=this;e.datePattern.forEach(function(t){t==="Y"?e.blocks.push(4):e.blocks.push(2)})},getISOFormatDate:function(){var e=this,t=e.date;return t[2]?t[2]+"-"+e.addLeadingZero(t[1])+"-"+e.addLeadingZero(t[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(e){var t=this,r="";return e=e.replace(/[^\d]/g,""),t.blocks.forEach(function(i,a){if(e.length>0){var n=e.slice(0,i),o=n.slice(0,1),l=e.slice(i);switch(t.datePattern[a]){case"d":n==="00"?n="01":parseInt(o,10)>3?n="0"+o:parseInt(n,10)>31&&(n="31");break;case"m":n==="00"?n="01":parseInt(o,10)>1?n="0"+o:parseInt(n,10)>12&&(n="12")}r+=n,e=l}}),this.getFixedDateString(r)},getFixedDateString:function(e){var t,r,i,a=this,n=a.datePattern,o=[],l=0,d=0,p=0,s=0,u=0,m=0,y=!1;return e.length===4&&n[0].toLowerCase()!=="y"&&n[1].toLowerCase()!=="y"&&(u=2-(s=n[0]==="d"?0:2),t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),o=this.getFixedDate(t,r,0)),e.length===8&&(n.forEach(function(f,C){switch(f){case"d":l=C;break;case"m":d=C;break;default:p=C}}),m=2*p,s=l<=p?2*l:2*l+2,u=d<=p?2*d:2*d+2,t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+4),10),y=e.slice(m,m+4).length===4,o=this.getFixedDate(t,r,i)),e.length!==4||n[0]!=="y"&&n[1]!=="y"||(m=2-(u=n[0]==="m"?0:2),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),y=e.slice(m,m+2).length===2,o=[0,r,i]),e.length!==6||n[0]!=="Y"&&n[1]!=="Y"||(m=2-.5*(u=n[0]==="m"?0:4),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+4),10),y=e.slice(m,m+4).length===4,o=[0,r,i]),o=a.getRangeFixedDate(o),a.date=o,o.length===0?e:n.reduce(function(f,C){switch(C){case"d":return f+(o[0]===0?"":a.addLeadingZero(o[0]));case"m":return f+(o[1]===0?"":a.addLeadingZero(o[1]));case"y":return f+(y?a.addLeadingZeroForYear(o[2],!1):"");case"Y":return f+(y?a.addLeadingZeroForYear(o[2],!0):"")}},"")},getRangeFixedDate:function(e){var t=this,r=t.datePattern,i=t.dateMin||[],a=t.dateMax||[];return!e.length||i.length<3&&a.length<3||r.find(function(n){return n.toLowerCase()==="y"})&&e[2]===0?e:a.length&&(a[2]<e[2]||a[2]===e[2]&&(a[1]<e[1]||a[1]===e[1]&&a[0]<e[0]))?a:i.length&&(i[2]>e[2]||i[2]===e[2]&&(i[1]>e[1]||i[1]===e[1]&&i[0]>e[0]))?i:e},getFixedDate:function(e,t,r){return e=Math.min(e,31),t=Math.min(t,12),r=parseInt(r||0,10),(t<7&&t%2==0||t>8&&t%2==1)&&(e=Math.min(e,t===2?this.isLeapYear(r)?29:28:30)),[e,t,r]},isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},addLeadingZero:function(e){return(e<10?"0":"")+e},addLeadingZeroForYear:function(e,t){return t?(e<10?"000":e<100?"00":e<1e3?"0":"")+e:(e<10?"0":"")+e}};var V=F,P=function(e,t){var r=this;r.time=[],r.blocks=[],r.timePattern=e,r.timeFormat=t,r.initBlocks()};P.prototype={initBlocks:function(){var e=this;e.timePattern.forEach(function(){e.blocks.push(2)})},getISOFormatTime:function(){var e=this,t=e.time;return t[2]?e.addLeadingZero(t[0])+":"+e.addLeadingZero(t[1])+":"+e.addLeadingZero(t[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){return String(this.timeFormat)==="12"?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(e){var t=this,r="";e=e.replace(/[^\d]/g,"");var i=t.getTimeFormatOptions();return t.blocks.forEach(function(a,n){if(e.length>0){var o=e.slice(0,a),l=o.slice(0,1),d=e.slice(a);switch(t.timePattern[n]){case"h":parseInt(l,10)>i.maxHourFirstDigit?o="0"+l:parseInt(o,10)>i.maxHours&&(o=i.maxHours+"");break;case"m":case"s":parseInt(l,10)>i.maxMinutesFirstDigit?o="0"+l:parseInt(o,10)>i.maxMinutes&&(o=i.maxMinutes+"")}r+=o,e=d}}),this.getFixedTimeString(r)},getFixedTimeString:function(e){var t,r,i,a=this,n=a.timePattern,o=[],l=0,d=0,p=0,s=0,u=0,m=0;return e.length===6&&(n.forEach(function(y,f){switch(y){case"s":l=2*f;break;case"m":d=2*f;break;case"h":p=2*f}}),m=p,u=d,s=l,t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),e.length===4&&a.timePattern.indexOf("s")<0&&(n.forEach(function(y,f){switch(y){case"m":d=2*f;break;case"h":p=2*f}}),m=p,u=d,t=0,r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),a.time=o,o.length===0?e:n.reduce(function(y,f){switch(f){case"s":return y+a.addLeadingZero(o[2]);case"m":return y+a.addLeadingZero(o[1]);case"h":return y+a.addLeadingZero(o[0])}},"")},getFixedTime:function(e,t,r){return r=Math.min(parseInt(r||0,10),60),t=Math.min(t,60),[e=Math.min(e,60),t,r]},addLeadingZero:function(e){return(e<10?"0":"")+e}};var L=P,I=function(e,t){var r=this;r.delimiter=t||t===""?t:" ",r.delimiterRE=t?new RegExp("\\"+t,"g"):"",r.formatter=e};I.prototype={setFormatter:function(e){this.formatter=e},format:function(e){var t=this;t.formatter.clear();for(var r,i="",a=!1,n=0,o=(e=(e=(e=e.replace(/[^\d+]/g,"")).replace(/^\+/,"B").replace(/\+/g,"").replace("B","+")).replace(t.delimiterRE,"")).length;n<o;n++)r=t.formatter.inputDigit(e.charAt(n)),/[\s()-]/g.test(r)?(i=r,a=!0):a||(i=r);return i=(i=i.replace(/[()]/g,"")).replace(/[\s-]/g,t.delimiter)}};var M=I,b={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(e){var t=e.reduce(function(r,i){return r+i},0);return e.concat(19-t)},getInfo:function(e,t){var r=b.blocks,i=b.re;for(var a in t=!!t,i)if(i[a].test(e)){var n=r[a];return{type:a,blocks:t?this.getStrictBlocks(n):n}}return{type:"unknown",blocks:t?this.getStrictBlocks(r.general):r.general}}},N=b,E={noop:function(){},strip:function(e,t){return e.replace(t,"")},getPostDelimiter:function(e,t,r){if(r.length===0)return e.slice(-t.length)===t?t:"";var i="";return r.forEach(function(a){e.slice(-a.length)===a&&(i=a)}),i},getDelimiterREByDelimiter:function(e){return new RegExp(e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(e,t,r,i,a){return t.length===e?r.length:e+this.getPositionOffset(e,t,r,i,a)},getPositionOffset:function(e,t,r,i,a){var n,o,l;return n=this.stripDelimiters(t.slice(0,e),i,a),o=this.stripDelimiters(r.slice(0,e),i,a),(l=n.length-o.length)!==0?l/Math.abs(l):0},stripDelimiters:function(e,t,r){var i=this;if(r.length===0){var a=t?i.getDelimiterREByDelimiter(t):"";return e.replace(a,"")}return r.forEach(function(n){n.split("").forEach(function(o){e=e.replace(i.getDelimiterREByDelimiter(o),"")})}),e},headStr:function(e,t){return e.slice(0,t)},getMaxLength:function(e){return e.reduce(function(t,r){return t+r},0)},getPrefixStrippedValue:function(e,t,r,i,a,n,o,l,d){if(r===0)return e;if(e===t&&e!=="")return"";if(d&&e.slice(0,1)=="-"){var p=i.slice(0,1)=="-"?i.slice(1):i;return"-"+this.getPrefixStrippedValue(e.slice(1),t,r,p,a,n,o,l,d)}if(i.slice(0,r)!==t&&!l||i.slice(-r)!==t&&l)return o&&!i&&e?e:"";var s=this.stripDelimiters(i,a,n);return e.slice(0,r)===t||l?e.slice(-r)!==t&&l?s.slice(0,-r-1):l?e.slice(0,-r):e.slice(r):s.slice(r)},getFirstDiffIndex:function(e,t){for(var r=0;e.charAt(r)===t.charAt(r);)if(e.charAt(r++)==="")return-1;return r},getFormattedValue:function(e,t,r,i,a,n){var o="",l=a.length>0,d="";return r===0?e:(t.forEach(function(p,s){if(e.length>0){var u=e.slice(0,p),m=e.slice(p);d=l?a[n?s-1:s]||d:i,n?(s>0&&(o+=d),o+=u):(o+=u,u.length===p&&s<r-1&&(o+=d)),e=m}}),o)},fixPrefixCursor:function(e,t,r,i){if(e){var a=e.value,n=r||i[0]||" ";if(e.setSelectionRange&&t&&!(t.length+n.length<=a.length)){var o=2*a.length;setTimeout(function(){e.setSelectionRange(o,o)},1)}}},checkFullSelection:function(e){try{return(window.getSelection()||document.getSelection()||{}).toString().length===e.length}catch{}return!1},setSelection:function(e,t,r){if(e===this.getActiveElement(r)&&!(e&&e.value.length<=t))if(e.createTextRange){var i=e.createTextRange();i.move("character",t),i.select()}else try{e.setSelectionRange(t,t)}catch{}},getActiveElement:function(e){var t=e.activeElement;return t&&t.shadowRoot?this.getActiveElement(t.shadowRoot):t},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(e,t){return!!(this.isAndroid()&&e&&t)&&t===e.slice(0,-1)}},T={assign:function(e,t){return t=t||{},(e=e||{}).creditCard=!!t.creditCard,e.creditCardStrictMode=!!t.creditCardStrictMode,e.creditCardType="",e.onCreditCardTypeChanged=t.onCreditCardTypeChanged||function(){},e.phone=!!t.phone,e.phoneRegionCode=t.phoneRegionCode||"AU",e.phoneFormatter={},e.time=!!t.time,e.timePattern=t.timePattern||["h","m","s"],e.timeFormat=t.timeFormat||"24",e.timeFormatter={},e.date=!!t.date,e.datePattern=t.datePattern||["d","m","Y"],e.dateMin=t.dateMin||"",e.dateMax=t.dateMax||"",e.dateFormatter={},e.numeral=!!t.numeral,e.numeralIntegerScale=t.numeralIntegerScale>0?t.numeralIntegerScale:0,e.numeralDecimalScale=t.numeralDecimalScale>=0?t.numeralDecimalScale:2,e.numeralDecimalMark=t.numeralDecimalMark||".",e.numeralThousandsGroupStyle=t.numeralThousandsGroupStyle||"thousand",e.numeralPositiveOnly=!!t.numeralPositiveOnly,e.stripLeadingZeroes=t.stripLeadingZeroes!==!1,e.signBeforePrefix=!!t.signBeforePrefix,e.tailPrefix=!!t.tailPrefix,e.swapHiddenInput=!!t.swapHiddenInput,e.numericOnly=e.creditCard||e.date||!!t.numericOnly,e.uppercase=!!t.uppercase,e.lowercase=!!t.lowercase,e.prefix=e.creditCard||e.date?"":t.prefix||"",e.noImmediatePrefix=!!t.noImmediatePrefix,e.prefixLength=e.prefix.length,e.rawValueTrimPrefix=!!t.rawValueTrimPrefix,e.copyDelimiter=!!t.copyDelimiter,e.initValue=t.initValue!==void 0&&t.initValue!==null?t.initValue.toString():"",e.delimiter=t.delimiter||t.delimiter===""?t.delimiter:t.date?"/":t.time?":":t.numeral?",":(t.phone," "),e.delimiterLength=e.delimiter.length,e.delimiterLazyShow=!!t.delimiterLazyShow,e.delimiters=t.delimiters||[],e.blocks=t.blocks||[],e.blocksLength=e.blocks.length,e.root=typeof x=="object"&&x?x:window,e.document=t.document||e.root.document,e.maxLength=0,e.backspace=!1,e.result="",e.onValueChanged=t.onValueChanged||function(){},e}},c=function(e,t){var r=this;if(typeof e=="string"?(r.element=document.querySelector(e),document.querySelectorAll(e).length>1):e.length!==void 0&&e.length>0?(r.element=e[0],e.length>1):r.element=e,!r.element)throw new Error("[cleave.js] Please check the element");t.initValue=r.element.value,r.properties=c.DefaultProperties.assign({},t),r.init()};c.prototype={init:function(){var e=this,t=e.properties;t.numeral||t.phone||t.creditCard||t.time||t.date||t.blocksLength!==0||t.prefix?(t.maxLength=c.Util.getMaxLength(t.blocks),e.isAndroid=c.Util.isAndroid(),e.lastInputValue="",e.isBackward="",e.onChangeListener=e.onChange.bind(e),e.onKeyDownListener=e.onKeyDown.bind(e),e.onFocusListener=e.onFocus.bind(e),e.onCutListener=e.onCut.bind(e),e.onCopyListener=e.onCopy.bind(e),e.initSwapHiddenInput(),e.element.addEventListener("input",e.onChangeListener),e.element.addEventListener("keydown",e.onKeyDownListener),e.element.addEventListener("focus",e.onFocusListener),e.element.addEventListener("cut",e.onCutListener),e.element.addEventListener("copy",e.onCopyListener),e.initPhoneFormatter(),e.initDateFormatter(),e.initTimeFormatter(),e.initNumeralFormatter(),(t.initValue||t.prefix&&!t.noImmediatePrefix)&&e.onInput(t.initValue)):e.onInput(t.initValue)},initSwapHiddenInput:function(){var e=this;if(e.properties.swapHiddenInput){var t=e.element.cloneNode(!0);e.element.parentNode.insertBefore(t,e.element),e.elementSwapHidden=e.element,e.elementSwapHidden.type="hidden",e.element=t,e.element.id=""}},initNumeralFormatter:function(){var e=this.properties;e.numeral&&(e.numeralFormatter=new c.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter))},initTimeFormatter:function(){var e=this.properties;e.time&&(e.timeFormatter=new c.TimeFormatter(e.timePattern,e.timeFormat),e.blocks=e.timeFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=c.Util.getMaxLength(e.blocks))},initDateFormatter:function(){var e=this.properties;e.date&&(e.dateFormatter=new c.DateFormatter(e.datePattern,e.dateMin,e.dateMax),e.blocks=e.dateFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=c.Util.getMaxLength(e.blocks))},initPhoneFormatter:function(){var e=this.properties;if(e.phone)try{e.phoneFormatter=new c.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch{throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(e){var t=this,r=e.which||e.keyCode;t.lastInputValue=t.element.value,t.isBackward=r===8},onChange:function(e){var t=this,r=t.properties,i=c.Util;t.isBackward=t.isBackward||e.inputType==="deleteContentBackward";var a=i.getPostDelimiter(t.lastInputValue,r.delimiter,r.delimiters);t.isBackward&&a?r.postDelimiterBackspace=a:r.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var e=this,t=e.properties;e.lastInputValue=e.element.value,t.prefix&&t.noImmediatePrefix&&!e.element.value&&this.onInput(t.prefix),c.Util.fixPrefixCursor(e.element,t.prefix,t.delimiter,t.delimiters)},onCut:function(e){c.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(e),this.onInput(""))},onCopy:function(e){c.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(e)},copyClipboardData:function(e){var t=this.properties,r=c.Util,i=this.element.value,a="";a=t.copyDelimiter?i:r.stripDelimiters(i,t.delimiter,t.delimiters);try{e.clipboardData?e.clipboardData.setData("Text",a):window.clipboardData.setData("Text",a),e.preventDefault()}catch{}},onInput:function(e){var t=this,r=t.properties,i=c.Util,a=i.getPostDelimiter(e,r.delimiter,r.delimiters);return r.numeral||!r.postDelimiterBackspace||a||(e=i.headStr(e,e.length-r.postDelimiterBackspace.length)),r.phone?(!r.prefix||r.noImmediatePrefix&&!e.length?r.result=r.phoneFormatter.format(e):r.result=r.prefix+r.phoneFormatter.format(e).slice(r.prefix.length),void t.updateValueState()):r.numeral?(r.prefix&&r.noImmediatePrefix&&e.length===0?r.result="":r.result=r.numeralFormatter.format(e),void t.updateValueState()):(r.date&&(e=r.dateFormatter.getValidatedDate(e)),r.time&&(e=r.timeFormatter.getValidatedTime(e)),e=i.stripDelimiters(e,r.delimiter,r.delimiters),e=i.getPrefixStrippedValue(e,r.prefix,r.prefixLength,r.result,r.delimiter,r.delimiters,r.noImmediatePrefix,r.tailPrefix,r.signBeforePrefix),e=r.numericOnly?i.strip(e,/[^\d]/g):e,e=r.uppercase?e.toUpperCase():e,e=r.lowercase?e.toLowerCase():e,r.prefix&&(r.tailPrefix?e+=r.prefix:e=r.prefix+e,r.blocksLength===0)?(r.result=e,void t.updateValueState()):(r.creditCard&&t.updateCreditCardPropsByValue(e),e=i.headStr(e,r.maxLength),r.result=i.getFormattedValue(e,r.blocks,r.blocksLength,r.delimiter,r.delimiters,r.delimiterLazyShow),void t.updateValueState()))},updateCreditCardPropsByValue:function(e){var t,r=this.properties,i=c.Util;i.headStr(r.result,4)!==i.headStr(e,4)&&(t=c.CreditCardDetector.getInfo(e,r.creditCardStrictMode),r.blocks=t.blocks,r.blocksLength=r.blocks.length,r.maxLength=i.getMaxLength(r.blocks),r.creditCardType!==t.type&&(r.creditCardType=t.type,r.onCreditCardTypeChanged.call(this,r.creditCardType)))},updateValueState:function(){var e=this,t=c.Util,r=e.properties;if(e.element){var i=e.element.selectionEnd,a=e.element.value,n=r.result;i=t.getNextCursorPosition(i,a,n,r.delimiter,r.delimiters),e.isAndroid?window.setTimeout(function(){e.element.value=n,t.setSelection(e.element,i,r.document,!1),e.callOnValueChanged()},1):(e.element.value=n,r.swapHiddenInput&&(e.elementSwapHidden.value=e.getRawValue()),t.setSelection(e.element,i,r.document,!1),e.callOnValueChanged())}},callOnValueChanged:function(){var e=this,t=e.properties;t.onValueChanged.call(e,{target:{name:e.element.name,value:t.result,rawValue:e.getRawValue()}})},setPhoneRegionCode:function(e){var t=this;t.properties.phoneRegionCode=e,t.initPhoneFormatter(),t.onChange()},setRawValue:function(e){var t=this,r=t.properties;e=e!=null?e.toString():"",r.numeral&&(e=e.replace(".",r.numeralDecimalMark)),r.postDelimiterBackspace=!1,t.element.value=e,t.onInput(e)},getRawValue:function(){var e=this.properties,t=c.Util,r=this.element.value;return e.rawValueTrimPrefix&&(r=t.getPrefixStrippedValue(r,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)),r=e.numeral?e.numeralFormatter.getRawValue(r):t.stripDelimiters(r,e.delimiter,e.delimiters)},getISOFormatDate:function(){var e=this.properties;return e.date?e.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var e=this.properties;return e.time?e.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var e=this;e.element.removeEventListener("input",e.onChangeListener),e.element.removeEventListener("keydown",e.onKeyDownListener),e.element.removeEventListener("focus",e.onFocusListener),e.element.removeEventListener("cut",e.onCutListener),e.element.removeEventListener("copy",e.onCopyListener)},toString:function(){return"[Cleave Object]"}},c.NumeralFormatter=k,c.DateFormatter=V,c.TimeFormatter=L,c.PhoneFormatter=M,c.CreditCardDetector=N,c.Util=E,c.DefaultProperties=T,(typeof x=="object"&&x?x:window).Cleave=c;var S=c,B=Object.defineProperty,R=Object.getOwnPropertyDescriptor,g=(e,t,r,i)=>{for(var a,n=i>1?void 0:i?R(t,r):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(i?a(t,r,n):a(n))||n);return i&&n&&B(t,r,n),n};exports.SchmancyPaymentCardForm=class extends w.$LitElement(){constructor(){super(...arguments),this.value={cardName:"",cardNumber:"",expirationDate:"",cvv:""},this.cardType="",this.isCardNameValid=!0,this.isCardNumberValid=!0,this.isExpirationDateValid=!0,this.isCvvValid=!0}firstUpdated(){new S(this.cardNumberInput,{creditCard:!0,creditCardStrictMode:!0,onCreditCardTypeChanged:e=>{this.cardType=e,e==="unknown"?(this.isCardNumberValid=!1,this.cardNumberInput.setCustomValidity("Please enter a valid card number."),this.cardNumberInput.error=!0):(this.isCardNumberValid=!0,this.cardNumberInput.setCustomValidity(""),this.cardNumberInput.error=!1,this.cvvInput.maxlength=e==="amex"?4:3)}}),new S(this.expirationDateInput,{date:!0,datePattern:["m","y"],onValueChanged:e=>{const t=e.target.value;if(!t||t.length<5)this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity("Please enter a valid expiration date (MM/YY)."),this.expirationDateInput.error=!0;else{const[r,i]=t.split("/"),a=new Date,n=a.getFullYear()%100,o=a.getMonth()+1,l=parseInt(r,10),d=parseInt(i,10);d<n||d===n&&l<o?(this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity("Card has expired."),this.expirationDateInput.error=!0):(this.isExpirationDateValid=!0,this.expirationDateInput.setCustomValidity(""),this.expirationDateInput.error=!1)}}}),new S(this.cvvInput,{blocks:[4],numericOnly:!0,onValueChanged:e=>{const t=this.cardType==="amex"?4:3;e.target.value.length<t?(this.isCvvValid=!1,this.cvvInput.setCustomValidity(`Please enter a valid ${t}-digit CVV.`),this.cvvInput.error=!0):(this.isCvvValid=!0,this.cvvInput.setCustomValidity(""),this.cvvInput.error=!1)}}),new S(this.cardNameInput,{uppercase:!0,delimiter:" ",onValueChanged:e=>{!e.target.value||e.target.value.length<3?(this.isCardNameValid=!1,this.cardNameInput.setCustomValidity("Please enter the name as it appears on the card."),this.cardNameInput.error=!0):(this.isCardNameValid=!0,this.cardNameInput.setCustomValidity(""),this.cardNameInput.error=!1)}})}reportValidity(){return this.form.reportValidity()}checkValidity(){return!!this.form.reportValidity()}emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:{...this.value},bubbles:!0}))}render(){const e=this.getCardIcon();return D.html`
2
2
  <schmancy-form
3
3
  @change=${t=>{t.stopPropagation(),t.preventDefault()}}
4
4
  >
@@ -71,4 +71,4 @@
71
71
  <span>Your payment information is secure and encrypted</span>
72
72
  </div>
73
73
  `}},g([h.property({type:Object,reflect:!0})],exports.SchmancyPaymentCardForm.prototype,"value",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"cardType",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"cardName",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"cardNumber",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"expirationDate",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"cvv",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"isCardNameValid",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"isCardNumberValid",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"isExpirationDateValid",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"isCvvValid",2),g([h.query("#cardNumber")],exports.SchmancyPaymentCardForm.prototype,"cardNumberInput",2),g([h.query("#expirationDate")],exports.SchmancyPaymentCardForm.prototype,"expirationDateInput",2),g([h.query("#cvv")],exports.SchmancyPaymentCardForm.prototype,"cvvInput",2),g([h.query("#cardName")],exports.SchmancyPaymentCardForm.prototype,"cardNameInput",2),g([h.query("schmancy-form")],exports.SchmancyPaymentCardForm.prototype,"form",2),exports.SchmancyPaymentCardForm=g([h.customElement("schmancy-payment-card-form")],exports.SchmancyPaymentCardForm);
74
- //# sourceMappingURL=payment-card-form-EO3auDS8.cjs.map
74
+ //# sourceMappingURL=payment-card-form-8a4Nqqhy.cjs.map