Files
qhmes/deploy-qhmes/frontend/js/index-CIBZG4nR.js

3 lines
27 KiB
Java
Raw Normal View History

2026-05-15 11:34:12 +08:00
var pe=Object.defineProperty,me=Object.defineProperties;var be=Object.getOwnPropertyDescriptors;var Y=Object.getOwnPropertySymbols;var Me=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable;var D=Math.pow,F=(r,e,t)=>e in r?pe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,S=(r,e)=>{for(var t in e||(e={}))Me.call(e,t)&&F(r,t,e[t]);if(Y)for(var t of Y(e))ye.call(e,t)&&F(r,t,e[t]);return r},A=(r,e)=>me(r,be(e));import{n as ke,p as j,d as xe,x as Se}from"./index-BI6CMai0.js";import{d as ve,f as Ee,e as we,u as q,h as Ae,ah as Te,ar as De,as as V,at as _,aC as Ce,ag as Ie,au as H,aG as Re,aE as Pe,aD as Le,aF as je,aH as _e,aJ as Ne,aK as Oe}from"./vue-vendor-C7Zq48Yl.js";import{i as Ue}from"./antd-vue-vendor-BPnV8VqP.js";const U=(r,e)=>r.push.apply(r,e),C=r=>r.sort((e,t)=>e.i-t.i||e.j-t.j),B=r=>{const e={};let t=1;return r.forEach(s=>{e[s]=t,t+=1}),e};var $e={4:[[1,2],[2,3]],5:[[1,3],[2,3],[2,4]],6:[[1,2],[2,4],[4,5]],7:[[1,3],[2,3],[4,5],[4,6]],8:[[2,4],[4,6]]};const Z=2050,X=1e3,We=$e,ze=10,Ge=1e4,se=10,ne=50,re=20,ae=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,Ye=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,Fe=/^[A-Z\xbf-\xdf]+$/,ie=/^[^a-z\xdf-\xff]+$/,qe=/^[a-z\xdf-\xff]+$/,Ve=/^[^A-Z\xbf-\xdf]+$/,He=/[a-z\xdf-\xff]/,Be=/[A-Z\xbf-\xdf]/,Ze=/[^A-Za-z\xbf-\xdf]/gi,Xe=/^\d+$/,W=new Date().getFullYear(),Ke={recentYear:/19\d\d|200\d|201\d|202\d/g},oe=[" ",",",";",":","|","/","\\","_",".","-"],Je=oe.length;class Qe{match({password:e}){const t=[...this.getMatchesWithoutSeparator(e),...this.getMatchesWithSeparator(e)],s=this.filterNoise(t);return C(s)}getMatchesWithSeparator(e){const t=[],s=/^(\d{1,4})([\s/\\_.-])(\d{1,2})\2(\d{1,4})$/;for(let n=0;n<=Math.abs(e.length-6);n+=1)for(let a=n+5;a<=n+9&&!(a>=e.length);a+=1){const i=e.slice(n,+a+1||9e9),o=s.exec(i);if(o!=null){const c=this.mapIntegersToDayMonthYear([parseInt(o[1],10),parseInt(o[3],10),parseInt(o[4],10)]);c!=null&&t.push({pattern:"date",token:i,i:n,j:a,separator:o[2],year:c.year,month:c.month,day:c.day})}}return t}getMatchesWithoutSeparator(e){const t=[],s=/^\d{4,8}$/,n=a=>Math.abs(a.year-W);for(let a=0;a<=Math.abs(e.length-4);a+=1)for(let i=a+3;i<=a+7&&!(i>=e.length);i+=1){const o=e.slice(a,+i+1||9e9);if(s.exec(o)){const c=[],l=o.length;if(We[l].forEach(([f,p])=>{const m=this.mapIntegersToDayMonthYear([parseInt(o.slice(0,f),10),parseInt(o.slice(f,p),10),parseInt(o.slice(p),10)]);m!=null&&c.push(m)}),c.length>0){let f=c[0],p=n(c[0]);c.slice(1).forEach(m=>{const d=n(m);d<p&&(f=m,p=d)}),t.push({pattern:"date",token:o,i:a,j:i,separator:"",year:f.year,month:f.month,day:f.day})}}}return t}filterNoise(e){return e.filter(t=>{let s=!1;const n=e.length;for(let a=0;a<n;a+=1){const i=e[a];if(t!==i&&i.i<=t.i&&i.j>=t.j){s=!0;break}}return!s})}mapIntegersToDayMonthYear(e){if(e[1]>31||e[1]<=0)return null;let t=0,s=0,n=0;for(let a=0,i=e.length;a<i;a+=1){const o=e[a];if(o>99&&o<X||o>Z)return null;o>31&&(s+=1),o>12&&(t+=1),o<=0&&(n+=1)}return s>=2||t===3||n>=2?null:this.getDayMonth(e)}getDayMonth(e){const t=[[e[2],e.slice(0,2)],[e[0],e.slice(1,3)]],s=t.length;for(let n=0;n<s;n+=1){const[a,i]=t[n];if(X<=a&&a<=Z){const o=this.mapIntegersToDayMonth(i);return o!=null?{year:a,month:o.month,day:o.day}:null}}for(let n=0;n<s;n+=1){const[a,i]=t[n],o=this.mapIntegersToDayMonth(i);if(o!=null)return{year:this.twoToFourDigitYear(a),month:o.month,day:o.day}}return null}mapIntegersToDayMonth(e){const t=[e,e.slice().reverse()];for(let s=0;s<t.length;s+=1){const n=t[s],a=n[0],i=n[1];if(a>=1&&a<=31&&i>=1&&i<=12)return{day:a,month:i}}return null}twoToFourDigitYear(e){return e>99?e:e>50?e+1900:e+2e3}}const w=new Uint32Array(65536),et=(r,e)=>{const t=r.length,s=e.length,n=1<<t-1;let a=-1,i=0,o=t,c=t;for(;c--;)w[r.charCodeAt(c)]|=1<<c;for(c=0;c<s;c++){let l=w[e.charCodeAt(c)];const h=l|i;l|=(l&a)+a^a,i|=~(l|a),a&=l,i&n&&o++,a&n&&o--,i=i<<1|1,a=a<<1|~(h|i),i&=h}for(c=t;c--;)w[r.charCodeAt(c)]=0;return o},tt=(r,e)=>{const t=e.length,s=r.length,n=[],a=[],i=Math.ceil(t/32),o=Math.ceil(s/32);for(let d=0;d<i;d++)a[d]=-1,n[d]=0;let c=0;for(;c<o-1;c++){let d=0,b=-1;const v=c*32,y=Math.min(32,s)+v
])(${e})(?!${e})`,"g")}match({password:e}){const t=[];if(e.length===0)return t;const s=L.getMostUsedSeparatorChar(e);if(s===void 0)return t;const n=L.getSeparatorRegex(s);for(const a of e.matchAll(n)){if(a.index===void 0)continue;const i=a.index+1;t.push({pattern:"separator",token:s,i,j:i})}return t}}class jt{constructor(){this.matchers={date:Qe,dictionary:ut,regex:dt,repeat:It,sequence:Rt,spatial:Pt,separator:L}}match(e){const t=[],s=[];return[...Object.keys(this.matchers),...Object.keys(u.matchers)].forEach(a=>{if(!this.matchers[a]&&!u.matchers[a])return;const i=this.matchers[a]?this.matchers[a]:u.matchers[a].Matching,c=new i().match({password:e,omniMatch:this});c instanceof Promise?(c.then(l=>{U(t,l)}),s.push(c)):U(t,c)}),s.length>0?new Promise((a,i)=>{Promise.all(s).then(()=>{a(C(t))}).catch(o=>{i(o)})}):C(t)}}const ce=1,le=ce*60,he=le*60,ue=he*24,de=ue*31,fe=de*12,_t=fe*100,O={second:ce,minute:le,hour:he,day:ue,month:de,year:fe,century:_t};class Nt{translate(e,t){let s=e;t!==void 0&&t!==1&&(s+="s");const{timeEstimation:n}=u.translations;return n[s].replace("{base}",`${t}`)}estimateAttackTimes(e){const t={onlineThrottling100PerHour:e/.027777777777777776,onlineNoThrottling10PerSecond:e/10,offlineSlowHashing1e4PerSecond:e/1e4,offlineFastHashing1e10PerSecond:e/1e10},s={onlineThrottling100PerHour:"",onlineNoThrottling10PerSecond:"",offlineSlowHashing1e4PerSecond:"",offlineFastHashing1e10PerSecond:""};return Object.keys(t).forEach(n=>{const a=t[n];s[n]=this.displayTime(a)}),{crackTimesSeconds:t,crackTimesDisplay:s,score:this.guessesToScore(e)}}guessesToScore(e){return e<1005?0:e<1000005?1:e<100000005?2:e<1e10+5?3:4}displayTime(e){let t="centuries",s;const n=Object.keys(O),a=n.findIndex(i=>e<O[i]);return a>-1&&(t=n[a-1],a!==0?s=Math.round(e/O[t]):t="ltSecond"),this.translate(t,s)}}var Ot=(()=>null),Ut=(()=>({warning:u.translations.warnings.dates,suggestions:[u.translations.suggestions.dates]}));const $t=(r,e)=>{let t=null;return e&&!r.l33t&&!r.reversed?r.rank<=10?t=u.translations.warnings.topTen:r.rank<=100?t=u.translations.warnings.topHundred:t=u.translations.warnings.common:r.guessesLog10<=4&&(t=u.translations.warnings.similarToCommon),t},Wt=(r,e)=>{let t=null;return e&&(t=u.translations.warnings.wordByItself),t},zt=(r,e)=>e?u.translations.warnings.namesByThemselves:u.translations.warnings.commonNames,Gt=(r,e)=>{let t=null;const s=r.dictionaryName,n=s==="lastnames"||s.toLowerCase().includes("firstnames");return s==="passwords"?t=$t(r,e):s.includes("wikipedia")?t=Wt(r,e):n?t=zt(r,e):s==="userInputs"&&(t=u.translations.warnings.userInputs),t};var Yt=((r,e)=>{const t=Gt(r,e),s=[],n=r.token;return n.match(ae)?s.push(u.translations.suggestions.capitalization):n.match(ie)&&n.toLowerCase()!==n&&s.push(u.translations.suggestions.allUppercase),r.reversed&&r.token.length>=4&&s.push(u.translations.suggestions.reverseWords),r.l33t&&s.push(u.translations.suggestions.l33t),{warning:t,suggestions:s}}),Ft=(r=>r.regexName==="recentYear"?{warning:u.translations.warnings.recentYears,suggestions:[u.translations.suggestions.recentYears,u.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]}),qt=(r=>{let e=u.translations.warnings.extendedRepeat;return r.baseToken.length===1&&(e=u.translations.warnings.simpleRepeat),{warning:e,suggestions:[u.translations.suggestions.repeated]}}),Vt=(()=>({warning:u.translations.warnings.sequences,suggestions:[u.translations.suggestions.sequences]})),Ht=(r=>{let e=u.translations.warnings.keyPattern;return r.turns===1&&(e=u.translations.warnings.straightRow),{warning:e,suggestions:[u.translations.suggestions.longerKeyboardPattern]}}),Bt=(()=>null);const te={warning:null,suggestions:[]};class Zt{constructor(){this.matchers={bruteforce:Ot,date:Ut,dictionary:Yt,regex:Ft,repeat:qt,sequence:Vt,spatial:Ht,separator:Bt},this.defaultFeedback={warning:null,suggestions:[]},this.setDefaultSuggestions()}setDefaultSuggestions(){this.defaultFeedback.suggestions.push(u.translations.suggestions.useWords,u.translations.suggestions.noNeed)}getFeedback(e,t){if(t.length===0)return this.defaultFeedback;if(e>2)ret