import _extends from '@babel/runtime/helpers/extends';
import { Button, Size, ControlType, Priority, Loader } from '@transferwise/components';
import { formatAmount, formatMoney } from '@transferwise/formatting';
import PropTypes from 'prop-types';
import React, { useState, useEffect, useRef } from 'react';
import { useIntl, FormattedMessage } from 'react-intl';
import { E as ErrorTemplate, D as Disclaimer } from './ErrorTemplate-5add9185.js';
import { T as TapestryCard } from './TapestryCard-51b3d4ca.js';
import { u as useDebounce } from './useDebounce-5788ab22.js';
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
import { C as CurrencySelector } from './CurrencySelector-ce70c38b.js';
import { p as parseAmount } from './parseAmount-e5e98480.js';
import { c as createClassNamesFromStyles } from './createClassNamesFromStyles-24575b97.js';
import { D as DeliveryEstimation } from './DeliveryEstimation-eebe1dd9.js';
import { E as ExchangeRateIndicator } from './ExchangeRateIndicator-24a5e2f4.js';
import { L as Label } from './Label-e25da6b2.js';
import { i as isWiseAlias } from './aliasFilter-a7b9c811.js';
import { c as createUrl } from './createUrl-71d09e7b.js';
import { i as isConsideredMidmarketRate } from './isConsideredMidmarketRate-4f12041d.js';
import { e as extractQuote } from './extractQuote-aa1e3309.js';
import { f as fetchQuotes } from './fetchQuotes-31ac98ed.js';

