@revolugo/elements 6.8.3-rc.0 → 6.9.0-beta.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 (179) hide show
  1. package/README.md +1 -1
  2. package/dist/css/fonts.css +1 -1
  3. package/dist/css/revolugo.cancellationpoliciesbadge.BCmMv5CR.css +1 -0
  4. package/dist/css/revolugo.index.ClC0OVqq.css +5 -0
  5. package/dist/css/{revolugo.vtoolbar.BZert82L.css → revolugo.preferencesmenu.7UfG9ius.css} +1 -1
  6. package/dist/css/{revolugo.webcomponentwrapper.DRCKFwuk.css → revolugo.webcomponentwrapper.C3K3E5wv.css} +2 -2
  7. package/dist/index.es.min.js +2033 -2172
  8. package/dist/index.es.min.js.map +1 -1
  9. package/dist/index.min.js +6 -6
  10. package/dist/index.min.js.map +1 -1
  11. package/dist/revolugo.banktransferdetails.DIwmwiki.min.js +37 -0
  12. package/dist/revolugo.bookingdetailssidebar.CURYxT7w.min.js +38 -0
  13. package/dist/revolugo.bookingmanager.BgJVEAba.min.js +25 -0
  14. package/dist/revolugo.cancellationpoliciesbadge.CxO1HyOA.min.js +25 -0
  15. package/dist/revolugo.cancellationpoliciesbadge.props.D3C9w_OV.min.js +30875 -0
  16. package/dist/revolugo.cancellationpolicieslist.CClF7R0p.min.js +25 -0
  17. package/dist/revolugo.creditcardform.BLv484O_.min.js +25 -0
  18. package/dist/revolugo.creditcardpayment.BB0ucanh.min.js +25 -0
  19. package/dist/revolugo.currencypickerbtn.DMgpKcz0.min.js +25 -0
  20. package/dist/revolugo.fastbookingflow.D2tOZmpu.min.js +35 -0
  21. package/dist/revolugo.fullbookingflow.BIfijAae.min.js +25 -0
  22. package/dist/revolugo.hoteldescriptionview.C8P4XIvR.min.js +25 -0
  23. package/dist/revolugo.hotelofferlist.CXHGfElj.min.js +25 -0
  24. package/dist/revolugo.hoteloffersearchmenu.CcjkzhZJ.min.js +73 -0
  25. package/dist/revolugo.hoteloffersmap.BsVCYroc.min.js +25 -0
  26. package/dist/revolugo.hoteloffersview.B64f1wvS.min.js +20 -0
  27. package/dist/revolugo.hotelroomofferlist.CfDXaxwp.min.js +25 -0
  28. package/dist/revolugo.hotelroomoffersbookingflow.DH6meEzW.min.js +25 -0
  29. package/dist/revolugo.hotelroomoffersearchmenu.C6m4k_Rr.min.js +25 -0
  30. package/dist/revolugo.hotelroomoffersview.6hxfrH3M.min.js +25 -0
  31. package/dist/revolugo.index.UaUDIMS5.min.js +106 -0
  32. package/dist/{revolugo.index.wc.7I5uexuc.min.js → revolugo.index.wc.DEo_xTvj.min.js} +12071 -12302
  33. package/dist/revolugo.langpickerbtn.B_B4BQwa.min.js +30 -0
  34. package/dist/revolugo.min.js +1 -1
  35. package/dist/revolugo.prebookform.Btuuk21Q.min.js +25 -0
  36. package/dist/revolugo.preferencesmenu.BDPlWGes.min.js +24 -0
  37. package/dist/revolugo.preferencesmenu.BVPHimYi.min.js +1098 -0
  38. package/dist/revolugo.roominglisteditor.B55oRlzf.min.js +25 -0
  39. package/dist/revolugo.storybooktoolbar.DFiFAYLL.min.js +846 -0
  40. package/dist/revolugo.termsandconditions.C2oiRbjY.min.js +24 -0
  41. package/dist/revolugo.webcomponentwrapper.CKFKL54u.min.js +28590 -0
  42. package/package.json +5 -5
  43. package/dist/css/revolugo.bdaterangepicker.CHUExWGL.css +0 -1
  44. package/dist/css/revolugo.bhoteloffersfilterbar.BcnNI4uS.css +0 -1
  45. package/dist/css/revolugo.bhotelroomsdetails.ZHH0C1yQ.css +0 -1
  46. package/dist/css/revolugo.bhotelsearchbar.Bl5_UFe8.css +0 -1
  47. package/dist/css/revolugo.bimagecarousel.BvgD1yrr.css +0 -1
  48. package/dist/css/revolugo.bookingdetailssidebar.CNP_D5F3.css +0 -1
  49. package/dist/css/revolugo.bstarrating.Dxd1LjMb.css +0 -1
  50. package/dist/css/revolugo.btag.g-q3eChG.css +0 -1
  51. package/dist/css/revolugo.cancellationpoliciesbadge.CwgZ0PpX.css +0 -1
  52. package/dist/css/revolugo.creditcardform.DWne0Lnv.css +0 -1
  53. package/dist/css/revolugo.creditcardpayment.D2PE5FCt.css +0 -1
  54. package/dist/css/revolugo.currencypicker.DO0IrmRK.css +0 -1
  55. package/dist/css/revolugo.fullbookingflow.Bm8JAQF7.css +0 -1
  56. package/dist/css/revolugo.hoteldescriptionview.DWuzEuGF.css +0 -1
  57. package/dist/css/revolugo.hotelofferlist.BkctzTMI.css +0 -1
  58. package/dist/css/revolugo.hoteloffersmap.2oSkomDb.css +0 -1
  59. package/dist/css/revolugo.hoteloffersview.Bo2dQWYt.css +0 -1
  60. package/dist/css/revolugo.hotelroomofferlist.DpLXIpgU.css +0 -1
  61. package/dist/css/revolugo.hotelroomoffersbookingflow.LHa5iHB7.css +0 -1
  62. package/dist/css/revolugo.index.DQ3Yd6SO.css +0 -1
  63. package/dist/css/revolugo.index.XNPQF1ia.css +0 -5
  64. package/dist/css/revolugo.langpickerbtn.D2iA6mCb.css +0 -1
  65. package/dist/css/revolugo.position.7fn84IQ5.css +0 -1
  66. package/dist/css/revolugo.prebookform.DmCR7hLv.css +0 -1
  67. package/dist/css/revolugo.termsandconditions.DCvNJQQL.css +0 -1
  68. package/dist/css/revolugo.vautocomplete.CuVjyvcC.css +0 -1
  69. package/dist/css/revolugo.vbadge.BQrRJ9S0.css +0 -1
  70. package/dist/css/revolugo.vbtn.BU0YQ6en.css +0 -1
  71. package/dist/css/revolugo.vcard.B8jNYFn_.css +0 -1
  72. package/dist/css/revolugo.vcheckboxbtn.BQ05xI0T.css +0 -1
  73. package/dist/css/revolugo.vdialog.DwTSAOeg.css +0 -1
  74. package/dist/css/revolugo.vdivider.CTbbZwnv.css +0 -1
  75. package/dist/css/revolugo.vexpansionpanels.RsCANmDP.css +0 -1
  76. package/dist/css/revolugo.vinput.BPiFMorL.css +0 -1
  77. package/dist/css/revolugo.vlabel.BvKaKg7Y.css +0 -1
  78. package/dist/css/revolugo.vlist.BkGS0yqt.css +0 -1
  79. package/dist/css/revolugo.vmenu.DvKwEp1j.css +0 -1
  80. package/dist/css/revolugo.vselect.C5CKHFYB.css +0 -1
  81. package/dist/css/revolugo.vsheet.Dmcoj8cr.css +0 -1
  82. package/dist/css/revolugo.vskeletonloader.BlK8uFkX.css +0 -1
  83. package/dist/css/revolugo.vsnackbar.Cj7AcupY.css +0 -1
  84. package/dist/css/revolugo.vtextarea.HYL6WUNS.css +0 -1
  85. package/dist/css/revolugo.vtextfield.BIH_AWWP.css +0 -1
  86. package/dist/css/revolugo.vtooltip.O8QDYs1J.css +0 -1
  87. package/dist/css/revolugo.vwindowitem.CWBhiE_Y.css +0 -1
  88. package/dist/revolugo._basefor.CodrYJxd.min.js +0 -15
  89. package/dist/revolugo.banktransferdetails.BdulCgI5.min.js +0 -373
  90. package/dist/revolugo.bdaterangepicker.XZNoMSi5.min.js +0 -8435
  91. package/dist/revolugo.bformattedamount.vue_vue_type_script_setup_true_lang.D9Qs1dZa.min.js +0 -61
  92. package/dist/revolugo.bhoteloffersfilterbar.Bryijtf6.min.js +0 -4685
  93. package/dist/revolugo.bhotelroomsdetails.orWBBD_o.min.js +0 -1013
  94. package/dist/revolugo.bhotelsearchbar.DxxqZWkN.min.js +0 -947
  95. package/dist/revolugo.bimagecarousel.DIPN99VA.min.js +0 -598
  96. package/dist/revolugo.bookingdetailssidebar.CD4SMOkC.min.js +0 -24
  97. package/dist/revolugo.bookingdetailssidebar.JOU68R1_.min.js +0 -880
  98. package/dist/revolugo.bookingmanager.B5cM9Mi5.min.js +0 -1789
  99. package/dist/revolugo.bpricesummaryskeleton.YKfKKB5n.min.js +0 -79
  100. package/dist/revolugo.bstarrating.vue_vue_type_script_setup_true_lang.2z9RUthr.min.js +0 -623
  101. package/dist/revolugo.btag.DjjDRtQ7.min.js +0 -387
  102. package/dist/revolugo.cancellationpoliciesbadge.D8ou6oFl.min.js +0 -225
  103. package/dist/revolugo.cancellationpoliciesbadge.jgFCG7yZ.min.js +0 -24
  104. package/dist/revolugo.cancellationpolicieslist.CZImqgN3.min.js +0 -24
  105. package/dist/revolugo.cancellationpolicieslist.D097ASNF.min.js +0 -176
  106. package/dist/revolugo.case-transformers.Dr1oSJkZ.min.js +0 -123
  107. package/dist/revolugo.common.D-l8b0V5.min.js +0 -10
  108. package/dist/revolugo.creditcardform.DNOMVOgZ.min.js +0 -2161
  109. package/dist/revolugo.creditcardform.DvHcDx2P.min.js +0 -24
  110. package/dist/revolugo.creditcardpayment.BLP3RXk4.min.js +0 -893
  111. package/dist/revolugo.creditcardpayment.D3lPKmx1.min.js +0 -24
  112. package/dist/revolugo.currencypicker.CzzS1Adp.min.js +0 -330
  113. package/dist/revolugo.currencypickerbtn.ChUEouGw.min.js +0 -163
  114. package/dist/revolugo.currencypickerbtn.DWnyc54P.min.js +0 -24
  115. package/dist/revolugo.dialog-attach.O2HXPGzj.min.js +0 -28
  116. package/dist/revolugo.dialog-transition.C6S7Ci1s.min.js +0 -114
  117. package/dist/revolugo.fastbookingflow.ChNa4jgv.min.js +0 -34
  118. package/dist/revolugo.forwardrefs.-bfQnFea.min.js +0 -71
  119. package/dist/revolugo.fullbookingflow.ByKmNqgi.min.js +0 -451
  120. package/dist/revolugo.hoteldescriptionview.CbtxEPGG.min.js +0 -3091
  121. package/dist/revolugo.hoteldescriptionview.D3JTbFxn.min.js +0 -24
  122. package/dist/revolugo.hotelofferitemlayout.tBOOIdeT.min.js +0 -259
  123. package/dist/revolugo.hotelofferlist.BVySEYbq.min.js +0 -5744
  124. package/dist/revolugo.hotelofferlist.puK2FNBR.min.js +0 -24
  125. package/dist/revolugo.hotelofferrequestcreator.CbCau_4i.min.js +0 -230
  126. package/dist/revolugo.hoteloffersearchmenu.iiAtyddA.min.js +0 -46
  127. package/dist/revolugo.hoteloffersmap.BRVm5s6N.min.js +0 -8394
  128. package/dist/revolugo.hoteloffersmap.DqKpfjbt.min.js +0 -24
  129. package/dist/revolugo.hoteloffersview.3LJ-m6BY.min.js +0 -620
  130. package/dist/revolugo.hoteloffersview.DsGyT5s7.min.js +0 -19
  131. package/dist/revolugo.hotelroomofferlist.DdMr5qEZ.min.js +0 -24
  132. package/dist/revolugo.hotelroomofferlist.M-3bowQa.min.js +0 -2934
  133. package/dist/revolugo.hotelroomofferrequestcreator.props.CUwZUDcm.min.js +0 -171
  134. package/dist/revolugo.hotelroomoffersbookingflow.Bef_aJFl.min.js +0 -1306
  135. package/dist/revolugo.hotelroomoffersearchmenu.D9Zn_Gjy.min.js +0 -25
  136. package/dist/revolugo.hotelroomoffersearchmenu.Fkf-MQ_8.min.js +0 -232
  137. package/dist/revolugo.hotelroomoffersview.BSth8Xsz.min.js +0 -305
  138. package/dist/revolugo.hotelroomoffersview.oxTgBMSk.min.js +0 -24
  139. package/dist/revolugo.index.D0uSQdJV.min.js +0 -13
  140. package/dist/revolugo.index.gIPq0z7C.min.js +0 -1037
  141. package/dist/revolugo.langpicker.CLdiic9k.min.js +0 -107
  142. package/dist/revolugo.langpickerbtn.BIHQAnjv.min.js +0 -24
  143. package/dist/revolugo.langpickerbtn.DF-m4pCF.min.js +0 -178
  144. package/dist/revolugo.position.hqKd4K_h.min.js +0 -322
  145. package/dist/revolugo.prebookform.B8aMLMuG.min.js +0 -1531
  146. package/dist/revolugo.prebookform.CxK0iSDo.min.js +0 -24
  147. package/dist/revolugo.roominglisteditor.D7WzDtw6.min.js +0 -24
  148. package/dist/revolugo.roominglisteditor.Do-pe811.min.js +0 -391
  149. package/dist/revolugo.rounded.Dnxang6X.min.js +0 -68
  150. package/dist/revolugo.ssrboot.ByGq44eI.min.js +0 -18
  151. package/dist/revolugo.storybooktoolbar.DY_mbXuP.min.js +0 -882
  152. package/dist/revolugo.termsandconditions.DXNFR45_.min.js +0 -423
  153. package/dist/revolugo.termsandconditions.DfGTVPYa.min.js +0 -23
  154. package/dist/revolugo.use-breakpoint-service.CJltQiSH.min.js +0 -106
  155. package/dist/revolugo.vautocomplete.BjPSa1jg.min.js +0 -466
  156. package/dist/revolugo.vbadge.D1RCkHoZ.min.js +0 -118
  157. package/dist/revolugo.vbtn.CQ9EDLRJ.min.js +0 -417
  158. package/dist/revolugo.vcard.DNU4i52n.min.js +0 -329
  159. package/dist/revolugo.vcheckboxbtn.De-k8-O3.min.js +0 -491
  160. package/dist/revolugo.vdialog.CjEajxIC.min.js +0 -139
  161. package/dist/revolugo.vdivider.Cp9bHPnI.min.js +0 -77
  162. package/dist/revolugo.vexpansionpanels.L2ZpX4zd.min.js +0 -276
  163. package/dist/revolugo.vform.Bw9rddZZ.min.js +0 -50
  164. package/dist/revolugo.vinput.P34xrpIC.min.js +0 -477
  165. package/dist/revolugo.vlabel.CLHrAz78.min.js +0 -51
  166. package/dist/revolugo.vlist.hRQlcp5M.min.js +0 -1348
  167. package/dist/revolugo.vmenu.BRFw3Jzk.min.js +0 -152
  168. package/dist/revolugo.vselect.u2C25NCe.min.js +0 -688
  169. package/dist/revolugo.vsheet.8UeU7qQn.min.js +0 -72
  170. package/dist/revolugo.vskeletonloader.Dk0enVo6.min.js +0 -137
  171. package/dist/revolugo.vsnackbar.18JqJsZ2.min.js +0 -202
  172. package/dist/revolugo.vspacer.CPbtu_-W.min.js +0 -7
  173. package/dist/revolugo.vtextarea.Cjuqcka5.min.js +0 -2102
  174. package/dist/revolugo.vtextfield.BUNcwTRK.min.js +0 -509
  175. package/dist/revolugo.vtoolbar.CvbAGFXR.min.js +0 -188
  176. package/dist/revolugo.vtooltip.CsXJFD-V.min.js +0 -395
  177. package/dist/revolugo.vwindowitem.DGRfRU3q.min.js +0 -329
  178. package/dist/revolugo.watch-list.D0FxBTWy.min.js +0 -16
  179. package/dist/revolugo.webcomponentwrapper.DFYGhYzz.min.js +0 -2148
