@kiva/kv-components 7.6.2 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/.eslintignore +5 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.js +236 -216
  4. package/dist/utils/Alea.d.ts +9 -0
  5. package/dist/utils/Alea.js +23 -23
  6. package/dist/utils/arrayUtils.d.ts +3 -0
  7. package/dist/utils/arrayUtils.js +1 -1
  8. package/dist/utils/attrs.d.ts +6 -0
  9. package/dist/utils/carousels.d.ts +21 -0
  10. package/dist/utils/comparators.d.ts +3 -0
  11. package/dist/utils/comparators.js +20 -6
  12. package/dist/utils/debounce.d.ts +1 -0
  13. package/dist/utils/debounce.js +4 -4
  14. package/dist/utils/event.d.ts +1 -0
  15. package/dist/utils/event.js +7 -0
  16. package/dist/utils/expander.d.ts +14 -0
  17. package/dist/utils/imageUtils.d.ts +11 -0
  18. package/dist/utils/imageUtils.js +12 -12
  19. package/dist/utils/index.d.ts +21 -0
  20. package/dist/utils/loanCard.d.ts +35 -0
  21. package/dist/utils/loanCard.js +2 -2
  22. package/dist/utils/loanSearch/queryParamUtils.d.ts +1 -0
  23. package/dist/utils/loanUtils.d.ts +11 -0
  24. package/dist/utils/loanUtils.js +56 -53
  25. package/dist/utils/mapUtils.d.ts +5 -0
  26. package/dist/utils/markMatches.d.ts +1 -0
  27. package/dist/utils/paramCase.d.ts +1 -0
  28. package/dist/utils/printing.d.ts +2 -0
  29. package/dist/utils/scrollLock.d.ts +4 -0
  30. package/dist/utils/themeUtils.d.ts +12 -0
  31. package/dist/utils/throttle.d.ts +1 -0
  32. package/dist/utils/throttle.js +4 -4
  33. package/dist/utils/touchEvents.d.ts +3 -0
  34. package/dist/utils/touchEvents.js +9 -9
  35. package/dist/utils/treemap.d.ts +16 -0
  36. package/dist/utils/treemap.js +1 -1
  37. package/dist/vue/KvAccordionItem.js +28 -82
  38. package/dist/vue/KvAccordionItem.vue.d.ts +107 -0
  39. package/dist/vue/KvAccordionItem2.js +60 -0
  40. package/dist/vue/KvActivityRow.js +11 -22
  41. package/dist/vue/KvActivityRow.vue.d.ts +66 -0
  42. package/dist/vue/KvActivityRow2.js +16 -0
  43. package/dist/vue/KvAtbModal.css +1 -1
  44. package/dist/vue/KvAtbModal.js +68 -248
  45. package/dist/vue/KvAtbModal.vue.d.ts +359 -0
  46. package/dist/vue/KvAtbModal2.js +186 -0
  47. package/dist/vue/KvBorrowerImage.js +17 -118
  48. package/dist/vue/KvBorrowerImage.vue.d.ts +62 -0
  49. package/dist/vue/KvBorrowerImage2.js +106 -0
  50. package/dist/vue/KvButton.js +20 -164
  51. package/dist/vue/KvButton.vue.d.ts +94 -0
  52. package/dist/vue/KvButton2.js +149 -0
  53. package/dist/vue/KvCardFrame.js +12 -74
  54. package/dist/vue/KvCardFrame.vue.d.ts +86 -0
  55. package/dist/vue/KvCardFrame2.js +67 -0
  56. package/dist/vue/KvCarousel.css +1 -1
  57. package/dist/vue/KvCarousel.js +55 -192
  58. package/dist/vue/KvCarousel.vue.d.ts +135 -0
  59. package/dist/vue/KvCarousel2.js +142 -0
  60. package/dist/vue/KvCartModal.css +1 -1
  61. package/dist/vue/KvCartModal.js +31 -131
  62. package/dist/vue/KvCartModal.vue.d.ts +163 -0
  63. package/dist/vue/KvCartModal2.js +106 -0
  64. package/dist/vue/KvCartPill.js +12 -51
  65. package/dist/vue/KvCartPill.vue.d.ts +52 -0
  66. package/dist/vue/KvCartPill2.js +45 -0
  67. package/dist/vue/KvCheckbox.css +1 -1
  68. package/dist/vue/KvCheckbox.js +30 -126
  69. package/dist/vue/KvCheckbox.vue.d.ts +90 -0
  70. package/dist/vue/KvCheckbox2.js +102 -0
  71. package/dist/vue/KvCheckoutReceipt.css +1 -1
  72. package/dist/vue/KvCheckoutReceipt.js +120 -199
  73. package/dist/vue/KvCheckoutReceipt.vue.d.ts +164 -0
  74. package/dist/vue/KvCheckoutReceipt2.js +85 -0
  75. package/dist/vue/KvChip.js +12 -29
  76. package/dist/vue/KvChip.vue.d.ts +22 -0
  77. package/dist/vue/KvChip2.js +22 -0
  78. package/dist/vue/KvClassicLoanCard.css +1 -1
  79. package/dist/vue/KvClassicLoanCard.js +83 -351
  80. package/dist/vue/KvClassicLoanCard.vue.d.ts +2120 -0
  81. package/dist/vue/KvClassicLoanCard2.js +281 -0
  82. package/dist/vue/KvCommentsAdd.css +1 -1
  83. package/dist/vue/KvCommentsAdd.js +34 -81
  84. package/dist/vue/KvCommentsAdd.vue.d.ts +296 -0
  85. package/dist/vue/KvCommentsAdd2.js +57 -0
  86. package/dist/vue/KvCommentsContainer.js +15 -66
  87. package/dist/vue/KvCommentsContainer.vue.d.ts +954 -0
  88. package/dist/vue/KvCommentsContainer2.js +58 -0
  89. package/dist/vue/KvCommentsHeartButton.css +1 -1
  90. package/dist/vue/KvCommentsHeartButton.js +12 -51
  91. package/dist/vue/KvCommentsHeartButton.vue.d.ts +42 -0
  92. package/dist/vue/KvCommentsHeartButton2.js +44 -0
  93. package/dist/vue/KvCommentsList.js +9 -51
  94. package/dist/vue/KvCommentsList.vue.d.ts +619 -0
  95. package/dist/vue/KvCommentsList2.js +46 -0
  96. package/dist/vue/KvCommentsListItem.js +62 -186
  97. package/dist/vue/KvCommentsListItem.vue.d.ts +571 -0
  98. package/dist/vue/KvCommentsListItem2.js +135 -0
  99. package/dist/vue/KvCommentsReplyButton.css +1 -1
  100. package/dist/vue/KvCommentsReplyButton.js +8 -17
  101. package/dist/vue/KvCommentsReplyButton.vue.d.ts +98 -0
  102. package/dist/vue/KvCommentsReplyButton2.js +13 -0
  103. package/dist/vue/KvCompactLoanCard.css +1 -1
  104. package/dist/vue/KvCompactLoanCard.js +71 -327
  105. package/dist/vue/KvCompactLoanCard.vue.d.ts +1272 -0
  106. package/dist/vue/KvCompactLoanCard2.js +269 -0
  107. package/dist/vue/KvContentfulImg.js +47 -149
  108. package/dist/vue/KvContentfulImg.vue.d.ts +107 -0
  109. package/dist/vue/KvContentfulImg2.js +119 -0
  110. package/dist/vue/KvCountdownTimer.js +8 -28
  111. package/dist/vue/KvCountdownTimer.vue.d.ts +15 -0
  112. package/dist/vue/KvCountdownTimer2.js +26 -0
  113. package/dist/vue/KvDatePicker.js +21 -101
  114. package/dist/vue/KvDatePicker.vue.d.ts +58 -0
  115. package/dist/vue/KvDatePicker2.js +86 -0
  116. package/dist/vue/KvExpandable.js +9 -56
  117. package/dist/vue/KvExpandable.vue.d.ts +53 -0
  118. package/dist/vue/KvExpandable2.js +52 -0
  119. package/dist/vue/KvExpandableQuestion.js +23 -82
  120. package/dist/vue/KvExpandableQuestion.vue.d.ts +124 -0
  121. package/dist/vue/KvExpandableQuestion2.js +65 -0
  122. package/dist/vue/KvFlag.css +1 -1
  123. package/dist/vue/KvFlag.js +16 -617
  124. package/dist/vue/KvFlag.vue.d.ts +66 -0
  125. package/dist/vue/KvFlag2.js +606 -0
  126. package/dist/vue/KvGrid.js +7 -18
  127. package/dist/vue/KvGrid.vue.d.ts +14 -0
  128. package/dist/vue/KvGrid2.js +15 -0
  129. package/dist/vue/KvIconBag.js +12 -18
  130. package/dist/vue/KvIconBag.vue.d.ts +14 -0
  131. package/dist/vue/KvIconBag2.js +11 -0
  132. package/dist/vue/KvImpactDashboardHeader.vue.d.ts +17 -0
  133. package/dist/vue/KvImpactVerticalSelector.js +31 -110
  134. package/dist/vue/KvImpactVerticalSelector.vue.d.ts +278 -0
  135. package/dist/vue/KvImpactVerticalSelector2.js +85 -0
  136. package/dist/vue/KvInlineActivityCard.js +15 -44
  137. package/dist/vue/KvInlineActivityCard.vue.d.ts +71 -0
  138. package/dist/vue/KvInlineActivityCard2.js +35 -0
  139. package/dist/vue/KvInlineActivityFeed.css +1 -1
  140. package/dist/vue/KvInlineActivityFeed.js +11 -23
  141. package/dist/vue/KvInlineActivityFeed.vue.d.ts +85 -0
  142. package/dist/vue/KvInlineActivityFeed2.js +17 -0
  143. package/dist/vue/KvIntroductionLoanCard.css +1 -1
  144. package/dist/vue/KvIntroductionLoanCard.js +111 -309
  145. package/dist/vue/KvIntroductionLoanCard.vue.d.ts +617 -0
  146. package/dist/vue/KvIntroductionLoanCard2.js +209 -0
  147. package/dist/vue/KvLendAmountButton.js +9 -53
  148. package/dist/vue/KvLendAmountButton.vue.d.ts +140 -0
  149. package/dist/vue/KvLendAmountButton2.js +48 -0
  150. package/dist/vue/KvLendCta.css +1 -1
  151. package/dist/vue/KvLendCta.js +150 -530
  152. package/dist/vue/KvLendCta.vue.d.ts +583 -0
  153. package/dist/vue/KvLendCta2.js +387 -0
  154. package/dist/vue/KvLightbox.js +37 -148
  155. package/dist/vue/KvLightbox.vue.d.ts +77 -0
  156. package/dist/vue/KvLightbox2.js +117 -0
  157. package/dist/vue/KvLineGraph.js +25 -58
  158. package/dist/vue/KvLineGraph.vue.d.ts +35 -0
  159. package/dist/vue/KvLineGraph2.js +39 -0
  160. package/dist/vue/KvLoadingPlaceholder.vue.d.ts +2 -0
  161. package/dist/vue/KvLoadingSpinner.js +9 -34
  162. package/dist/vue/KvLoadingSpinner.vue.d.ts +27 -0
  163. package/dist/vue/KvLoadingSpinner2.js +29 -0
  164. package/dist/vue/KvLoanActivities.css +1 -1
  165. package/dist/vue/KvLoanActivities.js +37 -179
  166. package/dist/vue/KvLoanActivities.vue.d.ts +853 -0
  167. package/dist/vue/KvLoanActivities2.js +151 -0
  168. package/dist/vue/KvLoanBookmark.js +14 -40
  169. package/dist/vue/KvLoanBookmark.vue.d.ts +32 -0
  170. package/dist/vue/KvLoanBookmark2.js +32 -0
  171. package/dist/vue/KvLoanCallouts.css +1 -1
  172. package/dist/vue/KvLoanCallouts.js +10 -17
  173. package/dist/vue/KvLoanCallouts.vue.d.ts +18 -0
  174. package/dist/vue/KvLoanCallouts2.js +12 -0
  175. package/dist/vue/KvLoanInfoCard.js +20 -19
  176. package/dist/vue/KvLoanProgressGroup.css +1 -1
  177. package/dist/vue/KvLoanProgressGroup.js +18 -57
  178. package/dist/vue/KvLoanProgressGroup.vue.d.ts +108 -0
  179. package/dist/vue/KvLoanProgressGroup2.js +44 -0
  180. package/dist/vue/KvLoanTag.js +15 -103
  181. package/dist/vue/KvLoanTag.vue.d.ts +46 -0
  182. package/dist/vue/KvLoanTag2.js +94 -0
  183. package/dist/vue/KvLoanTeamPick.vue.d.ts +2 -0
  184. package/dist/vue/KvLoanUse.js +12 -100
  185. package/dist/vue/KvLoanUse.vue.d.ts +120 -0
  186. package/dist/vue/KvLoanUse2.js +95 -0
  187. package/dist/vue/KvLogo.vue.d.ts +2 -0
  188. package/dist/vue/KvMap.js +13 -381
  189. package/dist/vue/KvMap.vue.d.ts +213 -0
  190. package/dist/vue/KvMap2.js +376 -0
  191. package/dist/vue/KvMaterialIcon.js +10 -20
  192. package/dist/vue/KvMaterialIcon.vue.d.ts +14 -0
  193. package/dist/vue/KvMaterialIcon2.js +15 -0
  194. package/dist/vue/KvPageContainer.js +9 -8
  195. package/dist/vue/KvPageContainer.vue.d.ts +2 -0
  196. package/dist/vue/KvPageContainer2.js +4 -0
  197. package/dist/vue/KvPagination.js +38 -138
  198. package/dist/vue/KvPagination.vue.d.ts +107 -0
  199. package/dist/vue/KvPagination2.js +105 -0
  200. package/dist/vue/KvPieChart.css +1 -1
  201. package/dist/vue/KvPieChart.js +49 -128
  202. package/dist/vue/KvPieChart.vue.d.ts +47 -0
  203. package/dist/vue/KvPieChart2.js +85 -0
  204. package/dist/vue/KvPill.js +9 -19
  205. package/dist/vue/KvPill.vue.d.ts +23 -0
  206. package/dist/vue/KvPill2.js +15 -0
  207. package/dist/vue/KvPopper.js +14 -122
  208. package/dist/vue/KvPopper.vue.d.ts +80 -0
  209. package/dist/vue/KvPopper2.js +113 -0
  210. package/dist/vue/KvProgressBar.js +17 -112
  211. package/dist/vue/KvProgressBar.vue.d.ts +70 -0
  212. package/dist/vue/KvProgressBar2.js +101 -0
  213. package/dist/vue/KvPulsingDot.css +1 -1
  214. package/dist/vue/KvPulsingDot.js +11 -25
  215. package/dist/vue/KvPulsingDot.vue.d.ts +23 -0
  216. package/dist/vue/KvPulsingDot2.js +19 -0
  217. package/dist/vue/KvRadio.js +23 -106
  218. package/dist/vue/KvRadio.vue.d.ts +62 -0
  219. package/dist/vue/KvRadio2.js +89 -0
  220. package/dist/vue/KvSecondaryNav.css +1 -1
  221. package/dist/vue/KvSecondaryNav.js +46 -122
  222. package/dist/vue/KvSecondaryNav.vue.d.ts +117 -0
  223. package/dist/vue/KvSecondaryNav2.js +82 -0
  224. package/dist/vue/KvSelect.css +1 -1
  225. package/dist/vue/KvSelect.js +18 -78
  226. package/dist/vue/KvSelect.vue.d.ts +58 -0
  227. package/dist/vue/KvSelect2.js +66 -0
  228. package/dist/vue/KvSideSheet.js +44 -262
  229. package/dist/vue/KvSideSheet.vue.d.ts +136 -0
  230. package/dist/vue/KvSideSheet2.js +224 -0
  231. package/dist/vue/KvSwitch.js +23 -76
  232. package/dist/vue/KvSwitch.vue.d.ts +34 -0
  233. package/dist/vue/KvSwitch2.js +59 -0
  234. package/dist/vue/KvTab.js +15 -57
  235. package/dist/vue/KvTab.vue.d.ts +34 -0
  236. package/dist/vue/KvTab2.js +48 -0
  237. package/dist/vue/KvTabPanel.js +14 -36
  238. package/dist/vue/KvTabPanel.vue.d.ts +14 -0
  239. package/dist/vue/KvTabPanel2.js +28 -0
  240. package/dist/vue/KvTabs.js +21 -75
  241. package/dist/vue/KvTabs.vue.d.ts +22 -0
  242. package/dist/vue/KvTabs2.js +60 -0
  243. package/dist/vue/KvTextInput.js +28 -148
  244. package/dist/vue/KvTextInput.vue.d.ts +105 -0
  245. package/dist/vue/KvTextInput2.js +126 -0
  246. package/dist/vue/KvTextLink.js +13 -76
  247. package/dist/vue/KvTextLink.vue.d.ts +64 -0
  248. package/dist/vue/KvTextLink2.js +68 -0
  249. package/dist/vue/KvThemeProvider.js +8 -59
  250. package/dist/vue/KvThemeProvider.vue.d.ts +23 -0
  251. package/dist/vue/KvThemeProvider2.js +55 -0
  252. package/dist/vue/KvToast.js +32 -69
  253. package/dist/vue/KvToast.vue.d.ts +31 -0
  254. package/dist/vue/KvToast2.js +43 -0
  255. package/dist/vue/KvTooltip.css +1 -1
  256. package/dist/vue/KvTooltip.js +27 -123
  257. package/dist/vue/KvTooltip.vue.d.ts +2 -0
  258. package/dist/vue/KvTooltip2.js +103 -0
  259. package/dist/vue/KvTreeMapChart.css +1 -1
  260. package/dist/vue/KvTreeMapChart.js +28 -156
  261. package/dist/vue/KvTreeMapChart.vue.d.ts +60 -0
  262. package/dist/vue/KvTreeMapChart2.js +133 -0
  263. package/dist/vue/KvUserAvatar.js +28 -110
  264. package/dist/vue/KvUserAvatar.vue.d.ts +55 -0
  265. package/dist/vue/KvUserAvatar2.js +88 -0
  266. package/dist/vue/KvUtilityMenu.js +19 -95
  267. package/dist/vue/KvUtilityMenu.vue.d.ts +104 -0
  268. package/dist/vue/KvUtilityMenu2.js +81 -0
  269. package/dist/vue/KvVerticalCarousel.js +40 -137
  270. package/dist/vue/KvVerticalCarousel.vue.d.ts +90 -0
  271. package/dist/vue/KvVerticalCarousel2.js +103 -0
  272. package/dist/vue/KvVotingCard.css +1 -1
  273. package/dist/vue/KvVotingCard.js +31 -88
  274. package/dist/vue/KvVotingCard.vue.d.ts +249 -0
  275. package/dist/vue/KvVotingCard2.js +63 -0
  276. package/dist/vue/KvVotingCardV2.js +35 -90
  277. package/dist/vue/KvVotingCardV2.vue.d.ts +308 -0
  278. package/dist/vue/KvVotingCardV22.js +61 -0
  279. package/dist/vue/KvWideLoanCard.css +1 -1
  280. package/dist/vue/KvWideLoanCard.js +66 -274
  281. package/dist/vue/KvWideLoanCard.vue.d.ts +1191 -0
  282. package/dist/vue/KvWideLoanCard2.js +220 -0
  283. package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.js +34 -38
  284. package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.vue.d.ts +20 -0
  285. package/dist/vue/KvWwwHeader/KvHeaderAboutMenu2.js +9 -0
  286. package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.js +20 -83
  287. package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.vue.d.ts +91 -0
  288. package/dist/vue/KvWwwHeader/KvHeaderDropdownLink2.js +69 -0
  289. package/dist/vue/KvWwwHeader/KvHeaderLinkBar.css +1 -1
  290. package/dist/vue/KvWwwHeader/KvHeaderLinkBar.js +77 -248
  291. package/dist/vue/KvWwwHeader/KvHeaderLinkBar.vue.d.ts +1071 -0
  292. package/dist/vue/KvWwwHeader/KvHeaderLinkBar2.js +178 -0
  293. package/dist/vue/KvWwwHeader/KvHeaderLogo.js +8 -12
  294. package/dist/vue/KvWwwHeader/KvHeaderLogo.vue.d.ts +4 -0
  295. package/dist/vue/KvWwwHeader/KvHeaderLogo2.js +9 -0
  296. package/dist/vue/KvWwwHeader/KvHeaderMenuLink.vue.d.ts +17 -0
  297. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.css +1 -1
  298. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.js +37 -91
  299. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.vue.d.ts +162 -0
  300. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu2.js +59 -0
  301. package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.js +36 -58
  302. package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.vue.d.ts +59 -0
  303. package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu2.js +27 -0
  304. package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.js +20 -24
  305. package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.vue.d.ts +20 -0
  306. package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu2.js +9 -0
  307. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.css +1 -1
  308. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.js +105 -181
  309. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.vue.d.ts +319 -0
  310. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu2.js +82 -0
  311. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.css +1 -1
  312. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.js +93 -173
  313. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.vue.d.ts +166 -0
  314. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu2.js +86 -0
  315. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.js +17 -157
  316. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.vue.d.ts +506 -0
  317. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu2.js +145 -0
  318. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.css +1 -1
  319. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.js +11 -18
  320. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.vue.d.ts +20 -0
  321. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList2.js +12 -0
  322. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.js +10 -16
  323. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.vue.d.ts +20 -0
  324. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList2.js +11 -0
  325. package/dist/vue/KvWwwHeader.css +1 -1
  326. package/dist/vue/KvWwwHeader.js +35 -148
  327. package/dist/vue/KvWwwHeader.vue.d.ts +4430 -0
  328. package/dist/vue/KvWwwHeader2.js +119 -0
  329. package/dist/vue/index.d.ts +86 -0
  330. package/package.json +35 -33
  331. package/tsconfig.json +32 -0
  332. package/vite.config.ts +84 -0
