text: "use strict";function n(n){return void 0===n&&(n=""),n.length}function r(n,r,t){void 0===n&&(n=""),void 0===r&&(r=[]),void 0===t&&(t=!1);var i=function(n,r){void 0===n&&(n="");void 0===r&&(r=!1);return r?+n.split("").slice(-2,-1).pop():+n.split("").slice(-1).pop()}(n,t),o=function(n,r,t){void 0===n&&(n="");void 0===r&&(r=[]);void 0===t&&(t=!1);return function(n,r){void 0===n&&(n="");void 0===r&&(r=!1);var t=r?-2:-1;return n.split("").slice(0,t).map((function(n){return+n}))}(n,t).reduce((function(n,t,i){return n+t*r[i]}),0)}(n,r,t);return function(n,r){void 0===n&&(n=0);void 0===r&&(r=0);var t=n-r;return 10===t?0:t}(o,function(n,r){void 0===n&&(n=0);void 0===r&&(r=1);return Math.trunc(n/r)*r}(o,11))===i}Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkItn=function(t){var i="number"==typeof t?t.toString():t;if(!function(n){void 0===n&&(n="");return n.split("").every((function(n){return!1===isNaN(parseInt(n))}))}(i))throw new Error("INN number should contain only digits");if(!function(r){void 0===r&&(r="");return[10,12].includes(n(r))}(i))throw new Error("INN length should be 10 or 12");switch(n(i)){case 10:return function(n){void 0===n&&(n="");return r(n,[2,4,10,3,5,9,4,6,8])}(i);case 12:return function(n){void 0===n&&(n="");var t=r(n,[7,2,4,10,3,5,9,4,6,8],!0);return t?r(n,[3,7,2,4,10,3,5,9,4,6,8]):t}(i)}};
  