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AO,MAAO,MAC7E,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAC7E,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAC7E,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAC7E,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAC7E,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAC7E,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAC7E,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAC7E,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAC7E,MAAO,MAAO,MAAO,MAAO,MAAO,QAMnC,WAAY,YAAY,QAAQ,OAIhC,QAAS,YAAY,QAAQ,KAI7B,eAAgB,YAAY,QAAQ,KAIpC,gBAAiB,YAAY,QAAQ,KAIrC,MAAO,YAAY,QAAQ,OAI3B,gBAAiB,YAAY,QAAQ,KAGrC,QAAS,YAAY,QAAQ,KAI7B,OAAQ,YAAY,QAAQ,MAAM,CAAC,QAAQ,GAAM,IAIjD,eAAgB,YAAY,QAAQ,KAIpC,OAAQ,YAAY,QAAQ,KAI5B,OAAQ,YAAY,QAAQ,MAE9B,oBAAoB,YAAa,EACjC,QAAQ,QAAU","file":"/npm/react-stripe-checkout@2.6.3/dist/main.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-stripe-checkout@2.6.3/dist/main.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar scriptLoading = false;\nvar scriptLoaded = false;\nvar scriptDidError = false;\n\nvar ReactStripeCheckout = function (_React$Component) {\n  _inherits(ReactStripeCheckout, _React$Component);\n\n  function ReactStripeCheckout(props) {\n    _classCallCheck(this, ReactStripeCheckout);\n\n    var _this = _possibleConstructorReturn(this, (ReactStripeCheckout.__proto__ || Object.getPrototypeOf(ReactStripeCheckout)).call(this, props));\n\n    _this.onScriptLoaded = function () {\n      if (!ReactStripeCheckout.stripeHandler) {\n        ReactStripeCheckout.stripeHandler = StripeCheckout.configure({\n          key: _this.props.stripeKey\n        });\n        if (_this.hasPendingClick) {\n          _this.showStripeDialog();\n        }\n      }\n    };\n\n    _this.onScriptError = function () {\n      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      _this.hideLoadingDialog();\n      if (_this.props.onScriptError) {\n        _this.props.onScriptError.apply(_this, args);\n      }\n    };\n\n    _this.onClosed = function () {\n      for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      if (_this._isMounted) _this.setState({ open: false });\n      if (_this.props.closed) {\n        _this.props.closed.apply(_this, args);\n      }\n    };\n\n    _this.onOpened = function () {\n      for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n        args[_key3] = arguments[_key3];\n      }\n\n      _this.setState({ open: true });\n      if (_this.props.opened) {\n        _this.props.opened.apply(_this, args);\n      }\n    };\n\n    _this.getConfig = function () {\n      return ['token', 'image', 'name', 'description', 'amount', 'locale', 'currency', 'panelLabel', 'zipCode', 'shippingAddress', 'billingAddress', 'email', 'allowRememberMe', 'bitcoin', 'alipay', 'alipayReusable'].reduce(function (config, key) {\n        return _extends({}, config, _this.props.hasOwnProperty(key) && _defineProperty({}, key, _this.props[key]));\n      }, {\n        opened: _this.onOpened,\n        closed: _this.onClosed\n      });\n    };\n\n    _this.onClick = function () {\n      // eslint-disable-line react/sort-comp\n      if (_this.props.disabled) {\n        return;\n      }\n\n      if (scriptDidError) {\n        try {\n          throw new Error('Tried to call onClick, but StripeCheckout failed to load');\n        } catch (x) {} // eslint-disable-line no-empty\n      } else if (ReactStripeCheckout.stripeHandler) {\n        _this.showStripeDialog();\n      } else {\n        _this.showLoadingDialog();\n        _this.hasPendingClick = true;\n      }\n    };\n\n    _this.handleOnMouseDown = function () {\n      _this.setState({\n        buttonActive: true\n      });\n    };\n\n    _this.handleOnMouseUp = function () {\n      _this.setState({\n        buttonActive: false\n      });\n    };\n\n    _this.state = {\n      open: false,\n      buttonActive: false\n    };\n    return _this;\n  }\n\n  _createClass(ReactStripeCheckout, [{\n    key: 'componentDidMount',\n    value: function componentDidMount() {\n      var _this2 = this;\n\n      this._isMounted = true;\n      if (scriptLoaded) {\n        return;\n      }\n\n      if (scriptLoading) {\n        return;\n      }\n\n      scriptLoading = true;\n\n      var script = document.createElement('script');\n      if (typeof this.props.onScriptTagCreated === 'function') {\n        this.props.onScriptTagCreated(script);\n      }\n\n      script.src = 'https://checkout.stripe.com/checkout.js';\n      script.async = 1;\n\n      this.loadPromise = function () {\n        var canceled = false;\n        var promise = new Promise(function (resolve, reject) {\n          script.onload = function () {\n            scriptLoaded = true;\n            scriptLoading = false;\n            resolve();\n            _this2.onScriptLoaded();\n          };\n          script.onerror = function (event) {\n            scriptDidError = true;\n            scriptLoading = false;\n            reject(event);\n            _this2.onScriptError(event);\n          };\n        });\n        var wrappedPromise = new Promise(function (accept, cancel) {\n          promise.then(function () {\n            return canceled ? cancel({ isCanceled: true }) : accept();\n          }); // eslint-disable-line no-confusing-arrow\n          promise.catch(function (error) {\n            return canceled ? cancel({ isCanceled: true }) : cancel(error);\n          }); // eslint-disable-line no-confusing-arrow\n        });\n\n        return {\n          promise: wrappedPromise,\n          cancel: function cancel() {\n            canceled = true;\n          }\n        };\n      }();\n\n      this.loadPromise.promise.then(this.onScriptLoaded).catch(this.onScriptError);\n\n      document.body.appendChild(script);\n    }\n  }, {\n    key: 'componentDidUpdate',\n    value: function componentDidUpdate() {\n      if (!scriptLoading) {\n        this.updateStripeHandler();\n      }\n    }\n  }, {\n    key: 'componentWillUnmount',\n    value: function componentWillUnmount() {\n      this._isMounted = false;\n      if (this.loadPromise) {\n        this.loadPromise.cancel();\n      }\n      if (ReactStripeCheckout.stripeHandler && this.state.open) {\n        ReactStripeCheckout.stripeHandler.close();\n      }\n    }\n  }, {\n    key: 'updateStripeHandler',\n    value: function updateStripeHandler() {\n      if (!ReactStripeCheckout.stripeHandler || this.props.reconfigureOnUpdate) {\n        ReactStripeCheckout.stripeHandler = StripeCheckout.configure({\n          key: this.props.stripeKey\n        });\n      }\n    }\n  }, {\n    key: 'showLoadingDialog',\n    value: function showLoadingDialog() {\n      if (this.props.showLoadingDialog) {\n        for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n          args[_key4] = arguments[_key4];\n        }\n\n        this.props.showLoadingDialog.apply(this, args);\n      }\n    }\n  }, {\n    key: 'hideLoadingDialog',\n    value: function hideLoadingDialog() {\n      if (this.props.hideLoadingDialog) {\n        for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n          args[_key5] = arguments[_key5];\n        }\n\n        this.props.hideLoadingDialog.apply(this, args);\n      }\n    }\n  }, {\n    key: 'showStripeDialog',\n    value: function showStripeDialog() {\n      this.hideLoadingDialog();\n      ReactStripeCheckout.stripeHandler.open(this.getConfig());\n    }\n  }, {\n    key: 'renderDefaultStripeButton',\n    value: function renderDefaultStripeButton() {\n      return _react2.default.createElement(\n        'button',\n        _extends({}, _defineProperty({}, this.props.triggerEvent, this.onClick), {\n          className: this.props.className,\n          onMouseDown: this.handleOnMouseDown,\n          onFocus: this.handleOnMouseDown,\n          onMouseUp: this.handleOnMouseUp,\n          onMouseOut: this.handleOnMouseUp,\n          onBlur: this.handleOnMouseUp,\n          style: _extends({}, {\n            overflow: 'hidden',\n            display: 'inline-block',\n            background: 'linear-gradient(#28a0e5,#015e94)',\n            border: 0,\n            padding: 1,\n            textDecoration: 'none',\n            borderRadius: 5,\n            boxShadow: '0 1px 0 rgba(0,0,0,0.2)',\n            cursor: 'pointer',\n            visibility: 'visible',\n            userSelect: 'none'\n          }, this.state.buttonActive && {\n            background: '#005d93'\n          }, this.props.style)\n        }),\n        _react2.default.createElement(\n          'span',\n          {\n            style: _extends({}, {\n              backgroundImage: 'linear-gradient(#7dc5ee,#008cdd 85%,#30a2e4)',\n              fontFamily: '\"Helvetica Neue\",Helvetica,Arial,sans-serif',\n              fontSize: 14,\n              position: 'relative',\n              padding: '0 12px',\n              display: 'block',\n              height: 30,\n              lineHeight: '30px',\n              color: '#fff',\n              fontWeight: 'bold',\n              boxShadow: 'inset 0 1px 0 rgba(255,255,255,0.25)',\n              textShadow: '0 -1px 0 rgba(0,0,0,0.25)',\n              borderRadius: 4\n            }, this.state.buttonActive && {\n              color: '#eee',\n              boxShadow: 'inset 0 1px 0 rgba(0,0,0,0.1)',\n              backgroundImage: 'linear-gradient(#008cdd,#008cdd 85%,#239adf)'\n            }, this.props.textStyle)\n          },\n          this.props.label\n        )\n      );\n    }\n  }, {\n    key: 'renderDisabledButton',\n    value: function renderDisabledButton() {\n      return _react2.default.createElement(\n        'button',\n        {\n          disabled: true,\n          style: {\n            background: 'rgba(0,0,0,0.2)',\n            overflow: 'hidden',\n            display: 'inline-block',\n            border: 0,\n            padding: 1,\n            textDecoration: 'none',\n            borderRadius: 5,\n            userSelect: 'none'\n          }\n        },\n        _react2.default.createElement(\n          'span',\n          {\n            style: {\n              boxShadow: 'inset 0 1px 0 rgba(255,255,255,0.25)',\n              fontFamily: '\"Helvetica Neue\",Helvetica,Arial,sans-serif',\n              fontSize: 14,\n              position: 'relative',\n              padding: '0 12px',\n              display: 'block',\n              height: 30,\n              lineHeight: '30px',\n              borderRadius: 4,\n              color: '#999',\n              background: '#f8f9fa',\n              textShadow: '0 1px 0 rgba(255,255,255,0.5)'\n            }\n          },\n          this.props.label\n        )\n      );\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      if (this.props.desktopShowModal === true && !this.state.open) {\n        this.onClick();\n      } else if (this.props.desktopShowModal === false && this.state.open) {\n        ReactStripeCheckout.stripeHandler.close();\n      }\n\n      var ComponentClass = this.props.ComponentClass;\n\n      if (this.props.children) {\n        return _react2.default.createElement(ComponentClass, _extends({}, _defineProperty({}, this.props.triggerEvent, this.onClick), {\n          children: this.props.children\n        }));\n      }\n      return this.props.disabled ? this.renderDisabledButton() : this.renderDefaultStripeButton();\n    }\n  }]);\n\n  return ReactStripeCheckout;\n}(_react2.default.Component);\n\nReactStripeCheckout.defaultProps = {\n  className: 'StripeCheckout',\n  label: 'Pay With Card',\n  locale: 'auto',\n  ComponentClass: 'span',\n  reconfigureOnUpdate: false,\n  triggerEvent: 'onClick'\n};\nReactStripeCheckout.propTypes = {\n  // Opens / closes the checkout modal by value\n  // WARNING: does not work on mobile due to browser security restrictions\n  // NOTE: Must be set to false when receiving token to prevent modal from\n  //       opening automatically after closing\n  desktopShowModal: _propTypes2.default.bool,\n\n  triggerEvent: _propTypes2.default.oneOf(['onClick', 'onTouchTap', 'onTouchStart']),\n\n  // If included, will render the default blue button with label text.\n  // (Requires including stripe-checkout.css or adding the .styl file\n  // to your pipeline)\n  label: _propTypes2.default.string,\n\n  // Custom styling for default button\n  style: _propTypes2.default.object,\n  // Custom styling for <span> tag inside default button\n  textStyle: _propTypes2.default.object,\n\n  // Prevents any events from opening the popup\n  // Adds the disabled prop to the button and adjusts the styling as well\n  disabled: _propTypes2.default.bool,\n\n  // Named component to wrap button (eg. div)\n  ComponentClass: _propTypes2.default.string,\n\n  // Show a loading indicator\n  showLoadingDialog: _propTypes2.default.func,\n  // Hide the loading indicator\n  hideLoadingDialog: _propTypes2.default.func,\n\n  // Run this method when the scrupt fails to load. Will run if the internet\n  // connection is offline when attemting to load the script.\n  onScriptError: _propTypes2.default.func,\n\n  // Runs when the script tag is created, but before it is added to the DOM\n  onScriptTagCreated: _propTypes2.default.func,\n\n  // By default, any time the React component is updated, it will call\n  // StripeCheckout.configure, which may result in additional XHR calls to the\n  // stripe API.  If you know the first configuration is all you need, you\n  // can set this to false.  Subsequent updates will affect the StripeCheckout.open\n  // (e.g. different prices)\n  reconfigureOnUpdate: _propTypes2.default.bool,\n\n  // =====================================================\n  // Required by stripe\n  // see Stripe docs for more info:\n  //   https://stripe.com/docs/checkout#integration-custom\n  // =====================================================\n\n  // Your publishable key (test or live).\n  // can't use \"key\" as a prop in react, so have to change the keyname\n  stripeKey: _propTypes2.default.string.isRequired,\n\n  // The callback to invoke when the Checkout process is complete.\n  //   function(token)\n  //     token is the token object created.\n  //     token.id can be used to create a charge or customer.\n  //     token.email contains the email address entered by the user.\n  token: _propTypes2.default.func.isRequired,\n\n  // ==========================\n  // Highly Recommended Options\n  // ==========================\n\n  // Name of the company or website.\n  name: _propTypes2.default.string,\n\n  // A description of the product or service being purchased.\n  description: _propTypes2.default.string,\n\n  // A relative URL pointing to a square image of your brand or product. The\n  // recommended minimum size is 128x128px. The recommended image types are\n  // .gif, .jpeg, and .png.\n  image: _propTypes2.default.string,\n\n  // The amount (in cents) that's shown to the user. Note that you will still\n  // have to explicitly include it when you create a charge using the API.\n  amount: _propTypes2.default.number,\n\n  // Specify auto to display Checkout in the user's preferred language, if\n  // available. English will be used by default.\n  //\n  // https://stripe.com/docs/checkout#supported-languages\n  // for more info.\n  locale: _propTypes2.default.oneOf(['auto', // (Default) Automatically chosen by checkout\n  'zh', // Simplified Chinese\n  'da', // Danish\n  'nl', // Dutch\n  'en', // English\n  'fr', // French\n  'de', // German\n  'it', // Italian\n  'ja', // Japanease\n  'no', // Norwegian\n  'es', // Spanish\n  'sv']),\n\n  // ==============\n  // Optional Props\n  // ==============\n\n  // The currency of the amount (3-letter ISO code). The default is USD.\n  currency: _propTypes2.default.oneOf(['AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', // eslint-disable-line comma-spacing\n  'BDT', 'BGN', 'BIF', 'BMD', 'BND', 'BOB', 'BRL', 'BSD', 'BWP', 'BZD', 'CAD', 'CDF', // eslint-disable-line comma-spacing\n  'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EEK', // eslint-disable-line comma-spacing\n  'EGP', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', // eslint-disable-line comma-spacing\n  'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'INR', 'ISK', 'JMD', 'JPY', 'KES', // eslint-disable-line comma-spacing\n  'KGS', 'KHR', 'KMF', 'KRW', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LTL', // eslint-disable-line comma-spacing\n  'LVL', 'MAD', 'MDL', 'MGA', 'MKD', 'MNT', 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', // eslint-disable-line comma-spacing\n  'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'PAB', 'PEN', 'PGK', 'PHP', // eslint-disable-line comma-spacing\n  'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SEK', // eslint-disable-line comma-spacing\n  'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'STD', 'SVC', 'SZL', 'THB', 'TJS', 'TOP', 'TRY', // eslint-disable-line comma-spacing\n  'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'USD', 'UYU', 'UZS', 'VND', 'VUV', 'WST', 'XAF', // eslint-disable-line comma-spacing\n  'XCD', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW']),\n\n  // The label of the payment button in the Checkout form (e.g. “Subscribe”,\n  // “Pay {{amount}}”, etc.). If you include {{amount}}, it will be replaced\n  // by the provided amount. Otherwise, the amount will be appended to the\n  // end of your label.\n  panelLabel: _propTypes2.default.string,\n\n  // Specify whether Checkout should validate the billing ZIP code (true or\n  // false)\n  zipCode: _propTypes2.default.bool,\n\n  // Specify whether Checkout should collect the user's billing address\n  // (true or false). The default is false.\n  billingAddress: _propTypes2.default.bool,\n\n  // Specify whether Checkout should collect the user's shipping address\n  // (true or false). The default is false.\n  shippingAddress: _propTypes2.default.bool,\n\n  // Specify whether Checkout should validate the billing ZIP code (true or\n  // false). The default is false.\n  email: _propTypes2.default.string,\n\n  // Specify whether to include the option to \"Remember Me\" for future\n  // purchases (true or false). The default is true.\n  allowRememberMe: _propTypes2.default.bool,\n\n  // Specify whether to accept Bitcoin in Checkout. The default is false.\n  bitcoin: _propTypes2.default.bool,\n\n  // Specify whether to accept Alipay ('auto', true, or false). The default\n  // is false.\n  alipay: _propTypes2.default.oneOf(['auto', true, false]),\n\n  // Specify if you need reusable access to the customer's Alipay account\n  // (true or false). The default is false.\n  alipayReusable: _propTypes2.default.bool,\n\n  // function() The callback to invoke when Checkout is opened (not supported\n  // in IE6 and IE7).\n  opened: _propTypes2.default.func,\n\n  // function() The callback to invoke when Checkout is closed (not supported\n  // in IE6 and IE7).\n  closed: _propTypes2.default.func\n};\nReactStripeCheckout._isMounted = false;\nexports.default = ReactStripeCheckout;\n"]}