@primer-io/checkout-web 2.24.0 → 2.25.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/CHANGELOG.md +12 -0
- package/dist/Checkout.css +1 -1
- package/dist/Primer.js +1 -0
- package/dist/index.d.ts +188 -194
- package/package.json +6 -6
- package/dist/loader.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @primer-io/checkout-web
|
|
2
2
|
|
|
3
|
+
## 2.25.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 6de8580f: add loader analytics
|
|
8
|
+
- aa9c8954: Fix some payment method buttons height
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 40eaa4d1: call API at /configuration as early as possible, in parallel with fetching the rest of the SDK's JS
|
|
13
|
+
- 5c38d4fe: Add Analytics for Network and SDK function calls
|
|
14
|
+
|
|
3
15
|
## 2.24.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/Checkout.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@-webkit-keyframes PrimerCheckout__loadingSpinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes PrimerCheckout__loadingSpinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes blink{0%,100%{opacity:1}50%{opacity:.5}}@keyframes blink{0%,100%{opacity:1}50%{opacity:.5}}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}100%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}100%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}.PrimerCheckout__title{padding:0;margin:0;font-size:1.15rem;color:#262626;font-weight:500}.PrimerCheckout__sceneElement{-webkit-flex:0 0 auto;flex:0 0 auto}.PrimerCheckout__sceneElement:not(:last-child){margin-bottom:32px}.PrimerCheckout__divider{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center;transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms}.PrimerCheckout__divider>.PrimerCheckout__label{display:inline-block;margin:0px 10px}.PrimerCheckout__divider>.PrimerCheckout__dividerLineSegment{background-color:#e0e0e0;-webkit-flex:1 1 auto;flex:1 1 auto;height:1px}.PrimerCheckout__divider--hidden{-webkit-transform:translateY(-20px);transform:translateY(-20px);opacity:0}.PrimerCheckout__textDivider{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;text-align:center}.PrimerCheckout__textDivider::before,.PrimerCheckout__textDivider::after{display:block;content:"";-webkit-flex:1;flex:1;height:1px;background:#e0e0e0;min-width:16px}.PrimerCheckout__textDivider::before{margin-right:8px}@media(max-width: 600px){.PrimerCheckout__textDivider::before{margin-right:2px}}.PrimerCheckout__textDivider::after{margin-left:8px}@media(max-width: 600px){.PrimerCheckout__textDivider::after{margin-left:2px}}.PrimerCheckout__apmButton{position:relative;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:center;justify-content:center;overflow:hidden;transition:opacity 300ms cubic-bezier(0.4, 0, 0.2, 1)}.PrimerCheckout__apmButton button{cursor:pointer;width:100%;border:none}.PrimerCheckout__apmButton:focus-within{outline:2px solid #3447f4;outline-offset:2px}.PrimerCheckout__apmButton:not(:first-of-type){margin-top:8px}.PrimerCheckout__apmButton>.paypal-buttons{transition:none !important}.PrimerCheckout__apmButton--logo{border-width:1px;border-style:solid}.PrimerCheckout__apmButton--logo:hover{opacity:.8}.PrimerCheckout__apmButton--logo img{max-height:calc(100% - 8px);max-width:calc(100% - 8px)}.PrimerCheckout__separator{margin:32px 0px;height:1px;background:#e0e0e0}.PrimerCheckout__emptyText{-webkit-transform:translateY(0px);transform:translateY(0px);opacity:1;transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms}.PrimerCheckout__emptyText.PrimerCheckout--exit{-webkit-transform:transalteY(-20px);transform:transalteY(-20px);opacity:0}.PrimerCheckout__cardTypes{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;display:-webkit-flex;display:flex}.PrimerCheckout__hostedInputContent{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);overflow:hidden;pointer-events:none;right:12px;height:100%;padding:11px 0px;-webkit-align-items:center;align-items:center}.PrimerCheckout__cardType{position:relative;width:24px;height:100%;transition:all 300ms cubic-bezier(0.4, 0, 0.2, 1),opacity 300ms cubic-bezier(0.4, 0, 0.2, 1)}.PrimerCheckout__cardType>*{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.PrimerCheckout__cardType.PrimerCheckout--hidden{display:inline-block !important;width:0px;margin-right:0px;opacity:0}.PrimerCheckout__cardType.PrimerCheckout--error::after{content:"";position:absolute;right:-4px;top:-4px;width:8px;height:8px;border-radius:50%;background-color:#ea4335}.PrimerCheckout__form{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column}.PrimerCheckout__formHeader{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;align-items:center;margin-bottom:32px}.PrimerCheckout__formField{position:relative;-webkit-flex:0;flex:0}.PrimerCheckout__formField.PrimerCheckout__formField--dual{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:baseline;align-items:baseline}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField{-webkit-flex:0 1 calc(50% - 8px);flex:0 1 calc(50% - 8px)}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField{margin-top:0px}@media(max-width: 600px){.PrimerCheckout__formField.PrimerCheckout__formField--dual{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:initial;align-items:initial}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField{-webkit-flex:unset;flex:unset}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField+.PrimerCheckout__formField{margin-top:inherit}}.PrimerCheckout__formField.PrimerCheckout__formField--orientation-horizontal{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}.PrimerCheckout__formField>.PrimerCheckout__label{display:inline-block;margin-left:1px}.PrimerCheckout__formField .PrimerCheckout__checkbox+.PrimerCheckout__label{cursor:pointer;margin-left:8px}.PrimerCheckout__helperText{position:relative;z-index:0;transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms;-webkit-transform:translateY(-20px);transform:translateY(-20px);opacity:0}.PrimerCheckout__helperText.PrimerCheckout--enter{-webkit-transform:translateY(-20px);transform:translateY(-20px);opacity:0;margin-top:0px;-webkit-animation:none;animation:none}.PrimerCheckout__helperText.PrimerCheckout--entering{-webkit-transform:translateY(0px);transform:translateY(0px);opacity:1}.PrimerCheckout__helperText.PrimerCheckout--entered{opacity:1;-webkit-transform:translateY(0px);transform:translateY(0px)}.PrimerCheckout__helperText.PrimerCheckout--exit{opacity:1;-webkit-animation:none;animation:none}.PrimerCheckout__helperText.PrimerCheckout--exiting{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}.PrimerCheckout__formFieldTitle{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.PrimerCheckout__checkbox{-webkit-appearance:none;font-size:1rem;cursor:pointer;margin:0px;padding:8px;display:inline-block;position:relative;color:#fff;border-radius:4px;border:1px solid #bdbdbd}.PrimerCheckout__checkbox:checked{color:#fff;background-color:#3447f4;border-color:#3447f4}.PrimerCheckout__checkbox::after{content:"✓";font-size:16px;position:absolute;top:50%;left:55%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}#primer-checkout-vault-methods{opacity:1;-webkit-transform-origin:top center;transform-origin:top center;-webkit-transform:translateY(0px);transform:translateY(0px);transition:all 500ms cubic-bezier(0.4, 0, 0.2, 1)}#primer-checkout-vault-methods.PrimerCheckout--exit{opacity:0;-webkit-transform:translateY(-100px);transform:translateY(-100px)}.PrimerCheckout__dropDownMenu{border:1px solid #e0e0e0;border-radius:2px;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;position:absolute;z-index:1000;top:0px;right:0px;width:100%;background-color:#fff;box-shadow:0px 1px 10px rgba(0,0,0,.1),0px 0px 20px rgba(52,71,244,.1);opacity:0;-webkit-transform-origin:top center;transform-origin:top center;-webkit-transform:translateY(-10px) scaleY(0.9);transform:translateY(-10px) scaleY(0.9);transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms;pointer-events:none}.PrimerCheckout__dropDownMenu>.PrimerCheckout__label{padding:12px 12px 6px}.PrimerCheckout__dropDownMenu--enter{pointer-events:all;opacity:1;-webkit-transform:translateY(0px) scaleY(1);transform:translateY(0px) scaleY(1)}.PrimerCheckout__dropDownMenuItem{transition:background-color 100ms ease;padding:6px 12px}.PrimerCheckout__dropDownMenuItem:hover,.PrimerCheckout__dropDownMenuItem:focus{background-color:#eaf1ff}.PrimerCheckout__dropDownMenuItem>.PrimerCheckout__label{white-space:nowrap;color:#3447f4}.PrimerCheckout__paymentMethodDropDownMenuItem{margin:0px 16px;transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms}.PrimerCheckout__paymentMethodDropDownMenuItem:not(:last-child){border-bottom:1px solid #e0e0e0}.PrimerCheckout__paymentMethodDropDownMenuItem--disabled{pointer-events:none;opacity:.3}.PrimerCheckout__paymentMethodDropDownMenuItem__content{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center;padding:16px 0px}.PrimerCheckout__paymentMethodDropDownMenuItem__label.PrimerCheckout__label{min-width:0;margin-right:8px;font-size:.75rem;word-break:break-all}.PrimerCheckout__paymentMethodDropDownMenuItem__confirmationContainer{pointer-events:none;position:relative;height:0;padding-bottom:0px;opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px);transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms,opacity cubic-bezier(0.4, 0, 0.2, 1) 200ms}.PrimerCheckout__paymentMethodDropDownMenuItem__confirmationContainer--enter{pointer-events:all;-webkit-transform:translateY(0px);transform:translateY(0px);height:calc(40px + 16px);opacity:1;padding-bottom:16px}.PrimerCheckout__deleteButton{display:block;width:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;font-family:inherit;outline-offset:2px;outline-color:#3447f4}.PrimerCheckout__deleteButton:disabled{cursor:auto}.PrimerCheckout__deleteConfirmation{height:30px}.PrimerCheckout__confirmButton{display:block;width:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;font-family:inherit;outline-offset:2px;outline-color:#3447f4;display:grid;width:100%;place-items:center;height:40px;border:1px solid #3447f4;border-radius:4px;text-align:center;color:#3447f4;font-size:.875rem}.PrimerCheckout__confirmButton:disabled{cursor:auto}.PrimerCheckout__savedPaymentMethods{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column}.PrimerCheckout__savedPaymentMethods__title{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center;margin-bottom:15px}button.PrimerCheckout__klarnaButton{display:block;width:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;font-family:inherit;outline-offset:2px;outline-color:#3447f4;border:1px solid #e0e0e0;border-radius:2px;display:-webkit-inline-flex;display:inline-flex;place-content:center;-webkit-align-items:center;align-items:center;cursor:pointer;width:100%;background-color:#ffb3c7;border-radius:4px}button.PrimerCheckout__klarnaButton:disabled{cursor:auto}button.PrimerCheckout__klarnaButton:enabled:hover{opacity:.7}button.PrimerCheckout__klarnaButton>img{margin-right:20px}button.PrimerCheckout__klarnaButton>span{font-weight:600}button.PrimerCheckout__klarnaButton:disabled{color:inherit}.PrimerCheckout__klarnaPaymentOptions{width:100%;position:relative;overflow:hidden;transition:height 200ms ease-in-out;padding:0px 64px}.PrimerCheckout__klarnaPaymentCategory{display:block;width:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;font-family:inherit;outline-offset:2px;outline-color:#3447f4;border:1px solid #e0e0e0;border-radius:2px;display:grid;grid-auto-flow:column;place-content:center;-webkit-align-items:center;align-items:center;padding:8px 0px}.PrimerCheckout__klarnaPaymentCategory:disabled{cursor:auto}.PrimerCheckout__klarnaPaymentCategory>img{margin-right:12px}.PrimerCheckout__klarnaPaymentCategory:first-child{margin-top:20px}.PrimerCheckout__klarnaPaymentCategory+.PrimerCheckout__klarnaPaymentCategory{margin-top:12px}.PrimerCheckout__klarnaPaymentOptionButton{display:block;width:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;font-family:inherit;outline-offset:2px;outline-color:#3447f4;padding:6px 12px;width:100%;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.PrimerCheckout__klarnaPaymentOptionButton:disabled{cursor:auto}.PrimerCheckout__klarnaPaymentOptionButton>img{margin-right:12px}.PrimerCheckout__processingIndicatorOverlay{pointer-events:none;position:absolute;top:0px;left:0px;right:0px;bottom:0px;z-index:100;display:grid;place-items:center;transition:opacity 300ms linear,-webkit-transform 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 500ms cubic-bezier(0.4, 0, 0.2, 1),opacity 300ms linear;transition:transform 500ms cubic-bezier(0.4, 0, 0.2, 1),opacity 300ms linear,-webkit-transform 500ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;-webkit-transform:translateY(50px);transform:translateY(50px)}.PrimerCheckout__processingIndicatorOverlay.PrimerCheckout--entering,.PrimerCheckout__processingIndicatorOverlay.PrimerCheckout--entered{opacity:1;-webkit-transform:translateY(0px);transform:translateY(0px)}.PrimerCheckout__processingIndicatorContainer{padding:32px}.PrimerCheckout__check{padding:0px 16px;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;text-align:center;min-height:18rem}.PrimerCheckout__checkMarkIcon{width:3rem;padding-bottom:20px}#primer-checkout-scene-credit-card-form{padding-bottom:32px}#primer-checkout-bancontact-scene-credit-card-form{padding-bottom:32px}.PrimerCheckout__creditCardButton_icon{height:81%}.PrimerCheckout__surcharge{text-align:right;background:#242a2f08;padding-top:2px;padding:5px;border-radius:5px}.PrimerCheckout__surcharge>.PrimerCheckout__label--surcharge-text{font-size:15px !important;font-weight:300}.PrimerCheckout__surcharge>.PrimerCheckout__label--surcharge-amount{font-size:15px !important;font-weight:300}.PrimerCheckout__surchargeItem{margin-top:15px}.PrimerCheckout{box-sizing:border-box;background-color:transparent;position:relative;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column}.PrimerCheckout *[hidden=true]{display:none}.PrimerCheckout dialog{margin:0;padding:0}.PrimerCheckout input{outline-color:#3447f4}.PrimerCheckout div{box-sizing:border-box}.PrimerCheckout--hidden{display:none !important}.PrimerCheckout--exited{display:none}.PrimerCheckout--centered{text-align:center}.PrimerCheckout__scene{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;position:relative;left:0;top:0;opacity:1}.PrimerCheckout__modalBody{display:grid;place-content:center;background-color:#fff;border-radius:3px;position:relative;box-shadow:1px 1px 5px 3px rgba(0,0,0,.05);overflow:hidden}.PrimerCheckout__modalBody>iframe{position:absolute;left:0px;top:0px;right:0px;bottom:0px;width:100%;height:100%}.PrimerCheckout__scene--3dsModal{position:fixed;top:0px;left:0px;right:0px;bottom:0px;z-index:101;width:100%;height:100% !important;display:grid;place-content:center;background-color:rgba(0,0,0,.2);transition:all 500ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}.PrimerCheckout__scene--3dsModal>.PrimerCheckout__modalBody{transition:all 500ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;-webkit-transform:translateY(100vh);transform:translateY(100vh)}.PrimerCheckout__scene--3dsModal.PrimerCheckout--enter{opacity:1}.PrimerCheckout__scene--3dsModal.PrimerCheckout--enter>.PrimerCheckout__modalBody{opacity:1;-webkit-transform:translateY(0vh);transform:translateY(0vh)}#primer-checkout-scene-vault{padding-bottom:32px}#primer-checkout-other-payment-methods{height:0px;width:0px;opacity:0;transition:all 500ms cubic-bezier(0.4, 0, 0.2, 1);visibility:hidden}#primer-checkout-other-payment-methods>*:last-child{height:32px}#primer-checkout-other-payment-methods.PrimerCheckout--entering,#primer-checkout-other-payment-methods.PrimerCheckout--entered{width:auto;opacity:1;visibility:visible}#primer-checkout-payment-method-divider{opacity:1;transition:all 500ms cubic-bezier(0.4, 0, 0.2, 1)}#primer-checkout-payment-method-divider.PrimerCheckout--exit{opacity:0;height:0px;margin-bottom:0px}
|
|
1
|
+
@-webkit-keyframes PrimerCheckout__loadingSpinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes PrimerCheckout__loadingSpinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes blink{0%,100%{opacity:1}50%{opacity:.5}}@keyframes blink{0%,100%{opacity:1}50%{opacity:.5}}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}100%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}100%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}.PrimerCheckout__title{padding:0;margin:0;font-size:1.15rem;color:#262626;font-weight:500}.PrimerCheckout__sceneElement{-webkit-flex:0 0 auto;flex:0 0 auto}.PrimerCheckout__sceneElement:not(:last-child){margin-bottom:32px}.PrimerCheckout__divider{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center;transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms}.PrimerCheckout__divider>.PrimerCheckout__label{display:inline-block;margin:0px 10px}.PrimerCheckout__divider>.PrimerCheckout__dividerLineSegment{background-color:#e0e0e0;-webkit-flex:1 1 auto;flex:1 1 auto;height:1px}.PrimerCheckout__divider--hidden{-webkit-transform:translateY(-20px);transform:translateY(-20px);opacity:0}.PrimerCheckout__textDivider{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;text-align:center}.PrimerCheckout__textDivider::before,.PrimerCheckout__textDivider::after{display:block;content:"";-webkit-flex:1;flex:1;height:1px;background:#e0e0e0;min-width:16px}.PrimerCheckout__textDivider::before{margin-right:8px}@media(max-width: 600px){.PrimerCheckout__textDivider::before{margin-right:2px}}.PrimerCheckout__textDivider::after{margin-left:8px}@media(max-width: 600px){.PrimerCheckout__textDivider::after{margin-left:2px}}.PrimerCheckout__apmButton{position:relative;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:center;justify-content:center;overflow:hidden;transition:opacity 300ms cubic-bezier(0.4, 0, 0.2, 1)}.PrimerCheckout__apmButton button{cursor:pointer;width:100%;border:none}.PrimerCheckout__apmButton:focus-within{outline:2px solid #3447f4;outline-offset:2px}.PrimerCheckout__apmButton:not(:first-of-type){margin-top:8px}.PrimerCheckout__apmButton>.paypal-buttons{transition:none !important}.PrimerCheckout__apmButton--logo{border-width:1px;border-style:solid}.PrimerCheckout__apmButton--logo:hover{opacity:.8}.PrimerCheckout__apmButton--logo img{max-height:100%;max-width:calc(100% - 8px)}#primer-checkout-apm-googlePay{height:auto;min-height:40px}.PrimerCheckout__separator{margin:32px 0px;height:1px;background:#e0e0e0}.PrimerCheckout__emptyText{-webkit-transform:translateY(0px);transform:translateY(0px);opacity:1;transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms}.PrimerCheckout__emptyText.PrimerCheckout--exit{-webkit-transform:transalteY(-20px);transform:transalteY(-20px);opacity:0}.PrimerCheckout__cardTypes{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;display:-webkit-flex;display:flex}.PrimerCheckout__hostedInputContent{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);overflow:hidden;pointer-events:none;right:12px;height:100%;padding:11px 0px;-webkit-align-items:center;align-items:center}.PrimerCheckout__cardType{position:relative;width:24px;height:100%;transition:all 300ms cubic-bezier(0.4, 0, 0.2, 1),opacity 300ms cubic-bezier(0.4, 0, 0.2, 1)}.PrimerCheckout__cardType>*{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center}.PrimerCheckout__cardType.PrimerCheckout--hidden{display:inline-block !important;width:0px;margin-right:0px;opacity:0}.PrimerCheckout__cardType.PrimerCheckout--error::after{content:"";position:absolute;right:-4px;top:-4px;width:8px;height:8px;border-radius:50%;background-color:#ea4335}.PrimerCheckout__form{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column}.PrimerCheckout__formHeader{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;align-items:center;margin-bottom:32px}.PrimerCheckout__formField{position:relative;-webkit-flex:0;flex:0}.PrimerCheckout__formField.PrimerCheckout__formField--dual{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:baseline;align-items:baseline}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField{-webkit-flex:0 1 calc(50% - 8px);flex:0 1 calc(50% - 8px)}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField{margin-top:0px}@media(max-width: 600px){.PrimerCheckout__formField.PrimerCheckout__formField--dual{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:initial;align-items:initial}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField{-webkit-flex:unset;flex:unset}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField+.PrimerCheckout__formField{margin-top:inherit}}.PrimerCheckout__formField.PrimerCheckout__formField--orientation-horizontal{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}.PrimerCheckout__formField>.PrimerCheckout__label{display:inline-block;margin-left:1px}.PrimerCheckout__formField .PrimerCheckout__checkbox+.PrimerCheckout__label{cursor:pointer;margin-left:8px}.PrimerCheckout__helperText{position:relative;z-index:0;transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms;-webkit-transform:translateY(-20px);transform:translateY(-20px);opacity:0}.PrimerCheckout__helperText.PrimerCheckout--enter{-webkit-transform:translateY(-20px);transform:translateY(-20px);opacity:0;margin-top:0px;-webkit-animation:none;animation:none}.PrimerCheckout__helperText.PrimerCheckout--entering{-webkit-transform:translateY(0px);transform:translateY(0px);opacity:1}.PrimerCheckout__helperText.PrimerCheckout--entered{opacity:1;-webkit-transform:translateY(0px);transform:translateY(0px)}.PrimerCheckout__helperText.PrimerCheckout--exit{opacity:1;-webkit-animation:none;animation:none}.PrimerCheckout__helperText.PrimerCheckout--exiting{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}.PrimerCheckout__formFieldTitle{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.PrimerCheckout__checkbox{-webkit-appearance:none;font-size:1rem;cursor:pointer;margin:0px;padding:8px;display:inline-block;position:relative;color:#fff;border-radius:4px;border:1px solid #bdbdbd}.PrimerCheckout__checkbox:checked{color:#fff;background-color:#3447f4;border-color:#3447f4}.PrimerCheckout__checkbox::after{content:"✓";font-size:16px;position:absolute;top:50%;left:55%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}#primer-checkout-vault-methods{opacity:1;-webkit-transform-origin:top center;transform-origin:top center;-webkit-transform:translateY(0px);transform:translateY(0px);transition:all 500ms cubic-bezier(0.4, 0, 0.2, 1)}#primer-checkout-vault-methods.PrimerCheckout--exit{opacity:0;-webkit-transform:translateY(-100px);transform:translateY(-100px)}.PrimerCheckout__dropDownMenu{border:1px solid #e0e0e0;border-radius:2px;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;position:absolute;z-index:1000;top:0px;right:0px;width:100%;background-color:#fff;box-shadow:0px 1px 10px rgba(0,0,0,.1),0px 0px 20px rgba(52,71,244,.1);opacity:0;-webkit-transform-origin:top center;transform-origin:top center;-webkit-transform:translateY(-10px) scaleY(0.9);transform:translateY(-10px) scaleY(0.9);transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms;pointer-events:none}.PrimerCheckout__dropDownMenu>.PrimerCheckout__label{padding:12px 12px 6px}.PrimerCheckout__dropDownMenu--enter{pointer-events:all;opacity:1;-webkit-transform:translateY(0px) scaleY(1);transform:translateY(0px) scaleY(1)}.PrimerCheckout__dropDownMenuItem{transition:background-color 100ms ease;padding:6px 12px}.PrimerCheckout__dropDownMenuItem:hover,.PrimerCheckout__dropDownMenuItem:focus{background-color:#eaf1ff}.PrimerCheckout__dropDownMenuItem>.PrimerCheckout__label{white-space:nowrap;color:#3447f4}.PrimerCheckout__paymentMethodDropDownMenuItem{margin:0px 16px;transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms}.PrimerCheckout__paymentMethodDropDownMenuItem:not(:last-child){border-bottom:1px solid #e0e0e0}.PrimerCheckout__paymentMethodDropDownMenuItem--disabled{pointer-events:none;opacity:.3}.PrimerCheckout__paymentMethodDropDownMenuItem__content{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center;padding:16px 0px}.PrimerCheckout__paymentMethodDropDownMenuItem__label.PrimerCheckout__label{min-width:0;margin-right:8px;font-size:.75rem;word-break:break-all}.PrimerCheckout__paymentMethodDropDownMenuItem__confirmationContainer{pointer-events:none;position:relative;height:0;padding-bottom:0px;opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px);transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms,opacity cubic-bezier(0.4, 0, 0.2, 1) 200ms}.PrimerCheckout__paymentMethodDropDownMenuItem__confirmationContainer--enter{pointer-events:all;-webkit-transform:translateY(0px);transform:translateY(0px);height:calc(40px + 16px);opacity:1;padding-bottom:16px}.PrimerCheckout__deleteButton{display:block;width:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;font-family:inherit;outline-offset:2px;outline-color:#3447f4}.PrimerCheckout__deleteButton:disabled{cursor:auto}.PrimerCheckout__deleteConfirmation{height:30px}.PrimerCheckout__confirmButton{display:block;width:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;font-family:inherit;outline-offset:2px;outline-color:#3447f4;display:grid;width:100%;place-items:center;height:40px;border:1px solid #3447f4;border-radius:4px;text-align:center;color:#3447f4;font-size:.875rem}.PrimerCheckout__confirmButton:disabled{cursor:auto}.PrimerCheckout__savedPaymentMethods{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column}.PrimerCheckout__savedPaymentMethods__title{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center;margin-bottom:15px}button.PrimerCheckout__klarnaButton{display:block;width:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;font-family:inherit;outline-offset:2px;outline-color:#3447f4;border:1px solid #e0e0e0;border-radius:2px;display:-webkit-inline-flex;display:inline-flex;place-content:center;-webkit-align-items:center;align-items:center;cursor:pointer;width:100%;background-color:#ffb3c7;border-radius:4px}button.PrimerCheckout__klarnaButton:disabled{cursor:auto}button.PrimerCheckout__klarnaButton:enabled:hover{opacity:.7}button.PrimerCheckout__klarnaButton>img{margin-right:20px}button.PrimerCheckout__klarnaButton>span{font-weight:600}button.PrimerCheckout__klarnaButton:disabled{color:inherit}.PrimerCheckout__klarnaPaymentOptions{width:100%;position:relative;overflow:hidden;transition:height 200ms ease-in-out;padding:0px 64px}.PrimerCheckout__klarnaPaymentCategory{display:block;width:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;font-family:inherit;outline-offset:2px;outline-color:#3447f4;border:1px solid #e0e0e0;border-radius:2px;display:grid;grid-auto-flow:column;place-content:center;-webkit-align-items:center;align-items:center;padding:8px 0px}.PrimerCheckout__klarnaPaymentCategory:disabled{cursor:auto}.PrimerCheckout__klarnaPaymentCategory>img{margin-right:12px}.PrimerCheckout__klarnaPaymentCategory:first-child{margin-top:20px}.PrimerCheckout__klarnaPaymentCategory+.PrimerCheckout__klarnaPaymentCategory{margin-top:12px}.PrimerCheckout__klarnaPaymentOptionButton{display:block;width:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;font-family:inherit;outline-offset:2px;outline-color:#3447f4;padding:6px 12px;width:100%;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.PrimerCheckout__klarnaPaymentOptionButton:disabled{cursor:auto}.PrimerCheckout__klarnaPaymentOptionButton>img{margin-right:12px}.PrimerCheckout__processingIndicatorOverlay{pointer-events:none;position:absolute;top:0px;left:0px;right:0px;bottom:0px;z-index:100;display:grid;place-items:center;transition:opacity 300ms linear,-webkit-transform 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 500ms cubic-bezier(0.4, 0, 0.2, 1),opacity 300ms linear;transition:transform 500ms cubic-bezier(0.4, 0, 0.2, 1),opacity 300ms linear,-webkit-transform 500ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;-webkit-transform:translateY(50px);transform:translateY(50px)}.PrimerCheckout__processingIndicatorOverlay.PrimerCheckout--entering,.PrimerCheckout__processingIndicatorOverlay.PrimerCheckout--entered{opacity:1;-webkit-transform:translateY(0px);transform:translateY(0px)}.PrimerCheckout__processingIndicatorContainer{padding:32px}.PrimerCheckout__check{padding:0px 16px;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;text-align:center;min-height:18rem}.PrimerCheckout__checkMarkIcon{width:3rem;padding-bottom:20px}#primer-checkout-scene-credit-card-form{padding-bottom:32px}#primer-checkout-bancontact-scene-credit-card-form{padding-bottom:32px}.PrimerCheckout__creditCardButton_icon{height:81%}.PrimerCheckout__surcharge{text-align:right;background:#242a2f08;padding-top:2px;padding:5px;border-radius:5px}.PrimerCheckout__surcharge>.PrimerCheckout__label--surcharge-text{font-size:15px !important;font-weight:300}.PrimerCheckout__surcharge>.PrimerCheckout__label--surcharge-amount{font-size:15px !important;font-weight:300}.PrimerCheckout__surchargeItem{margin-top:15px}.PrimerCheckout{box-sizing:border-box;background-color:transparent;position:relative;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column}.PrimerCheckout *[hidden=true]{display:none}.PrimerCheckout dialog{margin:0;padding:0}.PrimerCheckout input{outline-color:#3447f4}.PrimerCheckout div{box-sizing:border-box}.PrimerCheckout--hidden{display:none !important}.PrimerCheckout--exited{display:none}.PrimerCheckout--centered{text-align:center}.PrimerCheckout__scene{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;position:relative;left:0;top:0;opacity:1}.PrimerCheckout__modalBody{display:grid;place-content:center;background-color:#fff;border-radius:3px;position:relative;box-shadow:1px 1px 5px 3px rgba(0,0,0,.05);overflow:hidden}.PrimerCheckout__modalBody>iframe{position:absolute;left:0px;top:0px;right:0px;bottom:0px;width:100%;height:100%}.PrimerCheckout__scene--3dsModal{position:fixed;top:0px;left:0px;right:0px;bottom:0px;z-index:101;width:100%;height:100% !important;display:grid;place-content:center;background-color:rgba(0,0,0,.2);transition:all 500ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}.PrimerCheckout__scene--3dsModal>.PrimerCheckout__modalBody{transition:all 500ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;-webkit-transform:translateY(100vh);transform:translateY(100vh)}.PrimerCheckout__scene--3dsModal.PrimerCheckout--enter{opacity:1}.PrimerCheckout__scene--3dsModal.PrimerCheckout--enter>.PrimerCheckout__modalBody{opacity:1;-webkit-transform:translateY(0vh);transform:translateY(0vh)}#primer-checkout-scene-vault{padding-bottom:32px}#primer-checkout-other-payment-methods{height:0px;width:0px;opacity:0;transition:all 500ms cubic-bezier(0.4, 0, 0.2, 1);visibility:hidden}#primer-checkout-other-payment-methods>*:last-child{height:32px}#primer-checkout-other-payment-methods.PrimerCheckout--entering,#primer-checkout-other-payment-methods.PrimerCheckout--entered{width:auto;opacity:1;visibility:visible}#primer-checkout-payment-method-divider{opacity:1;transition:all 500ms cubic-bezier(0.4, 0, 0.2, 1)}#primer-checkout-payment-method-divider.PrimerCheckout--exit{opacity:0;height:0px;margin-bottom:0px}
|
package/dist/Primer.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Primer=e():t.Primer=e()}(this,(function(){return function(){var t={162:function(t,e,r){t.exports=r(47)},854:function(){},63:function(){},681:function(){},47:function(t){var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function a(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,r){return t[e]=r}}function E(t,e,r,n){var o=e&&e.prototype instanceof P?e:P,i=Object.create(o.prototype),c=new S(n||[]);return i._invoke=function(t,e,r){var n=_;return function(o,i){if(n===l)throw new Error("Generator is already running");if(n===f){if("throw"===o)throw i;return v()}for(r.method=o,r.arg=i;;){var c=r.delegate;if(c){var u=C(c,r);if(u){if(u===O)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===_)throw n=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=l;var a=A(t,e,r);if("normal"===a.type){if(n=r.done?f:s,a.arg===O)continue;return{value:a.arg,done:r.done}}"throw"===a.type&&(n=f,r.method="throw",r.arg=a.arg)}}}(t,r,c),i}function A(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=E;var _="suspendedStart",s="suspendedYield",l="executing",f="completed",O={};function P(){}function T(){}function N(){}var R={};R[i]=function(){return this};var p=Object.getPrototypeOf,h=p&&p(p(Y([])));h&&h!==r&&n.call(h,i)&&(R=h);var D=N.prototype=P.prototype=Object.create(R);function d(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function r(o,i,c,u){var a=A(t[o],t,i);if("throw"!==a.type){var E=a.arg,_=E.value;return _&&"object"==typeof _&&n.call(_,"__await")?e.resolve(_.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(_).then((function(t){E.value=t,c(E)}),(function(t){return r("throw",t,c,u)}))}u(a.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function C(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method))return O;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return O}var o=A(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,O;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,O):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,O)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function y(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function Y(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,c=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return c.next=c}}return{next:v}}function v(){return{value:e,done:!0}}return T.prototype=D.constructor=N,N.constructor=T,T.displayName=a(N,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===T||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,N):(t.__proto__=N,a(t,u,"GeneratorFunction")),t.prototype=Object.create(D),t},t.awrap=function(t){return{__await:t}},d(I.prototype),I.prototype[c]=function(){return this},t.AsyncIterator=I,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var c=new I(E(e,r,n,o),i);return t.isGeneratorFunction(r)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},d(D),a(D,u,"Generator"),D[i]=function(){return this},D.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=Y,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(y),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var c=this.tryEntries[i],u=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var a=n.call(c,"catchLoc"),E=n.call(c,"finallyLoc");if(a&&E){if(this.prev<c.catchLoc)return o(c.catchLoc,!0);if(this.prev<c.finallyLoc)return o(c.finallyLoc)}else if(a){if(this.prev<c.catchLoc)return o(c.catchLoc,!0)}else{if(!E)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return o(c.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var c=i?i.completion:{};return c.type=t,c.arg=e,i?(this.method="next",this.next=i.finallyLoc,O):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),O},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),y(r),O}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;y(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:Y(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),O}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return function(){"use strict";r.r(n),r.d(n,{CheckoutUXFlow:function(){return Yt},ErrorCode:function(){return Bt},EventTypes:function(){return Ft},HeadlessManagerType:function(){return Vt},PaymentFlow:function(){return vt},PaymentInstrumentType:function(){return gt},PaymentMethodData:function(){return Wt.PaymentMethodData},PaymentMethodType:function(){return bt},Primer:function(){return t},SuccessScreenType:function(){return Kt},ThreeDSecureStatus:function(){return Mt},TokenType:function(){return kt},preloadPrimer:function(){return Ut}});var t={};r.r(t),r.d(t,{SDK_VERSION:function(){return ft},createHeadless:function(){return Ot},showExpressCheckout:function(){return Pt},showUniversalCheckout:function(){return Tt},showVaultManager:function(){return Nt}});var e=r(162),o=r.n(e);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function u(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],c=!0,u=!1;try{for(r=r.call(t);!(c=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{c||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t,e,r,n,o,i,c){try{var u=t[i](c),a=u.value}catch(t){return void r(t)}u.done?e(a):Promise.resolve(a).then(n,o)}function A(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function c(t){E(i,n,o,c,u,"next",t)}function u(t){E(i,n,o,c,u,"throw",t)}c(void 0)}))}}function _(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,r){return e&&l(t.prototype,e),r&&l(t,r),t}function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function P(t){return t?new Promise((function(e){return setTimeout(e,t)})):Promise.resolve()}var T=function(){function t(){s(this,t),O(this,"calls",void 0),O(this,"_handleCall",void 0),O(this,"handleMerge",void 0),O(this,"onCalling",void 0),O(this,"isScheduled",void 0),this.calls=[],this.handleCall=void 0,this.handleMerge=void 0,this.onCalling=void 0,this.isScheduled=!1}var e;return f(t,[{key:"handleCall",get:function(){return this._handleCall},set:function(t){this._handleCall=t,this._handleCall&&this.makeNextCallIfAllowed()}},{key:"call",value:function(t){var e,r,n=new Promise((function(t,n){e=t,r=n})),o={resolve:e,reject:r};if(this.handleMerge){var i=this.getNextCall();if(i){var c=this.handleMerge(i.data,t);i.data=c,i.promises.push(o)}else this.calls.push({data:t,promises:[o],isCalling:!1})}else this.calls.push({data:t,promises:[o],isCalling:!1});return this.makeNextCallIfAllowed(),n}},{key:"isCalling",get:function(){return this.isScheduled||!!this.calls.find((function(t){return t.isCalling}))}},{key:"getNextCall",value:function(){return this.calls.find((function(t){return!t.isCalling}))}},{key:"makeNextCallIfAllowed",value:function(){this.isScheduled||this.isCalling||0!==this.calls.length&&this.handleCall&&this.makeNextCall()}},{key:"makeNextCall",value:(e=A(o().mark((function t(){var e,r,n,i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.getNextCall()){t.next=3;break}return t.abrupt("return");case 3:return this.isScheduled=!0,t.next=6,P(1);case 6:return n.isCalling=!0,null===(e=this.onCalling)||void 0===e||e.call(this,!0),t.prev=8,t.next=11,null===(i=this.handleCall)||void 0===i?void 0:i.call(this,n.data);case 11:c=t.sent,n.promises.forEach((function(t){return(0,t.resolve)(c)})),t.next=18;break;case 15:t.prev=15,t.t0=t.catch(8),n.promises.forEach((function(e){return(0,e.reject)(t.t0)}));case 18:this.calls.splice(0,1),this.isScheduled=!1,null===(r=this.onCalling)||void 0===r||r.call(this,!1),this.makeNextCallIfAllowed();case 22:case"end":return t.stop()}}),t,this,[[8,15]])}))),function(){return e.apply(this,arguments)})}]),t}();function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function R(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?N(Object(r),!0).forEach((function(e){O(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var p,h,D,d,I=function(t,e){return y("get",t,e)},C=function(t,e,r){return y("post",t,r,JSON.stringify(e))},L={"content-type":"application/json"},y=function(t,e,r,n){return new Promise((function(o){var i=new XMLHttpRequest,c=R(R({},L),r);i.open(t,e,!0),Object.entries(c).forEach((function(t){var e=a(t,2),r=e[0],n=e[1];return i.setRequestHeader(r,n)})),i.onload=function(){return o(JSON.parse(i.responseText))},i.send(n)}))};r(854),r(63);!function(t){t.ERROR="ERROR",t.DEBUG="DEBUG",t.WARN="WARN",t.INFO="INFO"}(p||(p={})),function(t){t.REQUEST_START="REQUEST_START",t.REQUEST_END="REQUEST_END"}(h||(h={})),function(t){t.START="START",t.END="END"}(D||(D={})),function(t){t.NETWORK_CALL_EVENT="NETWORK_CALL_EVENT",t.CRASH_EVENT="CRASH_EVENT",t.TIMER_EVENT="TIMER_EVENT",t.MESSAGE_EVENT="MESSAGE_EVENT",t.V1_EVENT="V1_EVENT",t.SDK_FUNCTION_EVENT="SDK_FUNCTION_EVENT"}(d||(d={}));var S,Y=function(t,e){var r;try{switch(t){case"PRIMER_SDK_VERSION":r="v2.25.0";break;case"PRIMER_ASSETS_URL":r=process.env.PRIMER_ASSETS_URL;break;case"PRIMER_CORE_API_URL":r=process.env.PRIMER_CORE_API_URL;break;case"PRIMER_PCI_API_URL":r=process.env.PRIMER_PCI_API_URL;break;case"PRIMER_MODULES_URL":r=process.env.PRIMER_MODULES_URL;break;case"PRIMER_BUILD_INTEGRATION_BUILDER":r=process.env.PRIMER_BUILD_INTEGRATION_BUILDER;break;case"SENTRY_DSN":r=process.env.SENTRY_DSN}}catch(t){}return r||e},v=window;function m(){return M.apply(this,arguments)}function M(){return(M=A(o().mark((function t(){var e,r,n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(e=(r=navigator).getBattery)||void 0===e?void 0:e.call(r);case 2:return i=t.sent,t.abrupt("return",{memoryFootprint:null===(n=performance.memory)||void 0===n?void 0:n.usedJSHeapSize,screen:{height:v.screen.height,width:v.screen.width},platformVersion:navigator.platform,userAgent:navigator.userAgent,locale:navigator.language,batteryLevel:null==i?void 0:i.level,batteryStatus:null!=i&&i.charging?S.CHARGING:S.NOT_CHARGING});case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?g(Object(r),!0).forEach((function(e){O(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}!function(t){t.CHARGING="CHARGING",t.NOT_CHARGING="NOT_CHARGING"}(S||(S={}));var w=Y("PRIMER_SDK_VERSION");function k(t,e,r){return U.apply(this,arguments)}function U(){return(U=A(o().mark((function t(e,r,n){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=b,t.t1=b({},n),t.t2={},t.t3=Date.now(),t.next=6,m();case 6:return t.t4=t.sent,t.t5=e,t.t6=r,t.t7=w,t.t8="WEB",t.t9={createdAt:t.t3,device:t.t4,eventType:t.t5,properties:t.t6,sdkVersion:t.t7,sdkType:t.t8},t.abrupt("return",(0,t.t0)(t.t1,t.t2,t.t9));case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var B="https://analytics.production.data.primer.io/sdk-logs";function H(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.url,r=void 0===e?B:e,n=_(t,["url"]),i=new T;i.handleCall=function(t){return C(r,t)},i.handleMerge=function(t,e){return[].concat(u(t),u(e))};var c=function(t){return function(){var e=A(o().mark((function e(r){var c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k(t,r,n);case 2:return c=e.sent,e.next=5,i.call([c]);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()};return{crashEvent:c(d.CRASH_EVENT),messageEvent:c(d.MESSAGE_EVENT),networkCallEvent:c(d.NETWORK_CALL_EVENT),sdkFunctionEvent:c(d.SDK_FUNCTION_EVENT),timerEvent:c(d.TIMER_EVENT),v1Event:c(d.V1_EVENT)}}function G(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function x(t,e){return(Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function j(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&x(t,e)}function K(t){return("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function F(t,e){if(e&&("object"===K(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return G(t)}function V(t){return(Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var W=function(){function t(e,r){s(this,t),O(this,"type",void 0),O(this,"displayName",void 0),O(this,"container",void 0),O(this,"remoteConfig",void 0),O(this,"options",void 0),this.type=e,this.displayName=r}return f(t,[{key:"specs",get:function(){return this.constructor.specs}},{key:"setOption",value:function(t,e){this.options&&(this.options[t]=e)}},{key:"setupAndValidate",value:function(){return Promise.resolve(!0)}},{key:"mount",value:function(){return Promise.resolve(!0)}},{key:"tokenize",value:function(t){return Promise.resolve()}},{key:"validate",value:function(){return Promise.resolve({valid:!0,validationErrors:[]})}},{key:"setDisabled",value:function(t){return Promise.resolve()}},{key:"focus",value:function(){}},{key:"blur",value:function(){}},{key:"getPaymentElement",value:function(){return null}},{key:"getStore",value:function(){}}]),t}();function X(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=V(t);if(e){var o=V(this).constructor;Reflect.construct(n,arguments,o)}else n.apply(this,arguments);return F(this,r)}}O(W,"specs",{key:"__none__",canVault:!1,buttonManagedByPaymentMethod:!1,hasExportedButtonOptions:!1}),O(W,"create",(function(t,e,r,n){throw new Error("Cannot instantiate BasePaymentMethod")}));Map;var Q=function(){var t;return(null==J||null===(t=J.randomUUID)||void 0===t?void 0:t.call(J))||Z()},Z=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(t){return(t^z()>>t/4).toString(16)}))},z=function(){var t,e;return 15&(null!==(t=null==J||null===(e=J.getRandomValues)||void 0===e?void 0:e.call(J,new Uint8Array(1))[0])&&void 0!==t?t:16*Math.random())},J=window.crypto||globalThis.crypto;new Set(["post","get","delete"]),new Set(["post"]);var q=function(t,e,r){return{callType:r?h.REQUEST_END:h.REQUEST_START,id:t,errorBody:(null==r?void 0:r.error)&&JSON.stringify(r.error),method:e.method,responseCode:null==r?void 0:r.status,url:e.url}},$=function(t,e){return r=function(t,e){var r=document.createElement(t);return Object.entries(e).forEach((function(t){var e=a(t,2),n=e[0],o=e[1];return r.setAttribute(n,o)})),r}(t,e),document.head.appendChild(r);var r},tt=function(t,e,r){return t.addEventListener(e,r)};function et(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?et(Object(r),!0).forEach((function(e){O(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):et(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var nt="Can't load Primer SDK",ot="".concat(nt,"'s Stylesheet");var it,ct=function(t,e,r,n,o){return new Promise((function(i,c){var u=ut(t,r,e)||$(t,rt(rt({},n),{},O({},r,e)));tt(u,"load",(function(){return i()})),tt(u,"error",(function(){null==u||u.remove(),c(new Error(o))}))}))},ut=function(t,e,r){return n="".concat(t,"[").concat(e,'^="').concat(r,'"]'),document.querySelector(n);var n};function at(){return Et.apply(this,arguments)}function Et(){return(Et=A(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!it){t.next=2;break}return t.abrupt("return",it);case 2:return it=Promise.all([lt(),st()]).then((function(t){return a(t,1)[0]})),t.abrupt("return",it);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var At,_t,st=function(){return t="https://sdk.primer.io/web/v2.25.0/Checkout.css",Array.from(document.styleSheets).find((function(e){return e.href===t}))?Promise.resolve():ct("link",t,"href",{rel:"stylesheet"},ot);var t},lt=function(){return(t="https://sdk.primer.io/web/v2.25.0/PrimerCoreSDK.min.js",e="script",ut(e,"src",t)&&window.__Primer?Promise.resolve():ct(e,t,"src",{async:"",crossorigin:"anonymous"},nt)).then((function(){var t=window.__Primer;return delete window.__Primer,t})).catch((function(t){throw it=void 0,t}));var t,e},ft="v2.25.0",Ot=Dt("createHeadless"),Pt=Dt("showExpressCheckout"),Tt=Dt("showUniversalCheckout"),Nt=Dt("showVaultManager"),Rt="LOAD_PERFORMANCE",pt=Q(),ht=H({checkoutSessionId:pt});function Dt(t){return A(o().mark((function e(){var r,n,i,c,E,A,_,s,l,f,O=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(ht.sdkFunctionEvent({name:t}),ht.messageEvent({message:"create",messageType:Rt,now:null===(r=(n=performance).now)||void 0===r?void 0:r.call(n)}),i=O.length,c=new Array(i),E=0;E<i;E++)c[E]=O[E];return A=c[0],e.next=6,Promise.all([dt(A),at()]);case 6:return _=e.sent,s=a(_,2),l=s[0],f=s[1],e.abrupt("return",f[t].apply(f,[l,pt].concat(u(c))));case 11:case"end":return e.stop()}}),e)})))}function dt(t){return It.apply(this,arguments)}function It(){return(It=A(o().mark((function t(e){var r,n,i,c,u,a,E,A,_,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Ct(e),n=r.accessToken,i=r.configurationUrl,c=r.analyticsUrlV2,ht=H({checkoutSessionId:pt,url:c}),u="".concat(i,"/?withDisplayMetadata=true"),a=Q(),E={method:"get",url:u},ht.networkCallEvent(q(a,E)),t.next=8,I(u,{"primer-client-token":n,"primer-sdk-client":"WEB","primer-sdk-version":ft,"x-api-version":"2.1"});case 8:return A=t.sent,_=A.primerAccountId,s=A.clientSession.clientSessionId,(ht=H({checkoutSessionId:pt,clientSessionId:s,primerAccountId:_,url:c})).networkCallEvent(q(a,E,{data:A})),t.abrupt("return",A);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ct(t){var e=t.split("."),r=1===e.length?e[0]:e[1];return JSON.parse(window.atob(r))}ht.messageEvent({message:"parsed",messageType:Rt,now:null===(At=(_t=performance).now)||void 0===At?void 0:At.call(_t)});var Lt,yt,St,Yt,vt,mt,Mt,gt,bt,wt,kt,Ut=function(){return at().then((function(){}))};!function(t){t.LOADING="Loading",t.THREE_DS="UniversalCheckout/3ds",t.CHOOSE_PAYMENT_METHOD="UniversalCheckout/Home",t.MANAGE_PAYMENT_METHODS="VaultManager/Home",t.DIRECT_DEBIT_FORM="DirectDebit/Form",t.DIRECT_DEBIT_MANDATE="DirectDebit/Mandate",t.CREDIT_CARD_FORM="CreditCard/Form",t.SUCCESS_PAYMENT_METHOD="UniversalCheckout/Success/PaymentMethod",t.SUCCESS_CHECK="UniversalCheckout/Success/Check"}(Lt||(Lt={})),function(t){t.ROOT="primer-checkout",t.ROOT_CONTENT="primer-checkout-content",t.SUBMIT_BUTTON="primer-checkout-submit-button",t.THREE_DS_MODAL="primer-checkout-3ds-modal",t.VAULT="primer-checkout-vault",t.VAULT_INLINE="primer-checkout-vault-inline",t.NAVIGATE_PAYMENT_METHODS="primer-checkout-navigate-to-payment-methods",t.DIVIDER="primer-checkout-payment-method-divider",t.APM_BUTTONS="primer-checkout-apm-button-container",t.CARDHOLDER_NAME="primer-checkout-cardholder-name",t.CARDHOLDER_NAME_INPUT="primer-checkout-cardholder-name-input",t.ACTIONS="primer-checkout-actions",t.ACTIONS_MENU="primer-checkout-actions-menu",t.SAVE_PAYMENT_METHOD_CHECKBOX="primer-checkout-save-payment-method-input",t.SAVE_PAYMENT_METHOD_FIELD="primer-checkout-save-payment-method-field",t.SAVED_PAYMENT_METHODS_EMPTY="primer-checkout-saved-payment-methods-empty-text",t.CARD_FORM="primer-checkout-card-form",t.DD_SWITCH="primer-checkout-switch-dd-inputs",t.DD_IBAN_FIELD="primer-checkout-dd-iban-field",t.DD_LOCAL_FIELD="primer-checkout-dd-local-fields",t.DD_CUSTOMER_NAME_INPUT="primer-checkout-dd-customer-name-input",t.DD_CUSTOMER_EMAIL_INPUT="primer-checkout-dd-customer-email-input",t.DD_CUSTOMER_ADDRESS_LINE1="primer-checkout-dd-customer-address-input",t.DD_CUSTOMER_ADDRESS_LINE2="primer-checkout-dd-customer-address-line2-input",t.DD_CUSTOMER_ADDRESS_CITY="primer-checkout-dd-customer-city-input",t.DD_CUSTOMER_ADDRESS_POSTAL_CODE="primer-checkout-dd-customer-postal-code-input",t.DD_IBAN_INPUT="primer-checkout-dd-iban-input",t.DD_ACCOUNT_NUMBER_INPUT="primer-checkout-dd-account-number-input",t.DD_BANK_CODE_INPUT="primer-checkout-dd-bank-code-input",t.DD_BRANCH_CODE_INPUT="primer-checkout-dd-branch-code-input",t.DD_MANDATE_SMALL_PRINT="primer-checkout-small-print",t.ERROR_MESSAGE="primer-checkout-error-message"}(yt||(yt={})),function(t){t.TOKEN="PrimerCheckout__token",t.HIDDEN="PrimerCheckout--hidden",t.FOCUSED="PrimerCheckout--focused",t.SELECTED="PrimerCheckout--selected",t.LOADING="PrimerCheckout--loading",t.ERROR="PrimerCheckout--error",t.CARD_TYPE="PrimerCheckout__cardType",t.SAVED_PAYMENT_METHOD="PrimerCheckout__savedPaymentMethod",t.SAVED_PAYMENT_METHOD_CONTAINER="PrimerCheckout__savedPaymentMethodContainer",t.APM_BUTTON="PrimerCheckout__apmButton",t.EDIT_BUTTON="PrimerCheckout__editButton",t.MENU="PrimerCheckout__dropDownMenu",t.MENU_ITEM="PrimerCheckout__dropDownMenuItem",t.PAYMENT_METHOD_MENU_ITEM="PrimerCheckout__paymentMethodDropDownMenuItem",t.DELETE_PAYMENT_METHOD_BUTTON="PrimerCheckout__paymentMethodDropDownMenuItem__deleteButton",t.ENTER="PrimerCheckout--enter",t.ENTERING="PrimerCheckout--entering",t.ENTERED="PrimerCheckout--entered",t.EXIT="PrimerCheckout--exit",t.EXITING="PrimerCheckout--exiting",t.EXITED="PrimerCheckout--exited"}(St||(St={})),function(t){t.CHECKOUT="CHECKOUT",t.EXPRESS_CHECKOUT="EXPRESS_CHECKOUT",t.HEADLESS_CHECKOUT="HEADLESS_CHECKOUT",t.MANAGE_PAYMENT_METHODS="MANAGE_PAYMENT_METHODS",t.SINGLE_PAYMENT_METHOD_CHECKOUT="SINGLE_PAYMENT_METHOD_CHECKOUT"}(Yt||(Yt={})),function(t){t.DEFAULT="DEFAULT",t.PREFER_VAULT="PREFER_VAULT"}(vt||(vt={})),function(t){t.TOKENIZE_STARTED="tokenize-started",t.TOKENIZE_ERROR="tokenize-error",t.TOKENIZE_SUCCESS="tokenize-success",t.TOKENIZE_DID_NOT_START="tokenize-did-not-start"}(mt||(mt={})),function(t){t.SUCCESS="AUTH_SUCCESS",t.FAILED="AUTH_FAILED",t.SKIPPED="SKIPPED",t.CHALLENGE="CHALLENGE"}(Mt||(Mt={})),function(t){t.WORLDPAY_IDEAL="WORLDPAY_IDEAL",t.ADYEN_KLARNA="ADYEN_KLARNA",t.ADYEN_BANCONTACT_CARD="ADYEN_BANCONTACT_CARD",t.PAY_NL_KAARTDIRECT="PAY_NL_KAARTDIRECT",t.ADYEN_EPS="ADYEN_EPS",t.ADYEN_BANCONTACT_PAYCONIQ="ADYEN_BANCONTACT_PAYCONIQ",t.OMISE_PROMPTPAY="OMISE_PROMPTPAY",t.OMISE_TRUEMONEY="OMISE_TRUEMONEY",t.ADYEN_MULTIBANCO="ADYEN_MULTIBANCO",t.PACYPAY_WECHAT="PACYPAY_WECHAT",t.PACYPAY_ALIPAY="PACYPAY_ALIPAY",t.ADYEN_MBWAY="ADYEN_MBWAY",t.XENDIT_DANA="XENDIT_DANA",t.XENDIT_SHOPEEPAY="XENDIT_SHOPEEPAY",t.ADYEN_PAYSHOP="ADYEN_PAYSHOP",t.ADYEN_PAYTRAIL="ADYEN_PAYTRAIL",t.CLEARPAY="CLEARPAY",t.RAPYD_FAST="RAPYD_FAST",t.RAPYD_PROMPTPAY="RAPYD_PROMPTPAY",t.RAPYD_GCASH="RAPYD_GCASH",t.RAPYD_POLI="RAPYD_POLI",t.RAPYD_GRABPAY="RAPYD_GRABPAY",t.PRIMER_PAYPAL="PRIMER_PAYPAL",t.TWOC2P="TWOC2P",t.NETS="NETS",t.STRIPE_GIROPAY="STRIPE_GIROPAY",t.MOLLIE_GIROPAY="MOLLIE_GIROPAY",t.MOLLIE_EPS="MOLLIE_EPS",t.PAY_NL_EPS="PAY_NL_EPS",t.PAY_NL_P24="PAY_NL_P24",t.MOLLIE_P24="MOLLIE_P24",t.MOLLIE_SOFORT="MOLLIE_SOFORT",t.COINBASE="COINBASE",t.OPENNODE="OPENNODE",t.MOLLIE_GIFT_CARD="MOLLIE_GIFTCARD",t.XFERS_PAYNOW="XFERS_PAYNOW",t.CARD="PAYMENT_CARD",t.APPLE_PAY="APPLE_PAY",t.GOOGLE_PAY="GOOGLE_PAY",t.PAYPAL="PAYPAL_ORDER",t.PAYPAL_VAULTED="PAYPAL_BILLING_AGREEMENT",t.GO_CARDLESS="GOCARDLESS",t.PAY_NL_IDEAL="PAY_NL_IDEAL",t.PAY_NL_SOFORT_BANKING="PAY_NL_SOFORT_BANKING",t.PAY_NL_BANCONTACT="PAY_NL_BANCONTACT",t.PAY_NL_PAYPAL="PAY_NL_PAYPAL",t.PAY_NL_CREDIT_TRANSFER="PAY_NL_CREDIT_TRANSFER",t.PAY_NL_DIRECT_DEBIT="PAY_NL_DIRECT_DEBIT",t.PAY_NL_GIROPAY="PAY_NL_GIROPAY",t.PAY_NL_PAYCONIQ="PAY_NL_PAYCONIQ",t.HOOLAH="HOOLAH",t.ADYEN_BLIK="ADYEN_BLIK",t.ADYEN_VIPPS="ADYEN_VIPPS",t.ADYEN_GIROPAY="ADYEN_GIROPAY",t.ADYEN_SOFORT="ADYEN_SOFORT",t.ADYEN_TRUSTLY="ADYEN_TRUSTLY",t.ADYEN_ALIPAY="ADYEN_ALIPAY",t.ADYEN_TWINT="ADYEN_TWINT",t.ADYEN_MOBILEPAY="ADYEN_MOBILEPAY",t.MOLLIE_BANCONTACT="MOLLIE_BANCONTACT",t.MOLLIE_IDEAL="MOLLIE_IDEAL",t.BUCKAROO_GIROPAY="BUCKAROO_GIROPAY",t.BUCKAROO_EPS="BUCKAROO_EPS",t.BUCKAROO_SOFORT="BUCKAROO_SOFORT",t.BUCKAROO_BANCONTACT="BUCKAROO_BANCONTACT",t.BUCKAROO_IDEAL="BUCKAROO_IDEAL",t.ATOME="ATOME"}(gt||(gt={})),function(t){t.WORLDPAY_IDEAL="WORLDPAY_IDEAL",t.ADYEN_KLARNA="ADYEN_KLARNA",t.ADYEN_BANCONTACT_CARD="ADYEN_BANCONTACT_CARD",t.PAY_NL_KAARTDIRECT="PAY_NL_KAARTDIRECT",t.ADYEN_EPS="ADYEN_EPS",t.ADYEN_BANCONTACT_PAYCONIQ="ADYEN_BANCONTACT_PAYCONIQ",t.OMISE_PROMPTPAY="OMISE_PROMPTPAY",t.OMISE_TRUEMONEY="OMISE_TRUEMONEY",t.ADYEN_MULTIBANCO="ADYEN_MULTIBANCO",t.PACYPAY_WECHAT="PACYPAY_WECHAT",t.PACYPAY_ALIPAY="PACYPAY_ALIPAY",t.ADYEN_MBWAY="ADYEN_MBWAY",t.XENDIT_DANA="XENDIT_DANA",t.XENDIT_SHOPEEPAY="XENDIT_SHOPEEPAY",t.ADYEN_PAYSHOP="ADYEN_PAYSHOP",t.ADYEN_PAYTRAIL="ADYEN_PAYTRAIL",t.CLEARPAY="CLEARPAY",t.RAPYD_FAST="RAPYD_FAST",t.RAPYD_PROMPTPAY="RAPYD_PROMPTPAY",t.RAPYD_GCASH="RAPYD_GCASH",t.RAPYD_POLI="RAPYD_POLI",t.RAPYD_GRABPAY="RAPYD_GRABPAY",t.PRIMER_PAYPAL="PRIMER_PAYPAL",t.TWOC2P="TWOC2P",t.NETS="NETS",t.STRIPE_GIROPAY="STRIPE_GIROPAY",t.MOLLIE_GIROPAY="MOLLIE_GIROPAY",t.MOLLIE_EPS="MOLLIE_EPS",t.PAY_NL_EPS="PAY_NL_EPS",t.PAY_NL_P24="PAY_NL_P24",t.MOLLIE_P24="MOLLIE_P24",t.MOLLIE_SOFORT="MOLLIE_SOFORT",t.COINBASE="COINBASE",t.OPENNODE="OPENNODE",t.MOLLIE_GIFT_CARD="MOLLIE_GIFTCARD",t.XFERS_PAYNOW="XFERS_PAYNOW",t.PAYMENT_CARD="PAYMENT_CARD",t.APPLE_PAY="APPLE_PAY",t.GOOGLE_PAY="GOOGLE_PAY",t.PAYPAL="PAYPAL",t.GO_CARDLESS="GOCARDLESS",t.KLARNA="KLARNA",t.PAY_NL_IDEAL="PAY_NL_IDEAL",t.PAY_NL_SOFORT_BANKING="PAY_NL_SOFORT_BANKING",t.PAY_NL_BANCONTACT="PAY_NL_BANCONTACT",t.PAY_NL_PAYPAL="PAY_NL_PAYPAL",t.PAY_NL_CREDIT_TRANSFER="PAY_NL_CREDIT_TRANSFER",t.PAY_NL_DIRECT_DEBIT="PAY_NL_DIRECT_DEBIT",t.PAY_NL_GIROPAY="PAY_NL_GIROPAY",t.PAY_NL_PAYCONIQ="PAY_NL_PAYCONIQ",t.HOOLAH="HOOLAH",t.ADYEN_BLIK="ADYEN_BLIK",t.ADYEN_MOBILEPAY="ADYEN_MOBILEPAY",t.ADYEN_VIPPS="ADYEN_VIPPS",t.ADYEN_GIROPAY="ADYEN_GIROPAY",t.ADYEN_SOFORT="ADYEN_SOFORT",t.ADYEN_TRUSTLY="ADYEN_TRUSTLY",t.ADYEN_ALIPAY="ADYEN_ALIPAY",t.ADYEN_TWINT="ADYEN_TWINT",t.ADYEN_BANK_TRANSFER="ADYEN_BANK_TRANSFER",t.MOLLIE_BANCONTACT="MOLLIE_BANCONTACT",t.MOLLIE_IDEAL="MOLLIE_IDEAL",t.BUCKAROO_GIROPAY="BUCKAROO_GIROPAY",t.BUCKAROO_EPS="BUCKAROO_EPS",t.BUCKAROO_SOFORT="BUCKAROO_SOFORT",t.BUCKAROO_BANCONTACT="BUCKAROO_BANCONTACT",t.BUCKAROO_IDEAL="BUCKAROO_IDEAL",t.ATOME="ATOME"}(bt||(bt={})),function(t){t.PAYMENT_CARD="PAYMENT_CARD",t.ADYEN_BANCONTACT_CARD="ADYEN_BANCONTACT_CARD"}(wt||(wt={})),function(t){t.SINGLE_USE="SINGLE_USE",t.MULTI_USE="MULTI_USE"}(kt||(kt={}));var Bt;O({},gt.PAYPAL_VAULTED,bt.PAYPAL);function Ht(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Gt(t,e,r){return(Ht()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&x(o,r.prototype),o}).apply(null,arguments)}function xt(t){var e="function"==typeof Map?new Map:void 0;return function(t){if(null===t||(t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Gt(t,arguments,V(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),x(n,t)}(t)}function jt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=V(t);if(e){var o=V(this).constructor;Reflect.construct(n,arguments,o)}else n.apply(this,arguments);return F(this,r)}}!function(t){t.INITIALIZATION_ERROR="INITIALIZATION_ERROR",t.NO_PAYMENT_METHODS="NO_PAYMENT_METHODS",t.PRIMER_TEARDOWN="PRIMER_TEARDOWN",t.PRIMER_SERVER_ERROR="PRIMER_SERVER_ERROR",t.THREE_DS_SETUP_ERROR="THREE_DS_SETUP_ERROR",t.THREE_DS_AUTH_FAILED="THREE_DS_AUTH_FAILED",t.THREE_DS_NEGOTIATION_ERROR="THREE_DS_NEGOTIATION_ERROR",t.TOKENIZATION_ERROR="TOKENIZATION_ERROR",t.DUPLICATE_PAYMENT_METHOD_ERROR="DUPLICATE_PAYMENT_METHOD_ERROR",t.CARD_NUMBER_ERROR="CARD_NUMBER_ERROR",t.PAYMENT_METHOD_NOT_SETUP="PAYMENT_METHOD_NOT_SETUP",t.PAYMENT_METHOD_NOT_PROVIDED="PAYMENT_METHOD_NOT_SETUP",t.PAYMENT_METHOD_NOT_COMPATIBLE="PAYMENT_METHOD_NOT_COMPATIBLE",t.RESUME_ERROR="RESUME_ERROR",t.TAX_ERROR="TAX_ERROR",t.VALIDATION_ERROR="VALIDATION_ERROR",t.PAYMENT_FAILED="PAYMENT_FAILED",t.PAYMENT_CREATION_ABORTED="PAYMENT_CREATION_ABORTED",t.PAYMENT_CREATION_DISABLED="PAYMENT_CREATION_DISABLED",t.CLIENT_SESSION_UPDATE_ERROR="CLIENT_SESSION_UPDATE_ERROR",t.INVALID_ARGUMENT="INVALID_ARGUMENT"}(Bt||(Bt={}));Error;var Kt,Ft,Vt,Wt=r(681);!function(t){t.PAYMENT_METHOD="PAYMENT_METHOD",t.CHECK="CHECK"}(Kt||(Kt={})),function(t){t.CHANGE="change",t.ERROR="error",t.FOCUS="focus",t.BLUR="blur",t.CLICK="click",t.CLOSE="close"}(Ft||(Ft={})),function(t){t.CARD="CARD",t.NATIVE="NATIVE",t.REDIRECT="REDIRECT"}(Vt||(Vt={}))}(),n}()}));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v6.9.0
|
|
2
2
|
|
|
3
|
+
export declare const preloadPrimer: () => Promise<void>;
|
|
4
|
+
export declare enum CheckoutUXFlow {
|
|
5
|
+
CHECKOUT = "CHECKOUT",
|
|
6
|
+
EXPRESS_CHECKOUT = "EXPRESS_CHECKOUT",
|
|
7
|
+
HEADLESS_CHECKOUT = "HEADLESS_CHECKOUT",
|
|
8
|
+
MANAGE_PAYMENT_METHODS = "MANAGE_PAYMENT_METHODS",
|
|
9
|
+
SINGLE_PAYMENT_METHOD_CHECKOUT = "SINGLE_PAYMENT_METHOD_CHECKOUT"
|
|
10
|
+
}
|
|
3
11
|
export declare enum PaymentFlow {
|
|
4
12
|
DEFAULT = "DEFAULT",
|
|
5
13
|
PREFER_VAULT = "PREFER_VAULT"
|
|
@@ -10,19 +18,6 @@ export declare enum ThreeDSecureStatus {
|
|
|
10
18
|
SKIPPED = "SKIPPED",
|
|
11
19
|
CHALLENGE = "CHALLENGE"
|
|
12
20
|
}
|
|
13
|
-
export interface PositionalConfig {
|
|
14
|
-
container: string;
|
|
15
|
-
}
|
|
16
|
-
export interface PayPalOptions extends PositionalConfig {
|
|
17
|
-
buttonColor?: "gold" | "blue" | "silver" | "white" | "black";
|
|
18
|
-
buttonShape?: "pill" | "rect";
|
|
19
|
-
buttonSize?: "small" | "medium" | "large" | "responsive";
|
|
20
|
-
buttonHeight?: number;
|
|
21
|
-
buttonLabel?: "checkout" | "credit" | "pay" | "buynow" | "paypal" | "installment";
|
|
22
|
-
buttonTagline?: boolean;
|
|
23
|
-
paymentFlow?: PaymentFlow;
|
|
24
|
-
onClick?: () => void;
|
|
25
|
-
}
|
|
26
21
|
export declare enum PaymentInstrumentType {
|
|
27
22
|
WORLDPAY_IDEAL = "WORLDPAY_IDEAL",
|
|
28
23
|
ADYEN_KLARNA = "ADYEN_KLARNA",
|
|
@@ -166,41 +161,7 @@ export declare enum TokenType {
|
|
|
166
161
|
SINGLE_USE = "SINGLE_USE",
|
|
167
162
|
MULTI_USE = "MULTI_USE"
|
|
168
163
|
}
|
|
169
|
-
export
|
|
170
|
-
export declare type GooglePayButtonType =
|
|
171
|
-
/** @deprecated Set buttonSizeMode to fill instead */
|
|
172
|
-
"long"
|
|
173
|
-
/** @deprecated Set buttonSizeMode to static instead */
|
|
174
|
-
| "short" | "book" | "buy" | "checkout" | "donate" | "order" | "pay" | "plain" | "subscribe";
|
|
175
|
-
export declare type GooglePayButtonColor = "default" | "black" | "white";
|
|
176
|
-
export declare type GooglePayButtonSizeMode = "fill" | "static";
|
|
177
|
-
export interface GooglePayOptions extends PositionalConfig {
|
|
178
|
-
buttonType?: GooglePayButtonType;
|
|
179
|
-
buttonColor?: GooglePayButtonColor;
|
|
180
|
-
buttonSizeMode?: GooglePayButtonSizeMode;
|
|
181
|
-
onClick?: () => void;
|
|
182
|
-
}
|
|
183
|
-
export interface ApplePayOptions extends PositionalConfig {
|
|
184
|
-
buttonType?: "plain" | "buy" | "set-up" | "donate" | "check-out" | "book" | "subscribe";
|
|
185
|
-
buttonStyle?: "white" | "white-outline" | "black";
|
|
186
|
-
captureBillingAddress?: boolean;
|
|
187
|
-
}
|
|
188
|
-
export interface DirectDebitOptions {
|
|
189
|
-
customerCountryCode: Alpha2CountryCode;
|
|
190
|
-
companyName: string;
|
|
191
|
-
companyAddress: string;
|
|
192
|
-
customerName?: string;
|
|
193
|
-
customerEmail?: string;
|
|
194
|
-
customerAddressLine1?: string;
|
|
195
|
-
customerAddressLine2?: string;
|
|
196
|
-
customerCity?: string;
|
|
197
|
-
customerPostalCode?: string;
|
|
198
|
-
iban?: string;
|
|
199
|
-
submitButtonLabels?: {
|
|
200
|
-
form?: Label;
|
|
201
|
-
mandate: Label;
|
|
202
|
-
};
|
|
203
|
-
}
|
|
164
|
+
export type Nullable<T> = T | null;
|
|
204
165
|
export declare enum ErrorCode {
|
|
205
166
|
INITIALIZATION_ERROR = "INITIALIZATION_ERROR",
|
|
206
167
|
NO_PAYMENT_METHODS = "NO_PAYMENT_METHODS",
|
|
@@ -240,6 +201,137 @@ declare class PrimerClientError extends Error {
|
|
|
240
201
|
static fromErrorCode(code: ErrorCode, options: ErrorOptions): PrimerClientError;
|
|
241
202
|
constructor(code: ErrorCode, options: ErrorOptions);
|
|
242
203
|
}
|
|
204
|
+
export interface CardMetadata {
|
|
205
|
+
type: CardNetwork | null;
|
|
206
|
+
possibleTypes: string[];
|
|
207
|
+
cvvLength: number;
|
|
208
|
+
cardNumberLength: number;
|
|
209
|
+
}
|
|
210
|
+
declare enum ProductType {
|
|
211
|
+
DIGITAL = "DIGITAL",
|
|
212
|
+
PHYSICAL = "PHYSICAL"
|
|
213
|
+
}
|
|
214
|
+
export interface ClientSessionLineItem {
|
|
215
|
+
amount: number;
|
|
216
|
+
description: string;
|
|
217
|
+
discountAmount?: number;
|
|
218
|
+
itemId: string;
|
|
219
|
+
productType?: ProductType;
|
|
220
|
+
quantity: number;
|
|
221
|
+
taxAmount?: number;
|
|
222
|
+
taxCode?: string;
|
|
223
|
+
}
|
|
224
|
+
export interface ClientSessionShipping {
|
|
225
|
+
amount: number;
|
|
226
|
+
methodId?: string;
|
|
227
|
+
methodName?: string;
|
|
228
|
+
methodDescription?: string;
|
|
229
|
+
}
|
|
230
|
+
export interface ClientSessionFeeItem {
|
|
231
|
+
type?: string;
|
|
232
|
+
description?: string;
|
|
233
|
+
amount: number;
|
|
234
|
+
}
|
|
235
|
+
export interface ClientSessionAddress {
|
|
236
|
+
firstName?: string;
|
|
237
|
+
lastName?: string;
|
|
238
|
+
addressLine1?: string;
|
|
239
|
+
addressLine2?: string;
|
|
240
|
+
city?: string;
|
|
241
|
+
state?: string;
|
|
242
|
+
countryCode?: string;
|
|
243
|
+
postalCode?: string;
|
|
244
|
+
}
|
|
245
|
+
export interface ClientSession {
|
|
246
|
+
orderId?: string;
|
|
247
|
+
currencyCode?: string;
|
|
248
|
+
lineItems?: ClientSessionLineItem[];
|
|
249
|
+
totalAmount?: number;
|
|
250
|
+
customerId?: string;
|
|
251
|
+
orderDetails?: {
|
|
252
|
+
countryCode?: string;
|
|
253
|
+
shipping?: ClientSessionShipping;
|
|
254
|
+
fees?: ClientSessionFeeItem[];
|
|
255
|
+
};
|
|
256
|
+
customer?: {
|
|
257
|
+
emailAddress?: string;
|
|
258
|
+
mobileNumber?: string;
|
|
259
|
+
firstName?: string;
|
|
260
|
+
lastName?: string;
|
|
261
|
+
billingAddress?: ClientSessionAddress;
|
|
262
|
+
shippingAddress?: ClientSessionAddress;
|
|
263
|
+
taxId?: string;
|
|
264
|
+
nationalDocumentId?: string;
|
|
265
|
+
};
|
|
266
|
+
paymentMethod?: {
|
|
267
|
+
vaultOnSuccess?: boolean;
|
|
268
|
+
options?: Record<string, any>;
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
export type PaymentMethodData = AdyenMultibancoPaymentData;
|
|
272
|
+
export type AdyenMultibancoPaymentData = {
|
|
273
|
+
paymentMethodType: PaymentMethodType.ADYEN_MULTIBANCO;
|
|
274
|
+
reference: string;
|
|
275
|
+
expiresAt: string;
|
|
276
|
+
entity: string;
|
|
277
|
+
};
|
|
278
|
+
export interface BackgroundColor {
|
|
279
|
+
colored: string;
|
|
280
|
+
dark: string;
|
|
281
|
+
light: string;
|
|
282
|
+
}
|
|
283
|
+
export interface IconUrl {
|
|
284
|
+
colored: string;
|
|
285
|
+
dark: string;
|
|
286
|
+
light: string;
|
|
287
|
+
}
|
|
288
|
+
export interface PositionalConfig {
|
|
289
|
+
container: string;
|
|
290
|
+
}
|
|
291
|
+
export interface ApplePayOptions extends PositionalConfig {
|
|
292
|
+
buttonType?: "plain" | "buy" | "set-up" | "donate" | "check-out" | "book" | "subscribe";
|
|
293
|
+
buttonStyle?: "white" | "white-outline" | "black";
|
|
294
|
+
captureBillingAddress?: boolean;
|
|
295
|
+
}
|
|
296
|
+
export interface DirectDebitOptions {
|
|
297
|
+
customerCountryCode: Alpha2CountryCode;
|
|
298
|
+
companyName: string;
|
|
299
|
+
companyAddress: string;
|
|
300
|
+
customerName?: string;
|
|
301
|
+
customerEmail?: string;
|
|
302
|
+
customerAddressLine1?: string;
|
|
303
|
+
customerAddressLine2?: string;
|
|
304
|
+
customerCity?: string;
|
|
305
|
+
customerPostalCode?: string;
|
|
306
|
+
iban?: string;
|
|
307
|
+
submitButtonLabels?: {
|
|
308
|
+
form?: Label;
|
|
309
|
+
mandate: Label;
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
export type GooglePayButtonType =
|
|
313
|
+
/** @deprecated Set buttonSizeMode to fill instead */
|
|
314
|
+
"long"
|
|
315
|
+
/** @deprecated Set buttonSizeMode to static instead */
|
|
316
|
+
| "short" | "book" | "buy" | "checkout" | "donate" | "order" | "pay" | "plain" | "subscribe";
|
|
317
|
+
export type GooglePayButtonColor = "default" | "black" | "white";
|
|
318
|
+
export type GooglePayButtonSizeMode = "fill" | "static";
|
|
319
|
+
export interface GooglePayOptions extends PositionalConfig {
|
|
320
|
+
buttonType?: GooglePayButtonType;
|
|
321
|
+
buttonColor?: GooglePayButtonColor;
|
|
322
|
+
buttonSizeMode?: GooglePayButtonSizeMode;
|
|
323
|
+
onClick?: () => void;
|
|
324
|
+
}
|
|
325
|
+
export interface PayPalOptions extends PositionalConfig {
|
|
326
|
+
buttonColor?: "gold" | "blue" | "silver" | "white" | "black";
|
|
327
|
+
buttonShape?: "pill" | "rect";
|
|
328
|
+
buttonSize?: "small" | "medium" | "large" | "responsive";
|
|
329
|
+
buttonHeight?: number;
|
|
330
|
+
buttonLabel?: "checkout" | "credit" | "pay" | "buynow" | "paypal" | "installment";
|
|
331
|
+
buttonTagline?: boolean;
|
|
332
|
+
paymentFlow?: PaymentFlow;
|
|
333
|
+
onClick?: () => void;
|
|
334
|
+
}
|
|
243
335
|
export interface BorderStyle {
|
|
244
336
|
borderStyle?: string;
|
|
245
337
|
borderColor?: number | string;
|
|
@@ -263,7 +355,7 @@ export interface BlockStyle extends BorderStyle {
|
|
|
263
355
|
borderRadius?: number | string;
|
|
264
356
|
boxShadow?: string;
|
|
265
357
|
}
|
|
266
|
-
export
|
|
358
|
+
export type LogoColor = "DARK" | "LIGHT" | "COLORED";
|
|
267
359
|
export interface LoadingScreenStyle {
|
|
268
360
|
color?: string;
|
|
269
361
|
}
|
|
@@ -399,97 +491,6 @@ export interface CheckoutStyle {
|
|
|
399
491
|
processingIndicator?: ProcessingIndicatorStyle;
|
|
400
492
|
focusCheckoutOnInit?: boolean;
|
|
401
493
|
}
|
|
402
|
-
export declare enum CheckoutUXFlow {
|
|
403
|
-
CHECKOUT = "CHECKOUT",
|
|
404
|
-
EXPRESS_CHECKOUT = "EXPRESS_CHECKOUT",
|
|
405
|
-
HEADLESS_CHECKOUT = "HEADLESS_CHECKOUT",
|
|
406
|
-
MANAGE_PAYMENT_METHODS = "MANAGE_PAYMENT_METHODS",
|
|
407
|
-
SINGLE_PAYMENT_METHOD_CHECKOUT = "SINGLE_PAYMENT_METHOD_CHECKOUT"
|
|
408
|
-
}
|
|
409
|
-
declare enum ProductType {
|
|
410
|
-
DIGITAL = "DIGITAL",
|
|
411
|
-
PHYSICAL = "PHYSICAL"
|
|
412
|
-
}
|
|
413
|
-
export interface ClientSessionLineItem {
|
|
414
|
-
itemId: string;
|
|
415
|
-
description: string;
|
|
416
|
-
amount: number;
|
|
417
|
-
quantity: number;
|
|
418
|
-
discountAmount?: number;
|
|
419
|
-
taxCode?: string;
|
|
420
|
-
taxAmount?: number;
|
|
421
|
-
productType?: ProductType;
|
|
422
|
-
}
|
|
423
|
-
export interface ClientSessionShipping {
|
|
424
|
-
amount: number;
|
|
425
|
-
methodId?: string;
|
|
426
|
-
methodName?: string;
|
|
427
|
-
methodDescription?: string;
|
|
428
|
-
}
|
|
429
|
-
export interface ClientSessionFeeItem {
|
|
430
|
-
type?: string;
|
|
431
|
-
description?: string;
|
|
432
|
-
amount: number;
|
|
433
|
-
}
|
|
434
|
-
export interface ClientSessionAddress {
|
|
435
|
-
firstName?: string;
|
|
436
|
-
lastName?: string;
|
|
437
|
-
addressLine1?: string;
|
|
438
|
-
addressLine2?: string;
|
|
439
|
-
city?: string;
|
|
440
|
-
state?: string;
|
|
441
|
-
countryCode?: string;
|
|
442
|
-
postalCode?: string;
|
|
443
|
-
}
|
|
444
|
-
export interface ClientSession {
|
|
445
|
-
orderId?: string;
|
|
446
|
-
currencyCode?: string;
|
|
447
|
-
lineItems?: ClientSessionLineItem[];
|
|
448
|
-
totalAmount?: number;
|
|
449
|
-
customerId?: string;
|
|
450
|
-
orderDetails?: {
|
|
451
|
-
countryCode?: string;
|
|
452
|
-
shipping?: ClientSessionShipping;
|
|
453
|
-
fees?: ClientSessionFeeItem[];
|
|
454
|
-
};
|
|
455
|
-
customer?: {
|
|
456
|
-
emailAddress?: string;
|
|
457
|
-
mobileNumber?: string;
|
|
458
|
-
firstName?: string;
|
|
459
|
-
lastName?: string;
|
|
460
|
-
billingAddress?: ClientSessionAddress;
|
|
461
|
-
shippingAddress?: ClientSessionAddress;
|
|
462
|
-
taxId?: string;
|
|
463
|
-
nationalDocumentId?: string;
|
|
464
|
-
};
|
|
465
|
-
paymentMethod?: {
|
|
466
|
-
vaultOnSuccess?: boolean;
|
|
467
|
-
options?: Record<string, any>;
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
export declare type PaymentMethodData = AdyenMultibancoPaymentData;
|
|
471
|
-
export declare type AdyenMultibancoPaymentData = {
|
|
472
|
-
paymentMethodType: PaymentMethodType.ADYEN_MULTIBANCO;
|
|
473
|
-
reference: string;
|
|
474
|
-
expiresAt: string;
|
|
475
|
-
entity: string;
|
|
476
|
-
};
|
|
477
|
-
export interface CardMetadata {
|
|
478
|
-
type: CardNetwork | null;
|
|
479
|
-
possibleTypes: string[];
|
|
480
|
-
cvvLength: number;
|
|
481
|
-
cardNumberLength: number;
|
|
482
|
-
}
|
|
483
|
-
export interface BackgroundColor {
|
|
484
|
-
colored: string;
|
|
485
|
-
dark: string;
|
|
486
|
-
light: string;
|
|
487
|
-
}
|
|
488
|
-
export interface IconUrl {
|
|
489
|
-
colored: string;
|
|
490
|
-
dark: string;
|
|
491
|
-
light: string;
|
|
492
|
-
}
|
|
493
494
|
export interface TransitionDurationOptions {
|
|
494
495
|
enter?: number;
|
|
495
496
|
exit?: number;
|
|
@@ -517,7 +518,7 @@ export interface ProcessingIndicatorOptions {
|
|
|
517
518
|
export interface FormOptions {
|
|
518
519
|
inputLabelsVisible?: boolean;
|
|
519
520
|
}
|
|
520
|
-
export
|
|
521
|
+
export type CardPreferredFlow = "DEDICATED_SCENE" | "EMBEDDED_IN_HOME";
|
|
521
522
|
export interface CheckoutCardOptions {
|
|
522
523
|
cardholderName?: {
|
|
523
524
|
/**
|
|
@@ -558,7 +559,7 @@ export interface CardDetails {
|
|
|
558
559
|
network: string;
|
|
559
560
|
userDescription?: string;
|
|
560
561
|
}
|
|
561
|
-
export
|
|
562
|
+
export type CardNetwork = "american-express" | "diners-club" | "discover" | "elo" | "hiper" | "hipercard" | "interac" | "jcb" | "maestro" | "mastercard" | "mir" | "unionpay" | "private-label" | "visa";
|
|
562
563
|
export interface PayPalDetails {
|
|
563
564
|
icon: string;
|
|
564
565
|
email?: string;
|
|
@@ -569,8 +570,8 @@ export interface CustomizablePaymentMethodButton {
|
|
|
569
570
|
logoAlt?: string;
|
|
570
571
|
text?: string;
|
|
571
572
|
}
|
|
572
|
-
export
|
|
573
|
-
export
|
|
573
|
+
export type KlarnaPaymentCategoryType = "pay_now" | "pay_later" | "pay_over_time";
|
|
574
|
+
export type KlarnaSupportedLocale = "de-AT" | "en-AT" | "da-DK" | "en-DK" | "fi-FI" | "sv-FI" | "en-FI" | "de-DE" | "en-DE" | "nl-NL" | "en-NL" | "nb-NO" | "en-NO" | "sv-SE" | "en-SE" | "de-CH" | "fr-CH" | "it-CH" | "en-CH" | "en-GB" | "en-US" | "en-AU" | "nl-BE" | "fr-BE" | "es-ES" | "it-IT";
|
|
574
575
|
export interface KlarnaAddress {
|
|
575
576
|
title?: string;
|
|
576
577
|
firstName?: string;
|
|
@@ -594,15 +595,15 @@ export interface KlarnaOptions {
|
|
|
594
595
|
recurringPaymentDescription?: string;
|
|
595
596
|
allowedPaymentCategories?: KlarnaPaymentCategoryType[];
|
|
596
597
|
}
|
|
597
|
-
export
|
|
598
|
-
export
|
|
599
|
-
export
|
|
600
|
-
export
|
|
601
|
-
export
|
|
602
|
-
export
|
|
598
|
+
export type SupportedLocale = string;
|
|
599
|
+
export type Alpha2CountryCode = string;
|
|
600
|
+
export type Alpha3CurrencyCode = string;
|
|
601
|
+
export type ElementOrID = Nullable<string | HTMLElement>;
|
|
602
|
+
export type ValidationErrorType = "required" | "invalid";
|
|
603
|
+
export type Label<T extends Record<string, unknown> = Record<string, unknown>> = string | ((options: {
|
|
603
604
|
locale: SupportedLocale;
|
|
604
605
|
} | T) => string);
|
|
605
|
-
export
|
|
606
|
+
export type ResumeToken = {
|
|
606
607
|
resumeToken: string;
|
|
607
608
|
paymentId?: string;
|
|
608
609
|
};
|
|
@@ -632,7 +633,7 @@ export interface FormState {
|
|
|
632
633
|
valid: boolean;
|
|
633
634
|
submitted: boolean;
|
|
634
635
|
}
|
|
635
|
-
export
|
|
636
|
+
export type InlineStyleMap = Partial<Record<keyof CSSStyleDeclaration, string>>;
|
|
636
637
|
export interface ExternalPayerInfo {
|
|
637
638
|
externalPayerId: string;
|
|
638
639
|
firstName?: string;
|
|
@@ -729,26 +730,26 @@ export interface IPaymentMethodToken<T, U extends PaymentInstrumentType> {
|
|
|
729
730
|
threeDSecureAuthentication: Nullable<ThreeDSAuthenticationData>;
|
|
730
731
|
vaultData: Nullable<VaultData>;
|
|
731
732
|
}
|
|
732
|
-
export
|
|
733
|
+
export type BaseAmountChange = {
|
|
733
734
|
totalAmount: number;
|
|
734
735
|
};
|
|
735
|
-
export
|
|
736
|
+
export type TaxAmountChange = {
|
|
736
737
|
reason: "TAX";
|
|
737
738
|
totalTaxAmount: number;
|
|
738
739
|
};
|
|
739
|
-
export
|
|
740
|
-
export
|
|
741
|
-
export
|
|
742
|
-
export
|
|
743
|
-
export
|
|
744
|
-
export
|
|
740
|
+
export type AmountChange = BaseAmountChange & TaxAmountChange;
|
|
741
|
+
export type PaymentCardToken = IPaymentMethodToken<PaymentCardDetails, PaymentInstrumentType.CARD>;
|
|
742
|
+
export type PayPalBillingAgreementToken = IPaymentMethodToken<PayPalBillingAgreementDetails, PaymentInstrumentType.PAYPAL_VAULTED>;
|
|
743
|
+
export type GoCardlessToken = IPaymentMethodToken<GoCardlessDetails, PaymentInstrumentType.GO_CARDLESS>;
|
|
744
|
+
export type IdealPayToken = IPaymentMethodToken<Record<string, never>, PaymentInstrumentType.PAY_NL_IDEAL>;
|
|
745
|
+
export type PaymentMethodToken = PaymentCardToken | PayPalBillingAgreementToken | GoCardlessToken | IdealPayToken | IPaymentMethodToken<any, any>;
|
|
745
746
|
export interface ThreeDSVerificationResult<T extends ThreeDSecureStatus> {
|
|
746
747
|
status: T;
|
|
747
748
|
error: Nullable<PrimerClientError>;
|
|
748
749
|
data: PaymentMethodToken;
|
|
749
750
|
resumeToken: string;
|
|
750
751
|
}
|
|
751
|
-
export
|
|
752
|
+
export type ThreeDSVerification = ThreeDSVerificationResult<ThreeDSecureStatus.SUCCESS> | ThreeDSVerificationResult<ThreeDSecureStatus.FAILED> | ThreeDSVerificationResult<ThreeDSecureStatus.SKIPPED>;
|
|
752
753
|
export interface PurchaseInformation {
|
|
753
754
|
totalAmount: MonetaryAmount;
|
|
754
755
|
}
|
|
@@ -760,28 +761,28 @@ export interface VaultInformation {
|
|
|
760
761
|
export interface VaultDetails {
|
|
761
762
|
currencyCode: Alpha3CurrencyCode;
|
|
762
763
|
}
|
|
763
|
-
export
|
|
764
|
+
export type CheckSuccessScreenOptions = {
|
|
764
765
|
type: SuccessScreenType.CHECK;
|
|
765
766
|
title: Label;
|
|
766
767
|
};
|
|
767
|
-
export
|
|
768
|
+
export type PaymentMethodSuccessScreenOptions = {
|
|
768
769
|
type: SuccessScreenType.PAYMENT_METHOD;
|
|
769
770
|
};
|
|
770
|
-
export
|
|
771
|
-
export
|
|
771
|
+
export type SuccessScreenOptions = /* No success screen will be displayed */ false | /* Show the default success screen of the payment method*/ undefined | CheckSuccessScreenOptions | PaymentMethodSuccessScreenOptions;
|
|
772
|
+
export type SuccessCallbackReturnType = /* Show success screen (for backward compatibility) */ undefined | /* Show success screen */ true | /* Refresh client token and perform new step */ {
|
|
772
773
|
clientToken: string;
|
|
773
774
|
};
|
|
774
|
-
export
|
|
775
|
+
export type VaultOptions = {
|
|
775
776
|
visible?: boolean;
|
|
776
777
|
deletionDisabled?: boolean;
|
|
777
778
|
};
|
|
778
|
-
export
|
|
779
|
-
export
|
|
779
|
+
export type TransitionType = "SLIDE_UP" | "SLIDE_DOWN" | "SLIDE_HORIZONTAL";
|
|
780
|
+
export type SceneTransitionOptions = {
|
|
780
781
|
type: TransitionType;
|
|
781
782
|
duration: number;
|
|
782
783
|
isRtlLocale?: boolean;
|
|
783
784
|
};
|
|
784
|
-
export
|
|
785
|
+
export type SceneOptions = {
|
|
785
786
|
onEntering?: (sceneId: string) => void;
|
|
786
787
|
transition?: SceneTransitionOptions | false;
|
|
787
788
|
};
|
|
@@ -798,19 +799,19 @@ export interface BinData {
|
|
|
798
799
|
productCode?: string;
|
|
799
800
|
productName?: string;
|
|
800
801
|
}
|
|
801
|
-
export
|
|
802
|
+
export type RedirectOptions = {
|
|
802
803
|
returnUrl?: string;
|
|
803
804
|
/**
|
|
804
805
|
* default: false
|
|
805
806
|
*/
|
|
806
807
|
forceRedirect?: boolean;
|
|
807
808
|
};
|
|
808
|
-
export
|
|
809
|
+
export type AdvancedOptions = {
|
|
809
810
|
platform?: "STANDALONE" | "MAGENTO";
|
|
810
811
|
};
|
|
811
|
-
export
|
|
812
|
-
export
|
|
813
|
-
export
|
|
812
|
+
export type PaymentMethodAction = "PAYMENT_METHOD_SELECTED" | "PAYMENT_METHOD_UNSELECTED";
|
|
813
|
+
export type PaymentHandling = "AUTO" | "MANUAL";
|
|
814
|
+
export type Payment = {
|
|
814
815
|
id: string;
|
|
815
816
|
orderId: string;
|
|
816
817
|
paymentMethodData?: PaymentMethodData;
|
|
@@ -834,26 +835,26 @@ export interface PaymentHandlers {
|
|
|
834
835
|
payment?: Payment;
|
|
835
836
|
}, handler: OnCheckoutFailHandler | undefined) => void;
|
|
836
837
|
}
|
|
837
|
-
export
|
|
838
|
+
export type OnTokenizeShouldStart = (data: {
|
|
838
839
|
paymentMethodType?: PaymentMethodType;
|
|
839
840
|
}) => boolean | Promise<boolean>;
|
|
840
|
-
export
|
|
841
|
-
export
|
|
842
|
-
export
|
|
841
|
+
export type OnTokenizeDidNotStart = (reason: string) => void;
|
|
842
|
+
export type OnTokenizeStart = () => void;
|
|
843
|
+
export type OnTokenizeError = (error: PrimerClientError) => void;
|
|
843
844
|
export interface OnTokenizeSuccessHandler {
|
|
844
845
|
handleSuccess(): any;
|
|
845
846
|
handleFailure(errorMessage?: string): any;
|
|
846
847
|
continueWithNewClientToken(clientToken: string): any;
|
|
847
848
|
}
|
|
848
|
-
export
|
|
849
|
+
export type OnTokenizeSuccess = (data: PaymentMethodToken, handler: OnTokenizeSuccessHandler) => void | Promise<void>;
|
|
849
850
|
export interface OnResumeSuccessHandler {
|
|
850
851
|
handleSuccess(): any;
|
|
851
852
|
handleFailure(errorMessage?: string): any;
|
|
852
853
|
continueWithNewClientToken(clientToken: string): any;
|
|
853
854
|
}
|
|
854
|
-
export
|
|
855
|
-
export
|
|
856
|
-
export
|
|
855
|
+
export type OnResumeSuccess = (data: ResumeToken, handler: OnResumeSuccessHandler) => void;
|
|
856
|
+
export type onResumeError = (error: PrimerClientError) => void;
|
|
857
|
+
export type OnResumePending = (paymentMethodData: PaymentMethodData) => void;
|
|
857
858
|
export interface TokenizationHandlers {
|
|
858
859
|
onTokenizeShouldStart?: OnTokenizeShouldStart;
|
|
859
860
|
onTokenizeDidNotStart?: OnTokenizeDidNotStart;
|
|
@@ -971,7 +972,7 @@ export interface PrimerCheckout {
|
|
|
971
972
|
*/
|
|
972
973
|
setClientToken(): Promise<boolean>;
|
|
973
974
|
}
|
|
974
|
-
export
|
|
975
|
+
export type EventListener = (event?: Event) => void;
|
|
975
976
|
export declare enum EventTypes {
|
|
976
977
|
CHANGE = "change",
|
|
977
978
|
ERROR = "error",
|
|
@@ -1040,17 +1041,17 @@ export interface IRedirectPaymentMethodManager {
|
|
|
1040
1041
|
start(): Promise<void>;
|
|
1041
1042
|
addEventListener(event: EventTypes, callback: EventListener): void;
|
|
1042
1043
|
}
|
|
1043
|
-
export
|
|
1044
|
+
export type PaymentMethodManagers = ICardPaymentMethodManager | INativePaymentMethodManager | IRedirectPaymentMethodManager;
|
|
1044
1045
|
export declare enum HeadlessManagerType {
|
|
1045
1046
|
CARD = "CARD",
|
|
1046
1047
|
NATIVE = "NATIVE",
|
|
1047
1048
|
REDIRECT = "REDIRECT"
|
|
1048
1049
|
}
|
|
1049
|
-
export
|
|
1050
|
+
export type PaymentMethodInfo = {
|
|
1050
1051
|
type: PaymentMethodType;
|
|
1051
1052
|
managerType: HeadlessManagerType;
|
|
1052
1053
|
};
|
|
1053
|
-
export
|
|
1054
|
+
export type ButtonPaymentMethodAsset = {
|
|
1054
1055
|
backgroundColor: BackgroundColor;
|
|
1055
1056
|
iconUrl: IconUrl;
|
|
1056
1057
|
paymentMethodName?: string;
|
|
@@ -1061,7 +1062,7 @@ export interface IAssetsManager {
|
|
|
1061
1062
|
export interface CardPaymentMethodManagerOptions {
|
|
1062
1063
|
onCardMetadataChange?: (metadata: CardMetadata) => void;
|
|
1063
1064
|
}
|
|
1064
|
-
export
|
|
1065
|
+
export type PaymentMethodManagerOptions = CardPaymentMethodManagerOptions;
|
|
1065
1066
|
export interface PrimerHeadlessCheckout {
|
|
1066
1067
|
createPaymentMethodManager(type: "PAYMENT_CARD", options?: PaymentMethodManagerOptions): Promise<ICardPaymentMethodManager | null>;
|
|
1067
1068
|
createPaymentMethodManager(type: PaymentMethodType.PAYPAL | "PAYPAL" | "GOOGLE_PAY" | "APPLE_PAY", options?: PaymentMethodManagerOptions): Promise<INativePaymentMethodManager | null>;
|
|
@@ -1091,12 +1092,5 @@ export interface RemotePaymentMethodConfiguration<T> {
|
|
|
1091
1092
|
id: string;
|
|
1092
1093
|
options: T;
|
|
1093
1094
|
}
|
|
1094
|
-
export declare const preloadPrimer: () => Promise<undefined>;
|
|
1095
|
-
export declare const Primer: {
|
|
1096
|
-
showUniversalCheckout(clientToken: string, options: UniversalCheckoutOptions | SinglePaymentMethodCheckoutOptions): Promise<PrimerCheckout>;
|
|
1097
|
-
showExpressCheckout(clientToken: string, options: any): Promise<PrimerCheckout>;
|
|
1098
|
-
showVaultManager(clientToken: string, options: VaultManagerOptions): Promise<PrimerVaultManager>;
|
|
1099
|
-
createHeadless(clientToken: string): Promise<PrimerHeadlessCheckout>;
|
|
1100
|
-
};
|
|
1101
1095
|
|
|
1102
1096
|
export {};
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer-io/checkout-web",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.0",
|
|
4
4
|
"description": "Primer.js for the web",
|
|
5
5
|
"author": "Will Knowles <will@primerapi.com>",
|
|
6
6
|
"homepage": "",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"main": "dist/
|
|
8
|
+
"main": "dist/Primer.js",
|
|
9
9
|
"files": [
|
|
10
|
-
"dist/
|
|
10
|
+
"dist/Primer.js",
|
|
11
11
|
"dist/Checkout.css",
|
|
12
12
|
"dist/index.d.ts"
|
|
13
13
|
],
|
|
14
14
|
"types": "dist/index.d.ts",
|
|
15
15
|
"scripts": {
|
|
16
16
|
"test": "run -T jest --passWithNoTests",
|
|
17
|
-
"clean": "rm -rf ./lib
|
|
17
|
+
"clean": "rm -rf ./dist ./lib ./temp",
|
|
18
18
|
"build": "yarn clean && yarn build.compile && yarn build.types",
|
|
19
19
|
"build.compile": "run -T webpack",
|
|
20
20
|
"build.types": "run -T tsc --project tsconfig.types.json && run -T dts-bundle-generator --config ./dtsconfig.json ",
|
|
21
21
|
"prepare": "yarn build",
|
|
22
22
|
"postpublish": "clean-package restore",
|
|
23
23
|
"prepublishOnly": "clean-package",
|
|
24
|
-
"preview": "
|
|
24
|
+
"preview-s3": "./script/preview",
|
|
25
25
|
"publish-s3": "yarn build && ./script/publish-s3",
|
|
26
26
|
"start": "node demos/server.js",
|
|
27
27
|
"lint": "run -T eslint ./src",
|
|
28
28
|
"check-types": "run -T tsc --noemit -p tsconfig.json"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "63013bc283baf7481a4374e9cad809370b77baaf"
|
|
31
31
|
}
|
package/dist/loader.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.loader=e():t.loader=e()}(this,(function(){return function(){var t={162:function(t,e,r){t.exports=r(47)},681:function(){},47:function(t){var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},A=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",E=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof R?e:R,A=Object.create(o.prototype),i=new S(n||[]);return A._invoke=function(t,e,r){var n=a;return function(o,A){if(n===O)throw new Error("Generator is already running");if(n===T){if("throw"===o)throw A;return M()}for(r.method=o,r.arg=A;;){var i=r.delegate;if(i){var E=p(i,r);if(E){if(E===N)continue;return E}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===a)throw n=T,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=O;var u=_(t,e,r);if("normal"===u.type){if(n=r.done?T:P,u.arg===N)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=T,r.method="throw",r.arg=u.arg)}}}(t,r,i),A}function _(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var a="suspendedStart",P="suspendedYield",O="executing",T="completed",N={};function R(){}function f(){}function s(){}var D={};D[A]=function(){return this};var Y=Object.getPrototypeOf,l=Y&&Y(Y(m([])));l&&l!==r&&n.call(l,A)&&(D=l);var L=s.prototype=R.prototype=Object.create(D);function I(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function h(t,e){function r(o,A,i,E){var u=_(t[o],t,A);if("throw"!==u.type){var c=u.arg,a=c.value;return a&&"object"==typeof a&&n.call(a,"__await")?e.resolve(a.__await).then((function(t){r("next",t,i,E)}),(function(t){r("throw",t,i,E)})):e.resolve(a).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,E)}))}E(u.arg)}var o;this._invoke=function(t,n){function A(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(A,A):A()}}function p(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,p(t,r),"throw"===r.method))return N;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return N}var o=_(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,N;var A=o.arg;return A?A.done?(r[t.resultName]=A.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,N):A:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,N)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function d(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function m(t){if(t){var r=t[A];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:M}}function M(){return{value:e,done:!0}}return f.prototype=L.constructor=s,s.constructor=f,f.displayName=u(s,E,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,u(t,E,"GeneratorFunction")),t.prototype=Object.create(L),t},t.awrap=function(t){return{__await:t}},I(h.prototype),h.prototype[i]=function(){return this},t.AsyncIterator=h,t.async=function(e,r,n,o,A){void 0===A&&(A=Promise);var i=new h(c(e,r,n,o),A);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},I(L),u(L,E,"Generator"),L[A]=function(){return this},L.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=m,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(d),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return E.type="throw",E.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var A=this.tryEntries.length-1;A>=0;--A){var i=this.tryEntries[A],E=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var A=o;break}}A&&("break"===t||"continue"===t)&&A.tryLoc<=e&&e<=A.finallyLoc&&(A=null);var i=A?A.completion:{};return i.type=t,i.arg=e,A?(this.method="next",this.next=A.finallyLoc,N):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),N},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),d(r),N}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;d(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:m(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),N}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var A=e[n]={exports:{}};return t[n](A,A.exports,r),A.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return function(){"use strict";var t,e,o,A,i,E,u;function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.r(n),r.d(n,{CheckoutUXFlow:function(){return h},ErrorCode:function(){return _},EventTypes:function(){return C},HeadlessManagerType:function(){return d},PaymentFlow:function(){return t},PaymentInstrumentType:function(){return A},PaymentMethodData:function(){return S.PaymentMethodData},PaymentMethodType:function(){return i},Primer:function(){return g},SuccessScreenType:function(){return p},ThreeDSecureStatus:function(){return o},TokenType:function(){return u},preloadPrimer:function(){return k}}),function(t){t.DEFAULT="DEFAULT",t.PREFER_VAULT="PREFER_VAULT"}(t||(t={})),function(t){t.TOKENIZE_STARTED="tokenize-started",t.TOKENIZE_ERROR="tokenize-error",t.TOKENIZE_SUCCESS="tokenize-success",t.TOKENIZE_DID_NOT_START="tokenize-did-not-start"}(e||(e={})),function(t){t.SUCCESS="AUTH_SUCCESS",t.FAILED="AUTH_FAILED",t.SKIPPED="SKIPPED",t.CHALLENGE="CHALLENGE"}(o||(o={})),function(t){t.WORLDPAY_IDEAL="WORLDPAY_IDEAL",t.ADYEN_KLARNA="ADYEN_KLARNA",t.ADYEN_BANCONTACT_CARD="ADYEN_BANCONTACT_CARD",t.PAY_NL_KAARTDIRECT="PAY_NL_KAARTDIRECT",t.ADYEN_EPS="ADYEN_EPS",t.ADYEN_BANCONTACT_PAYCONIQ="ADYEN_BANCONTACT_PAYCONIQ",t.OMISE_PROMPTPAY="OMISE_PROMPTPAY",t.OMISE_TRUEMONEY="OMISE_TRUEMONEY",t.ADYEN_MULTIBANCO="ADYEN_MULTIBANCO",t.PACYPAY_WECHAT="PACYPAY_WECHAT",t.PACYPAY_ALIPAY="PACYPAY_ALIPAY",t.ADYEN_MBWAY="ADYEN_MBWAY",t.XENDIT_DANA="XENDIT_DANA",t.XENDIT_SHOPEEPAY="XENDIT_SHOPEEPAY",t.ADYEN_PAYSHOP="ADYEN_PAYSHOP",t.ADYEN_PAYTRAIL="ADYEN_PAYTRAIL",t.CLEARPAY="CLEARPAY",t.RAPYD_FAST="RAPYD_FAST",t.RAPYD_PROMPTPAY="RAPYD_PROMPTPAY",t.RAPYD_GCASH="RAPYD_GCASH",t.RAPYD_POLI="RAPYD_POLI",t.RAPYD_GRABPAY="RAPYD_GRABPAY",t.PRIMER_PAYPAL="PRIMER_PAYPAL",t.TWOC2P="TWOC2P",t.NETS="NETS",t.STRIPE_GIROPAY="STRIPE_GIROPAY",t.MOLLIE_GIROPAY="MOLLIE_GIROPAY",t.MOLLIE_EPS="MOLLIE_EPS",t.PAY_NL_EPS="PAY_NL_EPS",t.PAY_NL_P24="PAY_NL_P24",t.MOLLIE_P24="MOLLIE_P24",t.MOLLIE_SOFORT="MOLLIE_SOFORT",t.COINBASE="COINBASE",t.OPENNODE="OPENNODE",t.MOLLIE_GIFT_CARD="MOLLIE_GIFTCARD",t.XFERS_PAYNOW="XFERS_PAYNOW",t.CARD="PAYMENT_CARD",t.APPLE_PAY="APPLE_PAY",t.GOOGLE_PAY="GOOGLE_PAY",t.PAYPAL="PAYPAL_ORDER",t.PAYPAL_VAULTED="PAYPAL_BILLING_AGREEMENT",t.GO_CARDLESS="GOCARDLESS",t.PAY_NL_IDEAL="PAY_NL_IDEAL",t.PAY_NL_SOFORT_BANKING="PAY_NL_SOFORT_BANKING",t.PAY_NL_BANCONTACT="PAY_NL_BANCONTACT",t.PAY_NL_PAYPAL="PAY_NL_PAYPAL",t.PAY_NL_CREDIT_TRANSFER="PAY_NL_CREDIT_TRANSFER",t.PAY_NL_DIRECT_DEBIT="PAY_NL_DIRECT_DEBIT",t.PAY_NL_GIROPAY="PAY_NL_GIROPAY",t.PAY_NL_PAYCONIQ="PAY_NL_PAYCONIQ",t.HOOLAH="HOOLAH",t.ADYEN_BLIK="ADYEN_BLIK",t.ADYEN_VIPPS="ADYEN_VIPPS",t.ADYEN_GIROPAY="ADYEN_GIROPAY",t.ADYEN_SOFORT="ADYEN_SOFORT",t.ADYEN_TRUSTLY="ADYEN_TRUSTLY",t.ADYEN_ALIPAY="ADYEN_ALIPAY",t.ADYEN_TWINT="ADYEN_TWINT",t.ADYEN_MOBILEPAY="ADYEN_MOBILEPAY",t.MOLLIE_BANCONTACT="MOLLIE_BANCONTACT",t.MOLLIE_IDEAL="MOLLIE_IDEAL",t.BUCKAROO_GIROPAY="BUCKAROO_GIROPAY",t.BUCKAROO_EPS="BUCKAROO_EPS",t.BUCKAROO_SOFORT="BUCKAROO_SOFORT",t.BUCKAROO_BANCONTACT="BUCKAROO_BANCONTACT",t.BUCKAROO_IDEAL="BUCKAROO_IDEAL",t.ATOME="ATOME"}(A||(A={})),function(t){t.WORLDPAY_IDEAL="WORLDPAY_IDEAL",t.ADYEN_KLARNA="ADYEN_KLARNA",t.ADYEN_BANCONTACT_CARD="ADYEN_BANCONTACT_CARD",t.PAY_NL_KAARTDIRECT="PAY_NL_KAARTDIRECT",t.ADYEN_EPS="ADYEN_EPS",t.ADYEN_BANCONTACT_PAYCONIQ="ADYEN_BANCONTACT_PAYCONIQ",t.OMISE_PROMPTPAY="OMISE_PROMPTPAY",t.OMISE_TRUEMONEY="OMISE_TRUEMONEY",t.ADYEN_MULTIBANCO="ADYEN_MULTIBANCO",t.PACYPAY_WECHAT="PACYPAY_WECHAT",t.PACYPAY_ALIPAY="PACYPAY_ALIPAY",t.ADYEN_MBWAY="ADYEN_MBWAY",t.XENDIT_DANA="XENDIT_DANA",t.XENDIT_SHOPEEPAY="XENDIT_SHOPEEPAY",t.ADYEN_PAYSHOP="ADYEN_PAYSHOP",t.ADYEN_PAYTRAIL="ADYEN_PAYTRAIL",t.CLEARPAY="CLEARPAY",t.RAPYD_FAST="RAPYD_FAST",t.RAPYD_PROMPTPAY="RAPYD_PROMPTPAY",t.RAPYD_GCASH="RAPYD_GCASH",t.RAPYD_POLI="RAPYD_POLI",t.RAPYD_GRABPAY="RAPYD_GRABPAY",t.PRIMER_PAYPAL="PRIMER_PAYPAL",t.TWOC2P="TWOC2P",t.NETS="NETS",t.STRIPE_GIROPAY="STRIPE_GIROPAY",t.MOLLIE_GIROPAY="MOLLIE_GIROPAY",t.MOLLIE_EPS="MOLLIE_EPS",t.PAY_NL_EPS="PAY_NL_EPS",t.PAY_NL_P24="PAY_NL_P24",t.MOLLIE_P24="MOLLIE_P24",t.MOLLIE_SOFORT="MOLLIE_SOFORT",t.COINBASE="COINBASE",t.OPENNODE="OPENNODE",t.MOLLIE_GIFT_CARD="MOLLIE_GIFTCARD",t.XFERS_PAYNOW="XFERS_PAYNOW",t.PAYMENT_CARD="PAYMENT_CARD",t.APPLE_PAY="APPLE_PAY",t.GOOGLE_PAY="GOOGLE_PAY",t.PAYPAL="PAYPAL",t.GO_CARDLESS="GOCARDLESS",t.KLARNA="KLARNA",t.PAY_NL_IDEAL="PAY_NL_IDEAL",t.PAY_NL_SOFORT_BANKING="PAY_NL_SOFORT_BANKING",t.PAY_NL_BANCONTACT="PAY_NL_BANCONTACT",t.PAY_NL_PAYPAL="PAY_NL_PAYPAL",t.PAY_NL_CREDIT_TRANSFER="PAY_NL_CREDIT_TRANSFER",t.PAY_NL_DIRECT_DEBIT="PAY_NL_DIRECT_DEBIT",t.PAY_NL_GIROPAY="PAY_NL_GIROPAY",t.PAY_NL_PAYCONIQ="PAY_NL_PAYCONIQ",t.HOOLAH="HOOLAH",t.ADYEN_BLIK="ADYEN_BLIK",t.ADYEN_MOBILEPAY="ADYEN_MOBILEPAY",t.ADYEN_VIPPS="ADYEN_VIPPS",t.ADYEN_GIROPAY="ADYEN_GIROPAY",t.ADYEN_SOFORT="ADYEN_SOFORT",t.ADYEN_TRUSTLY="ADYEN_TRUSTLY",t.ADYEN_ALIPAY="ADYEN_ALIPAY",t.ADYEN_TWINT="ADYEN_TWINT",t.ADYEN_BANK_TRANSFER="ADYEN_BANK_TRANSFER",t.MOLLIE_BANCONTACT="MOLLIE_BANCONTACT",t.MOLLIE_IDEAL="MOLLIE_IDEAL",t.BUCKAROO_GIROPAY="BUCKAROO_GIROPAY",t.BUCKAROO_EPS="BUCKAROO_EPS",t.BUCKAROO_SOFORT="BUCKAROO_SOFORT",t.BUCKAROO_BANCONTACT="BUCKAROO_BANCONTACT",t.BUCKAROO_IDEAL="BUCKAROO_IDEAL",t.ATOME="ATOME"}(i||(i={})),function(t){t.PAYMENT_CARD="PAYMENT_CARD",t.ADYEN_BANCONTACT_CARD="ADYEN_BANCONTACT_CARD"}(E||(E={})),function(t){t.SINGLE_USE="SINGLE_USE",t.MULTI_USE="MULTI_USE"}(u||(u={}));var _;c({},A.PAYPAL_VAULTED,i.PAYPAL);function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function P(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function O(t,e){return(Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function T(t){return("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function N(t,e){if(e&&("object"===T(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return P(t)}function R(t){return(Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function s(t,e,r){return(f()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&O(o,r.prototype),o}).apply(null,arguments)}function D(t){var e="function"==typeof Map?new Map:void 0;return function(t){if(null===t||(t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return s(t,arguments,R(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),O(n,t)}(t)}function Y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R(t);if(e){var o=R(this).constructor;Reflect.construct(n,arguments,o)}else n.apply(this,arguments);return N(this,r)}}!function(t){t.INITIALIZATION_ERROR="INITIALIZATION_ERROR",t.NO_PAYMENT_METHODS="NO_PAYMENT_METHODS",t.PRIMER_TEARDOWN="PRIMER_TEARDOWN",t.PRIMER_SERVER_ERROR="PRIMER_SERVER_ERROR",t.THREE_DS_SETUP_ERROR="THREE_DS_SETUP_ERROR",t.THREE_DS_AUTH_FAILED="THREE_DS_AUTH_FAILED",t.THREE_DS_NEGOTIATION_ERROR="THREE_DS_NEGOTIATION_ERROR",t.TOKENIZATION_ERROR="TOKENIZATION_ERROR",t.DUPLICATE_PAYMENT_METHOD_ERROR="DUPLICATE_PAYMENT_METHOD_ERROR",t.CARD_NUMBER_ERROR="CARD_NUMBER_ERROR",t.PAYMENT_METHOD_NOT_SETUP="PAYMENT_METHOD_NOT_SETUP",t.PAYMENT_METHOD_NOT_PROVIDED="PAYMENT_METHOD_NOT_SETUP",t.PAYMENT_METHOD_NOT_COMPATIBLE="PAYMENT_METHOD_NOT_COMPATIBLE",t.RESUME_ERROR="RESUME_ERROR",t.TAX_ERROR="TAX_ERROR",t.VALIDATION_ERROR="VALIDATION_ERROR",t.PAYMENT_FAILED="PAYMENT_FAILED",t.PAYMENT_CREATION_ABORTED="PAYMENT_CREATION_ABORTED",t.PAYMENT_CREATION_DISABLED="PAYMENT_CREATION_DISABLED",t.CLIENT_SESSION_UPDATE_ERROR="CLIENT_SESSION_UPDATE_ERROR",t.INVALID_ARGUMENT="INVALID_ARGUMENT"}(_||(_={}));var l,L,I,h;Error;!function(t){t.LOADING="Loading",t.THREE_DS="UniversalCheckout/3ds",t.CHOOSE_PAYMENT_METHOD="UniversalCheckout/Home",t.MANAGE_PAYMENT_METHODS="VaultManager/Home",t.DIRECT_DEBIT_FORM="DirectDebit/Form",t.DIRECT_DEBIT_MANDATE="DirectDebit/Mandate",t.CREDIT_CARD_FORM="CreditCard/Form",t.SUCCESS_PAYMENT_METHOD="UniversalCheckout/Success/PaymentMethod",t.SUCCESS_CHECK="UniversalCheckout/Success/Check"}(l||(l={})),function(t){t.ROOT="primer-checkout",t.ROOT_CONTENT="primer-checkout-content",t.SUBMIT_BUTTON="primer-checkout-submit-button",t.THREE_DS_MODAL="primer-checkout-3ds-modal",t.VAULT="primer-checkout-vault",t.VAULT_INLINE="primer-checkout-vault-inline",t.NAVIGATE_PAYMENT_METHODS="primer-checkout-navigate-to-payment-methods",t.DIVIDER="primer-checkout-payment-method-divider",t.APM_BUTTONS="primer-checkout-apm-button-container",t.CARDHOLDER_NAME="primer-checkout-cardholder-name",t.CARDHOLDER_NAME_INPUT="primer-checkout-cardholder-name-input",t.ACTIONS="primer-checkout-actions",t.ACTIONS_MENU="primer-checkout-actions-menu",t.SAVE_PAYMENT_METHOD_CHECKBOX="primer-checkout-save-payment-method-input",t.SAVE_PAYMENT_METHOD_FIELD="primer-checkout-save-payment-method-field",t.SAVED_PAYMENT_METHODS_EMPTY="primer-checkout-saved-payment-methods-empty-text",t.CARD_FORM="primer-checkout-card-form",t.DD_SWITCH="primer-checkout-switch-dd-inputs",t.DD_IBAN_FIELD="primer-checkout-dd-iban-field",t.DD_LOCAL_FIELD="primer-checkout-dd-local-fields",t.DD_CUSTOMER_NAME_INPUT="primer-checkout-dd-customer-name-input",t.DD_CUSTOMER_EMAIL_INPUT="primer-checkout-dd-customer-email-input",t.DD_CUSTOMER_ADDRESS_LINE1="primer-checkout-dd-customer-address-input",t.DD_CUSTOMER_ADDRESS_LINE2="primer-checkout-dd-customer-address-line2-input",t.DD_CUSTOMER_ADDRESS_CITY="primer-checkout-dd-customer-city-input",t.DD_CUSTOMER_ADDRESS_POSTAL_CODE="primer-checkout-dd-customer-postal-code-input",t.DD_IBAN_INPUT="primer-checkout-dd-iban-input",t.DD_ACCOUNT_NUMBER_INPUT="primer-checkout-dd-account-number-input",t.DD_BANK_CODE_INPUT="primer-checkout-dd-bank-code-input",t.DD_BRANCH_CODE_INPUT="primer-checkout-dd-branch-code-input",t.DD_MANDATE_SMALL_PRINT="primer-checkout-small-print",t.ERROR_MESSAGE="primer-checkout-error-message"}(L||(L={})),function(t){t.TOKEN="PrimerCheckout__token",t.HIDDEN="PrimerCheckout--hidden",t.FOCUSED="PrimerCheckout--focused",t.SELECTED="PrimerCheckout--selected",t.LOADING="PrimerCheckout--loading",t.ERROR="PrimerCheckout--error",t.CARD_TYPE="PrimerCheckout__cardType",t.SAVED_PAYMENT_METHOD="PrimerCheckout__savedPaymentMethod",t.SAVED_PAYMENT_METHOD_CONTAINER="PrimerCheckout__savedPaymentMethodContainer",t.APM_BUTTON="PrimerCheckout__apmButton",t.EDIT_BUTTON="PrimerCheckout__editButton",t.MENU="PrimerCheckout__dropDownMenu",t.MENU_ITEM="PrimerCheckout__dropDownMenuItem",t.PAYMENT_METHOD_MENU_ITEM="PrimerCheckout__paymentMethodDropDownMenuItem",t.DELETE_PAYMENT_METHOD_BUTTON="PrimerCheckout__paymentMethodDropDownMenuItem__deleteButton",t.ENTER="PrimerCheckout--enter",t.ENTERING="PrimerCheckout--entering",t.ENTERED="PrimerCheckout--entered",t.EXIT="PrimerCheckout--exit",t.EXITING="PrimerCheckout--exiting",t.EXITED="PrimerCheckout--exited"}(I||(I={})),function(t){t.CHECKOUT="CHECKOUT",t.EXPRESS_CHECKOUT="EXPRESS_CHECKOUT",t.HEADLESS_CHECKOUT="HEADLESS_CHECKOUT",t.MANAGE_PAYMENT_METHODS="MANAGE_PAYMENT_METHODS",t.SINGLE_PAYMENT_METHOD_CHECKOUT="SINGLE_PAYMENT_METHOD_CHECKOUT"}(h||(h={}));var p,C,d,S=r(681);!function(t){t.PAYMENT_METHOD="PAYMENT_METHOD",t.CHECK="CHECK"}(p||(p={})),function(t){t.CHANGE="change",t.ERROR="error",t.FOCUS="focus",t.BLUR="blur",t.CLICK="click",t.CLOSE="close"}(C||(C={})),function(t){t.CARD="CARD",t.NATIVE="NATIVE",t.REDIRECT="REDIRECT"}(d||(d={}));var m=r(162),M=r.n(m);function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,A=[],i=!0,E=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(A.push(n.value),!e||A.length!==e);i=!0);}catch(t){E=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(E)throw o}}return A}}(t,e)||function(t,e){if(t){if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(t,e,r,n,o,A,i){try{var E=t[A](i),u=E.value}catch(t){return void r(t)}E.done?e(u):Promise.resolve(u).then(n,o)}function w(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var A=t.apply(e,r);function i(t){U(A,n,o,i,E,"next",t)}function E(t){U(A,n,o,i,E,"throw",t)}i(void 0)}))}}var B=null,b=function(){var t=w(M().mark((function t(){var e,r;return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!B){t.next=2;break}return t.abrupt("return",B);case 2:if(!window.Primer){t.next=4;break}return t.abrupt("return",Promise.resolve(window.Primer));case 4:return e=new Promise((function(t,e){var r=window.document.querySelector('script[src^="'.concat("https://sdk.primer.io/web/v2.24.0/Primer.min.js",'"]'));r||((r=document.createElement("script")).setAttribute("src","https://sdk.primer.io/web/v2.24.0/Primer.min.js"),r.setAttribute("crossorigin","anonymous"),window.document.head.appendChild(r)),r.onload=function(){t(window.Primer)},r.onerror=function(){var t;B=null,null===(t=r)||void 0===t||t.remove(),e(new Error("Can't load Primer SDK"))}})),r=new Promise((function(t,e){var r=window.document.querySelector('link[href^="'.concat("https://sdk.primer.io/web/v2.24.0/Checkout.css",'"]'));r||((r=document.createElement("link")).setAttribute("rel","stylesheet"),r.setAttribute("href","https://sdk.primer.io/web/v2.24.0/Checkout.css"),window.document.head.appendChild(r)),r.onload=function(){t()},r.onerror=function(){var t;null===(t=r)||void 0===t||t.remove(),e(new Error("Can't load Primer SDK's Stylesheet"))}})),B=Promise.all([e,r]).then((function(t){return v(t,1)[0]})),t.abrupt("return",B);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),k=function(){var t=w(M().mark((function t(){return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",b().then((function(){})));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),g={showUniversalCheckout:function(t,e){return w(M().mark((function r(){var n;return M().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,b();case 2:return n=r.sent,r.abrupt("return",n.showUniversalCheckout(t,e));case 4:case"end":return r.stop()}}),r)})))()},showExpressCheckout:function(t,e){return w(M().mark((function r(){var n;return M().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,b();case 2:return n=r.sent,r.abrupt("return",n.showExpressCheckout(t,e));case 4:case"end":return r.stop()}}),r)})))()},showVaultManager:function(t,e){return w(M().mark((function r(){var n;return M().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,b();case 2:return n=r.sent,r.abrupt("return",n.showVaultManager(t,e));case 4:case"end":return r.stop()}}),r)})))()},createHeadless:function(t){return w(M().mark((function e(){var r;return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b();case 2:return r=e.sent,e.abrupt("return",r.createHeadless(t));case 4:case"end":return e.stop()}}),e)})))()}}}(),n}()}));
|