var css_248z = ".cc_comparison-widget_4099316779 a,\n.cc_comparison-table_4099316779 a {\n  border-bottom: none;\n  color: var(--color-content-link);\n}\n.cc_comparison-widget_4099316779 ul,\n.cc_comparison-table_4099316779 ul {\n  margin: 0;\n  padding: 8px;\n}\n.cc_comparison-widget_4099316779 ul,\n.cc_comparison-table_4099316779 ul,\n.cc_comparison-widget_4099316779 ol,\n.cc_comparison-table_4099316779 ol {\n  margin: 0;\n}\n.cc_comparison-widget_4099316779 ul li,\n.cc_comparison-table_4099316779 ul li {\n  margin: 0;\n  list-style-type: none;\n}\n.cc_comparison-widget_4099316779 ul li::before,\n.cc_comparison-table_4099316779 ul li::before {\n  content: none;\n}\n.cc_comparison-widget_4099316779 ul ul,\n.cc_comparison-table_4099316779 ul ul,\n.cc_comparison-widget_4099316779 ol ul,\n.cc_comparison-table_4099316779 ol ul,\n.cc_comparison-widget_4099316779 ul ol,\n.cc_comparison-table_4099316779 ul ol,\n.cc_comparison-widget_4099316779 ol ol,\n.cc_comparison-table_4099316779 ol ol {\n  margin: 0;\n}\n.cc_comparison-widget_4099316779 p,\n.cc_comparison-table_4099316779 p {\n  margin: 0 0 var(--line-height-24);\n}\n.cc_comparison-widget_4099316779 b,\n.cc_comparison-table_4099316779 b {\n  color: var(--color-content-primary);\n  font-weight: var(--font-weight-semi-bold);\n  letter-spacing: 0;\n}\n.cc_comparison-widget_4099316779 table.cc_table-plain_4099316779,\n.cc_comparison-table_4099316779 table.cc_table-plain_4099316779 {\n  display: table;\n  width: 100%;\n}\nhtml {\n  -ms-text-size-adjust: 100%;\n  -webkit-text-size-adjust: 100%;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  margin: 0;\n  font: inherit;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  -webkit-appearance: button;\n  cursor: pointer;\n}\nbutton {\n  overflow: visible;\n}\nbutton,\nselect {\n  text-transform: none;\n}\nth {\n  text-align: left;\n}\nsup {\n  top: -0.5em;\n}\nsub,\nsup {\n  position: relative;\n  font-size: 75%;\n  line-height: 0;\n  vertical-align: baseline;\n}\n.cc_alert_4099316779 {\n  margin-bottom: var(--space-small);\n  padding: var(--space-small);\n  border-radius: calc(var(--size-4) - 1px);\n  background-color: var(--color-white);\n  color: var(--color-content-secondary);\n}\n@media (min-width: 576px) {\n  .cc_alert_4099316779 {\n    margin-bottom: var(--size-24);\n    padding: var(--size-24);\n  }\n}\n@media (min-width: 992px) {\n  .cc_alert_4099316779 {\n    margin-bottom: var(--size-32);\n    padding: var(--size-32);\n  }\n}\n.cc_alert-info_4099316779 {\n  background-color: var(--color-border-neutral);\n  color: var(--color-content-secondary);\n}\n.cc_form-group_4099316779 {\n  margin-bottom: var(--size-24);\n}\n.cc_form-group-lg_4099316779 {\n  position: relative;\n}\n.cc_form-group-lg_4099316779 .cc_control-label_4099316779 {\n  position: absolute;\n  z-index: 1;\n  top: 12px;\n  left: 14px;\n  margin-bottom: 0;\n}\n.cc_form-group-lg_4099316779 .cc_input-lg_4099316779 {\n  height: var(--size-72);\n  padding: var(--size-12) var(--size-16);\n  border-radius: calc(var(--size-4) - 1px);\n  font-size: var(--font-size-22);\n  line-height: var(--line-height-32);\n}\n.cc_form-group-lg_4099316779 .cc_input-group-lg_4099316779 > .cc_form-control_4099316779,\n.cc_form-group-lg_4099316779 .cc_input-group-lg_4099316779 > .cc_input-group-addon_4099316779 {\n  height: var(--size-72);\n  padding: calc(var(--size-4) + var(--size-24)) var(--size-12) var(--size-4);\n  font-size: var(--font-size-22);\n  line-height: var(--line-height-32);\n}\n.cc_form-control_4099316779 {\n  display: block;\n  width: 100%;\n  height: var(--line-height-48);\n  padding: var(--size-12) var(--size-16);\n  transition: border-color ease-in-out 0.15s;\n  border: 1px solid var(--color-interactive-secondary);\n  border-radius: var(--radius-small);\n  background-clip: padding-box;\n  background-image: none;\n  color: var(--color-content-primary);\n  font-size: var(--font-size-16);\n  font-weight: var(--font-weight-regular);\n  line-height: var(--line-height-24);\n}\n.cc_form-control_4099316779:focus {\n  border-color: var(--color-interactive-primary);\n  outline: 0;\n}\n.cc_label_4099316779 {\n  display: inline-block;\n  max-width: 100%;\n}\n.cc_label_4099316779,\n.cc_secondary_4099316779 {\n  transition: color ease-in-out 0.15s;\n  font-size: var(--font-size-14);\n  line-height: 20px;\n}\n.cc_container_4099316779 {\n  margin-right: auto;\n  margin-left: auto;\n  padding-right: var(--space-small);\n  padding-left: var(--space-small);\n}\n@media (min-width: 576px) {\n  .cc_container_4099316779 {\n    padding-right: var(--size-24);\n    padding-left: var(--size-24);\n  }\n}\n@media (min-width: 992px) {\n  .cc_container_4099316779 {\n    padding-right: var(--size-32);\n    padding-left: var(--size-32);\n  }\n}\n@media (min-width: 1200px) {\n  .cc_container_4099316779 {\n    max-width: 1164px;\n  }\n}\n[class*='col-'] {\n  position: relative;\n  min-height: 1px;\n  padding-right: 12px;\n  padding-left: 12px;\n}\n@media (max-width: 575px) {\n  [class*='col-'] {\n    padding-right: 8px;\n    padding-left: 8px;\n  }\n}\n[class*='col-xs'] {\n  float: left;\n}\n.cc_col-xs-12_4099316779 {\n  width: 100%;\n}\n@media (min-width: 576px) {\n  .cc_col-sm-10_4099316779 {\n    width: 83.33333333%;\n  }\n}\n@media (min-width: 576px) {\n  .cc_col-sm-offset-1_4099316779 {\n    margin-left: 8.33333333%;\n  }\n}\n.cc_clearfix__4099316779::before,\n.cc_form-horizontal_4099316779 .cc_form-group_4099316779::before,\n.cc_btn-group-vertical_4099316779 > .cc_btn-group_4099316779::before,\n.cc_container_4099316779::before,\n.cc_container-fluid_4099316779::before,\n.cc_row_4099316779::before,\n.cc_dl-horizontal_4099316779 dd::before,\n.cc_clearfix__4099316779::after,\n.cc_form-horizontal_4099316779 .cc_form-group_4099316779::after,\n.cc_btn-group-vertical_4099316779 > .cc_btn-group_4099316779::after,\n.cc_container_4099316779::after,\n.cc_container-fluid_4099316779::after,\n.cc_row_4099316779::after,\n.cc_dl-horizontal_4099316779 dd::after {\n  content: ' ';\n  display: table;\n}\n.cc_clearfix__4099316779::after,\n.cc_form-horizontal_4099316779 .cc_form-group_4099316779::after,\n.cc_btn-group-vertical_4099316779 > .cc_btn-group_4099316779::after,\n.cc_container_4099316779::after,\n.cc_container-fluid_4099316779::after,\n.cc_row_4099316779::after,\n.cc_dl-horizontal_4099316779 dd::after {\n  clear: both;\n}\n.cc_loader_4099316779 {\n  display: flex;\n  justify-content: center;\n}\n.cc_sr-only_4099316779 {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n}\n.cc_anchor_4099316779 {\n  border: 0;\n  background: transparent;\n  color: var(--color-content-primary);\n  font-weight: var(--font-weight-semi-bold);\n  letter-spacing: 0;\n  text-decoration: underline;\n}\n.cc_anchor_4099316779:focus,\n.cc_anchor_4099316779:hover {\n  background: transparent;\n  color: var(--color-content-link-hover);\n  text-decoration: underline;\n}\n.cc_anchor_4099316779:active {\n  background: transparent;\n  color: var(--color-content-link-active);\n}\n.cc_anchor--dark_4099316779 {\n  color: var(--color-content-link);\n}\n.cc_img-responsive_4099316779 {\n  max-width: 100%;\n}\n.cc_text-xs-left_4099316779 {\n  text-align: left;\n}\n.cc_text-xs-center_4099316779 {\n  text-align: center;\n}\n@media (min-width: 768px) {\n  .cc_text-md-left_4099316779 {\n    text-align: left;\n  }\n}\n.cc_text-success_4099316779 {\n  color: var(--color-sentiment-positive);\n}\n.cc_text-content-secondary_4099316779 {\n  color: var(--color-content-secondary);\n}\n.cc_small_4099316779 {\n  font-size: var(--font-size-14);\n  line-height: var(--line-height-24);\n}\n.cc_strong_4099316779 {\n  font-weight: var(--font-weight-semi-bold);\n  letter-spacing: 0;\n}\n.cc_h3_4099316779,\n.cc_h4_4099316779 {\n  margin-top: 0;\n  margin-bottom: 0;\n  color: var(--color-content-primary);\n  font-family: 'Inter', Helvetica, Arial, sans-serif;\n  font-weight: var(--font-weight-semi-bold);\n  letter-spacing: 0;\n  line-height: var(--line-height-title);\n  text-transform: none;\n}\n.cc_h3_4099316779 .cc_small_4099316779,\n.cc_h4_4099316779 .cc_small_4099316779 {\n  font-weight: 300;\n  line-height: 1;\n}\n.cc_h3_4099316779 {\n  font-size: var(--font-size-16);\n  line-height: var(--line-height-title);\n}\n.cc_h4_4099316779 {\n  font-size: var(--font-size-14);\n  line-height: var(--line-height-title);\n}\n@media (min-width: 768px) {\n  .cc_h3_4099316779 {\n    margin-bottom: 2px;\n    font-size: var(--font-size-20);\n    line-height: var(--line-height-title);\n  }\n  .cc_h4_4099316779 {\n    font-size: var(--font-size-16);\n    line-height: var(--line-height-title);\n  }\n}\n.cc_font-weight-bold_4099316779 {\n  font-weight: var(--font-weight-semi-bold) !important;\n}\n.cc_text-xs-nowrap_4099316779 {\n  white-space: nowrap;\n}\ntable,\n.cc_table_4099316779 {\n  display: table;\n  width: 100%;\n  max-width: 100%;\n  margin-bottom: var(--line-height-24);\n  border-spacing: 0;\n  border-collapse: separate;\n}\n.cc_table_4099316779 > thead,\n.cc_table_4099316779 > tfoot {\n  font-size: var(--font-size-14);\n}\n.cc_table-responsive_4099316779 {\n  min-height: 0.01%;\n  overflow-x: auto;\n}\n.cc_table-condensed_4099316779 th,\n.cc_table-condensed_4099316779 td {\n  padding: 8px;\n}\n.cc_form-group_4099316779 {\n  position: relative;\n  font-size: 14px;\n}\n.cc_input-group-addon_4099316779 {\n  display: table-cell;\n  width: 1%;\n  padding: var(--size-12) var(--size-16);\n  transition: border-color ease-in-out 0.15s;\n  font-size: var(--font-size-16);\n  line-height: var(--line-height-24);\n  text-align: center;\n  vertical-align: middle;\n  white-space: nowrap;\n}\n.cc_input-group-addon_4099316779.cc_input-lg_4099316779 {\n  padding: var(--size-12) var(--size-16) !important;\n}\n.cc_input-group-addon_4099316779 .cc_tw-icon_4099316779 {\n  display: inline-block;\n  margin-top: -2px;\n  margin-right: -5px;\n  margin-left: -4px;\n  font-size: 24px;\n  vertical-align: middle;\n}\n.cc_input-group_4099316779 {\n  display: table;\n  position: relative;\n  width: 100%;\n  border-collapse: separate;\n}\n.cc_input-group_4099316779 .cc_input-group-btn_4099316779,\n.cc_input-group_4099316779 .cc_input-group-addon_4099316779,\n.cc_input-group_4099316779 .cc_form-control_4099316779 {\n  border-radius: 0;\n  background-color: unset;\n}\n.cc_input-group_4099316779 .cc_input-group-btn_4099316779:first-child,\n.cc_input-group_4099316779 .cc_input-group-addon_4099316779:first-child,\n.cc_input-group_4099316779 .cc_form-control_4099316779:first-child {\n  border-top-left-radius: calc(var(--size-4) - 1px);\n  border-bottom-left-radius: calc(var(--size-4) - 1px);\n}\n.cc_input-group_4099316779 .cc_input-group-btn_4099316779:last-child,\n.cc_input-group_4099316779 .cc_input-group-addon_4099316779:last-child,\n.cc_input-group_4099316779 .cc_form-control_4099316779:last-child {\n  border-right-width: 1px;\n  border-top-right-radius: calc(var(--size-4) - 1px);\n  border-bottom-right-radius: calc(var(--size-4) - 1px);\n}\n.cc_input-group_4099316779 .cc_input-group-btn_4099316779:not(:first-child),\n.cc_input-group_4099316779 .cc_input-group-addon_4099316779:not(:first-child),\n.cc_input-group_4099316779 .cc_form-control_4099316779:not(:first-child) {\n  border-left: 0;\n}\n.cc_input-group_4099316779 .cc_input-group-btn_4099316779:not(:last-child),\n.cc_input-group_4099316779 .cc_input-group-addon_4099316779:not(:last-child),\n.cc_input-group_4099316779 .cc_form-control_4099316779:not(:last-child) {\n  border-right: 0;\n}\n.cc_focus_4099316779 .cc_input-group_4099316779 .cc_form-control_4099316779,\n.cc_has-focus_4099316779 .cc_input-group_4099316779 .cc_form-control_4099316779,\n.cc_input-group_4099316779:focus-within .cc_form-control_4099316779,\n.cc_focus_4099316779 .cc_input-group_4099316779 .cc_input-group-addon_4099316779,\n.cc_has-focus_4099316779 .cc_input-group_4099316779 .cc_input-group-addon_4099316779,\n.cc_input-group_4099316779:focus-within .cc_input-group-addon_4099316779 {\n  border: 0;\n}\n.cc_input-group-lg_4099316779 > .cc_form-control_4099316779 {\n  margin-bottom: 0;\n}\n.cc_form-control_4099316779 {\n  box-shadow: none;\n}\n.cc_input-group-addon_4099316779 + .cc_form-control_4099316779 {\n  padding-left: 0;\n}\n.cc_input-group-btn_4099316779 {\n  display: table-cell;\n  width: 1%;\n  vertical-align: middle;\n  white-space: nowrap;\n}\n.cc_dot-success_4099316779 {\n  display: flex;\n  order: 1;\n  margin-left: var(--size-4);\n}\n.cc_dot-success_4099316779::before {\n  content: '';\n  width: var(--size-8);\n  height: var(--size-8);\n  margin-top: -2px;\n  border-radius: 100%;\n  background: var(--color-sentiment-positive);\n}\n.cc_dot-fail_4099316779 {\n  display: flex;\n  order: 1;\n  margin-left: var(--size-4);\n}\n.cc_dot-fail_4099316779::before {\n  content: '';\n  width: var(--size-8);\n  height: var(--size-8);\n  margin-top: -2px;\n  border-radius: 100%;\n  background: var(--color-sentiment-negative);\n}\n.cc_d-flex_4099316779 {\n  display: flex !important;\n}\n@media (min-width: 768px) {\n  .cc_d-flex-md_4099316779 {\n    display: flex !important;\n  }\n}\n.cc_flex-center_4099316779 {\n  align-items: center;\n  justify-content: center;\n}\n@media (min-width: 768px) {\n  .cc_flex-center-md_4099316779 {\n    align-items: center;\n    justify-content: center;\n  }\n}\n.cc_flex-left_4099316779 {\n  align-items: flex-start;\n  justify-content: flex-start;\n}\n@media (min-width: 768px) {\n  .cc_flex-left-md_4099316779 {\n    align-items: flex-start;\n    justify-content: flex-start;\n  }\n}\n.cc_flex-column_4099316779 {\n  flex-direction: column;\n}\n@media (min-width: 768px) {\n  .cc_flex-row-md_4099316779 {\n    flex-direction: row;\n  }\n}\n.cc_flex-grow_4099316779 {\n  flex: 1 0 auto;\n}\n.cc_flex-shrink_4099316779 {\n  flex: 0 1 auto;\n}\n.cc_justify-content-center_4099316779 {\n  justify-content: center;\n}\n.cc_justify-content-end_4099316779 {\n  justify-content: flex-end;\n}\n.cc_align-items-center_4099316779 {\n  align-items: center;\n}\n.cc_align-items-end_4099316779 {\n  align-items: flex-end;\n}\n@media (min-width: 768px) {\n  .cc_m-x-md-4_4099316779 {\n    margin-right: var(--size-32) !important;\n    margin-left: var(--size-32) !important;\n  }\n}\n.cc_m-t-2_4099316779 {\n  margin-top: var(--size-16) !important;\n}\n.cc_m-t-3_4099316779 {\n  margin-top: var(--size-24) !important;\n}\n.cc_m-t-5_4099316779 {\n  margin-top: var(--size-24) !important;\n}\n.cc_m-r-1_4099316779 {\n  margin-right: var(--size-8) !important;\n}\n.cc_m-r-2_4099316779 {\n  margin-right: var(--size-16) !important;\n}\n.cc_m-b-1_4099316779 {\n  margin-bottom: var(--size-8) !important;\n}\n.cc_m-b-3_4099316779 {\n  margin-bottom: var(--size-8) !important;\n}\n.cc_m-b-4_4099316779 {\n  margin-bottom: var(--size-32) !important;\n}\n.cc_m-b-5_4099316779 {\n  margin-bottom: var(--size-40) !important;\n}\n@media (min-width: 768px) {\n  .cc_m-b-5-md_4099316779 {\n    margin-bottom: var(--size-40) !important;\n  }\n}\n@media (min-width: 768px) {\n  .cc_m-b-0-md_4099316779 {\n    margin-bottom: 0 !important;\n  }\n}\n.cc_m-l-1_4099316779 {\n  margin-left: var(--size-8) !important;\n}\n.cc_p-t-3_4099316779 {\n  padding-top: var(--size-24);\n}\n.cc_p-t-4_4099316779 {\n  padding-top: var(--size-32);\n}\n.cc_p-t-5_4099316779 {\n  padding-top: var(--size-40);\n}\n.cc_p-r-0_4099316779 {\n  padding-right: 0;\n}\n.cc_p-b-4_4099316779 {\n  padding-bottom: var(--size-32);\n}\n.cc_p-b-5_4099316779 {\n  padding-bottom: var(--size-40);\n}\n.cc_p-b-9_4099316779 {\n  padding-bottom: calc(var(--size-8) * 9);\n}\n.cc_size-1-of-1_4099316779 {\n  width: 100%;\n}\n.cc_text-no-wrap_4099316779 {\n  white-space: nowrap;\n}\n@media (min-width: 768px) {\n  .cc_only-mobile_4099316779 {\n    display: none;\n  }\n}\n.cc_border-radius-a_4099316779 {\n  border-radius: var(--size-40);\n}\n.cc_border-radius-t_4099316779 {\n  border-radius: var(--size-40) var(--size-40) 0 0;\n}\n.cc_border-radius-t-l_4099316779 {\n  border-radius: var(--size-40) var(--size-40) 0 0;\n}\n.cc_border-radius-t-r_4099316779 {\n  border-radius: var(--size-40) var(--size-40) 0 0;\n}\n.cc_border-radius-b_4099316779 {\n  border-radius: 0 0 var(--size-40) var(--size-40);\n}\n.cc_border-radius-b-l_4099316779 {\n  border-radius: 0 0 var(--size-40) var(--size-40);\n}\n.cc_border-radius-b-r_4099316779 {\n  border-radius: 0 0 var(--size-40) var(--size-40);\n}\n.cc_comparison-widget_4099316779,\n.cc_comparison-table_4099316779 {\n  position: relative;\n  min-width: calc(var(--size-8) * 37);\n  max-width: 976px;\n  margin: 0 12px;\n  border-radius: 3px;\n  color: var(--color-content-link);\n  font-family: var(--font-family-regular);\n  font-size: calc(var(--font-size-16) - 1px);\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  letter-spacing: 0.016em;\n  line-height: var(--line-height-24);\n}\n.cc_comparison-widget--wide_4099316779,\n.cc_comparison-table--wide_4099316779 {\n  max-width: 1128px;\n}\n.cc_comparison-widget_4099316779 *,\n.cc_comparison-table_4099316779 * {\n  box-sizing: border-box;\n}\n@media (min-width: 768px) {\n  .cc_comparison-widget_4099316779,\n  .cc_comparison-table_4099316779 {\n    min-width: calc(var(--size-8) * 66);\n    margin: auto;\n    font-size: var(--font-size-16);\n  }\n}\n.cc_card_4099316779 {\n  border-radius: var(--size-40) var(--size-40) 0% 0%;\n  background: var(--color-background-elevated);\n  box-shadow: none;\n}\n.cc_card-table_4099316779 {\n  border-radius: 0% 0% var(--size-40) var(--size-40);\n  background-color: transparent;\n  box-shadow: none;\n}\n.cc_comparison-widget_4099316779 [class*='comparison-table'] {\n  margin: 0;\n}\n.cc_comparison-widget_4099316779 [class*='card-table'] {\n  clip-path: polygon(-30% -2%, 0% -2%, 0% 0%, 100% 0%, 100% -2%, 130% -2%, 130% 130%, -30% 130%);\n}\n.cc_card-header_4099316779 {\n  padding: var(--size-40);\n}\n@media (max-width: 767px) {\n  .cc_card-header_4099316779 {\n    padding: var(--size-40) var(--size-16);\n  }\n}\n.cc_card-header_4099316779 a {\n  text-decoration: none;\n}\n.cc_table-plain_4099316779 {\n  width: 100%;\n  overflow: hidden;\n  border-collapse: collapse;\n  border-radius: var(--size-40);\n}\n.cc_table-plain__caption_4099316779 {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n}\n.cc_table-plain_4099316779 .cc_tfoot_4099316779 {\n  display: table-caption;\n  caption-side: bottom;\n  border-top: 1px solid #e2e6e8;\n}\n.cc_table-plain_4099316779 .cc_tfoot_4099316779 .cc_alert_4099316779 {\n  margin-bottom: 0;\n  background-color: var(--color-white);\n  font-size: var(--font-size-14);\n}\n.cc_table-plain_4099316779 .cc_tfoot_4099316779 .cc_alert--dark_4099316779 {\n  background-color: var(--color-background-elevated);\n}\n.cc_table-plain_4099316779 .cc_tfoot_4099316779 > tr {\n  display: inline-table;\n  width: 100%;\n  text-align: center;\n}\n.cc_table-plain_4099316779 .cc_tfoot_4099316779 > tr > td {\n  border-radius: 0% 0% var(--size-40) var(--size-40);\n}\n.cc_table-plain_4099316779 .cc_tfoot--dark_4099316779 {\n  border-top-color: var(--color-border-neutral);\n}\n@media (max-width: 767px) {\n  .cc_table-plain_4099316779 {\n    border-top: 1px solid var(--color-white);\n  }\n  .cc_table-plain_4099316779 .cc_thead_4099316779 {\n    display: none;\n  }\n}\n.cc_table-plain__row_4099316779 {\n  background-color: #f3f5f199;\n}\n@media (min-width: 768px) {\n  .cc_table-plain__row_4099316779 {\n    height: 80px;\n  }\n}\n@media (max-width: 767px) {\n  .cc_table-plain__row_4099316779 {\n    display: flex;\n    position: relative;\n    flex-direction: column;\n    padding-top: var(--size-16);\n    padding-bottom: var(--size-16);\n  }\n  .cc_table-plain__row_4099316779::before {\n    content: '';\n    position: absolute;\n    right: var(--size-32);\n    bottom: 0;\n    left: var(--size-32);\n    width: calc(100% - calc(var(--size-8) * 8));\n    height: 1px;\n    background: var(--color-border-neutral);\n  }\n  .cc_table-plain__row_4099316779:last-child::before {\n    content: none;\n  }\n}\n@media (min-width: 992px) {\n  .cc_table-plain__row_4099316779:last-of-type .cc_featured--last-cell_4099316779::before {\n    content: '';\n    position: absolute;\n    bottom: 0;\n    left: 0;\n    width: 100%;\n    height: var(--size-8);\n    background: var(--color-background-screen);\n    clip-path: polygon(-30% 100%, 100% 100%, 100% -170%, 120% -170%, 120% 700%, -30% 700%);\n  }\n}\n.cc_table-plain__row--dark_4099316779 {\n  background-color: var(--color-background-elevated);\n}\n.cc_table-plain__th_4099316779 {\n  position: sticky;\n  z-index: 1;\n  top: 0;\n  padding: var(--size-24) var(--size-16);\n  border: 0;\n  background-color: var(--color-forest-green);\n  color: var(--color-white);\n  font-size: var(--font-size-16);\n  font-weight: var(--font-weight-semi-bold);\n  vertical-align: top;\n}\n.cc_table-plain__th_4099316779:first-child {\n  padding-left: var(--size-32);\n  border-radius: var(--size-40) 0% 0% 0%;\n  text-align: left;\n}\n.cc_table-plain__th_4099316779:last-child {\n  padding-right: var(--size-32);\n  border-radius: 0% var(--size-40) 0% 0%;\n  text-align: left;\n}\n.cc_table-plain__th--small_4099316779 {\n  display: block;\n  color: #a8afbb;\n  font-size: var(--font-size-14);\n  font-weight: normal;\n  white-space: unset;\n  hyphens: auto;\n}\n.cc_table-plain__th--dark_4099316779 {\n  background-color: var(--color-background-screen);\n}\n.cc_table-plain__cell_4099316779 {\n  position: relative;\n  padding: var(--size-8) var(--size-16);\n  border: 0;\n  border-bottom: 1px solid var(--color-border-neutral);\n  font-size: var(--font-size-14);\n  text-align: left;\n}\n.cc_table-plain__cell_4099316779:first-child {\n  padding-left: var(--size-32);\n}\n.cc_table-plain__cell_4099316779:last-child {\n  padding-right: var(--size-32);\n}\n@media (max-width: 767px) {\n  .cc_table-plain__cell_4099316779 {\n    display: flex;\n    justify-content: space-between;\n    padding-top: var(--size-4);\n    padding-right: var(--size-16);\n    padding-bottom: var(--size-4);\n    padding-left: 0;\n    border: none;\n    color: var(--color-content-secondary);\n    line-height: 16px;\n  }\n  .cc_table-plain__cell_4099316779::before {\n    content: attr(data-label);\n    padding-left: var(--size-16);\n  }\n  .cc_table-plain__cell_4099316779:first-child {\n    padding-left: var(--size-16);\n  }\n  .cc_table-plain__cell_4099316779:first-child::before {\n    content: none;\n  }\n  .cc_table-plain__cell_4099316779:last-child {\n    flex-direction: column;\n    padding-right: var(--size-16);\n  }\n  .cc_table-plain__cell_4099316779:last-child::before {\n    position: absolute;\n  }\n}\n@media (min-width: 992px) {\n  .cc_featured--th_4099316779 {\n    width: 179px;\n    padding-left: var(--size-16);\n  }\n}\n.cc_featured--last-cell_4099316779 {\n  position: relative;\n  text-align: left;\n}\ntable tbody tr:last-of-type td {\n  border-bottom: none;\n}\n@media (--screen-md) {\n}@media (--screen-md) {\n}.cc_close_4099316779 {\n  float: right;\n  color: var(--color-content-accent);\n  text-decoration: none;\n}\n[dir=\"rtl\"] .cc_close_4099316779 {\n  float: left;\n}\n.np-theme-personal .cc_close_4099316779 {\n  color: var(--color-interactive-primary);\n}\n.cc_close_4099316779:hover {\n  color: var(--color-content-accent-hover);\n  text-decoration: none;\n  cursor: pointer;\n}\n.np-theme-personal .cc_close_4099316779:hover {\n  color: var(--color-interactive-primary-hover);\n}\n.cc_close_4099316779:focus {\n  outline: none;\n}\n.cc_close_4099316779:focus-visible {\n  outline: var(--ring-outline-color) solid var(--ring-outline-width);\n  outline-offset: var(--ring-outline-offset);\n}\n.cc_close_4099316779:active {\n  color: var(--color-content-accent-active);\n}\nbutton.cc_close_4099316779 {\n  padding: 0;\n  cursor: pointer;\n  background: transparent;\n  border: 0;\n  appearance: none;\n}\n.np-theme-personal button.cc_close_4099316779:hover {\n  background: initial;\n}\n.cc_popover_4099316779 {\n  top: 0;\n  left: 0;\n  z-index: 1060;\n  width: 276px;\n  padding: 18px 24px;\n  font-family: var(--font-family-regular);\n  font-style: normal;\n  font-weight: normal;\n  letter-spacing: normal;\n  line-break: auto;\n  line-height: var(--size-24);\n  text-align: left;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  white-space: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  font-size: var(--font-size-14);\n  line-height: 155%;\n  letter-spacing: -0.006em;\n  font-weight: var(--font-weight-regular);\n  background-color: var(--color-background-screen);\n  background-clip: padding-box;\n  border-radius: 3px;\n  box-shadow: 0 20px 66px 0 rgba(34, 48, 73, 0.2);\n  position: absolute;\n}\n[dir=\"rtl\"] .cc_popover_4099316779 {\n  right: 0;\n  left: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779 {\n  text-align: right;\n}\n.cc_np-theme-personal--forest-green_4099316779 .cc_popover_4099316779,\n.cc_np-theme-personal--bright-green_4099316779 .cc_popover_4099316779,\n.cc_np-theme-personal--dark_4099316779 .cc_popover_4099316779 {\n  box-shadow: none;\n}\n.cc_popover_4099316779.cc_animate_4099316779 {\n  transition: transform 0.25s;\n}\n.cc_popover_4099316779.cc_scale-down_4099316779 {\n  transform: scale(0);\n}\n.cc_popover_4099316779.cc_top_4099316779 {\n  margin-top: -14px;\n  transform-origin: 50% 100%;\n}\n.cc_popover_4099316779.cc_top-left_4099316779 {\n  margin-top: -14px;\n  transform-origin: calc(100% - 29px) 100%;\n}\n.cc_popover_4099316779.cc_top-right_4099316779 {\n  margin-top: -14px;\n  transform-origin: 29px 100%;\n}\n.cc_popover_4099316779.cc_right_4099316779 {\n  margin-left: 14px;\n  transform-origin: 0% 50%;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_right_4099316779 {\n  margin-right: 14px;\n  margin-left: initial;\n}\n.cc_popover_4099316779.cc_right-top_4099316779 {\n  margin-left: 14px;\n  transform-origin: 0% 29px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_right-top_4099316779 {\n  margin-right: 14px;\n  margin-left: initial;\n}\n.cc_popover_4099316779.cc_right-bottom_4099316779 {\n  margin-left: 14px;\n  transform-origin: 0% calc(100% - 29px);\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_right-bottom_4099316779 {\n  margin-right: 14px;\n  margin-left: initial;\n}\n.cc_popover_4099316779.cc_bottom_4099316779 {\n  margin-top: 14px;\n  transform-origin: 50% 0%;\n}\n.cc_popover_4099316779.cc_bottom-left_4099316779 {\n  margin-top: 14px;\n  transform-origin: calc(100% - 29px) 0%;\n}\n.cc_popover_4099316779.cc_bottom-right_4099316779 {\n  margin-top: 14px;\n  transform-origin: 29px 0%;\n}\n.cc_popover_4099316779.cc_left_4099316779 {\n  margin-left: -14px;\n  transform-origin: 100% 50%;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_left_4099316779 {\n  margin-right: -14px;\n  margin-left: initial;\n}\n.cc_popover_4099316779.cc_left-top_4099316779 {\n  margin-left: -14px;\n  transform-origin: 100% 29px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_left-top_4099316779 {\n  margin-right: -14px;\n  margin-left: initial;\n}\n.cc_popover_4099316779.cc_left-bottom_4099316779 {\n  margin-left: -14px;\n  transform-origin: 100% calc(100% - 29px);\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_left-bottom_4099316779 {\n  margin-right: -14px;\n  margin-left: initial;\n}\n.cc_popover_4099316779::before {\n  content: \" \";\n  position: absolute;\n  display: block;\n  width: 14px;\n  height: 14px;\n  left: 28px;\n  top: -7px;\n  transform: rotate(45deg);\n  background-color: inherit;\n}\n[dir=\"rtl\"] .cc_popover_4099316779::before {\n  right: 28px;\n  left: initial;\n}\n.cc_popover_4099316779.cc_top_4099316779::before {\n  top: auto;\n  bottom: -7px;\n  left: 50%;\n  margin-left: -7px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_top_4099316779::before {\n  right: 50%;\n  left: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_top_4099316779::before {\n  margin-right: -7px;\n  margin-left: initial;\n}\n.cc_popover_4099316779.cc_top-left_4099316779::before {\n  top: auto;\n  bottom: -7px;\n  right: 29px;\n  left: auto;\n  margin-left: -7px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_top-left_4099316779::before {\n  left: 29px;\n  right: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_top-left_4099316779::before {\n  right: auto;\n  left: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_top-left_4099316779::before {\n  margin-right: -7px;\n  margin-left: initial;\n}\n.cc_popover_4099316779.cc_top-right_4099316779::before {\n  top: auto;\n  bottom: -7px;\n  left: 29px;\n  right: auto;\n  margin-left: -7px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_top-right_4099316779::before {\n  right: 29px;\n  left: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_top-right_4099316779::before {\n  left: auto;\n  right: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_top-right_4099316779::before {\n  margin-right: -7px;\n  margin-left: initial;\n}\n.cc_popover_4099316779.cc_right_4099316779::before {\n  top: 50%;\n  margin-top: -7px;\n  left: -7px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_right_4099316779::before {\n  right: -7px;\n  left: initial;\n}\n.cc_popover_4099316779.cc_right-top_4099316779::before {\n  top: 29px;\n  margin-top: -7px;\n  left: -7px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_right-top_4099316779::before {\n  right: -7px;\n  left: initial;\n}\n.cc_popover_4099316779.cc_right-bottom_4099316779::before {\n  top: calc(100% - 29px);\n  margin-top: -7px;\n  left: -7px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_right-bottom_4099316779::before {\n  right: -7px;\n  left: initial;\n}\n.cc_popover_4099316779.cc_bottom_4099316779::before {\n  top: -7px;\n  bottom: auto;\n  left: 50%;\n  margin-left: -7px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_bottom_4099316779::before {\n  right: 50%;\n  left: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_bottom_4099316779::before {\n  margin-right: -7px;\n  margin-left: initial;\n}\n.cc_popover_4099316779.cc_bottom-left_4099316779::before {\n  top: -7px;\n  bottom: auto;\n  right: 29px;\n  left: auto;\n  margin-left: -7px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_bottom-left_4099316779::before {\n  left: 29px;\n  right: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_bottom-left_4099316779::before {\n  right: auto;\n  left: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_bottom-left_4099316779::before {\n  margin-right: -7px;\n  margin-left: initial;\n}\n.cc_popover_4099316779.cc_bottom-right_4099316779::before {\n  top: -7px;\n  bottom: auto;\n  right: 29px;\n  left: auto;\n  margin-left: -7px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_bottom-right_4099316779::before {\n  left: 29px;\n  right: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_bottom-right_4099316779::before {\n  right: auto;\n  left: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_bottom-right_4099316779::before {\n  margin-right: -7px;\n  margin-left: initial;\n}\n.cc_popover_4099316779.cc_left_4099316779::before {\n  top: 50%;\n  margin-top: -7px;\n  left: auto;\n  right: -7px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_left_4099316779::before {\n  right: auto;\n  left: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_left_4099316779::before {\n  left: -7px;\n  right: initial;\n}\n.cc_popover_4099316779.cc_left-top_4099316779::before {\n  top: 29px;\n  margin-top: -7px;\n  left: auto;\n  right: -7px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_left-top_4099316779::before {\n  right: auto;\n  left: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_left-top_4099316779::before {\n  left: -7px;\n  right: initial;\n}\n.cc_popover_4099316779.cc_left-bottom_4099316779::before {\n  top: calc(100% - 29px);\n  margin-top: -7px;\n  left: auto;\n  right: -7px;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_left-bottom_4099316779::before {\n  right: auto;\n  left: initial;\n}\n[dir=\"rtl\"] .cc_popover_4099316779.cc_left-bottom_4099316779::before {\n  left: -7px;\n  right: initial;\n}\n.cc_popover_4099316779 img,\n.cc_popover_4099316779 .cc_popover-image_4099316779 {\n  width: 65%;\n  margin: 8px 0;\n}\n.cc_popover-title_4099316779 {\n  padding: 0;\n  margin: 0;\n  color: var(--color-content-primary);\n  line-height: var(--line-height-title);\n  letter-spacing: 0;\n  font-size: var(--font-size-18);\n  font-weight: var(--font-weight-semi-bold);\n  letter-spacing: -0.014em;\n  line-height: 135%;\n  background-color: var(--color-background-screen);\n  border-bottom: 0;\n  border-radius: 2px 2px 0 0;\n  color: var(--color-content-primary) !important;\n}\n.cc_popover-title_4099316779 + p,\n.cc_popover-title_4099316779 + ul:not(.cc_list-unstyled_4099316779),\n.cc_popover-title_4099316779 + ol:not(.cc_list-unstyled_4099316779) {\n  margin-top: var(--size-8);\n}\n.cc_popover-content_4099316779 {\n  padding: 0;\n  font-size: var(--font-size-14);\n  line-height: 155%;\n  letter-spacing: -0.006em;\n  font-weight: var(--font-weight-regular);\n  color: var(--color-content-secondary);\n}\n.cc_popover-content_4099316779 > :last-child {\n  margin-bottom: 0;\n}\n.cc_popover-close_4099316779 {\n  float: right;\n  color: var(--color-content-accent);\n  text-decoration: none;\n}\n[dir=\"rtl\"] .cc_popover-close_4099316779 {\n  float: left;\n}\n.np-theme-personal .cc_popover-close_4099316779 {\n  color: var(--color-interactive-primary);\n}\n.cc_popover-close_4099316779:hover {\n  color: var(--color-content-accent-hover);\n  text-decoration: none;\n  cursor: pointer;\n}\n.np-theme-personal .cc_popover-close_4099316779:hover {\n  color: var(--color-interactive-primary-hover);\n}\n.cc_popover-close_4099316779:focus {\n  outline: none;\n}\n.cc_popover-close_4099316779:focus-visible {\n  outline: var(--ring-outline-color) solid var(--ring-outline-width);\n  outline-offset: var(--ring-outline-offset);\n}\n.cc_popover-close_4099316779:active {\n  color: var(--color-content-accent-active);\n}\nbutton.cc_popover-close_4099316779 {\n  padding: 0;\n  cursor: pointer;\n  background: transparent;\n  border: 0;\n  appearance: none;\n}\n.np-theme-personal button.cc_popover-close_4099316779:hover {\n  background: initial;\n}\n[data-toggle=\"popover\"]:not(.cc_btn_4099316779) {\n  color: inherit !important;\n  font-weight: inherit !important;\n  text-decoration: none !important;\n  border-bottom: 1px dotted var(--color-content-accent) !important;\n  cursor: pointer;\n}\n[data-toggle=\"popover\"]:not(.cc_btn_4099316779):hover,\n[data-toggle=\"popover\"]:not(.cc_btn_4099316779):focus,\n[data-toggle=\"popover\"]:not(.cc_btn_4099316779)[aria-describedby] {\n  color: var(--color-content-accent-hover) !important;\n  outline: 0;\n}\n.cc_nav_4099316779 > li > a [data-toggle=\"popover\"] {\n  border-bottom: 0;\n}\n@media (--screen-md-max) {\n  .cc_popover-modal_4099316779 {\n    position: fixed;\n    top: 0 !important;\n    right: 0 !important;\n    left: 0 !important;\n    width: 272px;\n    margin: var(--size-32) auto !important;\n  }\n  .cc_popover-modal_4099316779::before {\n    display: none;\n  }\n}\n@media (--screen-lg) {\n  .cc_popover-modal_4099316779.cc_left_4099316779 {\n    margin-right: -var(--size-24) !important;\n  }\n  [dir=\"rtl\"] .cc_popover-modal_4099316779.cc_left_4099316779 {\n    margin-left: -var(--size-24) !important;\n    margin-right: initial !important;\n  }\n  .cc_popover-modal_4099316779.cc_right_4099316779 {\n    margin-left: -var(--size-24) !important;\n  }\n  [dir=\"rtl\"] .cc_popover-modal_4099316779.cc_right_4099316779 {\n    margin-right: -var(--size-24) !important;\n    margin-left: initial !important;\n  }\n  .cc_popover-modal_4099316779.cc_top_4099316779 {\n    margin-bottom: -8px !important;\n  }\n  .cc_popover-modal_4099316779.cc_bottom_4099316779 {\n    margin-top: -8px !important;\n  }\n}\n@keyframes cc_cover-fade-in_4099316779 {\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 0.7;\n  }\n}\n.cc_popover-modal-cover_4099316779 {\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 1060;\n  display: none;\n  width: 100vw;\n  height: 100vh;\n  height: 100dvh;\n  cursor: pointer;\n  background-color: var(--color-background-screen);\n  opacity: 0.7;\n  animation: cc_cover-fade-in_4099316779 0.35s 0s linear forwards;\n}\n[dir=\"rtl\"] .cc_popover-modal-cover_4099316779 {\n  right: 0;\n  left: initial;\n}\n@media (--screen-md-max) {\n  .cc_popover-modal-cover_4099316779 {\n    display: block;\n  }\n}\n.cc_popover-promotion_4099316779 {\n  text-align: center;\n  padding: var(--size-24);\n}\n@media (max-width: 576px) {\n  .cc_popover-promotion_4099316779 {\n    width: auto !important;\n    padding: var(--size-24) !important;\n    margin: var(--size-16) !important;\n  }\n}\n@media (min-width: 566px) and (max-width: 992px) {\n  .cc_popover-promotion_4099316779 {\n    width: 540px !important;\n    padding: 28px var(--size-32) !important;\n    margin: var(--size-32) auto !important;\n  }\n}\n.cc_popover-promotion_4099316779 .cc_popover-title_4099316779 {\n  font-size: var(--font-size-16);\n  line-height: var(--line-height-title);\n}\n@media (min-width: 768px) {\n  .cc_popover-promotion_4099316779 .cc_popover-title_4099316779 {\n    font-size: var(--font-size-20);\n    line-height: var(--line-height-title);\n  }\n}\n@media (max-width: 480px) {\n  .cc_popover-promotion_4099316779 .cc_popover-image_4099316779 {\n    width: 80%;\n  }\n}\n@media (min-width: 480px) and (max-width: 992px) {\n  .cc_popover-promotion_4099316779 .cc_popover-image_4099316779 {\n    width: 60%;\n  }\n}\n@media (--screen-lg) {\n  .cc_popover-promotion_4099316779 .cc_popover-image_4099316779 {\n    width: 80%;\n  }\n}\n@media (max-width: 992px) {\n  .cc_popover-promotion_4099316779 {\n    position: absolute !important;\n  }\n}\n.cc_flag-icon_4099316779 {\n  max-width: 30px;\n  margin-left: var(--size-8);\n}\n.cc_pricing-disclaimer_4099316779 {\n  display: inline-block;\n}\n.cc_pricing-disclaimer_4099316779 .cc_tw-icon_4099316779,\n.cc_pricing-disclaimer_4099316779 [class^='tw-icon '] {\n  display: inline;\n  width: initial;\n  height: initial;\n}\n.cc_pricing-disclaimer_4099316779 .cc_tw-alert-icon_4099316779 {\n  position: absolute;\n  right: -2px;\n  margin-top: calc(-1 * var(--size-16));\n  color: #df8700 !important;\n}\n@media (min-width: 768px) {\n  .cc_pricing-disclaimer_4099316779 .cc_tw-alert-icon_4099316779 {\n    right: 10px;\n    margin-top: 2px;\n  }\n}\n.cc_pricing-disclaimer-popover_4099316779 .cc_popover_4099316779 {\n  text-align: left;\n}\n.cc_pricing-disclaimer-popover_4099316779 .cc_popover_4099316779 .cc_popover-content_4099316779 {\n  margin: 0;\n  font-size: var(--font-size-12);\n}\n@media (min-width: 768px) {\n  .cc_pricing-disclaimer-popover_4099316779 .cc_popover_4099316779 .cc_popover-content_4099316779 {\n    font-size: var(--font-size-14);\n  }\n}\n.cc_pricing-disclaimer-popover_4099316779 .cc_popover_4099316779 .cc_popover-title_4099316779 {\n  margin-bottom: var(--size-8);\n  font-size: var(--font-size-14);\n}\n@media (min-width: 768px) {\n  .cc_pricing-disclaimer-popover_4099316779 .cc_popover_4099316779 .cc_popover-title_4099316779 {\n    font-size: var(--font-size-16);\n  }\n}\n.cc_popover-title__route_4099316779 {\n  display: inline-flex;\n  align-items: center;\n  margin-right: var(--size-8);\n}\n.cc_popover-title__route_4099316779 [class^=\"tw-icon \"] {\n  margin: 0 var(--size-8);\n}\n.cc_btn-container_4099316779 {\n  clear: both;\n}\n@media (max-width: 767px) {\n  .cc_btn-container_4099316779 {\n    display: block;\n    width: 100%;\n  }\n}\n.cc_send-with-tw-cta_provider_4099316779 {\n  text-decoration: none;\n}\n@media (max-width: 767px) {\n  .cc_send-with-tw-cta_provider_4099316779 {\n    /* stylelint-disable at-rule-no-unknown, no-eol-whitespace, declaration-empty-line-before */\n    left: var(--size-8);\n    width: 100%;\n    margin-top: var(--size-16);\n  }\n}\n.cc_send-with-tw-cta_provider_4099316779:hover,\n.cc_send-with-tw-cta_provider_4099316779:focus {\n  outline: none !important;\n  text-decoration: none !important;\n}\n.cc_table-plain__row_4099316779 .cc_featured--last-cell_4099316779 .cc_negativeDelta_4099316779::before {\n  display: none;\n}\n.cc_headingInfo_4099316779 {\n  display: block;\n  margin: 0;\n  font-size: var(--font-size-12);\n  font-weight: normal;\n}\n.cc_disclaimer-close-btn_4099316779 {\n  display: inline-flex;\n  align-items: center;\n  text-decoration: none;\n}\n.cc_disclaimer-close-btn_4099316779 .cc_close-disclaimer-icon_4099316779 {\n  display: inline-block;\n  width: initial;\n  height: initial;\n  margin-right: var(--size-12);\n  margin-left: 0;\n  padding: var(--size-8);\n  border-radius: var(--radius-full);\n  background-color: var(--color-background-neutral);\n}\n.cc_rate-description_4099316779 {\n  margin-bottom: 0;\n  font-size: 12px;\n  line-height: 18px;\n}\n.cc_rate-description--dark_4099316779 {\n  color: var(--color-content-secondary);\n}\n.cc_tw-swap-icon_4099316779 {\n  margin: var(--size-16) 0;\n  color: var(--color-interactive-primary);\n  cursor: pointer;\n}\n@media (min-width: 768px) {\n  .cc_tw-swap-icon_4099316779 {\n    margin: 0 var(--size-16);\n  }\n}\n.cc_tw-chevron_4099316779 {\n  display: inline-block;\n  transition: var(--transition-transform);\n}\n.cc_tw-chevron_4099316779.cc_right_4099316779 {\n  transform: rotate(90deg);\n}\n.cc_tw-chevron_4099316779.cc_top_4099316779 {\n  transform: rotate(0deg);\n}\n.cc_tw-chevron_4099316779.cc_left_4099316779 {\n  transform: rotate(270deg);\n}\n.cc_tw-chevron_4099316779.cc_bottom_4099316779 {\n  transform: rotate(180deg);\n}\n.cc_tw-select_4099316779 .cc_tw-icon_4099316779 {\n  display: inline-block;\n  margin-top: -2px;\n  margin-right: var(--space-8);\n  vertical-align: middle;\n}\n.cc_tw-select_4099316779 .cc_dropdown-toggle_4099316779 .cc_tw-select-chevron_4099316779 {\n  margin: 0;\n}\n.cc_tw-select_4099316779 .cc_dropdown-toggle_4099316779 > span > .cc_tw-icon_4099316779 {\n  display: inline-block;\n  position: static;\n}\n.cc_tw-select_4099316779 [class*='small'] {\n  color: #5d7079;\n  font-size: var(--font-size-14);\n  line-height: calc(var(--line-height-24) - 1px);\n}\n@media (max-width: 480px) {\n  .cc_OptionsForm__buy_4099316779 .cc_tw-select_4099316779 [class*='small'],\n  .cc_OptionsForm__pay_4099316779 .cc_tw-select_4099316779 [class*='small'] {\n    display: none;\n  }\n}\n.cc_tw-select_4099316779 [class*='m-l-1'] {\n  margin-left: var(--size-8) !important;\n}\n.cc_tw-select-filter_4099316779 {\n  padding: 0 !important;\n  border: 0;\n}\n.cc_tw-select-filter-link_4099316779:active,\n.cc_tw-select-filter-link_4099316779:hover {\n  background-color: var(--color-white) !important;\n}\n@media (max-width: 575px) {\n  .cc_dropup_4099316779 > .cc_tw-select_4099316779.cc_dropdown-menu_4099316779,\n  .cc_dropdown_4099316779 > .cc_tw-select_4099316779.cc_dropdown-menu_4099316779 {\n    transition: none !important;\n  }\n  [class^='tw-select'][class*='select-overlay'] {\n    display: block !important;\n    position: fixed;\n    z-index: 999;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    animation: cc_twSelectFadeIn_4099316779 0.2s cubic-bezier(0.6, 0.2, 0.1, 1) both;\n    background: rgba(0, 0, 0, 0.3);\n  }\n  .cc_tw-select_4099316779 .cc_tw-dropdown-item_4099316779 a {\n    text-decoration: none;\n  }\n  .cc_tw-select_4099316779.cc_dropdown-menu_4099316779 {\n    display: none;\n    position: fixed;\n    top: auto;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    width: 100% !important;\n    max-width: 100%;\n    max-height: 50vh;\n    font-family: var(--font-family-regular);\n  }\n  .cc_tw-select_4099316779.cc_dropdown-menu--open_4099316779 {\n    display: block;\n    visibility: visible;\n    overflow: auto;\n    animation: cc_twSelectFadeUp_4099316779 0.2s cubic-bezier(0.6, 0.2, 0.1, 1) both;\n    opacity: 1;\n  }\n}\n@keyframes cc_twSelectFadeIn_4099316779 {\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 1;\n  }\n}\n@keyframes cc_twSelectFadeUp_4099316779 {\n  from {\n    transform: translateY(100%);\n    opacity: 0;\n  }\n  to {\n    transform: none;\n    opacity: 1;\n  }\n}\n.cc_travel-money_4099316779 .cc_card_4099316779 {\n  border-radius: var(--size-40);\n}\n.cc_travel-money_4099316779 .cc_tapestryCardContent_4099316779 {\n  border-radius: var(--size-40);\n}\n.cc_travel-money_4099316779 .cc_tapestryWrapper_4099316779 > :last-child {\n  background-color: transparent;\n}\n@media (max-width: 767px) {\n  .cc_travel-money_4099316779 .cc_card-header_4099316779 {\n    padding-top: var(--size-16);\n    padding-bottom: var(--size-24);\n  }\n}\n.cc_travel-money_4099316779 .cc_OptionsForm_4099316779 {\n  display: flex;\n  flex-direction: column;\n}\n.cc_travel-money_4099316779 .cc_OptionsForm_4099316779 > * {\n  margin-bottom: var(--size-8);\n}\n.cc_travel-money_4099316779 .cc_OptionsForm_4099316779 > *:last-child {\n  margin-bottom: 0;\n}\n@media (min-width: 768px) {\n  .cc_travel-money_4099316779 .cc_OptionsForm_4099316779 {\n    flex-direction: row;\n    align-items: center;\n  }\n  .cc_travel-money_4099316779 .cc_OptionsForm_4099316779 > * {\n    margin-right: var(--size-16);\n    margin-bottom: 0;\n  }\n  .cc_travel-money_4099316779 .cc_OptionsForm_4099316779 > *:last-child {\n    margin-right: 0;\n  }\n}\n.cc_travel-money_4099316779 .cc_OptionsForm__buy_4099316779 {\n  display: flex;\n  align-items: flex-end;\n}\n@media (min-width: 768px) {\n  .cc_travel-money_4099316779 .cc_OptionsForm__pay_4099316779 {\n    width: 42%;\n  }\n}\n.cc_travel-money_4099316779 .cc_OptionsForm__text_4099316779 {\n  font-size: var(--font-size-14);\n}\n@media (min-width: 768px) {\n  .cc_travel-money_4099316779 .cc_OptionsForm__text_4099316779 {\n    font-size: var(--font-size-16);\n  }\n}\n.cc_travel-money_4099316779 .cc_OptionsForm__label_4099316779 {\n  width: 100%;\n  margin-bottom: 0;\n}\n@media (max-width: 767px) {\n  .cc_travel-money_4099316779 .cc_OptionsForm__label_4099316779 {\n    margin-bottom: var(--size-8);\n  }\n}\n.cc_travel-money_4099316779 .cc_OptionsForm__sourceAmountAndCurrency_4099316779 {\n  display: block;\n}\n.cc_travel-money_4099316779 .cc_OptionsForm__sourceAmountAndCurrency_4099316779:nth-child(2):has(label) {\n  width: 100%;\n}\n@media (max-width: 767px) {\n  .cc_travel-money_4099316779 .cc_OptionsForm__sourceAmountAndCurrency_4099316779 {\n    display: contents;\n  }\n}\n.cc_travel-money_4099316779 .cc_OptionsForm__sourceAmountAndCurrency__currency_4099316779 {\n  width: 100%;\n}\n.cc_travel-money_4099316779 .cc_OptionsForm__sourceAmountAndCurrencyAlternat_4099316779 {\n  display: none;\n}\n.cc_travel-money_4099316779 .cc_OptionsForm__amount_4099316779 {\n  color: var(--color-content-primary);\n}\n.cc_travel-money_4099316779 .cc_row-cta_4099316779 {\n  background: #f3f5f199;\n}\n@media (max-width: 767px) {\n  .cc_travel-money_4099316779 .cc_row-cta_4099316779 {\n    display: block;\n    padding: var(--size-24) var(--size-8);\n  }\n}\n.cc_travel-money_4099316779 .cc_row-cta__text_4099316779 {\n  background-color: #f3f5f199;\n  font-weight: normal;\n}\n@media (max-width: 767px) {\n  .cc_travel-money_4099316779 .cc_row-cta__text_4099316779 {\n    margin-bottom: var(--size-16);\n    padding: var(--size-8);\n    text-align: center;\n  }\n}\n@media (min-width: 992px) {\n  .cc_travel-money_4099316779 .cc_row-cta_4099316779 > :last-child {\n    background-color: var(--color-background-neutral);\n  }\n}\n.cc_travel-money_4099316779 .cc_table-plain_4099316779 {\n  overflow: hidden;\n  border-radius: var(--size-40);\n}\n.cc_travel-money_4099316779 .cc_table-plain_4099316779 > tbody {\n  border-radius: var(--size-40);\n}\n@media (min-width: 576px) {\n  .cc_travel-money_4099316779 .cc_table-plain_4099316779 > tbody > tr:last-of-type {\n    padding-bottom: var(--size-8);\n    border-radius: var(--size-40);\n  }\n}\n.cc_travel-money_4099316779 .cc_table-plain_4099316779 > tbody > tr:last-of-type > td:last-of-type {\n  border-bottom: none;\n  border-radius: 0 0 var(--size-40) 0;\n}\n.cc_travel-money_4099316779 .cc_table-plain_4099316779 > tbody > tr:last-of-type > td:first-of-type {\n  border-bottom: none;\n  border-radius: var(--size-40);\n}\n.cc_travel-money_4099316779 .cc_table-plain__row_4099316779 {\n  background-color: var(--color-background-screen) !important;\n}\n.cc_travel-money_4099316779 .cc_table-plain__row_4099316779 .cc_featured--last-cell_4099316779 {\n  background-color: var(--color-background-screen);\n}\n@media (min-width: 992px) {\n  .cc_travel-money_4099316779 .cc_table-plain__row_4099316779 .cc_featured--last-cell_4099316779 {\n    background-color: #f3f5f199;\n  }\n}\n.cc_travel-money_4099316779 .cc_table-plain__cell_4099316779 {\n  border-bottom: none;\n}\n.cc_travel-money_4099316779 .cc_table-plain__cell--will-cost-you_4099316779:last-child {\n  padding-right: var(--size-16);\n  text-align: center;\n}\n@media (max-width: 767px) {\n  .cc_travel-money_4099316779 .cc_table-plain__cell--will-cost-you_4099316779:last-child {\n    order: -1;\n    margin-bottom: var(--size-16);\n    text-align: right;\n  }\n}\n@media (max-width: 767px) {\n  .cc_travel-money_4099316779 .cc_table-plain__cell--provider-logo_4099316779 {\n    order: -1;\n  }\n}\n.cc_travel-money_4099316779 .cc_tw-card_4099316779 {\n  width: 50px;\n  margin-right: var(--size-8);\n}\n.cc_travel-money_4099316779 .cc_providerLogoContainer_4099316779 {\n  display: flex;\n  align-items: center;\n}\n.cc_travel-money_4099316779 .cc_providerLogo_4099316779 {\n  width: calc(var(--size-8) * 14);\n  max-height: var(--size-32);\n  object-fit: contain;\n  object-position: 0 0;\n}\n@media (max-width: 767px) {\n  .cc_travel-money_4099316779 .cc_providerLogo_4099316779 {\n    max-height: calc(var(--size-8) * 7);\n    object-position: left;\n  }\n}\n.cc_travel-money_4099316779 .cc_featured-amount_4099316779 {\n  color: var(--color-content-primary);\n  font-size: var(--font-size-20);\n  font-weight: var(--font-weight-semi-bold);\n  white-space: nowrap;\n}\n@media (min-width: 768px) {\n  .cc_travel-money_4099316779 .cc_featured-amount_4099316779 {\n    text-align: center;\n  }\n}\n.cc_travel-money_4099316779 .cc_delivery-fee_4099316779 {\n  font-weight: var(--font-weight-semi-bold);\n}\n@media (max-width: 767px) {\n  .cc_travel-money_4099316779 .cc_delivery-fee_4099316779 small {\n    display: none;\n  }\n}\n.cc_travel-money_4099316779 a.cc_btn-send_4099316779 {\n  color: var(--color-white);\n}\n@media (max-width: 767px) {\n  .cc_travel-money_4099316779 .cc_one-off-fee_4099316779::before {\n    color: var(--color-sentiment-positive);\n  }\n}\n.cc_travel-money_4099316779 .cc_error-img-main_4099316779 {\n  display: block;\n}\n.cc_travel-money_4099316779 .cc_send-with-tw-cta_4099316779 {\n  text-decoration: none;\n}\n@media (max-width: 767px) {\n  .cc_travel-money_4099316779 .cc_send-with-tw-cta_4099316779 {\n    /* stylelint-disable at-rule-no-unknown, no-eol-whitespace, declaration-empty-line-before */\n    display: block;\n    width: 100%;\n  }\n}\n.cc_travel-money_4099316779 .cc_send-with-tw-cta_4099316779:hover,\n.cc_travel-money_4099316779 .cc_send-with-tw-cta_4099316779:focus {\n  outline: none !important;\n  text-decoration: none !important;\n}\n\n/*# sourceMappingURL=data:application/json;base64,  */";
var style = {"comparison-widget":"cc_comparison-widget_4099316779","comparisonWidget":"cc_comparison-widget_4099316779","comparison-table":"cc_comparison-table_4099316779","comparisonTable":"cc_comparison-table_4099316779","table-plain":"cc_table-plain_4099316779","tablePlain":"cc_table-plain_4099316779","alert":"cc_alert_4099316779","alert-info":"cc_alert-info_4099316779","alertInfo":"cc_alert-info_4099316779","form-group":"cc_form-group_4099316779","formGroup":"cc_form-group_4099316779","form-group-lg":"cc_form-group-lg_4099316779","formGroupLg":"cc_form-group-lg_4099316779","control-label":"cc_control-label_4099316779","controlLabel":"cc_control-label_4099316779","input-lg":"cc_input-lg_4099316779","inputLg":"cc_input-lg_4099316779","input-group-lg":"cc_input-group-lg_4099316779","inputGroupLg":"cc_input-group-lg_4099316779","form-control":"cc_form-control_4099316779","formControl":"cc_form-control_4099316779","input-group-addon":"cc_input-group-addon_4099316779","inputGroupAddon":"cc_input-group-addon_4099316779","label":"cc_label_4099316779","secondary":"cc_secondary_4099316779","container":"cc_container_4099316779","col-xs-12":"cc_col-xs-12_4099316779","colXs12":"cc_col-xs-12_4099316779","col-sm-10":"cc_col-sm-10_4099316779","colSm10":"cc_col-sm-10_4099316779","col-sm-offset-1":"cc_col-sm-offset-1_4099316779","colSmOffset1":"cc_col-sm-offset-1_4099316779","clearfix_":"cc_clearfix__4099316779","form-horizontal":"cc_form-horizontal_4099316779","formHorizontal":"cc_form-horizontal_4099316779","btn-group-vertical":"cc_btn-group-vertical_4099316779","btnGroupVertical":"cc_btn-group-vertical_4099316779","btn-group":"cc_btn-group_4099316779","btnGroup":"cc_btn-group_4099316779","container-fluid":"cc_container-fluid_4099316779","containerFluid":"cc_container-fluid_4099316779","row":"cc_row_4099316779","dl-horizontal":"cc_dl-horizontal_4099316779","dlHorizontal":"cc_dl-horizontal_4099316779","loader":"cc_loader_4099316779","sr-only":"cc_sr-only_4099316779","srOnly":"cc_sr-only_4099316779","anchor":"cc_anchor_4099316779","anchor--dark":"cc_anchor--dark_4099316779","anchorDark":"cc_anchor--dark_4099316779","img-responsive":"cc_img-responsive_4099316779","imgResponsive":"cc_img-responsive_4099316779","text-xs-left":"cc_text-xs-left_4099316779","textXsLeft":"cc_text-xs-left_4099316779","text-xs-center":"cc_text-xs-center_4099316779","textXsCenter":"cc_text-xs-center_4099316779","text-md-left":"cc_text-md-left_4099316779","textMdLeft":"cc_text-md-left_4099316779","text-success":"cc_text-success_4099316779","textSuccess":"cc_text-success_4099316779","text-content-secondary":"cc_text-content-secondary_4099316779","textContentSecondary":"cc_text-content-secondary_4099316779","small":"cc_small_4099316779","strong":"cc_strong_4099316779","h3":"cc_h3_4099316779","h4":"cc_h4_4099316779","font-weight-bold":"cc_font-weight-bold_4099316779","fontWeightBold":"cc_font-weight-bold_4099316779","text-xs-nowrap":"cc_text-xs-nowrap_4099316779","textXsNowrap":"cc_text-xs-nowrap_4099316779","table":"cc_table_4099316779","table-responsive":"cc_table-responsive_4099316779","tableResponsive":"cc_table-responsive_4099316779","table-condensed":"cc_table-condensed_4099316779","tableCondensed":"cc_table-condensed_4099316779","tw-icon":"cc_tw-icon_4099316779","twIcon":"cc_tw-icon_4099316779","input-group":"cc_input-group_4099316779","inputGroup":"cc_input-group_4099316779","input-group-btn":"cc_input-group-btn_4099316779","inputGroupBtn":"cc_input-group-btn_4099316779","focus":"cc_focus_4099316779","has-focus":"cc_has-focus_4099316779","hasFocus":"cc_has-focus_4099316779","dot-success":"cc_dot-success_4099316779","dotSuccess":"cc_dot-success_4099316779","dot-fail":"cc_dot-fail_4099316779","dotFail":"cc_dot-fail_4099316779","d-flex":"cc_d-flex_4099316779","dFlex":"cc_d-flex_4099316779","d-flex-md":"cc_d-flex-md_4099316779","dFlexMd":"cc_d-flex-md_4099316779","flex-center":"cc_flex-center_4099316779","flexCenter":"cc_flex-center_4099316779","flex-center-md":"cc_flex-center-md_4099316779","flexCenterMd":"cc_flex-center-md_4099316779","flex-left":"cc_flex-left_4099316779","flexLeft":"cc_flex-left_4099316779","flex-left-md":"cc_flex-left-md_4099316779","flexLeftMd":"cc_flex-left-md_4099316779","flex-column":"cc_flex-column_4099316779","flexColumn":"cc_flex-column_4099316779","flex-row-md":"cc_flex-row-md_4099316779","flexRowMd":"cc_flex-row-md_4099316779","flex-grow":"cc_flex-grow_4099316779","flexGrow":"cc_flex-grow_4099316779","flex-shrink":"cc_flex-shrink_4099316779","flexShrink":"cc_flex-shrink_4099316779","justify-content-center":"cc_justify-content-center_4099316779","justifyContentCenter":"cc_justify-content-center_4099316779","justify-content-end":"cc_justify-content-end_4099316779","justifyContentEnd":"cc_justify-content-end_4099316779","align-items-center":"cc_align-items-center_4099316779","alignItemsCenter":"cc_align-items-center_4099316779","align-items-end":"cc_align-items-end_4099316779","alignItemsEnd":"cc_align-items-end_4099316779","m-x-md-4":"cc_m-x-md-4_4099316779","mXMd4":"cc_m-x-md-4_4099316779","m-t-2":"cc_m-t-2_4099316779","mT2":"cc_m-t-2_4099316779","m-t-3":"cc_m-t-3_4099316779","mT3":"cc_m-t-3_4099316779","m-t-5":"cc_m-t-5_4099316779","mT5":"cc_m-t-5_4099316779","m-r-1":"cc_m-r-1_4099316779","mR1":"cc_m-r-1_4099316779","m-r-2":"cc_m-r-2_4099316779","mR2":"cc_m-r-2_4099316779","m-b-1":"cc_m-b-1_4099316779","mB1":"cc_m-b-1_4099316779","m-b-3":"cc_m-b-3_4099316779","mB3":"cc_m-b-3_4099316779","m-b-4":"cc_m-b-4_4099316779","mB4":"cc_m-b-4_4099316779","m-b-5":"cc_m-b-5_4099316779","mB5":"cc_m-b-5_4099316779","m-b-5-md":"cc_m-b-5-md_4099316779","mB5Md":"cc_m-b-5-md_4099316779","m-b-0-md":"cc_m-b-0-md_4099316779","mB0Md":"cc_m-b-0-md_4099316779","m-l-1":"cc_m-l-1_4099316779","mL1":"cc_m-l-1_4099316779","p-t-3":"cc_p-t-3_4099316779","pT3":"cc_p-t-3_4099316779","p-t-4":"cc_p-t-4_4099316779","pT4":"cc_p-t-4_4099316779","p-t-5":"cc_p-t-5_4099316779","pT5":"cc_p-t-5_4099316779","p-r-0":"cc_p-r-0_4099316779","pR0":"cc_p-r-0_4099316779","p-b-4":"cc_p-b-4_4099316779","pB4":"cc_p-b-4_4099316779","p-b-5":"cc_p-b-5_4099316779","pB5":"cc_p-b-5_4099316779","p-b-9":"cc_p-b-9_4099316779","pB9":"cc_p-b-9_4099316779","size-1-of-1":"cc_size-1-of-1_4099316779","size1Of1":"cc_size-1-of-1_4099316779","text-no-wrap":"cc_text-no-wrap_4099316779","textNoWrap":"cc_text-no-wrap_4099316779","only-mobile":"cc_only-mobile_4099316779","onlyMobile":"cc_only-mobile_4099316779","border-radius-a":"cc_border-radius-a_4099316779","borderRadiusA":"cc_border-radius-a_4099316779","border-radius-t":"cc_border-radius-t_4099316779","borderRadiusT":"cc_border-radius-t_4099316779","border-radius-t-l":"cc_border-radius-t-l_4099316779","borderRadiusTL":"cc_border-radius-t-l_4099316779","border-radius-t-r":"cc_border-radius-t-r_4099316779","borderRadiusTR":"cc_border-radius-t-r_4099316779","border-radius-b":"cc_border-radius-b_4099316779","borderRadiusB":"cc_border-radius-b_4099316779","border-radius-b-l":"cc_border-radius-b-l_4099316779","borderRadiusBL":"cc_border-radius-b-l_4099316779","border-radius-b-r":"cc_border-radius-b-r_4099316779","borderRadiusBR":"cc_border-radius-b-r_4099316779","comparison-widget--wide":"cc_comparison-widget--wide_4099316779","comparisonWidgetWide":"cc_comparison-widget--wide_4099316779","comparison-table--wide":"cc_comparison-table--wide_4099316779","comparisonTableWide":"cc_comparison-table--wide_4099316779","card":"cc_card_4099316779","card-table":"cc_card-table_4099316779","cardTable":"cc_card-table_4099316779","card-header":"cc_card-header_4099316779","cardHeader":"cc_card-header_4099316779","table-plain__caption":"cc_table-plain__caption_4099316779","tablePlain__caption":"cc_table-plain__caption_4099316779","tfoot":"cc_tfoot_4099316779","alert--dark":"cc_alert--dark_4099316779","alertDark":"cc_alert--dark_4099316779","tfoot--dark":"cc_tfoot--dark_4099316779","tfootDark":"cc_tfoot--dark_4099316779","thead":"cc_thead_4099316779","table-plain__row":"cc_table-plain__row_4099316779","tablePlain__row":"cc_table-plain__row_4099316779","featured--last-cell":"cc_featured--last-cell_4099316779","featuredLastCell":"cc_featured--last-cell_4099316779","table-plain__row--dark":"cc_table-plain__row--dark_4099316779","tablePlain__rowDark":"cc_table-plain__row--dark_4099316779","table-plain__th":"cc_table-plain__th_4099316779","tablePlain__th":"cc_table-plain__th_4099316779","table-plain__th--small":"cc_table-plain__th--small_4099316779","tablePlain__thSmall":"cc_table-plain__th--small_4099316779","table-plain__th--dark":"cc_table-plain__th--dark_4099316779","tablePlain__thDark":"cc_table-plain__th--dark_4099316779","table-plain__cell":"cc_table-plain__cell_4099316779","tablePlain__cell":"cc_table-plain__cell_4099316779","featured--th":"cc_featured--th_4099316779","featuredTh":"cc_featured--th_4099316779","close":"cc_close_4099316779","np-theme-personal":"np-theme-personal","npThemePersonal":"np-theme-personal","popover":"cc_popover_4099316779","np-theme-personal--forest-green":"cc_np-theme-personal--forest-green_4099316779","npThemePersonalForestGreen":"cc_np-theme-personal--forest-green_4099316779","np-theme-personal--bright-green":"cc_np-theme-personal--bright-green_4099316779","npThemePersonalBrightGreen":"cc_np-theme-personal--bright-green_4099316779","np-theme-personal--dark":"cc_np-theme-personal--dark_4099316779","npThemePersonalDark":"cc_np-theme-personal--dark_4099316779","animate":"cc_animate_4099316779","scale-down":"cc_scale-down_4099316779","scaleDown":"cc_scale-down_4099316779","top":"cc_top_4099316779","top-left":"cc_top-left_4099316779","topLeft":"cc_top-left_4099316779","top-right":"cc_top-right_4099316779","topRight":"cc_top-right_4099316779","right":"cc_right_4099316779","right-top":"cc_right-top_4099316779","rightTop":"cc_right-top_4099316779","right-bottom":"cc_right-bottom_4099316779","rightBottom":"cc_right-bottom_4099316779","bottom":"cc_bottom_4099316779","bottom-left":"cc_bottom-left_4099316779","bottomLeft":"cc_bottom-left_4099316779","bottom-right":"cc_bottom-right_4099316779","bottomRight":"cc_bottom-right_4099316779","left":"cc_left_4099316779","left-top":"cc_left-top_4099316779","leftTop":"cc_left-top_4099316779","left-bottom":"cc_left-bottom_4099316779","leftBottom":"cc_left-bottom_4099316779","popover-image":"cc_popover-image_4099316779","popoverImage":"cc_popover-image_4099316779","popover-title":"cc_popover-title_4099316779","popoverTitle":"cc_popover-title_4099316779","list-unstyled":"cc_list-unstyled_4099316779","listUnstyled":"cc_list-unstyled_4099316779","popover-content":"cc_popover-content_4099316779","popoverContent":"cc_popover-content_4099316779","popover-close":"cc_popover-close_4099316779","popoverClose":"cc_popover-close_4099316779","btn":"cc_btn_4099316779","nav":"cc_nav_4099316779","popover-modal":"cc_popover-modal_4099316779","popoverModal":"cc_popover-modal_4099316779","popover-modal-cover":"cc_popover-modal-cover_4099316779","popoverModalCover":"cc_popover-modal-cover_4099316779","cover-fade-in":"cc_cover-fade-in_4099316779","coverFadeIn":"cc_cover-fade-in_4099316779","popover-promotion":"cc_popover-promotion_4099316779","popoverPromotion":"cc_popover-promotion_4099316779","flag-icon":"cc_flag-icon_4099316779","flagIcon":"cc_flag-icon_4099316779","pricing-disclaimer":"cc_pricing-disclaimer_4099316779","pricingDisclaimer":"cc_pricing-disclaimer_4099316779","tw-alert-icon":"cc_tw-alert-icon_4099316779","twAlertIcon":"cc_tw-alert-icon_4099316779","pricing-disclaimer-popover":"cc_pricing-disclaimer-popover_4099316779","pricingDisclaimerPopover":"cc_pricing-disclaimer-popover_4099316779","popover-title__route":"cc_popover-title__route_4099316779","popoverTitle__route":"cc_popover-title__route_4099316779","btn-container":"cc_btn-container_4099316779","btnContainer":"cc_btn-container_4099316779","send-with-tw-cta_provider":"cc_send-with-tw-cta_provider_4099316779","sendWithTwCta_provider":"cc_send-with-tw-cta_provider_4099316779","negativeDelta":"cc_negativeDelta_4099316779","headingInfo":"cc_headingInfo_4099316779","disclaimer-close-btn":"cc_disclaimer-close-btn_4099316779","disclaimerCloseBtn":"cc_disclaimer-close-btn_4099316779","close-disclaimer-icon":"cc_close-disclaimer-icon_4099316779","closeDisclaimerIcon":"cc_close-disclaimer-icon_4099316779","rate-description":"cc_rate-description_4099316779","rateDescription":"cc_rate-description_4099316779","rate-description--dark":"cc_rate-description--dark_4099316779","rateDescriptionDark":"cc_rate-description--dark_4099316779","tw-swap-icon":"cc_tw-swap-icon_4099316779","twSwapIcon":"cc_tw-swap-icon_4099316779","tw-chevron":"cc_tw-chevron_4099316779","twChevron":"cc_tw-chevron_4099316779","tw-select":"cc_tw-select_4099316779","twSelect":"cc_tw-select_4099316779","dropdown-toggle":"cc_dropdown-toggle_4099316779","dropdownToggle":"cc_dropdown-toggle_4099316779","tw-select-chevron":"cc_tw-select-chevron_4099316779","twSelectChevron":"cc_tw-select-chevron_4099316779","OptionsForm__buy":"cc_OptionsForm__buy_4099316779","OptionsForm__pay":"cc_OptionsForm__pay_4099316779","tw-select-filter":"cc_tw-select-filter_4099316779","twSelectFilter":"cc_tw-select-filter_4099316779","tw-select-filter-link":"cc_tw-select-filter-link_4099316779","twSelectFilterLink":"cc_tw-select-filter-link_4099316779","dropup":"cc_dropup_4099316779","dropdown-menu":"cc_dropdown-menu_4099316779","dropdownMenu":"cc_dropdown-menu_4099316779","dropdown":"cc_dropdown_4099316779","twSelectFadeIn":"cc_twSelectFadeIn_4099316779","tw-dropdown-item":"cc_tw-dropdown-item_4099316779","twDropdownItem":"cc_tw-dropdown-item_4099316779","dropdown-menu--open":"cc_dropdown-menu--open_4099316779","dropdownMenuOpen":"cc_dropdown-menu--open_4099316779","twSelectFadeUp":"cc_twSelectFadeUp_4099316779","travel-money":"cc_travel-money_4099316779","travelMoney":"cc_travel-money_4099316779","tapestryCardContent":"cc_tapestryCardContent_4099316779","tapestryWrapper":"cc_tapestryWrapper_4099316779","OptionsForm":"cc_OptionsForm_4099316779","OptionsForm__text":"cc_OptionsForm__text_4099316779","OptionsForm__label":"cc_OptionsForm__label_4099316779","OptionsForm__sourceAmountAndCurrency":"cc_OptionsForm__sourceAmountAndCurrency_4099316779","OptionsForm__sourceAmountAndCurrency__currency":"cc_OptionsForm__sourceAmountAndCurrency__currency_4099316779","OptionsForm__sourceAmountAndCurrencyAlternat":"cc_OptionsForm__sourceAmountAndCurrencyAlternat_4099316779","OptionsForm__amount":"cc_OptionsForm__amount_4099316779","row-cta":"cc_row-cta_4099316779","rowCta":"cc_row-cta_4099316779","row-cta__text":"cc_row-cta__text_4099316779","rowCta__text":"cc_row-cta__text_4099316779","table-plain__cell--will-cost-you":"cc_table-plain__cell--will-cost-you_4099316779","tablePlain__cellWillCostYou":"cc_table-plain__cell--will-cost-you_4099316779","table-plain__cell--provider-logo":"cc_table-plain__cell--provider-logo_4099316779","tablePlain__cellProviderLogo":"cc_table-plain__cell--provider-logo_4099316779","tw-card":"cc_tw-card_4099316779","twCard":"cc_tw-card_4099316779","providerLogoContainer":"cc_providerLogoContainer_4099316779","providerLogo":"cc_providerLogo_4099316779","featured-amount":"cc_featured-amount_4099316779","featuredAmount":"cc_featured-amount_4099316779","delivery-fee":"cc_delivery-fee_4099316779","deliveryFee":"cc_delivery-fee_4099316779","btn-send":"cc_btn-send_4099316779","btnSend":"cc_btn-send_4099316779","one-off-fee":"cc_one-off-fee_4099316779","oneOffFee":"cc_one-off-fee_4099316779","error-img-main":"cc_error-img-main_4099316779","errorImgMain":"cc_error-img-main_4099316779","send-with-tw-cta":"cc_send-with-tw-cta_4099316779","sendWithTwCta":"cc_send-with-tw-cta_4099316779"};
styleInject(css_248z);

