Files
prestashop/themes/5fd077d4d21a6cb1e86b-chunk.js

1 line
28 KiB
JavaScript
Raw Permalink Normal View History

"use strict";(self.webpackChunkprestashop_core_theme_js=self.webpackChunkprestashop_core_theme_js||[]).push([[736],{736:(e,t,s)=>{s.r(t),s.d(t,{Options:()=>T,debounce:()=>tt,zxcvbn:()=>pt,zxcvbnAsync:()=>gt,zxcvbnOptions:()=>A});const n=(e,t)=>e.push.apply(e,t),r=e=>e.sort(((e,t)=>e.i-t.i||e.j-t.j)),a=e=>{const t={};let s=1;return e.forEach((e=>{t[e]=s,s+=1})),t};const o={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]]},i=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,l=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,c=/^[A-Z\xbf-\xdf]+$/,h=/^[^a-z\xdf-\xff]+$/,u=/^[a-z\xdf-\xff]+$/,d=/^[^A-Z\xbf-\xdf]+$/,p=/[a-z\xdf-\xff]/,g=/[A-Z\xbf-\xdf]/,f=/[^A-Za-z\xbf-\xdf]/gi,b=/^\d+$/,m=(new Date).getFullYear(),y={recentYear:/19\d\d|200\d|201\d|202\d/g},w=[" ",",",";",":","|","/","\\","_",".","-"],k=w.length;class x{match({password:e}){const t=[...this.getMatchesWithoutSeparator(e),...this.getMatchesWithSeparator(e)],s=this.filterNoise(t);return r(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 r=n+5;r<=n+9&&!(r>=e.length);r+=1){const a=e.slice(n,+r+1||9e9),o=s.exec(a);if(null!=o){const e=this.mapIntegersToDayMonthYear([parseInt(o[1],10),parseInt(o[3],10),parseInt(o[4],10)]);null!=e&&t.push({pattern:"date",token:a,i:n,j:r,separator:o[2],year:e.year,month:e.month,day:e.day})}}return t}getMatchesWithoutSeparator(e){const t=[],s=/^\d{4,8}$/,n=e=>Math.abs(e.year-m);for(let r=0;r<=Math.abs(e.length-4);r+=1)for(let a=r+3;a<=r+7&&!(a>=e.length);a+=1){const i=e.slice(r,+a+1||9e9);if(s.exec(i)){const e=[],s=i.length;if(o[s].forEach((([t,s])=>{const n=this.mapIntegersToDayMonthYear([parseInt(i.slice(0,t),10),parseInt(i.slice(t,s),10),parseInt(i.slice(s),10)]);null!=n&&e.push(n)})),e.length>0){let s=e[0],o=n(e[0]);e.slice(1).forEach((e=>{const t=n(e);t<o&&(s=e,o=t)})),t.push({pattern:"date",token:i,i:r,j:a,separator:"",year:s.year,month:s.month,day:s.day})}}}return t}filterNoise(e){return e.filter((t=>{let s=!1;const n=e.length;for(let r=0;r<n;r+=1){const n=e[r];if(t!==n&&n.i<=t.i&&n.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 r=0,a=e.length;r<a;r+=1){const a=e[r];if(a>99&&a<1e3||a>2050)return null;a>31&&(s+=1),a>12&&(t+=1),a<=0&&(n+=1)}return s>=2||3===t||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 e=0;e<s;e+=1){const[s,n]=t[e];if(1e3<=s&&s<=2050){const e=this.mapIntegersToDayMonth(n);return null!=e?{year:s,month:e.month,day:e.day}:null}}for(let e=0;e<s;e+=1){const[s,n]=t[e],r=this.mapIntegersToDayMonth(n);if(null!=r)return{year:this.twoToFourDigitYear(s),month:r.month,day:r.day}}return null}mapIntegersToDayMonth(e){const t=[e,e.slice().reverse()];for(let e=0;e<t.length;e+=1){const s=t[e],n=s[0],r=s[1];if(n>=1&&n<=31&&r>=1&&r<=12)return{day:n,month:r}}return null}twoToFourDigitYear(e){return e>99?e:e>50?e+1900:e+2e3}}const v=new Uint32Array(65536),M=(e,t)=>{if(e.length<t.length){const s=t;t=e,e=s}return 0===t.length?e.length:e.length<=32?((e,t)=>{const s=e.length,n=t.length,r=1<<s-1;let a=-1,o=0,i=s,l=s;for(;l--;)v[e.charCodeAt(l)]|=1<<l;for(l=0;l<n;l++){let e=v[t.charCodeAt(l)];const s=e|o;e|=(e&a)+a^a,o|=~(e|a),a&=e,o&r&&i++,a&r&&i--,o=o<<1|1,a=a<<1|~(s|o),o&=s}for(l=s;l--;)v[e.charCodeAt(l)]=0;return i})(e,t):((e,t)=>{const s=t.length,n=e.length,r=[],a=[],o=Math.ceil(s/32),i=Math.ceil(n/32);for(let e=0;e<o;e++)a[e]=-1,r[e]=0;let l=0;for(;l<i-1;l++){let o=0,i=-1;const c=32*l,h=Math.min(32,n)+c;for(let t=c;t<h;t++)v[e.charCodeAt(t)]|=1<<t;for(let e=0;e<s;e++){const s=v[t.charCodeAt(e)],n=a[e/32|0]>>>e&1,l=r[e/32|0]>>>e&1,c=s|o,h=((s|l)&i)+i^i|s|l;let u=o|~(h|i),d=i&h;u>>>31^n&&(a[e/32|0]^=1<<e),d>>>31^l&&(r[e/32|0]^=1<<e),u=u<<1|n,d=d<<1|l,i=d|~(c|u),o=u&c}for(let t=c;t<h;t++)v[e.charCodeAt(t)]=0}let c=0,h=-1;const u=32*l,d=Math.min(32,n-u)+u;for(let t=u;t<d;t++)v[e.charCodeAt(t)]|=1<<t;let p=n;for(let e=0;e<s;e++){const s=v[t.charCodeAt(e)],o=a[e/32|0]>>>e&1,i=r[e/32|0]>>>e&1,