@revolugo/elements 5.5.1-beta.1 → 5.5.1-beta.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/css/fonts.css +1 -0
- package/dist/css/revolugo.bdaterangepicker.DEh20utH.css +1 -0
- package/dist/css/revolugo.bhotelroomsdetails.4XsxkvH7.css +1 -0
- package/dist/css/revolugo.bhotelsearchbar.dwYB1gUC.css +1 -0
- package/dist/css/revolugo.bookingdetailssidebar.tDtXpaIj.css +1 -0
- package/dist/css/revolugo.bphoneinput.Kq_-XiGI.css +1 -0
- package/dist/css/revolugo.bstarrating.nzH7iii4.css +1 -0
- package/dist/css/revolugo.btag.Bdbqb_8a.css +1 -0
- package/dist/css/revolugo.common.BSIsYREh.css +1 -0
- package/dist/css/revolugo.creditcardform.BGPUxkRC.css +1 -0
- package/dist/css/revolugo.creditcardpayment.CGjlL8Fn.css +1 -0
- package/dist/css/revolugo.currencypicker.BRYsKdMu.css +1 -0
- package/dist/css/revolugo.fullbookingflow.BHV7_MhK.css +1 -0
- package/dist/css/revolugo.hotel-offer.Di9LJKMP.css +1 -0
- package/dist/css/revolugo.hoteldescriptionview.9ofE1uWG.css +1 -0
- package/dist/css/revolugo.hoteloffersmap.-ZhDcfsj.css +1 -0
- package/dist/css/revolugo.hoteloffersview.MWOmwEwv.css +1 -0
- package/dist/css/revolugo.hotelroomofferlist.DrGyKJ-m.css +1 -0
- package/dist/css/revolugo.hotelroomoffersbookingflow.DGFt0C9n.css +1 -0
- package/dist/css/revolugo.hotelroomoffersview.B8Y-2QYc.css +1 -0
- package/dist/css/revolugo.index.BMkl7a3p.css +1 -0
- package/dist/css/revolugo.index.CFW4Oklv.css +1 -0
- package/dist/css/revolugo.index.DXv5c7NS.css +1 -0
- package/dist/css/revolugo.langpicker.B3TsOwUq.css +1 -0
- package/dist/css/revolugo.parsed-height.B92--uJb.css +1 -0
- package/dist/css/revolugo.parsed-props.C3kOvm7T.css +1 -0
- package/dist/css/revolugo.prebookform.CDnZmw8F.css +1 -0
- package/dist/css/revolugo.revolugo-config.Dg8v1l3c.css +5 -0
- package/dist/css/revolugo.storybooktoolbar.CVnww0dZ.css +1 -0
- package/dist/css/revolugo.termsandconditions.DV2YnGzG.css +1 -0
- package/dist/css/revolugo.valert.BzcMswjJ.css +1 -0
- package/dist/css/revolugo.vautocomplete.OMX_yAge.css +1 -0
- package/dist/css/revolugo.vbadge.CiK_DSkI.css +1 -0
- package/dist/css/revolugo.vbtn.By46MJOU.css +1 -0
- package/dist/css/revolugo.vcard.DmB53ZNL.css +1 -0
- package/dist/css/revolugo.vchip.BdAdP6lC.css +1 -0
- package/dist/css/revolugo.vdialog.C02Cvwul.css +1 -0
- package/dist/css/revolugo.vexpansionpanelheader.B2eKo8Lo.css +1 -0
- package/dist/css/revolugo.vinput.SfhpXNi0.css +1 -0
- package/dist/css/revolugo.vitemgroup.EbHsz8Rr.css +1 -0
- package/dist/css/revolugo.vlistitem.BzwNE1YK.css +1 -0
- package/dist/css/revolugo.vmenu.BKE0IO4q.css +1 -0
- package/dist/css/revolugo.vselect.DljSkk6y.css +1 -0
- package/dist/css/revolugo.vsheet.Dtdo2Rps.css +1 -0
- package/dist/css/revolugo.vskeletonloader.BpGoaAbZ.css +1 -0
- package/dist/css/revolugo.vslidegroup.D5TIbmaw.css +1 -0
- package/dist/css/revolugo.vsnackbar.DTAXPYkr.css +1 -0
- package/dist/css/revolugo.vtextfield.BliJY6uv.css +1 -0
- package/dist/css/revolugo.vtoolbar.DQsezjcM.css +1 -0
- package/dist/css/revolugo.vtooltip.B_oOB9pj.css +1 -0
- package/dist/css/revolugo.vuetify.BpIoHlAi.css +1 -0
- package/dist/css/revolugo.webcomponentwrapper.BRZRuwZ0.css +1 -0
- package/dist/index.min.js +1 -1
- package/dist/revolugo.banktransferdetails.CDDLgiqZ.min.js +105 -0
- package/dist/revolugo.bbreakfastoptionbadge.BXp8jiFF.min.js +62 -0
- package/dist/revolugo.bdaterangepicker.D7vKynZO.min.js +1351 -0
- package/dist/revolugo.bformattedamount.DZ4lP0D2.min.js +82 -0
- package/dist/revolugo.bhotelroomsdetails._OEOxEfQ.min.js +213 -0
- package/dist/revolugo.bhotelsearchbar.D29hl2MS.min.js +446 -0
- package/dist/revolugo.booking-api-client.Drh0cRTW.min.js +7443 -0
- package/dist/revolugo.bookingdetailssidebar.Cf_orLaJ.min.js +28 -0
- package/dist/revolugo.bookingdetailssidebar.lDNB7oXF.min.js +242 -0
- package/dist/revolugo.bookingmanager.BptiDiuZ.min.js +405 -0
- package/dist/revolugo.bphoneinput.DEA12thE.min.js +1935 -0
- package/dist/revolugo.bpricesummaryskeleton.A4azxZPx.min.js +47 -0
- package/dist/revolugo.breakpoint-service.ulonvHwK.min.js +65 -0
- package/dist/revolugo.bstarrating.qzeMb2Ot.min.js +173 -0
- package/dist/revolugo.btag.fqocL5RV.min.js +68 -0
- package/dist/revolugo.cancellationpoliciesbadge.BzjXjeXq.min.js +28 -0
- package/dist/revolugo.cancellationpoliciesbadge.nq63QKAU.min.js +92 -0
- package/dist/revolugo.cancellationpolicieslist.BfiF9DHI.min.js +28 -0
- package/dist/revolugo.cancellationpolicieslist.DvAdsbLe.min.js +317 -0
- package/dist/revolugo.common.BavAKcPL.min.js +34 -0
- package/dist/revolugo.creditcardform.P3Lo1eeg.min.js +2049 -0
- package/dist/revolugo.creditcardform.i3DpOTAl.min.js +28 -0
- package/dist/revolugo.creditcardpayment.80nyDUq9.min.js +288 -0
- package/dist/revolugo.creditcardpayment.CieGjOTr.min.js +28 -0
- package/dist/revolugo.currencypicker.qFd6-iwV.min.js +122 -0
- package/dist/revolugo.currencypickerbtn.DXqfDYzb.min.js +121 -0
- package/dist/revolugo.currencypickerbtn.SL9IbI6O.min.js +28 -0
- package/dist/revolugo.dialog-attach.BQO5FkC9.min.js +27 -0
- package/dist/revolugo.en-us.BwPQZpD-.min.js +1171 -0
- package/dist/revolugo.event-bus.CYLYgD3Y.min.js +37 -0
- package/dist/revolugo.fr-fr.CV4yETNm.min.js +1177 -0
- package/dist/revolugo.fullbookingflow.BH9WYZQU.min.js +239 -0
- package/dist/revolugo.hotel-offer.DkBY7KF0.min.js +605 -0
- package/dist/revolugo.hoteldescriptionview.COEl20Dq.min.js +2174 -0
- package/dist/revolugo.hoteldescriptionview.XJOl3Oeh.min.js +28 -0
- package/dist/revolugo.hotelofferitemlayout.DxWzoHRv.min.js +64 -0
- package/dist/revolugo.hotelofferlist.C1B_9NAn.min.js +3779 -0
- package/dist/revolugo.hotelofferlist.I8kF8p6L.min.js +28 -0
- package/dist/revolugo.hotelofferrequestcreator.B9mGU5bB.min.js +225 -0
- package/dist/revolugo.hoteloffersearchmenu.DExCTnYT.min.js +54 -0
- package/dist/revolugo.hoteloffersmap.Cd0-GO8Q.min.js +8737 -0
- package/dist/revolugo.hoteloffersmap.FqqtiR5R.min.js +28 -0
- package/dist/revolugo.hoteloffersview.C9lYrm2i.min.js +157 -0
- package/dist/revolugo.hoteloffersview.CLcQG9wK.min.js +28 -0
- package/dist/revolugo.hotelroomofferlist.B436VThb.min.js +1332 -0
- package/dist/revolugo.hotelroomofferlist.uS6bGKaQ.min.js +28 -0
- package/dist/revolugo.hotelroomofferrequestcreator.Cqzw_aE0.min.js +225 -0
- package/dist/revolugo.hotelroomoffersbookingflow.CMJgMAtO.min.js +679 -0
- package/dist/revolugo.hotelroomoffersearchmenu.Dws8MLf0.min.js +38 -0
- package/dist/revolugo.hotelroomoffersearchmenu.UHKtopiD.min.js +29 -0
- package/dist/revolugo.hotelroomoffersview.-1JOr1jD.min.js +28 -0
- package/dist/revolugo.hotelroomoffersview.217ygoUj.min.js +124 -0
- package/dist/revolugo.i18n.BIDah4Hr.min.js +10901 -0
- package/dist/revolugo.index.B8RjdKfF.min.js +281 -0
- package/dist/revolugo.index.BOFNqiKi.min.js +128 -0
- package/dist/revolugo.index.BafzMKRk.min.js +13 -0
- package/dist/revolugo.index.ByALJ4Cg.min.js +270 -0
- package/dist/revolugo.index.CMpCToBI.min.js +390 -0
- package/dist/revolugo.index.CVaQfmC0.min.js +15 -0
- package/dist/revolugo.index.Ce2wa-yh.min.js +142 -0
- package/dist/revolugo.index.CfwKNM8Q.min.js +9 -0
- package/dist/revolugo.index.D7ohfZ-O.min.js +68 -0
- package/dist/revolugo.index.DKK0H_cv.min.js +161 -0
- package/dist/revolugo.index.DSbeMte7.min.js +322 -0
- package/dist/revolugo.index.Dudg2j1-.min.js +9 -0
- package/dist/revolugo.index.G0QSOBn3.min.js +42 -0
- package/dist/revolugo.index.mq4mKuqN.min.js +43 -0
- package/dist/revolugo.langpicker.DtWztNg3.min.js +103 -0
- package/dist/revolugo.langpickerbtn.CPZtzdTJ.min.js +111 -0
- package/dist/revolugo.langpickerbtn.D3ff3yft.min.js +28 -0
- package/dist/revolugo.localizedformat.C4ez1VLt.min.js +47 -0
- package/dist/revolugo.min.js +257 -7
- package/dist/revolugo.parsed-height.Bd1t0mHH.min.js +2338 -0
- package/dist/revolugo.parsed-props.B6q7Ax-9.min.js +95 -0
- package/dist/revolugo.prebookform.Bvkp_jkU.min.js +28 -0
- package/dist/revolugo.prebookform.QT7QI1LP.min.js +484 -0
- package/dist/revolugo.revolugo-config.B9n_CElG.min.js +1707 -0
- package/dist/revolugo.roominglisteditor.BCpebY3B.min.js +201 -0
- package/dist/revolugo.roominglisteditor.C4AtDc7A.min.js +28 -0
- package/dist/revolugo.sentry.CuQ4Sj_P.min.js +10989 -0
- package/dist/revolugo.store.TBV-eqIE.min.js +2497 -0
- package/dist/revolugo.storybooktoolbar.K8FrycZc.min.js +300 -0
- package/dist/revolugo.termsandconditions.DCoLgJzC.min.js +27 -0
- package/dist/revolugo.termsandconditions.DkzQmMDI.min.js +162 -0
- package/dist/revolugo.typed-mixins.CArk-fZ7.min.js +8 -0
- package/dist/revolugo.valert.tamLbGMZ.min.js +194 -0
- package/dist/revolugo.vautocomplete.BbvrGxVz.min.js +255 -0
- package/dist/revolugo.vbadge.B3P90j3E.min.js +172 -0
- package/dist/revolugo.vbtn.BNPhP-XR.min.js +286 -0
- package/dist/revolugo.vcard.ndQpNewl.min.js +80 -0
- package/dist/revolugo.vchip.DTZZJRt5.min.js +157 -0
- package/dist/revolugo.vdialog.C-Jh0Eq7.min.js +341 -0
- package/dist/revolugo.vexpansionpanelheader.DJijrIj9.min.js +263 -0
- package/dist/revolugo.vform.D7XJ7bEy.min.js +98 -0
- package/dist/revolugo.vinput.BeSsXYg9.min.js +509 -0
- package/dist/revolugo.vitemgroup.DjZ_N7Ml.min.js +168 -0
- package/dist/revolugo.vlistitem.ChmT4RKD.min.js +204 -0
- package/dist/revolugo.vmenu.CThLxAWt.min.js +349 -0
- package/dist/revolugo.vselect.BXEzrczG.min.js +859 -0
- package/dist/revolugo.vsheet.BWJwctvS.min.js +120 -0
- package/dist/revolugo.vskeletonloader.CCW1cQtD.min.js +172 -0
- package/dist/revolugo.vslidegroup.Dlwmh4Oi.min.js +650 -0
- package/dist/revolugo.vsnackbar.BGJVdHRT.min.js +178 -0
- package/dist/revolugo.vtextfield.D-kB2BBk.min.js +438 -0
- package/dist/revolugo.vtoolbar.C98lEGDc.min.js +364 -0
- package/dist/revolugo.vtooltip.M9ln6byG.min.js +168 -0
- package/dist/revolugo.vuetify.BEdap6Ni.min.js +865 -0
- package/dist/revolugo.watch-list.Bb06Iz6D.min.js +44 -0
- package/dist/revolugo.webcomponentwrapper.Dhr34jp1.min.js +783 -0
- package/package.json +3 -5
- package/dist/css/revolugo.0.min.css +0 -5
- package/dist/css/revolugo.1.min.css +0 -1
- package/dist/css/revolugo.11.min.css +0 -1
- package/dist/css/revolugo.12.min.css +0 -1
- package/dist/css/revolugo.13.min.css +0 -1
- package/dist/css/revolugo.14.min.css +0 -1
- package/dist/css/revolugo.15.min.css +0 -1
- package/dist/css/revolugo.16.min.css +0 -1
- package/dist/css/revolugo.17.min.css +0 -1
- package/dist/css/revolugo.18.min.css +0 -1
- package/dist/css/revolugo.19.min.css +0 -1
- package/dist/css/revolugo.2.min.css +0 -1
- package/dist/css/revolugo.20.min.css +0 -1
- package/dist/css/revolugo.21.min.css +0 -1
- package/dist/css/revolugo.22.min.css +0 -1
- package/dist/css/revolugo.23.min.css +0 -1
- package/dist/css/revolugo.24.min.css +0 -1
- package/dist/css/revolugo.25.min.css +0 -1
- package/dist/css/revolugo.26.min.css +0 -1
- package/dist/css/revolugo.27.min.css +0 -1
- package/dist/css/revolugo.28.min.css +0 -1
- package/dist/css/revolugo.29.min.css +0 -1
- package/dist/css/revolugo.30.min.css +0 -1
- package/dist/css/revolugo.31.min.css +0 -1
- package/dist/css/revolugo.32.min.css +0 -1
- package/dist/css/revolugo.33.min.css +0 -1
- package/dist/css/revolugo.34.min.css +0 -1
- package/dist/css/revolugo.4.min.css +0 -1
- package/dist/css/revolugo.5.min.css +0 -1
- package/dist/css/revolugo.6.min.css +0 -1
- package/dist/css/revolugo.7.min.css +0 -1
- package/dist/css/revolugo.fonts.min.css +0 -1
- package/dist/fonts/amenities.2aad1d12.woff +0 -0
- package/dist/fonts/amenities.9adae269.ttf +0 -0
- package/dist/fonts/amenities.a9bf50f8.svg +0 -42
- package/dist/fonts/amenities.bd6b3a4a.eot +0 -0
- package/dist/fonts/beds.2b8e38c8.svg +0 -12
- package/dist/img/apst.c1092975.png +0 -0
- package/dist/img/apst.ec7669f2.png +0 -0
- package/dist/img/atout-france.72107e30.png +0 -0
- package/dist/img/atout-france.df038f22.png +0 -0
- package/dist/img/revolugo.179c459d.png +0 -0
- package/dist/img/revolugo.e0879dcc.png +0 -0
- package/dist/img/stripe.405543e2.png +0 -0
- package/dist/img/stripe.c3e16f9f.png +0 -0
- package/dist/revolugo.0.min.js +0 -18
- package/dist/revolugo.1.min.js +0 -1
- package/dist/revolugo.11.min.js +0 -134
- package/dist/revolugo.12.min.js +0 -19
- package/dist/revolugo.13.min.js +0 -14
- package/dist/revolugo.14.min.js +0 -19
- package/dist/revolugo.15.min.js +0 -139
- package/dist/revolugo.16.min.js +0 -14
- package/dist/revolugo.17.min.js +0 -14
- package/dist/revolugo.18.min.js +0 -1
- package/dist/revolugo.19.min.js +0 -1
- package/dist/revolugo.2.min.js +0 -1
- package/dist/revolugo.20.min.js +0 -1
- package/dist/revolugo.21.min.js +0 -116
- package/dist/revolugo.22.min.js +0 -1
- package/dist/revolugo.23.min.js +0 -1
- package/dist/revolugo.24.min.js +0 -1
- package/dist/revolugo.25.min.js +0 -1
- package/dist/revolugo.26.min.js +0 -1
- package/dist/revolugo.27.min.js +0 -1
- package/dist/revolugo.28.min.js +0 -116
- package/dist/revolugo.29.min.js +0 -1
- package/dist/revolugo.30.min.js +0 -1
- package/dist/revolugo.31.min.js +0 -1
- package/dist/revolugo.32.min.js +0 -1
- package/dist/revolugo.33.min.js +0 -1
- package/dist/revolugo.34.min.js +0 -1
- package/dist/revolugo.35.min.js +0 -1
- package/dist/revolugo.36.min.js +0 -1
- package/dist/revolugo.4.min.js +0 -1
- package/dist/revolugo.5.min.js +0 -1
- package/dist/revolugo.6.min.js +0 -1
- package/dist/revolugo.7.min.js +0 -1
- package/dist/revolugo.en-US.min.js +0 -1
- package/dist/revolugo.fonts.min.js +0 -1
- package/dist/revolugo.fr-FR.min.js +0 -1
@@ -0,0 +1,2049 @@
|
|
1
|
+
import { E as Ce } from "./revolugo.revolugo-config.B9n_CElG.min.js";
|
2
|
+
import { E as xe, V as Pe } from "./revolugo.i18n.BIDah4Hr.min.js";
|
3
|
+
import { B as Te } from "./revolugo.bformattedamount.DZ4lP0D2.min.js";
|
4
|
+
import { l as Re, n as Me, _ as D, a as k } from "./revolugo.webcomponentwrapper.Dhr34jp1.min.js";
|
5
|
+
import { _ as ke } from "./revolugo.valert.tamLbGMZ.min.js";
|
6
|
+
import { S as Oe } from "./revolugo.index.DKK0H_cv.min.js";
|
7
|
+
import { _ as Q } from "./revolugo.index.CMpCToBI.min.js";
|
8
|
+
import { V as Ne } from "./revolugo.vinput.BeSsXYg9.min.js";
|
9
|
+
import { _ as Pt } from "./revolugo.vcard.ndQpNewl.min.js";
|
10
|
+
import { _ as Ie } from "./revolugo.vtoolbar.C98lEGDc.min.js";
|
11
|
+
import { a as He, _ as Ue } from "./revolugo.vbtn.BNPhP-XR.min.js";
|
12
|
+
import { V as qe } from "./revolugo.index.Dudg2j1-.min.js";
|
13
|
+
import { _ as Le } from "./revolugo.vskeletonloader.CCW1cQtD.min.js";
|
14
|
+
function Ee(s) {
|
15
|
+
try {
|
16
|
+
if (typeof document < "u") {
|
17
|
+
window.REVOLUGO_ELEMENTS_STYLES = window.REVOLUGO_ELEMENTS_STYLES || {
|
18
|
+
sheets: [],
|
19
|
+
components: []
|
20
|
+
};
|
21
|
+
const t = import.meta.url, e = t.slice(0, t.lastIndexOf("/") + 1) + s;
|
22
|
+
window.REVOLUGO_ELEMENTS_STYLES.sheets.push(e);
|
23
|
+
for (const i of REVOLUGO_ELEMENTS_STYLES.components)
|
24
|
+
i(e);
|
25
|
+
if (s.indexOf("fonts") >= 0) {
|
26
|
+
const i = document.createElement("link");
|
27
|
+
i.rel = "stylesheet", linK.href = e, document.head.appendChild(i);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
} catch (t) {
|
31
|
+
console.error("[revolugo-elements] ", t);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
const Be = Oe.extend({
|
35
|
+
name: "v-checkbox",
|
36
|
+
props: {
|
37
|
+
indeterminate: Boolean,
|
38
|
+
indeterminateIcon: {
|
39
|
+
type: String,
|
40
|
+
default: "$checkboxIndeterminate"
|
41
|
+
},
|
42
|
+
offIcon: {
|
43
|
+
type: String,
|
44
|
+
default: "$checkboxOff"
|
45
|
+
},
|
46
|
+
onIcon: {
|
47
|
+
type: String,
|
48
|
+
default: "$checkboxOn"
|
49
|
+
}
|
50
|
+
},
|
51
|
+
data() {
|
52
|
+
return {
|
53
|
+
inputIndeterminate: this.indeterminate
|
54
|
+
};
|
55
|
+
},
|
56
|
+
computed: {
|
57
|
+
classes() {
|
58
|
+
return {
|
59
|
+
...Ne.options.computed.classes.call(this),
|
60
|
+
"v-input--selection-controls": !0,
|
61
|
+
"v-input--checkbox": !0,
|
62
|
+
"v-input--indeterminate": this.inputIndeterminate
|
63
|
+
};
|
64
|
+
},
|
65
|
+
computedIcon() {
|
66
|
+
return this.inputIndeterminate ? this.indeterminateIcon : this.isActive ? this.onIcon : this.offIcon;
|
67
|
+
},
|
68
|
+
// Do not return undefined if disabled,
|
69
|
+
// according to spec, should still show
|
70
|
+
// a color when disabled and active
|
71
|
+
validationState() {
|
72
|
+
if (!(this.isDisabled && !this.inputIndeterminate)) {
|
73
|
+
if (this.hasError && this.shouldValidate)
|
74
|
+
return "error";
|
75
|
+
if (this.hasSuccess)
|
76
|
+
return "success";
|
77
|
+
if (this.hasColor !== null)
|
78
|
+
return this.computedColor;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
},
|
82
|
+
watch: {
|
83
|
+
indeterminate(s) {
|
84
|
+
this.$nextTick(() => this.inputIndeterminate = s);
|
85
|
+
},
|
86
|
+
inputIndeterminate(s) {
|
87
|
+
this.$emit("update:indeterminate", s);
|
88
|
+
},
|
89
|
+
isActive() {
|
90
|
+
this.indeterminate && (this.inputIndeterminate = !1);
|
91
|
+
}
|
92
|
+
},
|
93
|
+
methods: {
|
94
|
+
genCheckbox() {
|
95
|
+
const {
|
96
|
+
title: s,
|
97
|
+
...t
|
98
|
+
} = this.attrs$;
|
99
|
+
return this.$createElement("div", {
|
100
|
+
staticClass: "v-input--selection-controls__input"
|
101
|
+
}, [this.$createElement(Q, this.setTextColor(this.validationState, {
|
102
|
+
props: {
|
103
|
+
dense: this.dense,
|
104
|
+
dark: this.dark,
|
105
|
+
light: this.light
|
106
|
+
}
|
107
|
+
}), this.computedIcon), this.genInput("checkbox", {
|
108
|
+
...t,
|
109
|
+
"aria-checked": this.inputIndeterminate ? "mixed" : this.isActive.toString()
|
110
|
+
}), this.genRipple(this.setTextColor(this.rippleState))]);
|
111
|
+
},
|
112
|
+
genDefaultSlot() {
|
113
|
+
return [this.genCheckbox(), this.genLabel()];
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}), De = {
|
117
|
+
amount: { type: Number },
|
118
|
+
currency: { type: String },
|
119
|
+
disabled: {
|
120
|
+
type: Boolean,
|
121
|
+
default: !1
|
122
|
+
},
|
123
|
+
loading: {
|
124
|
+
type: Boolean,
|
125
|
+
default: !1
|
126
|
+
},
|
127
|
+
token: { type: String },
|
128
|
+
withAction: {
|
129
|
+
type: Boolean,
|
130
|
+
default: !1
|
131
|
+
},
|
132
|
+
withTerms: {
|
133
|
+
type: Boolean,
|
134
|
+
default: !1
|
135
|
+
}
|
136
|
+
};
|
137
|
+
/**
|
138
|
+
* @license
|
139
|
+
* Copyright 2017 Google LLC
|
140
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
141
|
+
*/
|
142
|
+
const se = (s) => (t) => typeof t == "function" ? ((e, i) => (customElements.define(e, i), i))(s, t) : ((e, i) => {
|
143
|
+
const { kind: n, elements: r } = i;
|
144
|
+
return { kind: n, elements: r, finisher(o) {
|
145
|
+
customElements.define(e, o);
|
146
|
+
} };
|
147
|
+
})(s, t);
|
148
|
+
/**
|
149
|
+
* @license
|
150
|
+
* Copyright 2017 Google LLC
|
151
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
152
|
+
*/
|
153
|
+
const je = (s, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
|
154
|
+
e.createProperty(t.key, s);
|
155
|
+
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
156
|
+
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
157
|
+
}, finisher(e) {
|
158
|
+
e.createProperty(t.key, s);
|
159
|
+
} }, Ve = (s, t, e) => {
|
160
|
+
t.constructor.createProperty(e, s);
|
161
|
+
};
|
162
|
+
function u(s) {
|
163
|
+
return (t, e) => e !== void 0 ? Ve(s, t, e) : je(s, t);
|
164
|
+
}
|
165
|
+
/**
|
166
|
+
* @license
|
167
|
+
* Copyright 2021 Google LLC
|
168
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
169
|
+
*/
|
170
|
+
var pt;
|
171
|
+
((pt = window.HTMLSlotElement) === null || pt === void 0 ? void 0 : pt.prototype.assignedElements) != null;
|
172
|
+
var Tt = !0;
|
173
|
+
function S(s, t, e) {
|
174
|
+
if (typeof (e == null ? void 0 : e.value) != "function")
|
175
|
+
throw new TypeError(`Only methods can be decorated with @bound. <${t ?? s.name}> is not a method!`);
|
176
|
+
return {
|
177
|
+
configurable: Tt,
|
178
|
+
get() {
|
179
|
+
const i = e.value.bind(this);
|
180
|
+
return Object.defineProperty(this, t, { value: i, configurable: Tt, writable: !0 }), i;
|
181
|
+
}
|
182
|
+
};
|
183
|
+
}
|
184
|
+
/**
|
185
|
+
* @license
|
186
|
+
* Copyright 2019 Google LLC
|
187
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
188
|
+
*/
|
189
|
+
const tt = window, St = tt.ShadowRoot && (tt.ShadyCSS === void 0 || tt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, wt = Symbol(), Rt = /* @__PURE__ */ new WeakMap();
|
190
|
+
let ie = class {
|
191
|
+
constructor(t, e, i) {
|
192
|
+
if (this._$cssResult$ = !0, i !== wt)
|
193
|
+
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
194
|
+
this.cssText = t, this.t = e;
|
195
|
+
}
|
196
|
+
get styleSheet() {
|
197
|
+
let t = this.o;
|
198
|
+
const e = this.t;
|
199
|
+
if (St && t === void 0) {
|
200
|
+
const i = e !== void 0 && e.length === 1;
|
201
|
+
i && (t = Rt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Rt.set(e, t));
|
202
|
+
}
|
203
|
+
return t;
|
204
|
+
}
|
205
|
+
toString() {
|
206
|
+
return this.cssText;
|
207
|
+
}
|
208
|
+
};
|
209
|
+
const ze = (s) => new ie(typeof s == "string" ? s : s + "", void 0, wt), Et = (s, ...t) => {
|
210
|
+
const e = s.length === 1 ? s[0] : t.reduce((i, n, r) => i + ((o) => {
|
211
|
+
if (o._$cssResult$ === !0)
|
212
|
+
return o.cssText;
|
213
|
+
if (typeof o == "number")
|
214
|
+
return o;
|
215
|
+
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.");
|
216
|
+
})(n) + s[r + 1], s[0]);
|
217
|
+
return new ie(e, s, wt);
|
218
|
+
}, Fe = (s, t) => {
|
219
|
+
St ? s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
|
220
|
+
const i = document.createElement("style"), n = tt.litNonce;
|
221
|
+
n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, s.appendChild(i);
|
222
|
+
});
|
223
|
+
}, Mt = St ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
224
|
+
let e = "";
|
225
|
+
for (const i of t.cssRules)
|
226
|
+
e += i.cssText;
|
227
|
+
return ze(e);
|
228
|
+
})(s) : s;
|
229
|
+
/**
|
230
|
+
* @license
|
231
|
+
* Copyright 2017 Google LLC
|
232
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
233
|
+
*/
|
234
|
+
var ut;
|
235
|
+
const rt = window, kt = rt.trustedTypes, We = kt ? kt.emptyScript : "", Ot = rt.reactiveElementPolyfillSupport, _t = { toAttribute(s, t) {
|
236
|
+
switch (t) {
|
237
|
+
case Boolean:
|
238
|
+
s = s ? We : null;
|
239
|
+
break;
|
240
|
+
case Object:
|
241
|
+
case Array:
|
242
|
+
s = s == null ? s : JSON.stringify(s);
|
243
|
+
}
|
244
|
+
return s;
|
245
|
+
}, fromAttribute(s, t) {
|
246
|
+
let e = s;
|
247
|
+
switch (t) {
|
248
|
+
case Boolean:
|
249
|
+
e = s !== null;
|
250
|
+
break;
|
251
|
+
case Number:
|
252
|
+
e = s === null ? null : Number(s);
|
253
|
+
break;
|
254
|
+
case Object:
|
255
|
+
case Array:
|
256
|
+
try {
|
257
|
+
e = JSON.parse(s);
|
258
|
+
} catch {
|
259
|
+
e = null;
|
260
|
+
}
|
261
|
+
}
|
262
|
+
return e;
|
263
|
+
} }, ne = (s, t) => t !== s && (t == t || s == s), dt = { attribute: !0, type: String, converter: _t, reflect: !1, hasChanged: ne }, gt = "finalized";
|
264
|
+
let O = class extends HTMLElement {
|
265
|
+
constructor() {
|
266
|
+
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
267
|
+
}
|
268
|
+
static addInitializer(t) {
|
269
|
+
var e;
|
270
|
+
this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
|
271
|
+
}
|
272
|
+
static get observedAttributes() {
|
273
|
+
this.finalize();
|
274
|
+
const t = [];
|
275
|
+
return this.elementProperties.forEach((e, i) => {
|
276
|
+
const n = this._$Ep(i, e);
|
277
|
+
n !== void 0 && (this._$Ev.set(n, i), t.push(n));
|
278
|
+
}), t;
|
279
|
+
}
|
280
|
+
static createProperty(t, e = dt) {
|
281
|
+
if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
282
|
+
const i = typeof t == "symbol" ? Symbol() : "__" + t, n = this.getPropertyDescriptor(t, i, e);
|
283
|
+
n !== void 0 && Object.defineProperty(this.prototype, t, n);
|
284
|
+
}
|
285
|
+
}
|
286
|
+
static getPropertyDescriptor(t, e, i) {
|
287
|
+
return { get() {
|
288
|
+
return this[e];
|
289
|
+
}, set(n) {
|
290
|
+
const r = this[t];
|
291
|
+
this[e] = n, this.requestUpdate(t, r, i);
|
292
|
+
}, configurable: !0, enumerable: !0 };
|
293
|
+
}
|
294
|
+
static getPropertyOptions(t) {
|
295
|
+
return this.elementProperties.get(t) || dt;
|
296
|
+
}
|
297
|
+
static finalize() {
|
298
|
+
if (this.hasOwnProperty(gt))
|
299
|
+
return !1;
|
300
|
+
this[gt] = !0;
|
301
|
+
const t = Object.getPrototypeOf(this);
|
302
|
+
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")) {
|
303
|
+
const e = this.properties, i = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
|
304
|
+
for (const n of i)
|
305
|
+
this.createProperty(n, e[n]);
|
306
|
+
}
|
307
|
+
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
308
|
+
}
|
309
|
+
static finalizeStyles(t) {
|
310
|
+
const e = [];
|
311
|
+
if (Array.isArray(t)) {
|
312
|
+
const i = new Set(t.flat(1 / 0).reverse());
|
313
|
+
for (const n of i)
|
314
|
+
e.unshift(Mt(n));
|
315
|
+
} else
|
316
|
+
t !== void 0 && e.push(Mt(t));
|
317
|
+
return e;
|
318
|
+
}
|
319
|
+
static _$Ep(t, e) {
|
320
|
+
const i = e.attribute;
|
321
|
+
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
322
|
+
}
|
323
|
+
_$Eu() {
|
324
|
+
var t;
|
325
|
+
this._$E_ = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((e) => e(this));
|
326
|
+
}
|
327
|
+
addController(t) {
|
328
|
+
var e, i;
|
329
|
+
((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((i = t.hostConnected) === null || i === void 0 || i.call(t));
|
330
|
+
}
|
331
|
+
removeController(t) {
|
332
|
+
var e;
|
333
|
+
(e = this._$ES) === null || e === void 0 || e.splice(this._$ES.indexOf(t) >>> 0, 1);
|
334
|
+
}
|
335
|
+
_$Eg() {
|
336
|
+
this.constructor.elementProperties.forEach((t, e) => {
|
337
|
+
this.hasOwnProperty(e) && (this._$Ei.set(e, this[e]), delete this[e]);
|
338
|
+
});
|
339
|
+
}
|
340
|
+
createRenderRoot() {
|
341
|
+
var t;
|
342
|
+
const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
343
|
+
return Fe(e, this.constructor.elementStyles), e;
|
344
|
+
}
|
345
|
+
connectedCallback() {
|
346
|
+
var t;
|
347
|
+
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
|
348
|
+
var i;
|
349
|
+
return (i = e.hostConnected) === null || i === void 0 ? void 0 : i.call(e);
|
350
|
+
});
|
351
|
+
}
|
352
|
+
enableUpdating(t) {
|
353
|
+
}
|
354
|
+
disconnectedCallback() {
|
355
|
+
var t;
|
356
|
+
(t = this._$ES) === null || t === void 0 || t.forEach((e) => {
|
357
|
+
var i;
|
358
|
+
return (i = e.hostDisconnected) === null || i === void 0 ? void 0 : i.call(e);
|
359
|
+
});
|
360
|
+
}
|
361
|
+
attributeChangedCallback(t, e, i) {
|
362
|
+
this._$AK(t, i);
|
363
|
+
}
|
364
|
+
_$EO(t, e, i = dt) {
|
365
|
+
var n;
|
366
|
+
const r = this.constructor._$Ep(t, i);
|
367
|
+
if (r !== void 0 && i.reflect === !0) {
|
368
|
+
const o = (((n = i.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? i.converter : _t).toAttribute(e, i.type);
|
369
|
+
this._$El = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$El = null;
|
370
|
+
}
|
371
|
+
}
|
372
|
+
_$AK(t, e) {
|
373
|
+
var i;
|
374
|
+
const n = this.constructor, r = n._$Ev.get(t);
|
375
|
+
if (r !== void 0 && this._$El !== r) {
|
376
|
+
const o = n.getPropertyOptions(r), p = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((i = o.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? o.converter : _t;
|
377
|
+
this._$El = r, this[r] = p.fromAttribute(e, o.type), this._$El = null;
|
378
|
+
}
|
379
|
+
}
|
380
|
+
requestUpdate(t, e, i) {
|
381
|
+
let n = !0;
|
382
|
+
t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || ne)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
|
383
|
+
}
|
384
|
+
async _$Ej() {
|
385
|
+
this.isUpdatePending = !0;
|
386
|
+
try {
|
387
|
+
await this._$E_;
|
388
|
+
} catch (e) {
|
389
|
+
Promise.reject(e);
|
390
|
+
}
|
391
|
+
const t = this.scheduleUpdate();
|
392
|
+
return t != null && await t, !this.isUpdatePending;
|
393
|
+
}
|
394
|
+
scheduleUpdate() {
|
395
|
+
return this.performUpdate();
|
396
|
+
}
|
397
|
+
performUpdate() {
|
398
|
+
var t;
|
399
|
+
if (!this.isUpdatePending)
|
400
|
+
return;
|
401
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((n, r) => this[r] = n), this._$Ei = void 0);
|
402
|
+
let e = !1;
|
403
|
+
const i = this._$AL;
|
404
|
+
try {
|
405
|
+
e = this.shouldUpdate(i), e ? (this.willUpdate(i), (t = this._$ES) === null || t === void 0 || t.forEach((n) => {
|
406
|
+
var r;
|
407
|
+
return (r = n.hostUpdate) === null || r === void 0 ? void 0 : r.call(n);
|
408
|
+
}), this.update(i)) : this._$Ek();
|
409
|
+
} catch (n) {
|
410
|
+
throw e = !1, this._$Ek(), n;
|
411
|
+
}
|
412
|
+
e && this._$AE(i);
|
413
|
+
}
|
414
|
+
willUpdate(t) {
|
415
|
+
}
|
416
|
+
_$AE(t) {
|
417
|
+
var e;
|
418
|
+
(e = this._$ES) === null || e === void 0 || e.forEach((i) => {
|
419
|
+
var n;
|
420
|
+
return (n = i.hostUpdated) === null || n === void 0 ? void 0 : n.call(i);
|
421
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
422
|
+
}
|
423
|
+
_$Ek() {
|
424
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
425
|
+
}
|
426
|
+
get updateComplete() {
|
427
|
+
return this.getUpdateComplete();
|
428
|
+
}
|
429
|
+
getUpdateComplete() {
|
430
|
+
return this._$E_;
|
431
|
+
}
|
432
|
+
shouldUpdate(t) {
|
433
|
+
return !0;
|
434
|
+
}
|
435
|
+
update(t) {
|
436
|
+
this._$EC !== void 0 && (this._$EC.forEach((e, i) => this._$EO(i, this[i], e)), this._$EC = void 0), this._$Ek();
|
437
|
+
}
|
438
|
+
updated(t) {
|
439
|
+
}
|
440
|
+
firstUpdated(t) {
|
441
|
+
}
|
442
|
+
};
|
443
|
+
O[gt] = !0, O.elementProperties = /* @__PURE__ */ new Map(), O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, Ot == null || Ot({ ReactiveElement: O }), ((ut = rt.reactiveElementVersions) !== null && ut !== void 0 ? ut : rt.reactiveElementVersions = []).push("1.6.3");
|
444
|
+
/**
|
445
|
+
* @license
|
446
|
+
* Copyright 2017 Google LLC
|
447
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
448
|
+
*/
|
449
|
+
var mt;
|
450
|
+
const ot = window, I = ot.trustedTypes, Nt = I ? I.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, E = `lit$${(Math.random() + "").slice(9)}$`, re = "?" + E, Ge = `<${re}>`, H = document, at = (s = "") => H.createComment(s), W = (s) => s === null || typeof s != "object" && typeof s != "function", oe = Array.isArray, Ye = (s) => oe(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", j = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, It = /-->/g, Ht = />/g, x = RegExp(`>|[
|
451
|
+
\f\r](?:([^\\s"'>=/]+)([
|
452
|
+
\f\r]*=[
|
453
|
+
\f\r]*(?:[^
|
454
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ut = /'/g, qt = /"/g, ae = /^(?:script|style|textarea|title)$/i, G = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), Lt = /* @__PURE__ */ new WeakMap(), N = H.createTreeWalker(H, 129, null, !1), Ke = (s, t) => {
|
455
|
+
const e = s.length - 1, i = [];
|
456
|
+
let n, r = t === 2 ? "<svg>" : "", o = j;
|
457
|
+
for (let a = 0; a < e; a++) {
|
458
|
+
const l = s[a];
|
459
|
+
let y, c, d = -1, $ = 0;
|
460
|
+
for (; $ < l.length && (o.lastIndex = $, c = o.exec(l), c !== null); )
|
461
|
+
$ = o.lastIndex, o === j ? c[1] === "!--" ? o = It : c[1] !== void 0 ? o = Ht : c[2] !== void 0 ? (ae.test(c[2]) && (n = RegExp("</" + c[2], "g")), o = x) : c[3] !== void 0 && (o = x) : o === x ? c[0] === ">" ? (o = n ?? j, d = -1) : c[1] === void 0 ? d = -2 : (d = o.lastIndex - c[2].length, y = c[1], o = c[3] === void 0 ? x : c[3] === '"' ? qt : Ut) : o === qt || o === Ut ? o = x : o === It || o === Ht ? o = j : (o = x, n = void 0);
|
462
|
+
const M = o === x && s[a + 1].startsWith("/>") ? " " : "";
|
463
|
+
r += o === j ? l + Ge : d >= 0 ? (i.push(y), l.slice(0, d) + "$lit$" + l.slice(d) + E + M) : l + E + (d === -2 ? (i.push(void 0), a) : M);
|
464
|
+
}
|
465
|
+
const p = r + (s[e] || "<?>") + (t === 2 ? "</svg>" : "");
|
466
|
+
if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
|
467
|
+
throw Error("invalid template strings array");
|
468
|
+
return [Nt !== void 0 ? Nt.createHTML(p) : p, i];
|
469
|
+
};
|
470
|
+
let At = class le {
|
471
|
+
constructor({ strings: t, _$litType$: e }, i) {
|
472
|
+
let n;
|
473
|
+
this.parts = [];
|
474
|
+
let r = 0, o = 0;
|
475
|
+
const p = t.length - 1, a = this.parts, [l, y] = Ke(t, e);
|
476
|
+
if (this.el = le.createElement(l, i), N.currentNode = this.el.content, e === 2) {
|
477
|
+
const c = this.el.content, d = c.firstChild;
|
478
|
+
d.remove(), c.append(...d.childNodes);
|
479
|
+
}
|
480
|
+
for (; (n = N.nextNode()) !== null && a.length < p; ) {
|
481
|
+
if (n.nodeType === 1) {
|
482
|
+
if (n.hasAttributes()) {
|
483
|
+
const c = [];
|
484
|
+
for (const d of n.getAttributeNames())
|
485
|
+
if (d.endsWith("$lit$") || d.startsWith(E)) {
|
486
|
+
const $ = y[o++];
|
487
|
+
if (c.push(d), $ !== void 0) {
|
488
|
+
const M = n.getAttribute($.toLowerCase() + "$lit$").split(E), w = /([.?@])?(.*)/.exec($);
|
489
|
+
a.push({ type: 1, index: r, name: w[2], strings: M, ctor: w[1] === "." ? Je : w[1] === "?" ? Qe : w[1] === "@" ? ts : ht });
|
490
|
+
} else
|
491
|
+
a.push({ type: 6, index: r });
|
492
|
+
}
|
493
|
+
for (const d of c)
|
494
|
+
n.removeAttribute(d);
|
495
|
+
}
|
496
|
+
if (ae.test(n.tagName)) {
|
497
|
+
const c = n.textContent.split(E), d = c.length - 1;
|
498
|
+
if (d > 0) {
|
499
|
+
n.textContent = I ? I.emptyScript : "";
|
500
|
+
for (let $ = 0; $ < d; $++)
|
501
|
+
n.append(c[$], at()), N.nextNode(), a.push({ type: 2, index: ++r });
|
502
|
+
n.append(c[d], at());
|
503
|
+
}
|
504
|
+
}
|
505
|
+
} else if (n.nodeType === 8)
|
506
|
+
if (n.data === re)
|
507
|
+
a.push({ type: 2, index: r });
|
508
|
+
else {
|
509
|
+
let c = -1;
|
510
|
+
for (; (c = n.data.indexOf(E, c + 1)) !== -1; )
|
511
|
+
a.push({ type: 7, index: r }), c += E.length - 1;
|
512
|
+
}
|
513
|
+
r++;
|
514
|
+
}
|
515
|
+
}
|
516
|
+
static createElement(t, e) {
|
517
|
+
const i = H.createElement("template");
|
518
|
+
return i.innerHTML = t, i;
|
519
|
+
}
|
520
|
+
};
|
521
|
+
function U(s, t, e = s, i) {
|
522
|
+
var n, r, o, p;
|
523
|
+
if (t === G)
|
524
|
+
return t;
|
525
|
+
let a = i !== void 0 ? (n = e._$Co) === null || n === void 0 ? void 0 : n[i] : e._$Cl;
|
526
|
+
const l = W(t) ? void 0 : t._$litDirective$;
|
527
|
+
return (a == null ? void 0 : a.constructor) !== l && ((r = a == null ? void 0 : a._$AO) === null || r === void 0 || r.call(a, !1), l === void 0 ? a = void 0 : (a = new l(s), a._$AT(s, e, i)), i !== void 0 ? ((o = (p = e)._$Co) !== null && o !== void 0 ? o : p._$Co = [])[i] = a : e._$Cl = a), a !== void 0 && (t = U(s, a._$AS(s, t.values), a, i)), t;
|
528
|
+
}
|
529
|
+
let Ze = class {
|
530
|
+
constructor(t, e) {
|
531
|
+
this.u = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
532
|
+
}
|
533
|
+
get parentNode() {
|
534
|
+
return this._$AM.parentNode;
|
535
|
+
}
|
536
|
+
get _$AU() {
|
537
|
+
return this._$AM._$AU;
|
538
|
+
}
|
539
|
+
v(t) {
|
540
|
+
var e;
|
541
|
+
const { el: { content: i }, parts: n } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : H).importNode(i, !0);
|
542
|
+
N.currentNode = r;
|
543
|
+
let o = N.nextNode(), p = 0, a = 0, l = n[0];
|
544
|
+
for (; l !== void 0; ) {
|
545
|
+
if (p === l.index) {
|
546
|
+
let y;
|
547
|
+
l.type === 2 ? y = new he(o, o.nextSibling, this, t) : l.type === 1 ? y = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (y = new es(o, this, t)), this.u.push(y), l = n[++a];
|
548
|
+
}
|
549
|
+
p !== (l == null ? void 0 : l.index) && (o = N.nextNode(), p++);
|
550
|
+
}
|
551
|
+
return r;
|
552
|
+
}
|
553
|
+
p(t) {
|
554
|
+
let e = 0;
|
555
|
+
for (const i of this.u)
|
556
|
+
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
557
|
+
}
|
558
|
+
}, he = class ce {
|
559
|
+
constructor(t, e, i, n) {
|
560
|
+
var r;
|
561
|
+
this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = n, this._$Cm = (r = n == null ? void 0 : n.isConnected) === null || r === void 0 || r;
|
562
|
+
}
|
563
|
+
get _$AU() {
|
564
|
+
var t, e;
|
565
|
+
return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cm;
|
566
|
+
}
|
567
|
+
get parentNode() {
|
568
|
+
let t = this._$AA.parentNode;
|
569
|
+
const e = this._$AM;
|
570
|
+
return e !== void 0 && t.nodeType === 11 && (t = e.parentNode), t;
|
571
|
+
}
|
572
|
+
get startNode() {
|
573
|
+
return this._$AA;
|
574
|
+
}
|
575
|
+
get endNode() {
|
576
|
+
return this._$AB;
|
577
|
+
}
|
578
|
+
_$AI(t, e = this) {
|
579
|
+
t = U(this, t, e), W(t) ? t === _ || t == null || t === "" ? (this._$AH !== _ && this._$AR(), this._$AH = _) : t !== this._$AH && t !== G && this.g(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ye(t) ? this.k(t) : this.g(t);
|
580
|
+
}
|
581
|
+
O(t, e = this._$AB) {
|
582
|
+
return this._$AA.parentNode.insertBefore(t, e);
|
583
|
+
}
|
584
|
+
T(t) {
|
585
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
586
|
+
}
|
587
|
+
g(t) {
|
588
|
+
this._$AH !== _ && W(this._$AH) ? this._$AA.nextSibling.data = t : this.T(H.createTextNode(t)), this._$AH = t;
|
589
|
+
}
|
590
|
+
$(t) {
|
591
|
+
var e;
|
592
|
+
const { values: i, _$litType$: n } = t, r = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = At.createElement(n.h, this.options)), n);
|
593
|
+
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r)
|
594
|
+
this._$AH.p(i);
|
595
|
+
else {
|
596
|
+
const o = new Ze(r, this), p = o.v(this.options);
|
597
|
+
o.p(i), this.T(p), this._$AH = o;
|
598
|
+
}
|
599
|
+
}
|
600
|
+
_$AC(t) {
|
601
|
+
let e = Lt.get(t.strings);
|
602
|
+
return e === void 0 && Lt.set(t.strings, e = new At(t)), e;
|
603
|
+
}
|
604
|
+
k(t) {
|
605
|
+
oe(this._$AH) || (this._$AH = [], this._$AR());
|
606
|
+
const e = this._$AH;
|
607
|
+
let i, n = 0;
|
608
|
+
for (const r of t)
|
609
|
+
n === e.length ? e.push(i = new ce(this.O(at()), this.O(at()), this, this.options)) : i = e[n], i._$AI(r), n++;
|
610
|
+
n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
|
611
|
+
}
|
612
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
613
|
+
var i;
|
614
|
+
for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
615
|
+
const n = t.nextSibling;
|
616
|
+
t.remove(), t = n;
|
617
|
+
}
|
618
|
+
}
|
619
|
+
setConnected(t) {
|
620
|
+
var e;
|
621
|
+
this._$AM === void 0 && (this._$Cm = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
622
|
+
}
|
623
|
+
}, ht = class {
|
624
|
+
constructor(t, e, i, n, r) {
|
625
|
+
this.type = 1, this._$AH = _, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = _;
|
626
|
+
}
|
627
|
+
get tagName() {
|
628
|
+
return this.element.tagName;
|
629
|
+
}
|
630
|
+
get _$AU() {
|
631
|
+
return this._$AM._$AU;
|
632
|
+
}
|
633
|
+
_$AI(t, e = this, i, n) {
|
634
|
+
const r = this.strings;
|
635
|
+
let o = !1;
|
636
|
+
if (r === void 0)
|
637
|
+
t = U(this, t, e, 0), o = !W(t) || t !== this._$AH && t !== G, o && (this._$AH = t);
|
638
|
+
else {
|
639
|
+
const p = t;
|
640
|
+
let a, l;
|
641
|
+
for (t = r[0], a = 0; a < r.length - 1; a++)
|
642
|
+
l = U(this, p[i + a], e, a), l === G && (l = this._$AH[a]), o || (o = !W(l) || l !== this._$AH[a]), l === _ ? t = _ : t !== _ && (t += (l ?? "") + r[a + 1]), this._$AH[a] = l;
|
643
|
+
}
|
644
|
+
o && !n && this.j(t);
|
645
|
+
}
|
646
|
+
j(t) {
|
647
|
+
t === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
648
|
+
}
|
649
|
+
}, Je = class extends ht {
|
650
|
+
constructor() {
|
651
|
+
super(...arguments), this.type = 3;
|
652
|
+
}
|
653
|
+
j(t) {
|
654
|
+
this.element[this.name] = t === _ ? void 0 : t;
|
655
|
+
}
|
656
|
+
};
|
657
|
+
const Xe = I ? I.emptyScript : "";
|
658
|
+
let Qe = class extends ht {
|
659
|
+
constructor() {
|
660
|
+
super(...arguments), this.type = 4;
|
661
|
+
}
|
662
|
+
j(t) {
|
663
|
+
t && t !== _ ? this.element.setAttribute(this.name, Xe) : this.element.removeAttribute(this.name);
|
664
|
+
}
|
665
|
+
}, ts = class extends ht {
|
666
|
+
constructor(t, e, i, n, r) {
|
667
|
+
super(t, e, i, n, r), this.type = 5;
|
668
|
+
}
|
669
|
+
_$AI(t, e = this) {
|
670
|
+
var i;
|
671
|
+
if ((t = (i = U(this, t, e, 0)) !== null && i !== void 0 ? i : _) === G)
|
672
|
+
return;
|
673
|
+
const n = this._$AH, r = t === _ && n !== _ || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, o = t !== _ && (n === _ || r);
|
674
|
+
r && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
675
|
+
}
|
676
|
+
handleEvent(t) {
|
677
|
+
var e, i;
|
678
|
+
typeof this._$AH == "function" ? this._$AH.call((i = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t);
|
679
|
+
}
|
680
|
+
}, es = class {
|
681
|
+
constructor(t, e, i) {
|
682
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
683
|
+
}
|
684
|
+
get _$AU() {
|
685
|
+
return this._$AM._$AU;
|
686
|
+
}
|
687
|
+
_$AI(t) {
|
688
|
+
U(this, t);
|
689
|
+
}
|
690
|
+
};
|
691
|
+
const Bt = ot.litHtmlPolyfillSupport;
|
692
|
+
Bt == null || Bt(At, he), ((mt = ot.litHtmlVersions) !== null && mt !== void 0 ? mt : ot.litHtmlVersions = []).push("2.6.1");
|
693
|
+
/**
|
694
|
+
* @license
|
695
|
+
* Copyright 2017 Google LLC
|
696
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
697
|
+
*/
|
698
|
+
var yt;
|
699
|
+
const lt = window, q = lt.trustedTypes, Dt = q ? q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, bt = "$lit$", C = `lit$${(Math.random() + "").slice(9)}$`, pe = "?" + C, ss = `<${pe}>`, R = document, Y = () => R.createComment(""), K = (s) => s === null || typeof s != "object" && typeof s != "function", ue = Array.isArray, is = (s) => ue(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", ft = `[
|
700
|
+
\f\r]`, V = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, jt = /-->/g, Vt = />/g, P = RegExp(`>|${ft}(?:([^\\s"'>=/]+)(${ft}*=${ft}*(?:[^
|
701
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), zt = /'/g, Ft = /"/g, de = /^(?:script|style|textarea|title)$/i, ns = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), rs = ns(1), L = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), Wt = /* @__PURE__ */ new WeakMap(), T = R.createTreeWalker(R, 129, null, !1);
|
702
|
+
function me(s, t) {
|
703
|
+
if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
|
704
|
+
throw Error("invalid template strings array");
|
705
|
+
return Dt !== void 0 ? Dt.createHTML(t) : t;
|
706
|
+
}
|
707
|
+
const os = (s, t) => {
|
708
|
+
const e = s.length - 1, i = [];
|
709
|
+
let n, r = t === 2 ? "<svg>" : "", o = V;
|
710
|
+
for (let p = 0; p < e; p++) {
|
711
|
+
const a = s[p];
|
712
|
+
let l, y, c = -1, d = 0;
|
713
|
+
for (; d < a.length && (o.lastIndex = d, y = o.exec(a), y !== null); )
|
714
|
+
d = o.lastIndex, o === V ? y[1] === "!--" ? o = jt : y[1] !== void 0 ? o = Vt : y[2] !== void 0 ? (de.test(y[2]) && (n = RegExp("</" + y[2], "g")), o = P) : y[3] !== void 0 && (o = P) : o === P ? y[0] === ">" ? (o = n ?? V, c = -1) : y[1] === void 0 ? c = -2 : (c = o.lastIndex - y[2].length, l = y[1], o = y[3] === void 0 ? P : y[3] === '"' ? Ft : zt) : o === Ft || o === zt ? o = P : o === jt || o === Vt ? o = V : (o = P, n = void 0);
|
715
|
+
const $ = o === P && s[p + 1].startsWith("/>") ? " " : "";
|
716
|
+
r += o === V ? a + ss : c >= 0 ? (i.push(l), a.slice(0, c) + bt + a.slice(c) + C + $) : a + C + (c === -2 ? (i.push(void 0), p) : $);
|
717
|
+
}
|
718
|
+
return [me(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
719
|
+
};
|
720
|
+
class Z {
|
721
|
+
constructor({ strings: t, _$litType$: e }, i) {
|
722
|
+
let n;
|
723
|
+
this.parts = [];
|
724
|
+
let r = 0, o = 0;
|
725
|
+
const p = t.length - 1, a = this.parts, [l, y] = os(t, e);
|
726
|
+
if (this.el = Z.createElement(l, i), T.currentNode = this.el.content, e === 2) {
|
727
|
+
const c = this.el.content, d = c.firstChild;
|
728
|
+
d.remove(), c.append(...d.childNodes);
|
729
|
+
}
|
730
|
+
for (; (n = T.nextNode()) !== null && a.length < p; ) {
|
731
|
+
if (n.nodeType === 1) {
|
732
|
+
if (n.hasAttributes()) {
|
733
|
+
const c = [];
|
734
|
+
for (const d of n.getAttributeNames())
|
735
|
+
if (d.endsWith(bt) || d.startsWith(C)) {
|
736
|
+
const $ = y[o++];
|
737
|
+
if (c.push(d), $ !== void 0) {
|
738
|
+
const M = n.getAttribute($.toLowerCase() + bt).split(C), w = /([.?@])?(.*)/.exec($);
|
739
|
+
a.push({ type: 1, index: r, name: w[2], strings: M, ctor: w[1] === "." ? ls : w[1] === "?" ? cs : w[1] === "@" ? ps : ct });
|
740
|
+
} else
|
741
|
+
a.push({ type: 6, index: r });
|
742
|
+
}
|
743
|
+
for (const d of c)
|
744
|
+
n.removeAttribute(d);
|
745
|
+
}
|
746
|
+
if (de.test(n.tagName)) {
|
747
|
+
const c = n.textContent.split(C), d = c.length - 1;
|
748
|
+
if (d > 0) {
|
749
|
+
n.textContent = q ? q.emptyScript : "";
|
750
|
+
for (let $ = 0; $ < d; $++)
|
751
|
+
n.append(c[$], Y()), T.nextNode(), a.push({ type: 2, index: ++r });
|
752
|
+
n.append(c[d], Y());
|
753
|
+
}
|
754
|
+
}
|
755
|
+
} else if (n.nodeType === 8)
|
756
|
+
if (n.data === pe)
|
757
|
+
a.push({ type: 2, index: r });
|
758
|
+
else {
|
759
|
+
let c = -1;
|
760
|
+
for (; (c = n.data.indexOf(C, c + 1)) !== -1; )
|
761
|
+
a.push({ type: 7, index: r }), c += C.length - 1;
|
762
|
+
}
|
763
|
+
r++;
|
764
|
+
}
|
765
|
+
}
|
766
|
+
static createElement(t, e) {
|
767
|
+
const i = R.createElement("template");
|
768
|
+
return i.innerHTML = t, i;
|
769
|
+
}
|
770
|
+
}
|
771
|
+
function B(s, t, e = s, i) {
|
772
|
+
var n, r, o, p;
|
773
|
+
if (t === L)
|
774
|
+
return t;
|
775
|
+
let a = i !== void 0 ? (n = e._$Co) === null || n === void 0 ? void 0 : n[i] : e._$Cl;
|
776
|
+
const l = K(t) ? void 0 : t._$litDirective$;
|
777
|
+
return (a == null ? void 0 : a.constructor) !== l && ((r = a == null ? void 0 : a._$AO) === null || r === void 0 || r.call(a, !1), l === void 0 ? a = void 0 : (a = new l(s), a._$AT(s, e, i)), i !== void 0 ? ((o = (p = e)._$Co) !== null && o !== void 0 ? o : p._$Co = [])[i] = a : e._$Cl = a), a !== void 0 && (t = B(s, a._$AS(s, t.values), a, i)), t;
|
778
|
+
}
|
779
|
+
class as {
|
780
|
+
constructor(t, e) {
|
781
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
782
|
+
}
|
783
|
+
get parentNode() {
|
784
|
+
return this._$AM.parentNode;
|
785
|
+
}
|
786
|
+
get _$AU() {
|
787
|
+
return this._$AM._$AU;
|
788
|
+
}
|
789
|
+
u(t) {
|
790
|
+
var e;
|
791
|
+
const { el: { content: i }, parts: n } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : R).importNode(i, !0);
|
792
|
+
T.currentNode = r;
|
793
|
+
let o = T.nextNode(), p = 0, a = 0, l = n[0];
|
794
|
+
for (; l !== void 0; ) {
|
795
|
+
if (p === l.index) {
|
796
|
+
let y;
|
797
|
+
l.type === 2 ? y = new J(o, o.nextSibling, this, t) : l.type === 1 ? y = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (y = new us(o, this, t)), this._$AV.push(y), l = n[++a];
|
798
|
+
}
|
799
|
+
p !== (l == null ? void 0 : l.index) && (o = T.nextNode(), p++);
|
800
|
+
}
|
801
|
+
return T.currentNode = R, r;
|
802
|
+
}
|
803
|
+
v(t) {
|
804
|
+
let e = 0;
|
805
|
+
for (const i of this._$AV)
|
806
|
+
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
807
|
+
}
|
808
|
+
}
|
809
|
+
class J {
|
810
|
+
constructor(t, e, i, n) {
|
811
|
+
var r;
|
812
|
+
this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = n, this._$Cp = (r = n == null ? void 0 : n.isConnected) === null || r === void 0 || r;
|
813
|
+
}
|
814
|
+
get _$AU() {
|
815
|
+
var t, e;
|
816
|
+
return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cp;
|
817
|
+
}
|
818
|
+
get parentNode() {
|
819
|
+
let t = this._$AA.parentNode;
|
820
|
+
const e = this._$AM;
|
821
|
+
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
822
|
+
}
|
823
|
+
get startNode() {
|
824
|
+
return this._$AA;
|
825
|
+
}
|
826
|
+
get endNode() {
|
827
|
+
return this._$AB;
|
828
|
+
}
|
829
|
+
_$AI(t, e = this) {
|
830
|
+
t = B(this, t, e), K(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== L && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : is(t) ? this.T(t) : this._(t);
|
831
|
+
}
|
832
|
+
k(t) {
|
833
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
834
|
+
}
|
835
|
+
$(t) {
|
836
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
837
|
+
}
|
838
|
+
_(t) {
|
839
|
+
this._$AH !== g && K(this._$AH) ? this._$AA.nextSibling.data = t : this.$(R.createTextNode(t)), this._$AH = t;
|
840
|
+
}
|
841
|
+
g(t) {
|
842
|
+
var e;
|
843
|
+
const { values: i, _$litType$: n } = t, r = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = Z.createElement(me(n.h, n.h[0]), this.options)), n);
|
844
|
+
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r)
|
845
|
+
this._$AH.v(i);
|
846
|
+
else {
|
847
|
+
const o = new as(r, this), p = o.u(this.options);
|
848
|
+
o.v(i), this.$(p), this._$AH = o;
|
849
|
+
}
|
850
|
+
}
|
851
|
+
_$AC(t) {
|
852
|
+
let e = Wt.get(t.strings);
|
853
|
+
return e === void 0 && Wt.set(t.strings, e = new Z(t)), e;
|
854
|
+
}
|
855
|
+
T(t) {
|
856
|
+
ue(this._$AH) || (this._$AH = [], this._$AR());
|
857
|
+
const e = this._$AH;
|
858
|
+
let i, n = 0;
|
859
|
+
for (const r of t)
|
860
|
+
n === e.length ? e.push(i = new J(this.k(Y()), this.k(Y()), this, this.options)) : i = e[n], i._$AI(r), n++;
|
861
|
+
n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
|
862
|
+
}
|
863
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
864
|
+
var i;
|
865
|
+
for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
866
|
+
const n = t.nextSibling;
|
867
|
+
t.remove(), t = n;
|
868
|
+
}
|
869
|
+
}
|
870
|
+
setConnected(t) {
|
871
|
+
var e;
|
872
|
+
this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
873
|
+
}
|
874
|
+
}
|
875
|
+
class ct {
|
876
|
+
constructor(t, e, i, n, r) {
|
877
|
+
this.type = 1, this._$AH = g, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = g;
|
878
|
+
}
|
879
|
+
get tagName() {
|
880
|
+
return this.element.tagName;
|
881
|
+
}
|
882
|
+
get _$AU() {
|
883
|
+
return this._$AM._$AU;
|
884
|
+
}
|
885
|
+
_$AI(t, e = this, i, n) {
|
886
|
+
const r = this.strings;
|
887
|
+
let o = !1;
|
888
|
+
if (r === void 0)
|
889
|
+
t = B(this, t, e, 0), o = !K(t) || t !== this._$AH && t !== L, o && (this._$AH = t);
|
890
|
+
else {
|
891
|
+
const p = t;
|
892
|
+
let a, l;
|
893
|
+
for (t = r[0], a = 0; a < r.length - 1; a++)
|
894
|
+
l = B(this, p[i + a], e, a), l === L && (l = this._$AH[a]), o || (o = !K(l) || l !== this._$AH[a]), l === g ? t = g : t !== g && (t += (l ?? "") + r[a + 1]), this._$AH[a] = l;
|
895
|
+
}
|
896
|
+
o && !n && this.j(t);
|
897
|
+
}
|
898
|
+
j(t) {
|
899
|
+
t === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
900
|
+
}
|
901
|
+
}
|
902
|
+
class ls extends ct {
|
903
|
+
constructor() {
|
904
|
+
super(...arguments), this.type = 3;
|
905
|
+
}
|
906
|
+
j(t) {
|
907
|
+
this.element[this.name] = t === g ? void 0 : t;
|
908
|
+
}
|
909
|
+
}
|
910
|
+
const hs = q ? q.emptyScript : "";
|
911
|
+
class cs extends ct {
|
912
|
+
constructor() {
|
913
|
+
super(...arguments), this.type = 4;
|
914
|
+
}
|
915
|
+
j(t) {
|
916
|
+
t && t !== g ? this.element.setAttribute(this.name, hs) : this.element.removeAttribute(this.name);
|
917
|
+
}
|
918
|
+
}
|
919
|
+
class ps extends ct {
|
920
|
+
constructor(t, e, i, n, r) {
|
921
|
+
super(t, e, i, n, r), this.type = 5;
|
922
|
+
}
|
923
|
+
_$AI(t, e = this) {
|
924
|
+
var i;
|
925
|
+
if ((t = (i = B(this, t, e, 0)) !== null && i !== void 0 ? i : g) === L)
|
926
|
+
return;
|
927
|
+
const n = this._$AH, r = t === g && n !== g || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, o = t !== g && (n === g || r);
|
928
|
+
r && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
929
|
+
}
|
930
|
+
handleEvent(t) {
|
931
|
+
var e, i;
|
932
|
+
typeof this._$AH == "function" ? this._$AH.call((i = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t);
|
933
|
+
}
|
934
|
+
}
|
935
|
+
class us {
|
936
|
+
constructor(t, e, i) {
|
937
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
938
|
+
}
|
939
|
+
get _$AU() {
|
940
|
+
return this._$AM._$AU;
|
941
|
+
}
|
942
|
+
_$AI(t) {
|
943
|
+
B(this, t);
|
944
|
+
}
|
945
|
+
}
|
946
|
+
const Gt = lt.litHtmlPolyfillSupport;
|
947
|
+
Gt == null || Gt(Z, J), ((yt = lt.litHtmlVersions) !== null && yt !== void 0 ? yt : lt.litHtmlVersions = []).push("2.8.0");
|
948
|
+
const ds = (s, t, e) => {
|
949
|
+
var i, n;
|
950
|
+
const r = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : t;
|
951
|
+
let o = r._$litPart$;
|
952
|
+
if (o === void 0) {
|
953
|
+
const p = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : null;
|
954
|
+
r._$litPart$ = o = new J(t.insertBefore(Y(), p), p, void 0, e ?? {});
|
955
|
+
}
|
956
|
+
return o._$AI(s), o;
|
957
|
+
};
|
958
|
+
/**
|
959
|
+
* @license
|
960
|
+
* Copyright 2017 Google LLC
|
961
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
962
|
+
*/
|
963
|
+
var vt, $t;
|
964
|
+
class F extends O {
|
965
|
+
constructor() {
|
966
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
967
|
+
}
|
968
|
+
createRenderRoot() {
|
969
|
+
var t, e;
|
970
|
+
const i = super.createRenderRoot();
|
971
|
+
return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = i.firstChild), i;
|
972
|
+
}
|
973
|
+
update(t) {
|
974
|
+
const e = this.render();
|
975
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ds(e, this.renderRoot, this.renderOptions);
|
976
|
+
}
|
977
|
+
connectedCallback() {
|
978
|
+
var t;
|
979
|
+
super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
|
980
|
+
}
|
981
|
+
disconnectedCallback() {
|
982
|
+
var t;
|
983
|
+
super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
|
984
|
+
}
|
985
|
+
render() {
|
986
|
+
return L;
|
987
|
+
}
|
988
|
+
}
|
989
|
+
F.finalized = !0, F._$litElement$ = !0, (vt = globalThis.litElementHydrateSupport) === null || vt === void 0 || vt.call(globalThis, { LitElement: F });
|
990
|
+
const Yt = globalThis.litElementPolyfillSupport;
|
991
|
+
Yt == null || Yt({ LitElement: F });
|
992
|
+
(($t = globalThis.litElementVersions) !== null && $t !== void 0 ? $t : globalThis.litElementVersions = []).push("3.3.3");
|
993
|
+
/**
|
994
|
+
* @license
|
995
|
+
* Copyright 2018 Google LLC
|
996
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
997
|
+
*/
|
998
|
+
const ms = (s) => s ?? _, ys = /[A-ZÀ-ÖÙ-Ý]+/g, fs = /[a-zà-öù-ý]+/g;
|
999
|
+
function vs(s) {
|
1000
|
+
const t = s.replace(ys, e).match(fs);
|
1001
|
+
return t ? t.join("-") : "";
|
1002
|
+
function e(i) {
|
1003
|
+
return " " + (i.length > 2 ? i.slice(0, -1) + " " + i.slice(-1) : i).toLowerCase();
|
1004
|
+
}
|
1005
|
+
}
|
1006
|
+
function $s() {
|
1007
|
+
const s = {};
|
1008
|
+
return {
|
1009
|
+
has: (t) => Object.hasOwnProperty.call(s, t),
|
1010
|
+
get: (t) => s[t],
|
1011
|
+
set: (t, e) => {
|
1012
|
+
s[t] = e;
|
1013
|
+
}
|
1014
|
+
};
|
1015
|
+
}
|
1016
|
+
function _s(s, t) {
|
1017
|
+
const e = $s();
|
1018
|
+
return (...i) => {
|
1019
|
+
const n = s(...i);
|
1020
|
+
return e.has(n) || e.set(n, t(...i)), e.get(n);
|
1021
|
+
};
|
1022
|
+
}
|
1023
|
+
var gs = (s) => s, ye = _s(gs, vs), As = (s) => (t) => s.includes(t), bs = As(["paymentMethod", "source", "token"]);
|
1024
|
+
async function Ss(s) {
|
1025
|
+
const { ok: t, statusText: e } = s;
|
1026
|
+
if (!t)
|
1027
|
+
throw new Error(e);
|
1028
|
+
return s;
|
1029
|
+
}
|
1030
|
+
function ws(s) {
|
1031
|
+
return "addInitializer" in s.constructor;
|
1032
|
+
}
|
1033
|
+
var z = class {
|
1034
|
+
constructor(s) {
|
1035
|
+
if (this.host = s, this.values = /* @__PURE__ */ new Map(), z.instances.has(s))
|
1036
|
+
return z.instances.get(s);
|
1037
|
+
s.addController(this), z.instances.set(s, this);
|
1038
|
+
}
|
1039
|
+
static for(s) {
|
1040
|
+
return new z(s);
|
1041
|
+
}
|
1042
|
+
hostConnected() {
|
1043
|
+
}
|
1044
|
+
set(s, t) {
|
1045
|
+
const e = this.values.get(s);
|
1046
|
+
this.values.set(s, t), ws(this.host) ? this.host.requestUpdate(s, e) : this.host.requestUpdate();
|
1047
|
+
}
|
1048
|
+
}, Ct = z;
|
1049
|
+
Ct.instances = /* @__PURE__ */ new Map();
|
1050
|
+
function m(s, t) {
|
1051
|
+
const e = s.constructor;
|
1052
|
+
e.addInitializer((i) => {
|
1053
|
+
const n = Ct.for(i);
|
1054
|
+
Object.defineProperty(i.constructor.prototype, t, {
|
1055
|
+
enumerable: !0,
|
1056
|
+
configurable: !0,
|
1057
|
+
get() {
|
1058
|
+
return n.values.get(t);
|
1059
|
+
},
|
1060
|
+
set(r) {
|
1061
|
+
n.values.has(t) || n.values.set(t, r);
|
1062
|
+
}
|
1063
|
+
}), e.createProperty(t, {
|
1064
|
+
...e.getPropertyOptions(t),
|
1065
|
+
noAccessor: !0
|
1066
|
+
});
|
1067
|
+
});
|
1068
|
+
}
|
1069
|
+
m.set = function(s, t) {
|
1070
|
+
const e = Ct.for(s);
|
1071
|
+
for (const [i, n] of Object.entries(t))
|
1072
|
+
e.set(i, n);
|
1073
|
+
};
|
1074
|
+
var Es = class extends Event {
|
1075
|
+
constructor(s, t, e, i) {
|
1076
|
+
super(`${i ?? s.toLowerCase()}-changed`), this.key = s, this.oldValue = t, this.value = e, this.detail = { value: e };
|
1077
|
+
}
|
1078
|
+
}, et = class {
|
1079
|
+
constructor(s) {
|
1080
|
+
if (this.host = s, this.cache = /* @__PURE__ */ new Map(), et.instances.has(s))
|
1081
|
+
return et.instances.get(s);
|
1082
|
+
s.addController(this), et.instances.set(s, this);
|
1083
|
+
}
|
1084
|
+
hostUpdated() {
|
1085
|
+
var s;
|
1086
|
+
for (const [t, e] of this.cache) {
|
1087
|
+
const i = this.host[t], { attribute: n } = (s = this.host.constructor.getPropertyOptions(t)) != null ? s : {}, r = typeof n == "string" ? n : null;
|
1088
|
+
this.cache.set(t, i), this.host.dispatchEvent(new Es(t, e, i, r));
|
1089
|
+
}
|
1090
|
+
}
|
1091
|
+
}, fe = et;
|
1092
|
+
fe.instances = /* @__PURE__ */ new Map();
|
1093
|
+
function b(s, t) {
|
1094
|
+
s.constructor.addInitializer((e) => {
|
1095
|
+
new fe(e).cache.set(t, e[t]);
|
1096
|
+
});
|
1097
|
+
}
|
1098
|
+
function Cs(s) {
|
1099
|
+
return (t, e, i) => {
|
1100
|
+
const n = i.value;
|
1101
|
+
return i.value = s(n), i;
|
1102
|
+
};
|
1103
|
+
}
|
1104
|
+
var xt = Cs(function(s) {
|
1105
|
+
const { name: t } = s;
|
1106
|
+
return async function(...e) {
|
1107
|
+
if (!this.stripe)
|
1108
|
+
throw new Error(`<${this.constructor.is}>: Stripe must be initialized before calling ${t}.`);
|
1109
|
+
return s.call(this, ...e).then(this.handleResponse);
|
1110
|
+
};
|
1111
|
+
});
|
1112
|
+
function Kt(s) {
|
1113
|
+
if (s.error)
|
1114
|
+
throw s.error;
|
1115
|
+
return s;
|
1116
|
+
}
|
1117
|
+
var xs = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, h = (s, t, e, i) => {
|
1118
|
+
for (var n = i > 1 ? void 0 : i ? Ps(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
1119
|
+
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
1120
|
+
return i && n && xs(t, e, n), n;
|
1121
|
+
}, ve = (s, t, e) => {
|
1122
|
+
if (!t.has(s))
|
1123
|
+
throw TypeError("Cannot " + e);
|
1124
|
+
}, Zt = (s, t, e) => (ve(s, t, "read from private field"), e ? e.call(s) : t.get(s)), Jt = (s, t, e) => {
|
1125
|
+
if (t.has(s))
|
1126
|
+
throw TypeError("Cannot add the same private member more than once");
|
1127
|
+
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
1128
|
+
}, Xt = (s, t, e, i) => (ve(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e);
|
1129
|
+
function Qt() {
|
1130
|
+
return (Date.now() + Math.random() * 1e3).toString(36).substr(0, 8);
|
1131
|
+
}
|
1132
|
+
var Ts = class {
|
1133
|
+
constructor(s, t) {
|
1134
|
+
this.host = s, this.options = t, this.initialized = !1, this.shadowHosts = [];
|
1135
|
+
var e, i;
|
1136
|
+
this.host.addController(this), this.resetMountId(), this.slotName = (i = (e = this.options) == null ? void 0 : e.slotName) != null ? i : `breadcrumb-${Qt()}`;
|
1137
|
+
}
|
1138
|
+
get mount() {
|
1139
|
+
return document.getElementById(this.mountId);
|
1140
|
+
}
|
1141
|
+
hostUpdated() {
|
1142
|
+
!this.initialized && this.options.autoInitialize !== !1 && this.init();
|
1143
|
+
}
|
1144
|
+
hostDisconnected() {
|
1145
|
+
this.destroyMountPoints();
|
1146
|
+
}
|
1147
|
+
resetMountId() {
|
1148
|
+
var s;
|
1149
|
+
const t = (s = this.options.mountPrefix) != null ? s : this.host.localName;
|
1150
|
+
this.mountId = `${t}-mount-point-${Qt()}`;
|
1151
|
+
}
|
1152
|
+
createMountPoint() {
|
1153
|
+
const s = document.createElement("div");
|
1154
|
+
return s.id = this.mountId, s.classList.add(`${this.host.tagName.toLowerCase()}-mount`), s;
|
1155
|
+
}
|
1156
|
+
createSlot(s) {
|
1157
|
+
const t = document.createElement("slot");
|
1158
|
+
return t.slot = s, t.name = s, t;
|
1159
|
+
}
|
1160
|
+
appendTemplate(s, t = this.createMountPoint()) {
|
1161
|
+
return s.appendChild(t), t;
|
1162
|
+
}
|
1163
|
+
initMountPoints() {
|
1164
|
+
this.initShadowMountPoints();
|
1165
|
+
}
|
1166
|
+
destroyMountPoints() {
|
1167
|
+
for (const s of this.shadowHosts)
|
1168
|
+
for (const t of s.querySelectorAll(`[slot="${this.slotName}"][name="${this.slotName}"]`))
|
1169
|
+
t.remove();
|
1170
|
+
this.mount && this.mount.remove(), this.resetMountId();
|
1171
|
+
}
|
1172
|
+
initShadowMountPoints() {
|
1173
|
+
let s = this.host;
|
1174
|
+
for (this.shadowHosts = [this.host]; s = s.getRootNode().host; )
|
1175
|
+
this.shadowHosts.push(s);
|
1176
|
+
const { shadowHosts: t, slotName: e } = this, i = [...t], n = i.pop();
|
1177
|
+
if (!n.querySelector(`[slot="${e}"]`)) {
|
1178
|
+
const o = document.createElement("div");
|
1179
|
+
o.slot = e, n.appendChild(o);
|
1180
|
+
}
|
1181
|
+
const r = n.querySelector(`[slot="${e}"]`);
|
1182
|
+
this.appendTemplate(r), i.forEach((o) => this.appendTemplate(o, this.createSlot(e)));
|
1183
|
+
}
|
1184
|
+
init() {
|
1185
|
+
this.destroyMountPoints(), this.initMountPoints(), this.initialized = !0;
|
1186
|
+
}
|
1187
|
+
};
|
1188
|
+
function st(s) {
|
1189
|
+
"@babel/helpers - typeof";
|
1190
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? st = function(t) {
|
1191
|
+
return typeof t;
|
1192
|
+
} : st = function(t) {
|
1193
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
1194
|
+
}, st(s);
|
1195
|
+
}
|
1196
|
+
var $e = "https://js.stripe.com/v3", Rs = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, te = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", Ms = function() {
|
1197
|
+
for (var t = document.querySelectorAll('script[src^="'.concat($e, '"]')), e = 0; e < t.length; e++) {
|
1198
|
+
var i = t[e];
|
1199
|
+
if (Rs.test(i.src))
|
1200
|
+
return i;
|
1201
|
+
}
|
1202
|
+
return null;
|
1203
|
+
}, ks = function(t) {
|
1204
|
+
var e = t && !t.advancedFraudSignals ? "?advancedFraudSignals=false" : "", i = document.createElement("script");
|
1205
|
+
i.src = "".concat($e).concat(e);
|
1206
|
+
var n = document.head || document.body;
|
1207
|
+
if (!n)
|
1208
|
+
throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
1209
|
+
return n.appendChild(i), i;
|
1210
|
+
}, Os = function(t, e) {
|
1211
|
+
!t || !t._registerWrapper || t._registerWrapper({
|
1212
|
+
name: "stripe-js",
|
1213
|
+
version: "1.23.0",
|
1214
|
+
startTime: e
|
1215
|
+
});
|
1216
|
+
}, X = null, Ns = function(t) {
|
1217
|
+
return X !== null || (X = new Promise(function(e, i) {
|
1218
|
+
if (typeof window > "u") {
|
1219
|
+
e(null);
|
1220
|
+
return;
|
1221
|
+
}
|
1222
|
+
if (window.Stripe && t && console.warn(te), window.Stripe) {
|
1223
|
+
e(window.Stripe);
|
1224
|
+
return;
|
1225
|
+
}
|
1226
|
+
try {
|
1227
|
+
var n = Ms();
|
1228
|
+
n && t ? console.warn(te) : n || (n = ks(t)), n.addEventListener("load", function() {
|
1229
|
+
window.Stripe ? e(window.Stripe) : i(new Error("Stripe.js not available"));
|
1230
|
+
}), n.addEventListener("error", function() {
|
1231
|
+
i(new Error("Failed to load Stripe.js"));
|
1232
|
+
});
|
1233
|
+
} catch (r) {
|
1234
|
+
i(r);
|
1235
|
+
return;
|
1236
|
+
}
|
1237
|
+
})), X;
|
1238
|
+
}, Is = function(t, e, i) {
|
1239
|
+
if (t === null)
|
1240
|
+
return null;
|
1241
|
+
var n = t.apply(void 0, e);
|
1242
|
+
return Os(n, i), n;
|
1243
|
+
}, Hs = function(t) {
|
1244
|
+
var e = `invalid load parameters; expected object of shape
|
1245
|
+
|
1246
|
+
{advancedFraudSignals: boolean}
|
1247
|
+
|
1248
|
+
but received
|
1249
|
+
|
1250
|
+
`.concat(JSON.stringify(t), `
|
1251
|
+
`);
|
1252
|
+
if (t === null || st(t) !== "object")
|
1253
|
+
throw new Error(e);
|
1254
|
+
if (Object.keys(t).length === 1 && typeof t.advancedFraudSignals == "boolean")
|
1255
|
+
return t;
|
1256
|
+
throw new Error(e);
|
1257
|
+
}, _e, ge = !1, Ae = function() {
|
1258
|
+
for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)
|
1259
|
+
e[i] = arguments[i];
|
1260
|
+
ge = !0;
|
1261
|
+
var n = Date.now();
|
1262
|
+
return Ns(_e).then(function(r) {
|
1263
|
+
return Is(r, e, n);
|
1264
|
+
});
|
1265
|
+
};
|
1266
|
+
Ae.setLoadParameters = function(s) {
|
1267
|
+
if (ge)
|
1268
|
+
throw new Error("You cannot change load parameters after calling loadStripe");
|
1269
|
+
_e = Hs(s);
|
1270
|
+
};
|
1271
|
+
var be = class extends Error {
|
1272
|
+
constructor(s, t) {
|
1273
|
+
super(`<${s}>: ${t}`), this.originalMessage = t;
|
1274
|
+
}
|
1275
|
+
};
|
1276
|
+
function Se(s) {
|
1277
|
+
return !!s && s instanceof be;
|
1278
|
+
}
|
1279
|
+
var Us = {
|
1280
|
+
toAttribute: (s) => s ? Se(s) ? s.originalMessage : s.message || "" : null
|
1281
|
+
}, f = class extends F {
|
1282
|
+
constructor() {
|
1283
|
+
super(...arguments), this.generate = "source", this.showError = !1, 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 Ts(this, {
|
1284
|
+
slotName: `${this.constructor.is}-slot`
|
1285
|
+
});
|
1286
|
+
}
|
1287
|
+
get stripeMountId() {
|
1288
|
+
return this.breadcrumb.mountId;
|
1289
|
+
}
|
1290
|
+
get stripeMount() {
|
1291
|
+
return this.breadcrumb.mount;
|
1292
|
+
}
|
1293
|
+
render() {
|
1294
|
+
const { error: s, showError: t } = this, { slotName: e } = this.breadcrumb, i = Se(s) ? s.originalMessage : s == null ? void 0 : s.message;
|
1295
|
+
return rs`
|
1296
|
+
<div id="stripe" part="stripe">
|
1297
|
+
<slot id="stripe-slot" name="${e}"></slot>
|
1298
|
+
</div>
|
1299
|
+
|
1300
|
+
<output id="error"
|
1301
|
+
for="stripe"
|
1302
|
+
part="error"
|
1303
|
+
?hidden="${!t}">
|
1304
|
+
${ms(i)}
|
1305
|
+
</output>
|
1306
|
+
`;
|
1307
|
+
}
|
1308
|
+
updated(s) {
|
1309
|
+
var t;
|
1310
|
+
(t = super.updated) == null || t.call(this, s), s.has("error") && this.errorChanged(), s.has("publishableKey") && this.init(), [...s.keys()].forEach(this.representationChanged);
|
1311
|
+
}
|
1312
|
+
async disconnectedCallback() {
|
1313
|
+
var s;
|
1314
|
+
super.disconnectedCallback(), await ((s = this.unmount) == null ? void 0 : s.call(this));
|
1315
|
+
}
|
1316
|
+
reset() {
|
1317
|
+
var s, t;
|
1318
|
+
(t = (s = this.element) == null ? void 0 : s.clear) == null || t.call(s), this.resetRepresentations(), m.set(this, { error: null });
|
1319
|
+
}
|
1320
|
+
blur() {
|
1321
|
+
var s;
|
1322
|
+
(s = this.element) == null || s.blur();
|
1323
|
+
}
|
1324
|
+
focus() {
|
1325
|
+
var s;
|
1326
|
+
(s = this.element) == null || s.focus();
|
1327
|
+
}
|
1328
|
+
createError(s) {
|
1329
|
+
return new be(this.constructor.is, s);
|
1330
|
+
}
|
1331
|
+
errorChanged() {
|
1332
|
+
this.resetRepresentations(), this.fireError(this.error);
|
1333
|
+
}
|
1334
|
+
fire(s, t, e) {
|
1335
|
+
this.dispatchEvent(new CustomEvent(s, { detail: t, ...e }));
|
1336
|
+
}
|
1337
|
+
fireError(s) {
|
1338
|
+
this.dispatchEvent(new ErrorEvent("error", { error: s }));
|
1339
|
+
}
|
1340
|
+
getCSSCustomPropertyValue(s) {
|
1341
|
+
return this.precomputedStyle.getPropertyValue(s);
|
1342
|
+
}
|
1343
|
+
async handleResponse(s) {
|
1344
|
+
const { error: t = null, paymentMethod: e = null, source: i = null, token: n = null } = { ...s };
|
1345
|
+
if (m.set(this, { error: t, paymentMethod: e, source: i, token: n }), await this.updateComplete, t)
|
1346
|
+
throw t;
|
1347
|
+
return s;
|
1348
|
+
}
|
1349
|
+
initElement() {
|
1350
|
+
"abstract";
|
1351
|
+
}
|
1352
|
+
async init() {
|
1353
|
+
await this.unmount(), await this.initStripe(), await this.initElement(), this.initElementListeners(), this.breadcrumb.init(), this.mount();
|
1354
|
+
}
|
1355
|
+
initElementListeners() {
|
1356
|
+
this.element && (this.element.on("ready", this.onReady), this.element.on("focus", this.onFocus), this.element.on("blur", this.onBlur));
|
1357
|
+
}
|
1358
|
+
async initStripe() {
|
1359
|
+
const { publishableKey: s, stripeAccount: t, locale: e } = this;
|
1360
|
+
if (!s)
|
1361
|
+
m.set(this, { elements: null, element: null, stripe: null });
|
1362
|
+
else
|
1363
|
+
try {
|
1364
|
+
const i = { stripeAccount: t, locale: e }, n = window.Stripe ? window.Stripe(s, i) : await Ae(s, i), r = n == null ? void 0 : n.elements();
|
1365
|
+
m.set(this, { elements: r, error: null, stripe: n });
|
1366
|
+
} catch (i) {
|
1367
|
+
console.warn(i);
|
1368
|
+
const n = this.createError("Stripe.js must be loaded first.");
|
1369
|
+
m.set(this, { elements: null, error: n, stripe: null });
|
1370
|
+
} finally {
|
1371
|
+
await this.updateComplete;
|
1372
|
+
}
|
1373
|
+
}
|
1374
|
+
mount() {
|
1375
|
+
var s;
|
1376
|
+
if (!this.breadcrumb.mount)
|
1377
|
+
throw this.createError("Stripe Mount missing");
|
1378
|
+
(s = this.element) == null || s.mount(this.breadcrumb.mount);
|
1379
|
+
}
|
1380
|
+
async unmount() {
|
1381
|
+
var s, t;
|
1382
|
+
(t = (s = this.element) == null ? void 0 : s.unmount) == null || t.call(s), m.set(this, { element: null }), await this.updateComplete;
|
1383
|
+
}
|
1384
|
+
async onBlur() {
|
1385
|
+
m.set(this, { focused: !1 }), await this.updateComplete;
|
1386
|
+
}
|
1387
|
+
async onFocus() {
|
1388
|
+
m.set(this, { focused: !0 }), await this.updateComplete;
|
1389
|
+
}
|
1390
|
+
async onReady(s) {
|
1391
|
+
m.set(this, { ready: !0 }), await this.updateComplete, this.fire("ready", s);
|
1392
|
+
}
|
1393
|
+
async postRepresentation() {
|
1394
|
+
const s = (a) => m.set(this, { error: a }), t = (a) => this.fire("success", a), e = this.token || void 0, i = this.source || void 0, n = this.paymentMethod || void 0, r = JSON.stringify({ token: e, source: i, paymentMethod: n }), o = { "Content-Type": "application/json" };
|
1395
|
+
return fetch(this.action, { body: r, headers: o, method: "POST" }).then(Ss).then(t).catch(s);
|
1396
|
+
}
|
1397
|
+
representationChanged(s) {
|
1398
|
+
if (!bs(s))
|
1399
|
+
return;
|
1400
|
+
const t = this[s];
|
1401
|
+
t && (this.fire(`${ye(s)}`, t), this.action && this.postRepresentation());
|
1402
|
+
}
|
1403
|
+
resetRepresentations() {
|
1404
|
+
m.set(this, {
|
1405
|
+
paymentMethod: null,
|
1406
|
+
token: null,
|
1407
|
+
source: null
|
1408
|
+
});
|
1409
|
+
}
|
1410
|
+
};
|
1411
|
+
h([
|
1412
|
+
u({ type: String })
|
1413
|
+
], f.prototype, "action", 2);
|
1414
|
+
h([
|
1415
|
+
u({ type: String, attribute: "client-secret" })
|
1416
|
+
], f.prototype, "clientSecret", 2);
|
1417
|
+
h([
|
1418
|
+
u({ type: String })
|
1419
|
+
], f.prototype, "generate", 2);
|
1420
|
+
h([
|
1421
|
+
b,
|
1422
|
+
u({ type: String, attribute: "publishable-key", reflect: !0 })
|
1423
|
+
], f.prototype, "publishableKey", 2);
|
1424
|
+
h([
|
1425
|
+
u({ type: Boolean, attribute: "show-error", reflect: !0 })
|
1426
|
+
], f.prototype, "showError", 2);
|
1427
|
+
h([
|
1428
|
+
u({ type: String, attribute: "stripe-account" })
|
1429
|
+
], f.prototype, "stripeAccount", 2);
|
1430
|
+
h([
|
1431
|
+
u({ type: String, attribute: "locale" })
|
1432
|
+
], f.prototype, "locale", 2);
|
1433
|
+
h([
|
1434
|
+
m,
|
1435
|
+
b,
|
1436
|
+
u({ type: Object, attribute: "payment-method" })
|
1437
|
+
], f.prototype, "paymentMethod", 2);
|
1438
|
+
h([
|
1439
|
+
m,
|
1440
|
+
b,
|
1441
|
+
u({ type: Object })
|
1442
|
+
], f.prototype, "source", 2);
|
1443
|
+
h([
|
1444
|
+
m,
|
1445
|
+
b,
|
1446
|
+
u({ type: Object })
|
1447
|
+
], f.prototype, "token", 2);
|
1448
|
+
h([
|
1449
|
+
m,
|
1450
|
+
u({ type: Object })
|
1451
|
+
], f.prototype, "element", 2);
|
1452
|
+
h([
|
1453
|
+
m,
|
1454
|
+
u({ type: Object })
|
1455
|
+
], f.prototype, "elements", 2);
|
1456
|
+
h([
|
1457
|
+
m,
|
1458
|
+
b,
|
1459
|
+
u({ type: Object, reflect: !0, converter: Us })
|
1460
|
+
], f.prototype, "error", 2);
|
1461
|
+
h([
|
1462
|
+
m,
|
1463
|
+
b,
|
1464
|
+
u({ type: Boolean, reflect: !0 })
|
1465
|
+
], f.prototype, "focused", 2);
|
1466
|
+
h([
|
1467
|
+
m,
|
1468
|
+
b,
|
1469
|
+
u({ type: Boolean, reflect: !0 })
|
1470
|
+
], f.prototype, "ready", 2);
|
1471
|
+
h([
|
1472
|
+
m,
|
1473
|
+
u({ type: Object })
|
1474
|
+
], f.prototype, "stripe", 2);
|
1475
|
+
h([
|
1476
|
+
u()
|
1477
|
+
], f.prototype, "theme", 2);
|
1478
|
+
h([
|
1479
|
+
u({ attribute: "border-radius" })
|
1480
|
+
], f.prototype, "borderRadius", 2);
|
1481
|
+
h([
|
1482
|
+
u({ attribute: "color-background" })
|
1483
|
+
], f.prototype, "colorBackground", 2);
|
1484
|
+
h([
|
1485
|
+
u({ attribute: "color-danger" })
|
1486
|
+
], f.prototype, "colorDanger", 2);
|
1487
|
+
h([
|
1488
|
+
u({ attribute: "color-primary" })
|
1489
|
+
], f.prototype, "colorPrimary", 2);
|
1490
|
+
h([
|
1491
|
+
u({ attribute: "color-text" })
|
1492
|
+
], f.prototype, "colorText", 2);
|
1493
|
+
h([
|
1494
|
+
u({ attribute: "font-family" })
|
1495
|
+
], f.prototype, "fontFamily", 2);
|
1496
|
+
h([
|
1497
|
+
u({ attribute: "spacing-unit" })
|
1498
|
+
], f.prototype, "spacingUnit", 2);
|
1499
|
+
h([
|
1500
|
+
S
|
1501
|
+
], f.prototype, "handleResponse", 1);
|
1502
|
+
h([
|
1503
|
+
S
|
1504
|
+
], f.prototype, "onBlur", 1);
|
1505
|
+
h([
|
1506
|
+
S
|
1507
|
+
], f.prototype, "onFocus", 1);
|
1508
|
+
h([
|
1509
|
+
S
|
1510
|
+
], f.prototype, "onReady", 1);
|
1511
|
+
h([
|
1512
|
+
S
|
1513
|
+
], f.prototype, "representationChanged", 1);
|
1514
|
+
var qs = Et`[hidden] {
|
1515
|
+
display: none !important;
|
1516
|
+
}
|
1517
|
+
|
1518
|
+
:host:not([hidden]) {
|
1519
|
+
display: block;
|
1520
|
+
box-sizing: border-box;
|
1521
|
+
}
|
1522
|
+
|
1523
|
+
#error {
|
1524
|
+
font-family: sans-serif;
|
1525
|
+
font-size: 14px;
|
1526
|
+
padding-left: 42px;
|
1527
|
+
padding-bottom: 10px;
|
1528
|
+
}
|
1529
|
+
`, we = qs, Ls = Et`:host {
|
1530
|
+
min-width: var(--stripe-elements-width, 300px);
|
1531
|
+
min-height: var(--stripe-elements-height, 50px);
|
1532
|
+
}
|
1533
|
+
|
1534
|
+
#stripe {
|
1535
|
+
box-sizing: border-box;
|
1536
|
+
border-radius: var(--stripe-elements-border-radius, 4px);
|
1537
|
+
border: var(--stripe-elements-border, 1px solid transparent);
|
1538
|
+
box-shadow: var(--stripe-elements-box-shadow, 0 1px 3px 0 #e6ebf1);
|
1539
|
+
transition: var(--stripe-elements-transition, box-shadow 150ms ease);
|
1540
|
+
min-width: var(--stripe-elements-width, 300px);
|
1541
|
+
padding: var(--stripe-elements-element-padding, 8px 12px);
|
1542
|
+
background: var(--stripe-elements-element-background, white);
|
1543
|
+
}
|
1544
|
+
|
1545
|
+
:host([focused]) #stripe {
|
1546
|
+
box-shadow: 0 1px 3px 0 #cfd7df;
|
1547
|
+
}
|
1548
|
+
|
1549
|
+
:host([error]) #stripe {
|
1550
|
+
border-color: #fa755a;
|
1551
|
+
}
|
1552
|
+
`, Bs = Ls, ee = [
|
1553
|
+
"color",
|
1554
|
+
"fontFamily",
|
1555
|
+
"fontSize",
|
1556
|
+
"fontStyle",
|
1557
|
+
"fontSmoothing",
|
1558
|
+
"fontVariant",
|
1559
|
+
"iconColor",
|
1560
|
+
"lineHeight",
|
1561
|
+
"letterSpacing",
|
1562
|
+
"textDecoration",
|
1563
|
+
"textShadow",
|
1564
|
+
"textTransform"
|
1565
|
+
], Ds = [
|
1566
|
+
":hover",
|
1567
|
+
":focus",
|
1568
|
+
"::placeholder",
|
1569
|
+
"::selection",
|
1570
|
+
":-webkit-autofill",
|
1571
|
+
":disabled"
|
1572
|
+
], A = class extends f {
|
1573
|
+
constructor() {
|
1574
|
+
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;
|
1575
|
+
}
|
1576
|
+
async createPaymentMethod(s = this.getPaymentMethodData()) {
|
1577
|
+
return this.stripe.createPaymentMethod(s);
|
1578
|
+
}
|
1579
|
+
async createSource(s = this.sourceData) {
|
1580
|
+
return this.stripe.createSource(this.element, s);
|
1581
|
+
}
|
1582
|
+
async createToken(s = this.tokenData) {
|
1583
|
+
return this.stripe.createToken(this.element, s);
|
1584
|
+
}
|
1585
|
+
isPotentiallyValid() {
|
1586
|
+
return !this.complete && !this.empty && !this.error || this.validate();
|
1587
|
+
}
|
1588
|
+
reset() {
|
1589
|
+
var s;
|
1590
|
+
super.reset(), (s = this.element) == null || s.clear();
|
1591
|
+
}
|
1592
|
+
async submit() {
|
1593
|
+
switch (this.generate) {
|
1594
|
+
case "payment-method":
|
1595
|
+
return this.createPaymentMethod();
|
1596
|
+
case "source":
|
1597
|
+
return this.createSource();
|
1598
|
+
case "token":
|
1599
|
+
return this.createToken();
|
1600
|
+
default: {
|
1601
|
+
const s = this.createError(`cannot generate ${this.generate}`);
|
1602
|
+
throw m.set(this, { error: s }), await this.updateComplete, s;
|
1603
|
+
}
|
1604
|
+
}
|
1605
|
+
}
|
1606
|
+
validate() {
|
1607
|
+
const { complete: s, empty: t, error: e } = this, i = !e && s && !t;
|
1608
|
+
return t && !e && m.set(this, { error: this.createError("Your card number is empty.") }), i;
|
1609
|
+
}
|
1610
|
+
updateStyle() {
|
1611
|
+
var s;
|
1612
|
+
(s = this.element) == null || s.update({
|
1613
|
+
style: this.getStripeElementsStyles()
|
1614
|
+
});
|
1615
|
+
}
|
1616
|
+
getPaymentMethodData() {
|
1617
|
+
const s = "card", { billingDetails: t, paymentMethodData: e } = this;
|
1618
|
+
return {
|
1619
|
+
billing_details: t,
|
1620
|
+
...e,
|
1621
|
+
type: s,
|
1622
|
+
card: this.element
|
1623
|
+
};
|
1624
|
+
}
|
1625
|
+
getStripeElementsStyles() {
|
1626
|
+
const s = (n) => this.getCSSCustomPropertyValue(n) || void 0, t = ["base", "complete", "empty", "invalid"], e = (n) => (r, o) => {
|
1627
|
+
if (n.includes("-"))
|
1628
|
+
return r;
|
1629
|
+
const p = o.split(":").pop();
|
1630
|
+
return {
|
1631
|
+
...r,
|
1632
|
+
[o]: ee.reduce(i(`${n}-${p}`), {})
|
1633
|
+
};
|
1634
|
+
}, i = (n) => (r, o) => {
|
1635
|
+
const p = `--stripe-elements-${n}-${ye(o)}`;
|
1636
|
+
return {
|
1637
|
+
...r,
|
1638
|
+
[o]: s(p),
|
1639
|
+
...Ds.reduce(e(n), {})
|
1640
|
+
};
|
1641
|
+
};
|
1642
|
+
return t.reduce((n, r) => ({
|
1643
|
+
...n,
|
1644
|
+
[r]: ee.reduce(i(r), {})
|
1645
|
+
}), {});
|
1646
|
+
}
|
1647
|
+
async initElement() {
|
1648
|
+
if (!this.stripe)
|
1649
|
+
return;
|
1650
|
+
const { hidePostalCode: s, hideIcon: t, iconStyle: e, value: i } = this, n = this.getStripeElementsStyles();
|
1651
|
+
await this.updateComplete;
|
1652
|
+
const r = this.createElement({
|
1653
|
+
hideIcon: t,
|
1654
|
+
hidePostalCode: s,
|
1655
|
+
iconStyle: e,
|
1656
|
+
style: n,
|
1657
|
+
value: i
|
1658
|
+
});
|
1659
|
+
r.on("change", this.onChange), m.set(this, { element: r }), await this.updateComplete;
|
1660
|
+
}
|
1661
|
+
createElement(s) {
|
1662
|
+
return this.elements.create("card", s);
|
1663
|
+
}
|
1664
|
+
async onChange(s) {
|
1665
|
+
const { brand: t, complete: e, empty: i, error: n = null } = s, r = !(n || !i && !e);
|
1666
|
+
m.set(this, { brand: t, complete: e, empty: i, error: n, invalid: r }), await this.updateComplete, this.fire("change", s);
|
1667
|
+
}
|
1668
|
+
};
|
1669
|
+
A.is = "stripe-elements";
|
1670
|
+
A.elementType = "card";
|
1671
|
+
A.styles = [
|
1672
|
+
we,
|
1673
|
+
Bs
|
1674
|
+
];
|
1675
|
+
h([
|
1676
|
+
u({ type: Boolean, attribute: "hide-icon" })
|
1677
|
+
], A.prototype, "hideIcon", 2);
|
1678
|
+
h([
|
1679
|
+
u({ type: Boolean, attribute: "hide-postal-code" })
|
1680
|
+
], A.prototype, "hidePostalCode", 2);
|
1681
|
+
h([
|
1682
|
+
u({ type: String, attribute: "icon-style" })
|
1683
|
+
], A.prototype, "iconStyle", 2);
|
1684
|
+
h([
|
1685
|
+
u({ type: Object })
|
1686
|
+
], A.prototype, "value", 2);
|
1687
|
+
h([
|
1688
|
+
b,
|
1689
|
+
m,
|
1690
|
+
u({ type: String })
|
1691
|
+
], A.prototype, "brand", 2);
|
1692
|
+
h([
|
1693
|
+
b,
|
1694
|
+
m,
|
1695
|
+
u({ type: Boolean, reflect: !0 })
|
1696
|
+
], A.prototype, "complete", 2);
|
1697
|
+
h([
|
1698
|
+
b,
|
1699
|
+
m,
|
1700
|
+
u({ type: Boolean, reflect: !0 })
|
1701
|
+
], A.prototype, "empty", 2);
|
1702
|
+
h([
|
1703
|
+
b,
|
1704
|
+
m,
|
1705
|
+
u({ type: Boolean, reflect: !0 })
|
1706
|
+
], A.prototype, "invalid", 2);
|
1707
|
+
h([
|
1708
|
+
xt
|
1709
|
+
], A.prototype, "createPaymentMethod", 1);
|
1710
|
+
h([
|
1711
|
+
xt
|
1712
|
+
], A.prototype, "createSource", 1);
|
1713
|
+
h([
|
1714
|
+
xt
|
1715
|
+
], A.prototype, "createToken", 1);
|
1716
|
+
h([
|
1717
|
+
S
|
1718
|
+
], A.prototype, "onChange", 1);
|
1719
|
+
A = h([
|
1720
|
+
se("stripe-elements")
|
1721
|
+
], A);
|
1722
|
+
var js = Et`#stripe {
|
1723
|
+
box-sizing: border-box;
|
1724
|
+
min-width: var(--stripe-payment-request-element-min-width, 300px);
|
1725
|
+
padding: var(--stripe-payment-request-element-padding, 8px 12px);
|
1726
|
+
background: var(--stripe-payment-request-element-background, white);
|
1727
|
+
}
|
1728
|
+
`, Vs = js;
|
1729
|
+
function zs(s) {
|
1730
|
+
return s.tagName.toLowerCase() === "stripe-display-item";
|
1731
|
+
}
|
1732
|
+
function Fs({ dataset: { amount: s, label: t, pending: e } }) {
|
1733
|
+
return {
|
1734
|
+
label: t,
|
1735
|
+
amount: parseInt(s),
|
1736
|
+
...e !== void 0 && { pending: e === "true" }
|
1737
|
+
};
|
1738
|
+
}
|
1739
|
+
function Ws({ dataset: { amount: s, detail: t, ...e } }) {
|
1740
|
+
return {
|
1741
|
+
amount: parseInt(s),
|
1742
|
+
detail: t,
|
1743
|
+
...e
|
1744
|
+
};
|
1745
|
+
}
|
1746
|
+
function Gs(s) {
|
1747
|
+
return zs(s) ? Fs(s) : Ws(s);
|
1748
|
+
}
|
1749
|
+
var it, nt, v = class extends f {
|
1750
|
+
constructor() {
|
1751
|
+
super(...arguments), this.canMakePayment = null, Jt(this, it, void 0), this.paymentIntent = null, this.paymentRequest = null, this.pending = !1, Jt(this, nt, void 0), this.buttonType = "default", this.buttonTheme = "dark", this.complete = async (s, t) => {
|
1752
|
+
const { error: e = null } = { ...s }, i = e || t ? "fail" : "success";
|
1753
|
+
return s.complete(i), this.fire(i, s), t ? { error: t } : s;
|
1754
|
+
};
|
1755
|
+
}
|
1756
|
+
get displayItems() {
|
1757
|
+
const s = Zt(this, it);
|
1758
|
+
return Array.isArray(s) ? s : this.parseDatasets("stripe-display-item");
|
1759
|
+
}
|
1760
|
+
set displayItems(s) {
|
1761
|
+
const t = this.displayItems;
|
1762
|
+
Xt(this, it, s), this.requestUpdate("displayItems", t);
|
1763
|
+
}
|
1764
|
+
get shippingOptions() {
|
1765
|
+
const s = Zt(this, nt);
|
1766
|
+
return Array.isArray(s) ? s : this.parseDatasets("stripe-shipping-option");
|
1767
|
+
}
|
1768
|
+
set shippingOptions(s) {
|
1769
|
+
const t = this.shippingOptions;
|
1770
|
+
Xt(this, nt, s), this.requestUpdate("shippingOptions", t);
|
1771
|
+
}
|
1772
|
+
reset() {
|
1773
|
+
super.reset(), m.set(this, { paymentIntent: null });
|
1774
|
+
}
|
1775
|
+
updated(s) {
|
1776
|
+
super.updated(s), s.has("generate") && this.initPaymentRequestListeners(), s.has("amount") && this.updatePaymentRequest();
|
1777
|
+
}
|
1778
|
+
getStripePaymentRequestOptions() {
|
1779
|
+
const {
|
1780
|
+
country: s,
|
1781
|
+
currency: t,
|
1782
|
+
displayItems: e,
|
1783
|
+
shippingOptions: i,
|
1784
|
+
requestShipping: n,
|
1785
|
+
requestPayerEmail: r,
|
1786
|
+
requestPayerName: o,
|
1787
|
+
requestPayerPhone: p,
|
1788
|
+
label: a = "",
|
1789
|
+
amount: l = 0
|
1790
|
+
} = this;
|
1791
|
+
return {
|
1792
|
+
country: s,
|
1793
|
+
currency: t,
|
1794
|
+
displayItems: e,
|
1795
|
+
requestPayerEmail: r,
|
1796
|
+
requestPayerName: o,
|
1797
|
+
requestPayerPhone: p,
|
1798
|
+
requestShipping: n,
|
1799
|
+
shippingOptions: i,
|
1800
|
+
total: { label: a, amount: l }
|
1801
|
+
};
|
1802
|
+
}
|
1803
|
+
async initElement() {
|
1804
|
+
await this.initPaymentRequest(), await this.initPaymentRequestListeners(), await this.initPaymentRequestButton();
|
1805
|
+
}
|
1806
|
+
async initPaymentRequest() {
|
1807
|
+
if (!this.stripe)
|
1808
|
+
return;
|
1809
|
+
const s = this.getStripePaymentRequestOptions(), t = this.stripe.paymentRequest(s), e = await t.canMakePayment();
|
1810
|
+
m.set(this, { paymentRequest: t, canMakePayment: e }), await this.updateComplete, this.canMakePayment || this.fire("unsupported");
|
1811
|
+
}
|
1812
|
+
async initPaymentRequestButton() {
|
1813
|
+
const { buttonTheme: s, buttonType: t, canMakePayment: e, paymentRequest: i } = this;
|
1814
|
+
if (!e || !this.elements)
|
1815
|
+
return;
|
1816
|
+
const o = { paymentRequestButton: { height: this.getCSSCustomPropertyValue("--stripe-payment-request-button-height") || "40px", theme: s, type: t } }, p = this.elements.create("paymentRequestButton", { paymentRequest: i, style: o });
|
1817
|
+
m.set(this, { element: p }), await this.updateComplete;
|
1818
|
+
}
|
1819
|
+
async initPaymentRequestListeners() {
|
1820
|
+
if (this.canMakePayment)
|
1821
|
+
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) {
|
1822
|
+
case "payment-method":
|
1823
|
+
this.paymentRequest.on("paymentmethod", this.onPaymentResponse);
|
1824
|
+
break;
|
1825
|
+
case "source":
|
1826
|
+
this.paymentRequest.on("source", this.onPaymentResponse);
|
1827
|
+
break;
|
1828
|
+
case "token":
|
1829
|
+
this.paymentRequest.on("token", this.onPaymentResponse);
|
1830
|
+
break;
|
1831
|
+
}
|
1832
|
+
}
|
1833
|
+
async updatePaymentRequest() {
|
1834
|
+
if (!this.paymentRequest)
|
1835
|
+
return;
|
1836
|
+
const { currency: s, total: t, displayItems: e, shippingOptions: i } = this.getStripePaymentRequestOptions();
|
1837
|
+
this.paymentRequest.update({ currency: s, total: t, displayItems: e, shippingOptions: i });
|
1838
|
+
}
|
1839
|
+
onCancel() {
|
1840
|
+
this.fire(
|
1841
|
+
"cancel"
|
1842
|
+
/* cancel */
|
1843
|
+
);
|
1844
|
+
}
|
1845
|
+
async onPaymentResponse(s) {
|
1846
|
+
const {
|
1847
|
+
error: t = null,
|
1848
|
+
paymentMethod: e = null,
|
1849
|
+
source: i = null,
|
1850
|
+
token: n = null
|
1851
|
+
} = { ...s };
|
1852
|
+
m.set(this, { error: t, paymentMethod: e, source: i, token: n }), this.clientSecret && !t ? this.confirmPaymentIntent(s) : this.complete(s);
|
1853
|
+
}
|
1854
|
+
async confirmPaymentIntent(s) {
|
1855
|
+
const t = { payment_method: this.paymentMethod.id }, { error: e = null, paymentIntent: i = null } = await this.confirmCardPayment(t, { handleActions: !1 }).then(({ error: n }) => this.complete(s, n)).then(Kt).then(() => this.confirmCardPayment()).then(Kt).catch((n) => ({ error: n }));
|
1856
|
+
m.set(this, { error: e, paymentIntent: i }), await this.updateComplete;
|
1857
|
+
}
|
1858
|
+
async confirmCardPayment(s, t) {
|
1859
|
+
return this.stripe.confirmCardPayment(this.clientSecret, s, t);
|
1860
|
+
}
|
1861
|
+
onShippingaddresschange(s) {
|
1862
|
+
this.fire("shippingaddresschange", s);
|
1863
|
+
}
|
1864
|
+
onShippingoptionchange(s) {
|
1865
|
+
this.fire("shippingoptionchange", s);
|
1866
|
+
}
|
1867
|
+
parseDatasets(s) {
|
1868
|
+
const t = [...this.querySelectorAll(s)];
|
1869
|
+
return t.length ? t.map(Gs) : [];
|
1870
|
+
}
|
1871
|
+
};
|
1872
|
+
it = /* @__PURE__ */ new WeakMap();
|
1873
|
+
nt = /* @__PURE__ */ new WeakMap();
|
1874
|
+
v.is = "stripe-payment-request";
|
1875
|
+
v.styles = [
|
1876
|
+
we,
|
1877
|
+
Vs
|
1878
|
+
];
|
1879
|
+
h([
|
1880
|
+
u({ type: Number, reflect: !0 })
|
1881
|
+
], v.prototype, "amount", 2);
|
1882
|
+
h([
|
1883
|
+
b,
|
1884
|
+
m,
|
1885
|
+
u({ type: Boolean, attribute: "can-make-payment", reflect: !0 })
|
1886
|
+
], v.prototype, "canMakePayment", 2);
|
1887
|
+
h([
|
1888
|
+
u({ type: String })
|
1889
|
+
], v.prototype, "country", 2);
|
1890
|
+
h([
|
1891
|
+
u({ type: String })
|
1892
|
+
], v.prototype, "currency", 2);
|
1893
|
+
h([
|
1894
|
+
u({ type: Array })
|
1895
|
+
], v.prototype, "displayItems", 1);
|
1896
|
+
h([
|
1897
|
+
u({ type: String, reflect: !0 })
|
1898
|
+
], v.prototype, "label", 2);
|
1899
|
+
h([
|
1900
|
+
b,
|
1901
|
+
m,
|
1902
|
+
u({ type: Object, attribute: "payment-intent" })
|
1903
|
+
], v.prototype, "paymentIntent", 2);
|
1904
|
+
h([
|
1905
|
+
m,
|
1906
|
+
u({ type: Object, attribute: "payment-request" })
|
1907
|
+
], v.prototype, "paymentRequest", 2);
|
1908
|
+
h([
|
1909
|
+
u({ type: Boolean, reflect: !0 })
|
1910
|
+
], v.prototype, "pending", 2);
|
1911
|
+
h([
|
1912
|
+
u({ type: Boolean, attribute: "request-payer-email" })
|
1913
|
+
], v.prototype, "requestPayerEmail", 2);
|
1914
|
+
h([
|
1915
|
+
u({ type: Boolean, attribute: "request-payer-name" })
|
1916
|
+
], v.prototype, "requestPayerName", 2);
|
1917
|
+
h([
|
1918
|
+
u({ type: Boolean, attribute: "request-payer-phone" })
|
1919
|
+
], v.prototype, "requestPayerPhone", 2);
|
1920
|
+
h([
|
1921
|
+
u({ type: Boolean, attribute: "request-shipping" })
|
1922
|
+
], v.prototype, "requestShipping", 2);
|
1923
|
+
h([
|
1924
|
+
u({ type: Array })
|
1925
|
+
], v.prototype, "shippingOptions", 1);
|
1926
|
+
h([
|
1927
|
+
u({ type: String, attribute: "button-type" })
|
1928
|
+
], v.prototype, "buttonType", 2);
|
1929
|
+
h([
|
1930
|
+
u({ type: String, attribute: "button-theme" })
|
1931
|
+
], v.prototype, "buttonTheme", 2);
|
1932
|
+
h([
|
1933
|
+
S
|
1934
|
+
], v.prototype, "onCancel", 1);
|
1935
|
+
h([
|
1936
|
+
S
|
1937
|
+
], v.prototype, "onPaymentResponse", 1);
|
1938
|
+
h([
|
1939
|
+
S
|
1940
|
+
], v.prototype, "confirmPaymentIntent", 1);
|
1941
|
+
h([
|
1942
|
+
S
|
1943
|
+
], v.prototype, "confirmCardPayment", 1);
|
1944
|
+
h([
|
1945
|
+
S
|
1946
|
+
], v.prototype, "onShippingaddresschange", 1);
|
1947
|
+
h([
|
1948
|
+
S
|
1949
|
+
], v.prototype, "onShippingoptionchange", 1);
|
1950
|
+
v = h([
|
1951
|
+
se("stripe-payment-request")
|
1952
|
+
], v);
|
1953
|
+
const Ys = (s) => {
|
1954
|
+
switch (s) {
|
1955
|
+
case xe.LIVE:
|
1956
|
+
return "pk_live_x99EPirYIsCyUsRvPAfyhnRp";
|
1957
|
+
default:
|
1958
|
+
return "pk_test_wXnn2RrefTiOHB0zzxqJr0s8";
|
1959
|
+
}
|
1960
|
+
}, Ks = Pe.extend({
|
1961
|
+
name: "CreditCardForm",
|
1962
|
+
components: {
|
1963
|
+
BFormattedAmount: Te
|
1964
|
+
},
|
1965
|
+
mixins: [Re("components/RevolugoElements/CreditCardForm")],
|
1966
|
+
props: De,
|
1967
|
+
data: () => ({
|
1968
|
+
error: "",
|
1969
|
+
isTermsAccepted: !1,
|
1970
|
+
termsError: !1
|
1971
|
+
}),
|
1972
|
+
computed: {
|
1973
|
+
termsAndConditionsUrl() {
|
1974
|
+
return this.$t("CreditCardForm.termsURL");
|
1975
|
+
},
|
1976
|
+
pk() {
|
1977
|
+
return Ys(this.config.apiEnvironment);
|
1978
|
+
}
|
1979
|
+
},
|
1980
|
+
methods: {
|
1981
|
+
onCreditCardFormChange(s) {
|
1982
|
+
this.error = "", this.$emit("change", !!s.detail.complete);
|
1983
|
+
},
|
1984
|
+
async onStripePayment(s) {
|
1985
|
+
try {
|
1986
|
+
if (!window.Stripe || this.disabled)
|
1987
|
+
return;
|
1988
|
+
const e = await window.Stripe(this.pk, {
|
1989
|
+
locale: this.$i18n.locale
|
1990
|
+
}).confirmCardPayment(this.token, {
|
1991
|
+
// eslint-disable-next-line camelcase
|
1992
|
+
payment_method: s.detail.id
|
1993
|
+
});
|
1994
|
+
e.error && e.error ? this.onPaymentError(e) : this.withAction ? this.$eventBus.$emit(Ce.PAYMENT_SUCCESS) : this.$emit("success");
|
1995
|
+
} catch (t) {
|
1996
|
+
this.onPaymentError(t);
|
1997
|
+
}
|
1998
|
+
},
|
1999
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2000
|
+
onPaymentError(s) {
|
2001
|
+
var t;
|
2002
|
+
this.error = `${(t = s == null ? void 0 : s.error) == null ? void 0 : t.message} ${this.$t("CreditCardForm.error")}`, this.$emit("error", this.error);
|
2003
|
+
},
|
2004
|
+
pay() {
|
2005
|
+
try {
|
2006
|
+
if (!this.$refs.payment || this.withTerms && !this.isTermsAccepted)
|
2007
|
+
return;
|
2008
|
+
this.$refs.payment.submit();
|
2009
|
+
} catch (s) {
|
2010
|
+
this.onPaymentError(s);
|
2011
|
+
}
|
2012
|
+
}
|
2013
|
+
}
|
2014
|
+
});
|
2015
|
+
var Zs = function() {
|
2016
|
+
var t = this, e = t._self._c;
|
2017
|
+
return t._self._setupProxy, e(Pt, { style: {
|
2018
|
+
borderColor: t.disabled ? null : "var(--v-primary-base)"
|
2019
|
+
}, attrs: { disabled: t.disabled, elevation: "0", outlined: "" } }, [e(Ie, { staticClass: "white--text", attrs: { color: "primary", dense: "", elevation: "0" } }, [e("div", { staticClass: "w-100 d-flex justify-space-between items-center" }, [e("h4", [e(Q, { attrs: { color: "white", left: "" } }, [t._v(" fa-credit-card ")]), t._v(" " + t._s(t.$t("CreditCardForm.title")) + ": "), t.loading ? e(He, { staticClass: "ml-2", attrs: { color: "primary", indeterminate: "", size: "20", width: "1" } }) : e("b-formatted-amount", { staticClass: "font-weight-bold", attrs: { amount: t.amount, currency: t.currency } })], 1), e(Q, { attrs: { color: "white", right: "" } }, [t._v(" fa-lock ")])], 1)]), e(qe, [e(D, [e(k, [t.error ? e(ke, { attrs: { color: "red", dense: "", outlined: "" } }, [e("p", { staticClass: "caption font-weight-bold text-center my-0 red--text rounded" }, [t._v(" " + t._s(t.$t("CreditCardForm.paymentDeclined")) + ": " + t._s(t.error) + " ")])]) : t._e()], 1)], 1), e(D, { staticClass: "d-none d-sm-flex", attrs: { "no-gutters": "" } }, [e(k, { attrs: { cols: "8" } }, [e("small", [t._v(t._s(t.$t("CreditCardForm.cardNumber")))])]), e(k, { staticClass: "text-right pr-6", attrs: { cols: "4" } }, [e("small", { staticClass: "pr-3" }, [t._v(t._s(t.$t("CreditCardForm.expDate")))]), e("small", [t._v(t._s(t.$t("CreditCardForm.cvc")))])])], 1), e(D, { attrs: { "no-gutters": "" } }, [e(k, [e(Pt, { attrs: { elevation: "0", outlined: "" } }, [e("stripe-elements", { ref: "payment", class: {
|
2020
|
+
"d-none": t.loading
|
2021
|
+
}, attrs: { generate: "payment-method", "hide-postal-code": "", locale: t.$i18n.locale, "publishable-key": t.pk }, on: { change: t.onCreditCardFormChange, error: t.onPaymentError, "payment-method": t.onStripePayment } }), t.loading ? e(Le, { staticClass: "mx-auto", attrs: { height: "36.8px", type: "image", width: "100%" } }) : t._e()], 1)], 1)], 1), t.withTerms ? e(D, { staticClass: "mt-2" }, [e(k, [e(Be, { ref: "testing", staticClass: "mt-0", attrs: { error: t.termsError && !t.isTermsAccepted }, scopedSlots: t._u([{ key: "label", fn: function() {
|
2022
|
+
return [e("span", { domProps: { innerHTML: t._s(
|
2023
|
+
t.$t("CreditCardForm.termsAndConditions", {
|
2024
|
+
url: t.termsAndConditionsUrl
|
2025
|
+
})
|
2026
|
+
) }, on: { click: function(i) {
|
2027
|
+
i.stopPropagation();
|
2028
|
+
} } })];
|
2029
|
+
}, proxy: !0 }], null, !1, 1757272622), model: { value: t.isTermsAccepted, callback: function(i) {
|
2030
|
+
t.isTermsAccepted = i;
|
2031
|
+
}, expression: "isTermsAccepted" } })], 1)], 1) : t._e(), t.withAction ? e(D, [e(k, { staticClass: "d-flex justify-end flex-column flex-sm-row mb-1 align-center mt-4 mt-sm-0" }, [e(Ue, { staticClass: "w-100 w-sm-auto", attrs: { color: "primary", depressed: "", disabled: t.disabled || t.withTerms && !t.isTermsAccepted, loading: t.loading }, on: { click: t.pay } }, [e(Q, { attrs: { left: "" } }, [t._v(" fa-lock ")]), e("span", { staticClass: "mr-1" }, [t._v(t._s(t.$t("CreditCardForm.payNow")))]), e("b-formatted-amount", { staticClass: "font-weight-bold", attrs: { amount: t.amount, currency: t.currency } })], 1)], 1)], 1) : t._e()], 1)], 1);
|
2032
|
+
}, Js = [], Xs = /* @__PURE__ */ Me(
|
2033
|
+
Ks,
|
2034
|
+
Zs,
|
2035
|
+
Js,
|
2036
|
+
!1,
|
2037
|
+
null,
|
2038
|
+
null,
|
2039
|
+
null,
|
2040
|
+
null
|
2041
|
+
);
|
2042
|
+
const gi = Xs.exports;
|
2043
|
+
Ee("css/revolugo.creditcardform.BGPUxkRC.css");
|
2044
|
+
export {
|
2045
|
+
gi as C,
|
2046
|
+
Be as _,
|
2047
|
+
De as c
|
2048
|
+
};
|
2049
|
+
//# sourceMappingURL=revolugo.creditcardform.P3Lo1eeg.min.js.map
|