"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["app_components_behaviors_webauthn-status-element_ts"],{35064:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var n=r(39595),i=r(91903);function a(e,t,r,n){var i,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o}let o=class WebauthnStatusElement extends HTMLElement{async connectedCallback(){let e=await (0,i.K)(),t=await (0,i.e)();this.renderElement("supported"===e,"supported"===t)}renderElement(e,t){if(this.partial&&(this.partial.hidden=!e),this.fragment&&e){let e=this.fragment.getAttribute("data-src");this.fragment.setAttribute("src",e)}this.supported&&(this.supported.hidden=!t),this.unsupported&&(this.unsupported.hidden=t)}};a([n.aC],o.prototype,"supported",void 0),a([n.aC],o.prototype,"partial",void 0),a([n.aC],o.prototype,"unsupported",void 0),a([n.aC],o.prototype,"fragment",void 0),o=a([n.p_],o)},91903:(e,t,r)=>{r.d(t,{K:()=>i,e:()=>a});var n=r(74043);function i(){return(0,n.$j)()?"supported":"unsupported"}async function a(){return await window.PublicKeyCredential?.isUserVerifyingPlatformAuthenticatorAvailable()?"supported":"unsupported"}},74043:(e,t,r)=>{function n(e){let t="==".slice(0,(4-e.length%4)%4),r=atob(e.replace(/-/g,"+").replace(/_/g,"/")+t),n=new ArrayBuffer(r.length),i=new Uint8Array(n);for(let e=0;ew,Jt:()=>A,PG:()=>v,d5:()=>m,vt:()=>C});var a="copy",o="convert";function s(e,t,r){if(t===a)return r;if(t===o)return e(r);if(t instanceof Array)return r.map(r=>s(e,t[0],r));if(t instanceof Object){let n={};for(let[i,a]of Object.entries(t)){if(a.derive){let e=a.derive(r);void 0!==e&&(r[i]=e)}if(!(i in r)){if(a.required)throw Error(`Missing key: ${i}`);continue}if(null==r[i]){n[i]=null;continue}n[i]=s(e,a.schema,r[i])}return n}}function u(e,t){return{required:!0,schema:e,derive:t}}function l(e){return{required:!0,schema:e}}function c(e){return{required:!1,schema:e}}var p={type:l(a),id:l(o),transports:c(a)},d={appid:c(a),appidExclude:c(a),credProps:c(a)},f={appid:c(a),appidExclude:c(a),credProps:c(a)},h={publicKey:l({rp:l(a),user:l({id:l(o),name:l(a),displayName:l(a)}),challenge:l(o),pubKeyCredParams:l(a),timeout:c(a),excludeCredentials:c([p]),authenticatorSelection:c(a),attestation:c(a),extensions:c(d)}),signal:c(a)},g={type:l(a),id:l(a),rawId:l(o),authenticatorAttachment:c(a),response:l({clientDataJSON:l(o),attestationObject:l(o),transports:u(a,e=>{var t;return(null==(t=e.getTransports)?void 0:t.call(e))||[]})}),clientExtensionResults:u(f,e=>e.getClientExtensionResults())},y={mediation:c(a),publicKey:l({challenge:l(o),timeout:c(a),rpId:c(a),allowCredentials:c([p]),userVerification:c(a),extensions:c(d)}),signal:c(a)},b={type:l(a),id:l(a),rawId:l(o),authenticatorAttachment:c(a),response:l({clientDataJSON:l(o),authenticatorData:l(o),signature:l(o),userHandle:l(o)}),clientExtensionResults:u(f,e=>e.getClientExtensionResults())};function v(e){return s(n,h,e)}function m(e){return s(n,y,e)}function w(){return!!(navigator.credentials&&navigator.credentials.create&&navigator.credentials.get&&window.PublicKeyCredential)}async function C(e){let t=await navigator.credentials.create(e);return t.toJSON=()=>s(i,g,t),t}async function A(e){let t=await navigator.credentials.get(e);return t.toJSON=()=>s(i,b,t),t}}}]); //# sourceMappingURL=app_components_behaviors_webauthn-status-element_ts-c15b45f37231.js.map