2FAuth/public/build/assets/Capture-Bb1sXPdR.js

4 lines
73 KiB
JavaScript
Raw Normal View History

2024-11-17 23:37:23 +01:00
import{q as So,r as ne,s as Be,o as Wr,v as Po,x as Ut,m as ue,d as ge,e as I,y as Eo,z as Ht,A as Ur,B as Oo,a as Ao,c as Mo,f as Z,t as Se,j as pe,k as Lt,C as xo,h as _r,i as Tr,D as $r,F as Sr,E as ko,G as Do,l as Nt,n as Pr,U as Er,p as jo,H as Or}from"./app-D4Udf6Mm.js";import{F as Ro}from"./Form-BGrUTood.js";import{S as Fo}from"./Spinner-DHClvaFf.js";import{_ as Io}from"./QrContentDisplay-C6rCu47Q.js";import{u as Wo}from"./bus-RVphoWuw.js";/*! 2FAuth version 5.4.1 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */var Lr=(r,i,a)=>{if(!i.has(r))throw TypeError("Cannot "+a)},Ar=(r,i,a)=>(Lr(r,i,"read from private field"),a?a.call(r):i.get(r)),Uo=(r,i,a)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,a)},Lo=(r,i,a,c)=>(Lr(r,i,"write to private field"),i.set(r,a),a);const Nr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],No=[...Nr,["unknown"]].map(r=>r[0]),lt=new Map(Nr);function Ho(r){for(const[i,a]of lt)if(r===a)return i;return"unknown"}function Vo(r){if(Hr(r))return{width:r.naturalWidth,height:r.naturalHeight};if(Vr(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(Br(r))return{width:r.videoWidth,height:r.videoHeight};if(Gr(r))return{width:r.width,height:r.height};if(Jr(r))return{width:r.displayWidth,height:r.displayHeight};if(zr(r))return{width:r.width,height:r.height};if(qr(r))return{width:r.width,height:r.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Hr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function Vr(r){try{return r instanceof SVGImageElement}catch{return!1}}function Br(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function zr(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function Gr(r){try{return r instanceof ImageBitmap}catch{return!1}}function qr(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function Jr(r){try{return r instanceof VideoFrame}catch{return!1}}function Yr(r){try{return r instanceof Blob}catch{return!1}}function Bo(r){try{return r instanceof ImageData}catch{return!1}}function zo(r,i){try{const a=new OffscreenCanvas(r,i);if(a.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return a;throw void 0}catch{const c=document.createElement("canvas");return c.width=r,c.height=i,c}}async function Qr(r){if(Hr(r)&&!await Yo(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Vr(r)&&!await Qo(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Jr(r)&&Xo(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Br(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Gr(r)&&Zo(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:i,height:a}=Vo(r);if(i===0||a===0)return null;const c=zo(i,a).getContext("2d");c.drawImage(r,0,0);try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Go(r){let i;try{if(globalThis.createImageBitmap)i=await createImageBitmap(r);else if(globalThis.Image){i=new Image;let a="";try{a=URL.createObjectURL(r),i.src=a,await i.decode()}finally{URL.revokeObjectURL(a)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Qr(i)}function qo(r){const{width:i,height:a}=r;
2024-11-09 15:37:19 +01:00
`+s.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},rr,nr=e=>{var t=hr(e),n=X(t);return he(t),n},ot=(e,t)=>{var n=[],o={};function s(u){if(!o[u]&&!Te[u]){if(Ze[u]){Ze[u].forEach(s);return}n.push(u),o[u]=!0}}throw t.forEach(s),new rr(`${e}: `+n.map(nr).join([", "]))},Kn=(e,t,n,o,s,u,l,d,p,g,T,E,O)=>{T=X(T),u=oe(s,u),d&&(d=oe(l,d)),g&&(g=oe(p,g)),O=oe(E,O);var M=Hn(T);Ot(M,function(){ot(`Cannot construct ${T} due to unbound types`,[o])}),$e([e,t,n],o?[o]:[],function(V){V=V[0];var q,U;o?(q=V.registeredClass,U=q.instancePrototype):U=rt.prototype;var K=Ne(T,function(){if(Object.getPrototypeOf(this)!==y)throw new Ae("Use 'new' to construct "+T);if($.constructor_body===void 0)throw new Ae(T+" has no accessible constructor");var Cr=$.constructor_body[arguments.length];if(Cr===void 0)throw new Ae(`Tried to invoke ctor of ${T} with invalid number of parameters (${arguments.length}) - expected (${Object.keys($.constructor_body).toString()}) parameters instead!`);return Cr.apply(this,arguments)}),y=Object.create(U,{constructor:{value:K}});K.prototype=y;var $=new Vn(T,K,y,O,q,u,d,g);if($.baseClass){var J,Q;(Q=(J=$.baseClass).__derivedClasses)!==null&&Q!==void 0||(J.__derivedClasses=[]),$.baseClass.__derivedClasses.push($)}var Me=new nt(T,$,!0,!1,!1),ct=new nt(T+"*",$,!1,!1,!1),br=new nt(T+" const*",$,!1,!0,!1);return Xt[e]={pointerType:ct,constPointerType:br},er(M,K),[Me,ct,br]})},Mt=(e,t)=>{for(var n=[],o=0;o<e;o++)n.push(A[t+o*4>>2]);return n};function Zn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function xt(e,t,n,o,s,u){var l=t.length;l<2&&R("argTypes array size mismatch! Must at least get return value and 'this' types!");var d=t[1]!==null&&n!==null,p=Zn(t),g=t[0].name!=="void",T=l-2,E=new Array(T),O=[],M=[],V=function(){arguments.length!==T&&R(`function ${e} called with ${arguments.length} arguments, expected ${T}`),M.length=0;var q;O.length=d?2:1,O[0]=s,d&&(q=t[1].toWireType(M,this),O[1]=q);for(var U=0;U<T;++U)E[U]=t[U+2].toWireType(M,arguments[U]),O.push(E[U]);var K=o.apply(null,O);function y($){if(p)Tt(M);else for(var J=d?1:2;J<t.length;J++){var Q=J===1?q:E[J-2];t[J].destructorFunction!==null&&t[J].destructorFunction(Q)}if(g)return t[0].fromWireType($)}return y(K)};return Ne(e,V)}var ea=(e,t,n,o,s,u)=>{var l=Mt(t,n);s=oe(o,s),$e([],[e],function(d){d=d[0];var p=`constructor ${d.name}`;if(d.registeredClass.constructor_body===void 0&&(d.registeredClass.constructor_body=[]),d.registeredClass.constructor_body[t-1]!==void 0)throw new Ae(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${d.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return d.registeredClass.constructor_body[t-1]=()=>{ot(`Cannot construct ${d.name} due to unbound types`,l)},$e([],l,g=>(g.splice(1,0,null),d.registeredClass.constructor_body[t-1]=xt(p,g,null,s,u),[])),[]})},ar=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},ta=(e,t,n,o,s,u,l,d,p)=>{var g=Mt(n,o);t=X(t),t=ar(t),u=oe(s,u),$e([],[e],function(T){T=T[0];var E=`${T.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),d&&T.registeredClass.pureVirtualFunctions.push(t);function O(){ot(`Cannot call ${E} due to unbound types`,g)}var M=T.registeredClass.instancePrototype,V=M[t];return V===void 0||V.overloadTable===void 0&&V.className!==T.name&&V.argCount===n-2?(O.argCount=n-2,O.className=T.name,M[t]=O):(Kt(M,t,E),M[t].overloadTable[n-2]=O),$e([],g,function(q){var U=xt(E,q,T,u,l);return M[t].overloadTable===void 0?(U.argCount=n-2,M[t]=U):M[t].overloadTable[n-2]=U,[]}),[]})};function ra(){Object.assign(or.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function or(){this.allocated=[
`,"%p":y=>y.tm_hour>=0&&y.tm_hour<12?"AM":"PM","%S":y=>O(y.tm_sec,2),"%t":()=>" ","%u":y=>y.tm_wday||7,"%U":y=>{var $=y.tm_yday+7-y.tm_wday;return O(Math.floor($/7),2)},"%V":y=>{var $=Math.floor((y.tm_yday+7-(y.tm_wday+6)%7)/7);if((y.tm_wday+371-y.tm_yday-2)%7<=2&&$++,$){if($==53){var J=(y.tm_wday+371-y.tm_yday)%7;J!=4&&(J!=3||!it(y.tm_year))&&($=1)}}else{$=52;var Q=(y.tm_wday+7-y.tm_yday-1)%7;(Q==4||Q==5&&it(y.tm_year%400-1))&&$++}return O($,2)},"%w":y=>y.tm_wday,"%W":y=>{var $=y.tm_yday+7-(y.tm_wday+6)%7;return O(Math.floor($/7),2)},"%y":y=>(y.tm_year+1900).toString().substring(2),"%Y":y=>y.tm_year+1900,"%z":y=>{var $=y.tm_gmtoff,J=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(J?"+":"-")+("0000"+$).slice(-4)},"%Z":y=>y.tm_zone,"%%":()=>"%"};l=l.replace(/%%/g,"\0\0");for(var p in U)l.includes(p)&&(l=l.replace(new RegExp(p,"g"),U[p](u)));l=l.replace(/\0\0/g,"%");var K=Ka(l);return K.length>t?0:(Za(K,e),K.length-1)},to=(e,t,n,o,s)=>eo(e,t,n,o);Gt=a.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},En(),Ae=a.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Un(),Rn(),qn(),rr=a.UnboundTypeError=Xn(Error,"UnboundTypeError"),ra(),aa();var ro={s:vn,u:yn,b:wn,g:bn,q:Cn,J:_n,f:Tn,V:$n,d:gn,da:Sn,Q:Pn,_:An,ca:Kn,ba:ea,w:ta,Y:oa,x:sa,h:ca,L:la,M:da,t:ha,o:pa,K:ya,C:$a,A:Sa,ea:Pa,$:Ea,R:Oa,ha:kt,fa:xa,Z:Fa,N:Ia,O:Wa,aa:Ua,B:La,X:Na,W:Ba,T:qa,U:Ja,E:wo,D:so,F:go,n:bo,a:no,e:uo,m:io,k:fo,H:vo,v:po,G:yo,z:_o,P:$o,l:lo,j:co,c:oo,p:ao,I:mo,r:Co,i:ho,y:To,ga:Ya,S:to},Y=mn(),he=a._free=e=>(he=a._free=Y.ka)(e),Wt=a._malloc=e=>(Wt=a._malloc=Y.la)(e),hr=e=>(hr=Y.na)(e),H=(e,t)=>(H=Y.oa)(e,t),Ve=e=>(Ve=Y.pa)(e),z=()=>(z=Y.qa)(),G=e=>(G=Y.ra)(e),pr=e=>(pr=Y.sa)(e),mr=e=>(mr=Y.ta)(e),vr=(e,t,n)=>(vr=Y.ua)(e,t,n),yr=e=>(yr=Y.va)(e);a.dynCall_viijii=(e,t,n,o,s,u,l)=>(a.dynCall_viijii=Y.wa)(e,t,n,o,s,u,l);var gr=a.dynCall_jiiii=(e,t,n,o,s)=>(gr=a.dynCall_jiiii=Y.xa)(e,t,n,o,s);a.dynCall_iiiiij=(e,t,n,o,s,u,l)=>(a.dynCall_iiiiij=Y.ya)(e,t,n,o,s,u,l),a.dynCall_iiiiijj=(e,t,n,o,s,u,l,d,p)=>(a.dynCall_iiiiijj=Y.za)(e,t,n,o,s,u,l,d,p),a.dynCall_iiiiiijj=(e,t,n,o,s,u,l,d,p,g)=>(a.dynCall_iiiiiijj=Y.Aa)(e,t,n,o,s,u,l,d,p,g);function no(e,t){var n=z();try{return B(e)(t)}catch(o){if(G(n),o!==o+0)throw o;H(1,0)}}function ao(e,t,n,o){var s=z();try{B(e)(t,n,o)}catch(u){if(G(s),u!==u+0)throw u;H(1,0)}}function oo(e,t,n){var o=z();try{B(e)(t,n)}catch(s){if(G(o),s!==s+0)throw s;H(1,0)}}function io(e,t,n,o){var s=z();try{return B(e)(t,n,o)}catch(u){if(G(s),u!==u+0)throw u;H(1,0)}}function so(e,t,n,o,s){var u=z();try{return B(e)(t,n,o,s)}catch(l){if(G(u),l!==l+0)throw l;H(1,0)}}function co(e,t){var n=z();try{B(e)(t)}catch(o){if(G(n),o!==o+0)throw o;H(1,0)}}function uo(e,t,n){var o=z();try{return B(e)(t,n)}catch(s){if(G(o),s!==s+0)throw s;H(1,0)}}function lo(e){var t=z();try{B(e)()}catch(n){if(G(t),n!==n+0)throw n;H(1,0)}}function fo(e,t,n,o,s){var u=z();try{return B(e)(t,n,o,s)}catch(l){if(G(u),l!==l+0)throw l;H(1,0)}}function ho(e,t,n,o,s,u,l,d,p,g,T){var E=z();try{B(e)(t,n,o,s,u,l,d,p,g,T)}catch(O){if(G(E),O!==O+0)throw O;H(1,0)}}function po(e,t,n,o,s,u,l){var d=z();try{return B(e)(t,n,o,s,u,l)}catch(p){if(G(d),p!==p+0)throw p;H(1,0)}}function mo(e,t,n,o,s){var u=z();try{B(e)(t,n,o,s)}catch(l){if(G(u),l!==l+0)throw l;H(1,0)}}function vo(e,t,n,o,s,u){var l=z();try{return B(e)(t,n,o,s,u)}catch(d){if(G(l),d!==d+0)throw d;H(1,0)}}function yo(e,t,n,o,s,u,l,d){var p=z();try{return B(e)(t,n,o,s,u,l,d)}catch(g){if(G(p),g!==g+0)throw g;H(1,0)}}function go(e,t,n,o){var s=z();try{return B(e)(t,n,o)}catch(u){if(G(s),u!==u+0)throw u;H(1,0)}}function wo(e,t,n,o){var s=z();try{return B(e)(t,n,o)}catch(u){if(G(s),u!==u+0)throw u;H(1,0)}}function bo(e){var t=z();try{return B(e)()}catch(n){if(G(t),n!==n+0)throw n;H(1,0)}}function Co(e,t,n,o,s,u,l,d){var p=z();try{B(e)(t,n,o,s,u,l,d)}catch(g){if(G(p),g!==g+0)throw g;H(1,0)}}function _o(e,t,n,o,s,u,l,d,p,g,T,E){var O=z();try{return B(e)(t,n,o,s,u,l,d,p,g,T,E)}catch(M){if(G(O),M!==M+0)throw M;H(1,0)}}function To(e,t,n,o,s,u,l,d,p,g,T,E,O,M,V,q){var U=z();try{B(e)