shu-c-view
Version:
rollup 打包vue组件库框架
7 lines (6 loc) • 48.6 kB
JavaScript
/*!
* shu-c-view v1.2.82
* (c) 2024-06-26
* @license MIT
*/
;Object.defineProperty(exports,"__esModule",{value:!0});var t=require("lodash/isArray"),e=require("lodash/isEmpty");function n(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var r,s,o=n(t),i=n(e),a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},c=function(t){try{return!!t()}catch(t){return!0}},u=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!c((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),h=l,f=Function.prototype,d=f.call,p=h&&f.bind.bind(d,d),g=h?p:function(t){return function(){return d.apply(t,arguments)}},b=function(t){return null==t},m=b,y=TypeError,v=function(t){if(m(t))throw y("Can't call method on "+t);return t},w=v,x=Object,S=function(t){return x(w(t))},k=S,M=g({}.hasOwnProperty),j=Object.hasOwn||function(t,e){return M(k(t),e)},E=u,I=j,O=Function.prototype,T=E&&Object.getOwnPropertyDescriptor,C=I(O,"name"),A={EXISTS:C,PROPER:C&&"something"===function(){}.name,CONFIGURABLE:C&&(!E||E&&T(O,"name").configurable)},P={},R=function(t){return t&&t.Math==Math&&t},_=R("object"==typeof globalThis&&globalThis)||R("object"==typeof window&&window)||R("object"==typeof self&&self)||R("object"==typeof a&&a)||function(){return this}()||Function("return this")(),D="object"==typeof document&&document.all,L={all:D,IS_HTMLDDA:void 0===D&&void 0!==D},N=L.all,F=L.IS_HTMLDDA?function(t){return"function"==typeof t||t===N}:function(t){return"function"==typeof t},$=F,W=L.all,z=L.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:$(t)||t===W}:function(t){return"object"==typeof t?null!==t:$(t)},q=z,Y=_.document,B=q(Y)&&q(Y.createElement),U=function(t){return B?Y.createElement(t):{}},G=U,H=!u&&!c((function(){return 7!=Object.defineProperty(G("div"),"a",{get:function(){return 7}}).a})),V=u&&c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),X=z,K=String,Z=TypeError,J=function(t){if(X(t))return t;throw Z(K(t)+" is not an object")},Q=l,tt=Function.prototype.call,et=Q?tt.bind(tt):function(){return tt.apply(tt,arguments)},nt=_,rt=F,st=function(t){return rt(t)?t:void 0},ot=function(t,e){return arguments.length<2?st(nt[t]):nt[t]&&nt[t][e]},it=g({}.isPrototypeOf),at=_,ct=ot("navigator","userAgent")||"",ut=at.process,lt=at.Deno,ht=ut&&ut.versions||lt&<.version,ft=ht&&ht.v8;ft&&(s=(r=ft.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!s&&ct&&(!(r=ct.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=ct.match(/Chrome\/(\d+)/))&&(s=+r[1]);var dt=s,pt=c,gt=!!Object.getOwnPropertySymbols&&!pt((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&dt&&dt<41})),bt=gt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,mt=ot,yt=F,vt=it,wt=Object,xt=bt?function(t){return"symbol"==typeof t}:function(t){var e=mt("Symbol");return yt(e)&&vt(e.prototype,wt(t))},St=String,kt=F,Mt=function(t){try{return St(t)}catch(t){return"Object"}},jt=TypeError,Et=function(t){if(kt(t))return t;throw jt(Mt(t)+" is not a function")},It=b,Ot=function(t,e){var n=t[e];return It(n)?void 0:Et(n)},Tt=et,Ct=F,At=z,Pt=TypeError,Rt={exports:{}},_t=_,Dt=Object.defineProperty,Lt=function(t,e){try{Dt(_t,t,{value:e,configurable:!0,writable:!0})}catch(n){_t[t]=e}return e},Nt=Lt,Ft=_["__core-js_shared__"]||Nt("__core-js_shared__",{}),$t=Ft;(Rt.exports=function(t,e){return $t[t]||($t[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Wt=g,zt=0,qt=Math.random(),Yt=Wt(1..toString),Bt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Yt(++zt+qt,36)},Ut=_,Gt=Rt.exports,Ht=j,Vt=Bt,Xt=gt,Kt=bt,Zt=Gt("wks"),Jt=Ut.Symbol,Qt=Jt&&Jt.for,te=Kt?Jt:Jt&&Jt.withoutSetter||Vt,ee=function(t){if(!Ht(Zt,t)||!Xt&&"string"!=typeof Zt[t]){var e="Symbol."+t;Xt&&Ht(Jt,t)?Zt[t]=Jt[t]:Zt[t]=Kt&&Qt?Qt(e):te(e)}return Zt[t]},ne=et,re=z,se=xt,oe=Ot,ie=function(t,e){var n,r;if("string"===e&&Ct(n=t.toString)&&!At(r=Tt(n,t)))return r;if(Ct(n=t.valueOf)&&!At(r=Tt(n,t)))return r;if("string"!==e&&Ct(n=t.toString)&&!At(r=Tt(n,t)))return r;throw Pt("Can't convert object to primitive value")},ae=TypeError,ce=ee("toPrimitive"),ue=function(t,e){if(!re(t)||se(t))return t;var n,r=oe(t,ce);if(r){if(void 0===e&&(e="default"),n=ne(r,t,e),!re(n)||se(n))return n;throw ae("Can't convert object to primitive value")}return void 0===e&&(e="number"),ie(t,e)},le=xt,he=function(t){var e=ue(t,"string");return le(e)?e:e+""},fe=u,de=H,pe=V,ge=J,be=he,me=TypeError,ye=Object.defineProperty,ve=Object.getOwnPropertyDescriptor;P.f=fe?pe?function(t,e,n){if(ge(t),e=be(e),ge(n),"function"==typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var r=ve(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return ye(t,e,n)}:ye:function(t,e,n){if(ge(t),e=be(e),ge(n),de)try{return ye(t,e,n)}catch(t){}if("get"in n||"set"in n)throw me("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var we=u,xe=A.EXISTS,Se=g,ke=P.f,Me=Function.prototype,je=Se(Me.toString),Ee=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Ie=Se(Ee.exec);we&&!xe&&ke(Me,"name",{configurable:!0,get:function(){try{return Ie(Ee,je(this))[1]}catch(t){return""}}});var Oe={},Te={},Ce={}.propertyIsEnumerable,Ae=Object.getOwnPropertyDescriptor,Pe=Ae&&!Ce.call({1:2},1);Te.f=Pe?function(t){var e=Ae(this,t);return!!e&&e.enumerable}:Ce;var Re=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},_e=g,De=_e({}.toString),Le=_e("".slice),Ne=function(t){return Le(De(t),8,-1)},Fe=c,$e=Ne,We=Object,ze=g("".split),qe=Fe((function(){return!We("z").propertyIsEnumerable(0)}))?function(t){return"String"==$e(t)?ze(t,""):We(t)}:We,Ye=v,Be=function(t){return qe(Ye(t))},Ue=u,Ge=et,He=Te,Ve=Re,Xe=Be,Ke=he,Ze=j,Je=H,Qe=Object.getOwnPropertyDescriptor;Oe.f=Ue?Qe:function(t,e){if(t=Xe(t),e=Ke(e),Je)try{return Qe(t,e)}catch(t){}if(Ze(t,e))return Ve(!Ge(He.f,t,e),t[e])};var tn=P,en=Re,nn=u?function(t,e,n){return tn.f(t,e,en(1,n))}:function(t,e,n){return t[e]=n,t},rn={exports:{}},sn=F,on=Ft,an=g(Function.toString);sn(on.inspectSource)||(on.inspectSource=function(t){return an(t)});var cn,un,ln,hn=on.inspectSource,fn=F,dn=_.WeakMap,pn=fn(dn)&&/native code/.test(String(dn)),gn=Rt.exports,bn=Bt,mn=gn("keys"),yn=function(t){return mn[t]||(mn[t]=bn(t))},vn={},wn=pn,xn=_,Sn=z,kn=nn,Mn=j,jn=Ft,En=yn,In=vn,On=xn.TypeError,Tn=xn.WeakMap;if(wn||jn.state){var Cn=jn.state||(jn.state=new Tn);Cn.get=Cn.get,Cn.has=Cn.has,Cn.set=Cn.set,cn=function(t,e){if(Cn.has(t))throw On("Object already initialized");return e.facade=t,Cn.set(t,e),e},un=function(t){return Cn.get(t)||{}},ln=function(t){return Cn.has(t)}}else{var An=En("state");In[An]=!0,cn=function(t,e){if(Mn(t,An))throw On("Object already initialized");return e.facade=t,kn(t,An,e),e},un=function(t){return Mn(t,An)?t[An]:{}},ln=function(t){return Mn(t,An)}}var Pn={set:cn,get:un,has:ln,enforce:function(t){return ln(t)?un(t):cn(t,{})},getterFor:function(t){return function(e){var n;if(!Sn(e)||(n=un(e)).type!==t)throw On("Incompatible receiver, "+t+" required");return n}}},Rn=c,_n=F,Dn=j,Ln=u,Nn=A.CONFIGURABLE,Fn=hn,$n=Pn.enforce,Wn=Pn.get,zn=Object.defineProperty,qn=Ln&&!Rn((function(){return 8!==zn((function(){}),"length",{value:8}).length})),Yn=String(String).split("String"),Bn=rn.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!Dn(t,"name")||Nn&&t.name!==e)&&(Ln?zn(t,"name",{value:e,configurable:!0}):t.name=e),qn&&n&&Dn(n,"arity")&&t.length!==n.arity&&zn(t,"length",{value:n.arity});try{n&&Dn(n,"constructor")&&n.constructor?Ln&&zn(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=$n(t);return Dn(r,"source")||(r.source=Yn.join("string"==typeof e?e:"")),t};Function.prototype.toString=Bn((function(){return _n(this)&&Wn(this).source||Fn(this)}),"toString");var Un=F,Gn=P,Hn=rn.exports,Vn=Lt,Xn=function(t,e,n,r){r||(r={});var s=r.enumerable,o=void 0!==r.name?r.name:e;if(Un(n)&&Hn(n,o,r),r.global)s?t[e]=n:Vn(e,n);else{try{r.unsafe?t[e]&&(s=!0):delete t[e]}catch(t){}s?t[e]=n:Gn.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},Kn={},Zn=Math.ceil,Jn=Math.floor,Qn=Math.trunc||function(t){var e=+t;return(e>0?Jn:Zn)(e)},tr=function(t){var e=+t;return e!=e||0===e?0:Qn(e)},er=tr,nr=Math.max,rr=Math.min,sr=tr,or=Math.min,ir=function(t){return t>0?or(sr(t),9007199254740991):0},ar=ir,cr=Be,ur=function(t,e){var n=er(t);return n<0?nr(n+e,0):rr(n,e)},lr=function(t){return ar(t.length)},hr=function(t){return function(e,n,r){var s,o=cr(e),i=lr(o),a=ur(r,i);if(t&&n!=n){for(;i>a;)if((s=o[a++])!=s)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},fr={includes:hr(!0),indexOf:hr(!1)},dr=j,pr=Be,gr=fr.indexOf,br=vn,mr=g([].push),yr=function(t,e){var n,r=pr(t),s=0,o=[];for(n in r)!dr(br,n)&&dr(r,n)&&mr(o,n);for(;e.length>s;)dr(r,n=e[s++])&&(~gr(o,n)||mr(o,n));return o},vr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wr=yr,xr=vr.concat("length","prototype");Kn.f=Object.getOwnPropertyNames||function(t){return wr(t,xr)};var Sr={};Sr.f=Object.getOwnPropertySymbols;var kr=ot,Mr=Kn,jr=Sr,Er=J,Ir=g([].concat),Or=kr("Reflect","ownKeys")||function(t){var e=Mr.f(Er(t)),n=jr.f;return n?Ir(e,n(t)):e},Tr=j,Cr=Or,Ar=Oe,Pr=P,Rr=c,_r=F,Dr=/#|\.prototype\./,Lr=function(t,e){var n=Fr[Nr(t)];return n==Wr||n!=$r&&(_r(e)?Rr(e):!!e)},Nr=Lr.normalize=function(t){return String(t).replace(Dr,".").toLowerCase()},Fr=Lr.data={},$r=Lr.NATIVE="N",Wr=Lr.POLYFILL="P",zr=Lr,qr=_,Yr=Oe.f,Br=nn,Ur=Xn,Gr=Lt,Hr=function(t,e,n){for(var r=Cr(e),s=Pr.f,o=Ar.f,i=0;i<r.length;i++){var a=r[i];Tr(t,a)||n&&Tr(n,a)||s(t,a,o(e,a))}},Vr=zr,Xr=function(t,e){var n,r,s,o,i,a=t.target,c=t.global,u=t.stat;if(n=c?qr:u?qr[a]||Gr(a,{}):(qr[a]||{}).prototype)for(r in e){if(o=e[r],s=t.dontCallGetSet?(i=Yr(n,r))&&i.value:n[r],!Vr(c?r:a+(u?".":"#")+r,t.forced)&&void 0!==s){if(typeof o==typeof s)continue;Hr(o,s)}(t.sham||s&&s.sham)&&Br(o,"sham",!0),Ur(n,r,o,t)}},Kr={};Kr[ee("toStringTag")]="z";var Zr="[object z]"===String(Kr),Jr=F,Qr=Ne,ts=ee("toStringTag"),es=Object,ns="Arguments"==Qr(function(){return arguments}()),rs=Zr?Qr:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=es(t),ts))?n:ns?Qr(e):"Object"==(r=Qr(e))&&Jr(e.callee)?"Arguments":r},ss=String,os=function(t){if("Symbol"===rs(t))throw TypeError("Cannot convert a Symbol value to a string");return ss(t)},is=J,as=function(){var t=is(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},cs=c,us=_.RegExp,ls=cs((function(){var t=us("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),hs=ls||cs((function(){return!us("a","y").sticky})),fs=ls||cs((function(){var t=us("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),ds={BROKEN_CARET:fs,MISSED_STICKY:hs,UNSUPPORTED_Y:ls},ps={},gs=yr,bs=vr,ms=Object.keys||function(t){return gs(t,bs)},ys=u,vs=V,ws=P,xs=J,Ss=Be,ks=ms;ps.f=ys&&!vs?Object.defineProperties:function(t,e){xs(t);for(var n,r=Ss(e),s=ks(e),o=s.length,i=0;o>i;)ws.f(t,n=s[i++],r[n]);return t};var Ms,js=ot("document","documentElement"),Es=J,Is=ps,Os=vr,Ts=vn,Cs=js,As=U,Ps=yn("IE_PROTO"),Rs=function(){},_s=function(t){return"<script>"+t+"<\/script>"},Ds=function(t){t.write(_s("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ls=function(){try{Ms=new ActiveXObject("htmlfile")}catch(t){}var t,e;Ls="undefined"!=typeof document?document.domain&&Ms?Ds(Ms):((e=As("iframe")).style.display="none",Cs.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(_s("document.F=Object")),t.close(),t.F):Ds(Ms);for(var n=Os.length;n--;)delete Ls.prototype[Os[n]];return Ls()};Ts[Ps]=!0;var Ns=Object.create||function(t,e){var n;return null!==t?(Rs.prototype=Es(t),n=new Rs,Rs.prototype=null,n[Ps]=t):n=Ls(),void 0===e?n:Is.f(n,e)},Fs=c,$s=_.RegExp,Ws=Fs((function(){var t=$s(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),zs=c,qs=_.RegExp,Ys=zs((function(){var t=qs("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Bs=et,Us=g,Gs=os,Hs=as,Vs=ds,Xs=Rt.exports,Ks=Ns,Zs=Pn.get,Js=Ws,Qs=Ys,to=Xs("native-string-replace",String.prototype.replace),eo=RegExp.prototype.exec,no=eo,ro=Us("".charAt),so=Us("".indexOf),oo=Us("".replace),io=Us("".slice),ao=function(){var t=/a/,e=/b*/g;return Bs(eo,t,"a"),Bs(eo,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),co=Vs.BROKEN_CARET,uo=void 0!==/()??/.exec("")[1];(ao||uo||co||Js||Qs)&&(no=function(t){var e,n,r,s,o,i,a,c=this,u=Zs(c),l=Gs(t),h=u.raw;if(h)return h.lastIndex=c.lastIndex,e=Bs(no,h,l),c.lastIndex=h.lastIndex,e;var f=u.groups,d=co&&c.sticky,p=Bs(Hs,c),g=c.source,b=0,m=l;if(d&&(p=oo(p,"y",""),-1===so(p,"g")&&(p+="g"),m=io(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==ro(l,c.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,b++),n=new RegExp("^(?:"+g+")",p)),uo&&(n=new RegExp("^"+g+"$(?!\\s)",p)),ao&&(r=c.lastIndex),s=Bs(eo,d?n:c,m),d?s?(s.input=io(s.input,b),s[0]=io(s[0],b),s.index=c.lastIndex,c.lastIndex+=s[0].length):c.lastIndex=0:ao&&s&&(c.lastIndex=c.global?s.index+s[0].length:r),uo&&s&&s.length>1&&Bs(to,s[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(s[o]=void 0)})),s&&f)for(s.groups=i=Ks(null),o=0;o<f.length;o++)i[(a=f[o])[0]]=s[a[1]];return s});var lo=no;Xr({target:"RegExp",proto:!0,forced:/./.exec!==lo},{exec:lo});var ho,fo,po=Xr,go=et,bo=F,mo=J,yo=os,vo=(ho=!1,(fo=/[ac]/).exec=function(){return ho=!0,/./.exec.apply(this,arguments)},!0===fo.test("abc")&&ho),wo=/./.test;po({target:"RegExp",proto:!0,forced:!vo},{test:function(t){var e=mo(this),n=yo(t),r=e.exec;if(!bo(r))return go(wo,e,n);var s=go(r,e,n);return null!==s&&(mo(s),!0)}});var xo=l,So=Function.prototype,ko=So.apply,Mo=So.call,jo="object"==typeof Reflect&&Reflect.apply||(xo?Mo.bind(ko):function(){return Mo.apply(ko,arguments)}),Eo=Ne,Io=g,Oo=function(t){if("Function"===Eo(t))return Io(t)},To=Xn,Co=lo,Ao=c,Po=ee,Ro=nn,_o=Po("species"),Do=RegExp.prototype,Lo=g,No=tr,Fo=os,$o=v,Wo=Lo("".charAt),zo=Lo("".charCodeAt),qo=Lo("".slice),Yo=function(t){return function(e,n){var r,s,o=Fo($o(e)),i=No(n),a=o.length;return i<0||i>=a?t?"":void 0:(r=zo(o,i))<55296||r>56319||i+1===a||(s=zo(o,i+1))<56320||s>57343?t?Wo(o,i):r:t?qo(o,i,i+2):s-56320+(r-55296<<10)+65536}},Bo={codeAt:Yo(!1),charAt:Yo(!0)}.charAt,Uo=g,Go=S,Ho=Math.floor,Vo=Uo("".charAt),Xo=Uo("".replace),Ko=Uo("".slice),Zo=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Jo=/\$([$&'`]|\d{1,2})/g,Qo=et,ti=J,ei=F,ni=Ne,ri=lo,si=TypeError,oi=jo,ii=et,ai=g,ci=function(t,e,n,r){var s=Po(t),o=!Ao((function(){var e={};return e[s]=function(){return 7},7!=""[t](e)})),i=o&&!Ao((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[_o]=function(){return n},n.flags="",n[s]=/./[s]),n.exec=function(){return e=!0,null},n[s](""),!e}));if(!o||!i||n){var a=Oo(/./[s]),c=e(s,""[t],(function(t,e,n,r,s){var i=Oo(t),c=e.exec;return c===Co||c===Do.exec?o&&!s?{done:!0,value:a(e,n,r)}:{done:!0,value:i(n,e,r)}:{done:!1}}));To(String.prototype,t,c[0]),To(Do,s,c[1])}r&&Ro(Do[s],"sham",!0)},ui=c,li=J,hi=F,fi=b,di=tr,pi=ir,gi=os,bi=v,mi=function(t,e,n){return e+(n?Bo(t,e).length:1)},yi=Ot,vi=function(t,e,n,r,s,o){var i=n+t.length,a=r.length,c=Jo;return void 0!==s&&(s=Go(s),c=Zo),Xo(o,c,(function(o,c){var u;switch(Vo(c,0)){case"$":return"$";case"&":return t;case"`":return Ko(e,0,n);case"'":return Ko(e,i);case"<":u=s[Ko(c,1,-1)];break;default:var l=+c;if(0===l)return o;if(l>a){var h=Ho(l/10);return 0===h?o:h<=a?void 0===r[h-1]?Vo(c,1):r[h-1]+Vo(c,1):o}u=r[l-1]}return void 0===u?"":u}))},wi=function(t,e){var n=t.exec;if(ei(n)){var r=Qo(n,t,e);return null!==r&&ti(r),r}if("RegExp"===ni(t))return Qo(ri,t,e);throw si("RegExp#exec called on incompatible receiver")},xi=ee("replace"),Si=Math.max,ki=Math.min,Mi=ai([].concat),ji=ai([].push),Ei=ai("".indexOf),Ii=ai("".slice),Oi="$0"==="a".replace(/./,"$0"),Ti=!!/./[xi]&&""===/./[xi]("a","$0"),Ci=!ui((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}));ci("replace",(function(t,e,n){var r=Ti?"$":"$0";return[function(t,n){var r=bi(this),s=fi(t)?void 0:yi(t,xi);return s?ii(s,t,r,n):ii(e,gi(r),t,n)},function(t,s){var o=li(this),i=gi(t);if("string"==typeof s&&-1===Ei(s,r)&&-1===Ei(s,"$<")){var a=n(e,o,i,s);if(a.done)return a.value}var c=hi(s);c||(s=gi(s));var u=o.global;if(u){var l=o.unicode;o.lastIndex=0}for(var h=[];;){var f=wi(o,i);if(null===f)break;if(ji(h,f),!u)break;""===gi(f[0])&&(o.lastIndex=mi(i,pi(o.lastIndex),l))}for(var d,p="",g=0,b=0;b<h.length;b++){for(var m=gi((f=h[b])[0]),y=Si(ki(di(f.index),i.length),0),v=[],w=1;w<f.length;w++)ji(v,void 0===(d=f[w])?d:String(d));var x=f.groups;if(c){var S=Mi([m],v,y,i);void 0!==x&&ji(S,x);var k=gi(oi(s,void 0,S))}else k=vi(m,i,y,v,x,s);y>=g&&(p+=Ii(i,g,y)+k,g=y+m.length)}return p+Ii(i,g)}]}),!Ci||!Oi||Ti);var Ai=F,Pi=String,Ri=TypeError,_i=g,Di=J,Li=function(t){if("object"==typeof t||Ai(t))return t;throw Ri("Can't set "+Pi(t)+" as a prototype")},Ni=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=_i(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Di(n),Li(r),e?t(n,r):n.__proto__=r,n}}():void 0),Fi=F,$i=z,Wi=Ni,zi=z,qi=Ne,Yi=ee("match"),Bi=et,Ui=j,Gi=it,Hi=as,Vi=RegExp.prototype,Xi=function(t){var e=t.flags;return void 0!==e||"flags"in Vi||Ui(t,"flags")||!Gi(Vi,t)?e:Bi(Hi,t)},Ki=P.f,Zi=ot,Ji=P,Qi=u,ta=ee("species"),ea=u,na=_,ra=g,sa=zr,oa=function(t,e,n){var r,s;return Wi&&Fi(r=e.constructor)&&r!==n&&$i(s=r.prototype)&&s!==n.prototype&&Wi(t,s),t},ia=nn,aa=Kn.f,ca=it,ua=function(t){var e;return zi(t)&&(void 0!==(e=t[Yi])?!!e:"RegExp"==qi(t))},la=os,ha=Xi,fa=ds,da=function(t,e,n){n in t||Ki(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})},pa=Xn,ga=c,ba=j,ma=Pn.enforce,ya=function(t){var e=Zi(t),n=Ji.f;Qi&&e&&!e[ta]&&n(e,ta,{configurable:!0,get:function(){return this}})},va=Ws,wa=Ys,xa=ee("match"),Sa=na.RegExp,ka=Sa.prototype,Ma=na.SyntaxError,ja=ra(ka.exec),Ea=ra("".charAt),Ia=ra("".replace),Oa=ra("".indexOf),Ta=ra("".slice),Ca=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Aa=/a/g,Pa=/a/g,Ra=new Sa(Aa)!==Aa,_a=fa.MISSED_STICKY,Da=fa.UNSUPPORTED_Y,La=ea&&(!Ra||_a||va||wa||ga((function(){return Pa[xa]=!1,Sa(Aa)!=Aa||Sa(Pa)==Pa||"/a/i"!=Sa(Aa,"i")})));if(sa("RegExp",La)){for(var Na=function(t,e){var n,r,s,o,i,a,c=ca(ka,this),u=ua(t),l=void 0===e,h=[],f=t;if(!c&&u&&l&&t.constructor===Na)return t;if((u||ca(ka,t))&&(t=t.source,l&&(e=ha(f))),t=void 0===t?"":la(t),e=void 0===e?"":la(e),f=t,va&&"dotAll"in Aa&&(r=!!e&&Oa(e,"s")>-1)&&(e=Ia(e,/s/g,"")),n=e,_a&&"sticky"in Aa&&(s=!!e&&Oa(e,"y")>-1)&&Da&&(e=Ia(e,/y/g,"")),wa&&(o=function(t){for(var e,n=t.length,r=0,s="",o=[],i={},a=!1,c=!1,u=0,l="";r<=n;r++){if("\\"===(e=Ea(t,r)))e+=Ea(t,++r);else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:ja(Ca,Ta(t,r+1))&&(r+=2,c=!0),s+=e,u++;continue;case">"===e&&c:if(""===l||ba(i,l))throw new Ma("Invalid capture group name");i[l]=!0,o[o.length]=[l,u],c=!1,l="";continue}c?l+=e:s+=e}return[s,o]}(t),t=o[0],h=o[1]),i=oa(Sa(t,e),c?this:ka,Na),(r||s||h.length)&&(a=ma(i),r&&(a.dotAll=!0,a.raw=Na(function(t){for(var e,n=t.length,r=0,s="",o=!1;r<=n;r++)"\\"!==(e=Ea(t,r))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),s+=e):s+="[\\s\\S]":s+=e+Ea(t,++r);return s}(t),n)),s&&(a.sticky=!0),h.length&&(a.groups=h)),t!==f)try{ia(i,"source",""===f?"(?:)":f)}catch(t){}return i},Fa=aa(Sa),$a=0;Fa.length>$a;)da(Na,Sa,Fa[$a++]);ka.constructor=Na,Na.prototype=ka,pa(na,"RegExp",Na,{constructor:!0})}ya("RegExp");var Wa=rn.exports,za=P,qa=u,Ya=ds.MISSED_STICKY,Ba=Ne,Ua=function(t,e,n){return n.get&&Wa(n.get,e,{getter:!0}),n.set&&Wa(n.set,e,{setter:!0}),za.f(t,e,n)},Ga=Pn.get,Ha=RegExp.prototype,Va=TypeError;qa&&Ya&&Ua(Ha,"sticky",{configurable:!0,get:function(){if(this!==Ha){if("RegExp"===Ba(this))return!!Ga(this).sticky;throw Va("Incompatible receiver, RegExp required")}}});var Xa=A.PROPER,Ka=Xn,Za=J,Ja=os,Qa=c,tc=Xi,ec=RegExp.prototype.toString,nc=Qa((function(){return"/a/b"!=ec.call({source:"a",flags:"b"})})),rc=Xa&&"toString"!=ec.name;(nc||rc)&&Ka(RegExp.prototype,"toString",(function(){var t=Za(this);return"/"+Ja(t.source)+"/"+Ja(tc(t))}),{unsafe:!0});const sc=(t,e)=>t.push.apply(t,e),oc=t=>t.sort(((t,e)=>t.i-e.i||t.j-e.j)),ic=t=>{const e={};let n=1;return t.forEach((t=>{e[t]=n,n+=1})),e};const ac={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]]},cc=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,uc=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,lc=/^[A-Z\xbf-\xdf]+$/,hc=/^[^a-z\xdf-\xff]+$/,fc=/^[a-z\xdf-\xff]+$/,dc=/^[^A-Z\xbf-\xdf]+$/,pc=/[a-z\xdf-\xff]/,gc=/[A-Z\xbf-\xdf]/,bc=/[^A-Za-z\xbf-\xdf]/gi,mc=/^\d+$/,yc=(new Date).getFullYear(),vc={recentYear:/19\d\d|200\d|201\d|202\d/g},wc=[" ",",",";",":","|","/","\\","_",".","-"],xc=wc.length;class Sc{match({password:t}){const e=[...this.getMatchesWithoutSeparator(t),...this.getMatchesWithSeparator(t)],n=this.filterNoise(e);return oc(n)}getMatchesWithSeparator(t){const e=[],n=/^(\d{1,4})([\s/\\_.-])(\d{1,2})\2(\d{1,4})$/;for(let r=0;r<=Math.abs(t.length-6);r+=1)for(let s=r+5;s<=r+9&&!(s>=t.length);s+=1){const o=t.slice(r,+s+1||9e9),i=n.exec(o);if(null!=i){const t=this.mapIntegersToDayMonthYear([parseInt(i[1],10),parseInt(i[3],10),parseInt(i[4],10)]);null!=t&&e.push({pattern:"date",token:o,i:r,j:s,separator:i[2],year:t.year,month:t.month,day:t.day})}}return e}getMatchesWithoutSeparator(t){const e=[],n=/^\d{4,8}$/,r=t=>Math.abs(t.year-yc);for(let s=0;s<=Math.abs(t.length-4);s+=1)for(let o=s+3;o<=s+7&&!(o>=t.length);o+=1){const i=t.slice(s,+o+1||9e9);if(n.exec(i)){const t=[],n=i.length;if(ac[n].forEach((([e,n])=>{const r=this.mapIntegersToDayMonthYear([parseInt(i.slice(0,e),10),parseInt(i.slice(e,n),10),parseInt(i.slice(n),10)]);null!=r&&t.push(r)})),t.length>0){let n=t[0],a=r(t[0]);t.slice(1).forEach((t=>{const e=r(t);e<a&&(n=t,a=e)})),e.push({pattern:"date",token:i,i:s,j:o,separator:"",year:n.year,month:n.month,day:n.day})}}}return e}filterNoise(t){return t.filter((e=>{let n=!1;const r=t.length;for(let s=0;s<r;s+=1){const r=t[s];if(e!==r&&r.i<=e.i&&r.j>=e.j){n=!0;break}}return!n}))}mapIntegersToDayMonthYear(t){if(t[1]>31||t[1]<=0)return null;let e=0,n=0,r=0;for(let s=0,o=t.length;s<o;s+=1){const o=t[s];if(o>99&&o<1e3||o>2050)return null;o>31&&(n+=1),o>12&&(e+=1),o<=0&&(r+=1)}return n>=2||3===e||r>=2?null:this.getDayMonth(t)}getDayMonth(t){const e=[[t[2],t.slice(0,2)],[t[0],t.slice(1,3)]],n=e.length;for(let t=0;t<n;t+=1){const[n,r]=e[t];if(1e3<=n&&n<=2050){const t=this.mapIntegersToDayMonth(r);return null!=t?{year:n,month:t.month,day:t.day}:null}}for(let t=0;t<n;t+=1){const[n,r]=e[t],s=this.mapIntegersToDayMonth(r);if(null!=s)return{year:this.twoToFourDigitYear(n),month:s.month,day:s.day}}return null}mapIntegersToDayMonth(t){const e=[t,t.slice().reverse()];for(let t=0;t<e.length;t+=1){const n=e[t],r=n[0],s=n[1];if(r>=1&&r<=31&&s>=1&&s<=12)return{day:r,month:s}}return null}twoToFourDigitYear(t){return t>99?t:t>50?t+1900:t+2e3}}const kc=new Uint32Array(65536),Mc=(t,e)=>{if(t.length<e.length){const n=e;e=t,t=n}return 0===e.length?t.length:t.length<=32?((t,e)=>{const n=t.length,r=e.length,s=1<<n-1;let o=-1,i=0,a=n,c=n;for(;c--;)kc[t.charCodeAt(c)]|=1<<c;for(c=0;c<r;c++){let t=kc[e.charCodeAt(c)];const n=t|i;t|=(t&o)+o^o,i|=~(t|o),o&=t,i&s&&a++,o&s&&a--,i=i<<1|1,o=o<<1|~(n|i),i&=n}for(c=n;c--;)kc[t.charCodeAt(c)]=0;return a})(t,e):((t,e)=>{const n=e.length,r=t.length,s=[],o=[],i=Math.ceil(n/32),a=Math.ceil(r/32);for(let t=0;t<i;t++)o[t]=-1,s[t]=0;let c=0;for(;c<a-1;c++){let i=0,a=-1;const u=32*c,l=Math.min(32,r)+u;for(let e=u;e<l;e++)kc[t.charCodeAt(e)]|=1<<e;for(let t=0;t<n;t++){const n=kc[e.charCodeAt(t)],r=o[t/32|0]>>>t&1,c=s[t/32|0]>>>t&1,u=n|i,l=((n|c)&a)+a^a|n|c;let h=i|~(l|a),f=a&l;h>>>31^r&&(o[t/32|0]^=1<<t),f>>>31^c&&(s[t/32|0]^=1<<t),h=h<<1|r,f=f<<1|c,a=f|~(u|h),i=h&u}for(let e=u;e<l;e++)kc[t.charCodeAt(e)]=0}let u=0,l=-1;const h=32*c,f=Math.min(32,r-h)+h;for(let e=h;e<f;e++)kc[t.charCodeAt(e)]|=1<<e;let d=r;for(let t=0;t<n;t++){const n=kc[e.charCodeAt(t)],i=o[t/32|0]>>>t&1,a=s[t/32|0]>>>t&1,c=n|u,h=((n|a)&l)+l^l|n|a;let f=u|~(h|l),p=l&h;d+=f>>>r-1&1,d-=p>>>r-1&1,f>>>31^i&&(o[t/32|0]^=1<<t),p>>>31^a&&(s[t/32|0]^=1<<t),f=f<<1|i,p=p<<1|a,l=p|~(c|f),u=f&c}for(let e=h;e<f;e++)kc[t.charCodeAt(e)]=0;return d})(t,e)},jc=(t,e,n)=>{let r=0;const s=Object.keys(e).find((e=>{const s=((t,e,n)=>{const r=t.length<=e.length,s=t.length<=n;return r||s?Math.ceil(t.length/4):n})(t,e,n);if(Math.abs(t.length-e.length)>s)return!1;const o=Mc(t,e),i=o<=s;return i&&(r=o),i}));return s?{levenshteinDistance:r,levenshteinDistanceEntry:s}:{}};var Ec={a:["4","@"],b:["8"],c:["(","{","[","<"],d:["6","|)"],e:["3"],f:["#"],g:["6","9","&"],h:["#","|-|"],i:["1","!","|"],k:["<","|<"],l:["!","1","|","7"],m:["^^","nn","2n","/\\\\/\\\\"],n:["//"],o:["0","()"],q:["9"],u:["|_|"],s:["$","5"],t:["+","7"],v:["<",">","/"],w:["^/","uu","vv","2u","2v","\\\\/\\\\/"],x:["%","><"],z:["2"]},Ic={warnings:{straightRow:"straightRow",keyPattern:"keyPattern",simpleRepeat:"simpleRepeat",extendedRepeat:"extendedRepeat",sequences:"sequences",recentYears:"recentYears",dates:"dates",topTen:"topTen",topHundred:"topHundred",common:"common",similarToCommon:"similarToCommon",wordByItself:"wordByItself",namesByThemselves:"namesByThemselves",commonNames:"commonNames",userInputs:"userInputs",pwned:"pwned"},suggestions:{l33t:"l33t",reverseWords:"reverseWords",allUppercase:"allUppercase",capitalization:"capitalization",dates:"dates",recentYears:"recentYears",associatedYears:"associatedYears",sequences:"sequences",repeated:"repeated",longerKeyboardPattern:"longerKeyboardPattern",anotherWord:"anotherWord",useWords:"useWords",noNeed:"noNeed",pwned:"pwned"},timeEstimation:{ltSecond:"ltSecond",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years",centuries:"centuries"}};class Oc{constructor(t=[]){this.parents=t,this.children=new Map}addSub(t,...e){const n=t.charAt(0);this.children.has(n)||this.children.set(n,new Oc([...this.parents,n]));let r=this.children.get(n);for(let e=1;e<t.length;e+=1){const n=t.charAt(e);r.hasChild(n)||r.addChild(n),r=r.getChild(n)}return r.subs=(r.subs||[]).concat(e),this}getChild(t){return this.children.get(t)}isTerminal(){return!!this.subs}addChild(t){this.hasChild(t)||this.children.set(t,new Oc([...this.parents,t]))}hasChild(t){return this.children.has(t)}}var Tc=(t,e)=>(Object.entries(t).forEach((([t,n])=>{n.forEach((n=>{e.addSub(n,t)}))})),e);const Cc=new class{constructor(){this.matchers={},this.l33tTable=Ec,this.trieNodeRoot=Tc(Ec,new Oc),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=Ic,this.graphs={},this.useLevenshteinDistance=!1,this.levenshteinThreshold=2,this.l33tMaxSubstitutions=100,this.maxLength=256,this.setRankedDictionaries()}setOptions(t={}){t.l33tTable&&(this.l33tTable=t.l33tTable,this.trieNodeRoot=Tc(t.l33tTable,new Oc)),t.dictionary&&(this.dictionary=t.dictionary,this.setRankedDictionaries()),t.translations&&this.setTranslations(t.translations),t.graphs&&(this.graphs=t.graphs),void 0!==t.useLevenshteinDistance&&(this.useLevenshteinDistance=t.useLevenshteinDistance),void 0!==t.levenshteinThreshold&&(this.levenshteinThreshold=t.levenshteinThreshold),void 0!==t.l33tMaxSubstitutions&&(this.l33tMaxSubstitutions=t.l33tMaxSubstitutions),void 0!==t.maxLength&&(this.maxLength=t.maxLength)}setTranslations(t){if(!this.checkCustomTranslations(t))throw new Error("Invalid translations object fallback to keys");this.translations=t}checkCustomTranslations(t){let e=!0;return Object.keys(Ic).forEach((n=>{if(n in t){const r=n;Object.keys(Ic[r]).forEach((n=>{n in t[r]||(e=!1)}))}else e=!1})),e}setRankedDictionaries(){const t={},e={};Object.keys(this.dictionary).forEach((n=>{t[n]=ic(this.dictionary[n]),e[n]=this.getRankedDictionariesMaxWordSize(this.dictionary[n])})),this.rankedDictionaries=t,this.rankedDictionariesMaxWordSize=e}getRankedDictionariesMaxWordSize(t){const e=t.map((t=>"string"!=typeof t?t.toString().length:t.length));return 0===e.length?0:e.reduce(((t,e)=>Math.max(t,e)),-1/0)}buildSanitizedRankedDictionary(t){const e=[];return t.forEach((t=>{const n=typeof t;"string"!==n&&"number"!==n&&"boolean"!==n||e.push(t.toString().toLowerCase())})),ic(e)}extendUserInputsDictionary(t){this.dictionary.userInputs||(this.dictionary.userInputs=[]);const e=[...this.dictionary.userInputs,...t];this.rankedDictionaries.userInputs=this.buildSanitizedRankedDictionary(e),this.rankedDictionariesMaxWordSize.userInputs=this.getRankedDictionariesMaxWordSize(e)}addMatcher(t,e){this.matchers[t]||(this.matchers[t]=e)}};class Ac{constructor(t){this.defaultMatch=t}match({password:t}){const e=t.split("").reverse().join("");return this.defaultMatch({password:e}).map((e=>({...e,token:e.token.split("").reverse().join(""),reversed:!0,i:t.length-1-e.j,j:t.length-1-e.i})))}}class Pc{constructor({substr:t,limit:e,trieRoot:n}){this.buffer=[],this.finalPasswords=[],this.substr=t,this.limit=e,this.trieRoot=n}getAllPossibleSubsAtIndex(t){const e=[];let n=this.trieRoot;for(let r=t;r<this.substr.length;r+=1){const t=this.substr.charAt(r);if(n=n.getChild(t),!n)break;e.push(n)}return e}helper({onlyFullSub:t,isFullSub:e,index:n,subIndex:r,changes:s,lastSubLetter:o,consecutiveSubCount:i}){if(this.finalPasswords.length>=this.limit)return;if(n===this.substr.length)return void(t===e&&this.finalPasswords.push({password:this.buffer.join(""),changes:s}));const a=[...this.getAllPossibleSubsAtIndex(n)];let c=!1;for(let u=n+a.length-1;u>=n;u-=1){const l=a[u-n];if(l.isTerminal()){if(o===l.parents.join("")&&i>=3)continue;c=!0;const n=l.subs;for(const a of n){this.buffer.push(a);const n=s.concat({i:r,letter:a,substitution:l.parents.join("")});if(this.helper({onlyFullSub:t,isFullSub:e,index:u+1,subIndex:r+a.length,changes:n,lastSubLetter:l.parents.join(""),consecutiveSubCount:o===l.parents.join("")?i+1:1}),this.buffer.pop(),this.finalPasswords.length>=this.limit)return}}}if(!t||!c){const a=this.substr.charAt(n);this.buffer.push(a),this.helper({onlyFullSub:t,isFullSub:e&&!c,index:n+1,subIndex:r+1,changes:s,lastSubLetter:o,consecutiveSubCount:i}),this.buffer.pop()}}getAll(){return this.helper({onlyFullSub:!0,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.helper({onlyFullSub:!1,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.finalPasswords}}class Rc{constructor(t){this.defaultMatch=t}isAlreadyIncluded(t,e){return t.some((t=>Object.entries(t).every((([t,n])=>"subs"===t||n===e[t]))))}match({password:t}){const e=[],n=((t,e,n)=>new Pc({substr:t,limit:e,trieRoot:n}).getAll())(t,Cc.l33tMaxSubstitutions,Cc.trieNodeRoot);let r=!1,s=!0;return n.forEach((n=>{if(r)return;const o=this.defaultMatch({password:n.password,useLevenshtein:s});s=!1,o.forEach((s=>{r||(r=0===s.i&&s.j===t.length-1);const o=((t,e,n)=>{const r=t.changes.filter((t=>t.i<e)).reduce(((t,e)=>t-e.letter.length+e.substitution.length),e),s=t.changes.filter((t=>t.i>=e&&t.i<=n)),o=s.reduce(((t,e)=>t-e.letter.length+e.substitution.length),n-e+r),i=[],a=[];return s.forEach((t=>{i.findIndex((e=>e.letter===t.letter&&e.substitution===t.substitution))<0&&(i.push({letter:t.letter,substitution:t.substitution}),a.push(`${t.substitution} -> ${t.letter}`))})),{i:r,j:o,subs:i,subDisplay:a.join(", ")}})(n,s.i,s.j),i=t.slice(o.i,+o.j+1||9e9),a={...s,l33t:!0,token:i,...o},c=this.isAlreadyIncluded(e,a);i.toLowerCase()===s.matchedWord||c||e.push(a)}))})),e.filter((t=>t.token.length>1))}}class _c{constructor(){this.l33t=new Rc(this.defaultMatch),this.reverse=new Ac(this.defaultMatch)}match({password:t}){const e=[...this.defaultMatch({password:t}),...this.reverse.match({password:t}),...this.l33t.match({password:t})];return oc(e)}defaultMatch({password:t,useLevenshtein:e=!0}){const n=[],r=t.length,s=t.toLowerCase();return Object.keys(Cc.rankedDictionaries).forEach((o=>{const i=Cc.rankedDictionaries[o],a=Cc.rankedDictionariesMaxWordSize[o],c=Math.min(a,r);for(let a=0;a<r;a+=1){const u=Math.min(a+c,r);for(let c=a;c<u;c+=1){const u=s.slice(a,+c+1||9e9),l=u in i;let h={};const f=0===a&&c===r-1;Cc.useLevenshteinDistance&&f&&!l&&e&&(h=jc(u,i,Cc.levenshteinThreshold));const d=0!==Object.keys(h).length;if(l||d){const e=i[d?h.levenshteinDistanceEntry:u];n.push({pattern:"dictionary",i:a,j:c,token:t.slice(a,+c+1||9e9),matchedWord:u,rank:e,dictionaryName:o,reversed:!1,l33t:!1,...h})}}}})),n}}class Dc{match({password:t,regexes:e=vc}){const n=[];return Object.keys(e).forEach((r=>{const s=e[r];let o;for(s.lastIndex=0;o=s.exec(t);)if(o){const t=o[0];n.push({pattern:"regex",token:t,i:o.index,j:o.index+o[0].length-1,regexName:r,regexMatch:o})}})),oc(n)}}var Lc={nCk(t,e){let n=t;if(e>n)return 0;if(0===e)return 1;let r=1;for(let t=1;t<=e;t+=1)r*=n,r/=t,n-=1;return r},log10:t=>0===t?0:Math.log(t)/Math.log(10),log2:t=>Math.log(t)/Math.log(2),factorial(t){let e=1;for(let n=2;n<=t;n+=1)e*=n;return e}};var Nc=t=>{const e=t.replace(bc,"");if(e.match(dc)||e.toLowerCase()===e)return 1;const n=[cc,uc,hc],r=n.length;for(let t=0;t<r;t+=1){const r=n[t];if(e.match(r))return 2}return(t=>{const e=t.split(""),n=e.filter((t=>t.match(gc))).length,r=e.filter((t=>t.match(pc))).length;let s=0;const o=Math.min(n,r);for(let t=1;t<=o;t+=1)s+=Lc.nCk(n+r,t);return s})(e)};const Fc=(t,e)=>{let n=0,r=t.indexOf(e);for(;r>=0;)n+=1,r=t.indexOf(e,r+e.length);return n};var $c=({l33t:t,subs:e,token:n})=>{if(!t)return 1;let r=1;return e.forEach((t=>{const{subbedCount:e,unsubbedCount:s}=(({sub:t,token:e})=>{const n=e.toLowerCase();return{subbedCount:Fc(n,t.substitution),unsubbedCount:Fc(n,t.letter)}})({sub:t,token:n});if(0===e||0===s)r*=2;else{const t=Math.min(s,e);let n=0;for(let r=1;r<=t;r+=1)n+=Lc.nCk(s+e,r);r*=n}})),r};const Wc=({token:t,graph:e,turns:n})=>{const r=Object.keys(Cc.graphs[e]).length,s=(t=>{let e=0;return Object.keys(t).forEach((n=>{const r=t[n];e+=r.filter((t=>!!t)).length})),e/=Object.entries(t).length,e})(Cc.graphs[e]);let o=0;const i=t.length;for(let t=2;t<=i;t+=1){const e=Math.min(n,t-1);for(let n=1;n<=e;n+=1)o+=Lc.nCk(t-1,n-1)*r*s**n}return o};const zc={bruteforce:({token:t})=>{let e,n=10**t.length;return n===Number.POSITIVE_INFINITY&&(n=Number.MAX_VALUE),e=1===t.length?11:51,Math.max(n,e)},date:({year:t,separator:e})=>{let n=365*Math.max(Math.abs(t-yc),20);return e&&(n*=4),n},dictionary:({rank:t,reversed:e,l33t:n,subs:r,token:s,dictionaryName:o})=>{const i=t,a=Nc(s),c=$c({l33t:n,subs:r,token:s});let u;return u="diceware"===o?3888:i*a*c*(e?2:1),{baseGuesses:i,uppercaseVariations:a,l33tVariations:c,calculation:u}},regex:({regexName:t,regexMatch:e,token:n})=>{const r={alphaLower:26,alphaUpper:26,alpha:52,alphanumeric:62,digits:10,symbols:33};return t in r?r[t]**n.length:"recentYear"===t?Math.max(Math.abs(parseInt(e[0],10)-yc),20):0},repeat:({baseGuesses:t,repeatCount:e})=>t*e,sequence:({token:t,ascending:e})=>{const n=t.charAt(0);let r=0;return r=["a","A","z","Z","0","1","9"].includes(n)?4:n.match(/\d/)?10:26,e||(r*=2),r*t.length},spatial:({graph:t,token:e,shiftedCount:n,turns:r})=>{let s=Wc({token:e,graph:t,turns:r});if(n){const t=e.length-n;if(0===n||0===t)s*=2;else{let e=0;for(let r=1;r<=Math.min(n,t);r+=1)e+=Lc.nCk(n+t,r);s*=e}}return Math.round(s)},separator:()=>xc};var qc=(t,e)=>{const n={};if("guesses"in t&&null!=t.guesses)return t;const r=((t,e)=>{let n=1;return t.token.length<e.length&&(n=1===t.token.length?10:50),n})(t,e),s=((t,e)=>zc[t]?zc[t](e):Cc.matchers[t]&&"scoring"in Cc.matchers[t]?Cc.matchers[t].scoring(e):0)(t.pattern,t);let o=0;"number"==typeof s?o=s:"dictionary"===t.pattern&&(o=s.calculation,n.baseGuesses=s.baseGuesses,n.uppercaseVariations=s.uppercaseVariations,n.l33tVariations=s.l33tVariations);const i=Math.max(o,r);return{...t,...n,guesses:i,guessesLog10:Lc.log10(i)}};const Yc={password:"",optimal:{},excludeAdditive:!1,separatorRegex:void 0,fillArray(t,e){const n=[];for(let r=0;r<t;r+=1){let t=[];"object"===e&&(t={}),n.push(t)}return n},makeBruteforceMatch(t,e){return{pattern:"bruteforce",token:this.password.slice(t,+e+1||9e9),i:t,j:e}},update(t,e){const n=t.j,r=qc(t,this.password);let s=r.guesses;e>1&&(s*=this.optimal.pi[r.i-1][e-1]);let o=Lc.factorial(e)*s;this.excludeAdditive||(o+=1e4**(e-1));let i=!1;Object.keys(this.optimal.g[n]).forEach((t=>{const r=this.optimal.g[n][t];parseInt(t,10)<=e&&r<=o&&(i=!0)})),i||(this.optimal.g[n][e]=o,this.optimal.m[n][e]=r,this.optimal.pi[n][e]=s)},bruteforceUpdate(t){let e=this.makeBruteforceMatch(0,t);this.update(e,1);for(let n=1;n<=t;n+=1){e=this.makeBruteforceMatch(n,t);const r=this.optimal.m[n-1];Object.keys(r).forEach((t=>{"bruteforce"!==r[t].pattern&&this.update(e,parseInt(t,10)+1)}))}},unwind(t){const e=[];let n=t-1,r=0,s=Infinity;const o=this.optimal.g[n];for(o&&Object.keys(o).forEach((t=>{const e=o[t];e<s&&(r=parseInt(t,10),s=e)}));n>=0;){const t=this.optimal.m[n][r];e.unshift(t),n=t.i-1,r-=1}return e}};var Bc={mostGuessableMatchSequence(t,e,n=!1){Yc.password=t,Yc.excludeAdditive=n;const r=t.length;let s=Yc.fillArray(r,"array");e.forEach((t=>{s[t.j].push(t)})),s=s.map((t=>t.sort(((t,e)=>t.i-e.i)))),Yc.optimal={m:Yc.fillArray(r,"object"),pi:Yc.fillArray(r,"object"),g:Yc.fillArray(r,"object")};for(let t=0;t<r;t+=1)s[t].forEach((t=>{t.i>0?Object.keys(Yc.optimal.m[t.i-1]).forEach((e=>{Yc.update(t,parseInt(e,10)+1)})):Yc.update(t,1)})),Yc.bruteforceUpdate(t);const o=Yc.unwind(r),i=o.length,a=this.getGuesses(t,i);return{password:t,guesses:a,guessesLog10:Lc.log10(a),sequence:o}},getGuesses(t,e){const n=t.length;let r=0;return r=0===t.length?1:Yc.optimal.g[n-1][e],r}};class Uc{match({password:t,omniMatch:e}){const n=[];let r=0;for(;r<t.length;){const s=this.getGreedyMatch(t,r),o=this.getLazyMatch(t,r);if(null==s)break;const{match:i,baseToken:a}=this.setMatchToken(s,o);if(i){const t=i.index+i[0].length-1,s=this.getBaseGuesses(a,e);n.push(this.normalizeMatch(a,t,i,s)),r=t+1}}const s=n.some((t=>t instanceof Promise));return s?Promise.all(n):n}normalizeMatch(t,e,n,r){const s={pattern:"repeat",i:n.index,j:e,token:n[0],baseToken:t,baseGuesses:0,repeatCount:n[0].length/t.length};return r instanceof Promise?r.then((t=>({...s,baseGuesses:t}))):{...s,baseGuesses:r}}getGreedyMatch(t,e){const n=/(.+)\1+/g;return n.lastIndex=e,n.exec(t)}getLazyMatch(t,e){const n=/(.+?)\1+/g;return n.lastIndex=e,n.exec(t)}setMatchToken(t,e){const n=/^(.+?)\1+$/;let r,s="";if(e&&t[0].length>e[0].length){r=t;const e=n.exec(r[0]);e&&(s=e[1])}else r=e,r&&(s=r[1]);return{match:r,baseToken:s}}getBaseGuesses(t,e){const n=e.match(t);if(n instanceof Promise)return n.then((e=>Bc.mostGuessableMatchSequence(t,e).guesses));return Bc.mostGuessableMatchSequence(t,n).guesses}}class Gc{constructor(){this.MAX_DELTA=5}match({password:t}){const e=[];if(1===t.length)return[];let n=0,r=null;const s=t.length;for(let o=1;o<s;o+=1){const s=t.charCodeAt(o)-t.charCodeAt(o-1);if(null==r&&(r=s),s!==r){const i=o-1;this.update({i:n,j:i,delta:r,password:t,result:e}),n=i,r=s}}return this.update({i:n,j:s-1,delta:r,password:t,result:e}),e}update({i:t,j:e,delta:n,password:r,result:s}){if(e-t>1||1===Math.abs(n)){const o=Math.abs(n);if(o>0&&o<=this.MAX_DELTA){const o=r.slice(t,+e+1||9e9),{sequenceName:i,sequenceSpace:a}=this.getSequence(o);return s.push({pattern:"sequence",i:t,j:e,token:r.slice(t,+e+1||9e9),sequenceName:i,sequenceSpace:a,ascending:n>0})}}return null}getSequence(t){let e="unicode",n=26;return fc.test(t)?(e="lower",n=26):lc.test(t)?(e="upper",n=26):mc.test(t)&&(e="digits",n=10),{sequenceName:e,sequenceSpace:n}}}class Hc{constructor(){this.SHIFTED_RX=/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/}match({password:t}){const e=[];return Object.keys(Cc.graphs).forEach((n=>{const r=Cc.graphs[n];sc(e,this.helper(t,r,n))})),oc(e)}checkIfShifted(t,e,n){return!t.includes("keypad")&&this.SHIFTED_RX.test(e.charAt(n))?1:0}helper(t,e,n){let r;const s=[];let o=0;const i=t.length;for(;o<i-1;){let a=o+1,c=null,u=0;for(r=this.checkIfShifted(n,t,o);;){const l=e[t.charAt(a-1)]||[];let h=!1,f=-1,d=-1;if(a<i){const e=t.charAt(a),n=l.length;for(let t=0;t<n;t+=1){const n=l[t];if(d+=1,n){const t=n.indexOf(e);if(-1!==t){h=!0,f=d,1===t&&(r+=1),c!==f&&(u+=1,c=f);break}}}}if(!h){a-o>2&&s.push({pattern:"spatial",i:o,j:a-1,token:t.slice(o,a),graph:n,turns:u,shiftedCount:r}),o=a;break}a+=1}}return s}}const Vc=new RegExp(`[${wc.join("")}]`);class Xc{static getMostUsedSeparatorChar(t){const e=[...t.split("").filter((t=>Vc.test(t))).reduce(((t,e)=>{const n=t.get(e);return n?t.set(e,n+1):t.set(e,1),t}),new Map).entries()].sort((([t,e],[n,r])=>r-e));if(!e.length)return;const n=e[0];return n[1]<2?void 0:n[0]}static getSeparatorRegex(t){return new RegExp(`([^${t}\n])(${t})(?!${t})`,"g")}match({password:t}){const e=[];if(0===t.length)return e;const n=Xc.getMostUsedSeparatorChar(t);if(void 0===n)return e;const r=Xc.getSeparatorRegex(n);for(const s of t.matchAll(r)){if(void 0===s.index)continue;const t=s.index+1;e.push({pattern:"separator",token:n,i:t,j:t})}return e}}class Kc{constructor(){this.matchers={date:Sc,dictionary:_c,regex:Dc,repeat:Uc,sequence:Gc,spatial:Hc,separator:Xc}}match(t){const e=[],n=[];return[...Object.keys(this.matchers),...Object.keys(Cc.matchers)].forEach((r=>{if(!this.matchers[r]&&!Cc.matchers[r])return;const s=(new(this.matchers[r]?this.matchers[r]:Cc.matchers[r].Matching)).match({password:t,omniMatch:this});s instanceof Promise?(s.then((t=>{sc(e,t)})),n.push(s)):sc(e,s)})),n.length>0?new Promise(((t,r)=>{Promise.all(n).then((()=>{t(oc(e))})).catch((t=>{r(t)}))})):oc(e)}}const Zc={second:1,minute:60,hour:3600,day:86400,month:2678400,year:32140800,century:321408e4};class Jc{translate(t,e){let n=t;void 0!==e&&1!==e&&(n+="s");const{timeEstimation:r}=Cc.translations;return r[n].replace("{base}",`${e}`)}estimateAttackTimes(t){const e={onlineThrottling100PerHour:t/(100/3600),onlineNoThrottling10PerSecond:t/10,offlineSlowHashing1e4PerSecond:t/1e4,offlineFastHashing1e10PerSecond:t/1e10},n={onlineThrottling100PerHour:"",onlineNoThrottling10PerSecond:"",offlineSlowHashing1e4PerSecond:"",offlineFastHashing1e10PerSecond:""};return Object.keys(e).forEach((t=>{const r=e[t];n[t]=this.displayTime(r)})),{crackTimesSeconds:e,crackTimesDisplay:n,score:this.guessesToScore(t)}}guessesToScore(t){return t<1005?0:t<1000005?1:t<100000005?2:t<10000000005?3:4}displayTime(t){let e,n="centuries";const r=Object.keys(Zc),s=r.findIndex((e=>t<Zc[e]));return s>-1&&(n=r[s-1],0!==s?e=Math.round(t/Zc[n]):n="ltSecond"),this.translate(n,e)}}var Qc=()=>null,tu=()=>({warning:Cc.translations.warnings.dates,suggestions:[Cc.translations.suggestions.dates]});const eu=(t,e)=>{let n=null;const r=t.dictionaryName,s="lastnames"===r||r.toLowerCase().includes("firstnames");return"passwords"===r?n=((t,e)=>{let n=null;return!e||t.l33t||t.reversed?t.guessesLog10<=4&&(n=Cc.translations.warnings.similarToCommon):n=t.rank<=10?Cc.translations.warnings.topTen:t.rank<=100?Cc.translations.warnings.topHundred:Cc.translations.warnings.common,n})(t,e):r.includes("wikipedia")?n=((t,e)=>{let n=null;return e&&(n=Cc.translations.warnings.wordByItself),n})(0,e):s?n=((t,e)=>e?Cc.translations.warnings.namesByThemselves:Cc.translations.warnings.commonNames)(0,e):"userInputs"===r&&(n=Cc.translations.warnings.userInputs),n};var nu=(t,e)=>{const n=eu(t,e),r=[],s=t.token;return s.match(cc)?r.push(Cc.translations.suggestions.capitalization):s.match(hc)&&s.toLowerCase()!==s&&r.push(Cc.translations.suggestions.allUppercase),t.reversed&&t.token.length>=4&&r.push(Cc.translations.suggestions.reverseWords),t.l33t&&r.push(Cc.translations.suggestions.l33t),{warning:n,suggestions:r}},ru=t=>"recentYear"===t.regexName?{warning:Cc.translations.warnings.recentYears,suggestions:[Cc.translations.suggestions.recentYears,Cc.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]},su=t=>{let e=Cc.translations.warnings.extendedRepeat;return 1===t.baseToken.length&&(e=Cc.translations.warnings.simpleRepeat),{warning:e,suggestions:[Cc.translations.suggestions.repeated]}},ou=()=>({warning:Cc.translations.warnings.sequences,suggestions:[Cc.translations.suggestions.sequences]}),iu=t=>{let e=Cc.translations.warnings.keyPattern;return 1===t.turns&&(e=Cc.translations.warnings.straightRow),{warning:e,suggestions:[Cc.translations.suggestions.longerKeyboardPattern]}},au=()=>null;const cu={warning:null,suggestions:[]};class uu{constructor(){this.matchers={bruteforce:Qc,date:tu,dictionary:nu,regex:ru,repeat:su,sequence:ou,spatial:iu,separator:au},this.defaultFeedback={warning:null,suggestions:[]},this.setDefaultSuggestions()}setDefaultSuggestions(){this.defaultFeedback.suggestions.push(Cc.translations.suggestions.useWords,Cc.translations.suggestions.noNeed)}getFeedback(t,e){if(0===e.length)return this.defaultFeedback;if(t>2)return cu;const n=Cc.translations.suggestions.anotherWord,r=this.getLongestMatch(e);let s=this.getMatchFeedback(r,1===e.length);return null!=s?s.suggestions.unshift(n):s={warning:null,suggestions:[n]},s}getLongestMatch(t){let e=t[0];return t.slice(1).forEach((t=>{t.token.length>e.token.length&&(e=t)})),e}getMatchFeedback(t,e){return this.matchers[t.pattern]?this.matchers[t.pattern](t,e):Cc.matchers[t.pattern]&&"feedback"in Cc.matchers[t.pattern]?Cc.matchers[t.pattern].feedback(t,e):cu}}const lu=()=>(new Date).getTime(),hu=(t,e)=>{const n=lu(),r=((t,e)=>(e&&Cc.extendUserInputsDictionary(e),(new Kc).match(t)))(t,e);if(r instanceof Promise)throw new Error("You are using a Promised matcher, please use `zxcvbnAsync` for it.");return((t,e,n)=>{const r=new uu,s=new Jc,o=Bc.mostGuessableMatchSequence(e,t),i=lu()-n,a=s.estimateAttackTimes(o.guesses);return{calcTime:i,...o,...a,feedback:r.getFeedback(a.score,o.sequence)}})(r,t,n)};function fu(t,e,n,r,s,o,i,a,c,u){"boolean"!=typeof i&&(c=a,a=i,i=!1);const l="function"==typeof n?n.options:n;let h;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,s&&(l.functional=!0)),r&&(l._scopeId=r),o?(h=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=h):e&&(h=i?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),h)if(l.functional){const t=l.render;l.render=function(e,n){return h.call(n),t(e,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,h):[h]}return n}const du={name:"BasePasswordCheck",props:{password:{type:String,default:""},showPassword:{type:Boolean,default:!1},maxlength:{type:Number,default:40},isHideBar:{type:Boolean,default:!1}},data:()=>({curPsWd:""}),computed:{passwordStrength(){return hu(this.curPsWd).score}},watch:{curPsWd(t){this.$emit("update:password",t)}},created(){this.curPsWd=this.password}};var pu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"base-password-style"},[n("el-input",{attrs:{placeholder:"请输入密码","show-password":t.showPassword,maxlength:t.maxlength},model:{value:t.curPsWd,callback:function(e){t.curPsWd=e},expression:"curPsWd"}}),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.isHideBar,expression:"!isHideBar"}],staticClass:"strength-meter-bar"},[n("div",{staticClass:"strength-meter-bar--fill",attrs:{"data-score":t.passwordStrength}})])],1)};pu._withStripped=!0;const gu=fu({render:pu,staticRenderFns:[]},undefined,du,undefined,false,undefined,!1,void 0,void 0,void 0);gu.install=function(t,e){var n;if(n="按需加载独立组件:"+gu.name,"development"!==process.env.NODE_ENV&&"dev"!==process.env.NODE_ENV||console.warn(n),o(e)&&!i(e))for(var r=0;r<e.length;r++)e[r].name!==gu.name&&t.use(e[r]);t.component(gu.name,gu)},exports.BasePasswordCheck=gu;