{"version":3,"sources":["jsdelivr-header.js","/npm/tva@1.0.1/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACAA,MAAM,IACL,WAAA,CAAY,GACX,KAAK,MAAQ,CACd,CAEA,OAAA,GAGC,IAFc,IAAI,OAAO,oBAEd,KAAK,KAAK,OAAQ,OAAO,EAKpC,OAHa,KAAK,MAAM,MAAM,EAAG,KAChB,KAAW,KAAK,MAAM,OAAO,GAAK,GAA7B,GAAoC,EAG3D","file":"/npm/tva@1.0.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/tva@1.0.1/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\r\n * Intercommunity VAT starts with the letters FR, \r\n * followed by a key and ends with the company's SIREN number.\r\n * \r\n * @api public\r\n */\r\nclass TVA {\r\n\tconstructor(value) {\r\n\t\tthis.value = value\r\n\t}\r\n\r\n\tisValid() {\r\n\t\tconst regex = new RegExp('(FR)([0-9]{11}$)')\r\n\r\n\t\tif (!regex.test(this.value)) return false\r\n    \r\n\t\tconst cle = +this.value.slice(2, 4)\r\n\t\tconst ctrlKey = (12 + 3 * (+this.value.slice(-9) % 97)) % 97\r\n    \r\n\t\treturn cle == ctrlKey\r\n\t}\r\n}\r\n"]}