@@ -1,2161 +0,0 @@
1
- import { Y as B, d as ke, u as Re, O as Te, D as Qt, C as At, b1 as xe, E as Me, Z as Ne, _ as Oe, a2 as Le, aE as Ve, b2 as Ue, a as g, y as Pt, a6 as Ie, c as k, w as v, e as E, f as X, t as R, r as qe, g as z, i as Be, x as ze, aq as De, A as je, o as A } from "./revolugo.index.wc.7I5uexuc.min.js";
2
- import { _ as He } from "./revolugo.bformattedamount.vue_vue_type_script_setup_true_lang.D9Qs1dZa.min.js";
3
- import { u as Fe, _ as We, V as D, a as O } from "./revolugo.webcomponentwrapper.DFYGhYzz.min.js";
4
- import { V as ct } from "./revolugo.index.gIPq0z7C.min.js";
5
- import { V as Ge, a as Ke } from "./revolugo.vbtn.CQ9EDLRJ.min.js";
6
- import { V as Je } from "./revolugo.vtoolbar.CvbAGFXR.min.js";
7
- import { a as kt, m as Ye, V as Ze } from "./revolugo.vcheckboxbtn.De-k8-O3.min.js";
8
- import { V as Rt, a as Xe } from "./revolugo.vcard.DNU4i52n.min.js";
9
- import { V as Qe } from "./revolugo.vskeletonloader.Dk0enVo6.min.js";
10
- import { u as tr, V as Tt, m as er } from "./revolugo.vinput.P34xrpIC.min.js";
11
- function Pe(e) {
12
- try {
13
- if (typeof document < "u") {
14
- window.REVOLUGO_ELEMENTS_STYLES = window.REVOLUGO_ELEMENTS_STYLES || {
15
- sheets: [],
16
- components: []
17
- };
18
- const t = import.meta.url, r = t.slice(0, t.lastIndexOf("/") + 1) + e;
19
- window.REVOLUGO_ELEMENTS_STYLES.sheets.push(r);
20
- for (const s of REVOLUGO_ELEMENTS_STYLES.components)
21
- s(r);
22
- if (e.indexOf("fonts") >= 0) {
23
- const s = document.createElement("link");
24
- s.rel = "stylesheet", linK.href = r, document.head.appendChild(s);
25
- }
26
- }
27
- } catch (t) {
28
- console.error("[revolugo-elements] ", t);
29
- }
30
- }
31
- const rr = {
32
- amount: { type: Number },
33
- currency: { type: String },
34
- disabled: {
35
- default: !1,
36
- type: Boolean
37
- },
38
- loading: {
39
- default: !1,
40
- type: Boolean
41
- },
42
- token: { required: !0, type: String },
43
- withAction: {
44
- default: !1,
45
- type: Boolean
46
- },
47
- withTerms: {
48
- default: !1,
49
- type: Boolean
50
- }
51
- }, sr = (e) => {
52
- switch (e) {
53
- case B.Production:
54
- return "pk_live_x99EPirYIsCyUsRvPAfyhnRp";
55
- case B.Sandbox:
56
- case B.Staging:
57
- case B.CiCd:
58
- case B.Local:
59
- default:
60
- return "pk_test_wXnn2RrefTiOHB0zzxqJr0s8";
61
- }
62
- };
63
- var te = "basil", nr = function(t) {
64
- return t === 3 ? "v3" : t;
65
- }, ee = "https://js.stripe.com", ir = "".concat(ee, "/").concat(te, "/stripe.js"), or = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, ar = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;
66
- var lr = function(t) {
67
- return or.test(t) || ar.test(t);
68
- }, ur = function() {
69
- for (var t = document.querySelectorAll('script[src^="'.concat(ee, '"]')), r = 0; r < t.length; r++) {
70
- var s = t[r];
71
- if (lr(s.src))
72
- return s;
73
- }
74
- return null;
75
- }, xt = function(t) {
76
- var r = "", s = document.createElement("script");
77
- s.src = "".concat(ir).concat(r);
78
- var n = document.head || document.body;
79
- if (!n)
80
- throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
81
- return n.appendChild(s), s;
82
- }, cr = function(t, r) {
83
- !t || !t._registerWrapper || t._registerWrapper({
84
- name: "stripe-js",
85
- version: "7.3.1",
86
- startTime: r
87
- });
88
- }, j = null, Q = null, tt = null, dr = function(t) {
89
- return function(r) {
90
- t(new Error("Failed to load Stripe.js", {
91
- cause: r
92
- }));
93
- };
94
- }, pr = function(t, r) {
95
- return function() {
96
- window.Stripe ? t(window.Stripe) : r(new Error("Stripe.js not available"));
97
- };
98
- }, hr = function(t) {
99
- return j !== null ? j : (j = new Promise(function(r, s) {
100
- if (typeof window > "u" || typeof document > "u") {
101
- r(null);
102
- return;
103
- }
104
- if (window.Stripe) {
105
- r(window.Stripe);
106
- return;
107
- }
108
- try {
109
- var n = ur();
110
- if (!(n && t)) {
111
- if (!n)
112
- n = xt(t);
113
- else if (n && tt !== null && Q !== null) {
114
- var i;
115
- n.removeEventListener("load", tt), n.removeEventListener("error", Q), (i = n.parentNode) === null || i === void 0 || i.removeChild(n), n = xt(t);
116
- }
117
- }
118
- tt = pr(r, s), Q = dr(s), n.addEventListener("load", tt), n.addEventListener("error", Q);
119
- } catch (o) {
120
- s(o);
121
- return;
122
- }
123
- }), j.catch(function(r) {
124
- return j = null, Promise.reject(r);
125
- }));
126
- }, mr = function(t, r, s) {
127
- if (t === null)
128
- return null;
129
- var n = r[0], i = n.match(/^pk_test/), o = nr(t.version), c = te;
130
- i && o !== c && console.warn("Stripe.js@".concat(o, " was loaded on the page, but @stripe/stripe-js@").concat("7.3.1", " expected Stripe.js@").concat(c, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
131
- var l = t.apply(void 0, r);
132
- return cr(l, s), l;
133
- }, H, re = !1, se = function() {
134
- return H || (H = hr(null).catch(function(t) {
135
- return H = null, Promise.reject(t);
136
- }), H);
137
- };
138
- Promise.resolve().then(function() {
139
- return se();
140
- }).catch(function(e) {
141
- re || console.warn(e);
142
- });
143
- var yr = function() {
144
- for (var t = arguments.length, r = new Array(t), s = 0; s < t; s++)
145
- r[s] = arguments[s];
146
- re = !0;
147
- var n = Date.now();
148
- return se().then(function(i) {
149
- return mr(i, r, n);
150
- });
151
- };
152
- /**
153
- * @license
154
- * Copyright 2017 Google LLC
155
- * SPDX-License-Identifier: BSD-3-Clause
156
- */
157
- const ne = (e) => (t) => typeof t == "function" ? ((r, s) => (customElements.define(r, s), s))(e, t) : ((r, s) => {
158
- const { kind: n, elements: i } = s;
159
- return { kind: n, elements: i, finisher(o) {
160
- customElements.define(r, o);
161
- } };
162
- })(e, t);
163
- /**
164
- * @license
165
- * Copyright 2017 Google LLC
166
- * SPDX-License-Identifier: BSD-3-Clause
167
- */
168
- const fr = (e, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(r) {
169
- r.createProperty(t.key, e);
170
- } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
171
- typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
172
- }, finisher(r) {
173
- r.createProperty(t.key, e);
174
- } }, vr = (e, t, r) => {
175
- t.constructor.createProperty(r, e);
176
- };
177
- function u(e) {
178
- return (t, r) => r !== void 0 ? vr(e, t, r) : fr(e, t);
179
- }
180
- /**
181
- * @license
182
- * Copyright 2021 Google LLC
183
- * SPDX-License-Identifier: BSD-3-Clause
184
- */
185
- var dt;
186
- ((dt = window.HTMLSlotElement) === null || dt === void 0 ? void 0 : dt.prototype.assignedElements) != null;
187
- var Mt = !0;
188
- function C(e, t, r) {
189
- if (typeof (r == null ? void 0 : r.value) != "function")
190
- throw new TypeError(`Only methods can be decorated with @bound. <${t ?? e.name}> is not a method!`);
191
- return {
192
- configurable: Mt,
193
- get() {
194
- const s = r.value.bind(this);
195
- return Object.defineProperty(this, t, { value: s, configurable: Mt, writable: !0 }), s;
196
- }
197
- };
198
- }
199
- /**
200
- * @license
201
- * Copyright 2019 Google LLC
202
- * SPDX-License-Identifier: BSD-3-Clause
203
- */
204
- const rt = window, $t = rt.ShadowRoot && (rt.ShadyCSS === void 0 || rt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, wt = Symbol(), Nt = /* @__PURE__ */ new WeakMap();
205
- let ie = class {
206
- constructor(t, r, s) {
207
- if (this._$cssResult$ = !0, s !== wt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
208
- this.cssText = t, this.t = r;
209
- }
210
- get styleSheet() {
211
- let t = this.o;
212
- const r = this.t;
213
- if ($t && t === void 0) {
214
- const s = r !== void 0 && r.length === 1;
215
- s && (t = Nt.get(r)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Nt.set(r, t));
216
- }
217
- return t;
218
- }
219
- toString() {
220
- return this.cssText;
221
- }
222
- };
223
- const gr = (e) => new ie(typeof e == "string" ? e : e + "", void 0, wt), _t = (e, ...t) => {
224
- const r = e.length === 1 ? e[0] : t.reduce((s, n, i) => s + ((o) => {
225
- if (o._$cssResult$ === !0) return o.cssText;
226
- if (typeof o == "number") return o;
227
- throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
228
- })(n) + e[i + 1], e[0]);
229
- return new ie(r, e, wt);
230
- }, br = (e, t) => {
231
- $t ? e.adoptedStyleSheets = t.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet) : t.forEach((r) => {
232
- const s = document.createElement("style"), n = rt.litNonce;
233
- n !== void 0 && s.setAttribute("nonce", n), s.textContent = r.cssText, e.appendChild(s);
234
- });
235
- }, Ot = $t ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
236
- let r = "";
237
- for (const s of t.cssRules) r += s.cssText;
238
- return gr(r);
239
- })(e) : e;
240
- /**
241
- * @license
242
- * Copyright 2017 Google LLC
243
- * SPDX-License-Identifier: BSD-3-Clause
244
- */
245
- var pt;
246
- const at = window, Lt = at.trustedTypes, Sr = Lt ? Lt.emptyScript : "", Vt = at.reactiveElementPolyfillSupport, gt = { toAttribute(e, t) {
247
- switch (t) {
248
- case Boolean:
249
- e = e ? Sr : null;
250
- break;
251
- case Object:
252
- case Array:
253
- e = e == null ? e : JSON.stringify(e);
254
- }
255
- return e;
256
- }, fromAttribute(e, t) {
257
- let r = e;
258
- switch (t) {
259
- case Boolean:
260
- r = e !== null;
261
- break;
262
- case Number:
263
- r = e === null ? null : Number(e);
264
- break;
265
- case Object:
266
- case Array:
267
- try {
268
- r = JSON.parse(e);
269
- } catch {
270
- r = null;
271
- }
272
- }
273
- return r;
274
- } }, oe = (e, t) => t !== e && (t == t || e == e), ht = { attribute: !0, type: String, converter: gt, reflect: !1, hasChanged: oe }, bt = "finalized";
275
- let L = class extends HTMLElement {
276
- constructor() {
277
- super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
278
- }
279
- static addInitializer(t) {
280
- var r;
281
- this.finalize(), ((r = this.h) !== null && r !== void 0 ? r : this.h = []).push(t);
282
- }
283
- static get observedAttributes() {
284
- this.finalize();
285
- const t = [];
286
- return this.elementProperties.forEach((r, s) => {
287
- const n = this._$Ep(s, r);
288
- n !== void 0 && (this._$Ev.set(n, s), t.push(n));
289
- }), t;
290
- }
291
- static createProperty(t, r = ht) {
292
- if (r.state && (r.attribute = !1), this.finalize(), this.elementProperties.set(t, r), !r.noAccessor && !this.prototype.hasOwnProperty(t)) {
293
- const s = typeof t == "symbol" ? Symbol() : "__" + t, n = this.getPropertyDescriptor(t, s, r);
294
- n !== void 0 && Object.defineProperty(this.prototype, t, n);
295
- }
296
- }
297
- static getPropertyDescriptor(t, r, s) {
298
- return { get() {
299
- return this[r];
300
- }, set(n) {
301
- const i = this[t];
302
- this[r] = n, this.requestUpdate(t, i, s);
303
- }, configurable: !0, enumerable: !0 };
304
- }
305
- static getPropertyOptions(t) {
306
- return this.elementProperties.get(t) || ht;
307
- }
308
- static finalize() {
309
- if (this.hasOwnProperty(bt)) return !1;
310
- this[bt] = !0;
311
- const t = Object.getPrototypeOf(this);
312
- if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
313
- const r = this.properties, s = [...Object.getOwnPropertyNames(r), ...Object.getOwnPropertySymbols(r)];
314
- for (const n of s) this.createProperty(n, r[n]);
315
- }
316
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
317
- }
318
- static finalizeStyles(t) {
319
- const r = [];
320
- if (Array.isArray(t)) {
321
- const s = new Set(t.flat(1 / 0).reverse());
322
- for (const n of s) r.unshift(Ot(n));
323
- } else t !== void 0 && r.push(Ot(t));
324
- return r;
325
- }
326
- static _$Ep(t, r) {
327
- const s = r.attribute;
328
- return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
329
- }
330
- _$Eu() {
331
- var t;
332
- this._$E_ = new Promise((r) => this.enableUpdating = r), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((r) => r(this));
333
- }
334
- addController(t) {
335
- var r, s;
336
- ((r = this._$ES) !== null && r !== void 0 ? r : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((s = t.hostConnected) === null || s === void 0 || s.call(t));
337
- }
338
- removeController(t) {
339
- var r;
340
- (r = this._$ES) === null || r === void 0 || r.splice(this._$ES.indexOf(t) >>> 0, 1);
341
- }
342
- _$Eg() {
343
- this.constructor.elementProperties.forEach((t, r) => {
344
- this.hasOwnProperty(r) && (this._$Ei.set(r, this[r]), delete this[r]);
345
- });
346
- }
347
- createRenderRoot() {
348
- var t;
349
- const r = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
350
- return br(r, this.constructor.elementStyles), r;
351
- }
352
- connectedCallback() {
353
- var t;
354
- this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((r) => {
355
- var s;
356
- return (s = r.hostConnected) === null || s === void 0 ? void 0 : s.call(r);
357
- });
358
- }
359
- enableUpdating(t) {
360
- }
361
- disconnectedCallback() {
362
- var t;
363
- (t = this._$ES) === null || t === void 0 || t.forEach((r) => {
364
- var s;
365
- return (s = r.hostDisconnected) === null || s === void 0 ? void 0 : s.call(r);
366
- });
367
- }
368
- attributeChangedCallback(t, r, s) {
369
- this._$AK(t, s);
370
- }
371
- _$EO(t, r, s = ht) {
372
- var n;
373
- const i = this.constructor._$Ep(t, s);
374
- if (i !== void 0 && s.reflect === !0) {
375
- const o = (((n = s.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? s.converter : gt).toAttribute(r, s.type);
376
- this._$El = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$El = null;
377
- }
378
- }
379
- _$AK(t, r) {
380
- var s;
381
- const n = this.constructor, i = n._$Ev.get(t);
382
- if (i !== void 0 && this._$El !== i) {
383
- const o = n.getPropertyOptions(i), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? o.converter : gt;
384
- this._$El = i, this[i] = c.fromAttribute(r, o.type), this._$El = null;
385
- }
386
- }
387
- requestUpdate(t, r, s) {
388
- let n = !0;
389
- t !== void 0 && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || oe)(this[t], r) ? (this._$AL.has(t) || this._$AL.set(t, r), s.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, s))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
390
- }
391
- async _$Ej() {
392
- this.isUpdatePending = !0;
393
- try {
394
- await this._$E_;
395
- } catch (r) {
396
- Promise.reject(r);
397
- }
398
- const t = this.scheduleUpdate();
399
- return t != null && await t, !this.isUpdatePending;
400
- }
401
- scheduleUpdate() {
402
- return this.performUpdate();
403
- }
404
- performUpdate() {
405
- var t;
406
- if (!this.isUpdatePending) return;
407
- this.hasUpdated, this._$Ei && (this._$Ei.forEach((n, i) => this[i] = n), this._$Ei = void 0);
408
- let r = !1;
409
- const s = this._$AL;
410
- try {
411
- r = this.shouldUpdate(s), r ? (this.willUpdate(s), (t = this._$ES) === null || t === void 0 || t.forEach((n) => {
412
- var i;
413
- return (i = n.hostUpdate) === null || i === void 0 ? void 0 : i.call(n);
414
- }), this.update(s)) : this._$Ek();
415
- } catch (n) {
416
- throw r = !1, this._$Ek(), n;
417
- }
418
- r && this._$AE(s);
419
- }
420
- willUpdate(t) {
421
- }
422
- _$AE(t) {
423
- var r;
424
- (r = this._$ES) === null || r === void 0 || r.forEach((s) => {
425
- var n;
426
- return (n = s.hostUpdated) === null || n === void 0 ? void 0 : n.call(s);
427
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
428
- }
429
- _$Ek() {
430
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
431
- }
432
- get updateComplete() {
433
- return this.getUpdateComplete();
434
- }
435
- getUpdateComplete() {
436
- return this._$E_;
437
- }
438
- shouldUpdate(t) {
439
- return !0;
440
- }
441
- update(t) {
442
- this._$EC !== void 0 && (this._$EC.forEach((r, s) => this._$EO(s, this[s], r)), this._$EC = void 0), this._$Ek();
443
- }
444
- updated(t) {
445
- }
446
- firstUpdated(t) {
447
- }
448
- };
449
- L[bt] = !0, L.elementProperties = /* @__PURE__ */ new Map(), L.elementStyles = [], L.shadowRootOptions = { mode: "open" }, Vt == null || Vt({ ReactiveElement: L }), ((pt = at.reactiveElementVersions) !== null && pt !== void 0 ? pt : at.reactiveElementVersions = []).push("1.6.3");
450
- /**
451
- * @license
452
- * Copyright 2017 Google LLC
453
- * SPDX-License-Identifier: BSD-3-Clause
454
- */
455
- var mt;
456
- const lt = window, V = lt.trustedTypes, Ut = V ? V.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, St = "$lit$", P = `lit$${(Math.random() + "").slice(9)}$`, ae = "?" + P, $r = `<${ae}>`, M = document, K = () => M.createComment(""), J = (e) => e === null || typeof e != "object" && typeof e != "function", le = Array.isArray, wr = (e) => le(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", yt = `[
457
- \f\r]`, F = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, It = /-->/g, qt = />/g, T = RegExp(`>|${yt}(?:([^\\s"'>=/]+)(${yt}*=${yt}*(?:[^
458
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Bt = /'/g, zt = /"/g, ue = /^(?:script|style|textarea|title)$/i, _r = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), Cr = _r(1), U = Symbol.for("lit-noChange"), b = Symbol.for("lit-nothing"), Dt = /* @__PURE__ */ new WeakMap(), x = M.createTreeWalker(M, 129, null, !1);
459
- function ce(e, t) {
460
- if (!Array.isArray(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
461
- return Ut !== void 0 ? Ut.createHTML(t) : t;
462
- }
463
- const Er = (e, t) => {
464
- const r = e.length - 1, s = [];
465
- let n, i = t === 2 ? "<svg>" : "", o = F;
466
- for (let c = 0; c < r; c++) {
467
- const l = e[c];
468
- let p, y, f = -1, S = 0;
469
- for (; S < l.length && (o.lastIndex = S, y = o.exec(l), y !== null); ) S = o.lastIndex, o === F ? y[1] === "!--" ? o = It : y[1] !== void 0 ? o = qt : y[2] !== void 0 ? (ue.test(y[2]) && (n = RegExp("</" + y[2], "g")), o = T) : y[3] !== void 0 && (o = T) : o === T ? y[0] === ">" ? (o = n ?? F, f = -1) : y[1] === void 0 ? f = -2 : (f = o.lastIndex - y[2].length, p = y[1], o = y[3] === void 0 ? T : y[3] === '"' ? zt : Bt) : o === zt || o === Bt ? o = T : o === It || o === qt ? o = F : (o = T, n = void 0);
470
- const _ = o === T && e[c + 1].startsWith("/>") ? " " : "";
471
- i += o === F ? l + $r : f >= 0 ? (s.push(p), l.slice(0, f) + St + l.slice(f) + P + _) : l + P + (f === -2 ? (s.push(void 0), c) : _);
472
- }
473
- return [ce(e, i + (e[r] || "<?>") + (t === 2 ? "</svg>" : "")), s];
474
- };
475
- class Y {
476
- constructor({ strings: t, _$litType$: r }, s) {
477
- let n;
478
- this.parts = [];
479
- let i = 0, o = 0;
480
- const c = t.length - 1, l = this.parts, [p, y] = Er(t, r);
481
- if (this.el = Y.createElement(p, s), x.currentNode = this.el.content, r === 2) {
482
- const f = this.el.content, S = f.firstChild;
483
- S.remove(), f.append(...S.childNodes);
484
- }
485
- for (; (n = x.nextNode()) !== null && l.length < c; ) {
486
- if (n.nodeType === 1) {
487
- if (n.hasAttributes()) {
488
- const f = [];
489
- for (const S of n.getAttributeNames()) if (S.endsWith(St) || S.startsWith(P)) {
490
- const _ = y[o++];
491
- if (f.push(S), _ !== void 0) {
492
- const q = n.getAttribute(_.toLowerCase() + St).split(P), N = /([.?@])?(.*)/.exec(_);
493
- l.push({ type: 1, index: i, name: N[2], strings: q, ctor: N[1] === "." ? Pr : N[1] === "?" ? Rr : N[1] === "@" ? Tr : ut });
494
- } else l.push({ type: 6, index: i });
495
- }
496
- for (const S of f) n.removeAttribute(S);
497
- }
498
- if (ue.test(n.tagName)) {
499
- const f = n.textContent.split(P), S = f.length - 1;
500
- if (S > 0) {
501
- n.textContent = V ? V.emptyScript : "";
502
- for (let _ = 0; _ < S; _++) n.append(f[_], K()), x.nextNode(), l.push({ type: 2, index: ++i });
503
- n.append(f[S], K());
504
- }
505
- }
506
- } else if (n.nodeType === 8) if (n.data === ae) l.push({ type: 2, index: i });
507
- else {
508
- let f = -1;
509
- for (; (f = n.data.indexOf(P, f + 1)) !== -1; ) l.push({ type: 7, index: i }), f += P.length - 1;
510
- }
511
- i++;
512
- }
513
- }
514
- static createElement(t, r) {
515
- const s = M.createElement("template");
516
- return s.innerHTML = t, s;
517
- }
518
- }
519
- function I(e, t, r = e, s) {
520
- var n, i, o, c;
521
- if (t === U) return t;
522
- let l = s !== void 0 ? (n = r._$Co) === null || n === void 0 ? void 0 : n[s] : r._$Cl;
523
- const p = J(t) ? void 0 : t._$litDirective$;
524
- return (l == null ? void 0 : l.constructor) !== p && ((i = l == null ? void 0 : l._$AO) === null || i === void 0 || i.call(l, !1), p === void 0 ? l = void 0 : (l = new p(e), l._$AT(e, r, s)), s !== void 0 ? ((o = (c = r)._$Co) !== null && o !== void 0 ? o : c._$Co = [])[s] = l : r._$Cl = l), l !== void 0 && (t = I(e, l._$AS(e, t.values), l, s)), t;
525
- }
526
- class Ar {
527
- constructor(t, r) {
528
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = r;
529
- }
530
- get parentNode() {
531
- return this._$AM.parentNode;
532
- }
533
- get _$AU() {
534
- return this._$AM._$AU;
535
- }
536
- u(t) {
537
- var r;
538
- const { el: { content: s }, parts: n } = this._$AD, i = ((r = t == null ? void 0 : t.creationScope) !== null && r !== void 0 ? r : M).importNode(s, !0);
539
- x.currentNode = i;
540
- let o = x.nextNode(), c = 0, l = 0, p = n[0];
541
- for (; p !== void 0; ) {
542
- if (c === p.index) {
543
- let y;
544
- p.type === 2 ? y = new Z(o, o.nextSibling, this, t) : p.type === 1 ? y = new p.ctor(o, p.name, p.strings, this, t) : p.type === 6 && (y = new xr(o, this, t)), this._$AV.push(y), p = n[++l];
545
- }
546
- c !== (p == null ? void 0 : p.index) && (o = x.nextNode(), c++);
547
- }
548
- return x.currentNode = M, i;
549
- }
550
- v(t) {
551
- let r = 0;
552
- for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, r), r += s.strings.length - 2) : s._$AI(t[r])), r++;
553
- }
554
- }
555
- class Z {
556
- constructor(t, r, s, n) {
557
- var i;
558
- this.type = 2, this._$AH = b, this._$AN = void 0, this._$AA = t, this._$AB = r, this._$AM = s, this.options = n, this._$Cp = (i = n == null ? void 0 : n.isConnected) === null || i === void 0 || i;
559
- }
560
- get _$AU() {
561
- var t, r;
562
- return (r = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && r !== void 0 ? r : this._$Cp;
563
- }
564
- get parentNode() {
565
- let t = this._$AA.parentNode;
566
- const r = this._$AM;
567
- return r !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = r.parentNode), t;
568
- }
569
- get startNode() {
570
- return this._$AA;
571
- }
572
- get endNode() {
573
- return this._$AB;
574
- }
575
- _$AI(t, r = this) {
576
- t = I(this, t, r), J(t) ? t === b || t == null || t === "" ? (this._$AH !== b && this._$AR(), this._$AH = b) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : wr(t) ? this.T(t) : this._(t);
577
- }
578
- k(t) {
579
- return this._$AA.parentNode.insertBefore(t, this._$AB);
580
- }
581
- $(t) {
582
- this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
583
- }
584
- _(t) {
585
- this._$AH !== b && J(this._$AH) ? this._$AA.nextSibling.data = t : this.$(M.createTextNode(t)), this._$AH = t;
586
- }
587
- g(t) {
588
- var r;
589
- const { values: s, _$litType$: n } = t, i = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = Y.createElement(ce(n.h, n.h[0]), this.options)), n);
590
- if (((r = this._$AH) === null || r === void 0 ? void 0 : r._$AD) === i) this._$AH.v(s);
591
- else {
592
- const o = new Ar(i, this), c = o.u(this.options);
593
- o.v(s), this.$(c), this._$AH = o;
594
- }
595
- }
596
- _$AC(t) {
597
- let r = Dt.get(t.strings);
598
- return r === void 0 && Dt.set(t.strings, r = new Y(t)), r;
599
- }
600
- T(t) {
601
- le(this._$AH) || (this._$AH = [], this._$AR());
602
- const r = this._$AH;
603
- let s, n = 0;
604
- for (const i of t) n === r.length ? r.push(s = new Z(this.k(K()), this.k(K()), this, this.options)) : s = r[n], s._$AI(i), n++;
605
- n < r.length && (this._$AR(s && s._$AB.nextSibling, n), r.length = n);
606
- }
607
- _$AR(t = this._$AA.nextSibling, r) {
608
- var s;
609
- for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, r); t && t !== this._$AB; ) {
610
- const n = t.nextSibling;
611
- t.remove(), t = n;
612
- }
613
- }
614
- setConnected(t) {
615
- var r;
616
- this._$AM === void 0 && (this._$Cp = t, (r = this._$AP) === null || r === void 0 || r.call(this, t));
617
- }
618
- }
619
- class ut {
620
- constructor(t, r, s, n, i) {
621
- this.type = 1, this._$AH = b, this._$AN = void 0, this.element = t, this.name = r, this._$AM = n, this.options = i, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = b;
622
- }
623
- get tagName() {
624
- return this.element.tagName;
625
- }
626
- get _$AU() {
627
- return this._$AM._$AU;
628
- }
629
- _$AI(t, r = this, s, n) {
630
- const i = this.strings;
631
- let o = !1;
632
- if (i === void 0) t = I(this, t, r, 0), o = !J(t) || t !== this._$AH && t !== U, o && (this._$AH = t);
633
- else {
634
- const c = t;
635
- let l, p;
636
- for (t = i[0], l = 0; l < i.length - 1; l++) p = I(this, c[s + l], r, l), p === U && (p = this._$AH[l]), o || (o = !J(p) || p !== this._$AH[l]), p === b ? t = b : t !== b && (t += (p ?? "") + i[l + 1]), this._$AH[l] = p;
637
- }
638
- o && !n && this.j(t);
639
- }
640
- j(t) {
641
- t === b ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
642
- }
643
- }
644
- class Pr extends ut {
645
- constructor() {
646
- super(...arguments), this.type = 3;
647
- }
648
- j(t) {
649
- this.element[this.name] = t === b ? void 0 : t;
650
- }
651
- }
652
- const kr = V ? V.emptyScript : "";
653
- class Rr extends ut {
654
- constructor() {
655
- super(...arguments), this.type = 4;
656
- }
657
- j(t) {
658
- t && t !== b ? this.element.setAttribute(this.name, kr) : this.element.removeAttribute(this.name);
659
- }
660
- }
661
- class Tr extends ut {
662
- constructor(t, r, s, n, i) {
663
- super(t, r, s, n, i), this.type = 5;
664
- }
665
- _$AI(t, r = this) {
666
- var s;
667
- if ((t = (s = I(this, t, r, 0)) !== null && s !== void 0 ? s : b) === U) return;
668
- const n = this._$AH, i = t === b && n !== b || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, o = t !== b && (n === b || i);
669
- i && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
670
- }
671
- handleEvent(t) {
672
- var r, s;
673
- typeof this._$AH == "function" ? this._$AH.call((s = (r = this.options) === null || r === void 0 ? void 0 : r.host) !== null && s !== void 0 ? s : this.element, t) : this._$AH.handleEvent(t);
674
- }
675
- }
676
- class xr {
677
- constructor(t, r, s) {
678
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = s;
679
- }
680
- get _$AU() {
681
- return this._$AM._$AU;
682
- }
683
- _$AI(t) {
684
- I(this, t);
685
- }
686
- }
687
- const jt = lt.litHtmlPolyfillSupport;
688
- jt == null || jt(Y, Z), ((mt = lt.litHtmlVersions) !== null && mt !== void 0 ? mt : lt.litHtmlVersions = []).push("2.8.0");
689
- const Mr = (e, t, r) => {
690
- var s, n;
691
- const i = (s = r == null ? void 0 : r.renderBefore) !== null && s !== void 0 ? s : t;
692
- let o = i._$litPart$;
693
- if (o === void 0) {
694
- const c = (n = r == null ? void 0 : r.renderBefore) !== null && n !== void 0 ? n : null;
695
- i._$litPart$ = o = new Z(t.insertBefore(K(), c), c, void 0, r ?? {});
696
- }
697
- return o._$AI(e), o;
698
- };
699
- /**
700
- * @license
701
- * Copyright 2017 Google LLC
702
- * SPDX-License-Identifier: BSD-3-Clause
703
- */
704
- var ft, vt;
705
- class G extends L {
706
- constructor() {
707
- super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
708
- }
709
- createRenderRoot() {
710
- var t, r;
711
- const s = super.createRenderRoot();
712
- return (t = (r = this.renderOptions).renderBefore) !== null && t !== void 0 || (r.renderBefore = s.firstChild), s;
713
- }
714
- update(t) {
715
- const r = this.render();
716
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Mr(r, this.renderRoot, this.renderOptions);
717
- }
718
- connectedCallback() {
719
- var t;
720
- super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
721
- }
722
- disconnectedCallback() {
723
- var t;
724
- super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
725
- }
726
- render() {
727
- return U;
728
- }
729
- }
730
- G.finalized = !0, G._$litElement$ = !0, (ft = globalThis.litElementHydrateSupport) === null || ft === void 0 || ft.call(globalThis, { LitElement: G });
731
- const Ht = globalThis.litElementPolyfillSupport;
732
- Ht == null || Ht({ LitElement: G });
733
- ((vt = globalThis.litElementVersions) !== null && vt !== void 0 ? vt : globalThis.litElementVersions = []).push("3.3.3");
734
- /**
735
- * @license
736
- * Copyright 2018 Google LLC
737
- * SPDX-License-Identifier: BSD-3-Clause
738
- */
739
- const Nr = (e) => e ?? b, Or = /[A-ZÀ-ÖÙ-Ý]+/g, Lr = /[a-zà-öù-ý]+/g;
740
- function Vr(e) {
741
- const t = e.replace(Or, r).match(Lr);
742
- return t ? t.join("-") : "";
743
- function r(s) {
744
- return " " + (s.length > 2 ? s.slice(0, -1) + " " + s.slice(-1) : s).toLowerCase();
745
- }
746
- }
747
- function Ur() {
748
- const e = {};
749
- return {
750
- has: (t) => Object.hasOwnProperty.call(e, t),
751
- get: (t) => e[t],
752
- set: (t, r) => {
753
- e[t] = r;
754
- }
755
- };
756
- }
757
- function Ir(e, t) {
758
- const r = Ur();
759
- return (...s) => {
760
- const n = e(...s);
761
- return r.has(n) || r.set(n, t(...s)), r.get(n);
762
- };
763
- }
764
- var qr = (e) => e, de = Ir(qr, Vr), Br = (e) => (t) => e.includes(t), zr = Br(["paymentMethod", "source", "token"]);
765
- async function Dr(e) {
766
- const { ok: t, statusText: r } = e;
767
- if (!t)
768
- throw new Error(r);
769
- return e;
770
- }
771
- function jr(e) {
772
- return "addInitializer" in e.constructor;
773
- }
774
- var W = class {
775
- constructor(e) {
776
- if (this.host = e, this.values = /* @__PURE__ */ new Map(), W.instances.has(e))
777
- return W.instances.get(e);
778
- e.addController(this), W.instances.set(e, this);
779
- }
780
- static for(e) {
781
- return new W(e);
782
- }
783
- hostConnected() {
784
- }
785
- set(e, t) {
786
- const r = this.values.get(e);
787
- this.values.set(e, t), jr(this.host) ? this.host.requestUpdate(e, r) : this.host.requestUpdate();
788
- }
789
- }, Ct = W;
790
- Ct.instances = /* @__PURE__ */ new Map();
791
- function d(e, t) {
792
- const r = e.constructor;
793
- r.addInitializer((s) => {
794
- const n = Ct.for(s);
795
- Object.defineProperty(s.constructor.prototype, t, {
796
- enumerable: !0,
797
- configurable: !0,
798
- get() {
799
- return n.values.get(t);
800
- },
801
- set(i) {
802
- n.values.has(t) || n.values.set(t, i);
803
- }
804
- }), r.createProperty(t, {
805
- ...r.getPropertyOptions(t),
806
- noAccessor: !0
807
- });
808
- });
809
- }
810
- d.set = function(e, t) {
811
- const r = Ct.for(e);
812
- for (const [s, n] of Object.entries(t))
813
- r.set(s, n);
814
- };
815
- var Hr = class extends Event {
816
- constructor(e, t, r, s) {
817
- super(`${s ?? e.toLowerCase()}-changed`), this.key = e, this.oldValue = t, this.value = r, this.detail = { value: r };
818
- }
819
- }, st = class {
820
- constructor(e) {
821
- if (this.host = e, this.cache = /* @__PURE__ */ new Map(), st.instances.has(e))
822
- return st.instances.get(e);
823
- e.addController(this), st.instances.set(e, this);
824
- }
825
- hostUpdated() {
826
- for (const [e, t] of this.cache) {
827
- const r = this.host[e], { attribute: s } = this.host.constructor.getPropertyOptions(e) ?? {}, n = typeof s == "string" ? s : null;
828
- this.cache.set(e, r), this.host.dispatchEvent(new Hr(e, t, r, n));
829
- }
830
- }
831
- }, pe = st;
832
- pe.instances = /* @__PURE__ */ new Map();
833
- function w(e, t) {
834
- e.constructor.addInitializer((r) => {
835
- new pe(r).cache.set(t, r[t]);
836
- });
837
- }
838
- function Fr(e) {
839
- return (t, r, s) => {
840
- const n = s.value;
841
- return s.value = e(n), s;
842
- };
843
- }
844
- var Et = Fr(function(e) {
845
- const { name: t } = e;
846
- return async function(...r) {
847
- if (!this.stripe)
848
- throw new Error(`<${this.constructor.is}>: Stripe must be initialized before calling ${t}.`);
849
- return e.call(this, ...r).then(this.handleResponse);
850
- };
851
- });
852
- function Ft(e) {
853
- if (e.error)
854
- throw e.error;
855
- return e;
856
- }
857
- var Wr = Object.defineProperty, Gr = Object.getOwnPropertyDescriptor, a = (e, t, r, s) => {
858
- for (var n = s > 1 ? void 0 : s ? Gr(t, r) : t, i = e.length - 1, o; i >= 0; i--)
859
- (o = e[i]) && (n = (s ? o(t, r, n) : o(n)) || n);
860
- return s && n && Wr(t, r, n), n;
861
- }, he = (e, t, r) => {
862
- if (!t.has(e))
863
- throw TypeError("Cannot " + r);
864
- }, Wt = (e, t, r) => (he(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Gt = (e, t, r) => {
865
- if (t.has(e))
866
- throw TypeError("Cannot add the same private member more than once");
867
- t instanceof WeakSet ? t.add(e) : t.set(e, r);
868
- }, Kt = (e, t, r, s) => (he(e, t, "write to private field"), t.set(e, r), r);
869
- function Jt() {
870
- return (Date.now() + Math.random() * 1e3).toString(36).substr(0, 8);
871
- }
872
- var Kr = class {
873
- constructor(e, t) {
874
- var r;
875
- this.host = e, this.options = t, this.initialized = !1, this.shadowHosts = [], this.host.addController(this), this.mountId = this.resetMountId(), this.slotName = ((r = this.options) == null ? void 0 : r.slotName) ?? `breadcrumb-${Jt()}`;
876
- }
877
- get mount() {
878
- return document.getElementById(this.mountId);
879
- }
880
- hostUpdated() {
881
- var e;
882
- !this.initialized && ((e = this.options) == null ? void 0 : e.autoInitialize) !== !1 && this.init();
883
- }
884
- hostDisconnected() {
885
- this.destroyMountPoints();
886
- }
887
- resetMountId() {
888
- var t;
889
- return `${((t = this.options) == null ? void 0 : t.mountPrefix) ?? this.host.localName}-mount-point-${Jt()}`;
890
- }
891
- createMountPoint() {
892
- const e = document.createElement("div");
893
- return e.id = this.mountId, e.classList.add(`${this.host.tagName.toLowerCase()}-mount`), e;
894
- }
895
- createSlot(e) {
896
- const t = document.createElement("slot");
897
- return t.slot = e, t.name = e, t;
898
- }
899
- appendTemplate(e, t = this.createMountPoint()) {
900
- return e.appendChild(t), t;
901
- }
902
- initMountPoints() {
903
- this.initShadowMountPoints();
904
- }
905
- destroyMountPoints() {
906
- for (const e of this.shadowHosts)
907
- for (const t of e.querySelectorAll(`[slot="${this.slotName}"][name="${this.slotName}"]`))
908
- t.remove();
909
- this.mount && this.mount.remove(), this.mountId = this.resetMountId();
910
- }
911
- initShadowMountPoints() {
912
- let e = this.host;
913
- for (this.shadowHosts = [this.host]; e = e.getRootNode().host; )
914
- this.shadowHosts.push(e);
915
- const { shadowHosts: t, slotName: r } = this, s = [...t], n = s.pop();
916
- if (!n.querySelector(`[slot="${r}"]`)) {
917
- const o = document.createElement("div");
918
- o.slot = r, n.appendChild(o);
919
- }
920
- const i = n.querySelector(`[slot="${r}"]`);
921
- this.appendTemplate(i), s.forEach((o) => this.appendTemplate(o, this.createSlot(r)));
922
- }
923
- init() {
924
- this.destroyMountPoints(), this.initMountPoints(), this.initialized = !0;
925
- }
926
- };
927
- function nt(e) {
928
- "@babel/helpers - typeof";
929
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? nt = function(t) {
930
- return typeof t;
931
- } : nt = function(t) {
932
- return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
933
- }, nt(e);
934
- }
935
- var me = "https://js.stripe.com/v3", Jr = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, Yt = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", Yr = function() {
936
- for (var t = document.querySelectorAll('script[src^="'.concat(me, '"]')), r = 0; r < t.length; r++) {
937
- var s = t[r];
938
- if (Jr.test(s.src))
939
- return s;
940
- }
941
- return null;
942
- }, Zr = function(t) {
943
- var r = t && !t.advancedFraudSignals ? "?advancedFraudSignals=false" : "", s = document.createElement("script");
944
- s.src = "".concat(me).concat(r);
945
- var n = document.head || document.body;
946
- if (!n)
947
- throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
948
- return n.appendChild(s), s;
949
- }, Xr = function(t, r) {
950
- !t || !t._registerWrapper || t._registerWrapper({
951
- name: "stripe-js",
952
- version: "1.32.0",
953
- startTime: r
954
- });
955
- }, et = null, Qr = function(t) {
956
- return et !== null || (et = new Promise(function(r, s) {
957
- if (typeof window > "u") {
958
- r(null);
959
- return;
960
- }
961
- if (window.Stripe && t && console.warn(Yt), window.Stripe) {
962
- r(window.Stripe);
963
- return;
964
- }
965
- try {
966
- var n = Yr();
967
- n && t ? console.warn(Yt) : n || (n = Zr(t)), n.addEventListener("load", function() {
968
- window.Stripe ? r(window.Stripe) : s(new Error("Stripe.js not available"));
969
- }), n.addEventListener("error", function() {
970
- s(new Error("Failed to load Stripe.js"));
971
- });
972
- } catch (i) {
973
- s(i);
974
- return;
975
- }
976
- })), et;
977
- }, ts = function(t, r, s) {
978
- if (t === null)
979
- return null;
980
- var n = t.apply(void 0, r);
981
- return Xr(n, s), n;
982
- }, es = function(t) {
983
- var r = `invalid load parameters; expected object of shape
984
-
985
- {advancedFraudSignals: boolean}
986
-
987
- but received
988
-
989
- `.concat(JSON.stringify(t), `
990
- `);
991
- if (t === null || nt(t) !== "object")
992
- throw new Error(r);
993
- if (Object.keys(t).length === 1 && typeof t.advancedFraudSignals == "boolean")
994
- return t;
995
- throw new Error(r);
996
- }, ye, fe = !1, ve = function() {
997
- for (var t = arguments.length, r = new Array(t), s = 0; s < t; s++)
998
- r[s] = arguments[s];
999
- fe = !0;
1000
- var n = Date.now();
1001
- return Qr(ye).then(function(i) {
1002
- return ts(i, r, n);
1003
- });
1004
- };
1005
- ve.setLoadParameters = function(e) {
1006
- if (fe)
1007
- throw new Error("You cannot change load parameters after calling loadStripe");
1008
- ye = es(e);
1009
- };
1010
- var ge = class extends Error {
1011
- constructor(e, t) {
1012
- super(`<${e}>: ${t}`), this.originalMessage = t;
1013
- }
1014
- };
1015
- function be(e) {
1016
- return !!e && e instanceof ge;
1017
- }
1018
- var rs = {
1019
- toAttribute: (e) => e ? be(e) ? e.originalMessage : e.message || "" : null
1020
- }, h = class extends G {
1021
- constructor() {
1022
- super(...arguments), this.generate = "source", this.showError = !1, this.locale = "auto", this.paymentMethod = null, this.source = null, this.token = null, this.element = null, this.elements = null, this.error = null, this.focused = !1, this.ready = !1, this.stripe = null, this.theme = "none", this.precomputedStyle = getComputedStyle(this), this.breadcrumb = new Kr(this, {
1023
- slotName: `${this.constructor.is}-slot`
1024
- });
1025
- }
1026
- get stripeMountId() {
1027
- return this.breadcrumb.mountId;
1028
- }
1029
- get stripeMount() {
1030
- return this.breadcrumb.mount;
1031
- }
1032
- render() {
1033
- const { error: e, showError: t } = this, { slotName: r } = this.breadcrumb, s = be(e) ? e.originalMessage : e == null ? void 0 : e.message;
1034
- return Cr`
1035
- <div id="stripe" part="stripe">
1036
- <slot id="stripe-slot" name="${r}"></slot>
1037
- </div>
1038
-
1039
- <output id="error"
1040
- for="stripe"
1041
- part="error"
1042
- ?hidden="${!t}">
1043
- ${Nr(s)}
1044
- </output>
1045
- `;
1046
- }
1047
- updated(e) {
1048
- var t;
1049
- (t = super.updated) == null || t.call(this, e), e.has("error") && this.errorChanged(), e.has("publishableKey") && this.init(), [...e.keys()].forEach((r) => this.representationChanged(r));
1050
- }
1051
- async disconnectedCallback() {
1052
- var e;
1053
- super.disconnectedCallback(), await ((e = this.unmount) == null ? void 0 : e.call(this));
1054
- }
1055
- reset() {
1056
- var e, t;
1057
- (t = (e = this.element) == null ? void 0 : e.clear) == null || t.call(e), this.resetRepresentations(), d.set(this, { error: null });
1058
- }
1059
- blur() {
1060
- var e;
1061
- (e = this.element) == null || e.blur();
1062
- }
1063
- focus() {
1064
- var e;
1065
- (e = this.element) == null || e.focus();
1066
- }
1067
- createError(e) {
1068
- return new ge(this.constructor.is, e);
1069
- }
1070
- errorChanged() {
1071
- this.resetRepresentations(), this.fireError(this.error);
1072
- }
1073
- fire(e, t, r) {
1074
- this.dispatchEvent(new CustomEvent(e, { detail: t, ...r }));
1075
- }
1076
- fireError(e) {
1077
- this.dispatchEvent(new ErrorEvent("error", { error: e }));
1078
- }
1079
- getCSSCustomPropertyValue(e) {
1080
- return this.precomputedStyle.getPropertyValue(e);
1081
- }
1082
- async handleResponse(e) {
1083
- const { error: t = null, paymentMethod: r = null, source: s = null, token: n = null } = { ...e };
1084
- if (d.set(this, { error: t, paymentMethod: r, source: s, token: n }), await this.updateComplete, t)
1085
- throw t;
1086
- return e;
1087
- }
1088
- initElement() {
1089
- "abstract";
1090
- }
1091
- async init() {
1092
- await this.unmount(), await this.initStripe(), await this.initElement(), this.initElementListeners(), this.breadcrumb.init(), this.mount();
1093
- }
1094
- initElementListeners() {
1095
- this.element && (this.element.on("ready", this.onReady), this.element.on("focus", this.onFocus), this.element.on("blur", this.onBlur));
1096
- }
1097
- async initStripe() {
1098
- const { publishableKey: e, stripeAccount: t, locale: r } = this;
1099
- if (!e)
1100
- d.set(this, { elements: null, element: null, stripe: null });
1101
- else
1102
- try {
1103
- const s = { stripeAccount: t, locale: r }, n = window.Stripe ? window.Stripe(e, s) : await ve(e, s), i = n == null ? void 0 : n.elements();
1104
- d.set(this, { elements: i, error: null, stripe: n });
1105
- } catch (s) {
1106
- console.warn(s);
1107
- const n = this.createError("Stripe.js must be loaded first.");
1108
- d.set(this, { elements: null, error: n, stripe: null });
1109
- } finally {
1110
- await this.updateComplete;
1111
- }
1112
- }
1113
- mount() {
1114
- var e;
1115
- if (!this.breadcrumb.mount)
1116
- throw this.createError("Stripe Mount missing");
1117
- (e = this.element) == null || e.mount(this.breadcrumb.mount);
1118
- }
1119
- async unmount() {
1120
- var e, t;
1121
- (t = (e = this.element) == null ? void 0 : e.unmount) == null || t.call(e), d.set(this, { element: null }), await this.updateComplete;
1122
- }
1123
- async onBlur() {
1124
- d.set(this, { focused: !1 }), await this.updateComplete;
1125
- }
1126
- async onFocus() {
1127
- d.set(this, { focused: !0 }), await this.updateComplete;
1128
- }
1129
- async onReady(e) {
1130
- d.set(this, { ready: !0 }), await this.updateComplete, this.fire("ready", e);
1131
- }
1132
- async postRepresentation() {
1133
- const e = (l) => d.set(this, { error: l }), t = (l) => this.fire("success", l), r = this.token || void 0, s = this.source || void 0, n = this.paymentMethod || void 0, i = JSON.stringify({ token: r, source: s, paymentMethod: n }), o = { "Content-Type": "application/json" };
1134
- return fetch(this.action, { body: i, headers: o, method: "POST" }).then(Dr).then(t).catch(e);
1135
- }
1136
- representationChanged(e) {
1137
- if (!zr(e))
1138
- return;
1139
- const t = this[e];
1140
- t && (this.fire(`${de(e)}`, t), this.action && this.postRepresentation());
1141
- }
1142
- resetRepresentations() {
1143
- d.set(this, {
1144
- paymentMethod: null,
1145
- token: null,
1146
- source: null
1147
- });
1148
- }
1149
- };
1150
- a([
1151
- u({ type: String })
1152
- ], h.prototype, "action", 2);
1153
- a([
1154
- u({ type: String, attribute: "client-secret" })
1155
- ], h.prototype, "clientSecret", 2);
1156
- a([
1157
- u({ type: String })
1158
- ], h.prototype, "generate", 2);
1159
- a([
1160
- w,
1161
- u({ type: String, attribute: "publishable-key", reflect: !0 })
1162
- ], h.prototype, "publishableKey", 2);
1163
- a([
1164
- u({ type: Boolean, attribute: "show-error", reflect: !0 })
1165
- ], h.prototype, "showError", 2);
1166
- a([
1167
- u({ type: String, attribute: "stripe-account" })
1168
- ], h.prototype, "stripeAccount", 2);
1169
- a([
1170
- u({ type: String, attribute: "locale" })
1171
- ], h.prototype, "locale", 2);
1172
- a([
1173
- d,
1174
- w,
1175
- u({ type: Object, attribute: "payment-method" })
1176
- ], h.prototype, "paymentMethod", 2);
1177
- a([
1178
- d,
1179
- w,
1180
- u({ type: Object })
1181
- ], h.prototype, "source", 2);
1182
- a([
1183
- d,
1184
- w,
1185
- u({ type: Object })
1186
- ], h.prototype, "token", 2);
1187
- a([
1188
- d,
1189
- u({ type: Object })
1190
- ], h.prototype, "element", 2);
1191
- a([
1192
- d,
1193
- u({ type: Object })
1194
- ], h.prototype, "elements", 2);
1195
- a([
1196
- d,
1197
- w,
1198
- u({ type: Object, reflect: !0, converter: rs })
1199
- ], h.prototype, "error", 2);
1200
- a([
1201
- d,
1202
- w,
1203
- u({ type: Boolean, reflect: !0 })
1204
- ], h.prototype, "focused", 2);
1205
- a([
1206
- d,
1207
- w,
1208
- u({ type: Boolean, reflect: !0 })
1209
- ], h.prototype, "ready", 2);
1210
- a([
1211
- d,
1212
- u({ type: Object })
1213
- ], h.prototype, "stripe", 2);
1214
- a([
1215
- u()
1216
- ], h.prototype, "theme", 2);
1217
- a([
1218
- u({ attribute: "border-radius" })
1219
- ], h.prototype, "borderRadius", 2);
1220
- a([
1221
- u({ attribute: "color-background" })
1222
- ], h.prototype, "colorBackground", 2);
1223
- a([
1224
- u({ attribute: "color-danger" })
1225
- ], h.prototype, "colorDanger", 2);
1226
- a([
1227
- u({ attribute: "color-primary" })
1228
- ], h.prototype, "colorPrimary", 2);
1229
- a([
1230
- u({ attribute: "color-text" })
1231
- ], h.prototype, "colorText", 2);
1232
- a([
1233
- u({ attribute: "font-family" })
1234
- ], h.prototype, "fontFamily", 2);
1235
- a([
1236
- u({ attribute: "spacing-unit" })
1237
- ], h.prototype, "spacingUnit", 2);
1238
- a([
1239
- C
1240
- ], h.prototype, "handleResponse", 1);
1241
- a([
1242
- C
1243
- ], h.prototype, "onBlur", 1);
1244
- a([
1245
- C
1246
- ], h.prototype, "onFocus", 1);
1247
- a([
1248
- C
1249
- ], h.prototype, "onReady", 1);
1250
- var ss = _t`[hidden] {
1251
- display: none !important;
1252
- }
1253
-
1254
- :host:not([hidden]) {
1255
- display: block;
1256
- box-sizing: border-box;
1257
- }
1258
-
1259
- #error {
1260
- font-family: sans-serif;
1261
- font-size: 14px;
1262
- padding-left: 42px;
1263
- padding-bottom: 10px;
1264
- }
1265
- `, Se = ss, ns = _t`:host {
1266
- min-width: var(--stripe-elements-width, 300px);
1267
- min-height: var(--stripe-elements-height, 50px);
1268
- }
1269
-
1270
- #stripe {
1271
- box-sizing: border-box;
1272
- border-radius: var(--stripe-elements-border-radius, 4px);
1273
- border: var(--stripe-elements-border, 1px solid transparent);
1274
- box-shadow: var(--stripe-elements-box-shadow, 0 1px 3px 0 #e6ebf1);
1275
- transition: var(--stripe-elements-transition, box-shadow 150ms ease);
1276
- min-width: var(--stripe-elements-width, 300px);
1277
- padding: var(--stripe-elements-element-padding, 8px 12px);
1278
- background: var(--stripe-elements-element-background, white);
1279
- }
1280
-
1281
- :host([focused]) #stripe {
1282
- box-shadow: 0 1px 3px 0 #cfd7df;
1283
- }
1284
-
1285
- :host([error]) #stripe {
1286
- border-color: #fa755a;
1287
- }
1288
- `, is = ns, Zt = [
1289
- "color",
1290
- "fontFamily",
1291
- "fontSize",
1292
- "fontStyle",
1293
- "fontSmoothing",
1294
- "fontVariant",
1295
- "iconColor",
1296
- "lineHeight",
1297
- "letterSpacing",
1298
- "textDecoration",
1299
- "textShadow",
1300
- "textTransform"
1301
- ], os = [
1302
- ":hover",
1303
- ":focus",
1304
- "::placeholder",
1305
- "::selection",
1306
- ":-webkit-autofill",
1307
- ":disabled"
1308
- ], $ = class extends h {
1309
- constructor() {
1310
- super(...arguments), this.hideIcon = !1, this.hidePostalCode = !1, this.iconStyle = "default", this.value = {}, this.brand = null, this.complete = !1, this.empty = !0, this.invalid = !1;
1311
- }
1312
- async createPaymentMethod(e = this.getPaymentMethodData()) {
1313
- return this.stripe.createPaymentMethod(e);
1314
- }
1315
- async createSource(e = this.sourceData) {
1316
- return this.stripe.createSource(this.element, e);
1317
- }
1318
- async createToken(e = this.tokenData) {
1319
- return this.stripe.createToken(this.element, e);
1320
- }
1321
- isPotentiallyValid() {
1322
- return !this.complete && !this.empty && !this.error || this.validate();
1323
- }
1324
- reset() {
1325
- var e;
1326
- super.reset(), (e = this.element) == null || e.clear();
1327
- }
1328
- async submit() {
1329
- switch (this.generate) {
1330
- case "payment-method":
1331
- return this.createPaymentMethod();
1332
- case "source":
1333
- return this.createSource();
1334
- case "token":
1335
- return this.createToken();
1336
- default: {
1337
- const e = this.createError(`cannot generate ${this.generate}`);
1338
- throw d.set(this, { error: e }), await this.updateComplete, e;
1339
- }
1340
- }
1341
- }
1342
- validate() {
1343
- const { complete: e, empty: t, error: r } = this, s = !r && e && !t;
1344
- return t && !r && d.set(this, { error: this.createError("Your card number is empty.") }), s;
1345
- }
1346
- updateStyle() {
1347
- var e;
1348
- (e = this.element) == null || e.update({
1349
- style: this.getStripeElementsStyles()
1350
- });
1351
- }
1352
- getPaymentMethodData() {
1353
- const e = "card", { billingDetails: t, paymentMethodData: r } = this;
1354
- return {
1355
- billing_details: t,
1356
- ...r,
1357
- type: e,
1358
- card: this.element
1359
- };
1360
- }
1361
- getStripeElementsStyles() {
1362
- const e = (n) => this.getCSSCustomPropertyValue(n) || void 0, t = ["base", "complete", "empty", "invalid"], r = (n) => (i, o) => {
1363
- if (n.includes("-"))
1364
- return i;
1365
- const c = o.split(":").pop();
1366
- return {
1367
- ...i,
1368
- [o]: Zt.reduce(s(`${n}-${c}`), {})
1369
- };
1370
- }, s = (n) => (i, o) => {
1371
- const c = `--stripe-elements-${n}-${de(o)}`;
1372
- return {
1373
- ...i,
1374
- [o]: e(c),
1375
- ...os.reduce(r(n), {})
1376
- };
1377
- };
1378
- return t.reduce((n, i) => ({
1379
- ...n,
1380
- [i]: Zt.reduce(s(i), {})
1381
- }), {});
1382
- }
1383
- async initElement() {
1384
- if (!this.stripe)
1385
- return;
1386
- const { hidePostalCode: e, hideIcon: t, iconStyle: r, value: s } = this, n = this.getStripeElementsStyles();
1387
- await this.updateComplete;
1388
- const i = this.createElement({
1389
- hideIcon: t,
1390
- hidePostalCode: e,
1391
- iconStyle: r,
1392
- style: n,
1393
- value: s
1394
- });
1395
- i.on("change", this.onChange), d.set(this, { element: i }), await this.updateComplete;
1396
- }
1397
- createElement(e) {
1398
- return this.elements.create("card", e);
1399
- }
1400
- async onChange(e) {
1401
- const { brand: t, complete: r, empty: s, error: n = null } = e, i = !(n || !s && !r);
1402
- d.set(this, { brand: t, complete: r, empty: s, error: n, invalid: i }), await this.updateComplete, this.fire("change", e);
1403
- }
1404
- };
1405
- $.is = "stripe-elements";
1406
- $.elementType = "card";
1407
- $.styles = [
1408
- Se,
1409
- is
1410
- ];
1411
- a([
1412
- u({ type: Boolean, attribute: "hide-icon" })
1413
- ], $.prototype, "hideIcon", 2);
1414
- a([
1415
- u({ type: Boolean, attribute: "hide-postal-code" })
1416
- ], $.prototype, "hidePostalCode", 2);
1417
- a([
1418
- u({ type: String, attribute: "icon-style" })
1419
- ], $.prototype, "iconStyle", 2);
1420
- a([
1421
- u({ type: Object })
1422
- ], $.prototype, "value", 2);
1423
- a([
1424
- w,
1425
- d,
1426
- u({ type: String })
1427
- ], $.prototype, "brand", 2);
1428
- a([
1429
- w,
1430
- d,
1431
- u({ type: Boolean, reflect: !0 })
1432
- ], $.prototype, "complete", 2);
1433
- a([
1434
- w,
1435
- d,
1436
- u({ type: Boolean, reflect: !0 })
1437
- ], $.prototype, "empty", 2);
1438
- a([
1439
- w,
1440
- d,
1441
- u({ type: Boolean, reflect: !0 })
1442
- ], $.prototype, "invalid", 2);
1443
- a([
1444
- Et
1445
- ], $.prototype, "createPaymentMethod", 1);
1446
- a([
1447
- Et
1448
- ], $.prototype, "createSource", 1);
1449
- a([
1450
- Et
1451
- ], $.prototype, "createToken", 1);
1452
- a([
1453
- C
1454
- ], $.prototype, "onChange", 1);
1455
- $ = a([
1456
- ne("stripe-elements")
1457
- ], $);
1458
- var as = _t`#stripe {
1459
- box-sizing: border-box;
1460
- min-width: var(--stripe-payment-request-element-min-width, 300px);
1461
- padding: var(--stripe-payment-request-element-padding, 8px 12px);
1462
- background: var(--stripe-payment-request-element-background, white);
1463
- }
1464
- `, ls = as;
1465
- function us(e) {
1466
- return e.tagName.toLowerCase() === "stripe-display-item";
1467
- }
1468
- function cs({ dataset: { amount: e, label: t, pending: r } }) {
1469
- return {
1470
- label: t,
1471
- amount: parseInt(e),
1472
- ...r !== void 0 && { pending: r === "true" }
1473
- };
1474
- }
1475
- function ds({ dataset: { amount: e, detail: t, ...r } }) {
1476
- return {
1477
- amount: parseInt(e),
1478
- detail: t,
1479
- ...r
1480
- };
1481
- }
1482
- function ps(e) {
1483
- return us(e) ? cs(e) : ds(e);
1484
- }
1485
- var it, ot, m = class extends h {
1486
- constructor() {
1487
- super(...arguments), this.canMakePayment = null, Gt(this, it, void 0), this.paymentIntent = null, this.paymentRequest = null, this.pending = !1, Gt(this, ot, void 0), this.buttonType = "default", this.buttonTheme = "dark", this.complete = async (e, t) => {
1488
- const { error: r = null } = { ...e }, s = r || t ? "fail" : "success";
1489
- return e.complete(s), this.fire(s, e), t ? { error: t } : e;
1490
- };
1491
- }
1492
- get displayItems() {
1493
- const e = Wt(this, it);
1494
- return Array.isArray(e) ? e : this.parseDatasets("stripe-display-item");
1495
- }
1496
- set displayItems(e) {
1497
- const t = this.displayItems;
1498
- Kt(this, it, e), this.requestUpdate("displayItems", t);
1499
- }
1500
- get shippingOptions() {
1501
- const e = Wt(this, ot);
1502
- return Array.isArray(e) ? e : this.parseDatasets("stripe-shipping-option");
1503
- }
1504
- set shippingOptions(e) {
1505
- const t = this.shippingOptions;
1506
- Kt(this, ot, e), this.requestUpdate("shippingOptions", t);
1507
- }
1508
- reset() {
1509
- super.reset(), d.set(this, { paymentIntent: null });
1510
- }
1511
- updated(e) {
1512
- super.updated(e), e.has("generate") && this.initPaymentRequestListeners(), e.has("amount") && this.updatePaymentRequest();
1513
- }
1514
- getStripePaymentRequestOptions() {
1515
- const {
1516
- country: e,
1517
- currency: t,
1518
- displayItems: r,
1519
- shippingOptions: s,
1520
- requestShipping: n,
1521
- requestPayerEmail: i,
1522
- requestPayerName: o,
1523
- requestPayerPhone: c,
1524
- label: l = "",
1525
- amount: p = 0
1526
- } = this;
1527
- return {
1528
- country: e,
1529
- currency: t,
1530
- displayItems: r,
1531
- requestPayerEmail: i,
1532
- requestPayerName: o,
1533
- requestPayerPhone: c,
1534
- requestShipping: n,
1535
- shippingOptions: s,
1536
- total: { label: l, amount: p }
1537
- };
1538
- }
1539
- async initElement() {
1540
- await this.initPaymentRequest(), await this.initPaymentRequestListeners(), await this.initPaymentRequestButton();
1541
- }
1542
- async initPaymentRequest() {
1543
- if (!this.stripe)
1544
- return;
1545
- const e = this.getStripePaymentRequestOptions(), t = this.stripe.paymentRequest(e), r = await t.canMakePayment();
1546
- d.set(this, { paymentRequest: t, canMakePayment: r }), await this.updateComplete, this.canMakePayment || this.fire("unsupported");
1547
- }
1548
- async initPaymentRequestButton() {
1549
- const { buttonTheme: e, buttonType: t, canMakePayment: r } = this;
1550
- if (!r || !this.elements)
1551
- return;
1552
- const i = { paymentRequestButton: { height: this.getCSSCustomPropertyValue("--stripe-payment-request-button-height") || "40px", theme: e, type: t } }, o = this.elements.create("paymentRequestButton", {
1553
- paymentRequest: this.paymentRequest,
1554
- style: i
1555
- });
1556
- d.set(this, { element: o }), await this.updateComplete;
1557
- }
1558
- async initPaymentRequestListeners() {
1559
- if (this.canMakePayment)
1560
- switch (this.paymentRequest.on("click", this.updatePaymentRequest), this.paymentRequest.on("cancel", this.onCancel), this.paymentRequest.on("shippingaddresschange", this.onShippingaddresschange), this.paymentRequest.on("shippingoptionchange", this.onShippingoptionchange), this.generate) {
1561
- case "payment-method":
1562
- this.paymentRequest.on("paymentmethod", this.onPaymentResponse);
1563
- break;
1564
- case "source":
1565
- this.paymentRequest.on("source", this.onPaymentResponse);
1566
- break;
1567
- case "token":
1568
- this.paymentRequest.on("token", this.onPaymentResponse);
1569
- break;
1570
- }
1571
- }
1572
- async updatePaymentRequest() {
1573
- if (!this.paymentRequest)
1574
- return;
1575
- const { currency: e, total: t, displayItems: r, shippingOptions: s } = this.getStripePaymentRequestOptions();
1576
- this.paymentRequest.update({ currency: e, total: t, displayItems: r, shippingOptions: s });
1577
- }
1578
- onCancel() {
1579
- this.fire(
1580
- "cancel"
1581
- /* cancel */
1582
- );
1583
- }
1584
- async onPaymentResponse(e) {
1585
- const {
1586
- error: t = null,
1587
- paymentMethod: r = null,
1588
- source: s = null,
1589
- token: n = null
1590
- } = { ...e };
1591
- d.set(this, { error: t, paymentMethod: r, source: s, token: n }), this.clientSecret && !t ? this.confirmPaymentIntent(e) : this.complete(e);
1592
- }
1593
- async confirmPaymentIntent(e) {
1594
- const t = { payment_method: this.paymentMethod.id }, r = await this.confirmCardPayment(t, { handleActions: !1 }).then(({ error: i }) => this.complete(e, i)).then(Ft).then(() => this.confirmCardPayment()).then(Ft).catch((i) => ({ error: i })), { error: s = null } = r, n = r.paymentIntent ?? null;
1595
- d.set(this, { error: s, paymentIntent: n }), await this.updateComplete;
1596
- }
1597
- async confirmCardPayment(e, t) {
1598
- return this.stripe.confirmCardPayment(this.clientSecret, e, t);
1599
- }
1600
- onShippingaddresschange(e) {
1601
- this.fire("shippingaddresschange", e);
1602
- }
1603
- onShippingoptionchange(e) {
1604
- this.fire("shippingoptionchange", e);
1605
- }
1606
- parseDatasets(e) {
1607
- const t = [...this.querySelectorAll(e)];
1608
- return t.length ? t.map(ps) : [];
1609
- }
1610
- };
1611
- it = /* @__PURE__ */ new WeakMap();
1612
- ot = /* @__PURE__ */ new WeakMap();
1613
- m.is = "stripe-payment-request";
1614
- m.styles = [
1615
- Se,
1616
- ls
1617
- ];
1618
- a([
1619
- u({ type: Number, reflect: !0 })
1620
- ], m.prototype, "amount", 2);
1621
- a([
1622
- w,
1623
- d,
1624
- u({ type: Boolean, attribute: "can-make-payment", reflect: !0 })
1625
- ], m.prototype, "canMakePayment", 2);
1626
- a([
1627
- u({ type: String })
1628
- ], m.prototype, "country", 2);
1629
- a([
1630
- u({ type: String })
1631
- ], m.prototype, "currency", 2);
1632
- a([
1633
- u({ type: Array })
1634
- ], m.prototype, "displayItems", 1);
1635
- a([
1636
- u({ type: String, reflect: !0 })
1637
- ], m.prototype, "label", 2);
1638
- a([
1639
- w,
1640
- d,
1641
- u({ type: Object, attribute: "payment-intent" })
1642
- ], m.prototype, "paymentIntent", 2);
1643
- a([
1644
- d,
1645
- u({ type: Object, attribute: "payment-request" })
1646
- ], m.prototype, "paymentRequest", 2);
1647
- a([
1648
- u({ type: Boolean, reflect: !0 })
1649
- ], m.prototype, "pending", 2);
1650
- a([
1651
- u({ type: Boolean, attribute: "request-payer-email" })
1652
- ], m.prototype, "requestPayerEmail", 2);
1653
- a([
1654
- u({ type: Boolean, attribute: "request-payer-name" })
1655
- ], m.prototype, "requestPayerName", 2);
1656
- a([
1657
- u({ type: Boolean, attribute: "request-payer-phone" })
1658
- ], m.prototype, "requestPayerPhone", 2);
1659
- a([
1660
- u({ type: Boolean, attribute: "request-shipping" })
1661
- ], m.prototype, "requestShipping", 2);
1662
- a([
1663
- u({ type: Array })
1664
- ], m.prototype, "shippingOptions", 1);
1665
- a([
1666
- u({ type: String, attribute: "button-type" })
1667
- ], m.prototype, "buttonType", 2);
1668
- a([
1669
- u({ type: String, attribute: "button-theme" })
1670
- ], m.prototype, "buttonTheme", 2);
1671
- a([
1672
- C
1673
- ], m.prototype, "onCancel", 1);
1674
- a([
1675
- C
1676
- ], m.prototype, "onPaymentResponse", 1);
1677
- a([
1678
- C
1679
- ], m.prototype, "confirmPaymentIntent", 1);
1680
- a([
1681
- C
1682
- ], m.prototype, "confirmCardPayment", 1);
1683
- a([
1684
- C
1685
- ], m.prototype, "onShippingaddresschange", 1);
1686
- a([
1687
- C
1688
- ], m.prototype, "onShippingoptionchange", 1);
1689
- m = a([
1690
- ne("stripe-payment-request")
1691
- ], m);
1692
- const $e = ke({
1693
- components: {
1694
- BFormattedAmount: He
1695
- },
1696
- computed: {
1697
- termsAndConditionsUrl() {
1698
- return this.t("CreditCardForm.termsURL");
1699
- }
1700
- },
1701
- data: () => ({
1702
- error: "",
1703
- isTermsAccepted: !1,
1704
- termsError: !1
1705
- }),
1706
- methods: {
1707
- onCreditCardFormChange(e) {
1708
- this.error = "", this.$emit("change", !!e.detail.complete);
1709
- },
1710
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1711
- onPaymentError(e) {
1712
- var t;
1713
- this.error = `${(t = e == null ? void 0 : e.error) == null ? void 0 : t.message} ${this.t("CreditCardForm.error")}`, this.$emit("error", this.error);
1714
- },
1715
- async onStripePayment(e) {
1716
- try {
1717
- if (!window.Stripe || this.disabled)
1718
- return;
1719
- const r = await window.Stripe(this.pk, {
1720
- locale: this.$i18n.locale
1721
- }).confirmCardPayment(this.token, {
1722
- // eslint-disable-next-line camelcase
1723
- payment_method: e.detail.id
1724
- });
1725
- r.error && r.error ? this.onPaymentError(r) : this.withAction ? this.$eventBus.$emit(Me.PaymentSuccess) : this.$emit("success");
1726
- } catch (t) {
1727
- this.onPaymentError(t);
1728
- }
1729
- },
1730
- pay() {
1731
- try {
1732
- if (!this.$refs.payment || this.withTerms && !this.isTermsAccepted)
1733
- return;
1734
- this.$refs.payment.submit();
1735
- } catch (e) {
1736
- this.onPaymentError(e);
1737
- }
1738
- }
1739
- },
1740
- name: "CreditCardForm",
1741
- props: rr,
1742
- setup() {
1743
- const { t: e } = Re(), { config: t } = Te(), r = Qt(
1744
- () => sr(t.value.apiEnvironment)
1745
- ), s = At(!1), n = At(null);
1746
- return xe(async () => {
1747
- n.value = await yr(r.value), s.value = !0;
1748
- }), {
1749
- pk: r,
1750
- stripeLoaded: s,
1751
- t: e
1752
- };
1753
- }
1754
- });
1755
- function Xt(e) {
1756
- const t = e;
1757
- t.__i18n = t.__i18n || [], t.__i18n.push({
1758
- locale: "",
1759
- resource: {
1760
- "en-US": {
1761
- CreditCardForm: {
1762
- cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Card number" } },
1763
- error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Please, use another payment method" } },
1764
- or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "or" } },
1765
- cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
1766
- expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Exp. Date" } },
1767
- pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Total price to pay" } },
1768
- payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Amount to pay by card" } },
1769
- paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Payment declined" } },
1770
- title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Total to Pay with your credit card" } },
1771
- payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Pay now" } },
1772
- termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo.pdf" } },
1773
- termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'By continuing with your reservation you agree to the terms and conditions: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Click here to read it</a></b>' }] } }
1774
- }
1775
- },
1776
- "fr-FR": {
1777
- CreditCardForm: {
1778
- cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Numéro de carte bancaire" } },
1779
- error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Veuillez utiliser un autre moyen de paiement." } },
1780
- or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "ou" } },
1781
- cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
1782
- expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Date d'exp." } },
1783
- pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Montant total à régler" } },
1784
- payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Montant à régler par carte bancaire" } },
1785
- paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Paiement refusé" } },
1786
- title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Montant total à payer par carte bancaire" } },
1787
- payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Payer maintenant" } },
1788
- termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo_fr.pdf" } },
1789
- termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'En poursuivant votre réservation, vous acceptez les conditions générales: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Cliquez ici pour les consulter</a></b>' }] } }
1790
- }
1791
- },
1792
- "de-DE": {
1793
- CreditCardForm: {
1794
- cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Kartennummer" } },
1795
- error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Bitte verwenden Sie eine andere Zahlungsmethode" } },
1796
- or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "oder" } },
1797
- cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
1798
- expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Ablaufdatum" } },
1799
- pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Zu zahlender Gesamtpreis" } },
1800
- payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Betrag, der mit Karte zu zahlen ist" } },
1801
- paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Zahlung abgelehnt" } },
1802
- title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Gesamtbetrag zur Zahlung mit Ihrer Kreditkarte" } },
1803
- payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Jetzt bezahlen" } },
1804
- termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo.pdf" } },
1805
- termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'Indem Sie mit Ihrer Reservierung fortfahren, stimmen Sie den Allgemeinen Geschäftsbedingungen zu: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Klicken Sie hier, um sie zu lesen</a></b>' }] } }
1806
- }
1807
- },
1808
- "es-ES": {
1809
- CreditCardForm: {
1810
- cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Número de tarjeta" } },
1811
- error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Por favor, utilice otro método de pago" } },
1812
- or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "o" } },
1813
- cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
1814
- expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Fecha de vencimiento" } },
1815
- pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Precio total a pagar" } },
1816
- payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Importe a pagar con tarjeta" } },
1817
- paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Pago rechazado" } },
1818
- title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Total a pagar con su tarjeta de crédito" } },
1819
- payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Pagar ahora" } },
1820
- termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo.pdf" } },
1821
- termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'Al continuar con su reserva, acepta los términos y condiciones: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Haga clic aquí para leerlos</a></b>' }] } }
1822
- }
1823
- },
1824
- "it-IT": {
1825
- CreditCardForm: {
1826
- cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Numero di carta" } },
1827
- error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Si prega di utilizzare un altro metodo di pagamento" } },
1828
- or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "o" } },
1829
- cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
1830
- expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Data di scadenza" } },
1831
- pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Prezzo totale da pagare" } },
1832
- payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Importo da pagare con carta" } },
1833
- paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Pagamento rifiutato" } },
1834
- title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Totale da pagare con la tua carta di credito" } },
1835
- payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Paga adesso" } },
1836
- termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo.pdf" } },
1837
- termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'Continuando con la prenotazione, accetti i termini e le condizioni: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Clicca qui per leggerli</a></b>' }] } }
1838
- }
1839
- },
1840
- "nl-NL": {
1841
- CreditCardForm: {
1842
- cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Kaartnummer" } },
1843
- error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Gebruik alstublieft een andere betaalmethode" } },
1844
- or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "of" } },
1845
- cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
1846
- expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Vervaldatum" } },
1847
- pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Totaal te betalen prijs" } },
1848
- payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Bedrag te betalen met kaart" } },
1849
- paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Betaling geweigerd" } },
1850
- title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Totaal te betalen met uw creditcard" } },
1851
- payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Betaal nu" } },
1852
- termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo.pdf" } },
1853
- termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'Door verder te gaan met uw reservering, gaat u akkoord met de algemene voorwaarden: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Klik hier om ze te lezen</a></b>' }] } }
1854
- }
1855
- },
1856
- "pt-PT": {
1857
- CreditCardForm: {
1858
- cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Número do cartão" } },
1859
- error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Por favor, utilize outro método de pagamento" } },
1860
- or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "ou" } },
1861
- cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
1862
- expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Data de validade" } },
1863
- pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Preço total a pagar" } },
1864
- payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Montante a pagar com cartão" } },
1865
- paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Pagamento recusado" } },
1866
- title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Total a pagar com o seu cartão de crédito" } },
1867
- payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Pagar agora" } },
1868
- termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo.pdf" } },
1869
- termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'Ao continuar com a sua reserva, concorda com os termos e condições: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Clique aqui para os ler</a></b>' }] } }
1870
- }
1871
- }
1872
- }
1873
- });
1874
- }
1875
- const hs = Oe({
1876
- ...er(),
1877
- ...Ie(Ye(), ["inline"])
1878
- }, "VCheckbox"), ms = Ne()({
1879
- name: "VCheckbox",
1880
- inheritAttrs: !1,
1881
- props: hs(),
1882
- emits: {
1883
- "update:modelValue": (e) => !0,
1884
- "update:focused": (e) => !0
1885
- },
1886
- setup(e, t) {
1887
- let {
1888
- attrs: r,
1889
- slots: s
1890
- } = t;
1891
- const n = Le(e, "modelValue"), {
1892
- isFocused: i,
1893
- focus: o,
1894
- blur: c
1895
- } = tr(e), l = Ve(), p = Qt(() => e.id || `checkbox-${l}`);
1896
- return Fe(() => {
1897
- const [y, f] = Ue(r), S = Tt.filterProps(e), _ = kt.filterProps(e);
1898
- return g(Tt, Pt({
1899
- class: ["v-checkbox", e.class]
1900
- }, y, S, {
1901
- modelValue: n.value,
1902
- "onUpdate:modelValue": (q) => n.value = q,
1903
- id: p.value,
1904
- focused: i.value,
1905
- style: e.style
1906
- }), {
1907
- ...s,
1908
- default: (q) => {
1909
- let {
1910
- id: N,
1911
- messagesId: we,
1912
- isDisabled: _e,
1913
- isReadonly: Ce,
1914
- isValid: Ee
1915
- } = q;
1916
- return g(kt, Pt(_, {
1917
- id: N.value,
1918
- "aria-describedby": we.value,
1919
- disabled: _e.value,
1920
- readonly: Ce.value
1921
- }, f, {
1922
- error: Ee.value === !1,
1923
- modelValue: n.value,
1924
- "onUpdate:modelValue": (Ae) => n.value = Ae,
1925
- onFocus: o,
1926
- onBlur: c
1927
- }), s);
1928
- }
1929
- });
1930
- }), {};
1931
- }
1932
- }), ys = { class: "w-100 d-flex justify-space-between items-center" }, fs = { class: "text-caption font-weight-bold text-center my-0 text-red rounded" }, vs = { class: "pr-3" }, gs = ["locale", "publishable-key"], bs = ["innerHTML"], Ss = { class: "mr-1" };
1933
- function $s(e, t, r, s, n, i) {
1934
- const o = qe("BFormattedAmount");
1935
- return A(), k(Rt, {
1936
- disabled: e.disabled,
1937
- elevation: "0",
1938
- border: "",
1939
- style: je({
1940
- borderColor: e.disabled ? null : "rgb(var(--v-theme-primary))"
1941
- })
1942
- }, {
1943
- default: v(() => [
1944
- g(Je, {
1945
- class: "text-white",
1946
- color: "primary",
1947
- density: "compact",
1948
- elevation: "0"
1949
- }, {
1950
- default: v(() => [
1951
- E("div", ys, [
1952
- E("h4", null, [
1953
- g(ct, {
1954
- color: "white",
1955
- start: "",
1956
- size: "small"
1957
- }, {
1958
- default: v(() => t[5] || (t[5] = [
1959
- X(" fas fa-credit-card ")
1960
- ])),
1961
- _: 1,
1962
- __: [5]
1963
- }),
1964
- X(" " + R(e.t("CreditCardForm.title")) + ": ", 1),
1965
- e.loading ? (A(), k(Ge, {
1966
- key: 1,
1967
- class: "ml-2",
1968
- color: "primary",
1969
- indeterminate: "",
1970
- size: "20",
1971
- width: "1"
1972
- })) : (A(), k(o, {
1973
- key: 0,
1974
- amount: e.amount,
1975
- class: "font-weight-bold",
1976
- currency: e.currency
1977
- }, null, 8, ["amount", "currency"]))
1978
- ]),
1979
- g(ct, {
1980
- color: "white",
1981
- end: "",
1982
- size: "small"
1983
- }, {
1984
- default: v(() => t[6] || (t[6] = [
1985
- X(" fas fa-lock ")
1986
- ])),
1987
- _: 1,
1988
- __: [6]
1989
- })
1990
- ])
1991
- ]),
1992
- _: 1
1993
- }),
1994
- g(Xe, null, {
1995
- default: v(() => [
1996
- g(D, null, {
1997
- default: v(() => [
1998
- g(O, null, {
1999
- default: v(() => [
2000
- e.error ? (A(), k(Ze, {
2001
- key: 0,
2002
- color: "red",
2003
- density: "compact",
2004
- variant: "outlined"
2005
- }, {
2006
- default: v(() => [
2007
- E("p", fs, R(e.t("CreditCardForm.paymentDeclined")) + ": " + R(e.error), 1)
2008
- ]),
2009
- _: 1
2010
- })) : z("", !0)
2011
- ]),
2012
- _: 1
2013
- })
2014
- ]),
2015
- _: 1
2016
- }),
2017
- g(D, {
2018
- class: "d-none d-sm-flex",
2019
- "no-gutters": ""
2020
- }, {
2021
- default: v(() => [
2022
- g(O, { cols: "8" }, {
2023
- default: v(() => [
2024
- E("small", null, R(e.t("CreditCardForm.cardNumber")), 1)
2025
- ]),
2026
- _: 1
2027
- }),
2028
- g(O, {
2029
- class: "text-right pr-6",
2030
- cols: "4"
2031
- }, {
2032
- default: v(() => [
2033
- E("small", vs, R(e.t("CreditCardForm.expDate")), 1),
2034
- E("small", null, R(e.t("CreditCardForm.cvc")), 1)
2035
- ]),
2036
- _: 1
2037
- })
2038
- ]),
2039
- _: 1
2040
- }),
2041
- g(D, { "no-gutters": "" }, {
2042
- default: v(() => [
2043
- g(O, null, {
2044
- default: v(() => [
2045
- g(Rt, {
2046
- elevation: "0",
2047
- border: ""
2048
- }, {
2049
- default: v(() => [
2050
- e.stripeLoaded ? (A(), Be("stripe-elements", {
2051
- key: 0,
2052
- ref: "payment",
2053
- class: ze({
2054
- "d-none": e.loading
2055
- }),
2056
- generate: "payment-method",
2057
- "hide-postal-code": "",
2058
- locale: e.$i18n.locale,
2059
- "publishable-key": e.pk,
2060
- onChange: t[0] || (t[0] = (...c) => e.onCreditCardFormChange && e.onCreditCardFormChange(...c)),
2061
- onError: t[1] || (t[1] = (...c) => e.onPaymentError && e.onPaymentError(...c)),
2062
- onPaymentMethod: t[2] || (t[2] = (...c) => e.onStripePayment && e.onStripePayment(...c))
2063
- }, null, 42, gs)) : z("", !0),
2064
- e.loading ? (A(), k(Qe, {
2065
- key: 1,
2066
- class: "mx-auto",
2067
- height: "36.8px",
2068
- type: "image",
2069
- width: "100%"
2070
- })) : z("", !0)
2071
- ]),
2072
- _: 1
2073
- })
2074
- ]),
2075
- _: 1
2076
- })
2077
- ]),
2078
- _: 1
2079
- }),
2080
- e.withTerms ? (A(), k(D, {
2081
- key: 0,
2082
- class: "mt-2"
2083
- }, {
2084
- default: v(() => [
2085
- g(O, null, {
2086
- default: v(() => [
2087
- g(ms, {
2088
- ref: "testing",
2089
- modelValue: e.isTermsAccepted,
2090
- "onUpdate:modelValue": t[4] || (t[4] = (c) => e.isTermsAccepted = c),
2091
- class: "mt-0",
2092
- error: e.termsError && !e.isTermsAccepted
2093
- }, {
2094
- label: v(() => [
2095
- E("span", {
2096
- onClick: t[3] || (t[3] = De(() => {
2097
- }, ["stop"])),
2098
- innerHTML: e.t("CreditCardForm.termsAndConditions", {
2099
- url: e.termsAndConditionsUrl
2100
- })
2101
- }, null, 8, bs)
2102
- ]),
2103
- _: 1
2104
- }, 8, ["modelValue", "error"])
2105
- ]),
2106
- _: 1
2107
- })
2108
- ]),
2109
- _: 1
2110
- })) : z("", !0),
2111
- e.withAction ? (A(), k(D, { key: 1 }, {
2112
- default: v(() => [
2113
- g(O, { class: "d-flex justify-end flex-column flex-sm-row mb-1 align-center mt-4 mt-sm-0" }, {
2114
- default: v(() => [
2115
- g(Ke, {
2116
- class: "w-100 w-sm-auto",
2117
- color: "primary",
2118
- variant: "flat",
2119
- disabled: e.disabled || e.withTerms && !e.isTermsAccepted,
2120
- loading: e.loading,
2121
- onClick: e.pay
2122
- }, {
2123
- default: v(() => [
2124
- g(ct, { start: "" }, {
2125
- default: v(() => t[7] || (t[7] = [
2126
- X(" fas fa-lock ")
2127
- ])),
2128
- _: 1,
2129
- __: [7]
2130
- }),
2131
- E("span", Ss, R(e.t("CreditCardForm.payNow")), 1),
2132
- g(o, {
2133
- amount: e.amount,
2134
- class: "font-weight-bold",
2135
- currency: e.currency
2136
- }, null, 8, ["amount", "currency"])
2137
- ]),
2138
- _: 1
2139
- }, 8, ["disabled", "loading", "onClick"])
2140
- ]),
2141
- _: 1
2142
- })
2143
- ]),
2144
- _: 1
2145
- })) : z("", !0)
2146
- ]),
2147
- _: 1
2148
- })
2149
- ]),
2150
- _: 1
2151
- }, 8, ["disabled", "style"]);
2152
- }
2153
- typeof Xt == "function" && Xt($e);
2154
- const Os = /* @__PURE__ */ We($e, [["render", $s], ["__scopeId", "data-v-bb3529bc"]]);
2155
- Pe("css/revolugo.creditcardform.DWne0Lnv.css");
2156
- export {
2157
- Os as C,
2158
- ms as V,
2159
- rr as c
2160
- };
2161
- //# sourceMappingURL=revolugo.creditcardform.DNOMVOgZ.min.js.map