@primer-io/checkout-web 2.33.4 → 2.35.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/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{flex:0 0 auto}.PrimerCheckout__sceneElement:not(:last-child){margin-bottom:32px}.PrimerCheckout__divider{display:flex;flex-direction:row;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;flex:1 1 auto;height:1px}.PrimerCheckout__divider--hidden{-webkit-transform:translateY(-20px);transform:translateY(-20px);opacity:0}.PrimerCheckout__textDivider{display:flex;align-items:center;text-align:center}.PrimerCheckout__textDivider::before,.PrimerCheckout__textDivider::after{display:block;content:"";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:flex;align-items:stretch;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:flex}.PrimerCheckout__hostedInputContent{display:flex;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;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:flex;flex-direction:column}.PrimerCheckout__formHeader{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:32px}.PrimerCheckout__formField{position:relative;flex:0}.PrimerCheckout__formField.PrimerCheckout__formField--dual{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField{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:flex;flex-direction:column;align-items:initial}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField{flex:unset}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField+.PrimerCheckout__formField{margin-top:inherit}}.PrimerCheckout__formField.PrimerCheckout__formField--orientation-horizontal{display:flex;flex-direction:row;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:flex;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:flex;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:flex;flex-direction:row;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:flex;flex-direction:column}.PrimerCheckout__savedPaymentMethods__title{display:flex;flex-direction:row;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:inline-flex;place-content: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>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;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:flex;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;align-items: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:flex;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:flex;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
+ @keyframes PrimerCheckout__loadingSpinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes blink{0%,100%{opacity:1}50%{opacity:.5}}@keyframes rotate{100%{transform:rotate(360deg)}}@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{flex:0 0 auto}.PrimerCheckout__sceneElement:not(:last-child){margin-bottom:32px}.PrimerCheckout__divider{display:flex;flex-direction:row;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;flex:1 1 auto;height:1px}.PrimerCheckout__divider--hidden{transform:translateY(-20px);opacity:0}.PrimerCheckout__textDivider{display:flex;align-items:center;text-align:center}.PrimerCheckout__textDivider::before,.PrimerCheckout__textDivider::after{display:block;content:"";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:flex;align-items:stretch;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{transform:translateY(0px);opacity:1;transition:all cubic-bezier(0.4, 0, 0.2, 1) 300ms}.PrimerCheckout__emptyText.PrimerCheckout--exit{transform:transalteY(-20px);opacity:0}.PrimerCheckout__cardTypes{width:-moz-fit-content;width:fit-content;display:flex}.PrimerCheckout__hostedInputContent{display:flex;flex-direction:row;position:absolute;top:50%;transform:translateY(-50%);overflow:hidden;pointer-events:none;right:12px;height:100%;padding:11px 0px;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:flex;flex-direction:column}.PrimerCheckout__formHeader{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:32px}.PrimerCheckout__formField{position:relative;flex:0}.PrimerCheckout__formField.PrimerCheckout__formField--dual{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField{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:flex;flex-direction:column;align-items:initial}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField{flex:unset}.PrimerCheckout__formField.PrimerCheckout__formField--dual>.PrimerCheckout__formField+.PrimerCheckout__formField{margin-top:inherit}}.PrimerCheckout__formField.PrimerCheckout__formField--orientation-horizontal{display:flex;flex-direction:row;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;transform:translateY(-20px);opacity:0}.PrimerCheckout__helperText.PrimerCheckout--enter{transform:translateY(-20px);opacity:0;margin-top:0px;animation:none}.PrimerCheckout__helperText.PrimerCheckout--entering{transform:translateY(0px);opacity:1}.PrimerCheckout__helperText.PrimerCheckout--entered{opacity:1;transform:translateY(0px)}.PrimerCheckout__helperText.PrimerCheckout--exit{opacity:1;animation:none}.PrimerCheckout__helperText.PrimerCheckout--exiting{opacity:0;transform:translateY(-20px)}.PrimerCheckout__formFieldTitle{display:flex;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%;transform:translate(-50%, -50%)}#primer-checkout-vault-methods{opacity:1;transform-origin:top center;transform:translateY(0px);transition:all 500ms cubic-bezier(0.4, 0, 0.2, 1)}#primer-checkout-vault-methods.PrimerCheckout--exit{opacity:0;transform:translateY(-100px)}.PrimerCheckout__dropDownMenu{border:1px solid #e0e0e0;border-radius:2px;display:flex;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;transform-origin:top center;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;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:flex;flex-direction:row;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;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;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:flex;flex-direction:column}.PrimerCheckout__savedPaymentMethods__title{display:flex;flex-direction:row;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:inline-flex;place-content: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>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;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:flex;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:transform 500ms cubic-bezier(0.4, 0, 0.2, 1),opacity 300ms linear;opacity:0;transform:translateY(50px)}.PrimerCheckout__processingIndicatorOverlay.PrimerCheckout--entering,.PrimerCheckout__processingIndicatorOverlay.PrimerCheckout--entered{opacity:1;transform:translateY(0px)}.PrimerCheckout__processingIndicatorContainer{padding:32px}.PrimerCheckout__check{padding:0px 16px;align-items: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:flex;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:flex;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;transform:translateY(100vh)}.PrimerCheckout__scene--3dsModal.PrimerCheckout--enter{opacity:1}.PrimerCheckout__scene--3dsModal.PrimerCheckout--enter>.PrimerCheckout__modalBody{opacity:1;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 CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Primer=t():e.Primer=t()}(this,(function(){return function(){var e={162:function(e,t,r){e.exports=r(47)},854:function(){},63:function(){},681:function(){},291:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=r(244),i=r(418),c=r(361),a=r(551),u=r(228),s={},E={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"},A=[E.VISA,E.MASTERCARD,E.AMERICAN_EXPRESS,E.DINERS_CLUB,E.DISCOVER,E.JCB,E.UNIONPAY,E.MAESTRO,E.ELO,E.MIR,E.HIPER,E.HIPERCARD],_=u.clone(A);function f(e){return s[e]||o[e]}function l(e,t){void 0===t&&(t=!1);var r=_.indexOf(e);if(!t&&-1===r)throw new Error('"'+e+'" is not a supported card type.');return r}function p(e){var t=[];if(!c.isValidInputType(e))return t;if(0===e.length)return _.map((function(e){return u.clone(f(e))}));_.forEach((function(r){var n=f(r);i.addMatchingCardsToResults(e,n,t)}));var r=a.findBestMatch(t);return r?[r]:t}p.getTypeInfo=function(e){return u.clone(f(e))},p.removeCard=function(e){var t=l(e);_.splice(t,1)},p.addCard=function(e){var t=l(e.type,!0);s[e.type]=e,-1===t&&_.push(e.type)},p.updateCard=function(e,t){var r=s[e]||o[e];if(!r)throw new Error('"'+e+"\" is not a recognized type. Use `addCard` instead.'");if(t.type&&r.type!==t.type)throw new Error("Cannot overwrite type parameter.");var i=u.clone(r);i=n(n({},i),t),s[i.type]=i},p.changeOrder=function(e,t){var r=l(e);_.splice(r,1),_.splice(t,0,e)},p.resetModifications=function(){_=u.clone(A),s={}},p.types=E,e.exports=p},418:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addMatchingCardsToResults=void 0;var n=r(228),o=r(318);t.addMatchingCardsToResults=function(e,t,r){var i,c;for(i=0;i<t.patterns.length;i++){var a=t.patterns[i];if(o.matches(e,a)){var u=n.clone(t);c=Array.isArray(a)?String(a[0]).length:String(a).length,e.length>=c&&(u.matchStrength=c),r.push(u);break}}}},244:function(e){"use strict";e.exports={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[624,626],[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[622019,622999],[62207,62209],[622126,622925],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292,810,[8110,8131],[8132,8151],[8152,8163],[8164,8171]],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,504174],[504176,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}},hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,63737423,63743358,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}}}},228:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function(e){return e?JSON.parse(JSON.stringify(e)):null}},551:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findBestMatch=void 0,t.findBestMatch=function(e){return function(e){var t=e.filter((function(e){return e.matchStrength})).length;return t>0&&t===e.length}(e)?e.reduce((function(e,t){return e?Number(e.matchStrength)<Number(t.matchStrength)?t:e:t})):null}},361:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidInputType=void 0,t.isValidInputType=function(e){return"string"==typeof e||e instanceof String}},318:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matches=void 0,t.matches=function(e,t){return Array.isArray(t)?function(e,t,r){var n=String(t).length,o=e.substr(0,n),i=parseInt(o,10);return t=parseInt(String(t).substr(0,o.length),10),r=parseInt(String(r).substr(0,o.length),10),i>=t&&i<=r}(e,t[0],t[1]):function(e,t){return(t=String(t)).substring(0,e.length)===e.substring(0,t.length)}(e,t)}},47:function(e){var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof O?t:O,i=Object.create(o.prototype),c=new C(n||[]);return i._invoke=function(e,t,r){var n=A;return function(o,i){if(n===f)throw new Error("Generator is already running");if(n===l){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var c=r.delegate;if(c){var a=I(c,r);if(a){if(a===p)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===A)throw n=l,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var u=E(e,t,r);if("normal"===u.type){if(n=r.done?l:_,u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=l,r.method="throw",r.arg=u.arg)}}}(e,r,c),i}function E(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var A="suspendedStart",_="suspendedYield",f="executing",l="completed",p={};function O(){}function P(){}function T(){}var h={};h[i]=function(){return this};var d=Object.getPrototypeOf,R=d&&d(d(S([])));R&&R!==r&&n.call(R,i)&&(h=R);var N=T.prototype=O.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function D(e,t){function r(o,i,c,a){var u=E(e[o],e,i);if("throw"!==u.type){var s=u.arg,A=s.value;return A&&"object"==typeof A&&n.call(A,"__await")?t.resolve(A.__await).then((function(e){r("next",e,c,a)}),(function(e){r("throw",e,c,a)})):t.resolve(A).then((function(e){s.value=e,c(s)}),(function(e){return r("throw",e,c,a)}))}a(u.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function I(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method))return p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=E(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,p;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function v(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function m(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(v,this),this.reset(!0)}function S(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,c=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return c.next=c}}return{next:L}}function L(){return{value:t,done:!0}}return P.prototype=N.constructor=T,T.constructor=P,P.displayName=u(T,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===P||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,u(e,a,"GeneratorFunction")),e.prototype=Object.create(N),e},e.awrap=function(e){return{__await:e}},y(D.prototype),D.prototype[c]=function(){return this},e.AsyncIterator=D,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var c=new D(s(t,r,n,o),i);return e.isGeneratorFunction(r)?c:c.next().then((function(e){return e.done?e.value:c.next()}))},y(N),u(N,a,"Generator"),N[i]=function(){return this},N.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=S,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(m),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var c=this.tryEntries[i],a=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var u=n.call(c,"catchLoc"),s=n.call(c,"finallyLoc");if(u&&s){if(this.prev<c.catchLoc)return o(c.catchLoc,!0);if(this.prev<c.finallyLoc)return o(c.finallyLoc)}else if(u){if(this.prev<c.catchLoc)return o(c.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return o(c.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var c=i?i.completion:{};return c.type=e,c.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(c)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),m(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;m(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:S(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){"use strict";r.r(n),r.d(n,{CheckoutUXFlow:function(){return Rt},CvvInput:function(){return e.CvvInput},ErrorCode:function(){return Lt},EventTypes:function(){return jt},HeadlessManagerType:function(){return Ht},PaymentFlow:function(){return Nt},PaymentInstrumentType:function(){return It},PaymentMethodData:function(){return Bt.PaymentMethodData},PaymentMethodType:function(){return vt},Primer:function(){return xt},SuccessScreenType:function(){return kt},ThreeDSecureStatus:function(){return Dt},TokenType:function(){return Ct},preloadPrimer:function(){return St}});var e={};r.r(e);var t=r(162),o=r.n(t);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],c=!0,a=!1;try{for(r=r.call(e);!(c=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==r.return||r.return()}finally{if(a)throw o}}return i}}(e,t)||c(e,t)||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(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||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 s(e,t,r,n,o,i,c){try{var a=e[i](c),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,o)}function E(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function c(e){s(i,n,o,c,a,"next",e)}function a(e){s(i,n,o,c,a,"throw",e)}c(void 0)}))}}function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var f,l,p;r(854),r(63);function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.REQUEST_START="REQUEST_START",e.REQUEST_END="REQUEST_END"}(f||(f={})),function(e){e.START="START",e.END="END"}(l||(l={})),function(e){e.NETWORK_CALL_EVENT="NETWORK_CALL_EVENT",e.CRASH_EVENT="CRASH_EVENT",e.TIMER_EVENT="TIMER_EVENT",e.MESSAGE_EVENT="MESSAGE_EVENT",e.V1_EVENT="V1_EVENT",e.SDK_FUNCTION_EVENT="SDK_FUNCTION_EVENT"}(p||(p={}));var P,T=function(e,t){var r;try{switch(e){case"PRIMER_SDK_VERSION":r="v2.33.4";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(e){}return r||t};function h(){return d.apply(this,arguments)}function d(){return(d=E(o().mark((function e(){var t,r,n,i,c,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!=typeof navigator){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,null===(t=(r=navigator).getBattery)||void 0===t?void 0:t.call(r);case 4:return a=e.sent,e.abrupt("return",{memoryFootprint:null===(n=performance.memory)||void 0===n?void 0:n.usedJSHeapSize,screen:{height:null===(i=screen)||void 0===i?void 0:i.height,width:null===(c=screen)||void 0===c?void 0:c.width},platformVersion:navigator.platform,userAgent:navigator.userAgent,locale:navigator.language,batteryLevel:null==a?void 0:a.level,batteryStatus:null!=a&&a.charging?P.CHARGING:P.NOT_CHARGING});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}!function(e){e.CHARGING="CHARGING",e.NOT_CHARGING="NOT_CHARGING"}(P||(P={}));var y=T("PRIMER_SDK_VERSION");function D(e,t,r){return I.apply(this,arguments)}function I(){return(I=E(o().mark((function e(t,r,n){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=N,e.t1=N({},n),e.t2={},e.t3=Date.now(),e.next=6,h();case 6:return e.t4=e.sent,e.t5=t,e.t6=r,e.t7=y,e.t8="WEB",e.t9={createdAt:e.t3,device:e.t4,eventType:e.t5,properties:e.t6,sdkVersion:e.t7,sdkType:e.t8},e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t9));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var v="https://analytics.production.data.primer.io/sdk-logs",m=function(e){return"@primer/analytics/".concat(e)};function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,r=void 0===t?v:t,n=_(e,["url"]);"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&S(r)}));var i=function(e){return function(){var t=E(o().mark((function t(i){var c,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"!=typeof navigator){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,D(e,i,n);case 4:c=t.sent,a=Y(c,(function(e){return g(M(e))})),L(r,a);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()};return{crashEvent:i(p.CRASH_EVENT),messageEvent:i(p.MESSAGE_EVENT),networkCallEvent:i(p.NETWORK_CALL_EVENT),sdkFunctionEvent:i(p.SDK_FUNCTION_EVENT),timerEvent:i(p.TIMER_EVENT),v1Event:i(p.V1_EVENT)}}function S(e){var t=m(e),r=sessionStorage.getItem(t);sessionStorage.removeItem(t),r&&navigator.sendBeacon(e,r)}function L(e,t){var r,n=m(e);sessionStorage.setItem(n,"[".concat([null===(r=sessionStorage.getItem(n))||void 0===r?void 0:r.slice(1,-1),JSON.stringify(t)].filter(Boolean).join(","),"]"))}function Y(e,t){var r=function(e){return"object"===A(e)&&null!==e?Y(e,t):t(e)};return Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((function(e){var t=a(e,2),n=t[0],o=t[1];return[n,r(o)]})))}function g(e){return"string"==typeof e&&e.length>5120?"".concat(e.substring(0,5120),"..."):e}function M(e){return"function"==typeof e?e.name||"function":e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function U(e,t,r){return t&&w(e.prototype,t),r&&w(e,r),e}function B(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function j(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}function H(e,t){if(t&&("object"===A(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return B(e)}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var G=function(){function e(t,r){b(this,e),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=t,this.displayName=r}return U(e,[{key:"specs",get:function(){return this.constructor.specs}},{key:"setOption",value:function(e,t){this.options&&(this.options[e]=t)}},{key:"setupAndValidate",value:function(){return Promise.resolve(!0)}},{key:"mount",value:function(){return Promise.resolve(!0)}},{key:"tokenize",value:function(e){return Promise.resolve()}},{key:"validate",value:function(){return Promise.resolve({valid:!0,validationErrors:[]})}},{key:"setDisabled",value:function(e){return Promise.resolve()}},{key:"focus",value:function(){}},{key:"blur",value:function(){}},{key:"getPaymentElement",value:function(){return null}},{key:"getStore",value:function(){}}]),e}();function F(e){var t=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(e){return!1}}();return function(){var r,n=x(e);if(t){var o=x(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return H(this,r)}}O(G,"specs",{key:"__none__",canVault:!1,buttonManagedByPaymentMethod:!1,hasExportedButtonOptions:!1}),O(G,"create",(function(e,t,r,n){throw new Error("Cannot instantiate BasePaymentMethod")}));var V=function(e){j(n,e);var t,r=F(n);function n(){var e;b(this,n);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return O(B(e=r.call.apply(r,[this].concat(o))),"remoteConfig",void 0),e}return U(n,[{key:"tokenize",value:(t=E(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),n}(G);Map,Set;var K=function(){var e;return(null===(e=X.randomUUID)||void 0===e?void 0:e.call(X))||W()},W=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^z()>>e/4).toString(16)}))},z=function(){var e,t;return 15&(null!==(e=null===(t=X.getRandomValues)||void 0===t?void 0:t.call(X,new Uint8Array(1))[0])&&void 0!==e?e:16*Math.random())},X="undefined"!=typeof crypto?crypto:{};new Set(["post","get","delete"]),new Set(["post"]);var Q=function(e,t,r){return{callType:r?f.REQUEST_END:f.REQUEST_START,id:e,errorBody:(null==r?void 0:r.error)&&JSON.stringify(r.error),method:t.method,responseCode:null==r?void 0:r.status,url:t.url}};const Z="3.6.1",J="function"==typeof atob,$="function"==typeof btoa,q="function"==typeof Buffer,ee="function"==typeof TextDecoder?new TextDecoder:void 0,te="function"==typeof TextEncoder?new TextEncoder:void 0,re=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],ne=(e=>{let t={};return e.forEach(((e,r)=>t[e]=r)),t})(re),oe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ie=String.fromCharCode.bind(String),ce="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(e,t=(e=>e))=>new Uint8Array(Array.prototype.slice.call(e,0).map(t)),ae=e=>e.replace(/[+\/]/g,(e=>"+"==e?"-":"_")).replace(/=+$/m,""),ue=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),se=e=>{let t,r,n,o,i="";const c=e.length%3;for(let c=0;c<e.length;){if((r=e.charCodeAt(c++))>255||(n=e.charCodeAt(c++))>255||(o=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|o,i+=re[t>>18&63]+re[t>>12&63]+re[t>>6&63]+re[63&t]}return c?i.slice(0,c-3)+"===".substring(c):i},Ee=$?e=>btoa(e):q?e=>Buffer.from(e,"binary").toString("base64"):se,Ae=q?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(ie.apply(null,e.subarray(r,r+4096)));return Ee(t.join(""))},_e=(e,t=!1)=>t?ae(Ae(e)):Ae(e),fe=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?ie(192|t>>>6)+ie(128|63&t):ie(224|t>>>12&15)+ie(128|t>>>6&63)+ie(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return ie(240|t>>>18&7)+ie(128|t>>>12&63)+ie(128|t>>>6&63)+ie(128|63&t)},le=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,pe=e=>e.replace(le,fe),Oe=q?e=>Buffer.from(e,"utf8").toString("base64"):te?e=>Ae(te.encode(e)):e=>Ee(pe(e)),Pe=(e,t=!1)=>t?ae(Oe(e)):Oe(e),Te=e=>Pe(e,!0),he=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,de=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return ie(55296+(t>>>10))+ie(56320+(1023&t));case 3:return ie((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return ie((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},Re=e=>e.replace(he,de),Ne=e=>{if(e=e.replace(/\s+/g,""),!oe.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,n,o="";for(let i=0;i<e.length;)t=ne[e.charAt(i++)]<<18|ne[e.charAt(i++)]<<12|(r=ne[e.charAt(i++)])<<6|(n=ne[e.charAt(i++)]),o+=64===r?ie(t>>16&255):64===n?ie(t>>16&255,t>>8&255):ie(t>>16&255,t>>8&255,255&t);return o},ye=J?e=>atob(ue(e)):q?e=>Buffer.from(e,"base64").toString("binary"):Ne,De=q?e=>ce(Buffer.from(e,"base64")):e=>ce(ye(e),(e=>e.charCodeAt(0))),Ie=e=>De(me(e)),ve=q?e=>Buffer.from(e,"base64").toString("utf8"):ee?e=>ee.decode(De(e)):e=>Re(ye(e)),me=e=>ue(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),Ce=e=>ve(me(e)),Se=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),Le=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,Se(t));e("fromBase64",(function(){return Ce(this)})),e("toBase64",(function(e){return Pe(this,e)})),e("toBase64URI",(function(){return Pe(this,!0)})),e("toBase64URL",(function(){return Pe(this,!0)})),e("toUint8Array",(function(){return Ie(this)}))},Ye=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Se(t));e("toBase64",(function(e){return _e(this,e)})),e("toBase64URI",(function(){return _e(this,!0)})),e("toBase64URL",(function(){return _e(this,!0)}))},ge={version:Z,VERSION:"3.6.1",atob:ye,atobPolyfill:Ne,btoa:Ee,btoaPolyfill:se,fromBase64:Ce,toBase64:Pe,encode:Pe,encodeURI:Te,encodeURL:Te,utob:pe,btou:Re,decode:Ce,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/=+$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:_e,toUint8Array:Ie,extendString:Le,extendUint8Array:Ye,extendBuiltins:()=>{Le(),Ye()}};var Me={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.urlSafe,n=void 0!==r&&r;return ge.encode(e,n)},decode:ge.decode};function be(e){var t=function(e){try{var t=a(e.split("."),2),r=t[0],n=t[1]||r;return JSON.parse(Me.decode(n))}catch(e){throw new Error(Be)}}(e),r=1e3*t.exp;if(Date.now()>r)throw new Error("".concat(Ue,". Expiration date: ").concat(new Date(r).toISOString()));return t}var we="The provided `clientToken`",Ue="".concat(we," has expired"),Be="".concat(we," is malformed");function ke(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ke(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var He=function(e,t){return Ge("get",e,t)},xe={"content-type":"application/json"},Ge=function(e,t,r,n){return fetch(t,{body:n,method:e,headers:je(je({},xe),r)}).then((function(e){return e.json().catch((function(){}))}))};function Fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Ve=function(e,t,r){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({"primer-client-token":e,"primer-sdk-client":"WEB","primer-sdk-version":"v2.33.4","primer-sdk-checkout-session-id":t},r&&{"x-api-version":r})};function Ke(e,t,r){return We.apply(this,arguments)}function We(){return(We=E(o().mark((function e(t,r,n){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,He("".concat(r,"/?withDisplayMetadata=true"),Ve(t,n,"2.2"));case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),new Error(["Failed to initialize client",JSON.stringify(e.t0||void 0,void 0,2)].filter(Boolean).join(": "));case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}var ze=function(e,t){return r=function(e,t){var r=document.createElement(e);return Object.entries(t).forEach((function(e){var t=a(e,2),n=t[0],o=t[1];return r.setAttribute(n,o)})),r}(e,t),document.head.appendChild(r);var r},Xe=function(e,t,r){return e.addEventListener(t,r)};function Qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ze(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Je="Can't load Primer SDK",$e="".concat(Je,"'s Stylesheet");var qe,et=function(e,t,r,n,o){return new Promise((function(i,c){var a=tt(e,r,t)||ze(e,Ze(Ze({},n),{},O({},r,t)));Xe(a,"load",(function(){return i()})),Xe(a,"error",(function(){null==a||a.remove(),c(new Error(o))}))}))},tt=function(e,t,r){return n="".concat(e,"[").concat(t,'^="').concat(r,'"]'),document.querySelector(n);var n};function rt(){return nt.apply(this,arguments)}function nt(){return(nt=E(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!qe){e.next=2;break}return e.abrupt("return",qe);case 2:return qe=Promise.all([at(),ct()]).then((function(e){return a(e,1)[0]})),e.abrupt("return",qe);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ot,it,ct=function(){return e="https://sdk.primer.io/web/v2.33.4/Checkout.css",Array.from(document.styleSheets).find((function(t){return t.href===e}))?Promise.resolve():et("link",e,"href",{rel:"stylesheet"},$e);var e},at=function(){return(e="https://sdk.primer.io/web/v2.33.4/PrimerCoreSDK.min.js",t="script",tt(t,"src",e)&&window.__Primer?Promise.resolve():et(t,e,"src",{async:"",crossorigin:"anonymous"},Je)).then((function(){var e=window.__Primer;return delete window.__Primer,e})).catch((function(e){throw qe=void 0,e}));var e,t},ut=pt("createHeadless"),st=pt("showExpressCheckout"),Et=pt("showUniversalCheckout"),At=pt("showVaultManager"),_t="LOAD_PERFORMANCE",ft=K(),lt=C({checkoutSessionId:ft});function pt(e){return E(o().mark((function t(){var r,n,i,c,s,E,A,_,f,l,p,O,P=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(i=P.length,c=new Array(i),s=0;s<i;s++)c[s]=P[s];return E=c[0],A=c[1],_=c.slice(2),lt.sdkFunctionEvent({name:e,params:[E,A].concat(u(_))}),lt.messageEvent({message:"create",messageType:_t,now:null===(r=(n=performance).now)||void 0===r?void 0:r.call(n)}),t.next=6,Promise.all([Ot(E),rt()]);case 6:return f=t.sent,l=a(f,2),p=l[0],O=l[1],t.abrupt("return",O[e](p,ft,E,A));case 11:case"end":return t.stop()}}),t)})))}function Ot(e){return Pt.apply(this,arguments)}function Pt(){return(Pt=E(o().mark((function e(t){var r,n,i,c,a,u,s,E,A,_;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=be(t),n=r.accessToken,i=r.configurationUrl,c=r.analyticsUrlV2,lt=C({checkoutSessionId:ft,url:c}),a="".concat(i,"/?withDisplayMetadata=true"),u=K(),s={method:"get",url:a},lt.networkCallEvent(Q(u,s)),e.next=8,Ke(n,i,ft);case 8:return E=e.sent,A=E.primerAccountId,_=E.clientSession.clientSessionId,(lt=C({checkoutSessionId:ft,clientSessionId:_,primerAccountId:A,url:c})).networkCallEvent(Q(u,s,{data:E})),e.abrupt("return",E);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}lt.messageEvent({message:"parsed",messageType:_t,now:null===(ot=(it=performance).now)||void 0===ot?void 0:ot.call(it)});var Tt,ht,dt,Rt,Nt,yt,Dt,It,vt,mt,Ct,St=function(){return rt().then((function(){}))};!function(e){e.LOADING="Loading",e.THREE_DS="UniversalCheckout/3ds",e.CHOOSE_PAYMENT_METHOD="UniversalCheckout/Home",e.MANAGE_PAYMENT_METHODS="VaultManager/Home",e.DIRECT_DEBIT_FORM="DirectDebit/Form",e.DIRECT_DEBIT_MANDATE="DirectDebit/Mandate",e.CREDIT_CARD_FORM="CreditCard/Form",e.SUCCESS_PAYMENT_METHOD="UniversalCheckout/Success/PaymentMethod",e.SUCCESS_CHECK="UniversalCheckout/Success/Check"}(Tt||(Tt={})),function(e){e.ROOT="primer-checkout",e.ROOT_CONTENT="primer-checkout-content",e.SUBMIT_BUTTON="primer-checkout-submit-button",e.THREE_DS_MODAL="primer-checkout-3ds-modal",e.VAULT="primer-checkout-vault",e.VAULT_INLINE="primer-checkout-vault-inline",e.NAVIGATE_PAYMENT_METHODS="primer-checkout-navigate-to-payment-methods",e.DIVIDER="primer-checkout-payment-method-divider",e.APM_BUTTONS="primer-checkout-apm-button-container",e.CARDHOLDER_NAME="primer-checkout-cardholder-name",e.CARDHOLDER_NAME_INPUT="primer-checkout-card-cardholder-name-input",e.ACTIONS="primer-checkout-actions",e.ACTIONS_MENU="primer-checkout-actions-menu",e.SAVE_PAYMENT_METHOD_CHECKBOX="primer-checkout-save-payment-method-input",e.SAVE_PAYMENT_METHOD_FIELD="primer-checkout-save-payment-method-field",e.SAVED_PAYMENT_METHODS_EMPTY="primer-checkout-saved-payment-methods-empty-text",e.CARD_FORM="primer-checkout-card-form",e.DD_SWITCH="primer-checkout-switch-dd-inputs",e.DD_IBAN_FIELD="primer-checkout-dd-iban-field",e.DD_LOCAL_FIELD="primer-checkout-dd-local-fields",e.DD_CUSTOMER_NAME_INPUT="primer-checkout-dd-customer-name-input",e.DD_CUSTOMER_EMAIL_INPUT="primer-checkout-dd-customer-email-input",e.DD_CUSTOMER_ADDRESS_LINE1="primer-checkout-dd-customer-address-input",e.DD_CUSTOMER_ADDRESS_LINE2="primer-checkout-dd-customer-address-line2-input",e.DD_CUSTOMER_ADDRESS_CITY="primer-checkout-dd-customer-city-input",e.DD_CUSTOMER_ADDRESS_POSTAL_CODE="primer-checkout-dd-customer-postal-code-input",e.DD_IBAN_INPUT="primer-checkout-dd-iban-input",e.DD_ACCOUNT_NUMBER_INPUT="primer-checkout-dd-account-number-input",e.DD_BANK_CODE_INPUT="primer-checkout-dd-bank-code-input",e.DD_BRANCH_CODE_INPUT="primer-checkout-dd-branch-code-input",e.DD_MANDATE_SMALL_PRINT="primer-checkout-small-print",e.ERROR_MESSAGE="primer-checkout-error-message"}(ht||(ht={})),function(e){e.TOKEN="PrimerCheckout__token",e.HIDDEN="PrimerCheckout--hidden",e.FOCUSED="PrimerCheckout--focused",e.SELECTED="PrimerCheckout--selected",e.LOADING="PrimerCheckout--loading",e.ERROR="PrimerCheckout--error",e.CARD_TYPE="PrimerCheckout__cardType",e.SAVED_PAYMENT_METHOD="PrimerCheckout__savedPaymentMethod",e.SAVED_PAYMENT_METHOD_CONTAINER="PrimerCheckout__savedPaymentMethodContainer",e.APM_BUTTON="PrimerCheckout__apmButton",e.EDIT_BUTTON="PrimerCheckout__editButton",e.MENU="PrimerCheckout__dropDownMenu",e.MENU_ITEM="PrimerCheckout__dropDownMenuItem",e.PAYMENT_METHOD_MENU_ITEM="PrimerCheckout__paymentMethodDropDownMenuItem",e.DELETE_PAYMENT_METHOD_BUTTON="PrimerCheckout__paymentMethodDropDownMenuItem__deleteButton",e.ENTER="PrimerCheckout--enter",e.ENTERING="PrimerCheckout--entering",e.ENTERED="PrimerCheckout--entered",e.EXIT="PrimerCheckout--exit",e.EXITING="PrimerCheckout--exiting",e.EXITED="PrimerCheckout--exited"}(dt||(dt={})),function(e){e.CHECKOUT="CHECKOUT",e.EXPRESS_CHECKOUT="EXPRESS_CHECKOUT",e.HEADLESS_CHECKOUT="HEADLESS_CHECKOUT",e.MANAGE_PAYMENT_METHODS="MANAGE_PAYMENT_METHODS",e.SINGLE_PAYMENT_METHOD_CHECKOUT="SINGLE_PAYMENT_METHOD_CHECKOUT"}(Rt||(Rt={})),function(e){e.DEFAULT="DEFAULT",e.PREFER_VAULT="PREFER_VAULT"}(Nt||(Nt={})),function(e){e.TOKENIZE_STARTED="tokenize-started",e.TOKENIZE_ERROR="tokenize-error",e.TOKENIZE_SUCCESS="tokenize-success",e.TOKENIZE_DID_NOT_START="tokenize-did-not-start"}(yt||(yt={})),function(e){e.SUCCESS="AUTH_SUCCESS",e.FAILED="AUTH_FAILED",e.SKIPPED="SKIPPED",e.CHALLENGE="CHALLENGE"}(Dt||(Dt={})),function(e){e.WORLDPAY_IDEAL="WORLDPAY_IDEAL",e.ADYEN_KLARNA="ADYEN_KLARNA",e.ADYEN_BANCONTACT_CARD="ADYEN_BANCONTACT_CARD",e.PAY_NL_KAARTDIRECT="PAY_NL_KAARTDIRECT",e.ADYEN_EPS="ADYEN_EPS",e.ADYEN_BANCONTACT_PAYCONIQ="ADYEN_BANCONTACT_PAYCONIQ",e.OMISE_PROMPTPAY="OMISE_PROMPTPAY",e.OMISE_TRUEMONEY="OMISE_TRUEMONEY",e.ADYEN_MULTIBANCO="ADYEN_MULTIBANCO",e.PACYPAY_WECHAT="PACYPAY_WECHAT",e.PACYPAY_ALIPAY="PACYPAY_ALIPAY",e.ADYEN_MBWAY="ADYEN_MBWAY",e.XENDIT_DANA="XENDIT_DANA",e.XENDIT_SHOPEEPAY="XENDIT_SHOPEEPAY",e.ADYEN_PAYSHOP="ADYEN_PAYSHOP",e.ADYEN_PAYTRAIL="ADYEN_PAYTRAIL",e.CLEARPAY="CLEARPAY",e.RAPYD_FAST="RAPYD_FAST",e.RAPYD_PROMPTPAY="RAPYD_PROMPTPAY",e.RAPYD_GCASH="RAPYD_GCASH",e.RAPYD_POLI="RAPYD_POLI",e.RAPYD_GRABPAY="RAPYD_GRABPAY",e.PRIMER_PAYPAL="PRIMER_PAYPAL",e.TWOC2P="TWOC2P",e.NETS="NETS",e.STRIPE_GIROPAY="STRIPE_GIROPAY",e.MOLLIE_GIROPAY="MOLLIE_GIROPAY",e.MOLLIE_EPS="MOLLIE_EPS",e.PAY_NL_EPS="PAY_NL_EPS",e.PAY_NL_P24="PAY_NL_P24",e.MOLLIE_P24="MOLLIE_P24",e.MOLLIE_SOFORT="MOLLIE_SOFORT",e.COINBASE="COINBASE",e.OPENNODE="OPENNODE",e.MOLLIE_GIFT_CARD="MOLLIE_GIFTCARD",e.XFERS_PAYNOW="XFERS_PAYNOW",e.CARD="PAYMENT_CARD",e.APPLE_PAY="APPLE_PAY",e.GOOGLE_PAY="GOOGLE_PAY",e.PAYPAL="PAYPAL_ORDER",e.PAYPAL_VAULTED="PAYPAL_BILLING_AGREEMENT",e.GO_CARDLESS="GOCARDLESS",e.PAY_NL_IDEAL="PAY_NL_IDEAL",e.PAY_NL_SOFORT_BANKING="PAY_NL_SOFORT_BANKING",e.PAY_NL_BANCONTACT="PAY_NL_BANCONTACT",e.PAY_NL_PAYPAL="PAY_NL_PAYPAL",e.PAY_NL_CREDIT_TRANSFER="PAY_NL_CREDIT_TRANSFER",e.PAY_NL_DIRECT_DEBIT="PAY_NL_DIRECT_DEBIT",e.PAY_NL_GIROPAY="PAY_NL_GIROPAY",e.PAY_NL_PAYCONIQ="PAY_NL_PAYCONIQ",e.HOOLAH="HOOLAH",e.ADYEN_BLIK="ADYEN_BLIK",e.ADYEN_VIPPS="ADYEN_VIPPS",e.ADYEN_GIROPAY="ADYEN_GIROPAY",e.ADYEN_SOFORT="ADYEN_SOFORT",e.ADYEN_TRUSTLY="ADYEN_TRUSTLY",e.ADYEN_ALIPAY="ADYEN_ALIPAY",e.ADYEN_TWINT="ADYEN_TWINT",e.ADYEN_MOBILEPAY="ADYEN_MOBILEPAY",e.MOLLIE_BANCONTACT="MOLLIE_BANCONTACT",e.MOLLIE_IDEAL="MOLLIE_IDEAL",e.BUCKAROO_GIROPAY="BUCKAROO_GIROPAY",e.BUCKAROO_EPS="BUCKAROO_EPS",e.BUCKAROO_SOFORT="BUCKAROO_SOFORT",e.BUCKAROO_BANCONTACT="BUCKAROO_BANCONTACT",e.BUCKAROO_IDEAL="BUCKAROO_IDEAL",e.ATOME="ATOME"}(It||(It={})),function(e){e.WORLDPAY_IDEAL="WORLDPAY_IDEAL",e.ADYEN_KLARNA="ADYEN_KLARNA",e.ADYEN_BANCONTACT_CARD="ADYEN_BANCONTACT_CARD",e.PAY_NL_KAARTDIRECT="PAY_NL_KAARTDIRECT",e.ADYEN_EPS="ADYEN_EPS",e.ADYEN_BANCONTACT_PAYCONIQ="ADYEN_BANCONTACT_PAYCONIQ",e.OMISE_PROMPTPAY="OMISE_PROMPTPAY",e.OMISE_TRUEMONEY="OMISE_TRUEMONEY",e.ADYEN_MULTIBANCO="ADYEN_MULTIBANCO",e.PACYPAY_WECHAT="PACYPAY_WECHAT",e.PACYPAY_ALIPAY="PACYPAY_ALIPAY",e.ADYEN_MBWAY="ADYEN_MBWAY",e.XENDIT_DANA="XENDIT_DANA",e.XENDIT_SHOPEEPAY="XENDIT_SHOPEEPAY",e.ADYEN_PAYSHOP="ADYEN_PAYSHOP",e.ADYEN_PAYTRAIL="ADYEN_PAYTRAIL",e.CLEARPAY="CLEARPAY",e.RAPYD_FAST="RAPYD_FAST",e.RAPYD_PROMPTPAY="RAPYD_PROMPTPAY",e.RAPYD_GCASH="RAPYD_GCASH",e.RAPYD_POLI="RAPYD_POLI",e.RAPYD_GRABPAY="RAPYD_GRABPAY",e.PRIMER_PAYPAL="PRIMER_PAYPAL",e.TWOC2P="TWOC2P",e.NETS="NETS",e.STRIPE_GIROPAY="STRIPE_GIROPAY",e.MOLLIE_GIROPAY="MOLLIE_GIROPAY",e.MOLLIE_EPS="MOLLIE_EPS",e.PAY_NL_EPS="PAY_NL_EPS",e.PAY_NL_P24="PAY_NL_P24",e.MOLLIE_P24="MOLLIE_P24",e.MOLLIE_SOFORT="MOLLIE_SOFORT",e.COINBASE="COINBASE",e.OPENNODE="OPENNODE",e.MOLLIE_GIFT_CARD="MOLLIE_GIFTCARD",e.XFERS_PAYNOW="XFERS_PAYNOW",e.PAYMENT_CARD="PAYMENT_CARD",e.APPLE_PAY="APPLE_PAY",e.GOOGLE_PAY="GOOGLE_PAY",e.PAYPAL="PAYPAL",e.GO_CARDLESS="GOCARDLESS",e.KLARNA="KLARNA",e.PAY_NL_IDEAL="PAY_NL_IDEAL",e.PAY_NL_SOFORT_BANKING="PAY_NL_SOFORT_BANKING",e.PAY_NL_BANCONTACT="PAY_NL_BANCONTACT",e.PAY_NL_PAYPAL="PAY_NL_PAYPAL",e.PAY_NL_CREDIT_TRANSFER="PAY_NL_CREDIT_TRANSFER",e.PAY_NL_DIRECT_DEBIT="PAY_NL_DIRECT_DEBIT",e.PAY_NL_GIROPAY="PAY_NL_GIROPAY",e.PAY_NL_PAYCONIQ="PAY_NL_PAYCONIQ",e.HOOLAH="HOOLAH",e.ADYEN_BLIK="ADYEN_BLIK",e.ADYEN_MOBILEPAY="ADYEN_MOBILEPAY",e.ADYEN_VIPPS="ADYEN_VIPPS",e.ADYEN_GIROPAY="ADYEN_GIROPAY",e.ADYEN_SOFORT="ADYEN_SOFORT",e.ADYEN_TRUSTLY="ADYEN_TRUSTLY",e.ADYEN_ALIPAY="ADYEN_ALIPAY",e.ADYEN_TWINT="ADYEN_TWINT",e.ADYEN_BANK_TRANSFER="ADYEN_BANK_TRANSFER",e.MOLLIE_BANCONTACT="MOLLIE_BANCONTACT",e.MOLLIE_IDEAL="MOLLIE_IDEAL",e.BUCKAROO_GIROPAY="BUCKAROO_GIROPAY",e.BUCKAROO_EPS="BUCKAROO_EPS",e.BUCKAROO_SOFORT="BUCKAROO_SOFORT",e.BUCKAROO_BANCONTACT="BUCKAROO_BANCONTACT",e.BUCKAROO_IDEAL="BUCKAROO_IDEAL",e.ATOME="ATOME"}(vt||(vt={})),function(e){e.PAYMENT_CARD="PAYMENT_CARD",e.ADYEN_BANCONTACT_CARD="ADYEN_BANCONTACT_CARD"}(mt||(mt={})),function(e){e.SINGLE_USE="SINGLE_USE",e.MULTI_USE="MULTI_USE"}(Ct||(Ct={}));var Lt;O({},It.PAYPAL_VAULTED,vt.PAYPAL);function Yt(){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(e){return!1}}function gt(e,t,r){return(Yt()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&k(o,r.prototype),o}).apply(null,arguments)}function Mt(e){var t="function"==typeof Map?new Map:void 0;return function(e){if(null===e||(e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return gt(e,arguments,x(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),k(n,e)}(e)}function bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ut(e){var t=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(e){return!1}}();return function(){var r,n=x(e);if(t){var o=x(this).constructor;Reflect.construct(n,arguments,o)}else n.apply(this,arguments);return H(this,r)}}!function(e){e.INITIALIZATION_ERROR="INITIALIZATION_ERROR",e.NO_PAYMENT_METHODS="NO_PAYMENT_METHODS",e.PRIMER_TEARDOWN="PRIMER_TEARDOWN",e.PRIMER_SERVER_ERROR="PRIMER_SERVER_ERROR",e.THREE_DS_SETUP_ERROR="THREE_DS_SETUP_ERROR",e.THREE_DS_AUTH_FAILED="THREE_DS_AUTH_FAILED",e.THREE_DS_NEGOTIATION_ERROR="THREE_DS_NEGOTIATION_ERROR",e.TOKENIZATION_ERROR="TOKENIZATION_ERROR",e.DUPLICATE_PAYMENT_METHOD_ERROR="DUPLICATE_PAYMENT_METHOD_ERROR",e.CARD_NUMBER_ERROR="CARD_NUMBER_ERROR",e.PAYMENT_METHOD_NOT_SETUP="PAYMENT_METHOD_NOT_SETUP",e.PAYMENT_METHOD_NOT_PROVIDED="PAYMENT_METHOD_NOT_SETUP",e.PAYMENT_METHOD_NOT_COMPATIBLE="PAYMENT_METHOD_NOT_COMPATIBLE",e.RESUME_ERROR="RESUME_ERROR",e.TAX_ERROR="TAX_ERROR",e.VALIDATION_ERROR="VALIDATION_ERROR",e.PAYMENT_FAILED="PAYMENT_FAILED",e.PAYMENT_CREATION_ABORTED="PAYMENT_CREATION_ABORTED",e.PAYMENT_CREATION_DISABLED="PAYMENT_CREATION_DISABLED",e.CLIENT_SESSION_UPDATE_ERROR="CLIENT_SESSION_UPDATE_ERROR",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.VAULT_FETCH="VAULT_FETCH",e.VAULT_DELETE="VAULT_DELETE",e.HEADLESS_VAULT_MANAGER_VALIDATION="HEADLESS_VAULT_MANAGER_VALIDATION",e.CARD_FORM_VALIDATION_UNEXPECTED_FIELD="CARD_FORM_VALIDATION_UNEXPECTED_FIELD"}(Lt||(Lt={}));Error;var Bt=r(681);r(291);var kt,jt,Ht;new Set(["change","blur","focus"]);!function(e){e.PAYMENT_METHOD="PAYMENT_METHOD",e.CHECK="CHECK"}(kt||(kt={})),function(e){e.CHANGE="change",e.ERROR="error",e.FOCUS="focus",e.BLUR="blur",e.CLICK="click",e.CLOSE="close"}(jt||(jt={})),function(e){e.CARD="CARD",e.NATIVE="NATIVE",e.REDIRECT="REDIRECT"}(Ht||(Ht={}));var xt={SDK_VERSION:"v2.33.4",createHeadless:ut,showExpressCheckout:st,showUniversalCheckout:Et,showVaultManager:At}}(),n}()}));
1
+ (function(G,f){typeof exports=="object"&&typeof module=="object"?module.exports=f():typeof define=="function"&&define.amd?define([],f):typeof exports=="object"?exports.Primer=f():G.Primer=f()})(this,function(){return function(){var y={453:function(R,A,s){"use strict";var D=this&&this.__assign||function(){return D=Object.assign||function(_){for(var u,P=1,M=arguments.length;P<M;P++){u=arguments[P];for(var U in u)Object.prototype.hasOwnProperty.call(u,U)&&(_[U]=u[U])}return _},D.apply(this,arguments)},S=s(743),a=s(576),E=s(243),h=s(169),p=s(679),l={},O={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"},v=[O.VISA,O.MASTERCARD,O.AMERICAN_EXPRESS,O.DINERS_CLUB,O.DISCOVER,O.JCB,O.UNIONPAY,O.MAESTRO,O.ELO,O.MIR,O.HIPER,O.HIPERCARD],I=p.clone(v);function k(_){return l[_]||S[_]}function m(){return I.map(function(_){return p.clone(k(_))})}function B(_,u){u===void 0&&(u=!1);var P=I.indexOf(_);if(!u&&P===-1)throw new Error('"'+_+'" is not a supported card type.');return P}function g(_){var u=[];if(!E.isValidInputType(_))return u;if(_.length===0)return m();I.forEach(function(M){var U=k(M);a.addMatchingCardsToResults(_,U,u)});var P=h.findBestMatch(u);return P?[P]:u}g.getTypeInfo=function(_){return p.clone(k(_))},g.removeCard=function(_){var u=B(_);I.splice(u,1)},g.addCard=function(_){var u=B(_.type,!0);l[_.type]=_,u===-1&&I.push(_.type)},g.updateCard=function(_,u){var P=l[_]||S[_];if(!P)throw new Error('"'+_+"\" is not a recognized type. Use `addCard` instead.'");if(u.type&&P.type!==u.type)throw new Error("Cannot overwrite type parameter.");var M=p.clone(P);M=D(D({},M),u),l[M.type]=M},g.changeOrder=function(_,u){var P=B(_);I.splice(P,1),I.splice(u,0,_)},g.resetModifications=function(){I=p.clone(v),l={}},g.types=O,R.exports=g},576:function(R,A,s){"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.addMatchingCardsToResults=void 0;var D=s(679),S=s(864);function a(E,h,p){var l,O;for(l=0;l<h.patterns.length;l++){var v=h.patterns[l];if(S.matches(E,v)){var I=D.clone(h);Array.isArray(v)?O=String(v[0]).length:O=String(v).length,E.length>=O&&(I.matchStrength=O),p.push(I);break}}}A.addMatchingCardsToResults=a},743:function(R){"use strict";var A={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[624,626],[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[622019,622999],[62207,62209],[622126,622925],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292,810,[8110,8131],[8132,8151],[8152,8163],[8164,8171]],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,504174],[504176,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}},hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,63737423,63743358,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}}};R.exports=A},679:function(R,A){"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.clone=void 0;function s(D){return D?JSON.parse(JSON.stringify(D)):null}A.clone=s},169:function(R,A){"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.findBestMatch=void 0;function s(S){var a=S.filter(function(E){return E.matchStrength}).length;return a>0&&a===S.length}function D(S){return s(S)?S.reduce(function(a,E){return!a||Number(a.matchStrength)<Number(E.matchStrength)?E:a}):null}A.findBestMatch=D},243:function(R,A){"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.isValidInputType=void 0;function s(D){return typeof D=="string"||D instanceof String}A.isValidInputType=s},864:function(R,A){"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.matches=void 0;function s(a,E,h){var p=String(E).length,l=a.substr(0,p),O=parseInt(l,10);return E=parseInt(String(E).substr(0,l.length),10),h=parseInt(String(h).substr(0,l.length),10),O>=E&&O<=h}function D(a,E){return E=String(E),E.substring(0,a.length)===a.substring(0,E.length)}function S(a,E){return Array.isArray(E)?s(a,E[0],E[1]):D(a,E)}A.matches=S},476:function(){},962:function(){},473:function(){}},G={};function f(R){var A=G[R];if(A!==void 0)return A.exports;var s=G[R]={exports:{}};return y[R].call(s.exports,s,s.exports,f),s.exports}(function(){f.d=function(R,A){for(var s in A)f.o(A,s)&&!f.o(R,s)&&Object.defineProperty(R,s,{enumerable:!0,get:A[s]})}})(),function(){f.o=function(R,A){return Object.prototype.hasOwnProperty.call(R,A)}}(),function(){f.r=function(R){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(R,"__esModule",{value:!0})}}();var X={};return function(){"use strict";f.r(X),f.d(X,{CheckoutUXFlow:function(){return ve},CvvInput:function(){return R.CvvInput},ErrorCode:function(){return He},EventTypes:function(){return Ge},HeadlessManagerType:function(){return me},PaymentFlow:function(){return Ue},PaymentInstrumentType:function(){return be},PaymentMethodData:function(){return Kr.PaymentMethodData},PaymentMethodType:function(){return q},Primer:function(){return zr},SuccessScreenType:function(){return xe},ThreeDSecureStatus:function(){return Be},TokenType:function(){return ke},preloadPrimer:function(){return Hr}});var R={};f.r(R);var A=f(476),s=f(962),D=(e=>(e.REQUEST_START="REQUEST_START",e.REQUEST_END="REQUEST_END",e))(D||{}),S=(e=>(e.START="START",e.END="END",e))(S||{}),a=(e=>(e.NETWORK_CALL_EVENT="NETWORK_CALL_EVENT",e.CRASH_EVENT="CRASH_EVENT",e.TIMER_EVENT="TIMER_EVENT",e.MESSAGE_EVENT="MESSAGE_EVENT",e.V1_EVENT="V1_EVENT",e.SDK_FUNCTION_EVENT="SDK_FUNCTION_EVENT",e))(a||{});const E={get(e,r){let t;try{switch(e){case"PRIMER_SDK_VERSION":t="v2.35.0";break;case"PRIMER_ASSETS_URL":t=process.env.PRIMER_ASSETS_URL;break;case"PRIMER_CORE_API_URL":t=process.env.PRIMER_CORE_API_URL;break;case"PRIMER_PCI_API_URL":t=process.env.PRIMER_PCI_API_URL;break;case"PRIMER_MODULES_URL":t=process.env.PRIMER_MODULES_URL;break;case"PRIMER_BUILD_INTEGRATION_BUILDER":t=process.env.PRIMER_BUILD_INTEGRATION_BUILDER;break;case"SENTRY_DSN":t=process.env.SENTRY_DSN;break;default:break}}catch{}return t||r}};var h=(e=>(e.CHARGING="CHARGING",e.NOT_CHARGING="NOT_CHARGING",e))(h||{});async function p(){if(typeof navigator>"u")return;const e=await navigator.getBattery?.();return{memoryFootprint:performance.memory?.usedJSHeapSize,screen:{height:screen?.height,width:screen?.width},platformVersion:navigator.platform,userAgent:navigator.userAgent,locale:navigator.language,batteryLevel:e?.level,batteryStatus:e?.charging?"CHARGING":"NOT_CHARGING"}}const l="WEB",O=E.get("PRIMER_SDK_VERSION");async function v(e,r,t){return{...t,createdAt:Date.now(),device:await p(),eventType:e,properties:r,sdkVersion:O,sdkType:l}}const I="https://analytics.production.data.primer.io/sdk-logs",k=1024*5,m=e=>`@primer/analytics/${e}`;function B({url:e=I,...r}={}){typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&g(e)});const t=n=>async o=>{if(typeof navigator>"u")return;const i=await v(n,o,r),c=u(i,T=>P(M(T)));_(e,c)};return{crashEvent:t(a.CRASH_EVENT),messageEvent:t(a.MESSAGE_EVENT),networkCallEvent:t(a.NETWORK_CALL_EVENT),sdkFunctionEvent:t(a.SDK_FUNCTION_EVENT),timerEvent:t(a.TIMER_EVENT),v1Event:t(a.V1_EVENT)}}function g(e){const r=m(e),t=sessionStorage.getItem(r);sessionStorage.removeItem(r),t&&navigator.sendBeacon(e,t)}function _(e,r){const t=m(e);sessionStorage.setItem(t,`[${[sessionStorage.getItem(t)?.slice(1,-1),JSON.stringify(r)].filter(Boolean).join(",")}]`)}function u(e,r){const t=n=>typeof n=="object"&&n!==null?u(n,r):r(n);return Array.isArray(e)?e.map(t):Object.fromEntries(Object.entries(e).map(([n,o])=>[n,t(o)]))}function P(e){return typeof e=="string"&&e.length>k?`${e.slice(0,k)}...`:e}function M(e){return typeof e=="function"?e.name||"function":e}class U{constructor(r,t){this.type=r,this.displayName=t}get specs(){return this.constructor.specs}setOption(r,t){this.options&&(this.options[r]=t)}setupAndValidate(){return Promise.resolve(!0)}mount(){return Promise.resolve(!0)}tokenize(r){return Promise.resolve()}validate(){return Promise.resolve({valid:!0,validationErrors:[]})}setDisabled(r){return Promise.resolve()}focus(){}blur(){}getPaymentElement(){return null}getStore(){}}U.specs={key:"__none__",canVault:!1,buttonManagedByPaymentMethod:!1,hasExportedButtonOptions:!1},U.create=(e,r,t,n)=>{throw new Error("Cannot instantiate BasePaymentMethod")};class Ke extends U{async tokenize(r){}}class We{get session(){const r=this.store.getState().clientSessionInfo;if(!r)throw new Error("Client Context Session does not exist");return r}}const je=[Array,Ke,We,Map,Set];function ze(e){const r=new Set,t=20;let n=0;for(;n++<t&&e&&e!==Object.prototype;)Object.getOwnPropertyNames(e).forEach(o=>r.add(o)),e=Object.getPrototypeOf(e);return[...r]}function ee(e,r,t,n,o){if(!t||je.some(i=>t instanceof i))return t;switch(typeof t){case"function":return new Proxy(t,{apply(i,N,c=[]){const T={name:r.replace(/^bound /,""),params:c,module:o};e?.sdkFunctionEvent(T);const Y=c.map((z,d)=>ee(e,`${d}`,z,n,[o,r,`${d}`].filter(Boolean).join(".")));return i.apply(N,Y)}});case"object":return t===n?t:Xe(e,t,[o,r].filter(Boolean).join("."));default:return t}}function Xe(e,r,t){return Object.fromEntries(ze(r).map(n=>{const o=r?.[n],i=ee(e,n,o,o,t);return[n,i]}))}const re=()=>te.randomUUID?.()||$e(),$e=()=>([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^Qe()>>e/4).toString(16)),Qe=()=>(te.getRandomValues?.(new Uint8Array(1))[0]??Math.random()*16)&15,te=typeof crypto<"u"?crypto:{},Ze=new Set(["post","get","delete"]),Je=new Set(["post"]);function qe(e,r,t,n){const o=Je.has(e);return{method:e,options:o?n:t,body:o?t:void 0,url:r}}function Xr(e,r){const t=({prop:n})=>({apply:async(o,i,N=[])=>{const c=qe(n.toString(),...N);if(c.options?.isAnalytics)return o.apply(i,N);const T=uuid();r?.networkCallEvent(prepareNetworkEventProps(T,c));const Y=await o.apply(i,N);return r?.networkCallEvent(prepareNetworkEventProps(T,c,Y)),Y}});return new Proxy(e,{get(n,o){const i=n[o];return typeof i=="function"&&Ze.has(o)?new Proxy(i,t({prop:o})):i}})}const ne=(e,r,t)=>({callType:t?D.REQUEST_END:D.REQUEST_START,id:e,errorBody:t?.error&&JSON.stringify(t.error),method:r.method,responseCode:t?.status,url:r.url}),oe="3.6.1",ye=oe,er=typeof atob=="function",rr=typeof btoa=="function",F=typeof Buffer=="function",ie=typeof TextDecoder=="function"?new TextDecoder:void 0,Ae=typeof TextEncoder=="function"?new TextEncoder:void 0,w=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],K=(e=>{let r={};return e.forEach((t,n)=>r[t]=n),r})(w),tr=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,C=String.fromCharCode.bind(String),_e=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):(e,r=t=>t)=>new Uint8Array(Array.prototype.slice.call(e,0).map(r)),ce=e=>e.replace(/[+\/]/g,r=>r=="+"?"-":"_").replace(/=+$/m,""),se=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),Ee=e=>{let r,t,n,o,i="";const N=e.length%3;for(let c=0;c<e.length;){if((t=e.charCodeAt(c++))>255||(n=e.charCodeAt(c++))>255||(o=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");r=t<<16|n<<8|o,i+=w[r>>18&63]+w[r>>12&63]+w[r>>6&63]+w[r&63]}return N?i.slice(0,N-3)+"===".substring(N):i},$=rr?e=>btoa(e):F?e=>Buffer.from(e,"binary").toString("base64"):Ee,Q=F?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let n=0,o=e.length;n<o;n+=4096)t.push(C.apply(null,e.subarray(n,n+4096)));return $(t.join(""))},W=(e,r=!1)=>r?ce(Q(e)):Q(e),nr=e=>{if(e.length<2){var r=e.charCodeAt(0);return r<128?e:r<2048?C(192|r>>>6)+C(128|r&63):C(224|r>>>12&15)+C(128|r>>>6&63)+C(128|r&63)}else{var r=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return C(240|r>>>18&7)+C(128|r>>>12&63)+C(128|r>>>6&63)+C(128|r&63)}},or=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ae=e=>e.replace(or,nr),ue=F?e=>Buffer.from(e,"utf8").toString("base64"):Ae?e=>Q(Ae.encode(e)):e=>$(ae(e)),H=(e,r=!1)=>r?ce(ue(e)):ue(e),Re=e=>H(e,!0),ir=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ar=e=>{switch(e.length){case 4:var r=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),t=r-65536;return C((t>>>10)+55296)+C((t&1023)+56320);case 3:return C((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return C((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},Oe=e=>e.replace(ir,Ar),Ne=e=>{if(e=e.replace(/\s+/g,""),!tr.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let r,t="",n,o;for(let i=0;i<e.length;)r=K[e.charAt(i++)]<<18|K[e.charAt(i++)]<<12|(n=K[e.charAt(i++)])<<6|(o=K[e.charAt(i++)]),t+=n===64?C(r>>16&255):o===64?C(r>>16&255,r>>8&255):C(r>>16&255,r>>8&255,r&255);return t},Z=er?e=>atob(se(e)):F?e=>Buffer.from(e,"base64").toString("binary"):Ne,de=F?e=>_e(Buffer.from(e,"base64")):e=>_e(Z(e),r=>r.charCodeAt(0)),De=e=>de(Te(e)),_r=F?e=>Buffer.from(e,"base64").toString("utf8"):ie?e=>ie.decode(de(e)):e=>Oe(Z(e)),Te=e=>se(e.replace(/[-_]/g,r=>r=="-"?"+":"/")),J=e=>_r(Te(e)),cr=e=>{if(typeof e!="string")return!1;const r=e.replace(/\s+/g,"").replace(/=+$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(r)||!/[^\s0-9a-zA-Z\-_]/.test(r)},fe=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),Pe=function(){const e=(r,t)=>Object.defineProperty(String.prototype,r,fe(t));e("fromBase64",function(){return J(this)}),e("toBase64",function(r){return H(this,r)}),e("toBase64URI",function(){return H(this,!0)}),e("toBase64URL",function(){return H(this,!0)}),e("toUint8Array",function(){return De(this)})},Ce=function(){const e=(r,t)=>Object.defineProperty(Uint8Array.prototype,r,fe(t));e("toBase64",function(r){return W(this,r)}),e("toBase64URI",function(){return W(this,!0)}),e("toBase64URL",function(){return W(this,!0)})},le={version:oe,VERSION:ye,atob:Z,atobPolyfill:Ne,btoa:$,btoaPolyfill:Ee,fromBase64:J,toBase64:H,encode:H,encodeURI:Re,encodeURL:Re,utob:ae,btou:Oe,decode:J,isValid:cr,fromUint8Array:W,toUint8Array:De,extendString:Pe,extendUint8Array:Ce,extendBuiltins:()=>{Pe(),Ce()}},sr={encode:Er,decode:le.decode};function Er(e,r={}){const{urlSafe:t=!1}=r;return le.encode(e,t)}function ar(e){const r=Or(e),t=r.exp*1e3;if(Date.now()>t)throw new Error(`${ur}. Expiration date: ${new Date(t).toISOString()}`);return r}const Se="The provided `clientToken`",ur=`${Se} has expired`,Rr=`${Se} is malformed`;function Or(e){try{const[r,t]=e.split("."),n=t||r;return JSON.parse(sr.decode(n))}catch{throw new Error(Rr)}}const Nr=(e,r)=>Le("get",e,r),Zr=(e,r,t)=>Le("post",e,t,JSON.stringify(r)),dr={"content-type":"application/json"},Le=(e,r,t,n)=>fetch(r,{body:n,method:e,headers:{...dr,...t}}).then(o=>o.json().catch(()=>{})),Dr="v2.35.0",Tr=(e,r,t)=>({"primer-client-token":e,"primer-sdk-client":"WEB","primer-sdk-version":Dr,"primer-sdk-checkout-session-id":r,...t&&{"x-api-version":t}});async function fr(e,r,t){try{return await Nr(`${r}/?withDisplayMetadata=true`,Tr(e,t,"2.2"))}catch(n){throw new Error(["Failed to initialize client",JSON.stringify(n||void 0,void 0,2)].filter(Boolean).join(": "))}}const Pr=e=>document.head.appendChild(e),Cr=(e,r)=>{const t=document.createElement(e);return Object.entries(r).forEach(([n,o])=>t.setAttribute(n,o)),t},lr=(e,r)=>Pr(Cr(e,r)),Ie=(e,r,t)=>e.addEventListener(r,t),Sr=e=>document.querySelector(e),Ye="Can't load Primer SDK",Lr=`${Ye}'s Stylesheet`;function Ir(e){const r="script",t="src";return pe(r,t,e)&&window.__Primer?Promise.resolve():he(r,e,t,{async:"",crossorigin:"anonymous"},Ye)}function Yr(e){return Array.from(document.styleSheets).find(r=>r.href===e)?Promise.resolve():he("link",e,"href",{rel:"stylesheet"},Lr)}const he=(e,r,t,n,o)=>new Promise((i,N)=>{const c=pe(e,t,r)||lr(e,{...n,[t]:r});Ie(c,"load",()=>i()),Ie(c,"error",()=>{c?.remove(),N(new Error(o))})}),pe=(e,r,t)=>Sr(`${e}[${r}^="${t}"]`),hr="https://sdk.primer.io/web/v2.35.0/Checkout.css",pr="https://sdk.primer.io/web/v2.35.0/PrimerCoreSDK.min.js";let V;async function ge(){return V||(V=Promise.all([Mr(),gr()]).then(([e])=>e),V)}const gr=()=>Yr(hr),Mr=()=>Ir(pr).then(()=>{const e=window.__Primer;return delete window.__Primer,e}).catch(e=>{throw V=void 0,e}),vr="v2.35.0",Ur=j("createHeadless"),Br=j("showExpressCheckout"),br=j("showUniversalCheckout"),kr=j("showVaultManager"),Me="LOAD_PERFORMANCE",x=re();let b=B({checkoutSessionId:x});b.messageEvent({message:"parsed",messageType:Me,now:performance.now?.()});function j(e){return async(...[r,t,...n])=>{b.sdkFunctionEvent({name:e,params:[r,t,...n]}),b.messageEvent({message:"create",messageType:Me,now:performance.now?.()});const[o,i]=await Promise.all([Fr(r),ge()]);return i[e](o,x,r,t)}}async function Fr(e){const{accessToken:r,configurationUrl:t,analyticsUrlV2:n}=ar(e);b=B({checkoutSessionId:x,url:n});const o=`${t}/?withDisplayMetadata=true`,i=re(),N={method:"get",url:o};b.networkCallEvent(ne(i,N));const c=await fr(r,t,x),{primerAccountId:T}=c,{clientSessionId:Y}=c.clientSession;return b=B({checkoutSessionId:x,clientSessionId:Y,primerAccountId:T,url:n}),b.networkCallEvent(ne(i,N,{data:c})),c}const Hr=()=>ge().then(()=>{});var wr=(e=>(e.LOADING="Loading",e.THREE_DS="UniversalCheckout/3ds",e.CHOOSE_PAYMENT_METHOD="UniversalCheckout/Home",e.MANAGE_PAYMENT_METHODS="VaultManager/Home",e.DIRECT_DEBIT_FORM="DirectDebit/Form",e.DIRECT_DEBIT_MANDATE="DirectDebit/Mandate",e.CREDIT_CARD_FORM="CreditCard/Form",e.SUCCESS_PAYMENT_METHOD="UniversalCheckout/Success/PaymentMethod",e.SUCCESS_CHECK="UniversalCheckout/Success/Check",e))(wr||{}),Vr=(e=>(e.ROOT="primer-checkout",e.ROOT_CONTENT="primer-checkout-content",e.SUBMIT_BUTTON="primer-checkout-submit-button",e.THREE_DS_MODAL="primer-checkout-3ds-modal",e.VAULT="primer-checkout-vault",e.VAULT_INLINE="primer-checkout-vault-inline",e.NAVIGATE_PAYMENT_METHODS="primer-checkout-navigate-to-payment-methods",e.DIVIDER="primer-checkout-payment-method-divider",e.APM_BUTTONS="primer-checkout-apm-button-container",e.CARDHOLDER_NAME="primer-checkout-cardholder-name",e.CARDHOLDER_NAME_INPUT="primer-checkout-card-cardholder-name-input",e.ACTIONS="primer-checkout-actions",e.ACTIONS_MENU="primer-checkout-actions-menu",e.SAVE_PAYMENT_METHOD_CHECKBOX="primer-checkout-save-payment-method-input",e.SAVE_PAYMENT_METHOD_FIELD="primer-checkout-save-payment-method-field",e.SAVED_PAYMENT_METHODS_EMPTY="primer-checkout-saved-payment-methods-empty-text",e.CARD_FORM="primer-checkout-card-form",e.DD_SWITCH="primer-checkout-switch-dd-inputs",e.DD_IBAN_FIELD="primer-checkout-dd-iban-field",e.DD_LOCAL_FIELD="primer-checkout-dd-local-fields",e.DD_CUSTOMER_NAME_INPUT="primer-checkout-dd-customer-name-input",e.DD_CUSTOMER_EMAIL_INPUT="primer-checkout-dd-customer-email-input",e.DD_CUSTOMER_ADDRESS_LINE1="primer-checkout-dd-customer-address-input",e.DD_CUSTOMER_ADDRESS_LINE2="primer-checkout-dd-customer-address-line2-input",e.DD_CUSTOMER_ADDRESS_CITY="primer-checkout-dd-customer-city-input",e.DD_CUSTOMER_ADDRESS_POSTAL_CODE="primer-checkout-dd-customer-postal-code-input",e.DD_IBAN_INPUT="primer-checkout-dd-iban-input",e.DD_ACCOUNT_NUMBER_INPUT="primer-checkout-dd-account-number-input",e.DD_BANK_CODE_INPUT="primer-checkout-dd-bank-code-input",e.DD_BRANCH_CODE_INPUT="primer-checkout-dd-branch-code-input",e.DD_MANDATE_SMALL_PRINT="primer-checkout-small-print",e.ERROR_MESSAGE="primer-checkout-error-message",e))(Vr||{}),xr=(e=>(e.TOKEN="PrimerCheckout__token",e.HIDDEN="PrimerCheckout--hidden",e.FOCUSED="PrimerCheckout--focused",e.SELECTED="PrimerCheckout--selected",e.LOADING="PrimerCheckout--loading",e.ERROR="PrimerCheckout--error",e.CARD_TYPE="PrimerCheckout__cardType",e.SAVED_PAYMENT_METHOD="PrimerCheckout__savedPaymentMethod",e.SAVED_PAYMENT_METHOD_CONTAINER="PrimerCheckout__savedPaymentMethodContainer",e.APM_BUTTON="PrimerCheckout__apmButton",e.EDIT_BUTTON="PrimerCheckout__editButton",e.MENU="PrimerCheckout__dropDownMenu",e.MENU_ITEM="PrimerCheckout__dropDownMenuItem",e.PAYMENT_METHOD_MENU_ITEM="PrimerCheckout__paymentMethodDropDownMenuItem",e.DELETE_PAYMENT_METHOD_BUTTON="PrimerCheckout__paymentMethodDropDownMenuItem__deleteButton",e.ENTER="PrimerCheckout--enter",e.ENTERING="PrimerCheckout--entering",e.ENTERED="PrimerCheckout--entered",e.EXIT="PrimerCheckout--exit",e.EXITING="PrimerCheckout--exiting",e.EXITED="PrimerCheckout--exited",e))(xr||{}),ve=(e=>(e.CHECKOUT="CHECKOUT",e.EXPRESS_CHECKOUT="EXPRESS_CHECKOUT",e.HEADLESS_CHECKOUT="HEADLESS_CHECKOUT",e.MANAGE_PAYMENT_METHODS="MANAGE_PAYMENT_METHODS",e.SINGLE_PAYMENT_METHOD_CHECKOUT="SINGLE_PAYMENT_METHOD_CHECKOUT",e))(ve||{}),Ue=(e=>(e.DEFAULT="DEFAULT",e.PREFER_VAULT="PREFER_VAULT",e))(Ue||{}),Gr=(e=>(e.TOKENIZE_STARTED="tokenize-started",e.TOKENIZE_ERROR="tokenize-error",e.TOKENIZE_SUCCESS="tokenize-success",e.TOKENIZE_DID_NOT_START="tokenize-did-not-start",e))(Gr||{}),Be=(e=>(e.SUCCESS="AUTH_SUCCESS",e.FAILED="AUTH_FAILED",e.SKIPPED="SKIPPED",e.CHALLENGE="CHALLENGE",e))(Be||{}),be=(e=>(e.WORLDPAY_IDEAL="WORLDPAY_IDEAL",e.ADYEN_KLARNA="ADYEN_KLARNA",e.ADYEN_BANCONTACT_CARD="ADYEN_BANCONTACT_CARD",e.PAY_NL_KAARTDIRECT="PAY_NL_KAARTDIRECT",e.ADYEN_EPS="ADYEN_EPS",e.ADYEN_BANCONTACT_PAYCONIQ="ADYEN_BANCONTACT_PAYCONIQ",e.OMISE_PROMPTPAY="OMISE_PROMPTPAY",e.OMISE_TRUEMONEY="OMISE_TRUEMONEY",e.ADYEN_MULTIBANCO="ADYEN_MULTIBANCO",e.PACYPAY_WECHAT="PACYPAY_WECHAT",e.PACYPAY_ALIPAY="PACYPAY_ALIPAY",e.ADYEN_MBWAY="ADYEN_MBWAY",e.XENDIT_DANA="XENDIT_DANA",e.XENDIT_SHOPEEPAY="XENDIT_SHOPEEPAY",e.ADYEN_PAYSHOP="ADYEN_PAYSHOP",e.ADYEN_PAYTRAIL="ADYEN_PAYTRAIL",e.CLEARPAY="CLEARPAY",e.RAPYD_FAST="RAPYD_FAST",e.RAPYD_PROMPTPAY="RAPYD_PROMPTPAY",e.RAPYD_GCASH="RAPYD_GCASH",e.RAPYD_POLI="RAPYD_POLI",e.RAPYD_GRABPAY="RAPYD_GRABPAY",e.PRIMER_PAYPAL="PRIMER_PAYPAL",e.TWOC2P="TWOC2P",e.NETS="NETS",e.STRIPE_GIROPAY="STRIPE_GIROPAY",e.MOLLIE_GIROPAY="MOLLIE_GIROPAY",e.MOLLIE_EPS="MOLLIE_EPS",e.PAY_NL_EPS="PAY_NL_EPS",e.PAY_NL_P24="PAY_NL_P24",e.MOLLIE_P24="MOLLIE_P24",e.MOLLIE_SOFORT="MOLLIE_SOFORT",e.COINBASE="COINBASE",e.OPENNODE="OPENNODE",e.MOLLIE_GIFT_CARD="MOLLIE_GIFTCARD",e.XFERS_PAYNOW="XFERS_PAYNOW",e.CARD="PAYMENT_CARD",e.APPLE_PAY="APPLE_PAY",e.GOOGLE_PAY="GOOGLE_PAY",e.PAYPAL="PAYPAL_ORDER",e.PAYPAL_VAULTED="PAYPAL_BILLING_AGREEMENT",e.GO_CARDLESS="GOCARDLESS",e.PAY_NL_IDEAL="PAY_NL_IDEAL",e.PAY_NL_SOFORT_BANKING="PAY_NL_SOFORT_BANKING",e.PAY_NL_BANCONTACT="PAY_NL_BANCONTACT",e.PAY_NL_PAYPAL="PAY_NL_PAYPAL",e.PAY_NL_CREDIT_TRANSFER="PAY_NL_CREDIT_TRANSFER",e.PAY_NL_DIRECT_DEBIT="PAY_NL_DIRECT_DEBIT",e.PAY_NL_GIROPAY="PAY_NL_GIROPAY",e.PAY_NL_PAYCONIQ="PAY_NL_PAYCONIQ",e.HOOLAH="HOOLAH",e.ADYEN_BLIK="ADYEN_BLIK",e.ADYEN_VIPPS="ADYEN_VIPPS",e.ADYEN_GIROPAY="ADYEN_GIROPAY",e.ADYEN_SOFORT="ADYEN_SOFORT",e.ADYEN_TRUSTLY="ADYEN_TRUSTLY",e.ADYEN_ALIPAY="ADYEN_ALIPAY",e.ADYEN_TWINT="ADYEN_TWINT",e.ADYEN_MOBILEPAY="ADYEN_MOBILEPAY",e.MOLLIE_BANCONTACT="MOLLIE_BANCONTACT",e.MOLLIE_IDEAL="MOLLIE_IDEAL",e.BUCKAROO_GIROPAY="BUCKAROO_GIROPAY",e.BUCKAROO_EPS="BUCKAROO_EPS",e.BUCKAROO_SOFORT="BUCKAROO_SOFORT",e.BUCKAROO_BANCONTACT="BUCKAROO_BANCONTACT",e.BUCKAROO_IDEAL="BUCKAROO_IDEAL",e.ATOME="ATOME",e))(be||{}),q=(e=>(e.WORLDPAY_IDEAL="WORLDPAY_IDEAL",e.ADYEN_KLARNA="ADYEN_KLARNA",e.ADYEN_BANCONTACT_CARD="ADYEN_BANCONTACT_CARD",e.PAY_NL_KAARTDIRECT="PAY_NL_KAARTDIRECT",e.ADYEN_EPS="ADYEN_EPS",e.ADYEN_BANCONTACT_PAYCONIQ="ADYEN_BANCONTACT_PAYCONIQ",e.OMISE_PROMPTPAY="OMISE_PROMPTPAY",e.OMISE_TRUEMONEY="OMISE_TRUEMONEY",e.ADYEN_MULTIBANCO="ADYEN_MULTIBANCO",e.PACYPAY_WECHAT="PACYPAY_WECHAT",e.PACYPAY_ALIPAY="PACYPAY_ALIPAY",e.ADYEN_MBWAY="ADYEN_MBWAY",e.XENDIT_DANA="XENDIT_DANA",e.XENDIT_SHOPEEPAY="XENDIT_SHOPEEPAY",e.ADYEN_PAYSHOP="ADYEN_PAYSHOP",e.ADYEN_PAYTRAIL="ADYEN_PAYTRAIL",e.CLEARPAY="CLEARPAY",e.RAPYD_FAST="RAPYD_FAST",e.RAPYD_PROMPTPAY="RAPYD_PROMPTPAY",e.RAPYD_GCASH="RAPYD_GCASH",e.RAPYD_POLI="RAPYD_POLI",e.RAPYD_GRABPAY="RAPYD_GRABPAY",e.PRIMER_PAYPAL="PRIMER_PAYPAL",e.TWOC2P="TWOC2P",e.NETS="NETS",e.STRIPE_GIROPAY="STRIPE_GIROPAY",e.MOLLIE_GIROPAY="MOLLIE_GIROPAY",e.MOLLIE_EPS="MOLLIE_EPS",e.PAY_NL_EPS="PAY_NL_EPS",e.PAY_NL_P24="PAY_NL_P24",e.MOLLIE_P24="MOLLIE_P24",e.MOLLIE_SOFORT="MOLLIE_SOFORT",e.COINBASE="COINBASE",e.OPENNODE="OPENNODE",e.MOLLIE_GIFT_CARD="MOLLIE_GIFTCARD",e.XFERS_PAYNOW="XFERS_PAYNOW",e.PAYMENT_CARD="PAYMENT_CARD",e.APPLE_PAY="APPLE_PAY",e.GOOGLE_PAY="GOOGLE_PAY",e.PAYPAL="PAYPAL",e.GO_CARDLESS="GOCARDLESS",e.KLARNA="KLARNA",e.PAY_NL_IDEAL="PAY_NL_IDEAL",e.PAY_NL_SOFORT_BANKING="PAY_NL_SOFORT_BANKING",e.PAY_NL_BANCONTACT="PAY_NL_BANCONTACT",e.PAY_NL_PAYPAL="PAY_NL_PAYPAL",e.PAY_NL_CREDIT_TRANSFER="PAY_NL_CREDIT_TRANSFER",e.PAY_NL_DIRECT_DEBIT="PAY_NL_DIRECT_DEBIT",e.PAY_NL_GIROPAY="PAY_NL_GIROPAY",e.PAY_NL_PAYCONIQ="PAY_NL_PAYCONIQ",e.HOOLAH="HOOLAH",e.ADYEN_BLIK="ADYEN_BLIK",e.ADYEN_MOBILEPAY="ADYEN_MOBILEPAY",e.ADYEN_VIPPS="ADYEN_VIPPS",e.ADYEN_GIROPAY="ADYEN_GIROPAY",e.ADYEN_SOFORT="ADYEN_SOFORT",e.ADYEN_TRUSTLY="ADYEN_TRUSTLY",e.ADYEN_ALIPAY="ADYEN_ALIPAY",e.ADYEN_TWINT="ADYEN_TWINT",e.ADYEN_BANK_TRANSFER="ADYEN_BANK_TRANSFER",e.MOLLIE_BANCONTACT="MOLLIE_BANCONTACT",e.MOLLIE_IDEAL="MOLLIE_IDEAL",e.BUCKAROO_GIROPAY="BUCKAROO_GIROPAY",e.BUCKAROO_EPS="BUCKAROO_EPS",e.BUCKAROO_SOFORT="BUCKAROO_SOFORT",e.BUCKAROO_BANCONTACT="BUCKAROO_BANCONTACT",e.BUCKAROO_IDEAL="BUCKAROO_IDEAL",e.ATOME="ATOME",e))(q||{}),mr=(e=>(e.PAYMENT_CARD="PAYMENT_CARD",e.ADYEN_BANCONTACT_CARD="ADYEN_BANCONTACT_CARD",e))(mr||{}),ke=(e=>(e.SINGLE_USE="SINGLE_USE",e.MULTI_USE="MULTI_USE",e))(ke||{});const Fe={PAYPAL_BILLING_AGREEMENT:"PAYPAL"},Jr=e=>{if(Object.values(q).includes(e))return e;if(Fe[e])return Fe[e]};var He=(e=>(e.INITIALIZATION_ERROR="INITIALIZATION_ERROR",e.NO_PAYMENT_METHODS="NO_PAYMENT_METHODS",e.PRIMER_TEARDOWN="PRIMER_TEARDOWN",e.PRIMER_SERVER_ERROR="PRIMER_SERVER_ERROR",e.THREE_DS_SETUP_ERROR="THREE_DS_SETUP_ERROR",e.THREE_DS_AUTH_FAILED="THREE_DS_AUTH_FAILED",e.THREE_DS_NEGOTIATION_ERROR="THREE_DS_NEGOTIATION_ERROR",e.TOKENIZATION_ERROR="TOKENIZATION_ERROR",e.DUPLICATE_PAYMENT_METHOD_ERROR="DUPLICATE_PAYMENT_METHOD_ERROR",e.CARD_NUMBER_ERROR="CARD_NUMBER_ERROR",e.PAYMENT_METHOD_NOT_SETUP="PAYMENT_METHOD_NOT_SETUP",e.PAYMENT_METHOD_NOT_PROVIDED="PAYMENT_METHOD_NOT_PROVIDED",e.PAYMENT_METHOD_NOT_COMPATIBLE="PAYMENT_METHOD_NOT_COMPATIBLE",e.RESUME_ERROR="RESUME_ERROR",e.TAX_ERROR="TAX_ERROR",e.VALIDATION_ERROR="VALIDATION_ERROR",e.PAYMENT_FAILED="PAYMENT_FAILED",e.PAYMENT_CREATION_ABORTED="PAYMENT_CREATION_ABORTED",e.PAYMENT_CREATION_DISABLED="PAYMENT_CREATION_DISABLED",e.CLIENT_SESSION_UPDATE_ERROR="CLIENT_SESSION_UPDATE_ERROR",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.VAULT_FETCH="VAULT_FETCH",e.VAULT_DELETE="VAULT_DELETE",e.HEADLESS_VAULT_MANAGER_VALIDATION="HEADLESS_VAULT_MANAGER_VALIDATION",e.CARD_FORM_VALIDATION_UNEXPECTED_FIELD="CARD_FORM_VALIDATION_UNEXPECTED_FIELD",e))(He||{});class we extends Error{constructor(r,t,n){super(t.message),this.message=t.message,this.code=r,this.diagnosticsId=t.diagnosticsId||null,this.data=t.data,this.isFromDeveloper=t.isFromDeveloper??!1,n?.messageEvent?.({message:t.message,messageType:r,severity:"ERROR",...t.diagnosticsId&&{diagnosticsId:t.diagnosticsId},...t.errorId&&{errorId:t.errorId},...t.data&&{data:t.data},...t.isFromDeveloper!==void 0&&{isFromDeveloper:String(t.isFromDeveloper)},stack:this.stack})}static fromErrorCode(r,t,n){return new we(r,t,n)}}const qr=e=>{throw console.error(e.message),e};var Kr=f(473),yr=f(453);const Wr={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uFF10":"0","\uFF11":"1","\uFF12":"2","\uFF13":"3","\uFF14":"4","\uFF15":"5","\uFF16":"6","\uFF17":"7","\uFF18":"8","\uFF19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9"};function et(e,r){return Wr[e]}const rt={error:null,errorCode:null,valid:!1,active:!1,dirty:!1,touched:!1,submitted:!1},Ve=new Set(["change","blur","focus"]);async function tt({container:e,placement:r="append",properties:t,allowedCharactersMap:n,...o},i){let N,c={...defaultFieldMetadata};const T={},Y=await new Promise(d=>{const L=i.iframes.create({container:e,filename:"secure-input.html",meta:o,onReady:()=>d(L),placement:r,payload:{allowedCharactersMap:JSON.stringify(n),properties:t}})});return window.addEventListener("message",({data:d})=>{switch(d.type){case"metadata":c=d.metadata;break;case"change":c=d.metadata,N=d.valueToken,T.change?.forEach(L=>L(N,c));break;case"blur":T.blur?.forEach(L=>L());break;case"focus":T.focus?.forEach(L=>L());break;default:break}}),{frame:Y,get metadata(){return c},name:o.name,get valueToken(){return N},remove(){Y?.remove(),Object.values(T).forEach(d=>d.clear())},addListener(d,L){if(Ve.has(d))return T[d]||(T[d]=new Set),T[d].add(L),()=>this.removeListener(d,L);console.error(`Event not supported: supported events are ${[...Ve].join(", ")}`)},addEventListener(d,L){return this.addListener(d,L)},removeListener(d,L){T[d].delete(L)},blur(){z("blur")},focus(){z("focus")}};function z(d){Y?.contentWindow?.postMessage(d,"*")}}async function nt({cardNetwork:e,...r},t){const n=`cvv-${r.name}`,o=jr(e||""),i=getTypeInfo(o),N=!e&&"`cardNetwork` was not provided"||!i&&"could not get the code size from the provided `cardNetwork`";if(N){const Y=`CvvInput: ${N}. Defaulting validation to minLength 3 and maxLength 4.`;t.analytics.messageEvent({messageType:"CARD_SECURITY_CODE_INPUT_VALIDATION",message:Y,severity:"WARN"}),console.warn(Y)}const{size:c}=i?.code??{},T={...r.properties,maxLength:c||4,minLength:c||3};return createSecureInput({...r,name:n,properties:T,allowedCharactersMap:DIGITS},t)}function jr(e){const r=toKebabCase(e);switch(r){case"union-pay":return"unionpay";default:return r}}var xe=(e=>(e.PAYMENT_METHOD="PAYMENT_METHOD",e.CHECK="CHECK",e))(xe||{}),Ge=(e=>(e.CHANGE="change",e.ERROR="error",e.FOCUS="focus",e.BLUR="blur",e.CLICK="click",e.CLOSE="close",e))(Ge||{}),me=(e=>(e.CARD="CARD",e.NATIVE="NATIVE",e.REDIRECT="REDIRECT",e))(me||{});const zr={SDK_VERSION:vr,createHeadless:Ur,showExpressCheckout:Br,showUniversalCheckout:br,showVaultManager:kr}}(),X}()});
package/dist/index.d.ts CHANGED
@@ -570,98 +570,6 @@ declare class ScriptLoader {
570
570
  customAttributes?: Record<string, string>;
571
571
  }): Promise<boolean>;
572
572
  }
573
- export interface PackageDeclaration {
574
- type: string;
575
- version: string;
576
- name: string;
577
- entryPoints: Record<string, string>;
578
- getScenePath?: (sceneId: string) => string | null;
579
- PaymentMethod?: new (...args: unknown[]) => void;
580
- }
581
- export interface BaseModule {
582
- default: unknown;
583
- }
584
- declare enum ModuleStatus {
585
- UNINITIALIZED = 0,
586
- LOADING = 1,
587
- READY = 2,
588
- ERROR = 3
589
- }
590
- export interface ModuleKey {
591
- entryPoint: string;
592
- scope: string;
593
- path: string;
594
- }
595
- export interface ModuleKeyDescriptor {
596
- remotePath: string;
597
- entryFile?: string;
598
- scope: string;
599
- path: string;
600
- }
601
- export interface PackageKey {
602
- remotePath: string;
603
- entryFile?: string;
604
- scope: string;
605
- }
606
- export interface ModuleLoadCallback {
607
- (moduleDescriptor: ModuleDescriptor): void;
608
- }
609
- export interface ModuleDescriptor {
610
- key: ModuleKey;
611
- status: ModuleStatus;
612
- callbacks: Array<ModuleLoadCallback>;
613
- module: BaseModule | null;
614
- }
615
- export interface IModuleLoader {
616
- loadModule(key: ModuleKey): Promise<ModuleDescriptor>;
617
- }
618
- export interface IModule {
619
- import(exportName?: string): Promise<unknown>;
620
- }
621
- export interface IPackage {
622
- key: PackageKey;
623
- getDeclaration(): Promise<PackageDeclaration>;
624
- getModule(string: any): IModule;
625
- }
626
- export interface IModuleFactory {
627
- getPackage(packageKey: PackageKey): IPackage;
628
- getModule(keyDescriptor: ModuleKeyDescriptor): IModule;
629
- }
630
- export interface ModuleOptions {
631
- key: ModuleKey;
632
- moduleLoader: IModuleLoader;
633
- }
634
- declare class Module implements IModule {
635
- readonly key: ModuleKey;
636
- readonly status: ModuleStatus;
637
- private moduleLoader;
638
- constructor({ key, moduleLoader }: ModuleOptions);
639
- import(exportName?: string): Promise<unknown>;
640
- }
641
- export type Props = {
642
- moduleFactory: IModuleFactory;
643
- key: PackageKey;
644
- };
645
- declare class Package implements IPackage {
646
- readonly key: PackageKey;
647
- private moduleFactory;
648
- private declarationModule;
649
- private declarationPromise;
650
- constructor({ moduleFactory, key }: Props);
651
- getDeclaration(): Promise<PackageDeclaration>;
652
- getModule(path: string): IModule;
653
- }
654
- declare class ModuleFactory implements IModuleFactory {
655
- private moduleLoader;
656
- private modules;
657
- private packages;
658
- constructor(scriptLoader: ScriptLoader);
659
- getPackages(): Package[];
660
- getModule(keyDescriptor: ModuleKeyDescriptor): Module;
661
- getPackage(key: PackageKey): any;
662
- private findModule;
663
- private findPackage;
664
- }
665
573
  declare enum ImplementationType {
666
574
  WEB_REDIRECT = "WEB_REDIRECT",
667
575
  NATIVE_SDK = "NATIVE_SDK"
@@ -850,6 +758,7 @@ export interface ClientConfiguration {
850
758
  paymentMethods: PaymentMethodConfig[];
851
759
  pciUrl: string;
852
760
  primerAccountId: string;
761
+ settleOnAuth?: boolean;
853
762
  }
854
763
  declare enum ClientTokenIntent {
855
764
  CHECKOUT = "CHECKOUT",
@@ -1191,6 +1100,31 @@ declare class CheckoutStore extends BaseStore<ICheckoutState> implements IOption
1191
1100
  getPaymentMethods(): Record<string, BasePaymentMethod>;
1192
1101
  hasVaultedToken(token: PaymentMethodToken): boolean;
1193
1102
  }
1103
+ export interface PackageDeclaration {
1104
+ getModuleIdFromSceneId?: (sceneId: string) => string | null;
1105
+ modules: {
1106
+ PaymentMethod?: new (...args: unknown[]) => void;
1107
+ } & Record<string, () => Promise<any>>;
1108
+ }
1109
+ export type ModuleKey = {
1110
+ moduleId: string;
1111
+ packageId: string;
1112
+ };
1113
+ export type Module = {
1114
+ id: string;
1115
+ packageId: string;
1116
+ import(exportName?: string): Promise<unknown>;
1117
+ };
1118
+ export type Package = {
1119
+ id: string;
1120
+ getDeclaration(): Promise<PackageDeclaration>;
1121
+ getModule(string: any): Module;
1122
+ };
1123
+ export type ModuleFactory = {
1124
+ getPackages(): Array<Package>;
1125
+ getPackage(id: string): Package;
1126
+ getModule(moduleKey: ModuleKey): Module;
1127
+ };
1194
1128
  export interface ClientContext {
1195
1129
  clientTokenHandler: IClientTokenHandler;
1196
1130
  clientConfigurationHandler: ClientConfigurationHandler;
@@ -1292,7 +1226,7 @@ export declare enum ErrorCode {
1292
1226
  DUPLICATE_PAYMENT_METHOD_ERROR = "DUPLICATE_PAYMENT_METHOD_ERROR",
1293
1227
  CARD_NUMBER_ERROR = "CARD_NUMBER_ERROR",
1294
1228
  PAYMENT_METHOD_NOT_SETUP = "PAYMENT_METHOD_NOT_SETUP",
1295
- PAYMENT_METHOD_NOT_PROVIDED = "PAYMENT_METHOD_NOT_SETUP",
1229
+ PAYMENT_METHOD_NOT_PROVIDED = "PAYMENT_METHOD_NOT_PROVIDED",
1296
1230
  PAYMENT_METHOD_NOT_COMPATIBLE = "PAYMENT_METHOD_NOT_COMPATIBLE",
1297
1231
  RESUME_ERROR = "RESUME_ERROR",
1298
1232
  TAX_ERROR = "TAX_ERROR",
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@primer-io/checkout-web",
3
- "version": "2.33.4",
3
+ "version": "2.35.0",
4
4
  "description": "Primer.js for the web",
5
- "author": "Will Knowles <will@primerapi.com>",
5
+ "author": "Primer Developers <developers@primer.io>",
6
6
  "homepage": "",
7
7
  "license": "MIT",
8
8
  "main": "dist/Primer.js",
@@ -22,10 +22,9 @@
22
22
  "postpublish": "clean-package restore",
23
23
  "prepublishOnly": "clean-package",
24
24
  "preview-s3": "./script/preview",
25
- "publish-s3": "yarn build && ./script/publish-s3",
25
+ "publish-s3": "./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
- },
30
- "gitHead": "63b5c4e31d3bc1092a351c268b4beb2ab5126595"
29
+ }
31
30
  }
package/CHANGELOG.md DELETED
@@ -1,479 +0,0 @@
1
- # @primer-io/checkout-web
2
-
3
- ## 2.33.4
4
-
5
- ### Patch Changes
6
-
7
- - 05ce1c87: fix autofill not setting the card fields values correctly
8
-
9
- ## 2.33.3
10
-
11
- ### Patch Changes
12
-
13
- - efbea24c: fix Klarna's shipping fees and calculation for tax rates
14
- - 8fedc91b: fix server side rendering
15
- - 1a78f858: Improve usage analytics
16
-
17
- ## 2.33.2
18
-
19
- ### Patch Changes
20
-
21
- - fdb38388: Fix `allowedCardNetworks` option
22
-
23
- ## 2.33.1
24
-
25
- ### Patch Changes
26
-
27
- - efeadbdf: analytics performance optimisation
28
- - 28a15e16: Remove retry mechanism on API calls
29
-
30
- ## 2.33.0
31
-
32
- ### Minor Changes
33
-
34
- - 050f5b68: Add `addEventListener` alias to `CVVInput`, fix events not being fired
35
-
36
- ## 2.32.7
37
-
38
- ### Patch Changes
39
-
40
- - aa47e939: update support section of the readme
41
-
42
- ## 2.32.6
43
-
44
- ### Patch Changes
45
-
46
- - b90e4c21: Klarna button now better adheres to guidelines
47
-
48
- ## 2.32.5
49
-
50
- ### Patch Changes
51
-
52
- - 0125c1db: remove reference to Cardinal 3DS
53
- - 0125c1db: activate 3ds when cards are not configured
54
-
55
- ## 2.32.4
56
-
57
- ### Patch Changes
58
-
59
- - 6f667221: fix 3DS not appearing properly
60
- - 76dfc3cc: trigger the `PAYMENT_METHOD_SELECTED` action of vaulted payment methods regardless of surcharge
61
-
62
- ## 2.32.3
63
-
64
- ### Patch Changes
65
-
66
- - 338efa42: fix npm publish
67
-
68
- ## 2.32.2
69
-
70
- ### Patch Changes
71
-
72
- - c4f73a1c: fix gitlab release
73
-
74
- ## 2.32.1
75
-
76
- ### Patch Changes
77
-
78
- - 607489b2: fix 3ds window size
79
- - d0be0ae8: Fix onResumeSuccess called with undefined when forceRedirect is used
80
- - 0658d875: Fix initial error state of `CvvInput`
81
-
82
- ## 2.32.0
83
-
84
- ### Minor Changes
85
-
86
- - 74d5261a: Add `HeadlessVaultManager` which can be instantiated from `PrimerHeadlessCheckout.createVaultManager()`
87
- - 74d5261a: headless: added ability to recapture Card Security Code (CVV) for vaulted payment methods
88
-
89
- ## 2.31.1
90
-
91
- ### Patch Changes
92
-
93
- - 41f65031: Allow PayPal button to take the full width
94
- - 927ca586: fix a regression that prevented onCheckoutFail to return the payment object when available
95
-
96
- ## 2.31.0
97
-
98
- ### Minor Changes
99
-
100
- - fbcca177: validates cardholder name so that only Latin characters are allowed
101
-
102
- ### Patch Changes
103
-
104
- - cfd3cca2: Fix an issue when closing Adyen Klarna's redirect popup window
105
- - b2334b2f: Update translations
106
- - fad18393: Update translations
107
-
108
- ## 2.30.1
109
-
110
- ### Patch Changes
111
-
112
- - f132abe6: Add select payment method action for Klarna
113
-
114
- ## 2.30.0
115
-
116
- ### Minor Changes
117
-
118
- - daa399a6: fallback to redirect if popup is not supported
119
-
120
- ### Patch Changes
121
-
122
- - Updated dependencies [daa399a6]
123
- - @primer-io/shared-library@2.7.0
124
-
125
- ## 2.29.0
126
-
127
- ### Minor Changes
128
-
129
- - a6450575: Update english translations
130
- - d3161952: Fix a bug where the submit button was disabled when moving to another screen and coming back to the checkout home, while any vaulted payment method was present.
131
-
132
- ### Patch Changes
133
-
134
- - 58a5d981: enable apple pay button to work within a form tag
135
-
136
- ## 2.28.1
137
-
138
- ### Patch Changes
139
-
140
- - c1842365: Do not hide surcharge labels when `inputLabelsVisible` is false
141
- - 57eaa67e: call onCheckoutFail when the payment ends up in an inconsistent state
142
-
143
- ## 2.28.0
144
-
145
- ### Minor Changes
146
-
147
- - 8593b22b: Add checkout session id to the headers of all API calls to improve visibility
148
-
149
- ### Patch Changes
150
-
151
- - 6a573949: fix universal checkout race condition
152
- - 01f7374a: fix server side rendering compatibility
153
- - b9cbb004: fix request body parsing
154
- - 3bf70ddb: fix an issue causing screens to be displayed again even if they are already displayed
155
-
156
- ## 2.27.2
157
-
158
- ### Patch Changes
159
-
160
- - 1f7c3e0b: remove race condition between FormField and ApiController
161
- - 881d73e6: fix surcharge for amex and diners club
162
- - 50bc6933: fix typescript definitions of the the main SDK functions
163
-
164
- ## 2.27.1
165
-
166
- ### Patch Changes
167
-
168
- - bdcef834: fix a bug that prevents the card surcharge to be updated
169
-
170
- ## 2.27.0
171
-
172
- ### Minor Changes
173
-
174
- - e7a35b49: Add `googlePay.captureBillingAddress` option
175
-
176
- ### Patch Changes
177
-
178
- - 93836575: fixes token encoding
179
- - 58981199: add error handling to client configuration fetching
180
-
181
- ## 2.26.1
182
-
183
- ### Patch Changes
184
-
185
- - 605b02a9: added clientToken error handling
186
- - 6f386f74: Update translation on Thai, Chinese Hong-Kong and Chinese Taiwan
187
-
188
- ## 2.26.0
189
-
190
- ### Minor Changes
191
-
192
- - 9f93bdd2: Add Chinese, Thai and Malay
193
- - 89437b95: Update klarna session when the order details change
194
-
195
- ### Patch Changes
196
-
197
- - 0d2709eb: fix webpack integration
198
- - ee4d8418: fix some Headless callback functions not returning proper arrays
199
-
200
- ## 2.25.1
201
-
202
- ### Patch Changes
203
-
204
- - 75500976: fix Primer types
205
-
206
- ## 2.25.0
207
-
208
- ### Minor Changes
209
-
210
- - 6de8580f: add loader analytics
211
- - aa9c8954: Fix some payment method buttons height
212
-
213
- ### Patch Changes
214
-
215
- - 40eaa4d1: call API at /configuration as early as possible, in parallel with fetching the rest of the SDK's JS
216
- - 5c38d4fe: Add Analytics for Network and SDK function calls
217
-
218
- ## 2.24.0
219
-
220
- ### Minor Changes
221
-
222
- - 609748a6: add support for processor 3DS in headless checkout
223
-
224
- ## 2.23.0
225
-
226
- ### Minor Changes
227
-
228
- - dfcffccb: Accept more GooglePay button types
229
-
230
- ### Patch Changes
231
-
232
- - ec75d94f: fix sub-unit for currencies: CRC, COP, HUF
233
- - dfcffccb: Fix an issue with the background, height and width of Google Pay
234
- - cc6558db: statically imports payment method implementations rather than via webpack module federation for faster load times in low-latency scenarios
235
- - Updated dependencies [dfcffccb]
236
- - @primer-io/shared-library@2.6.4
237
-
238
- ## 2.22.0
239
-
240
- ### Minor Changes
241
-
242
- - 20dcc0e7: Add Ideal via Worldpay payment method
243
-
244
- ## 2.21.0
245
-
246
- ### Minor Changes
247
-
248
- - 7f0df286: Add headless checkout implementation for Redirect payment methods
249
-
250
- ### Patch Changes
251
-
252
- - d118395e: Patch to bump to 2.20.1
253
- - 440b23c0: Add url_safe param into base64 string for 3DS flow
254
- - Updated dependencies [7f0df286]
255
- - @primer-io/shared-library@2.6.3
256
-
257
- ## 2.20.0
258
-
259
- ### Minor Changes
260
-
261
- - f37afcc7: Update translations
262
- - 85577a8f: Add Express Checkout implementation with ApplePay and PayPal
263
-
264
- ## 2.19.1
265
-
266
- ### Patch Changes
267
-
268
- - c0da4e9c: Remove empty state field returned from ApplePay when setting billing address
269
-
270
- ## 2.19.0
271
-
272
- ### Minor Changes
273
-
274
- - 55979739: Add `onPaymentCreationStart` callback
275
-
276
- ### Patch Changes
277
-
278
- - 56d51cc2: Fix headless iframe events not being fired
279
-
280
- ## 2.18.0
281
-
282
- ### Minor Changes
283
-
284
- - 8b9a0cb0: Add headless checkout implementation for ApplePay, GooglePay and PayPal
285
-
286
- ### Patch Changes
287
-
288
- - Updated dependencies [8b9a0cb0]
289
- - @primer-io/shared-library@2.6.2
290
-
291
- ## 2.17.1
292
-
293
- ### Patch Changes
294
-
295
- - b4a2e6a8: Point analytics to new analyticsUrl. Deprecate use of Mixpanel.
296
- - 7053b4c8: Add new analytics provider
297
- - 9b56f94a: Address issue where cardholder name was not being tokenized in the vault manager
298
- - a0754760: Fix `onPaymentMethodAction` not being fired
299
- - Updated dependencies [7053b4c8]
300
- - @primer-io/shared-library@2.6.1
301
-
302
- ## 2.17.0
303
-
304
- ### Minor Changes
305
-
306
- - c3ea72cf: Add Klarna via Adyen payment method, add payment type selector shared component
307
-
308
- ### Patch Changes
309
-
310
- - 9112f7e3: Fix card network detection bug
311
- - 1d523a75: Proceed with tokenization call even if request body is empty. Results in failed tokenization request which will fail gracefully
312
- - Updated dependencies [c3ea72cf]
313
- - @primer-io/shared-library@2.6.0
314
-
315
- ## 2.16.1
316
-
317
- ### Patch Changes
318
-
319
- - 289ab86f: Hardcode webpack publicPath
320
-
321
- ## 2.16.0
322
-
323
- ### Minor Changes
324
-
325
- - 26e9f9a7: Add Headless Universal Checkout
326
- - c85821d2: Add Bancontact Card via Adyen
327
-
328
- ## 2.15.0
329
-
330
- ### Minor Changes
331
-
332
- - 3ea62aa4: Add Bancontact Card via Adyen
333
-
334
- ## 2.14.0
335
-
336
- ### Minor Changes
337
-
338
- - 2670a28a: Add Kaartdirect via Pay.nl payment method
339
-
340
- ## 2.13.2
341
-
342
- ### Patch Changes
343
-
344
- - ec9eaa0f: Fix submit button being disabled when no APMs are loaded
345
-
346
- ## 2.13.1
347
-
348
- ### Patch Changes
349
-
350
- - 2819cc99: Call onErrorMessageShow when error message is disabled
351
-
352
- ## 2.13.0
353
-
354
- ### Minor Changes
355
-
356
- - f0565f60: Add the ability to disable autofocus
357
- - b66fe615: Add Eps via Adyen payment method
358
-
359
- ### Patch Changes
360
-
361
- - 9463a2e0: Add support of `onErrorMessageShow` and `onErrorMessageHide` triggers
362
-
363
- ## 2.12.0
364
-
365
- ### Minor Changes
366
-
367
- - 6e481830: Implement backend driven payment methods
368
-
369
- ### Patch Changes
370
-
371
- - cee39220: Update naming of Afterpay to no longer display "Clearpay" in the overlay dialog and loading page
372
- - 5520c87d: Move PayPal instance into isolated namespace. Solves issue where multiple instances of PayPal is running within the window. The PayPal button now renders even if merchant application is running a separate instance.
373
- - Updated dependencies [6e481830]
374
- - @primer-io/shared-library@2.5.0
375
-
376
- ## 2.11.0
377
-
378
- ### Minor Changes
379
-
380
- - 6818d767: Deprecate `setClientToken(clientToken)` in favour of `refreshClientSession()` which uses the original client token provided in checkout initialization.
381
- - ae072467: Add ability to capture billing address with ApplePay using the `captureBillingAddress` option
382
-
383
- ### Patch Changes
384
-
385
- - d914c002: Fix client session action failing due to card network type being american-express and not AMEX.
386
-
387
- ## 2.10.1
388
-
389
- ### Patch Changes
390
-
391
- - 99062c7f: Pass discount amount in Klarna authorization request
392
-
393
- ## 2.10.0
394
-
395
- ### Minor Changes
396
-
397
- - f84cc022: Update Klarna integration to support tax passed in line items
398
-
399
- ### Patch Changes
400
-
401
- - 29daa38e: Update formatAmount to use currencyDisplay of type 'symbol' for better browser compatibility
402
-
403
- ## 2.9.1
404
-
405
- ### Patch Changes
406
-
407
- - a84d6696: Add support for additional country codes, locales and currencies for Klarna
408
-
409
- ## 2.9.0
410
-
411
- ### Minor Changes
412
-
413
- - 1d1a8f7a: Client Context Refactoring
414
-
415
- ### Patch Changes
416
-
417
- - 4fc6f465: Address isTeardown not being set due to it being a readonly property
418
- - 0757b944: Revert url-join dependency to 4.0.1 from 5.0.0
419
- - 630fdd72: Map state correctly in Klarna session and authorization requests
420
- - Updated dependencies [1d1a8f7a]
421
- - @primer-io/shared-library@2.4.0
422
-
423
- ## 2.8.1
424
-
425
- ### Patch Changes
426
-
427
- - 4af6242a: Add browser information to session info
428
- - Updated dependencies [4af6242a]
429
- - @primer-io/shared-library@2.3.1
430
-
431
- ## 2.8.0
432
-
433
- ### Minor Changes
434
-
435
- - 4bb42d0: Add Bancontact - Payconiq via Adyen
436
-
437
- ### Patch Changes
438
-
439
- - Updated dependencies [4bb42d0]
440
- - @primer-io/shared-library@2.3.0
441
-
442
- ### Minor Changes
443
-
444
- - 1fe460d4: Add PromptPay via Omise, update PromptPay logos
445
- - 524575d4: Add Truemoney via Omise
446
-
447
- ## 2.7.0
448
-
449
- ### Minor Changes
450
-
451
- - b1975e6e: Add onPaymentMethodAction callback
452
- - 07047236: Add Alipay via PacyPay
453
- - c6cf9096: Add Clearpay
454
- - e1b0dc6f: Add WeChat via PacyPay
455
- - 09c9974c: Add multibanco payment method
456
-
457
- ### Patch Changes
458
-
459
- - Updated dependencies [b1975e6e]
460
- - @primer-io/shared-library@2.2.0
461
-
462
- ## 2.6.0
463
-
464
- ### Minor Changes
465
-
466
- - 46da6ede: Add MBWAY via Adyen
467
-
468
- ## 2.5.0
469
-
470
- ### Minor Changes
471
-
472
- - e8ed6b65: Add Paytrail via Adyen
473
- - a1d4411f: Improve autofocus for hosted fields
474
- - c999d6a7: Add Payshop via Adyen
475
-
476
- ### Patch Changes
477
-
478
- - 78732c3b: Improve error handling when user don't have payment methods
479
- - 1f87f7af: By [Ruan Smit](https://github.com/RockPaperSmittie) **Remove dialect from translations which don't require it** - Latvian should now work when passed as `lt` or `lt-LT`.