smart-browser-detection
Version:
Smart browser detection library with anti-spoofing capabilities, multi-method detection, and mobile browser support. Outperforms UA-Parser-JS with superior accuracy and spoofing resistance.
12 lines (11 loc) • 46.7 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SmartBrowserDetection={})}(this,function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,n){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){u=!0,a=e},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}function o(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a=function(e){return e&&e.Math===Math&&e},c=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof i&&i)||a("object"==typeof i&&i)||function(){return this}()||Function("return this")(),u={},s=function(e){try{return!!e()}catch(e){return!0}},f=!s(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),l=!s(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),d=l,v=Function.prototype.call,p=d?v.bind(v):function(){return v.apply(v,arguments)},g={},h={}.propertyIsEnumerable,y=Object.getOwnPropertyDescriptor,b=y&&!h.call({1:2},1);g.f=b?function(e){var t=y(this,e);return!!t&&t.enumerable}:h;var w,m,x=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},O=l,S=Function.prototype,k=S.call,A=O&&S.bind.bind(k,k),E=O?A:function(e){return function(){return k.apply(e,arguments)}},j=E,I=j({}.toString),T=j("".slice),P=function(e){return T(I(e),8,-1)},C=s,D=P,L=Object,R=E("".split),M=C(function(){return!L("z").propertyIsEnumerable(0)})?function(e){return"String"===D(e)?R(e,""):L(e)}:L,U=function(e){return null==e},F=U,_=TypeError,B=function(e){if(F(e))throw new _("Can't call method on "+e);return e},N=M,V=B,z=function(e){return N(V(e))},G="object"==typeof document&&document.all,W=void 0===G&&void 0!==G?function(e){return"function"==typeof e||e===G}:function(e){return"function"==typeof e},$=W,K=function(e){return"object"==typeof e?null!==e:$(e)},H=c,Y=W,q=function(e,t){return arguments.length<2?(n=H[e],Y(n)?n:void 0):H[e]&&H[e][t];var n},X=E({}.isPrototypeOf),Z=c.navigator,J=Z&&Z.userAgent,Q=c,ee=J?String(J):"",te=Q.process,ne=Q.Deno,re=te&&te.versions||ne&&ne.version,oe=re&&re.v8;oe&&(m=(w=oe.split("."))[0]>0&&w[0]<4?1:+(w[0]+w[1])),!m&&ee&&(!(w=ee.match(/Edge\/(\d+)/))||w[1]>=74)&&(w=ee.match(/Chrome\/(\d+)/))&&(m=+w[1]);var ie=m,ae=ie,ce=s,ue=c.String,se=!!Object.getOwnPropertySymbols&&!ce(function(){var e=Symbol("symbol detection");return!ue(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ae&&ae<41}),fe=se&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,le=q,de=W,ve=X,pe=Object,ge=fe?function(e){return"symbol"==typeof e}:function(e){var t=le("Symbol");return de(t)&&ve(t.prototype,pe(e))},he=String,ye=function(e){try{return he(e)}catch(e){return"Object"}},be=W,we=ye,me=TypeError,xe=function(e){if(be(e))return e;throw new me(we(e)+" is not a function")},Oe=xe,Se=U,ke=function(e,t){var n=e[t];return Se(n)?void 0:Oe(n)},Ae=p,Ee=W,je=K,Ie=TypeError,Te={exports:{}},Pe=c,Ce=Object.defineProperty,De=function(e,t){try{Ce(Pe,e,{value:t,configurable:!0,writable:!0})}catch(n){Pe[e]=t}return t},Le=c,Re=De,Me="__core-js_shared__",Ue=Te.exports=Le[Me]||Re(Me,{});(Ue.versions||(Ue.versions=[])).push({version:"3.43.0",mode:"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Fe=Te.exports,_e=Fe,Be=function(e,t){return _e[e]||(_e[e]=t||{})},Ne=B,Ve=Object,ze=function(e){return Ve(Ne(e))},Ge=ze,We=E({}.hasOwnProperty),$e=Object.hasOwn||function(e,t){return We(Ge(e),t)},Ke=E,He=0,Ye=Math.random(),qe=Ke(1.1.toString),Xe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+qe(++He+Ye,36)},Ze=Be,Je=$e,Qe=Xe,et=se,tt=fe,nt=c.Symbol,rt=Ze("wks"),ot=tt?nt.for||nt:nt&&nt.withoutSetter||Qe,it=function(e){return Je(rt,e)||(rt[e]=et&&Je(nt,e)?nt[e]:ot("Symbol."+e)),rt[e]},at=p,ct=K,ut=ge,st=ke,ft=function(e,t){var n,r;if("string"===t&&Ee(n=e.toString)&&!je(r=Ae(n,e)))return r;if(Ee(n=e.valueOf)&&!je(r=Ae(n,e)))return r;if("string"!==t&&Ee(n=e.toString)&&!je(r=Ae(n,e)))return r;throw new Ie("Can't convert object to primitive value")},lt=TypeError,dt=it("toPrimitive"),vt=function(e,t){if(!ct(e)||ut(e))return e;var n,r=st(e,dt);if(r){if(void 0===t&&(t="default"),n=at(r,e,t),!ct(n)||ut(n))return n;throw new lt("Can't convert object to primitive value")}return void 0===t&&(t="number"),ft(e,t)},pt=ge,gt=function(e){var t=vt(e,"string");return pt(t)?t:t+""},ht=K,yt=c.document,bt=ht(yt)&&ht(yt.createElement),wt=function(e){return bt?yt.createElement(e):{}},mt=wt,xt=!f&&!s(function(){return 7!==Object.defineProperty(mt("div"),"a",{get:function(){return 7}}).a}),Ot=f,St=p,kt=g,At=x,Et=z,jt=gt,It=$e,Tt=xt,Pt=Object.getOwnPropertyDescriptor;u.f=Ot?Pt:function(e,t){if(e=Et(e),t=jt(t),Tt)try{return Pt(e,t)}catch(e){}if(It(e,t))return At(!St(kt.f,e,t),e[t])};var Ct={},Dt=f&&s(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Lt=K,Rt=String,Mt=TypeError,Ut=function(e){if(Lt(e))return e;throw new Mt(Rt(e)+" is not an object")},Ft=f,_t=xt,Bt=Dt,Nt=Ut,Vt=gt,zt=TypeError,Gt=Object.defineProperty,Wt=Object.getOwnPropertyDescriptor,$t="enumerable",Kt="configurable",Ht="writable";Ct.f=Ft?Bt?function(e,t,n){if(Nt(e),t=Vt(t),Nt(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Ht in n&&!n[Ht]){var r=Wt(e,t);r&&r[Ht]&&(e[t]=n.value,n={configurable:Kt in n?n[Kt]:r[Kt],enumerable:$t in n?n[$t]:r[$t],writable:!1})}return Gt(e,t,n)}:Gt:function(e,t,n){if(Nt(e),t=Vt(t),Nt(n),_t)try{return Gt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new zt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Yt=Ct,qt=x,Xt=f?function(e,t,n){return Yt.f(e,t,qt(1,n))}:function(e,t,n){return e[t]=n,e},Zt={exports:{}},Jt=f,Qt=$e,en=Function.prototype,tn=Jt&&Object.getOwnPropertyDescriptor,nn=Qt(en,"name"),rn={PROPER:nn&&"something"===function(){}.name,CONFIGURABLE:nn&&(!Jt||Jt&&tn(en,"name").configurable)},on=W,an=Fe,cn=E(Function.toString);on(an.inspectSource)||(an.inspectSource=function(e){return cn(e)});var un,sn,fn,ln=an.inspectSource,dn=W,vn=c.WeakMap,pn=dn(vn)&&/native code/.test(String(vn)),gn=Xe,hn=Be("keys"),yn=function(e){return hn[e]||(hn[e]=gn(e))},bn={},wn=pn,mn=c,xn=K,On=Xt,Sn=$e,kn=Fe,An=yn,En=bn,jn="Object already initialized",In=mn.TypeError,Tn=mn.WeakMap;if(wn||kn.state){var Pn=kn.state||(kn.state=new Tn);Pn.get=Pn.get,Pn.has=Pn.has,Pn.set=Pn.set,un=function(e,t){if(Pn.has(e))throw new In(jn);return t.facade=e,Pn.set(e,t),t},sn=function(e){return Pn.get(e)||{}},fn=function(e){return Pn.has(e)}}else{var Cn=An("state");En[Cn]=!0,un=function(e,t){if(Sn(e,Cn))throw new In(jn);return t.facade=e,On(e,Cn,t),t},sn=function(e){return Sn(e,Cn)?e[Cn]:{}},fn=function(e){return Sn(e,Cn)}}var Dn={set:un,get:sn,has:fn,enforce:function(e){return fn(e)?sn(e):un(e,{})},getterFor:function(e){return function(t){var n;if(!xn(t)||(n=sn(t)).type!==e)throw new In("Incompatible receiver, "+e+" required");return n}}},Ln=E,Rn=s,Mn=W,Un=$e,Fn=f,_n=rn.CONFIGURABLE,Bn=ln,Nn=Dn.enforce,Vn=Dn.get,zn=String,Gn=Object.defineProperty,Wn=Ln("".slice),$n=Ln("".replace),Kn=Ln([].join),Hn=Fn&&!Rn(function(){return 8!==Gn(function(){},"length",{value:8}).length}),Yn=String(String).split("String"),qn=Zt.exports=function(e,t,n){"Symbol("===Wn(zn(t),0,7)&&(t="["+$n(zn(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Un(e,"name")||_n&&e.name!==t)&&(Fn?Gn(e,"name",{value:t,configurable:!0}):e.name=t),Hn&&n&&Un(n,"arity")&&e.length!==n.arity&&Gn(e,"length",{value:n.arity});try{n&&Un(n,"constructor")&&n.constructor?Fn&&Gn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Nn(e);return Un(r,"source")||(r.source=Kn(Yn,"string"==typeof t?t:"")),e};Function.prototype.toString=qn(function(){return Mn(this)&&Vn(this).source||Bn(this)},"toString");var Xn=Zt.exports,Zn=W,Jn=Ct,Qn=Xn,er=De,tr=function(e,t,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:t;if(Zn(n)&&Qn(n,i,r),r.global)o?e[t]=n:er(t,n);else{try{r.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=n:Jn.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},nr={},rr=Math.ceil,or=Math.floor,ir=Math.trunc||function(e){var t=+e;return(t>0?or:rr)(t)},ar=function(e){var t=+e;return t!=t||0===t?0:ir(t)},cr=ar,ur=Math.max,sr=Math.min,fr=ar,lr=Math.min,dr=function(e){var t=fr(e);return t>0?lr(t,9007199254740991):0},vr=dr,pr=function(e){return vr(e.length)},gr=z,hr=function(e,t){var n=cr(e);return n<0?ur(n+t,0):sr(n,t)},yr=pr,br=function(e){return function(t,n,r){var o=gr(t),i=yr(o);if(0===i)return!e&&-1;var a,c=hr(r,i);if(e&&n!=n){for(;i>c;)if((a=o[c++])!=a)return!0}else for(;i>c;c++)if((e||c in o)&&o[c]===n)return e||c||0;return!e&&-1}},wr={includes:br(!0),indexOf:br(!1)},mr=$e,xr=z,Or=wr.indexOf,Sr=bn,kr=E([].push),Ar=function(e,t){var n,r=xr(e),o=0,i=[];for(n in r)!mr(Sr,n)&&mr(r,n)&&kr(i,n);for(;t.length>o;)mr(r,n=t[o++])&&(~Or(i,n)||kr(i,n));return i},Er=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],jr=Ar,Ir=Er.concat("length","prototype");nr.f=Object.getOwnPropertyNames||function(e){return jr(e,Ir)};var Tr={};Tr.f=Object.getOwnPropertySymbols;var Pr=q,Cr=nr,Dr=Tr,Lr=Ut,Rr=E([].concat),Mr=Pr("Reflect","ownKeys")||function(e){var t=Cr.f(Lr(e)),n=Dr.f;return n?Rr(t,n(e)):t},Ur=$e,Fr=Mr,_r=u,Br=Ct,Nr=s,Vr=W,zr=/#|\.prototype\./,Gr=function(e,t){var n=$r[Wr(e)];return n===Hr||n!==Kr&&(Vr(t)?Nr(t):!!t)},Wr=Gr.normalize=function(e){return String(e).replace(zr,".").toLowerCase()},$r=Gr.data={},Kr=Gr.NATIVE="N",Hr=Gr.POLYFILL="P",Yr=Gr,qr=c,Xr=u.f,Zr=Xt,Jr=tr,Qr=De,eo=function(e,t,n){for(var r=Fr(t),o=Br.f,i=_r.f,a=0;a<r.length;a++){var c=r[a];Ur(e,c)||n&&Ur(n,c)||o(e,c,i(t,c))}},to=Yr,no=function(e,t){var n,r,o,i,a,c=e.target,u=e.global,s=e.stat;if(n=u?qr:s?qr[c]||Qr(c,{}):qr[c]&&qr[c].prototype)for(r in t){if(i=t[r],o=e.dontCallGetSet?(a=Xr(n,r))&&a.value:n[r],!to(u?r:c+(s?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;eo(i,o)}(e.sham||o&&o.sham)&&Zr(i,"sham",!0),Jr(n,r,i,e)}},ro=P,oo=E,io=function(e){if("Function"===ro(e))return oo(e)},ao=xe,co=l,uo=io(io.bind),so=function(e,t){return ao(e),void 0===t?e:co?uo(e,t):function(){return e.apply(t,arguments)}},fo=P,lo=Array.isArray||function(e){return"Array"===fo(e)},vo={};vo[it("toStringTag")]="z";var po="[object z]"===String(vo),go=po,ho=W,yo=P,bo=it("toStringTag"),wo=Object,mo="Arguments"===yo(function(){return arguments}()),xo=go?yo:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=wo(e),bo))?n:mo?yo(t):"Object"===(r=yo(t))&&ho(t.callee)?"Arguments":r},Oo=E,So=s,ko=W,Ao=xo,Eo=ln,jo=function(){},Io=q("Reflect","construct"),To=/^\s*(?:class|function)\b/,Po=Oo(To.exec),Co=!To.test(jo),Do=function(e){if(!ko(e))return!1;try{return Io(jo,[],e),!0}catch(e){return!1}},Lo=function(e){if(!ko(e))return!1;switch(Ao(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Co||!!Po(To,Eo(e))}catch(e){return!0}};Lo.sham=!0;var Ro=!Io||So(function(){var e;return Do(Do.call)||!Do(Object)||!Do(function(){e=!0})||e})?Lo:Do,Mo=lo,Uo=Ro,Fo=K,_o=it("species"),Bo=Array,No=function(e){var t;return Mo(e)&&(t=e.constructor,(Uo(t)&&(t===Bo||Mo(t.prototype))||Fo(t)&&null===(t=t[_o]))&&(t=void 0)),void 0===t?Bo:t},Vo=so,zo=M,Go=ze,Wo=pr,$o=function(e,t){return new(No(e))(0===t?0:t)},Ko=E([].push),Ho=function(e){var t=1===e,n=2===e,r=3===e,o=4===e,i=6===e,a=7===e,c=5===e||i;return function(u,s,f,l){for(var d,v,p=Go(u),g=zo(p),h=Wo(g),y=Vo(s,f),b=0,w=l||$o,m=t?w(u,h):n||a?w(u,0):void 0;h>b;b++)if((c||b in g)&&(v=y(d=g[b],b,p),e))if(t)m[b]=v;else if(v)switch(e){case 3:return!0;case 5:return d;case 6:return b;case 2:Ko(m,d)}else switch(e){case 4:return!1;case 7:Ko(m,d)}return i?-1:r||o?o:m}},Yo={forEach:Ho(0),map:Ho(1),filter:Ho(2)},qo=s,Xo=ie,Zo=it("species"),Jo=function(e){return Xo>=51||!qo(function(){var t=[];return(t.constructor={})[Zo]=function(){return{foo:1}},1!==t[e](Boolean).foo})},Qo=Yo.filter;no({target:"Array",proto:!0,forced:!Jo("filter")},{filter:function(e){return Qo(this,e,arguments.length>1?arguments[1]:void 0)}});var ei=p,ti=Ut,ni=ke,ri=function(e,t,n){var r,o;ti(e);try{if(!(r=ni(e,"return"))){if("throw"===t)throw n;return n}r=ei(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return ti(r),n},oi=Ut,ii=ri,ai={},ci=ai,ui=it("iterator"),si=Array.prototype,fi=function(e){return void 0!==e&&(ci.Array===e||si[ui]===e)},li=f,di=Ct,vi=x,pi=xo,gi=ke,hi=U,yi=ai,bi=it("iterator"),wi=function(e){if(!hi(e))return gi(e,bi)||gi(e,"@@iterator")||yi[pi(e)]},mi=p,xi=xe,Oi=Ut,Si=ye,ki=wi,Ai=TypeError,Ei=function(e,t){var n=arguments.length<2?ki(e):t;if(xi(n))return Oi(mi(n,e));throw new Ai(Si(e)+" is not iterable")},ji=so,Ii=p,Ti=ze,Pi=function(e,t,n,r){try{return r?t(oi(n)[0],n[1]):t(n)}catch(t){ii(e,"throw",t)}},Ci=fi,Di=Ro,Li=pr,Ri=function(e,t,n){li?di.f(e,t,vi(0,n)):e[t]=n},Mi=Ei,Ui=wi,Fi=Array,_i=it("iterator"),Bi=!1;try{var Ni=0,Vi={next:function(){return{done:!!Ni++}},return:function(){Bi=!0}};Vi[_i]=function(){return this},Array.from(Vi,function(){throw 2})}catch(e){}var zi=function(e,t){try{if(!t&&!Bi)return!1}catch(e){return!1}var n=!1;try{var r={};r[_i]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Gi=function(e){var t=Ti(e),n=Di(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=void 0!==o;i&&(o=ji(o,r>2?arguments[2]:void 0));var a,c,u,s,f,l,d=Ui(t),v=0;if(!d||this===Fi&&Ci(d))for(a=Li(t),c=n?new this(a):Fi(a);a>v;v++)l=i?o(t[v],v):t[v],Ri(c,v,l);else for(c=n?new this:[],f=(s=Mi(t,d)).next;!(u=Ii(f,s)).done;v++)l=i?Pi(s,o,[u.value,v],!0):u.value,Ri(c,v,l);return c.length=v,c};no({target:"Array",stat:!0,forced:!zi(function(e){Array.from(e)})},{from:Gi});var Wi={},$i=Ar,Ki=Er,Hi=Object.keys||function(e){return $i(e,Ki)},Yi=f,qi=Dt,Xi=Ct,Zi=Ut,Ji=z,Qi=Hi;Wi.f=Yi&&!qi?Object.defineProperties:function(e,t){Zi(e);for(var n,r=Ji(t),o=Qi(t),i=o.length,a=0;i>a;)Xi.f(e,n=o[a++],r[n]);return e};var ea,ta=q("document","documentElement"),na=Ut,ra=Wi,oa=Er,ia=bn,aa=ta,ca=wt,ua="prototype",sa="script",fa=yn("IE_PROTO"),la=function(){},da=function(e){return"<"+sa+">"+e+"</"+sa+">"},va=function(e){e.write(da("")),e.close();var t=e.parentWindow.Object;return e=null,t},pa=function(){try{ea=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;pa="undefined"!=typeof document?document.domain&&ea?va(ea):(t=ca("iframe"),n="java"+sa+":",t.style.display="none",aa.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(da("document.F=Object")),e.close(),e.F):va(ea);for(var r=oa.length;r--;)delete pa[ua][oa[r]];return pa()};ia[fa]=!0;var ga=Object.create||function(e,t){var n;return null!==e?(la[ua]=na(e),n=new la,la[ua]=null,n[fa]=e):n=pa(),void 0===t?n:ra.f(n,t)},ha=it,ya=ga,ba=Ct.f,wa=ha("unscopables"),ma=Array.prototype;void 0===ma[wa]&&ba(ma,wa,{configurable:!0,value:ya(null)});var xa=function(e){ma[wa][e]=!0},Oa=wr.includes,Sa=xa;no({target:"Array",proto:!0,forced:s(function(){return!Array(1).includes()})},{includes:function(e){return Oa(this,e,arguments.length>1?arguments[1]:void 0)}}),Sa("includes");var ka,Aa,Ea,ja=!s(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Ia=$e,Ta=W,Pa=ze,Ca=ja,Da=yn("IE_PROTO"),La=Object,Ra=La.prototype,Ma=Ca?La.getPrototypeOf:function(e){var t=Pa(e);if(Ia(t,Da))return t[Da];var n=t.constructor;return Ta(n)&&t instanceof n?n.prototype:t instanceof La?Ra:null},Ua=s,Fa=W,_a=K,Ba=Ma,Na=tr,Va=it("iterator"),za=!1;[].keys&&("next"in(Ea=[].keys())?(Aa=Ba(Ba(Ea)))!==Object.prototype&&(ka=Aa):za=!0);var Ga=!_a(ka)||Ua(function(){var e={};return ka[Va].call(e)!==e});Ga&&(ka={}),Fa(ka[Va])||Na(ka,Va,function(){return this});var Wa={IteratorPrototype:ka,BUGGY_SAFARI_ITERATORS:za},$a=Ct.f,Ka=$e,Ha=it("toStringTag"),Ya=function(e,t,n){e&&!n&&(e=e.prototype),e&&!Ka(e,Ha)&&$a(e,Ha,{configurable:!0,value:t})},qa=Wa.IteratorPrototype,Xa=ga,Za=x,Ja=Ya,Qa=ai,ec=function(){return this},tc=E,nc=xe,rc=K,oc=function(e){return rc(e)||null===e},ic=String,ac=TypeError,cc=function(e,t,n){try{return tc(nc(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},uc=K,sc=B,fc=function(e){if(oc(e))return e;throw new ac("Can't set "+ic(e)+" as a prototype")},lc=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=cc(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return sc(n),fc(r),uc(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0),dc=no,vc=p,pc=W,gc=function(e,t,n,r){var o=t+" Iterator";return e.prototype=Xa(qa,{next:Za(+!r,n)}),Ja(e,o,!1),Qa[o]=ec,e},hc=Ma,yc=lc,bc=Ya,wc=Xt,mc=tr,xc=ai,Oc=rn.PROPER,Sc=rn.CONFIGURABLE,kc=Wa.IteratorPrototype,Ac=Wa.BUGGY_SAFARI_ITERATORS,Ec=it("iterator"),jc="keys",Ic="values",Tc="entries",Pc=function(){return this},Cc=function(e,t,n,r,o,i,a){gc(n,t,r);var c,u,s,f=function(e){if(e===o&&g)return g;if(!Ac&&e&&e in v)return v[e];switch(e){case jc:case Ic:case Tc:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",d=!1,v=e.prototype,p=v[Ec]||v["@@iterator"]||o&&v[o],g=!Ac&&p||f(o),h="Array"===t&&v.entries||p;if(h&&(c=hc(h.call(new e)))!==Object.prototype&&c.next&&(hc(c)!==kc&&(yc?yc(c,kc):pc(c[Ec])||mc(c,Ec,Pc)),bc(c,l,!0)),Oc&&o===Ic&&p&&p.name!==Ic&&(Sc?wc(v,"name",Ic):(d=!0,g=function(){return vc(p,this)})),o)if(u={values:f(Ic),keys:i?g:f(jc),entries:f(Tc)},a)for(s in u)(Ac||d||!(s in v))&&mc(v,s,u[s]);else dc({target:t,proto:!0,forced:Ac||d},u);return v[Ec]!==g&&mc(v,Ec,g,{name:o}),xc[t]=g,u},Dc=function(e,t){return{value:e,done:t}},Lc=z,Rc=xa,Mc=ai,Uc=Dn,Fc=Ct.f,_c=Cc,Bc=Dc,Nc=f,Vc="Array Iterator",zc=Uc.set,Gc=Uc.getterFor(Vc),Wc=_c(Array,"Array",function(e,t){zc(this,{type:Vc,target:Lc(e),index:0,kind:t})},function(){var e=Gc(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Bc(void 0,!0);switch(e.kind){case"keys":return Bc(n,!1);case"values":return Bc(t[n],!1)}return Bc([n,t[n]],!1)},"values"),$c=Mc.Arguments=Mc.Array;if(Rc("keys"),Rc("values"),Rc("entries"),Nc&&"values"!==$c.name)try{Fc($c,"name",{value:"values"})}catch(e){}var Kc=Yo.map;no({target:"Array",proto:!0,forced:!Jo("map")},{map:function(e){return Kc(this,e,arguments.length>1?arguments[1]:void 0)}});var Hc={exports:{}},Yc={},qc=E([].slice),Xc=P,Zc=z,Jc=nr.f,Qc=qc,eu="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Yc.f=function(e){return eu&&"Window"===Xc(e)?function(e){try{return Jc(e)}catch(e){return Qc(eu)}}(e):Jc(Zc(e))};var tu=s(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),nu=s,ru=K,ou=P,iu=tu,au=Object.isExtensible,cu=nu(function(){au(1)})||iu?function(e){return!!ru(e)&&((!iu||"ArrayBuffer"!==ou(e))&&(!au||au(e)))}:au,uu=!s(function(){return Object.isExtensible(Object.preventExtensions({}))}),su=no,fu=E,lu=bn,du=K,vu=$e,pu=Ct.f,gu=nr,hu=Yc,yu=cu,bu=uu,wu=!1,mu=Xe("meta"),xu=0,Ou=function(e){pu(e,mu,{value:{objectID:"O"+xu++,weakData:{}}})},Su=Hc.exports={enable:function(){Su.enable=function(){},wu=!0;var e=gu.f,t=fu([].splice),n={};n[mu]=1,e(n).length&&(gu.f=function(n){for(var r=e(n),o=0,i=r.length;o<i;o++)if(r[o]===mu){t(r,o,1);break}return r},su({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:hu.f}))},fastKey:function(e,t){if(!du(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!vu(e,mu)){if(!yu(e))return"F";if(!t)return"E";Ou(e)}return e[mu].objectID},getWeakData:function(e,t){if(!vu(e,mu)){if(!yu(e))return!0;if(!t)return!1;Ou(e)}return e[mu].weakData},onFreeze:function(e){return bu&&wu&&yu(e)&&!vu(e,mu)&&Ou(e),e}};lu[mu]=!0;var ku=Hc.exports,Au=so,Eu=p,ju=Ut,Iu=ye,Tu=fi,Pu=pr,Cu=X,Du=Ei,Lu=wi,Ru=ri,Mu=TypeError,Uu=function(e,t){this.stopped=e,this.result=t},Fu=Uu.prototype,_u=function(e,t,n){var r,o,i,a,c,u,s,f=n&&n.that,l=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),v=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),g=Au(t,f),h=function(e){return r&&Ru(r,"normal"),new Uu(!0,e)},y=function(e){return l?(ju(e),p?g(e[0],e[1],h):g(e[0],e[1])):p?g(e,h):g(e)};if(d)r=e.iterator;else if(v)r=e;else{if(!(o=Lu(e)))throw new Mu(Iu(e)+" is not iterable");if(Tu(o)){for(i=0,a=Pu(e);a>i;i++)if((c=y(e[i]))&&Cu(Fu,c))return c;return new Uu(!1)}r=Du(e,o)}for(u=d?e.next:r.next;!(s=Eu(u,r)).done;){try{c=y(s.value)}catch(e){Ru(r,"throw",e)}if("object"==typeof c&&c&&Cu(Fu,c))return c}return new Uu(!1)},Bu=X,Nu=TypeError,Vu=function(e,t){if(Bu(t,e))return e;throw new Nu("Incorrect invocation")},zu=W,Gu=K,Wu=lc,$u=no,Ku=c,Hu=E,Yu=Yr,qu=tr,Xu=ku,Zu=_u,Ju=Vu,Qu=W,es=U,ts=K,ns=s,rs=zi,os=Ya,is=function(e,t,n){var r,o;return Wu&&zu(r=t.constructor)&&r!==n&&Gu(o=r.prototype)&&o!==n.prototype&&Wu(e,o),e},as=Xn,cs=Ct,us=function(e,t,n){return n.get&&as(n.get,t,{getter:!0}),n.set&&as(n.set,t,{setter:!0}),cs.f(e,t,n)},ss=tr,fs=q,ls=us,ds=f,vs=it("species"),ps=ga,gs=us,hs=function(e,t,n){for(var r in t)ss(e,r,t[r],n);return e},ys=so,bs=Vu,ws=U,ms=_u,xs=Cc,Os=Dc,Ss=function(e){var t=fs(e);ds&&t&&!t[vs]&&ls(t,vs,{configurable:!0,get:function(){return this}})},ks=f,As=ku.fastKey,Es=Dn.set,js=Dn.getterFor,Is={getConstructor:function(e,t,n,r){var o=e(function(e,o){bs(e,i),Es(e,{type:t,index:ps(null),first:null,last:null,size:0}),ks||(e.size=0),ws(o)||ms(o,e[r],{that:e,AS_ENTRIES:n})}),i=o.prototype,a=js(t),c=function(e,t,n){var r,o,i=a(e),c=u(e,t);return c?c.value=n:(i.last=c={index:o=As(t,!0),key:t,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=c),r&&(r.next=c),ks?i.size++:e.size++,"F"!==o&&(i.index[o]=c)),e},u=function(e,t){var n,r=a(e),o=As(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===t)return n};return hs(i,{clear:function(){for(var e=a(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=ps(null),ks?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=u(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first===r&&(n.first=o),n.last===r&&(n.last=i),ks?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=ys(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),hs(i,n?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return c(this,0===e?0:e,t)}}:{add:function(e){return c(this,e=0===e?0:e,e)}}),ks&&gs(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=js(t),i=js(r);xs(e,t,function(e,t){Es(this,{type:r,target:e,state:o(e),kind:t,last:null})},function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?Os("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,Os(void 0,!0))},n?"entries":"values",!n,!0),Ss(t)}};(function(e,t,n){var r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=r?"set":"add",a=Ku[e],c=a&&a.prototype,u=a,s={},f=function(e){var t=Hu(c[e]);qu(c,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(o&&!ts(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return o&&!ts(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(o&&!ts(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(Yu(e,!Qu(a)||!(o||c.forEach&&!ns(function(){(new a).entries().next()}))))u=n.getConstructor(t,e,r,i),Xu.enable();else if(Yu(e,!0)){var l=new u,d=l[i](o?{}:-0,1)!==l,v=ns(function(){l.has(1)}),p=rs(function(e){new a(e)}),g=!o&&ns(function(){for(var e=new a,t=5;t--;)e[i](t,t);return!e.has(-0)});p||((u=t(function(e,t){Ju(e,c);var n=is(new a,e,u);return es(t)||Zu(t,n[i],{that:n,AS_ENTRIES:r}),n})).prototype=c,c.constructor=u),(v||g)&&(f("delete"),f("has"),r&&f("get")),(g||d)&&f(i),o&&c.clear&&delete c.clear}s[e]=u,$u({global:!0,constructor:!0,forced:u!==a},s),os(u,e),o||n.setStrong(u,e,r)})("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Is);var Ts=f,Ps=E,Cs=p,Ds=s,Ls=Hi,Rs=Tr,Ms=g,Us=ze,Fs=M,_s=Object.assign,Bs=Object.defineProperty,Ns=Ps([].concat),Vs=!_s||Ds(function(){if(Ts&&1!==_s({b:1},_s(Bs({},"a",{enumerable:!0,get:function(){Bs(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!==_s({},e)[n]||Ls(_s({},t)).join("")!==r})?function(e,t){for(var n=Us(e),r=arguments.length,o=1,i=Rs.f,a=Ms.f;r>o;)for(var c,u=Fs(arguments[o++]),s=i?Ns(Ls(u),i(u)):Ls(u),f=s.length,l=0;f>l;)c=s[l++],Ts&&!Cs(a,u,c)||(n[c]=u[c]);return n}:_s,zs=Vs;no({target:"Object",stat:!0,arity:2,forced:Object.assign!==zs},{assign:zs});var Gs=ze,Ws=Hi;no({target:"Object",stat:!0,forced:s(function(){Ws(1)})},{keys:function(e){return Ws(Gs(e))}});var $s=xo,Ks=po?{}.toString:function(){return"[object "+$s(this)+"]"};po||tr(Object.prototype,"toString",Ks,{unsafe:!0});var Hs=xo,Ys=String,qs=function(e){if("Symbol"===Hs(e))throw new TypeError("Cannot convert a Symbol value to a string");return Ys(e)},Xs=Ut,Zs=function(){var e=Xs(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Js=s,Qs=c.RegExp,ef=Js(function(){var e=Qs("a","y");return e.lastIndex=2,null!==e.exec("abcd")});ef||Js(function(){return!Qs("a","y").sticky});var tf,nf,rf={BROKEN_CARET:ef||Js(function(){var e=Qs("^r","gy");return e.lastIndex=2,null!==e.exec("str")})},of=s,af=c.RegExp,cf=of(function(){var e=af(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}),uf=s,sf=c.RegExp,ff=uf(function(){var e=sf("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),lf=p,df=E,vf=qs,pf=Zs,gf=rf,hf=ga,yf=Dn.get,bf=cf,wf=ff,mf=Be("native-string-replace",String.prototype.replace),xf=RegExp.prototype.exec,Of=xf,Sf=df("".charAt),kf=df("".indexOf),Af=df("".replace),Ef=df("".slice),jf=(nf=/b*/g,lf(xf,tf=/a/,"a"),lf(xf,nf,"a"),0!==tf.lastIndex||0!==nf.lastIndex),If=gf.BROKEN_CARET,Tf=void 0!==/()??/.exec("")[1];(jf||Tf||If||bf||wf)&&(Of=function(e){var t,n,r,o,i,a,c,u=this,s=yf(u),f=vf(e),l=s.raw;if(l)return l.lastIndex=u.lastIndex,t=lf(Of,l,f),u.lastIndex=l.lastIndex,t;var d=s.groups,v=If&&u.sticky,p=lf(pf,u),g=u.source,h=0,y=f;if(v&&(p=Af(p,"y",""),-1===kf(p,"g")&&(p+="g"),y=Ef(f,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Sf(f,u.lastIndex-1))&&(g="(?: "+g+")",y=" "+y,h++),n=new RegExp("^(?:"+g+")",p)),Tf&&(n=new RegExp("^"+g+"$(?!\\s)",p)),jf&&(r=u.lastIndex),o=lf(xf,v?n:u,y),v?o?(o.input=Ef(o.input,h),o[0]=Ef(o[0],h),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:jf&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),Tf&&o&&o.length>1&&lf(mf,o[0],n,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)}),o&&d)for(o.groups=a=hf(null),i=0;i<d.length;i++)a[(c=d[i])[0]]=o[c[1]];return o});var Pf=Of;no({target:"RegExp",proto:!0,forced:/./.exec!==Pf},{exec:Pf});var Cf=K,Df=P,Lf=it("match"),Rf=function(e){var t;return Cf(e)&&(void 0!==(t=e[Lf])?!!t:"RegExp"===Df(e))},Mf=TypeError,Uf=it("match"),Ff=no,_f=function(e){if(Rf(e))throw new Mf("The method doesn't accept regular expressions");return e},Bf=B,Nf=qs,Vf=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Uf]=!1,"/./"[e](t)}catch(e){}}return!1},zf=E("".indexOf);Ff({target:"String",proto:!0,forced:!Vf("includes")},{includes:function(e){return!!~zf(Nf(Bf(this)),Nf(_f(e)),arguments.length>1?arguments[1]:void 0)}});var Gf,Wf=E,$f=ar,Kf=qs,Hf=B,Yf=Wf("".charAt),qf=Wf("".charCodeAt),Xf=Wf("".slice),Zf={charAt:(Gf=!0,function(e,t){var n,r,o=Kf(Hf(e)),i=$f(t),a=o.length;return i<0||i>=a?Gf?"":void 0:(n=qf(o,i))<55296||n>56319||i+1===a||(r=qf(o,i+1))<56320||r>57343?Gf?Yf(o,i):n:Gf?Xf(o,i,i+2):r-56320+(n-55296<<10)+65536})},Jf=Zf.charAt,Qf=qs,el=Dn,tl=Cc,nl=Dc,rl="String Iterator",ol=el.set,il=el.getterFor(rl);tl(String,"String",function(e){ol(this,{type:rl,string:Qf(e),index:0})},function(){var e,t=il(this),n=t.string,r=t.index;return r>=n.length?nl(void 0,!0):(e=Jf(n,r),t.index+=e.length,nl(e,!1))});var al=p,cl=tr,ul=Pf,sl=s,fl=it,ll=Xt,dl=fl("species"),vl=RegExp.prototype,pl=function(e,t,n,r){var o=fl(e),i=!sl(function(){var t={};return t[o]=function(){return 7},7!==""[e](t)}),a=i&&!sl(function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[dl]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t});if(!i||!a||n){var c=/./[o],u=t(o,""[e],function(e,t,n,r,o){var a=t.exec;return a===ul||a===vl.exec?i&&!o?{done:!0,value:al(c,t,n,r)}:{done:!0,value:al(e,n,t,r)}:{done:!1}});cl(String.prototype,e,u[0]),cl(vl,o,u[1])}r&&ll(vl[o],"sham",!0)},gl=Zf.charAt,hl=function(e,t,n){return t+(n?gl(e,t).length:1)},yl=s,bl=c.RegExp,wl=!yl(function(){var e=!0;try{bl(".","d")}catch(t){e=!1}var t={},n="",r=e?"dgimsy":"gimsy",o=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(i.hasIndices="d"),i)o(a,i[a]);return Object.getOwnPropertyDescriptor(bl.prototype,"flags").get.call(t)!==r||n!==r}),ml=p,xl=$e,Ol=X,Sl={correct:wl},kl=Zs,Al=RegExp.prototype,El=Sl.correct?function(e){return e.flags}:function(e){return Sl.correct||!Ol(Al,e)||xl(e,"flags")?e.flags:ml(kl,e)},jl=p,Il=Ut,Tl=W,Pl=P,Cl=Pf,Dl=TypeError,Ll=function(e,t){var n=e.exec;if(Tl(n)){var r=jl(n,e,t);return null!==r&&Il(r),r}if("RegExp"===Pl(e))return jl(Cl,e,t);throw new Dl("RegExp#exec called on incompatible receiver")},Rl=p,Ml=pl,Ul=Ut,Fl=K,_l=dr,Bl=qs,Nl=B,Vl=ke,zl=hl,Gl=El,Wl=Ll,$l=E("".indexOf);Ml("match",function(e,t,n){return[function(t){var n=Nl(this),r=Fl(t)?Vl(t,e):void 0;return r?Rl(r,t,n):new RegExp(t)[e](Bl(n))},function(e){var r=Ul(this),o=Bl(e),i=n(t,r,o);if(i.done)return i.value;var a=Bl(Gl(r));if(-1===$l(a,"g"))return Wl(r,o);var c=-1!==$l(a,"u");r.lastIndex=0;for(var u,s=[],f=0;null!==(u=Wl(r,o));){var l=Bl(u[0]);s[f]=l,""===l&&(r.lastIndex=zl(o,_l(r.lastIndex),c)),f++}return 0===f?null:s}]});var Kl=l,Hl=Function.prototype,Yl=Hl.apply,ql=Hl.call,Xl="object"==typeof Reflect&&Reflect.apply||(Kl?ql.bind(Yl):function(){return ql.apply(Yl,arguments)}),Zl=E,Jl=ze,Ql=Math.floor,ed=Zl("".charAt),td=Zl("".replace),nd=Zl("".slice),rd=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,od=/\$([$&'`]|\d{1,2})/g,id=Xl,ad=p,cd=E,ud=pl,sd=s,fd=Ut,ld=W,dd=K,vd=ar,pd=dr,gd=qs,hd=B,yd=hl,bd=ke,wd=function(e,t,n,r,o,i){var a=n+e.length,c=r.length,u=od;return void 0!==o&&(o=Jl(o),u=rd),td(i,u,function(i,u){var s;switch(ed(u,0)){case"$":return"$";case"&":return e;case"`":return nd(t,0,n);case"'":return nd(t,a);case"<":s=o[nd(u,1,-1)];break;default:var f=+u;if(0===f)return i;if(f>c){var l=Ql(f/10);return 0===l?i:l<=c?void 0===r[l-1]?ed(u,1):r[l-1]+ed(u,1):i}s=r[f-1]}return void 0===s?"":s})},md=El,xd=Ll,Od=it("replace"),Sd=Math.max,kd=Math.min,Ad=cd([].concat),Ed=cd([].push),jd=cd("".indexOf),Id=cd("".slice),Td=function(e){return void 0===e?e:String(e)},Pd="$0"==="a".replace(/./,"$0"),Cd=!!/./[Od]&&""===/./[Od]("a","$0");ud("replace",function(e,t,n){var r=Cd?"$":"$0";return[function(e,n){var r=hd(this),o=dd(e)?bd(e,Od):void 0;return o?ad(o,e,r,n):ad(t,gd(r),e,n)},function(e,o){var i=fd(this),a=gd(e);if("string"==typeof o&&-1===jd(o,r)&&-1===jd(o,"$<")){var c=n(t,i,a,o);if(c.done)return c.value}var u=ld(o);u||(o=gd(o));var s,f=gd(md(i)),l=-1!==jd(f,"g");l&&(s=-1!==jd(f,"u"),i.lastIndex=0);for(var d,v=[];null!==(d=xd(i,a))&&(Ed(v,d),l);){""===gd(d[0])&&(i.lastIndex=yd(a,pd(i.lastIndex),s))}for(var p="",g=0,h=0;h<v.length;h++){for(var y,b=gd((d=v[h])[0]),w=Sd(kd(vd(d.index),a.length),0),m=[],x=1;x<d.length;x++)Ed(m,Td(d[x]));var O=d.groups;if(u){var S=Ad([b],m,w,a);void 0!==O&&Ed(S,O),y=gd(id(o,void 0,S))}else y=wd(b,a,w,m,O,o);w>=g&&(p+=Id(a,g,w)+y,g=w+b.length)}return p+Id(a,g)}]},!!sd(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!Pd||Cd);var Dd={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Ld=wt("span").classList,Rd=Ld&&Ld.constructor&&Ld.constructor.prototype,Md=Rd===Object.prototype?void 0:Rd,Ud=s,Fd=Yo.forEach,_d=function(e,t){var n=[][e];return!!n&&Ud(function(){n.call(null,t||function(){return 1},1)})}("forEach")?[].forEach:function(e){return Fd(this,e,arguments.length>1?arguments[1]:void 0)},Bd=c,Nd=Dd,Vd=Md,zd=_d,Gd=Xt,Wd=function(e){if(e&&e.forEach!==zd)try{Gd(e,"forEach",zd)}catch(t){e.forEach=zd}};for(var $d in Nd)Nd[$d]&&Wd(Bd[$d]&&Bd[$d].prototype);Wd(Vd);var Kd=c,Hd=Dd,Yd=Md,qd=Wc,Xd=Xt,Zd=Ya,Jd=it("iterator"),Qd=qd.values,ev=function(e,t){if(e){if(e[Jd]!==Qd)try{Xd(e,Jd,Qd)}catch(t){e[Jd]=Qd}if(Zd(e,t,!0),Hd[t])for(var n in qd)if(e[n]!==qd[n])try{Xd(e,n,qd[n])}catch(t){e[n]=qd[n]}}};for(var tv in Hd)ev(Kd[tv]&&Kd[tv].prototype,tv);ev(Yd,"DOMTokenList");
/**
* Smart Browser Detection Library
* Advanced browser detection with anti-spoofing capabilities
*
* @version 1.0.0
* @author Smart Browser Detection Team
* @license MIT
*/
var nv=function(){return n(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cache=new Map,this.detectionMethods=["apiDetection","vendorDetection","userAgentDetection","cssDetection"],this.regexPatterns={chrome:/(?:chrome|crios)\/(\d+\.\d+(?:\.\d+)?)/i,firefox:/(?:firefox|fxios)\/(\d+\.\d+(?:\.\d+)?)/i,safari:/(?:version|safari)\/(\d+\.\d+(?:\.\d+)?)/i,edge:/(?:edg|edge)\/(\d+\.\d+(?:\.\d+)?)/i,opera:/(?:opera|opr)\/(\d+\.\d+(?:\.\d+)?)/i,ie:/(?:msie\s(\d+\.\d+)|rv:(\d+\.\d+))/i,android:/android\s(\d+\.\d+(?:\.\d+)?)/i,ios:/os\s(\d+_\d+)/i,windows:/windows nt (10\.0|6\.3|6\.2|6\.1)/i,macos:/mac os x 10_(\d+)/i}},[{key:"detectBrowser",value:function(){var e="browser_detection";if(this.cache.has(e))return this.cache.get(e);var t,n={browser:"Unknown",browserVersion:"Unknown",engine:"Unknown",engineVersion:"Unknown",platform:"Unknown",os:"Unknown",osVersion:"Unknown",isMobile:!1,isTablet:!1,isDesktop:!1,confidence:0,detectionMethods:[],userAgent:navigator.userAgent,vendor:navigator.vendor,timestamp:Date.now()},o=[],i=r(this.detectionMethods);try{for(i.s();!(t=i.n()).done;){var a=t.value;try{var c=null;switch(a){case"apiDetection":c=this.apiDetection();break;case"vendorDetection":c=this.vendorDetection();break;case"userAgentDetection":c=this.userAgentDetection();break;case"cssDetection":c=this.cssDetection()}c&&"Unknown"!==c.browser&&o.push(c)}catch(e){console.warn("Detection method ".concat(a," failed:"),e)}}}catch(e){i.e(e)}finally{i.f()}if(o.length>0){var u=this.selectBestResult(o);Object.assign(n,u)}n.isMobile=this.detectMobile(),n.isTablet=this.detectTablet(),n.isDesktop=!n.isMobile&&!n.isTablet;var s=this.getEngineInfo(n.browser);n.engine=s.engine,n.engineVersion=s.version;var f=this.getOSInfo();return n.os=f.os,n.osVersion=f.osVersion,n.browserVersion=this.getBrowserVersion(n.browser),this.cache.set(e,n),n}},{key:"selectBestResult",value:function(e){var t={},n={},r={};e.forEach(function(e){var o=e.browser;t[o]=(t[o]||0)+1,n[o]=Math.max(n[o]||0,e.confidence),r[o]=e});var o="Unknown",i=0;Object.keys(t).forEach(function(e){var r=t[e]||0,a=n[e]||0,c=r*a;return"Edge"===e&&r>=2||"Chrome"===e&&a>=.9?(o=e,void(i=c)):void(c>i&&(o=e,i=c))});var a=r[o];return{browser:o,confidence:a?a.confidence:0,detectionMethods:e.filter(function(e){return e.browser===o}).map(function(e){return e.method})}}},{key:"apiDetection",value:function(){var e={browser:"Unknown",confidence:0,method:"apiDetection"};if(void 0!==window.InstallTrigger)e.browser="Firefox",e.confidence=.95;else if(window.chrome&&window.chrome.runtime&&window.chrome.runtime.onConnect)e.browser="Chrome",e.confidence=.95;else if(window.safari&&window.safari.pushNotification)e.browser="Safari",e.confidence=.95;else if(navigator.userAgentData&&navigator.userAgentData.brands){navigator.userAgentData.brands.some(function(e){return"Microsoft Edge"===e.brand})&&(e.browser="Edge",e.confidence=.95)}else window.opera&&window.opera.version?(e.browser="Opera",e.confidence=.9):document.documentMode&&(e.browser="Internet Explorer",e.confidence=.95);return e}},{key:"vendorDetection",value:function(){var e={browser:"Unknown",confidence:0,method:"vendorDetection"},t=navigator.vendor.toLowerCase(),n=navigator.userAgent.toLowerCase();return n.includes("edg")?(e.browser="Edge",e.confidence=.9,e):(t.includes("google")?(e.browser="Chrome",e.confidence=.9):t.includes("apple")?(e.browser="Safari",e.confidence=.9):t.includes("mozilla")?(e.browser="Firefox",e.confidence=.8):""===t&&(n.includes("edg")||n.includes("edge")?(e.browser="Edge",e.confidence=.8):n.includes("android")&&n.includes("chrome")&&n.includes("safari")&&(e.browser="Edge",e.confidence=.7)),e)}},{key:"userAgentDetection",value:function(){var e={browser:"Unknown",confidence:0,method:"userAgentDetection"},t=navigator.userAgent.toLowerCase();return t.includes("firefox")||t.includes("fxios")?(e.browser="Firefox",e.confidence=.85,e):t.includes("edg")?(e.browser="Edge",e.confidence=.85,e):t.includes("opr")||t.includes("opera")?(e.browser="Opera",e.confidence=.85,e):t.includes("msie")||t.includes("trident")?(e.browser="Internet Explorer",e.confidence=.95,e):!t.includes("chrome")||t.includes("edg")||t.includes("opr")?t.includes("safari")&&navigator.vendor.toLowerCase().includes("google")?(e.browser="Chrome",e.confidence=.85,e):t.includes("edge")?(e.browser="Edge",e.confidence=.85,e):t.includes("android")&&t.includes("chrome")&&t.includes("safari")&&!t.includes("firefox")&&""===navigator.vendor?(e.browser="Edge",e.confidence=.8,e):t.includes("safari")&&!t.includes("chrome")?(e.browser="Safari",e.confidence=.7,e):e:(e.browser="Chrome",e.confidence=.8,t.includes("crios")&&(e.browser="Chrome",e.confidence=.95),e)}},{key:"cssDetection",value:function(){var e={browser:"Unknown",confidence:0,method:"cssDetection"};try{var t=document.createElement("div");t.style.cssText="position:absolute;top:-9999px;left:-9999px;",document.body.appendChild(t),t.style.webkitTransform="translateZ(0)",""!==t.style.webkitTransform&&window.chrome&&window.chrome.webstore&&(e.browser="Chrome",e.confidence=.7),t.style.webkitAppearance="none",""!==t.style.webkitAppearance&&window.safari&&window.safari.pushNotification&&(e.browser="Safari",e.confidence=.7),navigator.userAgent.toLowerCase().includes("edg")||navigator.userAgent.toLowerCase().includes("edge")?(e.browser="Edge",e.confidence=.7):navigator.userAgent.toLowerCase().includes("android")&&navigator.userAgent.toLowerCase().includes("chrome")&&navigator.userAgent.toLowerCase().includes("safari")&&""===navigator.vendor&&(e.browser="Edge",e.confidence=.6),t.parentNode&&t.parentNode.removeChild(t)}catch(e){}return e}},{key:"detectMobile",value:function(){var e=navigator.userAgent.toLowerCase(),t=["mobile","android","iphone","ipod","blackberry","windows phone","opera mini","iemobile"].some(function(t){return e.includes(t)}),n="ontouchstart"in window||navigator.maxTouchPoints>0,r=window.innerWidth<=768;return t||n&&r}},{key:"detectTablet",value:function(){var e=navigator.userAgent.toLowerCase(),t=["ipad","tablet","playbook","silk"].some(function(t){return e.includes(t)}),n=window.innerWidth>768&&window.innerWidth<=1024,r="ontouchstart"in window||navigator.maxTouchPoints>0;return t||r&&n}},{key:"getBrowserVersion",value:function(e){if(navigator.userAgentData&&navigator.userAgentData.brands){var t,n=r(navigator.userAgentData.brands);try{for(n.s();!(t=n.n()).done;){var o=t.value;if(o.brand.toLowerCase()===e.toLowerCase())return o.version;if("Edge"===e&&"Microsoft Edge"===o.brand)return o.version;if("Chrome"===e&&"Google Chrome"===o.brand)return o.version}}catch(e){n.e(e)}finally{n.f()}}var i=navigator.userAgent,a="Unknown";if("Chrome"===e){var c=i.match(this.regexPatterns.chrome);c||(c=i.match(/crios\/(\d+\.\d+(?:\.\d+)?)/i)),c||(c=i.match(/chrome\/(\d+\.\d+(?:\.\d+)?)/i)),a=c&&c[1]?c[1]:"Unknown"}else if("Firefox"===e){var u=i.match(this.regexPatterns.firefox);u||(u=i.match(/fxios\/(\d+\.\d+(?:\.\d+)?)/i)),u||(u=i.match(/firefox\/(\d+\.\d+(?:\.\d+)?)/i)),a=u&&u[1]?u[1]:"Unknown"}else if("Safari"===e){var s=i.match(this.regexPatterns.safari);s||(s=i.match(/version\/(\d+\.\d+(?:\.\d+)?)/i)),s||(s=i.match(/mobile\/\w+\s(\d+\.\d+(?:\.\d+)?)/i)),a=s&&s[1]?s[1]:"Unknown"}else if("Edge"===e){var f=i.match(this.regexPatterns.edge);f||(f=i.match(/edge\/(\d+\.\d+(?:\.\d+)?)/i)),f||(f=i.match(/edg\/(\d+\.\d+(?:\.\d+)?)/i)),a=f&&f[1]?f[1]:"Unknown"}else if("Opera"===e){var l=i.match(this.regexPatterns.opera);l||(l=i.match(/opr\/(\d+\.\d+(?:\.\d+)?)/i)),l||(l=i.match(/opera\/(\d+\.\d+(?:\.\d+)?)/i)),a=l&&l[1]?l[1]:"Unknown"}else if("Internet Explorer"===e){var d=i.match(this.regexPatterns.ie);d||(d=i.match(/rv:(\d+\.\d+(?:\.\d+)?)/i)),d||(d=i.match(/msie\s(\d+\.\d+(?:\.\d+)?)/i)),a=d&&(d[1]||d[2])&&(d[1]||d[2])||"Unknown"}if("Unknown"===a&&"Unknown"!==e){var v=i.match(/(\d+\.\d+(?:\.\d+)?)/);v&&v[1]&&(a=v[1])}return a}},{key:"getEngineInfo",value:function(e){var t=this.getBrowserVersion(e),n={Chrome:{engine:"Blink",version:t},Edge:{engine:"Blink",version:t},Firefox:{engine:"Gecko",version:t},Safari:{engine:"WebKit",version:t},Opera:{engine:"Blink",version:t},"Internet Explorer":{engine:"Trident",version:t},Unknown:{engine:"Unknown",version:"Unknown"}}[e]||{engine:"Unknown",version:"Unknown"};if("Unknown"===n.version&&"Unknown"!==e){var r=navigator.userAgent;if("Blink"===n.engine){var o=r.match(/blink\/(\d+\.\d+(?:\.\d+)?)/i);o&&o[1]&&(n.version=o[1])}else if("Gecko"===n.engine){var i=r.match(/gecko\/(\d+\.\d+(?:\.\d+)?)/i);i&&i[1]&&(n.version=i[1])}else if("WebKit"===n.engine){var a=r.match(/webkit\/(\d+\.\d+(?:\.\d+)?)/i);a&&a[1]&&(n.version=a[1])}else if("Trident"===n.engine){var c=r.match(/trident\/(\d+\.\d+(?:\.\d+)?)/i);c&&c[1]&&(n.version=c[1])}}return n}},{key:"getOSInfo",value:function(){var e=navigator.userAgent.toLowerCase(),t="Unknown",n="Unknown";if(/win/i.test(e)||/windows/i.test(e)){t="Windows";var r=e.match(this.regexPatterns.windows);r?"10.0"===r[1]?n="Windows 10/11":"6.3"===r[1]?n="Windows 8.1":"6.2"===r[1]?n="Windows 8":"6.1"===r[1]&&(n="Windows 7"):n="Windows"}else if(/mac/i.test(e)||/macintosh/i.test(e)){t="macOS";var o=e.match(this.regexPatterns.macos);if(o&&o[1]){var i=parseInt(o[1]);n=i>=15?"macOS Big Sur+":i>=14?"macOS Mojave":i>=13?"macOS High Sierra":i>=12?"macOS Sierra":i>=11?"macOS El Capitan":i>=10?"macOS Yosemite":"macOS ".concat(i)}else n="macOS"}else if(/linux/i.test(e)||/x11/i.test(e))t="Linux",n=e.includes("ubuntu")?"Ubuntu":e.includes("fedora")?"Fedora":e.includes("debian")?"Debian":e.includes("centos")?"CentOS":e.includes("redhat")?"Red Hat":"Linux";else if(/android/i.test(e)){t="Android";var a=e.match(this.regexPatterns.android);if(a&&a[1]){var c=parseFloat(a[1]);n=c>=14?"Android ".concat(a[1]," (Android 14+)"):c>=13?"Android ".concat(a[1]," (Android 13)"):c>=12?"Android ".concat(a[1]," (Android 12)"):c>=11?"Android ".concat(a[1]," (Android 11)"):c>=10?"Android ".concat(a[1]," (Android 10)"):"Android ".concat(a[1])}else n="Android"}else if(/iphone|ipad|ipod/i.test(e)){t="iOS";var u=e.match(this.regexPatterns.ios);if(u&&u[1]){var s=u[1].replace(/_/g,"."),f=parseFloat(s);n=f>=17?"iOS ".concat(s," (iOS 17+)"):f>=16?"iOS ".concat(s," (iOS 16)"):f>=15?"iOS ".concat(s," (iOS 15)"):f>=14?"iOS ".concat(s," (iOS 14)"):"iOS ".concat(s)}else n="iOS"}return{os:t,osVersion:n}}},{key:"getPlatform",value:function(){return this.detectMobile()?"Mobile":this.detectTablet()?"Tablet":"Desktop"}},{key:"getCompleteInfo",value:function(){var e=this.detectBrowser(),t=this.getBrowserVersion(e.browser),n=this.getOSInfo(),r=n.os,o=n.osVersion,i=this.getPlatform(),a=this.getEngineInfo(e.browser);return{browser:e.browser,browserVersion:t,engine:a.engine,engineVersion:a.version,platform:i,os:r,osVersion:o,isMobile:e.isMobile,isTablet:e.isTablet,isDesktop:e.isDesktop,confidence:e.confidence,detectionMethods:e.detectionMethods,userAgent:navigator.userAgent,vendor:navigator.vendor,timestamp:e.timestamp}}},{key:"clearCache",value:function(){this.cache.clear()}},{key:"getCacheStats",value:function(){return{size:this.cache.size,keys:Array.from(this.cache.keys())}}}])}();"undefined"!=typeof window&&(window.SmartBrowserDetection=nv),"undefined"!=typeof module&&module.exports&&(module.exports=nv),e.SmartBrowserDetection=nv,e.default=nv,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=smart-browser-detection.min.js.map