MediaWiki:Centralnotice-template-scervantes B1920 0701 enWW dsk p1 lg template bottom fixed with control black

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search

<style> /* Hide when editing */ .action-edit #centralNotice, .ve-activated #centralNotice {

   display: none !important;

}

/* Fix fixed position z-index for de.wikipedia */ .mw-body { z-index: auto; }

  1. siteNotice { z-index: 2; }

/* Border-Box */

.frb, .frb *, .frb *:before, .frb *:after {

   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;

}

/* Banner wide settings */

.frb input, .frb button {

   font-size: inherit;
   font-family: inherit;

}

.frb button {

   cursor: pointer;
   border: 0;
   background: transparent;
   padding: 0;

}

/* --- Main banner wrapper --- */

  1. siteNotice {
   z-index: 2;

}

.frb {

   display: none;
   box-shadow: rgba(0, 0, 0, 0.1) 0px -4px 25px 0px;
   background-color: #fff;
   color: #000;
   font-size: 16px;
   line-height: 1.1875; /*19px @16px*/
   font-family: system-ui, -apple-system,BlinkMacSystemFont, "Segoe UI", Roboto, "Oxygen-Sans", Ubuntu, Cantarell, Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
   text-align: left;
   font-weight: normal;
   font-style: normal; /* needed for uk.wikipedia */

}

.frb-in-article {

   transition: 0.4s ease-out all;
   transform: translateY(100%);
   position: fixed;
   bottom: 0;
   left: 0;
   width: 100%;
   padding: 16px 24px;

}

.frb-nag, .frb-fixed {

   position: fixed;
   left: 0;
   bottom: 0;
   width: 100%;
   padding: 16px;
   background-color: #fff;
   border-bottom: 1px solid #c8ccd1;
   box-shadow: rgba(0, 0, 0, 0.1) 0px -1px 15px 0px;

}

.frb-layout {

   position: relative;
   display: table;
   width: 100%;
   padding: 0;

}

/* --- Icon buttons --- */

.frb .frb-icon-btn {

   display: block;
   cursor: pointer;
   background-repeat: no-repeat;
   background-position: center;
   opacity: .55;

} .frb .frb-icon-btn:hover {

   opacity: 1;

}

.frb .frb-close {

   position: absolute;
   top: 0;
   right: 0;
   width: 18px;
   height: 18px;
   background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cg stroke='%23000' fill='none' stroke-linecap='round'%3E%3Cpath d='M1 1 l8 8 M9 1 l-8 8'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
   background-size: 12px 12px;

} body.rtl .frb .frb-close {

   right: auto;
   left: 0;

}

.frb .frb-back {

   position: absolute;
   top: 0;
   left: 0;
   width: 20px;
   height: 18px;
   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 16'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Cpath stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.778' d='M7.181 13.285L.753 7 7.181.715'%3E%3C/path%3E%3Crect fill='%23000' width='18.182' height='1.778' x='.818' y='6.111' rx='.889'%3E%3C/rect%3E%3C/g%3E%3C/svg%3E");
   background-size: 20px 13px;

}

/* --- RML Close button --- */

.close-rml {

   display: none;

} .frb-nag .close-rml {

   text-align: center;
   margin: 0 auto;
   padding: 2px;
   font-size: 11px;
   line-height: 1;
   text-transform: uppercase;
   cursor: pointer;
   color: #54595d;

} .frb-nag .close-rml:hover {

   color: #000;

}

.frb-rml-displayed .close-rml {

   display: block;

}

/* -------------- Message -------------- */

.frb-message {

   display: table-cell;
   width: auto;
   vertical-align: top;
   font-weight: normal;
   color: #FFF;
   font-size: 15px;
   line-height: 1.6; /*24px @15px*/

}

.frb-message-inner {

   position: relative;
   z-index: 1;
   background-color: #313131;	
   padding: 56px;	
   border-radius: .75em;

}


/* New responsive inner */ @media (max-width: 1300px) {

   .frb-message-inner {
       padding: 25px;
   }

}

@media (min-width: 1100px) {

   .frb--minimized .frb-message-inner {
       font-size: 16px;
   }

}

@media (min-width: 1400px) {

   .frb--minimized .frb-message-inner {
       padding: 16px 26px;
       font-size: inherit;
   }

}

@media (min-width: 1100px) {

   .frb-message {
       font-size: 18px;
   }
   html[lang="en"] .frb-message { font-size: 19px; }

}

@media (min-width: 1300px) {

   .frb-message { font-size: 20px; }
   html[lang="en"] .frb-message { font-size: 21px; }

}

@media (min-width: 1500px) {

   .frb-message { font-size: 21px; }
   html[lang="en"] .frb-message { font-size: 22px; }

}

@media (min-width: 1700px) {

   .frb-message { font-size: 22px; }
   html[lang="en"] .frb-message { font-size: 23px; }

}

.frb-message-icon {

   float: left;
   margin-top: 4px; /*in px since margin is consistent on all bp*/
   margin-right: 2px;
   height: 1em;
   width: 1em;

}

.frb-nag .frb-message-icon {

   margin-top: 3px;

}

@media all and (min-width: 1300px) {

   .frb-nag .frb-message-icon {
       margin-top: 4px;
   }

}

body.rtl .frb-message-icon {

   float: right;
   margin-left: 2px;

}

.frb-message p {

   margin: 0;

}

.frb-greeting {

   display: block;
   margin-bottom: 0.5em;

}

/*.frb-highlight {

   border-bottom: 4px solid #FEFD34;
   padding-bottom: 2px;

}*/

/* Nag styles */

.frb-nag {

   cursor: pointer;

}

.frb-nag .frb-message {

   vertical-align: middle;

}

.frb-nag .frb-message-inner {

   padding: 12px 18px;
   font-size: 14px;

}

@media (min-width: 1100px) {

   .frb-nag .frb-message-inner {
       font-size: 16px;
   }

}

@media (min-width: 1400px) {

   .frb-nag .frb-message-inner {
       padding: 16px 26px;
       font-size: inherit;
   }

}

.frb-nag .frb-form-wrapper {

   padding: 0 16px;
   width: 360px;
   overflow: visible;
   vertical-align: middle;

}

@media all and (min-width: 1200px) {

   .frb-nag .frb-form-wrapper {
       width: 440px;
   }

}

/*Triangle*/ .frb-nag .frb-message-inner:before {

   position: absolute;
   top: 50%;
   right: -20px;
   content: " ";
   margin: -10px 0 0 0;
   border: 10px solid transparent;
   border-left-color: #313131;
   pointer-events: none;

}

/* -------------- Form -------------- */

.frb-form-wrapper {

   vertical-align: top;
   display: table-cell;
   position: relative;
   width: 320px;
   height: 100%;
   vertical-align: top;
   background: #fff;

}

/*Triangle in article and fixed expanded state*/

.frb-triangle:before {

   content: " ";
   position: absolute;
   top: 50%;
   left: -25px;
   margin-top: -13px;
   content: " ";
   border: 10px solid transparent;
   border-left-color: #313131;
   pointer-events: none;

}

.frb-form-wrapper fieldset {

   border: 0;
   margin: 0 auto;
   padding: 0 0 6px 0;

}

.frb-form-wrapper .frb-amounts {

   padding: 0;
   margin-top: 8px;

}

.frb-form-wrapper legend, .frb-rml-form-legend {

   display: block;
   margin: 0 0 2px;
   padding: 0 4px;
   font-weight: normal;
   text-align: left;
   font-size: 14px;
   line-height: 1.2142857143; /*17px @14px*/
   color: #54595d;
   transition: all .25s ease-in-out;

}

.frb-form-wrapper {

   counter-reset: count;

} .frb-numbered {

   counter-increment: count;

} .frb-numbered::before {

   content: counter(count) ". ";

}

.frb-rml-form-legend {

   padding: 0 0 2px;

}

.frb-frequency legend, .frb-amounts legend {

   padding: 0 5px;

}

.frb-form-wrapper fieldset:first-of-type legend {

   padding-top: 0;

}

.frb-form-wrapper ul {

   display: table;
   table-layout: fixed;
   width: 100%;
   margin: 0;
   padding: 0;
   list-style: none;

}

.frb-form-wrapper li {

   display: table-cell;
   vertical-align: top;

}

.frb-form-wrapper .frb-methods li {

   padding: 4px !important;

}

  1. frb-form {
   padding-left: 25px;
   position: relative;
   overflow: hidden;

}

/* --- Common Button Styles --- */

/* Hide radio buttons */ .frb-form-wrapper .frb-methods input[type="radio"], .frb-form-wrapper .frb-optin input[type="radio"], .frb-form-wrapper input[type="checkbox"] {

   position: absolute;
   overflow: hidden;
   height: 1px;
   width: 1px;
   clip: rect(0 0 0 0);
   border: 0;
   margin: -1px;
   padding: 0;

}

.frb-btn {

   width: 100%;
   height: 48px;
   display: block;
   background-color: #f8f9fa;
   color: #000;
   font-size: 16px;
   line-height: 1.25; /*20px @16px*/
   padding: 13px 4px 15px 4px;
   border: 1px solid #9aa0a7;
   border-radius: 2px;
   outline: 0;
   text-align: center;
   cursor: pointer;
   font-family: inherit;
   font-weight: 500;
   -webkit-transition: all .25s ease-in-out;
   -moz-transition:    all .25s ease-in-out;
   transition:         all .25s ease-in-out;

} .frb-btn:hover {

   background-color: #fff;
   color: #444;
   border-color: #a2a9b1;

} .frb-btn:active {

   background-color: #d9d9d9;
   color: #000;
   border-color: #7d8389;

} .frb-form-wrapper input[type=radio]:checked + .frb-btn {

   background-color: #2a4b8d;
   color: #fff;
   border-color: #7d8389;

}

.frb-rml-link {

   display: block;
   font-size: 16px;
   line-height: 1.125; /*18px @16px*/
   color: #36c;
   margin: 16px auto 0;
   text-align: center;
   font-weight: bold;

}

.frb-rml-link:hover, .frb-rml-link:focus {

   color: #447ff5;

}

.frb-radio, .frb-radio-label {

   font-size: 16px;
   line-height: 1.375; /*22px @16px*/

}

.frb-radio {

   cursor: pointer;
   float: left;
   height: 14px;
   margin: 7px 5px 0px 7px;

}

body.rtl .frb-radio {

   float: right;

}

.frb-radio-label {

   display: block;
   padding: 3px 2px;
   cursor: pointer;
   white-space: nowrap;
   font-weight: bold;

}

body.rtl .frb-radio-label {

   text-align: right;

}

@media all and (min-width: 1900px) {

   .frb-radio-label {
       padding: 2px;
   }

}

.frb-frequency .frb-radio-label {

   font-size: 16px;
   line-height: 1.375; /*22px @16px*/

}

/* Focus styles */

/*Outline reset*/ .frb-form-wrapper input[type=radio]:focus, .frb-radio:focus + .frb-radio-label,

  1. frb-amt-other-input:focus,
  2. frb-rml-email:focus {
   outline: 0;

}

.frb button:focus, .frb-btn:focus, .frb-icon-btn:focus, .frb-btn-submit:focus, .frb-form-wrapper input[type=radio]:focus + .frb-btn, .frb-form-wrapper input[type=radio]:focus + #frb-amt-other-label,

  1. frb-amt-other-input:focus,

.frb-rml-displayed .frb-rml-form input:focus, .frb-nag-btn:focus,

  1. nag-rml-btn:focus {
   outline: 0;
   border-color: #36c !important;
   box-shadow: inset 0 0 0 2px #36c;

}

.frb button.frb-submit:focus {

   box-shadow: inset 0 0 0 1px #447ff5, inset 0 0 0 2px #fff;

}

.frb-rml-displayed .frb-rml-form input:focus, .frb-rml-displayed .frb-rml-form .frb-btn-submit:focus {

   position: relative;

}

.frb-radio:focus + .frb-radio-label, .frb-radio:hover + .frb-radio-label {

   color: #36c;
   text-decoration: underline;

}

  1. frb-amt-other-input:focus,
  2. frb-amt-other-input:hover {
   border-color: #36c !important;
   box-shadow: none;
   color: #36c;

}

.frb-form-wrapper input[type=radio]:focus + .frb-btn, .frb-form-wrapper input[type=radio]:focus + #frb-amt-other-label, .frb-form-wrapper input[type=radio]:checked + .frb-btn:focus, .frb-form-wrapper input[type=radio]:checked + #frb-amt-other-label:focus, .frb-form-wrapper .frb-btn-submit:focus,

  1. nag-yes-btn:focus {
   box-shadow: inset 0 0 0 1px #36c, inset 0 0 0 2px #fff;

}

.frb-btn img {

   padding: 0 4px;
   max-width: 100%;
   max-height: 20px; /*must equal font line height of frb-btn*/

}

.frb-methods .frb-btn {

   height: 64px;
   line-height: 1.125; /*18px @16px*/

}

.frb-methods svg {

   max-width: 100%;
   width: 64px;

}

/*Slight adaption for Paypal logo with USD string*/ .frb-methods .frb-logo-payments--paypal-usd {

   width: 85px;
   margin-bottom: -6px;

}

/* Credit card logos */

/* Countries with 4 card types */ .frb-cc-logo-wrapper {

   display: block;
   margin: 0 auto;
   max-width: 89px;

}

.frb-pm-cc svg {

   width: 26px;
   max-height: 15px; /*height needed for IE11*/
   margin: 2px;
   display: none;

}

/* Countries with 3 card types */ .frb-cctypes-vma .frb-cc-logo-wrapper {

   width: 100%;

} .frb-cctypes-vma svg {

   width: 28%;
   max-height: 34px;

}

.frb-cc-logo-wrapper {

   display: none;
   font-size: 0; /* Remove spacing between icons */

}

.frb-cctypes-vmad .frb-cc-logo-wrapper, .frb-cctypes-vmaj .frb-cc-logo-wrapper, .frb-cctypes-vma .frb-cc-logo-wrapper, .frb-cctypes-vm .frb-cc-logo-wrapper {

   display: block;

}

.frb-cctypes-vmad .frb-pm-cc-label, .frb-cctypes-vmaj .frb-pm-cc-label, .frb-cctypes-vma .frb-pm-cc-label, .frb-cctypes-vm .frb-pm-cc-label {

   display: none;

}

.frb-cctypes-vmad .frb-cc-logo-visa, .frb-cctypes-vmad .frb-cc-logo-mastercard, .frb-cctypes-vmad .frb-cc-logo-amex, .frb-cctypes-vmad .frb-cc-logo-discover,

.frb-cctypes-vmaj .frb-cc-logo-visa, .frb-cctypes-vmaj .frb-cc-logo-mastercard, .frb-cctypes-vmaj .frb-cc-logo-amex, .frb-cctypes-vmaj .frb-cc-logo-jcb,