const createClassNames$2 = createClassNamesFromStyles(style);
const formatAmountIfSet = (amount, currency, locale) => amount ? formatAmount(amount, currency, locale) : '';
const AmountInput = ({
  amount,
  onAmountChange: onAmountChangeProperty,
  currencyCode
}) => {
  const {
    locale
  } = useIntl();
  const [formattedAmount, updateFormattedAmount] = useState(formatAmountIfSet(amount, currencyCode, locale));
  const [isFocused, updateIsFocused] = useState(false);
  const formatInput = () => {
    const parsed = parseAmount(formattedAmount, currencyCode, locale);
    if (!Number.isNaN(parsed)) {
      updateFormattedAmount(formatAmountIfSet(parsed, currencyCode, locale));
    }
  };
  useEffect(() => {
    if (!isFocused) {
      const formatted = formatAmountIfSet(amount, currencyCode, locale);
      updateFormattedAmount(formatted);
    }
  }, [amount, currencyCode, locale]);
  const onAmountChange = event => {
    const {
      target: {
        value
      }
    } = event;
    updateFormattedAmount(value);
    const parsed = parseAmount(value, currencyCode, locale);
    if (!Number.isNaN(parsed)) {
      onAmountChangeProperty(parsed);
    }
  };
  const onAmountFocus = () => {
    updateIsFocused(true);
  };
  const onAmountBlur = () => {
    updateIsFocused(false);
    formatInput();
  };
  return /*#__PURE__*/React.createElement("label", {
    htmlFor: "amountInput",
    className: createClassNames$2(['label', 'OptionsForm__label'])
  }, /*#__PURE__*/React.createElement("span", {
    className: style['sr-only']
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "amount"
  })), /*#__PURE__*/React.createElement("input", {
    id: "amountInput",
    className: createClassNames$2(['form-control', 'OptionsForm__amount']),
    value: formattedAmount,
    name: "amount",
    onChange: onAmountChange,
    onFocus: onAmountFocus,
    onBlur: onAmountBlur
  }));
};
AmountInput.propTypes = {
  amount: PropTypes.number.isRequired,
  onAmountChange: PropTypes.func.isRequired,
  currencyCode: PropTypes.string.isRequired
};