@@ -1,737 +1,357 @@
1
- import T from "graphql-tag";
2
- import { mdiChevronRight as N } from "@mdi/js";
3
- import { throttle as C } from "../utils/throttle.js";
4
- import { getLendCtaSelectedOption as L, getDropdownPriceArray as I } from "../utils/loanUtils.js";
5
- import R from "./KvLendAmountButton.js";
6
- import S from "./KvSelect.js";
7
- import F from "./KvButton.js";
8
- import V from "./KvMaterialIcon.js";
9
- import { resolveComponent as v, openBlock as o, createElementBlock as i, createBlock as a, withCtx as r, createTextVNode as f, toDisplayString as u, createElementVNode as h, createVNode as y, withModifiers as A, normalizeClass as w, Fragment as k, renderList as p, createCommentVNode as c } from "vue";
1
+ import P from "./KvLendCta2.js";
2
+ import { KV_LEND_CTA_FRAGMENT as oe, KV_LEND_CTA_USER_FRAGMENT as se } from "./KvLendCta2.js";
3
+ import { resolveComponent as A, openBlock as l, createElementBlock as s, createBlock as a, withCtx as w, createTextVNode as f, toDisplayString as r, createElementVNode as c, createVNode as b, withModifiers as D, normalizeClass as u, Fragment as k, renderList as _, createCommentVNode as i } from "vue";
10
4
  import "./KvLendCta.css";
