diff --git a/dist/vatrates.js b/dist/vatrates.js index 7a7aab4..ba138e8 100644 --- a/dist/vatrates.js +++ b/dist/vatrates.js @@ -1,5 +1,5 @@ /*! - * VATRates v2.0.2 + * VATRates v2.0.3 * MIT License */ (function webpackUniversalModuleDefinition(root, factory) { diff --git a/dist/vatrates.min.js b/dist/vatrates.min.js index 859d3ae..e313009 100644 --- a/dist/vatrates.min.js +++ b/dist/vatrates.min.js @@ -1,5 +1,5 @@ /*! - * VATRates v2.0.2 + * VATRates v2.0.3 * MIT License */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VATRates=t():e.VATRates=t()}(this,function(){return function(e){function t(d){if(r[d])return r[d].exports;var o=r[d]={i:d,l:!1,exports:{}};return e[d].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,d){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:d})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t){e.exports={rates:[{name:"Austria",code:"AT",countryCode:"AT",periods:[{effectiveFrom:"2016-01-01",rates:{reduced:[10,13],standard:20,parking:13}},{effectiveFrom:"0000-01-01",rates:{reduced:[10],standard:20,parking:12}}]},{name:"Belgium",code:"BE",countryCode:"BE",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[6,12],standard:21,parking:12}}]},{name:"Bulgaria",code:"BG",countryCode:"BG",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[9],standard:20}}]},{name:"Croatia",code:"HR",countryCode:"HR",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,13],standard:25}}]},{name:"Cyprus",code:"CY",countryCode:"CY",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,9],standard:19}}]},{name:"Czech Republic",code:"CZ",countryCode:"CZ",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[10,15],standard:21}}]},{name:"Denmark",code:"DK",countryCode:"DK",periods:[{effectiveFrom:"0000-01-01",rates:{standard:25}}]},{name:"Estonia",code:"EE",countryCode:"EE",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[9],standard:20}}]},{name:"Germany",code:"DE",countryCode:"DE",periods:[{effectiveFrom:"2021-01-01",rates:{reduced:[7],standard:19}},{effectiveFrom:"2020-07-01",rates:{reduced:[5],standard:16}},{effectiveFrom:"2007-01-01",rates:{reduced:[7],standard:19}},{effectiveFrom:"0000-01-01",rates:{reduced:[7],standard:16}}]},{name:"Greece",code:"EL",countryCode:"GR",periods:[{effectiveFrom:"2016-06-01",rates:{reduced:[6,13],standard:24}},{effectiveFrom:"2015-01-01",rates:{reduced:[6,13],standard:23}},{effectiveFrom:"0000-01-01",rates:{reduced:[6.5,13],standard:23}}]},{name:"Finland",code:"FI",countryCode:"FI",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[10,14],standard:24}}]},{name:"France",code:"FR",countryCode:"FR",periods:[{effectiveFrom:"0000-01-01",rates:{superReduced:2.1,reduced:[5.5,10],standard:20}}]},{name:"Hungary",code:"HU",countryCode:"HU",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,18],standard:27}}]},{name:"Ireland",code:"IE",countryCode:"IE",periods:[{effectiveFrom:"0000-01-01",rates:{superReduced:4.8,reduced:[9,13.5],standard:23,parking:13.5}}]},{name:"Italy",code:"IT",countryCode:"IT",periods:[{effectiveFrom:"0000-01-01",rates:{superReduced:4,reduced:[5,10],standard:22}}]},{name:"Latvia",code:"LV",countryCode:"LV",periods:[{effectiveFrom:"2018-01-01",rates:{superReduced:5,reduced:[12],standard:21}},{effectiveFrom:"0000-01-01",rates:{reduced:[12],standard:21}}]},{name:"Lithuania",code:"LT",countryCode:"LT",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,9],standard:21}}]},{name:"Luxembourg",code:"LU",countryCode:"LU",periods:[{effectiveFrom:"2016-01-01",rates:{superReduced:3,reduced:[8],standard:17,parking:14}},{effectiveFrom:"2015-01-01",rates:{superReduced:3,reduced:[8,14],standard:17,parking:12}},{effectiveFrom:"0000-01-01",rates:{superReduced:3,reduced:[6,12],standard:15,parking:12}}]},{name:"Malta",code:"MT",countryCode:"MT",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,7],standard:18}}]},{name:"Netherlands",code:"NL",countryCode:"NL",periods:[{effectiveFrom:"2019-01-01",rates:{reduced:[9],standard:21}},{effectiveFrom:"2012-01-01",rates:{reduced:[6],standard:21}},{effectiveFrom:"0000-01-01",rates:{reduced:[6],standard:19}}]},{name:"Poland",code:"PL",countryCode:"PL",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,8],standard:23}}]},{name:"Portugal",code:"PT",countryCode:"PT",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[6,13],standard:23,parking:13}}]},{name:"Romania",code:"RO",countryCode:"RO",periods:[{effectiveFrom:"2017-01-01",rates:{reduced:[5,9],standard:19}},{effectiveFrom:"2016-01-01",rates:{reduced:[5,9],standard:20}},{effectiveFrom:"0000-01-01",rates:{reduced:[5,9],standard:24}}]},{name:"Slovakia",code:"SK",countryCode:"SK",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[10],standard:20}}]},{name:"Slovenia",code:"SI",countryCode:"SI",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[9.5],standard:22}}]},{name:"Spain",code:"ES",countryCode:"ES",periods:[{effectiveFrom:"0000-01-01",rates:{superReduced:4,reduced:[10],standard:21}}]},{name:"Sweden",code:"SE",countryCode:"SE",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[6,12],standard:25}}]},{name:"United Kingdom",code:"UK",countryCode:"GB",periods:[{effectiveFrom:"2011-01-04",rates:{reduced:[5],standard:20}},{effectiveFrom:"2010-01-01",rates:{reduced:[5],standard:17.5}},{effectiveFrom:"2008-12-01",rates:{reduced:[5],standard:15}},{effectiveFrom:"1991-03-19",rates:{reduced:[8],standard:17.5}},{effectiveFrom:"0000-01-01",rates:{reduced:[8],standard:15}}]}]}},function(e,t,r){"use strict";var d=r(3),o=r(2),n=r(0),a=[];n&&n.rates&&n.rates.forEach(function(e){var t=[];e.periods&&e.periods.forEach(function(e){t.push(new d(new Date(e.effectiveFrom),e.rates.superReduced,e.rates.reduced,e.rates.standard,e.rates.parking))}),a.push(new o(e.name,e.code,e.countryCode,t))}),e.exports=a},function(e,t,r){"use strict";function d(e,t,r,d,o){this._name=e,this._code=t,this._countryCode=r,this._periods=d,this.setDate(o)}d.prototype.getName=function(){return this._name},d.prototype.getCode=function(){return this._code},d.prototype.getCountryCode=function(){return this._countryCode},d.prototype.getPeriods=function(){return this._periods},d.prototype.setDate=function(e){e||(e=new Date),this._date=e},d.prototype.getPeriod=function(e){for(var t,r=this._periods.length-1;r>=0;r--){var d=this._periods[r];d.getEffectiveFrom()<=e&&(t=d)}return t},d.prototype.getCurrentPeriod=function(){return this.getPeriod(this._date)},d.prototype.usedVATOnDate=function(e){var t=this.getPeriod(e);return!(!t||!t.getStandardRate())},d.prototype.usedVATOnCurrentDate=function(){return this.usedVATOnDate(this._date)},d.prototype.getSuperReducedRate=function(){var e=this.getCurrentPeriod();return e?e.getSuperReducedRate():void 0},d.prototype.getReducedRates=function(){var e=this.getCurrentPeriod();return e?e.getReducedRates():void 0},d.prototype.getStandardRate=function(){var e=this.getCurrentPeriod();return e?e.getStandardRate():void 0},d.prototype.getParkingRate=function(){var e=this.getCurrentPeriod();return e?e.getParkingRate():void 0},e.exports=d},function(e,t,r){"use strict";function d(e,t,r,d,o){this._effectiveFrom=e,this._superReduced=t,this._reduced=r,this._standard=d,this._parking=o}d.prototype.getEffectiveFrom=function(){return this._effectiveFrom},d.prototype.getSuperReducedRate=function(){return this._superReduced},d.prototype.getReducedRates=function(){return this._reduced},d.prototype.getStandardRate=function(){return this._standard},d.prototype.getParkingRate=function(){return this._parking},e.exports=d},function(e,t,r){"use strict";function d(e){this._countries=n,this.setDate(e)}var o=r(0),n=r(1);d.prototype.setDate=function(e){e?"string"==typeof e&&(e=new Date(e)):e=new Date,this._date=e;var t=[];this._countries.forEach(function(r){r.setDate(e),t.push(r)}),this._countries=t.length>0?t:void 0},d.prototype.getCountries=function(e){if(e)return this._countries;var t=[];return this._countries.forEach(function(e){e.usedVATOnCurrentDate()&&t.push(e)}),t},d.prototype.getCountry=function(e){e=e.toUpperCase();for(var t,r=this.getCountries(),d=0;d