.frb-cctypes-vma .frb-cc-logo-visa, .frb-cctypes-vma .frb-cc-logo-mastercard, .frb-cctypes-vma .frb-cc-logo-amex,

.frb-cctypes-vm .frb-cc-logo-visa, .frb-cctypes-vm .frb-cc-logo-mastercard {

   display: inline-block;

}

/* Blue text buttons */ .frb-btn.frb-btn-btxt {

   color: #36c;

} .frb-btn.frb-btn-btxt:active {

   color: #2a4b8d;

}

/* Submit/Continue buttons (blue background) */ .frb .frb-btn-submit {

   width: 100%;
   display: block;
   margin-top: 6px;
   padding: 8px;
   color: #fff;
   background-color: #36c;
   border-color: #36c;
   cursor: pointer;
   border: 0;
   border-radius: 2px;
   font-size: 16px;
   font-weight: bold;
   -webkit-transition: all .25s ease-in-out;
   -moz-transition:    all .25s ease-in-out;
   transition:         all .25s ease-in-out;

} .frb .frb-btn-submit:hover {

   background-color: #447ff5;
   border-color: #447ff5;

} .frb .frb-btn-submit:active {

   background-color: #2a4b8d;
   border-color: #2a4b8d;
   box-shadow: none;

}

/* --- Other Amount --- */

  1. frb-amt-other-input::-webkit-input-placeholder {
   color: #000;

}

  1. frb-amt-other-input::-moz-placeholder {
   opacity: 1;
   color: #000;

}

  1. frb-amt-other-input:-ms-input-placeholder {
   color: #000;

}

  1. frb-amt-other-input:-moz-placeholder {
   opacity: 1;
   color: #000;

}

  1. frb-amt-other-input:focus::-webkit-input-placeholder {
   color: #666;

}

  1. frb-amt-other-input:focus::-moz-placeholder {
   opacity: 1;
   color: #666;

}

  1. frb-amt-other-input:focus:-ms-input-placeholder {
   color: #666;

}

  1. frb-amt-other-input:focus:-moz-placeholder {
   opacity: 1;
   color: #666;

}

  1. frb-amt-other-input:hover::-webkit-input-placeholder {
   color: #36c;

}

  1. frb-amt-other-input:hover::-moz-placeholder {
   opacity: 1;
   color: #36c;

}

  1. frb-amt-other-input:hover:-ms-input-placeholder {
   color: #36c;

}

  1. frb-amt-other-input:hover:-moz-placeholder {
   opacity: 1;
   color: #36c;

}

.frb-amt-other-label {

   display: none;

}

.frb-amt-other {

   width: 66.666666%;

}

  1. frb-amt-other-input {
   width: calc(100% - 33px);
   border: none;
   border-bottom: 1px solid #000;
   color: #000;
   font-size: 16px;
   font-weight: normal;
   padding: 5px 2px 7px 0;
   border-radius: 0;
   direction: ltr;
   text-align: left;
   font-family: inherit;
   font-weight: bold;

}

@media all and (min-width: 1280px) {

   .frb-amt-other #frb-amt-other-input {
       margin: 0;
   }

}

body.rtl #frb-amt-other-input {

   text-align: right;

}

/* --- Transaction fees options --- */

/*Checkbox styles*/ .frb-checkbox {

   cursor: pointer;
   float: left;
   width: 16px;
   height: 16px;
   padding: 0;
   margin: 13px 4px 0 6px;
   display: inline-block;

}

.frb-checkbox-label::before {

   left: 0;
   display: inline-block;
   content: "";
   height: 17px;
   width: 17px;
   border-radius: 2px;
   border: 1px solid #a2a9b1;
   background-color: #f8f9fa;

}

.frb-checkbox-label::after {

   content: "";
   top: 8px;
   left: 4px;
   display: inline-block;
   height: 5px;
   width: 9px;
   border-left: 2px solid;
   border-bottom: 2px solid;
   transform: rotate(-45deg);
   border-color: #fff;

}

.frb-checkbox-label {

   position: relative;
   display: inline-block;
   margin: 13px 0 0 5px;
   width: calc(100% - 10px);
   padding-left: 26px;
   padding-top: 2px;
   cursor: pointer;
   font-size: 14px;
   line-height: 1.3571428571; /*19px @14px*/
   color: #000;

}

.frb-checkbox-label::before, .frb-checkbox-label::after {

   position: absolute;

} /*Outer-box*/ .frb-checkbox-label::before {

   top: 3px;

} /*Checkmark*/ .frb-checkbox-label::after {

   left: 4px;
   top: 8px;

}

body.rtl .frb-checkbox {

   float: right;

}

.frb-ptf-total {

   font-weight: bold;

}

/*Hide the checkmark by default*/ .frb-checkbox + .frb-checkbox-label::after {

   content: none;

} /*Unhide the checkmark on the checked state*/ .frb-checkbox:checked + .frb-checkbox-label::after {

   content: "";

}

.frb-checkbox:checked + .frb-checkbox-label:before {

   background-color: #36c;
   border-color: #36c;

}

/*Focus styles*/ /*Unchecked*/ .frb-checkbox:focus + .frb-checkbox-label::before {

   border-color: #36c;
   box-shadow: inset 0 0 0 1px #36c;

}

/*Checked*/ .frb-checkbox:focus:checked + .frb-checkbox-label::before {

   box-shadow: inset 0 0 0 1px #36c, inset 0 0 0 2px #fff;

}

/*Hover*/ .frb-checkbox:hover + .frb-checkbox-label::before {

   background-color: #eaecf0;

}

.frb-checkbox:checked:hover + .frb-checkbox-label:before {

   background-color: #447ff5;
   border-color: #447ff5;

}

/* --- Email opt-in --- */

.frb-form-wrapper .frb-optin {

   margin-bottom: 3px;

}

.frb-form-wrapper .frb-optin legend {

   margin-bottom: 8px;
   display: inline-block;

}

/* .frb-form-wrapper .frb-optin li {

   display: block;
   clear: both;

} */

.frb-optin .frb-radio {

   margin: 6px 5px 0px 9px;

}

.frb-optin .frb-radio-label {

   float: right;
   width: calc(100% - 30px);
   white-space: normal;
   font-size: 14px;
   line-height: 1.3571428571; /*19px @14px*/
   font-weight: bold;

}

.frb-optin .frb-radio-label:hover, .frb-optin .frb-radio:hover + .frb-radio-label {

   text-decoration: none;

}

.frb-optin-prompt {

   display: none;
   margin: 8px;
   padding: 4px 8px;
   border: 2px solid #900;
   border-radius: 2px;
   font-size: 14px;
   line-height: 1.2857142857; /*18px @14px*/
   font-weight: normal;

}

.frb-optin-prompt.is-positive {

   border-color: #14866d;
   font-weight: bold;

}

.frb-optin-prompt__yes {

   display: none;

}

.frb-optin-prompt__no {

   display: block;

}

.frb-optin-prompt.is-positive .frb-optin-prompt__yes {

   display: block;

}

.frb-optin-prompt.is-positive .frb-optin-prompt__no {

   display: none;

}

.frb-optin-smallprint {

   padding: 8px 8px 0 8px;

}

/* --- Payment method Buttons --- */

/* Hide methods which aren't monthly capable when monthly option is selected */ .form-monthly .no-monthly {

   opacity: 0.4 !important;

}

.form-monthly .no-monthly .frb-label {

   cursor: default;

}

.frb-form-wrapper .frb-methods {

   margin-top: 12px;
   padding-bottom: 0;

}

@media all and (min-width: 1100px) {

   .frb-form-wrapper .frb-methods {
       margin-top: 15px;
   }

}

@media all and (min-width: 1700px) {

   .frb-form-wrapper .frb-methods {
       margin-top: 8px;
   }

}

/* Only where there are 4 methods, display 2x2 */ .frb-methods ul li:first-child:nth-last-child(4), .frb-methods ul li:first-child:nth-last-child(4) ~ li {

   float: left;
   width: 50%;

} .frb-methods ul li:first-child:nth-last-child(4) .frb-btn, .frb-methods ul li:first-child:nth-last-child(4) ~ li .frb-btn {

   height: 48px;
   padding: 13px 4px 15px 4px;

}

/* --- Footer / Small Print --- */ .frb-smallprint {

   font-size: 12px;
   line-height: 1.5; /*18px @12px*/
   color: #54595d;
   font-weight: normal;

} .frb-smallprint a {

   color: #54595d;
   text-decoration: underline;

} .frb-smallprint a:hover {

   color: #000;

}

.frb-footer {

   padding-top: 8px;

}

/* --- Show and Hiding (Minimize and Maximize) --- */

.frb-nag-btns {

   display: flex;

}

.frb.frb-rml-displayed .frb-nag-btns {

   display: none;

}

button.frb-nag-btn {

   flex: 1 0 0;
   margin: 0 8px;
   padding: 6px;
   min-height: 48px;
   background-color: white;
   border: 1px solid #9aa0a7;
   border-radius: 2px;
   outline: 0;
   color: #000;
   cursor: pointer;
   font-weight: normal;
   font-size: 13px;
   line-height: 1.3;
   transition: all 100ms;

}

@media all and (min-width: 1100px) {

   button.frb-nag-btn {
       font-size: 14px;
   }

}

@media all and (min-width: 1200px) {

   button.frb-nag-btn {
       font-size: 16px;
   }

}

button.frb-nag-btn:hover {

   -moz-transform: scale(1.043478);
   -ms-transform: scale(1.043478);
   -webkit-transform: scale(1.043478);
   transform: scale(1.043478);

}

  1. nag-yes-btn {
   font-weight: bold;
   background-color: #36c;
   border: 1px solid #36c;
   color: white;

}

/* --- Maybe later --- */

.frb-rml-disabled .frb-rml, .frb-rml-disabled .frb-rml-link, .frb-rml-disabled #nag-rml-btn {

   display: none;

}

.frb-rml-form {

   display: none;
   position: relative;
   margin-top: 12px;
   margin-left: 12px;
   width: calc(100% - 12px);
   padding: 16px;
   text-align: left;
   background: #fff;
   border: 1px solid #c8ccd1;
   border-radius: 2px;
   box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.15);
   z-index: 10;

}

.frb-rml-form:after, .frb-rml-form:before {

   bottom: 100%;
   left: 50%;
   border: solid transparent;
   content: " ";
   height: 0;
   width: 0;
   position: absolute;
   pointer-events: none;

}

.frb-rml-form:after {

   border-bottom-color: #fff;
   border-width: 10px;
   margin-left: -10px;

}

.frb-rml-form:before {

   border-bottom-color: #c8ccd1;
   border-width: 11px;
   margin-left: -11px;

}

.frb-rml-form input {

   width: 100%;
   padding: 6px 8px 7px;
   border: 1px solid #a2a9b1;
   border-radius: 2px;
   color: #000;
   font-size: 14px;

}

  1. frb-rml-email.frb-haserror {
   border-color: #d33 !important;
   box-shadow: inset 0 0 0 1px #d33 !important;

}

.frb-error-invalidemail {

   margin: 2px 0 0 !important;

}

.frb-rml-ty {

   text-align: center;
   margin: 16px 16px 0 25px;

}

.frb-rml-displayed .frb-rml-form {

   position: relative;
   z-index: 10;
   display: table !important;
   margin: -4px auto 0;
   padding: 0 12px;
   width: 100%;
   max-width: 340px;
   background: transparent;
   border: none;
   box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);

}

.frb-rml-displayed .frb-rml-form:after, .frb-rml-displayed .frb-rml-form:before {

   display: none !important;

}

.frb-rml-displayed .frb-rml {

   display: block !important;
   margin-top: 0;

}

.frb-rml-displayed .frb-rml-form legend {

   font-size: 12px;
   line-height: 1; /*12px @12px*/
   padding-bottom: 4px;

}

@media all and (min-width: 1200px) {

   .frb-rml-displayed .frb-rml-form legend {
       font-size: 14px;
       line-height: 1.2142857143; /*17px @14px*/
   }

}

.frb-rml-displayed .frb-rml-form input {

   display: inline;
   vertical-align: middle;
   width: 200px;
   height: 32px;
   padding: 7px 8px;
   margin: 0;
   border: 1px solid #a2a9b1;
   border-radius: 2px;
   color: #000;
   direction: ltr;
   line-height: 1;

}

.frb-rml-displayed .frb-rml-form .frb-btn-submit {

   display: inline;
   vertical-align: middle;
   width: auto;
   height: 32px;
   margin-top: 0;
   margin-left: 2px;
   line-height: 1;
   padding: 9px 14px;
   font-size: 14px;
   border-radius: 2px;

}

.frb-prevent-page-jump {

   display: none;

}

/* -- Submit/"Donate now" button -- */

.frb .frb-submit {

   height: 52px;
   display: inline-block;
   cursor: default;
   margin: 4px 5px 0;
   padding: 3px 6px 5px;
   width: calc(100% - 9px);
   background-color: #f8f9fa;
   border: 1px solid #a2a9b1;
   border-radius: 2px;
   color: #36c;
   font-weight: bold;
   transition: background-color 0.5s ease;
   opacity: .5;

}

.frb .frb-submit.active {

   background-color: #36c;
   border-color: #36c;
   color: #fff;
   cursor: pointer;
   opacity: 1;

}

.frb .frb-submit.active:hover {

   background-color: #447ff5;
   border-color: #447ff5;

}

.frb-submit-amount {

   display: none;

} .frb-submit-label-monthly {

   display: none;

} .frb-submit-label-now {

   display: inline;

} .form-monthly .frb-submit-label-monthly {

   display: inline;

} .form-monthly .frb-submit-label-now {

   display: none;

} .frb-icon-lock {

   fill: #fff;
   width: 14px;
   height: 14px;

}

.frb-payment-options {

   display: table;
   table-layout: fixed;
   width: 100%;

}

.frb-payment-options .frb-button {

   width: 100%;

}

/* For 4 payment options, 2 rows of 2 */ .frb-payment-options .frb-button:first-child:nth-last-child(4), .frb-payment-options .frb-button:first-child:nth-last-child(4) ~ .frb-button {

   float: left;
   width: 50%;

}

.frb-methods .frb-button, .frb-optin .frb-button {

   display: table-cell;
   padding: 5px;
   float: none;
   vertical-align: top;

}

.frb-button-table {

   display: table;
   width: 100%;

}

.frb-label {

   display: table-cell; /* To vertical align content */
   vertical-align: middle;
   width: 100%;
   height: 52px;
   color: #36c;
   background-color: #f8f9fa;
   border-radius: 2px;
   border: 1px solid #a2a9b1;
   text-align: center;
   transition: background-color 0.5s ease;
   cursor: pointer;
   transition: all 0.5s ease;
   padding: 0 10px;

}

.frb-label:hover, .frb-rml-email:hover {

   background-color: #eaf3ff;

}