// FIXME This randomly chooses a currency that's not the same one as "selected"?, it should be deterministic ideally
const getTopCurrency = selectedCurrency => {
  const topCurrencies = ['GBP', 'EUR', 'USD', 'AUD'];
  const index = Math.floor(Math.random() * (topCurrencies.length - 1));
  return topCurrencies.filter(c => c !== selectedCurrency)[index];
};
const getRouteAttributesToUpdate = (type, selectedCurrency, currencyToCheck) => {
  const attributesToUpdate = {
    [type]: selectedCurrency
  };
  if (selectedCurrency === currencyToCheck) {
    const currencyRoute = {
      sourceCurrency: 'targetCurrency',
      targetCurrency: 'sourceCurrency'
    };
    // eslint-disable-next-line fp/no-mutation
    attributesToUpdate[currencyRoute[type]] = getTopCurrency(selectedCurrency);
  }
  return attributesToUpdate;
};
const Options = ({
  sourceCurrency,
  targetCurrency,
  availableTargetCurrencies,
  onRouteChange,
  amount,
  onAmountChange
}) => {
  const updateCurrenciesRoute = (type, selectedCurrency) => {
    const route = {
      sourceCurrency: () => getRouteAttributesToUpdate(type, selectedCurrency, targetCurrency),
      targetCurrency: () => getRouteAttributesToUpdate(type, selectedCurrency, sourceCurrency)
    };
    const attributesToUpdate = route[type]();
    onRouteChange({
      ...attributesToUpdate
    });
    return attributesToUpdate;
  };
  const onCurrencyChange = type => selectedCurrencyProfile => {
    updateCurrenciesRoute(type, selectedCurrencyProfile.code);
  };
  return /*#__PURE__*/React.createElement("div", {
    className: style.OptionsForm
  }, /*#__PURE__*/React.createElement("span", {
    className: `${style.OptionsForm__sourceAmountAndCurrency} ${style.OptionsForm__text}`
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "pay-in"
  })), /*#__PURE__*/React.createElement("span", {
    className: style.OptionsForm__sourceAmountAndCurrency
  }, /*#__PURE__*/React.createElement(AmountInput, {
    amount: amount,
    onAmountChange: onAmountChange,
    currencyCode: sourceCurrency
  })), /*#__PURE__*/React.createElement("span", {
    className: style.OptionsForm__sourceAmountAndCurrency__currency
  }, /*#__PURE__*/React.createElement(CurrencySelector, {
    type: "sourceCurrency",
    currencyCode: sourceCurrency,
    onSelectChange: onCurrencyChange,
    "data-testid": "sourceCurrencySelector",
    disabled: true
  })), /*#__PURE__*/React.createElement("span", {
    className: style.OptionsForm__text
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "pay-out"
  })), /*#__PURE__*/React.createElement(CurrencySelector, {
    type: "targetCurrency",
    currencyCode: targetCurrency,
    onSelectChange: onCurrencyChange,
    availableCurrencies: availableTargetCurrencies,
    "data-testid": "targetCurrencySelector"
  }));
};
Options.propTypes = {
  sourceCurrency: PropTypes.string.isRequired,
  targetCurrency: PropTypes.string.isRequired,
  availableTargetCurrencies: PropTypes.arrayOf(PropTypes.string),
  onRouteChange: PropTypes.func.isRequired,
  amount: PropTypes.number.isRequired,
  onAmountChange: PropTypes.func.isRequired
};
Options.defaultProps = {
  availableTargetCurrencies: null
};

