1
0
Modern-Password-Generator/js/PasswordQualityCalculator.min.js

2 lines
10 KiB
JavaScript
Raw Normal View History

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.PasswordQualityCalculator=e():t.PasswordQualityCalculator=e()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=0)}([function(t,e,r){t.exports=r(1)},function(t,e,r){"use strict";r.r(e);var n={};r.r(n),r.d(n,"getMaxLength",function(){return o}),r.d(n,"ContainsLength",function(){return a}),r.d(n,"IsPopularPassword",function(){return u}),r.d(n,"GetDictSize",function(){return h}),r.d(n,"load",function(){return s}),r.d(n,"reset",function(){return c});var i={};function o(){for(var t=0,e=0,r=Object.keys(i);e<r.length;e++){var n=r[e];parseInt(n)>t&&(t=parseInt(n))}return t}function a(t){return t in i}function u(t){if(null==t)throw new Error;return 0!=t.length&&(t.length in i&&i[t.length].includes(t))}function h(t){return t in i?i[t].length:0}function s(t){var e=!0,r=!1,n=void 0;try{for(var o,a=t[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var u=o.value;u.length in i?i[u.length].push(u):i[u.length]=[u]}}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}}function c(){(function(t){throw new Error('"'+t+'" is read-only')})("m_dicts"),i={}}function l(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function p(t,e,r){return e&&d(t.prototype,e),r&&d(t,r),t}r.d(e,"default",function(){return I});var g={LowerAlpha:"L",UpperAlpha:"U",Digit:"D",Special:"S",High:"H",Other:"X",Dictionary:"W",Repetition:"R",Number:"N",DiffSeq:"C",All:"LUDSHXWRNC"},v="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",C="ABCDEFGHIJKLMNOPQRSTUVWXYZ",y="abcdefghijklmnopqrstuvwxyz",m="0123456789",A=function(){var t,e=[];for(t=161;t<=172;++t)e.push(t);for(t=174;t<255;++t)e.push(t);return e.push(255),String.fromCharCode.apply(null,e)}();function b(t,e){if(!t)throw new Error(e)}var w,_=function(){function t(e,r,n){var i;if(f(this,t),"string"==typeof r){if(0===r.length)throw new Error}else{if("number"!=typeof r)throw new Error;if(i<=0)throw new RangeError;i=r,r=null,n=!1}this.TypeID=e,this.Alphabet=r,this.CharCount=i||this.Alphabet.length,this.m_chFirst=n?this.Alphabet.charCodeAt(0):null,this.m_chLast=n?this.Alphabet.charCodeAt(this.CharCount-1):null,this.CharSize=Math.log2(this.CharCount),i||b(this.m_chLast-this.m_chFirst==this.CharCount-1||!n)}return p(t,[{key:"Contains",value:function(t){if(null!==this.m_chLast)return t>=this.m_chFirst&&t<=this.m_chLast;if(0===this.Alphabet.length)throw new Error("Don't call for catch-none set");return this.Alphabet.indexOf(String.fromCharCode(t))>=0}}]),t}(),O=function(){function t(e,r,n,i){if(f(this,t),null===e||
//# sourceMappingURL=PasswordQualityCalculator.js.map