.form-monthly .no-monthly .frb-label:hover {

   background-color: #f8f9fa;

}

.frb-radio:checked + .frb-label {

   background-color: #2a4b8d;
   border-color: #2a4b8d;
   color: #fff;
   font-weight: bold;

}

.frb-radio:focus + .frb-label,

  1. frb-rml-email:focus {
   box-shadow: inset 0 0 0 1px #36c;
   border-color: #36c;

}

.frb-radio:focus:checked + .frb-label {

   box-shadow: inset 0 0 0 1px #2a4b8d, inset 0 0 0 2px #fff;

}

.frb-radio:checked + .frb-label .frb-logo-payments--paypal path, .frb-radio:checked + .frb-label .frb-logo-payments--paypal-usd path, .frb-radio:checked + .frb-label .frb-logo-payments--amazon path {

   fill: #fff;

}

/* Error messages */ .frb-error {

   display: none;
   margin: 5px 0 5px 5px;
   font-size: 14px;
   font-weight: 500;
   line-height: 1.3;
   color: #d33;

}

.frb-form-wrapper fieldset.frb-haserror .error-highlight {

   color: #d33;
   font-weight: bold;

}

/* STEP 2 UPSELL*/

.frb-upsell, .frb-step-monthly-diff-amt .frb-amt-monthly {

   width: calc(100% + 8px) !important;
   transition: background-color 0.5s ease;
   padding: 10px 4px;
   text-align: center;

}

.frb-step-monthly-diff-amt .frb-amt-monthly {

   display: block;
   padding: 0 4px 10px 4px;

}

.frb-upsell-cta, .frb-upsell-ty {

   font-size: 17px;
   line-height: 1.3;
   font-weight: bold;
   text-align: center;

}

.frb-upsell-color, .frb-step-monthly-diff-amt .frb-amt-monthly label {

   display: block;
   font-size: 15px;
   line-height: 1.3;
   font-weight: normal;
   padding: 0 5%;
   margin: .5em 0;

}

.frb .frb-monthly-diff-amt-link {

   font-size: 15px;
   line-height: 1.3;
   color: #36c;
   margin: 8px 2px;
   padding: 12px 10%;
   text-align: center;
   cursor: pointer;
   font-weight: bold;

}

  1. frb-amt-monthly-other-input {
   position: relative;
   text-align: center;
   font-size: 18px;

}

/* steps */

  1. frb-form .frb-step {
   position: absolute;
   top: 0;
   width: 280px;
   padding-top: 24px;
   margin-left: 320px;
   visibility: hidden; /* Prevent tabbing to inputs */

}

  1. frb-form .frb-step-1 {
   position: relative;
   margin-left: 0;
   visibility: visible;

}

.frb.show-banner {

   transform: translateY(0);

}


/* Module: Viewport height */ @media (max-width: 1400px) and (max-height: 800px) {

   .frb-message-inner {
       padding: 35px;
   }
    html[lang="en"] .frb-message,
   .frb-message {
       font-size: 17px;
   }
   .frb-form .frb-methods {
       margin-top: 5px;
   }
   .frb-form-wrapper legend, .frb-rml-form-legend {
       font-size: 13px;
   }
   .frb-frequency .frb-radio-label {
       font-size: 14px;
   }
   .frb-radio, .frb-radio-label {
       font-size: 14px;
   }
   .frb-label {
       height: 40px;
   }
   #frb-amt-other-input {
       font-size: 14px;
   }
   .frb-checkbox-label {
       font-size: 14px;
   }
   .frb .frb-submit {
       height: 40px;
       font-size: 15px;
       line-height: 16px;
   }
   .frb-footer {
       font-size: 12px;
   }

}

@media (max-width: 1266px) and (max-height: 800px) {

   .frb-message-inner {
       padding: 30px;
   }
   

} @media (max-width: 1255px) and (max-height: 800px) {

   html[lang="en"] .frb-message,
   .frb-message {
       font-size: 16px;
   }

}

@media (max-width: 1167px) and (max-height: 800px) {

   html[lang="en"] .frb-message,
   .frb-message {
       font-size: 15px;
   }
   .frb-footer {
       font-size: 11px;
   }

}

@media (max-width: 1136px) and (max-height: 800px) {

   .frb-message-inner {
       padding: 28px;
   }

}

@media (max-width: 1062px) and (max-height: 800px) {

   .frb-message-inner {
       padding: 25px;
   }

}

@media (max-width: 1052px) and (max-height: 800px) {

   html[lang="en"] .frb-message,
   .frb-message {
       font-size: 14px;
   }

}

/* Module: Viewport height */ </style>

<script> var frb = frb || {};

frb.show = function() {

   $('.frb-in-article').css('display', 'block');
   setTimeout(function() {
       $('.frb-in-article').addClass('show-banner');
   }, 100);

};

frb.hide = function() {

   /* Hide the banner, and remove related event handlers */
   /* Don't set a cookie: this is a large banner and only shown on first view anyway */
   $('.frb').hide();
   $('.frb-prevent-page-jump').hide();
   $(window).off('.frb');
   $('#toc a').off('.frb');

};

/**

   * Show the given step
   * Literally just move into place and make it visible,
   * there may be other stuff needed to prepare it.
   *
   * @param  {string} step - name of step
   */

frb.showStep = function( step ) {

   var w = 320, // width in px
       d = 300  // animation duration in ms
   function moveLeft( $el ) {
       $el.animate({ 'margin-left': -w }, d, function() {
           $(this).css({ 'visibility': 'hidden' });
       })
   }
   function moveRight( $el ) {
       $el.animate({ 'margin-left': w }, d, function() {
           $(this).css({ 'visibility': 'hidden' });
       })
   }
   function moveVisible( $el ) {
       $el.css({ 'visibility': 'visible' }).animate({ 'margin-left': 0 }, d);
   }
   if ( step === '1' ) {
       moveVisible( $('.frb-step-1') );
           moveRight( $('.frb-step-optin, .frb-step-upsell, .frb-step-monthly-diff-amt') )
   } else if ( step === 'optin' ) {
           moveLeft( $('.frb-step-1') );
       moveVisible( $('.frb-step-optin') );
           moveRight( $('.frb-step-upsell, .frb-step-monthly-diff-amt') );
   } else if ( step === 'upsell' ) {
           moveLeft( $('.frb-step-1, .frb-step-optin') );
       moveVisible( $('.frb-step-upsell') );
           moveRight( $('.frb-step-monthly-diff-amt') );
   } else if ( step === 'monthly-diff-amt' ) {
           moveLeft( $('.frb-step-1, .frb-step-optin, .frb-step-upsell') );
       moveVisible( $('.frb-step-monthly-diff-amt') );
   } else {
       console.log( 'Invalid step: ' + step );
   }

};

frb.toggleMonthly = function( monthly ) {

   if( monthly.type === 'checkbox' ){
       monthly = monthly.checked;
   }
   if ( monthly ) {
       $('#frb-frequency-monthly').prop("checked", true);
       $('#frb-monthly-checkbox').prop("checked", true);
       $('#frb-form').addClass('form-monthly');
       $('.no-monthly input[type=radio]').attr('disabled', true);
       $('.no-monthly').prop('disabled', false);
       $('#frb-form').addClass('form-monthly');
       if( $( '.form-monthly .no-monthly input[type=radio]' ).is(':checked') ) {
           $('.form-monthly .no-monthly input[type=radio]').removeAttr('checked');
           frb.setMethod({});
       }
       $('.frb-cta-label-monthly').show();
   } else {
       $('#frb-frequency-onetime').prop("checked", true);
       $('#frb-monthly-checkbox').prop("checked", false);
       $('#frb-form').removeClass('form-monthly');
       $('.no-monthly input[type=radio]').attr('disabled', false);
       $('.frb-cta-label-monthly').hide();
   }

};

frb.rml = {

   post: function() {
       /* Create the iframe for the form and use it as the form's target */
       var frameName = 'remindFrame';
       var $form = $('#frb-rml-form');
       if ( $("iframe[name=" + frameName + "]").length === 0 ) {
           var $iframe = $('<iframe style="display: none;" name="' + frameName + '"></iframe>');
           $form.attr('target', $iframe.attr('name'));
           $form.after($iframe);
       }
       $form[0].submit();
   },
   getCurrentDate: function() {
       /* Get current date in correct format for Silverpop */
       var today = new Date();
       var dd = today.getDate();
       var mm = today.getMonth()+1; // January is 0!
       var yyyy = today.getFullYear();
       if( dd < 10 ) {
           dd = '0' + dd;
       }
       if( mm < 10 ) {
           mm = '0' + mm;
       }
       return mm+'/'+dd+'/'+yyyy;
   },
   init: function() {
       /* Prep the reminder form */
       var form = document.getElementById('frb-rml-form');
       form.rml_country.value    = mw.centralNotice.data.country;
       form.rml_language.value   = mw.centralNotice.data.uselang;
       form.rml_submitDate.value = frb.rml.getCurrentDate();
       form.rml_segment.value    = Math.floor((Math.random() * 100) + 1);
       $('.frb-rml-link').click(function() {
           form.rml_source.value = '{{{banner}}}';
           $('.frb-rml-form').toggle();
           $('#frb-rml-email').focus();
           return false;
       });
       $('#frb-rml-submit').click(function() {
           if ( mw.util.validateEmail( form.Email.value ) ) {
               frb.rml.post();
               $('.frb-rml-form, .frb-rml-link').attr('style','display:none !important');
               $('.frb-rml-ty').show();
               window.setTimeout( function() {
                   frb.hide();
               }, 2500);
               mw.centralNotice.internal.hide.setHideWithCloseButtonCookies(); // Hide future banners for 7 days
               return false;
           } else {
               $('#frb-rml-email').addClass('frb-haserror').focus();
               $('.frb-error-invalidemail').show();
               return false;
           }
       });
   }

};

/* jshint maxerr: 600 */ frb.amounts = frb.amounts || {};

// Hard minimum amounts that can be given // From https://github.com/wikimedia/wikimedia-fundraising-SmashPig/blob/master/PaymentData/ReferenceData/CurrencyRates.php frb.amounts.minimums = {

   'USD' : 1,
   'CAD' : 1.33,
   'AUD' : 1.51,
   'NZD' : 1.58,
   'GBP' : 0.78,
   'EUR' : 0.93,
   'DKK' : 6.42,
   'HUF' : 282,
   'ILS' : 3.61,
   'INR' : 108,
   'JPY' : 112,
   'MYR' : 4.15,
   'NOK' : 8.4,
   'PLN' : 3.72,
   'RON' : 3.99,
   'SEK' : 9.08,
   'UAH' : 28,
   'ZAR' : 15,
   // Note Latam Astropay currencies have higher minimums - 1.50 USD
   'BRL' : 6.23,
   'ARS' : 58.5,
   'CLP' : 1035,
   'COP' : 4640,
   'MXN' : 28.5,
   'PEN' : 3.3,
   'UYU' : 57,
   'CHF' : 1

};

frb.amounts.options7 = {

   // Big English
   'USD' : [2.75, 5, 10, 20, 30, 50, 100],
   'CAD' : [2.75, 5, 10, 20, 30, 50, 100],
   'AUD' : [2.75, 5, 10, 20, 30, 50, 100],
   'NZD' : [2.75, 5, 10, 20, 30, 50, 100],
   'GBP' : [2, 5, 10, 20, 30, 50, 100],
   'EUR' : {
       'default' : [2, 5, 10, 20, 30, 50, 100]
   },
   // Others
   'DKK' : [20, 100, 150, 200, 300, 500, 1000],
   'HUF' : [500, 1000, 2000, 4000, 5000, 7000, 10000],
   'ILS' : [10, 50, 100, 200, 300, 500, 1000],
   'INR' : [150, 300, 500, 1000, 1500, 3000, 5000],
   'JPY' : [300, 1000, 1500, 2000, 3000, 5000, 10000],
   'MYR' : [10, 30, 50, 100, 200, 300, 500],
   'NOK' : [20, 100, 150, 200, 500, 750, 1000],
   'PLN' : [10, 20, 50, 100, 200, 300, 500],
   'RON' : [10, 50, 75, 100, 200, 300, 500],
   'SEK' : [30, 50, 100, 200, 300, 500, 1000],
   'UAH' : [50, 75, 150, 300, 500, 750, 1000],
   'ZAR' : [30, 50, 100, 200, 300, 500, 1000],
   // Latin America
   'BRL' : [10, 20, 30, 50, 100, 250, 500],
   'ARS' : [60, 100, 200, 400, 1000, 1500, 2000],
   'CLP' : [1500, 2500, 5000, 10000, 15000, 25000, 50000],
   'COP' : [7000, 10000, 20000, 50000, 100000, 150000, 200000],
   'MXN' : [35, 50, 100, 200, 500, 750, 1000],
   'PEN' : [10, 30, 50, 150, 200, 275, 700],
   'UYU' : [70, 100, 200, 400, 1000, 1500, 2000],
   'CHF' : [3, 5, 10, 25, 50, 100, 200]

};

// 5 amount options. Used e.g. on mobile // Usual formula: take 1st, 3rd, 4th, 6th and 7th from asks7 */ frb.amounts.options5 = {

   // Big English
   'USD' : [2.75, 16.36, 20, 50, 100],
   'CAD' : [2.75, 15, 20, 50, 100],
   'AUD' : [2.75, 15, 20, 50, 100],
   'NZD' : [2.75, 15, 20, 50, 100],
   'GBP' : [2, 10, 20, 50, 100],
   'EUR' : [2, 10, 20, 50, 100],
   // Others
   'DKK' : [20, 100, 200, 500, 1000],
   'HUF' : [500, 2500, 4000, 7000, 10000],
   'ILS' : [10, 50, 200, 600, 1000],
   'INR' : [150, 500, 1000, 3000, 5000],
   'JPY' : [300, 1500, 2000, 5000, 10000],
   'MYR' : [10, 50, 100, 300, 500],
   'NOK' : [20, 100, 200, 500, 1000],
   'PLN' : [10, 50, 100, 300, 500],
   'RON' : [10, 50, 100, 200, 1000],
   'SEK' : [30, 100, 200, 500, 1000],
   'UAH' : [50, 150, 300, 750, 1000],
   'ZAR' : [30, 100, 200, 500, 1000],
   // Latin America
   'BRL' : [10, 30, 50, 100, 250],
   'ARS' : [60, 200, 400, 1000, 2000],
   'CLP' : [1500, 5000, 10000, 25000, 50000],
   'COP' : [7000, 20000, 50000, 150000, 200000],
   'MXN' : [35, 100, 200, 750, 1000],
   'PEN' : [10, 50, 150, 300, 700],
   'UYU' : [70, 200, 400, 1500, 2000],
   'CHF' : [3, 10, 25, 50, 100]

};