const createClassNames$1 = createClassNamesFromStyles(style);
const ProviderRow = ({
  sourceCurrency,
  targetCurrency,
  name,
  alias,
  logo,
  midMarketRate,
  deliveryEstimation,
  receivedAmount,
  rate,
  feeBreakdown,
  twSavings,
  ctaUrlSavings,
  ctaUrlNotCheapest,
  track
}) => {
  const {
    formatMessage,
    locale
  } = useIntl();
  const isTW = isWiseAlias(alias);
  const deliveryFee = feeBreakdown.find(f => f.feeType === 'DELIVERY')?.feeAmount;
  const MID_MARKET_URL = createUrl('/gb/mid-market-rate');
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("tr", {
    className: style['table-plain__row']
  }, /*#__PURE__*/React.createElement("td", {
    className: createClassNames$1(['table-plain__cell', 'table-plain__cell--provider-logo'])
  }, /*#__PURE__*/React.createElement("div", {
    className: createClassNames$1(['providerLogoContainer'])
  }, logo && /*#__PURE__*/React.createElement("img", {
    className: createClassNames$1(['providerLogo']),
    src: logo,
    alt: formatMessage({
      id: 'provider-logo-alt-text'
    }, {
      name
    })
  }))), /*#__PURE__*/React.createElement("td", {
    className: createClassNames$1(['table-plain__cell']),
    "data-label": formatMessage({
      id: 'exchange-rate'
    })
  }, /*#__PURE__*/React.createElement(ExchangeRateIndicator, {
    referenceRate: midMarketRate,
    rate: rate,
    label: isConsideredMidmarketRate(rate, midMarketRate) ? /*#__PURE__*/React.createElement(Label, {
      message: "mid-market-rate",
      link: MID_MARKET_URL,
      target: "_blank"
    }) : null,
    sourceCurrency: sourceCurrency,
    targetCurrency: targetCurrency
  })), /*#__PURE__*/React.createElement("td", {
    className: isTW ? createClassNames$1(['table-plain__cell', 'one-off-fee']) : createClassNames$1(['table-plain__cell']),
    "data-label": isTW ? formatMessage({
      id: 'delivery-fee-one-off'
    }) : formatMessage({
      id: 'delivery-fee'
    })
  }, /*#__PURE__*/React.createElement("span", {
    className: createClassNames$1(['delivery-fee'])
  }, formatMoney(deliveryFee, sourceCurrency, locale, {
    alwaysShowDecimals: true
  }), isTW && /*#__PURE__*/React.createElement("small", {
    className: createClassNames$1(['text-success', 'm-l-1'])
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "one-off-fee"
  })))), /*#__PURE__*/React.createElement("td", {
    className: style['table-plain__cell'],
    "data-label": formatMessage({
      id: 'should-arrive'
    })
  }, deliveryEstimation && /*#__PURE__*/React.createElement(DeliveryEstimation, {
    alias: alias,
    onClickingDeliveryEstimationTooltip: () => {},
    deliveryEstimation: deliveryEstimation,
    isPartner: false,
    styles: style,
    isTravelMoney: true
  })), /*#__PURE__*/React.createElement("td", {
    className: createClassNames$1(['table-plain__cell', 'featured--last-cell', 'table-plain__cell--will-cost-you']),
    "data-label": formatMessage({
      id: 'will-cost-you'
    })
  }, /*#__PURE__*/React.createElement("span", {
    className: createClassNames$1(['featured-amount'])
  }, formatMoney(receivedAmount, targetCurrency, locale, {
    alwaysShowDecimals: true
  })))), isTW && /*#__PURE__*/React.createElement(SavingsRow, {
    savings: twSavings,
    currency: sourceCurrency,
    ctaUrlSavings: ctaUrlSavings,
    ctaUrlNotCheapest: ctaUrlNotCheapest,
    track: track
  }));
};
ProviderRow.propTypes = {
  sourceCurrency: PropTypes.string.isRequired,
  targetCurrency: PropTypes.string.isRequired,
  name: PropTypes.string.isRequired,
  alias: PropTypes.string.isRequired,
  logo: PropTypes.string,
  deliveryEstimation: PropTypes.shape(DeliveryEstimation.propTypes.deliveryEstimation).isRequired,
  rate: PropTypes.number.isRequired,
  midMarketRate: PropTypes.number,
  receivedAmount: PropTypes.number.isRequired,
  feeBreakdown: PropTypes.arrayOf(PropTypes.shape({
    feeType: PropTypes.string.isRequired,
    feeAmount: PropTypes.number.isRequired
  })).isRequired,
  twSavings: PropTypes.number.isRequired,
  ctaUrlSavings: PropTypes.string.isRequired,
  ctaUrlNotCheapest: PropTypes.string.isRequired,
  track: PropTypes.func
};
ProviderRow.defaultProps = {
  logo: '',
  midMarketRate: 0,
  track: () => {}
};
const SavingsRow = ({
  savings,
  currency,
  ctaUrlSavings,
  ctaUrlNotCheapest,
  track
}) => {
  const {
    locale
  } = useIntl();
  const showSavings = savings > 0;
  return /*#__PURE__*/React.createElement("tr", {
    className: createClassNames$1(['row-cta'])
  }, /*#__PURE__*/React.createElement("th", {
    className: createClassNames$1(['table-plain__cell', 'row-cta__text']),
    colSpan: "4"
  }, showSavings ? /*#__PURE__*/React.createElement(FormattedMessage, {
    values: {
      savings: formatMoney(savings, currency, locale, {
        alwaysShowDecimals: true
      })
    },
    id: "savings"
  }) : /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "not-cheapest"
  })), /*#__PURE__*/React.createElement("th", {
    className: createClassNames$1(['table-plain__cell', 'featured--last-cell', 'table-plain__cell--will-cost-you'])
  }, /*#__PURE__*/React.createElement("a", {
    className: createClassNames$1(['send-with-tw-cta']),
    href: showSavings ? ctaUrlSavings : ctaUrlNotCheapest
  }, /*#__PURE__*/React.createElement(Button, {
    size: Size.SMALL,
    type: ControlType.POSITIVE,
    priority: Priority.PRIMARY,
    className: createClassNames$1(['send-with-tw-cta']),
    onClick: showSavings ? () => track('Travel Money - See Savings') : () => track('Travel Money - Get Card')
  }, showSavings ? /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "see-savings"
  }) : /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "get-the-card"
  })))));
};
SavingsRow.propTypes = {
  currency: PropTypes.string.isRequired,
  savings: PropTypes.number.isRequired,
  ctaUrlSavings: PropTypes.string.isRequired,
  ctaUrlNotCheapest: PropTypes.string.isRequired,
  track: PropTypes.func.isRequired
};

const STATUS = {
  PENDING: 'pending',
  RESOLVED: 'resolved',
  REJECTED: 'rejected'
};
const DEFAULT_STATE = {
  status: STATUS.PENDING,
  providers: [],
  midMarketRate: 0,
  twSavings: 0
};
const API_ERROR = {
  status: STATUS.REJECTED,
  errorType: 'EXCEPTION'
};
const TW_DELIVERY_FEE_GBP = 7;
const TW_DELIVERY_ESTIMATE_UK = {
  min: 'P2D',
  max: 'P6D'
};
const getBestNonTwFee = providers => providers.reduce((lowestFee, current) => {
  if (isWiseAlias(current.alias)) {
    return lowestFee;
  }
  return Math.min(lowestFee, current.fee);
}, Infinity);
const calculateRateMarkupFee = ({
  rate
}, sendAmount, midMarketRate) => {
  // calculate receivedAmount at midmarket rate
  const midMarketConversion = sendAmount * midMarketRate;
  // calculate receivedAmount at provider rate
  const providerConversion = sendAmount * rate;
  // take difference, get amount in targetCurrency
  const diff = midMarketConversion - providerConversion;
  // use midmarket rate to convert back to sourceCurrency
  return diff / midMarketRate;
};

// To reach MVP, some there were some changes made to the designed API contract
// These should be removed eventually, so this is a safe way to remap API responses
// if it detects an MVP API response
const temporaryProviderRemapping = (sendAmount, midMarketRate) => provider => {
  if (provider.feeBreakdown) {
    return provider;
  }
  if (isWiseAlias(provider.alias)) {
    const conversionFee = provider.fee - TW_DELIVERY_FEE_GBP; // fee includes delivery
    return {
      ...provider,
      feeBreakdown: [{
        feeType: 'DELIVERY',
        feeAmount: TW_DELIVERY_FEE_GBP
      }, {
        feeType: 'CONVERSION',
        feeAmount: conversionFee
      }],
      deliveryEstimation: {
        duration: TW_DELIVERY_ESTIMATE_UK,
        providerGivesEstimate: true
      }
    };
  }
  const rateMarkupFee = calculateRateMarkupFee(provider, sendAmount, midMarketRate);
  return {
    ...provider,
    fee: provider.fee + rateMarkupFee,
    feeBreakdown: [{
      feeType: 'DELIVERY',
      feeAmount: provider.fee
    }, {
      feeType: 'MARKUP',
      feeAmount: rateMarkupFee
    }]
  };
};
const collapseQuotes = targetCurrency => provider => {
  const {
    quotes,
    ...rest
  } = provider;
  return {
    ...rest,
    ...extractQuote(quotes, targetCurrency)
  };
};
const transformProviders = (sendAmount, rawProviders, targetCurrency, midMarketRate) => rawProviders?.length ? rawProviders.map(collapseQuotes(targetCurrency)).map(temporaryProviderRemapping(sendAmount, midMarketRate)).sort((a, b) => b.receivedAmount - a.receivedAmount) : [];
const getMidMarketRateFromProviders = providers => {
  const twQuote = providers.find(provider => isWiseAlias(provider.alias))?.quotes[0];
  return twQuote?.rate;
};
const transformResponse = raw => {
  if (!raw.providers.length) {
    return {
      midMarketRate: 0,
      providers: [],
      twSavings: 0
    };
  }
  const {
    targetCurrency
  } = raw;
  const midMarketRate = getMidMarketRateFromProviders(raw?.providers);
  const providers = transformProviders(raw?.sendAmount, raw?.providers, targetCurrency, midMarketRate);
  const bestFee = getBestNonTwFee(providers);
  const twQuote = providers.find(provider => isWiseAlias(provider.alias));
  const twSavings = bestFee - twQuote?.fee;
  return {
    midMarketRate,
    providers,
    twSavings
  };
};
const useTravelMoneyApi = (sendAmount, sourceCurrency, targetCurrency, initialData) => {
  let initialState = DEFAULT_STATE;
  if (initialData) {
    try {
      const transformed = transformResponse(initialData);
      initialState = {
        status: STATUS.RESOLVED,
        ...transformed
      };
    } catch (error) {
      throw new Error(`Error adapting initialData API response: ${error}`);
    }
  }
  const [state, setState] = useState(initialState);
  // Don't re-fetch on mount if initialData provided
  const shouldRunEffect = useRef(!initialData);
  useEffect(() => {
    async function fetchFn() {
      setState({
        ...state,
        status: STATUS.PENDING
      });
      let result = null;
      let providerType = 'travelMoney';
      try {
        result = await fetchQuotes(sourceCurrency, targetCurrency, sendAmount, null, null, {}, providerType);
      } catch (error) {
        setState(API_ERROR);
        throw new Error(`Could not travel money API results: ${error}`);
      }
      if (!result.providers.length) {
        setState({
          status: STATUS.REJECTED,
          errorType: 'UNSUPPORTED_ROUTE'
        });
        return;
      }
      let transformed = null;
      try {
        transformed = transformResponse(result);
      } catch (error) {
        setState(API_ERROR);
        throw new Error(`Could not adapt API response: ${error}`);
      }
      setState({
        status: STATUS.RESOLVED,
        ...transformed
      });
    }
    if (shouldRunEffect.current) {
      fetchFn();
    } else {
      shouldRunEffect.current = true;
    }
  }, [sendAmount, sourceCurrency, targetCurrency]);
  return state;
};