11
- import W from "../_virtual/_plugin-vue_export-helper.js";
12
- const _ = "Other", E = 360, g = 480, x = 380, De = T`
13
- fragment KvLendCta on LoanBasic {
14
- id
15
- name
16
- status
17
- minNoteSize
18
- }
19
- `, ye = T`
20
- fragment KvLendCtaUser on LoanBasic {
21
- id
22
- userProperties {
23
- lentTo
24
- }
25
- }
26
- `, K = {
27
- name: "KvLendCta",
28
- components: {
29
- KvLendAmountButton: R,
30
- KvUiButton: F,
31
- KvUiSelect: S,
32
- KvMaterialIcon: V
33
- },
34
- props: {
35
- loan: {
36
- type: Object,
37
- default: () => ({})
38
- },
39
- unreservedAmount: {
40
- type: String,
41
- default: ""
42
- },
43
- basketItems: {
44
- type: Array,
45
- default: () => []
46
- },
47
- isLoading: {
48
- type: Boolean,
49
- default: !0
50
- },
51
- isAdding: {
52
- type: Boolean,
53
- default: !1
54
- },
55
- enableFiveDollarsNotes: {
56
- type: Boolean,
57
- default: !1
58
- },
59
- kvTrackFunction: {
60
- type: Function,
61
- required: !0
62
- },
63
- showViewLoan: {
64
- type: Boolean,
65
- default: !1
66
- },
67
- customLoanDetails: {
68
- type: Boolean,
69
- default: !1
70
- },
71
- externalLinks: {
72
- type: Boolean,
73
- default: !1
74
- },
75
- route: {
76
- type: Object,
77
- default: void 0
78
- },
79
- userBalance: {
80
- type: String,
81
- default: void 0
82
- },
83
- getCookie: {
84
- type: Function,
85
- default: void 0
86
- },
87
- setCookie: {
88
- type: Function,
89
- default: void 0
90
- },
91
- fiveDollarsSelected: {
92
- type: Boolean,
93
- default: !1
94
- },
95
- isVisitor: {
96
- type: Boolean,
97
- default: !0
98
- },
99
- primaryButtonText: {
100
- type: String,
101
- default: "Lend"
102
- },
103
- secondaryButtonText: {
104
- type: String,
105
- default: void 0
106
- },
107
- secondaryButtonHandler: {
108
- type: Function,
109
- default: void 0
110
- },
111
- /**
112
- * Hide preset buttons under this amount when
113
- * showPresetAmounts is true
114
- * */
115
- maxAmount: {
116
- type: String,
117
- default: ""
118
- },
119
- showPresetAmounts: {
120
- type: Boolean,
121
- default: !1
122
- },
123
- kvTrackCategory: {
124
- type: String,
125
- default: "Lending"
126
- },
127
- /**
128
- * Breakpoint for narrow desktop layout (default: 480px)
129
- * When component width is below this, it will use stacked layout even on desktop
130
- */
131
- narrowSidebarBreakpoint: {
132
- type: Number,
133
- default: g
134
- },
135
- /**
136
- * Breakpoint for narrow desktop dropdown layout (default: 380px)
137
- * When component width is below this in narrow desktop mode, dropdown moves to second row
138
- */
139
- narrowSidebarDropdownBreakpoint: {
140
- type: Number,
141
- default: x
142
- }
143
- },
144
- data() {
145
- var n, s;
146
- return {
147
- mdiChevronRight: N,
148
- defaultAmountOptions: [25, 50, 75],
149
- selectedOption: L(
150
- this.getCookie,
151
- this.setCookie,
152
- this.enableFiveDollarsNotes,
153
- (s = (n = this.route) == null ? void 0 : n.query) == null ? void 0 : s.utm_campaign,
154
- this.unreservedAmount,
155
- this.userBalance,
156
- this.fiveDollarsSelected
157
- ),
158
- selectedDropdownOption: _,
159
- OTHER_OPTION: _,
160
- // SSR-safe viewport width initialization
161
- viewportWidth: typeof window < "u" ? window.innerWidth : 1024,
162
- componentWidth: 1024,
163
- resizeObserver: null,
164
- MOBILE_DROPDOWN_BREAKPOINT: E,
165
- NARROW_SIDEBAR_BREAKPOINT: g,
166
- NARROW_SIDEBAR_DROPDOWN_BREAKPOINT: x
167
- };
168
- },
169
- computed: {
170
- readMorePath() {
171
- return this.customLoanDetails ? "" : `/lend/${this.loanId}`;
172
- },
173
- loanId() {
174
- var n;
175
- return (n = this.loan) == null ? void 0 : n.id;
176
- },
177
- status() {
178
- var n;
179
- return ((n = this.loan) == null ? void 0 : n.status) ?? "";
180
- },
181
- minNoteSize() {
182
- var n;
183
- return ((n = this.loan) == null ? void 0 : n.minNoteSize) ?? "";
184
- },
185
- lentPreviously() {
186
- var n, s;
187
- return ((s = (n = this.loan) == null ? void 0 : n.userProperties) == null ? void 0 : s.lentTo) ?? !1;
188
- },
189
- isInBasket() {
190
- var n;
191
- return ((n = this.basketItems) == null ? void 0 : n.some((s) => s.__typename === "LoanReservation" && s.id === this.loanId)) ?? !1;
192
- },
193
- prices() {
194
- const n = parseFloat(this.unreservedAmount < 25 ? this.minNoteSize : 25), s = I(
195
- this.unreservedAmount,
196
- this.isCompleteLoanActive,
197
- n,
198
- this.enableFiveDollarsNotes,
199
- this.isVisitor
200
- );
201
- return this.maxAmount ? s.filter((l) => parseFloat(l) <= parseFloat(this.maxAmount)) : s;
202
- },
203
- presetButtonsPrices() {
204
- const n = this.prices.slice(0, 3);
205
- return this.prices.length === 4 && n.push(this.prices[3]), n;
206
- },
207
- presetDropdownPrices() {
208
- if (this.prices.length === 4)
209
- return [];
210
- const n = this.prices.slice(this.defaultAmountOptions.length);
211
- return n.unshift(_), n;
212
- },
213
- loanName() {
214
- var n;
215
- return ((n = this.loan) == null ? void 0 : n.name) ?? "";
216
- },
217
- presetAmountCtaButtonText() {
218
- var n;
219
- return ((n = this.loan) == null ? void 0 : n.borrowerCount) > 1 ? "Support" : `Support ${this.loanName}`;
220
- },
221
- defaultCtaButtonText() {
222
- return this.showPresetAmounts ? this.presetAmountCtaButtonText : this.primaryButtonText || "Lend";
223
- },
224
- ctaButtonText() {
225
- switch (this.state) {
226
- case "loading":
227
- return "Loading...";
228
- case "refunded":
229
- case "expired":
230
- default:
231
- return this.defaultCtaButtonText;
232
- }
233
- },
234
- loanInBasketButtonText() {
235
- return this.secondaryButtonText ? this.secondaryButtonText : this.showPresetAmounts ? "Continue to basket" : "Checkout now";
236
- },
237
- useFormSubmit() {
238
- return !!(this.hideShowLendDropdown || this.lendButtonVisibility || this.showLendAgain || this.state === "lent-to" || this.isAdding);
239
- },
240
- state() {
241
- return this.isLoading ? "loading" : this.isAdding ? "adding" : this.isInBasket ? "basketed" : this.status === "funded" || this.status === "refunded" || this.status === "expired" ? this.status : this.allSharesReserved ? "fully-reserved" : this.lentPreviously ? "lent-to" : "lend";
242
- },
243
- lendButtonVisibility() {
244
- return this.state === "lend" || this.state === "loading";
245
- },
246
- showNonActionableLoanButton() {
247
- return this.state === "refunded" || this.state === "expired";
248
- },
249
- hideShowLendDropdown() {
250
- return this.state === "lend" || this.state === "lent-to";
251
- },
252
- allSharesReserved() {
253
- return parseFloat(this.unreservedAmount) === 0;
254
- },
255
- isLessThan25() {
256
- return this.enableFiveDollarsNotes ? !1 : this.isAmountLessThan25(this.unreservedAmount);
257
- },
258
- isLentTo() {
259
- return this.state === "lent-to";
260
- },
261
- isCompleteLoanActive() {
262
- return this.isAmountLessThan25(this.unreservedAmount) || this.isAmountBetween25And500(this.unreservedAmount);
263
- },
264
- isLendAmountButton() {
265
- const n = this.maxAmount ? this.maxAmount : this.unreservedAmount;
266
- return (this.lendButtonVisibility || this.state === "lent-to") && this.isAmountLessThan25(n) || this.showPresetAmounts && this.presetButtonsPrices.length === 1 && !this.isAdding;
267
- },
268
- isFunded() {
269
- return this.state === "funded" || this.state === "fully-reserved";
270
- },
271
- amountToLend() {
272
- return this.selectedDropdown ? this.selectedDropdownOption : this.isLessThan25 ? this.unreservedAmount : this.selectedOption;
273
- },
274
- amountForLendAmountButton() {
275
- return this.maxAmount && parseFloat(this.maxAmount) === 25 ? Math.min(parseFloat(this.maxAmount), parseFloat(this.unreservedAmount)) : this.unreservedAmount;
276
- },
277
- showLendAgain() {
278
- return this.isLentTo && !this.isLessThan25;
279
- },
280
- selectedDropdown() {
281
- return this.selectedDropdownOption !== _;
282
- },
283
- showFilteredDropdown() {
284
- return this.presetDropdownPrices.length > 1;
285
- },
286
- hideLendButton() {
287
- return this.showPresetAmounts && (this.isAdding || this.presetButtonsPrices.length === 1);
288
- },
289
- /**
290
- * Determines if component should use narrow desktop layout
291
- * This is true when we're in desktop viewport but component width is narrow
292
- */
293
- isNarrowDesktop() {
294
- return this.viewportWidth >= 768 && this.componentWidth < this.narrowSidebarBreakpoint;
295
- }
296
- },
297
- watch: {
298
- unreservedAmount(n, s) {
299
- var l, D;
300
- n !== s && s === "" && (this.selectedOption = L(
301
- this.getCookie,
302
- this.setCookie,
303
- this.enableFiveDollarsNotes,
304
- (D = (l = this.route) == null ? void 0 : l.query) == null ? void 0 : D.utm_campaign,
305
- n,
306
- this.userBalance,
307
- this.fiveDollarsSelected,
308
- this.showPresetAmounts
309
- )), this.showPresetAmounts && (this.selectedOption = _);
310
- }
311
- },
312
- mounted() {
313
- const n = () => {
314
- var s;
315
- this.viewportWidth = window.innerWidth, this.componentWidth = ((s = this.$refs.root) == null ? void 0 : s.offsetWidth) || 1024;
316
- };
317
- typeof window < "u" && (this.viewportWidth = window.innerWidth, window.ResizeObserver && this.$nextTick(() => {
318
- this.resizeObserver = new window.ResizeObserver(C(n, 50)), this.$refs.root && (this.resizeObserver.observe(this.$refs.root), n());
319
- }));
320
- },
321
- beforeDestroy() {
322
- this.resizeHandler && typeof window < "u" && window.removeEventListener("resize", this.resizeHandler), this.resizeObserver && this.$refs.root && this.resizeObserver.disconnect();
323
- },
324
- methods: {
325
- async addToBasket() {
326
- this.kvTrackFunction(
327
- this.kvTrackCategory,
328
- "Add to basket",
329
- this.showLendAgain ? "Lend again" : "lend-button-click",
330
- this.loanId,
331
- this.amountToLend
332
- ), this.$emit("add-to-basket", this.amountToLend);
333
- },
334
- isAmountLessThan25(n) {
335
- return n < 25 && n > 0;
336
- },
337
- isAmountBetween25And50(n) {
338
- return n <= 50 && n > 25;
339
- },
340
- isAmountBetween25And500(n) {
341
- return n < 500 && n >= 25;
342
- },
343
- trackLendAmountSelection(n) {
344
- this.showPresetAmounts && (this.selectedOption = null), this.kvTrackFunction(
345
- this.kvTrackCategory,
346
- "Modify lend amount",
347
- n,
348
- this.loanId,
349
- this.loanId
350
- );
351
- },
352
- clickDropdown() {
353
- this.kvTrackFunction(
354
- this.kvTrackCategory,
355
- "click-Modify loan amount",
356
- "open dialog",
357
- this.loanId,
358
- this.loanId
359
- );
360
- },
361
- clickSecondaryButton(n) {
362
- this.secondaryButtonHandler ? (n.preventDefault(), n.stopPropagation(), this.secondaryButtonHandler()) : this.handleCheckout();
363
- },
364
- clickPresetButton(n) {
365
- this.kvTrackFunction(
366
- this.kvTrackCategory,
367
- "Modify lend amount",
368
- n,
369
- this.loanId,
370
- this.loanId
371
- ), this.selectedOption = n, this.selectedDropdownOption = _;
372
- },
373
- handleCheckout() {
374
- this.kvTrackFunction(
375
- this.kvTrackCategory,
376
- "click-Continue-to-checkout",
377
- "Continue to checkout",
378
- this.loanId,
379
- this.loanId
380
- );
381
- },
382
- isNarrowComponent() {
383
- return this.componentWidth < 430;
384
- }
385
- }
386
- }, M = {
5
+ import y from "../_virtual/_plugin-vue_export-helper.js";
6
+ const N = {
387
7
  ref: "root",
388
8
  class: "tw-whitespace-nowrap"
389
- }, U = {
9
+ }, g = {
390
10
  key: 2,
391
11
  class: "tw-w-full tw-text-center tw-rounded tw-p-2",
392
12
  style: { background: "#f1f1f1" }
393
- }, z = { class: "tw-flex tw-items-center" }, H = ["disabled"], j = {
13
+ }, T = { class: "tw-flex tw-items-center" }, V = ["disabled"], O = {
394
14
  key: 0,
395
15
  class: "md:tw-hidden tw-w-full"
396
- }, q = { class: "tw-flex tw-flex-col tw-gap-1 tw-w-full" }, G = { class: "tw-flex tw-gap-1 tw-w-full" }, J = ["value"], Q = { class: "tw-flex tw-gap-1" }, X = ["value"], Y = { class: "tw-flex tw-items-center tw-h-full tw-w-full" }, Z = { class: "tw-min-w-0 tw-flex-1 tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap" }, $ = {
16
+ }, R = { class: "tw-flex tw-flex-col tw-gap-1 tw-w-full" }, C = { class: "tw-flex tw-gap-1 tw-w-full" }, I = ["value"], E = { class: "tw-flex tw-gap-1" }, S = ["value"], p = { class: "tw-flex tw-items-center tw-h-full tw-w-full" }, W = { class: "tw-min-w-0 tw-flex-1 tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap" }, F = {
397
17
  key: 1,
398
18
  class: "tw-w-full"
399
- }, ee = { class: "tw-flex tw-flex-col tw-gap-1 tw-w-full" }, te = { class: "tw-flex tw-gap-1 tw-w-full" }, ne = ["value"], se = { class: "tw-flex tw-gap-1" }, oe = ["value"], le = { class: "tw-flex tw-items-center tw-h-full tw-w-full" }, de = { class: "tw-min-w-0 tw-flex-1 tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap" }, ie = ["value"], re = {
19
+ }, U = { class: "tw-flex tw-flex-col tw-gap-1 tw-w-full" }, M = { class: "tw-flex tw-gap-1 tw-w-full" }, K = ["value"], H = { class: "tw-flex tw-gap-1" }, j = ["value"], G = { class: "tw-flex tw-items-center tw-h-full tw-w-full" }, z = { class: "tw-min-w-0 tw-flex-1 tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap" }, q = ["value"], J = {
400
20
  key: 3,
401
21
  class: "amountDropdownWrapper"
402
- }, ae = ["value"];
403
- function ue(n, s, l, D, d, e) {
404
- const m = v("kv-ui-button"), P = v("kv-material-icon"), B = v("kv-ui-select"), O = v("kv-lend-amount-button");
405
- return o(), i("div", M, [
406
- e.isInBasket ? (o(), a(m, {
22
+ }, Q = ["value"];
23
+ function X(B, o, n, Y, d, e) {
24
+ const m = A("kv-ui-button"), v = A("kv-material-icon"), h = A("kv-ui-select"), L = A("kv-lend-amount-button");
25
+ return l(), s("div", N, [
26
+ e.isInBasket ? (l(), a(m, {
407
27
  key: 0,
408
28
  variant: "secondary",
409
29
  class: "tw-inline-flex tw-flex-1 tw-w-full",
410
30
  "data-testid": "bp-lend-cta-checkout-button",
411
- to: l.externalLinks ? void 0 : "/basket",
412
- href: l.externalLinks ? "/basket" : void 0,
413
- onClick: s[0] || (s[0] = (t) => e.clickSecondaryButton(t))
31
+ to: n.externalLinks ? void 0 : "/basket",
32
+ href: n.externalLinks ? "/basket" : void 0,
33
+ onClick: o[0] || (o[0] = (t) => e.clickSecondaryButton(t))
414
34
  }, {
415
- default: r(() => [
416
- f(u(e.loanInBasketButtonText), 1)
35
+ default: w(() => [
36
+ f(r(e.loanInBasketButtonText), 1)
417
37
  ]),
418
38
  _: 1
419
- }, 8, ["to", "href"])) : e.showNonActionableLoanButton ? (o(), a(m, {
39
+ }, 8, ["to", "href"])) : e.showNonActionableLoanButton ? (l(), a(m, {
420
40
  key: 1,
421
41
  class: "tw-inline-flex tw-flex-1"
422
42
  }, {
423
- default: r(() => [
424
- f(u(e.ctaButtonText), 1)
43
+ default: w(() => [
44
+ f(r(e.ctaButtonText), 1)
425
45
  ]),
426
46
  _: 1
427
- })) : e.isFunded ? (o(), i("div", U, " This loan was just funded! 🎉 ")) : l.showViewLoan ? (o(), a(m, {
47
+ })) : e.isFunded ? (l(), s("div", g, " This loan was just funded! 🎉 ")) : n.showViewLoan ? (l(), a(m, {
428
48
  key: 3,
429
49
  state: `${e.allSharesReserved ? "disabled" : ""}`,
430
- to: l.externalLinks ? void 0 : e.readMorePath,
431
- href: l.externalLinks ? e.readMorePath : void 0,
50
+ to: n.externalLinks ? void 0 : e.readMorePath,
51
+ href: n.externalLinks ? e.readMorePath : void 0,
432
52
  class: "tw-mb-0",
433
- onClick: s[1] || (s[1] = (t) => n.$emit("show-loan-details", t))
53
+ onClick: o[1] || (o[1] = (t) => B.$emit("show-loan-details", t))
434
54
  }, {
435
- default: r(() => [
436
- h("span", z, [
437
- s[9] || (s[9] = f(" View loan ")),
438
- y(P, {
55
+ default: w(() => [
56
+ c("span", T, [
57
+ o[9] || (o[9] = f(" View loan ")),
58
+ b(v, {
439
59
  class: "tw-w-3 tw-h-3",
440
60
  icon: d.mdiChevronRight
441
61
  }, null, 8, ["icon"])
442
62
  ])
443
63
  ]),
444
64
  _: 1
445
- }, 8, ["state", "to", "href"])) : e.useFormSubmit ? (o(), i("form", {
65
+ }, 8, ["state", "to", "href"])) : e.useFormSubmit ? (l(), s("form", {
446
66
  key: 4,
447
67
  class: "tw-w-full tw-flex",
448
- onSubmit: s[8] || (s[8] = A((...t) => e.addToBasket && e.addToBasket(...t), ["prevent"]))
68
+ onSubmit: o[8] || (o[8] = D((...t) => e.addToBasket && e.addToBasket(...t), ["prevent"]))
449
69
  }, [
450
- h("fieldset", {
451
- class: w(["tw-w-full tw-flex", {
452
- "tw-flex-col md:tw-flex-row md:tw-justify-between tw-min-w-0": l.showPresetAmounts && !e.isNarrowDesktop,
453
- "tw-flex-col tw-min-w-0": l.showPresetAmounts && e.isNarrowDesktop,
454
- "tw-gap-1.5": l.showPresetAmounts && !e.isLendAmountButton && !l.isAdding && !e.isNarrowDesktop
70
+ c("fieldset", {
71
+ class: u(["tw-w-full tw-flex", {
72
+ "tw-flex-col md:tw-flex-row md:tw-justify-between tw-min-w-0": n.showPresetAmounts && !e.isNarrowDesktop,
73
+ "tw-flex-col tw-min-w-0": n.showPresetAmounts && e.isNarrowDesktop,
74
+ "tw-gap-1.5": n.showPresetAmounts && !e.isLendAmountButton && !n.isAdding && !e.isNarrowDesktop
455
75
  }]),
456
- disabled: l.isAdding,
76
+ disabled: n.isAdding,
457
77
  "data-testid": "bp-lend-cta-select-and-button"
458
78
  }, [
459
- l.showPresetAmounts && !l.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && !e.isNarrowDesktop ? (o(), i("div", j, [
460
- h("div", q, [
461
- h("div", G, [
462
- (o(!0), i(k, null, p(e.presetButtonsPrices, (t) => (o(), a(m, {
79
+ n.showPresetAmounts && !n.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && !e.isNarrowDesktop ? (l(), s("div", O, [
80
+ c("div", R, [
81
+ c("div", C, [
82
+ (l(!0), s(k, null, _(e.presetButtonsPrices, (t) => (l(), a(m, {
463
83
  key: t,
464
84
  variant: "secondary",
465
- class: w(["preset-option tw-flex-1 tw-min-w-0 tw-whitespace-nowrap", { "selected-option": d.selectedOption == t }]),
85
+ class: u(["preset-option tw-flex-1 tw-min-w-0 tw-whitespace-nowrap", { "selected-option": d.selectedOption == t }]),
466
86
  "data-testid": "bp-lend-cta-lend-button-mobile",
467
- onClick: (b) => e.clickPresetButton(t)
87
+ onClick: (x) => e.clickPresetButton(t)
468
88
  }, {
469
- default: r(() => [
470
- f(" $ " + u(t), 1)
89
+ default: w(() => [
90
+ f(" $ " + r(t), 1)
471
91
  ]),
472
92
  _: 2
473
93
  }, 1032, ["class", "onClick"]))), 128)),
474
- e.showFilteredDropdown && d.viewportWidth >= d.MOBILE_DROPDOWN_BREAKPOINT ? (o(), a(B, {
94
+ e.showFilteredDropdown && d.viewportWidth >= d.MOBILE_DROPDOWN_BREAKPOINT ? (l(), a(h, {
475
95
  key: 0,
476
96
  id: `LoanAmountDropdownMobile_${e.loanId}`,
477
97
  modelValue: d.selectedDropdownOption,
478
98
  "onUpdate:modelValue": [
479
- s[2] || (s[2] = (t) => d.selectedDropdownOption = t),
99
+ o[2] || (o[2] = (t) => d.selectedDropdownOption = t),
480
100
  e.trackLendAmountSelection
481
101
  ],
482
- class: w(["filtered-dropdown mobile-dropdown tw-rounded", {
102
+ class: u(["filtered-dropdown mobile-dropdown tw-rounded", {
483
103
  "unselected-dropdown": !e.selectedDropdown,
484
104
  "selected-dropdown": e.selectedDropdown
485
105
  }]),
486
106
  "aria-label": "Lend amount",
487
- onClick: A(e.clickDropdown, ["stop"])
107
+ onClick: D(e.clickDropdown, ["stop"])
488
108
  }, {
489
- default: r(() => [
490
- (o(!0), i(k, null, p(e.presetDropdownPrices, (t) => (o(), i("option", {
109
+ default: w(() => [
110
+ (l(!0), s(k, null, _(e.presetDropdownPrices, (t) => (l(), s("option", {
491
111
  key: t,
492
112
  value: t
493
- }, u(t !== d.OTHER_OPTION ? `$${t}` : t), 9, J))), 128))
113
+ }, r(t !== d.OTHER_OPTION ? `$${t}` : t), 9, I))), 128))
494
114
  ]),
495
115
  _: 1
496
- }, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : c("", !0)
116
+ }, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : i("", !0)
497
117
  ]),
498
- h("div", Q, [
499
- e.showFilteredDropdown && d.viewportWidth < d.MOBILE_DROPDOWN_BREAKPOINT ? (o(), a(B, {
118
+ c("div", E, [
119
+ e.showFilteredDropdown && d.viewportWidth < d.MOBILE_DROPDOWN_BREAKPOINT ? (l(), a(h, {
500
120
  key: 0,
501
121
  id: `LoanAmountDropdownMobile_Small_${e.loanId}`,
502
122
  modelValue: d.selectedDropdownOption,
503
123
  "onUpdate:modelValue": [
504
- s[3] || (s[3] = (t) => d.selectedDropdownOption = t),
124
+ o[3] || (o[3] = (t) => d.selectedDropdownOption = t),
505
125
  e.trackLendAmountSelection
506
126
  ],
507
- class: w(["filtered-dropdown mobile-dropdown-small tw-rounded tw-w-2/5", {
127
+ class: u(["filtered-dropdown mobile-dropdown-small tw-rounded tw-w-2/5", {
508
128
  "unselected-dropdown": !e.selectedDropdown,
509
129
  "selected-dropdown": e.selectedDropdown
510
130
  }]),
511
131
  "aria-label": "Lend amount",
512
- onClick: A(e.clickDropdown, ["stop"])
132
+ onClick: D(e.clickDropdown, ["stop"])
513
133
  }, {
514
- default: r(() => [
515
- (o(!0), i(k, null, p(e.presetDropdownPrices, (t) => (o(), i("option", {
134
+ default: w(() => [
135
+ (l(!0), s(k, null, _(e.presetDropdownPrices, (t) => (l(), s("option", {
516
136
  key: "small-" + t,
517
137
  value: t
518
- }, u(t !== d.OTHER_OPTION ? `$${t}` : t), 9, X))), 128))
138
+ }, r(t !== d.OTHER_OPTION ? `$${t}` : t), 9, S))), 128))
519
139
  ]),
520
140
  _: 1
521
- }, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : c("", !0),
522
- y(m, {
523
- class: w(["tw-inline-flex tw-flex-1 button-ellipsis tw-min-w-0", d.viewportWidth < d.MOBILE_DROPDOWN_BREAKPOINT ? "tw-w-3/5" : "tw-w-full"]),
141
+ }, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : i("", !0),
142
+ b(m, {
143
+ class: u(["tw-inline-flex tw-flex-1 button-ellipsis tw-min-w-0", d.viewportWidth < d.MOBILE_DROPDOWN_BREAKPOINT ? "tw-w-3/5" : "tw-w-full"]),
524
144
  "data-testid": "bp-lend-cta-mobile-lend-button",
525
145
  type: "submit"
526
146
  }, {
527
- default: r(() => [
528
- h("span", Y, [
529
- h("span", Z, u(e.ctaButtonText), 1)
147
+ default: w(() => [
148
+ c("span", p, [
149
+ c("span", W, r(e.ctaButtonText), 1)
530
150
  ])
531
151
  ]),
532
152
  _: 1
533
153
  }, 8, ["class"])
534
154
  ])
535
155
  ])
536
- ])) : c("", !0),
537
- l.showPresetAmounts && !l.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && e.isNarrowDesktop ? (o(), i("div", $, [
538
- h("div", ee, [
539
- h("div", te, [
540
- (o(!0), i(k, null, p(e.presetButtonsPrices, (t) => (o(), a(m, {
156
+ ])) : i("", !0),
157
+ n.showPresetAmounts && !n.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && e.isNarrowDesktop ? (l(), s("div", F, [
158
+ c("div", U, [
159
+ c("div", M, [
160
+ (l(!0), s(k, null, _(e.presetButtonsPrices, (t) => (l(), a(m, {
541
161
  key: t,
542
162
  variant: "secondary",
543
- class: w(["preset-option tw-flex-1 tw-min-w-0 tw-whitespace-nowrap", { "selected-option": d.selectedOption == t }]),
163
+ class: u(["preset-option tw-flex-1 tw-min-w-0 tw-whitespace-nowrap", { "selected-option": d.selectedOption == t }]),
544
164
  "data-testid": "bp-lend-cta-lend-button-narrow-desktop",
545
- onClick: (b) => e.clickPresetButton(t)
165
+ onClick: (x) => e.clickPresetButton(t)
546
166
  }, {
547
- default: r(() => [
548
- f(" $ " + u(t), 1)
167
+ default: w(() => [
168
+ f(" $ " + r(t), 1)
549
169
  ]),
550
170
  _: 2
551
171
  }, 1032, ["class", "onClick"]))), 128)),
552
- e.showFilteredDropdown && d.componentWidth >= d.NARROW_SIDEBAR_DROPDOWN_BREAKPOINT ? (o(), a(B, {
172
+ e.showFilteredDropdown && d.componentWidth >= d.NARROW_SIDEBAR_DROPDOWN_BREAKPOINT ? (l(), a(h, {
553
173
  key: 0,
554
174
  id: `LoanAmountDropdownNarrowDesktop_${e.loanId}`,
555
175
  modelValue: d.selectedDropdownOption,
556
176
  "onUpdate:modelValue": [
557
- s[4] || (s[4] = (t) => d.selectedDropdownOption = t),
177
+ o[4] || (o[4] = (t) => d.selectedDropdownOption = t),
558
178
  e.trackLendAmountSelection
559
179
  ],
560
- class: w(["filtered-dropdown mobile-dropdown tw-flex-1 tw-rounded", {
180
+ class: u(["filtered-dropdown mobile-dropdown tw-flex-1 tw-rounded", {
561
181
  "unselected-dropdown": !e.selectedDropdown,
562
182
  "selected-dropdown": e.selectedDropdown
563
183
  }]),
564
184
  "aria-label": "Lend amount",
565
- onClick: A(e.clickDropdown, ["stop"])
185
+ onClick: D(e.clickDropdown, ["stop"])
566
186
  }, {
567
- default: r(() => [
568
- (o(!0), i(k, null, p(e.presetDropdownPrices, (t) => (o(), i("option", {
187
+ default: w(() => [
188
+ (l(!0), s(k, null, _(e.presetDropdownPrices, (t) => (l(), s("option", {
569
189
  key: t,
570
190
  value: t
571
- }, u(t !== d.OTHER_OPTION ? `${t}` : t), 9, ne))), 128))
191
+ }, r(t !== d.OTHER_OPTION ? `${t}` : t), 9, K))), 128))
572
192
  ]),
573
193
  _: 1
574
- }, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : c("", !0)
194
+ }, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : i("", !0)
575
195
  ]),
576
- h("div", se, [
577
- e.showFilteredDropdown && d.componentWidth < d.NARROW_SIDEBAR_DROPDOWN_BREAKPOINT ? (o(), a(B, {
196
+ c("div", H, [
197
+ e.showFilteredDropdown && d.componentWidth < d.NARROW_SIDEBAR_DROPDOWN_BREAKPOINT ? (l(), a(h, {
578
198
  key: 0,
579
199
  id: `LoanAmountDropdownNarrowDesktop_Small_${e.loanId}`,
580
200
  modelValue: d.selectedDropdownOption,
581
201
  "onUpdate:modelValue": [
582
- s[5] || (s[5] = (t) => d.selectedDropdownOption = t),
202
+ o[5] || (o[5] = (t) => d.selectedDropdownOption = t),
583
203
  e.trackLendAmountSelection
584
204
  ],
585
- class: w(["filtered-dropdown mobile-dropdown-small tw-rounded tw-w-2/5", {
205
+ class: u(["filtered-dropdown mobile-dropdown-small tw-rounded tw-w-2/5", {
586
206
  "unselected-dropdown": !e.selectedDropdown,
587
207
  "selected-dropdown": e.selectedDropdown
588
208
  }]),
589
209
  "aria-label": "Lend amount",
590
- onClick: A(e.clickDropdown, ["stop"])
210
+ onClick: D(e.clickDropdown, ["stop"])
591
211
  }, {
592
- default: r(() => [
593
- (o(!0), i(k, null, p(e.presetDropdownPrices, (t) => (o(), i("option", {
212
+ default: w(() => [
213
+ (l(!0), s(k, null, _(e.presetDropdownPrices, (t) => (l(), s("option", {
594
214
  key: "narrow-small-" + t,
595
215
  value: t
596
- }, u(t !== d.OTHER_OPTION ? `${t}` : t), 9, oe))), 128))
216
+ }, r(t !== d.OTHER_OPTION ? `${t}` : t), 9, j))), 128))
597
217
  ]),
598
218
  _: 1
599
- }, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : c("", !0),
600
- y(m, {
601
- class: w(["tw-inline-flex tw-flex-1 button-ellipsis tw-min-w-0", d.componentWidth < d.NARROW_SIDEBAR_DROPDOWN_BREAKPOINT ? "tw-w-3/5" : "tw-w-full"]),
219
+ }, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : i("", !0),
220
+ b(m, {
221
+ class: u(["tw-inline-flex tw-flex-1 button-ellipsis tw-min-w-0", d.componentWidth < d.NARROW_SIDEBAR_DROPDOWN_BREAKPOINT ? "tw-w-3/5" : "tw-w-full"]),
602
222
  "data-testid": "bp-lend-cta-narrow-desktop-lend-button",
603
223
  type: "submit"
604
224
  }, {
605
- default: r(() => [
606
- h("span", le, [
607
- h("span", de, u(e.ctaButtonText), 1)
225
+ default: w(() => [
226
+ c("span", G, [
227
+ c("span", z, r(e.ctaButtonText), 1)
608
228
  ])
609
229
  ]),
610
230
  _: 1
611
231
  }, 8, ["class"])
612
232
  ])
613
233
  ])
614
- ])) : c("", !0),
615
- l.showPresetAmounts && !l.isAdding && !e.isNarrowDesktop ? (o(), i("div", {
234
+ ])) : i("", !0),
235
+ n.showPresetAmounts && !n.isAdding && !e.isNarrowDesktop ? (l(), s("div", {
616
236
  key: 2,
617
- class: w({
237
+ class: u({
618
238
  "tw-flex tw-gap-0.5 md:tw-gap-1 lg:tw-gap-1 tw-flex-wrap md:tw-flex-nowrap": !0,
619
239
  "tw-hidden md:tw-flex": !e.isLendAmountButton && e.presetButtonsPrices.length > 1
620
240
  })
621
241
  }, [
622
- e.isLendAmountButton ? c("", !0) : (o(!0), i(k, { key: 0 }, p(e.presetButtonsPrices, (t) => (o(), a(m, {
242
+ e.isLendAmountButton ? i("", !0) : (l(!0), s(k, { key: 0 }, _(e.presetButtonsPrices, (t) => (l(), a(m, {
623
243
  key: t,
624
244
  variant: "secondary",
625
- class: w(["tw-inline-flex tw-flex-1 preset-option tw-w-8 tw-whitespace-nowrap", { "selected-option": d.selectedOption == t }]),
245
+ class: u(["tw-inline-flex tw-flex-1 preset-option tw-w-8 tw-whitespace-nowrap", { "selected-option": d.selectedOption == t }]),
626
246
  "data-testid": "bp-lend-cta-lend-button",
627
- onClick: (b) => e.clickPresetButton(t)
247
+ onClick: (x) => e.clickPresetButton(t)
628
248
  }, {
629
- default: r(() => [
630
- f(" $" + u(t), 1)
249
+ default: w(() => [
250
+ f(" $" + r(t), 1)
631
251
  ]),
632
252
  _: 2
633
253
  }, 1032, ["class", "onClick"]))), 128)),
634
- e.showFilteredDropdown ? (o(), a(B, {
254
+ e.showFilteredDropdown ? (l(), a(h, {
635
255
  key: 1,
636
256
  id: `LoanAmountDropdown_${e.loanId}`,
637
257
  modelValue: d.selectedDropdownOption,
638
258
  "onUpdate:modelValue": [
639
- s[6] || (s[6] = (t) => d.selectedDropdownOption = t),
259
+ o[6] || (o[6] = (t) => d.selectedDropdownOption = t),
640
260
  e.trackLendAmountSelection
641
261
  ],
642
- class: w(["tw-min-w-12 tw-rounded filtered-dropdown", {
262
+ class: u(["tw-min-w-12 tw-rounded filtered-dropdown", {
643
263
  "unselected-dropdown": !e.selectedDropdown,
644
264
  "selected-dropdown": e.selectedDropdown
645
265
  }]),
646
266
  "aria-label": "Lend amount",
647
- onClick: A(e.clickDropdown, ["stop"])
267
+ onClick: D(e.clickDropdown, ["stop"])
648
268
  }, {
649
- default: r(() => [
650
- (o(!0), i(k, null, p(e.presetDropdownPrices, (t) => (o(), i("option", {
269
+ default: w(() => [
270
+ (l(!0), s(k, null, _(e.presetDropdownPrices, (t) => (l(), s("option", {
651
271
  key: t,
652
272
  value: t
653
- }, u(t !== d.OTHER_OPTION ? `$${t}` : t), 9, ie))), 128))
273
+ }, r(t !== d.OTHER_OPTION ? `$${t}` : t), 9, q))), 128))
654
274
  ]),
655
275
  _: 1
656
- }, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : c("", !0)
657
- ], 2)) : l.showPresetAmounts ? c("", !0) : (o(), i("div", re, [
658
- e.hideShowLendDropdown && !e.isLessThan25 ? (o(), a(B, {
276
+ }, 8, ["id", "modelValue", "class", "onUpdate:modelValue", "onClick"])) : i("", !0)
277
+ ], 2)) : n.showPresetAmounts ? i("", !0) : (l(), s("div", J, [
278
+ e.hideShowLendDropdown && !e.isLessThan25 ? (l(), a(h, {
659
279
  key: 0,
660
280
  id: `LoanAmountDropdown_${e.loanId}`,
661
281
  modelValue: d.selectedOption,
662
282
  "onUpdate:modelValue": [
663
- s[7] || (s[7] = (t) => d.selectedOption = t),
283
+ o[7] || (o[7] = (t) => d.selectedOption = t),
664
284
  e.trackLendAmountSelection
665
285
  ],
666
286
  class: "tw-min-w-12",
667
287
  style: { "border-radius": "14px 0 0 14px" },
668
288
  "aria-label": "Lend amount",
669
- onClick: A(e.clickDropdown, ["stop"])
289
+ onClick: D(e.clickDropdown, ["stop"])
670
290
  }, {
671
- default: r(() => [
672
- (o(!0), i(k, null, p(e.prices, (t) => (o(), i("option", {
291
+ default: w(() => [
292
+ (l(!0), s(k, null, _(e.prices, (t) => (l(), s("option", {
673
293
  key: t,
674
294
  value: t
675
- }, " $" + u(t), 9, ae))), 128))
295
+ }, " $" + r(t), 9, Q))), 128))
676
296
  ]),
677
297
  _: 1
678
- }, 8, ["id", "modelValue", "onUpdate:modelValue", "onClick"])) : c("", !0)
298
+ }, 8, ["id", "modelValue", "onUpdate:modelValue", "onClick"])) : i("", !0)
679
299
  ])),
680
- h("div", {
681
- class: w({
682
- "tw-min-w-0": l.showPresetAmounts && !e.isNarrowDesktop,
683
- lendButtonWrapper: e.hideShowLendDropdown && !l.showPresetAmounts,
684
- "tw-hidden": e.hideLendButton || l.showPresetAmounts && !l.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && (e.isNarrowComponent() || e.isNarrowDesktop),
685
- "md:tw-block tw-hidden": !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && l.showPresetAmounts && !e.isNarrowDesktop
300
+ c("div", {
301
+ class: u({
302
+ "tw-min-w-0": n.showPresetAmounts && !e.isNarrowDesktop,
303
+ lendButtonWrapper: e.hideShowLendDropdown && !n.showPresetAmounts,
304
+ "tw-hidden": e.hideLendButton || n.showPresetAmounts && !n.isAdding && !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && (e.isNarrowComponent() || e.isNarrowDesktop),
305
+ "md:tw-block tw-hidden": !e.isLendAmountButton && e.presetButtonsPrices.length > 1 && n.showPresetAmounts && !e.isNarrowDesktop
686
306
  })
687
307
  }, [
688
- e.lendButtonVisibility && !e.isLessThan25 ? (o(), a(m, {
308
+ e.lendButtonVisibility && !e.isLessThan25 ? (l(), a(m, {
689
309
  key: "lendButton",
690
- class: w(["tw-inline-flex tw-flex-1", { "button-ellipsis tw-w-full": l.showPresetAmounts }]),
310
+ class: u(["tw-inline-flex tw-flex-1", { "button-ellipsis tw-w-full": n.showPresetAmounts }]),
691
311
  "data-testid": "bp-lend-cta-lend-button",
692
312
  type: "submit"
693
313
  }, {
694
- default: r(() => [
695
- f(u(e.ctaButtonText), 1)
314
+ default: w(() => [
315
+ f(r(e.ctaButtonText), 1)
696
316
  ]),
697
317
  _: 1
698
- }, 8, ["class"])) : e.showLendAgain ? (o(), a(m, {
318
+ }, 8, ["class"])) : e.showLendAgain ? (l(), a(m, {
699
319
  key: "lendAgainButton",
700
- class: w(["lend-again", { "tw-w-full": l.showPresetAmounts }]),
320
+ class: u(["lend-again", { "tw-w-full": n.showPresetAmounts }]),
701
321
  "data-testid": "bp-lend-cta-lend-again-button",
702
322
  type: "submit"
703
323
  }, {
704
- default: r(() => [
705
- f(u(l.primaryButtonText || "Lend") + " again ", 1)
324
+ default: w(() => [
325
+ f(r(n.primaryButtonText || "Lend") + " again ", 1)
706
326
  ]),
707
327
  _: 1
708
- }, 8, ["class"])) : c("", !0)
328
+ }, 8, ["class"])) : i("", !0)
709
329
  ], 2),
710
- e.isLendAmountButton && !l.enableFiveDollarsNotes ? (o(), a(O, {
330
+ e.isLendAmountButton && !n.enableFiveDollarsNotes ? (l(), a(L, {
711
331
  key: 4,
712
332
  class: "tw-w-full",
713
333
  "loan-id": e.loanId,
714
334
  "show-now": !1,
715
335
  "amount-left": e.amountForLendAmountButton,
716
- "is-adding": l.isAdding,
336
+ "is-adding": n.isAdding,
717
337
  onAddToBasket: e.addToBasket
718
- }, null, 8, ["loan-id", "amount-left", "is-adding", "onAddToBasket"])) : c("", !0),
719
- !l.isLoading && l.isAdding ? (o(), a(m, {
338
+ }, null, 8, ["loan-id", "amount-left", "is-adding", "onAddToBasket"])) : i("", !0),
339
+ !n.isLoading && n.isAdding ? (l(), a(m, {
720
340
  key: 5,
721
341
  class: "tw-inline-flex tw-flex-1"
722
342
  }, {
723
- default: r(() => s[10] || (s[10] = [
343
+ default: w(() => o[10] || (o[10] = [
724
344
  f(" Adding to basket ")
725
345
  ])),
726
346
  _: 1
727
- })) : c("", !0)
728
- ], 10, H)
729
- ], 32)) : c("", !0)
347
+ })) : i("", !0)
348
+ ], 10, V)
349
+ ], 32)) : i("", !0)
730
350
  ], 512);
731
351
  }
732
- const be = /* @__PURE__ */ W(K, [["render", ue], ["__scopeId", "data-v-ff20e42a"]]);
352
+ const le = /* @__PURE__ */ y(P, [["render", X], ["__scopeId", "data-v-a90ed7f0"]]);
733
353
  export {
734
- De as KV_LEND_CTA_FRAGMENT,
735
- ye as KV_LEND_CTA_USER_FRAGMENT,
736
- be as default
354
+ oe as KV_LEND_CTA_FRAGMENT,
355
+ se as KV_LEND_CTA_USER_FRAGMENT,
356
+ le as default
737
357
  };