// "Average" donation frb.amounts.averages = {

   'USD' : 16.36,
   'CAD' : 15,
   'AUD' : 15,
   'NZD' : 15,
   'GBP' : 10,
   'EUR' : 10,
   // Others
   'DKK' : 100,
   'HUF' : 2500,
   'ILS' : 50,
   'INR' : 1000,
   'JPY' : 1500,
   'MYR' : 50,
   'NOK' : 100,
   'PLN' : 50,
   'RON' : 50,
   'SEK' : 100,
   'UAH' : 150,
   'ZAR' : 150,
   // Latin America
   'BRL' : 25,
   'ARS' : 200,
   'CLP' : 8000,
   'COP' : 30000,
   'MXN' : 150,
   'PEN' : 40,
   'UYU' : 300,
   'CHF' : 15

};

// 'If everyone gave X'. Mostly the same as first asks option. frb.amounts.ifEveryone = {

   // Big English
   'USD' : 2.75,
   'CAD' : 2.75,
   'AUD' : 2.75,
   'NZD' : 2.75,
   'GBP' : 2,
   'EUR' : {
       'default' : 2
   },
   // Others
   'DKK' : 20,
   'HUF' : 500,
   'ILS' : 10,
   'INR' : 150,
   'JPY' : 300,
   'MYR' : 10,
   'NOK' : 20,
   'PLN' : 10,
   'RON' : 10,
   'SEK' : 30,
   'UAH' : 50,
   'ZAR' : 30,
   // Latin America
   'BRL' : 10,
   'ARS' : 60,
   'CLP' : 1500,
   'COP' : 7000,
   'MXN' : 35,
   'PEN' : 10,
   'UYU' : 70,
   'CHF' : 3

};

// Minimum fee/PTF amounts. Default is 0.35. // Updated 2018-07-05 based on Ppena's feedback // Updated 2019-05-21 to approx 0.35 USD equivalent frb.amounts.feeMinimums = {

   'DKK' : 2,
   'HUF' : 100,
   'ILS' : 1.2,
   'INR' : 25,
   'JPY' : 35,
   'MYR' : 1,
   'NOK' : 3,
   'PLN' : 1.35,
   'RON' : 1.5,
   'SEK' : 3,
   'UAH' : 10,
   'ZAR' : 5,
   // Latin America
   'BRL' : 1.5,
   'ARS' : 15,
   'CLP' : 250,
   'COP' : 1000,
   'MXN' : 6,
   'PEN' : 1.2,
   'UYU' : 12

};

// If one-time amount <= left amount, suggest right amount for monthly frb.amounts.monthlySuggest = {

   'USD' : [ // also CAD, AUD, NZD
       [ 2.74, 0 ],
       [ 9, 1.75 ],
       [ 12, 2 ],
       [ 15, 2.5 ],
       [ 18, 3 ],
       [ 21, 3.5 ],
       [ 24, 4 ],
       [ 27, 4.5 ],
       [ 30, 5 ],
       [ 33, 5.5 ],
       [ 36, 6 ],
       [ 39, 6.5 ],
       [ 42, 7 ],
       [ 45, 7.5 ],
       [ 48, 8 ],
       [ 51, 8.5 ],
       [ 54, 9 ],
       [ 57, 9.5 ],
       [ 60, 10 ],
       [ 63, 10.5 ],
       [ 66, 11 ],
       [ 69, 11.5 ],
       [ 72, 12 ],
       [ 75, 12.5 ],
       [ 102, 17 ],
       [ 250, 25 ],
       [ 480, 50 ],
       [ Infinity, 0 ]
   ],
   'GBP' : [ // also EUR
       [ 1.99, 0 ],
       [ 9, 1.75 ],
       [ 12, 2 ],
       [ 15, 2.5 ],
       [ 18, 3 ],
       [ 21, 3.5 ],
       [ 24, 4 ],
       [ 27, 4.5 ],
       [ 30, 5 ],
       [ 33, 5.5 ],
       [ 36, 6 ],
       [ 39, 6.5 ],
       [ 42, 7 ],
       [ 45, 7.5 ],
       [ 48, 8 ],
       [ 51, 8.5 ],
       [ 54, 9 ],
       [ 57, 9.5 ],
       [ 60, 10 ],
       [ 63, 10.5 ],
       [ 66, 11 ],
       [ 69, 11.5 ],
       [ 72, 12 ],
       [ 75, 12.5 ],
       [ 102, 17 ],
       [ 250, 25 ],
       [ 480, 50 ],
       [ Infinity, 0 ]
   ],
   'INR' : [
       [ 300, 150 ],
       [ 500, 175 ],
       [ 1000, 250 ],
       [ 1500, 350 ],
       [ 3000, 500 ],
       [ 5000, 750 ],
       [ 10000, 1000 ],
       [ 25000, 2500 ],
       [ Infinity, 5000 ]
   ],
   'JPY' : [
       [ 1000, 300 ],
       [ 1500, 450 ],
       [ 2000, 500 ],
       [ 3000, 700 ],
       [ 5000, 900 ],
       [ 10000, 1100 ],
       [ 25000, 2500],
       [ 50000, 5000],
       [ 100000, 12000],
       [ 250000, 25000],
       [ 500000, 50000],
       [ 750000, 75000],
       [ Infinity, 100000]
   ],
   'SEK' : [
       [ 50, 25 ],
       [ 100, 30 ],
       [ 200, 50 ],
       [ 300, 70 ],
       [ 500, 90 ],
       [ 1000, 110 ],
       [ 2500, 250 ],
       [ 5000, 500 ],
       [ Infinity, 1000 ]
   ]

}; frb.amounts.monthlySuggest.EUR = frb.amounts.monthlySuggest.GBP; frb.amounts.monthlySuggest.CAD = frb.amounts.monthlySuggest.USD; frb.amounts.monthlySuggest.AUD = frb.amounts.monthlySuggest.USD; frb.amounts.monthlySuggest.NZD = frb.amounts.monthlySuggest.USD;

frb.currencyFormats = {

   'USD' : '$\t',
   'CAD' : {
       'fr' : '$\t',
       'default' : '$\t'
   },
   'AUD' : '$\t',
   'NZD' : '$\t',
   'GBP' : '£\t',
   'EUR' : {
       'en' : '€\t',
       'cy' : '€\t',
       'ga' : '€\t',
       'mt' : '€\t',
       'nl' : '€ \t',
       'lv' : '€ \t',
       'tr' : '€ \t',
       'default' : '\t €'
   },
   // Others
   'DKK' : '\t kr.',
   'HUF' : '\t Ft',
   'ILS' : {
       'he' : '\t ₪',
       'yi' : '\t ₪',
       'ar' : '\t ₪',
       'default' : '₪ \t'
   },
   'INR' : '₹ \t',
   'JPY' : '¥\t',
   'MYR' : 'RM\t',
   'NOK' : '\t kr',
   'PLN' : '\t zł',
   'RON' : '\t lei',
   'SEK' : '\t kr',
   'UAH' : '₴\t',
   'ZAR' : 'R \t',
   // Latin America
   'BRL' : 'R$\t',
   'ARS' : '$\t',
   'CLP' : '$\t',
   'COP' : '$\t',
   'MXN' : '$\t',
   'PEN' : 'S/. \t',
   'UYU' : '$U \t',
   'CHF' : '\t CHF'

};

// Check in user language first, then fall back to English frb.countryNames = {

   'en' : {
       'US' : 'the U.S.',
       'CA' : 'Canada',
       'GB' : 'the UK',
       'IE' : 'Ireland',
       'AU' : 'Australia',
       'NZ' : 'New Zealand',
       'AR' : 'Argentina',
       'AT' : 'Austria',
       'BE' : 'Belgium',
       'BR' : 'Brazil',
       'CH' : 'Switzerland',
       'CL' : 'Chile',
       'CO' : 'Colombia',
       'DK' : 'Denmark',
       'ES' : 'Spain',
       'FR' : 'France',
       'HK' : 'Hong Kong',
       'HU' : 'Hungary',
       'IL' : 'Israel',
       'IN' : 'India',
       'IT' : 'Italy',
       'JP' : 'Japan',
       'LU' : 'Luxembourg',
       'LV' : 'Latvia',
       'MX' : 'Mexico',
       'MY' : 'Malaysia',
       'NL' : 'the Netherlands',
       'NO' : 'Norway',
       'PE' : 'Peru',
       'PL' : 'Poland',
       'PT' : 'Portugal',
       'RO' : 'Romania',
       'SE' : 'Sweden',
       'SK' : 'Slovakia',
       'UA' : 'Ukraine',
       'UY' : 'Uruguay',
       'ZA' : 'South Africa'
   },
   'ca' : {
       'AT' : 'd’Àustria',
       'BE' : 'de Bèlgica',
       'DK' : 'de Dinamarca',
       'ES' : 'd’Espanya',
       'HU' : 'd’Hongria',
       'IL' : 'd’Israel',
       'LV' : 'de Letònia',
       'LU' : 'de Luxemburg',
       'MY' : 'de Malàisia',
       'NO' : 'de Noruega',
       'PL' : 'de Polònia',
       'PT' : 'de Portugal',
       'RO' : 'de Romania',
       'SK' : 'd’Eslovàquia',
       'ZA' : 'de Sud-àfrica',
       'UA' : 'd’Ucraïna'
   },
   'es' : {
       'MX' : 'México',
       'PE' : 'Perú',
       'ES' : 'España'
   },
   'da' : {
       'AT' : 'i Østrig',
       'BE' : 'i Belgien',
       'DK' : 'i Danmark',
       'HU' : 'i Ungarn',
       'IL' : 'i Israel',
       'LV' : 'i Letland',
       'LU' : 'i Luxembourg',
       'MY' : 'i Malaysia',
       'NO' : 'i Norge',
       'PL' : 'i Polen',
       'PT' : 'i Portugal',
       'RO' : 'i Rumænien',
       'SK' : 'i Slovakiet',
       'ZA' : 'i Sydafrika',
       'UA' : 'i Ukraine'
   },
   'nl' : {
       'NL' : 'in Nederland',
       'AT' : 'in Oostenrijk',
       'BE' : 'in België',
       'DK' : 'in Denemarken',
       'HU' : 'in Hongarije',
       'IL' : 'in Israël',
       'LV' : 'in Letland',
       'LU' : 'in Luxemburg',
       'MY' : 'in Maleisië',
       'NO' : 'in Noorwegen',
       'PL' : 'in Polen',
       'PT' : 'in Portugal',
       'RO' : 'in Roemenië',
       'SK' : 'in Slowakije',
       'ZA' : 'in Zuid-Afrika',
       'UA' : 'in Oekraïne'
   },
   'fr' : {
       'AT' : 'en Autriche',
       'BE' : 'en Belgique',
       'CH' : 'en Suisse',
       'DK' : 'au Danemark',
       'HU' : 'en Hongrie',
       'IL' : 'en Israël',
       'LV' : 'en Lettonie',
       'LU' : 'au Luxembourg',
       'MY' : 'en Malaisie',
       'NO' : 'en Norvège',
       'PL' : 'en Pologne',
       'PT' : 'au Portugal',
       'RO' : 'en Roumanie',
       'SK' : 'en Slovaquie',
       'ZA' : 'en Afrique du Sud',
       'UA' : 'en Ukraine'
   },
   'de' : {
       'AT' : 'in Österreich',
       'BE' : 'in Belgien',
       'CH' : 'in der Schweiz',
       'DK' : 'in Dänemark',
       'HU' : 'in Ungarn',
       'IL' : 'in Israel',
       'LV' : 'in Lettland',
       'LU' : 'in Luxemburg',
       'MY' : 'in Malaysia',
       'NO' : 'in Norwegen',
       'PL' : 'in Polen',
       'PT' : 'in Portugal',
       'RO' : 'in Rumänien',
       'SK' : 'in der Slowakei',
       'ZA' : 'in Südafrika',
       'UA' : 'in der Ukraine'
   },
   'he' : {
       'AT' : 'באוסטרליה',
       'BE' : 'בבלגיה',
       'DK' : 'בדנמרק',
       'ES' : 'בספרד',
       'HU' : 'בהונגריה',
       'IL' : 'בישראל',
       'LV' : 'בלטביה',
       'LU' : 'בלוקסמבורג',
       'MY' : 'במלזיה',
       'NO' : 'בנורווגיה',
       'PL' : 'בפולין',
       'PT' : 'בפורטוגל',
       'RO' : 'ברומניה',
       'SK' : 'בסלובקיה',
       'ZA' : 'בדרום אפריקה',
       'UA' : 'באוקראינה'
   },
   'hu' : {
       'AT' : 'ausztriai',
       'BE' : 'belgiumi',
       'DK' : 'dániai',
       'HU' : 'magyarországi',
       'IL' : 'izraeli',
       'LV' : 'lettországi',
       'LU' : 'luxemburgi',
       'MY' : 'malajziai',
       'NO' : 'norvégiai',
       'PL' : 'lengyelországi',
       'PT' : 'portugáliai',
       'RO' : 'romániai',
       'SK' : 'szlovákiai',
       'ZA' : 'dél-afrikai',
       'UA' : 'ukrajnai'
   },
   'it' : {
       'IT' : 'Italia',
       'CH' : 'Svizzera'
   },
   'lv' : {
       'AT' : 'valstī Austrijā',
       'BE' : 'valstī Beļģijā',
       'DK' : 'valstī Dānijā',
       'HU' : 'valstī Ungārijā',
       'IL' : 'Izraēlas valstī',
       'LV' : 'valstī Latvijā',
       'LU' : 'valstī Luksemburgā',
       'MY' : 'valstī Malaizijā',
       'NO' : 'valstī Norvēģijā',
       'PL' : 'valstī Polijā',
       'PT' : 'valstī Portugālē',
       'RO' : 'valstī Rumānijā',
       'SK' : 'valstī Slovākijā',
       'ZA' : 'Dienvidāfrikas valstī',
       'UA' : 'valstī Ukrainā'
   },
   'nb' : {
       'AT' : 'i Østerrike',
       'BE' : 'i Belgia',
       'DK' : 'i Danmark',
       'HU' : 'i Ungarn',
       'IL' : 'i Israel',
       'LV' : 'i Latvia',
       'LU' : 'i Luxembourg',
       'MY' : 'i Malaysia',
       'NO' : 'i Norge',
       'PL' : 'i Polen',
       'PT' : 'i Portugal',
       'RO' : 'i Romania',
       'SK' : 'i Slovakia',
       'ZA' : 'i Sør-Afrika',
       'UA' : 'i Ukraina'
   },
   'pl' : {
       'AT' : 'w Austrii',
       'BE' : 'w Belgii',
       'DK' : 'w Danii',
       'HU' : 'na Węgrzech',
       'IL' : 'w Izraelu',
       'LV' : 'na Łotwie',
       'LU' : 'w Luksemburgu',
       'MY' : 'w Malezji',
       'NO' : 'w Norwegii',
       'PL' : 'w Polsce',
       'PT' : 'w Portugalii',
       'RO' : 'w Rumunii',
       'SK' : 'na Słowacji',
       'ZA' : 'w Republice Południowej Afryki',
       'UA' : 'na Ukrainie'
   },
   'pt' : {
       'AT' : 'na Áustria',
       'BE' : 'na Bélgica',
       'DK' : 'na Dinamarca',
       'HU' : 'na Hungria',
       'IL' : 'em Israel',
       'LV' : 'na Letónia',
       'LU' : 'no Luxemburgo',
       'MY' : 'na Malásia',
       'NO' : 'na Noruega',
       'PL' : 'na Polónia',
       'PT' : 'em Portugal',
       'RO' : 'na Roménia',
       'SK' : 'na Eslováquia',
       'ZA' : 'na África do Sul',
       'UA' : 'na Ucrânia'
   },
   'ro' : {
       'AT' : 'din Austria',
       'BE' : 'din Belgia',
       'DK' : 'din Danemarca',
       'HU' : 'din Ungaria',
       'IL' : 'din Israel',
       'LV' : 'din Latvia',
       'LU' : 'din Luxemburg',
       'MY' : 'din Malaezia',
       'NO' : 'din Norvegia',
       'PL' : 'din Polonia',
       'PT' : 'din Portugalia',
       'RO' : 'din România',
       'SK' : 'din Slovacia',
       'ZA' : 'din Africa de Sud',
       'UA' : 'din Ucraina'
   },
   'ru' : {
       'AT' : 'в Австрии',
       'BE' : 'в Бельгии',
       'DK' : 'в Дании',
       'HU' : 'в Венгрии',
       'IL' : 'в Израиле',
       'LV' : 'в Латвии',
       'LU' : 'в Люксембурге',
       'MY' : 'в Малайзии',
       'NO' : 'в Норвегии',
       'PL' : 'в Польше',
       'PT' : 'в Португалии',
       'RO' : 'в Румынии',
       'SK' : 'в Словакии',
       'ZA' : 'в Южной Африке',
       'UA' : 'в Украине'
   },
   'sk' : {
       'AT' : 'v Rakúsku',
       'BE' : 'v Belgicku',
       'DK' : 'v Dánsku',
       'HU' : 'v Maďarsku',
       'IL' : 'v Izraeli',
       'LV' : 'v Lotyšsku',
       'LU' : 'v Luxembursku',
       'MY' : 'v Malajzii',
       'NO' : 'v Nórsku',
       'PL' : 'v Poľsku',
       'PT' : 'v Portugalsku',
       'RO' : 'v Rumunsku',
       'SK' : 'na Slovensku',
       'ZA' : 'v Juhoafrickej republike',
       'UA' : 'na Ukrajine'
   },
   'sv' : {
       'SE' : 'i Sverige'
   },
   'uk' : {
       'AT' : 'у Австрії',
       'BE' : 'у Бельгії',
       'DK' : 'у Данії',
       'HU' : 'в Угорщині',
       'IL' : 'в Ізраїлі',
       'LV' : 'у Латвії',
       'LU' : 'у Люксембургу',
       'MY' : 'у Малайзії',
       'NO' : 'у Норвегії',
       'PL' : 'у Польщі',
       'PT' : 'у Португалії',
       'RO' : 'у Румунії',
       'SK' : 'у Словаччині',
       'ZA' : 'у ПАР',
       'UA' : 'в Україні'
   }

};

