New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gr4vy/embed

Package Overview
Dependencies
Maintainers
0
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gr4vy/embed - npm Package Compare versions

Comparing version 2.32.0 to 2.33.0

12

CHANGELOG.md

@@ -0,1 +1,13 @@

# v2.33.0 (Wed Jan 15 2025)
#### 🚀 Enhancement
- chore: update buyer validations [#269](https://github.com/gr4vy/gr4vy-embed/pull/269) ([@gryevns](https://github.com/gryevns))
#### Authors: 1
- Gary Evans ([@gryevns](https://github.com/gryevns))
---
# v2.32.0 (Mon Dec 02 2024)

@@ -2,0 +14,0 @@

2

lib/index.js
/*! For license information please see index.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.gr4vy=t():e.gr4vy=t()}(this,(()=>(()=>{"use strict";var e={827:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(758),o=n.n(r),a=n(935),i=n.n(a)()(o());i.push([e.id,".gr4vy__overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 100vh;\n z-index: 100;\n transition: background-color 0.2s linear, max-height 0s linear;\n background: rgba(0, 0, 0, 0.8);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.gr4vy__overlay--visible {\n -webkit-backdrop-filter: blur(2px);\n backdrop-filter: blur(2px);\n}\n\n.gr4vy__overlay__container {\n color: white;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,\n Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n font-size: 1rem;\n text-align: center;\n font-weight: bold;\n}\n\n.gr4vy__overlay__container > * + * {\n margin-top: 32px;\n}\n\n.gr4vy__overlay__notice > * + * {\n margin-top: 8px;\n}\n\n.gr4vy__overlay--hidden {\n max-height: 0;\n backdrop-filter: unset;\n background-color: rgba(0, 0, 0, 0);\n transition: background-color 0.2s linear, max-height 0s linear;\n transition-delay: 0s, 0.2s;\n overflow: hidden;\n}\n\n.gr4vy__overlay__link {\n font-weight: normal;\n text-decoration: underline;\n font-weight: normal;\n color: white;\n display: block;\n cursor: pointer;\n}\n\n.gr4vy__frame {\n height: 100vh;\n width: 100vw;\n}\n\n@media screen and (min-width: 500px) and (min-height: 350px) {\n .gr4vy__frame {\n height: 250px;\n width: 400px;\n }\n}\n\n@media screen and (min-width: 500px) and (min-height: 490px) {\n .gr4vy__frame {\n height: 390px;\n width: 400px;\n }\n}\n\n@media screen and (min-width: 700px) and (min-height: 500px) {\n .gr4vy__frame {\n height: 400px;\n width: 600px;\n }\n}\n\n@media screen and (min-width: 700px) and (min-height: 600px) {\n .gr4vy__frame {\n height: 500px;\n width: 600px;\n }\n}\n",""]);const u=i},35:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(758),o=n.n(r),a=n(935),i=n.n(a)()(o());i.push([e.id,"@keyframes gr4vy-sweep {\n 0% {\n background-position: 0 0;\n }\n 100% {\n background-position: 600px 0;\n }\n}\n\n.gr4vy__skeleton {\n display: flex;\n border-bottom: var(--gr4vy-borderWidths-container, 1px) solid\n var(--gr4vy-colors-containerBorder, #f2f2f2);\n padding: 16px;\n}\n\n.gr4vy__skeleton:last-child {\n border-bottom: none;\n}\n\n.gr4vy__skeleton__radio {\n border-radius: 50%;\n height: 16px;\n width: 16px;\n margin-bottom: 4px;\n margin-top: 4px;\n background-color: var(--gr4vy-colors-containerBorder, #f2f2f2);\n}\n\n.gr4vy__skeleton__block {\n flex-grow: 1;\n height: 16px;\n background-image: linear-gradient(\n 90deg,\n var(--gr4vy-colors-containerBorder, #f2f2f2) 30%,\n var(--gr4vy-colors-containerBackground, #ffffff) 50%,\n var(--gr4vy-colors-containerBorder, #f2f2f2) 70%\n );\n background-size: 600px;\n margin-bottom: 4px;\n margin-top: 4px;\n margin-left: 16px;\n border-radius: var(--gr4vy-radii-input, 0);\n -webkit-animation: gr4vy-sweep 1s infinite cubic-bezier(0.2, 0.75, 0.77, 0.25);\n animation: gr4vy-sweep 1s infinite cubic-bezier(0.2, 0.75, 0.77, 0.25);\n}\n.gr4vy__container {\n border: var(--gr4vy-borderWidths-container, 1px) solid\n var(--gr4vy-colors-containerBorder, #f2f2f2);\n border-radius: var(--gr4vy-radii-container, 0);\n background: var(--gr4vy-colors-pageBackground, #ffffff);\n max-width: 480px;\n}\n",""]);const u=i},935:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var u=0;u<this.length;u++){var l=this[u][0];null!=l&&(i[l]=!0)}for(var c=0;c<e.length;c++){var s=[].concat(e[c]);r&&i[s[0]]||(void 0!==a&&(void 0===s[5]||(s[1]="@layer".concat(s[5].length>0?" ".concat(s[5]):""," {").concat(s[1],"}")),s[5]=a),n&&(s[2]?(s[1]="@media ".concat(s[2]," {").concat(s[1],"}"),s[2]=n):s[2]=n),o&&(s[4]?(s[1]="@supports (".concat(s[4],") {").concat(s[1],"}"),s[4]=o):s[4]="".concat(o)),t.push(s))}},t}},758:e=>{e.exports=function(e){return e[1]}},22:(e,t,n)=>{function r(e){if(("string"==typeof e||e instanceof String)&&(e=document.getElementById(e)),!(e instanceof HTMLFormElement))throw new TypeError("FormNapper requires an HTMLFormElement element or the id string of one.");this.htmlForm=e}r.prototype.hijack=function(e){this.submitHandler||(this.submitHandler=function(t){t.preventDefault?t.preventDefault():t.returnValue=!1,e(t)},null!=n.g.addEventListener?this.htmlForm.addEventListener("submit",this.submitHandler,!1):null!=n.g.attachEvent?this.htmlForm.attachEvent("onsubmit",this.submitHandler):this.htmlForm.onsubmit=this.submitHandler)},r.prototype.inject=function(e,t){var n=this.htmlForm.querySelector('input[name="'+e+'"]');return null==n&&((n=document.createElement("input")).type="hidden",n.name=e,this.htmlForm.appendChild(n)),n.value=t,n},r.prototype.submit=function(){HTMLFormElement.prototype.submit.call(this.htmlForm)},r.prototype.detach=function(){this.submitHandler&&(null!=n.g.removeEventListener?this.htmlForm.removeEventListener("submit",this.submitHandler,!1):null!=n.g.detachEvent?this.htmlForm.detachEvent("onsubmit",this.submitHandler):this.htmlForm.onsubmit=null,delete this.submitHandler)},e.exports=r},853:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var r=n(591),o=n.n(r),a=n(740),i=n.n(a),u=n(128),l=n.n(u),c=n(855),s=n.n(c),p=n(51),d=n.n(p),f=n(656),m=n.n(f),v=n(827),y={};y.styleTagTransform=m(),y.setAttributes=s(),y.insert=l().bind(null,"head"),y.domAPI=i(),y.insertStyleElement=d(),o()(v.A,y);const b=v.A&&v.A.locals?v.A.locals:void 0},637:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var r=n(591),o=n.n(r),a=n(740),i=n.n(a),u=n(128),l=n.n(u),c=n(855),s=n.n(c),p=n(51),d=n.n(p),f=n(656),m=n.n(f),v=n(35),y={};y.styleTagTransform=m(),y.setAttributes=s(),y.insert=l().bind(null,"head"),y.domAPI=i(),y.insertStyleElement=d(),o()(v.A,y);const b=v.A&&v.A.locals?v.A.locals:void 0},591:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},i=[],u=0;u<e.length;u++){var l=e[u],c=r.base?l[0]+r.base:l[0],s=a[c]||0,p="".concat(c," ").concat(s);a[c]=s+1;var d=n(p),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(f);else{var m=o(f,r);r.byIndex=u,t.splice(u,0,{identifier:p,updater:m,references:1})}i.push(p)}return i}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var u=n(a[i]);t[u].references--}for(var l=r(e,o),c=0;c<a.length;c++){var s=n(a[c]);0===t[s].references&&(t[s].updater(),t.splice(s,1))}a=l}}},128:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},51:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},855:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},740:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},656:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={id:r,exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{optionKeys:()=>Ce,setup:()=>Te});var o=function(e,t){return t.reduce((function(t,n){return void 0!==e[n]&&null!==e[n]&&(t[n]=e[n]),t}),{})},a=function(e){return{current:e}},i=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=new URL("https://".concat(e));return t||(n.protocol="http"),n.toString().replace(/\/$/,"")};function u(e){return u="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},u(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return(t=function(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p={debug:!1,level:"log"},d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p,r=c(c({},p),n),o=r.debug,a=r.level;o&&console[a]("Gr4vy - ".concat(e),t)},f=function(e,t,n){d(e,t,c(c({},n),{},{level:"warn"}))},m=function(e,t,n){d(e,t,c(c({},n),{},{level:"error"}))},v=function(e,t,n){return function(r){e===r.origin&&r.data.channel===t&&n(r.data)}},y=function(e,t){return function(n){e.includes(n.type)&&t(n)}};function b(e){return b="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},b(e)}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e,t,n){return(t=function(e){var t=function(e){if("object"!=b(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=function(e,t,n,r){return function(o){n.postMessage(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({channel:t},o),e),r&&r(o)}},S=function(e){if(e.hasChildNodes())for(;e.firstChild;)e.removeChild(e.lastChild)},O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#1c7135d2a63935d4d9ecfcd8d0e2a2ff87468a67";window.gr4vy||(window.gr4vy={version:{}}),window.gr4vy.version||(window.gr4vy.version={}),window.gr4vy.version[e]=t},x=function(e,t){var n;e.appleStartSession$.subscribe((function(r){try{(n=new ApplePaySession(t,r)).onvalidatemerchant=function(t){e.appleValidateMerchant$.next(t.validationURL)},n.onpaymentauthorized=function(t){e.applePayAuthorized$.next(t.payment.token)},n.oncancel=function(){e.appleCancelSession$.next()},n.begin()}catch(t){e.appleSessionError$.next(null==t?void 0:t.message)}})),e.appleCompleteMerchantValidation$.subscribe((function(e){n.completeMerchantValidation(e)})),e.appleAbortSession$.subscribe((function(){var e;(null===(e=n)||void 0===e?void 0:e.abort)&&n.abort()})),e.appleCompletePayment$.subscribe((function(t){t?n.completePayment(ApplePaySession.STATUS_SUCCESS):n.completePayment(ApplePaySession.STATUS_FAILURE),e.appleCompleteSession$.next()}))},j=function(){var e=!1;try{e=window.ApplePaySession&&ApplePaySession.canMakePayments()&&ApplePaySession.supportsVersion(3)}catch(e){}return e},E=function(){return ApplePaySession.supportsVersion(5)?5:ApplePaySession.supportsVersion(4)?4:ApplePaySession.supportsVersion(3)?3:null};function P(e){return P="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},P(e)}var _=["gr4vyId","environment"];function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e,t,n){return(t=function(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I,A,L=function(e){var t,n,r,o,a=e.gr4vyId,u=e.environment,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,_),c=(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(4)).join("").slice(0,32),s="sandbox"===u?"sandbox.":"",p=a?"embed.".concat(s).concat(a,".gr4vy.app"):e.iframeHost,d=a?"api.".concat(s).concat(a,".gr4vy.app"):e.apiHost,f=i(p,e.secure),m=e.form instanceof Element?e.form:document.querySelector(e.form),v=e.element instanceof Element?e.element:document.querySelector(e.element);return $($({enableAnimations:!1,separatePaymentOptions:!1,requireSecurityCode:!1,showDeleteButton:!1,store:"ask",display:"all",apiHost:d,apiUrl:i(d,e.secure),gr4vyId:a,iframeHost:p,iframeUrl:f,iframeSrc:(n=f,r={parentUrl:"".concat(document.location.protocol,"//").concat(document.location.host),font:null!==(t=e.theme)&&void 0!==t&&null!==(t=t.fonts)&&void 0!==t&&t.body?encodeURIComponent(e.theme.fonts.body):void 0,channel:c},o=new URL(n),Object.keys(r).forEach((function(e){void 0!==r[e]&&o.searchParams.set(e,r[e])})),o.toString()),channel:c},l),{},{element:v,form:m,environment:u,redirectMode:e.redirectMode||"fallback"})},T=n(22),q=n.n(T),D=new Map,M=0,F=function(e,t,n,r){parseInt(e.dataset.formNapperId)>0&&(D.get(e.dataset.formNapperId).detach(),D.delete(e.dataset.formNapperId)),M+=1,e.dataset.formNapperId=String(M);var o=new(q())(e);D.set(M.toString(),o),o.hijack((function(){var e;"custom"===(null===(e=n.selectedOption$.value())||void 0===e?void 0:e.mode)?r({method:n.selectedOption$.value().method}):n.formSubmit$.next()})),n.transactionCreated$.subscribe((function(e){var n,r;return o.inject("gr4vy_transaction_id",e.id),o.inject("gr4vy_transaction_status",e.status),null!=e&&null!==(n=e.paymentMethod)&&void 0!==n&&n.id&&o.inject("gr4vy_transaction_payment_method_id",e.paymentMethod.id),null!=e&&null!==(r=e.paymentMethod)&&void 0!==r&&r.approvalUrl&&o.inject("gr4vy_approval_url",e.paymentMethod.approvalUrl),"function"==typeof t?t(e):o.submit()}))},U=function(e,t,n){e.src=t,e.title="Secure payment frame - Gr4vy",e.style.visibility="hidden",e.style.display="none",e.style.width="100%",e.style.height="0px",e.style.border="0",e.style.overflow="hidden",e.setAttribute("frameBorder","0"),e.setAttribute("scrolling","no"),e.setAttribute("allowpaymentrequest","true"),e.setAttribute("sandbox","allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation-by-user-activation"),n.frameHeight$.subscribe((function(t){"unset"===e.style.visibility&&(e.style.height="".concat(t,"px"))})),n.optionsLoaded$.subscribe((function(){e.style.visibility="unset",e.style.display="unset"}))},H=!0,N=String.raw,z=function(e,t){H&&(n(853),H=!1),e.className="gr4vy__overlay gr4vy__overlay--hidden";var r=document.createElement("div"),o=document.createElement("div"),a=document.createElement("div");a.className="gr4vy__overlay__notice ",a.appendChild(r),a.appendChild(o);var i=document.createElement("div");i.className="gr4vy__overlay__link",i.addEventListener("click",(function(){return t.approvalLost$.next()}));var u=document.createElement("div");u.className="gr4vy__overlay__link",u.addEventListener("click",(function(){return t.approvalCancelled$.next()}));var l=document.createElement("div");l.className="gr4vy__overlay__container",e.appendChild(l);var c=function(e){return e.preventDefault(),t.approvalCancelled$.next(),e.returnValue=!0},s=function(){e.className="gr4vy__overlay gr4vy__overlay--hidden",S(l),window.removeEventListener("beforeunload",c)},p=function(){e.className="gr4vy__overlay gr4vy__overlay--visible",window.addEventListener("beforeunload",c)},d=function(e){var t=e.title,n=e.link,c=e.message,s=e.cancel;r.textContent=t,i.textContent=n,o.textContent=c,u.textContent=s,l.appendChild(a),l.appendChild(i),l.appendChild(u)};t.approvalStarted$.subscribe((function(){var e=t.mode$.value().overlay;d(e),p()})),t.approvalCompleted$.subscribe(s),t.approvalCancelled$.subscribe(s),t.transactionFailed$.subscribe(s),t.transactionCancelled$.subscribe(s),t.approvalUrl$.subscribe((function(e){var n,r,o,a;null!==(n=t.mode$.value())&&void 0!==n&&n.popup||(r=e,l.innerHTML=N(I||(o=['\n <iframe\n src="','"\n frameborder="0"\n class="gr4vy__frame"\n allowtransparency="true"\n sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation-by-user-activation"\n ></iframe>\n '],a||(a=o.slice(0)),I=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(a)}}))),r),p())})),t.showOverlay$.subscribe((function(){var e=t.mode$.value().overlay;d(e),p()})),t.hideOverlay$.subscribe(s),t.transactionCreated$.subscribe(s)},V=String.raw,B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a(),t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;t.approvalStarted$.subscribe((function(){var o,a,i,u,l,c,s,p,d,f=t.mode$.value();e.current&&(null===(o=e.current)||void 0===o||o.stopCallback(),null===(a=e.current)||void 0===a||null===(a=a.popup)||void 0===a||a.close(),e.current=void 0),null!=f&&f.popup&&"fallback"===n&&(e.current=function(e,t,n,r){var o=open("","loading",e);o.document.write(t);var a,i,u,l=(a=function(){return o.closed},i=n,u=setInterval((function(){!0===a()&&(clearInterval(u),i())}),10),function(){return clearInterval(u)});return r&&setTimeout((function(){return o.close()}),r),{popup:o,stopCallback:l}}(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,r=n.innerWidth/2-e/2+n.screenLeft,o=n.innerHeight/2-t/2+n.screenTop;return"width=".concat(e,",height=").concat(t,",top=").concat(o,",left=").concat(r)}((null===(i=f.popup)||void 0===i?void 0:i.width)||500,(null===(u=f.popup)||void 0===u?void 0:u.height)||589),(l=t.mode$.value().popup,p=l.title,d=l.message,V(A||(c=["\n <html>\n <head>\n <title>","</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <style>\n html,\n body {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',\n 'Segoe UI Symbol';\n text-align: center;\n }\n .gr4vy__status {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n @keyframes gr4vy-sweep {\n 0% {\n background-position: 0 0;\n }\n 100% {\n background-position: 600px 0;\n }\n }\n\n .gr4vy__loading {\n height: 8px;\n background-image: linear-gradient(\n 90deg,\n #009cde 25%,\n #bee7fa 25%,\n #bee7fa 75%,\n #009cde 75%\n );\n background-size: 600px 8px;\n -webkit-animation: gr4vy-sweep 2s infinite\n cubic-bezier(0.2, 0.75, 0.77, 0.25);\n animation: gr4vy-sweep 2s infinite cubic-bezier(0.2, 0.75, 0.77, 0.25);\n }\n </style>\n </head>\n <div class=\"gr4vy__loading\"></div>\n <div class=\"gr4vy__status\">\n <p>","</p>\n </div>\n </html>\n"],s||(s=c.slice(0)),A=Object.freeze(Object.defineProperties(c,{raw:{value:Object.freeze(s)}}))),p,d)),(function(){return t.approvalCancelled$.next()}),r))})),t.approvalUrl$.subscribe((function(n){var r=t.mode$.value();null!=r&&r.popup&&(e.current?function(e,t){e.location.href=t}(e.current.popup,n):(t.hideOverlay$.next(),setTimeout((function(){return window.location.replace(n)}),0)))})),t.approvalLost$.subscribe((function(){e.current&&e.current.popup.focus()})),t.approvalCancelled$.subscribe((function(){var t;null===(t=e.current)||void 0===t||t.popup.close()})),t.approvalCompleted$.subscribe((function(){var t;null===(t=e.current)||void 0===t||t.popup.close()})),t.transactionFailed$.subscribe((function(){var t,n;null===(t=e.current)||void 0===t||t.stopCallback(),null===(n=e.current)||void 0===n||n.popup.close()})),t.formValidationFailed$.subscribe((function(){var t;null===(t=e.current)||void 0===t||t.popup.close()}))};function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var G=function(e,t){t.removeAttribute("style"),function(e){var t=[];return Object.keys(e).forEach((function(n){Object.keys(e[n]).forEach((function(r){t.push(["--gr4vy-".concat(n,"-").concat(r),"".concat(e[n][r])])}))})),t}(e).forEach((function(e){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,u=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return u}}(n,r)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(n,r)||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.")}()),a=o[0],i=o[1];return t.style.setProperty(a,i)}))};function W(e){return W="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},W(e)}function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){Y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y(e,t,n){return(t=function(e){var t=function(e){if("object"!=W(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==W(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Q,X={none:"0",thin:"1px",thick:"2px"},Z={rounded:"4px",subtle:"2px",none:"0"},ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(n,r){return K(K({},n),{},Y({},r,e[t[r]]))}),{})},te=String.raw,ne=!0,re=function(e,t,r){var o,a;ne&&(n(637),ne=!1),r&&G(function(e){var t={};return null!=e&&e.colors&&(t.colors=K({},e.colors)),null!=e&&e.borderWidths&&(t.borderWidths=ee(X,K({},e.borderWidths))),null!=e&&e.radii&&(t.radii=ee(Z,K({},e.radii))),t}(r),e),e.innerHTML=te(Q||(o=['<div class="gr4vy__container">\n <div class="gr4vy__skeleton">\n <div class="gr4vy__skeleton__radio"></div>\n <div class="gr4vy__skeleton__block"></div>\n </div>\n <div class="gr4vy__skeleton">\n <div class="gr4vy__skeleton__radio"></div>\n <div class="gr4vy__skeleton__block"></div>\n </div>\n </div>'],a||(a=o.slice(0)),Q=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(a)}})))),t.optionsLoaded$.subscribe((function(){return e.remove()}))},oe=function(e){var t=e,n=[];return{subscribe:function(e){var t=n.push(e);return{unsubscribe:function(){n.splice(t-1)}}},next:function(e){t=e,n.forEach((function(e){return setTimeout((function(){return e(t)}),0)}))},value:function(){return t}}},ae=function(){var e={mode$:oe(),approvalUrl$:oe(),approvalStarted$:oe(),approvalCancelled$:oe(),approvalLost$:oe(),approvalCompleted$:oe(),frameHeight$:oe(0),optionsLoaded$:oe(!1),formSubmit$:oe(),submit$:oe(),transactionCreated$:oe(),beforeTransactionPending$:oe(),transactionFailed$:oe(),transactionCancelled$:oe(),appleStartSession$:oe(),appleValidateMerchant$:oe(),appleCompleteMerchantValidation$:oe(),applePayAuthorized$:oe(),appleCompletePayment$:oe(),appleAbortSession$:oe(),appleSessionError$:oe(),appleCancelSession$:oe(),appleCompleteSession$:oe(),googlePaySessionStarted$:oe(),googlePaySessionCompleted$:oe(),selectedOption$:oe(),showOverlay$:oe(),hideOverlay$:oe(),formValidationFailed$:oe()};return e.formSubmit$.subscribe((function(){var t;null!==(t=e.mode$.value())&&void 0!==t&&t.popup&&e.approvalStarted$.next()})),e.googlePaySessionStarted$.subscribe((function(){e.showOverlay$.next()})),e.googlePaySessionCompleted$.subscribe((function(){e.hideOverlay$.next()})),e.transactionCreated$.subscribe((function(){var t;null!==(t=e.mode$.value())&&void 0!==t&&t.popup&&e.approvalCompleted$.next()})),e},ie=function(e,t,n){t.submit$.subscribe((function(){var e;"custom"===(null===(e=t.selectedOption$.value())||void 0===e?void 0:e.mode)?n({method:t.selectedOption$.value().method}):t.formSubmit$.next()})),t.transactionCreated$.subscribe((function(t){e&&e(t)}))},ue=["argument","message","callback"];function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e,t,n){return(t=function(e){var t=function(e){if("object"!=se(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==se(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(e){return se="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},se(e)}function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var de=function(e){var t=e.required,n=e.value;return!t&&[void 0,null].includes(n)},fe=function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)},me=function(e,t){return!function(e){return fe(e)&&0===Object.keys(e).length}(e)&&Object.entries(e).every((function(e){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,u=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return u}}(n,r)||function(e,t){if(e){if("string"==typeof e)return pe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pe(e,t):void 0}}(n,r)||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.")}()),a=o[0],i=o[1];return fe(i)?me(i,t[a]):t&&a in t&&(se(t[a])===se(i)||null===i)}))},ve=function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a=void 0===o||o,i=e.callback;if(n instanceof Element)return!0;var u=document.querySelector(n);return!(!de({required:a,value:n})&&!u&&(Oe({argument:t,message:"".concat(n," ").concat(r),callback:i}),1))},ye=function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a=void 0===o||o,i=e.callback;if(de({required:a,value:n}))return!0;var u=!1;try{u=n===new URL("http://".concat(n)).host}catch(e){}return u||Oe({argument:t,message:"".concat(n," ").concat(r),callback:i}),u},be=function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a=void 0===o||o,i=e.callback,u=Number(n),l=u>=0&&u<=99999999;return!(!de({required:a,value:n})&&!l&&(Oe({argument:t,message:"".concat(n," ").concat(r),callback:i}),1))},ge={firstName:"",lastName:"",emailAddress:"",phoneNumber:"",address:{houseNumberOrName:"",line1:"",line2:"",organization:"",city:"",postalCode:"",country:"",state:"",stateCode:""},taxId:{value:"",kind:""}},he={displayName:"",externalIdentifier:"",billingDetails:ge,shippingDetails:ge},we=function(e){var t=e.argument,n=e.value,r=e.message,o=e.type,a=e.required,i=void 0===a||a,u=e.callback,l=se(n)===o;return!(!de({required:i,value:n})&&!l&&(Oe({argument:t,message:"".concat(n," ").concat(r),callback:u}),1))},Se=function(e){var t=e.argument,n=e.message;return!!e.condition||(Oe({argument:t,message:n}),!1)},Oe=function(e){var t=e.argument,n=e.message,r=e.callback,o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({code:"argumentError",argument:t,message:n},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ue));console.error("Gr4vy - Error",o),null==r||r("argumentError",o)},xe=function(e){return ve({argument:"element",value:e.element,message:"must be a valid HTML element",callback:e.onEvent})&&ve({argument:"form",value:e.form,required:!1,message:"must be a valid HTML form element",callback:e.onEvent})&&we({argument:"gr4vyId",value:e.gr4vyId,required:!e.iframeHost&&!e.apiHost,type:"string",message:"must be a valid gr4vyId or iframeHost/apiHost",callback:e.onEvent})&&ye({argument:"iframeHost",value:e.iframeHost,required:!e.gr4vyId,message:"must be a valid hostname with an optional :port",callback:e.onEvent})&&ye({argument:"apiHost",value:e.apiHost,message:"must be a valid hostname with an optional :port",required:!e.gr4vyId,callback:e.onEvent})&&(n=(t={argument:"intent",value:e.intent,message:"must be a valid intent",required:!1,callback:e.onEvent}).argument,o=t.message,i=void 0===(a=t.required)||a,u=t.callback,l="string"==typeof(r=t.value)&&["authorize","preferAuthorize","capture"].includes(r),!(!de({required:i,value:r})&&!l&&(Oe({argument:n,message:"".concat(r," ").concat(o),callback:u}),1)))&&we({argument:"onEvent",value:e.onEvent,type:"function",message:"must be a function",required:!1,callback:e.onEvent})&&we({argument:"token",value:e.token,type:"string",message:"must be a string",callback:e.onEvent})&&we({argument:"externalIdentifier",value:e.externalIdentifier,type:"string",message:"must be a string",required:!1,callback:e.onEvent})&&function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a=void 0===o||o,i=e.callback,u="string"==typeof n&&3===n.length;return!(!de({required:a,value:n})&&!u&&(Oe({argument:t,message:"".concat(n," ").concat(r),callback:i}),1))}({argument:"currency",value:e.currency,message:"must be a valid currency format",callback:e.onEvent})&&be({argument:"amount",value:e.amount,message:"must be valid non-negative number",callback:e.onEvent})&&we({argument:"debug",value:e.debug,type:"boolean",message:"must be a boolean",required:!1,callback:e.onEvent})&&we({argument:"buyerExternalIdentifier",value:e.buyerExternalIdentifier,type:"string",message:"must be a string",required:!1,callback:e.onEvent})&&we({argument:"buyerExternalIdentifier",value:e.buyerExternalIdentifier&&e.buyer,type:"string",message:"must be used without a buyer",required:!1,callback:e.onEvent})&&we({argument:"buyerId",value:e.buyerId,type:"string",message:"must be a string",required:!1,callback:e.onEvent})&&we({argument:"buyerId",value:e.buyerId&&e.buyer,type:"string",message:"must be used without a buyer",required:!1,callback:e.onEvent})&&function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a=e.expected,i=e.callback,u=n&&me(n,he);return!(!de({required:o,value:n})&&!u&&(Oe({argument:t,message:"".concat(t," ").concat(r),callback:i,_expected:a}),1))}({argument:"buyer",value:e.buyer,message:"must be a valid object",required:!1,expected:he,callback:e.onEvent})&&we({argument:"buyer",value:e.buyer&&(e.buyerExternalIdentifier||e.buyerId),type:"object",message:"must be used without buyerExternalIdentifier or buyerId",required:!1})&&we({argument:"environment",value:e.environment,type:"string",message:'must be "production" or "sandbox"',required:!1,callback:e.onEvent})&&function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a=void 0===o||o,i=e.callback,u=[!0,!1,"ask"].includes(n);return!(!de({required:a,value:n})&&!u&&(Oe({argument:t,message:"".concat(n," ").concat(r),callback:i}),1))}({argument:"store",value:e.store,message:'must be true, false or "ask"',required:!1})&&we({argument:"country",value:e.country,type:"string",message:"must be a string ISO country code",required:!0,callback:e.onEvent})&&we({argument:"display",value:e.display,type:"string",message:'must be "storedOnly", "addOnly", "supportsTokenization" or "all"',required:!1})&&we({argument:"metadata",value:e.metadata,type:"object",message:"must be an object",required:!1})&&we({argument:"cartItems",value:e.cartItems,type:"object",message:"must be an array",required:!1})&&we({argument:"statementDescriptor",value:e.statementDescriptor,type:"object",message:"must be an object",required:!1})&&we({argument:"secure",value:e.secure,type:"boolean",message:"must be a boolean",required:!1})&&be({argument:"popupTimeout",value:e.popupTimeout,message:"must be valid non-negative number",required:!1})&&we({argument:"shippingDetailsId",value:e.shippingDetailsId,required:!1,type:"string",message:"must be a valid uuid"})&&Se({argument:"shippingDetailsId",condition:!e.shippingDetailsId||!(!e.buyerId&&!e.buyerExternalIdentifier),message:"must be used with a buyerId or buyerExternalId"})&&Se({argument:"shippingDetailsId",condition:!e.shippingDetailsId||!e.buyer,message:"must be used without a buyer"})&&we({argument:"hasBeforeTransaction",value:e.onBeforeTransaction,required:!1,type:"function",message:"must be a valid function that returns a promise"})&&we({argument:"merchantAccountId",value:e.merchantAccountId,message:"must be a string",required:!1,type:"string"})&&we({argument:"billingAddressFields",value:e.billingAddressFields,type:"object",message:"must be an object",required:!1})&&we({argument:"antiFraudFingerprint",value:e.antiFraudFingerprint,message:"must be a string",required:!1,type:"string"})&&we({argument:"excludedMethods",value:e.excludedMethods,message:"must be a array",required:!1,type:"object"})&&we({argument:"optionLabels",value:e.optionLabels,type:"object",message:"must be an object",required:!1})&&function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a="string"==typeof n&&["first","firstStored","firstNonStored","none"].includes(n)||null;return!(!de({required:o,value:n})&&!a&&(Oe({argument:t,message:"".concat(n," ").concat(r)}),1))}({argument:"autoSelectOption",value:e.autoSelectOption,message:'must be "first", "firstStored", "firstNonStored", "none" or null',required:!1});var t,n,r,o,a,i,u,l};function je(e){return je="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},je(e)}function Ee(){Ee=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,i=Object.create(a.prototype),u=new C(r||[]);return o(i,"_invoke",{value:P(e,n,u)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",f="suspendedYield",m="executing",v="completed",y={};function b(){}function g(){}function h(){}var w={};c(w,i,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(I([])));O&&O!==n&&r.call(O,i)&&(w=O);var x=h.prototype=b.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,a,i,u){var l=p(e[o],e,a);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==je(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,u)}),(function(e){n("throw",e,i,u)})):t.resolve(s).then((function(e){c.value=e,i(c)}),(function(e){return n("throw",e,i,u)}))}u(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function P(t,n,r){var o=d;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var u=r.delegate;if(u){var l=_(u,r);if(l){if(l===y)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var c=p(t,n,r);if("normal"===c.type){if(o=r.done?v:f,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=v,r.method="throw",r.arg=c.arg)}}}function _(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=p(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function k(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 $(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(je(t)+" is not iterable")}return g.prototype=h,o(x,"constructor",{value:h,configurable:!0}),o(h,"constructor",{value:g,configurable:!0}),g.displayName=c(h,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},j(E.prototype),c(E.prototype,u,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new E(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(x),c(x,l,"Generator"),c(x,i,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach($),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},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),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),$(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;$(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){ke(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ke(e,t,n){return(t=function(e){var t=function(e){if("object"!=je(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=je(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==je(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $e(e,t,n,r,o,a,i){try{var u=e[a](i),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}var Ce=["amount","currency","intent","apiHost","gr4vyId","token","debug","externalIdentifier","buyerId","buyerExternalIdentifier","buyer","environment","store","country","theme","locale","display","apiUrl","customOptions","metadata","paymentSource","cartItems","statementDescriptor","requireSecurityCode","shippingDetailsId","connectionOptions","fullPageReturnUrl","showDeleteButton","merchantAccountId","billingAddressFields","antiFraudFingerprint","enableAnimations","separatePaymentOptions","excludedMethods","optionLabels","autoSelectOption"],Ie=new Map,Ae=0,Le=Promise.race([new Promise((function(e){if("undefined"==typeof window)return e(!1);if(window.ApplePaySession||document.getElementById("apple-pay-sdk"))return e(!0);var t=document.createElement("script");t.id="apple-pay-sdk",t.type="text/javascript",t.src="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",t.crossOrigin="",t.onload=function(){window.ApplePaySession?(d("Apple Pay JS SDK loaded",{version:"1.latest"},{debug:!0}),e(!0)):(m("Error loading the Apple Pay JS SDK. window.ApplePaySession is not defined.",null,{debug:!0}),e(!1))},t.onerror=function(t){m("Error loading the Apple Pay JS SDK.",t,{debug:!0}),e(!1)},document.head.appendChild(t)})),new Promise((function(e){setTimeout((function(){if(!window.ApplePaySession)return f("Loading the Apple Pay JS SDK too too long. Consider adding the script directly to the page instead.",null,{debug:!0}),e(!1);e(!0)}),1e3)}))]);function Te(e){if(xe(e)){var t=L(e),n=ae(),r=t.element.dataset.embedId;S(t.element),Ie.has(r)&&Ie.get(r)(),Ae+=1,t.element.dataset.embedId=Ae.toString();var i=document.createElement("div");re(i,n,t.theme);var u=document.createElement("div");z(u,n),t.form?F(t.form,t.onComplete,n,t.onCustomSubmit):ie(t.onComplete,n,t.onCustomSubmit),B(a(),n,t.redirectMode,t.popupTimeout);var l=document.createElement("iframe");U(l,t.iframeSrc,n),t.element.append(u,i,l);var c,s,p=setTimeout((function(){f("Loading Embed UI failed or took too long. Please check that the `gr4vyId` and `environment` values are correct.",e,{debug:!0})}),3e3),m={modeUpdated:n.mode$.next,approvalUrl:n.approvalUrl$.next,resize:function(e){var t;return n.frameHeight$.next(null==e||null===(t=e.frame)||void 0===t?void 0:t.height)},optionsLoaded:n.optionsLoaded$.next,transactionCreated:n.transactionCreated$.next,transactionFailed:n.transactionFailed$.next,transactionCancelled:n.transactionCancelled$.next,appleStartSession:n.appleStartSession$.next,appleCompleteMerchantValidation:n.appleCompleteMerchantValidation$.next,appleCompletePayment:n.appleCompletePayment$.next,appleAbortSession:n.appleAbortSession$.next,googlePaySessionStarted:n.googlePaySessionStarted$.next,googlePaySessionCompleted:n.googlePaySessionCompleted$.next,frameReady:(c=Ee().mark((function e(){var r,a,i=arguments;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=(i.length>0&&void 0!==i[0]?i[0]:{}).version)&&O("embed-ui",r),clearTimeout(p),e.next=5,Le;case 5:return(a=j()?E():0)&&x(n,a),e.abrupt("return",b({type:"updateOptions",data:_e(_e({},o(t,Ce)),{},{supportedApplePayVersion:a,supportedGooglePayVersion:1,hasBeforeTransaction:"function"==typeof(null==t?void 0:t.onBeforeTransaction)})}));case 8:case"end":return e.stop()}}),e)})),s=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=c.apply(e,t);function a(e){$e(o,n,r,a,i,"next",e)}function i(e){$e(o,n,r,a,i,"throw",e)}a(void 0)}))},function(){return s.apply(this,arguments)}),paymentMethodSelected:n.selectedOption$.next,scrollTo:function(e){var t=e.top;window.scrollTo({top:l.offsetTop+t,left:0,behavior:"smooth"})},beforeTransactionPending:n.beforeTransactionPending$.next,formValidationFailed:n.formValidationFailed$.next},b=w(t.iframeUrl,t.channel,l.contentWindow,(function(e){return d("Page emits",e,{debug:t.debug})})),g=v(t.iframeUrl,t.channel,(function(e){var n;d("Page received",e,{debug:t.debug}),["formUpdate","transactionCreated","transactionFailed","apiError","paymentMethodSelected","transactionCancelled","optionsLoaded"].includes(e.type)&&(null===(n=t.onEvent)||void 0===n||n.call(t,e.type,e.data)),m[e.type]&&m[e.type](e.data)})),h=v(t.apiUrl,t.channel,(function(e){l.contentWindow.postMessage(e,t.iframeUrl)})),P=v(t.iframeUrl,t.channel,y(["approvalErrored","transactionUpdated","approvalCancelled"],(function(e){return l.contentWindow.postMessage(e,t.iframeUrl)})));return n.formSubmit$.subscribe((function(){return b({type:"submitForm"})})),n.beforeTransactionPending$.subscribe((function(){if(null!=t&&t.onBeforeTransaction)return t.onBeforeTransaction(o(t,["metadata"])).then((function(){b({type:"beforeTransactionDone",data:o(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},["externalIdentifier","shippingDetailsId","metadata","token"])})})).catch((function(e){b({type:"beforeTransactionError",data:{beforeTransactionError:e}})}))})),n.approvalCancelled$.subscribe((function(){return b({type:"approvalCancelled"})})),n.applePayAuthorized$.subscribe((function(e){return b({type:"applePayAuthorized",data:e})})),n.appleValidateMerchant$.subscribe((function(e){return b({type:"appleValidateMerchant",data:e})})),n.appleCancelSession$.subscribe((function(){return b({type:"appleCancelSession"})})),n.appleSessionError$.subscribe((function(e){return b({type:"appleSessionError",data:e})})),n.appleCompleteSession$.subscribe((function(){return b({type:"appleCompleteSession"})})),window.addEventListener("message",g),window.addEventListener("message",h),window.addEventListener("message",P),O("embed"),Ie.set(Ae.toString(),(function(){window.removeEventListener("message",g),window.removeEventListener("message",h),window.removeEventListener("message",P)})),{submit:function(){n.formSubmit$.next()}}}}return r})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.gr4vy=t():e.gr4vy=t()}(this,(()=>(()=>{"use strict";var e={827:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(758),o=n.n(r),a=n(935),i=n.n(a)()(o());i.push([e.id,".gr4vy__overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 100vh;\n z-index: 100;\n transition: background-color 0.2s linear, max-height 0s linear;\n background: rgba(0, 0, 0, 0.8);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.gr4vy__overlay--visible {\n -webkit-backdrop-filter: blur(2px);\n backdrop-filter: blur(2px);\n}\n\n.gr4vy__overlay__container {\n color: white;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,\n Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n font-size: 1rem;\n text-align: center;\n font-weight: bold;\n}\n\n.gr4vy__overlay__container > * + * {\n margin-top: 32px;\n}\n\n.gr4vy__overlay__notice > * + * {\n margin-top: 8px;\n}\n\n.gr4vy__overlay--hidden {\n max-height: 0;\n backdrop-filter: unset;\n background-color: rgba(0, 0, 0, 0);\n transition: background-color 0.2s linear, max-height 0s linear;\n transition-delay: 0s, 0.2s;\n overflow: hidden;\n}\n\n.gr4vy__overlay__link {\n font-weight: normal;\n text-decoration: underline;\n font-weight: normal;\n color: white;\n display: block;\n cursor: pointer;\n}\n\n.gr4vy__frame {\n height: 100vh;\n width: 100vw;\n}\n\n@media screen and (min-width: 500px) and (min-height: 350px) {\n .gr4vy__frame {\n height: 250px;\n width: 400px;\n }\n}\n\n@media screen and (min-width: 500px) and (min-height: 490px) {\n .gr4vy__frame {\n height: 390px;\n width: 400px;\n }\n}\n\n@media screen and (min-width: 700px) and (min-height: 500px) {\n .gr4vy__frame {\n height: 400px;\n width: 600px;\n }\n}\n\n@media screen and (min-width: 700px) and (min-height: 600px) {\n .gr4vy__frame {\n height: 500px;\n width: 600px;\n }\n}\n",""]);const c=i},35:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(758),o=n.n(r),a=n(935),i=n.n(a)()(o());i.push([e.id,"@keyframes gr4vy-sweep {\n 0% {\n background-position: 0 0;\n }\n 100% {\n background-position: 600px 0;\n }\n}\n\n.gr4vy__skeleton {\n display: flex;\n border-bottom: var(--gr4vy-borderWidths-container, 1px) solid\n var(--gr4vy-colors-containerBorder, #f2f2f2);\n padding: 16px;\n}\n\n.gr4vy__skeleton:last-child {\n border-bottom: none;\n}\n\n.gr4vy__skeleton__radio {\n border-radius: 50%;\n height: 16px;\n width: 16px;\n margin-bottom: 4px;\n margin-top: 4px;\n background-color: var(--gr4vy-colors-containerBorder, #f2f2f2);\n}\n\n.gr4vy__skeleton__block {\n flex-grow: 1;\n height: 16px;\n background-image: linear-gradient(\n 90deg,\n var(--gr4vy-colors-containerBorder, #f2f2f2) 30%,\n var(--gr4vy-colors-containerBackground, #ffffff) 50%,\n var(--gr4vy-colors-containerBorder, #f2f2f2) 70%\n );\n background-size: 600px;\n margin-bottom: 4px;\n margin-top: 4px;\n margin-left: 16px;\n border-radius: var(--gr4vy-radii-input, 0);\n -webkit-animation: gr4vy-sweep 1s infinite cubic-bezier(0.2, 0.75, 0.77, 0.25);\n animation: gr4vy-sweep 1s infinite cubic-bezier(0.2, 0.75, 0.77, 0.25);\n}\n.gr4vy__container {\n border: var(--gr4vy-borderWidths-container, 1px) solid\n var(--gr4vy-colors-containerBorder, #f2f2f2);\n border-radius: var(--gr4vy-radii-container, 0);\n background: var(--gr4vy-colors-pageBackground, #ffffff);\n max-width: 480px;\n}\n",""]);const c=i},935:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var c=0;c<this.length;c++){var l=this[c][0];null!=l&&(i[l]=!0)}for(var u=0;u<e.length;u++){var s=[].concat(e[u]);r&&i[s[0]]||(void 0!==a&&(void 0===s[5]||(s[1]="@layer".concat(s[5].length>0?" ".concat(s[5]):""," {").concat(s[1],"}")),s[5]=a),n&&(s[2]?(s[1]="@media ".concat(s[2]," {").concat(s[1],"}"),s[2]=n):s[2]=n),o&&(s[4]?(s[1]="@supports (".concat(s[4],") {").concat(s[1],"}"),s[4]=o):s[4]="".concat(o)),t.push(s))}},t}},758:e=>{e.exports=function(e){return e[1]}},22:(e,t,n)=>{function r(e){if(("string"==typeof e||e instanceof String)&&(e=document.getElementById(e)),!(e instanceof HTMLFormElement))throw new TypeError("FormNapper requires an HTMLFormElement element or the id string of one.");this.htmlForm=e}r.prototype.hijack=function(e){this.submitHandler||(this.submitHandler=function(t){t.preventDefault?t.preventDefault():t.returnValue=!1,e(t)},null!=n.g.addEventListener?this.htmlForm.addEventListener("submit",this.submitHandler,!1):null!=n.g.attachEvent?this.htmlForm.attachEvent("onsubmit",this.submitHandler):this.htmlForm.onsubmit=this.submitHandler)},r.prototype.inject=function(e,t){var n=this.htmlForm.querySelector('input[name="'+e+'"]');return null==n&&((n=document.createElement("input")).type="hidden",n.name=e,this.htmlForm.appendChild(n)),n.value=t,n},r.prototype.submit=function(){HTMLFormElement.prototype.submit.call(this.htmlForm)},r.prototype.detach=function(){this.submitHandler&&(null!=n.g.removeEventListener?this.htmlForm.removeEventListener("submit",this.submitHandler,!1):null!=n.g.detachEvent?this.htmlForm.detachEvent("onsubmit",this.submitHandler):this.htmlForm.onsubmit=null,delete this.submitHandler)},e.exports=r},853:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var r=n(591),o=n.n(r),a=n(740),i=n.n(a),c=n(128),l=n.n(c),u=n(855),s=n.n(u),p=n(51),d=n.n(p),f=n(656),m=n.n(f),v=n(827),y={};y.styleTagTransform=m(),y.setAttributes=s(),y.insert=l().bind(null,"head"),y.domAPI=i(),y.insertStyleElement=d(),o()(v.A,y);const b=v.A&&v.A.locals?v.A.locals:void 0},637:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var r=n(591),o=n.n(r),a=n(740),i=n.n(a),c=n(128),l=n.n(c),u=n(855),s=n.n(u),p=n(51),d=n.n(p),f=n(656),m=n.n(f),v=n(35),y={};y.styleTagTransform=m(),y.setAttributes=s(),y.insert=l().bind(null,"head"),y.domAPI=i(),y.insertStyleElement=d(),o()(v.A,y);const b=v.A&&v.A.locals?v.A.locals:void 0},591:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},i=[],c=0;c<e.length;c++){var l=e[c],u=r.base?l[0]+r.base:l[0],s=a[u]||0,p="".concat(u," ").concat(s);a[u]=s+1;var d=n(p),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(f);else{var m=o(f,r);r.byIndex=c,t.splice(c,0,{identifier:p,updater:m,references:1})}i.push(p)}return i}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var c=n(a[i]);t[c].references--}for(var l=r(e,o),u=0;u<a.length;u++){var s=n(a[u]);0===t[s].references&&(t[s].updater(),t.splice(s,1))}a=l}}},128:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},51:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},855:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},740:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},656:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={id:r,exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{optionKeys:()=>$e,setup:()=>Le});var o=function(e,t){return t.reduce((function(t,n){return void 0!==e[n]&&null!==e[n]&&(t[n]=e[n]),t}),{})},a=function(e){return{current:e}},i=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=new URL("https://".concat(e));return t||(n.protocol="http"),n.toString().replace(/\/$/,"")};function c(e){return c="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},c(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p={debug:!1,level:"log"},d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p,r=u(u({},p),n),o=r.debug,a=r.level;o&&console[a]("Gr4vy - ".concat(e),t)},f=function(e,t,n){d(e,t,u(u({},n),{},{level:"warn"}))},m=function(e,t,n){d(e,t,u(u({},n),{},{level:"error"}))},v=function(e,t,n){return function(r){e===r.origin&&r.data.channel===t&&n(r.data)}},y=function(e,t){return function(n){e.includes(n.type)&&t(n)}};function b(e){return b="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},b(e)}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e,t,n){return(t=function(e){var t=function(e){if("object"!=b(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=function(e,t,n,r){return function(o){n.postMessage(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({channel:t},o),e),r&&r(o)}},S=function(e){if(e.hasChildNodes())for(;e.firstChild;)e.removeChild(e.lastChild)},O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#58bd10c5bf918ba1f03ac333b0f323e38f6787bd";window.gr4vy||(window.gr4vy={version:{}}),window.gr4vy.version||(window.gr4vy.version={}),window.gr4vy.version[e]=t},x=function(e,t){var n;e.appleStartSession$.subscribe((function(r){try{(n=new ApplePaySession(t,r)).onvalidatemerchant=function(t){e.appleValidateMerchant$.next(t.validationURL)},n.onpaymentauthorized=function(t){e.applePayAuthorized$.next(t.payment.token)},n.oncancel=function(){e.appleCancelSession$.next()},n.begin()}catch(t){e.appleSessionError$.next(null==t?void 0:t.message)}})),e.appleCompleteMerchantValidation$.subscribe((function(e){n.completeMerchantValidation(e)})),e.appleAbortSession$.subscribe((function(){var e;(null===(e=n)||void 0===e?void 0:e.abort)&&n.abort()})),e.appleCompletePayment$.subscribe((function(t){t?n.completePayment(ApplePaySession.STATUS_SUCCESS):n.completePayment(ApplePaySession.STATUS_FAILURE),e.appleCompleteSession$.next()}))},j=function(){var e=!1;try{e=window.ApplePaySession&&ApplePaySession.canMakePayments()&&ApplePaySession.supportsVersion(3)}catch(e){}return e},P=function(){return ApplePaySession.supportsVersion(5)?5:ApplePaySession.supportsVersion(4)?4:ApplePaySession.supportsVersion(3)?3:null};function E(e){return E="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(e)}var _=["gr4vyId","environment"];function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e,t,n){return(t=function(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A,I,L=function(e){var t,n,r,o,a=e.gr4vyId,c=e.environment,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,_),u=(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(4)).join("").slice(0,32),s="sandbox"===c?"sandbox.":"",p=a?"embed.".concat(s).concat(a,".gr4vy.app"):e.iframeHost,d=a?"api.".concat(s).concat(a,".gr4vy.app"):e.apiHost,f=i(p,e.secure),m=e.form instanceof Element?e.form:document.querySelector(e.form),v=e.element instanceof Element?e.element:document.querySelector(e.element);return $($({enableAnimations:!1,separatePaymentOptions:!1,requireSecurityCode:!1,showDeleteButton:!1,store:"ask",display:"all",apiHost:d,apiUrl:i(d,e.secure),gr4vyId:a,iframeHost:p,iframeUrl:f,iframeSrc:(n=f,r={parentUrl:"".concat(document.location.protocol,"//").concat(document.location.host),font:null!==(t=e.theme)&&void 0!==t&&null!==(t=t.fonts)&&void 0!==t&&t.body?encodeURIComponent(e.theme.fonts.body):void 0,channel:u},o=new URL(n),Object.keys(r).forEach((function(e){void 0!==r[e]&&o.searchParams.set(e,r[e])})),o.toString()),channel:u},l),{},{element:v,form:m,environment:c,redirectMode:e.redirectMode||"fallback"})},T=n(22),q=n.n(T),M=new Map,D=0,F=function(e,t,n,r){parseInt(e.dataset.formNapperId)>0&&(M.get(e.dataset.formNapperId).detach(),M.delete(e.dataset.formNapperId)),D+=1,e.dataset.formNapperId=String(D);var o=new(q())(e);M.set(D.toString(),o),o.hijack((function(){var e;"custom"===(null===(e=n.selectedOption$.value())||void 0===e?void 0:e.mode)?r({method:n.selectedOption$.value().method}):n.formSubmit$.next()})),n.transactionCreated$.subscribe((function(e){var n,r;return o.inject("gr4vy_transaction_id",e.id),o.inject("gr4vy_transaction_status",e.status),null!=e&&null!==(n=e.paymentMethod)&&void 0!==n&&n.id&&o.inject("gr4vy_transaction_payment_method_id",e.paymentMethod.id),null!=e&&null!==(r=e.paymentMethod)&&void 0!==r&&r.approvalUrl&&o.inject("gr4vy_approval_url",e.paymentMethod.approvalUrl),"function"==typeof t?t(e):o.submit()}))},U=function(e,t,n){e.src=t,e.title="Secure payment frame - Gr4vy",e.style.visibility="hidden",e.style.display="none",e.style.width="100%",e.style.height="0px",e.style.border="0",e.style.overflow="hidden",e.setAttribute("frameBorder","0"),e.setAttribute("scrolling","no"),e.setAttribute("allowpaymentrequest","true"),e.setAttribute("sandbox","allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation-by-user-activation"),n.frameHeight$.subscribe((function(t){"unset"===e.style.visibility&&(e.style.height="".concat(t,"px"))})),n.optionsLoaded$.subscribe((function(){e.style.visibility="unset",e.style.display="unset"}))},H=!0,N=String.raw,z=function(e,t){H&&(n(853),H=!1),e.className="gr4vy__overlay gr4vy__overlay--hidden";var r=document.createElement("div"),o=document.createElement("div"),a=document.createElement("div");a.className="gr4vy__overlay__notice ",a.appendChild(r),a.appendChild(o);var i=document.createElement("div");i.className="gr4vy__overlay__link",i.addEventListener("click",(function(){return t.approvalLost$.next()}));var c=document.createElement("div");c.className="gr4vy__overlay__link",c.addEventListener("click",(function(){return t.approvalCancelled$.next()}));var l=document.createElement("div");l.className="gr4vy__overlay__container",e.appendChild(l);var u=function(e){return e.preventDefault(),t.approvalCancelled$.next(),e.returnValue=!0},s=function(){e.className="gr4vy__overlay gr4vy__overlay--hidden",S(l),window.removeEventListener("beforeunload",u)},p=function(){e.className="gr4vy__overlay gr4vy__overlay--visible",window.addEventListener("beforeunload",u)},d=function(e){var t=e.title,n=e.link,u=e.message,s=e.cancel;r.textContent=t,i.textContent=n,o.textContent=u,c.textContent=s,l.appendChild(a),l.appendChild(i),l.appendChild(c)};t.approvalStarted$.subscribe((function(){var e=t.mode$.value().overlay;d(e),p()})),t.approvalCompleted$.subscribe(s),t.approvalCancelled$.subscribe(s),t.transactionFailed$.subscribe(s),t.transactionCancelled$.subscribe(s),t.approvalUrl$.subscribe((function(e){var n,r,o,a;null!==(n=t.mode$.value())&&void 0!==n&&n.popup||(r=e,l.innerHTML=N(A||(o=['\n <iframe\n src="','"\n frameborder="0"\n class="gr4vy__frame"\n allowtransparency="true"\n sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation-by-user-activation"\n ></iframe>\n '],a||(a=o.slice(0)),A=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(a)}}))),r),p())})),t.showOverlay$.subscribe((function(){var e=t.mode$.value().overlay;d(e),p()})),t.hideOverlay$.subscribe(s),t.transactionCreated$.subscribe(s)},V=String.raw,B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a(),t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;t.approvalStarted$.subscribe((function(){var o,a,i,c,l,u,s,p,d,f=t.mode$.value();e.current&&(null===(o=e.current)||void 0===o||o.stopCallback(),null===(a=e.current)||void 0===a||null===(a=a.popup)||void 0===a||a.close(),e.current=void 0),null!=f&&f.popup&&"fallback"===n&&(e.current=function(e,t,n,r){var o=open("","loading",e);o.document.write(t);var a,i,c,l=(a=function(){return o.closed},i=n,c=setInterval((function(){!0===a()&&(clearInterval(c),i())}),10),function(){return clearInterval(c)});return r&&setTimeout((function(){return o.close()}),r),{popup:o,stopCallback:l}}(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,r=n.innerWidth/2-e/2+n.screenLeft,o=n.innerHeight/2-t/2+n.screenTop;return"width=".concat(e,",height=").concat(t,",top=").concat(o,",left=").concat(r)}((null===(i=f.popup)||void 0===i?void 0:i.width)||500,(null===(c=f.popup)||void 0===c?void 0:c.height)||589),(l=t.mode$.value().popup,p=l.title,d=l.message,V(I||(u=["\n <html>\n <head>\n <title>","</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <style>\n html,\n body {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',\n 'Segoe UI Symbol';\n text-align: center;\n }\n .gr4vy__status {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n @keyframes gr4vy-sweep {\n 0% {\n background-position: 0 0;\n }\n 100% {\n background-position: 600px 0;\n }\n }\n\n .gr4vy__loading {\n height: 8px;\n background-image: linear-gradient(\n 90deg,\n #009cde 25%,\n #bee7fa 25%,\n #bee7fa 75%,\n #009cde 75%\n );\n background-size: 600px 8px;\n -webkit-animation: gr4vy-sweep 2s infinite\n cubic-bezier(0.2, 0.75, 0.77, 0.25);\n animation: gr4vy-sweep 2s infinite cubic-bezier(0.2, 0.75, 0.77, 0.25);\n }\n </style>\n </head>\n <div class=\"gr4vy__loading\"></div>\n <div class=\"gr4vy__status\">\n <p>","</p>\n </div>\n </html>\n"],s||(s=u.slice(0)),I=Object.freeze(Object.defineProperties(u,{raw:{value:Object.freeze(s)}}))),p,d)),(function(){return t.approvalCancelled$.next()}),r))})),t.approvalUrl$.subscribe((function(n){var r=t.mode$.value();null!=r&&r.popup&&(e.current?function(e,t){e.location.href=t}(e.current.popup,n):(t.hideOverlay$.next(),setTimeout((function(){return window.location.replace(n)}),0)))})),t.approvalLost$.subscribe((function(){e.current&&e.current.popup.focus()})),t.approvalCancelled$.subscribe((function(){var t;null===(t=e.current)||void 0===t||t.popup.close()})),t.approvalCompleted$.subscribe((function(){var t;null===(t=e.current)||void 0===t||t.popup.close()})),t.transactionFailed$.subscribe((function(){var t,n;null===(t=e.current)||void 0===t||t.stopCallback(),null===(n=e.current)||void 0===n||n.popup.close()})),t.formValidationFailed$.subscribe((function(){var t;null===(t=e.current)||void 0===t||t.popup.close()}))};function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var G=function(e,t){t.removeAttribute("style"),function(e){var t=[];return Object.keys(e).forEach((function(n){Object.keys(e[n]).forEach((function(r){t.push(["--gr4vy-".concat(n,"-").concat(r),"".concat(e[n][r])])}))})),t}(e).forEach((function(e){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(n,r)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(n,r)||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.")}()),a=o[0],i=o[1];return t.style.setProperty(a,i)}))};function W(e){return W="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},W(e)}function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){Y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y(e,t,n){return(t=function(e){var t=function(e){if("object"!=W(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==W(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Q,X={none:"0",thin:"1px",thick:"2px"},Z={rounded:"4px",subtle:"2px",none:"0"},ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(n,r){return K(K({},n),{},Y({},r,e[t[r]]))}),{})},te=String.raw,ne=!0,re=function(e,t,r){var o,a;ne&&(n(637),ne=!1),r&&G(function(e){var t={};return null!=e&&e.colors&&(t.colors=K({},e.colors)),null!=e&&e.borderWidths&&(t.borderWidths=ee(X,K({},e.borderWidths))),null!=e&&e.radii&&(t.radii=ee(Z,K({},e.radii))),t}(r),e),e.innerHTML=te(Q||(o=['<div class="gr4vy__container">\n <div class="gr4vy__skeleton">\n <div class="gr4vy__skeleton__radio"></div>\n <div class="gr4vy__skeleton__block"></div>\n </div>\n <div class="gr4vy__skeleton">\n <div class="gr4vy__skeleton__radio"></div>\n <div class="gr4vy__skeleton__block"></div>\n </div>\n </div>'],a||(a=o.slice(0)),Q=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(a)}})))),t.optionsLoaded$.subscribe((function(){return e.remove()}))},oe=function(e){var t=e,n=[];return{subscribe:function(e){var t=n.push(e);return{unsubscribe:function(){n.splice(t-1)}}},next:function(e){t=e,n.forEach((function(e){return setTimeout((function(){return e(t)}),0)}))},value:function(){return t}}},ae=function(){var e={mode$:oe(),approvalUrl$:oe(),approvalStarted$:oe(),approvalCancelled$:oe(),approvalLost$:oe(),approvalCompleted$:oe(),frameHeight$:oe(0),optionsLoaded$:oe(!1),formSubmit$:oe(),submit$:oe(),transactionCreated$:oe(),beforeTransactionPending$:oe(),transactionFailed$:oe(),transactionCancelled$:oe(),appleStartSession$:oe(),appleValidateMerchant$:oe(),appleCompleteMerchantValidation$:oe(),applePayAuthorized$:oe(),appleCompletePayment$:oe(),appleAbortSession$:oe(),appleSessionError$:oe(),appleCancelSession$:oe(),appleCompleteSession$:oe(),googlePaySessionStarted$:oe(),googlePaySessionCompleted$:oe(),selectedOption$:oe(),showOverlay$:oe(),hideOverlay$:oe(),formValidationFailed$:oe()};return e.formSubmit$.subscribe((function(){var t;null!==(t=e.mode$.value())&&void 0!==t&&t.popup&&e.approvalStarted$.next()})),e.googlePaySessionStarted$.subscribe((function(){e.showOverlay$.next()})),e.googlePaySessionCompleted$.subscribe((function(){e.hideOverlay$.next()})),e.transactionCreated$.subscribe((function(){var t;null!==(t=e.mode$.value())&&void 0!==t&&t.popup&&e.approvalCompleted$.next()})),e},ie=function(e,t,n){t.submit$.subscribe((function(){var e;"custom"===(null===(e=t.selectedOption$.value())||void 0===e?void 0:e.mode)?n({method:t.selectedOption$.value().method}):t.formSubmit$.next()})),t.transactionCreated$.subscribe((function(t){e&&e(t)}))},ce=["argument","message","callback"];function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ue(e,t,n){return(t=function(e){var t=function(e){if("object"!=se(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==se(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(e){return se="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},se(e)}function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var de=function(e){var t=e.required,n=e.value;return!t&&[void 0,null].includes(n)},fe=function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)},me=function(e,t){return!function(e){return fe(e)&&0===Object.keys(e).length}(e)&&Object.entries(e).every((function(e){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(n,r)||function(e,t){if(e){if("string"==typeof e)return pe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pe(e,t):void 0}}(n,r)||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.")}()),a=o[0],i=o[1];return fe(i)?me(i,t[a]):t&&a in t&&(se(t[a])===se(i)||null===i)}))},ve=function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a=void 0===o||o,i=e.callback;if(n instanceof Element)return!0;var c=document.querySelector(n);return!(!de({required:a,value:n})&&!c&&(Se({argument:t,message:"".concat(n," ").concat(r),callback:i}),1))},ye=function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a=void 0===o||o,i=e.callback;if(de({required:a,value:n}))return!0;var c=!1;try{c=n===new URL("http://".concat(n)).host}catch(e){}return c||Se({argument:t,message:"".concat(n," ").concat(r),callback:i}),c},be=function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a=void 0===o||o,i=e.callback,c=Number(n),l=c>=0&&c<=99999999;return!(!de({required:a,value:n})&&!l&&(Se({argument:t,message:"".concat(n," ").concat(r),callback:i}),1))},ge={firstName:"",lastName:"",emailAddress:"",phoneNumber:"",address:{houseNumberOrName:"",line1:"",line2:"",organization:"",city:"",postalCode:"",country:"",state:"",stateCode:""},taxId:{value:"",kind:""}},he={displayName:"",externalIdentifier:"",billingDetails:ge,shippingDetails:ge},we=function(e){var t=e.argument,n=e.value,r=e.message,o=e.type,a=e.required,i=void 0===a||a,c=e.callback,l=se(n)===o;return!(!de({required:i,value:n})&&!l&&(Se({argument:t,message:"".concat(n," ").concat(r),callback:c}),1))},Se=function(e){var t=e.argument,n=e.message,r=e.callback,o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){ue(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({code:"argumentError",argument:t,message:n},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ce));console.error("Gr4vy - Error",o),null==r||r("argumentError",o)},Oe=function(e){return ve({argument:"element",value:e.element,message:"must be a valid HTML element",callback:e.onEvent})&&ve({argument:"form",value:e.form,required:!1,message:"must be a valid HTML form element",callback:e.onEvent})&&we({argument:"gr4vyId",value:e.gr4vyId,required:!e.iframeHost&&!e.apiHost,type:"string",message:"must be a valid gr4vyId or iframeHost/apiHost",callback:e.onEvent})&&ye({argument:"iframeHost",value:e.iframeHost,required:!e.gr4vyId,message:"must be a valid hostname with an optional :port",callback:e.onEvent})&&ye({argument:"apiHost",value:e.apiHost,message:"must be a valid hostname with an optional :port",required:!e.gr4vyId,callback:e.onEvent})&&(r=(n={argument:"intent",value:e.intent,message:"must be a valid intent",required:!1,callback:e.onEvent}).argument,a=n.message,c=void 0===(i=n.required)||i,l=n.callback,u="string"==typeof(o=n.value)&&["authorize","preferAuthorize","capture"].includes(o),!(!de({required:c,value:o})&&!u&&(Se({argument:r,message:"".concat(o," ").concat(a),callback:l}),1)))&&we({argument:"onEvent",value:e.onEvent,type:"function",message:"must be a function",required:!1,callback:e.onEvent})&&we({argument:"token",value:e.token,type:"string",message:"must be a string",callback:e.onEvent})&&we({argument:"externalIdentifier",value:e.externalIdentifier,type:"string",message:"must be a string",required:!1,callback:e.onEvent})&&function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a=void 0===o||o,i=e.callback,c="string"==typeof n&&3===n.length;return!(!de({required:a,value:n})&&!c&&(Se({argument:t,message:"".concat(n," ").concat(r),callback:i}),1))}({argument:"currency",value:e.currency,message:"must be a valid currency format",callback:e.onEvent})&&be({argument:"amount",value:e.amount,message:"must be valid non-negative number",callback:e.onEvent})&&we({argument:"debug",value:e.debug,type:"boolean",message:"must be a boolean",required:!1,callback:e.onEvent})&&we({argument:"buyerExternalIdentifier",value:e.buyerExternalIdentifier,type:"string",message:"must be a string",required:!1,callback:e.onEvent})&&we({argument:"buyerId",value:e.buyerId,type:"string",message:"must be a string",required:!1,callback:e.onEvent})&&function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a=e.expected,i=e.callback,c=n&&me(n,he);return!(!de({required:o,value:n})&&!c&&(Se({argument:t,message:"".concat(t," ").concat(r),callback:i,_expected:a}),1))}({argument:"buyer",value:e.buyer,message:"must be a valid object",required:!1,expected:he,callback:e.onEvent})&&we({argument:"environment",value:e.environment,type:"string",message:'must be "production" or "sandbox"',required:!1,callback:e.onEvent})&&function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a=void 0===o||o,i=e.callback,c=[!0,!1,"ask"].includes(n);return!(!de({required:a,value:n})&&!c&&(Se({argument:t,message:"".concat(n," ").concat(r),callback:i}),1))}({argument:"store",value:e.store,message:'must be true, false or "ask"',required:!1})&&we({argument:"country",value:e.country,type:"string",message:"must be a string ISO country code",required:!0,callback:e.onEvent})&&we({argument:"display",value:e.display,type:"string",message:'must be "storedOnly", "addOnly", "supportsTokenization" or "all"',required:!1})&&we({argument:"metadata",value:e.metadata,type:"object",message:"must be an object",required:!1})&&we({argument:"cartItems",value:e.cartItems,type:"object",message:"must be an array",required:!1})&&we({argument:"statementDescriptor",value:e.statementDescriptor,type:"object",message:"must be an object",required:!1})&&we({argument:"secure",value:e.secure,type:"boolean",message:"must be a boolean",required:!1})&&be({argument:"popupTimeout",value:e.popupTimeout,message:"must be valid non-negative number",required:!1})&&we({argument:"shippingDetailsId",value:e.shippingDetailsId,required:!1,type:"string",message:"must be a valid uuid"})&&(!!(t={argument:"shippingDetailsId",condition:!e.shippingDetailsId||!(!e.buyerId&&!e.buyerExternalIdentifier),message:"must be used with a buyerId or buyerExternalId"}).condition||(Se({argument:t.argument,message:t.message}),!1))&&we({argument:"hasBeforeTransaction",value:e.onBeforeTransaction,required:!1,type:"function",message:"must be a valid function that returns a promise"})&&we({argument:"merchantAccountId",value:e.merchantAccountId,message:"must be a string",required:!1,type:"string"})&&we({argument:"billingAddressFields",value:e.billingAddressFields,type:"object",message:"must be an object",required:!1})&&we({argument:"antiFraudFingerprint",value:e.antiFraudFingerprint,message:"must be a string",required:!1,type:"string"})&&we({argument:"excludedMethods",value:e.excludedMethods,message:"must be a array",required:!1,type:"object"})&&we({argument:"optionLabels",value:e.optionLabels,type:"object",message:"must be an object",required:!1})&&function(e){var t=e.argument,n=e.value,r=e.message,o=e.required,a="string"==typeof n&&["first","firstStored","firstNonStored","none"].includes(n)||null;return!(!de({required:o,value:n})&&!a&&(Se({argument:t,message:"".concat(n," ").concat(r)}),1))}({argument:"autoSelectOption",value:e.autoSelectOption,message:'must be "first", "firstStored", "firstNonStored", "none" or null',required:!1});var t,n,r,o,a,i,c,l,u};function xe(e){return xe="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},xe(e)}function je(){je=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,i=Object.create(a.prototype),c=new C(r||[]);return o(i,"_invoke",{value:E(e,n,c)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",f="suspendedYield",m="executing",v="completed",y={};function b(){}function g(){}function h(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(A([])));O&&O!==n&&r.call(O,i)&&(w=O);var x=h.prototype=b.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(o,a,i,c){var l=p(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==xe(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function E(t,n,r){var o=d;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=_(c,r);if(l){if(l===y)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var u=p(t,n,r);if("normal"===u.type){if(o=r.done?v:f,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=v,r.method="throw",r.arg=u.arg)}}}function _(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=p(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function k(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 $(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(xe(t)+" is not iterable")}return g.prototype=h,o(x,"constructor",{value:h,configurable:!0}),o(h,"constructor",{value:g,configurable:!0}),g.displayName=u(h,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},j(P.prototype),u(P.prototype,c,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new P(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach($),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},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),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),$(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;$(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){_e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _e(e,t,n){return(t=function(e){var t=function(e){if("object"!=xe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}var $e=["amount","currency","intent","apiHost","gr4vyId","token","debug","externalIdentifier","buyerId","buyerExternalIdentifier","buyer","environment","store","country","theme","locale","display","apiUrl","customOptions","metadata","paymentSource","cartItems","statementDescriptor","requireSecurityCode","shippingDetailsId","connectionOptions","fullPageReturnUrl","showDeleteButton","merchantAccountId","billingAddressFields","antiFraudFingerprint","enableAnimations","separatePaymentOptions","excludedMethods","optionLabels","autoSelectOption"],Ce=new Map,Ae=0,Ie=Promise.race([new Promise((function(e){if("undefined"==typeof window)return e(!1);if(window.ApplePaySession||document.getElementById("apple-pay-sdk"))return e(!0);var t=document.createElement("script");t.id="apple-pay-sdk",t.type="text/javascript",t.src="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",t.crossOrigin="",t.onload=function(){window.ApplePaySession?(d("Apple Pay JS SDK loaded",{version:"1.latest"},{debug:!0}),e(!0)):(m("Error loading the Apple Pay JS SDK. window.ApplePaySession is not defined.",null,{debug:!0}),e(!1))},t.onerror=function(t){m("Error loading the Apple Pay JS SDK.",t,{debug:!0}),e(!1)},document.head.appendChild(t)})),new Promise((function(e){setTimeout((function(){if(!window.ApplePaySession)return f("Loading the Apple Pay JS SDK too too long. Consider adding the script directly to the page instead.",null,{debug:!0}),e(!1);e(!0)}),1e3)}))]);function Le(e){if(Oe(e)){var t=L(e),n=ae(),r=t.element.dataset.embedId;S(t.element),Ce.has(r)&&Ce.get(r)(),Ae+=1,t.element.dataset.embedId=Ae.toString();var i=document.createElement("div");re(i,n,t.theme);var c=document.createElement("div");z(c,n),t.form?F(t.form,t.onComplete,n,t.onCustomSubmit):ie(t.onComplete,n,t.onCustomSubmit),B(a(),n,t.redirectMode,t.popupTimeout);var l=document.createElement("iframe");U(l,t.iframeSrc,n),t.element.append(c,i,l);var u,s,p=setTimeout((function(){f("Loading Embed UI failed or took too long. Please check that the `gr4vyId` and `environment` values are correct.",e,{debug:!0})}),3e3),m={modeUpdated:n.mode$.next,approvalUrl:n.approvalUrl$.next,resize:function(e){var t;return n.frameHeight$.next(null==e||null===(t=e.frame)||void 0===t?void 0:t.height)},optionsLoaded:n.optionsLoaded$.next,transactionCreated:n.transactionCreated$.next,transactionFailed:n.transactionFailed$.next,transactionCancelled:n.transactionCancelled$.next,appleStartSession:n.appleStartSession$.next,appleCompleteMerchantValidation:n.appleCompleteMerchantValidation$.next,appleCompletePayment:n.appleCompletePayment$.next,appleAbortSession:n.appleAbortSession$.next,googlePaySessionStarted:n.googlePaySessionStarted$.next,googlePaySessionCompleted:n.googlePaySessionCompleted$.next,frameReady:(u=je().mark((function e(){var r,a,i=arguments;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=(i.length>0&&void 0!==i[0]?i[0]:{}).version)&&O("embed-ui",r),clearTimeout(p),e.next=5,Ie;case 5:return(a=j()?P():0)&&x(n,a),e.abrupt("return",b({type:"updateOptions",data:Ee(Ee({},o(t,$e)),{},{supportedApplePayVersion:a,supportedGooglePayVersion:1,hasBeforeTransaction:"function"==typeof(null==t?void 0:t.onBeforeTransaction)})}));case 8:case"end":return e.stop()}}),e)})),s=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=u.apply(e,t);function a(e){ke(o,n,r,a,i,"next",e)}function i(e){ke(o,n,r,a,i,"throw",e)}a(void 0)}))},function(){return s.apply(this,arguments)}),paymentMethodSelected:n.selectedOption$.next,scrollTo:function(e){var t=e.top;window.scrollTo({top:l.offsetTop+t,left:0,behavior:"smooth"})},beforeTransactionPending:n.beforeTransactionPending$.next,formValidationFailed:n.formValidationFailed$.next},b=w(t.iframeUrl,t.channel,l.contentWindow,(function(e){return d("Page emits",e,{debug:t.debug})})),g=v(t.iframeUrl,t.channel,(function(e){var n;d("Page received",e,{debug:t.debug}),["formUpdate","transactionCreated","transactionFailed","apiError","paymentMethodSelected","transactionCancelled","optionsLoaded"].includes(e.type)&&(null===(n=t.onEvent)||void 0===n||n.call(t,e.type,e.data)),m[e.type]&&m[e.type](e.data)})),h=v(t.apiUrl,t.channel,(function(e){l.contentWindow.postMessage(e,t.iframeUrl)})),E=v(t.iframeUrl,t.channel,y(["approvalErrored","transactionUpdated","approvalCancelled"],(function(e){return l.contentWindow.postMessage(e,t.iframeUrl)})));return n.formSubmit$.subscribe((function(){return b({type:"submitForm"})})),n.beforeTransactionPending$.subscribe((function(){if(null!=t&&t.onBeforeTransaction)return t.onBeforeTransaction(o(t,["metadata"])).then((function(){b({type:"beforeTransactionDone",data:o(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},["externalIdentifier","shippingDetailsId","metadata","token"])})})).catch((function(e){b({type:"beforeTransactionError",data:{beforeTransactionError:e}})}))})),n.approvalCancelled$.subscribe((function(){return b({type:"approvalCancelled"})})),n.applePayAuthorized$.subscribe((function(e){return b({type:"applePayAuthorized",data:e})})),n.appleValidateMerchant$.subscribe((function(e){return b({type:"appleValidateMerchant",data:e})})),n.appleCancelSession$.subscribe((function(){return b({type:"appleCancelSession"})})),n.appleSessionError$.subscribe((function(e){return b({type:"appleSessionError",data:e})})),n.appleCompleteSession$.subscribe((function(){return b({type:"appleCompleteSession"})})),window.addEventListener("message",g),window.addEventListener("message",h),window.addEventListener("message",E),O("embed"),Ce.set(Ae.toString(),(function(){window.removeEventListener("message",g),window.removeEventListener("message",h),window.removeEventListener("message",E)})),{submit:function(){n.formSubmit$.next()}}}}return r})()));

@@ -348,10 +348,2 @@ "use strict";

(0, exports.validateType)({
argument: 'buyerExternalIdentifier',
value: options.buyerExternalIdentifier && options.buyer,
type: 'string',
message: 'must be used without a buyer',
required: false,
callback: options.onEvent,
}) &&
(0, exports.validateType)({
argument: 'buyerId',

@@ -364,10 +356,2 @@ value: options.buyerId,

}) &&
(0, exports.validateType)({
argument: 'buyerId',
value: options.buyerId && options.buyer,
type: 'string',
message: 'must be used without a buyer',
required: false,
callback: options.onEvent,
}) &&
(0, exports.validateBuyer)({

@@ -382,9 +366,2 @@ argument: 'buyer',

(0, exports.validateType)({
argument: 'buyer',
value: options.buyer && (options.buyerExternalIdentifier || options.buyerId),
type: 'object',
message: 'must be used without buyerExternalIdentifier or buyerId',
required: false,
}) &&
(0, exports.validateType)({
argument: 'environment',

@@ -466,7 +443,2 @@ value: options.environment,

}) &&
(0, exports.validateCondition)({
argument: 'shippingDetailsId',
condition: options.shippingDetailsId ? !options.buyer : true,
message: 'must be used without a buyer',
}) &&
(0, exports.validateType)({

@@ -473,0 +445,0 @@ argument: 'hasBeforeTransaction',

@@ -107,3 +107,3 @@ "use strict";

},
} }))).toBeFalsy();
} }))).toBeTruthy();
expect((0, validation_1.validate)(__assign(__assign({}, options), { buyerId: '123', buyer: {

@@ -113,3 +113,3 @@ billingDetails: {

},
} }))).toBeFalsy();
} }))).toBeTruthy();
});

@@ -116,0 +116,0 @@ });

{
"name": "@gr4vy/embed",
"version": "2.32.0",
"version": "2.33.0",
"description": "Embed a credit card form in your web app and store the card details, authorize the card, and capture a transaction.",

@@ -37,3 +37,3 @@ "main": "lib/index",

},
"gitHead": "1c7135d2a63935d4d9ecfcd8d0e2a2ff87468a67"
"gitHead": "58bd10c5bf918ba1f03ac333b0f323e38f6787bd"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc