@delopay/sdk 0.403.0 → 0.409.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/airwallexCard.cjs +41 -0
- package/dist/airwallexCard.cjs.map +1 -0
- package/dist/airwallexCard.d.cts +214 -0
- package/dist/airwallexCard.d.ts +214 -0
- package/dist/airwallexCard.js +41 -0
- package/dist/airwallexCard.js.map +1 -0
- package/dist/branding.cjs +235 -0
- package/dist/branding.cjs.map +1 -0
- package/dist/branding.d.cts +784 -0
- package/dist/branding.d.ts +784 -0
- package/dist/branding.js +235 -0
- package/dist/branding.js.map +1 -0
- package/dist/cardFormStyles.cjs +77 -0
- package/dist/cardFormStyles.cjs.map +1 -0
- package/dist/cardFormStyles.d.cts +182 -0
- package/dist/cardFormStyles.d.ts +182 -0
- package/dist/cardFormStyles.js +77 -0
- package/dist/cardFormStyles.js.map +1 -0
- package/dist/checkoutSession.cjs +7 -0
- package/dist/checkoutSession.cjs.map +1 -0
- package/dist/checkoutSession.d.cts +662 -0
- package/dist/checkoutSession.d.ts +662 -0
- package/dist/checkoutSession.js +7 -0
- package/dist/checkoutSession.js.map +1 -0
- package/dist/chunk-244VZFFO.cjs +27 -0
- package/dist/chunk-244VZFFO.cjs.map +1 -0
- package/dist/chunk-26THONSG.js +274 -0
- package/dist/chunk-26THONSG.js.map +1 -0
- package/dist/chunk-27NVIXDV.js +24 -0
- package/dist/chunk-27NVIXDV.js.map +1 -0
- package/dist/chunk-2C5XHXAY.js +19 -0
- package/dist/chunk-2C5XHXAY.js.map +1 -0
- package/dist/chunk-2IJRBJXW.cjs +35 -0
- package/dist/chunk-2IJRBJXW.cjs.map +1 -0
- package/dist/chunk-2JSBGTTW.js +99 -0
- package/dist/chunk-2JSBGTTW.js.map +1 -0
- package/dist/chunk-2PC2VAR7.js +217 -0
- package/dist/chunk-2PC2VAR7.js.map +1 -0
- package/dist/chunk-2QMSBWQY.js +453 -0
- package/dist/chunk-2QMSBWQY.js.map +1 -0
- package/dist/chunk-2RGSWTDI.js +19 -0
- package/dist/chunk-2RGSWTDI.js.map +1 -0
- package/dist/chunk-2TQA6UYY.js +228 -0
- package/dist/chunk-2TQA6UYY.js.map +1 -0
- package/dist/chunk-2XAJIA23.js +20 -0
- package/dist/chunk-2XAJIA23.js.map +1 -0
- package/dist/chunk-34AF36TY.js +89 -0
- package/dist/chunk-34AF36TY.js.map +1 -0
- package/dist/chunk-34PC72O7.cjs +73 -0
- package/dist/chunk-34PC72O7.cjs.map +1 -0
- package/dist/chunk-37BJUQ32.js +37 -0
- package/dist/chunk-37BJUQ32.js.map +1 -0
- package/dist/chunk-3GBWQWTP.cjs +54 -0
- package/dist/chunk-3GBWQWTP.cjs.map +1 -0
- package/dist/chunk-3GMGEP5I.js +43 -0
- package/dist/chunk-3GMGEP5I.js.map +1 -0
- package/dist/chunk-3L3B46AZ.js +44 -0
- package/dist/chunk-3L3B46AZ.js.map +1 -0
- package/dist/chunk-3NKFPZRS.js +973 -0
- package/dist/chunk-3NKFPZRS.js.map +1 -0
- package/dist/chunk-3ST4NW2T.js +35 -0
- package/dist/chunk-3ST4NW2T.js.map +1 -0
- package/dist/chunk-3YBBJT3Y.cjs +64 -0
- package/dist/chunk-3YBBJT3Y.cjs.map +1 -0
- package/dist/chunk-3YUKTCY2.js +71 -0
- package/dist/chunk-3YUKTCY2.js.map +1 -0
- package/dist/chunk-3ZHS3MFZ.js +35 -0
- package/dist/chunk-3ZHS3MFZ.js.map +1 -0
- package/dist/chunk-44QBWVRS.cjs +39 -0
- package/dist/chunk-44QBWVRS.cjs.map +1 -0
- package/dist/chunk-4EKAWNYI.cjs +69 -0
- package/dist/chunk-4EKAWNYI.cjs.map +1 -0
- package/dist/chunk-4FVOCZIM.js +15 -0
- package/dist/chunk-4FVOCZIM.js.map +1 -0
- package/dist/chunk-4LN4BR2T.cjs +262 -0
- package/dist/chunk-4LN4BR2T.cjs.map +1 -0
- package/dist/chunk-4T3MXBO2.js +114 -0
- package/dist/chunk-4T3MXBO2.js.map +1 -0
- package/dist/chunk-4T4XHPYN.cjs +135 -0
- package/dist/chunk-4T4XHPYN.cjs.map +1 -0
- package/dist/chunk-55XO7BFC.js +23 -0
- package/dist/chunk-55XO7BFC.js.map +1 -0
- package/dist/chunk-5CITBN33.cjs +485 -0
- package/dist/chunk-5CITBN33.cjs.map +1 -0
- package/dist/chunk-5CNBINCX.cjs +54 -0
- package/dist/chunk-5CNBINCX.cjs.map +1 -0
- package/dist/chunk-5HCKC4HF.cjs +217 -0
- package/dist/chunk-5HCKC4HF.cjs.map +1 -0
- package/dist/chunk-5O2JSQYA.cjs +114 -0
- package/dist/chunk-5O2JSQYA.cjs.map +1 -0
- package/dist/chunk-5P2AO6XY.js +202 -0
- package/dist/chunk-5P2AO6XY.js.map +1 -0
- package/dist/chunk-5VS3SUPL.js +125 -0
- package/dist/chunk-5VS3SUPL.js.map +1 -0
- package/dist/chunk-645BQ53W.js +84 -0
- package/dist/chunk-645BQ53W.js.map +1 -0
- package/dist/chunk-6EBY2KKL.cjs +43 -0
- package/dist/chunk-6EBY2KKL.cjs.map +1 -0
- package/dist/chunk-6H7K5DDI.js +307 -0
- package/dist/chunk-6H7K5DDI.js.map +1 -0
- package/dist/chunk-6LOWE2YI.cjs +23 -0
- package/dist/chunk-6LOWE2YI.cjs.map +1 -0
- package/dist/chunk-6LSG5Z4T.cjs +122 -0
- package/dist/chunk-6LSG5Z4T.cjs.map +1 -0
- package/dist/chunk-6QGC52VH.js +177 -0
- package/dist/chunk-6QGC52VH.js.map +1 -0
- package/dist/chunk-6SU2MTN2.cjs +17 -0
- package/dist/chunk-6SU2MTN2.cjs.map +1 -0
- package/dist/chunk-6TBA7KZO.js +132 -0
- package/dist/chunk-6TBA7KZO.js.map +1 -0
- package/dist/chunk-6VIC6Y7T.js +64 -0
- package/dist/chunk-6VIC6Y7T.js.map +1 -0
- package/dist/chunk-6YCDLSIU.cjs +105 -0
- package/dist/chunk-6YCDLSIU.cjs.map +1 -0
- package/dist/chunk-75E5WNJG.cjs +122 -0
- package/dist/chunk-75E5WNJG.cjs.map +1 -0
- package/dist/chunk-7ITPMVDB.cjs +108 -0
- package/dist/chunk-7ITPMVDB.cjs.map +1 -0
- package/dist/chunk-7JV6VVO7.cjs +43 -0
- package/dist/chunk-7JV6VVO7.cjs.map +1 -0
- package/dist/chunk-7M2KEERO.js +311 -0
- package/dist/chunk-7M2KEERO.js.map +1 -0
- package/dist/chunk-7QGASY6O.js +134 -0
- package/dist/chunk-7QGASY6O.js.map +1 -0
- package/dist/chunk-7QZCUXWB.cjs +15 -0
- package/dist/chunk-7QZCUXWB.cjs.map +1 -0
- package/dist/chunk-7VXF5D67.cjs +23 -0
- package/dist/chunk-7VXF5D67.cjs.map +1 -0
- package/dist/chunk-7YIDBPIU.js +208 -0
- package/dist/chunk-7YIDBPIU.js.map +1 -0
- package/dist/chunk-ACZ2R47X.cjs +140 -0
- package/dist/chunk-ACZ2R47X.cjs.map +1 -0
- package/dist/chunk-AQ5NYBU4.cjs +340 -0
- package/dist/chunk-AQ5NYBU4.cjs.map +1 -0
- package/dist/chunk-AREMIQLZ.js +202 -0
- package/dist/chunk-AREMIQLZ.js.map +1 -0
- package/dist/chunk-AYUYJO3I.cjs +44 -0
- package/dist/chunk-AYUYJO3I.cjs.map +1 -0
- package/dist/chunk-B2TCNGC2.cjs +536 -0
- package/dist/chunk-B2TCNGC2.cjs.map +1 -0
- package/dist/chunk-B72YNBLS.js +628 -0
- package/dist/chunk-B72YNBLS.js.map +1 -0
- package/dist/chunk-BCA3TCGS.cjs +185 -0
- package/dist/chunk-BCA3TCGS.cjs.map +1 -0
- package/dist/chunk-BEND2MZX.js +108 -0
- package/dist/chunk-BEND2MZX.js.map +1 -0
- package/dist/chunk-BF7IX2O4.js +128 -0
- package/dist/chunk-BF7IX2O4.js.map +1 -0
- package/dist/chunk-BOU2TQ6U.cjs +1 -0
- package/dist/chunk-BOU2TQ6U.cjs.map +1 -0
- package/dist/chunk-BP6KDQ6I.cjs +52 -0
- package/dist/chunk-BP6KDQ6I.cjs.map +1 -0
- package/dist/chunk-BRY3W7N3.cjs +43 -0
- package/dist/chunk-BRY3W7N3.cjs.map +1 -0
- package/dist/chunk-CAMALM35.cjs +277 -0
- package/dist/chunk-CAMALM35.cjs.map +1 -0
- package/dist/chunk-CCN44NZJ.cjs +134 -0
- package/dist/chunk-CCN44NZJ.cjs.map +1 -0
- package/dist/chunk-CECSSOIZ.js +44 -0
- package/dist/chunk-CECSSOIZ.js.map +1 -0
- package/dist/chunk-CKKNFFKP.cjs +311 -0
- package/dist/chunk-CKKNFFKP.cjs.map +1 -0
- package/dist/chunk-CMETZEUX.js +168 -0
- package/dist/chunk-CMETZEUX.js.map +1 -0
- package/dist/chunk-CR3JBTP3.cjs +31 -0
- package/dist/chunk-CR3JBTP3.cjs.map +1 -0
- package/dist/chunk-CRNICOYA.js +157 -0
- package/dist/chunk-CRNICOYA.js.map +1 -0
- package/dist/chunk-CSY3IZOC.js +695 -0
- package/dist/chunk-CSY3IZOC.js.map +1 -0
- package/dist/chunk-CTB54SCJ.js +43 -0
- package/dist/chunk-CTB54SCJ.js.map +1 -0
- package/dist/chunk-D3D73ANJ.js +39 -0
- package/dist/chunk-D3D73ANJ.js.map +1 -0
- package/dist/chunk-DECN4QU3.js +33 -0
- package/dist/chunk-DECN4QU3.js.map +1 -0
- package/dist/chunk-DFC4T6FA.js +137 -0
- package/dist/chunk-DFC4T6FA.js.map +1 -0
- package/dist/chunk-DJASVBOJ.cjs +61 -0
- package/dist/chunk-DJASVBOJ.cjs.map +1 -0
- package/dist/chunk-DLKGOSZR.js +73 -0
- package/dist/chunk-DLKGOSZR.js.map +1 -0
- package/dist/chunk-DO2DYNFW.js +122 -0
- package/dist/chunk-DO2DYNFW.js.map +1 -0
- package/dist/chunk-DVA3T3MD.js +67 -0
- package/dist/chunk-DVA3T3MD.js.map +1 -0
- package/dist/chunk-DZM3UP7F.cjs +148 -0
- package/dist/chunk-DZM3UP7F.cjs.map +1 -0
- package/dist/chunk-ENPSUWTS.cjs +35 -0
- package/dist/chunk-ENPSUWTS.cjs.map +1 -0
- package/dist/chunk-EQ6P6ZND.cjs +177 -0
- package/dist/chunk-EQ6P6ZND.cjs.map +1 -0
- package/dist/chunk-EXPWQBI3.cjs +23 -0
- package/dist/chunk-EXPWQBI3.cjs.map +1 -0
- package/dist/chunk-EXW4VDRM.js +57 -0
- package/dist/chunk-EXW4VDRM.js.map +1 -0
- package/dist/chunk-F3I5DOWV.cjs +14 -0
- package/dist/chunk-F3I5DOWV.cjs.map +1 -0
- package/dist/chunk-F6JABQLJ.js +720 -0
- package/dist/chunk-F6JABQLJ.js.map +1 -0
- package/dist/chunk-F6S3WCCB.cjs +40 -0
- package/dist/chunk-F6S3WCCB.cjs.map +1 -0
- package/dist/chunk-FI7NLDWZ.js +1 -0
- package/dist/chunk-FI7NLDWZ.js.map +1 -0
- package/dist/chunk-FQRC4NJG.cjs +202 -0
- package/dist/chunk-FQRC4NJG.cjs.map +1 -0
- package/dist/chunk-FYISDU2Y.cjs +137 -0
- package/dist/chunk-FYISDU2Y.cjs.map +1 -0
- package/dist/chunk-FZYEZLTM.js +59 -0
- package/dist/chunk-FZYEZLTM.js.map +1 -0
- package/dist/chunk-G7FHCGT5.js +140 -0
- package/dist/chunk-G7FHCGT5.js.map +1 -0
- package/dist/chunk-GA3KXPIF.cjs +720 -0
- package/dist/chunk-GA3KXPIF.cjs.map +1 -0
- package/dist/chunk-GEYCGYAN.js +122 -0
- package/dist/chunk-GEYCGYAN.js.map +1 -0
- package/dist/chunk-GG52SAHA.cjs +157 -0
- package/dist/chunk-GG52SAHA.cjs.map +1 -0
- package/dist/chunk-GGYLU7YO.cjs +58 -0
- package/dist/chunk-GGYLU7YO.cjs.map +1 -0
- package/dist/chunk-GK5FWN4H.cjs +307 -0
- package/dist/chunk-GK5FWN4H.cjs.map +1 -0
- package/dist/chunk-GSQN5EOO.cjs +347 -0
- package/dist/chunk-GSQN5EOO.cjs.map +1 -0
- package/dist/chunk-GVHN6BAJ.js +19 -0
- package/dist/chunk-GVHN6BAJ.js.map +1 -0
- package/dist/chunk-GW7IHYXR.cjs +125 -0
- package/dist/chunk-GW7IHYXR.cjs.map +1 -0
- package/dist/chunk-GZW5AFIL.js +27 -0
- package/dist/chunk-GZW5AFIL.js.map +1 -0
- package/dist/chunk-H2NGR5JG.js +786 -0
- package/dist/chunk-H2NGR5JG.js.map +1 -0
- package/dist/chunk-H537KAYC.cjs +71 -0
- package/dist/chunk-H537KAYC.cjs.map +1 -0
- package/dist/chunk-HJL32HDH.js +14 -0
- package/dist/chunk-HJL32HDH.js.map +1 -0
- package/dist/chunk-HL763JX2.js +43 -0
- package/dist/chunk-HL763JX2.js.map +1 -0
- package/dist/chunk-HLKFUOAQ.cjs +27 -0
- package/dist/chunk-HLKFUOAQ.cjs.map +1 -0
- package/dist/chunk-HLYGHP6F.cjs +80 -0
- package/dist/chunk-HLYGHP6F.cjs.map +1 -0
- package/dist/chunk-HO3SKXCG.js +559 -0
- package/dist/chunk-HO3SKXCG.js.map +1 -0
- package/dist/chunk-I2W7AO4B.cjs +37 -0
- package/dist/chunk-I2W7AO4B.cjs.map +1 -0
- package/dist/chunk-I2XGNALG.cjs +19 -0
- package/dist/chunk-I2XGNALG.cjs.map +1 -0
- package/dist/chunk-I5KOMBQ3.js +277 -0
- package/dist/chunk-I5KOMBQ3.js.map +1 -0
- package/dist/chunk-I65QS3YQ.cjs +695 -0
- package/dist/chunk-I65QS3YQ.cjs.map +1 -0
- package/dist/chunk-IB75VVZO.js +58 -0
- package/dist/chunk-IB75VVZO.js.map +1 -0
- package/dist/chunk-IGFEQECO.js +67 -0
- package/dist/chunk-IGFEQECO.js.map +1 -0
- package/dist/chunk-IKXGA2Z5.cjs +24 -0
- package/dist/chunk-IKXGA2Z5.cjs.map +1 -0
- package/dist/chunk-INQQLXAV.js +347 -0
- package/dist/chunk-INQQLXAV.js.map +1 -0
- package/dist/chunk-IR2LFKKA.cjs +44 -0
- package/dist/chunk-IR2LFKKA.cjs.map +1 -0
- package/dist/chunk-IVQDVFFR.js +226 -0
- package/dist/chunk-IVQDVFFR.js.map +1 -0
- package/dist/chunk-J3UH2OJH.js +31 -0
- package/dist/chunk-J3UH2OJH.js.map +1 -0
- package/dist/chunk-JAJOUFPM.js +30 -0
- package/dist/chunk-JAJOUFPM.js.map +1 -0
- package/dist/chunk-JPVR2NHV.js +54 -0
- package/dist/chunk-JPVR2NHV.js.map +1 -0
- package/dist/chunk-JSSDNDAG.cjs +1038 -0
- package/dist/chunk-JSSDNDAG.cjs.map +1 -0
- package/dist/chunk-JTZ44ZLT.js +1741 -0
- package/dist/chunk-JTZ44ZLT.js.map +1 -0
- package/dist/chunk-K5Q2H3VD.cjs +85 -0
- package/dist/chunk-K5Q2H3VD.cjs.map +1 -0
- package/dist/chunk-KAKDDX4L.js +144 -0
- package/dist/chunk-KAKDDX4L.js.map +1 -0
- package/dist/chunk-KD5Y2YWK.cjs +128 -0
- package/dist/chunk-KD5Y2YWK.cjs.map +1 -0
- package/dist/chunk-KJDMNF2T.cjs +202 -0
- package/dist/chunk-KJDMNF2T.cjs.map +1 -0
- package/dist/chunk-KKKEARPT.js +40 -0
- package/dist/chunk-KKKEARPT.js.map +1 -0
- package/dist/chunk-KLONGJCL.cjs +59 -0
- package/dist/chunk-KLONGJCL.cjs.map +1 -0
- package/dist/chunk-KS5ZUVPC.js +23 -0
- package/dist/chunk-KS5ZUVPC.js.map +1 -0
- package/dist/chunk-KSJ7JLR3.cjs +228 -0
- package/dist/chunk-KSJ7JLR3.cjs.map +1 -0
- package/dist/chunk-L7474OST.js +21 -0
- package/dist/chunk-L7474OST.js.map +1 -0
- package/dist/chunk-LG7XHNAY.js +52 -0
- package/dist/chunk-LG7XHNAY.js.map +1 -0
- package/dist/chunk-LJ2EG6JK.cjs +226 -0
- package/dist/chunk-LJ2EG6JK.cjs.map +1 -0
- package/dist/chunk-LLYY4TCZ.cjs +628 -0
- package/dist/chunk-LLYY4TCZ.cjs.map +1 -0
- package/dist/chunk-LPDUHBHT.js +2842 -0
- package/dist/chunk-LPDUHBHT.js.map +1 -0
- package/dist/chunk-LX6E5TTR.js +58 -0
- package/dist/chunk-LX6E5TTR.js.map +1 -0
- package/dist/chunk-LYIBTVK6.cjs +2842 -0
- package/dist/chunk-LYIBTVK6.cjs.map +1 -0
- package/dist/chunk-LZUHCGJ3.js +281 -0
- package/dist/chunk-LZUHCGJ3.js.map +1 -0
- package/dist/chunk-M3HWE7KT.cjs +33 -0
- package/dist/chunk-M3HWE7KT.cjs.map +1 -0
- package/dist/chunk-M3SJHFT4.cjs +24 -0
- package/dist/chunk-M3SJHFT4.cjs.map +1 -0
- package/dist/chunk-MCNDMK7F.cjs +167 -0
- package/dist/chunk-MCNDMK7F.cjs.map +1 -0
- package/dist/chunk-MLG6NXI6.cjs +19 -0
- package/dist/chunk-MLG6NXI6.cjs.map +1 -0
- package/dist/chunk-MTFLXMYI.js +262 -0
- package/dist/chunk-MTFLXMYI.js.map +1 -0
- package/dist/chunk-MYDDK2Z3.js +485 -0
- package/dist/chunk-MYDDK2Z3.js.map +1 -0
- package/dist/chunk-NFB3S2E6.cjs +22 -0
- package/dist/chunk-NFB3S2E6.cjs.map +1 -0
- package/dist/chunk-NLQOHTYN.js +44 -0
- package/dist/chunk-NLQOHTYN.js.map +1 -0
- package/dist/chunk-NW37NQZB.cjs +1741 -0
- package/dist/chunk-NW37NQZB.cjs.map +1 -0
- package/dist/chunk-NXORFP3R.js +148 -0
- package/dist/chunk-NXORFP3R.js.map +1 -0
- package/dist/chunk-NYL3BNHR.cjs +57 -0
- package/dist/chunk-NYL3BNHR.cjs.map +1 -0
- package/dist/chunk-O4AYHLQX.cjs +132 -0
- package/dist/chunk-O4AYHLQX.cjs.map +1 -0
- package/dist/chunk-ODPNVNYE.cjs +75 -0
- package/dist/chunk-ODPNVNYE.cjs.map +1 -0
- package/dist/chunk-OEKPQXXM.js +24 -0
- package/dist/chunk-OEKPQXXM.js.map +1 -0
- package/dist/chunk-OG2KJAYD.cjs +44 -0
- package/dist/chunk-OG2KJAYD.cjs.map +1 -0
- package/dist/chunk-OMGDHJYX.js +39 -0
- package/dist/chunk-OMGDHJYX.js.map +1 -0
- package/dist/chunk-OMRKVER7.js +80 -0
- package/dist/chunk-OMRKVER7.js.map +1 -0
- package/dist/chunk-OWP7XBY2.cjs +281 -0
- package/dist/chunk-OWP7XBY2.cjs.map +1 -0
- package/dist/chunk-OYZP6NF6.cjs +58 -0
- package/dist/chunk-OYZP6NF6.cjs.map +1 -0
- package/dist/chunk-P6JLNQ6L.cjs +111 -0
- package/dist/chunk-P6JLNQ6L.cjs.map +1 -0
- package/dist/chunk-P7DYLUUI.cjs +168 -0
- package/dist/chunk-P7DYLUUI.cjs.map +1 -0
- package/dist/chunk-PKAE6AQT.cjs +208 -0
- package/dist/chunk-PKAE6AQT.cjs.map +1 -0
- package/dist/chunk-Q347PTXI.js +54 -0
- package/dist/chunk-Q347PTXI.js.map +1 -0
- package/dist/chunk-Q6HI2G7W.js +40 -0
- package/dist/chunk-Q6HI2G7W.js.map +1 -0
- package/dist/chunk-Q7M7DO7M.cjs +186 -0
- package/dist/chunk-Q7M7DO7M.cjs.map +1 -0
- package/dist/chunk-QCPEE3EV.js +186 -0
- package/dist/chunk-QCPEE3EV.js.map +1 -0
- package/dist/chunk-QF3Q3TPV.js +162 -0
- package/dist/chunk-QF3Q3TPV.js.map +1 -0
- package/dist/chunk-QGTVOC6O.js +167 -0
- package/dist/chunk-QGTVOC6O.js.map +1 -0
- package/dist/chunk-QMLU5DST.cjs +786 -0
- package/dist/chunk-QMLU5DST.cjs.map +1 -0
- package/dist/chunk-QRSA72B3.cjs +40 -0
- package/dist/chunk-QRSA72B3.cjs.map +1 -0
- package/dist/chunk-QYNRNDIY.cjs +186 -0
- package/dist/chunk-QYNRNDIY.cjs.map +1 -0
- package/dist/chunk-R4FE6K43.cjs +99 -0
- package/dist/chunk-R4FE6K43.cjs.map +1 -0
- package/dist/chunk-R5VYSZ3Q.cjs +67 -0
- package/dist/chunk-R5VYSZ3Q.cjs.map +1 -0
- package/dist/chunk-RBN2H7QR.js +340 -0
- package/dist/chunk-RBN2H7QR.js.map +1 -0
- package/dist/chunk-RI42IDRR.cjs +23 -0
- package/dist/chunk-RI42IDRR.cjs.map +1 -0
- package/dist/chunk-RUDKQPEO.js +22 -0
- package/dist/chunk-RUDKQPEO.js.map +1 -0
- package/dist/chunk-RWCCRTLZ.js +17 -0
- package/dist/chunk-RWCCRTLZ.js.map +1 -0
- package/dist/chunk-S7SBNOGS.cjs +144 -0
- package/dist/chunk-S7SBNOGS.cjs.map +1 -0
- package/dist/chunk-SQELICSX.cjs +159 -0
- package/dist/chunk-SQELICSX.cjs.map +1 -0
- package/dist/chunk-SXCH2AXM.js +85 -0
- package/dist/chunk-SXCH2AXM.js.map +1 -0
- package/dist/chunk-T37FLY7Q.js +185 -0
- package/dist/chunk-T37FLY7Q.js.map +1 -0
- package/dist/chunk-T6N35YFJ.js +186 -0
- package/dist/chunk-T6N35YFJ.js.map +1 -0
- package/dist/chunk-THPCSJUP.js +43 -0
- package/dist/chunk-THPCSJUP.js.map +1 -0
- package/dist/chunk-TIMYWB2C.cjs +316 -0
- package/dist/chunk-TIMYWB2C.cjs.map +1 -0
- package/dist/chunk-TMAJE5P2.cjs +84 -0
- package/dist/chunk-TMAJE5P2.cjs.map +1 -0
- package/dist/chunk-TNIJ6OSH.cjs +162 -0
- package/dist/chunk-TNIJ6OSH.cjs.map +1 -0
- package/dist/chunk-TZ4JHXBR.js +98 -0
- package/dist/chunk-TZ4JHXBR.js.map +1 -0
- package/dist/chunk-UGSM7RJ2.cjs +30 -0
- package/dist/chunk-UGSM7RJ2.cjs.map +1 -0
- package/dist/chunk-UH2A7ZDK.js +61 -0
- package/dist/chunk-UH2A7ZDK.js.map +1 -0
- package/dist/chunk-UKLZAOLW.cjs +209 -0
- package/dist/chunk-UKLZAOLW.cjs.map +1 -0
- package/dist/chunk-ULZWGW2O.js +14 -0
- package/dist/chunk-ULZWGW2O.js.map +1 -0
- package/dist/chunk-US6R4TM4.js +50 -0
- package/dist/chunk-US6R4TM4.js.map +1 -0
- package/dist/chunk-UU3YQJT6.js +27 -0
- package/dist/chunk-UU3YQJT6.js.map +1 -0
- package/dist/chunk-V3PCNGDH.js +69 -0
- package/dist/chunk-V3PCNGDH.js.map +1 -0
- package/dist/chunk-V47G7P6L.cjs +19 -0
- package/dist/chunk-V47G7P6L.cjs.map +1 -0
- package/dist/chunk-VH5A6SMU.cjs +50 -0
- package/dist/chunk-VH5A6SMU.cjs.map +1 -0
- package/dist/chunk-VJ2L2GOF.js +23 -0
- package/dist/chunk-VJ2L2GOF.js.map +1 -0
- package/dist/chunk-VOIELJLZ.cjs +274 -0
- package/dist/chunk-VOIELJLZ.cjs.map +1 -0
- package/dist/chunk-VW7GWSP6.js +209 -0
- package/dist/chunk-VW7GWSP6.js.map +1 -0
- package/dist/chunk-VYC7WUM5.cjs +39 -0
- package/dist/chunk-VYC7WUM5.cjs.map +1 -0
- package/dist/chunk-W3EFNOH6.js +536 -0
- package/dist/chunk-W3EFNOH6.js.map +1 -0
- package/dist/chunk-W457XUA6.cjs +67 -0
- package/dist/chunk-W457XUA6.cjs.map +1 -0
- package/dist/chunk-WBAPQODS.js +111 -0
- package/dist/chunk-WBAPQODS.js.map +1 -0
- package/dist/chunk-WHDI3TMP.cjs +21 -0
- package/dist/chunk-WHDI3TMP.cjs.map +1 -0
- package/dist/chunk-WITCPKNL.cjs +20 -0
- package/dist/chunk-WITCPKNL.cjs.map +1 -0
- package/dist/chunk-WSOUQS6C.js +135 -0
- package/dist/chunk-WSOUQS6C.js.map +1 -0
- package/dist/chunk-WX6NP7UU.cjs +14 -0
- package/dist/chunk-WX6NP7UU.cjs.map +1 -0
- package/dist/chunk-WZK3BIHG.js +75 -0
- package/dist/chunk-WZK3BIHG.js.map +1 -0
- package/dist/chunk-X7UAYGQR.cjs +43 -0
- package/dist/chunk-X7UAYGQR.cjs.map +1 -0
- package/dist/chunk-XQLRIBVR.cjs +98 -0
- package/dist/chunk-XQLRIBVR.cjs.map +1 -0
- package/dist/chunk-Y4XILACH.js +105 -0
- package/dist/chunk-Y4XILACH.js.map +1 -0
- package/dist/chunk-YJQPKT6W.cjs +453 -0
- package/dist/chunk-YJQPKT6W.cjs.map +1 -0
- package/dist/chunk-YK3P5QNZ.cjs +559 -0
- package/dist/chunk-YK3P5QNZ.cjs.map +1 -0
- package/dist/chunk-YOFIOZJ5.js +1038 -0
- package/dist/chunk-YOFIOZJ5.js.map +1 -0
- package/dist/chunk-ZDYRYXY3.js +316 -0
- package/dist/chunk-ZDYRYXY3.js.map +1 -0
- package/dist/chunk-ZKPVUCQV.cjs +973 -0
- package/dist/chunk-ZKPVUCQV.cjs.map +1 -0
- package/dist/chunk-ZOD4J4XF.cjs +89 -0
- package/dist/chunk-ZOD4J4XF.cjs.map +1 -0
- package/dist/chunk-ZX4JTR2J.js +23 -0
- package/dist/chunk-ZX4JTR2J.js.map +1 -0
- package/dist/chunk-ZYWW275O.js +159 -0
- package/dist/chunk-ZYWW275O.js.map +1 -0
- package/dist/client.cjs +17 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +221 -0
- package/dist/client.d.ts +221 -0
- package/dist/client.js +17 -0
- package/dist/client.js.map +1 -0
- package/dist/core.cjs +13 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.cts +376 -0
- package/dist/core.d.ts +376 -0
- package/dist/core.js +13 -0
- package/dist/core.js.map +1 -0
- package/dist/currencies.cjs +7 -0
- package/dist/currencies.cjs.map +1 -0
- package/dist/currencies.d.cts +8 -0
- package/dist/currencies.d.ts +8 -0
- package/dist/currencies.js +7 -0
- package/dist/currencies.js.map +1 -0
- package/dist/enigmaCardForm.cjs +65 -0
- package/dist/enigmaCardForm.cjs.map +1 -0
- package/dist/enigmaCardForm.d.cts +145 -0
- package/dist/enigmaCardForm.d.ts +145 -0
- package/dist/enigmaCardForm.js +65 -0
- package/dist/enigmaCardForm.js.map +1 -0
- package/dist/error.cjs +9 -0
- package/dist/error.cjs.map +1 -0
- package/dist/error.d.cts +66 -0
- package/dist/error.d.ts +66 -0
- package/dist/error.js +9 -0
- package/dist/error.js.map +1 -0
- package/dist/eventStream.cjs +7 -0
- package/dist/eventStream.cjs.map +1 -0
- package/dist/eventStream.d.cts +50 -0
- package/dist/eventStream.d.ts +50 -0
- package/dist/eventStream.js +7 -0
- package/dist/eventStream.js.map +1 -0
- package/dist/exportDownload.cjs +21 -0
- package/dist/exportDownload.cjs.map +1 -0
- package/dist/exportDownload.d.cts +86 -0
- package/dist/exportDownload.d.ts +86 -0
- package/dist/exportDownload.js +21 -0
- package/dist/exportDownload.js.map +1 -0
- package/dist/feeProgram.cjs +25 -0
- package/dist/feeProgram.cjs.map +1 -0
- package/dist/feeProgram.d.cts +169 -0
- package/dist/feeProgram.d.ts +169 -0
- package/dist/feeProgram.js +25 -0
- package/dist/feeProgram.js.map +1 -0
- package/dist/index.cjs +839 -18306
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -1
- package/dist/index.d.ts +87 -1
- package/dist/index.js +418 -186
- package/dist/internal/resources/admin.cjs +7 -0
- package/dist/internal/resources/admin.cjs.map +1 -0
- package/dist/internal/resources/admin.d.cts +31 -0
- package/dist/internal/resources/admin.d.ts +31 -0
- package/dist/internal/resources/admin.js +7 -0
- package/dist/internal/resources/admin.js.map +1 -0
- package/dist/internal/resources/adminBranding.cjs +7 -0
- package/dist/internal/resources/adminBranding.cjs.map +1 -0
- package/dist/internal/resources/adminBranding.d.cts +37 -0
- package/dist/internal/resources/adminBranding.d.ts +37 -0
- package/dist/internal/resources/adminBranding.js +7 -0
- package/dist/internal/resources/adminBranding.js.map +1 -0
- package/dist/internal/resources/adminFileScans.cjs +7 -0
- package/dist/internal/resources/adminFileScans.cjs.map +1 -0
- package/dist/internal/resources/adminFileScans.d.cts +39 -0
- package/dist/internal/resources/adminFileScans.d.ts +39 -0
- package/dist/internal/resources/adminFileScans.js +7 -0
- package/dist/internal/resources/adminFileScans.js.map +1 -0
- package/dist/internal/resources/adminIndustries.cjs +7 -0
- package/dist/internal/resources/adminIndustries.cjs.map +1 -0
- package/dist/internal/resources/adminIndustries.d.cts +61 -0
- package/dist/internal/resources/adminIndustries.d.ts +61 -0
- package/dist/internal/resources/adminIndustries.js +7 -0
- package/dist/internal/resources/adminIndustries.js.map +1 -0
- package/dist/internal/resources/adminLive.cjs +7 -0
- package/dist/internal/resources/adminLive.cjs.map +1 -0
- package/dist/internal/resources/adminLive.d.cts +33 -0
- package/dist/internal/resources/adminLive.d.ts +33 -0
- package/dist/internal/resources/adminLive.js +7 -0
- package/dist/internal/resources/adminLive.js.map +1 -0
- package/dist/internal/resources/adminPortal.cjs +7 -0
- package/dist/internal/resources/adminPortal.cjs.map +1 -0
- package/dist/internal/resources/adminPortal.d.cts +1029 -0
- package/dist/internal/resources/adminPortal.d.ts +1029 -0
- package/dist/internal/resources/adminPortal.js +7 -0
- package/dist/internal/resources/adminPortal.js.map +1 -0
- package/dist/internal/resources/adminSupport.cjs +7 -0
- package/dist/internal/resources/adminSupport.cjs.map +1 -0
- package/dist/internal/resources/adminSupport.d.cts +52 -0
- package/dist/internal/resources/adminSupport.d.ts +52 -0
- package/dist/internal/resources/adminSupport.js +7 -0
- package/dist/internal/resources/adminSupport.js.map +1 -0
- package/dist/internal/resources/auditLogs.cjs +7 -0
- package/dist/internal/resources/auditLogs.cjs.map +1 -0
- package/dist/internal/resources/auditLogs.d.cts +37 -0
- package/dist/internal/resources/auditLogs.d.ts +37 -0
- package/dist/internal/resources/auditLogs.js +7 -0
- package/dist/internal/resources/auditLogs.js.map +1 -0
- package/dist/internal/resources/cache.cjs +7 -0
- package/dist/internal/resources/cache.cjs.map +1 -0
- package/dist/internal/resources/cache.d.cts +13 -0
- package/dist/internal/resources/cache.d.ts +13 -0
- package/dist/internal/resources/cache.js +7 -0
- package/dist/internal/resources/cache.js.map +1 -0
- package/dist/internal/resources/cardIssuers.cjs +7 -0
- package/dist/internal/resources/cardIssuers.cjs.map +1 -0
- package/dist/internal/resources/cardIssuers.d.cts +15 -0
- package/dist/internal/resources/cardIssuers.d.ts +15 -0
- package/dist/internal/resources/cardIssuers.js +7 -0
- package/dist/internal/resources/cardIssuers.js.map +1 -0
- package/dist/internal/resources/configs.cjs +7 -0
- package/dist/internal/resources/configs.cjs.map +1 -0
- package/dist/internal/resources/configs.d.cts +19 -0
- package/dist/internal/resources/configs.d.ts +19 -0
- package/dist/internal/resources/configs.js +7 -0
- package/dist/internal/resources/configs.js.map +1 -0
- package/dist/internal/resources/connectorRestrictionRules.cjs +7 -0
- package/dist/internal/resources/connectorRestrictionRules.cjs.map +1 -0
- package/dist/internal/resources/connectorRestrictionRules.d.cts +43 -0
- package/dist/internal/resources/connectorRestrictionRules.d.ts +43 -0
- package/dist/internal/resources/connectorRestrictionRules.js +7 -0
- package/dist/internal/resources/connectorRestrictionRules.js.map +1 -0
- package/dist/internal/resources/connectorRestrictions.cjs +7 -0
- package/dist/internal/resources/connectorRestrictions.cjs.map +1 -0
- package/dist/internal/resources/connectorRestrictions.d.cts +33 -0
- package/dist/internal/resources/connectorRestrictions.d.ts +33 -0
- package/dist/internal/resources/connectorRestrictions.js +7 -0
- package/dist/internal/resources/connectorRestrictions.js.map +1 -0
- package/dist/internal/resources/diagnostic.cjs +7 -0
- package/dist/internal/resources/diagnostic.cjs.map +1 -0
- package/dist/internal/resources/diagnostic.d.cts +183 -0
- package/dist/internal/resources/diagnostic.d.ts +183 -0
- package/dist/internal/resources/diagnostic.js +7 -0
- package/dist/internal/resources/diagnostic.js.map +1 -0
- package/dist/internal/resources/gsm.cjs +7 -0
- package/dist/internal/resources/gsm.cjs.map +1 -0
- package/dist/internal/resources/gsm.d.cts +16 -0
- package/dist/internal/resources/gsm.d.ts +16 -0
- package/dist/internal/resources/gsm.js +7 -0
- package/dist/internal/resources/gsm.js.map +1 -0
- package/dist/internal/resources/nativeRenewals.cjs +7 -0
- package/dist/internal/resources/nativeRenewals.cjs.map +1 -0
- package/dist/internal/resources/nativeRenewals.d.cts +16 -0
- package/dist/internal/resources/nativeRenewals.d.ts +16 -0
- package/dist/internal/resources/nativeRenewals.js +7 -0
- package/dist/internal/resources/nativeRenewals.js.map +1 -0
- package/dist/internal/resources/platformBilling.cjs +7 -0
- package/dist/internal/resources/platformBilling.cjs.map +1 -0
- package/dist/internal/resources/platformBilling.d.cts +145 -0
- package/dist/internal/resources/platformBilling.d.ts +145 -0
- package/dist/internal/resources/platformBilling.js +7 -0
- package/dist/internal/resources/platformBilling.js.map +1 -0
- package/dist/internal/resources/platformFees.cjs +9 -0
- package/dist/internal/resources/platformFees.cjs.map +1 -0
- package/dist/internal/resources/platformFees.d.cts +60 -0
- package/dist/internal/resources/platformFees.d.ts +60 -0
- package/dist/internal/resources/platformFees.js +9 -0
- package/dist/internal/resources/platformFees.js.map +1 -0
- package/dist/internal/resources/platformMessageTemplates.cjs +7 -0
- package/dist/internal/resources/platformMessageTemplates.cjs.map +1 -0
- package/dist/internal/resources/platformMessageTemplates.d.cts +46 -0
- package/dist/internal/resources/platformMessageTemplates.d.ts +46 -0
- package/dist/internal/resources/platformMessageTemplates.js +7 -0
- package/dist/internal/resources/platformMessageTemplates.js.map +1 -0
- package/dist/internal/resources/platformSettings.cjs +7 -0
- package/dist/internal/resources/platformSettings.cjs.map +1 -0
- package/dist/internal/resources/platformSettings.d.cts +41 -0
- package/dist/internal/resources/platformSettings.d.ts +41 -0
- package/dist/internal/resources/platformSettings.js +7 -0
- package/dist/internal/resources/platformSettings.js.map +1 -0
- package/dist/internal.cjs +856 -20979
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +109 -6082
- package/dist/internal.d.ts +109 -6082
- package/dist/internal.js +480 -2888
- package/dist/internal.js.map +1 -1
- package/dist/listQuery.cjs +7 -0
- package/dist/listQuery.cjs.map +1 -0
- package/dist/listQuery.d.cts +15 -0
- package/dist/listQuery.d.ts +15 -0
- package/dist/listQuery.js +7 -0
- package/dist/listQuery.js.map +1 -0
- package/dist/panes.cjs +65 -0
- package/dist/panes.cjs.map +1 -0
- package/dist/panes.d.cts +523 -0
- package/dist/panes.d.ts +523 -0
- package/dist/panes.js +65 -0
- package/dist/panes.js.map +1 -0
- package/dist/paymentPresentation.cjs +27 -0
- package/dist/paymentPresentation.cjs.map +1 -0
- package/dist/paymentPresentation.d.cts +101 -0
- package/dist/paymentPresentation.d.ts +101 -0
- package/dist/paymentPresentation.js +27 -0
- package/dist/paymentPresentation.js.map +1 -0
- package/dist/recordCounter.cjs +9 -0
- package/dist/recordCounter.cjs.map +1 -0
- package/dist/recordCounter.d.cts +92 -0
- package/dist/recordCounter.d.ts +92 -0
- package/dist/recordCounter.js +9 -0
- package/dist/recordCounter.js.map +1 -0
- package/dist/resources/analytics.cjs +7 -0
- package/dist/resources/analytics.cjs.map +1 -0
- package/dist/resources/analytics.d.cts +193 -0
- package/dist/resources/analytics.d.ts +193 -0
- package/dist/resources/analytics.js +7 -0
- package/dist/resources/analytics.js.map +1 -0
- package/dist/resources/analyticsDashboard.cjs +7 -0
- package/dist/resources/analyticsDashboard.cjs.map +1 -0
- package/dist/resources/analyticsDashboard.d.cts +15 -0
- package/dist/resources/analyticsDashboard.d.ts +15 -0
- package/dist/resources/analyticsDashboard.js +7 -0
- package/dist/resources/analyticsDashboard.js.map +1 -0
- package/dist/resources/apiKeys.cjs +7 -0
- package/dist/resources/apiKeys.cjs.map +1 -0
- package/dist/resources/apiKeys.d.cts +156 -0
- package/dist/resources/apiKeys.d.ts +156 -0
- package/dist/resources/apiKeys.js +7 -0
- package/dist/resources/apiKeys.js.map +1 -0
- package/dist/resources/audit.cjs +7 -0
- package/dist/resources/audit.cjs.map +1 -0
- package/dist/resources/audit.d.cts +34 -0
- package/dist/resources/audit.d.ts +34 -0
- package/dist/resources/audit.js +7 -0
- package/dist/resources/audit.js.map +1 -0
- package/dist/resources/authentication.cjs +7 -0
- package/dist/resources/authentication.cjs.map +1 -0
- package/dist/resources/authentication.d.cts +22 -0
- package/dist/resources/authentication.d.ts +22 -0
- package/dist/resources/authentication.js +7 -0
- package/dist/resources/authentication.js.map +1 -0
- package/dist/resources/availabilityOverrides.cjs +7 -0
- package/dist/resources/availabilityOverrides.cjs.map +1 -0
- package/dist/resources/availabilityOverrides.d.cts +30 -0
- package/dist/resources/availabilityOverrides.d.ts +30 -0
- package/dist/resources/availabilityOverrides.js +7 -0
- package/dist/resources/availabilityOverrides.js.map +1 -0
- package/dist/resources/billing.cjs +7 -0
- package/dist/resources/billing.cjs.map +1 -0
- package/dist/resources/billing.d.cts +122 -0
- package/dist/resources/billing.d.ts +122 -0
- package/dist/resources/billing.js +7 -0
- package/dist/resources/billing.js.map +1 -0
- package/dist/resources/buyerAccount.cjs +7 -0
- package/dist/resources/buyerAccount.cjs.map +1 -0
- package/dist/resources/buyerAccount.d.cts +162 -0
- package/dist/resources/buyerAccount.d.ts +162 -0
- package/dist/resources/buyerAccount.js +7 -0
- package/dist/resources/buyerAccount.js.map +1 -0
- package/dist/resources/buyerBlocklist.cjs +7 -0
- package/dist/resources/buyerBlocklist.cjs.map +1 -0
- package/dist/resources/buyerBlocklist.d.cts +120 -0
- package/dist/resources/buyerBlocklist.d.ts +120 -0
- package/dist/resources/buyerBlocklist.js +7 -0
- package/dist/resources/buyerBlocklist.js.map +1 -0
- package/dist/resources/buyerConversations.cjs +7 -0
- package/dist/resources/buyerConversations.cjs.map +1 -0
- package/dist/resources/buyerConversations.d.cts +85 -0
- package/dist/resources/buyerConversations.d.ts +85 -0
- package/dist/resources/buyerConversations.js +7 -0
- package/dist/resources/buyerConversations.js.map +1 -0
- package/dist/resources/buyerEvidenceReviews.cjs +7 -0
- package/dist/resources/buyerEvidenceReviews.cjs.map +1 -0
- package/dist/resources/buyerEvidenceReviews.d.cts +43 -0
- package/dist/resources/buyerEvidenceReviews.d.ts +43 -0
- package/dist/resources/buyerEvidenceReviews.js +7 -0
- package/dist/resources/buyerEvidenceReviews.js.map +1 -0
- package/dist/resources/buyerPortal.cjs +7 -0
- package/dist/resources/buyerPortal.cjs.map +1 -0
- package/dist/resources/buyerPortal.d.cts +122 -0
- package/dist/resources/buyerPortal.d.ts +122 -0
- package/dist/resources/buyerPortal.js +7 -0
- package/dist/resources/buyerPortal.js.map +1 -0
- package/dist/resources/cards.cjs +7 -0
- package/dist/resources/cards.cjs.map +1 -0
- package/dist/resources/cards.d.cts +17 -0
- package/dist/resources/cards.d.ts +17 -0
- package/dist/resources/cards.js +7 -0
- package/dist/resources/cards.js.map +1 -0
- package/dist/resources/chargebackPrevention.cjs +9 -0
- package/dist/resources/chargebackPrevention.cjs.map +1 -0
- package/dist/resources/chargebackPrevention.d.cts +51 -0
- package/dist/resources/chargebackPrevention.d.ts +51 -0
- package/dist/resources/chargebackPrevention.js +9 -0
- package/dist/resources/chargebackPrevention.js.map +1 -0
- package/dist/resources/checkoutMethods.cjs +7 -0
- package/dist/resources/checkoutMethods.cjs.map +1 -0
- package/dist/resources/checkoutMethods.d.cts +135 -0
- package/dist/resources/checkoutMethods.d.ts +135 -0
- package/dist/resources/checkoutMethods.js +7 -0
- package/dist/resources/checkoutMethods.js.map +1 -0
- package/dist/resources/checkoutRecovery.cjs +7 -0
- package/dist/resources/checkoutRecovery.cjs.map +1 -0
- package/dist/resources/checkoutRecovery.d.cts +92 -0
- package/dist/resources/checkoutRecovery.d.ts +92 -0
- package/dist/resources/checkoutRecovery.js +7 -0
- package/dist/resources/checkoutRecovery.js.map +1 -0
- package/dist/resources/checkoutTemplates.cjs +7 -0
- package/dist/resources/checkoutTemplates.cjs.map +1 -0
- package/dist/resources/checkoutTemplates.d.cts +75 -0
- package/dist/resources/checkoutTemplates.d.ts +75 -0
- package/dist/resources/checkoutTemplates.js +7 -0
- package/dist/resources/checkoutTemplates.js.map +1 -0
- package/dist/resources/connectors.cjs +7 -0
- package/dist/resources/connectors.cjs.map +1 -0
- package/dist/resources/connectors.d.cts +500 -0
- package/dist/resources/connectors.d.ts +500 -0
- package/dist/resources/connectors.js +7 -0
- package/dist/resources/connectors.js.map +1 -0
- package/dist/resources/costRules.cjs +7 -0
- package/dist/resources/costRules.cjs.map +1 -0
- package/dist/resources/costRules.d.cts +56 -0
- package/dist/resources/costRules.d.ts +56 -0
- package/dist/resources/costRules.js +7 -0
- package/dist/resources/costRules.js.map +1 -0
- package/dist/resources/customers.cjs +7 -0
- package/dist/resources/customers.cjs.map +1 -0
- package/dist/resources/customers.d.cts +185 -0
- package/dist/resources/customers.d.ts +185 -0
- package/dist/resources/customers.js +7 -0
- package/dist/resources/customers.js.map +1 -0
- package/dist/resources/deploymentBranding.cjs +9 -0
- package/dist/resources/deploymentBranding.cjs.map +1 -0
- package/dist/resources/deploymentBranding.d.cts +51 -0
- package/dist/resources/deploymentBranding.d.ts +51 -0
- package/dist/resources/deploymentBranding.js +9 -0
- package/dist/resources/deploymentBranding.js.map +1 -0
- package/dist/resources/disputes.cjs +7 -0
- package/dist/resources/disputes.cjs.map +1 -0
- package/dist/resources/disputes.d.cts +157 -0
- package/dist/resources/disputes.d.ts +157 -0
- package/dist/resources/disputes.js +7 -0
- package/dist/resources/disputes.js.map +1 -0
- package/dist/resources/ephemeralKeys.cjs +7 -0
- package/dist/resources/ephemeralKeys.cjs.map +1 -0
- package/dist/resources/ephemeralKeys.d.cts +43 -0
- package/dist/resources/ephemeralKeys.d.ts +43 -0
- package/dist/resources/ephemeralKeys.js +7 -0
- package/dist/resources/ephemeralKeys.js.map +1 -0
- package/dist/resources/events.cjs +7 -0
- package/dist/resources/events.cjs.map +1 -0
- package/dist/resources/events.d.cts +48 -0
- package/dist/resources/events.d.ts +48 -0
- package/dist/resources/events.js +7 -0
- package/dist/resources/events.js.map +1 -0
- package/dist/resources/export.cjs +7 -0
- package/dist/resources/export.cjs.map +1 -0
- package/dist/resources/export.d.cts +165 -0
- package/dist/resources/export.d.ts +165 -0
- package/dist/resources/export.js +7 -0
- package/dist/resources/export.js.map +1 -0
- package/dist/resources/externalRecords.cjs +7 -0
- package/dist/resources/externalRecords.cjs.map +1 -0
- package/dist/resources/externalRecords.d.cts +53 -0
- package/dist/resources/externalRecords.d.ts +53 -0
- package/dist/resources/externalRecords.js +7 -0
- package/dist/resources/externalRecords.js.map +1 -0
- package/dist/resources/featureMatrix.cjs +7 -0
- package/dist/resources/featureMatrix.cjs.map +1 -0
- package/dist/resources/featureMatrix.d.cts +24 -0
- package/dist/resources/featureMatrix.d.ts +24 -0
- package/dist/resources/featureMatrix.js +7 -0
- package/dist/resources/featureMatrix.js.map +1 -0
- package/dist/resources/fees.cjs +9 -0
- package/dist/resources/fees.cjs.map +1 -0
- package/dist/resources/fees.d.cts +96 -0
- package/dist/resources/fees.d.ts +96 -0
- package/dist/resources/fees.js +9 -0
- package/dist/resources/fees.js.map +1 -0
- package/dist/resources/files.cjs +7 -0
- package/dist/resources/files.cjs.map +1 -0
- package/dist/resources/files.d.cts +17 -0
- package/dist/resources/files.d.ts +17 -0
- package/dist/resources/files.js +7 -0
- package/dist/resources/files.js.map +1 -0
- package/dist/resources/forex.cjs +7 -0
- package/dist/resources/forex.cjs.map +1 -0
- package/dist/resources/forex.d.cts +15 -0
- package/dist/resources/forex.d.ts +15 -0
- package/dist/resources/forex.js +7 -0
- package/dist/resources/forex.js.map +1 -0
- package/dist/resources/identityVerifications.cjs +7 -0
- package/dist/resources/identityVerifications.cjs.map +1 -0
- package/dist/resources/identityVerifications.d.cts +220 -0
- package/dist/resources/identityVerifications.d.ts +220 -0
- package/dist/resources/identityVerifications.js +7 -0
- package/dist/resources/identityVerifications.js.map +1 -0
- package/dist/resources/industries.cjs +7 -0
- package/dist/resources/industries.cjs.map +1 -0
- package/dist/resources/industries.d.cts +88 -0
- package/dist/resources/industries.d.ts +88 -0
- package/dist/resources/industries.js +7 -0
- package/dist/resources/industries.js.map +1 -0
- package/dist/resources/invoiceSettings.cjs +7 -0
- package/dist/resources/invoiceSettings.cjs.map +1 -0
- package/dist/resources/invoiceSettings.d.cts +131 -0
- package/dist/resources/invoiceSettings.d.ts +131 -0
- package/dist/resources/invoiceSettings.js +7 -0
- package/dist/resources/invoiceSettings.js.map +1 -0
- package/dist/resources/invoices.cjs +7 -0
- package/dist/resources/invoices.cjs.map +1 -0
- package/dist/resources/invoices.d.cts +160 -0
- package/dist/resources/invoices.d.ts +160 -0
- package/dist/resources/invoices.js +7 -0
- package/dist/resources/invoices.js.map +1 -0
- package/dist/resources/live.cjs +13 -0
- package/dist/resources/live.cjs.map +1 -0
- package/dist/resources/live.d.cts +92 -0
- package/dist/resources/live.d.ts +92 -0
- package/dist/resources/live.js +13 -0
- package/dist/resources/live.js.map +1 -0
- package/dist/resources/mandates.cjs +7 -0
- package/dist/resources/mandates.cjs.map +1 -0
- package/dist/resources/mandates.d.cts +33 -0
- package/dist/resources/mandates.d.ts +33 -0
- package/dist/resources/mandates.js +7 -0
- package/dist/resources/mandates.js.map +1 -0
- package/dist/resources/merchantAccounts.cjs +7 -0
- package/dist/resources/merchantAccounts.cjs.map +1 -0
- package/dist/resources/merchantAccounts.d.cts +23 -0
- package/dist/resources/merchantAccounts.d.ts +23 -0
- package/dist/resources/merchantAccounts.js +7 -0
- package/dist/resources/merchantAccounts.js.map +1 -0
- package/dist/resources/messageTemplates.cjs +7 -0
- package/dist/resources/messageTemplates.cjs.map +1 -0
- package/dist/resources/messageTemplates.d.cts +48 -0
- package/dist/resources/messageTemplates.d.ts +48 -0
- package/dist/resources/messageTemplates.js +7 -0
- package/dist/resources/messageTemplates.js.map +1 -0
- package/dist/resources/operationLimits.cjs +7 -0
- package/dist/resources/operationLimits.cjs.map +1 -0
- package/dist/resources/operationLimits.d.cts +122 -0
- package/dist/resources/operationLimits.d.ts +122 -0
- package/dist/resources/operationLimits.js +7 -0
- package/dist/resources/operationLimits.js.map +1 -0
- package/dist/resources/paymentLinks.cjs +7 -0
- package/dist/resources/paymentLinks.cjs.map +1 -0
- package/dist/resources/paymentLinks.d.cts +42 -0
- package/dist/resources/paymentLinks.d.ts +42 -0
- package/dist/resources/paymentLinks.js +7 -0
- package/dist/resources/paymentLinks.js.map +1 -0
- package/dist/resources/paymentMethods.cjs +7 -0
- package/dist/resources/paymentMethods.cjs.map +1 -0
- package/dist/resources/paymentMethods.d.cts +172 -0
- package/dist/resources/paymentMethods.d.ts +172 -0
- package/dist/resources/paymentMethods.js +7 -0
- package/dist/resources/paymentMethods.js.map +1 -0
- package/dist/resources/payments.cjs +7 -0
- package/dist/resources/payments.cjs.map +1 -0
- package/dist/resources/payments.d.cts +509 -0
- package/dist/resources/payments.d.ts +509 -0
- package/dist/resources/payments.js +7 -0
- package/dist/resources/payments.js.map +1 -0
- package/dist/resources/payoutDestinations.cjs +7 -0
- package/dist/resources/payoutDestinations.cjs.map +1 -0
- package/dist/resources/payoutDestinations.d.cts +122 -0
- package/dist/resources/payoutDestinations.d.ts +122 -0
- package/dist/resources/payoutDestinations.js +7 -0
- package/dist/resources/payoutDestinations.js.map +1 -0
- package/dist/resources/payouts.cjs +7 -0
- package/dist/resources/payouts.cjs.map +1 -0
- package/dist/resources/payouts.d.cts +86 -0
- package/dist/resources/payouts.d.ts +86 -0
- package/dist/resources/payouts.js +7 -0
- package/dist/resources/payouts.js.map +1 -0
- package/dist/resources/paypalDisputes.cjs +7 -0
- package/dist/resources/paypalDisputes.cjs.map +1 -0
- package/dist/resources/paypalDisputes.d.cts +25 -0
- package/dist/resources/paypalDisputes.d.ts +25 -0
- package/dist/resources/paypalDisputes.js +7 -0
- package/dist/resources/paypalDisputes.js.map +1 -0
- package/dist/resources/persons.cjs +7 -0
- package/dist/resources/persons.cjs.map +1 -0
- package/dist/resources/persons.d.cts +58 -0
- package/dist/resources/persons.d.ts +58 -0
- package/dist/resources/persons.js +7 -0
- package/dist/resources/persons.js.map +1 -0
- package/dist/resources/poll.cjs +7 -0
- package/dist/resources/poll.cjs.map +1 -0
- package/dist/resources/poll.d.cts +12 -0
- package/dist/resources/poll.d.ts +12 -0
- package/dist/resources/poll.js +7 -0
- package/dist/resources/poll.js.map +1 -0
- package/dist/resources/processorCosts.cjs +7 -0
- package/dist/resources/processorCosts.cjs.map +1 -0
- package/dist/resources/processorCosts.d.cts +102 -0
- package/dist/resources/processorCosts.d.ts +102 -0
- package/dist/resources/processorCosts.js +7 -0
- package/dist/resources/processorCosts.js.map +1 -0
- package/dist/resources/processorImports.cjs +11 -0
- package/dist/resources/processorImports.cjs.map +1 -0
- package/dist/resources/processorImports.d.cts +96 -0
- package/dist/resources/processorImports.d.ts +96 -0
- package/dist/resources/processorImports.js +11 -0
- package/dist/resources/processorImports.js.map +1 -0
- package/dist/resources/products.cjs +7 -0
- package/dist/resources/products.cjs.map +1 -0
- package/dist/resources/products.d.cts +347 -0
- package/dist/resources/products.d.ts +347 -0
- package/dist/resources/products.js +7 -0
- package/dist/resources/products.js.map +1 -0
- package/dist/resources/profileAcquirers.cjs +7 -0
- package/dist/resources/profileAcquirers.cjs.map +1 -0
- package/dist/resources/profileAcquirers.d.cts +13 -0
- package/dist/resources/profileAcquirers.d.ts +13 -0
- package/dist/resources/profileAcquirers.js +7 -0
- package/dist/resources/profileAcquirers.js.map +1 -0
- package/dist/resources/profiles.cjs +7 -0
- package/dist/resources/profiles.cjs.map +1 -0
- package/dist/resources/profiles.d.cts +65 -0
- package/dist/resources/profiles.d.ts +65 -0
- package/dist/resources/profiles.js +7 -0
- package/dist/resources/profiles.js.map +1 -0
- package/dist/resources/projects.cjs +7 -0
- package/dist/resources/projects.cjs.map +1 -0
- package/dist/resources/projects.d.cts +131 -0
- package/dist/resources/projects.d.ts +131 -0
- package/dist/resources/projects.js +7 -0
- package/dist/resources/projects.js.map +1 -0
- package/dist/resources/refunds.cjs +7 -0
- package/dist/resources/refunds.cjs.map +1 -0
- package/dist/resources/refunds.d.cts +118 -0
- package/dist/resources/refunds.d.ts +118 -0
- package/dist/resources/refunds.js +7 -0
- package/dist/resources/refunds.js.map +1 -0
- package/dist/resources/regions.cjs +7 -0
- package/dist/resources/regions.cjs.map +1 -0
- package/dist/resources/regions.d.cts +32 -0
- package/dist/resources/regions.d.ts +32 -0
- package/dist/resources/regions.js +7 -0
- package/dist/resources/regions.js.map +1 -0
- package/dist/resources/relay.cjs +7 -0
- package/dist/resources/relay.cjs.map +1 -0
- package/dist/resources/relay.d.cts +13 -0
- package/dist/resources/relay.d.ts +13 -0
- package/dist/resources/relay.js +7 -0
- package/dist/resources/relay.js.map +1 -0
- package/dist/resources/risk.cjs +9 -0
- package/dist/resources/risk.cjs.map +1 -0
- package/dist/resources/risk.d.cts +67 -0
- package/dist/resources/risk.d.ts +67 -0
- package/dist/resources/risk.js +9 -0
- package/dist/resources/risk.js.map +1 -0
- package/dist/resources/routing.cjs +7 -0
- package/dist/resources/routing.cjs.map +1 -0
- package/dist/resources/routing.d.cts +526 -0
- package/dist/resources/routing.d.ts +526 -0
- package/dist/resources/routing.js +7 -0
- package/dist/resources/routing.js.map +1 -0
- package/dist/resources/search.cjs +7 -0
- package/dist/resources/search.cjs.map +1 -0
- package/dist/resources/search.d.cts +59 -0
- package/dist/resources/search.d.ts +59 -0
- package/dist/resources/search.js +7 -0
- package/dist/resources/search.js.map +1 -0
- package/dist/resources/sellToRestrictions.cjs +7 -0
- package/dist/resources/sellToRestrictions.cjs.map +1 -0
- package/dist/resources/sellToRestrictions.d.cts +99 -0
- package/dist/resources/sellToRestrictions.d.ts +99 -0
- package/dist/resources/sellToRestrictions.js +7 -0
- package/dist/resources/sellToRestrictions.js.map +1 -0
- package/dist/resources/settings.cjs +7 -0
- package/dist/resources/settings.cjs.map +1 -0
- package/dist/resources/settings.d.cts +36 -0
- package/dist/resources/settings.d.ts +36 -0
- package/dist/resources/settings.js +7 -0
- package/dist/resources/settings.js.map +1 -0
- package/dist/resources/settlement.cjs +9 -0
- package/dist/resources/settlement.cjs.map +1 -0
- package/dist/resources/settlement.d.cts +297 -0
- package/dist/resources/settlement.d.ts +297 -0
- package/dist/resources/settlement.js +9 -0
- package/dist/resources/settlement.js.map +1 -0
- package/dist/resources/shopLabels.cjs +7 -0
- package/dist/resources/shopLabels.cjs.map +1 -0
- package/dist/resources/shopLabels.d.cts +56 -0
- package/dist/resources/shopLabels.d.ts +56 -0
- package/dist/resources/shopLabels.js +7 -0
- package/dist/resources/shopLabels.js.map +1 -0
- package/dist/resources/shops.cjs +7 -0
- package/dist/resources/shops.cjs.map +1 -0
- package/dist/resources/shops.d.cts +196 -0
- package/dist/resources/shops.d.ts +196 -0
- package/dist/resources/shops.js +7 -0
- package/dist/resources/shops.js.map +1 -0
- package/dist/resources/stripeConnect.cjs +7 -0
- package/dist/resources/stripeConnect.cjs.map +1 -0
- package/dist/resources/stripeConnect.d.cts +19 -0
- package/dist/resources/stripeConnect.d.ts +19 -0
- package/dist/resources/stripeConnect.js +7 -0
- package/dist/resources/stripeConnect.js.map +1 -0
- package/dist/resources/subscriptions.cjs +7 -0
- package/dist/resources/subscriptions.cjs.map +1 -0
- package/dist/resources/subscriptions.d.cts +219 -0
- package/dist/resources/subscriptions.d.ts +219 -0
- package/dist/resources/subscriptions.js +7 -0
- package/dist/resources/subscriptions.js.map +1 -0
- package/dist/resources/support.cjs +7 -0
- package/dist/resources/support.cjs.map +1 -0
- package/dist/resources/support.d.cts +51 -0
- package/dist/resources/support.d.ts +51 -0
- package/dist/resources/support.js +7 -0
- package/dist/resources/support.js.map +1 -0
- package/dist/resources/threeDsRules.cjs +7 -0
- package/dist/resources/threeDsRules.cjs.map +1 -0
- package/dist/resources/threeDsRules.d.cts +12 -0
- package/dist/resources/threeDsRules.d.ts +12 -0
- package/dist/resources/threeDsRules.js +7 -0
- package/dist/resources/threeDsRules.js.map +1 -0
- package/dist/resources/users.cjs +7 -0
- package/dist/resources/users.cjs.map +1 -0
- package/dist/resources/users.d.cts +696 -0
- package/dist/resources/users.d.ts +696 -0
- package/dist/resources/users.js +7 -0
- package/dist/resources/users.js.map +1 -0
- package/dist/resources/vatRates.cjs +7 -0
- package/dist/resources/vatRates.cjs.map +1 -0
- package/dist/resources/vatRates.d.cts +24 -0
- package/dist/resources/vatRates.d.ts +24 -0
- package/dist/resources/vatRates.js +7 -0
- package/dist/resources/vatRates.js.map +1 -0
- package/dist/resources/verification.cjs +7 -0
- package/dist/resources/verification.cjs.map +1 -0
- package/dist/resources/verification.d.cts +13 -0
- package/dist/resources/verification.d.ts +13 -0
- package/dist/resources/verification.js +7 -0
- package/dist/resources/verification.js.map +1 -0
- package/dist/resources/webhooks.cjs +11 -0
- package/dist/resources/webhooks.cjs.map +1 -0
- package/dist/resources/webhooks.d.cts +145 -0
- package/dist/resources/webhooks.d.ts +145 -0
- package/dist/resources/webhooks.js +11 -0
- package/dist/resources/webhooks.js.map +1 -0
- package/dist/resources/whopResolutionCases.cjs +7 -0
- package/dist/resources/whopResolutionCases.cjs.map +1 -0
- package/dist/resources/whopResolutionCases.d.cts +28 -0
- package/dist/resources/whopResolutionCases.d.ts +28 -0
- package/dist/resources/whopResolutionCases.js +7 -0
- package/dist/resources/whopResolutionCases.js.map +1 -0
- package/dist/types-BEuEdvtX.d.cts +4511 -0
- package/dist/types-ewLZOLPZ.d.ts +4511 -0
- package/dist/types.cjs +1 -0
- package/dist/types.cjs.map +1 -0
- package/dist/{index-Dcy3Pwsx.d.cts → types.d.cts} +595 -11014
- package/dist/{index-Dcy3Pwsx.d.ts → types.d.ts} +595 -11014
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/package.json +11 -1
- package/dist/chunk-JJE7PY3K.js +0 -17987
- package/dist/chunk-JJE7PY3K.js.map +0 -1
|
@@ -0,0 +1,2842 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var _chunkGSQN5EOOcjs = require('./chunk-GSQN5EOO.cjs');
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
var _chunk4T4XHPYNcjs = require('./chunk-4T4XHPYN.cjs');
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
var _chunk5CITBN33cjs = require('./chunk-5CITBN33.cjs');
|
|
41
|
+
|
|
42
|
+
// src/branding.ts
|
|
43
|
+
function surchargeShowsLabel(labelMode, style, position) {
|
|
44
|
+
if (labelMode !== "labelled") return false;
|
|
45
|
+
return !(style === "ribbon" && (position === "cornerStart" || position === "cornerEnd"));
|
|
46
|
+
}
|
|
47
|
+
function surchargeFigurePlan(branding, isDiscount, percentAvailable) {
|
|
48
|
+
const mode = isDiscount ? branding.discountFigure : branding.surchargeFigure;
|
|
49
|
+
const label = surchargeShowsLabel(
|
|
50
|
+
branding.surchargeLabel,
|
|
51
|
+
branding.surchargeStyle,
|
|
52
|
+
branding.surchargePosition
|
|
53
|
+
);
|
|
54
|
+
if (!percentAvailable) return { first: "amount", second: null, label };
|
|
55
|
+
const ordered = {
|
|
56
|
+
amount: ["amount", null],
|
|
57
|
+
percent: ["percent", null],
|
|
58
|
+
amountThenPercent: ["amount", "percent"],
|
|
59
|
+
percentThenAmount: ["percent", "amount"]
|
|
60
|
+
};
|
|
61
|
+
const [first, second] = ordered[mode];
|
|
62
|
+
const cornerRibbon = branding.surchargeStyle === "ribbon" && (branding.surchargePosition === "cornerStart" || branding.surchargePosition === "cornerEnd");
|
|
63
|
+
return { first, second: cornerRibbon ? null : second, label };
|
|
64
|
+
}
|
|
65
|
+
function readableInkOn(color) {
|
|
66
|
+
const onBlack = contrastRatio(color, "#000000");
|
|
67
|
+
const onWhite = contrastRatio(color, "#ffffff");
|
|
68
|
+
if (onBlack === null || onWhite === null) return "#ffffff";
|
|
69
|
+
return onBlack >= onWhite ? "#000000" : "#ffffff";
|
|
70
|
+
}
|
|
71
|
+
var SURCHARGE_FONT_SIZE = {
|
|
72
|
+
sm: "0.6875rem",
|
|
73
|
+
md: "0.8125rem",
|
|
74
|
+
lg: "0.9375rem"
|
|
75
|
+
};
|
|
76
|
+
var SURCHARGE_PAD = {
|
|
77
|
+
sm: "1px 6px",
|
|
78
|
+
md: "2px 8px",
|
|
79
|
+
lg: "3px 10px"
|
|
80
|
+
};
|
|
81
|
+
var SURCHARGE_RADIUS = {
|
|
82
|
+
pill: "999px",
|
|
83
|
+
rounded: "6px",
|
|
84
|
+
square: "0px"
|
|
85
|
+
};
|
|
86
|
+
var SURCHARGE_BORDER_WIDTH = {
|
|
87
|
+
none: "0px",
|
|
88
|
+
thin: "1px",
|
|
89
|
+
medium: "2px",
|
|
90
|
+
thick: "3px"
|
|
91
|
+
};
|
|
92
|
+
var SURCHARGE_FONT_WEIGHT = {
|
|
93
|
+
regular: "400",
|
|
94
|
+
medium: "600",
|
|
95
|
+
bold: "700"
|
|
96
|
+
};
|
|
97
|
+
var SURCHARGE_POSITIONS = [
|
|
98
|
+
"trailing",
|
|
99
|
+
"inline",
|
|
100
|
+
"below",
|
|
101
|
+
"above",
|
|
102
|
+
"cornerStart",
|
|
103
|
+
"cornerEnd"
|
|
104
|
+
];
|
|
105
|
+
var NATIVE_ELEMENT_POSITIONS = [
|
|
106
|
+
"top",
|
|
107
|
+
"belowFields",
|
|
108
|
+
"belowCard",
|
|
109
|
+
"bottom"
|
|
110
|
+
];
|
|
111
|
+
var SURCHARGE_STYLES = [
|
|
112
|
+
"plain",
|
|
113
|
+
"underline",
|
|
114
|
+
"outline",
|
|
115
|
+
"badge",
|
|
116
|
+
"solid",
|
|
117
|
+
"ribbon"
|
|
118
|
+
];
|
|
119
|
+
var SURCHARGE_BORDER_WIDTHS = [
|
|
120
|
+
"none",
|
|
121
|
+
"thin",
|
|
122
|
+
"medium",
|
|
123
|
+
"thick"
|
|
124
|
+
];
|
|
125
|
+
var SURCHARGE_BORDER_STYLES = [
|
|
126
|
+
"solid",
|
|
127
|
+
"dashed",
|
|
128
|
+
"dotted"
|
|
129
|
+
];
|
|
130
|
+
var SURCHARGE_SIZES = ["sm", "md", "lg"];
|
|
131
|
+
function surchargeStyleDrawsAShape(style) {
|
|
132
|
+
return style === "badge" || style === "outline" || style === "solid";
|
|
133
|
+
}
|
|
134
|
+
var SURCHARGE_SHAPES = ["pill", "rounded", "square"];
|
|
135
|
+
var SURCHARGE_WEIGHTS = ["regular", "medium", "bold"];
|
|
136
|
+
var SURCHARGE_SIGNS = ["always", "minusOnly", "none"];
|
|
137
|
+
var SURCHARGE_LABEL_MODES = ["amount", "labelled"];
|
|
138
|
+
var SURCHARGE_FIGURE_MODES = [
|
|
139
|
+
"amount",
|
|
140
|
+
"percent",
|
|
141
|
+
"amountThenPercent",
|
|
142
|
+
"percentThenAmount"
|
|
143
|
+
];
|
|
144
|
+
var CHECKOUT_LOCALES = [
|
|
145
|
+
"en",
|
|
146
|
+
"de",
|
|
147
|
+
"fr",
|
|
148
|
+
"es",
|
|
149
|
+
"it",
|
|
150
|
+
"nl",
|
|
151
|
+
// Simplified and traditional are separate dictionaries in the checkout,
|
|
152
|
+
// not region variants: they use different characters, so a merchant who
|
|
153
|
+
// writes one has not written the other.
|
|
154
|
+
"zh",
|
|
155
|
+
"zh-Hant",
|
|
156
|
+
"hi",
|
|
157
|
+
"ar"
|
|
158
|
+
];
|
|
159
|
+
var RTL_CHECKOUT_LOCALES = ["ar"];
|
|
160
|
+
function checkoutLocaleDir(locale) {
|
|
161
|
+
const base = String(_nullishCoalesce(locale, () => ( ""))).toLowerCase().split("-")[0];
|
|
162
|
+
return RTL_CHECKOUT_LOCALES.includes(base) ? "rtl" : "ltr";
|
|
163
|
+
}
|
|
164
|
+
var LOCALIZABLE_COPY_FIELDS = [
|
|
165
|
+
"headerText",
|
|
166
|
+
"payButtonLabel",
|
|
167
|
+
"cardTermsMessage",
|
|
168
|
+
"footerText"
|
|
169
|
+
];
|
|
170
|
+
function copyTranslationsKey(field) {
|
|
171
|
+
return `${field}Translations`;
|
|
172
|
+
}
|
|
173
|
+
function checkoutCopy(branding, field, locale) {
|
|
174
|
+
const translated = translationFor(branding[copyTranslationsKey(field)], locale);
|
|
175
|
+
return _nullishCoalesce(translated, () => ( branding[field]));
|
|
176
|
+
}
|
|
177
|
+
function surchargeWordFor(branding, isDiscount, locale) {
|
|
178
|
+
return translationFor(
|
|
179
|
+
isDiscount ? branding.discountWordTranslations : branding.surchargeWordTranslations,
|
|
180
|
+
locale
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
var NOTICE_SECTIONS = ["summary", "payment"];
|
|
184
|
+
var NOTICES_PER_SECTION = 3;
|
|
185
|
+
var NOTICE_LABEL_MAX_LENGTH = 80;
|
|
186
|
+
var NOTICE_ICONS = [
|
|
187
|
+
"lock",
|
|
188
|
+
"shield",
|
|
189
|
+
"check",
|
|
190
|
+
"truck",
|
|
191
|
+
"package",
|
|
192
|
+
"refresh",
|
|
193
|
+
"star",
|
|
194
|
+
"support",
|
|
195
|
+
"globe",
|
|
196
|
+
"tag",
|
|
197
|
+
"heart",
|
|
198
|
+
"leaf",
|
|
199
|
+
"clock",
|
|
200
|
+
"bank"
|
|
201
|
+
];
|
|
202
|
+
var NOTICE_ICON_FALLBACK = "check";
|
|
203
|
+
var NOTICE_ICON_PATHS = {
|
|
204
|
+
lock: [
|
|
205
|
+
"M6 10h12a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z",
|
|
206
|
+
"M8 10V7a4 4 0 0 1 8 0v3"
|
|
207
|
+
],
|
|
208
|
+
shield: ["M12 3l7 3v6c0 4.2-2.9 7.6-7 9-4.1-1.4-7-4.8-7-9V6z", "M9 12l2.5 2.5 4-4.5"],
|
|
209
|
+
check: ["M21 12a9 9 0 1 1-18 0a9 9 0 1 1 18 0z", "M8 12.5l3 3 5-6"],
|
|
210
|
+
truck: [
|
|
211
|
+
"M3 7.5h10v9H3z",
|
|
212
|
+
"M13 11h4l3 3v2.5h-7z",
|
|
213
|
+
"M8.8 18a1.8 1.8 0 1 1-3.6 0a1.8 1.8 0 1 1 3.6 0z",
|
|
214
|
+
"M18.8 18a1.8 1.8 0 1 1-3.6 0a1.8 1.8 0 1 1 3.6 0z"
|
|
215
|
+
],
|
|
216
|
+
package: [
|
|
217
|
+
"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",
|
|
218
|
+
"M12 22V12",
|
|
219
|
+
"M3.29 7L12 12l8.71-5"
|
|
220
|
+
],
|
|
221
|
+
refresh: ["M20 12a8 8 0 1 1-2.5-5.8", "M20 4v5h-5"],
|
|
222
|
+
star: ["m12 3.6 2.6 5.3 5.9.9-4.3 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8-4.3-4.1 5.9-.9z"],
|
|
223
|
+
support: [
|
|
224
|
+
"M5 13v-1a7 7 0 0 1 14 0v1",
|
|
225
|
+
"M3.5 14.5a1.8 1.8 0 0 1 1.8-1.8H7v5H5.3a1.8 1.8 0 0 1-1.8-1.8z",
|
|
226
|
+
"M20.5 14.5a1.8 1.8 0 0 0-1.8-1.8H17v5h1.7a1.8 1.8 0 0 0 1.8-1.8z",
|
|
227
|
+
"M19 17.7v.8a2.5 2.5 0 0 1-2.5 2.5H13"
|
|
228
|
+
],
|
|
229
|
+
globe: [
|
|
230
|
+
"M21 12a9 9 0 1 1-18 0a9 9 0 1 1 18 0z",
|
|
231
|
+
"M3 12h18",
|
|
232
|
+
"M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18z"
|
|
233
|
+
],
|
|
234
|
+
tag: ["M11 3H4v7l10 10 7-7z", "M9.1 7a1.3 1.3 0 1 1-2.6 0a1.3 1.3 0 1 1 2.6 0z"],
|
|
235
|
+
heart: ["M12 20s-7-4.4-7-9.3A3.9 3.9 0 0 1 12 8a3.9 3.9 0 0 1 7 2.7c0 4.9-7 9.3-7 9.3z"],
|
|
236
|
+
leaf: ["M20 4c0 9-5.4 13-9.5 13A4.5 4.5 0 0 1 6 12.5C6 7 12 4 20 4z", "M4 20c2-4.5 5-7.5 9-9.5"],
|
|
237
|
+
clock: ["M21 12a9 9 0 1 1-18 0a9 9 0 1 1 18 0z", "M12 7v5l3 2"],
|
|
238
|
+
bank: ["M3 9.5 12 4l9 5.5", "M5 10v8M9.5 10v8M14.5 10v8M19 10v8", "M3 20h18"]
|
|
239
|
+
};
|
|
240
|
+
function isNoticeIcon(value) {
|
|
241
|
+
return typeof value === "string" && NOTICE_ICONS.includes(value);
|
|
242
|
+
}
|
|
243
|
+
var FONT_STACKS = {
|
|
244
|
+
inter: "'Inter Variable', 'Inter', system-ui, -apple-system, sans-serif",
|
|
245
|
+
system: "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif",
|
|
246
|
+
serif: "Georgia, 'Times New Roman', serif",
|
|
247
|
+
mono: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
|
|
248
|
+
roboto: "'Roboto', system-ui, sans-serif",
|
|
249
|
+
poppins: "'Poppins', system-ui, sans-serif",
|
|
250
|
+
manrope: "'Manrope Variable', 'Manrope', system-ui, sans-serif",
|
|
251
|
+
"dm-sans": "'DM Sans Variable', 'DM Sans', system-ui, sans-serif",
|
|
252
|
+
"space-grotesk": "'Space Grotesk Variable', 'Space Grotesk', system-ui, sans-serif",
|
|
253
|
+
"plex-sans": "'IBM Plex Sans', system-ui, sans-serif",
|
|
254
|
+
"work-sans": "'Work Sans Variable', 'Work Sans', system-ui, sans-serif",
|
|
255
|
+
"open-sans": "'Open Sans Variable', 'Open Sans', system-ui, sans-serif",
|
|
256
|
+
lora: "'Lora Variable', 'Lora', Georgia, serif",
|
|
257
|
+
playfair: "'Playfair Display Variable', 'Playfair Display', Georgia, serif",
|
|
258
|
+
"plex-mono": "'IBM Plex Mono', ui-monospace, monospace",
|
|
259
|
+
"jetbrains-mono": "'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, monospace"
|
|
260
|
+
};
|
|
261
|
+
var RADIUS_PX = {
|
|
262
|
+
square: "0px",
|
|
263
|
+
small: "6px",
|
|
264
|
+
medium: "12px",
|
|
265
|
+
large: "20px",
|
|
266
|
+
pill: "999px"
|
|
267
|
+
};
|
|
268
|
+
var FONT_WEIGHT_NUMERIC = {
|
|
269
|
+
regular: "400",
|
|
270
|
+
medium: "500",
|
|
271
|
+
semibold: "600",
|
|
272
|
+
bold: "700"
|
|
273
|
+
};
|
|
274
|
+
var SURFACE_PAD = {
|
|
275
|
+
compact: "1rem",
|
|
276
|
+
comfortable: "1.5rem",
|
|
277
|
+
spacious: "2rem"
|
|
278
|
+
};
|
|
279
|
+
var VERTICAL_GAP = {
|
|
280
|
+
compact: "0.75rem",
|
|
281
|
+
comfortable: "1rem",
|
|
282
|
+
spacious: "1.5rem"
|
|
283
|
+
};
|
|
284
|
+
var INPUT_PAD = {
|
|
285
|
+
sm: "0.5rem 0.75rem",
|
|
286
|
+
md: "0.625rem 0.75rem",
|
|
287
|
+
lg: "0.875rem 0.875rem"
|
|
288
|
+
};
|
|
289
|
+
var BUTTON_PAD = {
|
|
290
|
+
sm: "0.625rem 1rem",
|
|
291
|
+
md: "0.875rem 1.25rem",
|
|
292
|
+
lg: "1.125rem 1.5rem"
|
|
293
|
+
};
|
|
294
|
+
function fontStack(family) {
|
|
295
|
+
return _nullishCoalesce(FONT_STACKS[family], () => ( FONT_STACKS.inter));
|
|
296
|
+
}
|
|
297
|
+
function radiusValue(radius) {
|
|
298
|
+
return _nullishCoalesce(RADIUS_PX[radius], () => ( RADIUS_PX.medium));
|
|
299
|
+
}
|
|
300
|
+
function fontWeightValue(weight) {
|
|
301
|
+
return _nullishCoalesce(FONT_WEIGHT_NUMERIC[weight], () => ( "600"));
|
|
302
|
+
}
|
|
303
|
+
function surfacePadValue(scale) {
|
|
304
|
+
return _nullishCoalesce(SURFACE_PAD[scale], () => ( SURFACE_PAD.comfortable));
|
|
305
|
+
}
|
|
306
|
+
function verticalGapValue(scale) {
|
|
307
|
+
return _nullishCoalesce(VERTICAL_GAP[scale], () => ( VERTICAL_GAP.comfortable));
|
|
308
|
+
}
|
|
309
|
+
function inputPadValue(size) {
|
|
310
|
+
return _nullishCoalesce(INPUT_PAD[size], () => ( INPUT_PAD.md));
|
|
311
|
+
}
|
|
312
|
+
function buttonPadValue(size) {
|
|
313
|
+
return _nullishCoalesce(BUTTON_PAD[size], () => ( BUTTON_PAD.md));
|
|
314
|
+
}
|
|
315
|
+
function vaultFormAppearance(b, danger, options = {}) {
|
|
316
|
+
const border = b.enigmaBorder || b.border;
|
|
317
|
+
const look = {
|
|
318
|
+
surface: b.surface,
|
|
319
|
+
text: b.text,
|
|
320
|
+
border,
|
|
321
|
+
accent: b.enigmaAccent || b.primary,
|
|
322
|
+
...danger ? { danger } : {},
|
|
323
|
+
font: b.fontFamily,
|
|
324
|
+
radius: b.radiusInput,
|
|
325
|
+
size: b.inputSize,
|
|
326
|
+
labels: b.labelStyle
|
|
327
|
+
};
|
|
328
|
+
if (!options.designed) return look;
|
|
329
|
+
return {
|
|
330
|
+
...look,
|
|
331
|
+
chrome: b.enigmaChrome,
|
|
332
|
+
label: _chunk5CITBN33cjs.enigmaNamesInside.call(void 0, b) ? "inside" : "above",
|
|
333
|
+
hints: b.enigmaHints,
|
|
334
|
+
order: b.enigmaFieldOrder,
|
|
335
|
+
marks: b.enigmaMarks,
|
|
336
|
+
focus: b.enigmaFocusRing,
|
|
337
|
+
motion: b.enigmaFieldMotion,
|
|
338
|
+
height: b.enigmaFieldHeight,
|
|
339
|
+
gap: b.enigmaRowGap,
|
|
340
|
+
corner: b.enigmaCorner,
|
|
341
|
+
fill: b.enigmaFill || enigmaDefaultFill(b.surface, b.text),
|
|
342
|
+
...b.enigmaStyleMode === "custom" ? { custom: true } : {}
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
function enigmaDefaultFill(surface, text) {
|
|
346
|
+
const channels = (hex) => {
|
|
347
|
+
const v = hex.trim().replace("#", "");
|
|
348
|
+
const full = v.length === 3 ? v.replace(/./g, "$&$&") : v;
|
|
349
|
+
if (!/^[0-9a-fA-F]{6}$/.test(full)) return null;
|
|
350
|
+
return [0, 2, 4].map((i) => parseInt(full.slice(i, i + 2), 16));
|
|
351
|
+
};
|
|
352
|
+
const s2 = _nullishCoalesce(channels(surface), () => ( [255, 255, 255]));
|
|
353
|
+
const t = _nullishCoalesce(channels(text), () => ( [30, 41, 59]));
|
|
354
|
+
return `#${s2.map(
|
|
355
|
+
(value, i) => Math.round(value * 0.94 + (_nullishCoalesce(t[i], () => ( 0))) * 0.06).toString(16).padStart(2, "0")
|
|
356
|
+
).join("")}`;
|
|
357
|
+
}
|
|
358
|
+
function logoDimensions(size) {
|
|
359
|
+
switch (size) {
|
|
360
|
+
case "sm":
|
|
361
|
+
return { px: 36, radius: 8 };
|
|
362
|
+
case "lg":
|
|
363
|
+
return { px: 64, radius: 16 };
|
|
364
|
+
case "md":
|
|
365
|
+
default:
|
|
366
|
+
return { px: 48, radius: 12 };
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
var HEX_RE = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/;
|
|
370
|
+
function isHexColor(value) {
|
|
371
|
+
return HEX_RE.test(value.trim());
|
|
372
|
+
}
|
|
373
|
+
var CSS_HEX_RE = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
|
|
374
|
+
var LENIENT_HEX_RE = /^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
|
|
375
|
+
function parseHexChannels(value, pattern) {
|
|
376
|
+
const match = pattern.exec(value.trim());
|
|
377
|
+
if (!match) return null;
|
|
378
|
+
const digits = match[1];
|
|
379
|
+
const full = digits.length === 3 ? digits.split("").map((c) => c + c).join("") : digits;
|
|
380
|
+
return [
|
|
381
|
+
parseInt(full.slice(0, 2), 16),
|
|
382
|
+
parseInt(full.slice(2, 4), 16),
|
|
383
|
+
parseInt(full.slice(4, 6), 16)
|
|
384
|
+
];
|
|
385
|
+
}
|
|
386
|
+
function relativeLuminance([r, g, b]) {
|
|
387
|
+
const [lr, lg, lb] = [r, g, b].map((channel) => {
|
|
388
|
+
const c = channel / 255;
|
|
389
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
390
|
+
});
|
|
391
|
+
return 0.2126 * lr + 0.7152 * lg + 0.0722 * lb;
|
|
392
|
+
}
|
|
393
|
+
var WCAG_AA_TEXT = 4.5;
|
|
394
|
+
var WCAG_AA_UI = 3;
|
|
395
|
+
function contrastRatio(a, b) {
|
|
396
|
+
const first = parseHexChannels(a, CSS_HEX_RE);
|
|
397
|
+
const second = parseHexChannels(b, CSS_HEX_RE);
|
|
398
|
+
if (!first || !second) return null;
|
|
399
|
+
const [x, y] = [relativeLuminance(first), relativeLuminance(second)];
|
|
400
|
+
const lighter = Math.max(x, y);
|
|
401
|
+
const darker = Math.min(x, y);
|
|
402
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
403
|
+
}
|
|
404
|
+
function isDarkSurface(color) {
|
|
405
|
+
const channels = parseHexChannels(color, LENIENT_HEX_RE);
|
|
406
|
+
if (!channels) return false;
|
|
407
|
+
const [r, g, b] = channels;
|
|
408
|
+
const luma = (r * 299 + g * 587 + b * 114) / 1e3;
|
|
409
|
+
return luma < 128;
|
|
410
|
+
}
|
|
411
|
+
var LIGHT_PALETTE = {
|
|
412
|
+
primary: "#1E4FEB",
|
|
413
|
+
background: "#f8fafc",
|
|
414
|
+
surface: "#ffffff",
|
|
415
|
+
text: "#1e293b",
|
|
416
|
+
heading: "#0A1130",
|
|
417
|
+
muted: "#64748b",
|
|
418
|
+
border: "#e2e8f0",
|
|
419
|
+
accentText: "#1E4FEB",
|
|
420
|
+
buttonBackground: "#0A1130",
|
|
421
|
+
buttonText: "#ffffff"
|
|
422
|
+
};
|
|
423
|
+
var DEFAULT_BADGES = [
|
|
424
|
+
{
|
|
425
|
+
id: "secure",
|
|
426
|
+
label: "Secure",
|
|
427
|
+
textColor: "#047857",
|
|
428
|
+
backgroundColor: "#ecfdf5",
|
|
429
|
+
borderColor: "#a7f3d0"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
id: "ssl",
|
|
433
|
+
label: "256-bit SSL",
|
|
434
|
+
textColor: "#1E4FEB",
|
|
435
|
+
backgroundColor: "#eff6ff",
|
|
436
|
+
borderColor: "#bfdbfe"
|
|
437
|
+
}
|
|
438
|
+
];
|
|
439
|
+
var DEFAULT_BADGES_DARK = [
|
|
440
|
+
{
|
|
441
|
+
id: "secure",
|
|
442
|
+
label: "Secure",
|
|
443
|
+
textColor: "#34d399",
|
|
444
|
+
backgroundColor: "#064e3b",
|
|
445
|
+
borderColor: "#065f46"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
id: "ssl",
|
|
449
|
+
label: "256-bit SSL",
|
|
450
|
+
textColor: "#60a5fa",
|
|
451
|
+
backgroundColor: "#172554",
|
|
452
|
+
borderColor: "#1e40af"
|
|
453
|
+
}
|
|
454
|
+
];
|
|
455
|
+
var DEFAULT_NOTICES = [
|
|
456
|
+
{
|
|
457
|
+
id: "secure",
|
|
458
|
+
section: "summary",
|
|
459
|
+
icon: "shield",
|
|
460
|
+
label: "Secure payment",
|
|
461
|
+
labelTranslations: {
|
|
462
|
+
de: "Sichere Zahlung",
|
|
463
|
+
fr: "Paiement s\xE9curis\xE9",
|
|
464
|
+
es: "Pago seguro",
|
|
465
|
+
it: "Pagamento sicuro",
|
|
466
|
+
nl: "Veilig betalen",
|
|
467
|
+
zh: "\u5B89\u5168\u652F\u4ED8",
|
|
468
|
+
"zh-Hant": "\u5B89\u5168\u4ED8\u6B3E",
|
|
469
|
+
hi: "\u0938\u0941\u0930\u0915\u094D\u0937\u093F\u0924 \u092D\u0941\u0917\u0924\u093E\u0928",
|
|
470
|
+
ar: "\u062F\u0641\u0639 \u0622\u0645\u0646"
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
id: "ssl",
|
|
475
|
+
section: "summary",
|
|
476
|
+
icon: "lock",
|
|
477
|
+
label: "Encrypted \xB7 256-bit SSL",
|
|
478
|
+
labelTranslations: {
|
|
479
|
+
de: "Verschl\xFCsselt \xB7 256-Bit-SSL",
|
|
480
|
+
fr: "Chiffr\xE9 \xB7 SSL 256 bits",
|
|
481
|
+
es: "Cifrado \xB7 SSL de 256 bits",
|
|
482
|
+
it: "Crittografato \xB7 SSL a 256 bit",
|
|
483
|
+
nl: "Versleuteld \xB7 256-bit SSL",
|
|
484
|
+
zh: "\u52A0\u5BC6 \xB7 256 \u4F4D SSL",
|
|
485
|
+
"zh-Hant": "\u52A0\u5BC6 \xB7 256 \u4F4D\u5143 SSL",
|
|
486
|
+
hi: "\u090F\u0928\u094D\u0915\u094D\u0930\u093F\u092A\u094D\u091F\u0947\u0921 \xB7 256-\u092C\u093F\u091F SSL",
|
|
487
|
+
ar: "\u0645\u0634\u0641\u0651\u0631 \xB7 SSL \u0628\u0637\u0648\u0644 256 \u0628\u062A"
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
];
|
|
491
|
+
function defaultNotices() {
|
|
492
|
+
return DEFAULT_NOTICES.map(cloneNotice);
|
|
493
|
+
}
|
|
494
|
+
function cloneNotice(notice) {
|
|
495
|
+
return { ...notice, labelTranslations: { ...notice.labelTranslations } };
|
|
496
|
+
}
|
|
497
|
+
function hexChannels(hex) {
|
|
498
|
+
const raw = _optionalChain([/^#([0-9a-f]{6})$/i, 'access', _ => _.exec, 'call', _2 => _2(hex.trim()), 'optionalAccess', _3 => _3[1]]);
|
|
499
|
+
if (!raw) return null;
|
|
500
|
+
return [
|
|
501
|
+
parseInt(raw.slice(0, 2), 16),
|
|
502
|
+
parseInt(raw.slice(2, 4), 16),
|
|
503
|
+
parseInt(raw.slice(4, 6), 16)
|
|
504
|
+
];
|
|
505
|
+
}
|
|
506
|
+
function isThemeTintedBadgeColouring(textColor, fill, border) {
|
|
507
|
+
const primary = hexChannels(textColor);
|
|
508
|
+
const bg = hexChannels(fill);
|
|
509
|
+
const line = hexChannels(border);
|
|
510
|
+
if (!primary || !bg || !line) return false;
|
|
511
|
+
const mixed = (surface, to, share) => Math.round(surface + (to - surface) * share);
|
|
512
|
+
return primary.every((p, i) => {
|
|
513
|
+
for (let surface = 0; surface <= 255; surface += 1) {
|
|
514
|
+
if (mixed(surface, p, 0.08) === bg[i] && mixed(surface, p, 0.3) === line[i]) return true;
|
|
515
|
+
}
|
|
516
|
+
return false;
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
function isDefaultBadgeSet(badges) {
|
|
520
|
+
if (badges.length !== DEFAULT_BADGES.length) return false;
|
|
521
|
+
const sameContent = badges.every(
|
|
522
|
+
(badge, i) => badge.id === _optionalChain([DEFAULT_BADGES, 'access', _4 => _4[i], 'optionalAccess', _5 => _5.id]) && badge.label === _optionalChain([DEFAULT_BADGES, 'access', _6 => _6[i], 'optionalAccess', _7 => _7.label])
|
|
523
|
+
);
|
|
524
|
+
if (!sameContent) return false;
|
|
525
|
+
const colouring = (set) => set.map((b) => [b.textColor, b.backgroundColor, _nullishCoalesce(b.borderColor, () => ( ""))].join("|").toLowerCase()).join("/");
|
|
526
|
+
const mine = colouring(badges);
|
|
527
|
+
if (mine === colouring(DEFAULT_BADGES) || mine === colouring(DEFAULT_BADGES_DARK)) return true;
|
|
528
|
+
const [first] = badges;
|
|
529
|
+
const border = _optionalChain([first, 'optionalAccess', _8 => _8.borderColor]);
|
|
530
|
+
if (!first || !border) return false;
|
|
531
|
+
const same = (a, b) => (_nullishCoalesce(a, () => ( ""))).toLowerCase() === b.toLowerCase();
|
|
532
|
+
return badges.every(
|
|
533
|
+
(b) => same(b.textColor, first.textColor) && same(b.backgroundColor, first.backgroundColor) && same(b.borderColor, border)
|
|
534
|
+
) && isThemeTintedBadgeColouring(first.textColor, first.backgroundColor, border);
|
|
535
|
+
}
|
|
536
|
+
function resolveNoticesAndBadges(savedBadges, savedNotices) {
|
|
537
|
+
if (savedNotices !== null) {
|
|
538
|
+
return { trustBadges: _nullishCoalesce(savedBadges, () => ( [])), notices: savedNotices };
|
|
539
|
+
}
|
|
540
|
+
if (savedBadges === null || isDefaultBadgeSet(savedBadges)) {
|
|
541
|
+
return { trustBadges: [], notices: defaultNotices() };
|
|
542
|
+
}
|
|
543
|
+
return { trustBadges: savedBadges, notices: [] };
|
|
544
|
+
}
|
|
545
|
+
var METHOD_SECTION_ORDER_KEY = "methodSectionOrder";
|
|
546
|
+
var METHOD_SECTION_LABELS_KEY = "methodSectionLabels";
|
|
547
|
+
var MIN_SECTION_ORDER = 1;
|
|
548
|
+
var MAX_SECTION_ORDER = 100;
|
|
549
|
+
var MAX_SECTION_LABEL_LENGTH = 120;
|
|
550
|
+
var METHOD_SECTIONS = [
|
|
551
|
+
{ id: "card", labelKey: "sections.card", order: 10 },
|
|
552
|
+
{ id: "wallet", labelKey: "sections.wallets", order: 20 },
|
|
553
|
+
{ id: "bnpl", labelKey: "sections.bnpl", order: 30 },
|
|
554
|
+
{ id: "bank_redirect", labelKey: "sections.onlineBanking", order: 40 },
|
|
555
|
+
{ id: "bank_transfer", labelKey: "sections.bankTransfer", order: 45 },
|
|
556
|
+
{ id: "crypto", labelKey: "sections.cryptocurrency", order: 50 },
|
|
557
|
+
{ id: "game_items", labelKey: "sections.gameItems", order: 60 },
|
|
558
|
+
{ id: "voucher", labelKey: "sections.vouchers", order: 70 },
|
|
559
|
+
{ id: "gift_card", labelKey: "sections.giftCards", order: 75 },
|
|
560
|
+
{ id: "reward", labelKey: "sections.rewards", order: 80 },
|
|
561
|
+
{ id: "cash", labelKey: "sections.cash", order: 90 }
|
|
562
|
+
];
|
|
563
|
+
var SECTION_ALIASES = {
|
|
564
|
+
card_redirect: "card"
|
|
565
|
+
};
|
|
566
|
+
var UNKNOWN_SECTION_ORDER = MAX_SECTION_ORDER;
|
|
567
|
+
function canonicalSectionId(category) {
|
|
568
|
+
return _nullishCoalesce(SECTION_ALIASES[category], () => ( category));
|
|
569
|
+
}
|
|
570
|
+
function defaultMethodSectionOrder() {
|
|
571
|
+
const order = {};
|
|
572
|
+
for (const section of METHOD_SECTIONS) order[section.id] = section.order;
|
|
573
|
+
return order;
|
|
574
|
+
}
|
|
575
|
+
function validSectionOrder(raw) {
|
|
576
|
+
if (typeof raw !== "number" || !Number.isInteger(raw)) return null;
|
|
577
|
+
if (raw < MIN_SECTION_ORDER || raw > MAX_SECTION_ORDER) return null;
|
|
578
|
+
return raw;
|
|
579
|
+
}
|
|
580
|
+
function decodeMethodSectionOrder(raw) {
|
|
581
|
+
const order = defaultMethodSectionOrder();
|
|
582
|
+
if (raw === void 0) return order;
|
|
583
|
+
let parsed;
|
|
584
|
+
try {
|
|
585
|
+
parsed = JSON.parse(raw);
|
|
586
|
+
} catch (e) {
|
|
587
|
+
return order;
|
|
588
|
+
}
|
|
589
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return order;
|
|
590
|
+
for (const [key, value] of Object.entries(parsed)) {
|
|
591
|
+
const valid = validSectionOrder(value);
|
|
592
|
+
if (valid === null) continue;
|
|
593
|
+
order[canonicalSectionId(key)] = valid;
|
|
594
|
+
}
|
|
595
|
+
return order;
|
|
596
|
+
}
|
|
597
|
+
function encodeMethodSectionOrder(order) {
|
|
598
|
+
return JSON.stringify(order);
|
|
599
|
+
}
|
|
600
|
+
function decodeMethodSectionLabels(raw) {
|
|
601
|
+
if (raw === void 0) return {};
|
|
602
|
+
let parsed;
|
|
603
|
+
try {
|
|
604
|
+
parsed = JSON.parse(raw);
|
|
605
|
+
} catch (e2) {
|
|
606
|
+
return {};
|
|
607
|
+
}
|
|
608
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
609
|
+
const labels = {};
|
|
610
|
+
for (const [section, byLocale] of Object.entries(parsed)) {
|
|
611
|
+
if (!section || byLocale === null || typeof byLocale !== "object" || Array.isArray(byLocale)) {
|
|
612
|
+
continue;
|
|
613
|
+
}
|
|
614
|
+
const kept = {};
|
|
615
|
+
for (const [locale, text] of Object.entries(byLocale)) {
|
|
616
|
+
if (typeof text !== "string") continue;
|
|
617
|
+
const trimmed = text.trim();
|
|
618
|
+
if (!trimmed) continue;
|
|
619
|
+
kept[locale] = trimmed.slice(0, MAX_SECTION_LABEL_LENGTH);
|
|
620
|
+
}
|
|
621
|
+
if (Object.keys(kept).length > 0) labels[canonicalSectionId(section)] = kept;
|
|
622
|
+
}
|
|
623
|
+
return labels;
|
|
624
|
+
}
|
|
625
|
+
function encodeMethodSectionLabels(labels) {
|
|
626
|
+
const cleaned = {};
|
|
627
|
+
for (const [section, byLocale] of Object.entries(labels)) {
|
|
628
|
+
const kept = {};
|
|
629
|
+
for (const [locale, text] of Object.entries(byLocale)) {
|
|
630
|
+
const trimmed = (_nullishCoalesce(text, () => ( ""))).trim();
|
|
631
|
+
if (trimmed) kept[locale] = trimmed.slice(0, MAX_SECTION_LABEL_LENGTH);
|
|
632
|
+
}
|
|
633
|
+
if (Object.keys(kept).length > 0) cleaned[section] = kept;
|
|
634
|
+
}
|
|
635
|
+
return Object.keys(cleaned).length > 0 ? JSON.stringify(cleaned) : null;
|
|
636
|
+
}
|
|
637
|
+
function sectionCatalogueIndex(sectionId) {
|
|
638
|
+
const index = METHOD_SECTIONS.findIndex((section) => section.id === sectionId);
|
|
639
|
+
return index === -1 ? METHOD_SECTIONS.length : index;
|
|
640
|
+
}
|
|
641
|
+
function sectionOrderOf(order, category) {
|
|
642
|
+
return _nullishCoalesce(order[canonicalSectionId(category)], () => ( UNKNOWN_SECTION_ORDER));
|
|
643
|
+
}
|
|
644
|
+
function compareSections(order) {
|
|
645
|
+
return (a, b) => {
|
|
646
|
+
const left = canonicalSectionId(a);
|
|
647
|
+
const right = canonicalSectionId(b);
|
|
648
|
+
const byOrder = sectionOrderOf(order, left) - sectionOrderOf(order, right);
|
|
649
|
+
if (byOrder !== 0) return byOrder;
|
|
650
|
+
const byCatalogue = sectionCatalogueIndex(left) - sectionCatalogueIndex(right);
|
|
651
|
+
if (byCatalogue !== 0) return byCatalogue;
|
|
652
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
function sectionLabel(labels, category, locale, knownKey, translate) {
|
|
656
|
+
const id = canonicalSectionId(category);
|
|
657
|
+
if (id in labels) {
|
|
658
|
+
const captions = labels[id];
|
|
659
|
+
const matched = _optionalChain([translationFor, 'call', _9 => _9(captions, locale), 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]);
|
|
660
|
+
if (matched) return matched;
|
|
661
|
+
for (const value of Object.values(captions)) {
|
|
662
|
+
const any = value.trim();
|
|
663
|
+
if (any) return any;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
if (knownKey) {
|
|
667
|
+
const translated = translate(knownKey);
|
|
668
|
+
if (translated) return translated;
|
|
669
|
+
}
|
|
670
|
+
return category;
|
|
671
|
+
}
|
|
672
|
+
function parseSectionOrderLoose(raw) {
|
|
673
|
+
if (typeof raw === "string") return decodeMethodSectionOrder(raw);
|
|
674
|
+
if (raw !== null && typeof raw === "object" && !Array.isArray(raw)) {
|
|
675
|
+
return decodeMethodSectionOrder(JSON.stringify(raw));
|
|
676
|
+
}
|
|
677
|
+
return defaultMethodSectionOrder();
|
|
678
|
+
}
|
|
679
|
+
function parseSectionLabelsLoose(raw) {
|
|
680
|
+
if (typeof raw === "string") return decodeMethodSectionLabels(raw);
|
|
681
|
+
if (raw !== null && typeof raw === "object" && !Array.isArray(raw)) {
|
|
682
|
+
return decodeMethodSectionLabels(JSON.stringify(raw));
|
|
683
|
+
}
|
|
684
|
+
return {};
|
|
685
|
+
}
|
|
686
|
+
function knownSectionLabelKey(category) {
|
|
687
|
+
const id = canonicalSectionId(category);
|
|
688
|
+
return _optionalChain([METHOD_SECTIONS, 'access', _12 => _12.find, 'call', _13 => _13((section) => section.id === id), 'optionalAccess', _14 => _14.labelKey]);
|
|
689
|
+
}
|
|
690
|
+
var DEFAULT_BRANDING_BASE = {
|
|
691
|
+
displayName: "",
|
|
692
|
+
logoUrl: "",
|
|
693
|
+
tagline: "",
|
|
694
|
+
// Logo + summary gradient OFF by default — an unconfigured DeloPay
|
|
695
|
+
// checkout reads cleaner without a placeholder logo block, and the
|
|
696
|
+
// gradient implies a primary tint the merchant hasn't yet picked.
|
|
697
|
+
showLogo: false,
|
|
698
|
+
logoShape: "rounded",
|
|
699
|
+
logoSize: "md",
|
|
700
|
+
fontFamily: "inter",
|
|
701
|
+
headingWeight: "semibold",
|
|
702
|
+
radiusSurface: "medium",
|
|
703
|
+
radiusInput: "medium",
|
|
704
|
+
radiusButton: "medium",
|
|
705
|
+
radiusBadge: "pill",
|
|
706
|
+
surfaceStyle: "elevated",
|
|
707
|
+
surfacePadding: "comfortable",
|
|
708
|
+
verticalGap: "comfortable",
|
|
709
|
+
inputSize: "md",
|
|
710
|
+
buttonSize: "md",
|
|
711
|
+
// Disclosure on by default: with provider-scoped pricing the tile is where
|
|
712
|
+
// the buyer chooses between prices, and a price they cannot see is one they
|
|
713
|
+
// find out about on the statement.
|
|
714
|
+
showSurcharge: true,
|
|
715
|
+
surchargePosition: "trailing",
|
|
716
|
+
// The button is the surface a buyer recognises fastest; it leads its section
|
|
717
|
+
// unless the merchant says otherwise.
|
|
718
|
+
nativeElementPosition: "top",
|
|
719
|
+
// Side by side — see the field.
|
|
720
|
+
nativeElementStacked: false,
|
|
721
|
+
surchargeStyle: "badge",
|
|
722
|
+
surchargeSize: "sm",
|
|
723
|
+
surchargeShape: "pill",
|
|
724
|
+
surchargeBorderWidth: "thin",
|
|
725
|
+
surchargeBorderStyle: "solid",
|
|
726
|
+
surchargeWeight: "medium",
|
|
727
|
+
surchargeSign: "always",
|
|
728
|
+
surchargeUppercase: false,
|
|
729
|
+
// Named, not bare. A tile that reads "-EUR 2.50" beside a brand name is a
|
|
730
|
+
// number with no subject — buyers read it as the price, not as a change to
|
|
731
|
+
// it. "Discount -EUR 2.50" needs no interpreting, and the word is what makes
|
|
732
|
+
// the default configuration legible without the merchant touching anything.
|
|
733
|
+
surchargeLabel: "labelled",
|
|
734
|
+
// The two directions default differently on purpose, which is the whole
|
|
735
|
+
// reason they are two settings. A fee is something a buyer acts on in money,
|
|
736
|
+
// so it leads with money and says nothing else. A saving is something worth
|
|
737
|
+
// advertising, and the share is the persuasive half of it — "-5.1% (EUR
|
|
738
|
+
// 2.50)" sells what "-EUR 2.50" merely states, and the amount is still right
|
|
739
|
+
// there beside it.
|
|
740
|
+
surchargeFigure: "amount",
|
|
741
|
+
discountFigure: "percentThenAmount",
|
|
742
|
+
// Empty: the checkout's own localized words are the default, in every
|
|
743
|
+
// language it ships. A merchant fills these in only to say it differently.
|
|
744
|
+
surchargeWordTranslations: {},
|
|
745
|
+
discountWordTranslations: {},
|
|
746
|
+
// amber-700 / emerald-700, not the 600s: the `plain` style renders the
|
|
747
|
+
// disclosure as coloured TEXT, so it is bound by `WCAG_AA_TEXT` (4.5) rather
|
|
748
|
+
// than by the 3:1 a coloured shape would be, and the 600s come to 3.19 and
|
|
749
|
+
// 3.77 against the default white surface. These are 5.02 and 5.48, pinned by
|
|
750
|
+
// tests. Far enough apart to read as opposite news at a glance rather than as
|
|
751
|
+
// two shades of "extra".
|
|
752
|
+
surchargeColor: "#b45309",
|
|
753
|
+
discountColor: "#047857",
|
|
754
|
+
layout: "split",
|
|
755
|
+
summaryPosition: "left",
|
|
756
|
+
showOrderSummary: true,
|
|
757
|
+
summaryGradient: false,
|
|
758
|
+
showTotal: true,
|
|
759
|
+
totalLabel: "Total",
|
|
760
|
+
showCurrencyCode: false,
|
|
761
|
+
showOrderItems: true,
|
|
762
|
+
cancelLinkEnabled: true,
|
|
763
|
+
cancelLinkPosition: "top",
|
|
764
|
+
cancelLinkStyle: "link",
|
|
765
|
+
// Each flat field keeps its meaning: what the merchant wrote, used in every
|
|
766
|
+
// locale that carries no override. Empty maps therefore change nothing for a
|
|
767
|
+
// profile saved before translations existed.
|
|
768
|
+
headerText: "",
|
|
769
|
+
headerTextTranslations: {},
|
|
770
|
+
payButtonLabel: "",
|
|
771
|
+
payButtonLabelTranslations: {},
|
|
772
|
+
cardTermsMessage: "",
|
|
773
|
+
cardTermsMessageTranslations: {},
|
|
774
|
+
footerText: "",
|
|
775
|
+
footerTextTranslations: {},
|
|
776
|
+
supportEmail: "",
|
|
777
|
+
paymentLayout: "tabs",
|
|
778
|
+
labelStyle: "above",
|
|
779
|
+
showPoweredBy: true,
|
|
780
|
+
// Every one of these defaults to what the Airwallex pane already did before
|
|
781
|
+
// the section existed, so a merchant who never opens it sees no change:
|
|
782
|
+
// empty preset (defer to the connector account), an outlined box, 16px /
|
|
783
|
+
// 500 type, no focus ring, the browser's own autofill highlight, no valid
|
|
784
|
+
// tint, no marks. The single deliberate change of behaviour is not here —
|
|
785
|
+
// it is the fallback at the END of `resolveAirwallexCardPreset`, which
|
|
786
|
+
// moves a shop that configured NOTHING from the combined row to the
|
|
787
|
+
// labelled split form.
|
|
788
|
+
airwallexCardPreset: "",
|
|
789
|
+
// Off. With this on, no buyer can pay by card on the shop.
|
|
790
|
+
airwallexHideCard: false,
|
|
791
|
+
// Off: the section is named, like every other section on the surface.
|
|
792
|
+
airwallexHideCardTitle: false,
|
|
793
|
+
airwallexFieldChrome: "outlined",
|
|
794
|
+
airwallexLabelStyle: "",
|
|
795
|
+
airwallexFieldFontSize: "md",
|
|
796
|
+
airwallexFieldWeight: "medium",
|
|
797
|
+
airwallexFocusRing: "none",
|
|
798
|
+
airwallexAutofill: "system",
|
|
799
|
+
airwallexValidTint: false,
|
|
800
|
+
airwallexNetworkMarks: false,
|
|
801
|
+
// Every card-form field below starts on what its pane drew before the
|
|
802
|
+
// setting existed, so a merchant who never opens a section sees no change.
|
|
803
|
+
stripeTheme: "auto",
|
|
804
|
+
stripeInputs: "spaced",
|
|
805
|
+
stripeLabels: "above",
|
|
806
|
+
stripeSpacing: "comfortable",
|
|
807
|
+
stripeFieldFontSize: "md",
|
|
808
|
+
stripeFieldWeight: "medium",
|
|
809
|
+
stripeFocusRing: "strong",
|
|
810
|
+
stripeDisableAnimations: false,
|
|
811
|
+
paypalCardLayout: "split",
|
|
812
|
+
paypalLabelStyle: "above",
|
|
813
|
+
paypalFieldChrome: "outlined",
|
|
814
|
+
mollieFieldChrome: "outlined",
|
|
815
|
+
paypalFieldFontSize: "md",
|
|
816
|
+
mollieFieldFontSize: "md",
|
|
817
|
+
paypalFieldWeight: "regular",
|
|
818
|
+
mollieFieldWeight: "regular",
|
|
819
|
+
paypalFocusRing: "strong",
|
|
820
|
+
mollieFocusRing: "strong",
|
|
821
|
+
paypalValidTint: false,
|
|
822
|
+
epayoutsCardLayout: "split",
|
|
823
|
+
epayoutsLabelStyle: "above",
|
|
824
|
+
epayoutsFieldChrome: "outlined",
|
|
825
|
+
epayoutsFieldFontSize: "md",
|
|
826
|
+
epayoutsFieldWeight: "regular",
|
|
827
|
+
epayoutsFocusRing: "strong",
|
|
828
|
+
epayoutsValidTint: false,
|
|
829
|
+
nomupayFormStyle: "plain",
|
|
830
|
+
nomupayShowLabels: true,
|
|
831
|
+
nomupayShowPlaceholders: true,
|
|
832
|
+
nomupayShowCvvHint: false,
|
|
833
|
+
nomupayFieldChrome: "outlined",
|
|
834
|
+
nomupayFieldFontSize: "md",
|
|
835
|
+
nomupayFocusRing: "none",
|
|
836
|
+
nomupayApplePayButtonStyle: "auto",
|
|
837
|
+
nomupayApplePayButtonType: "pay",
|
|
838
|
+
nomupayGooglePayButtonColor: "auto",
|
|
839
|
+
nomupayGooglePayButtonType: "pay",
|
|
840
|
+
micropaymentFieldChrome: "outlined",
|
|
841
|
+
micropaymentFieldFontSize: "md",
|
|
842
|
+
micropaymentFieldWeight: "regular",
|
|
843
|
+
micropaymentFocusRing: "strong",
|
|
844
|
+
whopCardPreset: "card_stacked",
|
|
845
|
+
whopAccentColor: "auto",
|
|
846
|
+
whopGrayColor: "auto",
|
|
847
|
+
whopBillingDetails: "minimal",
|
|
848
|
+
whopSeparated: false,
|
|
849
|
+
whopEmailLabel: "above",
|
|
850
|
+
whopFieldChrome: "outlined",
|
|
851
|
+
whopFieldFontSize: "md",
|
|
852
|
+
whopFieldWeight: "regular",
|
|
853
|
+
whopFocusRing: "strong",
|
|
854
|
+
whopRadius: "checkout",
|
|
855
|
+
whopShadow: "soft",
|
|
856
|
+
whopMethodIcons: true,
|
|
857
|
+
whopSelection: "radio_tint",
|
|
858
|
+
customCss: "",
|
|
859
|
+
// The Enigma Vault card form: the Stripe-like template.
|
|
860
|
+
..._chunk5CITBN33cjs.DEFAULT_ENIGMA_CARD_FORM
|
|
861
|
+
};
|
|
862
|
+
var DEFAULT_BRANDING = {
|
|
863
|
+
...DEFAULT_BRANDING_BASE,
|
|
864
|
+
...LIGHT_PALETTE,
|
|
865
|
+
// No badges by default any more — notices took their place.
|
|
866
|
+
// `DEFAULT_BADGES` stays exported because `isDefaultBadgeSet` still has to
|
|
867
|
+
// recognise the pair on shops saved before.
|
|
868
|
+
trustBadges: [],
|
|
869
|
+
notices: defaultNotices(),
|
|
870
|
+
customFields: [],
|
|
871
|
+
methodSectionOrder: defaultMethodSectionOrder(),
|
|
872
|
+
methodSectionLabels: {}
|
|
873
|
+
};
|
|
874
|
+
var DEFAULT_BRANDING_DARK = {
|
|
875
|
+
...DEFAULT_BRANDING_BASE,
|
|
876
|
+
primary: "#1E4FEB",
|
|
877
|
+
background: "#020617",
|
|
878
|
+
surface: "#0f172a",
|
|
879
|
+
text: "#e2e8f0",
|
|
880
|
+
heading: "#f8fafc",
|
|
881
|
+
muted: "#94a3b8",
|
|
882
|
+
border: "#1e293b",
|
|
883
|
+
accentText: "#60a5fa",
|
|
884
|
+
buttonBackground: "#1E4FEB",
|
|
885
|
+
buttonText: "#ffffff",
|
|
886
|
+
surfaceStyle: "flat",
|
|
887
|
+
// amber-400 / emerald-400: the 700s above are far too dark to read on
|
|
888
|
+
// slate-900, and this pair is the same news in the same order at the light
|
|
889
|
+
// end of the ramp — 10.69 and 9.29 against the dark surface, also pinned.
|
|
890
|
+
surchargeColor: "#fbbf24",
|
|
891
|
+
discountColor: "#34d399",
|
|
892
|
+
trustBadges: [],
|
|
893
|
+
notices: defaultNotices(),
|
|
894
|
+
customFields: [],
|
|
895
|
+
methodSectionOrder: defaultMethodSectionOrder(),
|
|
896
|
+
methodSectionLabels: {}
|
|
897
|
+
};
|
|
898
|
+
function defaultBranding() {
|
|
899
|
+
return cloneBranding(DEFAULT_BRANDING);
|
|
900
|
+
}
|
|
901
|
+
function cloneBranding(b) {
|
|
902
|
+
return {
|
|
903
|
+
...b,
|
|
904
|
+
trustBadges: b.trustBadges.map((badge) => ({ ...badge })),
|
|
905
|
+
notices: b.notices.map(cloneNotice),
|
|
906
|
+
customFields: b.customFields.map(cloneCustomField),
|
|
907
|
+
methodSectionOrder: { ...b.methodSectionOrder },
|
|
908
|
+
methodSectionLabels: Object.fromEntries(
|
|
909
|
+
Object.entries(b.methodSectionLabels).map(([id, byLocale]) => [id, { ...byLocale }])
|
|
910
|
+
),
|
|
911
|
+
// Copied, not shared. A spread alone would leave the clone pointing at the
|
|
912
|
+
// original's maps, and the dashboard edits a clone precisely so the form
|
|
913
|
+
// can be abandoned without touching what is saved.
|
|
914
|
+
surchargeWordTranslations: { ...b.surchargeWordTranslations },
|
|
915
|
+
discountWordTranslations: { ...b.discountWordTranslations },
|
|
916
|
+
headerTextTranslations: { ...b.headerTextTranslations },
|
|
917
|
+
payButtonLabelTranslations: { ...b.payButtonLabelTranslations },
|
|
918
|
+
cardTermsMessageTranslations: { ...b.cardTermsMessageTranslations },
|
|
919
|
+
footerTextTranslations: { ...b.footerTextTranslations }
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
function cloneCustomField(f) {
|
|
923
|
+
return {
|
|
924
|
+
...f,
|
|
925
|
+
labelTranslations: { ...f.labelTranslations },
|
|
926
|
+
placeholderTranslations: { ...f.placeholderTranslations },
|
|
927
|
+
helpTextTranslations: { ...f.helpTextTranslations },
|
|
928
|
+
options: f.options.map((o) => ({ ...o, labelTranslations: { ...o.labelTranslations } })),
|
|
929
|
+
visibility: {
|
|
930
|
+
...f.visibility,
|
|
931
|
+
conditions: f.visibility.conditions.map((c) => ({ ...c }))
|
|
932
|
+
}
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
var CUSTOM_CSS_MAX_LENGTH = 5e4;
|
|
936
|
+
function sanitizeCustomCss(raw) {
|
|
937
|
+
if (typeof raw !== "string") return null;
|
|
938
|
+
const trimmed = raw.trim();
|
|
939
|
+
if (trimmed.length === 0) return null;
|
|
940
|
+
if (trimmed.length > CUSTOM_CSS_MAX_LENGTH) return null;
|
|
941
|
+
let out = trimmed;
|
|
942
|
+
out = out.replace(/<\/style/gi, "<\\/style");
|
|
943
|
+
out = out.replace(/@import\b[^;]*;?/gi, "");
|
|
944
|
+
out = out.replace(/expression\s*\(/gi, "/* expression( */");
|
|
945
|
+
out = out.replace(/(^|[^a-z-])behavior\s*:/gi, "$1/* behavior: */");
|
|
946
|
+
out = out.replace(/-moz-binding\s*:/gi, "/* -moz-binding: */");
|
|
947
|
+
out = out.replace(/url\s*\(\s*["']?\s*javascript:/gi, "url(invalid:");
|
|
948
|
+
return out;
|
|
949
|
+
}
|
|
950
|
+
var BRANDING_GROUP_KEY = "branding";
|
|
951
|
+
var ALL_FONT_FAMILIES = [
|
|
952
|
+
"inter",
|
|
953
|
+
"system",
|
|
954
|
+
"serif",
|
|
955
|
+
"mono",
|
|
956
|
+
"roboto",
|
|
957
|
+
"poppins",
|
|
958
|
+
"manrope",
|
|
959
|
+
"dm-sans",
|
|
960
|
+
"space-grotesk",
|
|
961
|
+
"plex-sans",
|
|
962
|
+
"work-sans",
|
|
963
|
+
"open-sans",
|
|
964
|
+
"lora",
|
|
965
|
+
"playfair",
|
|
966
|
+
"plex-mono",
|
|
967
|
+
"jetbrains-mono"
|
|
968
|
+
];
|
|
969
|
+
var ALL_RADII = ["square", "small", "medium", "large", "pill"];
|
|
970
|
+
var NON_PILL_RADII = ["square", "small", "medium", "large"];
|
|
971
|
+
function pickEnum(value, allowed, fallback) {
|
|
972
|
+
if (typeof value !== "string") return fallback;
|
|
973
|
+
return allowed.includes(value) ? value : fallback;
|
|
974
|
+
}
|
|
975
|
+
function pickEnumOrEmpty(value, allowed) {
|
|
976
|
+
if (typeof value !== "string") return "";
|
|
977
|
+
return allowed.includes(value) ? value : "";
|
|
978
|
+
}
|
|
979
|
+
function parseBool(value, fallback) {
|
|
980
|
+
if (typeof value === "boolean") return value;
|
|
981
|
+
if (value === "true") return true;
|
|
982
|
+
if (value === "false") return false;
|
|
983
|
+
return fallback;
|
|
984
|
+
}
|
|
985
|
+
function s(value) {
|
|
986
|
+
return typeof value === "string" ? value : "";
|
|
987
|
+
}
|
|
988
|
+
function decodeBadges(raw) {
|
|
989
|
+
if (raw === void 0) return null;
|
|
990
|
+
try {
|
|
991
|
+
const parsed = JSON.parse(raw);
|
|
992
|
+
if (!Array.isArray(parsed)) return null;
|
|
993
|
+
return parsed.filter((b) => !!b && typeof b === "object").map((b, i) => ({
|
|
994
|
+
id: typeof b["id"] === "string" && b["id"] ? b["id"] : `badge-${i}`,
|
|
995
|
+
label: typeof b["label"] === "string" ? b["label"] : "",
|
|
996
|
+
textColor: typeof b["textColor"] === "string" ? b["textColor"] : "#0f172a",
|
|
997
|
+
backgroundColor: typeof b["backgroundColor"] === "string" ? b["backgroundColor"] : "#f1f5f9",
|
|
998
|
+
borderColor: typeof b["borderColor"] === "string" && b["borderColor"] ? b["borderColor"] : null
|
|
999
|
+
})).filter((b) => b.label.length > 0);
|
|
1000
|
+
} catch (e3) {
|
|
1001
|
+
return null;
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
function encodeBadges(badges) {
|
|
1005
|
+
return JSON.stringify(
|
|
1006
|
+
badges.map((b) => ({
|
|
1007
|
+
id: b.id,
|
|
1008
|
+
label: b.label,
|
|
1009
|
+
textColor: b.textColor,
|
|
1010
|
+
backgroundColor: b.backgroundColor,
|
|
1011
|
+
...b.borderColor ? { borderColor: b.borderColor } : {}
|
|
1012
|
+
}))
|
|
1013
|
+
);
|
|
1014
|
+
}
|
|
1015
|
+
var NOTICE_ID_MAX_LENGTH = 40;
|
|
1016
|
+
function capNoticeText(value) {
|
|
1017
|
+
return Array.from(value).slice(0, NOTICE_LABEL_MAX_LENGTH).join("");
|
|
1018
|
+
}
|
|
1019
|
+
function normalizeNotices(list) {
|
|
1020
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1021
|
+
const perSection = /* @__PURE__ */ new Map();
|
|
1022
|
+
const out = [];
|
|
1023
|
+
list.forEach((raw, index) => {
|
|
1024
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return;
|
|
1025
|
+
const src = raw;
|
|
1026
|
+
const label = typeof src["label"] === "string" ? capNoticeText(src["label"]) : "";
|
|
1027
|
+
const labelTranslations = {};
|
|
1028
|
+
for (const [locale, text] of Object.entries(parseTranslations(src["labelTranslations"]))) {
|
|
1029
|
+
labelTranslations[locale] = capNoticeText(text);
|
|
1030
|
+
}
|
|
1031
|
+
if (label.trim().length === 0 && Object.keys(labelTranslations).length === 0) return;
|
|
1032
|
+
const section = pickEnum(src["section"], NOTICE_SECTIONS, "summary");
|
|
1033
|
+
const used = _nullishCoalesce(perSection.get(section), () => ( 0));
|
|
1034
|
+
if (used >= NOTICES_PER_SECTION) return;
|
|
1035
|
+
perSection.set(section, used + 1);
|
|
1036
|
+
let id = typeof src["id"] === "string" ? src["id"].replace(/[^A-Za-z0-9_-]/g, "").slice(0, NOTICE_ID_MAX_LENGTH) : "";
|
|
1037
|
+
if (!id || seen.has(id)) id = `notice-${index + 1}`;
|
|
1038
|
+
while (seen.has(id)) id = `${id}x`;
|
|
1039
|
+
seen.add(id);
|
|
1040
|
+
out.push({
|
|
1041
|
+
id,
|
|
1042
|
+
section,
|
|
1043
|
+
icon: isNoticeIcon(src["icon"]) ? src["icon"] : NOTICE_ICON_FALLBACK,
|
|
1044
|
+
label,
|
|
1045
|
+
labelTranslations
|
|
1046
|
+
});
|
|
1047
|
+
});
|
|
1048
|
+
return out;
|
|
1049
|
+
}
|
|
1050
|
+
function decodeNotices(raw) {
|
|
1051
|
+
if (raw === void 0) return null;
|
|
1052
|
+
let parsed;
|
|
1053
|
+
try {
|
|
1054
|
+
parsed = JSON.parse(raw);
|
|
1055
|
+
} catch (e4) {
|
|
1056
|
+
return null;
|
|
1057
|
+
}
|
|
1058
|
+
return Array.isArray(parsed) ? normalizeNotices(parsed) : null;
|
|
1059
|
+
}
|
|
1060
|
+
function parseNoticesLoose(raw) {
|
|
1061
|
+
if (typeof raw === "string") return decodeNotices(raw);
|
|
1062
|
+
return Array.isArray(raw) ? normalizeNotices(raw) : null;
|
|
1063
|
+
}
|
|
1064
|
+
function encodeNotices(notices) {
|
|
1065
|
+
return JSON.stringify(
|
|
1066
|
+
notices.map((n) => {
|
|
1067
|
+
const translations = Object.entries(n.labelTranslations).filter(
|
|
1068
|
+
([, text]) => text.trim().length > 0
|
|
1069
|
+
);
|
|
1070
|
+
return {
|
|
1071
|
+
id: n.id,
|
|
1072
|
+
section: n.section,
|
|
1073
|
+
icon: n.icon,
|
|
1074
|
+
label: n.label,
|
|
1075
|
+
...translations.length > 0 ? { labelTranslations: Object.fromEntries(translations) } : {}
|
|
1076
|
+
};
|
|
1077
|
+
})
|
|
1078
|
+
);
|
|
1079
|
+
}
|
|
1080
|
+
function noticeText(notice, locale) {
|
|
1081
|
+
return _nullishCoalesce(translationFor(notice.labelTranslations, locale), () => ( notice.label));
|
|
1082
|
+
}
|
|
1083
|
+
function noticesIn(notices, section) {
|
|
1084
|
+
return notices.filter((n) => n.section === section).slice(0, NOTICES_PER_SECTION);
|
|
1085
|
+
}
|
|
1086
|
+
function shownNotices(notices, section, locale) {
|
|
1087
|
+
return noticesIn(notices, section).map((notice) => ({ notice, text: noticeText(notice, locale).trim() })).filter((entry) => entry.text.length > 0);
|
|
1088
|
+
}
|
|
1089
|
+
var CUSTOM_FIELDS_MAX = 20;
|
|
1090
|
+
var CUSTOM_FIELD_KEY_PATTERN = /^[A-Za-z][A-Za-z0-9_-]{0,39}$/;
|
|
1091
|
+
var ALL_CUSTOM_FIELD_TYPES = [
|
|
1092
|
+
"text",
|
|
1093
|
+
"textarea",
|
|
1094
|
+
"password",
|
|
1095
|
+
"email",
|
|
1096
|
+
"select",
|
|
1097
|
+
"checkbox"
|
|
1098
|
+
];
|
|
1099
|
+
var CHECKBOX_CHECKED = "true";
|
|
1100
|
+
var CHECKBOX_UNCHECKED = "false";
|
|
1101
|
+
function isCheckboxChecked(value) {
|
|
1102
|
+
return typeof value === "string" && value.trim().toLowerCase() === CHECKBOX_CHECKED;
|
|
1103
|
+
}
|
|
1104
|
+
function customFieldIsTextLike(type) {
|
|
1105
|
+
return type !== "select" && type !== "checkbox";
|
|
1106
|
+
}
|
|
1107
|
+
var CUSTOM_FIELD_CONDITIONS_MAX = 10;
|
|
1108
|
+
var ALL_CUSTOM_FIELD_CONDITION_SOURCES = [
|
|
1109
|
+
"metadata",
|
|
1110
|
+
"currency",
|
|
1111
|
+
"amount"
|
|
1112
|
+
];
|
|
1113
|
+
var ALL_CUSTOM_FIELD_OPERATORS = [
|
|
1114
|
+
"equals",
|
|
1115
|
+
"not_equals",
|
|
1116
|
+
"contains",
|
|
1117
|
+
"not_contains",
|
|
1118
|
+
"starts_with",
|
|
1119
|
+
"ends_with",
|
|
1120
|
+
"in",
|
|
1121
|
+
"not_in",
|
|
1122
|
+
"exists",
|
|
1123
|
+
"not_exists",
|
|
1124
|
+
"gt",
|
|
1125
|
+
"gte",
|
|
1126
|
+
"lt",
|
|
1127
|
+
"lte"
|
|
1128
|
+
];
|
|
1129
|
+
var CUSTOM_FIELD_OPERATORS_BY_SOURCE = {
|
|
1130
|
+
metadata: ALL_CUSTOM_FIELD_OPERATORS,
|
|
1131
|
+
currency: ["equals", "not_equals", "in", "not_in"],
|
|
1132
|
+
amount: ["equals", "not_equals", "gt", "gte", "lt", "lte"]
|
|
1133
|
+
};
|
|
1134
|
+
var CUSTOM_FIELD_VALUELESS_OPERATORS = [
|
|
1135
|
+
"exists",
|
|
1136
|
+
"not_exists"
|
|
1137
|
+
];
|
|
1138
|
+
function customFieldOperatorTakesValue(operator) {
|
|
1139
|
+
return !CUSTOM_FIELD_VALUELESS_OPERATORS.includes(operator);
|
|
1140
|
+
}
|
|
1141
|
+
function defaultOperatorForSource(source) {
|
|
1142
|
+
return _nullishCoalesce(CUSTOM_FIELD_OPERATORS_BY_SOURCE[source][0], () => ( "equals"));
|
|
1143
|
+
}
|
|
1144
|
+
function defaultCustomFieldVisibility() {
|
|
1145
|
+
return { mode: "always", match: "all", conditions: [] };
|
|
1146
|
+
}
|
|
1147
|
+
function parseTranslations(raw) {
|
|
1148
|
+
let value = raw;
|
|
1149
|
+
if (typeof value === "string") {
|
|
1150
|
+
try {
|
|
1151
|
+
value = JSON.parse(value);
|
|
1152
|
+
} catch (e5) {
|
|
1153
|
+
return {};
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return {};
|
|
1157
|
+
const out = {};
|
|
1158
|
+
for (const [k, v] of Object.entries(value)) {
|
|
1159
|
+
if (typeof v === "string" && v.trim().length > 0) out[k] = v;
|
|
1160
|
+
}
|
|
1161
|
+
return out;
|
|
1162
|
+
}
|
|
1163
|
+
function encodeTranslations(map) {
|
|
1164
|
+
const entries = Object.entries(map).filter(([, v]) => v.trim().length > 0);
|
|
1165
|
+
return entries.length > 0 ? JSON.stringify(Object.fromEntries(entries)) : void 0;
|
|
1166
|
+
}
|
|
1167
|
+
function normalizeCondition(raw, index) {
|
|
1168
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null;
|
|
1169
|
+
const c = raw;
|
|
1170
|
+
const source = pickEnum(
|
|
1171
|
+
c["source"],
|
|
1172
|
+
ALL_CUSTOM_FIELD_CONDITION_SOURCES,
|
|
1173
|
+
"metadata"
|
|
1174
|
+
);
|
|
1175
|
+
const allowed = CUSTOM_FIELD_OPERATORS_BY_SOURCE[source];
|
|
1176
|
+
const operator = pickEnum(
|
|
1177
|
+
c["operator"],
|
|
1178
|
+
allowed,
|
|
1179
|
+
defaultOperatorForSource(source)
|
|
1180
|
+
);
|
|
1181
|
+
const rawValue = c["value"];
|
|
1182
|
+
return {
|
|
1183
|
+
id: typeof c["id"] === "string" && c["id"] ? c["id"] : `cond-${index}`,
|
|
1184
|
+
source,
|
|
1185
|
+
// Only metadata conditions carry a key; drop anything else so the
|
|
1186
|
+
// encoded form stays canonical.
|
|
1187
|
+
key: source === "metadata" && typeof c["key"] === "string" ? c["key"].trim() : "",
|
|
1188
|
+
operator,
|
|
1189
|
+
value: typeof rawValue === "string" ? rawValue : typeof rawValue === "number" || typeof rawValue === "boolean" ? String(rawValue) : ""
|
|
1190
|
+
};
|
|
1191
|
+
}
|
|
1192
|
+
function normalizeVisibility(raw) {
|
|
1193
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return defaultCustomFieldVisibility();
|
|
1194
|
+
const v = raw;
|
|
1195
|
+
const conditions = Array.isArray(v["conditions"]) ? v["conditions"].slice(0, CUSTOM_FIELD_CONDITIONS_MAX).map(normalizeCondition).filter((c) => c !== null) : [];
|
|
1196
|
+
return {
|
|
1197
|
+
mode: pickEnum(v["mode"], ["always", "match"], "always"),
|
|
1198
|
+
match: pickEnum(v["match"], ["all", "any"], "all"),
|
|
1199
|
+
conditions
|
|
1200
|
+
};
|
|
1201
|
+
}
|
|
1202
|
+
function parseBoundedInt(raw) {
|
|
1203
|
+
const n = typeof raw === "number" ? raw : typeof raw === "string" ? Number(raw) : NaN;
|
|
1204
|
+
if (!Number.isInteger(n) || n < 0) return null;
|
|
1205
|
+
return Math.min(n, 5e3);
|
|
1206
|
+
}
|
|
1207
|
+
function normalizeCustomField(raw, index) {
|
|
1208
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null;
|
|
1209
|
+
const f = raw;
|
|
1210
|
+
const key = typeof f["key"] === "string" ? f["key"].trim() : "";
|
|
1211
|
+
if (!CUSTOM_FIELD_KEY_PATTERN.test(key)) return null;
|
|
1212
|
+
const type = pickEnum(f["type"], ALL_CUSTOM_FIELD_TYPES, "text");
|
|
1213
|
+
const options = type === "select" && Array.isArray(f["options"]) ? f["options"].filter((o) => !!o && typeof o === "object").map((o) => {
|
|
1214
|
+
const value = typeof o["value"] === "string" ? o["value"] : "";
|
|
1215
|
+
return {
|
|
1216
|
+
value,
|
|
1217
|
+
label: typeof o["label"] === "string" && o["label"] ? o["label"] : value,
|
|
1218
|
+
labelTranslations: parseTranslations(o["labelTranslations"])
|
|
1219
|
+
};
|
|
1220
|
+
}).filter((o) => o.value.length > 0) : [];
|
|
1221
|
+
const textLike = customFieldIsTextLike(type);
|
|
1222
|
+
const minLength = textLike ? parseBoundedInt(f["minLength"]) : null;
|
|
1223
|
+
const maxLength = textLike ? parseBoundedInt(f["maxLength"]) : null;
|
|
1224
|
+
const rawDefault = typeof f["defaultValue"] === "string" ? f["defaultValue"] : "";
|
|
1225
|
+
const defaultValue = type === "checkbox" ? isCheckboxChecked(rawDefault) ? CHECKBOX_CHECKED : CHECKBOX_UNCHECKED : rawDefault;
|
|
1226
|
+
return {
|
|
1227
|
+
id: typeof f["id"] === "string" && f["id"] ? f["id"] : `field-${index}`,
|
|
1228
|
+
key,
|
|
1229
|
+
type,
|
|
1230
|
+
label: typeof f["label"] === "string" && f["label"] ? f["label"] : key,
|
|
1231
|
+
labelTranslations: parseTranslations(f["labelTranslations"]),
|
|
1232
|
+
placeholder: typeof f["placeholder"] === "string" ? f["placeholder"] : "",
|
|
1233
|
+
placeholderTranslations: parseTranslations(f["placeholderTranslations"]),
|
|
1234
|
+
helpText: typeof f["helpText"] === "string" ? f["helpText"] : "",
|
|
1235
|
+
helpTextTranslations: parseTranslations(f["helpTextTranslations"]),
|
|
1236
|
+
required: parseBool(f["required"], false),
|
|
1237
|
+
enabled: parseBool(f["enabled"], true),
|
|
1238
|
+
minLength,
|
|
1239
|
+
// Guard inverted bounds at decode so consumers never see min > max.
|
|
1240
|
+
maxLength: maxLength !== null && minLength !== null && maxLength < minLength ? null : maxLength,
|
|
1241
|
+
defaultValue,
|
|
1242
|
+
options,
|
|
1243
|
+
visibility: normalizeVisibility(f["visibility"])
|
|
1244
|
+
};
|
|
1245
|
+
}
|
|
1246
|
+
function parseCustomFieldsLoose(raw) {
|
|
1247
|
+
if (!Array.isArray(raw)) return null;
|
|
1248
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1249
|
+
const out = [];
|
|
1250
|
+
for (let i = 0; i < raw.length && out.length < CUSTOM_FIELDS_MAX; i++) {
|
|
1251
|
+
const field = normalizeCustomField(raw[i], i);
|
|
1252
|
+
if (!field || seen.has(field.key)) continue;
|
|
1253
|
+
seen.add(field.key);
|
|
1254
|
+
out.push(field);
|
|
1255
|
+
}
|
|
1256
|
+
return out;
|
|
1257
|
+
}
|
|
1258
|
+
function decodeCustomFields(raw) {
|
|
1259
|
+
if (raw === void 0) return null;
|
|
1260
|
+
try {
|
|
1261
|
+
return parseCustomFieldsLoose(JSON.parse(raw));
|
|
1262
|
+
} catch (e6) {
|
|
1263
|
+
return null;
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
function encodeCustomFields(fields) {
|
|
1267
|
+
const nonEmpty = (m) => {
|
|
1268
|
+
const entries = Object.entries(m).filter(([, v]) => v.trim().length > 0);
|
|
1269
|
+
return entries.length > 0 ? Object.fromEntries(entries) : void 0;
|
|
1270
|
+
};
|
|
1271
|
+
return JSON.stringify(
|
|
1272
|
+
fields.map((f) => ({
|
|
1273
|
+
id: f.id,
|
|
1274
|
+
key: f.key,
|
|
1275
|
+
type: f.type,
|
|
1276
|
+
label: f.label,
|
|
1277
|
+
...nonEmpty(f.labelTranslations) ? { labelTranslations: nonEmpty(f.labelTranslations) } : {},
|
|
1278
|
+
...f.placeholder ? { placeholder: f.placeholder } : {},
|
|
1279
|
+
...nonEmpty(f.placeholderTranslations) ? { placeholderTranslations: nonEmpty(f.placeholderTranslations) } : {},
|
|
1280
|
+
...f.helpText ? { helpText: f.helpText } : {},
|
|
1281
|
+
...nonEmpty(f.helpTextTranslations) ? { helpTextTranslations: nonEmpty(f.helpTextTranslations) } : {},
|
|
1282
|
+
...f.required ? { required: true } : {},
|
|
1283
|
+
...f.enabled ? {} : { enabled: false },
|
|
1284
|
+
// Length bounds only exist for free-text types; a choice control that
|
|
1285
|
+
// still carries them is stale state the decoder would drop anyway.
|
|
1286
|
+
...customFieldIsTextLike(f.type) && f.minLength !== null ? { minLength: f.minLength } : {},
|
|
1287
|
+
...customFieldIsTextLike(f.type) && f.maxLength !== null ? { maxLength: f.maxLength } : {},
|
|
1288
|
+
// A checkbox persists only "starts ticked"; unticked is the decoder's
|
|
1289
|
+
// default, so writing 'false' would be noise on every such field.
|
|
1290
|
+
...f.type === "checkbox" ? isCheckboxChecked(f.defaultValue) ? { defaultValue: CHECKBOX_CHECKED } : {} : f.defaultValue ? { defaultValue: f.defaultValue } : {},
|
|
1291
|
+
...f.type === "select" ? { options: f.options } : {},
|
|
1292
|
+
// Omitted for unconditional fields so the stored blob (and every
|
|
1293
|
+
// pre-feature payload) stays byte-identical to what it was.
|
|
1294
|
+
...f.visibility.mode === "match" ? { visibility: encodeVisibility(f.visibility) } : {}
|
|
1295
|
+
}))
|
|
1296
|
+
);
|
|
1297
|
+
}
|
|
1298
|
+
function encodeVisibility(v) {
|
|
1299
|
+
return {
|
|
1300
|
+
mode: v.mode,
|
|
1301
|
+
match: v.match,
|
|
1302
|
+
conditions: v.conditions.map((c) => ({
|
|
1303
|
+
id: c.id,
|
|
1304
|
+
source: c.source,
|
|
1305
|
+
...c.source === "metadata" && c.key ? { key: c.key } : {},
|
|
1306
|
+
operator: c.operator,
|
|
1307
|
+
...customFieldOperatorTakesValue(c.operator) && c.value ? { value: c.value } : {}
|
|
1308
|
+
}))
|
|
1309
|
+
};
|
|
1310
|
+
}
|
|
1311
|
+
function customFieldContextFromMetadata(raw) {
|
|
1312
|
+
const out = {};
|
|
1313
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return out;
|
|
1314
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
1315
|
+
const flat = flattenMetadataValue(value);
|
|
1316
|
+
if (flat !== null) out[key] = flat;
|
|
1317
|
+
}
|
|
1318
|
+
return out;
|
|
1319
|
+
}
|
|
1320
|
+
function flattenMetadataValue(value) {
|
|
1321
|
+
if (typeof value === "string") return value;
|
|
1322
|
+
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
1323
|
+
if (value === null || value === void 0) return null;
|
|
1324
|
+
if (Array.isArray(value)) {
|
|
1325
|
+
return value.map((v) => flattenMetadataValue(v)).filter((v) => v !== null).join(",");
|
|
1326
|
+
}
|
|
1327
|
+
try {
|
|
1328
|
+
return JSON.stringify(value);
|
|
1329
|
+
} catch (e7) {
|
|
1330
|
+
return null;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
function norm(value) {
|
|
1334
|
+
return value.trim().toLowerCase();
|
|
1335
|
+
}
|
|
1336
|
+
var DECIMAL_NUMBER_PATTERN = /^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/;
|
|
1337
|
+
function numeric(value) {
|
|
1338
|
+
const trimmed = value.trim();
|
|
1339
|
+
if (!DECIMAL_NUMBER_PATTERN.test(trimmed)) return null;
|
|
1340
|
+
const n = Number(trimmed);
|
|
1341
|
+
return Number.isFinite(n) ? n : null;
|
|
1342
|
+
}
|
|
1343
|
+
function splitList(value) {
|
|
1344
|
+
return value.split(",").map((part) => norm(part)).filter((part) => part.length > 0);
|
|
1345
|
+
}
|
|
1346
|
+
function operandFor(condition, ctx) {
|
|
1347
|
+
switch (condition.source) {
|
|
1348
|
+
case "currency":
|
|
1349
|
+
return ctx.currency;
|
|
1350
|
+
case "amount":
|
|
1351
|
+
return String(ctx.amount);
|
|
1352
|
+
case "metadata":
|
|
1353
|
+
return Object.prototype.hasOwnProperty.call(ctx.metadata, condition.key) ? ctx.metadata[condition.key] : void 0;
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
function evaluateCustomFieldCondition(condition, ctx) {
|
|
1357
|
+
const raw = operandFor(condition, ctx);
|
|
1358
|
+
const actual = _nullishCoalesce(raw, () => ( ""));
|
|
1359
|
+
const expected = condition.value;
|
|
1360
|
+
switch (condition.operator) {
|
|
1361
|
+
case "exists":
|
|
1362
|
+
return raw !== void 0 && raw.trim().length > 0;
|
|
1363
|
+
case "not_exists":
|
|
1364
|
+
return raw === void 0 || raw.trim().length === 0;
|
|
1365
|
+
case "equals":
|
|
1366
|
+
return norm(actual) === norm(expected);
|
|
1367
|
+
case "not_equals":
|
|
1368
|
+
return norm(actual) !== norm(expected);
|
|
1369
|
+
case "contains":
|
|
1370
|
+
return norm(actual).includes(norm(expected));
|
|
1371
|
+
case "not_contains":
|
|
1372
|
+
return !norm(actual).includes(norm(expected));
|
|
1373
|
+
case "starts_with":
|
|
1374
|
+
return norm(actual).startsWith(norm(expected));
|
|
1375
|
+
case "ends_with":
|
|
1376
|
+
return norm(actual).endsWith(norm(expected));
|
|
1377
|
+
case "in":
|
|
1378
|
+
return splitList(expected).includes(norm(actual));
|
|
1379
|
+
case "not_in":
|
|
1380
|
+
return !splitList(expected).includes(norm(actual));
|
|
1381
|
+
case "gt":
|
|
1382
|
+
case "gte":
|
|
1383
|
+
case "lt":
|
|
1384
|
+
case "lte": {
|
|
1385
|
+
const a = numeric(actual);
|
|
1386
|
+
const b = numeric(expected);
|
|
1387
|
+
if (a === null || b === null) return false;
|
|
1388
|
+
if (condition.operator === "gt") return a > b;
|
|
1389
|
+
if (condition.operator === "gte") return a >= b;
|
|
1390
|
+
if (condition.operator === "lt") return a < b;
|
|
1391
|
+
return a <= b;
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
function evaluateCustomFieldVisibility(field, ctx) {
|
|
1396
|
+
const { mode, match, conditions } = field.visibility;
|
|
1397
|
+
if (mode !== "match" || conditions.length === 0) return true;
|
|
1398
|
+
return match === "any" ? conditions.some((c) => evaluateCustomFieldCondition(c, ctx)) : conditions.every((c) => evaluateCustomFieldCondition(c, ctx));
|
|
1399
|
+
}
|
|
1400
|
+
function visibleCustomFields(fields, ctx) {
|
|
1401
|
+
return fields.filter((f) => f.enabled && evaluateCustomFieldVisibility(f, ctx));
|
|
1402
|
+
}
|
|
1403
|
+
function translationFor(map, locale) {
|
|
1404
|
+
if (!locale) return null;
|
|
1405
|
+
const folded = /* @__PURE__ */ new Map();
|
|
1406
|
+
for (const [k, v] of Object.entries(map)) {
|
|
1407
|
+
if (typeof v === "string" && v.length > 0 && !folded.has(k.toLowerCase())) {
|
|
1408
|
+
folded.set(k.toLowerCase(), v);
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
const parts = locale.toLowerCase().split("-");
|
|
1412
|
+
for (let i = parts.length; i > 0; i -= 1) {
|
|
1413
|
+
const hit = folded.get(parts.slice(0, i).join("-"));
|
|
1414
|
+
if (hit) return hit;
|
|
1415
|
+
}
|
|
1416
|
+
return null;
|
|
1417
|
+
}
|
|
1418
|
+
function customFieldText(field, part, locale) {
|
|
1419
|
+
const map = part === "label" ? field.labelTranslations : part === "placeholder" ? field.placeholderTranslations : field.helpTextTranslations;
|
|
1420
|
+
const translated = translationFor(map, locale);
|
|
1421
|
+
if (translated) return translated;
|
|
1422
|
+
const fallback = field[part];
|
|
1423
|
+
if (fallback) return fallback;
|
|
1424
|
+
return part === "label" ? field.key : "";
|
|
1425
|
+
}
|
|
1426
|
+
function customFieldOptionLabel(option, locale) {
|
|
1427
|
+
return _nullishCoalesce(translationFor(option.labelTranslations, locale), () => ( (option.label || option.value)));
|
|
1428
|
+
}
|
|
1429
|
+
function decodeBranding(source) {
|
|
1430
|
+
if (!source) return cloneBranding(DEFAULT_BRANDING);
|
|
1431
|
+
const extras = _nullishCoalesce(_optionalChain([source, 'access', _15 => _15.sdk_ui_rules, 'optionalAccess', _16 => _16[BRANDING_GROUP_KEY]]), () => ( {}));
|
|
1432
|
+
const trustRow = resolveNoticesAndBadges(
|
|
1433
|
+
decodeBadges(extras["trustBadges"]),
|
|
1434
|
+
decodeNotices(extras["notices"])
|
|
1435
|
+
);
|
|
1436
|
+
const decodedCustomFields = decodeCustomFields(extras["customFields"]);
|
|
1437
|
+
const displayName = s(source.merchant_name) || s(source.seller_name);
|
|
1438
|
+
const logoUrl = s(source.merchant_logo) || s(source.logo);
|
|
1439
|
+
const tagline = s(extras["tagline"]) || s(source.merchant_description);
|
|
1440
|
+
const labelStyle = (() => {
|
|
1441
|
+
const fromBag = extras["labelStyle"];
|
|
1442
|
+
if (fromBag === "above" || fromBag === "hidden") return fromBag;
|
|
1443
|
+
if (fromBag === "floating") return "above";
|
|
1444
|
+
const legacy = source.payment_form_label_type;
|
|
1445
|
+
if (legacy === "above" || legacy === "floating") return "above";
|
|
1446
|
+
if (legacy === "hidden" || legacy === "never") return "hidden";
|
|
1447
|
+
return DEFAULT_BRANDING.labelStyle;
|
|
1448
|
+
})();
|
|
1449
|
+
return {
|
|
1450
|
+
displayName,
|
|
1451
|
+
logoUrl,
|
|
1452
|
+
tagline,
|
|
1453
|
+
showLogo: parseBool(extras["showLogo"], DEFAULT_BRANDING.showLogo),
|
|
1454
|
+
logoShape: pickEnum(
|
|
1455
|
+
extras["logoShape"],
|
|
1456
|
+
["square", "rounded", "circle"],
|
|
1457
|
+
DEFAULT_BRANDING.logoShape
|
|
1458
|
+
),
|
|
1459
|
+
logoSize: pickEnum(extras["logoSize"], ["sm", "md", "lg"], DEFAULT_BRANDING.logoSize),
|
|
1460
|
+
primary: s(source.theme) || DEFAULT_BRANDING.primary,
|
|
1461
|
+
background: s(source.background_colour) || DEFAULT_BRANDING.background,
|
|
1462
|
+
surface: s(extras["surface"]) || DEFAULT_BRANDING.surface,
|
|
1463
|
+
text: s(extras["text"]) || DEFAULT_BRANDING.text,
|
|
1464
|
+
heading: s(extras["heading"]) || s(extras["text"]) || DEFAULT_BRANDING.heading,
|
|
1465
|
+
muted: s(extras["muted"]) || DEFAULT_BRANDING.muted,
|
|
1466
|
+
border: s(extras["border"]) || DEFAULT_BRANDING.border,
|
|
1467
|
+
accentText: s(extras["accentText"]) || s(source.theme) || DEFAULT_BRANDING.accentText,
|
|
1468
|
+
buttonBackground: s(source.payment_button_colour) || s(source.theme) || DEFAULT_BRANDING.buttonBackground,
|
|
1469
|
+
buttonText: s(source.payment_button_text_colour) || DEFAULT_BRANDING.buttonText,
|
|
1470
|
+
fontFamily: pickEnum(
|
|
1471
|
+
extras["fontFamily"],
|
|
1472
|
+
ALL_FONT_FAMILIES,
|
|
1473
|
+
DEFAULT_BRANDING.fontFamily
|
|
1474
|
+
),
|
|
1475
|
+
headingWeight: pickEnum(
|
|
1476
|
+
extras["headingWeight"],
|
|
1477
|
+
["regular", "medium", "semibold", "bold"],
|
|
1478
|
+
DEFAULT_BRANDING.headingWeight
|
|
1479
|
+
),
|
|
1480
|
+
radiusSurface: pickEnum(
|
|
1481
|
+
extras["radiusSurface"],
|
|
1482
|
+
NON_PILL_RADII,
|
|
1483
|
+
DEFAULT_BRANDING.radiusSurface
|
|
1484
|
+
),
|
|
1485
|
+
radiusInput: pickEnum(
|
|
1486
|
+
extras["radiusInput"],
|
|
1487
|
+
NON_PILL_RADII,
|
|
1488
|
+
DEFAULT_BRANDING.radiusInput
|
|
1489
|
+
),
|
|
1490
|
+
radiusButton: pickEnum(
|
|
1491
|
+
extras["radiusButton"],
|
|
1492
|
+
ALL_RADII,
|
|
1493
|
+
DEFAULT_BRANDING.radiusButton
|
|
1494
|
+
),
|
|
1495
|
+
radiusBadge: pickEnum(
|
|
1496
|
+
extras["radiusBadge"],
|
|
1497
|
+
ALL_RADII,
|
|
1498
|
+
DEFAULT_BRANDING.radiusBadge
|
|
1499
|
+
),
|
|
1500
|
+
surfaceStyle: pickEnum(
|
|
1501
|
+
extras["surfaceStyle"],
|
|
1502
|
+
["flat", "outlined", "elevated"],
|
|
1503
|
+
DEFAULT_BRANDING.surfaceStyle
|
|
1504
|
+
),
|
|
1505
|
+
surfacePadding: pickEnum(
|
|
1506
|
+
extras["surfacePadding"],
|
|
1507
|
+
["compact", "comfortable", "spacious"],
|
|
1508
|
+
DEFAULT_BRANDING.surfacePadding
|
|
1509
|
+
),
|
|
1510
|
+
verticalGap: pickEnum(
|
|
1511
|
+
extras["verticalGap"],
|
|
1512
|
+
["compact", "comfortable", "spacious"],
|
|
1513
|
+
DEFAULT_BRANDING.verticalGap
|
|
1514
|
+
),
|
|
1515
|
+
inputSize: pickEnum(
|
|
1516
|
+
extras["inputSize"],
|
|
1517
|
+
["sm", "md", "lg"],
|
|
1518
|
+
DEFAULT_BRANDING.inputSize
|
|
1519
|
+
),
|
|
1520
|
+
buttonSize: pickEnum(
|
|
1521
|
+
extras["buttonSize"],
|
|
1522
|
+
["sm", "md", "lg"],
|
|
1523
|
+
DEFAULT_BRANDING.buttonSize
|
|
1524
|
+
),
|
|
1525
|
+
showSurcharge: parseBool(extras["showSurcharge"], DEFAULT_BRANDING.showSurcharge),
|
|
1526
|
+
surchargePosition: pickEnum(
|
|
1527
|
+
extras["surchargePosition"],
|
|
1528
|
+
SURCHARGE_POSITIONS,
|
|
1529
|
+
DEFAULT_BRANDING.surchargePosition
|
|
1530
|
+
),
|
|
1531
|
+
nativeElementStacked: parseBool(
|
|
1532
|
+
extras["nativeElementStacked"],
|
|
1533
|
+
DEFAULT_BRANDING.nativeElementStacked
|
|
1534
|
+
),
|
|
1535
|
+
nativeElementPosition: pickEnum(
|
|
1536
|
+
extras["nativeElementPosition"],
|
|
1537
|
+
NATIVE_ELEMENT_POSITIONS,
|
|
1538
|
+
DEFAULT_BRANDING.nativeElementPosition
|
|
1539
|
+
),
|
|
1540
|
+
surchargeStyle: pickEnum(
|
|
1541
|
+
extras["surchargeStyle"],
|
|
1542
|
+
SURCHARGE_STYLES,
|
|
1543
|
+
DEFAULT_BRANDING.surchargeStyle
|
|
1544
|
+
),
|
|
1545
|
+
surchargeSize: pickEnum(
|
|
1546
|
+
extras["surchargeSize"],
|
|
1547
|
+
SURCHARGE_SIZES,
|
|
1548
|
+
DEFAULT_BRANDING.surchargeSize
|
|
1549
|
+
),
|
|
1550
|
+
surchargeShape: pickEnum(
|
|
1551
|
+
extras["surchargeShape"],
|
|
1552
|
+
SURCHARGE_SHAPES,
|
|
1553
|
+
DEFAULT_BRANDING.surchargeShape
|
|
1554
|
+
),
|
|
1555
|
+
surchargeBorderWidth: pickEnum(
|
|
1556
|
+
extras["surchargeBorderWidth"],
|
|
1557
|
+
SURCHARGE_BORDER_WIDTHS,
|
|
1558
|
+
DEFAULT_BRANDING.surchargeBorderWidth
|
|
1559
|
+
),
|
|
1560
|
+
surchargeBorderStyle: pickEnum(
|
|
1561
|
+
extras["surchargeBorderStyle"],
|
|
1562
|
+
SURCHARGE_BORDER_STYLES,
|
|
1563
|
+
DEFAULT_BRANDING.surchargeBorderStyle
|
|
1564
|
+
),
|
|
1565
|
+
surchargeWeight: pickEnum(
|
|
1566
|
+
extras["surchargeWeight"],
|
|
1567
|
+
SURCHARGE_WEIGHTS,
|
|
1568
|
+
DEFAULT_BRANDING.surchargeWeight
|
|
1569
|
+
),
|
|
1570
|
+
surchargeSign: pickEnum(
|
|
1571
|
+
extras["surchargeSign"],
|
|
1572
|
+
SURCHARGE_SIGNS,
|
|
1573
|
+
DEFAULT_BRANDING.surchargeSign
|
|
1574
|
+
),
|
|
1575
|
+
surchargeUppercase: parseBool(
|
|
1576
|
+
extras["surchargeUppercase"],
|
|
1577
|
+
DEFAULT_BRANDING.surchargeUppercase
|
|
1578
|
+
),
|
|
1579
|
+
surchargeLabel: pickEnum(
|
|
1580
|
+
extras["surchargeLabel"],
|
|
1581
|
+
SURCHARGE_LABEL_MODES,
|
|
1582
|
+
DEFAULT_BRANDING.surchargeLabel
|
|
1583
|
+
),
|
|
1584
|
+
surchargeFigure: pickEnum(
|
|
1585
|
+
extras["surchargeFigure"],
|
|
1586
|
+
SURCHARGE_FIGURE_MODES,
|
|
1587
|
+
DEFAULT_BRANDING.surchargeFigure
|
|
1588
|
+
),
|
|
1589
|
+
discountFigure: pickEnum(
|
|
1590
|
+
extras["discountFigure"],
|
|
1591
|
+
SURCHARGE_FIGURE_MODES,
|
|
1592
|
+
DEFAULT_BRANDING.discountFigure
|
|
1593
|
+
),
|
|
1594
|
+
surchargeWordTranslations: parseTranslations(extras["surchargeWordTranslations"]),
|
|
1595
|
+
discountWordTranslations: parseTranslations(extras["discountWordTranslations"]),
|
|
1596
|
+
headerTextTranslations: parseTranslations(extras["headerTextTranslations"]),
|
|
1597
|
+
payButtonLabelTranslations: parseTranslations(extras["payButtonLabelTranslations"]),
|
|
1598
|
+
cardTermsMessageTranslations: parseTranslations(extras["cardTermsMessageTranslations"]),
|
|
1599
|
+
footerTextTranslations: parseTranslations(extras["footerTextTranslations"]),
|
|
1600
|
+
surchargeColor: s(extras["surchargeColor"]) || DEFAULT_BRANDING.surchargeColor,
|
|
1601
|
+
discountColor: s(extras["discountColor"]) || DEFAULT_BRANDING.discountColor,
|
|
1602
|
+
layout: pickEnum(extras["layout"], ["compact", "split"], DEFAULT_BRANDING.layout),
|
|
1603
|
+
summaryPosition: pickEnum(
|
|
1604
|
+
extras["summaryPosition"],
|
|
1605
|
+
["left", "right"],
|
|
1606
|
+
DEFAULT_BRANDING.summaryPosition
|
|
1607
|
+
),
|
|
1608
|
+
showOrderSummary: parseBool(extras["showOrderSummary"], DEFAULT_BRANDING.showOrderSummary),
|
|
1609
|
+
summaryGradient: parseBool(extras["summaryGradient"], DEFAULT_BRANDING.summaryGradient),
|
|
1610
|
+
showTotal: parseBool(extras["showTotal"], DEFAULT_BRANDING.showTotal),
|
|
1611
|
+
totalLabel: s(extras["totalLabel"]) || DEFAULT_BRANDING.totalLabel,
|
|
1612
|
+
showCurrencyCode: parseBool(extras["showCurrencyCode"], DEFAULT_BRANDING.showCurrencyCode),
|
|
1613
|
+
showOrderItems: parseBool(extras["showOrderItems"], DEFAULT_BRANDING.showOrderItems),
|
|
1614
|
+
cancelLinkEnabled: parseBool(extras["cancelLinkEnabled"], DEFAULT_BRANDING.cancelLinkEnabled),
|
|
1615
|
+
cancelLinkPosition: pickEnum(
|
|
1616
|
+
extras["cancelLinkPosition"],
|
|
1617
|
+
["top", "bottom"],
|
|
1618
|
+
DEFAULT_BRANDING.cancelLinkPosition
|
|
1619
|
+
),
|
|
1620
|
+
cancelLinkStyle: pickEnum(
|
|
1621
|
+
extras["cancelLinkStyle"],
|
|
1622
|
+
["link", "button"],
|
|
1623
|
+
DEFAULT_BRANDING.cancelLinkStyle
|
|
1624
|
+
),
|
|
1625
|
+
trustBadges: trustRow.trustBadges,
|
|
1626
|
+
notices: trustRow.notices,
|
|
1627
|
+
customFields: _nullishCoalesce(decodedCustomFields, () => ( [])),
|
|
1628
|
+
methodSectionOrder: decodeMethodSectionOrder(extras[METHOD_SECTION_ORDER_KEY]),
|
|
1629
|
+
methodSectionLabels: decodeMethodSectionLabels(extras[METHOD_SECTION_LABELS_KEY]),
|
|
1630
|
+
headerText: s(source.payment_form_header_text),
|
|
1631
|
+
payButtonLabel: s(source.payment_button_text),
|
|
1632
|
+
cardTermsMessage: s(source.custom_message_for_card_terms),
|
|
1633
|
+
footerText: s(extras["footerText"]),
|
|
1634
|
+
supportEmail: s(extras["supportEmail"]),
|
|
1635
|
+
paymentLayout: pickEnum(
|
|
1636
|
+
source.sdk_layout,
|
|
1637
|
+
["tabs", "accordion", "spaced_accordion"],
|
|
1638
|
+
DEFAULT_BRANDING.paymentLayout
|
|
1639
|
+
),
|
|
1640
|
+
labelStyle,
|
|
1641
|
+
showPoweredBy: source.branding_visibility !== false,
|
|
1642
|
+
// The two that can be empty use `pickEnumOrEmpty`, not `pickEnum`: a
|
|
1643
|
+
// value this build does not know has to decode to "unset" and defer, the
|
|
1644
|
+
// same as a key that was never written. Sending it to a concrete default
|
|
1645
|
+
// instead would make an older checkout override the connector account of
|
|
1646
|
+
// a merchant who picked a preset a newer dashboard offers.
|
|
1647
|
+
airwallexCardPreset: pickEnumOrEmpty(
|
|
1648
|
+
extras["airwallexCardPreset"],
|
|
1649
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_CARD_PRESETS
|
|
1650
|
+
),
|
|
1651
|
+
airwallexHideCard: parseBool(extras["airwallexHideCard"], DEFAULT_BRANDING.airwallexHideCard),
|
|
1652
|
+
airwallexHideCardTitle: parseBool(
|
|
1653
|
+
extras["airwallexHideCardTitle"],
|
|
1654
|
+
DEFAULT_BRANDING.airwallexHideCardTitle
|
|
1655
|
+
),
|
|
1656
|
+
airwallexFieldChrome: pickEnum(
|
|
1657
|
+
extras["airwallexFieldChrome"],
|
|
1658
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_FIELD_CHROMES,
|
|
1659
|
+
DEFAULT_BRANDING.airwallexFieldChrome
|
|
1660
|
+
),
|
|
1661
|
+
airwallexLabelStyle: pickEnumOrEmpty(
|
|
1662
|
+
extras["airwallexLabelStyle"],
|
|
1663
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_LABEL_STYLES
|
|
1664
|
+
),
|
|
1665
|
+
airwallexFieldFontSize: pickEnum(
|
|
1666
|
+
extras["airwallexFieldFontSize"],
|
|
1667
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_FIELD_FONT_SIZES,
|
|
1668
|
+
DEFAULT_BRANDING.airwallexFieldFontSize
|
|
1669
|
+
),
|
|
1670
|
+
airwallexFieldWeight: pickEnum(
|
|
1671
|
+
extras["airwallexFieldWeight"],
|
|
1672
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_FIELD_WEIGHTS,
|
|
1673
|
+
DEFAULT_BRANDING.airwallexFieldWeight
|
|
1674
|
+
),
|
|
1675
|
+
airwallexFocusRing: pickEnum(
|
|
1676
|
+
extras["airwallexFocusRing"],
|
|
1677
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_FOCUS_RINGS,
|
|
1678
|
+
DEFAULT_BRANDING.airwallexFocusRing
|
|
1679
|
+
),
|
|
1680
|
+
airwallexAutofill: pickEnum(
|
|
1681
|
+
extras["airwallexAutofill"],
|
|
1682
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_AUTOFILL_TREATMENTS,
|
|
1683
|
+
DEFAULT_BRANDING.airwallexAutofill
|
|
1684
|
+
),
|
|
1685
|
+
airwallexValidTint: parseBool(
|
|
1686
|
+
extras["airwallexValidTint"],
|
|
1687
|
+
DEFAULT_BRANDING.airwallexValidTint
|
|
1688
|
+
),
|
|
1689
|
+
airwallexNetworkMarks: parseBool(
|
|
1690
|
+
extras["airwallexNetworkMarks"],
|
|
1691
|
+
DEFAULT_BRANDING.airwallexNetworkMarks
|
|
1692
|
+
),
|
|
1693
|
+
stripeTheme: pickEnum(
|
|
1694
|
+
extras["stripeTheme"],
|
|
1695
|
+
_chunkGSQN5EOOcjs.STRIPE_THEMES,
|
|
1696
|
+
DEFAULT_BRANDING.stripeTheme
|
|
1697
|
+
),
|
|
1698
|
+
stripeInputs: pickEnum(
|
|
1699
|
+
extras["stripeInputs"],
|
|
1700
|
+
_chunkGSQN5EOOcjs.STRIPE_INPUT_STYLES,
|
|
1701
|
+
DEFAULT_BRANDING.stripeInputs
|
|
1702
|
+
),
|
|
1703
|
+
stripeLabels: pickEnum(
|
|
1704
|
+
extras["stripeLabels"],
|
|
1705
|
+
_chunkGSQN5EOOcjs.STRIPE_LABEL_PLACEMENTS,
|
|
1706
|
+
DEFAULT_BRANDING.stripeLabels
|
|
1707
|
+
),
|
|
1708
|
+
stripeSpacing: pickEnum(
|
|
1709
|
+
extras["stripeSpacing"],
|
|
1710
|
+
_chunkGSQN5EOOcjs.STRIPE_SPACINGS,
|
|
1711
|
+
DEFAULT_BRANDING.stripeSpacing
|
|
1712
|
+
),
|
|
1713
|
+
stripeFieldFontSize: pickEnum(
|
|
1714
|
+
extras["stripeFieldFontSize"],
|
|
1715
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
1716
|
+
DEFAULT_BRANDING.stripeFieldFontSize
|
|
1717
|
+
),
|
|
1718
|
+
stripeFieldWeight: pickEnum(
|
|
1719
|
+
extras["stripeFieldWeight"],
|
|
1720
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
1721
|
+
DEFAULT_BRANDING.stripeFieldWeight
|
|
1722
|
+
),
|
|
1723
|
+
stripeFocusRing: pickEnum(
|
|
1724
|
+
extras["stripeFocusRing"],
|
|
1725
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
1726
|
+
DEFAULT_BRANDING.stripeFocusRing
|
|
1727
|
+
),
|
|
1728
|
+
stripeDisableAnimations: parseBool(
|
|
1729
|
+
extras["stripeDisableAnimations"],
|
|
1730
|
+
DEFAULT_BRANDING.stripeDisableAnimations
|
|
1731
|
+
),
|
|
1732
|
+
paypalCardLayout: pickEnum(
|
|
1733
|
+
extras["paypalCardLayout"],
|
|
1734
|
+
_chunkGSQN5EOOcjs.PAYPAL_CARD_LAYOUTS,
|
|
1735
|
+
DEFAULT_BRANDING.paypalCardLayout
|
|
1736
|
+
),
|
|
1737
|
+
paypalLabelStyle: pickEnum(
|
|
1738
|
+
extras["paypalLabelStyle"],
|
|
1739
|
+
_chunkGSQN5EOOcjs.PAYPAL_LABEL_STYLES,
|
|
1740
|
+
DEFAULT_BRANDING.paypalLabelStyle
|
|
1741
|
+
),
|
|
1742
|
+
paypalFieldChrome: pickEnum(
|
|
1743
|
+
extras["paypalFieldChrome"],
|
|
1744
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
1745
|
+
DEFAULT_BRANDING.paypalFieldChrome
|
|
1746
|
+
),
|
|
1747
|
+
mollieFieldChrome: pickEnum(
|
|
1748
|
+
extras["mollieFieldChrome"],
|
|
1749
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
1750
|
+
DEFAULT_BRANDING.mollieFieldChrome
|
|
1751
|
+
),
|
|
1752
|
+
paypalFieldFontSize: pickEnum(
|
|
1753
|
+
extras["paypalFieldFontSize"],
|
|
1754
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
1755
|
+
DEFAULT_BRANDING.paypalFieldFontSize
|
|
1756
|
+
),
|
|
1757
|
+
mollieFieldFontSize: pickEnum(
|
|
1758
|
+
extras["mollieFieldFontSize"],
|
|
1759
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
1760
|
+
DEFAULT_BRANDING.mollieFieldFontSize
|
|
1761
|
+
),
|
|
1762
|
+
paypalFieldWeight: pickEnum(
|
|
1763
|
+
extras["paypalFieldWeight"],
|
|
1764
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
1765
|
+
DEFAULT_BRANDING.paypalFieldWeight
|
|
1766
|
+
),
|
|
1767
|
+
mollieFieldWeight: pickEnum(
|
|
1768
|
+
extras["mollieFieldWeight"],
|
|
1769
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
1770
|
+
DEFAULT_BRANDING.mollieFieldWeight
|
|
1771
|
+
),
|
|
1772
|
+
paypalFocusRing: pickEnum(
|
|
1773
|
+
extras["paypalFocusRing"],
|
|
1774
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
1775
|
+
DEFAULT_BRANDING.paypalFocusRing
|
|
1776
|
+
),
|
|
1777
|
+
mollieFocusRing: pickEnum(
|
|
1778
|
+
extras["mollieFocusRing"],
|
|
1779
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
1780
|
+
DEFAULT_BRANDING.mollieFocusRing
|
|
1781
|
+
),
|
|
1782
|
+
micropaymentFieldChrome: pickEnum(
|
|
1783
|
+
extras["micropaymentFieldChrome"],
|
|
1784
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
1785
|
+
DEFAULT_BRANDING.micropaymentFieldChrome
|
|
1786
|
+
),
|
|
1787
|
+
micropaymentFieldFontSize: pickEnum(
|
|
1788
|
+
extras["micropaymentFieldFontSize"],
|
|
1789
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
1790
|
+
DEFAULT_BRANDING.micropaymentFieldFontSize
|
|
1791
|
+
),
|
|
1792
|
+
micropaymentFieldWeight: pickEnum(
|
|
1793
|
+
extras["micropaymentFieldWeight"],
|
|
1794
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
1795
|
+
DEFAULT_BRANDING.micropaymentFieldWeight
|
|
1796
|
+
),
|
|
1797
|
+
micropaymentFocusRing: pickEnum(
|
|
1798
|
+
extras["micropaymentFocusRing"],
|
|
1799
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
1800
|
+
DEFAULT_BRANDING.micropaymentFocusRing
|
|
1801
|
+
),
|
|
1802
|
+
whopCardPreset: pickEnum(
|
|
1803
|
+
extras["whopCardPreset"],
|
|
1804
|
+
_chunkGSQN5EOOcjs.WHOP_CARD_PRESETS,
|
|
1805
|
+
DEFAULT_BRANDING.whopCardPreset
|
|
1806
|
+
),
|
|
1807
|
+
whopAccentColor: pickEnum(
|
|
1808
|
+
extras["whopAccentColor"],
|
|
1809
|
+
_chunkGSQN5EOOcjs.WHOP_ACCENT_COLORS,
|
|
1810
|
+
DEFAULT_BRANDING.whopAccentColor
|
|
1811
|
+
),
|
|
1812
|
+
whopGrayColor: pickEnum(
|
|
1813
|
+
extras["whopGrayColor"],
|
|
1814
|
+
_chunkGSQN5EOOcjs.WHOP_GRAY_COLORS,
|
|
1815
|
+
DEFAULT_BRANDING.whopGrayColor
|
|
1816
|
+
),
|
|
1817
|
+
whopBillingDetails: pickEnum(
|
|
1818
|
+
extras["whopBillingDetails"],
|
|
1819
|
+
_chunkGSQN5EOOcjs.WHOP_BILLING_DETAILS,
|
|
1820
|
+
DEFAULT_BRANDING.whopBillingDetails
|
|
1821
|
+
),
|
|
1822
|
+
whopSeparated: parseBool(extras["whopSeparated"], DEFAULT_BRANDING.whopSeparated),
|
|
1823
|
+
whopEmailLabel: pickEnum(
|
|
1824
|
+
extras["whopEmailLabel"],
|
|
1825
|
+
_chunkGSQN5EOOcjs.WHOP_EMAIL_LABELS,
|
|
1826
|
+
DEFAULT_BRANDING.whopEmailLabel
|
|
1827
|
+
),
|
|
1828
|
+
whopFieldChrome: pickEnum(
|
|
1829
|
+
extras["whopFieldChrome"],
|
|
1830
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
1831
|
+
DEFAULT_BRANDING.whopFieldChrome
|
|
1832
|
+
),
|
|
1833
|
+
whopFieldFontSize: pickEnum(
|
|
1834
|
+
extras["whopFieldFontSize"],
|
|
1835
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
1836
|
+
DEFAULT_BRANDING.whopFieldFontSize
|
|
1837
|
+
),
|
|
1838
|
+
whopFieldWeight: pickEnum(
|
|
1839
|
+
extras["whopFieldWeight"],
|
|
1840
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
1841
|
+
DEFAULT_BRANDING.whopFieldWeight
|
|
1842
|
+
),
|
|
1843
|
+
whopFocusRing: pickEnum(
|
|
1844
|
+
extras["whopFocusRing"],
|
|
1845
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
1846
|
+
DEFAULT_BRANDING.whopFocusRing
|
|
1847
|
+
),
|
|
1848
|
+
whopRadius: pickEnum(extras["whopRadius"], _chunkGSQN5EOOcjs.WHOP_RADII, DEFAULT_BRANDING.whopRadius),
|
|
1849
|
+
whopShadow: pickEnum(
|
|
1850
|
+
extras["whopShadow"],
|
|
1851
|
+
_chunkGSQN5EOOcjs.WHOP_SHADOWS,
|
|
1852
|
+
DEFAULT_BRANDING.whopShadow
|
|
1853
|
+
),
|
|
1854
|
+
whopMethodIcons: parseBool(extras["whopMethodIcons"], DEFAULT_BRANDING.whopMethodIcons),
|
|
1855
|
+
whopSelection: pickEnum(
|
|
1856
|
+
extras["whopSelection"],
|
|
1857
|
+
_chunkGSQN5EOOcjs.WHOP_SELECTIONS,
|
|
1858
|
+
DEFAULT_BRANDING.whopSelection
|
|
1859
|
+
),
|
|
1860
|
+
paypalValidTint: parseBool(extras["paypalValidTint"], DEFAULT_BRANDING.paypalValidTint),
|
|
1861
|
+
// A look stored before e-Payouts had its own keys has none: the form keeps
|
|
1862
|
+
// the PayPal values it was drawn with until then.
|
|
1863
|
+
epayoutsCardLayout: pickEnum(
|
|
1864
|
+
extras["epayoutsCardLayout"],
|
|
1865
|
+
_chunkGSQN5EOOcjs.PAYPAL_CARD_LAYOUTS,
|
|
1866
|
+
pickEnum(
|
|
1867
|
+
extras["paypalCardLayout"],
|
|
1868
|
+
_chunkGSQN5EOOcjs.PAYPAL_CARD_LAYOUTS,
|
|
1869
|
+
DEFAULT_BRANDING.epayoutsCardLayout
|
|
1870
|
+
)
|
|
1871
|
+
),
|
|
1872
|
+
epayoutsLabelStyle: pickEnum(
|
|
1873
|
+
extras["epayoutsLabelStyle"],
|
|
1874
|
+
_chunkGSQN5EOOcjs.PAYPAL_LABEL_STYLES,
|
|
1875
|
+
pickEnum(
|
|
1876
|
+
extras["paypalLabelStyle"],
|
|
1877
|
+
_chunkGSQN5EOOcjs.PAYPAL_LABEL_STYLES,
|
|
1878
|
+
DEFAULT_BRANDING.epayoutsLabelStyle
|
|
1879
|
+
)
|
|
1880
|
+
),
|
|
1881
|
+
epayoutsFieldChrome: pickEnum(
|
|
1882
|
+
extras["epayoutsFieldChrome"],
|
|
1883
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
1884
|
+
pickEnum(
|
|
1885
|
+
extras["paypalFieldChrome"],
|
|
1886
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
1887
|
+
DEFAULT_BRANDING.epayoutsFieldChrome
|
|
1888
|
+
)
|
|
1889
|
+
),
|
|
1890
|
+
epayoutsFieldFontSize: pickEnum(
|
|
1891
|
+
extras["epayoutsFieldFontSize"],
|
|
1892
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
1893
|
+
pickEnum(
|
|
1894
|
+
extras["paypalFieldFontSize"],
|
|
1895
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
1896
|
+
DEFAULT_BRANDING.epayoutsFieldFontSize
|
|
1897
|
+
)
|
|
1898
|
+
),
|
|
1899
|
+
epayoutsFieldWeight: pickEnum(
|
|
1900
|
+
extras["epayoutsFieldWeight"],
|
|
1901
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
1902
|
+
pickEnum(
|
|
1903
|
+
extras["paypalFieldWeight"],
|
|
1904
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
1905
|
+
DEFAULT_BRANDING.epayoutsFieldWeight
|
|
1906
|
+
)
|
|
1907
|
+
),
|
|
1908
|
+
epayoutsFocusRing: pickEnum(
|
|
1909
|
+
extras["epayoutsFocusRing"],
|
|
1910
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
1911
|
+
pickEnum(
|
|
1912
|
+
extras["paypalFocusRing"],
|
|
1913
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
1914
|
+
DEFAULT_BRANDING.epayoutsFocusRing
|
|
1915
|
+
)
|
|
1916
|
+
),
|
|
1917
|
+
epayoutsValidTint: parseBool(
|
|
1918
|
+
extras["epayoutsValidTint"],
|
|
1919
|
+
parseBool(extras["paypalValidTint"], DEFAULT_BRANDING.epayoutsValidTint)
|
|
1920
|
+
),
|
|
1921
|
+
nomupayFormStyle: pickEnum(
|
|
1922
|
+
extras["nomupayFormStyle"],
|
|
1923
|
+
_chunkGSQN5EOOcjs.NOMUPAY_FORM_STYLES,
|
|
1924
|
+
DEFAULT_BRANDING.nomupayFormStyle
|
|
1925
|
+
),
|
|
1926
|
+
nomupayShowLabels: parseBool(extras["nomupayShowLabels"], DEFAULT_BRANDING.nomupayShowLabels),
|
|
1927
|
+
nomupayShowPlaceholders: parseBool(
|
|
1928
|
+
extras["nomupayShowPlaceholders"],
|
|
1929
|
+
DEFAULT_BRANDING.nomupayShowPlaceholders
|
|
1930
|
+
),
|
|
1931
|
+
nomupayShowCvvHint: parseBool(
|
|
1932
|
+
extras["nomupayShowCvvHint"],
|
|
1933
|
+
DEFAULT_BRANDING.nomupayShowCvvHint
|
|
1934
|
+
),
|
|
1935
|
+
nomupayFieldChrome: pickEnum(
|
|
1936
|
+
extras["nomupayFieldChrome"],
|
|
1937
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
1938
|
+
DEFAULT_BRANDING.nomupayFieldChrome
|
|
1939
|
+
),
|
|
1940
|
+
nomupayFieldFontSize: pickEnum(
|
|
1941
|
+
extras["nomupayFieldFontSize"],
|
|
1942
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
1943
|
+
DEFAULT_BRANDING.nomupayFieldFontSize
|
|
1944
|
+
),
|
|
1945
|
+
nomupayFocusRing: pickEnum(
|
|
1946
|
+
extras["nomupayFocusRing"],
|
|
1947
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
1948
|
+
DEFAULT_BRANDING.nomupayFocusRing
|
|
1949
|
+
),
|
|
1950
|
+
nomupayApplePayButtonStyle: pickEnum(
|
|
1951
|
+
extras["nomupayApplePayButtonStyle"],
|
|
1952
|
+
_chunkGSQN5EOOcjs.APPLE_PAY_BUTTON_STYLES,
|
|
1953
|
+
DEFAULT_BRANDING.nomupayApplePayButtonStyle
|
|
1954
|
+
),
|
|
1955
|
+
nomupayApplePayButtonType: pickEnum(
|
|
1956
|
+
extras["nomupayApplePayButtonType"],
|
|
1957
|
+
_chunkGSQN5EOOcjs.APPLE_PAY_BUTTON_TYPES,
|
|
1958
|
+
DEFAULT_BRANDING.nomupayApplePayButtonType
|
|
1959
|
+
),
|
|
1960
|
+
nomupayGooglePayButtonColor: pickEnum(
|
|
1961
|
+
extras["nomupayGooglePayButtonColor"],
|
|
1962
|
+
_chunkGSQN5EOOcjs.GOOGLE_PAY_BUTTON_COLORS,
|
|
1963
|
+
DEFAULT_BRANDING.nomupayGooglePayButtonColor
|
|
1964
|
+
),
|
|
1965
|
+
nomupayGooglePayButtonType: pickEnum(
|
|
1966
|
+
extras["nomupayGooglePayButtonType"],
|
|
1967
|
+
_chunkGSQN5EOOcjs.GOOGLE_PAY_BUTTON_TYPES,
|
|
1968
|
+
DEFAULT_BRANDING.nomupayGooglePayButtonType
|
|
1969
|
+
),
|
|
1970
|
+
customCss: s(extras["customCss"]),
|
|
1971
|
+
..._chunk5CITBN33cjs.decodeEnigmaCardForm.call(void 0, extras)
|
|
1972
|
+
};
|
|
1973
|
+
}
|
|
1974
|
+
function encodeBranding(branding, base) {
|
|
1975
|
+
const trim = (v) => {
|
|
1976
|
+
const t = v.trim();
|
|
1977
|
+
return t.length > 0 ? t : null;
|
|
1978
|
+
};
|
|
1979
|
+
const existingRules = _nullishCoalesce(_optionalChain([base, 'optionalAccess', _17 => _17["sdk_ui_rules"]]), () => ( {}));
|
|
1980
|
+
const extras = {
|
|
1981
|
+
surface: branding.surface,
|
|
1982
|
+
text: branding.text,
|
|
1983
|
+
heading: branding.heading,
|
|
1984
|
+
muted: branding.muted,
|
|
1985
|
+
border: branding.border,
|
|
1986
|
+
accentText: branding.accentText,
|
|
1987
|
+
fontFamily: branding.fontFamily,
|
|
1988
|
+
headingWeight: branding.headingWeight,
|
|
1989
|
+
radiusSurface: branding.radiusSurface,
|
|
1990
|
+
radiusInput: branding.radiusInput,
|
|
1991
|
+
radiusButton: branding.radiusButton,
|
|
1992
|
+
radiusBadge: branding.radiusBadge,
|
|
1993
|
+
surfaceStyle: branding.surfaceStyle,
|
|
1994
|
+
surfacePadding: branding.surfacePadding,
|
|
1995
|
+
verticalGap: branding.verticalGap,
|
|
1996
|
+
inputSize: branding.inputSize,
|
|
1997
|
+
buttonSize: branding.buttonSize,
|
|
1998
|
+
showSurcharge: String(branding.showSurcharge),
|
|
1999
|
+
surchargePosition: branding.surchargePosition,
|
|
2000
|
+
nativeElementPosition: branding.nativeElementPosition,
|
|
2001
|
+
nativeElementStacked: String(branding.nativeElementStacked),
|
|
2002
|
+
surchargeStyle: branding.surchargeStyle,
|
|
2003
|
+
surchargeSize: branding.surchargeSize,
|
|
2004
|
+
surchargeShape: branding.surchargeShape,
|
|
2005
|
+
surchargeBorderWidth: branding.surchargeBorderWidth,
|
|
2006
|
+
surchargeBorderStyle: branding.surchargeBorderStyle,
|
|
2007
|
+
surchargeWeight: branding.surchargeWeight,
|
|
2008
|
+
surchargeSign: branding.surchargeSign,
|
|
2009
|
+
surchargeUppercase: String(branding.surchargeUppercase),
|
|
2010
|
+
surchargeLabel: branding.surchargeLabel,
|
|
2011
|
+
surchargeFigure: branding.surchargeFigure,
|
|
2012
|
+
discountFigure: branding.discountFigure,
|
|
2013
|
+
surchargeColor: branding.surchargeColor,
|
|
2014
|
+
discountColor: branding.discountColor,
|
|
2015
|
+
layout: branding.layout,
|
|
2016
|
+
summaryPosition: branding.summaryPosition,
|
|
2017
|
+
showOrderSummary: String(branding.showOrderSummary),
|
|
2018
|
+
summaryGradient: String(branding.summaryGradient),
|
|
2019
|
+
showTotal: String(branding.showTotal),
|
|
2020
|
+
totalLabel: branding.totalLabel,
|
|
2021
|
+
showCurrencyCode: String(branding.showCurrencyCode),
|
|
2022
|
+
showOrderItems: String(branding.showOrderItems),
|
|
2023
|
+
cancelLinkEnabled: String(branding.cancelLinkEnabled),
|
|
2024
|
+
cancelLinkPosition: branding.cancelLinkPosition,
|
|
2025
|
+
cancelLinkStyle: branding.cancelLinkStyle,
|
|
2026
|
+
showLogo: String(branding.showLogo),
|
|
2027
|
+
logoShape: branding.logoShape,
|
|
2028
|
+
logoSize: branding.logoSize,
|
|
2029
|
+
labelStyle: branding.labelStyle,
|
|
2030
|
+
// Written unconditionally, empty string included. The encoder REPLACES
|
|
2031
|
+
// `sdk_ui_rules.branding` wholesale, so a key it skips is a key it
|
|
2032
|
+
// deletes — and here the empty string is a real value ("no choice made"),
|
|
2033
|
+
// not an absence. Omitting it would be indistinguishable from omitting it
|
|
2034
|
+
// by accident, which is how `summaryOrder` was lost.
|
|
2035
|
+
airwallexCardPreset: branding.airwallexCardPreset,
|
|
2036
|
+
airwallexHideCard: String(branding.airwallexHideCard),
|
|
2037
|
+
airwallexHideCardTitle: String(branding.airwallexHideCardTitle),
|
|
2038
|
+
airwallexFieldChrome: branding.airwallexFieldChrome,
|
|
2039
|
+
airwallexLabelStyle: branding.airwallexLabelStyle,
|
|
2040
|
+
airwallexFieldFontSize: branding.airwallexFieldFontSize,
|
|
2041
|
+
airwallexFieldWeight: branding.airwallexFieldWeight,
|
|
2042
|
+
airwallexFocusRing: branding.airwallexFocusRing,
|
|
2043
|
+
airwallexAutofill: branding.airwallexAutofill,
|
|
2044
|
+
airwallexValidTint: String(branding.airwallexValidTint),
|
|
2045
|
+
airwallexNetworkMarks: String(branding.airwallexNetworkMarks),
|
|
2046
|
+
stripeTheme: branding.stripeTheme,
|
|
2047
|
+
stripeInputs: branding.stripeInputs,
|
|
2048
|
+
stripeLabels: branding.stripeLabels,
|
|
2049
|
+
stripeSpacing: branding.stripeSpacing,
|
|
2050
|
+
stripeFieldFontSize: branding.stripeFieldFontSize,
|
|
2051
|
+
stripeFieldWeight: branding.stripeFieldWeight,
|
|
2052
|
+
stripeFocusRing: branding.stripeFocusRing,
|
|
2053
|
+
stripeDisableAnimations: String(branding.stripeDisableAnimations),
|
|
2054
|
+
paypalCardLayout: branding.paypalCardLayout,
|
|
2055
|
+
paypalLabelStyle: branding.paypalLabelStyle,
|
|
2056
|
+
paypalFieldChrome: branding.paypalFieldChrome,
|
|
2057
|
+
mollieFieldChrome: branding.mollieFieldChrome,
|
|
2058
|
+
paypalFieldFontSize: branding.paypalFieldFontSize,
|
|
2059
|
+
mollieFieldFontSize: branding.mollieFieldFontSize,
|
|
2060
|
+
paypalFieldWeight: branding.paypalFieldWeight,
|
|
2061
|
+
mollieFieldWeight: branding.mollieFieldWeight,
|
|
2062
|
+
paypalFocusRing: branding.paypalFocusRing,
|
|
2063
|
+
mollieFocusRing: branding.mollieFocusRing,
|
|
2064
|
+
micropaymentFieldChrome: branding.micropaymentFieldChrome,
|
|
2065
|
+
micropaymentFieldFontSize: branding.micropaymentFieldFontSize,
|
|
2066
|
+
micropaymentFieldWeight: branding.micropaymentFieldWeight,
|
|
2067
|
+
micropaymentFocusRing: branding.micropaymentFocusRing,
|
|
2068
|
+
whopCardPreset: branding.whopCardPreset,
|
|
2069
|
+
whopAccentColor: branding.whopAccentColor,
|
|
2070
|
+
whopGrayColor: branding.whopGrayColor,
|
|
2071
|
+
whopBillingDetails: branding.whopBillingDetails,
|
|
2072
|
+
whopSeparated: String(branding.whopSeparated),
|
|
2073
|
+
whopEmailLabel: branding.whopEmailLabel,
|
|
2074
|
+
whopFieldChrome: branding.whopFieldChrome,
|
|
2075
|
+
whopFieldFontSize: branding.whopFieldFontSize,
|
|
2076
|
+
whopFieldWeight: branding.whopFieldWeight,
|
|
2077
|
+
whopFocusRing: branding.whopFocusRing,
|
|
2078
|
+
whopRadius: branding.whopRadius,
|
|
2079
|
+
whopShadow: branding.whopShadow,
|
|
2080
|
+
whopMethodIcons: String(branding.whopMethodIcons),
|
|
2081
|
+
whopSelection: branding.whopSelection,
|
|
2082
|
+
paypalValidTint: String(branding.paypalValidTint),
|
|
2083
|
+
epayoutsCardLayout: branding.epayoutsCardLayout,
|
|
2084
|
+
epayoutsLabelStyle: branding.epayoutsLabelStyle,
|
|
2085
|
+
epayoutsFieldChrome: branding.epayoutsFieldChrome,
|
|
2086
|
+
epayoutsFieldFontSize: branding.epayoutsFieldFontSize,
|
|
2087
|
+
epayoutsFieldWeight: branding.epayoutsFieldWeight,
|
|
2088
|
+
epayoutsFocusRing: branding.epayoutsFocusRing,
|
|
2089
|
+
epayoutsValidTint: String(branding.epayoutsValidTint),
|
|
2090
|
+
nomupayFormStyle: branding.nomupayFormStyle,
|
|
2091
|
+
nomupayShowLabels: String(branding.nomupayShowLabels),
|
|
2092
|
+
nomupayShowPlaceholders: String(branding.nomupayShowPlaceholders),
|
|
2093
|
+
nomupayShowCvvHint: String(branding.nomupayShowCvvHint),
|
|
2094
|
+
nomupayFieldChrome: branding.nomupayFieldChrome,
|
|
2095
|
+
nomupayFieldFontSize: branding.nomupayFieldFontSize,
|
|
2096
|
+
nomupayFocusRing: branding.nomupayFocusRing,
|
|
2097
|
+
nomupayApplePayButtonStyle: branding.nomupayApplePayButtonStyle,
|
|
2098
|
+
nomupayApplePayButtonType: branding.nomupayApplePayButtonType,
|
|
2099
|
+
nomupayGooglePayButtonColor: branding.nomupayGooglePayButtonColor,
|
|
2100
|
+
nomupayGooglePayButtonType: branding.nomupayGooglePayButtonType,
|
|
2101
|
+
// Always written, `[]` included — its presence is what stops a later
|
|
2102
|
+
// decode from migrating the shop again (`resolveNoticesAndBadges`).
|
|
2103
|
+
notices: encodeNotices(branding.notices),
|
|
2104
|
+
[METHOD_SECTION_ORDER_KEY]: encodeMethodSectionOrder(branding.methodSectionOrder)
|
|
2105
|
+
};
|
|
2106
|
+
if (branding.trustBadges.length > 0) {
|
|
2107
|
+
extras["trustBadges"] = encodeBadges(branding.trustBadges);
|
|
2108
|
+
}
|
|
2109
|
+
const sectionLabels = encodeMethodSectionLabels(branding.methodSectionLabels);
|
|
2110
|
+
if (sectionLabels) extras[METHOD_SECTION_LABELS_KEY] = sectionLabels;
|
|
2111
|
+
if (branding.customFields.length > 0) {
|
|
2112
|
+
extras["customFields"] = encodeCustomFields(branding.customFields);
|
|
2113
|
+
}
|
|
2114
|
+
for (const key of [
|
|
2115
|
+
"surchargeWordTranslations",
|
|
2116
|
+
"discountWordTranslations",
|
|
2117
|
+
"headerTextTranslations",
|
|
2118
|
+
"payButtonLabelTranslations",
|
|
2119
|
+
"cardTermsMessageTranslations",
|
|
2120
|
+
"footerTextTranslations"
|
|
2121
|
+
]) {
|
|
2122
|
+
const encoded = encodeTranslations(branding[key]);
|
|
2123
|
+
if (encoded) extras[key] = encoded;
|
|
2124
|
+
}
|
|
2125
|
+
const tagline = trim(branding.tagline);
|
|
2126
|
+
if (tagline) extras["tagline"] = tagline;
|
|
2127
|
+
const footer = trim(branding.footerText);
|
|
2128
|
+
if (footer) extras["footerText"] = footer;
|
|
2129
|
+
const support = trim(branding.supportEmail);
|
|
2130
|
+
if (support) extras["supportEmail"] = support;
|
|
2131
|
+
const css = trim(branding.customCss);
|
|
2132
|
+
if (css) extras["customCss"] = css;
|
|
2133
|
+
Object.assign(extras, _chunk5CITBN33cjs.encodeEnigmaCardForm.call(void 0, branding));
|
|
2134
|
+
const nextRules = {
|
|
2135
|
+
...existingRules,
|
|
2136
|
+
[BRANDING_GROUP_KEY]: extras
|
|
2137
|
+
};
|
|
2138
|
+
const legacyLabel = branding.labelStyle === "hidden" ? "never" : "above";
|
|
2139
|
+
const flatFields = {
|
|
2140
|
+
theme: branding.primary,
|
|
2141
|
+
logo: trim(branding.logoUrl),
|
|
2142
|
+
seller_name: trim(branding.displayName),
|
|
2143
|
+
sdk_layout: branding.paymentLayout,
|
|
2144
|
+
payment_button_text: trim(branding.payButtonLabel),
|
|
2145
|
+
payment_button_colour: branding.buttonBackground,
|
|
2146
|
+
payment_button_text_colour: branding.buttonText,
|
|
2147
|
+
background_colour: branding.background,
|
|
2148
|
+
payment_form_header_text: trim(branding.headerText),
|
|
2149
|
+
payment_form_label_type: legacyLabel,
|
|
2150
|
+
custom_message_for_card_terms: trim(branding.cardTermsMessage),
|
|
2151
|
+
sdk_ui_rules: nextRules,
|
|
2152
|
+
branding_visibility: branding.showPoweredBy
|
|
2153
|
+
};
|
|
2154
|
+
return {
|
|
2155
|
+
...base,
|
|
2156
|
+
...flatFields
|
|
2157
|
+
};
|
|
2158
|
+
}
|
|
2159
|
+
var BRANDING_EXPORT_FORMAT = "delopay-checkout-branding";
|
|
2160
|
+
var BRANDING_EXPORT_VERSION = 1;
|
|
2161
|
+
function buildBrandingExport(branding) {
|
|
2162
|
+
return {
|
|
2163
|
+
format: BRANDING_EXPORT_FORMAT,
|
|
2164
|
+
version: BRANDING_EXPORT_VERSION,
|
|
2165
|
+
exported_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2166
|
+
branding: cloneBranding(branding)
|
|
2167
|
+
};
|
|
2168
|
+
}
|
|
2169
|
+
function parseImportedBranding(raw) {
|
|
2170
|
+
const root = isObject(raw) && isObject(raw["branding"]) ? raw["branding"] : isObject(raw) ? raw : null;
|
|
2171
|
+
if (!root) return cloneBranding(DEFAULT_BRANDING);
|
|
2172
|
+
const dflt = DEFAULT_BRANDING;
|
|
2173
|
+
const sStr = (v, fallback) => typeof v === "string" ? v : fallback;
|
|
2174
|
+
const sHex = (v, fallback) => typeof v === "string" && isHexColor(v) ? v : fallback;
|
|
2175
|
+
const { trustBadges, notices } = resolveNoticesAndBadges(
|
|
2176
|
+
parseTrustBadgesLoose(root["trustBadges"]),
|
|
2177
|
+
parseNoticesLoose(root["notices"])
|
|
2178
|
+
);
|
|
2179
|
+
const customFields = _nullishCoalesce(parseCustomFieldsLoose(root["customFields"]), () => ( []));
|
|
2180
|
+
const labelStyle = (() => {
|
|
2181
|
+
const v = root["labelStyle"];
|
|
2182
|
+
if (v === "above" || v === "hidden") return v;
|
|
2183
|
+
return dflt.labelStyle;
|
|
2184
|
+
})();
|
|
2185
|
+
return {
|
|
2186
|
+
displayName: sStr(root["displayName"], dflt.displayName),
|
|
2187
|
+
logoUrl: sStr(root["logoUrl"], dflt.logoUrl),
|
|
2188
|
+
tagline: sStr(root["tagline"], dflt.tagline),
|
|
2189
|
+
showLogo: parseBool(root["showLogo"], dflt.showLogo),
|
|
2190
|
+
logoShape: pickEnum(
|
|
2191
|
+
root["logoShape"],
|
|
2192
|
+
["square", "rounded", "circle"],
|
|
2193
|
+
dflt.logoShape
|
|
2194
|
+
),
|
|
2195
|
+
logoSize: pickEnum(root["logoSize"], ["sm", "md", "lg"], dflt.logoSize),
|
|
2196
|
+
primary: sHex(root["primary"], dflt.primary),
|
|
2197
|
+
background: sHex(root["background"], dflt.background),
|
|
2198
|
+
surface: sHex(root["surface"], dflt.surface),
|
|
2199
|
+
text: sHex(root["text"], dflt.text),
|
|
2200
|
+
heading: sHex(root["heading"], dflt.heading),
|
|
2201
|
+
muted: sHex(root["muted"], dflt.muted),
|
|
2202
|
+
border: sHex(root["border"], dflt.border),
|
|
2203
|
+
accentText: sHex(root["accentText"], dflt.accentText),
|
|
2204
|
+
buttonBackground: sHex(root["buttonBackground"], dflt.buttonBackground),
|
|
2205
|
+
buttonText: sHex(root["buttonText"], dflt.buttonText),
|
|
2206
|
+
fontFamily: pickEnum(root["fontFamily"], ALL_FONT_FAMILIES, dflt.fontFamily),
|
|
2207
|
+
headingWeight: pickEnum(
|
|
2208
|
+
root["headingWeight"],
|
|
2209
|
+
["regular", "medium", "semibold", "bold"],
|
|
2210
|
+
dflt.headingWeight
|
|
2211
|
+
),
|
|
2212
|
+
radiusSurface: pickEnum(
|
|
2213
|
+
root["radiusSurface"],
|
|
2214
|
+
NON_PILL_RADII,
|
|
2215
|
+
dflt.radiusSurface
|
|
2216
|
+
),
|
|
2217
|
+
radiusInput: pickEnum(root["radiusInput"], NON_PILL_RADII, dflt.radiusInput),
|
|
2218
|
+
radiusButton: pickEnum(root["radiusButton"], ALL_RADII, dflt.radiusButton),
|
|
2219
|
+
radiusBadge: pickEnum(root["radiusBadge"], ALL_RADII, dflt.radiusBadge),
|
|
2220
|
+
surfaceStyle: pickEnum(
|
|
2221
|
+
root["surfaceStyle"],
|
|
2222
|
+
["flat", "outlined", "elevated"],
|
|
2223
|
+
dflt.surfaceStyle
|
|
2224
|
+
),
|
|
2225
|
+
surfacePadding: pickEnum(
|
|
2226
|
+
root["surfacePadding"],
|
|
2227
|
+
["compact", "comfortable", "spacious"],
|
|
2228
|
+
dflt.surfacePadding
|
|
2229
|
+
),
|
|
2230
|
+
verticalGap: pickEnum(
|
|
2231
|
+
root["verticalGap"],
|
|
2232
|
+
["compact", "comfortable", "spacious"],
|
|
2233
|
+
dflt.verticalGap
|
|
2234
|
+
),
|
|
2235
|
+
inputSize: pickEnum(root["inputSize"], ["sm", "md", "lg"], dflt.inputSize),
|
|
2236
|
+
buttonSize: pickEnum(root["buttonSize"], ["sm", "md", "lg"], dflt.buttonSize),
|
|
2237
|
+
showSurcharge: parseBool(root["showSurcharge"], dflt.showSurcharge),
|
|
2238
|
+
surchargePosition: pickEnum(
|
|
2239
|
+
root["surchargePosition"],
|
|
2240
|
+
SURCHARGE_POSITIONS,
|
|
2241
|
+
dflt.surchargePosition
|
|
2242
|
+
),
|
|
2243
|
+
nativeElementStacked: parseBool(root["nativeElementStacked"], dflt.nativeElementStacked),
|
|
2244
|
+
nativeElementPosition: pickEnum(
|
|
2245
|
+
root["nativeElementPosition"],
|
|
2246
|
+
NATIVE_ELEMENT_POSITIONS,
|
|
2247
|
+
dflt.nativeElementPosition
|
|
2248
|
+
),
|
|
2249
|
+
surchargeStyle: pickEnum(
|
|
2250
|
+
root["surchargeStyle"],
|
|
2251
|
+
SURCHARGE_STYLES,
|
|
2252
|
+
dflt.surchargeStyle
|
|
2253
|
+
),
|
|
2254
|
+
surchargeSize: pickEnum(
|
|
2255
|
+
root["surchargeSize"],
|
|
2256
|
+
SURCHARGE_SIZES,
|
|
2257
|
+
dflt.surchargeSize
|
|
2258
|
+
),
|
|
2259
|
+
surchargeShape: pickEnum(
|
|
2260
|
+
root["surchargeShape"],
|
|
2261
|
+
SURCHARGE_SHAPES,
|
|
2262
|
+
dflt.surchargeShape
|
|
2263
|
+
),
|
|
2264
|
+
surchargeBorderWidth: pickEnum(
|
|
2265
|
+
root["surchargeBorderWidth"],
|
|
2266
|
+
SURCHARGE_BORDER_WIDTHS,
|
|
2267
|
+
dflt.surchargeBorderWidth
|
|
2268
|
+
),
|
|
2269
|
+
surchargeBorderStyle: pickEnum(
|
|
2270
|
+
root["surchargeBorderStyle"],
|
|
2271
|
+
SURCHARGE_BORDER_STYLES,
|
|
2272
|
+
dflt.surchargeBorderStyle
|
|
2273
|
+
),
|
|
2274
|
+
surchargeWeight: pickEnum(
|
|
2275
|
+
root["surchargeWeight"],
|
|
2276
|
+
SURCHARGE_WEIGHTS,
|
|
2277
|
+
dflt.surchargeWeight
|
|
2278
|
+
),
|
|
2279
|
+
surchargeSign: pickEnum(
|
|
2280
|
+
root["surchargeSign"],
|
|
2281
|
+
SURCHARGE_SIGNS,
|
|
2282
|
+
dflt.surchargeSign
|
|
2283
|
+
),
|
|
2284
|
+
surchargeUppercase: parseBool(root["surchargeUppercase"], dflt.surchargeUppercase),
|
|
2285
|
+
surchargeLabel: pickEnum(
|
|
2286
|
+
root["surchargeLabel"],
|
|
2287
|
+
SURCHARGE_LABEL_MODES,
|
|
2288
|
+
dflt.surchargeLabel
|
|
2289
|
+
),
|
|
2290
|
+
surchargeFigure: pickEnum(
|
|
2291
|
+
root["surchargeFigure"],
|
|
2292
|
+
SURCHARGE_FIGURE_MODES,
|
|
2293
|
+
dflt.surchargeFigure
|
|
2294
|
+
),
|
|
2295
|
+
discountFigure: pickEnum(
|
|
2296
|
+
root["discountFigure"],
|
|
2297
|
+
SURCHARGE_FIGURE_MODES,
|
|
2298
|
+
dflt.discountFigure
|
|
2299
|
+
),
|
|
2300
|
+
surchargeWordTranslations: parseTranslations(root["surchargeWordTranslations"]),
|
|
2301
|
+
discountWordTranslations: parseTranslations(root["discountWordTranslations"]),
|
|
2302
|
+
headerTextTranslations: parseTranslations(root["headerTextTranslations"]),
|
|
2303
|
+
payButtonLabelTranslations: parseTranslations(root["payButtonLabelTranslations"]),
|
|
2304
|
+
cardTermsMessageTranslations: parseTranslations(root["cardTermsMessageTranslations"]),
|
|
2305
|
+
footerTextTranslations: parseTranslations(root["footerTextTranslations"]),
|
|
2306
|
+
surchargeColor: sHex(root["surchargeColor"], dflt.surchargeColor),
|
|
2307
|
+
discountColor: sHex(root["discountColor"], dflt.discountColor),
|
|
2308
|
+
layout: pickEnum(root["layout"], ["compact", "split"], dflt.layout),
|
|
2309
|
+
summaryPosition: pickEnum(
|
|
2310
|
+
root["summaryPosition"],
|
|
2311
|
+
["left", "right"],
|
|
2312
|
+
dflt.summaryPosition
|
|
2313
|
+
),
|
|
2314
|
+
showOrderSummary: parseBool(root["showOrderSummary"], dflt.showOrderSummary),
|
|
2315
|
+
summaryGradient: parseBool(root["summaryGradient"], dflt.summaryGradient),
|
|
2316
|
+
showTotal: parseBool(root["showTotal"], dflt.showTotal),
|
|
2317
|
+
totalLabel: sStr(root["totalLabel"], dflt.totalLabel),
|
|
2318
|
+
showCurrencyCode: parseBool(root["showCurrencyCode"], dflt.showCurrencyCode),
|
|
2319
|
+
showOrderItems: parseBool(root["showOrderItems"], dflt.showOrderItems),
|
|
2320
|
+
trustBadges,
|
|
2321
|
+
notices,
|
|
2322
|
+
customFields,
|
|
2323
|
+
cancelLinkEnabled: parseBool(root["cancelLinkEnabled"], dflt.cancelLinkEnabled),
|
|
2324
|
+
cancelLinkPosition: pickEnum(
|
|
2325
|
+
root["cancelLinkPosition"],
|
|
2326
|
+
["top", "bottom"],
|
|
2327
|
+
dflt.cancelLinkPosition
|
|
2328
|
+
),
|
|
2329
|
+
cancelLinkStyle: pickEnum(
|
|
2330
|
+
root["cancelLinkStyle"],
|
|
2331
|
+
["link", "button"],
|
|
2332
|
+
dflt.cancelLinkStyle
|
|
2333
|
+
),
|
|
2334
|
+
// An export writes the decoded maps; a hand-written file may carry the
|
|
2335
|
+
// JSON strings the bag uses. Both are accepted, and neither is required.
|
|
2336
|
+
methodSectionOrder: parseSectionOrderLoose(root[METHOD_SECTION_ORDER_KEY]),
|
|
2337
|
+
methodSectionLabels: parseSectionLabelsLoose(root[METHOD_SECTION_LABELS_KEY]),
|
|
2338
|
+
headerText: sStr(root["headerText"], dflt.headerText),
|
|
2339
|
+
payButtonLabel: sStr(root["payButtonLabel"], dflt.payButtonLabel),
|
|
2340
|
+
cardTermsMessage: sStr(root["cardTermsMessage"], dflt.cardTermsMessage),
|
|
2341
|
+
footerText: sStr(root["footerText"], dflt.footerText),
|
|
2342
|
+
supportEmail: sStr(root["supportEmail"], dflt.supportEmail),
|
|
2343
|
+
paymentLayout: pickEnum(
|
|
2344
|
+
root["paymentLayout"],
|
|
2345
|
+
["tabs", "accordion", "spaced_accordion"],
|
|
2346
|
+
dflt.paymentLayout
|
|
2347
|
+
),
|
|
2348
|
+
labelStyle,
|
|
2349
|
+
showPoweredBy: parseBool(root["showPoweredBy"], dflt.showPoweredBy),
|
|
2350
|
+
// An imported profile that predates this section carries none of these
|
|
2351
|
+
// and lands on the defaults — which is to say on "defer", so importing an
|
|
2352
|
+
// old export into a shop does not take that shop's connector setting
|
|
2353
|
+
// away. The one field that would be dangerous to import loosely is the
|
|
2354
|
+
// hide switch, and `parseBool` only says true for a literal `true`.
|
|
2355
|
+
airwallexCardPreset: pickEnumOrEmpty(
|
|
2356
|
+
root["airwallexCardPreset"],
|
|
2357
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_CARD_PRESETS
|
|
2358
|
+
),
|
|
2359
|
+
airwallexHideCard: parseBool(root["airwallexHideCard"], dflt.airwallexHideCard),
|
|
2360
|
+
airwallexHideCardTitle: parseBool(root["airwallexHideCardTitle"], dflt.airwallexHideCardTitle),
|
|
2361
|
+
airwallexFieldChrome: pickEnum(
|
|
2362
|
+
root["airwallexFieldChrome"],
|
|
2363
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_FIELD_CHROMES,
|
|
2364
|
+
dflt.airwallexFieldChrome
|
|
2365
|
+
),
|
|
2366
|
+
airwallexLabelStyle: pickEnumOrEmpty(
|
|
2367
|
+
root["airwallexLabelStyle"],
|
|
2368
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_LABEL_STYLES
|
|
2369
|
+
),
|
|
2370
|
+
airwallexFieldFontSize: pickEnum(
|
|
2371
|
+
root["airwallexFieldFontSize"],
|
|
2372
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_FIELD_FONT_SIZES,
|
|
2373
|
+
dflt.airwallexFieldFontSize
|
|
2374
|
+
),
|
|
2375
|
+
airwallexFieldWeight: pickEnum(
|
|
2376
|
+
root["airwallexFieldWeight"],
|
|
2377
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_FIELD_WEIGHTS,
|
|
2378
|
+
dflt.airwallexFieldWeight
|
|
2379
|
+
),
|
|
2380
|
+
airwallexFocusRing: pickEnum(
|
|
2381
|
+
root["airwallexFocusRing"],
|
|
2382
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_FOCUS_RINGS,
|
|
2383
|
+
dflt.airwallexFocusRing
|
|
2384
|
+
),
|
|
2385
|
+
airwallexAutofill: pickEnum(
|
|
2386
|
+
root["airwallexAutofill"],
|
|
2387
|
+
_chunk4T4XHPYNcjs.AIRWALLEX_AUTOFILL_TREATMENTS,
|
|
2388
|
+
dflt.airwallexAutofill
|
|
2389
|
+
),
|
|
2390
|
+
airwallexValidTint: parseBool(root["airwallexValidTint"], dflt.airwallexValidTint),
|
|
2391
|
+
airwallexNetworkMarks: parseBool(root["airwallexNetworkMarks"], dflt.airwallexNetworkMarks),
|
|
2392
|
+
stripeTheme: pickEnum(root["stripeTheme"], _chunkGSQN5EOOcjs.STRIPE_THEMES, dflt.stripeTheme),
|
|
2393
|
+
stripeInputs: pickEnum(
|
|
2394
|
+
root["stripeInputs"],
|
|
2395
|
+
_chunkGSQN5EOOcjs.STRIPE_INPUT_STYLES,
|
|
2396
|
+
dflt.stripeInputs
|
|
2397
|
+
),
|
|
2398
|
+
stripeLabels: pickEnum(
|
|
2399
|
+
root["stripeLabels"],
|
|
2400
|
+
_chunkGSQN5EOOcjs.STRIPE_LABEL_PLACEMENTS,
|
|
2401
|
+
dflt.stripeLabels
|
|
2402
|
+
),
|
|
2403
|
+
stripeSpacing: pickEnum(
|
|
2404
|
+
root["stripeSpacing"],
|
|
2405
|
+
_chunkGSQN5EOOcjs.STRIPE_SPACINGS,
|
|
2406
|
+
dflt.stripeSpacing
|
|
2407
|
+
),
|
|
2408
|
+
stripeFieldFontSize: pickEnum(
|
|
2409
|
+
root["stripeFieldFontSize"],
|
|
2410
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
2411
|
+
dflt.stripeFieldFontSize
|
|
2412
|
+
),
|
|
2413
|
+
stripeFieldWeight: pickEnum(
|
|
2414
|
+
root["stripeFieldWeight"],
|
|
2415
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
2416
|
+
dflt.stripeFieldWeight
|
|
2417
|
+
),
|
|
2418
|
+
stripeFocusRing: pickEnum(
|
|
2419
|
+
root["stripeFocusRing"],
|
|
2420
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
2421
|
+
dflt.stripeFocusRing
|
|
2422
|
+
),
|
|
2423
|
+
stripeDisableAnimations: parseBool(
|
|
2424
|
+
root["stripeDisableAnimations"],
|
|
2425
|
+
dflt.stripeDisableAnimations
|
|
2426
|
+
),
|
|
2427
|
+
paypalCardLayout: pickEnum(
|
|
2428
|
+
root["paypalCardLayout"],
|
|
2429
|
+
_chunkGSQN5EOOcjs.PAYPAL_CARD_LAYOUTS,
|
|
2430
|
+
dflt.paypalCardLayout
|
|
2431
|
+
),
|
|
2432
|
+
paypalLabelStyle: pickEnum(
|
|
2433
|
+
root["paypalLabelStyle"],
|
|
2434
|
+
_chunkGSQN5EOOcjs.PAYPAL_LABEL_STYLES,
|
|
2435
|
+
dflt.paypalLabelStyle
|
|
2436
|
+
),
|
|
2437
|
+
paypalFieldChrome: pickEnum(
|
|
2438
|
+
root["paypalFieldChrome"],
|
|
2439
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
2440
|
+
dflt.paypalFieldChrome
|
|
2441
|
+
),
|
|
2442
|
+
mollieFieldChrome: pickEnum(
|
|
2443
|
+
root["mollieFieldChrome"],
|
|
2444
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
2445
|
+
dflt.mollieFieldChrome
|
|
2446
|
+
),
|
|
2447
|
+
paypalFieldFontSize: pickEnum(
|
|
2448
|
+
root["paypalFieldFontSize"],
|
|
2449
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
2450
|
+
dflt.paypalFieldFontSize
|
|
2451
|
+
),
|
|
2452
|
+
mollieFieldFontSize: pickEnum(
|
|
2453
|
+
root["mollieFieldFontSize"],
|
|
2454
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
2455
|
+
dflt.mollieFieldFontSize
|
|
2456
|
+
),
|
|
2457
|
+
paypalFieldWeight: pickEnum(
|
|
2458
|
+
root["paypalFieldWeight"],
|
|
2459
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
2460
|
+
dflt.paypalFieldWeight
|
|
2461
|
+
),
|
|
2462
|
+
mollieFieldWeight: pickEnum(
|
|
2463
|
+
root["mollieFieldWeight"],
|
|
2464
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
2465
|
+
dflt.mollieFieldWeight
|
|
2466
|
+
),
|
|
2467
|
+
paypalFocusRing: pickEnum(
|
|
2468
|
+
root["paypalFocusRing"],
|
|
2469
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
2470
|
+
dflt.paypalFocusRing
|
|
2471
|
+
),
|
|
2472
|
+
mollieFocusRing: pickEnum(
|
|
2473
|
+
root["mollieFocusRing"],
|
|
2474
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
2475
|
+
dflt.mollieFocusRing
|
|
2476
|
+
),
|
|
2477
|
+
micropaymentFieldChrome: pickEnum(
|
|
2478
|
+
root["micropaymentFieldChrome"],
|
|
2479
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
2480
|
+
dflt.micropaymentFieldChrome
|
|
2481
|
+
),
|
|
2482
|
+
micropaymentFieldFontSize: pickEnum(
|
|
2483
|
+
root["micropaymentFieldFontSize"],
|
|
2484
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
2485
|
+
dflt.micropaymentFieldFontSize
|
|
2486
|
+
),
|
|
2487
|
+
micropaymentFieldWeight: pickEnum(
|
|
2488
|
+
root["micropaymentFieldWeight"],
|
|
2489
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
2490
|
+
dflt.micropaymentFieldWeight
|
|
2491
|
+
),
|
|
2492
|
+
micropaymentFocusRing: pickEnum(
|
|
2493
|
+
root["micropaymentFocusRing"],
|
|
2494
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
2495
|
+
dflt.micropaymentFocusRing
|
|
2496
|
+
),
|
|
2497
|
+
whopCardPreset: pickEnum(
|
|
2498
|
+
root["whopCardPreset"],
|
|
2499
|
+
_chunkGSQN5EOOcjs.WHOP_CARD_PRESETS,
|
|
2500
|
+
dflt.whopCardPreset
|
|
2501
|
+
),
|
|
2502
|
+
whopAccentColor: pickEnum(
|
|
2503
|
+
root["whopAccentColor"],
|
|
2504
|
+
_chunkGSQN5EOOcjs.WHOP_ACCENT_COLORS,
|
|
2505
|
+
dflt.whopAccentColor
|
|
2506
|
+
),
|
|
2507
|
+
whopGrayColor: pickEnum(
|
|
2508
|
+
root["whopGrayColor"],
|
|
2509
|
+
_chunkGSQN5EOOcjs.WHOP_GRAY_COLORS,
|
|
2510
|
+
dflt.whopGrayColor
|
|
2511
|
+
),
|
|
2512
|
+
whopBillingDetails: pickEnum(
|
|
2513
|
+
root["whopBillingDetails"],
|
|
2514
|
+
_chunkGSQN5EOOcjs.WHOP_BILLING_DETAILS,
|
|
2515
|
+
dflt.whopBillingDetails
|
|
2516
|
+
),
|
|
2517
|
+
whopSeparated: parseBool(root["whopSeparated"], dflt.whopSeparated),
|
|
2518
|
+
whopEmailLabel: pickEnum(
|
|
2519
|
+
root["whopEmailLabel"],
|
|
2520
|
+
_chunkGSQN5EOOcjs.WHOP_EMAIL_LABELS,
|
|
2521
|
+
dflt.whopEmailLabel
|
|
2522
|
+
),
|
|
2523
|
+
whopFieldChrome: pickEnum(
|
|
2524
|
+
root["whopFieldChrome"],
|
|
2525
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
2526
|
+
dflt.whopFieldChrome
|
|
2527
|
+
),
|
|
2528
|
+
whopFieldFontSize: pickEnum(
|
|
2529
|
+
root["whopFieldFontSize"],
|
|
2530
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
2531
|
+
dflt.whopFieldFontSize
|
|
2532
|
+
),
|
|
2533
|
+
whopFieldWeight: pickEnum(
|
|
2534
|
+
root["whopFieldWeight"],
|
|
2535
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
2536
|
+
dflt.whopFieldWeight
|
|
2537
|
+
),
|
|
2538
|
+
whopFocusRing: pickEnum(
|
|
2539
|
+
root["whopFocusRing"],
|
|
2540
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
2541
|
+
dflt.whopFocusRing
|
|
2542
|
+
),
|
|
2543
|
+
whopRadius: pickEnum(root["whopRadius"], _chunkGSQN5EOOcjs.WHOP_RADII, dflt.whopRadius),
|
|
2544
|
+
whopShadow: pickEnum(root["whopShadow"], _chunkGSQN5EOOcjs.WHOP_SHADOWS, dflt.whopShadow),
|
|
2545
|
+
whopMethodIcons: parseBool(root["whopMethodIcons"], dflt.whopMethodIcons),
|
|
2546
|
+
whopSelection: pickEnum(
|
|
2547
|
+
root["whopSelection"],
|
|
2548
|
+
_chunkGSQN5EOOcjs.WHOP_SELECTIONS,
|
|
2549
|
+
dflt.whopSelection
|
|
2550
|
+
),
|
|
2551
|
+
paypalValidTint: parseBool(root["paypalValidTint"], dflt.paypalValidTint),
|
|
2552
|
+
// A look stored before e-Payouts had its own keys has none: the form keeps
|
|
2553
|
+
// the PayPal values it was drawn with until then.
|
|
2554
|
+
epayoutsCardLayout: pickEnum(
|
|
2555
|
+
root["epayoutsCardLayout"],
|
|
2556
|
+
_chunkGSQN5EOOcjs.PAYPAL_CARD_LAYOUTS,
|
|
2557
|
+
pickEnum(
|
|
2558
|
+
root["paypalCardLayout"],
|
|
2559
|
+
_chunkGSQN5EOOcjs.PAYPAL_CARD_LAYOUTS,
|
|
2560
|
+
dflt.epayoutsCardLayout
|
|
2561
|
+
)
|
|
2562
|
+
),
|
|
2563
|
+
epayoutsLabelStyle: pickEnum(
|
|
2564
|
+
root["epayoutsLabelStyle"],
|
|
2565
|
+
_chunkGSQN5EOOcjs.PAYPAL_LABEL_STYLES,
|
|
2566
|
+
pickEnum(
|
|
2567
|
+
root["paypalLabelStyle"],
|
|
2568
|
+
_chunkGSQN5EOOcjs.PAYPAL_LABEL_STYLES,
|
|
2569
|
+
dflt.epayoutsLabelStyle
|
|
2570
|
+
)
|
|
2571
|
+
),
|
|
2572
|
+
epayoutsFieldChrome: pickEnum(
|
|
2573
|
+
root["epayoutsFieldChrome"],
|
|
2574
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
2575
|
+
pickEnum(
|
|
2576
|
+
root["paypalFieldChrome"],
|
|
2577
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
2578
|
+
dflt.epayoutsFieldChrome
|
|
2579
|
+
)
|
|
2580
|
+
),
|
|
2581
|
+
epayoutsFieldFontSize: pickEnum(
|
|
2582
|
+
root["epayoutsFieldFontSize"],
|
|
2583
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
2584
|
+
pickEnum(
|
|
2585
|
+
root["paypalFieldFontSize"],
|
|
2586
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
2587
|
+
dflt.epayoutsFieldFontSize
|
|
2588
|
+
)
|
|
2589
|
+
),
|
|
2590
|
+
epayoutsFieldWeight: pickEnum(
|
|
2591
|
+
root["epayoutsFieldWeight"],
|
|
2592
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
2593
|
+
pickEnum(
|
|
2594
|
+
root["paypalFieldWeight"],
|
|
2595
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_WEIGHTS,
|
|
2596
|
+
dflt.epayoutsFieldWeight
|
|
2597
|
+
)
|
|
2598
|
+
),
|
|
2599
|
+
epayoutsFocusRing: pickEnum(
|
|
2600
|
+
root["epayoutsFocusRing"],
|
|
2601
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
2602
|
+
pickEnum(root["paypalFocusRing"], _chunkGSQN5EOOcjs.CARD_FOCUS_RINGS, dflt.epayoutsFocusRing)
|
|
2603
|
+
),
|
|
2604
|
+
epayoutsValidTint: parseBool(
|
|
2605
|
+
root["epayoutsValidTint"],
|
|
2606
|
+
parseBool(root["paypalValidTint"], dflt.epayoutsValidTint)
|
|
2607
|
+
),
|
|
2608
|
+
nomupayFormStyle: pickEnum(
|
|
2609
|
+
root["nomupayFormStyle"],
|
|
2610
|
+
_chunkGSQN5EOOcjs.NOMUPAY_FORM_STYLES,
|
|
2611
|
+
dflt.nomupayFormStyle
|
|
2612
|
+
),
|
|
2613
|
+
nomupayShowLabels: parseBool(root["nomupayShowLabels"], dflt.nomupayShowLabels),
|
|
2614
|
+
nomupayShowPlaceholders: parseBool(
|
|
2615
|
+
root["nomupayShowPlaceholders"],
|
|
2616
|
+
dflt.nomupayShowPlaceholders
|
|
2617
|
+
),
|
|
2618
|
+
nomupayShowCvvHint: parseBool(root["nomupayShowCvvHint"], dflt.nomupayShowCvvHint),
|
|
2619
|
+
nomupayFieldChrome: pickEnum(
|
|
2620
|
+
root["nomupayFieldChrome"],
|
|
2621
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_CHROMES,
|
|
2622
|
+
dflt.nomupayFieldChrome
|
|
2623
|
+
),
|
|
2624
|
+
nomupayFieldFontSize: pickEnum(
|
|
2625
|
+
root["nomupayFieldFontSize"],
|
|
2626
|
+
_chunkGSQN5EOOcjs.CARD_FIELD_FONT_SIZES,
|
|
2627
|
+
dflt.nomupayFieldFontSize
|
|
2628
|
+
),
|
|
2629
|
+
nomupayFocusRing: pickEnum(
|
|
2630
|
+
root["nomupayFocusRing"],
|
|
2631
|
+
_chunkGSQN5EOOcjs.CARD_FOCUS_RINGS,
|
|
2632
|
+
dflt.nomupayFocusRing
|
|
2633
|
+
),
|
|
2634
|
+
nomupayApplePayButtonStyle: pickEnum(
|
|
2635
|
+
root["nomupayApplePayButtonStyle"],
|
|
2636
|
+
_chunkGSQN5EOOcjs.APPLE_PAY_BUTTON_STYLES,
|
|
2637
|
+
dflt.nomupayApplePayButtonStyle
|
|
2638
|
+
),
|
|
2639
|
+
nomupayApplePayButtonType: pickEnum(
|
|
2640
|
+
root["nomupayApplePayButtonType"],
|
|
2641
|
+
_chunkGSQN5EOOcjs.APPLE_PAY_BUTTON_TYPES,
|
|
2642
|
+
dflt.nomupayApplePayButtonType
|
|
2643
|
+
),
|
|
2644
|
+
nomupayGooglePayButtonColor: pickEnum(
|
|
2645
|
+
root["nomupayGooglePayButtonColor"],
|
|
2646
|
+
_chunkGSQN5EOOcjs.GOOGLE_PAY_BUTTON_COLORS,
|
|
2647
|
+
dflt.nomupayGooglePayButtonColor
|
|
2648
|
+
),
|
|
2649
|
+
nomupayGooglePayButtonType: pickEnum(
|
|
2650
|
+
root["nomupayGooglePayButtonType"],
|
|
2651
|
+
_chunkGSQN5EOOcjs.GOOGLE_PAY_BUTTON_TYPES,
|
|
2652
|
+
dflt.nomupayGooglePayButtonType
|
|
2653
|
+
),
|
|
2654
|
+
customCss: sStr(root["customCss"], dflt.customCss).slice(0, CUSTOM_CSS_MAX_LENGTH),
|
|
2655
|
+
..._chunk5CITBN33cjs.decodeEnigmaCardForm.call(void 0, root)
|
|
2656
|
+
};
|
|
2657
|
+
}
|
|
2658
|
+
function isObject(v) {
|
|
2659
|
+
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
2660
|
+
}
|
|
2661
|
+
function parseTrustBadgesLoose(raw) {
|
|
2662
|
+
if (!Array.isArray(raw)) return null;
|
|
2663
|
+
return raw.filter(isObject).map((b, i) => ({
|
|
2664
|
+
id: typeof b["id"] === "string" && b["id"] ? b["id"] : `badge-${i}`,
|
|
2665
|
+
label: typeof b["label"] === "string" ? b["label"] : "",
|
|
2666
|
+
textColor: typeof b["textColor"] === "string" && isHexColor(b["textColor"]) ? b["textColor"] : "#0f172a",
|
|
2667
|
+
backgroundColor: typeof b["backgroundColor"] === "string" && isHexColor(b["backgroundColor"]) ? b["backgroundColor"] : "#f1f5f9",
|
|
2668
|
+
borderColor: typeof b["borderColor"] === "string" && isHexColor(b["borderColor"]) ? b["borderColor"] : null
|
|
2669
|
+
})).filter((b) => b.label.length > 0);
|
|
2670
|
+
}
|
|
2671
|
+
function applyBrandingVariables(el, b) {
|
|
2672
|
+
const set = (k, v) => {
|
|
2673
|
+
el.style.setProperty(k, v);
|
|
2674
|
+
};
|
|
2675
|
+
set("--dp-primary", b.primary);
|
|
2676
|
+
set("--dp-bg", b.background);
|
|
2677
|
+
set("--dp-surface", b.surface);
|
|
2678
|
+
set("--dp-text", b.text);
|
|
2679
|
+
set("--dp-heading", b.heading);
|
|
2680
|
+
set("--dp-muted", b.muted);
|
|
2681
|
+
set("--dp-border", b.border);
|
|
2682
|
+
set("--dp-accent-text", b.accentText);
|
|
2683
|
+
set("--dp-btn-bg", b.buttonBackground);
|
|
2684
|
+
set("--dp-btn-fg", b.buttonText);
|
|
2685
|
+
set("--dp-radius-surface", radiusValue(b.radiusSurface));
|
|
2686
|
+
set("--dp-radius-input", radiusValue(b.radiusInput));
|
|
2687
|
+
set("--dp-radius-button", radiusValue(b.radiusButton));
|
|
2688
|
+
set("--dp-radius-badge", radiusValue(b.radiusBadge));
|
|
2689
|
+
set("--dp-font", fontStack(b.fontFamily));
|
|
2690
|
+
set("--dp-heading-weight", fontWeightValue(b.headingWeight));
|
|
2691
|
+
set("--dp-pad-surface", SURFACE_PAD[b.surfacePadding]);
|
|
2692
|
+
set("--dp-gap-vertical", VERTICAL_GAP[b.verticalGap]);
|
|
2693
|
+
set("--dp-input-pad", INPUT_PAD[b.inputSize]);
|
|
2694
|
+
set("--dp-button-pad", BUTTON_PAD[b.buttonSize]);
|
|
2695
|
+
set("--dp-surcharge", b.surchargeColor);
|
|
2696
|
+
set("--dp-discount", b.discountColor);
|
|
2697
|
+
set("--dp-surcharge-ink", readableInkOn(b.surchargeColor));
|
|
2698
|
+
set("--dp-discount-ink", readableInkOn(b.discountColor));
|
|
2699
|
+
set("--dp-surcharge-size", SURCHARGE_FONT_SIZE[b.surchargeSize]);
|
|
2700
|
+
set("--dp-surcharge-pad", SURCHARGE_PAD[b.surchargeSize]);
|
|
2701
|
+
set("--dp-surcharge-radius", SURCHARGE_RADIUS[b.surchargeShape]);
|
|
2702
|
+
set("--dp-surcharge-weight", SURCHARGE_FONT_WEIGHT[b.surchargeWeight]);
|
|
2703
|
+
set(
|
|
2704
|
+
"--dp-surcharge-border-width",
|
|
2705
|
+
SURCHARGE_BORDER_WIDTH[b.surchargeStyle === "outline" && b.surchargeBorderWidth === "none" ? "thin" : b.surchargeBorderWidth]
|
|
2706
|
+
);
|
|
2707
|
+
set("--dp-surcharge-border-style", b.surchargeBorderStyle);
|
|
2708
|
+
set("--dp-shadow", shadowFor(b.surfaceStyle));
|
|
2709
|
+
set(
|
|
2710
|
+
"--dp-surface-border",
|
|
2711
|
+
b.surfaceStyle === "outlined" ? `1px solid ${b.border}` : "1px solid transparent"
|
|
2712
|
+
);
|
|
2713
|
+
}
|
|
2714
|
+
function shadowFor(style) {
|
|
2715
|
+
switch (style) {
|
|
2716
|
+
case "elevated":
|
|
2717
|
+
return "0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 32px -12px rgba(15, 23, 42, 0.08)";
|
|
2718
|
+
case "outlined":
|
|
2719
|
+
case "flat":
|
|
2720
|
+
default:
|
|
2721
|
+
return "none";
|
|
2722
|
+
}
|
|
2723
|
+
}
|
|
2724
|
+
|
|
2725
|
+
|
|
2726
|
+
|
|
2727
|
+
|
|
2728
|
+
|
|
2729
|
+
|
|
2730
|
+
|
|
2731
|
+
|
|
2732
|
+
|
|
2733
|
+
|
|
2734
|
+
|
|
2735
|
+
|
|
2736
|
+
|
|
2737
|
+
|
|
2738
|
+
|
|
2739
|
+
|
|
2740
|
+
|
|
2741
|
+
|
|
2742
|
+
|
|
2743
|
+
|
|
2744
|
+
|
|
2745
|
+
|
|
2746
|
+
|
|
2747
|
+
|
|
2748
|
+
|
|
2749
|
+
|
|
2750
|
+
|
|
2751
|
+
|
|
2752
|
+
|
|
2753
|
+
|
|
2754
|
+
|
|
2755
|
+
|
|
2756
|
+
|
|
2757
|
+
|
|
2758
|
+
|
|
2759
|
+
|
|
2760
|
+
|
|
2761
|
+
|
|
2762
|
+
|
|
2763
|
+
|
|
2764
|
+
|
|
2765
|
+
|
|
2766
|
+
|
|
2767
|
+
|
|
2768
|
+
|
|
2769
|
+
|
|
2770
|
+
|
|
2771
|
+
|
|
2772
|
+
|
|
2773
|
+
|
|
2774
|
+
|
|
2775
|
+
|
|
2776
|
+
|
|
2777
|
+
|
|
2778
|
+
|
|
2779
|
+
|
|
2780
|
+
|
|
2781
|
+
|
|
2782
|
+
|
|
2783
|
+
|
|
2784
|
+
|
|
2785
|
+
|
|
2786
|
+
|
|
2787
|
+
|
|
2788
|
+
|
|
2789
|
+
|
|
2790
|
+
|
|
2791
|
+
|
|
2792
|
+
|
|
2793
|
+
|
|
2794
|
+
|
|
2795
|
+
|
|
2796
|
+
|
|
2797
|
+
|
|
2798
|
+
|
|
2799
|
+
|
|
2800
|
+
|
|
2801
|
+
|
|
2802
|
+
|
|
2803
|
+
|
|
2804
|
+
|
|
2805
|
+
|
|
2806
|
+
|
|
2807
|
+
|
|
2808
|
+
|
|
2809
|
+
|
|
2810
|
+
|
|
2811
|
+
|
|
2812
|
+
|
|
2813
|
+
|
|
2814
|
+
|
|
2815
|
+
|
|
2816
|
+
|
|
2817
|
+
|
|
2818
|
+
|
|
2819
|
+
|
|
2820
|
+
|
|
2821
|
+
|
|
2822
|
+
|
|
2823
|
+
|
|
2824
|
+
|
|
2825
|
+
|
|
2826
|
+
|
|
2827
|
+
|
|
2828
|
+
|
|
2829
|
+
|
|
2830
|
+
|
|
2831
|
+
|
|
2832
|
+
|
|
2833
|
+
|
|
2834
|
+
|
|
2835
|
+
|
|
2836
|
+
|
|
2837
|
+
|
|
2838
|
+
|
|
2839
|
+
|
|
2840
|
+
|
|
2841
|
+
exports.surchargeShowsLabel = surchargeShowsLabel; exports.surchargeFigurePlan = surchargeFigurePlan; exports.readableInkOn = readableInkOn; exports.SURCHARGE_POSITIONS = SURCHARGE_POSITIONS; exports.NATIVE_ELEMENT_POSITIONS = NATIVE_ELEMENT_POSITIONS; exports.SURCHARGE_STYLES = SURCHARGE_STYLES; exports.SURCHARGE_BORDER_WIDTHS = SURCHARGE_BORDER_WIDTHS; exports.SURCHARGE_BORDER_STYLES = SURCHARGE_BORDER_STYLES; exports.SURCHARGE_SIZES = SURCHARGE_SIZES; exports.surchargeStyleDrawsAShape = surchargeStyleDrawsAShape; exports.SURCHARGE_SHAPES = SURCHARGE_SHAPES; exports.SURCHARGE_WEIGHTS = SURCHARGE_WEIGHTS; exports.SURCHARGE_SIGNS = SURCHARGE_SIGNS; exports.SURCHARGE_LABEL_MODES = SURCHARGE_LABEL_MODES; exports.SURCHARGE_FIGURE_MODES = SURCHARGE_FIGURE_MODES; exports.CHECKOUT_LOCALES = CHECKOUT_LOCALES; exports.RTL_CHECKOUT_LOCALES = RTL_CHECKOUT_LOCALES; exports.checkoutLocaleDir = checkoutLocaleDir; exports.LOCALIZABLE_COPY_FIELDS = LOCALIZABLE_COPY_FIELDS; exports.copyTranslationsKey = copyTranslationsKey; exports.checkoutCopy = checkoutCopy; exports.surchargeWordFor = surchargeWordFor; exports.NOTICE_SECTIONS = NOTICE_SECTIONS; exports.NOTICES_PER_SECTION = NOTICES_PER_SECTION; exports.NOTICE_LABEL_MAX_LENGTH = NOTICE_LABEL_MAX_LENGTH; exports.NOTICE_ICONS = NOTICE_ICONS; exports.NOTICE_ICON_FALLBACK = NOTICE_ICON_FALLBACK; exports.NOTICE_ICON_PATHS = NOTICE_ICON_PATHS; exports.isNoticeIcon = isNoticeIcon; exports.fontStack = fontStack; exports.radiusValue = radiusValue; exports.fontWeightValue = fontWeightValue; exports.surfacePadValue = surfacePadValue; exports.verticalGapValue = verticalGapValue; exports.inputPadValue = inputPadValue; exports.buttonPadValue = buttonPadValue; exports.vaultFormAppearance = vaultFormAppearance; exports.enigmaDefaultFill = enigmaDefaultFill; exports.logoDimensions = logoDimensions; exports.isHexColor = isHexColor; exports.WCAG_AA_TEXT = WCAG_AA_TEXT; exports.WCAG_AA_UI = WCAG_AA_UI; exports.contrastRatio = contrastRatio; exports.isDarkSurface = isDarkSurface; exports.DEFAULT_BADGES = DEFAULT_BADGES; exports.DEFAULT_BADGES_DARK = DEFAULT_BADGES_DARK; exports.DEFAULT_NOTICES = DEFAULT_NOTICES; exports.defaultNotices = defaultNotices; exports.cloneNotice = cloneNotice; exports.isDefaultBadgeSet = isDefaultBadgeSet; exports.resolveNoticesAndBadges = resolveNoticesAndBadges; exports.MIN_SECTION_ORDER = MIN_SECTION_ORDER; exports.MAX_SECTION_ORDER = MAX_SECTION_ORDER; exports.MAX_SECTION_LABEL_LENGTH = MAX_SECTION_LABEL_LENGTH; exports.METHOD_SECTIONS = METHOD_SECTIONS; exports.SECTION_ALIASES = SECTION_ALIASES; exports.UNKNOWN_SECTION_ORDER = UNKNOWN_SECTION_ORDER; exports.canonicalSectionId = canonicalSectionId; exports.defaultMethodSectionOrder = defaultMethodSectionOrder; exports.validSectionOrder = validSectionOrder; exports.decodeMethodSectionOrder = decodeMethodSectionOrder; exports.encodeMethodSectionOrder = encodeMethodSectionOrder; exports.decodeMethodSectionLabels = decodeMethodSectionLabels; exports.encodeMethodSectionLabels = encodeMethodSectionLabels; exports.sectionOrderOf = sectionOrderOf; exports.compareSections = compareSections; exports.sectionLabel = sectionLabel; exports.knownSectionLabelKey = knownSectionLabelKey; exports.DEFAULT_BRANDING = DEFAULT_BRANDING; exports.DEFAULT_BRANDING_DARK = DEFAULT_BRANDING_DARK; exports.defaultBranding = defaultBranding; exports.cloneBranding = cloneBranding; exports.cloneCustomField = cloneCustomField; exports.CUSTOM_CSS_MAX_LENGTH = CUSTOM_CSS_MAX_LENGTH; exports.sanitizeCustomCss = sanitizeCustomCss; exports.decodeBadges = decodeBadges; exports.encodeBadges = encodeBadges; exports.decodeNotices = decodeNotices; exports.parseNoticesLoose = parseNoticesLoose; exports.encodeNotices = encodeNotices; exports.noticeText = noticeText; exports.noticesIn = noticesIn; exports.shownNotices = shownNotices; exports.CUSTOM_FIELDS_MAX = CUSTOM_FIELDS_MAX; exports.CUSTOM_FIELD_KEY_PATTERN = CUSTOM_FIELD_KEY_PATTERN; exports.ALL_CUSTOM_FIELD_TYPES = ALL_CUSTOM_FIELD_TYPES; exports.CHECKBOX_CHECKED = CHECKBOX_CHECKED; exports.CHECKBOX_UNCHECKED = CHECKBOX_UNCHECKED; exports.isCheckboxChecked = isCheckboxChecked; exports.customFieldIsTextLike = customFieldIsTextLike; exports.CUSTOM_FIELD_CONDITIONS_MAX = CUSTOM_FIELD_CONDITIONS_MAX; exports.ALL_CUSTOM_FIELD_CONDITION_SOURCES = ALL_CUSTOM_FIELD_CONDITION_SOURCES; exports.ALL_CUSTOM_FIELD_OPERATORS = ALL_CUSTOM_FIELD_OPERATORS; exports.CUSTOM_FIELD_OPERATORS_BY_SOURCE = CUSTOM_FIELD_OPERATORS_BY_SOURCE; exports.CUSTOM_FIELD_VALUELESS_OPERATORS = CUSTOM_FIELD_VALUELESS_OPERATORS; exports.customFieldOperatorTakesValue = customFieldOperatorTakesValue; exports.defaultOperatorForSource = defaultOperatorForSource; exports.defaultCustomFieldVisibility = defaultCustomFieldVisibility; exports.parseCustomFieldsLoose = parseCustomFieldsLoose; exports.decodeCustomFields = decodeCustomFields; exports.encodeCustomFields = encodeCustomFields; exports.customFieldContextFromMetadata = customFieldContextFromMetadata; exports.evaluateCustomFieldCondition = evaluateCustomFieldCondition; exports.evaluateCustomFieldVisibility = evaluateCustomFieldVisibility; exports.visibleCustomFields = visibleCustomFields; exports.customFieldText = customFieldText; exports.customFieldOptionLabel = customFieldOptionLabel; exports.decodeBranding = decodeBranding; exports.encodeBranding = encodeBranding; exports.BRANDING_EXPORT_FORMAT = BRANDING_EXPORT_FORMAT; exports.BRANDING_EXPORT_VERSION = BRANDING_EXPORT_VERSION; exports.buildBrandingExport = buildBrandingExport; exports.parseImportedBranding = parseImportedBranding; exports.applyBrandingVariables = applyBrandingVariables; exports.shadowFor = shadowFor;
|
|
2842
|
+
//# sourceMappingURL=chunk-LYIBTVK6.cjs.map
|