frb.dayNames = {

   'en' : [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ],
   'ca' : [ 'diumenge', 'dilluns', 'dimarts', 'dimecres', 'dijous', 'divendres', 'dissabte' ],
   'ja' : [ '日', '月', '火', '水', '木', '金', '土' ],
   'es' : [ 'domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado' ],
   'sv' : [ 'söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag' ],
   'da' : [ 'søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag' ],
   'nb' : [ 'søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag' ],
   'it' : [ 'domenica', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato' ],
   'nl' : [ 'zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag' ],
   'fr' : [ 'dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi' ],
   'de' : [ 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag' ],
   'he' : [ 'ראשון', 'שני', 'שלישי', 'רביעי', 'חמישי', 'שישי', 'שבת' ],
   'lv' : [ 'svētdienā', 'pirmdienā', 'otrdienā', 'trešdienā', 'ceturtdienā', 'piektdienā', 'sestdienā' ],
   'pl' : [ 'niedzielę', 'poniedziałek', 'wtorek', 'środę', 'czwartek', 'piątek', 'sobotę' ],
   'ru' : [ 'воскресенье', 'понедельник', 'вторник', 'среду', 'четверг', 'пятницу', 'субботу' ],
   'uk' : [ 'неділі', 'понеділка', 'вівторка', 'середи', 'четверга', 'п’ятниц', 'суботи' ],
   'hu' : [ 'vasárnapon', 'hétfőn', 'kedden', 'szerdán', 'csütörtökön', 'pénteken', 'szombaton' ],
   'ro' : [ 'duminică', 'luni', 'marți', 'miercuri', 'joi', 'vineri', 'sâmbătă' ],
   'aa' : [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ]

};

// "This fooday" translations. Needed for some languages where gender varies and "this" must agree frb.dayNamesThis = {

   'en' : [ 'this Sunday', 'this Monday', 'this Tuesday', 'this Wednesday', 'this Thursday', 'this Friday', 'this Saturday' ],
   'jp' : [ 'この日曜日', 'この月曜日', 'この火曜日', 'この水曜日', 'この木曜日', 'この金曜日', 'この土曜日' ],
   'it' : [ 'questa domenica', 'questo lunedì', 'questo martedì', 'questo mercoledì', 'questo giovedì', 'questo venerdì', 'questo sabato'],
   'pl' : [ 'w tę niedzielę', 'w ten poniedziałek', 'w ten wtorek', 'w tę środę', 'w ten czwartek', 'w ten piątek', 'w tę sobotę' ],
   'ru' : [ 'в это воскресенье', 'в этот понедельник', 'в этот вторник', 'в эту среду', 'в этот четверг', 'в эту пятницу', 'в эту субботу' ],
   'uk' : [ 'цієї неділі', 'цього понеділка', 'цього вівторка', 'цієї середи', 'цього четверга', 'цієї п’ятниці', 'цієї суботи' ],
   'pt' : [ 'neste domingo', 'nesta segunda-feira', 'nesta terça-feira', 'nesta quarta-feira', 'nesta quinta-feira', 'nesta sexta-feira', 'neste sábado'],
   'sk' : [ 'túto nedeľu', 'tento pondelok', 'tento utorok', 'túto stredu', 'tento štvrtok', 'tento piatok', 'túto sobotu']

};

frb.iPadTranslations = {

   'en' : 'iPad'

}; /* jshint maxerr: 600 */ /* MediaWiki:FundraisingBanners/CoreJS-2018.js

* Core code for banner forms, with new inline error messages
*/

var frb = frb || {};

if ( !mw.centralNotice.adminUi ) { // T262693

   frb.loadedTime = Date.now();
   frb.didSelectAmount = false;
   frb.optinRequiredCountries =
       [ 'AT', 'BE', 'DK', 'ES', 'FR', 'GB', 'HU', 'IE', 'IT', 'IL',
         'LU', 'LV', 'NL', 'NO', 'PL', 'PT', 'RO', 'SE', 'SK', 'UA' ];
   frb.optinRequired = frb.optinRequiredCountries.indexOf(mw.centralNotice.data.country) !== -1;
   frb.maxUSD = 12000;
   frb.reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;

}

/**

* Main function to submit to paymentswiki
*
* @param  {Object} options
* - method (required)
* - submethod (optional)
* - gateway (optional)
* - ffname (optional)
* - skipValidation (optional boolean, for pp-usd. Not yet implemented.)
* @param  {Boolean} isEndowment
*/

frb.submitForm = function(options, isEndowment) {

   var uri = new mw.Uri('https://payments.wikimedia.org/index.php/Special:GatewayFormChooser');
   var params = {};
   if ( !frb.validateForm( options ) ) {
       frb.extraData.validateError = 1; // Flag they had an error, even if fixed later
       return false; // Error, bail out of submitting
   }
   /* Form selection data */
   params.payment_method = options.method;
   if ( options.submethod ) {
       params.payment_submethod = options.submethod;
   }
   if ( options.gateway ) {
       params.gateway = options.gateway;
   }
   if ( options.ffname ) {
       params.ffname = options.ffname;
   }
   if ( options.variant ) {
       params.variant = options.variant;
   }
   params.recurring = frb.getRecurring();
   params.currency_code = frb.getCurrency(mw.centralNotice.data.country) || 'USD';
   params.uselang = mw.centralNotice.data.uselang || 'en';
   params.country = mw.centralNotice.data.country || 'XX';
   if ( params.uselang === 'pt' && params.country === 'BR' ) {
       params.uselang = 'pt-br';
   }
   if ( params.uselang === 'es' &&
       ( params.country === 'AR' || params.country === 'CL' ||
         params.country === 'CO' || params.country === 'MX' ||
         params.country === 'PE' || params.country === 'UY' )
   ) {
       params.uselang = 'es-419';
   }
   /* Adyen override. frb.ccAdyenCountries is defined in LocalizeJS-2017.js */
   if ( params.payment_method === 'cc' && frb.ccAdyenCountries.indexOf( params.country ) !== -1 ) {
       params.gateway = 'adyen';
   }
   /* Amount */
   var amount = frb.getAmount();
   if ( $('#frb-ptf-checkbox').prop('checked') ) {
       amount = amount + frb.calculateFee(amount);
       frb.extraData.ptf = 1;
   }
   params.amount = amount;
   /* Email optin */
   if ( $('input[name="opt_in"]').length > 0 ) {
       var opt_inValue = $('input[name="opt_in"]:checked').val();
       params.opt_in   = opt_inValue; // frb.validateForm() already checked it's 1 or 0
   }
   /* Tracking info */
   if ( isEndowment ) {
       params.utm_medium = 'endowment';
       params.appeal = 'EndowmentQuote';
   } else {
       params.utm_medium = 'sitenotice';
   }
   params.utm_campaign = mw.centralNotice.data.campaign || 'test';
   params.utm_source   = frb.buildUtmSource(params);
   frb.extraData.vw = window.innerWidth;
   frb.extraData.vh = window.innerHeight;
   frb.extraData.time = Math.round( (Date.now() - frb.loadedTime)/1000 );
   if ( !$.isEmptyObject( frb.extraData ) ) {
       params.utm_key = frb.buildUtmKey( frb.extraData );
   }
   /* Link to Banner History if enabled */
   var mixins = mw.centralNotice.getDataProperty( 'mixins' );
   if ( mixins && mixins.bannerHistoryLogger ) {
       params.bannerhistlog = mw.centralNotice.bannerHistoryLogger.id;
   }
   uri.extend(params);
   // Set a cookie with current location so we can return here
   mw.loader.using( [ 'mediawiki.cookie', 'mediawiki.util' ] ).then( function () {
       // Exclude URL parameters like banner, but cope with paths like /w/index.php?title=Foo
       var returnToUrl = window.location.origin + mw.util.getUrl();
       mw.cookie.set(
           'fundraising_returnTo',
           returnToUrl,
           { expires: 300, prefix: , domain: '.wikipedia.org', secure: true }
       );
   });
   if ( mixins && mixins.bannerHistoryLogger ) {
       mw.centralNotice.bannerHistoryLogger.ensureLogSent().always(function() {
           frb.goToPayments( uri );
       });
   } else {
       frb.goToPayments( uri );
   }

};

frb.goToPayments = function( uri ) {

   if ( window.top !== window.self ) {
       // banner is in a frame, open payments in a new tab
       window.open( uri.toString() );
   } else {
       window.location.href = uri.toString();
   }

};

/**

* Check the form for errors.
* Called on submission, can also be called on input.
*/

frb.validateForm = function( options ) {

   var error = false;
   /* Reset all errors */
   $('.frb-haserror').removeClass('frb-haserror');
   $('.frb-error').hide();
   if ( !options.method ) {
       error = true;
       $('.frb-methods').addClass('frb-haserror');
       $('.frb-error-method').show();
   }
   if ( !frb.validateAmount() ) {
       error = true;
   }
   /* Email optin */
   if ( frb.optinRequired && $('.frb-optin').is(':visible') ) {
       var opt_inValue = $('input[name="opt_in"]:checked').val();
       if ( opt_inValue !== '1' && opt_inValue !== '0' ) {
           $('.frb-optin').addClass('frb-haserror');
           $('.frb-error-optin').show();
           error = true;
       }
   }
   return !error;

};

/**

* Check if selected amount is valid i.e. a positive number, between minimum and maximum.
* If not, show an error and return false.
*/

frb.validateAmount = function() {

   var amount = frb.getAmount(),
       currency  = frb.getCurrency( mw.centralNotice.data.country ),
       minAmount = frb.amounts.minimums[ currency ],
       maxAmount = Math.round( frb.maxUSD * minAmount );
       // Math.round to account for floating point math errors: https://phabricator.wikimedia.org/T246262
   if ( amount === null || isNaN(amount) || amount <= 0 || amount < minAmount ) {
       $('fieldset.frb-amounts').addClass('frb-haserror');
       $('.frb-error-bigamount').hide();
       $('.frb-error-smallamount').show();
       return false;
   } else if ( amount > Math.round( maxAmount ) ) {
       $('fieldset.frb-amounts').addClass('frb-haserror');
       $('.frb-error-bigamount').show();
       return false;
   } else {
       $('fieldset.frb-amounts').removeClass('frb-haserror');
       $('.frb-error-smallamount, .frb-error-bigamount').hide();
       return true;
   }

};

/**

* Build the utm_source for analytics.
*
* Own function so it can be overriden for weird tests
*
* @param  {Object} params
* @return {string} utm_source
*/

frb.buildUtmSource = function(params) {

   var utm_source;
   var fullDottedPaymentMethod = params.payment_method;
   if ( params.recurring ) {
       fullDottedPaymentMethod = 'r' + fullDottedPaymentMethod;
   }
   if ( params.payment_submethod ) {
       fullDottedPaymentMethod = fullDottedPaymentMethod + '.' + params.payment_submethod;
   }
   utm_source = mw.centralNotice.data.banner;
   // Keeping opt-in in utm_source for safety for now
   // Eventually remove it, or move to utm_key?
   if ( params.opt_in ) {
       utm_source += '_optIn' + params.opt_in;
   }
   utm_source += '.no-LP.' + fullDottedPaymentMethod;
   return utm_source;

};

/**

* Build a string for utm_key from extra tracking data
*
* @param  {Object} data
* @return {string} utm_key
*/

frb.buildUtmKey = function(data) {

   var dataArray = [];
   for (var key in data) {
       if (data.hasOwnProperty(key)) {
           dataArray.push( key + '_' + data[key] );
       }
   }
   return dataArray.join('~');

};

/**

* Determine if we should show recurring choice on step 2
* @param  {Object} options     Including method and optional gateway
* @param  {String} country
* @return {boolean}
*/

frb.shouldShowRecurring = function(options, country) {

   if ( frb.noRecurringCountries.indexOf( country ) !== -1 ) { // Defined in LocalizeJS-2017.js
       return false;
   }
   if ( options.method === 'paypal' ) {
       return true;
   }
   // Adyen iDEAL
   if ( options.submethod === 'rtbt_ideal' ) {
       return true;
   }
   if ( options.method === 'cc' ) {
       return true;
   }
   return false;

};

/* Is recurring method selected? This function can be overriden for different forms */ frb.getRecurring = function() {

   // Can't use simple form.frequency.value, doesn't work in IE
   var selected = $('#frb-form input[name="frequency"]:checked').val();
   return selected === 'monthly';

};

/* Return amount selected */ frb.getAmount = function() {

   var form = document.getElementById('frb-form');
   var amount = null;
   frb.extraData.otherAmt = 0;
   // If there are some amount radio buttons, then look for the checked one
   if (form.amount) {
       for (var i = 0; i < form.amount.length; i++) {
           if (form.amount[i].checked) {
               amount = form.amount[i].value;
           }
       }
   }
   // Check the "other" amount box
   if (form.otherAmount.value !== ) {
       var otherAmount = form.otherAmount.value;
       otherAmount = otherAmount.replace(/[,.](\d)$/, ':$10');
       otherAmount = otherAmount.replace(/[,.](\d)(\d)$/, ':$1$2');
       otherAmount = otherAmount.replace(/[$£€¥,.]/g, );
       otherAmount = otherAmount.replace(/:/, '.');
       amount = otherAmount;
       frb.extraData.otherAmt = 1;
   }
   amount = parseFloat(amount);
   if ( isNaN(amount) ) {
       return 0;
   } else {
       return amount;
   }

};

/* Localize the amount errors. Call when initialising banner. */ frb.localizeErrors = function() {

   var currency  = frb.getCurrency( mw.centralNotice.data.country ),
       language = mw.centralNotice.data.uselang,
       minAmount = frb.amounts.minimums[ currency ],
       maxAmount = Math.round( frb.maxUSD * minAmount );
       // Math.round to account for floating point math errors: https://phabricator.wikimedia.org/T246262
   $('.frb-error-smallamount').text( function( index, oldText ) {
       return oldText.replace( '$1', frb.formatCurrency(currency, minAmount, language)  );
   });
   $('.frb-error-bigamount').text( function( index, oldText ) {
       // We cannot accept donations greater than $1 $2 through our website. Please contact our major gifts staff at $3.
       return oldText.replace( '$1', maxAmount )
                     .replace( '$2', currency )
                     .replace( '$3', 'benefactors@wikimedia.org' );
   });

};

/**

* Shared code for amount input handling
*/

frb.initAmountOptions = function() {

   // Reset "Other" input if user clicks a preset amount
   $('#frb-form [id^=frb-amt-ps]').click(function() {
       $('#frb-amt-other-input').val();
   });
   // Track if they selected and then later changed amount
   var checkAmountChange = function(e) {
       if ( frb.didSelectAmount ) {
           frb.extraData.changedAmt = 1;
       }
       // check if amount radio button is selected OR there is a value in the other amount
       if ( $('.frb-amounts input[type="radio"]:checked').val() !== 'Other' || $('#frb-amt-other-input').val().length > 0 ) {
           frb.didSelectAmount = true;
       }
       return;
   };
   $('.frb-amounts input[type="radio"]').on('change', checkAmountChange);
   $('#frb-amt-other-input').on('focusout', checkAmountChange);
   // Block typing non-numerics in input field, otherwise Safari allows them and then chokes
   // https://phabricator.wikimedia.org/T118741, https://phabricator.wikimedia.org/T173431
   var blockNonNumeric = function(e) {
       // Allow special keys in Firefox
       if ((e.code == 'ArrowLeft') || (e.code == 'ArrowRight') ||
           (e.code == 'ArrowUp') || (e.code == 'ArrowDown') ||
           (e.code == 'Delete') || (e.code == 'Backspace')) {
           return;
       }
       var chr = String.fromCharCode(e.which);
       if ("0123456789., ".indexOf(chr) === -1) {
           return false;
       }
   };
   $('#frb-amt-other-input').on('keypress', blockNonNumeric);
   $('#frb-amt-monthly-other-input').on('keypress', blockNonNumeric);

};

/**

* Calculate approximate transaction fee on given amount
* @param  {number} amount
* @return {number}        Rounded to 2 decimal places
*/

frb.calculateFee = function(amount) {

   var currency = frb.getCurrency(mw.centralNotice.data.country),
       feeMultiplier = 0.04,
       feeMinimum = frb.amounts.feeMinimums[currency] || 0.35,
       feeAmount = amount * feeMultiplier;
   if ( feeAmount < feeMinimum ) {
     feeAmount = feeMinimum;
   }
   return parseFloat(feeAmount.toFixed(2));

};

frb.updateFeeDisplay = function() {

   var currency = frb.getCurrency(mw.centralNotice.data.country),
       language = mw.centralNotice.data.uselang,
       amount, feeAmount, totalAmount;
   amount = frb.getAmount();
   feeAmount = frb.calculateFee(amount);
   if ( $('#frb-ptf-checkbox').prop('checked') ) {
       totalAmount = amount + feeAmount;
   } else {
       totalAmount = amount;
   }
   var feeAmountFormatted = frb.formatCurrency(currency, feeAmount, language);
   $('.frb-ptf-fee').text(feeAmountFormatted);
   var totalAmountFormatted = frb.formatCurrency(currency, totalAmount, language);
   $('.frb-ptf-total').text(totalAmountFormatted);
   $('.frb-ptf').slideDown( frb.reduceMotion ? 0 : 400 );

};

/**

* Determine if banner should be shown, and set correct data for impression logging
* @return {boolean}
*/

frb.shouldShowBanner = function() {

   mw.centralNotice.bannerData.hideResult = false;
   /* Hide outside main namespace (except Main Page, for sites where it isn't in main namespace) */
   if ( mw.config.get('wgNamespaceNumber') > 0 && !mw.config.get('wgIsMainPage') ) {
       mw.centralNotice.bannerData.hideResult = true;
       mw.centralNotice.bannerData.hideReason = 'namespace';
   }
   /* Hide banner if on wrong site (desktop/mobile) in case wrong device settings were chosen */
   var bannerName = mw.centralNotice.data.banner,
       skin = mw.config.get('skin');
   if (
        ( bannerName.indexOf('_dsk_') !== -1 && skin === 'minerva' ) ||
        ( bannerName.indexOf('_m_') !== -1 && skin !== 'minerva' )
   ) {
       mw.centralNotice.bannerData.hideResult = true;
       mw.centralNotice.bannerData.hideReason = 'other';
       console.warn('Hiding fundraising banner on wrong site (desktop/mobile)');
   }
   return !mw.centralNotice.bannerData.hideResult;

};

/** Debug function to highlight dynamically replaced elements */ frb.highlightReplacements = function() {

   $('.frb [class^="frb-replace"], .frb-ptf-fee, .frb-ptf-total, .frb-upsell-ask, frb-amt').css('background-color', '#fa0');

};

if ( !mw.centralNotice.adminUi ) { // T262693

   /**
    * Provides alterImpressionData hook for CentralNotice
    * This info will be sent back with Special:RecordImpression
    * TODO: check if/when we can remove this (and RecordImpression)
    */
   mediaWiki.centralNotice.bannerData.alterImpressionData = function( impressionData ) {
       // Returning true from this function indicates the banner was shown
       if (mediaWiki.centralNotice.bannerData.hideReason) {
           impressionData.reason = mediaWiki.centralNotice.bannerData.hideReason;
       }
       if (mediaWiki.centralNotice.bannerData.cookieCount) {
           impressionData.banner_count = mediaWiki.centralNotice.bannerData.cookieCount;
       }
       return !mediaWiki.centralNotice.bannerData.hideResult;
   };

}

/* End of MediaWiki:FundraisingBanners/CoreJS-2018.js */ /* jshint maxerr: 600 */ /* == MediaWiki:FundraisingBanners/LocalizeJS-2017.js == */

/**

* Get the currency for a given country
*
* NOTE: The following currency mapping is WMF-specific based on payment
* provider availability, NOT necessarily the official currency of the country
*
* @param  {string} country code
* @return {string} currency code
*/

frb.getCurrency = function(country) {

   switch ( country ) {
       // Big 6
       case 'US': return 'USD';
       case 'CA': return 'CAD';
       case 'AU': return 'AUD';
       case 'NZ': return 'NZD';
       case 'GB': return 'GBP';
       case 'IE': return 'EUR';
       // Euro countries
       case 'AT':
       case 'BE':
       case 'ES':
       case 'FR':
       case 'IE':
       case 'IT':
       case 'LU':
       case 'LV':
       case 'NL':
       case 'PT':
       case 'SK':
           return 'EUR';
       // Others
       case 'DK': return 'DKK';
       case 'HU': return 'HUF';
       case 'IL': return 'ILS';
       case 'IN': return 'INR';
       case 'JP': return 'JPY';
       case 'MY': return 'MYR';
       case 'NO': return 'NOK';
       case 'PL': return 'PLN';
       case 'RO': return 'RON';
       case 'SE': return 'SEK';
       case 'UA': return 'UAH';
       case 'ZA': return 'ZAR';
       // Latin America
       case 'BR': return 'BRL';
       case 'AR': return 'ARS';
       case 'CL': return 'CLP';
       case 'CO': return 'COP';
       case 'MX': return 'MXN';
       case 'PE': return 'PEN';
       case 'UY': return 'UYU';
       case 'CH': return 'CHF';
       // Fall back to USD
       default:
           return 'USD';
   }

};

/**

* Format a currency value
*
* @param  {string} currency code. Leave undefined to get without symbol.
* @param  {number} amount
* @param  {string} language code
* @return {string} formatted string e.g. '$3', '£5', '10 €'
*/

frb.formatCurrency = function(currency, amount, language) {

   var locale, formatterOptions, formatter, fmAmount, supportsIntl;
   if ( isNaN(amount) || amount ===  ) {
       // Not a number, it's probably the 'other' string or box
       // TODO: better way of doing this?
       fmAmount = amount;
   } else {
       // Check browser support
       try {
           supportsIntl = typeof window.Intl === 'object';
       } catch (e) {
           supportsIntl = false; // T265396
       }
       if ( supportsIntl ) {
           // Use Intl for fancy number formatting - thousands separators etc
           locale = language + '-' + mw.centralNotice.data.country;
           if ( amount % 1 !== 0 ) {
               formatterOptions = { minimumFractionDigits: 2 };
           } else {
               formatterOptions = {};
           }
           formatter = new Intl.NumberFormat(locale, formatterOptions);
       } else {
           // Bad browser i.e. IE. Just do the basics: 2 decimal places if needed, or none
           formatter = {};
           formatter.format = function(number) {
               if ( amount % 1 !== 0 ) {
                   return number.toFixed(2);
               } else {
                   return number.toString();
               }
           };
       }
       fmAmount = formatter.format(amount);
   }
   // No symbol needed
   if ( currency === undefined ) {
       return fmAmount;
   }
   // Better dive into the formatting object
   if ( frb.currencyFormats[currency] === undefined ) {
       return currency + ' ' + fmAmount;
   }
   if ( frb.currencyFormats[currency] instanceof Object ) { // not a string
       if ( frb.currencyFormats[currency][language] !== undefined ) {
           return frb.currencyFormats[currency][language].replace('\t', fmAmount);
       }
       return frb.currencyFormats[currency]['default'].replace('\t', fmAmount);
   }
   return frb.currencyFormats[currency].replace('\t', fmAmount);

};

/*

* Select the correct amount or array of amounts from object in "source"
*
* @param {Object} source   - the amounts data object e.g. frb.amounts.options7, frb.amounts.averages
* @param {string} currency - ISO code of currency
* @param {string} country  - ISO code of country (optional)
* @return {array/number}   - depending on source
*/

frb.pickAmounts = function(source, currency, country) {

   if ( source[currency]['default'] ) { // we need to go deeper
       if ( source[currency][country] !== undefined ) {
           return source[currency][country];
       } else {
           return source[currency]['default'];
       }
   } else {
       return source[currency];
   }

};

/* Credit card types so we can show the correct logos */ frb.cardTypes = {

   // Big 6
   'US' : 'vmad',
   'CA' : 'vma',
   'GB' : 'vmaj',
   'IE' : 'vmaj',
   'AU' : 'vmaj',
   'NZ' : 'vma',
   // Euro countries
   'AT' : 'vmaj',
   'BE' : 'vmaj',
   'ES' : 'vmaj',
   'FR' : 'vma', // Adyen
   'IT' : 'vmaj',
   'LU' : 'vmaj',
   'LV' : 'vma',
   'NL' : 'vmaj', // Adyen
   'PT' : 'vmaj',
   'SK' : 'vmaj',
   // Others
   'DK' : 'vma',
   'HU' : 'vma',
   'IL' : 'vmad', // Adyen
   'JP' : 'vmaj',
   'MY' : 'vmaj',
   'NO' : 'vma',
   'PL' : 'vma',
   'RO' : 'vma',
   'SE' : 'vma',
   'UA' : 'vma', // Adyen
   'ZA' : 'vm',
   'IN' : 'vmar' // dLocal

};

/**

* Display the correct payment methods for current country
*
* Methods should be labeled with class 'frb-pm-xxxx'
* TODO: clean this function up more
*
* @param  {string} country
*/

frb.localizeMethods = function(country) {

   // Hide recurring completely for some countries
   if ( frb.noRecurringCountries.indexOf(country) !== -1 ) {
       $('.frb-frequency, .recurring-details').hide();
   }
   // Remove any leftover WorldPay and Adyen
   $('.frb-pm-cc-wp').remove();
   $('.frb-pm-cc-adyen').remove();
   // Monthly Adyen credit card is allowed now
   // if ( frb.ccAdyenCountries.indexOf( country ) !== -1 ) {
   //     $('.frb-pm-cc').addClass('no-monthly');
   // }
   // Countries with no PayPal option
   var noPP = ['IN', 'RU', 'SG', 'AE', 'QA', 'OM', 'BD', 'BO', 'PA',
               'PY', 'GT', 'JM', 'TT', 'DZ'];
   if ($.inArray(country, noPP) !== -1) {
       $('.frb-pm-pp').remove();
       $('.frb-pm-pp-usd').remove();
   }
   // Countries with no PayPal for mobile only - https://phabricator.wikimedia.org/T173001
   var noPPmobile = ['PH', 'ID', 'TH', 'KR', 'MY', 'VN'];
   var mobileRegex = /(_mob_|_ipd_|_m_)/;
   if ($.inArray(country, noPPmobile) !== -1) {
       if (mw.centralNotice.data.banner.search(mobileRegex) !== -1) {
           $('.frb-pm-pp').remove();
           $('.frb-pm-pp-usd').remove();
       }
   }
   // Countries where PayPal must be in USD
   var ppUSD = ['BG', 'HR', 'LT', 'MK', 'RO', 'UA', 'SA', 'CN', 'ID', 'KR',
                'KZ', 'MY', 'VN', 'AR', 'CL', 'DO', 'CO', 'NI', 'UY', 'ZA',
                'BH', 'LB', 'VE', 'TR', 'IS', 'BA', 'MV', 'BB', 'BM', 'BZ',
                'CR', 'CW', 'SX', 'HN', 'KN', 'DM', 'AG', 'LC', 'GD', 'FJ',
                'TN', 'BJ', 'BF', 'CI', 'GW', 'ML', 'NE', 'SN', 'TG', 'BR',
                'PE'];
   if ($.inArray(country, ppUSD) !== -1) {
       $('.frb-pm-pp').remove();
       $('.frb-pm-pp-usd').show();
   } else {
       $('.frb-pm-pp').show();
       $('.frb-pm-pp-usd').remove();
   }
   // Show any extra local payment methods, or remove them if not needed
   var extrapaymentmethods = {
       'amazon'   : ['US'],
       'bpay'     : [],
       'ideal'    : ['NL'],
       'bt'       : ['BR', 'AR', 'CO', 'CL', 'IN'], // Bank Transfer (Astropay)
       'cash'     : ['BR', 'MX', 'AR', 'CO', 'UY']  // 'Cash' methods (Astropay)
   };
   // Methods with different labels per country
   var language = mw.config.get('wgUserLanguage');
   var cashTranslation = 'Cash';
   var btTranslation = 'Bank Transfer';
   if (language === 'en') {
       if (country === 'BR') {
           cashTranslation = 'Boletos';
       }
       if (country === 'UY') {
           cashTranslation = 'RedPagos';
       }
   } else if (language === 'pt') {
       if (country === 'BR') {
           btTranslation   = 'Transferência Bancária';
           cashTranslation = 'Boletos';
       }
   } else if (language === 'es') {
       if (country === 'AR') {
           btTranslation   = 'Transferência Bancária';
           cashTranslation = 'Efectivo';
       }
       if (country === 'CL') {
           btTranslation   = 'WebPay';
       }
       if (country === 'CO') {
           btTranslation   = 'PSE Pagos';
           cashTranslation = 'Efectivo';
       }
       if (country === 'MX') {
           cashTranslation = 'Efectivo';
       }
       if (country === 'UY') {
           cashTranslation = 'RedPagos';
       }
   }
   $('.frb-pm-bt button,   .frb-pm-bt label,   button.frb-pm-bt'  ).text( btTranslation );
   $('.frb-pm-cash button, .frb-pm-cash label, button.frb-pm-cash').text( cashTranslation );
   for (var method in extrapaymentmethods) {
       var $methodbutton = $('.frb-pm-' + method);
       if ( $.inArray(country, extrapaymentmethods[method]) !== -1 ) { // country is in the list
           $methodbutton.show();
       } else {
           $methodbutton.remove();
       }
   }
   /* Add card types class to credit card button, so we can show correct logos */
   if ( frb.cardTypes[country] ) {
       $('.frb-pm-cc').addClass('frb-cctypes-' + frb.cardTypes[country] );
   }

};

/**

* Check scheduled payment method outages and hide buttons if needed
*
* Data at https://meta.wikimedia.org/wiki/MediaWiki:FR2013/Resources/PaymentOutages.js
* Methods should be labeled with class 'frb-pm-xxxx'
*
* @param  {string} country code
*/

frb.checkMethodOutages = function(country) {

   // TODO - can we load this a better way?
   /* This file can be used to schedule hiding of individual payment methods from banners
* e.g. if they have scheduled downtime.
*
* Valid methods are:
*	ideal, cc, pp, amazon, bpay, webmoney, cash, pp-usd
* (most of the time it's 'ideal'...)
* Can also limit outage to a specific country with country: "XX" (where XX is an ISO code)
*
* Note that in JavaScript dates the months (and only the months) start at 0.
* Jan=0, Feb=1, Mar=2, Apr=3 etc. How hateful.
*
* Be sure to also update donatewiki if needed e.g. by commenting the method templates
* found at https://donate.wikimedia.org/wiki/Template:2012FR/Form-section/Paymentmethods
* 
*/

var outages = [

   {
       start:      new Date(Date.UTC(2016, 8, 18, 1)),
       end:        new Date(Date.UTC(2016, 8, 18, 7)),
       method:     "ideal"
   }

]; // jshint ignore:line

   var now = new Date();
   for (var i = outages.length - 1; i >= 0; i--) {
       if ( now > outages[i].start && now < outages[i].end ) {
           if (outages[i].country === undefined || outages[i].country == country) {
               $('.frb-pm-' + outages[i].method).hide();
           }
       }
   }

};

/**

* Adjust the amount options and their labels
*
* Inputs should have id frb-amt-psX where X is the index number (starting from 1)
*
* @param  {Object}  source     - object with amounts e.g. frb.amounts.options7
* @param  {string}  currency   - currency code e.g. 'USD'
* @param  {string}  country    - country code  e.g. 'FR' Some currencies can have different options per country.
* @param  {string}  language   - language code e.g. 'en' For symbol formatting
* @param  {boolean} useSymbols - use currency symbols on labels or not? (3 vs $3)
*/

frb.localizeAmountOptions = function(source, currency, country, language, useSymbols) {

   var amountOptions = frb.pickAmounts(source, currency, country);
   $('#frb-form input[name="amount"]').each(function(index) {
       var $input = $(this);
       var $label = $input.siblings('label');
       var i = $input.attr('id').replace('frb-amt-ps', );
       var amount = amountOptions[i-1]; // because IDs start from 1
       if ( amount ) {
           $input.val( amount );
           if ( useSymbols ) {
               $label.text( frb.formatCurrency( currency, amount, language) );
           } else {
               $label.text( frb.formatCurrency( undefined, amount, language) );
           }
       }
   });

};

/**

* Make an element into a link
*
* @param  {string} selector    CSS selector for elements to convert to a link
* @param  {string} baseUrl     URL of link (function will add language parameter)
*/

frb.makeLink = function( selector, baseUrl ) {

   var url = baseUrl + '&language=' + mw.config.get( 'wgUserLanguage' ); // TODO: pt-br and es-419
   $( selector ).each( function() {
       var $link = $( '<a></a>' );
       $link.html( $( this ).html() );
       $link.attr( { href: url, target: '_blank' } );
       $( this ).replaceWith( $link );
   });

};

/**

* Replace placeholders with number of banners seen
* @param {string} Language code
*/

frb.replaceSeenCount = function( language ) {

   var ordinalNums = {
           'en' : [ , '1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th' ]
       },
       ordinalWords = {
           'en' : [ , 'first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth', 'tenth' ]
       },
       textFragments = {
           'en' : [
               'for the 1st time recently',
               'for the 2nd time recently',
               'for the 3rd time recently',
               'for the 4th time recently',
               'for the 5th time recently',
               'for the 6th time recently',
               'for the 7th time recently',
               'for the 8th time recently',
               'for the 9th time recently',
               'for the 10th time recently'
           ]
       };
   var getReplaceText = function( data, language, seenCount ) {
       if ( data[ language ] ) {
           return data[ language ][ seenCount ];
       } else {
           return data[ 'en' ][ seenCount ];
       }
   };
   try {
       if ( localStorage ) {
           var identifier = mw.centralNotice.internal.state.campaign.mixins.impressionDiet.cookieName,
               lsName = 'CentralNoticeKV|global|impression_diet_' + identifier,
               diet = JSON.parse( localStorage.getItem( lsName ) );
           if ( diet ) {
               var seenCount = diet.val.seenCount;
               $( '.frb-replace-seenCount' ).text( seenCount );
               $( '.frb-replace-seenCount-ordinalNum' ).text( getReplaceText( ordinalNums, language, seenCount ) );
               $( '.frb-replace-seenCount-ordinalWord' ).text( getReplaceText( ordinalWords, language, seenCount ) );
               $( '.frb-replace-seenCount-textFragment' ).text( getReplaceText( textFragments, language, seenCount ) );
           }
       }
   } catch ( ex ) {
       // do nothing - localStorage is configured not to let us read it, or mixin not set
   }

};

frb.noRecurringCountries = ['AR', 'CL', 'CO', 'MX', 'PE', 'UY', 'BR', 'IN']; frb.ccAdyenCountries = ['FR', 'IL', 'UA'];

/* These countries use potentially ambiguous $ sign. Use ISO code instead in text (but still $ for buttons) */ frb.textAmountIsoCountries = ['AR', 'CL', 'CO', 'MX'];

$(function() {

   if ( mw.centralNotice.adminUi ) { // T262693
       return;
   }
   var language = mw.centralNotice.data.uselang;
   var country  = mw.centralNotice.data.country;
   var currency = frb.getCurrency(country);
   // Payment methods
   frb.localizeMethods(country);
   frb.checkMethodOutages(country);
   // Basic replacements
   $('.frb-replace-currencysymbol').text( frb.formatCurrency( currency, , language ).replace(' ', ) );
   $('.frb-replace-currencycode').text( currency );
   // Count banners seen
   frb.replaceSeenCount( language );
   // Country name
   var countryName;
   if ( frb.countryNames[language] ) {
       countryName = frb.countryNames[language][country] || frb.countryNames.en[country];
   } else {
       countryName = frb.countryNames.en[country];
   }
   $('.frb-replace-countryname').text( countryName );
   // Day of week
   var now = new Date();
   var dayNumber = now.getDay();
   var capitalizeText = function( text ) {
       // Capitalize first letter, for use at start of sentence
       return text.charAt(0).toUpperCase() + text.slice(1);
   };
   if ( $('.frb-replace-dayofweek, .frb-replace-dayofweek-capitalize').length > 0 ) {
       if ( frb.dayNames[language] ) {
           $('.frb-replace-dayofweek').text( frb.dayNames[language][dayNumber] );
           $('.frb-replace-dayofweek-capitalize').text( capitalizeText( frb.dayNames[language][dayNumber] ) );
       } else {
           console.log('Warning: banner should contain a day of the week, but no translations found.');
       }
   }
   if ( $('.frb-replace-dayofweek-this, .frb-replace-dayofweek-this-capitalize').length > 0 ) {
       if ( frb.dayNamesThis[language] ) {
           $('.frb-replace-dayofweek-this').text( frb.dayNamesThis[language][dayNumber] );
           $('.frb-replace-dayofweek-this-capitalize').text( capitalizeText( frb.dayNamesThis[language][dayNumber] ) );
       } else {
           console.log('Warning: banner should contain "this DAY", but no translations found.');
       }
   }
   // Capitalize
   $('.frb-capitalize').text(function( index, text ) {
       return text.charAt(0).toUpperCase() + text.slice(1);
   });
   // Replace device with iPad if needed
   var ua = navigator.userAgent;
   if ( ua.match( /ipad/i ) ) {
       $('.frb-replace-device').text( frb.iPadTranslations[language] || frb.iPadTranslations.en );
   }
   // Replace %AVERAGE% with formatted "average" amount
   var avgString, 
       average = frb.pickAmounts(frb.amounts.averages, currency, country);
   if ( frb.textAmountIsoCountries.indexOf(country) !== -1 ) {
       avgString = average + ' ' + currency;
   } else {
       avgString = frb.formatCurrency(currency, average, language).replace(/\.$/, ); // strip any period from end for use in running text
   }
   $('.frb').each(function(index){
       var newHtml = $(this).html().replace(/%AVERAGE%/g, '<frb-amt>' + avgString + '</frb-amt>');
       $(this).html(newHtml);
   });
   // Replace %MINIMUM% with formatted "if everyone" amount
   var ifString,
       ifEveryone = frb.pickAmounts(frb.amounts.ifEveryone, currency, country);
   if ( frb.textAmountIsoCountries.indexOf(country) !== -1 ) {
       ifString = ifEveryone + ' ' + currency;
   } else {
       ifString = frb.formatCurrency(currency, ifEveryone, language).replace(/\.$/, ); // strip any period from end for use in running text
   }
   $('.frb').each(function(index){
       var newHtml = $(this).html().replace(/%MINIMUM%/g, '<frb-amt>' + ifString + '</frb-amt>');
       $(this).html(newHtml);
   });
   /* Links (in smallprint) TODO: merge with frb.makeLink() */
   $('.frb-localize-links a').each(function() {
       // Add parameters for LandingCheck
       var uri = new mw.Uri( $(this).attr('href') );
       uri.extend({
           country:      country,
           language:     language,
           uselang:      language,
           utm_medium:   'sitenotice',
           utm_campaign: mw.centralNotice.data.campaign || 'test',
           utm_source:   mw.centralNotice.data.banner
       });
       $(this).attr('href', uri.toString());
       $(this).attr('target', '_blank'); // Make links open in new tab
   });
   // Add links
   frb.makeLink( '.frb-link-privacy', 'https://foundation.wikimedia.org/wiki/Special:LandingCheck?basic=true&landing_page=Donor_privacy_policy' );
   frb.makeLink( '.frb-link-tax',     'https://donate.wikimedia.org/wiki/Special:LandingCheck?basic=true&landing_page=Tax_deductibility' );
   frb.makeLink( '.frb-link-cancel',  'https://donate.wikimedia.org/wiki/Special:LandingCheck?basic=true&landing_page=Cancel_or_change_recurring_giving' );
   // Legal text variants
   if (country === 'US') {
       $('.frb-legal-US').show();
       $('.frb-legal-nonUS, .frb-legal-NL').hide();
   } else if (country === 'NL') {
       $('.frb-legal-NL').show();
       $('.frb-legal-US, .frb-legal-nonUS').hide();
   } else {
       $('.frb-legal-nonUS').show();
       $('.frb-legal-US, .frb-legal-NL').hide();
   }
   // Where Remind Me Later should be shown
   var rmlCountries = ['US', 'CA', 'GB', 'IE', 'AU', 'NZ',
                       'SE', 'IT', 'NL', 'JP', 'FR'];
   var rmlLanguages = ['en', 'fr', 'nl', 'ja', 'it', 'sv'];
   var rmlEnabled = rmlCountries.indexOf(country) !== -1 && rmlLanguages.indexOf(language) !== -1;
   if ( rmlEnabled ) {
       $('.frb').addClass('frb-rml-enabled');
   } else {
       $('.frb').addClass('frb-rml-disabled');
   }

});

/* == end of MediaWiki:FundraisingBanners/LocalizeJS-2017.js == */

/** Provides alterImpressionData hook for CentralNotice

*  This info will be sent back with Special:RecordImpression
*/

mediaWiki.centralNotice.bannerData.alterImpressionData = function( impressionData ) {

   // Returning true from this function indicates the banner was shown
   if (mediaWiki.centralNotice.bannerData.hideReason) {
       impressionData.reason = mediaWiki.centralNotice.bannerData.hideReason;
   }
   if (mediaWiki.centralNotice.bannerData.cookieCount) {
       impressionData.banner_count = mediaWiki.centralNotice.bannerData.cookieCount;
   }
   
   return !mediaWiki.centralNotice.bannerData.hideResult;

};


$(function() {

   var language = mw.centralNotice.data.uselang;
   var country  = mw.centralNotice.data.country;
   var currency = frb.getCurrency(country);
   var validAmount;
   var validMethod;
   var validOptin;
   var form = document.getElementById('frb-form');
   var showBannerFromNag = false
   var positionActivateNag = 0.2
   mw.loader.using(['mediawiki.util']).then(function() {
       frb.rml.init();
   });
   frb.initAmountOptions();
   frb.localizeAmountOptions( frb.amounts.options7, currency, country, language, true );
   frb.localizeErrors();
   frb.storedOptions = {};
   frb.extraData = {};
   frb.setMethod = function(options) {
       frb.storedOptions = options;
   };
   frb.updateUpsellAsk = function(isOtherAmountStep) {
       var amount, feeAmount, upsellAmount,
           list = frb.amounts.monthlySuggest[currency];
       // If user is on third step (write a different amount) then get monthly amount if not, the the first form amount
       if (isOtherAmountStep !== undefined) {
           amount = frb.getMonthlyAmount(); 
       } else {
           amount = frb.getAmount(form);
       }      
       
       // If PTF is checked when we need to calculate the fee for that amount
       if ( $('#frb-ptf-checkbox').prop('checked') ) {
           amount = amount + frb.calculateFee(amount);
       }
       
       for (var i = list.length - 1; i >= 0; i--) {
           if ( amount <= list[i][0] ) {
               upsellAmount = list[i][1];
           }
       }
       // If user is in the upsell (second step) then the form.otherMonthlyAmount.value will be updated with the upsellAmount calculated
       if (isOtherAmountStep === undefined) {
           form.otherMonthlyAmount.value = upsellAmount;
       }
               
       // A formatted value will be returned
       var upsellAmountFormatted = frb.formatCurrency(currency, upsellAmount, language);
       // The value of the amount will be updated only if the user is in the upsell (second step)
       if (isOtherAmountStep === undefined) {
           $('.frb-upsell-ask').text(upsellAmountFormatted);
       }        
   };
   $('.frb-amounts').on('input change', function(e) {
       var target = $(e.target);
       if ( target.attr('id') !== 'input_amount_other' ) {
           if ( frb.validateAmount() ) {
               validAmount = 1;
           } else {
               validAmount = 0;
           }
       }
       frb.updateFeeDisplay();
       frb.activateCTA();
   });
   $('.frb-methods').on('change', function() {
       $('.frb-methods').removeClass('frb-haserror');
       $('.frb-error-method').hide();
       $('.frb-optin').slideDown();
       validMethod = 1;
       frb.activateCTA();
   });
   // Opt-in interaction
   $('.frb-optin').on('change', function() {
       $('.frb-optin').removeClass('frb-haserror');
       $('.frb-error-optin').hide();
       if ( $('#frb-optin-no').is(':checked') ) {
           $('.frb-optin-prompt').removeClass('is-positive');
           $('.frb-optin-prompt').slideDown( frb.stepVisible );
       } else {
           $('.frb-optin-prompt').addClass('is-positive');
       }
       validOptin = 1;
       frb.activateCTA();
   });
   // Go to the next step of the form
   $('#frb-continue').on('click', function(e) {
       e.preventDefault();
       var status = {amount: false, method: false};
       // Validate amount
       if( frb.validateAmount() ){
           status.amount = true;
       } else {
           frb.extraData.validateError = 1;
       }
       // Validate method
       if ($('input[name="frb-methods"]:checked').length === 1) {
           status.method = true;
       } else {
           frb.extraData.validateError = 1;
           $('.frb-methods').addClass('frb-haserror');
           $('.frb-error-method').show();
       }
       if (status.amount === true && status.method === true) {
           frb.updateUpsellAsk();
           $('.frb-rml-link, .frb-rml').hide();
           if ( frb.optinRequired ) {
               frb.showStep('optin');
           } else if ( frb.upsellPossible() ) {
               frb.showStep('upsell');
           } else {
               frb.submitForm( frb.storedOptions );
           }
       }
   });
   /* -- Back buttons -- */
   $('.frb-step-optin .frb-back').on('click', function(e) {
       frb.showStep('1');
       return false;
   });
   $('.frb-step-upsell .frb-back').on('click', function(e) {
       if ( frb.optinRequired ) {
           frb.showStep('optin');
       } else {
           frb.showStep('1');
       }
       return false;
   });
   $('.frb-step-monthly-diff-amt .frb-back').on('click', function(e) {
       form.otherMonthlyAmount.value = ;
       frb.updateUpsellAsk();
       validAmount = 1;
       frb.activateCTA();
       frb.toggleMonthly(false);
       frb.showStep('upsell');
       return false;
   });
   // Donate monthly other amount
   $('.frb-monthly-diff-amt-link').on('click', function(e) {
       form.otherMonthlyAmount.value = ;
       validAmount = 0;
       frb.activateCTA();
       frb.toggleMonthly(true);
       frb.showStep('monthly-diff-amt');
       return false;
   });
   // Validate monthly other amount
   $('#frb-amt-monthly-other-input').on('input change', function(e) {
       if ( frb.validateMonthlyAmount() ) {
           validAmount = 1;
           frb.updateUpsellAsk(true);
       } else {
           validAmount = 0;
       }
       frb.activateCTA();
   });
   frb.getMonthlyAmount = function() {
       var amount = null;
       // Check the "monthly other" amount box
       if (form.otherMonthlyAmount.value !== ) {
           var otherMonthlyAmount = form.otherMonthlyAmount.value;
           otherMonthlyAmount = otherMonthlyAmount.replace(/[,.](\d)$/, ':$10');
           otherMonthlyAmount = otherMonthlyAmount.replace(/[,.](\d)(\d)$/, ':$1$2');
           otherMonthlyAmount = otherMonthlyAmount.replace(/[$£€¥,.]/g, );
           otherMonthlyAmount = otherMonthlyAmount.replace(/:/, '.');
           amount = otherMonthlyAmount;
       }
       amount = parseFloat(amount);
       if ( isNaN(amount) ) {
           return 0;
       } else {
           var totalMonthlyAmountFormatted = frb.formatCurrency(currency, amount, language);
           $('.frb-monthly-total').text(totalMonthlyAmountFormatted);
           return amount;
       }
   };
   frb.validateMonthlyAmount = function() {
       var amount = frb.getMonthlyAmount();
       var currency  = frb.getCurrency( mw.centralNotice.data.country );
       var minAmount = frb.amounts.minimums[ currency ];
       if ( amount === null || isNaN(amount) || amount <= 0 || amount < minAmount ) {
           $('.frb-error-bigamount').hide();
           $('.frb-error-smallamount').show();
           return false;
       } else if ( amount > frb.maxUSD * minAmount ) {
           $('.frb-error-bigamount').show();
           return false;
       } else {
           $('.frb-error-smallamount, .frb-error-bigamount').hide();
           return true;
       }
   };
   frb.submitMonthly = function() {
       frb.extraData.monthlyUpsell = 1;
       frb.extraData.originalAmt = frb.getAmount().toString();
       
       frb.toggleMonthly(true);
       document.getElementById('input_amount_other').checked = true;
       document.getElementById('frb-ptf-checkbox').checked = false;
       form.otherAmount.value = form.otherMonthlyAmount.value;
       frb.submitForm(frb.storedOptions);
   }
   // Submit form
   $('#frb-monthly-donate-yes').on('click', function(e) {
       frb.submitMonthly();
       return false;
   });
   $('#frb-monthly-donate-no').on('click', function(e) {
       frb.submitForm(frb.storedOptions);
       return false;
   });
   $('#frb-donate-monthly-other').on('click', function (e) {
       if (frb.validateMonthlyAmount()) {
           frb.submitMonthly();
       }
       return false;
   });
   frb.upsellPossible = function() {
       // Only do monthly convert if initial selection is one-time and payment method supports monthly and upsell value is not 0 (meaning skip). If method is CC, use the payments wiki monthly convert variant.
       if ( frb.getRecurring(document.getElementById('frb-form')) || 
               !frb.shouldShowRecurring( frb.storedOptions, mw.centralNotice.data.country ) ||
               form.otherMonthlyAmount.value == 0 ) {
           return false;
       } else if ( frb.storedOptions.method == 'cc' ){
           if ( form.otherMonthlyAmount.value == 0 ) {
               frb.setMethod({ method:'cc' });
           }
           else {
               frb.setMethod({ method:'cc', variant:'monthlyConvert' });
           }
           return false;
       } else {
           return true;
       }
   }
   $('#frb-donate').on('click', function(e) {
       if ( frb.validateForm( frb.storedOptions) ) {
           if ( frb.upsellPossible() ) {
               frb.showStep('upsell');
           } else {
               frb.submitForm( frb.storedOptions );
           }
       }
       return false;
   });
   // Make sure form elements don't overflow if expanded
   frb.stepVisible = function(){
       var divHeight = $('.frb-step-optin').height();
       $('#frb-form').animate({'height': divHeight + 80},100);
   };
   /* End step functionality */
   // Focus for #input_amount_other
   $('.frb-amt-other').click(function() {
       document.getElementById('input_amount_other').checked = true;
       frb.updateFeeDisplay();
       $('#frb-amt-other-input').focus();
   });
   // Activate #input_amount_other radio when tabbing into #frb-amt-other-input
   $('#frb-amt-other-input').focus(function() {
       document.getElementById('input_amount_other').checked = true;
       frb.updateFeeDisplay();
   });
   frb.activateCTA = function(){
       if ( validAmount && validMethod ) {
           $('#frb-continue, #frb-monthly-donate-yes, #frb-monthly-donate-no, #frb-donate-monthly-other').addClass('active');
           if (validOptin) {
               $('#frb-donate').addClass('active');
           }
       } else {
           $('.frb-submit').removeClass('active');
       }
   };


   /* --- Nag/minimized banner functionality --- */
   // On Load
   var bannerOuterHeight = $('.frb-in-article').outerHeight( true );
   var stickyHeaderTop = bannerOuterHeight + $('.frb-in-article').offset().top + 200;
   frb.initNag = function() {
       // Intercept TOC clicks, and account for nag height
       $('#toc ul > li a').on('click.frb', function(e) {
           e.preventDefault();
           var anchor = $(this).attr('href').replace('#',);
           anchor = $("[id='"+anchor+"']");
           var offsetTop = anchor.offset().top - $('.frb-nag').outerHeight();
           $('body, html').animate({ scrollTop: offsetTop }, 10);
           window.location.hash = $(this).attr('href');
       });
       // Scroll to section, accounting for nag height
       if ( window.location.hash ) {
           var agent = navigator.userAgent;
           var offsetTop;
           var hash = decodeURI(window.location.hash).replace('#',);
           hash = $("[id='"+hash+"']");
           offsetTop = hash.offset().top + bannerOuterHeight - $('.frb-nag').outerHeight();
           $('body, html').animate( { scrollTop: offsetTop }, 100 );
       }
       $(window).on('resize.frb', function() {
           bannerOuterHeight = $('.frb-in-article').outerHeight( true );
           stickyHeaderTop = bannerOuterHeight + $('.frb-in-article').offset().top + 200;
       });
       function scrollFunction() {
           if ($(window).scrollTop() >= $(window).height() * positionActivateNag && !showBannerFromNag) {
               if ( !frb.fixed ) {
                   $('.frb-in-article').hide();
                   $('.frb-nag').show();
                   $('.frb-rml').appendTo('.frb-nag .frb-form-wrapper');
               }
           } else {
               if ( frb.fixed ) {
                   $('.frb-prevent-page-jump')
                       .removeClass('frb-in-article')
                       .hide();
                   $('#frb-main')
                       .removeClass('frb-fixed')
                       .addClass('frb-in-article');
                   $('.frb-rml').appendTo('#frb-main .frb-form-wrapper');
                   frb.fixed = false;
               } else {
                   $('.frb-in-article').show();
                   $('.frb-nag').hide();
                   $('.frb-rml').appendTo('#frb-main .frb-form-wrapper');
               }
           }
       }
       $(window).on('load.frb scroll.frb resize.frb', function() {
           scrollFunction();
       });
       frb.clickNag = function(e) {
           // Add spacer to prevent jump
           var inArticleHeight = $('#frb-main').outerHeight();
           $('.frb-in-article').show();
           $('.frb-nag').hide();
           showBannerFromNag = true
           frb.extraData.clickedNag = 1;
           
           return false;
       };
       $('.frb-nag').on( 'click', frb.clickNag );
       $('#nag-yes-btn').on( 'click', frb.clickNag );
       $('#nag-rml-btn').on( 'click', function(e) {
           // Add '_nag' to RML source value
           $('#frb-rml-form input[name="rml_source"]').val('{{{banner}}}_nag');
           $('.frb-nag').addClass('frb-rml-displayed');
           $('.frb-nag').off('click'); // Remove so they can interact with RML
       });
   };
   $('.close-rml').on('click', function(e) {
       $('.frb-nag').removeClass('frb-rml-displayed');
   });
   $('.frb-close').on('click', function (e) {
       frb.hide();
       return false;
   });
   /* Hide banner outside of main namespace (and Main Page, for sites where that isn't in main namespace) */
   if ( mw.config.get('wgNamespaceNumber') > 0 && !mw.config.get('wgIsMainPage') ) {
       mw.centralNotice.bannerData.hideResult = true;
       mw.centralNotice.bannerData.hideReason = 'namespace';
   }
   /* Hide banner on mobile site, in case wrong device settings were chosen */
   if ( mw.config.get('skin') === 'minerva' ) {
       mw.centralNotice.bannerData.hideResult = true;
       mw.centralNotice.bannerData.hideReason = 'other';
   }
   if (!mw.centralNotice.bannerData.hideResult) {
       frb.initNag();
       frb.show();
   }
   /* Social share tracking via hide banner cookie for enUS campaign experiment */
   if ( $.cookie("centralnotice_hide_socialshare") != null && country === 'US' ) {
       frb.extraData.socialShare = 1;
   }

}); </script>