function createClassNames(classNames) {
  return classNames.map(className => `${style[className]}`).join(' ');
}
const SEND_AMOUNT_CHANGE_DEBOUNCE_MS = 350;
const TravelMoney = ({
  initialSendAmount,
  initialSourceCurrency,
  initialTargetCurrency,
  initialData,
  ctaUrlSavings,
  ctaUrlNotCheapest,
  track: trackFn
}) => {
  const {
    locale
  } = useIntl();
  const [sendAmount, setSendAmount] = useState(initialSendAmount);
  const [sourceCurrency, setSourceCurrency] = useState(initialSourceCurrency);
  const [targetCurrency, setTargetCurrency] = useState(initialTargetCurrency);

  // A version of sendAmount that doesn't update immediately
  // Used to trigger fetch for new data when the user stops typing
  const debouncedSendAmount = useDebounce(sendAmount, SEND_AMOUNT_CHANGE_DEBOUNCE_MS);
  const {
    providers,
    midMarketRate,
    twSavings,
    status,
    errorType
  } = useTravelMoneyApi(debouncedSendAmount, sourceCurrency, targetCurrency, initialData);
  const track = event => trackFn({
    event,
    sendAmount,
    sourceCurrency,
    targetCurrency,
    isTransferWiseCheapest: twSavings > 0,
    savings: twSavings,
    providers: providers.map(p => p.alias)
  });
  useEffect(() => {
    if (status !== STATUS.RESOLVED) {
      return;
    }
    track('Travel Money - View Comparison');
  }, [providers]);
  const onRouteChange = event => {
    if (event.sourceCurrency) {
      setSourceCurrency(event.sourceCurrency);
    }
    if (event.targetCurrency) {
      setTargetCurrency(event.targetCurrency);
    }
  };
  return /*#__PURE__*/React.createElement("div", {
    className: createClassNames(['comparison-widget', 'comparison-widget--wide', 'travel-money'])
  }, /*#__PURE__*/React.createElement(TapestryCard, null, /*#__PURE__*/React.createElement("div", {
    className: style.card
  }, /*#__PURE__*/React.createElement("div", {
    className: style['card-header']
  }, /*#__PURE__*/React.createElement(Options, {
    sourceCurrency: sourceCurrency,
    targetCurrency: targetCurrency,
    onRouteChange: onRouteChange,
    amount: sendAmount,
    onAmountChange: setSendAmount
  })), status === STATUS.PENDING && /*#__PURE__*/React.createElement("div", {
    className: createClassNames(['d-flex', 'justify-content-center', 'p-t-5', 'p-b-5'])
  }, /*#__PURE__*/React.createElement(Loader, null)), status === STATUS.RESOLVED && /*#__PURE__*/React.createElement("div", {
    className: style['card-provider-table']
  }, /*#__PURE__*/React.createElement("table", {
    className: style['table-plain']
  }, /*#__PURE__*/React.createElement("caption", {
    className: style['table-plain__caption']
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "table-caption"
  })), /*#__PURE__*/React.createElement("thead", {
    className: createClassNames(['thead'])
  }, /*#__PURE__*/React.createElement("tr", {
    className: style['table-plain__row']
  }, /*#__PURE__*/React.createElement("th", {
    className: style['table-plain__th']
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "provider"
  })), /*#__PURE__*/React.createElement("th", {
    className: style['table-plain__th']
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "exchange-rate"
  })), /*#__PURE__*/React.createElement("th", {
    className: style['table-plain__th']
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "delivery-fee"
  })), /*#__PURE__*/React.createElement("th", {
    className: style['table-plain__th']
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "should-arrive"
  })), /*#__PURE__*/React.createElement("th", {
    className: createClassNames(['table-plain__th', 'featured--th'])
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
    id: "will-cost-you"
  }), /*#__PURE__*/React.createElement("span", {
    className: createClassNames(['table-plain__th--small'])
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
    values: {
      sendAmount: formatMoney(sendAmount, sourceCurrency, locale)
    },
    id: "when-buying"
  }))))), /*#__PURE__*/React.createElement("tbody", null, providers.map(provider => /*#__PURE__*/React.createElement(ProviderRow, _extends({
    key: provider.id,
    sourceCurrency: sourceCurrency,
    targetCurrency: targetCurrency,
    midMarketRate: midMarketRate,
    twSavings: twSavings,
    ctaUrlSavings: ctaUrlSavings,
    ctaUrlNotCheapest: ctaUrlNotCheapest,
    track: track
  }, provider)))))), status === STATUS.REJECTED && /*#__PURE__*/React.createElement(ErrorTemplate, {
    source: sourceCurrency,
    errorType: errorType,
    createClassNames: createClassNames,
    style: style
  }))), /*#__PURE__*/React.createElement(Disclaimer, {
    style: style,
    createClassNames: createClassNames
  }));
};
TravelMoney.propTypes = {
  initialSendAmount: PropTypes.number.isRequired,
  initialSourceCurrency: PropTypes.string.isRequired,
  initialTargetCurrency: PropTypes.string.isRequired,
  initialData: PropTypes.shape(),
  ctaUrlSavings: PropTypes.string,
  ctaUrlNotCheapest: PropTypes.string,
  track: PropTypes.func
};
TravelMoney.defaultProps = {
  initialData: null,
  ctaUrlSavings: '#savings',
  ctaUrlNotCheapest: '/gb/multi-currency-account',
  track: () => {}
};

export { TravelMoney as T };
//# sourceMappingURL=TravelMoney-a1cd5a84.js.map
