@rebilly/instruments 3.36.0 → 3.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [3.37.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v3.36.1...instruments/core-v3.37.0) (2023-05-29)
2
+
3
+
4
+ ### Features
5
+
6
+ * **instruments:** Instruments deposit ([#379](https://github.com/Rebilly/rebilly/issues/379)) ([07cf230](https://github.com/Rebilly/rebilly/commit/07cf23008b08239a294782a79ca0dee0c1647306))
7
+
8
+ ## [3.36.1](https://github.com/Rebilly/rebilly/compare/instruments/core-v3.36.0...instruments/core-v3.36.1) (2023-05-27)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * Revert "neut(instruments): Instruments deposit ([#242](https://github.com/Rebilly/rebilly/issues/242))" ([#364](https://github.com/Rebilly/rebilly/issues/364)) ([9c97feb](https://github.com/Rebilly/rebilly/commit/9c97feb9001a9301ad3a0f8259f2e7de8ac57519))
14
+
1
15
  ## [3.36.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v3.35.1...instruments/core-v3.36.0) (2023-05-26)
2
16
 
3
17
 
package/dist/index.js CHANGED
@@ -65,4 +65,4 @@ function L(e){var t=_(e);return null===t?null:("hsl"===t.type&&(t.values=P(t.val
65
65
  * @version v2.1.1
66
66
  * @link http://noeldelgado.github.io/values.js/
67
67
  * @license MIT
68
- */var N=function(e,t){return null===e||isNaN(e)||"string"==typeof e?t:e},O=function(e,t,n){var r;void 0===e&&(e="#000"),void 0===t&&(t="base"),void 0===n&&(n=0),r=[[0,0,0],1,t,n],this.rgb=r[0],this.alpha=r[1],this.type=r[2],this.weight=r[3];var a=null===e?"#000":e;if("string"!=typeof a)throw new TypeError("Input should be a string: "+a);var o=_(a);if(!o)throw new Error("Unable to parse color from string: "+a);return this["_setFrom"+o.type.toUpperCase()](o.values.concat([o.alpha]))},R={hex:{configurable:!0}};return R.hex.get=function(){return this.hexString().replace(/^#/,"")},O.prototype.setColor=function(e){var t=_(e);return t?this["_setFrom"+t.type.toUpperCase()](t.values.concat([t.alpha])):null},O.prototype.tint=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#fff",this.rgbString(),t).rgba+")","tint",t)},O.prototype.shade=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#000",this.rgbString(),t).rgba+")","shade",t)},O.prototype.tints=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.tint((r+1)*t)}))},O.prototype.shades=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.shade((r+1)*t)}))},O.prototype.all=function(e){return void 0===e&&(e=10),this.tints(e).reverse().concat([Object.assign(this)],this.shades(e))},O.prototype.hexString=function(){return j(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha]))},O.prototype.rgbString=function(){var e=(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha])).join(", ");return(this.alpha>=1?"rgb":"rgba")+"("+e+")"},O.prototype.getBrightness=function(){return Math.round(this.rgb.reduce((function(e,t){return e+t}))/765*100)},O.prototype._setFromRGB=function(e){var t;return t=[[e[0],e[1],e[2]],e[3]],this.rgb=t[0],this.alpha=t[1],this},O.prototype._setFromHSL=function(e){var t,n=e[0],r=e[1],a=e[2],o=e[3];return t=[P([n,r,a]).map(Math.round),o],this.rgb=t[0],this.alpha=t[1],this},Object.defineProperties(O.prototype,R),O.VERSION="v2.1.1",O}()})),xm=$m;const Em=e=>new xm(e);function Sm(e,t=1){if(null===e)return e;const n=Em(e);return n.alpha=t,n.rgbString()}const _m=e=>Sm(e,.5),Pm=(e,t)=>{if(null===e)return e;return Em(e).shade(t).hexString()};function Am(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Im{constructor(e){Am(this,"allStyles",["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial","inherit"]),this.str=e||"";const t=this.allStyles.find((e=>this.str.includes(e))),n=this.str.split(t).map((e=>e.trim()));this.border=[n[0],t,n[1]]}get stylePosition(){let e=0;return 3===this.border.length?e=1:2===this.border.length&&(e=this.allStyles.includes(this.border[0])?0:1),e}updateColor(e){return this.border[this.stylePosition+1]=e,this}get value(){return this.border.join(" ")}}const jm={colorPrimary:{fallback:{type:"static",value:"#0044D4"}},colorBackground:{fallback:{type:"static",value:"#FFFFFF"}},colorText:{fallback:{type:"static",value:"#0D2B3E"}},colorMutedText:{fallback:{type:"func",value:e=>_m(e.colorText)}},colorMutedBorder:{fallback:{type:"func",value:e=>e.colorTextProvided?Sm(e.colorText,.25):"#DCE3EA"}},colorDanger:{fallback:{type:"static",value:"#CD5C5C"}},fontFamily:{fallback:{type:"static",value:"-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial sans-serif"}},fontSizeBase:{fallback:{type:"static",value:"16px"}},fontWeightBase:{fallback:{type:"static",value:"500"}},fontLineHeightBase:{fallback:{type:"func",value:e=>`calc(${e.fontSizeBase} * 1.5)`}},fontSmooth:{fallback:{type:"static",value:"auto"}},borderRadius:{fallback:{type:"static",value:"6px"}},headingFontFamily:{fallback:{type:"variable",value:"fontFamily"}},headingFontWeight:{fallback:{type:"static",value:"600"}},headingColorText:{fallback:{type:"variable",value:"colorText"}},buttonColorBackground:{fallback:{type:"variable",value:"colorPrimary"}},buttonColorText:{fallback:{type:"static",value:"#FFFFFF"}},buttonFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonBorder:{fallback:{type:"static",value:"1px solid transparent"}},buttonBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonBoxShadow:{fallback:{type:"static",value:"none"}},buttonSecondaryColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryColorText:{fallback:{type:"variable",value:"colorPrimary"}},buttonSecondaryFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonSecondaryFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonSecondaryFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonSecondaryFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonSecondaryBorder:{fallback:{type:"func",value:e=>`1px solid ${e.colorPrimary}`}},buttonSecondaryBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonSecondaryBoxShadow:{fallback:{type:"static",value:"none"}},buttonHoverColorBackground:{fallback:{type:"func",value:e=>e.buttonColorBackgroundProvided?Pm(e.buttonColorBackground,20):Pm(e.colorPrimary,20)}},buttonHoverColorText:{fallback:{type:"variable",value:"buttonColorText"}},buttonHoverFontFamily:{fallback:{type:"variable",value:"buttonFontFamily"}},buttonHoverFontSize:{fallback:{type:"variable",value:"buttonFontSize"}},buttonHoverFontLineHeight:{fallback:{type:"variable",value:"buttonFontLineHeight"}},buttonHoverFontWeight:{fallback:{type:"variable",value:"buttonFontWeight"}},buttonHoverBorder:{fallback:{type:"func",value:e=>{if(e.buttonBorderProvided)return e.buttonBorder;return new Im(e.buttonBorder).updateColor(e.buttonHoverColorBackground).value}}},buttonHoverBorderRadius:{fallback:{type:"variable",value:"buttonBorderRadius"}},buttonHoverBoxShadow:{fallback:{type:"variable",value:"buttonBoxShadow"}},buttonSecondaryHoverColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryHoverColorText:{fallback:{type:"variable",value:"buttonSecondaryColorText"}},buttonSecondaryHoverFontFamily:{fallback:{type:"variable",value:"buttonSecondaryFontFamily"}},buttonSecondaryHoverFontSize:{fallback:{type:"variable",value:"buttonSecondaryFontSize"}},buttonSecondaryHoverFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryFontLineHeight"}},buttonSecondaryHoverFontWeight:{fallback:{type:"variable",value:"buttonSecondaryFontWeight"}},buttonSecondaryHoverBorder:{fallback:{type:"variable",value:"buttonSecondaryBorder"}},buttonSecondaryHoverBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryBorderRadius"}},buttonSecondaryHoverBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryBoxShadow"}},buttonActiveColorBackground:{fallback:{type:"variable",value:"buttonHoverColorBackground"}},buttonActiveColorText:{fallback:{type:"variable",value:"buttonHoverColorText"}},buttonActiveFontFamily:{fallback:{type:"variable",value:"buttonHoverFontFamily"}},buttonActiveFontSize:{fallback:{type:"variable",value:"buttonHoverFontSize"}},buttonActiveFontLineHeight:{fallback:{type:"variable",value:"buttonHoverFontLineHeight"}},buttonActiveFontWeight:{fallback:{type:"variable",value:"buttonHoverFontWeight"}},buttonActiveBorder:{fallback:{type:"variable",value:"buttonHoverBorder"}},buttonActiveBorderRadius:{fallback:{type:"variable",value:"buttonHoverBorderRadius"}},buttonActiveBoxShadow:{fallback:{type:"variable",value:"buttonHoverBoxShadow"}},buttonSecondaryActiveColorBackground:{fallback:{type:"variable",value:"buttonSecondaryHoverColorBackground"}},buttonSecondaryActiveColorText:{fallback:{type:"variable",value:"buttonSecondaryHoverColorText"}},buttonSecondaryActiveFontFamily:{fallback:{type:"variable",value:"buttonSecondaryHoverFontFamily"}},buttonSecondaryActiveFontSize:{fallback:{type:"variable",value:"buttonSecondaryHoverFontSize"}},buttonSecondaryActiveFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontLineHeight"}},buttonSecondaryActiveFontWeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontWeight"}},buttonSecondaryActiveBorder:{fallback:{type:"variable",value:"buttonSecondaryHoverBorder"}},buttonSecondaryActiveBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderRadius"}},buttonSecondaryActiveBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryHoverBoxShadow"}},inputColorBackground:{fallback:{type:"static",value:"transparent"}},inputColorText:{fallback:{type:"variable",value:"colorText"}},inputFontFamily:{fallback:{type:"variable",value:"fontFamily"}},inputFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},inputFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},inputFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},inputBorder:{fallback:{type:"func",value:e=>`1px solid ${Pm(e.colorMutedBorder,4)}`}},inputBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},inputBoxShadow:{fallback:{type:"static",value:"none"}},inputHoverColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputHoverColorText:{fallback:{type:"variable",value:"inputColorText"}},inputHoverFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputHoverFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputHoverFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputHoverFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputHoverBorder:{fallback:{type:"variable",value:"inputBorder"}},inputHoverBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputHoverBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputFocusColorBackground:{fallback:{type:"variable",value:"inputHoverColorBackground"}},inputFocusColorText:{fallback:{type:"variable",value:"inputHoverColorText"}},inputFocusFontFamily:{fallback:{type:"variable",value:"inputHoverFontFamily"}},inputFocusFontSize:{fallback:{type:"variable",value:"inputHoverFontSize"}},inputFocusFontLineHeight:{fallback:{type:"variable",value:"inputHoverFontLineHeight"}},inputFocusFontWeight:{fallback:{type:"variable",value:"inputHoverFontWeight"}},inputFocusBorder:{fallback:{type:"func",value:e=>{if(e.inputHoverBorderProvided)return e.inputHoverBorder;return new Im(e.inputBorder).updateColor(e.colorPrimary).value}}},inputFocusBorderRadius:{fallback:{type:"variable",value:"inputHoverBorderRadius"}},inputFocusBoxShadow:{fallback:{type:"func",value:e=>`0 0 0 1px ${e.colorPrimary}`}},inputPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputColorTextProvided?_m(e.inputColorText):e.colorMutedText}},inputPlaceholderFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputPlaceholderFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputPlaceholderFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputSelectionColorText:{fallback:{type:"static",value:"initial"}},inputSelectionColorBackground:{fallback:{type:"static",value:"highlight"}},inputErrorColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputErrorColorText:{fallback:{type:"variable",value:"colorDanger"}},inputErrorFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputErrorFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputErrorFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputErrorFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputErrorBorder:{fallback:{type:"func",value:e=>{if(e.inputBorderProvided){return new Im(e.inputBorder).updateColor(e.colorDanger).value}return`1px solid ${e.colorDanger}`}}},inputErrorBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputErrorBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputErrorHoverColorBackground:{fallback:{type:"variable",value:"inputErrorColorBackground"}},inputErrorHoverColorText:{fallback:{type:"variable",value:"inputErrorColorText"}},inputErrorHoverFontFamily:{fallback:{type:"variable",value:"inputErrorFontFamily"}},inputErrorHoverFontSize:{fallback:{type:"variable",value:"inputErrorFontSize"}},inputErrorHoverFontLineHeight:{fallback:{type:"variable",value:"inputErrorFontLineHeight"}},inputErrorHoverFontWeight:{fallback:{type:"variable",value:"inputErrorFontWeight"}},inputErrorHoverBorder:{fallback:{type:"variable",value:"inputErrorBorder"}},inputErrorHoverBorderRadius:{fallback:{type:"variable",value:"inputErrorBorderRadius"}},inputErrorHoverBoxShadow:{fallback:{type:"variable",value:"inputErrorBoxShadow"}},inputErrorFocusColorBackground:{fallback:{type:"variable",value:"inputErrorHoverColorBackground"}},inputErrorFocusColorText:{fallback:{type:"variable",value:"inputErrorHoverColorText"}},inputErrorFocusFontFamily:{fallback:{type:"variable",value:"inputErrorHoverFontFamily"}},inputErrorFocusFontSize:{fallback:{type:"variable",value:"inputErrorHoverFontSize"}},inputErrorFocusFontLineHeight:{fallback:{type:"variable",value:"inputErrorHoverFontLineHeight"}},inputErrorFocusFontWeight:{fallback:{type:"variable",value:"inputErrorHoverFontWeight"}},inputErrorFocusBorder:{fallback:{type:"variable",value:"inputErrorHoverBorder"}},inputErrorFocusBorderRadius:{fallback:{type:"variable",value:"inputErrorHoverBorderRadius"}},inputErrorFocusBoxShadow:{fallback:{type:"variable",value:"inputErrorHoverBoxShadow"}},inputErrorPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputErrorColorTextProvided?_m(e.inputErrorColorText):_m(e.colorDanger)}},inputErrorPlaceholderFontFamily:{fallback:{type:"variable",value:"inputPlaceholderFontFamily"}},inputErrorPlaceholderFontSize:{fallback:{type:"variable",value:"inputPlaceholderFontSize"}},inputErrorPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputPlaceholderFontLineHeight"}},inputErrorPlaceholderFontWeight:{fallback:{type:"variable",value:"inputPlaceholderFontWeight"}},inputErrorSelectionColorText:{fallback:{type:"variable",value:"inputSelectionColorText"}},inputErrorSelectionColorBackground:{fallback:{type:"variable",value:"inputSelectionColorBackground"}},labels:{fallback:{type:"static",value:"floating"}}};var Cm=new Proxy(jm,{get(e,t,n){if(t in e){if(e[t].value)return e[t].value;const{type:r,value:a}=e[t].fallback;if("static"===r)return a;if("variable"===r)return`var(--rebilly-${a})`;if("func"===r)return a(n)}if(t.endsWith("Provided")){const n=t.replace("Provided","");if(n in e)return e[n].isProvided}},set:(e,t,n)=>{if(!(t in e)||!n)throw new Error(`Invalid theme option provided: ${t}`);return e[t].value=n,e[t].isProvided=!0,!0}});class Lm{constructor(e={}){this.overrides=e,this.theme=Cm}overrideTheme(){Object.keys(this.overrides).forEach((e=>{this.theme[e]=this.overrides[e]}))}get cssVars(){return Object.keys(this.theme).filter((e=>!Lm.nonCssProperties.includes(e))).map(((e,t)=>`${t?" ":""}--rebilly-${e}: ${this.theme[e]};`)).join("\n")}build(){return this.overrideTheme(),{cssVars:this.cssVars}}}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Lm,"nonCssProperties",["labels"]);function Tm(e){let t=e;return t=t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),t=t.replace(/\s{2,}/g," "),t=t.replace(/\s([{:}])\s/g,"$1"),t=t.replace(/([;,])\s/g,"$1"),t=t.replace(/\s!/g,"!"),t}var Nm=({options:{theme:e={},css:t}}={})=>{const n=(e=>{const t=`\n ${(e=>`\n/* Instruments 'global' variables\n------------------------------------------------------------ */\n:root {\n ${e.cssVars}\n\n --rebilly-fontWeight400: 400;\n --rebilly-fontWeight500: 500;\n --rebilly-fontWeight600: 600;\n --rebilly-fontScaleFactor: 1.5;\n --rebilly-fontScaleFactorS: 0.875;\n --rebilly-fontSizeS: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactorS));\n --rebilly-fontLineHeightS: calc(var(--rebilly-fontSizeS) * 1);\n\n --rebilly-fontSizeL: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactor));\n --rebilly-fontLineHeightL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-fontMarginTopL: 0;\n --rebilly-fontMarginBottomL: var(--rebilly-fontLineHeightBase);\n\n --rebilly-spacing2xs: calc(var(--rebilly-fontLineHeightBase) / 6);\n --rebilly-spacingXs: calc(var(--rebilly-fontLineHeightBase) / 4);\n --rebilly-spacingS: calc(var(--rebilly-fontLineHeightBase) / 2);\n --rebilly-spacingM: var(--rebilly-fontLineHeightBase);\n --rebilly-spacingL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-spacingXl: calc(var(--rebilly-fontLineHeightBase) * 4);\n\n --rebilly-spacingFormElementMinHeight: calc(var(--rebilly-spacingM) * 1.83333);\n\n --rebilly-summaryLoaderMinHeight: var(--rebilly-fontLineHeightBase);\n --rebilly-methodLoaderMinHeight: calc((4 * var(--rebilly-spacingFormElementMinHeight)) + (2 * var(--rebilly-fontLineHeightBase)) + (2 * var(--rebilly-spacingM)) + var(--rebilly-spacing2xs) + var(--rebilly-fontSizeS) + calc(2 * (var(--rebilly-spacingXs) + var(--rebilly-spacingS))) + var(--rebilly-spacingL));\n}\n\n/* Base, Typography\n------------------------------------------------------------ */\n/* Base setup for top level elements */\n.rebilly-instruments-content {\n color: var(--rebilly-colorText);\n background: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeBase);\n font-weight: var(--rebilly-fontWeightBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-fontFamily);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: left;\n transition: all 200ms;\n font-smooth: var(--rebilly-fontSmooth);\n padding: 2px;\n font-display: swap;\n}\n\n/* Views. Method Selector\n------------------------------------------------------------ */\n.rebilly-instruments-method-selector.has-express-compact {\n padding-top: var(--rebilly-spacingS);\n}\n\n/* Express Methods\n------------------------------------------------------------ */\n@-webkit-keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n@keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n\n.rebilly-instruments-express-methods { padding: 2px; }\n\n.rebilly-instruments-express-methods.is-compact {\n border: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS);\n padding-top: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS));\n padding-top: calc(var(--rebilly-fontSizeBase) + var(--rebilly-spacing2xs));\n border-radius: var(--rebilly-borderRadius);\n position: relative;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-iframe {\n display: block;\n margin-bottom: 0;\n height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {\n border-radius: 6px;\n margin-bottom: var(--rebilly-spacingS);\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n min-height: 48px;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0px;\n max-width: 260px;\n margin: 0 var(--rebilly-spacingXs);\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {\n margin-left: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin-right: 0;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-label {\n display: none;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {\n position: absolute;\n font-family: var(--rebilly-fontFamily);\n top: 0; left: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n color: var(--rebilly-colorText);\n padding: var(--rebilly-spacing2xs) var(--rebilly-spacingM);\n line-height: 1;\n background: var(--rebilly-colorBackground);\n display: inline-block;\n font-weight: var(--rebilly-fontWeightBase);\n min-height: auto;\n margin: 0;\n white-space: nowrap;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method {\n border-radius: 100px;\n}\n\n@media (max-width: 600px) {\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n max-width: 100%;\n margin: 0 0 var(--rebilly-spacingS);\n }\n \n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n }\n}\n\n/* Components. Divider\n------------------------------------------------------------ */\n.rebilly-instruments-divider {\n line-height: var(--rebilly-fontLineHeightBase);\n padding: var(--rebilly-spacingM) 0;\n margin: 0;\n position: relative;\n outline: 0;\n border: 0;\n text-align: center;\n font-family: var(--rebilly-fontFamily);\n}\n\n.rebilly-instruments-divider-s { padding: var(--rebilly-spacingS) 0; }\n.rebilly-instruments-divider-xs { padding: var(--rebilly-spacingXs) 0; }\n\n.rebilly-instruments-divider::before {\n background: var(--rebilly-colorMutedBorder);\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n height: 1px;\n}\n\n.rebilly-instruments-divider .rebilly-instruments-divider-label {\n color: var(--rebilly-colorMutedText);\n font-weight: var(--rebilly-fontWeightBase);\n padding: 0 var(--rebilly-spacingM);\n line-height: var(--rebilly-fontLineHeightS);\n background-color: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeS);\n position: relative;\n display: inline-block;\n}\n\n/* Components. Icons\n------------------------------------------------------------ */\n.rebilly-instruments-icon {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n/* Components. Forms. Checkboxes\n------------------------------------------------------------ */\n.rebilly-instruments-form-field-checkbox {\n position: relative;\n opacity: 1;\n align-items: center;\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n cursor: pointer;\n transform: none;\n}\n\n.rebilly-instruments-form-field-checkbox > * {\n cursor: pointer;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.rebilly-instruments-form-field-checkbox span {\n position: relative;\n top: 0;\n left: 0;\n width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n min-width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n border-radius: 4px;\n box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);\n margin-right: var(--rebilly-spacingS);\n background-color: transparent;\n transition: all 200ms;\n}\n\n.rebilly-instruments-form-field-checkbox span:after {\n content: '';\n position: absolute;\n border: solid var(--rebilly-colorPrimary);\n width: calc(var(--rebilly-spacingXs) + var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingXs) - var(--rebilly-spacing2xs) + 2px);\n border-width: 2px 2px 0 0;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n opacity: 0;\n transform: translateY(-60%) translateX(-50%) rotate(135deg);\n transition: all 0.2s ease;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {\n opacity: 1;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {\n opacity: 0.6;\n}\n\n/* Vendor, Postmate\n------------------------------------------------------------ */\n.rebilly-instruments-iframe {\n border: none;\n width: 100%;\n height: 0;\n padding: 0;\n}\n\n.rebilly-instruments-iframe-overlay {\n top: -2px;\n left: -2px;\n width: calc(100vw + 2px);\n height: 100vh;\n min-height: calc(100vh + 4px);\n position: fixed;\n z-index: 99999999999999;\n}\n\n/* Views. Modal\n------------------------------------------------------------ */\n.rebilly-instruments-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 1055;\n padding: 30px;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n -webkit-transition: all 0.12s ease-in-out;\n transition: all 0.12s ease-in-out;\n background-color: rgba(0,0,0,0.7);\n opacity: 0\n}\n\n.rebilly-instruments-modal-overlay.is-visible {\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container {\n -webkit-transition: all .24s ease-in-out;\n transition: all .24s ease-in-out;\n position: relative;\n max-width: 750px;\n background: var(--rebilly-colorBackground);\n margin: 50px auto 20px;\n -webkit-box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n border-radius: 4px;\n -webkit-transform: translateY(-50px);\n transform: translateY(-50px);\n opacity: 0;\n}\n\n.rebilly-instruments-modal-container.is-visible {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container.is-redirect {\n max-width: 60vw;\n width: auto;\n}\n\n.rebilly-instruments-modal-content {\n -webkit-transition: all .15s;\n transition: all .15s;\n padding: 20px;\n overflow: hidden;\n background-color: var(--rebilly-colorBackground);\n text-align: center;\n border-radius: 4px;\n}\n\n.rebilly-instruments-modal-content .rebilly-instruments-iframe {\n -webkit-transition: all .15s;\n transition: all .15s;\n height: auto;\n min-height: 360px;\n}\n\n.rebilly-instruments-modal-container.is-redirect .rebilly-instruments-modal-content {\n padding: 0;\n}\n\n.rebilly-instruments-modal-close {\n position: absolute;\n width: 30px;\n height: 30px;\n top: -40px;\n right: 0;\n fill: #FFF;\n cursor: pointer;\n}\n\n.rebilly-instruments-modal-close:hover{\n color: #000;\n}\n\n@media screen and (max-width: 480px) {\n .rebilly-instruments-modal-container.is-redirect {\n max-width: 96vw;\n margin: 20px auto 20px;\n }\n}\n\n/* Components. Loader\n------------------------------------------------------------ */\n.rebilly-instruments-loader {\n text-align: left;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background-color: var(--rebilly-colorBackground);\n z-index: 1000;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader.is-active {\n display: block;\n}\n\n/* Type */\n.rebilly-instruments-loader p {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n.rebilly-instruments-loader small {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: 1;\n}\n\n/* Summary */\n.rebilly-instruments-summary-loader-total p.total {\n font-family: var(--rebilly-fontFamily);\n font-size: var(--rebilly-fontSizeL);\n font-weight: var(--rebilly-headingFontWeight);\n}\n\n/* Methods */\n.rebilly-instruments-methods-loader-card-icon {\n width: calc(var(--rebilly-fontLineHeightBase) + 10px);\n height: var(--rebilly-fontLineHeightBase);\n margin-left: var(--rebilly-spacing2xs);\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-methods-loader-form-fields { margin: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS)) 0; }\n\n/* Spinner */\n.rebilly-instruments-loader-spinner {\n top: 50%;\n left: 50%;\n position: absolute;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: 2px solid transparent;\n border-top: 2px solid var(--rebilly-colorPrimary);\n border-radius: 50%;\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n margin-top: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n margin-left: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n -webkit-animation: spin 0.5s ease infinite;\n animation: spin 0.5s ease infinite;\n}\n\n@-webkit-keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n/* Utils */\n.rebilly-instruments-loader-display-flex { display: -webkit-box; display: -ms-flexbox; display: flex; }\n.rebilly-instruments-loader-align-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }\n.rebilly-instruments-loader-justify-space-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }\n.rebilly-instruments-loader-justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }\n\n.is-el-loading {\n position: relative;\n color: transparent!important;\n}\n\n.is-el-loading::before {\n position: absolute;\n content: '';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader-form-el {\n width: 100%;\n min-height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-loader-form-label {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-loader-form-el.is-button {\n margin-top: var(--rebilly-spacingL);\n text-align: center;\n font-size: var(--rebilly-buttonFontSize);\n font-family: var(--rebilly-buttonFontFamily);\n line-height: var(--rebilly-buttonFontLineHeight);\n padding: var(--rebilly-spacingS);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background: var(--rebilly-buttonColorBackground);\n color: transparent;\n border-radius: var(--rebilly-buttonBorderRadius);\n font-weight: var(--rebilly-buttonFontWeight);\n border: var(--rebilly-buttonBorder);\n -webkit-box-shadow: var(--rebilly-buttonBoxShadow);\n box-shadow: var(--rebilly-buttonBoxShadow);\n outline: none;\n cursor: not-allowed;\n opacity: 0.6; \n}\n\n.rebilly-instruments-methods-loader-card-icon.is-el-loading::before {\n border-radius: calc(var(--rebilly-borderRadius) / 2);\n}\n\n/* Error\n------------------------------------------------------------ */\n.rebilly-instruments-error-card {\n border: 1px solid var(--rebilly-colorDanger);\n border-radius: var(--rebilly-borderRadius);\n text-align: left;\n padding: var(--rebilly-spacingS);\n margin-bottom: var(--rebilly-spacingL);\n}\n\n.rebilly-instruments-error-card-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n width: 100%;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n.rebilly-instruments-error-card-title {\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-headingFontFamily);\n margin: 0 0 var(--rebilly-spacingS);\n color: var(--rebilly-colorDanger);\n}\n\n.rebilly-instruments-error-card-close-button {\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n}\n\n.rebilly-instruments-error-card-close-button svg {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n.rebilly-instruments-error-card-details {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.rebilly-instruments-error-card-details li,\n.rebilly-instruments-error-card-message {\n color: var(--rebilly-colorText);\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n\n/* Bump offer\n------------------------------------------------------------ */\n.rebilly-instruments-bump-offers {\n text-align: left;\n margin-bottom: calc(var(--rebilly-spacingM) + var(--rebilly-fontSizeS));\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-form-field-checkbox {\n margin-bottom: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-bump-offer-label {\n width: 100%;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item {\n border-bottom: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS) 0;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.rebilly-instruments-bump-offer-line-item:first-child {\n padding-top: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure {\n margin: 0 var(--rebilly-spacingS) 0 0;\n flex: 0 0 auto;\n width: 48px;\n height: 48px;\n border-radius: var(--rebilly-borderRadius);\n border: 1px solid var(--rebilly-colorMutedBorder);\n overflow: hidden;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure img {\n width: 100%;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis {\n flex: 1 2 auto;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-title {\n margin: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-description {\n color: var(--rebilly-colorMutedText);\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: var(--rebilly-fontLineHeightS);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--rebilly-colorMutedText);\n margin: 0 0 0 var(--rebilly-spacingS);\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown .rebilly-instruments-icon {\n fill: var(--rebilly-colorMutedText);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown-unit-price {\n color: var(--rebilly-colorText);\n}\n`)(new Lm(e).build())}\n `;return t})(e||{});return jd({element:"style",attributes:{type:"text/css"},content:Tm(n),target:"head"}),t&&jd({element:"style",attributes:{type:"text/css"},content:Tm(t),target:"head"}),n};const Om=()=>{Yr.translate.init(Yr.options.locale,Yr.options.i18n),Yr.translate.translateItems()};var Rm,Mm=()=>{var e,t;if("auto"===Yr.options.locale&&null!==(e=Yr.data.riskMetadata)&&void 0!==e&&null!==(t=e.browserData)&&void 0!==t&&t.language){const{browserData:{language:e}}=Yr.data.riskMetadata;Yr.options.locale=e}return Yr.translate.init(Yr.options.locale,Yr.options.i18n),Om},Fm=function(e){if("Function"===x(e))return w(e)},Hm=Object.keys||function(e){return $t(e,xt)},Dm=l&&!Ie?Object.defineProperties:function(e,t){Le(e);for(var n,r=j(t),a=Hm(t),o=a.length,i=0;o>i;)De.f(e,n=a[i++],r[n]);return e},Bm={f:Dm},qm=M("document","documentElement"),Vm="prototype",zm="script",Wm=et("IE_PROTO"),Um=function(){},Gm=function(e){return"<"+zm+">"+e+"</"+zm+">"},Zm=function(e){e.write(Gm("")),e.close();var t=e.parentWindow.Object;return e=null,t},Xm=function(){try{Rm=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Xm="undefined"!=typeof document?document.domain&&Rm?Zm(Rm):(t=Ee("iframe"),n="java"+zm+":",t.style.display="none",qm.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Gm("document.F=Object")),e.close(),e.F):Zm(Rm);for(var r=xt.length;r--;)delete Xm[Vm][xt[r]];return Xm()};tt[Wm]=!0;var Km,Jm,Ym,Qm=Object.create||function(e,t){var n;return null!==e?(Um[Vm]=Le(e),n=new Um,Um[Vm]=null,n[Wm]=e):n=Xm(),void 0===t?n:Bm.f(n,t)},ef=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),tf=et("IE_PROTO"),nf=Object,rf=nf.prototype,af=ef?nf.getPrototypeOf:function(e){var t=se(e);if(ce(t,tf))return t[tf];var n=t.constructor;return N(n)&&t instanceof n?n.prototype:t instanceof nf?rf:null},of=ge("iterator"),sf=!1;[].keys&&("next"in(Ym=[].keys())?(Jm=af(af(Ym)))!==Object.prototype&&(Km=Jm):sf=!0);var lf=!R(Km)||s((function(){var e={};return Km[of].call(e)!==e}));lf&&(Km={}),N(Km[of])||ct(Km,of,(function(){return this}));var cf={IteratorPrototype:Km,BUGGY_SAFARI_ITERATORS:sf},uf=De.f,df=ge("toStringTag"),pf=function(e,t,n){e&&!n&&(e=e.prototype),e&&!ce(e,df)&&uf(e,df,{configurable:!0,value:t})},mf=cf.IteratorPrototype,ff=function(e,t){return{value:e,done:t}},hf=ge("match"),yf=function(){var e=Le(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},gf=RegExp.prototype,vf=function(e){var t=e.flags;return void 0!==t||"flags"in gf||ce(e,"flags")||!F(gf,e)?t:d(yf,e)},bf=function(){},wf=[],kf=M("Reflect","construct"),$f=/^\s*(?:class|function)\b/,xf=w($f.exec),Ef=!$f.exec(bf),Sf=function(e){if(!N(e))return!1;try{return kf(bf,wf,e),!0}catch(e){return!1}},_f=function(e){if(!N(e))return!1;switch(Jt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ef||!!xf($f,Ke(e))}catch(e){return!0}};_f.sham=!0;var Pf,Af,If=!kf||s((function(){var e;return Sf(Sf.call)||!Sf(Object)||!Sf((function(){e=!0}))||e}))?_f:Sf,jf=TypeError,Cf=ge("species"),Lf=function(e,t){var n,r=Le(e).constructor;return void 0===r||P(n=Le(r)[Cf])?t:function(e){if(If(e))return e;throw jf(K(e)+" is not a constructor")}(n)},Tf=w("".charAt),Nf=w("".charCodeAt),Of=w("".slice),Rf=function(e){return function(t,n){var r,a,o=Qt(I(t)),i=mt(n),s=o.length;return i<0||i>=s?e?"":void 0:(r=Nf(o,i))<55296||r>56319||i+1===s||(a=Nf(o,i+1))<56320||a>57343?e?Tf(o,i):r:e?Of(o,i,i+2):a-56320+(r-55296<<10)+65536}},Mf={codeAt:Rf(!1),charAt:Rf(!0)}.charAt,Ff=i.RegExp,Hf=s((function(){var e=Ff("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Df=Hf||s((function(){return!Ff("a","y").sticky})),Bf={BROKEN_CARET:Hf||s((function(){var e=Ff("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Df,UNSUPPORTED_Y:Hf},qf=i.RegExp,Vf=s((function(){var e=qf(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),zf=i.RegExp,Wf=s((function(){var e=zf("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Uf=st.get,Gf=oe("native-string-replace",String.prototype.replace),Zf=RegExp.prototype.exec,Xf=Zf,Kf=w("".charAt),Jf=w("".indexOf),Yf=w("".replace),Qf=w("".slice),eh=(Af=/b*/g,d(Zf,Pf=/a/,"a"),d(Zf,Af,"a"),0!==Pf.lastIndex||0!==Af.lastIndex),th=Bf.BROKEN_CARET,nh=void 0!==/()??/.exec("")[1];(eh||nh||th||Vf||Wf)&&(Xf=function(e){var t,n,r,a,o,i,s,l=this,c=Uf(l),u=Qt(e),p=c.raw;if(p)return p.lastIndex=l.lastIndex,t=d(Xf,p,u),l.lastIndex=p.lastIndex,t;var m=c.groups,f=th&&l.sticky,h=d(yf,l),y=l.source,g=0,v=u;if(f&&(h=Yf(h,"y",""),-1===Jf(h,"g")&&(h+="g"),v=Qf(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==Kf(u,l.lastIndex-1))&&(y="(?: "+y+")",v=" "+v,g++),n=new RegExp("^(?:"+y+")",h)),nh&&(n=new RegExp("^"+y+"$(?!\\s)",h)),eh&&(r=l.lastIndex),a=d(Zf,f?n:l,v),f?a?(a.input=Qf(a.input,g),a[0]=Qf(a[0],g),a.index=l.lastIndex,l.lastIndex+=a[0].length):l.lastIndex=0:eh&&a&&(l.lastIndex=l.global?a.index+a[0].length:r),nh&&a&&a.length>1&&d(Gf,a[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(a[o]=void 0)})),a&&m)for(a.groups=i=Qm(null),o=0;o<m.length;o++)i[(s=m[o])[0]]=a[s[1]];return a});var rh=Xf,ah=TypeError,oh=ge("matchAll"),ih="RegExp String",sh=ih+" Iterator",lh=st.set,ch=st.getterFor(sh),uh=RegExp.prototype,dh=TypeError,ph=Fm("".indexOf),mh=Fm("".matchAll),fh=!!mh&&!s((function(){mh("a",/./)})),hh=function(e,t,n,r){var a=t+" Iterator";return e.prototype=Qm(mf,{next:y(+!r,n)}),pf(e,a,!1),e}((function(e,t,n,r){lh(this,{type:sh,regexp:e,string:t,global:n,unicode:r,done:!1})}),ih,(function(){var e=ch(this);if(e.done)return ff(void 0,!0);var t=e.regexp,n=e.string,r=function(e,t){var n=e.exec;if(N(n)){var r=d(n,e,t);return null!==r&&Le(r),r}if("RegExp"===x(e))return d(rh,e,t);throw ah("RegExp#exec called on incompatible receiver")}(t,n);return null===r?(e.done=!0,ff(void 0,!0)):e.global?(""===Qt(r[0])&&(t.lastIndex=function(e,t,n){return t+(n?Mf(e,t).length:1)}(n,gt(t.lastIndex),e.unicode)),ff(r,!1)):(e.done=!0,ff(r,!1))})),yh=function(e){var t,n,r,a=Le(this),o=Qt(e),i=Lf(a,RegExp),s=Qt(vf(a));return t=new i(i===RegExp?a.source:a,s),n=!!~ph(s,"g"),r=!!~ph(s,"u"),t.lastIndex=gt(a.lastIndex),new hh(t,o,n,r)};function gh(e){const t={};return function(e){const t={};function n(e){const r=e.match(/var\((.+?)\)/g);if(r){let a=e;return r.forEach((n=>{const r=n.match(/\((.*)\)/i)[1];a=e.replace(n,t[r])})),n(a)}return e}return[...e.matchAll(/(--rebilly.*(?=:))[:\s](.*(?=;))/g)].forEach((e=>{t[e[1]]=e[2].trim()})),Object.entries(t).map((([e,t])=>[e,n(t)]))}(e).forEach((([e,n])=>{t[e]=n})),t}Ht({target:"String",proto:!0,forced:fh},{matchAll:function(e){var t,n,r,a=I(this);if(P(e)){if(fh)return mh(a,e)}else{if(function(e){var t;return R(e)&&(void 0!==(t=e[hf])?!!t:"RegExp"==x(e))}(e)&&(t=Qt(I(vf(e))),!~ph(t,"g")))throw dh("`.matchAll` does not allow non-global regexes");if(fh)return mh(a,e);if(r=Q(e,oh))return d(r,e,a)}return n=Qt(a),new RegExp(e,"g")[oh](n)}}),oh in uh||ct(uh,oh,yh);const vh=(e,t="")=>({color:e[`--rebilly-${t}ColorText`],fontFamily:e[`--rebilly-${t}FontFamily`],fontSize:e[`--rebilly-${t}FontSize`],fontWeight:e[`--rebilly-${t}FontWeight`],lineHeight:e[`--rebilly-${t}FontLineHeight`],background:e[`--rebilly-${t}ColorBackground`],boxShadow:e[`--rebilly-${t}BoxShadow`]});var bh=({options:e={}})=>{const t=gh(`\n ${Yr.mainStyleVars}\n ${e.css||""}\n `);return{base:{...vh(t,"input"),":hover":vh(t,"inputHover"),":focus":vh(t,"inputFocus"),"::placeholder":vh(t,"inputPlaceholder"),"::selection":vh(t,"inputSelection")},invalid:{...vh(t,"inputError"),":hover":vh(t,"inputErrorHover"),":focus":vh(t,"inputErrorFocus"),"::placeholder":vh(t,"inputErrorPlaceholder"),"::selection":vh(t,"inputErrorSelection")},buttons:{base:{...vh(t,"buttonSecondary"),":hover":vh(t,"buttonSecondaryHover"),":focus":vh(t,"buttonSecondaryActive")},active:{...vh(t,"button"),":hover":vh(t,"buttonHover"),":focus":vh(t,"buttonActive")}}}};function wh({eventName:e,callback:t}){if(!Ii.includes(e))throw new Error(`${e} is not a supported event`);const n=yo(e);Ai[n].addEventListener(t)}const kh=(e,t)=>`\n <div class="rebilly-instruments-modal-overlay">\n <div class="rebilly-instruments-modal-container ${t?`rebilly-instruments-${t}`:""} ${e?"is-redirect":""}">\n ${e?"":'\n <svg class="rebilly-instruments-modal-close" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <path d="m15 13.5858 7.2929-7.293c.3905-.3904 1.0237-.3904 1.4142 0 .3905.3906.3905 1.0238 0 1.4143L16.4142 15l7.293 7.2929c.3904.3905.3904 1.0237 0 1.4142-.3906.3905-1.0238.3905-1.4143 0L15 16.4142l-7.2929 7.293c-.3905.3904-1.0237.3904-1.4142 0-.3905-.3906-.3905-1.0238 0-1.4143L13.5858 15l-7.293-7.2929c-.3904-.3905-.3904-1.0237 0-1.4142.3906-.3905 1.0238-.3905 1.4143 0L15 13.5858Z" fill-rule="nonzero"/>\n </svg>\n '}\n <div class="rebilly-instruments-modal-content"></div>\n </div>\n </div>\n`;async function $h({name:e="",url:t="",model:n={},classListArray:r=[],close:a=(()=>{})}={}){var o;const i=null==n||null===(o=n.method)||void 0===o?void 0:o.method,s="rebilly-instruments-approval-url"===e;Yr.form.insertAdjacentHTML("beforeend",kh(s,i));const l=document.querySelector(".rebilly-instruments-modal-overlay"),c=document.querySelector(".rebilly-instruments-modal-container"),u=document.querySelector(".rebilly-instruments-modal-close"),d=document.querySelector(".rebilly-instruments-modal-content");document.body.style.overflow="hidden",setTimeout((()=>{l.classList.add("is-visible"),c.classList.add("is-visible")}),240),Yr.loader.addDOMElement({section:"modal",el:d}),Yr.loader.startLoading({section:"modal",id:e});const p={options:Yr.toModel().options,...n},m=await new Mi({name:e,url:t,model:p,classListArray:r,container:d}),f=(...e)=>{c.classList.remove("is-visible"),l.classList.remove("is-visible"),setTimeout((()=>{document.body.style.overflow="auto";const t=l.children;for(let e=0;e<t.length;e+=1)t[e].remove();l.remove(),a(...e),m.destroy()}),300)};return m.bindEventListeners({close:f,loader:Yr.loader}),s||u.addEventListener("click",f),m}async function xh({payload:e}){var t,n,r,a,o;const{_raw:{id:i},isExistingInstrument:s}=e;delete e.isExistingInstrument,delete e._raw;const l={...e};s?l.paymentInstrumentId=i:l.token=i,null!==(t=Yr.options)&&void 0!==t&&t.invoiceId&&(l.invoiceId=Yr.options.invoiceId),null!==(n=Yr.options)&&void 0!==n&&n.transactionId&&(l.transactionId=Yr.options.transactionId),null!==(r=Yr.options)&&void 0!==r&&r.money&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.options.money.amount,l.currency=Yr.options.money.currency),null!==(a=Yr.options)&&void 0!==a&&a.deposit&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.data.amountAndCurrency.amount,l.currency=Yr.data.amountAndCurrency.currency),null!==(o=Yr.data)&&void 0!==o&&o.couponIds&&Array.isArray(Yr.data.couponIds)&&(l.couponIds=Yr.data.couponIds);let{fields:c}=await async function({data:e}){return uc((async()=>{const{token:t,transactionId:n,invoiceId:r,websiteId:a,paymentInstrumentId:o}=e,i=["riskMetadata","redirectUrl"];return t&&i.push("token"),o&&i.push("paymentInstrumentId"),n&&i.push("transactionId"),r&&i.push("invoiceId"),a&&i.push("amount","currency","websiteId"),Object.keys(e).forEach((t=>{i.includes(t)||delete e[t]})),Yr.storefront.purchase.payment({data:e})}))}({state:Yr,data:l});return c={transaction:c,token:c.token||Yr.options.jwt},Yr.data.invoice&&(c.invoice=Yr.data.invoice),c}async function Eh({payload:e}){const t={websiteId:Yr.options.websiteId,paymentInstruction:{token:e._raw.id},...e};Yr.data.acceptBumpOffer?t.items=Yr.options.bumpOffer:t.items=yc(Yr.options.items),Yr.data.couponIds&&Array.isArray(Yr.data.couponIds)&&(t.couponIds=Yr.data.couponIds),Yr.options.addons&&Yr.data.addons&&Array.isArray(Yr.data.addons)&&Yr.options.addons.forEach((e=>{Yr.data.addons.includes(e.planId)&&t.items.push(e)}));const{fields:n}=await async function({data:e}){return uc((async()=>{const t=["websiteId","paymentInstruction","items","billingAddress","deliveryAddress","shippingRateId","couponIds","password","redirectUrl"];return Object.keys(e).forEach((n=>{t.includes(n)||delete e[n]})),Yr.storefront.purchase.purchase({data:e})}))}({state:Yr,data:t});return n}async function Sh({payload:e}){Object.keys(e).forEach((t=>{null===e[t]&&delete e[t]}));try{var t,n;let r;return r=Yr.data.isPayment?await xh({state:Yr,payload:e}):await Eh({state:Yr,payload:e}),null!==(t=r.transaction)&&void 0!==t&&t.approvalUrl&&"unknown"===(null===(n=r.transaction)||void 0===n?void 0:n.result)?function({fields:e,payload:t}){var n,r;if(t.redirectUrl||null===(n=e.transaction)||void 0===n||!n.approvalUrl){const{paymentMethodsUrl:t}=Yr.options._computed,n=JSON.parse(JSON.stringify(e)),r={};Yr.data.isPayment?r.payment=n:r.purchase=n,Yr.data=new fd({...e}),$h({state:Yr,name:"rebilly-instruments-approval-url",url:`${t}/approval-url`,model:r,close:e=>{Ai.purchaseCompleted.dispatch(e)}})}else if(null!==(r=e.transaction)&&void 0!==r&&r.approvalUrl){var a;window.location=null===(a=e.transaction)||void 0===a?void 0:a.approvalUrl}}({state:Yr,fields:r,payload:e}):Ai.purchaseCompleted.dispatch(r),r}catch(e){return Ti(e),e}}async function _h({payload:e}){try{var t;const{_raw:{id:n},isExistingInstrument:r}=e;delete e.isExistingInstrument,delete e._raw;const a={...e};r?a.paymentInstrumentId=n:a.token=n;const{instrument:o,transaction:i}=await async function({data:e}){return uc((async()=>{var t,n;const{fields:r}=await Yr.storefront.paymentInstruments.create({data:e});Yr.storefront.setSessionToken(r.token||Yr.options.jwt);const a={id:r.id,data:{websiteId:Yr.options.websiteId,...e}};Yr.data.amountAndCurrency&&(a.data={...a.data,...Yr.data.amountAndCurrency}),null!==(t=Yr.data)&&void 0!==t&&null!==(n=t.transaction)&&void 0!==n&&n.redirectUrl&&(a.data.redirectUrl=`${a.data.redirectUrl}&originalRedirectUrl=${Yr.data.transaction.redirectUrl}`);const{fields:o}=await Yr.storefront.paymentInstruments.setup(a);return{instrument:r,transaction:o}}))}({data:{websiteId:null===(t=Yr.options)||void 0===t?void 0:t.websiteId,...a}});if(Yr.data=new fd({instrument:o,transaction:i}),i.approvalUrl&&"unknown"===i.result){const{paymentMethodsUrl:e}=Yr.options._computed;$h({name:"rebilly-instruments-approval-url",url:`${e}/approval-url`,model:{setup:{transaction:i}},close:({transaction:e=i})=>{Ai.setupCompleted.dispatch({instrument:o,transaction:e})}})}else Ai.setupCompleted.dispatch({instrument:o,transaction:i});return{instrument:o,transaction:i}}catch(e){return Ti(e),e}}async function Ph({componentName:e,payload:t}){switch(e){case"result":_d(),async function({payload:e}){var t,n;const r=Jr.form;r||await Id();const a=Yr.toModel(),o={options:a.options,mainStyleVars:a.mainStyleVars,[Yr.options.transactionType]:e};null==r||null===(t=r.component)||void 0===t||t.call("route",{name:"result"}),null==r||null===(n=r.component)||void 0===n||n.call("update",o)}({payload:t});break;case"confirmation":_d(),async function({payload:e}){var t,n,r,a;e.billingAddress&&Yr.summary&&Yr.data.isPurchase&&kc({instrument:e});const o=Jr.form;o||await Id();const i=Yr.toModel(),s={options:i.options,data:i.data,mainStyleVars:i.mainStyleVars,instrument:e};null==o||null===(t=o.component)||void 0===t||t.call("route",{name:"confirmation"}),null==o||null===(n=o.component)||void 0===n||n.call("update",s),null==o||null===(r=o.component)||void 0===r||r.on(`${o.name}-confirm-purchase`,(e=>{Sh({payload:e})})),null==o||null===(a=o.component)||void 0===a||a.on(`${o.name}-confirm-setup`,(e=>{_h({payload:e})}))}({payload:t});break;default:throw new Error(`'${e}' not a supported component`)}}function Ah({state:e,payload:t}){Ph({componentName:"result",payload:t,state:e})}var Ih=({state:e={}})=>{e.options.features.autoConfirmation&&wh({eventName:"instrument-ready",callback:t=>{var n;if("paypal"===(null===(n=t._raw)||void 0===n?void 0:n.method)&&!e.data.isShippingRequired)return"setup"===e.options.transactionType?_h({state:e,payload:t}):Sh({state:e,payload:t}),void e.loader.startLoading({state:e,id:"express-purchase",message:"form.loaderMessages.processingPayment"});Ph({componentName:"confirmation",payload:t,state:e})}}),e.options.features.autoResult&&(wh({eventName:"purchase-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Ah({state:e,payload:t})}}),wh({eventName:"setup-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Ah({state:e,payload:t})}}))};async function jh({setupFramepay:e=km,...t}={}){try{var n,r,a;Yr.data={},Yr.options={},Yr.form=Cd({element:"form",options:t}),Yr.summary=Cd({element:"summary",options:t}),Yr.form.style.maxWidth="750px",Yr.summary&&(Yr.summary.style.maxWidth="750px"),Yr.options=wm({options:t}),Yr.storefront=Ld({options:t}),Yr.mainStyleVars=Nm({options:t}),Yr.options.themeFramepay=bh({options:t}),Yr.loader.addDOMElement({el:Yr.form}),Yr.loader.addDOMElement({section:"summary",el:Yr.summary}),Yr.loader.startLoading({section:"summary",id:"rebilly-instruments-summary"}),Yr.loader.startLoading({id:"rebilly-instruments-form"});const[o]=await Promise.all([hd(),e()]);Yr.data=o,Ai.dataReady.dispatch(Yr.data),Yr.i18n=Mm(),!Yr.options.websiteId&&null!==(n=Yr.data.transaction)&&void 0!==n&&n.websiteId?Yr.options.websiteId=Yr.data.transaction.websiteId:!Yr.options.websiteId&&null!==(r=Yr.data.invoice)&&void 0!==r&&r.websiteId&&(Yr.options.websiteId=Yr.data.invoice.websiteId),Yr.data.transaction&&"setup"===(null===(a=Yr.data.transaction)||void 0===a?void 0:a.type)&&(Yr.options.transactionType="setup"),Yr.form&&Id().then((()=>{var e;null!==(e=Yr.options)&&void 0!==e&&e.deposit?kd():Pd()})),Yr.summary&&wc(),Yr.i18n({state:Yr}),Yr.hasMounted=!0,o.readyToPay.length||(Yr.loader.stopLoading({id:"rebilly-instruments-form"}),Ti(Yr.translate.getTranslation("form.error.noPaymentMethods")))}catch(e){throw Ti(e),e}Ih({state:Yr})}async function Ch(){var e;await(e=1e3,new Promise((t=>setTimeout(t,e)))),Object.keys(Jr).forEach((e=>{Jr.hasFrame(e)&&(Jr[e].destroy(),Jr[e]=null)})),_i.removeAll(document),Yr.hasMounted=!1,Yr.summary&&(Yr.summary.textContent=""),Yr.form.textContent="",Kl.cancelAll(),Yr.loader.clearAll()}var Lh=new class{constructor(){this.state=Yr,this.iframes=Jr}async mount(e){await jh(e)}async destroy(){await Ch()}async update(e){await async function({newOptions:e={}}){if(!Yr.hasMounted)throw Error("Update method cannot be called before mounting instruments");const t=Gr({...Yr.options},e);await Ch(),jh({form:Yr.form,summary:Yr.summary,...t})}({newOptions:e})}async purchase(e){await Sh({payload:e})}async setup(e){await _h({payload:e})}async show(e,t){await Ph({componentName:e,payload:t})}get version(){return"RebillyInstruments Ver.3.35.1"}on(e,t){wh({eventName:e,callback:t})}};export{Lh as default};
68
+ */var N=function(e,t){return null===e||isNaN(e)||"string"==typeof e?t:e},O=function(e,t,n){var r;void 0===e&&(e="#000"),void 0===t&&(t="base"),void 0===n&&(n=0),r=[[0,0,0],1,t,n],this.rgb=r[0],this.alpha=r[1],this.type=r[2],this.weight=r[3];var a=null===e?"#000":e;if("string"!=typeof a)throw new TypeError("Input should be a string: "+a);var o=_(a);if(!o)throw new Error("Unable to parse color from string: "+a);return this["_setFrom"+o.type.toUpperCase()](o.values.concat([o.alpha]))},R={hex:{configurable:!0}};return R.hex.get=function(){return this.hexString().replace(/^#/,"")},O.prototype.setColor=function(e){var t=_(e);return t?this["_setFrom"+t.type.toUpperCase()](t.values.concat([t.alpha])):null},O.prototype.tint=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#fff",this.rgbString(),t).rgba+")","tint",t)},O.prototype.shade=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#000",this.rgbString(),t).rgba+")","shade",t)},O.prototype.tints=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.tint((r+1)*t)}))},O.prototype.shades=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.shade((r+1)*t)}))},O.prototype.all=function(e){return void 0===e&&(e=10),this.tints(e).reverse().concat([Object.assign(this)],this.shades(e))},O.prototype.hexString=function(){return j(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha]))},O.prototype.rgbString=function(){var e=(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha])).join(", ");return(this.alpha>=1?"rgb":"rgba")+"("+e+")"},O.prototype.getBrightness=function(){return Math.round(this.rgb.reduce((function(e,t){return e+t}))/765*100)},O.prototype._setFromRGB=function(e){var t;return t=[[e[0],e[1],e[2]],e[3]],this.rgb=t[0],this.alpha=t[1],this},O.prototype._setFromHSL=function(e){var t,n=e[0],r=e[1],a=e[2],o=e[3];return t=[P([n,r,a]).map(Math.round),o],this.rgb=t[0],this.alpha=t[1],this},Object.defineProperties(O.prototype,R),O.VERSION="v2.1.1",O}()})),xm=$m;const Em=e=>new xm(e);function Sm(e,t=1){if(null===e)return e;const n=Em(e);return n.alpha=t,n.rgbString()}const _m=e=>Sm(e,.5),Pm=(e,t)=>{if(null===e)return e;return Em(e).shade(t).hexString()};function Am(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Im{constructor(e){Am(this,"allStyles",["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial","inherit"]),this.str=e||"";const t=this.allStyles.find((e=>this.str.includes(e))),n=this.str.split(t).map((e=>e.trim()));this.border=[n[0],t,n[1]]}get stylePosition(){let e=0;return 3===this.border.length?e=1:2===this.border.length&&(e=this.allStyles.includes(this.border[0])?0:1),e}updateColor(e){return this.border[this.stylePosition+1]=e,this}get value(){return this.border.join(" ")}}const jm={colorPrimary:{fallback:{type:"static",value:"#0044D4"}},colorBackground:{fallback:{type:"static",value:"#FFFFFF"}},colorText:{fallback:{type:"static",value:"#0D2B3E"}},colorMutedText:{fallback:{type:"func",value:e=>_m(e.colorText)}},colorMutedBorder:{fallback:{type:"func",value:e=>e.colorTextProvided?Sm(e.colorText,.25):"#DCE3EA"}},colorDanger:{fallback:{type:"static",value:"#CD5C5C"}},fontFamily:{fallback:{type:"static",value:"-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial sans-serif"}},fontSizeBase:{fallback:{type:"static",value:"16px"}},fontWeightBase:{fallback:{type:"static",value:"500"}},fontLineHeightBase:{fallback:{type:"func",value:e=>`calc(${e.fontSizeBase} * 1.5)`}},fontSmooth:{fallback:{type:"static",value:"auto"}},borderRadius:{fallback:{type:"static",value:"6px"}},headingFontFamily:{fallback:{type:"variable",value:"fontFamily"}},headingFontWeight:{fallback:{type:"static",value:"600"}},headingColorText:{fallback:{type:"variable",value:"colorText"}},buttonColorBackground:{fallback:{type:"variable",value:"colorPrimary"}},buttonColorText:{fallback:{type:"static",value:"#FFFFFF"}},buttonFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonBorder:{fallback:{type:"static",value:"1px solid transparent"}},buttonBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonBoxShadow:{fallback:{type:"static",value:"none"}},buttonSecondaryColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryColorText:{fallback:{type:"variable",value:"colorPrimary"}},buttonSecondaryFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonSecondaryFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonSecondaryFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonSecondaryFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonSecondaryBorder:{fallback:{type:"func",value:e=>`1px solid ${e.colorPrimary}`}},buttonSecondaryBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonSecondaryBoxShadow:{fallback:{type:"static",value:"none"}},buttonHoverColorBackground:{fallback:{type:"func",value:e=>e.buttonColorBackgroundProvided?Pm(e.buttonColorBackground,20):Pm(e.colorPrimary,20)}},buttonHoverColorText:{fallback:{type:"variable",value:"buttonColorText"}},buttonHoverFontFamily:{fallback:{type:"variable",value:"buttonFontFamily"}},buttonHoverFontSize:{fallback:{type:"variable",value:"buttonFontSize"}},buttonHoverFontLineHeight:{fallback:{type:"variable",value:"buttonFontLineHeight"}},buttonHoverFontWeight:{fallback:{type:"variable",value:"buttonFontWeight"}},buttonHoverBorder:{fallback:{type:"func",value:e=>{if(e.buttonBorderProvided)return e.buttonBorder;return new Im(e.buttonBorder).updateColor(e.buttonHoverColorBackground).value}}},buttonHoverBorderRadius:{fallback:{type:"variable",value:"buttonBorderRadius"}},buttonHoverBoxShadow:{fallback:{type:"variable",value:"buttonBoxShadow"}},buttonSecondaryHoverColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryHoverColorText:{fallback:{type:"variable",value:"buttonSecondaryColorText"}},buttonSecondaryHoverFontFamily:{fallback:{type:"variable",value:"buttonSecondaryFontFamily"}},buttonSecondaryHoverFontSize:{fallback:{type:"variable",value:"buttonSecondaryFontSize"}},buttonSecondaryHoverFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryFontLineHeight"}},buttonSecondaryHoverFontWeight:{fallback:{type:"variable",value:"buttonSecondaryFontWeight"}},buttonSecondaryHoverBorder:{fallback:{type:"variable",value:"buttonSecondaryBorder"}},buttonSecondaryHoverBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryBorderRadius"}},buttonSecondaryHoverBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryBoxShadow"}},buttonActiveColorBackground:{fallback:{type:"variable",value:"buttonHoverColorBackground"}},buttonActiveColorText:{fallback:{type:"variable",value:"buttonHoverColorText"}},buttonActiveFontFamily:{fallback:{type:"variable",value:"buttonHoverFontFamily"}},buttonActiveFontSize:{fallback:{type:"variable",value:"buttonHoverFontSize"}},buttonActiveFontLineHeight:{fallback:{type:"variable",value:"buttonHoverFontLineHeight"}},buttonActiveFontWeight:{fallback:{type:"variable",value:"buttonHoverFontWeight"}},buttonActiveBorder:{fallback:{type:"variable",value:"buttonHoverBorder"}},buttonActiveBorderRadius:{fallback:{type:"variable",value:"buttonHoverBorderRadius"}},buttonActiveBoxShadow:{fallback:{type:"variable",value:"buttonHoverBoxShadow"}},buttonSecondaryActiveColorBackground:{fallback:{type:"variable",value:"buttonSecondaryHoverColorBackground"}},buttonSecondaryActiveColorText:{fallback:{type:"variable",value:"buttonSecondaryHoverColorText"}},buttonSecondaryActiveFontFamily:{fallback:{type:"variable",value:"buttonSecondaryHoverFontFamily"}},buttonSecondaryActiveFontSize:{fallback:{type:"variable",value:"buttonSecondaryHoverFontSize"}},buttonSecondaryActiveFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontLineHeight"}},buttonSecondaryActiveFontWeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontWeight"}},buttonSecondaryActiveBorder:{fallback:{type:"variable",value:"buttonSecondaryHoverBorder"}},buttonSecondaryActiveBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderRadius"}},buttonSecondaryActiveBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryHoverBoxShadow"}},inputColorBackground:{fallback:{type:"static",value:"transparent"}},inputColorText:{fallback:{type:"variable",value:"colorText"}},inputFontFamily:{fallback:{type:"variable",value:"fontFamily"}},inputFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},inputFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},inputFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},inputBorder:{fallback:{type:"func",value:e=>`1px solid ${Pm(e.colorMutedBorder,4)}`}},inputBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},inputBoxShadow:{fallback:{type:"static",value:"none"}},inputHoverColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputHoverColorText:{fallback:{type:"variable",value:"inputColorText"}},inputHoverFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputHoverFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputHoverFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputHoverFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputHoverBorder:{fallback:{type:"variable",value:"inputBorder"}},inputHoverBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputHoverBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputFocusColorBackground:{fallback:{type:"variable",value:"inputHoverColorBackground"}},inputFocusColorText:{fallback:{type:"variable",value:"inputHoverColorText"}},inputFocusFontFamily:{fallback:{type:"variable",value:"inputHoverFontFamily"}},inputFocusFontSize:{fallback:{type:"variable",value:"inputHoverFontSize"}},inputFocusFontLineHeight:{fallback:{type:"variable",value:"inputHoverFontLineHeight"}},inputFocusFontWeight:{fallback:{type:"variable",value:"inputHoverFontWeight"}},inputFocusBorder:{fallback:{type:"func",value:e=>{if(e.inputHoverBorderProvided)return e.inputHoverBorder;return new Im(e.inputBorder).updateColor(e.colorPrimary).value}}},inputFocusBorderRadius:{fallback:{type:"variable",value:"inputHoverBorderRadius"}},inputFocusBoxShadow:{fallback:{type:"func",value:e=>`0 0 0 1px ${e.colorPrimary}`}},inputPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputColorTextProvided?_m(e.inputColorText):e.colorMutedText}},inputPlaceholderFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputPlaceholderFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputPlaceholderFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputSelectionColorText:{fallback:{type:"static",value:"initial"}},inputSelectionColorBackground:{fallback:{type:"static",value:"highlight"}},inputErrorColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputErrorColorText:{fallback:{type:"variable",value:"colorDanger"}},inputErrorFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputErrorFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputErrorFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputErrorFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputErrorBorder:{fallback:{type:"func",value:e=>{if(e.inputBorderProvided){return new Im(e.inputBorder).updateColor(e.colorDanger).value}return`1px solid ${e.colorDanger}`}}},inputErrorBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputErrorBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputErrorHoverColorBackground:{fallback:{type:"variable",value:"inputErrorColorBackground"}},inputErrorHoverColorText:{fallback:{type:"variable",value:"inputErrorColorText"}},inputErrorHoverFontFamily:{fallback:{type:"variable",value:"inputErrorFontFamily"}},inputErrorHoverFontSize:{fallback:{type:"variable",value:"inputErrorFontSize"}},inputErrorHoverFontLineHeight:{fallback:{type:"variable",value:"inputErrorFontLineHeight"}},inputErrorHoverFontWeight:{fallback:{type:"variable",value:"inputErrorFontWeight"}},inputErrorHoverBorder:{fallback:{type:"variable",value:"inputErrorBorder"}},inputErrorHoverBorderRadius:{fallback:{type:"variable",value:"inputErrorBorderRadius"}},inputErrorHoverBoxShadow:{fallback:{type:"variable",value:"inputErrorBoxShadow"}},inputErrorFocusColorBackground:{fallback:{type:"variable",value:"inputErrorHoverColorBackground"}},inputErrorFocusColorText:{fallback:{type:"variable",value:"inputErrorHoverColorText"}},inputErrorFocusFontFamily:{fallback:{type:"variable",value:"inputErrorHoverFontFamily"}},inputErrorFocusFontSize:{fallback:{type:"variable",value:"inputErrorHoverFontSize"}},inputErrorFocusFontLineHeight:{fallback:{type:"variable",value:"inputErrorHoverFontLineHeight"}},inputErrorFocusFontWeight:{fallback:{type:"variable",value:"inputErrorHoverFontWeight"}},inputErrorFocusBorder:{fallback:{type:"variable",value:"inputErrorHoverBorder"}},inputErrorFocusBorderRadius:{fallback:{type:"variable",value:"inputErrorHoverBorderRadius"}},inputErrorFocusBoxShadow:{fallback:{type:"variable",value:"inputErrorHoverBoxShadow"}},inputErrorPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputErrorColorTextProvided?_m(e.inputErrorColorText):_m(e.colorDanger)}},inputErrorPlaceholderFontFamily:{fallback:{type:"variable",value:"inputPlaceholderFontFamily"}},inputErrorPlaceholderFontSize:{fallback:{type:"variable",value:"inputPlaceholderFontSize"}},inputErrorPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputPlaceholderFontLineHeight"}},inputErrorPlaceholderFontWeight:{fallback:{type:"variable",value:"inputPlaceholderFontWeight"}},inputErrorSelectionColorText:{fallback:{type:"variable",value:"inputSelectionColorText"}},inputErrorSelectionColorBackground:{fallback:{type:"variable",value:"inputSelectionColorBackground"}},labels:{fallback:{type:"static",value:"floating"}}};var Cm=new Proxy(jm,{get(e,t,n){if(t in e){if(e[t].value)return e[t].value;const{type:r,value:a}=e[t].fallback;if("static"===r)return a;if("variable"===r)return`var(--rebilly-${a})`;if("func"===r)return a(n)}if(t.endsWith("Provided")){const n=t.replace("Provided","");if(n in e)return e[n].isProvided}},set:(e,t,n)=>{if(!(t in e)||!n)throw new Error(`Invalid theme option provided: ${t}`);return e[t].value=n,e[t].isProvided=!0,!0}});class Lm{constructor(e={}){this.overrides=e,this.theme=Cm}overrideTheme(){Object.keys(this.overrides).forEach((e=>{this.theme[e]=this.overrides[e]}))}get cssVars(){return Object.keys(this.theme).filter((e=>!Lm.nonCssProperties.includes(e))).map(((e,t)=>`${t?" ":""}--rebilly-${e}: ${this.theme[e]};`)).join("\n")}build(){return this.overrideTheme(),{cssVars:this.cssVars}}}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Lm,"nonCssProperties",["labels"]);function Tm(e){let t=e;return t=t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),t=t.replace(/\s{2,}/g," "),t=t.replace(/\s([{:}])\s/g,"$1"),t=t.replace(/([;,])\s/g,"$1"),t=t.replace(/\s!/g,"!"),t}var Nm=({options:{theme:e={},css:t}}={})=>{const n=(e=>{const t=`\n ${(e=>`\n/* Instruments 'global' variables\n------------------------------------------------------------ */\n:root {\n ${e.cssVars}\n\n --rebilly-fontWeight400: 400;\n --rebilly-fontWeight500: 500;\n --rebilly-fontWeight600: 600;\n --rebilly-fontScaleFactor: 1.5;\n --rebilly-fontScaleFactorS: 0.875;\n --rebilly-fontSizeS: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactorS));\n --rebilly-fontLineHeightS: calc(var(--rebilly-fontSizeS) * 1);\n\n --rebilly-fontSizeL: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactor));\n --rebilly-fontLineHeightL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-fontMarginTopL: 0;\n --rebilly-fontMarginBottomL: var(--rebilly-fontLineHeightBase);\n\n --rebilly-spacing2xs: calc(var(--rebilly-fontLineHeightBase) / 6);\n --rebilly-spacingXs: calc(var(--rebilly-fontLineHeightBase) / 4);\n --rebilly-spacingS: calc(var(--rebilly-fontLineHeightBase) / 2);\n --rebilly-spacingM: var(--rebilly-fontLineHeightBase);\n --rebilly-spacingL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-spacingXl: calc(var(--rebilly-fontLineHeightBase) * 4);\n\n --rebilly-spacingFormElementMinHeight: calc(var(--rebilly-spacingM) * 1.83333);\n\n --rebilly-summaryLoaderMinHeight: var(--rebilly-fontLineHeightBase);\n --rebilly-methodLoaderMinHeight: calc((4 * var(--rebilly-spacingFormElementMinHeight)) + (2 * var(--rebilly-fontLineHeightBase)) + (2 * var(--rebilly-spacingM)) + var(--rebilly-spacing2xs) + var(--rebilly-fontSizeS) + calc(2 * (var(--rebilly-spacingXs) + var(--rebilly-spacingS))) + var(--rebilly-spacingL));\n}\n\n/* Base, Typography\n------------------------------------------------------------ */\n/* Base setup for top level elements */\n.rebilly-instruments-content {\n color: var(--rebilly-colorText);\n background: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeBase);\n font-weight: var(--rebilly-fontWeightBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-fontFamily);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: left;\n transition: all 200ms;\n font-smooth: var(--rebilly-fontSmooth);\n padding: 2px;\n font-display: swap;\n}\n\n/* Views. Method Selector\n------------------------------------------------------------ */\n.rebilly-instruments-method-selector.has-express-compact {\n padding-top: var(--rebilly-spacingS);\n}\n\n/* Express Methods\n------------------------------------------------------------ */\n@-webkit-keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n@keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n\n.rebilly-instruments-express-methods { padding: 2px; }\n\n.rebilly-instruments-express-methods.is-compact {\n border: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS);\n padding-top: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS));\n padding-top: calc(var(--rebilly-fontSizeBase) + var(--rebilly-spacing2xs));\n border-radius: var(--rebilly-borderRadius);\n position: relative;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-iframe {\n display: block;\n margin-bottom: 0;\n height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {\n border-radius: 6px;\n margin-bottom: var(--rebilly-spacingS);\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n min-height: 48px;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0px;\n max-width: 260px;\n margin: 0 var(--rebilly-spacingXs);\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {\n margin-left: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin-right: 0;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-label {\n display: none;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {\n position: absolute;\n font-family: var(--rebilly-fontFamily);\n top: 0; left: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n color: var(--rebilly-colorText);\n padding: var(--rebilly-spacing2xs) var(--rebilly-spacingM);\n line-height: 1;\n background: var(--rebilly-colorBackground);\n display: inline-block;\n font-weight: var(--rebilly-fontWeightBase);\n min-height: auto;\n margin: 0;\n white-space: nowrap;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method {\n border-radius: 100px;\n}\n\n@media (max-width: 600px) {\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n max-width: 100%;\n margin: 0 0 var(--rebilly-spacingS);\n }\n \n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n }\n}\n\n/* Components. Divider\n------------------------------------------------------------ */\n.rebilly-instruments-divider {\n line-height: var(--rebilly-fontLineHeightBase);\n padding: var(--rebilly-spacingM) 0;\n margin: 0;\n position: relative;\n outline: 0;\n border: 0;\n text-align: center;\n font-family: var(--rebilly-fontFamily);\n}\n\n.rebilly-instruments-divider-s { padding: var(--rebilly-spacingS) 0; }\n.rebilly-instruments-divider-xs { padding: var(--rebilly-spacingXs) 0; }\n\n.rebilly-instruments-divider::before {\n background: var(--rebilly-colorMutedBorder);\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n height: 1px;\n}\n\n.rebilly-instruments-divider .rebilly-instruments-divider-label {\n color: var(--rebilly-colorMutedText);\n font-weight: var(--rebilly-fontWeightBase);\n padding: 0 var(--rebilly-spacingM);\n line-height: var(--rebilly-fontLineHeightS);\n background-color: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeS);\n position: relative;\n display: inline-block;\n}\n\n/* Components. Icons\n------------------------------------------------------------ */\n.rebilly-instruments-icon {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n/* Components. Forms. Checkboxes\n------------------------------------------------------------ */\n.rebilly-instruments-form-field-checkbox {\n position: relative;\n opacity: 1;\n align-items: center;\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n cursor: pointer;\n transform: none;\n}\n\n.rebilly-instruments-form-field-checkbox > * {\n cursor: pointer;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.rebilly-instruments-form-field-checkbox span {\n position: relative;\n top: 0;\n left: 0;\n width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n min-width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n border-radius: 4px;\n box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);\n margin-right: var(--rebilly-spacingS);\n background-color: transparent;\n transition: all 200ms;\n}\n\n.rebilly-instruments-form-field-checkbox span:after {\n content: '';\n position: absolute;\n border: solid var(--rebilly-colorPrimary);\n width: calc(var(--rebilly-spacingXs) + var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingXs) - var(--rebilly-spacing2xs) + 2px);\n border-width: 2px 2px 0 0;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n opacity: 0;\n transform: translateY(-60%) translateX(-50%) rotate(135deg);\n transition: all 0.2s ease;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {\n opacity: 1;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {\n opacity: 0.6;\n}\n\n/* Vendor, Postmate\n------------------------------------------------------------ */\n.rebilly-instruments-iframe {\n border: none;\n width: 100%;\n height: 0;\n padding: 0;\n}\n\n.rebilly-instruments-iframe-overlay {\n top: -2px;\n left: -2px;\n width: calc(100vw + 2px);\n height: 100vh;\n min-height: calc(100vh + 4px);\n position: fixed;\n z-index: 99999999999999;\n}\n\n/* Views. Modal\n------------------------------------------------------------ */\n.rebilly-instruments-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 1055;\n padding: 30px;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n -webkit-transition: all 0.12s ease-in-out;\n transition: all 0.12s ease-in-out;\n background-color: rgba(0,0,0,0.7);\n opacity: 0\n}\n\n.rebilly-instruments-modal-overlay.is-visible {\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container {\n -webkit-transition: all .24s ease-in-out;\n transition: all .24s ease-in-out;\n position: relative;\n max-width: 750px;\n background: var(--rebilly-colorBackground);\n margin: 50px auto 20px;\n -webkit-box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n border-radius: 4px;\n -webkit-transform: translateY(-50px);\n transform: translateY(-50px);\n opacity: 0;\n}\n\n.rebilly-instruments-modal-container.is-visible {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container.is-redirect {\n max-width: 60vw;\n width: auto;\n}\n\n.rebilly-instruments-modal-content {\n -webkit-transition: all .15s;\n transition: all .15s;\n padding: 20px;\n overflow: hidden;\n background-color: var(--rebilly-colorBackground);\n text-align: center;\n border-radius: 4px;\n}\n\n.rebilly-instruments-modal-content .rebilly-instruments-iframe {\n -webkit-transition: all .15s;\n transition: all .15s;\n height: auto;\n min-height: 360px;\n}\n\n.rebilly-instruments-modal-container.is-redirect .rebilly-instruments-modal-content {\n padding: 0;\n}\n\n.rebilly-instruments-modal-close {\n position: absolute;\n width: 30px;\n height: 30px;\n top: -40px;\n right: 0;\n fill: #FFF;\n cursor: pointer;\n}\n\n.rebilly-instruments-modal-close:hover{\n color: #000;\n}\n\n@media screen and (max-width: 480px) {\n .rebilly-instruments-modal-container.is-redirect {\n max-width: 96vw;\n margin: 20px auto 20px;\n }\n}\n\n/* Components. Loader\n------------------------------------------------------------ */\n.rebilly-instruments-loader {\n text-align: left;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background-color: var(--rebilly-colorBackground);\n z-index: 1000;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader.is-active {\n display: block;\n}\n\n/* Type */\n.rebilly-instruments-loader p {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n.rebilly-instruments-loader small {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: 1;\n}\n\n/* Summary */\n.rebilly-instruments-summary-loader-total p.total {\n font-family: var(--rebilly-fontFamily);\n font-size: var(--rebilly-fontSizeL);\n font-weight: var(--rebilly-headingFontWeight);\n}\n\n/* Methods */\n.rebilly-instruments-methods-loader-card-icon {\n width: calc(var(--rebilly-fontLineHeightBase) + 10px);\n height: var(--rebilly-fontLineHeightBase);\n margin-left: var(--rebilly-spacing2xs);\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-methods-loader-form-fields { margin: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS)) 0; }\n\n/* Spinner */\n.rebilly-instruments-loader-spinner {\n top: 50%;\n left: 50%;\n position: absolute;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: 2px solid transparent;\n border-top: 2px solid var(--rebilly-colorPrimary);\n border-radius: 50%;\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n margin-top: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n margin-left: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n -webkit-animation: spin 0.5s ease infinite;\n animation: spin 0.5s ease infinite;\n}\n\n@-webkit-keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n/* Utils */\n.rebilly-instruments-loader-display-flex { display: -webkit-box; display: -ms-flexbox; display: flex; }\n.rebilly-instruments-loader-align-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }\n.rebilly-instruments-loader-justify-space-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }\n.rebilly-instruments-loader-justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }\n\n.is-el-loading {\n position: relative;\n color: transparent!important;\n}\n\n.is-el-loading::before {\n position: absolute;\n content: '';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader-form-el {\n width: 100%;\n min-height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-loader-form-label {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-loader-form-el.is-button {\n margin-top: var(--rebilly-spacingL);\n text-align: center;\n font-size: var(--rebilly-buttonFontSize);\n font-family: var(--rebilly-buttonFontFamily);\n line-height: var(--rebilly-buttonFontLineHeight);\n padding: var(--rebilly-spacingS);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background: var(--rebilly-buttonColorBackground);\n color: transparent;\n border-radius: var(--rebilly-buttonBorderRadius);\n font-weight: var(--rebilly-buttonFontWeight);\n border: var(--rebilly-buttonBorder);\n -webkit-box-shadow: var(--rebilly-buttonBoxShadow);\n box-shadow: var(--rebilly-buttonBoxShadow);\n outline: none;\n cursor: not-allowed;\n opacity: 0.6; \n}\n\n.rebilly-instruments-methods-loader-card-icon.is-el-loading::before {\n border-radius: calc(var(--rebilly-borderRadius) / 2);\n}\n\n/* Error\n------------------------------------------------------------ */\n.rebilly-instruments-error-card {\n border: 1px solid var(--rebilly-colorDanger);\n border-radius: var(--rebilly-borderRadius);\n text-align: left;\n padding: var(--rebilly-spacingS);\n margin-bottom: var(--rebilly-spacingL);\n}\n\n.rebilly-instruments-error-card-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n width: 100%;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n.rebilly-instruments-error-card-title {\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-headingFontFamily);\n margin: 0 0 var(--rebilly-spacingS);\n color: var(--rebilly-colorDanger);\n}\n\n.rebilly-instruments-error-card-close-button {\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n}\n\n.rebilly-instruments-error-card-close-button svg {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n.rebilly-instruments-error-card-details {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.rebilly-instruments-error-card-details li,\n.rebilly-instruments-error-card-message {\n color: var(--rebilly-colorText);\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n\n/* Bump offer\n------------------------------------------------------------ */\n.rebilly-instruments-bump-offers {\n text-align: left;\n margin-bottom: calc(var(--rebilly-spacingM) + var(--rebilly-fontSizeS));\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-form-field-checkbox {\n margin-bottom: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-bump-offer-label {\n width: 100%;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item {\n border-bottom: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS) 0;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.rebilly-instruments-bump-offer-line-item:first-child {\n padding-top: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure {\n margin: 0 var(--rebilly-spacingS) 0 0;\n flex: 0 0 auto;\n width: 48px;\n height: 48px;\n border-radius: var(--rebilly-borderRadius);\n border: 1px solid var(--rebilly-colorMutedBorder);\n overflow: hidden;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure img {\n width: 100%;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis {\n flex: 1 2 auto;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-title {\n margin: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-description {\n color: var(--rebilly-colorMutedText);\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: var(--rebilly-fontLineHeightS);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--rebilly-colorMutedText);\n margin: 0 0 0 var(--rebilly-spacingS);\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown .rebilly-instruments-icon {\n fill: var(--rebilly-colorMutedText);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown-unit-price {\n color: var(--rebilly-colorText);\n}\n`)(new Lm(e).build())}\n `;return t})(e||{});return jd({element:"style",attributes:{type:"text/css"},content:Tm(n),target:"head"}),t&&jd({element:"style",attributes:{type:"text/css"},content:Tm(t),target:"head"}),n};const Om=()=>{Yr.translate.init(Yr.options.locale,Yr.options.i18n),Yr.translate.translateItems()};var Rm,Mm=()=>{var e,t;if("auto"===Yr.options.locale&&null!==(e=Yr.data.riskMetadata)&&void 0!==e&&null!==(t=e.browserData)&&void 0!==t&&t.language){const{browserData:{language:e}}=Yr.data.riskMetadata;Yr.options.locale=e}return Yr.translate.init(Yr.options.locale,Yr.options.i18n),Om},Fm=function(e){if("Function"===x(e))return w(e)},Hm=Object.keys||function(e){return $t(e,xt)},Dm=l&&!Ie?Object.defineProperties:function(e,t){Le(e);for(var n,r=j(t),a=Hm(t),o=a.length,i=0;o>i;)De.f(e,n=a[i++],r[n]);return e},Bm={f:Dm},qm=M("document","documentElement"),Vm="prototype",zm="script",Wm=et("IE_PROTO"),Um=function(){},Gm=function(e){return"<"+zm+">"+e+"</"+zm+">"},Zm=function(e){e.write(Gm("")),e.close();var t=e.parentWindow.Object;return e=null,t},Xm=function(){try{Rm=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Xm="undefined"!=typeof document?document.domain&&Rm?Zm(Rm):(t=Ee("iframe"),n="java"+zm+":",t.style.display="none",qm.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Gm("document.F=Object")),e.close(),e.F):Zm(Rm);for(var r=xt.length;r--;)delete Xm[Vm][xt[r]];return Xm()};tt[Wm]=!0;var Km,Jm,Ym,Qm=Object.create||function(e,t){var n;return null!==e?(Um[Vm]=Le(e),n=new Um,Um[Vm]=null,n[Wm]=e):n=Xm(),void 0===t?n:Bm.f(n,t)},ef=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),tf=et("IE_PROTO"),nf=Object,rf=nf.prototype,af=ef?nf.getPrototypeOf:function(e){var t=se(e);if(ce(t,tf))return t[tf];var n=t.constructor;return N(n)&&t instanceof n?n.prototype:t instanceof nf?rf:null},of=ge("iterator"),sf=!1;[].keys&&("next"in(Ym=[].keys())?(Jm=af(af(Ym)))!==Object.prototype&&(Km=Jm):sf=!0);var lf=!R(Km)||s((function(){var e={};return Km[of].call(e)!==e}));lf&&(Km={}),N(Km[of])||ct(Km,of,(function(){return this}));var cf={IteratorPrototype:Km,BUGGY_SAFARI_ITERATORS:sf},uf=De.f,df=ge("toStringTag"),pf=function(e,t,n){e&&!n&&(e=e.prototype),e&&!ce(e,df)&&uf(e,df,{configurable:!0,value:t})},mf=cf.IteratorPrototype,ff=function(e,t){return{value:e,done:t}},hf=ge("match"),yf=function(){var e=Le(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},gf=RegExp.prototype,vf=function(e){var t=e.flags;return void 0!==t||"flags"in gf||ce(e,"flags")||!F(gf,e)?t:d(yf,e)},bf=function(){},wf=[],kf=M("Reflect","construct"),$f=/^\s*(?:class|function)\b/,xf=w($f.exec),Ef=!$f.exec(bf),Sf=function(e){if(!N(e))return!1;try{return kf(bf,wf,e),!0}catch(e){return!1}},_f=function(e){if(!N(e))return!1;switch(Jt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ef||!!xf($f,Ke(e))}catch(e){return!0}};_f.sham=!0;var Pf,Af,If=!kf||s((function(){var e;return Sf(Sf.call)||!Sf(Object)||!Sf((function(){e=!0}))||e}))?_f:Sf,jf=TypeError,Cf=ge("species"),Lf=function(e,t){var n,r=Le(e).constructor;return void 0===r||P(n=Le(r)[Cf])?t:function(e){if(If(e))return e;throw jf(K(e)+" is not a constructor")}(n)},Tf=w("".charAt),Nf=w("".charCodeAt),Of=w("".slice),Rf=function(e){return function(t,n){var r,a,o=Qt(I(t)),i=mt(n),s=o.length;return i<0||i>=s?e?"":void 0:(r=Nf(o,i))<55296||r>56319||i+1===s||(a=Nf(o,i+1))<56320||a>57343?e?Tf(o,i):r:e?Of(o,i,i+2):a-56320+(r-55296<<10)+65536}},Mf={codeAt:Rf(!1),charAt:Rf(!0)}.charAt,Ff=i.RegExp,Hf=s((function(){var e=Ff("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Df=Hf||s((function(){return!Ff("a","y").sticky})),Bf={BROKEN_CARET:Hf||s((function(){var e=Ff("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Df,UNSUPPORTED_Y:Hf},qf=i.RegExp,Vf=s((function(){var e=qf(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),zf=i.RegExp,Wf=s((function(){var e=zf("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Uf=st.get,Gf=oe("native-string-replace",String.prototype.replace),Zf=RegExp.prototype.exec,Xf=Zf,Kf=w("".charAt),Jf=w("".indexOf),Yf=w("".replace),Qf=w("".slice),eh=(Af=/b*/g,d(Zf,Pf=/a/,"a"),d(Zf,Af,"a"),0!==Pf.lastIndex||0!==Af.lastIndex),th=Bf.BROKEN_CARET,nh=void 0!==/()??/.exec("")[1];(eh||nh||th||Vf||Wf)&&(Xf=function(e){var t,n,r,a,o,i,s,l=this,c=Uf(l),u=Qt(e),p=c.raw;if(p)return p.lastIndex=l.lastIndex,t=d(Xf,p,u),l.lastIndex=p.lastIndex,t;var m=c.groups,f=th&&l.sticky,h=d(yf,l),y=l.source,g=0,v=u;if(f&&(h=Yf(h,"y",""),-1===Jf(h,"g")&&(h+="g"),v=Qf(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==Kf(u,l.lastIndex-1))&&(y="(?: "+y+")",v=" "+v,g++),n=new RegExp("^(?:"+y+")",h)),nh&&(n=new RegExp("^"+y+"$(?!\\s)",h)),eh&&(r=l.lastIndex),a=d(Zf,f?n:l,v),f?a?(a.input=Qf(a.input,g),a[0]=Qf(a[0],g),a.index=l.lastIndex,l.lastIndex+=a[0].length):l.lastIndex=0:eh&&a&&(l.lastIndex=l.global?a.index+a[0].length:r),nh&&a&&a.length>1&&d(Gf,a[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(a[o]=void 0)})),a&&m)for(a.groups=i=Qm(null),o=0;o<m.length;o++)i[(s=m[o])[0]]=a[s[1]];return a});var rh=Xf,ah=TypeError,oh=ge("matchAll"),ih="RegExp String",sh=ih+" Iterator",lh=st.set,ch=st.getterFor(sh),uh=RegExp.prototype,dh=TypeError,ph=Fm("".indexOf),mh=Fm("".matchAll),fh=!!mh&&!s((function(){mh("a",/./)})),hh=function(e,t,n,r){var a=t+" Iterator";return e.prototype=Qm(mf,{next:y(+!r,n)}),pf(e,a,!1),e}((function(e,t,n,r){lh(this,{type:sh,regexp:e,string:t,global:n,unicode:r,done:!1})}),ih,(function(){var e=ch(this);if(e.done)return ff(void 0,!0);var t=e.regexp,n=e.string,r=function(e,t){var n=e.exec;if(N(n)){var r=d(n,e,t);return null!==r&&Le(r),r}if("RegExp"===x(e))return d(rh,e,t);throw ah("RegExp#exec called on incompatible receiver")}(t,n);return null===r?(e.done=!0,ff(void 0,!0)):e.global?(""===Qt(r[0])&&(t.lastIndex=function(e,t,n){return t+(n?Mf(e,t).length:1)}(n,gt(t.lastIndex),e.unicode)),ff(r,!1)):(e.done=!0,ff(r,!1))})),yh=function(e){var t,n,r,a=Le(this),o=Qt(e),i=Lf(a,RegExp),s=Qt(vf(a));return t=new i(i===RegExp?a.source:a,s),n=!!~ph(s,"g"),r=!!~ph(s,"u"),t.lastIndex=gt(a.lastIndex),new hh(t,o,n,r)};function gh(e){const t={};return function(e){const t={};function n(e){const r=e.match(/var\((.+?)\)/g);if(r){let a=e;return r.forEach((n=>{const r=n.match(/\((.*)\)/i)[1];a=e.replace(n,t[r])})),n(a)}return e}return[...e.matchAll(/(--rebilly.*(?=:))[:\s](.*(?=;))/g)].forEach((e=>{t[e[1]]=e[2].trim()})),Object.entries(t).map((([e,t])=>[e,n(t)]))}(e).forEach((([e,n])=>{t[e]=n})),t}Ht({target:"String",proto:!0,forced:fh},{matchAll:function(e){var t,n,r,a=I(this);if(P(e)){if(fh)return mh(a,e)}else{if(function(e){var t;return R(e)&&(void 0!==(t=e[hf])?!!t:"RegExp"==x(e))}(e)&&(t=Qt(I(vf(e))),!~ph(t,"g")))throw dh("`.matchAll` does not allow non-global regexes");if(fh)return mh(a,e);if(r=Q(e,oh))return d(r,e,a)}return n=Qt(a),new RegExp(e,"g")[oh](n)}}),oh in uh||ct(uh,oh,yh);const vh=(e,t="")=>({color:e[`--rebilly-${t}ColorText`],fontFamily:e[`--rebilly-${t}FontFamily`],fontSize:e[`--rebilly-${t}FontSize`],fontWeight:e[`--rebilly-${t}FontWeight`],lineHeight:e[`--rebilly-${t}FontLineHeight`],background:e[`--rebilly-${t}ColorBackground`],boxShadow:e[`--rebilly-${t}BoxShadow`]});var bh=({options:e={}})=>{const t=gh(`\n ${Yr.mainStyleVars}\n ${e.css||""}\n `);return{base:{...vh(t,"input"),":hover":vh(t,"inputHover"),":focus":vh(t,"inputFocus"),"::placeholder":vh(t,"inputPlaceholder"),"::selection":vh(t,"inputSelection")},invalid:{...vh(t,"inputError"),":hover":vh(t,"inputErrorHover"),":focus":vh(t,"inputErrorFocus"),"::placeholder":vh(t,"inputErrorPlaceholder"),"::selection":vh(t,"inputErrorSelection")},buttons:{base:{...vh(t,"buttonSecondary"),":hover":vh(t,"buttonSecondaryHover"),":focus":vh(t,"buttonSecondaryActive")},active:{...vh(t,"button"),":hover":vh(t,"buttonHover"),":focus":vh(t,"buttonActive")}}}};function wh({eventName:e,callback:t}){if(!Ii.includes(e))throw new Error(`${e} is not a supported event`);const n=yo(e);Ai[n].addEventListener(t)}const kh=(e,t)=>`\n <div class="rebilly-instruments-modal-overlay">\n <div class="rebilly-instruments-modal-container ${t?`rebilly-instruments-${t}`:""} ${e?"is-redirect":""}">\n ${e?"":'\n <svg class="rebilly-instruments-modal-close" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <path d="m15 13.5858 7.2929-7.293c.3905-.3904 1.0237-.3904 1.4142 0 .3905.3906.3905 1.0238 0 1.4143L16.4142 15l7.293 7.2929c.3904.3905.3904 1.0237 0 1.4142-.3906.3905-1.0238.3905-1.4143 0L15 16.4142l-7.2929 7.293c-.3905.3904-1.0237.3904-1.4142 0-.3905-.3906-.3905-1.0238 0-1.4143L13.5858 15l-7.293-7.2929c-.3904-.3905-.3904-1.0237 0-1.4142.3906-.3905 1.0238-.3905 1.4143 0L15 13.5858Z" fill-rule="nonzero"/>\n </svg>\n '}\n <div class="rebilly-instruments-modal-content"></div>\n </div>\n </div>\n`;async function $h({name:e="",url:t="",model:n={},classListArray:r=[],close:a=(()=>{})}={}){var o;const i=null==n||null===(o=n.method)||void 0===o?void 0:o.method,s="rebilly-instruments-approval-url"===e;Yr.form.insertAdjacentHTML("beforeend",kh(s,i));const l=document.querySelector(".rebilly-instruments-modal-overlay"),c=document.querySelector(".rebilly-instruments-modal-container"),u=document.querySelector(".rebilly-instruments-modal-close"),d=document.querySelector(".rebilly-instruments-modal-content");document.body.style.overflow="hidden",setTimeout((()=>{l.classList.add("is-visible"),c.classList.add("is-visible")}),240),Yr.loader.addDOMElement({section:"modal",el:d}),Yr.loader.startLoading({section:"modal",id:e});const p={options:Yr.toModel().options,...n},m=await new Mi({name:e,url:t,model:p,classListArray:r,container:d}),f=(...e)=>{c.classList.remove("is-visible"),l.classList.remove("is-visible"),setTimeout((()=>{document.body.style.overflow="auto";const t=l.children;for(let e=0;e<t.length;e+=1)t[e].remove();l.remove(),a(...e),m.destroy()}),300)};return m.bindEventListeners({close:f,loader:Yr.loader}),s||u.addEventListener("click",f),m}async function xh({payload:e}){var t,n,r,a,o;const{_raw:{id:i},isExistingInstrument:s}=e;delete e.isExistingInstrument,delete e._raw;const l={...e};s?l.paymentInstrumentId=i:l.token=i,null!==(t=Yr.options)&&void 0!==t&&t.invoiceId&&(l.invoiceId=Yr.options.invoiceId),null!==(n=Yr.options)&&void 0!==n&&n.transactionId&&(l.transactionId=Yr.options.transactionId),null!==(r=Yr.options)&&void 0!==r&&r.money&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.options.money.amount,l.currency=Yr.options.money.currency),null!==(a=Yr.options)&&void 0!==a&&a.deposit&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.data.amountAndCurrency.amount,l.currency=Yr.data.amountAndCurrency.currency),null!==(o=Yr.data)&&void 0!==o&&o.couponIds&&Array.isArray(Yr.data.couponIds)&&(l.couponIds=Yr.data.couponIds);let{fields:c}=await async function({data:e}){return uc((async()=>{const{token:t,transactionId:n,invoiceId:r,websiteId:a,paymentInstrumentId:o}=e,i=["riskMetadata","redirectUrl"];return t&&i.push("token"),o&&i.push("paymentInstrumentId"),n&&i.push("transactionId"),r&&i.push("invoiceId"),a&&i.push("amount","currency","websiteId"),Object.keys(e).forEach((t=>{i.includes(t)||delete e[t]})),Yr.storefront.purchase.payment({data:e})}))}({state:Yr,data:l});return c={transaction:c,token:c.token||Yr.options.jwt},Yr.data.invoice&&(c.invoice=Yr.data.invoice),c}async function Eh({payload:e}){const t={websiteId:Yr.options.websiteId,paymentInstruction:{token:e._raw.id},...e};Yr.data.acceptBumpOffer?t.items=Yr.options.bumpOffer:t.items=yc(Yr.options.items),Yr.data.couponIds&&Array.isArray(Yr.data.couponIds)&&(t.couponIds=Yr.data.couponIds),Yr.options.addons&&Yr.data.addons&&Array.isArray(Yr.data.addons)&&Yr.options.addons.forEach((e=>{Yr.data.addons.includes(e.planId)&&t.items.push(e)}));const{fields:n}=await async function({data:e}){return uc((async()=>{const t=["websiteId","paymentInstruction","items","billingAddress","deliveryAddress","shippingRateId","couponIds","password","redirectUrl"];return Object.keys(e).forEach((n=>{t.includes(n)||delete e[n]})),Yr.storefront.purchase.purchase({data:e})}))}({state:Yr,data:t});return n}async function Sh({payload:e}){Object.keys(e).forEach((t=>{null===e[t]&&delete e[t]}));try{var t,n;let r;return r=Yr.data.isPayment?await xh({state:Yr,payload:e}):await Eh({state:Yr,payload:e}),null!==(t=r.transaction)&&void 0!==t&&t.approvalUrl&&"unknown"===(null===(n=r.transaction)||void 0===n?void 0:n.result)?function({fields:e,payload:t}){var n,r;if(t.redirectUrl||null===(n=e.transaction)||void 0===n||!n.approvalUrl){const{paymentMethodsUrl:t}=Yr.options._computed,n=JSON.parse(JSON.stringify(e)),r={};Yr.data.isPayment?r.payment=n:r.purchase=n,Yr.data=new fd({...e}),$h({state:Yr,name:"rebilly-instruments-approval-url",url:`${t}/approval-url`,model:r,close:e=>{Ai.purchaseCompleted.dispatch(e)}})}else if(null!==(r=e.transaction)&&void 0!==r&&r.approvalUrl){var a;window.location=null===(a=e.transaction)||void 0===a?void 0:a.approvalUrl}}({state:Yr,fields:r,payload:e}):Ai.purchaseCompleted.dispatch(r),r}catch(e){return Ti(e),e}}async function _h({payload:e}){try{var t;const{_raw:{id:n},isExistingInstrument:r}=e;delete e.isExistingInstrument,delete e._raw;const a={...e};r?a.paymentInstrumentId=n:a.token=n;const{instrument:o,transaction:i}=await async function({data:e}){return uc((async()=>{var t,n;const{fields:r}=await Yr.storefront.paymentInstruments.create({data:e});Yr.storefront.setSessionToken(r.token||Yr.options.jwt);const a={id:r.id,data:{websiteId:Yr.options.websiteId,...e}};Yr.data.amountAndCurrency&&(a.data={...a.data,...Yr.data.amountAndCurrency}),null!==(t=Yr.data)&&void 0!==t&&null!==(n=t.transaction)&&void 0!==n&&n.redirectUrl&&(a.data.redirectUrl=`${a.data.redirectUrl}&originalRedirectUrl=${Yr.data.transaction.redirectUrl}`);const{fields:o}=await Yr.storefront.paymentInstruments.setup(a);return{instrument:r,transaction:o}}))}({data:{websiteId:null===(t=Yr.options)||void 0===t?void 0:t.websiteId,...a}});if(Yr.data=new fd({instrument:o,transaction:i}),i.approvalUrl&&"unknown"===i.result){const{paymentMethodsUrl:e}=Yr.options._computed;$h({name:"rebilly-instruments-approval-url",url:`${e}/approval-url`,model:{setup:{transaction:i}},close:({transaction:e=i})=>{Ai.setupCompleted.dispatch({instrument:o,transaction:e})}})}else Ai.setupCompleted.dispatch({instrument:o,transaction:i});return{instrument:o,transaction:i}}catch(e){return Ti(e),e}}async function Ph({componentName:e,payload:t}){switch(e){case"result":_d(),async function({payload:e}){var t,n;const r=Jr.form;r||await Id();const a=Yr.toModel(),o={options:a.options,mainStyleVars:a.mainStyleVars,[Yr.options.transactionType]:e};null==r||null===(t=r.component)||void 0===t||t.call("route",{name:"result"}),null==r||null===(n=r.component)||void 0===n||n.call("update",o)}({payload:t});break;case"confirmation":_d(),async function({payload:e}){var t,n,r,a;e.billingAddress&&Yr.summary&&Yr.data.isPurchase&&kc({instrument:e});const o=Jr.form;o||await Id();const i=Yr.toModel(),s={options:i.options,data:i.data,mainStyleVars:i.mainStyleVars,instrument:e};null==o||null===(t=o.component)||void 0===t||t.call("route",{name:"confirmation"}),null==o||null===(n=o.component)||void 0===n||n.call("update",s),null==o||null===(r=o.component)||void 0===r||r.on(`${o.name}-confirm-purchase`,(e=>{Sh({payload:e})})),null==o||null===(a=o.component)||void 0===a||a.on(`${o.name}-confirm-setup`,(e=>{_h({payload:e})}))}({payload:t});break;default:throw new Error(`'${e}' not a supported component`)}}function Ah({state:e,payload:t}){Ph({componentName:"result",payload:t,state:e})}var Ih=({state:e={}})=>{e.options.features.autoConfirmation&&wh({eventName:"instrument-ready",callback:t=>{var n;if("paypal"===(null===(n=t._raw)||void 0===n?void 0:n.method)&&!e.data.isShippingRequired)return"setup"===e.options.transactionType?_h({state:e,payload:t}):Sh({state:e,payload:t}),void e.loader.startLoading({state:e,id:"express-purchase",message:"form.loaderMessages.processingPayment"});Ph({componentName:"confirmation",payload:t,state:e})}}),e.options.features.autoResult&&(wh({eventName:"purchase-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Ah({state:e,payload:t})}}),wh({eventName:"setup-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Ah({state:e,payload:t})}}))};async function jh({setupFramepay:e=km,...t}={}){try{var n,r,a;Yr.data={},Yr.options={},Yr.form=Cd({element:"form",options:t}),Yr.summary=Cd({element:"summary",options:t}),Yr.form.style.maxWidth="750px",Yr.summary&&(Yr.summary.style.maxWidth="750px"),Yr.options=wm({options:t}),Yr.storefront=Ld({options:t}),Yr.mainStyleVars=Nm({options:t}),Yr.options.themeFramepay=bh({options:t}),Yr.loader.addDOMElement({el:Yr.form}),Yr.loader.addDOMElement({section:"summary",el:Yr.summary}),Yr.loader.startLoading({section:"summary",id:"rebilly-instruments-summary"}),Yr.loader.startLoading({id:"rebilly-instruments-form"});const[o]=await Promise.all([hd(),e()]);Yr.data=o,Ai.dataReady.dispatch(Yr.data),Yr.i18n=Mm(),!Yr.options.websiteId&&null!==(n=Yr.data.transaction)&&void 0!==n&&n.websiteId?Yr.options.websiteId=Yr.data.transaction.websiteId:!Yr.options.websiteId&&null!==(r=Yr.data.invoice)&&void 0!==r&&r.websiteId&&(Yr.options.websiteId=Yr.data.invoice.websiteId),Yr.data.transaction&&"setup"===(null===(a=Yr.data.transaction)||void 0===a?void 0:a.type)&&(Yr.options.transactionType="setup"),Yr.form&&Id().then((()=>{var e;null!==(e=Yr.options)&&void 0!==e&&e.deposit?kd():Pd()})),Yr.summary&&wc(),Yr.i18n({state:Yr}),Yr.hasMounted=!0,o.readyToPay.length||(Yr.loader.stopLoading({id:"rebilly-instruments-form"}),Ti(Yr.translate.getTranslation("form.error.noPaymentMethods")))}catch(e){throw Ti(e),e}Ih({state:Yr})}async function Ch(){var e;await(e=1e3,new Promise((t=>setTimeout(t,e)))),Object.keys(Jr).forEach((e=>{Jr.hasFrame(e)&&(Jr[e].destroy(),Jr[e]=null)})),_i.removeAll(document),Yr.hasMounted=!1,Yr.summary&&(Yr.summary.textContent=""),Yr.form.textContent="",Kl.cancelAll(),Yr.loader.clearAll()}var Lh=new class{constructor(){this.state=Yr,this.iframes=Jr}async mount(e){await jh(e)}async destroy(){await Ch()}async update(e){await async function({newOptions:e={}}){if(!Yr.hasMounted)throw Error("Update method cannot be called before mounting instruments");const t=Gr({...Yr.options},e);await Ch(),jh({form:Yr.form,summary:Yr.summary,...t})}({newOptions:e})}async purchase(e){await Sh({payload:e})}async setup(e){await _h({payload:e})}async show(e,t){await Ph({componentName:e,payload:t})}get version(){return"RebillyInstruments Ver.3.36.1"}on(e,t){wh({eventName:e,callback:t})}};export{Lh as default};
package/dist/index.min.js CHANGED
@@ -65,4 +65,4 @@ function L(e){var t=_(e);return null===t?null:("hsl"===t.type&&(t.values=P(t.val
65
65
  * @version v2.1.1
66
66
  * @link http://noeldelgado.github.io/values.js/
67
67
  * @license MIT
68
- */var N=function(e,t){return null===e||isNaN(e)||"string"==typeof e?t:e},O=function(e,t,n){var r;void 0===e&&(e="#000"),void 0===t&&(t="base"),void 0===n&&(n=0),r=[[0,0,0],1,t,n],this.rgb=r[0],this.alpha=r[1],this.type=r[2],this.weight=r[3];var a=null===e?"#000":e;if("string"!=typeof a)throw new TypeError("Input should be a string: "+a);var o=_(a);if(!o)throw new Error("Unable to parse color from string: "+a);return this["_setFrom"+o.type.toUpperCase()](o.values.concat([o.alpha]))},R={hex:{configurable:!0}};return R.hex.get=function(){return this.hexString().replace(/^#/,"")},O.prototype.setColor=function(e){var t=_(e);return t?this["_setFrom"+t.type.toUpperCase()](t.values.concat([t.alpha])):null},O.prototype.tint=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#fff",this.rgbString(),t).rgba+")","tint",t)},O.prototype.shade=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#000",this.rgbString(),t).rgba+")","shade",t)},O.prototype.tints=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.tint((r+1)*t)}))},O.prototype.shades=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.shade((r+1)*t)}))},O.prototype.all=function(e){return void 0===e&&(e=10),this.tints(e).reverse().concat([Object.assign(this)],this.shades(e))},O.prototype.hexString=function(){return j(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha]))},O.prototype.rgbString=function(){var e=(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha])).join(", ");return(this.alpha>=1?"rgb":"rgba")+"("+e+")"},O.prototype.getBrightness=function(){return Math.round(this.rgb.reduce((function(e,t){return e+t}))/765*100)},O.prototype._setFromRGB=function(e){var t;return t=[[e[0],e[1],e[2]],e[3]],this.rgb=t[0],this.alpha=t[1],this},O.prototype._setFromHSL=function(e){var t,n=e[0],r=e[1],a=e[2],o=e[3];return t=[P([n,r,a]).map(Math.round),o],this.rgb=t[0],this.alpha=t[1],this},Object.defineProperties(O.prototype,R),O.VERSION="v2.1.1",O}()})),xm=$m;const Em=e=>new xm(e);function Sm(e,t=1){if(null===e)return e;const n=Em(e);return n.alpha=t,n.rgbString()}const _m=e=>Sm(e,.5),Pm=(e,t)=>{if(null===e)return e;return Em(e).shade(t).hexString()};function Am(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Im{constructor(e){Am(this,"allStyles",["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial","inherit"]),this.str=e||"";const t=this.allStyles.find((e=>this.str.includes(e))),n=this.str.split(t).map((e=>e.trim()));this.border=[n[0],t,n[1]]}get stylePosition(){let e=0;return 3===this.border.length?e=1:2===this.border.length&&(e=this.allStyles.includes(this.border[0])?0:1),e}updateColor(e){return this.border[this.stylePosition+1]=e,this}get value(){return this.border.join(" ")}}const jm={colorPrimary:{fallback:{type:"static",value:"#0044D4"}},colorBackground:{fallback:{type:"static",value:"#FFFFFF"}},colorText:{fallback:{type:"static",value:"#0D2B3E"}},colorMutedText:{fallback:{type:"func",value:e=>_m(e.colorText)}},colorMutedBorder:{fallback:{type:"func",value:e=>e.colorTextProvided?Sm(e.colorText,.25):"#DCE3EA"}},colorDanger:{fallback:{type:"static",value:"#CD5C5C"}},fontFamily:{fallback:{type:"static",value:"-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial sans-serif"}},fontSizeBase:{fallback:{type:"static",value:"16px"}},fontWeightBase:{fallback:{type:"static",value:"500"}},fontLineHeightBase:{fallback:{type:"func",value:e=>`calc(${e.fontSizeBase} * 1.5)`}},fontSmooth:{fallback:{type:"static",value:"auto"}},borderRadius:{fallback:{type:"static",value:"6px"}},headingFontFamily:{fallback:{type:"variable",value:"fontFamily"}},headingFontWeight:{fallback:{type:"static",value:"600"}},headingColorText:{fallback:{type:"variable",value:"colorText"}},buttonColorBackground:{fallback:{type:"variable",value:"colorPrimary"}},buttonColorText:{fallback:{type:"static",value:"#FFFFFF"}},buttonFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonBorder:{fallback:{type:"static",value:"1px solid transparent"}},buttonBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonBoxShadow:{fallback:{type:"static",value:"none"}},buttonSecondaryColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryColorText:{fallback:{type:"variable",value:"colorPrimary"}},buttonSecondaryFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonSecondaryFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonSecondaryFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonSecondaryFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonSecondaryBorder:{fallback:{type:"func",value:e=>`1px solid ${e.colorPrimary}`}},buttonSecondaryBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonSecondaryBoxShadow:{fallback:{type:"static",value:"none"}},buttonHoverColorBackground:{fallback:{type:"func",value:e=>e.buttonColorBackgroundProvided?Pm(e.buttonColorBackground,20):Pm(e.colorPrimary,20)}},buttonHoverColorText:{fallback:{type:"variable",value:"buttonColorText"}},buttonHoverFontFamily:{fallback:{type:"variable",value:"buttonFontFamily"}},buttonHoverFontSize:{fallback:{type:"variable",value:"buttonFontSize"}},buttonHoverFontLineHeight:{fallback:{type:"variable",value:"buttonFontLineHeight"}},buttonHoverFontWeight:{fallback:{type:"variable",value:"buttonFontWeight"}},buttonHoverBorder:{fallback:{type:"func",value:e=>{if(e.buttonBorderProvided)return e.buttonBorder;return new Im(e.buttonBorder).updateColor(e.buttonHoverColorBackground).value}}},buttonHoverBorderRadius:{fallback:{type:"variable",value:"buttonBorderRadius"}},buttonHoverBoxShadow:{fallback:{type:"variable",value:"buttonBoxShadow"}},buttonSecondaryHoverColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryHoverColorText:{fallback:{type:"variable",value:"buttonSecondaryColorText"}},buttonSecondaryHoverFontFamily:{fallback:{type:"variable",value:"buttonSecondaryFontFamily"}},buttonSecondaryHoverFontSize:{fallback:{type:"variable",value:"buttonSecondaryFontSize"}},buttonSecondaryHoverFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryFontLineHeight"}},buttonSecondaryHoverFontWeight:{fallback:{type:"variable",value:"buttonSecondaryFontWeight"}},buttonSecondaryHoverBorder:{fallback:{type:"variable",value:"buttonSecondaryBorder"}},buttonSecondaryHoverBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryBorderRadius"}},buttonSecondaryHoverBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryBoxShadow"}},buttonActiveColorBackground:{fallback:{type:"variable",value:"buttonHoverColorBackground"}},buttonActiveColorText:{fallback:{type:"variable",value:"buttonHoverColorText"}},buttonActiveFontFamily:{fallback:{type:"variable",value:"buttonHoverFontFamily"}},buttonActiveFontSize:{fallback:{type:"variable",value:"buttonHoverFontSize"}},buttonActiveFontLineHeight:{fallback:{type:"variable",value:"buttonHoverFontLineHeight"}},buttonActiveFontWeight:{fallback:{type:"variable",value:"buttonHoverFontWeight"}},buttonActiveBorder:{fallback:{type:"variable",value:"buttonHoverBorder"}},buttonActiveBorderRadius:{fallback:{type:"variable",value:"buttonHoverBorderRadius"}},buttonActiveBoxShadow:{fallback:{type:"variable",value:"buttonHoverBoxShadow"}},buttonSecondaryActiveColorBackground:{fallback:{type:"variable",value:"buttonSecondaryHoverColorBackground"}},buttonSecondaryActiveColorText:{fallback:{type:"variable",value:"buttonSecondaryHoverColorText"}},buttonSecondaryActiveFontFamily:{fallback:{type:"variable",value:"buttonSecondaryHoverFontFamily"}},buttonSecondaryActiveFontSize:{fallback:{type:"variable",value:"buttonSecondaryHoverFontSize"}},buttonSecondaryActiveFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontLineHeight"}},buttonSecondaryActiveFontWeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontWeight"}},buttonSecondaryActiveBorder:{fallback:{type:"variable",value:"buttonSecondaryHoverBorder"}},buttonSecondaryActiveBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderRadius"}},buttonSecondaryActiveBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryHoverBoxShadow"}},inputColorBackground:{fallback:{type:"static",value:"transparent"}},inputColorText:{fallback:{type:"variable",value:"colorText"}},inputFontFamily:{fallback:{type:"variable",value:"fontFamily"}},inputFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},inputFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},inputFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},inputBorder:{fallback:{type:"func",value:e=>`1px solid ${Pm(e.colorMutedBorder,4)}`}},inputBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},inputBoxShadow:{fallback:{type:"static",value:"none"}},inputHoverColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputHoverColorText:{fallback:{type:"variable",value:"inputColorText"}},inputHoverFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputHoverFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputHoverFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputHoverFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputHoverBorder:{fallback:{type:"variable",value:"inputBorder"}},inputHoverBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputHoverBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputFocusColorBackground:{fallback:{type:"variable",value:"inputHoverColorBackground"}},inputFocusColorText:{fallback:{type:"variable",value:"inputHoverColorText"}},inputFocusFontFamily:{fallback:{type:"variable",value:"inputHoverFontFamily"}},inputFocusFontSize:{fallback:{type:"variable",value:"inputHoverFontSize"}},inputFocusFontLineHeight:{fallback:{type:"variable",value:"inputHoverFontLineHeight"}},inputFocusFontWeight:{fallback:{type:"variable",value:"inputHoverFontWeight"}},inputFocusBorder:{fallback:{type:"func",value:e=>{if(e.inputHoverBorderProvided)return e.inputHoverBorder;return new Im(e.inputBorder).updateColor(e.colorPrimary).value}}},inputFocusBorderRadius:{fallback:{type:"variable",value:"inputHoverBorderRadius"}},inputFocusBoxShadow:{fallback:{type:"func",value:e=>`0 0 0 1px ${e.colorPrimary}`}},inputPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputColorTextProvided?_m(e.inputColorText):e.colorMutedText}},inputPlaceholderFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputPlaceholderFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputPlaceholderFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputSelectionColorText:{fallback:{type:"static",value:"initial"}},inputSelectionColorBackground:{fallback:{type:"static",value:"highlight"}},inputErrorColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputErrorColorText:{fallback:{type:"variable",value:"colorDanger"}},inputErrorFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputErrorFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputErrorFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputErrorFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputErrorBorder:{fallback:{type:"func",value:e=>{if(e.inputBorderProvided){return new Im(e.inputBorder).updateColor(e.colorDanger).value}return`1px solid ${e.colorDanger}`}}},inputErrorBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputErrorBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputErrorHoverColorBackground:{fallback:{type:"variable",value:"inputErrorColorBackground"}},inputErrorHoverColorText:{fallback:{type:"variable",value:"inputErrorColorText"}},inputErrorHoverFontFamily:{fallback:{type:"variable",value:"inputErrorFontFamily"}},inputErrorHoverFontSize:{fallback:{type:"variable",value:"inputErrorFontSize"}},inputErrorHoverFontLineHeight:{fallback:{type:"variable",value:"inputErrorFontLineHeight"}},inputErrorHoverFontWeight:{fallback:{type:"variable",value:"inputErrorFontWeight"}},inputErrorHoverBorder:{fallback:{type:"variable",value:"inputErrorBorder"}},inputErrorHoverBorderRadius:{fallback:{type:"variable",value:"inputErrorBorderRadius"}},inputErrorHoverBoxShadow:{fallback:{type:"variable",value:"inputErrorBoxShadow"}},inputErrorFocusColorBackground:{fallback:{type:"variable",value:"inputErrorHoverColorBackground"}},inputErrorFocusColorText:{fallback:{type:"variable",value:"inputErrorHoverColorText"}},inputErrorFocusFontFamily:{fallback:{type:"variable",value:"inputErrorHoverFontFamily"}},inputErrorFocusFontSize:{fallback:{type:"variable",value:"inputErrorHoverFontSize"}},inputErrorFocusFontLineHeight:{fallback:{type:"variable",value:"inputErrorHoverFontLineHeight"}},inputErrorFocusFontWeight:{fallback:{type:"variable",value:"inputErrorHoverFontWeight"}},inputErrorFocusBorder:{fallback:{type:"variable",value:"inputErrorHoverBorder"}},inputErrorFocusBorderRadius:{fallback:{type:"variable",value:"inputErrorHoverBorderRadius"}},inputErrorFocusBoxShadow:{fallback:{type:"variable",value:"inputErrorHoverBoxShadow"}},inputErrorPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputErrorColorTextProvided?_m(e.inputErrorColorText):_m(e.colorDanger)}},inputErrorPlaceholderFontFamily:{fallback:{type:"variable",value:"inputPlaceholderFontFamily"}},inputErrorPlaceholderFontSize:{fallback:{type:"variable",value:"inputPlaceholderFontSize"}},inputErrorPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputPlaceholderFontLineHeight"}},inputErrorPlaceholderFontWeight:{fallback:{type:"variable",value:"inputPlaceholderFontWeight"}},inputErrorSelectionColorText:{fallback:{type:"variable",value:"inputSelectionColorText"}},inputErrorSelectionColorBackground:{fallback:{type:"variable",value:"inputSelectionColorBackground"}},labels:{fallback:{type:"static",value:"floating"}}};var Cm=new Proxy(jm,{get(e,t,n){if(t in e){if(e[t].value)return e[t].value;const{type:r,value:a}=e[t].fallback;if("static"===r)return a;if("variable"===r)return`var(--rebilly-${a})`;if("func"===r)return a(n)}if(t.endsWith("Provided")){const n=t.replace("Provided","");if(n in e)return e[n].isProvided}},set:(e,t,n)=>{if(!(t in e)||!n)throw new Error(`Invalid theme option provided: ${t}`);return e[t].value=n,e[t].isProvided=!0,!0}});class Lm{constructor(e={}){this.overrides=e,this.theme=Cm}overrideTheme(){Object.keys(this.overrides).forEach((e=>{this.theme[e]=this.overrides[e]}))}get cssVars(){return Object.keys(this.theme).filter((e=>!Lm.nonCssProperties.includes(e))).map(((e,t)=>`${t?" ":""}--rebilly-${e}: ${this.theme[e]};`)).join("\n")}build(){return this.overrideTheme(),{cssVars:this.cssVars}}}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Lm,"nonCssProperties",["labels"]);function Tm(e){let t=e;return t=t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),t=t.replace(/\s{2,}/g," "),t=t.replace(/\s([{:}])\s/g,"$1"),t=t.replace(/([;,])\s/g,"$1"),t=t.replace(/\s!/g,"!"),t}var Nm=({options:{theme:e={},css:t}}={})=>{const n=(e=>{const t=`\n ${(e=>`\n/* Instruments 'global' variables\n------------------------------------------------------------ */\n:root {\n ${e.cssVars}\n\n --rebilly-fontWeight400: 400;\n --rebilly-fontWeight500: 500;\n --rebilly-fontWeight600: 600;\n --rebilly-fontScaleFactor: 1.5;\n --rebilly-fontScaleFactorS: 0.875;\n --rebilly-fontSizeS: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactorS));\n --rebilly-fontLineHeightS: calc(var(--rebilly-fontSizeS) * 1);\n\n --rebilly-fontSizeL: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactor));\n --rebilly-fontLineHeightL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-fontMarginTopL: 0;\n --rebilly-fontMarginBottomL: var(--rebilly-fontLineHeightBase);\n\n --rebilly-spacing2xs: calc(var(--rebilly-fontLineHeightBase) / 6);\n --rebilly-spacingXs: calc(var(--rebilly-fontLineHeightBase) / 4);\n --rebilly-spacingS: calc(var(--rebilly-fontLineHeightBase) / 2);\n --rebilly-spacingM: var(--rebilly-fontLineHeightBase);\n --rebilly-spacingL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-spacingXl: calc(var(--rebilly-fontLineHeightBase) * 4);\n\n --rebilly-spacingFormElementMinHeight: calc(var(--rebilly-spacingM) * 1.83333);\n\n --rebilly-summaryLoaderMinHeight: var(--rebilly-fontLineHeightBase);\n --rebilly-methodLoaderMinHeight: calc((4 * var(--rebilly-spacingFormElementMinHeight)) + (2 * var(--rebilly-fontLineHeightBase)) + (2 * var(--rebilly-spacingM)) + var(--rebilly-spacing2xs) + var(--rebilly-fontSizeS) + calc(2 * (var(--rebilly-spacingXs) + var(--rebilly-spacingS))) + var(--rebilly-spacingL));\n}\n\n/* Base, Typography\n------------------------------------------------------------ */\n/* Base setup for top level elements */\n.rebilly-instruments-content {\n color: var(--rebilly-colorText);\n background: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeBase);\n font-weight: var(--rebilly-fontWeightBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-fontFamily);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: left;\n transition: all 200ms;\n font-smooth: var(--rebilly-fontSmooth);\n padding: 2px;\n font-display: swap;\n}\n\n/* Views. Method Selector\n------------------------------------------------------------ */\n.rebilly-instruments-method-selector.has-express-compact {\n padding-top: var(--rebilly-spacingS);\n}\n\n/* Express Methods\n------------------------------------------------------------ */\n@-webkit-keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n@keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n\n.rebilly-instruments-express-methods { padding: 2px; }\n\n.rebilly-instruments-express-methods.is-compact {\n border: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS);\n padding-top: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS));\n padding-top: calc(var(--rebilly-fontSizeBase) + var(--rebilly-spacing2xs));\n border-radius: var(--rebilly-borderRadius);\n position: relative;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-iframe {\n display: block;\n margin-bottom: 0;\n height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {\n border-radius: 6px;\n margin-bottom: var(--rebilly-spacingS);\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n min-height: 48px;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0px;\n max-width: 260px;\n margin: 0 var(--rebilly-spacingXs);\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {\n margin-left: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin-right: 0;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-label {\n display: none;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {\n position: absolute;\n font-family: var(--rebilly-fontFamily);\n top: 0; left: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n color: var(--rebilly-colorText);\n padding: var(--rebilly-spacing2xs) var(--rebilly-spacingM);\n line-height: 1;\n background: var(--rebilly-colorBackground);\n display: inline-block;\n font-weight: var(--rebilly-fontWeightBase);\n min-height: auto;\n margin: 0;\n white-space: nowrap;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method {\n border-radius: 100px;\n}\n\n@media (max-width: 600px) {\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n max-width: 100%;\n margin: 0 0 var(--rebilly-spacingS);\n }\n \n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n }\n}\n\n/* Components. Divider\n------------------------------------------------------------ */\n.rebilly-instruments-divider {\n line-height: var(--rebilly-fontLineHeightBase);\n padding: var(--rebilly-spacingM) 0;\n margin: 0;\n position: relative;\n outline: 0;\n border: 0;\n text-align: center;\n font-family: var(--rebilly-fontFamily);\n}\n\n.rebilly-instruments-divider-s { padding: var(--rebilly-spacingS) 0; }\n.rebilly-instruments-divider-xs { padding: var(--rebilly-spacingXs) 0; }\n\n.rebilly-instruments-divider::before {\n background: var(--rebilly-colorMutedBorder);\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n height: 1px;\n}\n\n.rebilly-instruments-divider .rebilly-instruments-divider-label {\n color: var(--rebilly-colorMutedText);\n font-weight: var(--rebilly-fontWeightBase);\n padding: 0 var(--rebilly-spacingM);\n line-height: var(--rebilly-fontLineHeightS);\n background-color: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeS);\n position: relative;\n display: inline-block;\n}\n\n/* Components. Icons\n------------------------------------------------------------ */\n.rebilly-instruments-icon {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n/* Components. Forms. Checkboxes\n------------------------------------------------------------ */\n.rebilly-instruments-form-field-checkbox {\n position: relative;\n opacity: 1;\n align-items: center;\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n cursor: pointer;\n transform: none;\n}\n\n.rebilly-instruments-form-field-checkbox > * {\n cursor: pointer;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.rebilly-instruments-form-field-checkbox span {\n position: relative;\n top: 0;\n left: 0;\n width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n min-width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n border-radius: 4px;\n box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);\n margin-right: var(--rebilly-spacingS);\n background-color: transparent;\n transition: all 200ms;\n}\n\n.rebilly-instruments-form-field-checkbox span:after {\n content: '';\n position: absolute;\n border: solid var(--rebilly-colorPrimary);\n width: calc(var(--rebilly-spacingXs) + var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingXs) - var(--rebilly-spacing2xs) + 2px);\n border-width: 2px 2px 0 0;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n opacity: 0;\n transform: translateY(-60%) translateX(-50%) rotate(135deg);\n transition: all 0.2s ease;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {\n opacity: 1;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {\n opacity: 0.6;\n}\n\n/* Vendor, Postmate\n------------------------------------------------------------ */\n.rebilly-instruments-iframe {\n border: none;\n width: 100%;\n height: 0;\n padding: 0;\n}\n\n.rebilly-instruments-iframe-overlay {\n top: -2px;\n left: -2px;\n width: calc(100vw + 2px);\n height: 100vh;\n min-height: calc(100vh + 4px);\n position: fixed;\n z-index: 99999999999999;\n}\n\n/* Views. Modal\n------------------------------------------------------------ */\n.rebilly-instruments-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 1055;\n padding: 30px;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n -webkit-transition: all 0.12s ease-in-out;\n transition: all 0.12s ease-in-out;\n background-color: rgba(0,0,0,0.7);\n opacity: 0\n}\n\n.rebilly-instruments-modal-overlay.is-visible {\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container {\n -webkit-transition: all .24s ease-in-out;\n transition: all .24s ease-in-out;\n position: relative;\n max-width: 750px;\n background: var(--rebilly-colorBackground);\n margin: 50px auto 20px;\n -webkit-box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n border-radius: 4px;\n -webkit-transform: translateY(-50px);\n transform: translateY(-50px);\n opacity: 0;\n}\n\n.rebilly-instruments-modal-container.is-visible {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container.is-redirect {\n max-width: 60vw;\n width: auto;\n}\n\n.rebilly-instruments-modal-content {\n -webkit-transition: all .15s;\n transition: all .15s;\n padding: 20px;\n overflow: hidden;\n background-color: var(--rebilly-colorBackground);\n text-align: center;\n border-radius: 4px;\n}\n\n.rebilly-instruments-modal-content .rebilly-instruments-iframe {\n -webkit-transition: all .15s;\n transition: all .15s;\n height: auto;\n min-height: 360px;\n}\n\n.rebilly-instruments-modal-container.is-redirect .rebilly-instruments-modal-content {\n padding: 0;\n}\n\n.rebilly-instruments-modal-close {\n position: absolute;\n width: 30px;\n height: 30px;\n top: -40px;\n right: 0;\n fill: #FFF;\n cursor: pointer;\n}\n\n.rebilly-instruments-modal-close:hover{\n color: #000;\n}\n\n@media screen and (max-width: 480px) {\n .rebilly-instruments-modal-container.is-redirect {\n max-width: 96vw;\n margin: 20px auto 20px;\n }\n}\n\n/* Components. Loader\n------------------------------------------------------------ */\n.rebilly-instruments-loader {\n text-align: left;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background-color: var(--rebilly-colorBackground);\n z-index: 1000;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader.is-active {\n display: block;\n}\n\n/* Type */\n.rebilly-instruments-loader p {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n.rebilly-instruments-loader small {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: 1;\n}\n\n/* Summary */\n.rebilly-instruments-summary-loader-total p.total {\n font-family: var(--rebilly-fontFamily);\n font-size: var(--rebilly-fontSizeL);\n font-weight: var(--rebilly-headingFontWeight);\n}\n\n/* Methods */\n.rebilly-instruments-methods-loader-card-icon {\n width: calc(var(--rebilly-fontLineHeightBase) + 10px);\n height: var(--rebilly-fontLineHeightBase);\n margin-left: var(--rebilly-spacing2xs);\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-methods-loader-form-fields { margin: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS)) 0; }\n\n/* Spinner */\n.rebilly-instruments-loader-spinner {\n top: 50%;\n left: 50%;\n position: absolute;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: 2px solid transparent;\n border-top: 2px solid var(--rebilly-colorPrimary);\n border-radius: 50%;\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n margin-top: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n margin-left: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n -webkit-animation: spin 0.5s ease infinite;\n animation: spin 0.5s ease infinite;\n}\n\n@-webkit-keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n/* Utils */\n.rebilly-instruments-loader-display-flex { display: -webkit-box; display: -ms-flexbox; display: flex; }\n.rebilly-instruments-loader-align-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }\n.rebilly-instruments-loader-justify-space-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }\n.rebilly-instruments-loader-justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }\n\n.is-el-loading {\n position: relative;\n color: transparent!important;\n}\n\n.is-el-loading::before {\n position: absolute;\n content: '';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader-form-el {\n width: 100%;\n min-height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-loader-form-label {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-loader-form-el.is-button {\n margin-top: var(--rebilly-spacingL);\n text-align: center;\n font-size: var(--rebilly-buttonFontSize);\n font-family: var(--rebilly-buttonFontFamily);\n line-height: var(--rebilly-buttonFontLineHeight);\n padding: var(--rebilly-spacingS);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background: var(--rebilly-buttonColorBackground);\n color: transparent;\n border-radius: var(--rebilly-buttonBorderRadius);\n font-weight: var(--rebilly-buttonFontWeight);\n border: var(--rebilly-buttonBorder);\n -webkit-box-shadow: var(--rebilly-buttonBoxShadow);\n box-shadow: var(--rebilly-buttonBoxShadow);\n outline: none;\n cursor: not-allowed;\n opacity: 0.6; \n}\n\n.rebilly-instruments-methods-loader-card-icon.is-el-loading::before {\n border-radius: calc(var(--rebilly-borderRadius) / 2);\n}\n\n/* Error\n------------------------------------------------------------ */\n.rebilly-instruments-error-card {\n border: 1px solid var(--rebilly-colorDanger);\n border-radius: var(--rebilly-borderRadius);\n text-align: left;\n padding: var(--rebilly-spacingS);\n margin-bottom: var(--rebilly-spacingL);\n}\n\n.rebilly-instruments-error-card-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n width: 100%;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n.rebilly-instruments-error-card-title {\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-headingFontFamily);\n margin: 0 0 var(--rebilly-spacingS);\n color: var(--rebilly-colorDanger);\n}\n\n.rebilly-instruments-error-card-close-button {\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n}\n\n.rebilly-instruments-error-card-close-button svg {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n.rebilly-instruments-error-card-details {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.rebilly-instruments-error-card-details li,\n.rebilly-instruments-error-card-message {\n color: var(--rebilly-colorText);\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n\n/* Bump offer\n------------------------------------------------------------ */\n.rebilly-instruments-bump-offers {\n text-align: left;\n margin-bottom: calc(var(--rebilly-spacingM) + var(--rebilly-fontSizeS));\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-form-field-checkbox {\n margin-bottom: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-bump-offer-label {\n width: 100%;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item {\n border-bottom: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS) 0;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.rebilly-instruments-bump-offer-line-item:first-child {\n padding-top: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure {\n margin: 0 var(--rebilly-spacingS) 0 0;\n flex: 0 0 auto;\n width: 48px;\n height: 48px;\n border-radius: var(--rebilly-borderRadius);\n border: 1px solid var(--rebilly-colorMutedBorder);\n overflow: hidden;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure img {\n width: 100%;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis {\n flex: 1 2 auto;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-title {\n margin: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-description {\n color: var(--rebilly-colorMutedText);\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: var(--rebilly-fontLineHeightS);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--rebilly-colorMutedText);\n margin: 0 0 0 var(--rebilly-spacingS);\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown .rebilly-instruments-icon {\n fill: var(--rebilly-colorMutedText);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown-unit-price {\n color: var(--rebilly-colorText);\n}\n`)(new Lm(e).build())}\n `;return t})(e||{});return jd({element:"style",attributes:{type:"text/css"},content:Tm(n),target:"head"}),t&&jd({element:"style",attributes:{type:"text/css"},content:Tm(t),target:"head"}),n};const Om=()=>{Yr.translate.init(Yr.options.locale,Yr.options.i18n),Yr.translate.translateItems()};var Rm,Mm=()=>{var e,t;if("auto"===Yr.options.locale&&null!==(e=Yr.data.riskMetadata)&&void 0!==e&&null!==(t=e.browserData)&&void 0!==t&&t.language){const{browserData:{language:e}}=Yr.data.riskMetadata;Yr.options.locale=e}return Yr.translate.init(Yr.options.locale,Yr.options.i18n),Om},Fm=function(e){if("Function"===x(e))return w(e)},Hm=Object.keys||function(e){return $t(e,xt)},Dm=l&&!Ie?Object.defineProperties:function(e,t){Le(e);for(var n,r=j(t),a=Hm(t),o=a.length,i=0;o>i;)De.f(e,n=a[i++],r[n]);return e},Bm={f:Dm},qm=M("document","documentElement"),Vm="prototype",zm="script",Wm=et("IE_PROTO"),Um=function(){},Gm=function(e){return"<"+zm+">"+e+"</"+zm+">"},Zm=function(e){e.write(Gm("")),e.close();var t=e.parentWindow.Object;return e=null,t},Xm=function(){try{Rm=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Xm="undefined"!=typeof document?document.domain&&Rm?Zm(Rm):(t=Ee("iframe"),n="java"+zm+":",t.style.display="none",qm.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Gm("document.F=Object")),e.close(),e.F):Zm(Rm);for(var r=xt.length;r--;)delete Xm[Vm][xt[r]];return Xm()};tt[Wm]=!0;var Km,Jm,Ym,Qm=Object.create||function(e,t){var n;return null!==e?(Um[Vm]=Le(e),n=new Um,Um[Vm]=null,n[Wm]=e):n=Xm(),void 0===t?n:Bm.f(n,t)},ef=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),tf=et("IE_PROTO"),nf=Object,rf=nf.prototype,af=ef?nf.getPrototypeOf:function(e){var t=se(e);if(ce(t,tf))return t[tf];var n=t.constructor;return N(n)&&t instanceof n?n.prototype:t instanceof nf?rf:null},of=ge("iterator"),sf=!1;[].keys&&("next"in(Ym=[].keys())?(Jm=af(af(Ym)))!==Object.prototype&&(Km=Jm):sf=!0);var lf=!R(Km)||s((function(){var e={};return Km[of].call(e)!==e}));lf&&(Km={}),N(Km[of])||ct(Km,of,(function(){return this}));var cf={IteratorPrototype:Km,BUGGY_SAFARI_ITERATORS:sf},uf=De.f,df=ge("toStringTag"),pf=function(e,t,n){e&&!n&&(e=e.prototype),e&&!ce(e,df)&&uf(e,df,{configurable:!0,value:t})},mf=cf.IteratorPrototype,ff=function(e,t){return{value:e,done:t}},hf=ge("match"),yf=function(){var e=Le(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},gf=RegExp.prototype,vf=function(e){var t=e.flags;return void 0!==t||"flags"in gf||ce(e,"flags")||!F(gf,e)?t:d(yf,e)},bf=function(){},wf=[],kf=M("Reflect","construct"),$f=/^\s*(?:class|function)\b/,xf=w($f.exec),Ef=!$f.exec(bf),Sf=function(e){if(!N(e))return!1;try{return kf(bf,wf,e),!0}catch(e){return!1}},_f=function(e){if(!N(e))return!1;switch(Jt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ef||!!xf($f,Ke(e))}catch(e){return!0}};_f.sham=!0;var Pf,Af,If=!kf||s((function(){var e;return Sf(Sf.call)||!Sf(Object)||!Sf((function(){e=!0}))||e}))?_f:Sf,jf=TypeError,Cf=ge("species"),Lf=function(e,t){var n,r=Le(e).constructor;return void 0===r||P(n=Le(r)[Cf])?t:function(e){if(If(e))return e;throw jf(K(e)+" is not a constructor")}(n)},Tf=w("".charAt),Nf=w("".charCodeAt),Of=w("".slice),Rf=function(e){return function(t,n){var r,a,o=Qt(I(t)),i=mt(n),s=o.length;return i<0||i>=s?e?"":void 0:(r=Nf(o,i))<55296||r>56319||i+1===s||(a=Nf(o,i+1))<56320||a>57343?e?Tf(o,i):r:e?Of(o,i,i+2):a-56320+(r-55296<<10)+65536}},Mf={codeAt:Rf(!1),charAt:Rf(!0)}.charAt,Ff=i.RegExp,Hf=s((function(){var e=Ff("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Df=Hf||s((function(){return!Ff("a","y").sticky})),Bf={BROKEN_CARET:Hf||s((function(){var e=Ff("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Df,UNSUPPORTED_Y:Hf},qf=i.RegExp,Vf=s((function(){var e=qf(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),zf=i.RegExp,Wf=s((function(){var e=zf("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Uf=st.get,Gf=oe("native-string-replace",String.prototype.replace),Zf=RegExp.prototype.exec,Xf=Zf,Kf=w("".charAt),Jf=w("".indexOf),Yf=w("".replace),Qf=w("".slice),eh=(Af=/b*/g,d(Zf,Pf=/a/,"a"),d(Zf,Af,"a"),0!==Pf.lastIndex||0!==Af.lastIndex),th=Bf.BROKEN_CARET,nh=void 0!==/()??/.exec("")[1];(eh||nh||th||Vf||Wf)&&(Xf=function(e){var t,n,r,a,o,i,s,l=this,c=Uf(l),u=Qt(e),p=c.raw;if(p)return p.lastIndex=l.lastIndex,t=d(Xf,p,u),l.lastIndex=p.lastIndex,t;var m=c.groups,f=th&&l.sticky,h=d(yf,l),y=l.source,g=0,v=u;if(f&&(h=Yf(h,"y",""),-1===Jf(h,"g")&&(h+="g"),v=Qf(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==Kf(u,l.lastIndex-1))&&(y="(?: "+y+")",v=" "+v,g++),n=new RegExp("^(?:"+y+")",h)),nh&&(n=new RegExp("^"+y+"$(?!\\s)",h)),eh&&(r=l.lastIndex),a=d(Zf,f?n:l,v),f?a?(a.input=Qf(a.input,g),a[0]=Qf(a[0],g),a.index=l.lastIndex,l.lastIndex+=a[0].length):l.lastIndex=0:eh&&a&&(l.lastIndex=l.global?a.index+a[0].length:r),nh&&a&&a.length>1&&d(Gf,a[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(a[o]=void 0)})),a&&m)for(a.groups=i=Qm(null),o=0;o<m.length;o++)i[(s=m[o])[0]]=a[s[1]];return a});var rh=Xf,ah=TypeError,oh=ge("matchAll"),ih="RegExp String",sh=ih+" Iterator",lh=st.set,ch=st.getterFor(sh),uh=RegExp.prototype,dh=TypeError,ph=Fm("".indexOf),mh=Fm("".matchAll),fh=!!mh&&!s((function(){mh("a",/./)})),hh=function(e,t,n,r){var a=t+" Iterator";return e.prototype=Qm(mf,{next:y(+!r,n)}),pf(e,a,!1),e}((function(e,t,n,r){lh(this,{type:sh,regexp:e,string:t,global:n,unicode:r,done:!1})}),ih,(function(){var e=ch(this);if(e.done)return ff(void 0,!0);var t=e.regexp,n=e.string,r=function(e,t){var n=e.exec;if(N(n)){var r=d(n,e,t);return null!==r&&Le(r),r}if("RegExp"===x(e))return d(rh,e,t);throw ah("RegExp#exec called on incompatible receiver")}(t,n);return null===r?(e.done=!0,ff(void 0,!0)):e.global?(""===Qt(r[0])&&(t.lastIndex=function(e,t,n){return t+(n?Mf(e,t).length:1)}(n,gt(t.lastIndex),e.unicode)),ff(r,!1)):(e.done=!0,ff(r,!1))})),yh=function(e){var t,n,r,a=Le(this),o=Qt(e),i=Lf(a,RegExp),s=Qt(vf(a));return t=new i(i===RegExp?a.source:a,s),n=!!~ph(s,"g"),r=!!~ph(s,"u"),t.lastIndex=gt(a.lastIndex),new hh(t,o,n,r)};function gh(e){const t={};return function(e){const t={};function n(e){const r=e.match(/var\((.+?)\)/g);if(r){let a=e;return r.forEach((n=>{const r=n.match(/\((.*)\)/i)[1];a=e.replace(n,t[r])})),n(a)}return e}return[...e.matchAll(/(--rebilly.*(?=:))[:\s](.*(?=;))/g)].forEach((e=>{t[e[1]]=e[2].trim()})),Object.entries(t).map((([e,t])=>[e,n(t)]))}(e).forEach((([e,n])=>{t[e]=n})),t}Ht({target:"String",proto:!0,forced:fh},{matchAll:function(e){var t,n,r,a=I(this);if(P(e)){if(fh)return mh(a,e)}else{if(function(e){var t;return R(e)&&(void 0!==(t=e[hf])?!!t:"RegExp"==x(e))}(e)&&(t=Qt(I(vf(e))),!~ph(t,"g")))throw dh("`.matchAll` does not allow non-global regexes");if(fh)return mh(a,e);if(r=Q(e,oh))return d(r,e,a)}return n=Qt(a),new RegExp(e,"g")[oh](n)}}),oh in uh||ct(uh,oh,yh);const vh=(e,t="")=>({color:e[`--rebilly-${t}ColorText`],fontFamily:e[`--rebilly-${t}FontFamily`],fontSize:e[`--rebilly-${t}FontSize`],fontWeight:e[`--rebilly-${t}FontWeight`],lineHeight:e[`--rebilly-${t}FontLineHeight`],background:e[`--rebilly-${t}ColorBackground`],boxShadow:e[`--rebilly-${t}BoxShadow`]});var bh=({options:e={}})=>{const t=gh(`\n ${Yr.mainStyleVars}\n ${e.css||""}\n `);return{base:{...vh(t,"input"),":hover":vh(t,"inputHover"),":focus":vh(t,"inputFocus"),"::placeholder":vh(t,"inputPlaceholder"),"::selection":vh(t,"inputSelection")},invalid:{...vh(t,"inputError"),":hover":vh(t,"inputErrorHover"),":focus":vh(t,"inputErrorFocus"),"::placeholder":vh(t,"inputErrorPlaceholder"),"::selection":vh(t,"inputErrorSelection")},buttons:{base:{...vh(t,"buttonSecondary"),":hover":vh(t,"buttonSecondaryHover"),":focus":vh(t,"buttonSecondaryActive")},active:{...vh(t,"button"),":hover":vh(t,"buttonHover"),":focus":vh(t,"buttonActive")}}}};function wh({eventName:e,callback:t}){if(!Ii.includes(e))throw new Error(`${e} is not a supported event`);const n=yo(e);Ai[n].addEventListener(t)}const kh=(e,t)=>`\n <div class="rebilly-instruments-modal-overlay">\n <div class="rebilly-instruments-modal-container ${t?`rebilly-instruments-${t}`:""} ${e?"is-redirect":""}">\n ${e?"":'\n <svg class="rebilly-instruments-modal-close" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <path d="m15 13.5858 7.2929-7.293c.3905-.3904 1.0237-.3904 1.4142 0 .3905.3906.3905 1.0238 0 1.4143L16.4142 15l7.293 7.2929c.3904.3905.3904 1.0237 0 1.4142-.3906.3905-1.0238.3905-1.4143 0L15 16.4142l-7.2929 7.293c-.3905.3904-1.0237.3904-1.4142 0-.3905-.3906-.3905-1.0238 0-1.4143L13.5858 15l-7.293-7.2929c-.3904-.3905-.3904-1.0237 0-1.4142.3906-.3905 1.0238-.3905 1.4143 0L15 13.5858Z" fill-rule="nonzero"/>\n </svg>\n '}\n <div class="rebilly-instruments-modal-content"></div>\n </div>\n </div>\n`;async function $h({name:e="",url:t="",model:n={},classListArray:r=[],close:a=(()=>{})}={}){var o;const i=null==n||null===(o=n.method)||void 0===o?void 0:o.method,s="rebilly-instruments-approval-url"===e;Yr.form.insertAdjacentHTML("beforeend",kh(s,i));const l=document.querySelector(".rebilly-instruments-modal-overlay"),c=document.querySelector(".rebilly-instruments-modal-container"),u=document.querySelector(".rebilly-instruments-modal-close"),d=document.querySelector(".rebilly-instruments-modal-content");document.body.style.overflow="hidden",setTimeout((()=>{l.classList.add("is-visible"),c.classList.add("is-visible")}),240),Yr.loader.addDOMElement({section:"modal",el:d}),Yr.loader.startLoading({section:"modal",id:e});const p={options:Yr.toModel().options,...n},m=await new Mi({name:e,url:t,model:p,classListArray:r,container:d}),f=(...e)=>{c.classList.remove("is-visible"),l.classList.remove("is-visible"),setTimeout((()=>{document.body.style.overflow="auto";const t=l.children;for(let e=0;e<t.length;e+=1)t[e].remove();l.remove(),a(...e),m.destroy()}),300)};return m.bindEventListeners({close:f,loader:Yr.loader}),s||u.addEventListener("click",f),m}async function xh({payload:e}){var t,n,r,a,o;const{_raw:{id:i},isExistingInstrument:s}=e;delete e.isExistingInstrument,delete e._raw;const l={...e};s?l.paymentInstrumentId=i:l.token=i,null!==(t=Yr.options)&&void 0!==t&&t.invoiceId&&(l.invoiceId=Yr.options.invoiceId),null!==(n=Yr.options)&&void 0!==n&&n.transactionId&&(l.transactionId=Yr.options.transactionId),null!==(r=Yr.options)&&void 0!==r&&r.money&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.options.money.amount,l.currency=Yr.options.money.currency),null!==(a=Yr.options)&&void 0!==a&&a.deposit&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.data.amountAndCurrency.amount,l.currency=Yr.data.amountAndCurrency.currency),null!==(o=Yr.data)&&void 0!==o&&o.couponIds&&Array.isArray(Yr.data.couponIds)&&(l.couponIds=Yr.data.couponIds);let{fields:c}=await async function({data:e}){return uc((async()=>{const{token:t,transactionId:n,invoiceId:r,websiteId:a,paymentInstrumentId:o}=e,i=["riskMetadata","redirectUrl"];return t&&i.push("token"),o&&i.push("paymentInstrumentId"),n&&i.push("transactionId"),r&&i.push("invoiceId"),a&&i.push("amount","currency","websiteId"),Object.keys(e).forEach((t=>{i.includes(t)||delete e[t]})),Yr.storefront.purchase.payment({data:e})}))}({state:Yr,data:l});return c={transaction:c,token:c.token||Yr.options.jwt},Yr.data.invoice&&(c.invoice=Yr.data.invoice),c}async function Eh({payload:e}){const t={websiteId:Yr.options.websiteId,paymentInstruction:{token:e._raw.id},...e};Yr.data.acceptBumpOffer?t.items=Yr.options.bumpOffer:t.items=yc(Yr.options.items),Yr.data.couponIds&&Array.isArray(Yr.data.couponIds)&&(t.couponIds=Yr.data.couponIds),Yr.options.addons&&Yr.data.addons&&Array.isArray(Yr.data.addons)&&Yr.options.addons.forEach((e=>{Yr.data.addons.includes(e.planId)&&t.items.push(e)}));const{fields:n}=await async function({data:e}){return uc((async()=>{const t=["websiteId","paymentInstruction","items","billingAddress","deliveryAddress","shippingRateId","couponIds","password","redirectUrl"];return Object.keys(e).forEach((n=>{t.includes(n)||delete e[n]})),Yr.storefront.purchase.purchase({data:e})}))}({state:Yr,data:t});return n}async function Sh({payload:e}){Object.keys(e).forEach((t=>{null===e[t]&&delete e[t]}));try{var t,n;let r;return r=Yr.data.isPayment?await xh({state:Yr,payload:e}):await Eh({state:Yr,payload:e}),null!==(t=r.transaction)&&void 0!==t&&t.approvalUrl&&"unknown"===(null===(n=r.transaction)||void 0===n?void 0:n.result)?function({fields:e,payload:t}){var n,r;if(t.redirectUrl||null===(n=e.transaction)||void 0===n||!n.approvalUrl){const{paymentMethodsUrl:t}=Yr.options._computed,n=JSON.parse(JSON.stringify(e)),r={};Yr.data.isPayment?r.payment=n:r.purchase=n,Yr.data=new fd({...e}),$h({state:Yr,name:"rebilly-instruments-approval-url",url:`${t}/approval-url`,model:r,close:e=>{Ai.purchaseCompleted.dispatch(e)}})}else if(null!==(r=e.transaction)&&void 0!==r&&r.approvalUrl){var a;window.location=null===(a=e.transaction)||void 0===a?void 0:a.approvalUrl}}({state:Yr,fields:r,payload:e}):Ai.purchaseCompleted.dispatch(r),r}catch(e){return Ti(e),e}}async function _h({payload:e}){try{var t;const{_raw:{id:n},isExistingInstrument:r}=e;delete e.isExistingInstrument,delete e._raw;const a={...e};r?a.paymentInstrumentId=n:a.token=n;const{instrument:o,transaction:i}=await async function({data:e}){return uc((async()=>{var t,n;const{fields:r}=await Yr.storefront.paymentInstruments.create({data:e});Yr.storefront.setSessionToken(r.token||Yr.options.jwt);const a={id:r.id,data:{websiteId:Yr.options.websiteId,...e}};Yr.data.amountAndCurrency&&(a.data={...a.data,...Yr.data.amountAndCurrency}),null!==(t=Yr.data)&&void 0!==t&&null!==(n=t.transaction)&&void 0!==n&&n.redirectUrl&&(a.data.redirectUrl=`${a.data.redirectUrl}&originalRedirectUrl=${Yr.data.transaction.redirectUrl}`);const{fields:o}=await Yr.storefront.paymentInstruments.setup(a);return{instrument:r,transaction:o}}))}({data:{websiteId:null===(t=Yr.options)||void 0===t?void 0:t.websiteId,...a}});if(Yr.data=new fd({instrument:o,transaction:i}),i.approvalUrl&&"unknown"===i.result){const{paymentMethodsUrl:e}=Yr.options._computed;$h({name:"rebilly-instruments-approval-url",url:`${e}/approval-url`,model:{setup:{transaction:i}},close:({transaction:e=i})=>{Ai.setupCompleted.dispatch({instrument:o,transaction:e})}})}else Ai.setupCompleted.dispatch({instrument:o,transaction:i});return{instrument:o,transaction:i}}catch(e){return Ti(e),e}}async function Ph({componentName:e,payload:t}){switch(e){case"result":_d(),async function({payload:e}){var t,n;const r=Jr.form;r||await Id();const a=Yr.toModel(),o={options:a.options,mainStyleVars:a.mainStyleVars,[Yr.options.transactionType]:e};null==r||null===(t=r.component)||void 0===t||t.call("route",{name:"result"}),null==r||null===(n=r.component)||void 0===n||n.call("update",o)}({payload:t});break;case"confirmation":_d(),async function({payload:e}){var t,n,r,a;e.billingAddress&&Yr.summary&&Yr.data.isPurchase&&kc({instrument:e});const o=Jr.form;o||await Id();const i=Yr.toModel(),s={options:i.options,data:i.data,mainStyleVars:i.mainStyleVars,instrument:e};null==o||null===(t=o.component)||void 0===t||t.call("route",{name:"confirmation"}),null==o||null===(n=o.component)||void 0===n||n.call("update",s),null==o||null===(r=o.component)||void 0===r||r.on(`${o.name}-confirm-purchase`,(e=>{Sh({payload:e})})),null==o||null===(a=o.component)||void 0===a||a.on(`${o.name}-confirm-setup`,(e=>{_h({payload:e})}))}({payload:t});break;default:throw new Error(`'${e}' not a supported component`)}}function Ah({state:e,payload:t}){Ph({componentName:"result",payload:t,state:e})}var Ih=({state:e={}})=>{e.options.features.autoConfirmation&&wh({eventName:"instrument-ready",callback:t=>{var n;if("paypal"===(null===(n=t._raw)||void 0===n?void 0:n.method)&&!e.data.isShippingRequired)return"setup"===e.options.transactionType?_h({state:e,payload:t}):Sh({state:e,payload:t}),void e.loader.startLoading({state:e,id:"express-purchase",message:"form.loaderMessages.processingPayment"});Ph({componentName:"confirmation",payload:t,state:e})}}),e.options.features.autoResult&&(wh({eventName:"purchase-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Ah({state:e,payload:t})}}),wh({eventName:"setup-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Ah({state:e,payload:t})}}))};async function jh({setupFramepay:e=km,...t}={}){try{var n,r,a;Yr.data={},Yr.options={},Yr.form=Cd({element:"form",options:t}),Yr.summary=Cd({element:"summary",options:t}),Yr.form.style.maxWidth="750px",Yr.summary&&(Yr.summary.style.maxWidth="750px"),Yr.options=wm({options:t}),Yr.storefront=Ld({options:t}),Yr.mainStyleVars=Nm({options:t}),Yr.options.themeFramepay=bh({options:t}),Yr.loader.addDOMElement({el:Yr.form}),Yr.loader.addDOMElement({section:"summary",el:Yr.summary}),Yr.loader.startLoading({section:"summary",id:"rebilly-instruments-summary"}),Yr.loader.startLoading({id:"rebilly-instruments-form"});const[o]=await Promise.all([hd(),e()]);Yr.data=o,Ai.dataReady.dispatch(Yr.data),Yr.i18n=Mm(),!Yr.options.websiteId&&null!==(n=Yr.data.transaction)&&void 0!==n&&n.websiteId?Yr.options.websiteId=Yr.data.transaction.websiteId:!Yr.options.websiteId&&null!==(r=Yr.data.invoice)&&void 0!==r&&r.websiteId&&(Yr.options.websiteId=Yr.data.invoice.websiteId),Yr.data.transaction&&"setup"===(null===(a=Yr.data.transaction)||void 0===a?void 0:a.type)&&(Yr.options.transactionType="setup"),Yr.form&&Id().then((()=>{var e;null!==(e=Yr.options)&&void 0!==e&&e.deposit?kd():Pd()})),Yr.summary&&wc(),Yr.i18n({state:Yr}),Yr.hasMounted=!0,o.readyToPay.length||(Yr.loader.stopLoading({id:"rebilly-instruments-form"}),Ti(Yr.translate.getTranslation("form.error.noPaymentMethods")))}catch(e){throw Ti(e),e}Ih({state:Yr})}async function Ch(){var e;await(e=1e3,new Promise((t=>setTimeout(t,e)))),Object.keys(Jr).forEach((e=>{Jr.hasFrame(e)&&(Jr[e].destroy(),Jr[e]=null)})),_i.removeAll(document),Yr.hasMounted=!1,Yr.summary&&(Yr.summary.textContent=""),Yr.form.textContent="",Kl.cancelAll(),Yr.loader.clearAll()}var Lh=new class{constructor(){this.state=Yr,this.iframes=Jr}async mount(e){await jh(e)}async destroy(){await Ch()}async update(e){await async function({newOptions:e={}}){if(!Yr.hasMounted)throw Error("Update method cannot be called before mounting instruments");const t=Gr({...Yr.options},e);await Ch(),jh({form:Yr.form,summary:Yr.summary,...t})}({newOptions:e})}async purchase(e){await Sh({payload:e})}async setup(e){await _h({payload:e})}async show(e,t){await Ph({componentName:e,payload:t})}get version(){return"RebillyInstruments Ver.3.35.1"}on(e,t){wh({eventName:e,callback:t})}};return Lh}();
68
+ */var N=function(e,t){return null===e||isNaN(e)||"string"==typeof e?t:e},O=function(e,t,n){var r;void 0===e&&(e="#000"),void 0===t&&(t="base"),void 0===n&&(n=0),r=[[0,0,0],1,t,n],this.rgb=r[0],this.alpha=r[1],this.type=r[2],this.weight=r[3];var a=null===e?"#000":e;if("string"!=typeof a)throw new TypeError("Input should be a string: "+a);var o=_(a);if(!o)throw new Error("Unable to parse color from string: "+a);return this["_setFrom"+o.type.toUpperCase()](o.values.concat([o.alpha]))},R={hex:{configurable:!0}};return R.hex.get=function(){return this.hexString().replace(/^#/,"")},O.prototype.setColor=function(e){var t=_(e);return t?this["_setFrom"+t.type.toUpperCase()](t.values.concat([t.alpha])):null},O.prototype.tint=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#fff",this.rgbString(),t).rgba+")","tint",t)},O.prototype.shade=function(e,t){return void 0===t&&(t=N(e,50)),new O("rgb("+T("#000",this.rgbString(),t).rgba+")","shade",t)},O.prototype.tints=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.tint((r+1)*t)}))},O.prototype.shades=function(e,t){var n=this;return void 0===t&&(t=N(e,10)),Array.from({length:100/t},(function(e,r){return n.shade((r+1)*t)}))},O.prototype.all=function(e){return void 0===e&&(e=10),this.tints(e).reverse().concat([Object.assign(this)],this.shades(e))},O.prototype.hexString=function(){return j(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha]))},O.prototype.rgbString=function(){var e=(this.alpha>=1?this.rgb:this.rgb.concat([this.alpha])).join(", ");return(this.alpha>=1?"rgb":"rgba")+"("+e+")"},O.prototype.getBrightness=function(){return Math.round(this.rgb.reduce((function(e,t){return e+t}))/765*100)},O.prototype._setFromRGB=function(e){var t;return t=[[e[0],e[1],e[2]],e[3]],this.rgb=t[0],this.alpha=t[1],this},O.prototype._setFromHSL=function(e){var t,n=e[0],r=e[1],a=e[2],o=e[3];return t=[P([n,r,a]).map(Math.round),o],this.rgb=t[0],this.alpha=t[1],this},Object.defineProperties(O.prototype,R),O.VERSION="v2.1.1",O}()})),xm=$m;const Em=e=>new xm(e);function Sm(e,t=1){if(null===e)return e;const n=Em(e);return n.alpha=t,n.rgbString()}const _m=e=>Sm(e,.5),Pm=(e,t)=>{if(null===e)return e;return Em(e).shade(t).hexString()};function Am(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Im{constructor(e){Am(this,"allStyles",["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial","inherit"]),this.str=e||"";const t=this.allStyles.find((e=>this.str.includes(e))),n=this.str.split(t).map((e=>e.trim()));this.border=[n[0],t,n[1]]}get stylePosition(){let e=0;return 3===this.border.length?e=1:2===this.border.length&&(e=this.allStyles.includes(this.border[0])?0:1),e}updateColor(e){return this.border[this.stylePosition+1]=e,this}get value(){return this.border.join(" ")}}const jm={colorPrimary:{fallback:{type:"static",value:"#0044D4"}},colorBackground:{fallback:{type:"static",value:"#FFFFFF"}},colorText:{fallback:{type:"static",value:"#0D2B3E"}},colorMutedText:{fallback:{type:"func",value:e=>_m(e.colorText)}},colorMutedBorder:{fallback:{type:"func",value:e=>e.colorTextProvided?Sm(e.colorText,.25):"#DCE3EA"}},colorDanger:{fallback:{type:"static",value:"#CD5C5C"}},fontFamily:{fallback:{type:"static",value:"-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial sans-serif"}},fontSizeBase:{fallback:{type:"static",value:"16px"}},fontWeightBase:{fallback:{type:"static",value:"500"}},fontLineHeightBase:{fallback:{type:"func",value:e=>`calc(${e.fontSizeBase} * 1.5)`}},fontSmooth:{fallback:{type:"static",value:"auto"}},borderRadius:{fallback:{type:"static",value:"6px"}},headingFontFamily:{fallback:{type:"variable",value:"fontFamily"}},headingFontWeight:{fallback:{type:"static",value:"600"}},headingColorText:{fallback:{type:"variable",value:"colorText"}},buttonColorBackground:{fallback:{type:"variable",value:"colorPrimary"}},buttonColorText:{fallback:{type:"static",value:"#FFFFFF"}},buttonFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonBorder:{fallback:{type:"static",value:"1px solid transparent"}},buttonBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonBoxShadow:{fallback:{type:"static",value:"none"}},buttonSecondaryColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryColorText:{fallback:{type:"variable",value:"colorPrimary"}},buttonSecondaryFontFamily:{fallback:{type:"variable",value:"fontFamily"}},buttonSecondaryFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},buttonSecondaryFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},buttonSecondaryFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},buttonSecondaryBorder:{fallback:{type:"func",value:e=>`1px solid ${e.colorPrimary}`}},buttonSecondaryBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},buttonSecondaryBoxShadow:{fallback:{type:"static",value:"none"}},buttonHoverColorBackground:{fallback:{type:"func",value:e=>e.buttonColorBackgroundProvided?Pm(e.buttonColorBackground,20):Pm(e.colorPrimary,20)}},buttonHoverColorText:{fallback:{type:"variable",value:"buttonColorText"}},buttonHoverFontFamily:{fallback:{type:"variable",value:"buttonFontFamily"}},buttonHoverFontSize:{fallback:{type:"variable",value:"buttonFontSize"}},buttonHoverFontLineHeight:{fallback:{type:"variable",value:"buttonFontLineHeight"}},buttonHoverFontWeight:{fallback:{type:"variable",value:"buttonFontWeight"}},buttonHoverBorder:{fallback:{type:"func",value:e=>{if(e.buttonBorderProvided)return e.buttonBorder;return new Im(e.buttonBorder).updateColor(e.buttonHoverColorBackground).value}}},buttonHoverBorderRadius:{fallback:{type:"variable",value:"buttonBorderRadius"}},buttonHoverBoxShadow:{fallback:{type:"variable",value:"buttonBoxShadow"}},buttonSecondaryHoverColorBackground:{fallback:{type:"variable",value:"colorBackground"}},buttonSecondaryHoverColorText:{fallback:{type:"variable",value:"buttonSecondaryColorText"}},buttonSecondaryHoverFontFamily:{fallback:{type:"variable",value:"buttonSecondaryFontFamily"}},buttonSecondaryHoverFontSize:{fallback:{type:"variable",value:"buttonSecondaryFontSize"}},buttonSecondaryHoverFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryFontLineHeight"}},buttonSecondaryHoverFontWeight:{fallback:{type:"variable",value:"buttonSecondaryFontWeight"}},buttonSecondaryHoverBorder:{fallback:{type:"variable",value:"buttonSecondaryBorder"}},buttonSecondaryHoverBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryBorderRadius"}},buttonSecondaryHoverBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryBoxShadow"}},buttonActiveColorBackground:{fallback:{type:"variable",value:"buttonHoverColorBackground"}},buttonActiveColorText:{fallback:{type:"variable",value:"buttonHoverColorText"}},buttonActiveFontFamily:{fallback:{type:"variable",value:"buttonHoverFontFamily"}},buttonActiveFontSize:{fallback:{type:"variable",value:"buttonHoverFontSize"}},buttonActiveFontLineHeight:{fallback:{type:"variable",value:"buttonHoverFontLineHeight"}},buttonActiveFontWeight:{fallback:{type:"variable",value:"buttonHoverFontWeight"}},buttonActiveBorder:{fallback:{type:"variable",value:"buttonHoverBorder"}},buttonActiveBorderRadius:{fallback:{type:"variable",value:"buttonHoverBorderRadius"}},buttonActiveBoxShadow:{fallback:{type:"variable",value:"buttonHoverBoxShadow"}},buttonSecondaryActiveColorBackground:{fallback:{type:"variable",value:"buttonSecondaryHoverColorBackground"}},buttonSecondaryActiveColorText:{fallback:{type:"variable",value:"buttonSecondaryHoverColorText"}},buttonSecondaryActiveFontFamily:{fallback:{type:"variable",value:"buttonSecondaryHoverFontFamily"}},buttonSecondaryActiveFontSize:{fallback:{type:"variable",value:"buttonSecondaryHoverFontSize"}},buttonSecondaryActiveFontLineHeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontLineHeight"}},buttonSecondaryActiveFontWeight:{fallback:{type:"variable",value:"buttonSecondaryHoverFontWeight"}},buttonSecondaryActiveBorder:{fallback:{type:"variable",value:"buttonSecondaryHoverBorder"}},buttonSecondaryActiveBorderRadius:{fallback:{type:"variable",value:"buttonSecondaryHoverBorderRadius"}},buttonSecondaryActiveBoxShadow:{fallback:{type:"variable",value:"buttonSecondaryHoverBoxShadow"}},inputColorBackground:{fallback:{type:"static",value:"transparent"}},inputColorText:{fallback:{type:"variable",value:"colorText"}},inputFontFamily:{fallback:{type:"variable",value:"fontFamily"}},inputFontSize:{fallback:{type:"variable",value:"fontSizeBase"}},inputFontLineHeight:{fallback:{type:"variable",value:"fontLineHeightBase"}},inputFontWeight:{fallback:{type:"variable",value:"fontWeightBase"}},inputBorder:{fallback:{type:"func",value:e=>`1px solid ${Pm(e.colorMutedBorder,4)}`}},inputBorderRadius:{fallback:{type:"variable",value:"borderRadius"}},inputBoxShadow:{fallback:{type:"static",value:"none"}},inputHoverColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputHoverColorText:{fallback:{type:"variable",value:"inputColorText"}},inputHoverFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputHoverFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputHoverFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputHoverFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputHoverBorder:{fallback:{type:"variable",value:"inputBorder"}},inputHoverBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputHoverBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputFocusColorBackground:{fallback:{type:"variable",value:"inputHoverColorBackground"}},inputFocusColorText:{fallback:{type:"variable",value:"inputHoverColorText"}},inputFocusFontFamily:{fallback:{type:"variable",value:"inputHoverFontFamily"}},inputFocusFontSize:{fallback:{type:"variable",value:"inputHoverFontSize"}},inputFocusFontLineHeight:{fallback:{type:"variable",value:"inputHoverFontLineHeight"}},inputFocusFontWeight:{fallback:{type:"variable",value:"inputHoverFontWeight"}},inputFocusBorder:{fallback:{type:"func",value:e=>{if(e.inputHoverBorderProvided)return e.inputHoverBorder;return new Im(e.inputBorder).updateColor(e.colorPrimary).value}}},inputFocusBorderRadius:{fallback:{type:"variable",value:"inputHoverBorderRadius"}},inputFocusBoxShadow:{fallback:{type:"func",value:e=>`0 0 0 1px ${e.colorPrimary}`}},inputPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputColorTextProvided?_m(e.inputColorText):e.colorMutedText}},inputPlaceholderFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputPlaceholderFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputPlaceholderFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputSelectionColorText:{fallback:{type:"static",value:"initial"}},inputSelectionColorBackground:{fallback:{type:"static",value:"highlight"}},inputErrorColorBackground:{fallback:{type:"variable",value:"inputColorBackground"}},inputErrorColorText:{fallback:{type:"variable",value:"colorDanger"}},inputErrorFontFamily:{fallback:{type:"variable",value:"inputFontFamily"}},inputErrorFontSize:{fallback:{type:"variable",value:"inputFontSize"}},inputErrorFontLineHeight:{fallback:{type:"variable",value:"inputFontLineHeight"}},inputErrorFontWeight:{fallback:{type:"variable",value:"inputFontWeight"}},inputErrorBorder:{fallback:{type:"func",value:e=>{if(e.inputBorderProvided){return new Im(e.inputBorder).updateColor(e.colorDanger).value}return`1px solid ${e.colorDanger}`}}},inputErrorBorderRadius:{fallback:{type:"variable",value:"inputBorderRadius"}},inputErrorBoxShadow:{fallback:{type:"variable",value:"inputBoxShadow"}},inputErrorHoverColorBackground:{fallback:{type:"variable",value:"inputErrorColorBackground"}},inputErrorHoverColorText:{fallback:{type:"variable",value:"inputErrorColorText"}},inputErrorHoverFontFamily:{fallback:{type:"variable",value:"inputErrorFontFamily"}},inputErrorHoverFontSize:{fallback:{type:"variable",value:"inputErrorFontSize"}},inputErrorHoverFontLineHeight:{fallback:{type:"variable",value:"inputErrorFontLineHeight"}},inputErrorHoverFontWeight:{fallback:{type:"variable",value:"inputErrorFontWeight"}},inputErrorHoverBorder:{fallback:{type:"variable",value:"inputErrorBorder"}},inputErrorHoverBorderRadius:{fallback:{type:"variable",value:"inputErrorBorderRadius"}},inputErrorHoverBoxShadow:{fallback:{type:"variable",value:"inputErrorBoxShadow"}},inputErrorFocusColorBackground:{fallback:{type:"variable",value:"inputErrorHoverColorBackground"}},inputErrorFocusColorText:{fallback:{type:"variable",value:"inputErrorHoverColorText"}},inputErrorFocusFontFamily:{fallback:{type:"variable",value:"inputErrorHoverFontFamily"}},inputErrorFocusFontSize:{fallback:{type:"variable",value:"inputErrorHoverFontSize"}},inputErrorFocusFontLineHeight:{fallback:{type:"variable",value:"inputErrorHoverFontLineHeight"}},inputErrorFocusFontWeight:{fallback:{type:"variable",value:"inputErrorHoverFontWeight"}},inputErrorFocusBorder:{fallback:{type:"variable",value:"inputErrorHoverBorder"}},inputErrorFocusBorderRadius:{fallback:{type:"variable",value:"inputErrorHoverBorderRadius"}},inputErrorFocusBoxShadow:{fallback:{type:"variable",value:"inputErrorHoverBoxShadow"}},inputErrorPlaceholderColorText:{fallback:{type:"func",value:e=>e.inputErrorColorTextProvided?_m(e.inputErrorColorText):_m(e.colorDanger)}},inputErrorPlaceholderFontFamily:{fallback:{type:"variable",value:"inputPlaceholderFontFamily"}},inputErrorPlaceholderFontSize:{fallback:{type:"variable",value:"inputPlaceholderFontSize"}},inputErrorPlaceholderFontLineHeight:{fallback:{type:"variable",value:"inputPlaceholderFontLineHeight"}},inputErrorPlaceholderFontWeight:{fallback:{type:"variable",value:"inputPlaceholderFontWeight"}},inputErrorSelectionColorText:{fallback:{type:"variable",value:"inputSelectionColorText"}},inputErrorSelectionColorBackground:{fallback:{type:"variable",value:"inputSelectionColorBackground"}},labels:{fallback:{type:"static",value:"floating"}}};var Cm=new Proxy(jm,{get(e,t,n){if(t in e){if(e[t].value)return e[t].value;const{type:r,value:a}=e[t].fallback;if("static"===r)return a;if("variable"===r)return`var(--rebilly-${a})`;if("func"===r)return a(n)}if(t.endsWith("Provided")){const n=t.replace("Provided","");if(n in e)return e[n].isProvided}},set:(e,t,n)=>{if(!(t in e)||!n)throw new Error(`Invalid theme option provided: ${t}`);return e[t].value=n,e[t].isProvided=!0,!0}});class Lm{constructor(e={}){this.overrides=e,this.theme=Cm}overrideTheme(){Object.keys(this.overrides).forEach((e=>{this.theme[e]=this.overrides[e]}))}get cssVars(){return Object.keys(this.theme).filter((e=>!Lm.nonCssProperties.includes(e))).map(((e,t)=>`${t?" ":""}--rebilly-${e}: ${this.theme[e]};`)).join("\n")}build(){return this.overrideTheme(),{cssVars:this.cssVars}}}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Lm,"nonCssProperties",["labels"]);function Tm(e){let t=e;return t=t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),t=t.replace(/\s{2,}/g," "),t=t.replace(/\s([{:}])\s/g,"$1"),t=t.replace(/([;,])\s/g,"$1"),t=t.replace(/\s!/g,"!"),t}var Nm=({options:{theme:e={},css:t}}={})=>{const n=(e=>{const t=`\n ${(e=>`\n/* Instruments 'global' variables\n------------------------------------------------------------ */\n:root {\n ${e.cssVars}\n\n --rebilly-fontWeight400: 400;\n --rebilly-fontWeight500: 500;\n --rebilly-fontWeight600: 600;\n --rebilly-fontScaleFactor: 1.5;\n --rebilly-fontScaleFactorS: 0.875;\n --rebilly-fontSizeS: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactorS));\n --rebilly-fontLineHeightS: calc(var(--rebilly-fontSizeS) * 1);\n\n --rebilly-fontSizeL: calc(var(--rebilly-fontSizeBase) * var(--rebilly-fontScaleFactor));\n --rebilly-fontLineHeightL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-fontMarginTopL: 0;\n --rebilly-fontMarginBottomL: var(--rebilly-fontLineHeightBase);\n\n --rebilly-spacing2xs: calc(var(--rebilly-fontLineHeightBase) / 6);\n --rebilly-spacingXs: calc(var(--rebilly-fontLineHeightBase) / 4);\n --rebilly-spacingS: calc(var(--rebilly-fontLineHeightBase) / 2);\n --rebilly-spacingM: var(--rebilly-fontLineHeightBase);\n --rebilly-spacingL: calc(var(--rebilly-fontLineHeightBase) * 2);\n --rebilly-spacingXl: calc(var(--rebilly-fontLineHeightBase) * 4);\n\n --rebilly-spacingFormElementMinHeight: calc(var(--rebilly-spacingM) * 1.83333);\n\n --rebilly-summaryLoaderMinHeight: var(--rebilly-fontLineHeightBase);\n --rebilly-methodLoaderMinHeight: calc((4 * var(--rebilly-spacingFormElementMinHeight)) + (2 * var(--rebilly-fontLineHeightBase)) + (2 * var(--rebilly-spacingM)) + var(--rebilly-spacing2xs) + var(--rebilly-fontSizeS) + calc(2 * (var(--rebilly-spacingXs) + var(--rebilly-spacingS))) + var(--rebilly-spacingL));\n}\n\n/* Base, Typography\n------------------------------------------------------------ */\n/* Base setup for top level elements */\n.rebilly-instruments-content {\n color: var(--rebilly-colorText);\n background: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeBase);\n font-weight: var(--rebilly-fontWeightBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-fontFamily);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: left;\n transition: all 200ms;\n font-smooth: var(--rebilly-fontSmooth);\n padding: 2px;\n font-display: swap;\n}\n\n/* Views. Method Selector\n------------------------------------------------------------ */\n.rebilly-instruments-method-selector.has-express-compact {\n padding-top: var(--rebilly-spacingS);\n}\n\n/* Express Methods\n------------------------------------------------------------ */\n@-webkit-keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n@keyframes rebillyExpressShine {\n to {\n background-position-x: -200%;\n }\n}\n\n.rebilly-instruments-express-methods { padding: 2px; }\n\n.rebilly-instruments-express-methods.is-compact {\n border: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS);\n padding-top: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS));\n padding-top: calc(var(--rebilly-fontSizeBase) + var(--rebilly-spacing2xs));\n border-radius: var(--rebilly-borderRadius);\n position: relative;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-iframe {\n display: block;\n margin-bottom: 0;\n height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > * {\n border-radius: 6px;\n margin-bottom: var(--rebilly-spacingS);\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n min-height: 48px;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 0px;\n flex: 1 1 0px;\n max-width: 260px;\n margin: 0 var(--rebilly-spacingXs);\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:first-child {\n margin-left: 0;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin-right: 0;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-express-methods-label {\n display: none;\n}\n\n.rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-label {\n position: absolute;\n font-family: var(--rebilly-fontFamily);\n top: 0; left: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n color: var(--rebilly-colorText);\n padding: var(--rebilly-spacing2xs) var(--rebilly-spacingM);\n line-height: 1;\n background: var(--rebilly-colorBackground);\n display: inline-block;\n font-weight: var(--rebilly-fontWeightBase);\n min-height: auto;\n margin: 0;\n white-space: nowrap;\n}\n\n.rebilly-instruments-express-methods .rebilly-instruments-google-pay-method {\n border-radius: 100px;\n}\n\n@media (max-width: 600px) {\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > * {\n max-width: 100%;\n margin: 0 0 var(--rebilly-spacingS);\n }\n \n .rebilly-instruments-express-methods.is-compact .rebilly-instruments-express-methods-container > *:last-child {\n margin: 0;\n }\n}\n\n/* Components. Divider\n------------------------------------------------------------ */\n.rebilly-instruments-divider {\n line-height: var(--rebilly-fontLineHeightBase);\n padding: var(--rebilly-spacingM) 0;\n margin: 0;\n position: relative;\n outline: 0;\n border: 0;\n text-align: center;\n font-family: var(--rebilly-fontFamily);\n}\n\n.rebilly-instruments-divider-s { padding: var(--rebilly-spacingS) 0; }\n.rebilly-instruments-divider-xs { padding: var(--rebilly-spacingXs) 0; }\n\n.rebilly-instruments-divider::before {\n background: var(--rebilly-colorMutedBorder);\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n height: 1px;\n}\n\n.rebilly-instruments-divider .rebilly-instruments-divider-label {\n color: var(--rebilly-colorMutedText);\n font-weight: var(--rebilly-fontWeightBase);\n padding: 0 var(--rebilly-spacingM);\n line-height: var(--rebilly-fontLineHeightS);\n background-color: var(--rebilly-colorBackground);\n font-size: var(--rebilly-fontSizeS);\n position: relative;\n display: inline-block;\n}\n\n/* Components. Icons\n------------------------------------------------------------ */\n.rebilly-instruments-icon {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n/* Components. Forms. Checkboxes\n------------------------------------------------------------ */\n.rebilly-instruments-form-field-checkbox {\n position: relative;\n opacity: 1;\n align-items: center;\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n cursor: pointer;\n transform: none;\n}\n\n.rebilly-instruments-form-field-checkbox > * {\n cursor: pointer;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.rebilly-instruments-form-field-checkbox span {\n position: relative;\n top: 0;\n left: 0;\n width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n min-width: calc(var(--rebilly-spacingM) - var(--rebilly-spacing2xs));\n border-radius: 4px;\n box-shadow: inset 0 0 0 2px var(--rebilly-colorMutedBorder);\n margin-right: var(--rebilly-spacingS);\n background-color: transparent;\n transition: all 200ms;\n}\n\n.rebilly-instruments-form-field-checkbox span:after {\n content: '';\n position: absolute;\n border: solid var(--rebilly-colorPrimary);\n width: calc(var(--rebilly-spacingXs) + var(--rebilly-spacing2xs));\n height: calc(var(--rebilly-spacingXs) - var(--rebilly-spacing2xs) + 2px);\n border-width: 2px 2px 0 0;\n border-radius: 2px;\n top: 50%;\n left: 50%;\n opacity: 0;\n transform: translateY(-60%) translateX(-50%) rotate(135deg);\n transition: all 0.2s ease;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:focus ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span {\n box-shadow: inset 0 0 0 2px var(--rebilly-colorPrimary);\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:checked ~ span:after {\n opacity: 1;\n}\n\n.rebilly-instruments-form-field-checkbox input[type="checkbox"]:disabled ~ span {\n opacity: 0.6;\n}\n\n/* Vendor, Postmate\n------------------------------------------------------------ */\n.rebilly-instruments-iframe {\n border: none;\n width: 100%;\n height: 0;\n padding: 0;\n}\n\n.rebilly-instruments-iframe-overlay {\n top: -2px;\n left: -2px;\n width: calc(100vw + 2px);\n height: 100vh;\n min-height: calc(100vh + 4px);\n position: fixed;\n z-index: 99999999999999;\n}\n\n/* Views. Modal\n------------------------------------------------------------ */\n.rebilly-instruments-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 1055;\n padding: 30px;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n -webkit-transition: all 0.12s ease-in-out;\n transition: all 0.12s ease-in-out;\n background-color: rgba(0,0,0,0.7);\n opacity: 0\n}\n\n.rebilly-instruments-modal-overlay.is-visible {\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container {\n -webkit-transition: all .24s ease-in-out;\n transition: all .24s ease-in-out;\n position: relative;\n max-width: 750px;\n background: var(--rebilly-colorBackground);\n margin: 50px auto 20px;\n -webkit-box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);\n border-radius: 4px;\n -webkit-transform: translateY(-50px);\n transform: translateY(-50px);\n opacity: 0;\n}\n\n.rebilly-instruments-modal-container.is-visible {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n}\n\n.rebilly-instruments-modal-container.is-redirect {\n max-width: 60vw;\n width: auto;\n}\n\n.rebilly-instruments-modal-content {\n -webkit-transition: all .15s;\n transition: all .15s;\n padding: 20px;\n overflow: hidden;\n background-color: var(--rebilly-colorBackground);\n text-align: center;\n border-radius: 4px;\n}\n\n.rebilly-instruments-modal-content .rebilly-instruments-iframe {\n -webkit-transition: all .15s;\n transition: all .15s;\n height: auto;\n min-height: 360px;\n}\n\n.rebilly-instruments-modal-container.is-redirect .rebilly-instruments-modal-content {\n padding: 0;\n}\n\n.rebilly-instruments-modal-close {\n position: absolute;\n width: 30px;\n height: 30px;\n top: -40px;\n right: 0;\n fill: #FFF;\n cursor: pointer;\n}\n\n.rebilly-instruments-modal-close:hover{\n color: #000;\n}\n\n@media screen and (max-width: 480px) {\n .rebilly-instruments-modal-container.is-redirect {\n max-width: 96vw;\n margin: 20px auto 20px;\n }\n}\n\n/* Components. Loader\n------------------------------------------------------------ */\n.rebilly-instruments-loader {\n text-align: left;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background-color: var(--rebilly-colorBackground);\n z-index: 1000;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader.is-active {\n display: block;\n}\n\n/* Type */\n.rebilly-instruments-loader p {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n.rebilly-instruments-loader small {\n color: var(--rebilly-colorText);\n display: inline-block;\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: 1;\n}\n\n/* Summary */\n.rebilly-instruments-summary-loader-total p.total {\n font-family: var(--rebilly-fontFamily);\n font-size: var(--rebilly-fontSizeL);\n font-weight: var(--rebilly-headingFontWeight);\n}\n\n/* Methods */\n.rebilly-instruments-methods-loader-card-icon {\n width: calc(var(--rebilly-fontLineHeightBase) + 10px);\n height: var(--rebilly-fontLineHeightBase);\n margin-left: var(--rebilly-spacing2xs);\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-methods-loader-form-fields { margin: calc(var(--rebilly-spacingXs) + var(--rebilly-spacingS)) 0; }\n\n/* Spinner */\n.rebilly-instruments-loader-spinner {\n top: 50%;\n left: 50%;\n position: absolute;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: 2px solid transparent;\n border-top: 2px solid var(--rebilly-colorPrimary);\n border-radius: 50%;\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n margin-top: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n margin-left: calc(-1 * var(--rebilly-fontLineHeightBase) / 2);\n -webkit-animation: spin 0.5s ease infinite;\n animation: spin 0.5s ease infinite;\n}\n\n@-webkit-keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }\n}\n\n/* Utils */\n.rebilly-instruments-loader-display-flex { display: -webkit-box; display: -ms-flexbox; display: flex; }\n.rebilly-instruments-loader-align-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }\n.rebilly-instruments-loader-justify-space-between { -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }\n.rebilly-instruments-loader-justify-end { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; }\n\n.is-el-loading {\n position: relative;\n color: transparent!important;\n}\n\n.is-el-loading::before {\n position: absolute;\n content: '';\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: linear-gradient(110deg, var(--rebilly-colorMutedBorder) 0%, var(--rebilly-colorBackground) 25%, var(--rebilly-colorMutedBorder) 50%);\n background-size: 200% 100%;\n -webkit-animation: 1.5s rebillyExpressShine linear infinite;\n animation: 1.5s rebillyExpressShine linear infinite;\n border-radius: var(--rebilly-borderRadius);\n}\n\n.rebilly-instruments-loader-form-el {\n width: 100%;\n min-height: var(--rebilly-spacingFormElementMinHeight);\n}\n\n.rebilly-instruments-loader-form-label {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n margin-bottom: var(--rebilly-spacing2xs);\n}\n\n.rebilly-instruments-loader-form-el.is-button {\n margin-top: var(--rebilly-spacingL);\n text-align: center;\n font-size: var(--rebilly-buttonFontSize);\n font-family: var(--rebilly-buttonFontFamily);\n line-height: var(--rebilly-buttonFontLineHeight);\n padding: var(--rebilly-spacingS);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background: var(--rebilly-buttonColorBackground);\n color: transparent;\n border-radius: var(--rebilly-buttonBorderRadius);\n font-weight: var(--rebilly-buttonFontWeight);\n border: var(--rebilly-buttonBorder);\n -webkit-box-shadow: var(--rebilly-buttonBoxShadow);\n box-shadow: var(--rebilly-buttonBoxShadow);\n outline: none;\n cursor: not-allowed;\n opacity: 0.6; \n}\n\n.rebilly-instruments-methods-loader-card-icon.is-el-loading::before {\n border-radius: calc(var(--rebilly-borderRadius) / 2);\n}\n\n/* Error\n------------------------------------------------------------ */\n.rebilly-instruments-error-card {\n border: 1px solid var(--rebilly-colorDanger);\n border-radius: var(--rebilly-borderRadius);\n text-align: left;\n padding: var(--rebilly-spacingS);\n margin-bottom: var(--rebilly-spacingL);\n}\n\n.rebilly-instruments-error-card-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n width: 100%;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n.rebilly-instruments-error-card-title {\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n font-family: var(--rebilly-headingFontFamily);\n margin: 0 0 var(--rebilly-spacingS);\n color: var(--rebilly-colorDanger);\n}\n\n.rebilly-instruments-error-card-close-button {\n cursor: pointer;\n background: transparent;\n border: none;\n padding: 0;\n}\n\n.rebilly-instruments-error-card-close-button svg {\n width: var(--rebilly-fontLineHeightBase);\n height: var(--rebilly-fontLineHeightBase);\n fill: var(--rebilly-colorText);\n}\n\n.rebilly-instruments-error-card-details {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.rebilly-instruments-error-card-details li,\n.rebilly-instruments-error-card-message {\n color: var(--rebilly-colorText);\n margin: 0;\n font-weight: var(--rebilly-fontWeightBase);\n font-size: var(--rebilly-fontSizeBase);\n line-height: var(--rebilly-fontLineHeightBase);\n}\n\n\n/* Bump offer\n------------------------------------------------------------ */\n.rebilly-instruments-bump-offers {\n text-align: left;\n margin-bottom: calc(var(--rebilly-spacingM) + var(--rebilly-fontSizeS));\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-form-field-checkbox {\n margin-bottom: var(--rebilly-spacingS);\n}\n\n.rebilly-instruments-bump-offers .rebilly-instruments-bump-offer-label {\n width: 100%;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item {\n border-bottom: 1px solid var(--rebilly-colorMutedBorder);\n padding: var(--rebilly-spacingS) 0;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.rebilly-instruments-bump-offer-line-item:first-child {\n padding-top: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure {\n margin: 0 var(--rebilly-spacingS) 0 0;\n flex: 0 0 auto;\n width: 48px;\n height: 48px;\n border-radius: var(--rebilly-borderRadius);\n border: 1px solid var(--rebilly-colorMutedBorder);\n overflow: hidden;\n}\n\n.rebilly-instruments-bump-offer-line-item-figure img {\n width: 100%;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis {\n flex: 1 2 auto;\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-title {\n margin: 0;\n}\n\n.rebilly-instruments-bump-offer-line-item-synopsis-description {\n color: var(--rebilly-colorMutedText);\n margin: 0;\n font-size: var(--rebilly-fontSizeS);\n line-height: var(--rebilly-fontLineHeightS);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--rebilly-colorMutedText);\n margin: 0 0 0 var(--rebilly-spacingS);\n font-weight: var(--rebilly-fontWeightBase);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown .rebilly-instruments-icon {\n fill: var(--rebilly-colorMutedText);\n}\n\n.rebilly-instruments-bump-offer-line-item-price-breakdown-unit-price {\n color: var(--rebilly-colorText);\n}\n`)(new Lm(e).build())}\n `;return t})(e||{});return jd({element:"style",attributes:{type:"text/css"},content:Tm(n),target:"head"}),t&&jd({element:"style",attributes:{type:"text/css"},content:Tm(t),target:"head"}),n};const Om=()=>{Yr.translate.init(Yr.options.locale,Yr.options.i18n),Yr.translate.translateItems()};var Rm,Mm=()=>{var e,t;if("auto"===Yr.options.locale&&null!==(e=Yr.data.riskMetadata)&&void 0!==e&&null!==(t=e.browserData)&&void 0!==t&&t.language){const{browserData:{language:e}}=Yr.data.riskMetadata;Yr.options.locale=e}return Yr.translate.init(Yr.options.locale,Yr.options.i18n),Om},Fm=function(e){if("Function"===x(e))return w(e)},Hm=Object.keys||function(e){return $t(e,xt)},Dm=l&&!Ie?Object.defineProperties:function(e,t){Le(e);for(var n,r=j(t),a=Hm(t),o=a.length,i=0;o>i;)De.f(e,n=a[i++],r[n]);return e},Bm={f:Dm},qm=M("document","documentElement"),Vm="prototype",zm="script",Wm=et("IE_PROTO"),Um=function(){},Gm=function(e){return"<"+zm+">"+e+"</"+zm+">"},Zm=function(e){e.write(Gm("")),e.close();var t=e.parentWindow.Object;return e=null,t},Xm=function(){try{Rm=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Xm="undefined"!=typeof document?document.domain&&Rm?Zm(Rm):(t=Ee("iframe"),n="java"+zm+":",t.style.display="none",qm.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Gm("document.F=Object")),e.close(),e.F):Zm(Rm);for(var r=xt.length;r--;)delete Xm[Vm][xt[r]];return Xm()};tt[Wm]=!0;var Km,Jm,Ym,Qm=Object.create||function(e,t){var n;return null!==e?(Um[Vm]=Le(e),n=new Um,Um[Vm]=null,n[Wm]=e):n=Xm(),void 0===t?n:Bm.f(n,t)},ef=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),tf=et("IE_PROTO"),nf=Object,rf=nf.prototype,af=ef?nf.getPrototypeOf:function(e){var t=se(e);if(ce(t,tf))return t[tf];var n=t.constructor;return N(n)&&t instanceof n?n.prototype:t instanceof nf?rf:null},of=ge("iterator"),sf=!1;[].keys&&("next"in(Ym=[].keys())?(Jm=af(af(Ym)))!==Object.prototype&&(Km=Jm):sf=!0);var lf=!R(Km)||s((function(){var e={};return Km[of].call(e)!==e}));lf&&(Km={}),N(Km[of])||ct(Km,of,(function(){return this}));var cf={IteratorPrototype:Km,BUGGY_SAFARI_ITERATORS:sf},uf=De.f,df=ge("toStringTag"),pf=function(e,t,n){e&&!n&&(e=e.prototype),e&&!ce(e,df)&&uf(e,df,{configurable:!0,value:t})},mf=cf.IteratorPrototype,ff=function(e,t){return{value:e,done:t}},hf=ge("match"),yf=function(){var e=Le(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},gf=RegExp.prototype,vf=function(e){var t=e.flags;return void 0!==t||"flags"in gf||ce(e,"flags")||!F(gf,e)?t:d(yf,e)},bf=function(){},wf=[],kf=M("Reflect","construct"),$f=/^\s*(?:class|function)\b/,xf=w($f.exec),Ef=!$f.exec(bf),Sf=function(e){if(!N(e))return!1;try{return kf(bf,wf,e),!0}catch(e){return!1}},_f=function(e){if(!N(e))return!1;switch(Jt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ef||!!xf($f,Ke(e))}catch(e){return!0}};_f.sham=!0;var Pf,Af,If=!kf||s((function(){var e;return Sf(Sf.call)||!Sf(Object)||!Sf((function(){e=!0}))||e}))?_f:Sf,jf=TypeError,Cf=ge("species"),Lf=function(e,t){var n,r=Le(e).constructor;return void 0===r||P(n=Le(r)[Cf])?t:function(e){if(If(e))return e;throw jf(K(e)+" is not a constructor")}(n)},Tf=w("".charAt),Nf=w("".charCodeAt),Of=w("".slice),Rf=function(e){return function(t,n){var r,a,o=Qt(I(t)),i=mt(n),s=o.length;return i<0||i>=s?e?"":void 0:(r=Nf(o,i))<55296||r>56319||i+1===s||(a=Nf(o,i+1))<56320||a>57343?e?Tf(o,i):r:e?Of(o,i,i+2):a-56320+(r-55296<<10)+65536}},Mf={codeAt:Rf(!1),charAt:Rf(!0)}.charAt,Ff=i.RegExp,Hf=s((function(){var e=Ff("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Df=Hf||s((function(){return!Ff("a","y").sticky})),Bf={BROKEN_CARET:Hf||s((function(){var e=Ff("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Df,UNSUPPORTED_Y:Hf},qf=i.RegExp,Vf=s((function(){var e=qf(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),zf=i.RegExp,Wf=s((function(){var e=zf("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Uf=st.get,Gf=oe("native-string-replace",String.prototype.replace),Zf=RegExp.prototype.exec,Xf=Zf,Kf=w("".charAt),Jf=w("".indexOf),Yf=w("".replace),Qf=w("".slice),eh=(Af=/b*/g,d(Zf,Pf=/a/,"a"),d(Zf,Af,"a"),0!==Pf.lastIndex||0!==Af.lastIndex),th=Bf.BROKEN_CARET,nh=void 0!==/()??/.exec("")[1];(eh||nh||th||Vf||Wf)&&(Xf=function(e){var t,n,r,a,o,i,s,l=this,c=Uf(l),u=Qt(e),p=c.raw;if(p)return p.lastIndex=l.lastIndex,t=d(Xf,p,u),l.lastIndex=p.lastIndex,t;var m=c.groups,f=th&&l.sticky,h=d(yf,l),y=l.source,g=0,v=u;if(f&&(h=Yf(h,"y",""),-1===Jf(h,"g")&&(h+="g"),v=Qf(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==Kf(u,l.lastIndex-1))&&(y="(?: "+y+")",v=" "+v,g++),n=new RegExp("^(?:"+y+")",h)),nh&&(n=new RegExp("^"+y+"$(?!\\s)",h)),eh&&(r=l.lastIndex),a=d(Zf,f?n:l,v),f?a?(a.input=Qf(a.input,g),a[0]=Qf(a[0],g),a.index=l.lastIndex,l.lastIndex+=a[0].length):l.lastIndex=0:eh&&a&&(l.lastIndex=l.global?a.index+a[0].length:r),nh&&a&&a.length>1&&d(Gf,a[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(a[o]=void 0)})),a&&m)for(a.groups=i=Qm(null),o=0;o<m.length;o++)i[(s=m[o])[0]]=a[s[1]];return a});var rh=Xf,ah=TypeError,oh=ge("matchAll"),ih="RegExp String",sh=ih+" Iterator",lh=st.set,ch=st.getterFor(sh),uh=RegExp.prototype,dh=TypeError,ph=Fm("".indexOf),mh=Fm("".matchAll),fh=!!mh&&!s((function(){mh("a",/./)})),hh=function(e,t,n,r){var a=t+" Iterator";return e.prototype=Qm(mf,{next:y(+!r,n)}),pf(e,a,!1),e}((function(e,t,n,r){lh(this,{type:sh,regexp:e,string:t,global:n,unicode:r,done:!1})}),ih,(function(){var e=ch(this);if(e.done)return ff(void 0,!0);var t=e.regexp,n=e.string,r=function(e,t){var n=e.exec;if(N(n)){var r=d(n,e,t);return null!==r&&Le(r),r}if("RegExp"===x(e))return d(rh,e,t);throw ah("RegExp#exec called on incompatible receiver")}(t,n);return null===r?(e.done=!0,ff(void 0,!0)):e.global?(""===Qt(r[0])&&(t.lastIndex=function(e,t,n){return t+(n?Mf(e,t).length:1)}(n,gt(t.lastIndex),e.unicode)),ff(r,!1)):(e.done=!0,ff(r,!1))})),yh=function(e){var t,n,r,a=Le(this),o=Qt(e),i=Lf(a,RegExp),s=Qt(vf(a));return t=new i(i===RegExp?a.source:a,s),n=!!~ph(s,"g"),r=!!~ph(s,"u"),t.lastIndex=gt(a.lastIndex),new hh(t,o,n,r)};function gh(e){const t={};return function(e){const t={};function n(e){const r=e.match(/var\((.+?)\)/g);if(r){let a=e;return r.forEach((n=>{const r=n.match(/\((.*)\)/i)[1];a=e.replace(n,t[r])})),n(a)}return e}return[...e.matchAll(/(--rebilly.*(?=:))[:\s](.*(?=;))/g)].forEach((e=>{t[e[1]]=e[2].trim()})),Object.entries(t).map((([e,t])=>[e,n(t)]))}(e).forEach((([e,n])=>{t[e]=n})),t}Ht({target:"String",proto:!0,forced:fh},{matchAll:function(e){var t,n,r,a=I(this);if(P(e)){if(fh)return mh(a,e)}else{if(function(e){var t;return R(e)&&(void 0!==(t=e[hf])?!!t:"RegExp"==x(e))}(e)&&(t=Qt(I(vf(e))),!~ph(t,"g")))throw dh("`.matchAll` does not allow non-global regexes");if(fh)return mh(a,e);if(r=Q(e,oh))return d(r,e,a)}return n=Qt(a),new RegExp(e,"g")[oh](n)}}),oh in uh||ct(uh,oh,yh);const vh=(e,t="")=>({color:e[`--rebilly-${t}ColorText`],fontFamily:e[`--rebilly-${t}FontFamily`],fontSize:e[`--rebilly-${t}FontSize`],fontWeight:e[`--rebilly-${t}FontWeight`],lineHeight:e[`--rebilly-${t}FontLineHeight`],background:e[`--rebilly-${t}ColorBackground`],boxShadow:e[`--rebilly-${t}BoxShadow`]});var bh=({options:e={}})=>{const t=gh(`\n ${Yr.mainStyleVars}\n ${e.css||""}\n `);return{base:{...vh(t,"input"),":hover":vh(t,"inputHover"),":focus":vh(t,"inputFocus"),"::placeholder":vh(t,"inputPlaceholder"),"::selection":vh(t,"inputSelection")},invalid:{...vh(t,"inputError"),":hover":vh(t,"inputErrorHover"),":focus":vh(t,"inputErrorFocus"),"::placeholder":vh(t,"inputErrorPlaceholder"),"::selection":vh(t,"inputErrorSelection")},buttons:{base:{...vh(t,"buttonSecondary"),":hover":vh(t,"buttonSecondaryHover"),":focus":vh(t,"buttonSecondaryActive")},active:{...vh(t,"button"),":hover":vh(t,"buttonHover"),":focus":vh(t,"buttonActive")}}}};function wh({eventName:e,callback:t}){if(!Ii.includes(e))throw new Error(`${e} is not a supported event`);const n=yo(e);Ai[n].addEventListener(t)}const kh=(e,t)=>`\n <div class="rebilly-instruments-modal-overlay">\n <div class="rebilly-instruments-modal-container ${t?`rebilly-instruments-${t}`:""} ${e?"is-redirect":""}">\n ${e?"":'\n <svg class="rebilly-instruments-modal-close" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <path d="m15 13.5858 7.2929-7.293c.3905-.3904 1.0237-.3904 1.4142 0 .3905.3906.3905 1.0238 0 1.4143L16.4142 15l7.293 7.2929c.3904.3905.3904 1.0237 0 1.4142-.3906.3905-1.0238.3905-1.4143 0L15 16.4142l-7.2929 7.293c-.3905.3904-1.0237.3904-1.4142 0-.3905-.3906-.3905-1.0238 0-1.4143L13.5858 15l-7.293-7.2929c-.3904-.3905-.3904-1.0237 0-1.4142.3906-.3905 1.0238-.3905 1.4143 0L15 13.5858Z" fill-rule="nonzero"/>\n </svg>\n '}\n <div class="rebilly-instruments-modal-content"></div>\n </div>\n </div>\n`;async function $h({name:e="",url:t="",model:n={},classListArray:r=[],close:a=(()=>{})}={}){var o;const i=null==n||null===(o=n.method)||void 0===o?void 0:o.method,s="rebilly-instruments-approval-url"===e;Yr.form.insertAdjacentHTML("beforeend",kh(s,i));const l=document.querySelector(".rebilly-instruments-modal-overlay"),c=document.querySelector(".rebilly-instruments-modal-container"),u=document.querySelector(".rebilly-instruments-modal-close"),d=document.querySelector(".rebilly-instruments-modal-content");document.body.style.overflow="hidden",setTimeout((()=>{l.classList.add("is-visible"),c.classList.add("is-visible")}),240),Yr.loader.addDOMElement({section:"modal",el:d}),Yr.loader.startLoading({section:"modal",id:e});const p={options:Yr.toModel().options,...n},m=await new Mi({name:e,url:t,model:p,classListArray:r,container:d}),f=(...e)=>{c.classList.remove("is-visible"),l.classList.remove("is-visible"),setTimeout((()=>{document.body.style.overflow="auto";const t=l.children;for(let e=0;e<t.length;e+=1)t[e].remove();l.remove(),a(...e),m.destroy()}),300)};return m.bindEventListeners({close:f,loader:Yr.loader}),s||u.addEventListener("click",f),m}async function xh({payload:e}){var t,n,r,a,o;const{_raw:{id:i},isExistingInstrument:s}=e;delete e.isExistingInstrument,delete e._raw;const l={...e};s?l.paymentInstrumentId=i:l.token=i,null!==(t=Yr.options)&&void 0!==t&&t.invoiceId&&(l.invoiceId=Yr.options.invoiceId),null!==(n=Yr.options)&&void 0!==n&&n.transactionId&&(l.transactionId=Yr.options.transactionId),null!==(r=Yr.options)&&void 0!==r&&r.money&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.options.money.amount,l.currency=Yr.options.money.currency),null!==(a=Yr.options)&&void 0!==a&&a.deposit&&(l.websiteId=Yr.options.websiteId,l.amount=Yr.data.amountAndCurrency.amount,l.currency=Yr.data.amountAndCurrency.currency),null!==(o=Yr.data)&&void 0!==o&&o.couponIds&&Array.isArray(Yr.data.couponIds)&&(l.couponIds=Yr.data.couponIds);let{fields:c}=await async function({data:e}){return uc((async()=>{const{token:t,transactionId:n,invoiceId:r,websiteId:a,paymentInstrumentId:o}=e,i=["riskMetadata","redirectUrl"];return t&&i.push("token"),o&&i.push("paymentInstrumentId"),n&&i.push("transactionId"),r&&i.push("invoiceId"),a&&i.push("amount","currency","websiteId"),Object.keys(e).forEach((t=>{i.includes(t)||delete e[t]})),Yr.storefront.purchase.payment({data:e})}))}({state:Yr,data:l});return c={transaction:c,token:c.token||Yr.options.jwt},Yr.data.invoice&&(c.invoice=Yr.data.invoice),c}async function Eh({payload:e}){const t={websiteId:Yr.options.websiteId,paymentInstruction:{token:e._raw.id},...e};Yr.data.acceptBumpOffer?t.items=Yr.options.bumpOffer:t.items=yc(Yr.options.items),Yr.data.couponIds&&Array.isArray(Yr.data.couponIds)&&(t.couponIds=Yr.data.couponIds),Yr.options.addons&&Yr.data.addons&&Array.isArray(Yr.data.addons)&&Yr.options.addons.forEach((e=>{Yr.data.addons.includes(e.planId)&&t.items.push(e)}));const{fields:n}=await async function({data:e}){return uc((async()=>{const t=["websiteId","paymentInstruction","items","billingAddress","deliveryAddress","shippingRateId","couponIds","password","redirectUrl"];return Object.keys(e).forEach((n=>{t.includes(n)||delete e[n]})),Yr.storefront.purchase.purchase({data:e})}))}({state:Yr,data:t});return n}async function Sh({payload:e}){Object.keys(e).forEach((t=>{null===e[t]&&delete e[t]}));try{var t,n;let r;return r=Yr.data.isPayment?await xh({state:Yr,payload:e}):await Eh({state:Yr,payload:e}),null!==(t=r.transaction)&&void 0!==t&&t.approvalUrl&&"unknown"===(null===(n=r.transaction)||void 0===n?void 0:n.result)?function({fields:e,payload:t}){var n,r;if(t.redirectUrl||null===(n=e.transaction)||void 0===n||!n.approvalUrl){const{paymentMethodsUrl:t}=Yr.options._computed,n=JSON.parse(JSON.stringify(e)),r={};Yr.data.isPayment?r.payment=n:r.purchase=n,Yr.data=new fd({...e}),$h({state:Yr,name:"rebilly-instruments-approval-url",url:`${t}/approval-url`,model:r,close:e=>{Ai.purchaseCompleted.dispatch(e)}})}else if(null!==(r=e.transaction)&&void 0!==r&&r.approvalUrl){var a;window.location=null===(a=e.transaction)||void 0===a?void 0:a.approvalUrl}}({state:Yr,fields:r,payload:e}):Ai.purchaseCompleted.dispatch(r),r}catch(e){return Ti(e),e}}async function _h({payload:e}){try{var t;const{_raw:{id:n},isExistingInstrument:r}=e;delete e.isExistingInstrument,delete e._raw;const a={...e};r?a.paymentInstrumentId=n:a.token=n;const{instrument:o,transaction:i}=await async function({data:e}){return uc((async()=>{var t,n;const{fields:r}=await Yr.storefront.paymentInstruments.create({data:e});Yr.storefront.setSessionToken(r.token||Yr.options.jwt);const a={id:r.id,data:{websiteId:Yr.options.websiteId,...e}};Yr.data.amountAndCurrency&&(a.data={...a.data,...Yr.data.amountAndCurrency}),null!==(t=Yr.data)&&void 0!==t&&null!==(n=t.transaction)&&void 0!==n&&n.redirectUrl&&(a.data.redirectUrl=`${a.data.redirectUrl}&originalRedirectUrl=${Yr.data.transaction.redirectUrl}`);const{fields:o}=await Yr.storefront.paymentInstruments.setup(a);return{instrument:r,transaction:o}}))}({data:{websiteId:null===(t=Yr.options)||void 0===t?void 0:t.websiteId,...a}});if(Yr.data=new fd({instrument:o,transaction:i}),i.approvalUrl&&"unknown"===i.result){const{paymentMethodsUrl:e}=Yr.options._computed;$h({name:"rebilly-instruments-approval-url",url:`${e}/approval-url`,model:{setup:{transaction:i}},close:({transaction:e=i})=>{Ai.setupCompleted.dispatch({instrument:o,transaction:e})}})}else Ai.setupCompleted.dispatch({instrument:o,transaction:i});return{instrument:o,transaction:i}}catch(e){return Ti(e),e}}async function Ph({componentName:e,payload:t}){switch(e){case"result":_d(),async function({payload:e}){var t,n;const r=Jr.form;r||await Id();const a=Yr.toModel(),o={options:a.options,mainStyleVars:a.mainStyleVars,[Yr.options.transactionType]:e};null==r||null===(t=r.component)||void 0===t||t.call("route",{name:"result"}),null==r||null===(n=r.component)||void 0===n||n.call("update",o)}({payload:t});break;case"confirmation":_d(),async function({payload:e}){var t,n,r,a;e.billingAddress&&Yr.summary&&Yr.data.isPurchase&&kc({instrument:e});const o=Jr.form;o||await Id();const i=Yr.toModel(),s={options:i.options,data:i.data,mainStyleVars:i.mainStyleVars,instrument:e};null==o||null===(t=o.component)||void 0===t||t.call("route",{name:"confirmation"}),null==o||null===(n=o.component)||void 0===n||n.call("update",s),null==o||null===(r=o.component)||void 0===r||r.on(`${o.name}-confirm-purchase`,(e=>{Sh({payload:e})})),null==o||null===(a=o.component)||void 0===a||a.on(`${o.name}-confirm-setup`,(e=>{_h({payload:e})}))}({payload:t});break;default:throw new Error(`'${e}' not a supported component`)}}function Ah({state:e,payload:t}){Ph({componentName:"result",payload:t,state:e})}var Ih=({state:e={}})=>{e.options.features.autoConfirmation&&wh({eventName:"instrument-ready",callback:t=>{var n;if("paypal"===(null===(n=t._raw)||void 0===n?void 0:n.method)&&!e.data.isShippingRequired)return"setup"===e.options.transactionType?_h({state:e,payload:t}):Sh({state:e,payload:t}),void e.loader.startLoading({state:e,id:"express-purchase",message:"form.loaderMessages.processingPayment"});Ph({componentName:"confirmation",payload:t,state:e})}}),e.options.features.autoResult&&(wh({eventName:"purchase-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Ah({state:e,payload:t})}}),wh({eventName:"setup-completed",callback:t=>{t=JSON.parse(JSON.stringify(t)),Ah({state:e,payload:t})}}))};async function jh({setupFramepay:e=km,...t}={}){try{var n,r,a;Yr.data={},Yr.options={},Yr.form=Cd({element:"form",options:t}),Yr.summary=Cd({element:"summary",options:t}),Yr.form.style.maxWidth="750px",Yr.summary&&(Yr.summary.style.maxWidth="750px"),Yr.options=wm({options:t}),Yr.storefront=Ld({options:t}),Yr.mainStyleVars=Nm({options:t}),Yr.options.themeFramepay=bh({options:t}),Yr.loader.addDOMElement({el:Yr.form}),Yr.loader.addDOMElement({section:"summary",el:Yr.summary}),Yr.loader.startLoading({section:"summary",id:"rebilly-instruments-summary"}),Yr.loader.startLoading({id:"rebilly-instruments-form"});const[o]=await Promise.all([hd(),e()]);Yr.data=o,Ai.dataReady.dispatch(Yr.data),Yr.i18n=Mm(),!Yr.options.websiteId&&null!==(n=Yr.data.transaction)&&void 0!==n&&n.websiteId?Yr.options.websiteId=Yr.data.transaction.websiteId:!Yr.options.websiteId&&null!==(r=Yr.data.invoice)&&void 0!==r&&r.websiteId&&(Yr.options.websiteId=Yr.data.invoice.websiteId),Yr.data.transaction&&"setup"===(null===(a=Yr.data.transaction)||void 0===a?void 0:a.type)&&(Yr.options.transactionType="setup"),Yr.form&&Id().then((()=>{var e;null!==(e=Yr.options)&&void 0!==e&&e.deposit?kd():Pd()})),Yr.summary&&wc(),Yr.i18n({state:Yr}),Yr.hasMounted=!0,o.readyToPay.length||(Yr.loader.stopLoading({id:"rebilly-instruments-form"}),Ti(Yr.translate.getTranslation("form.error.noPaymentMethods")))}catch(e){throw Ti(e),e}Ih({state:Yr})}async function Ch(){var e;await(e=1e3,new Promise((t=>setTimeout(t,e)))),Object.keys(Jr).forEach((e=>{Jr.hasFrame(e)&&(Jr[e].destroy(),Jr[e]=null)})),_i.removeAll(document),Yr.hasMounted=!1,Yr.summary&&(Yr.summary.textContent=""),Yr.form.textContent="",Kl.cancelAll(),Yr.loader.clearAll()}var Lh=new class{constructor(){this.state=Yr,this.iframes=Jr}async mount(e){await jh(e)}async destroy(){await Ch()}async update(e){await async function({newOptions:e={}}){if(!Yr.hasMounted)throw Error("Update method cannot be called before mounting instruments");const t=Gr({...Yr.options},e);await Ch(),jh({form:Yr.form,summary:Yr.summary,...t})}({newOptions:e})}async purchase(e){await Sh({payload:e})}async setup(e){await _h({payload:e})}async show(e,t){await Ph({componentName:e,payload:t})}get version(){return"RebillyInstruments Ver.3.36.1"}on(e,t){wh({eventName:e,callback:t})}};return Lh}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebilly/instruments",
3
- "version": "3.36.0",
3
+ "version": "3.37.0",
4
4
  "author": "Rebilly",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",