@saasbase-io/core-elements 1.21.1 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function D(e,t,r,i){function s(o){return o instanceof r?o:new r(function(n){n(o)})}return new(r||(r=Promise))(function(o,n){function h(y){try{g(i.next(y))}catch(w){n(w)}}function u(y){try{g(i.throw(y))}catch(w){n(w)}}function g(y){y.done?o(y.value):s(y.value).then(h,u)}g((i=i.apply(e,t||[])).next())})}class Nr{constructor(){this.data=new Map}static get Instance(){return Nr.instance||(Nr.instance=new Nr),Nr.instance}get(t){return this.data.get(t)}set(t,r){this.data.set(t,r)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){const t=this.getConfig().domain;return t.startsWith("localhost")?`http://${t}`:`https://${t}`}remove(t){this.data.delete(t)}clear(){this.data.clear()}}const Mt=Nr.Instance;class ct extends Error{constructor(t,r,i){super(r),this.name="LoginflowError",this.code=t,this.details=i}}class Te{constructor(){}static get Instance(){return Te.instance||(Te.instance=new Te),Te.instance}request(t){return D(this,arguments,void 0,function*(r,i={}){const s=Mt.getConfig(),o=`${Mt.getApiBaseUrl()}${r}`,n=5e4,h=new AbortController,u=setTimeout(()=>h.abort(),n);try{const g=yield fetch(o,Object.assign(Object.assign({},i),{signal:h.signal,headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},s.apiKey&&{Authorization:`Bearer ${s.apiKey}`}),s.headers),i.headers)}));if(clearTimeout(u),!g.ok){const y=yield g.json().catch(()=>({}));throw new ct(y.code||"API_ERROR",y.message||`HTTP ${g.status}: ${g.statusText}`,y.details)}return yield g.json()}catch(g){throw clearTimeout(u),g instanceof ct?g:g instanceof Error?g.name==="AbortError"?new ct("TIMEOUT","Request timeout"):new ct("NETWORK_ERROR",g.message):new ct("UNKNOWN_ERROR","An unknown error occurred")}})}post(t,r){return D(this,void 0,void 0,function*(){return this.request(t,{credentials:"include",method:"POST",body:r?JSON.stringify(r):void 0})})}get(t){return D(this,void 0,void 0,function*(){return this.request(t,{credentials:"include",method:"GET"})})}}class kt{constructor(){this.AUTH_SESSION_STORAGE_KEY="saasbase_auth_session",this.refreshTimeoutId=null,this.refreshPromise=null}static get Instance(){return kt.instance||(kt.instance=new kt),kt.instance}setCurrentSession(t){localStorage.setItem(this.AUTH_SESSION_STORAGE_KEY,JSON.stringify(t))}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t||!t.id_token)return null;const r=this.decodeJWT(t.id_token);return r||null}cleanup(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null}clearSession(){localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=localStorage.getItem(this.AUTH_SESSION_STORAGE_KEY);if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}decodeJWT(t){try{const i=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),s=decodeURIComponent(atob(i).split("").map(o=>"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(s)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at||!t.refresh_token)return!1;const r=Date.now(),i=t.expires_at,s=t.expires_in||3600,o=r+s*1e3*.2;return i<=o}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at||!t.refresh_token)return;const r=Date.now(),i=t.expires_at,s=t.expires_in||3600,o=i-r-s*1e3*.2;o>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},o))}triggerBackgroundRefresh(t){this.refreshPromise||t.refresh_token&&(this.refreshPromise=this.refreshTokens(t.refresh_token).then(r=>(r&&(this.setCurrentSession(r),this.scheduleTokenRefresh()),r)).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}refreshTokens(t){return D(this,void 0,void 0,function*(){try{const r=yield Te.Instance.post("/login-flow/v1/refresh",{refresh_token:t});return{id_token:r.id_token,access_token:r.access_token,refresh_token:r.refresh_token,expires_in:r.expires_in,expires_at:Date.now()+r.expires_in*1e3}}catch(r){return r instanceof ct?console.error("Token refresh failed:",r.message,r.details):console.error("Token refresh failed:",r),this.clearSession(),null}})}}class bd{constructor(t=sessionStorage){this.storage=t,this.FLOW_STATE_KEY="saasbase_loginflow_state",this.FLOW_EXPIRY_MS=540*1e3}getFlowState(){const t=this.storage.getItem(this.FLOW_STATE_KEY);if(!t)return null;try{const r=JSON.parse(t);return this.isExpired(r)?(this.clearFlowState(),null):r}catch{return this.clearFlowState(),null}}saveFlowState(t,r,i){const s=Date.now(),o=this.getFlowState(),n={flowType:t,flow_id:r,state:i.state,startedAt:(o==null?void 0:o.startedAt)||s,lastUpdatedAt:s,render_spec:i.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(n))}restoreFromHistory(t){const r={flowType:t.flowType,flow_id:t.flow_id,state:t.state,startedAt:t.timestamp,lastUpdatedAt:t.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(r))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(t){return Date.now()-t.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}}class ps{static detect(t,r=window.location){const i=r.pathname.toLowerCase();return i.includes(t.signinUrl)?"signin":i.includes(t.signupUrl)?"signup":"custom"}}class fd{constructor(){this.listeners=new Map}on(t,r){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(r)}off(t,r){var i;(i=this.listeners.get(t))===null||i===void 0||i.delete(r)}emit(t,r){const i=this.listeners.get(t);i&&i.forEach(s=>{try{s(r)}catch(o){console.error(`[FlowEventBus] Error in event handler for ${t}:`,o)}})}clear(){this.listeners.clear()}clearEvent(t){this.listeners.delete(t)}}class bc{getNavigationType(){const t=performance.getEntriesByType("navigation");if(t.length>0)return t[0].type;const r=performance.navigation;if(r)switch(r.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}}class en{constructor(t,r,i=window.location,s,o){this.httpClient=Te.Instance,this.redirectTimeoutId=null,this.eventHandlers=new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)]]);const n=Mt.getConfig();if(!n.domain)throw new ct("CONFIG_ERROR","Domain is required");if(!n.appId)throw new ct("CONFIG_ERROR","App ID is required");if(!n.clientSecret)throw new ct("CONFIG_ERROR","Client Secret is required");this.flowId=t,this.location=i,this.flowStateManager=s||new bd,this.flowEventBus=r||new fd,this.navigationTypeDetector=o||new bc,kt.Instance.cleanExpiredSession(),kt.Instance.scheduleTokenRefresh()}static init(t,r,i,s,o){return D(this,void 0,void 0,function*(){const n=new en(t,r,i,s,o),h=yield n.initializeFlowInternal();return{sdk:n,flowType:h.flowType,isResumed:h.isResumed,state:h.state,render_spec:h.render_spec,auth_result:h.auth_result}})}startFlow(t,r){return D(this,void 0,void 0,function*(){if(!r.app_id)throw new ct("VALIDATION_ERROR","Client ID is required");const i=`/v1/auth-flow/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(i,r),"START_FLOW_ERROR","Failed to start flow")})}resumeFlow(t){return D(this,void 0,void 0,function*(){const r=`/v1/auth-flow/${t}/resume`;return this.executeFlowRequest(()=>this.httpClient.post(r),"RESUME_FLOW_ERROR","Failed to resume flow")})}processEvent(t,r){return D(this,void 0,void 0,function*(){if(!t.event)throw new ct("VALIDATION_ERROR","Event type is required");const i=this.eventHandlers.get(t.event);return i?yield i():yield this.processServerEvent(t,r)})}executeFlowRequest(t,r,i,s){return D(this,void 0,void 0,function*(){try{const o=yield t();return s&&(yield s(o)),this.processAuthResult(o.auth_result),o.redirection&&this.redirect(o.redirection),o}catch(o){throw o instanceof ct?o:new ct(r,i,o instanceof Error?{originalError:o.message,stack:o.stack}:o)}})}processServerEvent(t,r){return D(this,void 0,void 0,function*(){let i=this.flowStateManager.getFlowState();if(!i&&(console.warn("Flow state expired, restarting flow before processing event"),yield this.initializeFlowInternal(),i=this.flowStateManager.getFlowState(),!i))throw new ct("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const s=i.state,o=`/v1/auth-flow/${i.flowType}/events`,n=yield this.executeFlowRequest(()=>this.httpClient.post(o,t),"PROCESS_EVENT_ERROR","Failed to process event",r);if(!n.auth_result){this.flowStateManager.saveFlowState(i.flowType,i.flow_id,n);const h=this.flowStateManager.getFlowState();if(h){const u=s!==n.state;this.flowEventBus.emit("flow:updated",{flowState:h,isNewStep:u})}}return n})}processAuthResult(t){if(t){const r={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};kt.Instance.setCurrentSession(r),kt.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState(),this.reloadPage()}}initializeFlowInternal(){return D(this,void 0,void 0,function*(){const t=Mt.getConfig(),r=ps.detect(t,this.location);this.validateFlowType(r);const i=this.flowStateManager.getFlowState();return this.shouldResumeFlow(i,r)?yield this.resumeExistingFlow(i,r):yield this.startNewFlow(r)})}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new ct("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,r){if(!t)return!1;const s=new URLSearchParams(this.location.search).get("resume")==="true",o=this.navigationTypeDetector.getNavigationType();if(o==="navigate"&&!s)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${o}), starting new flow`),!1;if(t.flowType!==r)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${r}, starting new flow, flow_id: ${this.flowId}`),!1;if(r==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const n=s?"explicit resume=true":`navigation type: ${o}`;return console.log(`Resuming existing flow (${n})`),!0}resumeExistingFlow(t,r){return D(this,void 0,void 0,function*(){try{const i=yield this.resumeFlow(r);if(!i.auth_result){this.flowStateManager.saveFlowState(r,t.flow_id,i);const s=this.flowStateManager.getFlowState();s&&this.flowEventBus.emit("flow:resumed",{flowState:s})}return{flowType:r,isResumed:!0,state:i.state,render_spec:i.render_spec,auth_result:i.auth_result}}catch(i){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",i),yield this.startNewFlow(r)}})}startNewFlow(t){return D(this,void 0,void 0,function*(){const r=Mt.getConfig(),i=new URLSearchParams(this.location.search),s={};i.forEach((h,u)=>{s[u]=h}),console.log("metadata",s);const o={app_id:r.appId,client_secret:r.clientSecret,origin_url:this.location.href,signin_url:r.signinUrl,signup_url:r.signupUrl,locale:r.locale||"en",flow_id:this.determineFlowId(t),metadata:s},n=yield this.startFlow(t,o);if(!n.auth_result){this.flowStateManager.saveFlowState(t,o.flow_id,n);const h=this.flowStateManager.getFlowState();h&&this.flowEventBus.emit("flow:started",{flowState:h})}return{flowType:t,isResumed:!1,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result}})}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"custom":if(!this.flowId)throw new ct("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}handleSwitchToSignin(){return D(this,void 0,void 0,function*(){const t=Mt.getConfig();return this.redirect({url:t.signinUrl,redirect_delay:0}),{state:"End"}})}handleSwitchToSignup(){return D(this,void 0,void 0,function*(){const t=Mt.getConfig();return this.redirect({url:t.signupUrl,redirect_delay:0}),{state:"End"}})}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}}class fc{constructor(t){this.delayMs=t,this.timerId=null}debounce(t){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{t(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}}class vc{pushState(t,r,i){history.pushState(t,r,i)}replaceState(t,r,i){history.replaceState(t,r,i)}get state(){return history.state}}class yc{constructor(t,r,i=!1,s=window.location,o,n){this.popstateListener=null,this.pageshowListener=null,this.isProcessing=!1,this.isHandlingNavigationEvent=!1,this.onFlowRestartNeeded=null,this.onFlowRestartNeeded=r,this.skipHistoryTracking=i,this.debouncer=new fc(200),this.location=s,this.flowStateManager=o||new bd,this.historyAdapter=n||new vc,this.subscribeToFlowEvents(t),this.initializeListener()}subscribeToFlowEvents(t){t.on("flow:started",this.handleFlowStart.bind(this)),t.on("flow:updated",this.handleFlowUpdate.bind(this)),t.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=t=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(t)})},this.pageshowListener=t=>{t.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}handlePopState(t){return D(this,void 0,void 0,function*(){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const r=t.state,i=this.flowStateManager.getFlowState(),s=Mt.getConfig(),o=ps.detect(s,this.location);if(r&&this.restoreHistoryStateToSession(r),this.shouldRestartFlow(r,i,o)){yield this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}})}handleBfcacheRestoration(){return D(this,void 0,void 0,function*(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=this.historyAdapter.state,r=this.flowStateManager.getFlowState(),i=Mt.getConfig(),s=ps.detect(i,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,r,s)){yield this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}})}restoreHistoryStateToSession(t){console.log("[NavigationManager] Restoring history state to session storage:",t),this.flowStateManager.restoreFromHistory(t)}shouldRestartFlow(t,r,i){return t&&t.flowType!==i?(console.log("[NavigationManager] Flow type changed via navigation:",t.flowType,"→",i),this.flowStateManager.clearFlowState(),!0):t?Date.now()-t.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}triggerFlowRestart(){return D(this,void 0,void 0,function*(){this.onFlowRestartNeeded&&(yield this.onFlowRestartNeeded())})}createHistoryState(t){return{flowType:t.flowType,flow_id:t.flow_id,state:t.state,timestamp:Date.now()}}updateBrowserHistory(t,r){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const i=this.createHistoryState(t);try{r==="push"?(this.historyAdapter.pushState(i,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(i,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(s){console.error("[NavigationManager] Failed to update history:",s)}}handleFlowStart(t){this.updateBrowserHistory(t.flowState,"replace")}handleFlowUpdate(t){const r=this.isHandlingNavigationEvent||!t.isNewStep?"replace":"push";this.updateBrowserHistory(t.flowState,r)}handleFlowResume(t){this.updateBrowserHistory(t.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}}let Me=new AbortController;class wc{constructor(){this.httpClient=Te.Instance,this.capabilities={webauthn:!1},this.capabilitiesDetected=!1}detectCapabilities(){return D(this,void 0,void 0,function*(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const t=yield PublicKeyCredential.getClientCapabilities();this.capabilities=Object.assign(Object.assign({},this.capabilities),t);return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=yield PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=yield PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}})}fetchPublicKeyCredentialRequestOptions(t,r){return D(this,void 0,void 0,function*(){try{return this.httpClient.post("/webauthn/login/options",{conditional:r,flow_type:t})}catch(i){return console.error("error",i),null}})}fetchPublicKeyCredentialCreationOptions(t,r){return D(this,void 0,void 0,function*(){try{return this.httpClient.post("/webauthn/register/options",{conditional:r,flow_type:t})}catch(i){return console.error("error",i),null}})}startRegistration(t,r){return D(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),!t)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;Me.abort(),Me=new AbortController;const i=this.toPublicKeyCredentialCreationOptions(t),s={signal:Me.signal,publicKey:i};if(r){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;s.mediation="conditional"}try{const o=yield navigator.credentials.create(s);if(!o){console.error("no credential returned by authenticator");return}const{id:n,rawId:h,response:u,type:g}=o;let y;typeof u.getTransports=="function"&&(y=u.getTransports());let w;if(typeof u.getPublicKeyAlgorithm=="function")try{w=u.getPublicKeyAlgorithm()}catch(S){Ks("getPublicKeyAlgorithm()",S)}let E;if(typeof u.getPublicKey=="function")try{const S=u.getPublicKey();S!==null&&(E=this.bufferToBase64URLString(S))}catch(S){Ks("getPublicKey()",S)}let C;if(typeof u.getAuthenticatorData=="function")try{C=this.bufferToBase64URLString(u.getAuthenticatorData())}catch(S){Ks("getAuthenticatorData()",S)}return{id:n,rawId:this.bufferToBase64URLString(h),response:{attestationObject:this.bufferToBase64URLString(u.attestationObject),clientDataJSON:this.bufferToBase64URLString(u.clientDataJSON),transports:y,publicKeyAlgorithm:w,publicKey:E,authenticatorData:C},type:g,clientExtensionResults:o.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(o.authenticatorAttachment)}}catch(o){const n=this.identifyAuthenticationError({error:o,options:s});return n instanceof qe?console.error(`WebAuthn authentication failed with code: ${n.code}, message: ${n.message}`):console.error("WebAuthn authentication failed with error:",o),null}})}startAuthentication(t,r){return D(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),!t)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;Me.abort(),Me=new AbortController;const i=this.toPublicKeyCredentialRequestOptions(t),s={signal:Me.signal,publicKey:i};if(r){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;s.mediation="conditional",s.publicKey&&(s.publicKey.allowCredentials=[])}try{const o=yield navigator.credentials.get(s);return this.toPublicKeyCredentialJSON(o)}catch(o){const n=this.identifyAuthenticationError({error:o,options:s});return n instanceof qe?console.error(`WebAuthn authentication failed with code: ${n.code}, message: ${n.message}`):console.error("WebAuthn authentication failed with error:",o),null}})}signalUnknownCredential(t,r){return D(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{yield PublicKeyCredential.signalUnknownCredential({rpId:t,credentialId:r})}catch(i){console.error("Failed to signal unknown credential:",i)}else console.warn("signalUnknownCredential not supported in this browser")})}signalCurrentUserDetails(t){return D(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{yield PublicKeyCredential.signalCurrentUserDetails(t)}catch(r){console.error("Failed to signal current user details:",r)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")})}toPublicKeyCredentialDescriptor(t){const{id:r}=t;return Object.assign(Object.assign({},t),{id:this.base64URLStringToBuffer(r),type:t.type,transports:t.transports})}toAuthenticatorAttachment(t){const r=["cross-platform","platform"];if(t&&!(r.indexOf(t)<0))return t}bufferToBase64URLString(t){const r=new Uint8Array(t);let i="";for(const o of r)i+=String.fromCharCode(o);return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(t){const r=t.replace(/-/g,"+").replace(/_/g,"/"),i=(4-r.length%4)%4,s=r.padEnd(r.length+i,"="),o=atob(s),n=new ArrayBuffer(o.length),h=new Uint8Array(n);for(let u=0;u<o.length;u++)h[u]=o.charCodeAt(u);return n}toPublicKeyCredentialJSON(t){if(typeof t.toJSON=="function")return t.toJSON();const r=t.response;return{id:t.id,type:t.type,rawId:this.bufferToBase64URLString(t.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(t.authenticatorAttachment),clientExtensionResults:t==null?void 0:t.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(r.clientDataJSON),authenticatorData:this.bufferToBase64URLString(r.authenticatorData),signature:this.bufferToBase64URLString(r.signature),userHandle:r.userHandle?this.bufferToBase64URLString(r.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(t){var r;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const i={challenge:this.base64URLStringToBuffer(t.challenge),rp:{id:t.rp.id,name:t.rp.name},user:{displayName:t.user.displayName,id:this.base64URLStringToBuffer(t.user.id),name:t.user.name},pubKeyCredParams:t.pubKeyCredParams.map(s=>({alg:s.alg,type:s.type})),timeout:t.timeout};if(t.attestation&&(i.attestation=t.attestation),t.extensions!==void 0&&(i.extensions=t.extensions),t.authenticatorSelection){const s={};t.authenticatorSelection.authenticatorAttachment&&(s.authenticatorAttachment=t.authenticatorSelection.authenticatorAttachment),t.authenticatorSelection.requireResidentKey&&(s.requireResidentKey=t.authenticatorSelection.requireResidentKey),t.authenticatorSelection.residentKey&&(s.residentKey=t.authenticatorSelection.residentKey),t.authenticatorSelection.userVerification&&(s.userVerification=t.authenticatorSelection.userVerification),i.authenticatorSelection=s}return!((r=t.excludeCredentials)===null||r===void 0)&&r.length&&(i.excludeCredentials=t.excludeCredentials.map(s=>this.toPublicKeyCredentialDescriptor(s))),i}toPublicKeyCredentialRequestOptions(t){var r;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const i={challenge:this.base64URLStringToBuffer(t.challenge)};return t.rpId!==void 0&&(i.rpId=t.rpId),t.timeout!==void 0&&(i.timeout=t.timeout),t.userVerification!==void 0&&(i.userVerification=t.userVerification),t.extensions!==void 0&&(i.extensions=t.extensions),!((r=t.allowCredentials)===null||r===void 0)&&r.length&&(i.allowCredentials=t.allowCredentials.map(s=>this.toPublicKeyCredentialDescriptor(s))),i}identifyAuthenticationError({error:t,options:r}){const{publicKey:i}=r;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(r.signal instanceof AbortSignal)return new qe({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new qe({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const s=window.location.hostname;if(_c(s)){if(i.rpId!==s)return new qe({message:`The RP ID "${i.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new qe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new qe({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return t}isPublicKeyCredentialRequestOptionsJSON(t){return typeof t=="object"&&t!==null&&"challenge"in t}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){Me.abort()}}function Ks(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
2
- `,t)}class qe extends Error{constructor({message:t,code:r,cause:i,name:s}){super(t),this.name=s??i.name,this.code=r}}function _c(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}class zr{constructor(){this.configured=!1,this.loginflow=null,this.navigationManager=null,this.flowEventBus=null,this.webauthnService=null}static get Instance(){return zr.instance||(zr.instance=new zr),zr.instance}ensureConfigured(){if(!this.configured)throw new ct("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new ct("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}startLoginflowInternal(t){return D(this,arguments,void 0,function*(r,i=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new wc,this.webauthnService.detectCapabilities(),this.flowEventBus=new fd,this.navigationManager=new yc(this.flowEventBus,()=>D(this,void 0,void 0,function*(){console.log("[AuthService] Navigation restart triggered, restarting loginflow"),yield this.startLoginflowInternal(void 0,!1)}),i);const s=yield en.init(r,this.flowEventBus),o=Mt.getConfig();this.startPasskeyAuthentication(s.flowType,!0),this.loginflow=s.sdk;const n={flowType:s.flowType,isResumed:s.isResumed,state:s.state,render_spec:s.render_spec,auth_result:s.auth_result};return o.onFlowStateChange&&o.onFlowStateChange({eventType:s.isResumed?"flow_resumed":"flow_started",flowType:s.flowType,state:s.state,render_spec:s.render_spec,auth_result:s.auth_result,isResumed:s.isResumed}),n})}configure(t){if(!t.domain||!t.appId||!t.clientSecret)throw new ct("CONFIG_ERROR","domain, appId, and clientSecret are required");Mt.setConfig(t),this.configured=!0}isAuthenticated(){return this.ensureConfigured(),kt.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),kt.Instance.getCurrentSession()}getAuthenticatedUser(){return this.ensureConfigured(),kt.Instance.getAuthenticatedUser()}startLoginflow(t){return D(this,void 0,void 0,function*(){return this.startLoginflowInternal(t,!1)})}processLoginflowEvent(t){return D(this,void 0,void 0,function*(){var r,i;this.ensureConfigured(),this.ensureLoginflowInitialized();const s=Mt.getConfig(),o=ps.detect(s,location);if(t.event==="signin_with_passkey"&&!(!((r=t.data)===null||r===void 0)&&r.credential_request)){const h=yield this.getPasskeyCredential(o,!1);if(!h||!h.cred)return console.error("no credential returned by browser"),{state:""};t.data={credential_request:h.cred}}if(t.event==="register_passkey"&&!(!((i=t.data)===null||i===void 0)&&i.conditional)){console.log("attempt to register a passkey");const h=yield this.createPasskeyCredential(o,!1);if(!h)return console.error("no credential created by browser"),{state:""};t.data={credential_creation_response:h,conditional:!1}}const n=yield this.loginflow.processEvent(t,h=>D(this,void 0,void 0,function*(){var u;if(!((u=h.data)===null||u===void 0)&&u.conditional_create_enabled){console.log("attempt to register a passkey conditionally");const g=yield this.registerPasskey(o,!0);g&&(g.render_spec=void 0,h.render_spec=void 0)}}));if(console.log("render spec",n.render_spec),s.onFlowStateChange){const h=sessionStorage.getItem("saasbase_loginflow_state");let u="custom";if(h)try{u=JSON.parse(h).flowType}catch(g){console.error("Failed to parse flow state:",g)}s.onFlowStateChange({eventType:"flow_updated",flowType:u,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result})}return n})}getPasskeyCredential(t,r){return D(this,void 0,void 0,function*(){var i,s;const o=yield(i=this.webauthnService)===null||i===void 0?void 0:i.fetchPublicKeyCredentialRequestOptions(t,r);if(!o)return console.error("failed to fetch public key request options"),null;try{return{cred:yield(s=this.webauthnService)===null||s===void 0?void 0:s.startAuthentication(o,r),options:o}}catch(n){return console.error("error starting authentication",n),null}})}startPasskeyAuthentication(t){return D(this,arguments,void 0,function*(r,i=!1){var s,o;const n=yield this.getPasskeyCredential(r,i);if(!n||!n.cred){console.error("no credential found");return}const{cred:h,options:u}=n;try{((s=(yield this.processLoginflowEvent({event:"signin_with_passkey",data:{credential_request:h}})).data)===null||s===void 0?void 0:s.error)==="CredentialNotFound"&&(u.rpId&&h.id?(o=this.webauthnService)===null||o===void 0||o.signalUnknownCredential(u.rpId,h.id):console.log("missing rpId or credential id for signalUnknownCredential"))}catch(g){console.error("failed to signin with passkey",g)}})}createPasskeyCredential(t,r){return D(this,void 0,void 0,function*(){var i,s;try{const o=yield(i=this.webauthnService)===null||i===void 0?void 0:i.fetchPublicKeyCredentialCreationOptions(t,r);if(!o){console.warn("no credential creation option returned by webauthn service"),console.log("skipping conditional passkey registration...");return}return(s=this.webauthnService)===null||s===void 0?void 0:s.startRegistration(o,r)}catch(o){console.log("error",o)}})}registerPasskey(t){return D(this,arguments,void 0,function*(r,i=!1){try{const s=yield this.createPasskeyCredential(r,i),o=yield this.processLoginflowEvent({event:"register_passkey",data:{credential_creation_response:s,conditional:i}});return console.log("passkey creation res",o),o}catch(s){console.log("error",s)}})}signOut(){this.ensureConfigured(),kt.Instance.clearSession(),kt.Instance.cleanup(),this.loginflow&&(this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(this.navigationManager.destroy(),this.navigationManager=null),this.flowEventBus&&(this.flowEventBus.clear(),this.flowEventBus=null),window.location.reload(),console.log("Refreshed the page to clear any in-memory state")}}const ht=zr.Instance;/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function D(e,t,r,i){function s(o){return o instanceof r?o:new r(function(n){n(o)})}return new(r||(r=Promise))(function(o,n){function h(y){try{g(i.next(y))}catch(w){n(w)}}function u(y){try{g(i.throw(y))}catch(w){n(w)}}function g(y){y.done?o(y.value):s(y.value).then(h,u)}g((i=i.apply(e,t||[])).next())})}class Nr{constructor(){this.data=new Map}static get Instance(){return Nr.instance||(Nr.instance=new Nr),Nr.instance}get(t){return this.data.get(t)}set(t,r){this.data.set(t,r)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){const t=this.getConfig().domain;return t.startsWith("localhost")?`http://${t}`:`https://${t}`}remove(t){this.data.delete(t)}clear(){this.data.clear()}}const Mt=Nr.Instance;class ht extends Error{constructor(t,r,i){super(r),this.name="LoginflowError",this.code=t,this.details=i}}class Te{constructor(){}static get Instance(){return Te.instance||(Te.instance=new Te),Te.instance}request(t){return D(this,arguments,void 0,function*(r,i={}){const s=Mt.getConfig(),o=`${Mt.getApiBaseUrl()}${r}`,n=5e4,h=new AbortController,u=setTimeout(()=>h.abort(),n);try{const g=yield fetch(o,Object.assign(Object.assign({},i),{signal:h.signal,headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},s.apiKey&&{Authorization:`Bearer ${s.apiKey}`}),s.headers),i.headers)}));if(clearTimeout(u),!g.ok){const y=yield g.json().catch(()=>({}));throw new ht(y.code||"API_ERROR",y.message||`HTTP ${g.status}: ${g.statusText}`,y.details)}return yield g.json()}catch(g){throw clearTimeout(u),g instanceof ht?g:g instanceof Error?g.name==="AbortError"?new ht("TIMEOUT","Request timeout"):new ht("NETWORK_ERROR",g.message):new ht("UNKNOWN_ERROR","An unknown error occurred")}})}post(t,r){return D(this,void 0,void 0,function*(){return this.request(t,{credentials:"include",method:"POST",body:r?JSON.stringify(r):void 0})})}get(t){return D(this,void 0,void 0,function*(){return this.request(t,{credentials:"include",method:"GET"})})}}class kt{constructor(){this.AUTH_SESSION_STORAGE_KEY="saasbase_auth_session",this.refreshTimeoutId=null,this.refreshPromise=null}static get Instance(){return kt.instance||(kt.instance=new kt),kt.instance}setCurrentSession(t){localStorage.setItem(this.AUTH_SESSION_STORAGE_KEY,JSON.stringify(t))}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t||!t.id_token)return null;const r=this.decodeJWT(t.id_token);return r||null}cleanup(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null}clearSession(){localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=localStorage.getItem(this.AUTH_SESSION_STORAGE_KEY);if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}decodeJWT(t){try{const i=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),s=decodeURIComponent(atob(i).split("").map(o=>"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(s)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at||!t.refresh_token)return!1;const r=Date.now(),i=t.expires_at,s=t.expires_in||3600,o=r+s*1e3*.2;return i<=o}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at||!t.refresh_token)return;const r=Date.now(),i=t.expires_at,s=t.expires_in||3600,o=i-r-s*1e3*.2;o>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},o))}triggerBackgroundRefresh(t){this.refreshPromise||t.refresh_token&&(this.refreshPromise=this.refreshTokens(t.refresh_token).then(r=>(r&&(this.setCurrentSession(r),this.scheduleTokenRefresh()),r)).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}refreshTokens(t){return D(this,void 0,void 0,function*(){try{const r=yield Te.Instance.post("/login-flow/v1/refresh",{refresh_token:t});return{id_token:r.id_token,access_token:r.access_token,refresh_token:r.refresh_token,expires_in:r.expires_in,expires_at:Date.now()+r.expires_in*1e3}}catch(r){return r instanceof ht?console.error("Token refresh failed:",r.message,r.details):console.error("Token refresh failed:",r),this.clearSession(),null}})}}class bd{constructor(t=sessionStorage){this.storage=t,this.FLOW_STATE_KEY="saasbase_loginflow_state",this.FLOW_EXPIRY_MS=540*1e3}getFlowState(){const t=this.storage.getItem(this.FLOW_STATE_KEY);if(!t)return null;try{const r=JSON.parse(t);return this.isExpired(r)?(this.clearFlowState(),null):r}catch{return this.clearFlowState(),null}}saveFlowState(t,r,i){const s=Date.now(),o=this.getFlowState(),n={flowType:t,flow_id:r,state:i.state,startedAt:(o==null?void 0:o.startedAt)||s,lastUpdatedAt:s,render_spec:i.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(n))}restoreFromHistory(t){const r={flowType:t.flowType,flow_id:t.flow_id,state:t.state,startedAt:t.timestamp,lastUpdatedAt:t.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(r))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(t){return Date.now()-t.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}}class ps{static detect(t,r=window.location){const i=r.pathname.toLowerCase();return i.includes(t.signinUrl)?"signin":i.includes(t.signupUrl)?"signup":"custom"}}class fd{constructor(){this.listeners=new Map}on(t,r){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(r)}off(t,r){var i;(i=this.listeners.get(t))===null||i===void 0||i.delete(r)}emit(t,r){const i=this.listeners.get(t);i&&i.forEach(s=>{try{s(r)}catch(o){console.error(`[FlowEventBus] Error in event handler for ${t}:`,o)}})}clear(){this.listeners.clear()}clearEvent(t){this.listeners.delete(t)}}class bc{getNavigationType(){const t=performance.getEntriesByType("navigation");if(t.length>0)return t[0].type;const r=performance.navigation;if(r)switch(r.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}}class en{constructor(t,r,i=window.location,s,o){this.httpClient=Te.Instance,this.redirectTimeoutId=null,this.eventHandlers=new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)]]);const n=Mt.getConfig();if(!n.domain)throw new ht("CONFIG_ERROR","Domain is required");if(!n.appId)throw new ht("CONFIG_ERROR","App ID is required");if(!n.clientSecret)throw new ht("CONFIG_ERROR","Client Secret is required");this.flowId=t,this.location=i,this.flowStateManager=s||new bd,this.flowEventBus=r||new fd,this.navigationTypeDetector=o||new bc,kt.Instance.cleanExpiredSession(),kt.Instance.scheduleTokenRefresh()}static init(t,r,i,s,o){return D(this,void 0,void 0,function*(){const n=new en(t,r,i,s,o),h=yield n.initializeFlowInternal();return{sdk:n,flowType:h.flowType,isResumed:h.isResumed,state:h.state,render_spec:h.render_spec,auth_result:h.auth_result}})}startFlow(t,r){return D(this,void 0,void 0,function*(){if(!r.app_id)throw new ht("VALIDATION_ERROR","Client ID is required");const i=`/v1/auth-flow/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(i,r),"START_FLOW_ERROR","Failed to start flow")})}resumeFlow(t){return D(this,void 0,void 0,function*(){const r=`/v1/auth-flow/${t}/resume`;return this.executeFlowRequest(()=>this.httpClient.post(r),"RESUME_FLOW_ERROR","Failed to resume flow")})}processEvent(t,r){return D(this,void 0,void 0,function*(){if(!t.event)throw new ht("VALIDATION_ERROR","Event type is required");const i=this.eventHandlers.get(t.event);return i?yield i():yield this.processServerEvent(t,r)})}executeFlowRequest(t,r,i,s){return D(this,void 0,void 0,function*(){try{const o=yield t();return s&&(yield s(o)),this.processAuthResult(o.auth_result),o.redirection&&this.redirect(o.redirection),o}catch(o){throw o instanceof ht?o:new ht(r,i,o instanceof Error?{originalError:o.message,stack:o.stack}:o)}})}processServerEvent(t,r){return D(this,void 0,void 0,function*(){let i=this.flowStateManager.getFlowState();if(!i&&(console.warn("Flow state expired, restarting flow before processing event"),yield this.initializeFlowInternal(),i=this.flowStateManager.getFlowState(),!i))throw new ht("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const s=i.state,o=`/v1/auth-flow/${i.flowType}/events`,n=yield this.executeFlowRequest(()=>this.httpClient.post(o,t),"PROCESS_EVENT_ERROR","Failed to process event",r);if(!n.auth_result){this.flowStateManager.saveFlowState(i.flowType,i.flow_id,n);const h=this.flowStateManager.getFlowState();if(h){const u=s!==n.state;this.flowEventBus.emit("flow:updated",{flowState:h,isNewStep:u})}}return n})}processAuthResult(t){if(t){const r={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};kt.Instance.setCurrentSession(r),kt.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState(),this.reloadPage()}}initializeFlowInternal(){return D(this,void 0,void 0,function*(){const t=Mt.getConfig(),r=ps.detect(t,this.location);this.validateFlowType(r);const i=this.flowStateManager.getFlowState();return this.shouldResumeFlow(i,r)?yield this.resumeExistingFlow(i,r):yield this.startNewFlow(r)})}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new ht("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,r){if(!t)return!1;const s=new URLSearchParams(this.location.search).get("resume")==="true",o=this.navigationTypeDetector.getNavigationType();if(o==="navigate"&&!s)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${o}), starting new flow`),!1;if(t.flowType!==r)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${r}, starting new flow, flow_id: ${this.flowId}`),!1;if(r==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const n=s?"explicit resume=true":`navigation type: ${o}`;return console.log(`Resuming existing flow (${n})`),!0}resumeExistingFlow(t,r){return D(this,void 0,void 0,function*(){try{const i=yield this.resumeFlow(r);if(!i.auth_result){this.flowStateManager.saveFlowState(r,t.flow_id,i);const s=this.flowStateManager.getFlowState();s&&this.flowEventBus.emit("flow:resumed",{flowState:s})}return{flowType:r,isResumed:!0,state:i.state,render_spec:i.render_spec,auth_result:i.auth_result}}catch(i){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",i),yield this.startNewFlow(r)}})}startNewFlow(t){return D(this,void 0,void 0,function*(){const r=Mt.getConfig(),i=new URLSearchParams(this.location.search),s={};i.forEach((h,u)=>{s[u]=h}),console.log("metadata",s);const o={app_id:r.appId,client_secret:r.clientSecret,origin_url:this.location.href,signin_url:r.signinUrl,signup_url:r.signupUrl,locale:r.locale||"en",flow_id:this.determineFlowId(t),metadata:s},n=yield this.startFlow(t,o);if(!n.auth_result){this.flowStateManager.saveFlowState(t,o.flow_id,n);const h=this.flowStateManager.getFlowState();h&&this.flowEventBus.emit("flow:started",{flowState:h})}return{flowType:t,isResumed:!1,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result}})}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"custom":if(!this.flowId)throw new ht("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}handleSwitchToSignin(){return D(this,void 0,void 0,function*(){const t=Mt.getConfig();return this.redirect({url:t.signinUrl,redirect_delay:0}),{state:"End"}})}handleSwitchToSignup(){return D(this,void 0,void 0,function*(){const t=Mt.getConfig();return this.redirect({url:t.signupUrl,redirect_delay:0}),{state:"End"}})}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}}class fc{constructor(t){this.delayMs=t,this.timerId=null}debounce(t){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{t(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}}class vc{pushState(t,r,i){history.pushState(t,r,i)}replaceState(t,r,i){history.replaceState(t,r,i)}get state(){return history.state}}class yc{constructor(t,r,i=!1,s=window.location,o,n){this.popstateListener=null,this.pageshowListener=null,this.isProcessing=!1,this.isHandlingNavigationEvent=!1,this.onFlowRestartNeeded=null,this.onFlowRestartNeeded=r,this.skipHistoryTracking=i,this.debouncer=new fc(200),this.location=s,this.flowStateManager=o||new bd,this.historyAdapter=n||new vc,this.subscribeToFlowEvents(t),this.initializeListener()}subscribeToFlowEvents(t){t.on("flow:started",this.handleFlowStart.bind(this)),t.on("flow:updated",this.handleFlowUpdate.bind(this)),t.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=t=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(t)})},this.pageshowListener=t=>{t.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}handlePopState(t){return D(this,void 0,void 0,function*(){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const r=t.state,i=this.flowStateManager.getFlowState(),s=Mt.getConfig(),o=ps.detect(s,this.location);if(r&&this.restoreHistoryStateToSession(r),this.shouldRestartFlow(r,i,o)){yield this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}})}handleBfcacheRestoration(){return D(this,void 0,void 0,function*(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=this.historyAdapter.state,r=this.flowStateManager.getFlowState(),i=Mt.getConfig(),s=ps.detect(i,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,r,s)){yield this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}})}restoreHistoryStateToSession(t){console.log("[NavigationManager] Restoring history state to session storage:",t),this.flowStateManager.restoreFromHistory(t)}shouldRestartFlow(t,r,i){return t&&t.flowType!==i?(console.log("[NavigationManager] Flow type changed via navigation:",t.flowType,"→",i),this.flowStateManager.clearFlowState(),!0):t?Date.now()-t.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}triggerFlowRestart(){return D(this,void 0,void 0,function*(){this.onFlowRestartNeeded&&(yield this.onFlowRestartNeeded())})}createHistoryState(t){return{flowType:t.flowType,flow_id:t.flow_id,state:t.state,timestamp:Date.now()}}updateBrowserHistory(t,r){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const i=this.createHistoryState(t);try{r==="push"?(this.historyAdapter.pushState(i,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(i,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(s){console.error("[NavigationManager] Failed to update history:",s)}}handleFlowStart(t){this.updateBrowserHistory(t.flowState,"replace")}handleFlowUpdate(t){const r=this.isHandlingNavigationEvent||!t.isNewStep?"replace":"push";this.updateBrowserHistory(t.flowState,r)}handleFlowResume(t){this.updateBrowserHistory(t.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}}let Me=new AbortController;class wc{constructor(){this.httpClient=Te.Instance,this.capabilities={webauthn:!1},this.capabilitiesDetected=!1}detectCapabilities(){return D(this,void 0,void 0,function*(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const t=yield PublicKeyCredential.getClientCapabilities();this.capabilities=Object.assign(Object.assign({},this.capabilities),t);return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=yield PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=yield PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}})}fetchPublicKeyCredentialRequestOptions(t,r){return D(this,void 0,void 0,function*(){try{return this.httpClient.post("/webauthn/login/options",{conditional:r,flow_type:t})}catch(i){return console.error("error",i),null}})}fetchPublicKeyCredentialCreationOptions(t,r){return D(this,void 0,void 0,function*(){try{return this.httpClient.post("/webauthn/register/options",{conditional:r,flow_type:t})}catch(i){return console.error("error",i),null}})}startRegistration(t,r){return D(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),!t)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;Me.abort(),Me=new AbortController;const i=this.toPublicKeyCredentialCreationOptions(t),s={signal:Me.signal,publicKey:i};if(r){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;s.mediation="conditional"}try{const o=yield navigator.credentials.create(s);if(!o){console.error("no credential returned by authenticator");return}const{id:n,rawId:h,response:u,type:g}=o;let y;typeof u.getTransports=="function"&&(y=u.getTransports());let w;if(typeof u.getPublicKeyAlgorithm=="function")try{w=u.getPublicKeyAlgorithm()}catch(S){Ks("getPublicKeyAlgorithm()",S)}let E;if(typeof u.getPublicKey=="function")try{const S=u.getPublicKey();S!==null&&(E=this.bufferToBase64URLString(S))}catch(S){Ks("getPublicKey()",S)}let C;if(typeof u.getAuthenticatorData=="function")try{C=this.bufferToBase64URLString(u.getAuthenticatorData())}catch(S){Ks("getAuthenticatorData()",S)}return{id:n,rawId:this.bufferToBase64URLString(h),response:{attestationObject:this.bufferToBase64URLString(u.attestationObject),clientDataJSON:this.bufferToBase64URLString(u.clientDataJSON),transports:y,publicKeyAlgorithm:w,publicKey:E,authenticatorData:C},type:g,clientExtensionResults:o.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(o.authenticatorAttachment)}}catch(o){const n=this.identifyAuthenticationError({error:o,options:s});return n instanceof qe?console.error(`WebAuthn authentication failed with code: ${n.code}, message: ${n.message}`):console.error("WebAuthn authentication failed with error:",o),null}})}startAuthentication(t,r){return D(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),!t)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;Me.abort(),Me=new AbortController;const i=this.toPublicKeyCredentialRequestOptions(t),s={signal:Me.signal,publicKey:i};if(r){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;s.mediation="conditional",s.publicKey&&(s.publicKey.allowCredentials=[])}try{const o=yield navigator.credentials.get(s);return this.toPublicKeyCredentialJSON(o)}catch(o){const n=this.identifyAuthenticationError({error:o,options:s});return n instanceof qe?console.error(`WebAuthn authentication failed with code: ${n.code}, message: ${n.message}`):console.error("WebAuthn authentication failed with error:",o),null}})}signalUnknownCredential(t,r){return D(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{yield PublicKeyCredential.signalUnknownCredential({rpId:t,credentialId:r})}catch(i){console.error("Failed to signal unknown credential:",i)}else console.warn("signalUnknownCredential not supported in this browser")})}signalCurrentUserDetails(t){return D(this,void 0,void 0,function*(){if(yield this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{yield PublicKeyCredential.signalCurrentUserDetails(t)}catch(r){console.error("Failed to signal current user details:",r)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")})}toPublicKeyCredentialDescriptor(t){const{id:r}=t;return Object.assign(Object.assign({},t),{id:this.base64URLStringToBuffer(r),type:t.type,transports:t.transports})}toAuthenticatorAttachment(t){const r=["cross-platform","platform"];if(t&&!(r.indexOf(t)<0))return t}bufferToBase64URLString(t){const r=new Uint8Array(t);let i="";for(const o of r)i+=String.fromCharCode(o);return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(t){const r=t.replace(/-/g,"+").replace(/_/g,"/"),i=(4-r.length%4)%4,s=r.padEnd(r.length+i,"="),o=atob(s),n=new ArrayBuffer(o.length),h=new Uint8Array(n);for(let u=0;u<o.length;u++)h[u]=o.charCodeAt(u);return n}toPublicKeyCredentialJSON(t){if(typeof t.toJSON=="function")return t.toJSON();const r=t.response;return{id:t.id,type:t.type,rawId:this.bufferToBase64URLString(t.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(t.authenticatorAttachment),clientExtensionResults:t==null?void 0:t.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(r.clientDataJSON),authenticatorData:this.bufferToBase64URLString(r.authenticatorData),signature:this.bufferToBase64URLString(r.signature),userHandle:r.userHandle?this.bufferToBase64URLString(r.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(t){var r;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const i={challenge:this.base64URLStringToBuffer(t.challenge),rp:{id:t.rp.id,name:t.rp.name},user:{displayName:t.user.displayName,id:this.base64URLStringToBuffer(t.user.id),name:t.user.name},pubKeyCredParams:t.pubKeyCredParams.map(s=>({alg:s.alg,type:s.type})),timeout:t.timeout};if(t.attestation&&(i.attestation=t.attestation),t.extensions!==void 0&&(i.extensions=t.extensions),t.authenticatorSelection){const s={};t.authenticatorSelection.authenticatorAttachment&&(s.authenticatorAttachment=t.authenticatorSelection.authenticatorAttachment),t.authenticatorSelection.requireResidentKey&&(s.requireResidentKey=t.authenticatorSelection.requireResidentKey),t.authenticatorSelection.residentKey&&(s.residentKey=t.authenticatorSelection.residentKey),t.authenticatorSelection.userVerification&&(s.userVerification=t.authenticatorSelection.userVerification),i.authenticatorSelection=s}return!((r=t.excludeCredentials)===null||r===void 0)&&r.length&&(i.excludeCredentials=t.excludeCredentials.map(s=>this.toPublicKeyCredentialDescriptor(s))),i}toPublicKeyCredentialRequestOptions(t){var r;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const i={challenge:this.base64URLStringToBuffer(t.challenge)};return t.rpId!==void 0&&(i.rpId=t.rpId),t.timeout!==void 0&&(i.timeout=t.timeout),t.userVerification!==void 0&&(i.userVerification=t.userVerification),t.extensions!==void 0&&(i.extensions=t.extensions),!((r=t.allowCredentials)===null||r===void 0)&&r.length&&(i.allowCredentials=t.allowCredentials.map(s=>this.toPublicKeyCredentialDescriptor(s))),i}identifyAuthenticationError({error:t,options:r}){const{publicKey:i}=r;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(r.signal instanceof AbortSignal)return new qe({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new qe({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const s=window.location.hostname;if(_c(s)){if(i.rpId!==s)return new qe({message:`The RP ID "${i.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new qe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new qe({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return t}isPublicKeyCredentialRequestOptionsJSON(t){return typeof t=="object"&&t!==null&&"challenge"in t}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){Me.abort()}}function Ks(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
2
+ `,t)}class qe extends Error{constructor({message:t,code:r,cause:i,name:s}){super(t),this.name=s??i.name,this.code=r}}function _c(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}class zr{constructor(){this.configured=!1,this.loginflow=null,this.navigationManager=null,this.flowEventBus=null,this.webauthnService=null}static get Instance(){return zr.instance||(zr.instance=new zr),zr.instance}ensureConfigured(){if(!this.configured)throw new ht("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new ht("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}startLoginflowInternal(t){return D(this,arguments,void 0,function*(r,i=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new wc,this.webauthnService.detectCapabilities(),this.flowEventBus=new fd,this.navigationManager=new yc(this.flowEventBus,()=>D(this,void 0,void 0,function*(){console.log("[AuthService] Navigation restart triggered, restarting loginflow"),yield this.startLoginflowInternal(void 0,!1)}),i);const s=yield en.init(r,this.flowEventBus),o=Mt.getConfig();this.startPasskeyAuthentication(s.flowType,!0),this.loginflow=s.sdk;const n={flowType:s.flowType,isResumed:s.isResumed,state:s.state,render_spec:s.render_spec,auth_result:s.auth_result};return o.onFlowStateChange&&o.onFlowStateChange({eventType:s.isResumed?"flow_resumed":"flow_started",flowType:s.flowType,state:s.state,render_spec:s.render_spec,auth_result:s.auth_result,isResumed:s.isResumed}),n})}configure(t){if(!t.domain||!t.appId||!t.clientSecret)throw new ht("CONFIG_ERROR","domain, appId, and clientSecret are required");Mt.setConfig(t),this.configured=!0}isAuthenticated(){return this.ensureConfigured(),kt.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),kt.Instance.getCurrentSession()}getAuthenticatedUser(){return this.ensureConfigured(),kt.Instance.getAuthenticatedUser()}startLoginflow(t){return D(this,void 0,void 0,function*(){return this.startLoginflowInternal(t,!1)})}processLoginflowEvent(t){return D(this,void 0,void 0,function*(){var r,i;this.ensureConfigured(),this.ensureLoginflowInitialized();const s=Mt.getConfig(),o=ps.detect(s,location);if(t.event==="signin_with_passkey"&&!(!((r=t.data)===null||r===void 0)&&r.credential_request)){const h=yield this.getPasskeyCredential(o,!1);if(!h||!h.cred)return console.error("no credential returned by browser"),{state:""};t.data={credential_request:h.cred}}if(t.event==="register_passkey"&&!(!((i=t.data)===null||i===void 0)&&i.conditional)){console.log("attempt to register a passkey");const h=yield this.createPasskeyCredential(o,!1);if(!h)return console.error("no credential created by browser"),{state:""};t.data={credential_creation_response:h,conditional:!1}}const n=yield this.loginflow.processEvent(t,h=>D(this,void 0,void 0,function*(){var u;if(!((u=h.data)===null||u===void 0)&&u.conditional_create_enabled){console.log("attempt to register a passkey conditionally");const g=yield this.registerPasskey(o,!0);g&&(g.render_spec=void 0,h.render_spec=void 0)}}));if(console.log("render spec",n.render_spec),s.onFlowStateChange){const h=sessionStorage.getItem("saasbase_loginflow_state");let u="custom";if(h)try{u=JSON.parse(h).flowType}catch(g){console.error("Failed to parse flow state:",g)}s.onFlowStateChange({eventType:"flow_updated",flowType:u,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result})}return n})}getPasskeyCredential(t,r){return D(this,void 0,void 0,function*(){var i,s;const o=yield(i=this.webauthnService)===null||i===void 0?void 0:i.fetchPublicKeyCredentialRequestOptions(t,r);if(!o)return console.error("failed to fetch public key request options"),null;try{return{cred:yield(s=this.webauthnService)===null||s===void 0?void 0:s.startAuthentication(o,r),options:o}}catch(n){return console.error("error starting authentication",n),null}})}startPasskeyAuthentication(t){return D(this,arguments,void 0,function*(r,i=!1){var s,o;const n=yield this.getPasskeyCredential(r,i);if(!n||!n.cred){console.error("no credential found");return}const{cred:h,options:u}=n;try{((s=(yield this.processLoginflowEvent({event:"signin_with_passkey",data:{credential_request:h}})).data)===null||s===void 0?void 0:s.error)==="CredentialNotFound"&&(u.rpId&&h.id?(o=this.webauthnService)===null||o===void 0||o.signalUnknownCredential(u.rpId,h.id):console.log("missing rpId or credential id for signalUnknownCredential"))}catch(g){console.error("failed to signin with passkey",g)}})}createPasskeyCredential(t,r){return D(this,void 0,void 0,function*(){var i,s;try{const o=yield(i=this.webauthnService)===null||i===void 0?void 0:i.fetchPublicKeyCredentialCreationOptions(t,r);if(!o){console.warn("no credential creation option returned by webauthn service"),console.log("skipping conditional passkey registration...");return}return(s=this.webauthnService)===null||s===void 0?void 0:s.startRegistration(o,r)}catch(o){console.log("error",o)}})}registerPasskey(t){return D(this,arguments,void 0,function*(r,i=!1){try{const s=yield this.createPasskeyCredential(r,i),o=yield this.processLoginflowEvent({event:"register_passkey",data:{credential_creation_response:s,conditional:i}});return console.log("passkey creation res",o),o}catch(s){console.log("error",s)}})}signOut(){this.ensureConfigured(),kt.Instance.clearSession(),kt.Instance.cleanup(),this.loginflow&&(this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(this.navigationManager.destroy(),this.navigationManager=null),this.flowEventBus&&(this.flowEventBus.clear(),this.flowEventBus=null),window.location.reload(),console.log("Refreshed the page to clear any in-memory state")}}const ut=zr.Instance;/**
3
3
  * @license
4
4
  * Copyright 2019 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
@@ -7,17 +7,17 @@
7
7
  * @license
8
8
  * Copyright 2017 Google LLC
9
9
  * SPDX-License-Identifier: BSD-3-Clause
10
- */const{is:$c,defineProperty:Cc,getOwnPropertyDescriptor:Ec,getOwnPropertyNames:kc,getOwnPropertySymbols:Rc,getPrototypeOf:Ic}=Object,Le=globalThis,jn=Le.trustedTypes,Oc=jn?jn.emptyScript:"",Ys=Le.reactiveElementPolyfillSupport,hi=(e,t)=>e,gs={toAttribute(e,t){switch(t){case Boolean:e=e?Oc:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},on=(e,t)=>!$c(e,t),Un={attribute:!0,type:String,converter:gs,reflect:!1,useDefault:!1,hasChanged:on};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Le.litPropertyMetadata??(Le.litPropertyMetadata=new WeakMap);let Lr=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=Un){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,r);s!==void 0&&Cc(this.prototype,t,s)}}static getPropertyDescriptor(t,r,i){const{get:s,set:o}=Ec(this.prototype,t)??{get(){return this[r]},set(n){this[r]=n}};return{get:s,set(n){const h=s==null?void 0:s.call(this);o==null||o.call(this,n),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Un}static _$Ei(){if(this.hasOwnProperty(hi("elementProperties")))return;const t=Ic(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(hi("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(hi("properties"))){const r=this.properties,i=[...kc(r),...Rc(r)];for(const s of i)this.createProperty(s,r[s])}const t=this[Symbol.metadata];if(t!==null){const r=litPropertyMetadata.get(t);if(r!==void 0)for(const[i,s]of r)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[r,i]of this.elementProperties){const s=this._$Eu(r,i);s!==void 0&&this._$Eh.set(s,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const r=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)r.unshift(zn(s))}else t!==void 0&&r.push(zn(t));return r}static _$Eu(t,r){const i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(r=>r(this))}addController(t){var r;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var r;(r=this._$EO)==null||r.delete(t)}_$E_(){const t=new Map,r=this.constructor.elementProperties;for(const i of r.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Sc(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(r=>{var i;return(i=r.hostConnected)==null?void 0:i.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(r=>{var i;return(i=r.hostDisconnected)==null?void 0:i.call(r)})}attributeChangedCallback(t,r,i){this._$AK(t,i)}_$ET(t,r){var o;const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const n=(((o=i.converter)==null?void 0:o.toAttribute)!==void 0?i.converter:gs).toAttribute(r,i.type);this._$Em=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,r){var o,n;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const h=i.getPropertyOptions(s),u=typeof h.converter=="function"?{fromAttribute:h.converter}:((o=h.converter)==null?void 0:o.fromAttribute)!==void 0?h.converter:gs;this._$Em=s;const g=u.fromAttribute(r,h.type);this[s]=g??((n=this._$Ej)==null?void 0:n.get(s))??g,this._$Em=null}}requestUpdate(t,r,i,s=!1,o){var n;if(t!==void 0){const h=this.constructor;if(s===!1&&(o=this[t]),i??(i=h.getPropertyOptions(t)),!((i.hasChanged??on)(o,r)||i.useDefault&&i.reflect&&o===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(h._$Eu(t,i))))return;this.C(t,r,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:i,reflect:s,wrapped:o},n){i&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,n??r??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(r=void 0),this._$AL.set(t,r)),s===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[o,n]of s){const{wrapped:h}=n,u=this[o];h!==!0||this._$AL.has(o)||u===void 0||this.C(o,void 0,n,u)}}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(i=this._$EO)==null||i.forEach(s=>{var o;return(o=s.hostUpdate)==null?void 0:o.call(s)}),this.update(r)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(r)}willUpdate(t){}_$AE(t){var r;(r=this._$EO)==null||r.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(r=>this._$ET(r,this[r]))),this._$EM()}updated(t){}firstUpdated(t){}};Lr.elementStyles=[],Lr.shadowRootOptions={mode:"open"},Lr[hi("elementProperties")]=new Map,Lr[hi("finalized")]=new Map,Ys==null||Ys({ReactiveElement:Lr}),(Le.reactiveElementVersions??(Le.reactiveElementVersions=[])).push("2.1.2");/**
10
+ */const{is:$c,defineProperty:Cc,getOwnPropertyDescriptor:Ec,getOwnPropertyNames:kc,getOwnPropertySymbols:Rc,getPrototypeOf:Ic}=Object,Le=globalThis,Un=Le.trustedTypes,Oc=Un?Un.emptyScript:"",Ys=Le.reactiveElementPolyfillSupport,hi=(e,t)=>e,gs={toAttribute(e,t){switch(t){case Boolean:e=e?Oc:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},on=(e,t)=>!$c(e,t),jn={attribute:!0,type:String,converter:gs,reflect:!1,useDefault:!1,hasChanged:on};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Le.litPropertyMetadata??(Le.litPropertyMetadata=new WeakMap);let Lr=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=jn){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,r);s!==void 0&&Cc(this.prototype,t,s)}}static getPropertyDescriptor(t,r,i){const{get:s,set:o}=Ec(this.prototype,t)??{get(){return this[r]},set(n){this[r]=n}};return{get:s,set(n){const h=s==null?void 0:s.call(this);o==null||o.call(this,n),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??jn}static _$Ei(){if(this.hasOwnProperty(hi("elementProperties")))return;const t=Ic(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(hi("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(hi("properties"))){const r=this.properties,i=[...kc(r),...Rc(r)];for(const s of i)this.createProperty(s,r[s])}const t=this[Symbol.metadata];if(t!==null){const r=litPropertyMetadata.get(t);if(r!==void 0)for(const[i,s]of r)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[r,i]of this.elementProperties){const s=this._$Eu(r,i);s!==void 0&&this._$Eh.set(s,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const r=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)r.unshift(zn(s))}else t!==void 0&&r.push(zn(t));return r}static _$Eu(t,r){const i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(r=>r(this))}addController(t){var r;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var r;(r=this._$EO)==null||r.delete(t)}_$E_(){const t=new Map,r=this.constructor.elementProperties;for(const i of r.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Sc(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(r=>{var i;return(i=r.hostConnected)==null?void 0:i.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(r=>{var i;return(i=r.hostDisconnected)==null?void 0:i.call(r)})}attributeChangedCallback(t,r,i){this._$AK(t,i)}_$ET(t,r){var o;const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const n=(((o=i.converter)==null?void 0:o.toAttribute)!==void 0?i.converter:gs).toAttribute(r,i.type);this._$Em=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,r){var o,n;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const h=i.getPropertyOptions(s),u=typeof h.converter=="function"?{fromAttribute:h.converter}:((o=h.converter)==null?void 0:o.fromAttribute)!==void 0?h.converter:gs;this._$Em=s;const g=u.fromAttribute(r,h.type);this[s]=g??((n=this._$Ej)==null?void 0:n.get(s))??g,this._$Em=null}}requestUpdate(t,r,i,s=!1,o){var n;if(t!==void 0){const h=this.constructor;if(s===!1&&(o=this[t]),i??(i=h.getPropertyOptions(t)),!((i.hasChanged??on)(o,r)||i.useDefault&&i.reflect&&o===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(h._$Eu(t,i))))return;this.C(t,r,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:i,reflect:s,wrapped:o},n){i&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,n??r??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(r=void 0),this._$AL.set(t,r)),s===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[o,n]of s){const{wrapped:h}=n,u=this[o];h!==!0||this._$AL.has(o)||u===void 0||this.C(o,void 0,n,u)}}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(i=this._$EO)==null||i.forEach(s=>{var o;return(o=s.hostUpdate)==null?void 0:o.call(s)}),this.update(r)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(r)}willUpdate(t){}_$AE(t){var r;(r=this._$EO)==null||r.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(r=>this._$ET(r,this[r]))),this._$EM()}updated(t){}firstUpdated(t){}};Lr.elementStyles=[],Lr.shadowRootOptions={mode:"open"},Lr[hi("elementProperties")]=new Map,Lr[hi("finalized")]=new Map,Ys==null||Ys({ReactiveElement:Lr}),(Le.reactiveElementVersions??(Le.reactiveElementVersions=[])).push("2.1.2");/**
11
11
  * @license
12
12
  * Copyright 2017 Google LLC
13
13
  * SPDX-License-Identifier: BSD-3-Clause
14
14
  */const ui=globalThis,Dn=e=>e,ms=ui.trustedTypes,Bn=ms?ms.createPolicy("lit-html",{createHTML:e=>e}):void 0,wd="$lit$",Fe=`lit$${Math.random().toFixed(9).slice(2)}$`,_d="?"+Fe,Ac=`<${_d}>`,fr=document,yi=()=>fr.createComment(""),wi=e=>e===null||typeof e!="object"&&typeof e!="function",nn=Array.isArray,Pc=e=>nn(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Xs=`[
15
15
  \f\r]`,Qr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Mn=/-->/g,qn=/>/g,Ve=RegExp(`>|${Xs}(?:([^\\s"'>=/]+)(${Xs}*=${Xs}*(?:[^
16
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Vn=/'/g,Hn=/"/g,xd=/^(?:script|style|textarea|title)$/i,Sd=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),d=Sd(1),te=Sd(2),vr=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Gn=new WeakMap,er=fr.createTreeWalker(fr,129);function $d(e,t){if(!nn(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bn!==void 0?Bn.createHTML(t):t}const Fc=(e,t)=>{const r=e.length-1,i=[];let s,o=t===2?"<svg>":t===3?"<math>":"",n=Qr;for(let h=0;h<r;h++){const u=e[h];let g,y,w=-1,E=0;for(;E<u.length&&(n.lastIndex=E,y=n.exec(u),y!==null);)E=n.lastIndex,n===Qr?y[1]==="!--"?n=Mn:y[1]!==void 0?n=qn:y[2]!==void 0?(xd.test(y[2])&&(s=RegExp("</"+y[2],"g")),n=Ve):y[3]!==void 0&&(n=Ve):n===Ve?y[0]===">"?(n=s??Qr,w=-1):y[1]===void 0?w=-2:(w=n.lastIndex-y[2].length,g=y[1],n=y[3]===void 0?Ve:y[3]==='"'?Hn:Vn):n===Hn||n===Vn?n=Ve:n===Mn||n===qn?n=Qr:(n=Ve,s=void 0);const C=n===Ve&&e[h+1].startsWith("/>")?" ":"";o+=n===Qr?u+Ac:w>=0?(i.push(g),u.slice(0,w)+wd+u.slice(w)+Fe+C):u+Fe+(w===-2?h:C)}return[$d(e,o+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};let Go=class Cd{constructor({strings:t,_$litType$:r},i){let s;this.parts=[];let o=0,n=0;const h=t.length-1,u=this.parts,[g,y]=Fc(t,r);if(this.el=Cd.createElement(g,i),er.currentNode=this.el.content,r===2||r===3){const w=this.el.content.firstChild;w.replaceWith(...w.childNodes)}for(;(s=er.nextNode())!==null&&u.length<h;){if(s.nodeType===1){if(s.hasAttributes())for(const w of s.getAttributeNames())if(w.endsWith(wd)){const E=y[n++],C=s.getAttribute(w).split(Fe),S=/([.?@])?(.*)/.exec(E);u.push({type:1,index:o,name:S[2],strings:C,ctor:S[1]==="."?Lc:S[1]==="?"?Nc:S[1]==="@"?zc:ws}),s.removeAttribute(w)}else w.startsWith(Fe)&&(u.push({type:6,index:o}),s.removeAttribute(w));if(xd.test(s.tagName)){const w=s.textContent.split(Fe),E=w.length-1;if(E>0){s.textContent=ms?ms.emptyScript:"";for(let C=0;C<E;C++)s.append(w[C],yi()),er.nextNode(),u.push({type:2,index:++o});s.append(w[E],yi())}}}else if(s.nodeType===8)if(s.data===_d)u.push({type:2,index:o});else{let w=-1;for(;(w=s.data.indexOf(Fe,w+1))!==-1;)u.push({type:7,index:o}),w+=Fe.length-1}o++}}static createElement(t,r){const i=fr.createElement("template");return i.innerHTML=t,i}};function Vr(e,t,r=e,i){var n,h;if(t===vr)return t;let s=i!==void 0?(n=r._$Co)==null?void 0:n[i]:r._$Cl;const o=wi(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==o&&((h=s==null?void 0:s._$AO)==null||h.call(s,!1),o===void 0?s=void 0:(s=new o(e),s._$AT(e,r,i)),i!==void 0?(r._$Co??(r._$Co=[]))[i]=s:r._$Cl=s),s!==void 0&&(t=Vr(e,s._$AS(e,t.values),s,i)),t}let Tc=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:r},parts:i}=this._$AD,s=((t==null?void 0:t.creationScope)??fr).importNode(r,!0);er.currentNode=s;let o=er.nextNode(),n=0,h=0,u=i[0];for(;u!==void 0;){if(n===u.index){let g;u.type===2?g=new an(o,o.nextSibling,this,t):u.type===1?g=new u.ctor(o,u.name,u.strings,this,t):u.type===6&&(g=new jc(o,this,t)),this._$AV.push(g),u=i[++h]}n!==(u==null?void 0:u.index)&&(o=er.nextNode(),n++)}return er.currentNode=fr,s}p(t){let r=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,r),r+=i.strings.length-2):i._$AI(t[r])),r++}},an=class Ed{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,r,i,s){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=i,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Vr(this,t,r),wi(t)?t===m||t==null||t===""?(this._$AH!==m&&this._$AR(),this._$AH=m):t!==this._$AH&&t!==vr&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Pc(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==m&&wi(this._$AH)?this._$AA.nextSibling.data=t:this.T(fr.createTextNode(t)),this._$AH=t}$(t){var o;const{values:r,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Go.createElement($d(i.h,i.h[0]),this.options)),i);if(((o=this._$AH)==null?void 0:o._$AD)===s)this._$AH.p(r);else{const n=new Tc(s,this),h=n.u(this.options);n.p(r),this.T(h),this._$AH=n}}_$AC(t){let r=Gn.get(t.strings);return r===void 0&&Gn.set(t.strings,r=new Go(t)),r}k(t){nn(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let i,s=0;for(const o of t)s===r.length?r.push(i=new Ed(this.O(yi()),this.O(yi()),this,this.options)):i=r[s],i._$AI(o),s++;s<r.length&&(this._$AR(i&&i._$AB.nextSibling,s),r.length=s)}_$AR(t=this._$AA.nextSibling,r){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,r);t!==this._$AB;){const s=Dn(t).nextSibling;Dn(t).remove(),t=s}}setConnected(t){var r;this._$AM===void 0&&(this._$Cv=t,(r=this._$AP)==null||r.call(this,t))}},ws=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,i,s,o){this.type=1,this._$AH=m,this._$AN=void 0,this.element=t,this.name=r,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=m}_$AI(t,r=this,i,s){const o=this.strings;let n=!1;if(o===void 0)t=Vr(this,t,r,0),n=!wi(t)||t!==this._$AH&&t!==vr,n&&(this._$AH=t);else{const h=t;let u,g;for(t=o[0],u=0;u<o.length-1;u++)g=Vr(this,h[i+u],r,u),g===vr&&(g=this._$AH[u]),n||(n=!wi(g)||g!==this._$AH[u]),g===m?t=m:t!==m&&(t+=(g??"")+o[u+1]),this._$AH[u]=g}n&&!s&&this.j(t)}j(t){t===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Lc=class extends ws{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===m?void 0:t}},Nc=class extends ws{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==m)}},zc=class extends ws{constructor(t,r,i,s,o){super(t,r,i,s,o),this.type=5}_$AI(t,r=this){if((t=Vr(this,t,r,0)??m)===vr)return;const i=this._$AH,s=t===m&&i!==m||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==m&&(i===m||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,t):this._$AH.handleEvent(t)}},jc=class{constructor(t,r,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Vr(this,t)}};const Zs=ui.litHtmlPolyfillSupport;Zs==null||Zs(Go,an),(ui.litHtmlVersions??(ui.litHtmlVersions=[])).push("3.3.2");const Uc=(e,t,r)=>{const i=(r==null?void 0:r.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const o=(r==null?void 0:r.renderBefore)??null;i._$litPart$=s=new an(t.insertBefore(yi(),o),o,void 0,r??{})}return s._$AI(e),s};/**
16
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Vn=/'/g,Hn=/"/g,xd=/^(?:script|style|textarea|title)$/i,Sd=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),d=Sd(1),te=Sd(2),vr=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Gn=new WeakMap,er=fr.createTreeWalker(fr,129);function $d(e,t){if(!nn(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bn!==void 0?Bn.createHTML(t):t}const Fc=(e,t)=>{const r=e.length-1,i=[];let s,o=t===2?"<svg>":t===3?"<math>":"",n=Qr;for(let h=0;h<r;h++){const u=e[h];let g,y,w=-1,E=0;for(;E<u.length&&(n.lastIndex=E,y=n.exec(u),y!==null);)E=n.lastIndex,n===Qr?y[1]==="!--"?n=Mn:y[1]!==void 0?n=qn:y[2]!==void 0?(xd.test(y[2])&&(s=RegExp("</"+y[2],"g")),n=Ve):y[3]!==void 0&&(n=Ve):n===Ve?y[0]===">"?(n=s??Qr,w=-1):y[1]===void 0?w=-2:(w=n.lastIndex-y[2].length,g=y[1],n=y[3]===void 0?Ve:y[3]==='"'?Hn:Vn):n===Hn||n===Vn?n=Ve:n===Mn||n===qn?n=Qr:(n=Ve,s=void 0);const C=n===Ve&&e[h+1].startsWith("/>")?" ":"";o+=n===Qr?u+Ac:w>=0?(i.push(g),u.slice(0,w)+wd+u.slice(w)+Fe+C):u+Fe+(w===-2?h:C)}return[$d(e,o+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};let Go=class Cd{constructor({strings:t,_$litType$:r},i){let s;this.parts=[];let o=0,n=0;const h=t.length-1,u=this.parts,[g,y]=Fc(t,r);if(this.el=Cd.createElement(g,i),er.currentNode=this.el.content,r===2||r===3){const w=this.el.content.firstChild;w.replaceWith(...w.childNodes)}for(;(s=er.nextNode())!==null&&u.length<h;){if(s.nodeType===1){if(s.hasAttributes())for(const w of s.getAttributeNames())if(w.endsWith(wd)){const E=y[n++],C=s.getAttribute(w).split(Fe),S=/([.?@])?(.*)/.exec(E);u.push({type:1,index:o,name:S[2],strings:C,ctor:S[1]==="."?Lc:S[1]==="?"?Nc:S[1]==="@"?zc:ws}),s.removeAttribute(w)}else w.startsWith(Fe)&&(u.push({type:6,index:o}),s.removeAttribute(w));if(xd.test(s.tagName)){const w=s.textContent.split(Fe),E=w.length-1;if(E>0){s.textContent=ms?ms.emptyScript:"";for(let C=0;C<E;C++)s.append(w[C],yi()),er.nextNode(),u.push({type:2,index:++o});s.append(w[E],yi())}}}else if(s.nodeType===8)if(s.data===_d)u.push({type:2,index:o});else{let w=-1;for(;(w=s.data.indexOf(Fe,w+1))!==-1;)u.push({type:7,index:o}),w+=Fe.length-1}o++}}static createElement(t,r){const i=fr.createElement("template");return i.innerHTML=t,i}};function Vr(e,t,r=e,i){var n,h;if(t===vr)return t;let s=i!==void 0?(n=r._$Co)==null?void 0:n[i]:r._$Cl;const o=wi(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==o&&((h=s==null?void 0:s._$AO)==null||h.call(s,!1),o===void 0?s=void 0:(s=new o(e),s._$AT(e,r,i)),i!==void 0?(r._$Co??(r._$Co=[]))[i]=s:r._$Cl=s),s!==void 0&&(t=Vr(e,s._$AS(e,t.values),s,i)),t}let Tc=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:r},parts:i}=this._$AD,s=((t==null?void 0:t.creationScope)??fr).importNode(r,!0);er.currentNode=s;let o=er.nextNode(),n=0,h=0,u=i[0];for(;u!==void 0;){if(n===u.index){let g;u.type===2?g=new an(o,o.nextSibling,this,t):u.type===1?g=new u.ctor(o,u.name,u.strings,this,t):u.type===6&&(g=new Uc(o,this,t)),this._$AV.push(g),u=i[++h]}n!==(u==null?void 0:u.index)&&(o=er.nextNode(),n++)}return er.currentNode=fr,s}p(t){let r=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,r),r+=i.strings.length-2):i._$AI(t[r])),r++}},an=class Ed{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,r,i,s){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=i,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Vr(this,t,r),wi(t)?t===m||t==null||t===""?(this._$AH!==m&&this._$AR(),this._$AH=m):t!==this._$AH&&t!==vr&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Pc(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==m&&wi(this._$AH)?this._$AA.nextSibling.data=t:this.T(fr.createTextNode(t)),this._$AH=t}$(t){var o;const{values:r,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Go.createElement($d(i.h,i.h[0]),this.options)),i);if(((o=this._$AH)==null?void 0:o._$AD)===s)this._$AH.p(r);else{const n=new Tc(s,this),h=n.u(this.options);n.p(r),this.T(h),this._$AH=n}}_$AC(t){let r=Gn.get(t.strings);return r===void 0&&Gn.set(t.strings,r=new Go(t)),r}k(t){nn(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let i,s=0;for(const o of t)s===r.length?r.push(i=new Ed(this.O(yi()),this.O(yi()),this,this.options)):i=r[s],i._$AI(o),s++;s<r.length&&(this._$AR(i&&i._$AB.nextSibling,s),r.length=s)}_$AR(t=this._$AA.nextSibling,r){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,r);t!==this._$AB;){const s=Dn(t).nextSibling;Dn(t).remove(),t=s}}setConnected(t){var r;this._$AM===void 0&&(this._$Cv=t,(r=this._$AP)==null||r.call(this,t))}},ws=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,i,s,o){this.type=1,this._$AH=m,this._$AN=void 0,this.element=t,this.name=r,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=m}_$AI(t,r=this,i,s){const o=this.strings;let n=!1;if(o===void 0)t=Vr(this,t,r,0),n=!wi(t)||t!==this._$AH&&t!==vr,n&&(this._$AH=t);else{const h=t;let u,g;for(t=o[0],u=0;u<o.length-1;u++)g=Vr(this,h[i+u],r,u),g===vr&&(g=this._$AH[u]),n||(n=!wi(g)||g!==this._$AH[u]),g===m?t=m:t!==m&&(t+=(g??"")+o[u+1]),this._$AH[u]=g}n&&!s&&this.j(t)}j(t){t===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Lc=class extends ws{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===m?void 0:t}},Nc=class extends ws{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==m)}},zc=class extends ws{constructor(t,r,i,s,o){super(t,r,i,s,o),this.type=5}_$AI(t,r=this){if((t=Vr(this,t,r,0)??m)===vr)return;const i=this._$AH,s=t===m&&i!==m||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==m&&(i===m||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,t):this._$AH.handleEvent(t)}},Uc=class{constructor(t,r,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Vr(this,t)}};const Zs=ui.litHtmlPolyfillSupport;Zs==null||Zs(Go,an),(ui.litHtmlVersions??(ui.litHtmlVersions=[])).push("3.3.2");const jc=(e,t,r)=>{const i=(r==null?void 0:r.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const o=(r==null?void 0:r.renderBefore)??null;i._$litPart$=s=new an(t.insertBefore(yi(),o),o,void 0,r??{})}return s._$AI(e),s};/**
17
17
  * @license
18
18
  * Copyright 2017 Google LLC
19
19
  * SPDX-License-Identifier: BSD-3-Clause
20
- */const rr=globalThis;let v=class extends Lr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const t=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=t.firstChild),t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Uc(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return vr}};var md;v._$litElement$=!0,v.finalized=!0,(md=rr.litElementHydrateSupport)==null||md.call(rr,{LitElement:v});const Js=rr.litElementPolyfillSupport;Js==null||Js({LitElement:v});(rr.litElementVersions??(rr.litElementVersions=[])).push("4.2.2");/**
20
+ */const rr=globalThis;let v=class extends Lr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const t=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=t.firstChild),t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=jc(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return vr}};var md;v._$litElement$=!0,v.finalized=!0,(md=rr.litElementHydrateSupport)==null||md.call(rr,{LitElement:v});const Js=rr.litElementPolyfillSupport;Js==null||Js({LitElement:v});(rr.litElementVersions??(rr.litElementVersions=[])).push("4.2.2");/**
21
21
  * @license
22
22
  * Copyright 2017 Google LLC
23
23
  * SPDX-License-Identifier: BSD-3-Clause
@@ -77,7 +77,7 @@
77
77
  * @license
78
78
  * Copyright 2017 Google LLC
79
79
  * SPDX-License-Identifier: BSD-3-Clause
80
- */function Ue({context:e}){return(t,r)=>{const i=new WeakMap;if(typeof r=="object")return{get(){return t.get.call(this)},set(s){return i.get(this).setValue(s),t.set.call(this,s)},init(s){return i.set(this,new Kn(this,{context:e,initialValue:s})),s}};{t.constructor.addInitializer((n=>{i.set(n,new Kn(n,{context:e}))}));const s=Object.getOwnPropertyDescriptor(t,r);let o;if(s===void 0){const n=new WeakMap;o={get(){return n.get(this)},set(h){i.get(this).setValue(h),n.set(this,h)},configurable:!0,enumerable:!0}}else{const n=s.set;o={...s,set(h){i.get(this).setValue(h),n==null||n.call(this,h)}}}return void Object.defineProperty(t,r,o)}}}/**
80
+ */function je({context:e}){return(t,r)=>{const i=new WeakMap;if(typeof r=="object")return{get(){return t.get.call(this)},set(s){return i.get(this).setValue(s),t.set.call(this,s)},init(s){return i.set(this,new Kn(this,{context:e,initialValue:s})),s}};{t.constructor.addInitializer((n=>{i.set(n,new Kn(n,{context:e}))}));const s=Object.getOwnPropertyDescriptor(t,r);let o;if(s===void 0){const n=new WeakMap;o={get(){return n.get(this)},set(h){i.get(this).setValue(h),n.set(this,h)},configurable:!0,enumerable:!0}}else{const n=s.set;o={...s,set(h){i.get(this).setValue(h),n==null||n.call(this,h)}}}return void Object.defineProperty(t,r,o)}}}/**
81
81
  * @license
82
82
  * Copyright 2022 Google LLC
83
83
  * SPDX-License-Identifier: BSD-3-Clause
@@ -2950,7 +2950,7 @@ body {
2950
2950
  .wrapper {
2951
2951
  display: block;
2952
2952
  }
2953
- `,qr);customElements.define("shadow-wrapper",nh);function Td(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Td(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Ld(){for(var e,t,r=0,i="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Td(e))&&(i&&(i+=" "),i+=t);return i}var cn="-",ah=e=>{let t=dh(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:s=>{let o=s.split(cn);return o[0]===""&&o.length!==1&&o.shift(),Nd(o,t)||lh(s)},getConflictingClassGroupIds:(s,o)=>{let n=r[s]||[];return o&&i[s]?[...n,...i[s]]:n}}},Nd=(e,t)=>{var n;if(e.length===0)return t.classGroupId;let r=e[0],i=t.nextPart.get(r),s=i?Nd(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;let o=e.join(cn);return(n=t.validators.find(({validator:h})=>h(o)))==null?void 0:n.classGroupId},Xn=/^\[(.+)\]$/,lh=e=>{if(Xn.test(e)){let t=Xn.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},dh=e=>{let{theme:t,prefix:r}=e,i={nextPart:new Map,validators:[]};return hh(Object.entries(e.classGroups),r).forEach(([s,o])=>{Wo(o,i,s,t)}),i},Wo=(e,t,r,i)=>{e.forEach(s=>{if(typeof s=="string"){let o=s===""?t:Zn(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(ch(s)){Wo(s(i),t,r,i);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,n])=>{Wo(n,Zn(t,o),r,i)})})},Zn=(e,t)=>{let r=e;return t.split(cn).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},ch=e=>e.isThemeGetter,hh=(e,t)=>t?e.map(([r,i])=>[r,i.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,n])=>[t+o,n])):s)]):e,uh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,i=new Map,s=(o,n)=>{r.set(o,n),t++,t>e&&(t=0,i=r,r=new Map)};return{get(o){let n=r.get(o);if(n!==void 0)return n;if((n=i.get(o))!==void 0)return s(o,n),n},set(o,n){r.has(o)?r.set(o,n):s(o,n)}}},zd="!",ph=e=>{let{separator:t,experimentalParseClassName:r}=e,i=t.length===1,s=t[0],o=t.length,n=h=>{let u=[],g=0,y=0,w;for(let S=0;S<h.length;S++){let k=h[S];if(g===0){if(k===s&&(i||h.slice(S,S+o)===t)){u.push(h.slice(y,S)),y=S+o;continue}if(k==="/"){w=S;continue}}k==="["?g++:k==="]"&&g--}let E=u.length===0?h:h.substring(y),C=E.startsWith(zd);return{modifiers:u,hasImportantModifier:C,baseClassName:C?E.substring(1):E,maybePostfixModifierPosition:w&&w>y?w-y:void 0}};return r?h=>r({className:h,parseClassName:n}):n},gh=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(i=>{i[0]==="["?(t.push(...r.sort(),i),r=[]):r.push(i)}),t.push(...r.sort()),t},mh=e=>({cache:uh(e.cacheSize),parseClassName:ph(e),...ah(e)}),bh=/\s+/,fh=(e,t)=>{let{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s}=t,o=[],n=e.trim().split(bh),h="";for(let u=n.length-1;u>=0;--u){let g=n[u],{modifiers:y,hasImportantModifier:w,baseClassName:E,maybePostfixModifierPosition:C}=r(g),S=!!C,k=i(S?E.substring(0,C):E);if(!k){if(!S){h=g+(h.length>0?" "+h:h);continue}if(k=i(E),!k){h=g+(h.length>0?" "+h:h);continue}S=!1}let O=gh(y).join(":"),A=w?O+zd:O,F=A+k;if(o.includes(F))continue;o.push(F);let V=s(k,S);for(let M=0;M<V.length;++M){let J=V[M];o.push(A+J)}h=g+(h.length>0?" "+h:h)}return h};function vh(){let e=0,t,r,i="";for(;e<arguments.length;)(t=arguments[e++])&&(r=jd(t))&&(i&&(i+=" "),i+=r);return i}var jd=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=jd(e[i]))&&(r&&(r+=" "),r+=t);return r};function yh(e,...t){let r,i,s,o=n;function n(u){return r=mh(t.reduce((g,y)=>y(g),e())),i=r.cache.get,s=r.cache.set,o=h,h(u)}function h(u){let g=i(u);if(g)return g;let y=fh(u,r);return s(u,y),y}return function(){return o(vh.apply(null,arguments))}}var Y=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ud=/^\[(?:([a-z-]+):)?(.+)\]$/i,wh=/^\d+\/\d+$/,_h=new Set(["px","full","screen"]),xh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$h=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ch=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Eh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ge=e=>jr(e)||_h.has(e)||wh.test(e),_e=e=>Gr(e,"length",Th),jr=e=>!!e&&!Number.isNaN(Number(e)),to=e=>Gr(e,"number",jr),ti=e=>!!e&&Number.isInteger(Number(e)),kh=e=>e.endsWith("%")&&jr(e.slice(0,-1)),z=e=>Ud.test(e),xe=e=>xh.test(e),Rh=new Set(["length","size","percentage"]),Ih=e=>Gr(e,Rh,Dd),Oh=e=>Gr(e,"position",Dd),Ah=new Set(["image","url"]),Ph=e=>Gr(e,Ah,Nh),Fh=e=>Gr(e,"",Lh),ei=()=>!0,Gr=(e,t,r)=>{let i=Ud.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):r(i[2]):!1},Th=e=>Sh.test(e)&&!$h.test(e),Dd=()=>!1,Lh=e=>Ch.test(e),Nh=e=>Eh.test(e),zh=yh(()=>{let e=Y("colors"),t=Y("spacing"),r=Y("blur"),i=Y("brightness"),s=Y("borderColor"),o=Y("borderRadius"),n=Y("borderSpacing"),h=Y("borderWidth"),u=Y("contrast"),g=Y("grayscale"),y=Y("hueRotate"),w=Y("invert"),E=Y("gap"),C=Y("gradientColorStops"),S=Y("gradientColorStopPositions"),k=Y("inset"),O=Y("margin"),A=Y("opacity"),F=Y("padding"),V=Y("saturate"),M=Y("scale"),J=Y("sepia"),it=Y("skew"),st=Y("space"),U=Y("translate"),vt=()=>["auto","contain","none"],Wt=()=>["auto","hidden","clip","visible","scroll"],ue=()=>["auto",z,t],P=()=>[z,t],Be=()=>["",ge,_e],Nt=()=>["auto",jr,z],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Kt=()=>["solid","dashed","dotted","double","none"],zt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],jt=()=>["start","end","center","between","around","evenly","stretch"],Ft=()=>["","0",z],we=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ot=()=>[jr,z];return{cacheSize:500,separator:":",theme:{colors:[ei],spacing:[ge,_e],blur:["none","",xe,z],brightness:ot(),borderColor:[e],borderRadius:["none","","full",xe,z],borderSpacing:P(),borderWidth:Be(),contrast:ot(),grayscale:Ft(),hueRotate:ot(),invert:Ft(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[kh,_e],inset:ue(),margin:ue(),opacity:ot(),padding:P(),saturate:ot(),scale:ot(),sepia:Ft(),skew:ot(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",z]}],container:["container"],columns:[{columns:[xe]}],"break-after":[{"break-after":we()}],"break-before":[{"break-before":we()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...pe(),z]}],overflow:[{overflow:Wt()}],"overflow-x":[{"overflow-x":Wt()}],"overflow-y":[{"overflow-y":Wt()}],overscroll:[{overscroll:vt()}],"overscroll-x":[{"overscroll-x":vt()}],"overscroll-y":[{"overscroll-y":vt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ti,z]}],basis:[{basis:ue()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",z]}],grow:[{grow:Ft()}],shrink:[{shrink:Ft()}],order:[{order:["first","last","none",ti,z]}],"grid-cols":[{"grid-cols":[ei]}],"col-start-end":[{col:["auto",{span:["full",ti,z]},z]}],"col-start":[{"col-start":Nt()}],"col-end":[{"col-end":Nt()}],"grid-rows":[{"grid-rows":[ei]}],"row-start-end":[{row:["auto",{span:[ti,z]},z]}],"row-start":[{"row-start":Nt()}],"row-end":[{"row-end":Nt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",z]}],gap:[{gap:[E]}],"gap-x":[{"gap-x":[E]}],"gap-y":[{"gap-y":[E]}],"justify-content":[{justify:["normal",...jt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...jt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...jt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[F]}],px:[{px:[F]}],py:[{py:[F]}],ps:[{ps:[F]}],pe:[{pe:[F]}],pt:[{pt:[F]}],pr:[{pr:[F]}],pb:[{pb:[F]}],pl:[{pl:[F]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[st]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[st]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",z,t]}],"min-w":[{"min-w":[z,t,"min","max","fit"]}],"max-w":[{"max-w":[z,t,"none","full","min","max","fit","prose",{screen:[xe]},xe]}],h:[{h:[z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xe,_e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",to]}],"font-family":[{font:[ei]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",z]}],"line-clamp":[{"line-clamp":["none",jr,to]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ge,z]}],"list-image":[{"list-image":["none",z]}],"list-style-type":[{list:["none","disc","decimal",z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Kt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ge,_e]}],"underline-offset":[{"underline-offset":["auto",ge,z]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...pe(),Oh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ih]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ph]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...Kt(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:Kt()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Kt()]}],"outline-offset":[{"outline-offset":[ge,z]}],"outline-w":[{outline:[ge,_e]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[ge,_e]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xe,Fh]}],"shadow-color":[{shadow:[ei]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...zt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":zt()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",xe,z]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[w]}],saturate:[{saturate:[V]}],sepia:[{sepia:[J]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",z]}],duration:[{duration:ot()}],ease:[{ease:["linear","in","out","in-out",z]}],delay:[{delay:ot()}],animate:[{animate:["none","spin","ping","pulse","bounce",z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[ti,z]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[it]}],"skew-y":[{"skew-y":[it]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",z]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ge,_e,to]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function b(...e){return zh(Ld(e))}var jh=class extends Od{constructor(){super(...arguments),this.prevData={}}render(e){return m}update(e,[t]){var r;this.element!==e.element&&(this.element=e.element),this.host=((r=e.options)==null?void 0:r.host)||this.element,this.apply(t),this.groom(t),this.prevData={...t}}apply(e){if(!e)return;let{prevData:t,element:r}=this;for(let i in e){let s=e[i];s!==t[i]&&(r[i]=s)}}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t)(!e||!(i in e)&&r[i]===t[i])&&(r[i]=void 0)}},Uh=class extends jh{constructor(){super(...arguments),this.eventData={}}apply(e){if(e)for(let t in e){let r=e[t];r!==this.eventData[t]&&this.applyEvent(t,r)}}applyEvent(e,t){let{prevData:r,element:i}=this;this.eventData[e]=t,r[e]&&i.removeEventListener(e,this,t),i.addEventListener(e,this,t)}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t)(!e||!(i in e)&&r[i]===t[i])&&this.groomEvent(i,t[i])}groomEvent(e,t){let{element:r}=this;delete this.eventData[e],r.removeEventListener(e,this,t)}handleEvent(e){let t=this.eventData[e.type];typeof t=="function"?t.call(this.host,e):t.handleEvent(e)}disconnected(){let{eventData:e,element:t}=this;for(let r in e){let i=r.slice(1),s=e[r];t.removeEventListener(i,this,s)}}reconnected(){let{eventData:e,element:t}=this;for(let r in e){let i=r.slice(1),s=e[r];t.addEventListener(i,this,s)}}},wt=_s(class extends Uh{apply(e){if(!e)return;let{prevData:t,element:r}=this;for(let i in e){let s=e[i];if(s===t[i])continue;let o=i.slice(1);switch(i[0]){case"@":this.eventData[o]=s,this.applyEvent(o,s);break;case".":r[o]=s;break;case"?":s?r.setAttribute(o,""):r.removeAttribute(o);break;default:s==null?r.removeAttribute(i):r.setAttribute(i,String(s));break}}}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t){let s=i.slice(1);if(!e||!(i in e)&&r[s]===t[i])switch(i[0]){case"@":this.groomEvent(s,t[i]);break;case".":r[s]=void 0;break;case"?":r.removeAttribute(s);break;default:r.removeAttribute(i);break}}}}),_i={base:[""],item:["rtg-border-b-accordion-item-width-border rtg-border-b-accordion-item-color-border"],trigger:["rtg-flex rtg-flex-1 rtg-gap-accordion-trigger-space-gap rtg-justify-between rtg-items-start","rtg-py-accordion-trigger-space-py","rtg-w-accordion-trigger-space-w","rtg-rounded-accordion-trigger-radius rtg-outline-none","rtg-text-accordion-trigger-font rtg-font-accordion-trigger-font-weight rtg-text-left","rtg-transition-all","hover:rtg-underline","focus-visible:rtg-border-accordion-trigger-width-border-focus focus-visible:rtg-border-accordion-trigger-color-border-focus","focus-visible:rtg-ring-accordion-trigger-width-ring-focus focus-visible:rtg-ring-accordion-trigger-color-ring-focus","disabled:rtg-pointer-events-none disabled:rtg-opacity-50","[&[data-state=open]>svg]:rtg-rotate-180"],chevron:["rtg-shrink-0","rtg-size-accordion-trigger-icon-space-size","rtg-text-accordion-trigger-icon-color-text","rtg-translate-y-0.5 rtg-transition-transform rtg-duration-200","rtg-pointer-events-none"],content:["rtg-overflow-hidden","rtg-text-accordion-content-font rtg-font-accordion-content-font-weight","data-[state=closed]:rtg-h-accordion-content-space-h-closed","data-[state=closed]:rtg-animate-accordion-content-animate-closed","data-[state=open]:rtg-animate-accordion-content-animate-open","data-[state=open]:rtg-h-fit","[&>div]:rtg-pt-accordion-content-div-space-pt [&>div]:rtg-pb-accordion-content-div-space-pb"]},Ko=class extends _{constructor(...e){super(...e),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof Ur);)e=e.parentElement;return e}get _item(){let e=this.parentElement;for(;e&&!(e instanceof ne);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var e;return d`
2953
+ `,qr);customElements.define("shadow-wrapper",nh);function Td(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Td(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Ld(){for(var e,t,r=0,i="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Td(e))&&(i&&(i+=" "),i+=t);return i}var cn="-",ah=e=>{let t=dh(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:s=>{let o=s.split(cn);return o[0]===""&&o.length!==1&&o.shift(),Nd(o,t)||lh(s)},getConflictingClassGroupIds:(s,o)=>{let n=r[s]||[];return o&&i[s]?[...n,...i[s]]:n}}},Nd=(e,t)=>{var n;if(e.length===0)return t.classGroupId;let r=e[0],i=t.nextPart.get(r),s=i?Nd(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;let o=e.join(cn);return(n=t.validators.find(({validator:h})=>h(o)))==null?void 0:n.classGroupId},Xn=/^\[(.+)\]$/,lh=e=>{if(Xn.test(e)){let t=Xn.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},dh=e=>{let{theme:t,prefix:r}=e,i={nextPart:new Map,validators:[]};return hh(Object.entries(e.classGroups),r).forEach(([s,o])=>{Wo(o,i,s,t)}),i},Wo=(e,t,r,i)=>{e.forEach(s=>{if(typeof s=="string"){let o=s===""?t:Zn(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(ch(s)){Wo(s(i),t,r,i);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,n])=>{Wo(n,Zn(t,o),r,i)})})},Zn=(e,t)=>{let r=e;return t.split(cn).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},ch=e=>e.isThemeGetter,hh=(e,t)=>t?e.map(([r,i])=>[r,i.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,n])=>[t+o,n])):s)]):e,uh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,i=new Map,s=(o,n)=>{r.set(o,n),t++,t>e&&(t=0,i=r,r=new Map)};return{get(o){let n=r.get(o);if(n!==void 0)return n;if((n=i.get(o))!==void 0)return s(o,n),n},set(o,n){r.has(o)?r.set(o,n):s(o,n)}}},zd="!",ph=e=>{let{separator:t,experimentalParseClassName:r}=e,i=t.length===1,s=t[0],o=t.length,n=h=>{let u=[],g=0,y=0,w;for(let S=0;S<h.length;S++){let k=h[S];if(g===0){if(k===s&&(i||h.slice(S,S+o)===t)){u.push(h.slice(y,S)),y=S+o;continue}if(k==="/"){w=S;continue}}k==="["?g++:k==="]"&&g--}let E=u.length===0?h:h.substring(y),C=E.startsWith(zd);return{modifiers:u,hasImportantModifier:C,baseClassName:C?E.substring(1):E,maybePostfixModifierPosition:w&&w>y?w-y:void 0}};return r?h=>r({className:h,parseClassName:n}):n},gh=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(i=>{i[0]==="["?(t.push(...r.sort(),i),r=[]):r.push(i)}),t.push(...r.sort()),t},mh=e=>({cache:uh(e.cacheSize),parseClassName:ph(e),...ah(e)}),bh=/\s+/,fh=(e,t)=>{let{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s}=t,o=[],n=e.trim().split(bh),h="";for(let u=n.length-1;u>=0;--u){let g=n[u],{modifiers:y,hasImportantModifier:w,baseClassName:E,maybePostfixModifierPosition:C}=r(g),S=!!C,k=i(S?E.substring(0,C):E);if(!k){if(!S){h=g+(h.length>0?" "+h:h);continue}if(k=i(E),!k){h=g+(h.length>0?" "+h:h);continue}S=!1}let O=gh(y).join(":"),A=w?O+zd:O,F=A+k;if(o.includes(F))continue;o.push(F);let V=s(k,S);for(let M=0;M<V.length;++M){let Q=V[M];o.push(A+Q)}h=g+(h.length>0?" "+h:h)}return h};function vh(){let e=0,t,r,i="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ud(t))&&(i&&(i+=" "),i+=r);return i}var Ud=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=Ud(e[i]))&&(r&&(r+=" "),r+=t);return r};function yh(e,...t){let r,i,s,o=n;function n(u){return r=mh(t.reduce((g,y)=>y(g),e())),i=r.cache.get,s=r.cache.set,o=h,h(u)}function h(u){let g=i(u);if(g)return g;let y=fh(u,r);return s(u,y),y}return function(){return o(vh.apply(null,arguments))}}var Y=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},jd=/^\[(?:([a-z-]+):)?(.+)\]$/i,wh=/^\d+\/\d+$/,_h=new Set(["px","full","screen"]),xh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$h=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ch=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Eh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ge=e=>Ur(e)||_h.has(e)||wh.test(e),_e=e=>Gr(e,"length",Th),Ur=e=>!!e&&!Number.isNaN(Number(e)),to=e=>Gr(e,"number",Ur),ti=e=>!!e&&Number.isInteger(Number(e)),kh=e=>e.endsWith("%")&&Ur(e.slice(0,-1)),z=e=>jd.test(e),xe=e=>xh.test(e),Rh=new Set(["length","size","percentage"]),Ih=e=>Gr(e,Rh,Dd),Oh=e=>Gr(e,"position",Dd),Ah=new Set(["image","url"]),Ph=e=>Gr(e,Ah,Nh),Fh=e=>Gr(e,"",Lh),ei=()=>!0,Gr=(e,t,r)=>{let i=jd.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):r(i[2]):!1},Th=e=>Sh.test(e)&&!$h.test(e),Dd=()=>!1,Lh=e=>Ch.test(e),Nh=e=>Eh.test(e),zh=yh(()=>{let e=Y("colors"),t=Y("spacing"),r=Y("blur"),i=Y("brightness"),s=Y("borderColor"),o=Y("borderRadius"),n=Y("borderSpacing"),h=Y("borderWidth"),u=Y("contrast"),g=Y("grayscale"),y=Y("hueRotate"),w=Y("invert"),E=Y("gap"),C=Y("gradientColorStops"),S=Y("gradientColorStopPositions"),k=Y("inset"),O=Y("margin"),A=Y("opacity"),F=Y("padding"),V=Y("saturate"),M=Y("scale"),Q=Y("sepia"),it=Y("skew"),st=Y("space"),j=Y("translate"),vt=()=>["auto","contain","none"],Wt=()=>["auto","hidden","clip","visible","scroll"],ue=()=>["auto",z,t],P=()=>[z,t],Be=()=>["",ge,_e],Nt=()=>["auto",Ur,z],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Kt=()=>["solid","dashed","dotted","double","none"],zt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ut=()=>["start","end","center","between","around","evenly","stretch"],Ft=()=>["","0",z],we=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ot=()=>[Ur,z];return{cacheSize:500,separator:":",theme:{colors:[ei],spacing:[ge,_e],blur:["none","",xe,z],brightness:ot(),borderColor:[e],borderRadius:["none","","full",xe,z],borderSpacing:P(),borderWidth:Be(),contrast:ot(),grayscale:Ft(),hueRotate:ot(),invert:Ft(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[kh,_e],inset:ue(),margin:ue(),opacity:ot(),padding:P(),saturate:ot(),scale:ot(),sepia:Ft(),skew:ot(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",z]}],container:["container"],columns:[{columns:[xe]}],"break-after":[{"break-after":we()}],"break-before":[{"break-before":we()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...pe(),z]}],overflow:[{overflow:Wt()}],"overflow-x":[{"overflow-x":Wt()}],"overflow-y":[{"overflow-y":Wt()}],overscroll:[{overscroll:vt()}],"overscroll-x":[{"overscroll-x":vt()}],"overscroll-y":[{"overscroll-y":vt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ti,z]}],basis:[{basis:ue()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",z]}],grow:[{grow:Ft()}],shrink:[{shrink:Ft()}],order:[{order:["first","last","none",ti,z]}],"grid-cols":[{"grid-cols":[ei]}],"col-start-end":[{col:["auto",{span:["full",ti,z]},z]}],"col-start":[{"col-start":Nt()}],"col-end":[{"col-end":Nt()}],"grid-rows":[{"grid-rows":[ei]}],"row-start-end":[{row:["auto",{span:[ti,z]},z]}],"row-start":[{"row-start":Nt()}],"row-end":[{"row-end":Nt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",z]}],gap:[{gap:[E]}],"gap-x":[{"gap-x":[E]}],"gap-y":[{"gap-y":[E]}],"justify-content":[{justify:["normal",...Ut()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ut(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ut(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[F]}],px:[{px:[F]}],py:[{py:[F]}],ps:[{ps:[F]}],pe:[{pe:[F]}],pt:[{pt:[F]}],pr:[{pr:[F]}],pb:[{pb:[F]}],pl:[{pl:[F]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[st]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[st]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",z,t]}],"min-w":[{"min-w":[z,t,"min","max","fit"]}],"max-w":[{"max-w":[z,t,"none","full","min","max","fit","prose",{screen:[xe]},xe]}],h:[{h:[z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xe,_e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",to]}],"font-family":[{font:[ei]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",z]}],"line-clamp":[{"line-clamp":["none",Ur,to]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ge,z]}],"list-image":[{"list-image":["none",z]}],"list-style-type":[{list:["none","disc","decimal",z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Kt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ge,_e]}],"underline-offset":[{"underline-offset":["auto",ge,z]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...pe(),Oh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ih]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ph]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...Kt(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:Kt()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Kt()]}],"outline-offset":[{"outline-offset":[ge,z]}],"outline-w":[{outline:[ge,_e]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[ge,_e]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xe,Fh]}],"shadow-color":[{shadow:[ei]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...zt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":zt()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",xe,z]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[w]}],saturate:[{saturate:[V]}],sepia:[{sepia:[Q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",z]}],duration:[{duration:ot()}],ease:[{ease:["linear","in","out","in-out",z]}],delay:[{delay:ot()}],animate:[{animate:["none","spin","ping","pulse","bounce",z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[ti,z]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[it]}],"skew-y":[{"skew-y":[it]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",z]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ge,_e,to]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function b(...e){return zh(Ld(e))}var Uh=class extends Od{constructor(){super(...arguments),this.prevData={}}render(e){return m}update(e,[t]){var r;this.element!==e.element&&(this.element=e.element),this.host=((r=e.options)==null?void 0:r.host)||this.element,this.apply(t),this.groom(t),this.prevData={...t}}apply(e){if(!e)return;let{prevData:t,element:r}=this;for(let i in e){let s=e[i];s!==t[i]&&(r[i]=s)}}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t)(!e||!(i in e)&&r[i]===t[i])&&(r[i]=void 0)}},jh=class extends Uh{constructor(){super(...arguments),this.eventData={}}apply(e){if(e)for(let t in e){let r=e[t];r!==this.eventData[t]&&this.applyEvent(t,r)}}applyEvent(e,t){let{prevData:r,element:i}=this;this.eventData[e]=t,r[e]&&i.removeEventListener(e,this,t),i.addEventListener(e,this,t)}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t)(!e||!(i in e)&&r[i]===t[i])&&this.groomEvent(i,t[i])}groomEvent(e,t){let{element:r}=this;delete this.eventData[e],r.removeEventListener(e,this,t)}handleEvent(e){let t=this.eventData[e.type];typeof t=="function"?t.call(this.host,e):t.handleEvent(e)}disconnected(){let{eventData:e,element:t}=this;for(let r in e){let i=r.slice(1),s=e[r];t.removeEventListener(i,this,s)}}reconnected(){let{eventData:e,element:t}=this;for(let r in e){let i=r.slice(1),s=e[r];t.addEventListener(i,this,s)}}},wt=_s(class extends jh{apply(e){if(!e)return;let{prevData:t,element:r}=this;for(let i in e){let s=e[i];if(s===t[i])continue;let o=i.slice(1);switch(i[0]){case"@":this.eventData[o]=s,this.applyEvent(o,s);break;case".":r[o]=s;break;case"?":s?r.setAttribute(o,""):r.removeAttribute(o);break;default:s==null?r.removeAttribute(i):r.setAttribute(i,String(s));break}}}groom(e){let{prevData:t,element:r}=this;if(t)for(let i in t){let s=i.slice(1);if(!e||!(i in e)&&r[s]===t[i])switch(i[0]){case"@":this.groomEvent(s,t[i]);break;case".":r[s]=void 0;break;case"?":r.removeAttribute(s);break;default:r.removeAttribute(i);break}}}}),_i={base:[""],item:["rtg-border-b-accordion-item-width-border rtg-border-b-accordion-item-color-border"],trigger:["rtg-flex rtg-flex-1 rtg-gap-accordion-trigger-space-gap rtg-justify-between rtg-items-start","rtg-py-accordion-trigger-space-py","rtg-w-accordion-trigger-space-w","rtg-rounded-accordion-trigger-radius rtg-outline-none","rtg-text-accordion-trigger-font rtg-font-accordion-trigger-font-weight rtg-text-left","rtg-transition-all","hover:rtg-underline","focus-visible:rtg-border-accordion-trigger-width-border-focus focus-visible:rtg-border-accordion-trigger-color-border-focus","focus-visible:rtg-ring-accordion-trigger-width-ring-focus focus-visible:rtg-ring-accordion-trigger-color-ring-focus","disabled:rtg-pointer-events-none disabled:rtg-opacity-50","[&[data-state=open]>svg]:rtg-rotate-180"],chevron:["rtg-shrink-0","rtg-size-accordion-trigger-icon-space-size","rtg-text-accordion-trigger-icon-color-text","rtg-translate-y-0.5 rtg-transition-transform rtg-duration-200","rtg-pointer-events-none"],content:["rtg-overflow-hidden","rtg-text-accordion-content-font rtg-font-accordion-content-font-weight","data-[state=closed]:rtg-h-accordion-content-space-h-closed","data-[state=closed]:rtg-animate-accordion-content-animate-closed","data-[state=open]:rtg-animate-accordion-content-animate-open","data-[state=open]:rtg-h-fit","[&>div]:rtg-pt-accordion-content-div-space-pt [&>div]:rtg-pb-accordion-content-div-space-pb"]},Ko=class extends _{constructor(...e){super(...e),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof jr);)e=e.parentElement;return e}get _item(){let e=this.parentElement;for(;e&&!(e instanceof ne);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var e;return d`
2954
2954
  <div
2955
2955
  part="accordion-content"
2956
2956
  role="region"
@@ -2961,7 +2961,7 @@ body {
2961
2961
  >
2962
2962
  <div>${ln(((e=this.textContent)==null?void 0:e.trim())||"")}</div>
2963
2963
  </div>
2964
- `}};Ko=l([p("rtg-accordion-content")],Ko);var ne=class extends _{constructor(...e){super(...e),this.value="",this.tabindex=0,this._initialChildren=[],this._onClick=t=>{let r=t.target.closest("rtg-accordion-trigger");!r||!this._accordion||(t.preventDefault(),t.stopPropagation(),this._accordion.raiseEvent(this.value),r.requestUpdate(),setTimeout(()=>this.requestUpdate(),0))},this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof Ur);)e=e.parentElement;return e}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._initialChildren=this.filterChildren(),this.addEventListener("click",this._onClick),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeEventListener("click",this._onClick),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}filterChildren(){return Array.from(this.children).filter(e=>e instanceof Yo||e instanceof Ko)}render(){var r;let e=(r=this._accordion)==null?void 0:r.selectedItems.includes(this.value),t=this._initialChildren.length?this._initialChildren:this.filterChildren();return d`
2964
+ `}};Ko=l([p("rtg-accordion-content")],Ko);var ne=class extends _{constructor(...e){super(...e),this.value="",this.tabindex=0,this._initialChildren=[],this._onClick=t=>{let r=t.target.closest("rtg-accordion-trigger");!r||!this._accordion||(t.preventDefault(),t.stopPropagation(),this._accordion.raiseEvent(this.value),r.requestUpdate(),setTimeout(()=>this.requestUpdate(),0))},this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof jr);)e=e.parentElement;return e}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._initialChildren=this.filterChildren(),this.addEventListener("click",this._onClick),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeEventListener("click",this._onClick),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}filterChildren(){return Array.from(this.children).filter(e=>e instanceof Yo||e instanceof Ko)}render(){var r;let e=(r=this._accordion)==null?void 0:r.selectedItems.includes(this.value),t=this._initialChildren.length?this._initialChildren:this.filterChildren();return d`
2965
2965
  <div
2966
2966
  data-state=${e?"open":"closed"}
2967
2967
  class="${b(_i.item,this.className)}"
@@ -2972,7 +2972,7 @@ body {
2972
2972
  >
2973
2973
  ${t}
2974
2974
  </div>
2975
- `}};l([a({type:String}),c("design:type",Object)],ne.prototype,"value",void 0),l([a({type:Number}),c("design:type",Object)],ne.prototype,"tabindex",void 0),ne=l([p("rtg-accordion-item")],ne);var Yo=class extends _{get _item(){let e=this.parentElement;for(;e&&!(e instanceof ne);)e=e.parentElement;return e}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof Ur);)e=e.parentElement;return e}getAttributesToExclude(){return["value","defaultValue"]}createRenderRoot(){return this}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var t;let e=this.hasActiveState();return d`
2975
+ `}};l([a({type:String}),c("design:type",Object)],ne.prototype,"value",void 0),l([a({type:Number}),c("design:type",Object)],ne.prototype,"tabindex",void 0),ne=l([p("rtg-accordion-item")],ne);var Yo=class extends _{get _item(){let e=this.parentElement;for(;e&&!(e instanceof ne);)e=e.parentElement;return e}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof jr);)e=e.parentElement;return e}getAttributesToExclude(){return["value","defaultValue"]}createRenderRoot(){return this}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var t;let e=this.hasActiveState();return d`
2976
2976
  <button
2977
2977
  type="button"
2978
2978
  part="accordion-trigger"
@@ -3001,7 +3001,7 @@ body {
3001
3001
  <path d="m6 9 6 6 6-6" />
3002
3002
  </svg>
3003
3003
  </button>
3004
- `}};Yo=l([p("rtg-accordion-trigger")],Yo);var Pe=(function(e){return e.MULTIPLE="multiple",e.SINGLE="single",e})({}),Jn,Ur=class extends _{constructor(...e){super(...e),this.type=Pe.MULTIPLE,this.selectedItems=[],this._initialChildren=[]}getAttributesToExclude(){return["variant","data-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._initialChildren=Array.from(this.children).filter(e=>e instanceof ne)}willUpdate(e){e.has("type")&&(this.type===Pe.SINGLE&&this.selectedItems.length>1&&(this.selectedItems=this.selectedItems.slice(0,1)),this._initialChildren.forEach(t=>{t instanceof ne&&t.requestUpdate()}))}updated(e){e.has("type")&&this._initialChildren.forEach(t=>{t instanceof ne&&t.requestUpdate()})}setSelectedItems(e){let t=this.selectedItems.indexOf(e);if(t>-1)if(this.type===Pe.SINGLE)this.selectedItems=[];else if(this.type===Pe.MULTIPLE)this.selectedItems.splice(t,1);else throw Error("Invalid accordion type");else if(this.type===Pe.SINGLE)this.selectedItems=[e];else if(this.type===Pe.MULTIPLE)this.selectedItems.push(e);else throw Error("Invalid accordion type")}raiseEvent(e){this.setSelectedItems(e),this.dispatchEvent(new CustomEvent("clicked-accordion",{bubbles:!0,composed:!0,detail:{selectedItems:this.selectedItems}}))}render(){let e=this._initialChildren.length?this._initialChildren:Array.from(this.children).filter(t=>t instanceof ne);return d`
3004
+ `}};Yo=l([p("rtg-accordion-trigger")],Yo);var Pe=(function(e){return e.MULTIPLE="multiple",e.SINGLE="single",e})({}),Jn,jr=class extends _{constructor(...e){super(...e),this.type=Pe.MULTIPLE,this.selectedItems=[],this._initialChildren=[]}getAttributesToExclude(){return["variant","data-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._initialChildren=Array.from(this.children).filter(e=>e instanceof ne)}willUpdate(e){e.has("type")&&(this.type===Pe.SINGLE&&this.selectedItems.length>1&&(this.selectedItems=this.selectedItems.slice(0,1)),this._initialChildren.forEach(t=>{t instanceof ne&&t.requestUpdate()}))}updated(e){e.has("type")&&this._initialChildren.forEach(t=>{t instanceof ne&&t.requestUpdate()})}setSelectedItems(e){let t=this.selectedItems.indexOf(e);if(t>-1)if(this.type===Pe.SINGLE)this.selectedItems=[];else if(this.type===Pe.MULTIPLE)this.selectedItems.splice(t,1);else throw Error("Invalid accordion type");else if(this.type===Pe.SINGLE)this.selectedItems=[e];else if(this.type===Pe.MULTIPLE)this.selectedItems.push(e);else throw Error("Invalid accordion type")}raiseEvent(e){this.setSelectedItems(e),this.dispatchEvent(new CustomEvent("clicked-accordion",{bubbles:!0,composed:!0,detail:{selectedItems:this.selectedItems}}))}render(){let e=this._initialChildren.length?this._initialChildren:Array.from(this.children).filter(t=>t instanceof ne);return d`
3005
3005
  <div
3006
3006
  data-orientation="vertical"
3007
3007
  ${wt(this.getFilteredAttributes())}
@@ -3010,7 +3010,7 @@ body {
3010
3010
  >
3011
3011
  ${e}
3012
3012
  </div>
3013
- `}};l([a({type:String}),c("design:type",typeof(Jn=Pe!==void 0&&Pe)=="function"?Jn:Object)],Ur.prototype,"type",void 0),Ur=l([p("rtg-accordion")],Ur);var eo=class extends v{constructor(...e){super(...e),this.variant="default"}get _rootSlot(){return this.querySelector('[data-slot="alert"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert" data-variant=${this.variant}></div>`}};l([a({type:String}),c("design:type",Object)],eo.prototype,"variant",void 0),eo=l([p("rtg-alert")],eo);var Qn=class extends v{get _titleSlot(){return this.querySelector('[data-slot="alert-title"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._titleSlot&&((r=this._titleSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert-title"></div>`}};Qn=l([p("rtg-alert-title")],Qn);var ta=class extends v{get _descriptionSlot(){return this.querySelector('[data-slot="alert-description"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._descriptionSlot&&((r=this._descriptionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert-description"></div>`}};ta=l([p("rtg-alert-description")],ta);var ea=class extends v{get _actionSlot(){return this.querySelector('[data-slot="alert-action"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._actionSlot&&((r=this._actionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert-action"></div>`}};ea=l([p("rtg-alert-action")],ea);var ra={host:["rtg-block rtg-relative rtg-w-full"],self:["rtg-absolute rtg-inset-0"]},ro=class extends v{constructor(...e){super(...e),this.ratio=1/1,this._userClass="",this._userStyle=""}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._userClass=this.getAttribute("class")??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=b(this.className,ra.host)}updated(e){e.has("ratio")&&(this.style.paddingBottom=this.ratio>0?`${100/this.ratio}%`:"0%")}firstUpdated(){var t;this.style.paddingBottom=this.ratio>0?`${100/this.ratio}%`:"0%";let e=this.querySelector(".aspect-ratio");if(e){if(this._userClass&&(e.className=b(e.className,this._userClass)),this._userStyle){let r=(t=e.getAttribute("style"))==null?void 0:t.trim(),i=this._userStyle.trim();e.setAttribute("style",[r,i].filter(Boolean).join("; "))}Array.from(this.childNodes).forEach(r=>{r!==e&&e.appendChild(r)})}}render(){return d`
3013
+ `}};l([a({type:String}),c("design:type",typeof(Jn=Pe!==void 0&&Pe)=="function"?Jn:Object)],jr.prototype,"type",void 0),jr=l([p("rtg-accordion")],jr);var eo=class extends v{constructor(...e){super(...e),this.variant="default"}get _rootSlot(){return this.querySelector('[data-slot="alert"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert" data-variant=${this.variant}></div>`}};l([a({type:String}),c("design:type",Object)],eo.prototype,"variant",void 0),eo=l([p("rtg-alert")],eo);var Qn=class extends v{get _titleSlot(){return this.querySelector('[data-slot="alert-title"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._titleSlot&&((r=this._titleSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert-title"></div>`}};Qn=l([p("rtg-alert-title")],Qn);var ta=class extends v{get _descriptionSlot(){return this.querySelector('[data-slot="alert-description"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._descriptionSlot&&((r=this._descriptionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert-description"></div>`}};ta=l([p("rtg-alert-description")],ta);var ea=class extends v{get _actionSlot(){return this.querySelector('[data-slot="alert-action"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._actionSlot&&((r=this._actionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="alert-action"></div>`}};ea=l([p("rtg-alert-action")],ea);var ra={host:["rtg-block rtg-relative rtg-w-full"],self:["rtg-absolute rtg-inset-0"]},ro=class extends v{constructor(...e){super(...e),this.ratio=1/1,this._userClass="",this._userStyle=""}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._userClass=this.getAttribute("class")??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=b(this.className,ra.host)}updated(e){e.has("ratio")&&(this.style.paddingBottom=this.ratio>0?`${100/this.ratio}%`:"0%")}firstUpdated(){var t;this.style.paddingBottom=this.ratio>0?`${100/this.ratio}%`:"0%";let e=this.querySelector(".aspect-ratio");if(e){if(this._userClass&&(e.className=b(e.className,this._userClass)),this._userStyle){let r=(t=e.getAttribute("style"))==null?void 0:t.trim(),i=this._userStyle.trim();e.setAttribute("style",[r,i].filter(Boolean).join("; "))}Array.from(this.childNodes).forEach(r=>{r!==e&&e.appendChild(r)})}}render(){return d`
3014
3014
  <div class="${b("aspect-ratio",ra.self)}"></div>
3015
3015
  `}};l([a({type:Number,reflect:!0}),c("design:type",Object)],ro.prototype,"ratio",void 0),ro=l([p("rtg-aspect-ratio")],ro);var ri=class extends v{constructor(...e){super(...e),this.size="default",this._imageLoaded=!1,this._imageError=!1}get _rootSlot(){return this.querySelector('[data-slot="avatar"]')}get _avatarImageChild(){return this.querySelector("rtg-avatar-image")}get _avatarFallbackChild(){return this.querySelector("rtg-avatar-fallback")}_syncChildren(){let e=this._imageError||!this._imageLoaded;this._avatarImageChild&&(this._avatarImageChild.style.display=e?"none":""),this._avatarFallbackChild&&(this._avatarFallbackChild.style.display=e?"":"none")}_onImageLoad(){this._imageLoaded=!0,this._imageError=!1,this._syncChildren()}_onImageError(){this._imageLoaded=!1,this._imageError=!0,this._syncChildren()}connectedCallback(){super.connectedCallback(),this.addEventListener("rtg-avatar:image-load",this._onImageLoad),this.addEventListener("rtg-avatar:image-error",this._onImageError)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("rtg-avatar:image-load",this._onImageLoad),this.removeEventListener("rtg-avatar:image-error",this._onImageError)}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<span data-slot="avatar" data-size=${this.size}></span>`}};l([a({type:String}),c("design:type",Object)],ri.prototype,"size",void 0),l([x(),c("design:type",Object)],ri.prototype,"_imageLoaded",void 0),l([x(),c("design:type",Object)],ri.prototype,"_imageError",void 0),ri=l([p("rtg-avatar")],ri);var Ii=class extends v{_onLoad(){this.dispatchEvent(new CustomEvent("rtg-avatar:image-load",{bubbles:!0,composed:!0}))}_onError(){this.dispatchEvent(new CustomEvent("rtg-avatar:image-error",{bubbles:!0,composed:!0}))}createRenderRoot(){return this}render(){return d`
3016
3016
  <img
@@ -3234,9 +3234,9 @@ body {
3234
3234
  <tbody class=${b("calendar-weeks",q.weeks)}>
3235
3235
  ${Array.from({length:Math.ceil(o.length/7)},(g,y)=>d`
3236
3236
  <tr class=${b("calendar-week",q.week)}>
3237
- ${o.slice(y*7,(y+1)*7).map((w,E)=>{var st,U,vt;let C=new Date(this.currentDate.getFullYear(),w.month,Number(w.day)),S=C.toDateString()===new Date().toDateString(),k=this.mode==="range"&&C.toDateString()===((st=this.selectedStartDate)==null?void 0:st.toDateString()),O=this.mode==="range"&&this.isDayInRange(C,!0),A=this.mode==="range"&&C.toDateString()===((U=this.selectedEndDate)==null?void 0:U.toDateString()),F=this.mode==="single"&&C.toDateString()===((vt=this.selectedStartDate)==null?void 0:vt.toDateString()),V=F||k||O||A,M=E===0,J=E===6,it=S?"Today, ":"";return it+=Mh(C),it+=V?", selected":"",d`
3237
+ ${o.slice(y*7,(y+1)*7).map((w,E)=>{var st,j,vt;let C=new Date(this.currentDate.getFullYear(),w.month,Number(w.day)),S=C.toDateString()===new Date().toDateString(),k=this.mode==="range"&&C.toDateString()===((st=this.selectedStartDate)==null?void 0:st.toDateString()),O=this.mode==="range"&&this.isDayInRange(C,!0),A=this.mode==="range"&&C.toDateString()===((j=this.selectedEndDate)==null?void 0:j.toDateString()),F=this.mode==="single"&&C.toDateString()===((vt=this.selectedStartDate)==null?void 0:vt.toDateString()),V=F||k||O||A,M=E===0,Q=E===6,it=S?"Today, ":"";return it+=Mh(C),it+=V?", selected":"",d`
3238
3238
  <td
3239
- class=${b("calendar-day",q.day.base,S&&!V&&q.day.today,V&&q.day.selected.common,F&&q.day.selected.single,k&&q.day.selected.range.start,O&&q.day.selected.range.middle,A&&q.day.selected.range.end,M&&q.day.index.first,J&&q.day.index.last,!1)}
3239
+ class=${b("calendar-day",q.day.base,S&&!V&&q.day.today,V&&q.day.selected.common,F&&q.day.selected.single,k&&q.day.selected.range.start,O&&q.day.selected.range.middle,A&&q.day.selected.range.end,M&&q.day.index.first,Q&&q.day.index.last,!1)}
3240
3240
  role="gridcell"
3241
3241
  data-day=${C.toISOString().slice(0,10)}
3242
3242
  ?data-disabled=${void 0}
@@ -3526,7 +3526,7 @@ body {
3526
3526
  ${this.renderFilteredItems()}
3527
3527
  </div>
3528
3528
  </div>
3529
- `}};l([x(),c("design:type",Object)],Qe.prototype,"searchKey",void 0),l([x(),c("design:type",Object)],Qe.prototype,"focusedIndex",void 0),l([x(),c("design:type",Object)],Qe.prototype,"selectedValue",void 0),l([x(),c("design:type",Boolean)],Qe.prototype,"isOpen",void 0),Qe=l([p("rtg-combo-box-group")],Qe);var $a,Ut=class extends _{constructor(...e){super(...e),this.value="",this.key="",this.tabindex=0,this.isSelected=!1,this.isFocus=!1,this.class="",this.selectItemIndex=-1,this.onSelect=(t,r)=>{},this.onMouseOver=(t,r)=>{},this.handleClick=t=>{this.onSelect(this.value,this.selectItemIndex),t.stopPropagation();let r=new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.value}});this.dispatchEvent(r)}}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this.itemDivContainer)}createRenderRoot(){return this}render(){return d`
3529
+ `}};l([x(),c("design:type",Object)],Qe.prototype,"searchKey",void 0),l([x(),c("design:type",Object)],Qe.prototype,"focusedIndex",void 0),l([x(),c("design:type",Object)],Qe.prototype,"selectedValue",void 0),l([x(),c("design:type",Boolean)],Qe.prototype,"isOpen",void 0),Qe=l([p("rtg-combo-box-group")],Qe);var $a,jt=class extends _{constructor(...e){super(...e),this.value="",this.key="",this.tabindex=0,this.isSelected=!1,this.isFocus=!1,this.class="",this.selectItemIndex=-1,this.onSelect=(t,r)=>{},this.onMouseOver=(t,r)=>{},this.handleClick=t=>{this.onSelect(this.value,this.selectItemIndex),t.stopPropagation();let r=new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:this.value}});this.dispatchEvent(r)}}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this.itemDivContainer)}createRenderRoot(){return this}render(){return d`
3530
3530
  <div
3531
3531
  ${wt(this.getFilteredAttributes())}
3532
3532
  @click=${this.handleClick}
@@ -3542,7 +3542,7 @@ body {
3542
3542
  ${Yh()}
3543
3543
  </span>
3544
3544
  </div>
3545
- `}};l([a({type:String}),c("design:type",Object)],Ut.prototype,"value",void 0),l([a({type:String}),c("design:type",Object)],Ut.prototype,"key",void 0),l([a({type:Number}),c("design:type",Object)],Ut.prototype,"tabindex",void 0),l([a({type:Boolean}),c("design:type",Object)],Ut.prototype,"isSelected",void 0),l([a({type:Boolean}),c("design:type",Object)],Ut.prototype,"isFocus",void 0),l([a({type:String}),c("design:type",Object)],Ut.prototype,"class",void 0),l([a({type:Number}),c("design:type",Object)],Ut.prototype,"selectItemIndex",void 0),l([a({type:Function}),c("design:type",Object)],Ut.prototype,"onSelect",void 0),l([a({type:Function}),c("design:type",Object)],Ut.prototype,"onMouseOver",void 0),l([Ci("#rtg-combo-box-item"),c("design:type",typeof($a=typeof HTMLDivElement<"u"&&HTMLDivElement)=="function"?$a:Object)],Ut.prototype,"itemDivContainer",void 0),Ut=l([p("rtg-combo-box-item")],Ut);var Ai=class extends v{constructor(...e){super(...e),this.placeholder="Search Item ...",this.searchValue=""}get _comboBoxGroup(){let e=this.parentElement;for(;e&&!(e instanceof Qe);)e=e.parentElement;return e}handleSearch(e){e.stopPropagation(),this.searchValue=e.target.value,this._comboBoxGroup&&(this._comboBoxGroup.searchKey=this.searchValue)}handleKeyDown(e){e.stopPropagation()}createRenderRoot(){return this}render(){return d`
3545
+ `}};l([a({type:String}),c("design:type",Object)],jt.prototype,"value",void 0),l([a({type:String}),c("design:type",Object)],jt.prototype,"key",void 0),l([a({type:Number}),c("design:type",Object)],jt.prototype,"tabindex",void 0),l([a({type:Boolean}),c("design:type",Object)],jt.prototype,"isSelected",void 0),l([a({type:Boolean}),c("design:type",Object)],jt.prototype,"isFocus",void 0),l([a({type:String}),c("design:type",Object)],jt.prototype,"class",void 0),l([a({type:Number}),c("design:type",Object)],jt.prototype,"selectItemIndex",void 0),l([a({type:Function}),c("design:type",Object)],jt.prototype,"onSelect",void 0),l([a({type:Function}),c("design:type",Object)],jt.prototype,"onMouseOver",void 0),l([Ci("#rtg-combo-box-item"),c("design:type",typeof($a=typeof HTMLDivElement<"u"&&HTMLDivElement)=="function"?$a:Object)],jt.prototype,"itemDivContainer",void 0),jt=l([p("rtg-combo-box-item")],jt);var Ai=class extends v{constructor(...e){super(...e),this.placeholder="Search Item ...",this.searchValue=""}get _comboBoxGroup(){let e=this.parentElement;for(;e&&!(e instanceof Qe);)e=e.parentElement;return e}handleSearch(e){e.stopPropagation(),this.searchValue=e.target.value,this._comboBoxGroup&&(this._comboBoxGroup.searchKey=this.searchValue)}handleKeyDown(e){e.stopPropagation()}createRenderRoot(){return this}render(){return d`
3546
3546
  <div class="rtg-flex rtg-items-center rtg-px-2">
3547
3547
  ${Kh()}
3548
3548
  <input
@@ -3903,7 +3903,7 @@ body {
3903
3903
  part="dialog-footer"
3904
3904
  class=${b(Zt.footer,this.className)}
3905
3905
  ></div>
3906
- `}};Fa=l([p("rtg-dialog-footer")],Fa);var ji=class extends v{constructor(...e){super(...e),this._title="",this.description=""}createRenderRoot(){return this}render(){return d`
3906
+ `}};Fa=l([p("rtg-dialog-footer")],Fa);var Ui=class extends v{constructor(...e){super(...e),this._title="",this.description=""}createRenderRoot(){return this}render(){return d`
3907
3907
  <div
3908
3908
  part="dialog-header"
3909
3909
  class=${b(Zt.header,this.className)}
@@ -3914,7 +3914,7 @@ body {
3914
3914
  ${this.description}
3915
3915
  </p>
3916
3916
  </div>
3917
- `}};l([a({attribute:"title",type:String}),c("design:type",Object)],ji.prototype,"_title",void 0),l([a({type:String}),c("design:type",Object)],ji.prototype,"description",void 0),ji=l([p("rtg-dialog-header")],ji);var Ta=class extends v{createRenderRoot(){return this}render(){return d`
3917
+ `}};l([a({attribute:"title",type:String}),c("design:type",Object)],Ui.prototype,"_title",void 0),l([a({type:String}),c("design:type",Object)],Ui.prototype,"description",void 0),Ui=l([p("rtg-dialog-header")],Ui);var Ta=class extends v{createRenderRoot(){return this}render(){return d`
3918
3918
  <div
3919
3919
  part="dialog-overly"
3920
3920
  class=${b(Zt.overlay,this.className)}
@@ -3971,17 +3971,17 @@ body {
3971
3971
  part="drawer-description"
3972
3972
  class=${b(le.description,this.className)}
3973
3973
  ></p>
3974
- `}};za=l([p("rtg-drawer-description")],za);var ja=class extends _{get _containerElement(){return this.querySelector("div[part=drawer-footer]")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
3974
+ `}};za=l([p("rtg-drawer-description")],za);var Ua=class extends _{get _containerElement(){return this.querySelector("div[part=drawer-footer]")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
3975
3975
  <div
3976
3976
  part="drawer-footer"
3977
3977
  class=${b(le.footer,this.className)}
3978
3978
  ></div>
3979
- `}};ja=l([p("rtg-drawer-footer")],ja);var Ua=class extends _{get _containerElement(){return this.querySelector("div[part=drawer-header")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
3979
+ `}};Ua=l([p("rtg-drawer-footer")],Ua);var ja=class extends _{get _containerElement(){return this.querySelector("div[part=drawer-header")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
3980
3980
  <div
3981
3981
  part="drawer-header"
3982
3982
  class=${b(le.header,this.className)}
3983
3983
  ></div>
3984
- `}};Ua=l([p("rtg-drawer-header")],Ua);var Da=class extends v{createRenderRoot(){return this}render(){return d`
3984
+ `}};ja=l([p("rtg-drawer-header")],ja);var Da=class extends v{createRenderRoot(){return this}render(){return d`
3985
3985
  <div
3986
3986
  part="drawer-overly"
3987
3987
  class=${b(le.overlay,this.className)}
@@ -4041,14 +4041,14 @@ body {
4041
4041
  </span>
4042
4042
  <div part="dropdown-menu-checkbox-item-container"></div>
4043
4043
  </div>
4044
- `}};l([a({type:String}),c("design:type",Object)],Ye.prototype,"_id",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],Ye.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],Ye.prototype,"selected",void 0),l([a({type:Boolean}),c("design:type",Object)],Ye.prototype,"checked",void 0),l([a({attribute:"data-disabled",type:Boolean}),c("design:type",Object)],Ye.prototype,"disabled",void 0),Ye=l([p("rtg-dropdown-menu-checkbox-item")],Ye);var pn="closed",Ui=class extends _{constructor(...e){super(...e),this.state=pn,this.isOpen=!1}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof Br);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=dropdown-menu-content]")}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
4044
+ `}};l([a({type:String}),c("design:type",Object)],Ye.prototype,"_id",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],Ye.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],Ye.prototype,"selected",void 0),l([a({type:Boolean}),c("design:type",Object)],Ye.prototype,"checked",void 0),l([a({attribute:"data-disabled",type:Boolean}),c("design:type",Object)],Ye.prototype,"disabled",void 0),Ye=l([p("rtg-dropdown-menu-checkbox-item")],Ye);var pn="closed",ji=class extends _{constructor(...e){super(...e),this.state=pn,this.isOpen=!1}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof Br);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=dropdown-menu-content]")}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
4045
4045
  <div
4046
4046
  data-slot="dropdown-menu-content"
4047
4047
  part="dropdown-menu-content"
4048
4048
  style="display: ${this.isOpen?"block":"none"};"
4049
4049
  class=${b(It.content,this.className)}
4050
4050
  ></div>
4051
- `}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],Ui.prototype,"state",void 0),l([x(),c("design:type",Object)],Ui.prototype,"isOpen",void 0),Ui=l([p("rtg-dropdown-menu-content")],Ui);var si=class extends _{constructor(...e){super(...e),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[rtgcmd-group-items]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`${this._hidden==="true"?m:d`
4051
+ `}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],ji.prototype,"state",void 0),l([x(),c("design:type",Object)],ji.prototype,"isOpen",void 0),ji=l([p("rtg-dropdown-menu-content")],ji);var si=class extends _{constructor(...e){super(...e),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[rtgcmd-group-items]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`${this._hidden==="true"?m:d`
4052
4052
  <div
4053
4053
  rtgcmd-group
4054
4054
  part="dropdown-menu-group"
@@ -4158,7 +4158,7 @@ body {
4158
4158
  @submit=${this.handleSubmit}
4159
4159
  ${Zc(e=>this.formElement=e)}
4160
4160
  ></form>
4161
- `}};l([x(),Ue({context:Ei}),c("design:type",Object)],$o.prototype,"form",void 0),$o=l([p("rtg-form-controller")],$o);var Bd="rtg-form-item-context",tu="rtg-space-form-space-y",eu="rtg-text-form-description-font rtg-text-form-description-color-text rtg-mt-form-description-space-mt",ru="rtg-space-y-form-field-space-y",iu="rtg-space-y-form-item-space-y",su="rtg-text-form-label-font rtg-mb-form-label-space-mb rtg-font-form-label-font-weight rtg-peer-disabled:rtg-cursor-not-allowed peer-disabled:rtg-opacity-form-label-opacity-peer-disabled",ou="rtg-text-form-message-font-size rtg-text-form-message-color-text",Co=class extends _{createRenderRoot(){return this}get _desc(){return this.querySelector("p[part=form-description]")}firstUpdated(){this.moveLightDomChildrenInto(this._desc)}render(){return d`
4161
+ `}};l([x(),je({context:Ei}),c("design:type",Object)],$o.prototype,"form",void 0),$o=l([p("rtg-form-controller")],$o);var Bd="rtg-form-item-context",tu="rtg-space-form-space-y",eu="rtg-text-form-description-font rtg-text-form-description-color-text rtg-mt-form-description-space-mt",ru="rtg-space-y-form-field-space-y",iu="rtg-space-y-form-item-space-y",su="rtg-text-form-label-font rtg-mb-form-label-space-mb rtg-font-form-label-font-weight rtg-peer-disabled:rtg-cursor-not-allowed peer-disabled:rtg-opacity-form-label-opacity-peer-disabled",ou="rtg-text-form-message-font-size rtg-text-form-message-color-text",Co=class extends _{createRenderRoot(){return this}get _desc(){return this.querySelector("p[part=form-description]")}firstUpdated(){this.moveLightDomChildrenInto(this._desc)}render(){return d`
4162
4162
  <p
4163
4163
  id="${this.itemContext.id}-description"
4164
4164
  part="form-description"
@@ -4167,10 +4167,10 @@ body {
4167
4167
  `}};l([Lt({context:Bd}),c("design:type",Object)],Co.prototype,"itemContext",void 0),Co=l([p("rtg-form-description")],Co);var nu="rtg-form-field-context",el,ye=class extends _{constructor(...e){super(...e),this.name="",this.validators=[],this.defaultValue="",this.fieldName="",this.registered=!1}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-field]")}updated(){var t;if(this.registered||!this.form||!this.name||!Array.isArray(this.validators)||this.validators.length===0)return;this.form.registerField({name:this.name,validator:r=>{for(let i of this.validators){let s=i(r);if(s)return s}return null},defaultValue:this.defaultValue}),this.registered=!0,this.moveLightDomChildrenInto(this._container);let e=(t=this._container)==null?void 0:t.querySelector("input, textarea, select");e&&(this.defaultValue!==void 0&&(e.value=this.defaultValue),e.addEventListener("input",()=>{this.form.setValue(this.name,e.value)}))}disconnectedCallback(){var e;super.disconnectedCallback(),this.isConnected||((e=this.form)==null||e.unregisterField(this.name))}render(){return d`<div
4168
4168
  part="form-field"
4169
4169
  class="${b(ru,this.className)}"
4170
- ></div>`}};l([Lt({context:Ei}),c("design:type",typeof(el=ze!==void 0&&ze)=="function"?el:Object)],ye.prototype,"form",void 0),l([a({type:String}),c("design:type",Object)],ye.prototype,"name",void 0),l([a({type:Array}),c("design:type",Array)],ye.prototype,"validators",void 0),l([a({type:String}),c("design:type",Object)],ye.prototype,"defaultValue",void 0),l([Ue({context:nu}),c("design:type",Object)],ye.prototype,"fieldName",void 0),ye=l([p("rtg-form-field")],ye);var Eo=class extends _{constructor(...e){super(...e),this._generatedId=crypto.randomUUID(),this.itemContext={id:this._generatedId}}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-item]")}firstUpdated(){this.moveLightDomChildrenInto(this._container)}render(){return d`<div
4170
+ ></div>`}};l([Lt({context:Ei}),c("design:type",typeof(el=ze!==void 0&&ze)=="function"?el:Object)],ye.prototype,"form",void 0),l([a({type:String}),c("design:type",Object)],ye.prototype,"name",void 0),l([a({type:Array}),c("design:type",Array)],ye.prototype,"validators",void 0),l([a({type:String}),c("design:type",Object)],ye.prototype,"defaultValue",void 0),l([je({context:nu}),c("design:type",Object)],ye.prototype,"fieldName",void 0),ye=l([p("rtg-form-field")],ye);var Eo=class extends _{constructor(...e){super(...e),this._generatedId=crypto.randomUUID(),this.itemContext={id:this._generatedId}}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-item]")}firstUpdated(){this.moveLightDomChildrenInto(this._container)}render(){return d`<div
4171
4171
  part="form-item"
4172
4172
  class="${b(iu,this.className)}"
4173
- ></div>`}};l([Ue({context:Bd}),c("design:type",Object)],Eo.prototype,"itemContext",void 0),Eo=l([p("rtg-form-item")],Eo);var rl,Di=class extends _{constructor(...e){super(...e),this.hasError=!1,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof ye);)e=e.parentElement;return e}createRenderRoot(){return this}get _label(){return this.querySelector("label[part=form-label]")}firstUpdated(){this.moveLightDomChildrenInto(this._label)}connectedCallback(){super.connectedCallback();let e=this._field.name;this.hasError=!!this.form.getError(e),this.unsubscribe=this.form.subscribe(()=>{this.hasError=!!this.form.getError(e),this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return d`
4173
+ ></div>`}};l([je({context:Bd}),c("design:type",Object)],Eo.prototype,"itemContext",void 0),Eo=l([p("rtg-form-item")],Eo);var rl,Di=class extends _{constructor(...e){super(...e),this.hasError=!1,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof ye);)e=e.parentElement;return e}createRenderRoot(){return this}get _label(){return this.querySelector("label[part=form-label]")}firstUpdated(){this.moveLightDomChildrenInto(this._label)}connectedCallback(){super.connectedCallback();let e=this._field.name;this.hasError=!!this.form.getError(e),this.unsubscribe=this.form.subscribe(()=>{this.hasError=!!this.form.getError(e),this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return d`
4174
4174
  <label
4175
4175
  part="form-label"
4176
4176
  for="${this._field.name}"
@@ -4188,7 +4188,7 @@ body {
4188
4188
  @submit=${this.handleSubmit}
4189
4189
  class="${b(tu,this.className)}"
4190
4190
  ></form>
4191
- `}};l([Ue({context:Ei}),c("design:type",Object)],Mi.prototype,"form",void 0),l([a({type:Function}),c("design:type",Function)],Mi.prototype,"onSubmit",void 0),Mi=l([p("rtg-form")],Mi);var gn={root:[""],trigger:[""],content:["rtg-fixed rtg-z-50","rtg-p-hover-card-content-space-p","rtg-w-hover-card-content-space-w","rtg-text-hover-card-content-color-text","rtg-bg-hover-card-content-color-bg","rtg-rounded-hover-card-content-radius rtg-border-hover-card-content-width-border rtg-border-hover-card-content-color-border rtg-outline-hidden","rtg-shadow-hover-card-content-shadow","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0 data-[state=open]:rtg-zoom-in-95","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0 data-[state=closed]:rtg-zoom-out-95","data-[side=bottom]:rtg-slide-in-from-top-2 data-[side=left]:rtg-slide-in-from-right-2 data-[side=right]:rtg-slide-in-from-left-2 data-[side=top]:rtg-slide-in-from-bottom-2"]},qi=class extends _{constructor(...e){super(...e),this.state="closed",this.isOpen=!1,this.onStateChange=t=>{this.state=t.detail.isOpen?"open":"closed"},this.handlePointerLeaveCheck=t=>{this.contains(t.relatedTarget)||(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("hover-card-state-change",this.onStateChange),this.addEventListener("mouseenter",this.handlePointerLeaveCheck),this.addEventListener("mouseleave",this.handlePointerLeaveCheck)}disconnectedCallback(){document.removeEventListener("hover-card-state-change",this.onStateChange),this.removeEventListener("mouseenter",this.handlePointerLeaveCheck),this.removeEventListener("mouseleave",this.handlePointerLeaveCheck),super.disconnectedCallback()}updated(e){super.updated(e),this.isOpen=this.state==="open"}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.renderRoot.querySelector("#rtg-hover-card-content"))}render(){return d`
4191
+ `}};l([je({context:Ei}),c("design:type",Object)],Mi.prototype,"form",void 0),l([a({type:Function}),c("design:type",Function)],Mi.prototype,"onSubmit",void 0),Mi=l([p("rtg-form")],Mi);var gn={root:[""],trigger:[""],content:["rtg-fixed rtg-z-50","rtg-p-hover-card-content-space-p","rtg-w-hover-card-content-space-w","rtg-text-hover-card-content-color-text","rtg-bg-hover-card-content-color-bg","rtg-rounded-hover-card-content-radius rtg-border-hover-card-content-width-border rtg-border-hover-card-content-color-border rtg-outline-hidden","rtg-shadow-hover-card-content-shadow","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0 data-[state=open]:rtg-zoom-in-95","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0 data-[state=closed]:rtg-zoom-out-95","data-[side=bottom]:rtg-slide-in-from-top-2 data-[side=left]:rtg-slide-in-from-right-2 data-[side=right]:rtg-slide-in-from-left-2 data-[side=top]:rtg-slide-in-from-bottom-2"]},qi=class extends _{constructor(...e){super(...e),this.state="closed",this.isOpen=!1,this.onStateChange=t=>{this.state=t.detail.isOpen?"open":"closed"},this.handlePointerLeaveCheck=t=>{this.contains(t.relatedTarget)||(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("hover-card-state-change",this.onStateChange),this.addEventListener("mouseenter",this.handlePointerLeaveCheck),this.addEventListener("mouseleave",this.handlePointerLeaveCheck)}disconnectedCallback(){document.removeEventListener("hover-card-state-change",this.onStateChange),this.removeEventListener("mouseenter",this.handlePointerLeaveCheck),this.removeEventListener("mouseleave",this.handlePointerLeaveCheck),super.disconnectedCallback()}updated(e){super.updated(e),this.isOpen=this.state==="open"}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.renderRoot.querySelector("#rtg-hover-card-content"))}render(){return d`
4192
4192
  <div
4193
4193
  id="rtg-hover-card-content"
4194
4194
  part="hover-card-content"
@@ -5182,14 +5182,14 @@ body {
5182
5182
  data-orientation=${this.orientation}
5183
5183
  dir=${this.dir}
5184
5184
  ></div>
5185
- `}};l([a({attribute:"default-value",type:String}),c("design:type",String)],be.prototype,"defaultValue",void 0),l([a({type:String}),c("design:type",String)],be.prototype,"value",void 0),l([a({attribute:!1}),c("design:type",Function)],be.prototype,"onValueChange",void 0),l([a({type:String}),c("design:type",Object)],be.prototype,"orientation",void 0),l([a({type:String}),c("design:type",Object)],be.prototype,"dir",void 0),l([a({attribute:"activation-mode",type:String}),c("design:type",Object)],be.prototype,"activationMode",void 0),l([x(),c("design:type",String)],be.prototype,"_activeValue",void 0),be=l([p("rtg-tabs")],be);var jo=class extends v{constructor(...e){super(...e),this.variant="default"}createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="tabs-list"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._listSlot&&((r=this._listSlot)==null||r.appendChild(t))})}render(){return d`
5185
+ `}};l([a({attribute:"default-value",type:String}),c("design:type",String)],be.prototype,"defaultValue",void 0),l([a({type:String}),c("design:type",String)],be.prototype,"value",void 0),l([a({attribute:!1}),c("design:type",Function)],be.prototype,"onValueChange",void 0),l([a({type:String}),c("design:type",Object)],be.prototype,"orientation",void 0),l([a({type:String}),c("design:type",Object)],be.prototype,"dir",void 0),l([a({attribute:"activation-mode",type:String}),c("design:type",Object)],be.prototype,"activationMode",void 0),l([x(),c("design:type",String)],be.prototype,"_activeValue",void 0),be=l([p("rtg-tabs")],be);var Uo=class extends v{constructor(...e){super(...e),this.variant="default"}createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="tabs-list"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._listSlot&&((r=this._listSlot)==null||r.appendChild(t))})}render(){return d`
5186
5186
  <div
5187
5187
  data-slot="tabs-list"
5188
5188
  data-variant=${this.variant}
5189
5189
  role="tablist"
5190
5190
  tabindex="0"
5191
5191
  ></div>
5192
- `}};l([a({type:String}),c("design:type",Object)],jo.prototype,"variant",void 0),jo=l([p("rtg-tabs-list")],jo);var Zi=class extends v{constructor(...e){super(...e),this.value="",this._onClick=()=>{this._emitSelect()},this._onKeyDown=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._emitSelect())}}createRenderRoot(){return this}get _triggerSlot(){return this.querySelector('[data-slot="tabs-trigger"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._triggerSlot&&((r=this._triggerSlot)==null||r.appendChild(t))})}_emitSelect(){this.disabled||this.dispatchEvent(new CustomEvent("rtg-tabs:trigger-select",{detail:{value:this.value},bubbles:!0}))}render(){return d`
5192
+ `}};l([a({type:String}),c("design:type",Object)],Uo.prototype,"variant",void 0),Uo=l([p("rtg-tabs-list")],Uo);var Zi=class extends v{constructor(...e){super(...e),this.value="",this._onClick=()=>{this._emitSelect()},this._onKeyDown=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._emitSelect())}}createRenderRoot(){return this}get _triggerSlot(){return this.querySelector('[data-slot="tabs-trigger"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._triggerSlot&&((r=this._triggerSlot)==null||r.appendChild(t))})}_emitSelect(){this.disabled||this.dispatchEvent(new CustomEvent("rtg-tabs:trigger-select",{detail:{value:this.value},bubbles:!0}))}render(){return d`
5193
5193
  <button
5194
5194
  data-slot="tabs-trigger"
5195
5195
  ?data-disabled=${this.disabled}
@@ -5199,18 +5199,18 @@ body {
5199
5199
  @click=${this._onClick}
5200
5200
  @keydown=${this._onKeyDown}
5201
5201
  ></button>
5202
- `}};l([a({type:String}),c("design:type",Object)],Zi.prototype,"value",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Zi.prototype,"disabled",void 0),Zi=l([p("rtg-tabs-trigger")],Zi);var Uo=class extends v{constructor(...e){super(...e),this.value=""}createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="tabs-content"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._contentSlot&&((r=this._contentSlot)==null||r.appendChild(t))})}render(){return d`
5202
+ `}};l([a({type:String}),c("design:type",Object)],Zi.prototype,"value",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Zi.prototype,"disabled",void 0),Zi=l([p("rtg-tabs-trigger")],Zi);var jo=class extends v{constructor(...e){super(...e),this.value=""}createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="tabs-content"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._contentSlot&&((r=this._contentSlot)==null||r.appendChild(t))})}render(){return d`
5203
5203
  <div
5204
5204
  data-slot="tabs-content"
5205
5205
  role="tabpanel"
5206
5206
  tabindex="0"
5207
5207
  hidden
5208
5208
  ></div>
5209
- `}};l([a({type:String}),c("design:type",Object)],Uo.prototype,"value",void 0),Uo=l([p("rtg-tabs-content")],Uo);var xi={viewportRoot:["rtg-fixed rtg-top-0 rtg-z-[100] rtg-flex rtg-max-h-screen rtg-w-toast-viewport-root-space-w rtg-flex-col-reverse rtg-px-toast-viewport-root-space-px rtg-py-toast-viewport-root-space-py sm:rtg-bottom-0 sm:rtg-right-0 sm:rtg-top-auto sm:rtg-flex-col md:rtg-max-w-toast-viewport-root-space-w-md"],viewportItem:{base:["group rtg-pointer-events-auto rtg-relative rtg-flex rtg-w-toast-viewport-item-space-w rtg-items-center rtg-justify-between rtg-gap-toast-viewport-item-space-gap rtg-overflow-hidden rtg-rounded-toast-viewport-item-radius rtg-px-toast-viewport-item-space-px rtg-py-toast-viewport-item-space-py rtg-shadow-toast-viewport-item-shadow rtg-transition-all","data-[swipe=cancel]:rtg-translate-x-0","data-[swipe=end]:rtg-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:rtg-translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=move]:rtg-transition-none","data-[state=open]:rtg-animate-toast-animate-in","data-[state=closed]:rtg-animate-toast-animate-out","data-[swipe=end]:rtg-animate-toast-animate-out","data-[state=closed]:rtg-opacity-80","data-[state=open]:rtg-translate-y-toast-viewport-item-translate-y-enter-desktop","data-[state=open]:sm:rtg-translate-y-toast-viewport-item-translate-y-enter-mobile","data-[state=closed]:rtg-translate-x-toast-viewport-item-translate-x-exit"],variants:{default:["rtg-border rtg-border-toast-viewport-default-color-border rtg-bg-toast-viewport-default-color-bg rtg-text-toast-viewport-default-color-text"],destructive:["rtg-bg-toast-viewport-destructive-color-bg rtg-text-toast-viewport-destructive-color-text"]}},action:{base:["rtg-text-toast-action-font rtg-font-toast-action-font-weight rtg-text-toast-action-color-text","rtg-h-toast-action-space-h rtg-px-toast-action-space-px rtg-py-toast-action-space-py","rtg-inline-flex rtg-border rtg-border-toast-action-color-border rtg-shrink-0 rtg-items-center rtg-justify-center rtg-rounded-toast-action-radius rtg-transition-colors","focus:rtg-outline-none focus:rtg-ring-toast-action-width-ring-focus focus:rtg-ring-toast-action-color-ring-focus","disabled:rtg-pointer-events-none disabled:rtg-opacity-toast-action-opacity-disabled"],variants:{default:["rtg-bg-toast-action-default-color-bg hover:rtg-bg-toast-action-default-color-bg-hover"],destructive:["rtg-bg-toast-action-destructive-color-bg hover:rtg-bg-toast-action-destructive-color-bg-hover rtg-text-toast-action-destructive-color-text focus:rtg-ring-toast-action-destructive-color-ring-focus"]}},title:["rtg-text-toast-title-font rtg-font-toast-title-font-weight [&+div]:rtg-text-toast-title-font"],description:["rtg-text-toast-description-font rtg-opacity-toast-description-opacity"]},Md=ih({}),zl,cs,jl="closed",pr,Ji=(pr=class extends _{constructor(...t){super(...t),this.variant="default",this.state=jl}get _containerElement(){return this.querySelector("li[part=toast-view-port-li]")}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}render(){return d` <ol
5209
+ `}};l([a({type:String}),c("design:type",Object)],jo.prototype,"value",void 0),jo=l([p("rtg-tabs-content")],jo);var xi={viewportRoot:["rtg-fixed rtg-top-0 rtg-z-[100] rtg-flex rtg-max-h-screen rtg-w-toast-viewport-root-space-w rtg-flex-col-reverse rtg-px-toast-viewport-root-space-px rtg-py-toast-viewport-root-space-py sm:rtg-bottom-0 sm:rtg-right-0 sm:rtg-top-auto sm:rtg-flex-col md:rtg-max-w-toast-viewport-root-space-w-md"],viewportItem:{base:["group rtg-pointer-events-auto rtg-relative rtg-flex rtg-w-toast-viewport-item-space-w rtg-items-center rtg-justify-between rtg-gap-toast-viewport-item-space-gap rtg-overflow-hidden rtg-rounded-toast-viewport-item-radius rtg-px-toast-viewport-item-space-px rtg-py-toast-viewport-item-space-py rtg-shadow-toast-viewport-item-shadow rtg-transition-all","data-[swipe=cancel]:rtg-translate-x-0","data-[swipe=end]:rtg-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:rtg-translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=move]:rtg-transition-none","data-[state=open]:rtg-animate-toast-animate-in","data-[state=closed]:rtg-animate-toast-animate-out","data-[swipe=end]:rtg-animate-toast-animate-out","data-[state=closed]:rtg-opacity-80","data-[state=open]:rtg-translate-y-toast-viewport-item-translate-y-enter-desktop","data-[state=open]:sm:rtg-translate-y-toast-viewport-item-translate-y-enter-mobile","data-[state=closed]:rtg-translate-x-toast-viewport-item-translate-x-exit"],variants:{default:["rtg-border rtg-border-toast-viewport-default-color-border rtg-bg-toast-viewport-default-color-bg rtg-text-toast-viewport-default-color-text"],destructive:["rtg-bg-toast-viewport-destructive-color-bg rtg-text-toast-viewport-destructive-color-text"]}},action:{base:["rtg-text-toast-action-font rtg-font-toast-action-font-weight rtg-text-toast-action-color-text","rtg-h-toast-action-space-h rtg-px-toast-action-space-px rtg-py-toast-action-space-py","rtg-inline-flex rtg-border rtg-border-toast-action-color-border rtg-shrink-0 rtg-items-center rtg-justify-center rtg-rounded-toast-action-radius rtg-transition-colors","focus:rtg-outline-none focus:rtg-ring-toast-action-width-ring-focus focus:rtg-ring-toast-action-color-ring-focus","disabled:rtg-pointer-events-none disabled:rtg-opacity-toast-action-opacity-disabled"],variants:{default:["rtg-bg-toast-action-default-color-bg hover:rtg-bg-toast-action-default-color-bg-hover"],destructive:["rtg-bg-toast-action-destructive-color-bg hover:rtg-bg-toast-action-destructive-color-bg-hover rtg-text-toast-action-destructive-color-text focus:rtg-ring-toast-action-destructive-color-ring-focus"]}},title:["rtg-text-toast-title-font rtg-font-toast-title-font-weight [&+div]:rtg-text-toast-title-font"],description:["rtg-text-toast-description-font rtg-opacity-toast-description-opacity"]},Md=ih({}),zl,cs,Ul="closed",pr,Ji=(pr=class extends _{constructor(...t){super(...t),this.variant="default",this.state=Ul}get _containerElement(){return this.querySelector("li[part=toast-view-port-li]")}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}render(){return d` <ol
5210
5210
  part="toast-view-port"
5211
5211
  tabindex="-1"
5212
5212
  @click="${t=>t.stopPropagation()}"
5213
- class="${b(xi.viewportRoot,this.className,`${this.state===jl?"hidden":"block"} `)}"
5213
+ class="${b(xi.viewportRoot,this.className,`${this.state===Ul?"hidden":"block"} `)}"
5214
5214
  >
5215
5215
  <li
5216
5216
  part="toast-view-port-li"
@@ -5224,14 +5224,14 @@ body {
5224
5224
  data-radix-collection-item=""
5225
5225
  style="user-select: none; touch-action: none;"
5226
5226
  ></li>
5227
- </ol>`}},cs=pr,pr.toastVariants=xi.viewportItem,pr);l([a({type:String}),c("design:type",typeof(zl=Md!==void 0&&void 0)=="function"?zl:Object)],Ji.prototype,"variant",void 0),l([a({attribute:"data-state",type:String}),c("design:type",Object)],Ji.prototype,"state",void 0),Ji=cs=l([p("rtg-toast-view-port")],Ji);var Ul,hs,gr,Do=(gr=class extends _{constructor(...t){super(...t),this.variant="default"}get _containerElement(){return this.querySelector("button[part=toast-action]")}getAttributesToExclude(){return["click","type","variant"]}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}getFilteredAttributes(){let t=this.getAttributesToExclude(),r={};for(let i of this.attributes)t.includes(i.name)||(r[i.name]=i.value);return r}createRenderRoot(){return this}render(){return d`
5227
+ </ol>`}},cs=pr,pr.toastVariants=xi.viewportItem,pr);l([a({type:String}),c("design:type",typeof(zl=Md!==void 0&&void 0)=="function"?zl:Object)],Ji.prototype,"variant",void 0),l([a({attribute:"data-state",type:String}),c("design:type",Object)],Ji.prototype,"state",void 0),Ji=cs=l([p("rtg-toast-view-port")],Ji);var jl,hs,gr,Do=(gr=class extends _{constructor(...t){super(...t),this.variant="default"}get _containerElement(){return this.querySelector("button[part=toast-action]")}getAttributesToExclude(){return["click","type","variant"]}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}getFilteredAttributes(){let t=this.getAttributesToExclude(),r={};for(let i of this.attributes)t.includes(i.name)||(r[i.name]=i.value);return r}createRenderRoot(){return this}render(){return d`
5228
5228
  <button
5229
5229
  ${wt(this.getFilteredAttributes())}
5230
5230
  part="toast-action"
5231
5231
  type="button"
5232
5232
  class="${b(hs.toastVariants.base,hs.toastVariants.variants[this.variant],this.className,"rtg-w-max")}"
5233
5233
  ></button>
5234
- `}},hs=gr,gr.toastVariants=xi.action,gr);l([a({type:String}),c("design:type",typeof(Ul=Md!==void 0&&void 0)=="function"?Ul:Object)],Do.prototype,"variant",void 0),Do=hs=l([p("rtg-toast-action")],Do);var Dl=class extends _{get _containerElement(){return this.querySelector("div[part=toast-description]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
5234
+ `}},hs=gr,gr.toastVariants=xi.action,gr);l([a({type:String}),c("design:type",typeof(jl=Md!==void 0&&void 0)=="function"?jl:Object)],Do.prototype,"variant",void 0),Do=hs=l([p("rtg-toast-action")],Do);var Dl=class extends _{get _containerElement(){return this.querySelector("div[part=toast-description]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
5235
5235
  <div
5236
5236
  class="${b(xi.description,this.className)}"
5237
5237
  part="toast-description"
@@ -5507,8 +5507,8 @@ body {
5507
5507
  </rtg-tabs-content>
5508
5508
  </rtg-tabs>
5509
5509
  </div>
5510
- `}};l([a({type:String}),c("design:type",String)],Mo.prototype,"defaultValue",void 0),Mo=l([p("light-sample-demo"),c("design:paramtypes",[])],Mo);var fu=new Set(["children","localName","ref","style","className"]),nd=new WeakMap,vu=(e,t,r,i,s)=>{let o=s==null?void 0:s[t];o===void 0||r===i?r==null&&t in HTMLElement.prototype?e.removeAttribute(t):e[t]=r:((n,h,u)=>{let g=nd.get(n);g===void 0&&nd.set(n,g=new Map);let y=g.get(h);u===void 0?y!==void 0&&(g.delete(h),n.removeEventListener(h,y)):y===void 0?(g.set(h,y={handleEvent:u}),n.addEventListener(h,y)):y.handleEvent=u})(e,o,r)},yu=(e,t)=>{typeof e=="function"?e(t):e.current=t};function qd(e=window.React,t,r,i,s){let o,n,h;{let C=e;({tagName:n,elementClass:h,events:i,displayName:s}=C),o=C.react}let u=o.Component,g=o.createElement,y=new Set(Object.keys(i??{}));class w extends u{constructor(){super(...arguments),this.o=null}t(S){if(this.o!==null)for(let k in this.i)vu(this.o,k,this.props[k],S?S[k]:void 0,i)}componentDidMount(){var S;this.t(),(S=this.o)==null||S.removeAttribute("defer-hydration")}componentDidUpdate(S){this.t(S)}render(){let{_$Gl:S,...k}=this.props;this.h!==S&&(this.u=A=>{S!==null&&yu(S,A),this.o=A,this.h=S}),this.i={};let O={ref:this.u};for(let[A,F]of Object.entries(k))fu.has(A)?O[A==="className"?"class":A]=F:y.has(A)||A in h.prototype?this.i[A]=F:O[A]=F;return O.suppressHydrationWarning=!0,g(n,O)}}w.displayName=s??h.name;let E=o.forwardRef(((C,S)=>g(w,{...C,_$Gl:S},C==null?void 0:C.children)));return E.displayName=w.displayName,E}var wu=Pd((e=>{var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),h=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),C=Symbol.iterator;function S(f){return typeof f!="object"||!f?null:(f=C&&f[C]||f["@@iterator"],typeof f=="function"?f:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,A={};function F(f,$,N){this.props=f,this.context=$,this.refs=A,this.updater=N||k}F.prototype.isReactComponent={},F.prototype.setState=function(f,$){if(typeof f!="object"&&typeof f!="function"&&f!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,f,$,"setState")},F.prototype.forceUpdate=function(f){this.updater.enqueueForceUpdate(this,f,"forceUpdate")};function V(){}V.prototype=F.prototype;function M(f,$,N){this.props=f,this.context=$,this.refs=A,this.updater=N||k}var J=M.prototype=new V;J.constructor=M,O(J,F.prototype),J.isPureReactComponent=!0;var it=Array.isArray;function st(){}var U={H:null,A:null,T:null,S:null},vt=Object.prototype.hasOwnProperty;function Wt(f,$,N){var L=N.ref;return{$$typeof:t,type:f,key:$,ref:L===void 0?null:L,props:N}}function ue(f,$){return Wt(f.type,$,f.props)}function P(f){return typeof f=="object"&&!!f&&f.$$typeof===t}function Be(f){var $={"=":"=0",":":"=2"};return"$"+f.replace(/[=:]/g,function(N){return $[N]})}var Nt=/\/+/g;function pe(f,$){return typeof f=="object"&&f&&f.key!=null?Be(""+f.key):$.toString(36)}function Kt(f){switch(f.status){case"fulfilled":return f.value;case"rejected":throw f.reason;default:switch(typeof f.status=="string"?f.then(st,st):(f.status="pending",f.then(function($){f.status==="pending"&&(f.status="fulfilled",f.value=$)},function($){f.status==="pending"&&(f.status="rejected",f.reason=$)})),f.status){case"fulfilled":return f.value;case"rejected":throw f.reason}}throw f}function zt(f,$,N,L,B){var H=typeof f;(H==="undefined"||H==="boolean")&&(f=null);var K=!1;if(f===null)K=!0;else switch(H){case"bigint":case"string":case"number":K=!0;break;case"object":switch(f.$$typeof){case t:case r:K=!0;break;case w:return K=f._init,zt(K(f._payload),$,N,L,B)}}if(K)return B=B(f),K=L===""?"."+pe(f,0):L,it(B)?(N="",K!=null&&(N=K.replace(Nt,"$&/")+"/"),zt(B,$,N,"",function(mc){return mc})):B!=null&&(P(B)&&(B=ue(B,N+(B.key==null||f&&f.key===B.key?"":(""+B.key).replace(Nt,"$&/")+"/")+K)),$.push(B)),1;K=0;var ie=L===""?".":L+":";if(it(f))for(var Ct=0;Ct<f.length;Ct++)L=f[Ct],H=ie+pe(L,Ct),K+=zt(L,$,N,H,B);else if(Ct=S(f),typeof Ct=="function")for(f=Ct.call(f),Ct=0;!(L=f.next()).done;)L=L.value,H=ie+pe(L,Ct++),K+=zt(L,$,N,H,B);else if(H==="object"){if(typeof f.then=="function")return zt(Kt(f),$,N,L,B);throw $=String(f),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return K}function jt(f,$,N){if(f==null)return f;var L=[],B=0;return zt(f,L,"","",function(H){return $.call(N,H,B++)}),L}function Ft(f){if(f._status===-1){var $=f._result;$=$(),$.then(function(N){(f._status===0||f._status===-1)&&(f._status=1,f._result=N)},function(N){(f._status===0||f._status===-1)&&(f._status=2,f._result=N)}),f._status===-1&&(f._status=0,f._result=$)}if(f._status===1)return f._result.default;throw f._result}var we=typeof reportError=="function"?reportError:function(f){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof f=="object"&&f&&typeof f.message=="string"?String(f.message):String(f),error:f});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",f);return}console.error(f)},ot={map:jt,forEach:function(f,$,N){jt(f,function(){$.apply(this,arguments)},N)},count:function(f){var $=0;return jt(f,function(){$++}),$},toArray:function(f){return jt(f,function($){return $})||[]},only:function(f){if(!P(f))throw Error("React.Children.only expected to receive a single React element child.");return f}};e.Activity=E,e.Children=ot,e.Component=F,e.Fragment=i,e.Profiler=o,e.PureComponent=M,e.StrictMode=s,e.Suspense=g,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,e.__COMPILER_RUNTIME={__proto__:null,c:function(f){return U.H.useMemoCache(f)}},e.cache=function(f){return function(){return f.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(f,$,N){if(f==null)throw Error("The argument must be a React element, but you passed "+f+".");var L=O({},f.props),B=f.key;if($!=null)for(H in $.key!==void 0&&(B=""+$.key),$)!vt.call($,H)||H==="key"||H==="__self"||H==="__source"||H==="ref"&&$.ref===void 0||(L[H]=$[H]);var H=arguments.length-2;if(H===1)L.children=N;else if(1<H){for(var K=Array(H),ie=0;ie<H;ie++)K[ie]=arguments[ie+2];L.children=K}return Wt(f.type,B,L)},e.createContext=function(f){return f={$$typeof:h,_currentValue:f,_currentValue2:f,_threadCount:0,Provider:null,Consumer:null},f.Provider=f,f.Consumer={$$typeof:n,_context:f},f},e.createElement=function(f,$,N){var L,B={},H=null;if($!=null)for(L in $.key!==void 0&&(H=""+$.key),$)vt.call($,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(B[L]=$[L]);var K=arguments.length-2;if(K===1)B.children=N;else if(1<K){for(var ie=Array(K),Ct=0;Ct<K;Ct++)ie[Ct]=arguments[Ct+2];B.children=ie}if(f&&f.defaultProps)for(L in K=f.defaultProps,K)B[L]===void 0&&(B[L]=K[L]);return Wt(f,H,B)},e.createRef=function(){return{current:null}},e.forwardRef=function(f){return{$$typeof:u,render:f}},e.isValidElement=P,e.lazy=function(f){return{$$typeof:w,_payload:{_status:-1,_result:f},_init:Ft}},e.memo=function(f,$){return{$$typeof:y,type:f,compare:$===void 0?null:$}},e.startTransition=function(f){var $=U.T,N={};U.T=N;try{var L=f(),B=U.S;B!==null&&B(N,L),typeof L=="object"&&L&&typeof L.then=="function"&&L.then(st,we)}catch(H){we(H)}finally{$!==null&&N.types!==null&&($.types=N.types),U.T=$}},e.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},e.use=function(f){return U.H.use(f)},e.useActionState=function(f,$,N){return U.H.useActionState(f,$,N)},e.useCallback=function(f,$){return U.H.useCallback(f,$)},e.useContext=function(f){return U.H.useContext(f)},e.useDebugValue=function(){},e.useDeferredValue=function(f,$){return U.H.useDeferredValue(f,$)},e.useEffect=function(f,$){return U.H.useEffect(f,$)},e.useEffectEvent=function(f){return U.H.useEffectEvent(f)},e.useId=function(){return U.H.useId()},e.useImperativeHandle=function(f,$,N){return U.H.useImperativeHandle(f,$,N)},e.useInsertionEffect=function(f,$){return U.H.useInsertionEffect(f,$)},e.useLayoutEffect=function(f,$){return U.H.useLayoutEffect(f,$)},e.useMemo=function(f,$){return U.H.useMemo(f,$)},e.useOptimistic=function(f,$){return U.H.useOptimistic(f,$)},e.useReducer=function(f,$,N){return U.H.useReducer(f,$,N)},e.useRef=function(f){return U.H.useRef(f)},e.useState=function(f){return U.H.useState(f)},e.useSyncExternalStore=function(f,$,N){return U.H.useSyncExternalStore(f,$,N)},e.useTransition=function(){return U.H.useTransition()},e.version="19.2.4"})),Vd=oh(Pd(((e,t)=>{t.exports=wu()}))());qd({tagName:"rtg-button",elementClass:Yt,react:Vd.default});qd({tagName:"rtg-checkbox",elementClass:Dt,react:Vd.default});const _u="sb-relative sb-overflow-hidden sb-w-1/3 sb-h-2 sb-linear-bar",xu="sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100%-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100%-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]",Su="sb-h-[100%] sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100vw-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100vw-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]",$u="sb-fixed sb-inset-0 sb-z-[9999] sb-flex sb-items-center sb-justify-center sb-p-4 sb-overflow-auto",Cu="sb-w-fit sb-flex sb-max-h-[calc(100vh-60px)] sb-bg-background sb-shadow-2xl sb-ring-1 sb-ring-border sb-rounded-xl sb-overflow-hidden",Eu="sb-justify-self-center sb-rotate-0",ku="sb-border-0 sb-bg-background !sb-m-0",Ru="sb-border sb-rounded-2xl sb-relative sb-py-6",Iu="!sb-text-left sb-text-foreground sb-font-normal hover:!sb-bg-muted !sb-text-sm sb-rounded-md !sb-shadow-none data-[state=active]:!sb-bg-muted",Ou="!sb-flex !sb-justify-start !sb-flex-nowrap !sb-w-full !rtg-grid-cols-2 !sb-gap-2 sb-mx-6",Au="!sb-w-[160px] sb-gap-4 ";var T=(e=>(e.USER_PROFILE_CARD_HEADER_CONTAINER="sb-user-profile-card-header-container",e.USER_PROFILE_CONTAINER="sb-user-profile",e.USER_PROFILE_SIDEBAR="sb-user-profile-sidebar-tabs",e.USER_PROFILE_SIDEBAR_TABS="sb-user-profile-sidebar-tabs",e.USER_PROFILE_SIDEBAR_BURGER_MENU="sb-user-profile-sidebar-burger-menu",e.USER_PROFILE_INPUT_LABEL="sb-user-profile-input-label",e.USER_PROFILE_INPUT_FIELD="sb-user-profile-input-field",e.USER_PROFILE_EDIT_FORM="sb-user-profile-edit-form",e.USER_PROFILE_CARD_CONTAINER="sb-user-profile-card-container",e.USER_PROFILE_EDITABLE_INPUT_FIELD="sb-user-profile-editable-input-field",e.USER_PROFILE_DEFAULT_BUTTON="sb-user-profile-default-button",e.USER_PROFILE_OUTLINE_BUTTON="sb-user-profile-outline-button",e.USER_PROFILE_OTP="sb-user-profile-otp",e.USER_PROFILE_EDIT_BUTTON="sb-user-profile-edit-button",e))(T||{});const pt={xs:"475px",sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px","3xl":"1920px","4xl":"2560px"},Pu=/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/,Fu=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Tu=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;function qo(e,t,r){const i=e.formData[t],s=[],o=u=>{if(["input","checkbox","otp"].includes(u.element_type)&&"data_key"in u&&u.data_key===t)return u;if(u.element_type==="container")for(const g of u.properties.children){const y=o(g);if(y)return y}return null},n=e.renderSpec?o(e.renderSpec.root_container):null;if(!n||!("validation"in n.properties))return;const{validation:h}=n.properties;if(!(!h||r!=="submit"&&h.on_event!==r)){if(n.hidden){delete e.errors[t];return}for(const u of h.rules){if(n.hidden)continue;let g=!0;switch(u.type){case"required":g=Hd(i,n);break;case"min_length":g=Gd(i,u.length);break;case"max_length":g=Wd(i,u.length);break;case"min_value":g=Kd(i,u.value);break;case"max_value":g=Yd(i,u.value);break;case"regex":g=Xd(i,u.regex);break;case"field_match":g=Zd(i,u.field_match?e.formData[u.field_match]:void 0);break;case"email":g=Jd(i);break;case"phone":g=Qd(i);break;case"date":g=tc(i);break;default:g=!0}!g&&u.error_message&&s.push(u.error_message)}e.errors={...e.errors,[t]:s}}}function Hd(e,t){return!(e===void 0||e===""||e===!1||t&&t.element_type==="input"&&t.properties.type==="tel"&&typeof e=="string"&&e.split("-")[1]==="")}function Gd(e,t){return typeof e=="string"?e.length>=(t??0):!0}function Wd(e,t){return typeof e=="string"?e.length<=(t??1/0):!0}function Kd(e,t){const r=typeof t=="string"?parseFloat(t):t,i=typeof e=="string"?parseFloat(e):e;return typeof i=="number"&&typeof r=="number"&&!isNaN(i)&&!isNaN(r)?i>=r:!0}function Yd(e,t){const r=typeof t=="string"?parseFloat(t):t,i=typeof e=="string"?parseFloat(e):e;return typeof i=="number"&&typeof r=="number"&&!isNaN(i)&&!isNaN(r)?i<=r:!0}function Xd(e,t){return typeof e=="string"&&t?new RegExp(t).test(e):!0}function Zd(e,t){return t!==void 0?e===t:!0}function Jd(e){return typeof e=="string"?Fu.test(e):!0}function Qd(e){return typeof e=="string"?Pu.test(e):!0}function tc(e){return typeof e=="string"?Tu.test(e):!0}function ec(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=ec(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Lu(){for(var e,t,r=0,i="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=ec(e))&&(i&&(i+=" "),i+=t);return i}const mn="-",Nu=e=>{const t=ju(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:n=>{const h=n.split(mn);return h[0]===""&&h.length!==1&&h.shift(),rc(h,t)||zu(n)},getConflictingClassGroupIds:(n,h)=>{const u=r[n]||[];return h&&i[n]?[...u,...i[n]]:u}}},rc=(e,t)=>{var n;if(e.length===0)return t.classGroupId;const r=e[0],i=t.nextPart.get(r),s=i?rc(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(mn);return(n=t.validators.find(({validator:h})=>h(o)))==null?void 0:n.classGroupId},ad=/^\[(.+)\]$/,zu=e=>{if(ad.test(e)){const t=ad.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ju=e=>{const{theme:t,prefix:r}=e,i={nextPart:new Map,validators:[]};return Du(Object.entries(e.classGroups),r).forEach(([o,n])=>{Jo(n,i,o,t)}),i},Jo=(e,t,r,i)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:ld(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(Uu(s)){Jo(s(i),t,r,i);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,n])=>{Jo(n,ld(t,o),r,i)})})},ld=(e,t)=>{let r=e;return t.split(mn).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},Uu=e=>e.isThemeGetter,Du=(e,t)=>t?e.map(([r,i])=>{const s=i.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([n,h])=>[t+n,h])):o);return[r,s]}):e,Bu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,i=new Map;const s=(o,n)=>{r.set(o,n),t++,t>e&&(t=0,i=r,r=new Map)};return{get(o){let n=r.get(o);if(n!==void 0)return n;if((n=i.get(o))!==void 0)return s(o,n),n},set(o,n){r.has(o)?r.set(o,n):s(o,n)}}},ic="!",Mu=e=>{const{separator:t,experimentalParseClassName:r}=e,i=t.length===1,s=t[0],o=t.length,n=h=>{const u=[];let g=0,y=0,w;for(let O=0;O<h.length;O++){let A=h[O];if(g===0){if(A===s&&(i||h.slice(O,O+o)===t)){u.push(h.slice(y,O)),y=O+o;continue}if(A==="/"){w=O;continue}}A==="["?g++:A==="]"&&g--}const E=u.length===0?h:h.substring(y),C=E.startsWith(ic),S=C?E.substring(1):E,k=w&&w>y?w-y:void 0;return{modifiers:u,hasImportantModifier:C,baseClassName:S,maybePostfixModifierPosition:k}};return r?h=>r({className:h,parseClassName:n}):n},qu=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(i=>{i[0]==="["?(t.push(...r.sort(),i),r=[]):r.push(i)}),t.push(...r.sort()),t},Vu=e=>({cache:Bu(e.cacheSize),parseClassName:Mu(e),...Nu(e)}),Hu=/\s+/,Gu=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s}=t,o=[],n=e.trim().split(Hu);let h="";for(let u=n.length-1;u>=0;u-=1){const g=n[u],{modifiers:y,hasImportantModifier:w,baseClassName:E,maybePostfixModifierPosition:C}=r(g);let S=!!C,k=i(S?E.substring(0,C):E);if(!k){if(!S){h=g+(h.length>0?" "+h:h);continue}if(k=i(E),!k){h=g+(h.length>0?" "+h:h);continue}S=!1}const O=qu(y).join(":"),A=w?O+ic:O,F=A+k;if(o.includes(F))continue;o.push(F);const V=s(k,S);for(let M=0;M<V.length;++M){const J=V[M];o.push(A+J)}h=g+(h.length>0?" "+h:h)}return h};function Wu(){let e=0,t,r,i="";for(;e<arguments.length;)(t=arguments[e++])&&(r=sc(t))&&(i&&(i+=" "),i+=r);return i}const sc=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=sc(e[i]))&&(r&&(r+=" "),r+=t);return r};function Ku(e,...t){let r,i,s,o=n;function n(u){const g=t.reduce((y,w)=>w(y),e());return r=Vu(g),i=r.cache.get,s=r.cache.set,o=h,h(u)}function h(u){const g=i(u);if(g)return g;const y=Gu(u,r);return s(u,y),y}return function(){return o(Wu.apply(null,arguments))}}const X=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},oc=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yu=/^\d+\/\d+$/,Xu=new Set(["px","full","screen"]),Zu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ju=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Qu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ep=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fe=e=>Mr(e)||Xu.has(e)||Yu.test(e),Re=e=>Yr(e,"length",dp),Mr=e=>!!e&&!Number.isNaN(Number(e)),Vo=e=>Yr(e,"number",Mr),li=e=>!!e&&Number.isInteger(Number(e)),rp=e=>e.endsWith("%")&&Mr(e.slice(0,-1)),j=e=>oc.test(e),Ie=e=>Zu.test(e),ip=new Set(["length","size","percentage"]),sp=e=>Yr(e,ip,nc),op=e=>Yr(e,"position",nc),np=new Set(["image","url"]),ap=e=>Yr(e,np,hp),lp=e=>Yr(e,"",cp),di=()=>!0,Yr=(e,t,r)=>{const i=oc.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):r(i[2]):!1},dp=e=>Ju.test(e)&&!Qu.test(e),nc=()=>!1,cp=e=>tp.test(e),hp=e=>ep.test(e),up=()=>{const e=X("colors"),t=X("spacing"),r=X("blur"),i=X("brightness"),s=X("borderColor"),o=X("borderRadius"),n=X("borderSpacing"),h=X("borderWidth"),u=X("contrast"),g=X("grayscale"),y=X("hueRotate"),w=X("invert"),E=X("gap"),C=X("gradientColorStops"),S=X("gradientColorStopPositions"),k=X("inset"),O=X("margin"),A=X("opacity"),F=X("padding"),V=X("saturate"),M=X("scale"),J=X("sepia"),it=X("skew"),st=X("space"),U=X("translate"),vt=()=>["auto","contain","none"],Wt=()=>["auto","hidden","clip","visible","scroll"],ue=()=>["auto",j,t],P=()=>[j,t],Be=()=>["",fe,Re],Nt=()=>["auto",Mr,j],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Kt=()=>["solid","dashed","dotted","double","none"],zt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],jt=()=>["start","end","center","between","around","evenly","stretch"],Ft=()=>["","0",j],we=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ot=()=>[Mr,j];return{cacheSize:500,separator:":",theme:{colors:[di],spacing:[fe,Re],blur:["none","",Ie,j],brightness:ot(),borderColor:[e],borderRadius:["none","","full",Ie,j],borderSpacing:P(),borderWidth:Be(),contrast:ot(),grayscale:Ft(),hueRotate:ot(),invert:Ft(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[rp,Re],inset:ue(),margin:ue(),opacity:ot(),padding:P(),saturate:ot(),scale:ot(),sepia:Ft(),skew:ot(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",j]}],container:["container"],columns:[{columns:[Ie]}],"break-after":[{"break-after":we()}],"break-before":[{"break-before":we()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...pe(),j]}],overflow:[{overflow:Wt()}],"overflow-x":[{"overflow-x":Wt()}],"overflow-y":[{"overflow-y":Wt()}],overscroll:[{overscroll:vt()}],"overscroll-x":[{"overscroll-x":vt()}],"overscroll-y":[{"overscroll-y":vt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",li,j]}],basis:[{basis:ue()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",j]}],grow:[{grow:Ft()}],shrink:[{shrink:Ft()}],order:[{order:["first","last","none",li,j]}],"grid-cols":[{"grid-cols":[di]}],"col-start-end":[{col:["auto",{span:["full",li,j]},j]}],"col-start":[{"col-start":Nt()}],"col-end":[{"col-end":Nt()}],"grid-rows":[{"grid-rows":[di]}],"row-start-end":[{row:["auto",{span:[li,j]},j]}],"row-start":[{"row-start":Nt()}],"row-end":[{"row-end":Nt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",j]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",j]}],gap:[{gap:[E]}],"gap-x":[{"gap-x":[E]}],"gap-y":[{"gap-y":[E]}],"justify-content":[{justify:["normal",...jt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...jt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...jt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[F]}],px:[{px:[F]}],py:[{py:[F]}],ps:[{ps:[F]}],pe:[{pe:[F]}],pt:[{pt:[F]}],pr:[{pr:[F]}],pb:[{pb:[F]}],pl:[{pl:[F]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[st]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[st]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",j,t]}],"min-w":[{"min-w":[j,t,"min","max","fit"]}],"max-w":[{"max-w":[j,t,"none","full","min","max","fit","prose",{screen:[Ie]},Ie]}],h:[{h:[j,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[j,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ie,Re]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vo]}],"font-family":[{font:[di]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",j]}],"line-clamp":[{"line-clamp":["none",Mr,Vo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fe,j]}],"list-image":[{"list-image":["none",j]}],"list-style-type":[{list:["none","disc","decimal",j]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Kt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fe,Re]}],"underline-offset":[{"underline-offset":["auto",fe,j]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...pe(),op]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",sp]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ap]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...Kt(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:Kt()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Kt()]}],"outline-offset":[{"outline-offset":[fe,j]}],"outline-w":[{outline:[fe,Re]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[fe,Re]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ie,lp]}],"shadow-color":[{shadow:[di]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...zt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":zt()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Ie,j]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[w]}],saturate:[{saturate:[V]}],sepia:[{sepia:[J]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",j]}],duration:[{duration:ot()}],ease:[{ease:["linear","in","out","in-out",j]}],delay:[{delay:ot()}],animate:[{animate:["none","spin","ping","pulse","bounce",j]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[li,j]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[it]}],"skew-y":[{"skew-y":[it]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",j]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",j]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",j]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fe,Re,Vo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},pp=Ku(up);function Z(...e){return pp(Lu(e))}function R(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function gp(e){document.documentElement.setAttribute("data-theme",e)}function mp(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&gp("light")}function dd(){return document.documentElement.getAttribute("data-theme")}function bn(e,t){return e.includes("{{theme}}")?e.replace("{{theme}}",t):e}function St(e){const t={},r={};for(const i in e){const s=e[i];s!=null&&(i in pt&&typeof s=="object"?r[i]=s:t[i]=s)}return{base:t,responsive:r}}function bp(e){return{...pt,...e??{}}}function $t(e,t,r){const i=bp(r);let s="";for(const n in t){const u=`(min-width: ${i[n]})`,g=Object.entries(t[n]).map(([y,w])=>`${y}: ${w} !important;`).join(" ");s+=`@media ${u} { #${e} { ${g} } }
5511
- `}let o=document.getElementById(`responsive-style-${e}`);o||(o=document.createElement("style"),o.id=`responsive-style-${e}`,document.head.appendChild(o)),o.textContent=s}function Si(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}async function fp(e,t){if(!t.length)return;await Si();const r=e.offsetWidth,i=t.length,s=60,o=8;let n=1,h=0,u=-1;for(let g=1;g<=i;g++){const y=o*(g-1),w=(r-y)/g,E=i%g;if(w<s)continue;let C=0;if(E===0&&g>n)C=u+1;else if(E>=2)C=2;else continue;(C>u||C===u&&w>h)&&(n=g,h=w,u=C)}e.style.setProperty("--sso-cols",String(n)),e.style.setProperty("--sso-gap",`${o}px`),e.style.setProperty("--sso-item-width","calc(100% / var(--sso-cols) - var(--sso-gap) / var(--sso-cols) * (var(--sso-cols) - 1))")}function xs(e,t){const r={...e};for(const i in t){const s=t[i],o=r[i];s&&typeof s=="object"&&!Array.isArray(s)?r[i]=xs(o??{},s):r[i]=s}return r}function Vt(e,t){var r,i,s,o,n,h,u,g,y,w,E,C;return{default:(i=(r=t.byType)==null?void 0:r.buttons)==null?void 0:i.defaultButton,secondary:(o=(s=t.byType)==null?void 0:s.buttons)==null?void 0:o.secondaryButton,link:(h=(n=t.byType)==null?void 0:n.buttons)==null?void 0:h.linkButton,destructive:(g=(u=t.byType)==null?void 0:u.buttons)==null?void 0:g.destructiveButton,ghost:(w=(y=t.byType)==null?void 0:y.buttons)==null?void 0:w.ghostButton,outline:(C=(E=t.byType)==null?void 0:E.buttons)==null?void 0:C.outlineButton}[e]}function I(e,t,r,i,s,o=!1){var g,y;let n=e||"",h={...t};o&&((g=s==null?void 0:s.config)!=null&&g.font)&&(n=Z(n,s.config.font));const u=w=>{if(!w)return;const{class:E,style:C,font:S,rule:k="merge"}=w;k==="override"?(n=S||E||"",h=C||{}):(n=Z(n,E,S),h={...h,...C})};return u(r),i&&((y=s==null?void 0:s.byId)!=null&&y[i])&&u(s.byId[i]),{class:n,style:h}}const cd="abcdefghijklmnopqrstuvwxyz0123456789",vp=6;function yp(e){let t="";for(let r=0;r<vp;r++)t+=cd.charAt(Math.floor(Math.random()*cd.length));return t}const _t=()=>yp();function Ss(e){if(!(e!=null&&e.startsWith("data:image/svg+xml;base64,")))return null;try{const t=e.replace("data:image/svg+xml;base64,","");return atob(t)}catch(t){return console.error("Invalid base64 SVG:",t),null}}function ac(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function wp(e){try{const t=e.replace(/^data:text\/html;base64,/,"");return decodeURIComponent(escape(atob(t)))}catch(t){return console.error("Failed to decode base64 html:",t),""}}var _p=Object.defineProperty,xp=Object.getOwnPropertyDescriptor,fn=(e,t,r,i)=>{for(var s=i>1?void 0:i?xp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&_p(t,r,s),s};exports.SbTextRenderer=class extends v{createRenderRoot(){return this}render(){var o,n;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,{...this.element.style,textAlign:this.element.properties.text_alignment},void 0,this.element.id,void 0),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((n=(o=this.component.customizations)==null?void 0:o.config)==null?void 0:n.breakpoints)??pt),d`
5510
+ `}};l([a({type:String}),c("design:type",String)],Mo.prototype,"defaultValue",void 0),Mo=l([p("light-sample-demo"),c("design:paramtypes",[])],Mo);var fu=new Set(["children","localName","ref","style","className"]),nd=new WeakMap,vu=(e,t,r,i,s)=>{let o=s==null?void 0:s[t];o===void 0||r===i?r==null&&t in HTMLElement.prototype?e.removeAttribute(t):e[t]=r:((n,h,u)=>{let g=nd.get(n);g===void 0&&nd.set(n,g=new Map);let y=g.get(h);u===void 0?y!==void 0&&(g.delete(h),n.removeEventListener(h,y)):y===void 0?(g.set(h,y={handleEvent:u}),n.addEventListener(h,y)):y.handleEvent=u})(e,o,r)},yu=(e,t)=>{typeof e=="function"?e(t):e.current=t};function qd(e=window.React,t,r,i,s){let o,n,h;{let C=e;({tagName:n,elementClass:h,events:i,displayName:s}=C),o=C.react}let u=o.Component,g=o.createElement,y=new Set(Object.keys(i??{}));class w extends u{constructor(){super(...arguments),this.o=null}t(S){if(this.o!==null)for(let k in this.i)vu(this.o,k,this.props[k],S?S[k]:void 0,i)}componentDidMount(){var S;this.t(),(S=this.o)==null||S.removeAttribute("defer-hydration")}componentDidUpdate(S){this.t(S)}render(){let{_$Gl:S,...k}=this.props;this.h!==S&&(this.u=A=>{S!==null&&yu(S,A),this.o=A,this.h=S}),this.i={};let O={ref:this.u};for(let[A,F]of Object.entries(k))fu.has(A)?O[A==="className"?"class":A]=F:y.has(A)||A in h.prototype?this.i[A]=F:O[A]=F;return O.suppressHydrationWarning=!0,g(n,O)}}w.displayName=s??h.name;let E=o.forwardRef(((C,S)=>g(w,{...C,_$Gl:S},C==null?void 0:C.children)));return E.displayName=w.displayName,E}var wu=Pd((e=>{var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),h=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),C=Symbol.iterator;function S(f){return typeof f!="object"||!f?null:(f=C&&f[C]||f["@@iterator"],typeof f=="function"?f:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,A={};function F(f,$,N){this.props=f,this.context=$,this.refs=A,this.updater=N||k}F.prototype.isReactComponent={},F.prototype.setState=function(f,$){if(typeof f!="object"&&typeof f!="function"&&f!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,f,$,"setState")},F.prototype.forceUpdate=function(f){this.updater.enqueueForceUpdate(this,f,"forceUpdate")};function V(){}V.prototype=F.prototype;function M(f,$,N){this.props=f,this.context=$,this.refs=A,this.updater=N||k}var Q=M.prototype=new V;Q.constructor=M,O(Q,F.prototype),Q.isPureReactComponent=!0;var it=Array.isArray;function st(){}var j={H:null,A:null,T:null,S:null},vt=Object.prototype.hasOwnProperty;function Wt(f,$,N){var L=N.ref;return{$$typeof:t,type:f,key:$,ref:L===void 0?null:L,props:N}}function ue(f,$){return Wt(f.type,$,f.props)}function P(f){return typeof f=="object"&&!!f&&f.$$typeof===t}function Be(f){var $={"=":"=0",":":"=2"};return"$"+f.replace(/[=:]/g,function(N){return $[N]})}var Nt=/\/+/g;function pe(f,$){return typeof f=="object"&&f&&f.key!=null?Be(""+f.key):$.toString(36)}function Kt(f){switch(f.status){case"fulfilled":return f.value;case"rejected":throw f.reason;default:switch(typeof f.status=="string"?f.then(st,st):(f.status="pending",f.then(function($){f.status==="pending"&&(f.status="fulfilled",f.value=$)},function($){f.status==="pending"&&(f.status="rejected",f.reason=$)})),f.status){case"fulfilled":return f.value;case"rejected":throw f.reason}}throw f}function zt(f,$,N,L,B){var H=typeof f;(H==="undefined"||H==="boolean")&&(f=null);var K=!1;if(f===null)K=!0;else switch(H){case"bigint":case"string":case"number":K=!0;break;case"object":switch(f.$$typeof){case t:case r:K=!0;break;case w:return K=f._init,zt(K(f._payload),$,N,L,B)}}if(K)return B=B(f),K=L===""?"."+pe(f,0):L,it(B)?(N="",K!=null&&(N=K.replace(Nt,"$&/")+"/"),zt(B,$,N,"",function(mc){return mc})):B!=null&&(P(B)&&(B=ue(B,N+(B.key==null||f&&f.key===B.key?"":(""+B.key).replace(Nt,"$&/")+"/")+K)),$.push(B)),1;K=0;var ie=L===""?".":L+":";if(it(f))for(var Ct=0;Ct<f.length;Ct++)L=f[Ct],H=ie+pe(L,Ct),K+=zt(L,$,N,H,B);else if(Ct=S(f),typeof Ct=="function")for(f=Ct.call(f),Ct=0;!(L=f.next()).done;)L=L.value,H=ie+pe(L,Ct++),K+=zt(L,$,N,H,B);else if(H==="object"){if(typeof f.then=="function")return zt(Kt(f),$,N,L,B);throw $=String(f),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return K}function Ut(f,$,N){if(f==null)return f;var L=[],B=0;return zt(f,L,"","",function(H){return $.call(N,H,B++)}),L}function Ft(f){if(f._status===-1){var $=f._result;$=$(),$.then(function(N){(f._status===0||f._status===-1)&&(f._status=1,f._result=N)},function(N){(f._status===0||f._status===-1)&&(f._status=2,f._result=N)}),f._status===-1&&(f._status=0,f._result=$)}if(f._status===1)return f._result.default;throw f._result}var we=typeof reportError=="function"?reportError:function(f){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof f=="object"&&f&&typeof f.message=="string"?String(f.message):String(f),error:f});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",f);return}console.error(f)},ot={map:Ut,forEach:function(f,$,N){Ut(f,function(){$.apply(this,arguments)},N)},count:function(f){var $=0;return Ut(f,function(){$++}),$},toArray:function(f){return Ut(f,function($){return $})||[]},only:function(f){if(!P(f))throw Error("React.Children.only expected to receive a single React element child.");return f}};e.Activity=E,e.Children=ot,e.Component=F,e.Fragment=i,e.Profiler=o,e.PureComponent=M,e.StrictMode=s,e.Suspense=g,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,e.__COMPILER_RUNTIME={__proto__:null,c:function(f){return j.H.useMemoCache(f)}},e.cache=function(f){return function(){return f.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(f,$,N){if(f==null)throw Error("The argument must be a React element, but you passed "+f+".");var L=O({},f.props),B=f.key;if($!=null)for(H in $.key!==void 0&&(B=""+$.key),$)!vt.call($,H)||H==="key"||H==="__self"||H==="__source"||H==="ref"&&$.ref===void 0||(L[H]=$[H]);var H=arguments.length-2;if(H===1)L.children=N;else if(1<H){for(var K=Array(H),ie=0;ie<H;ie++)K[ie]=arguments[ie+2];L.children=K}return Wt(f.type,B,L)},e.createContext=function(f){return f={$$typeof:h,_currentValue:f,_currentValue2:f,_threadCount:0,Provider:null,Consumer:null},f.Provider=f,f.Consumer={$$typeof:n,_context:f},f},e.createElement=function(f,$,N){var L,B={},H=null;if($!=null)for(L in $.key!==void 0&&(H=""+$.key),$)vt.call($,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(B[L]=$[L]);var K=arguments.length-2;if(K===1)B.children=N;else if(1<K){for(var ie=Array(K),Ct=0;Ct<K;Ct++)ie[Ct]=arguments[Ct+2];B.children=ie}if(f&&f.defaultProps)for(L in K=f.defaultProps,K)B[L]===void 0&&(B[L]=K[L]);return Wt(f,H,B)},e.createRef=function(){return{current:null}},e.forwardRef=function(f){return{$$typeof:u,render:f}},e.isValidElement=P,e.lazy=function(f){return{$$typeof:w,_payload:{_status:-1,_result:f},_init:Ft}},e.memo=function(f,$){return{$$typeof:y,type:f,compare:$===void 0?null:$}},e.startTransition=function(f){var $=j.T,N={};j.T=N;try{var L=f(),B=j.S;B!==null&&B(N,L),typeof L=="object"&&L&&typeof L.then=="function"&&L.then(st,we)}catch(H){we(H)}finally{$!==null&&N.types!==null&&($.types=N.types),j.T=$}},e.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},e.use=function(f){return j.H.use(f)},e.useActionState=function(f,$,N){return j.H.useActionState(f,$,N)},e.useCallback=function(f,$){return j.H.useCallback(f,$)},e.useContext=function(f){return j.H.useContext(f)},e.useDebugValue=function(){},e.useDeferredValue=function(f,$){return j.H.useDeferredValue(f,$)},e.useEffect=function(f,$){return j.H.useEffect(f,$)},e.useEffectEvent=function(f){return j.H.useEffectEvent(f)},e.useId=function(){return j.H.useId()},e.useImperativeHandle=function(f,$,N){return j.H.useImperativeHandle(f,$,N)},e.useInsertionEffect=function(f,$){return j.H.useInsertionEffect(f,$)},e.useLayoutEffect=function(f,$){return j.H.useLayoutEffect(f,$)},e.useMemo=function(f,$){return j.H.useMemo(f,$)},e.useOptimistic=function(f,$){return j.H.useOptimistic(f,$)},e.useReducer=function(f,$,N){return j.H.useReducer(f,$,N)},e.useRef=function(f){return j.H.useRef(f)},e.useState=function(f){return j.H.useState(f)},e.useSyncExternalStore=function(f,$,N){return j.H.useSyncExternalStore(f,$,N)},e.useTransition=function(){return j.H.useTransition()},e.version="19.2.4"})),Vd=oh(Pd(((e,t)=>{t.exports=wu()}))());qd({tagName:"rtg-button",elementClass:Yt,react:Vd.default});qd({tagName:"rtg-checkbox",elementClass:Dt,react:Vd.default});const _u="sb-relative sb-overflow-hidden sb-w-1/3 sb-h-2 sb-linear-bar",xu="sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100%-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100%-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]",Su="sb-h-[100%] sb-min-w-[375px] sb-max-w-[609px] sb-w-[calc(100vw-30px)] sm:sb-max-w-[735px] md:sb-w-[calc(100vw-32px)] md:sb-max-w-[800px] lg:sb-min-w-[800px]",$u="sb-fixed sb-inset-0 sb-z-[9999] sb-flex sb-items-center sb-justify-center sb-p-4 sb-overflow-auto",Cu="sb-w-fit sb-flex sb-max-h-[calc(100vh-60px)] sb-bg-background sb-shadow-2xl sb-ring-1 sb-ring-border sb-rounded-xl sb-overflow-hidden",Eu="sb-justify-self-center sb-rotate-0",ku="sb-border-0 sb-bg-background !sb-m-0",Ru="sb-border sb-rounded-2xl sb-relative sb-py-6",Iu="!sb-text-left sb-text-foreground sb-font-normal hover:!sb-bg-muted !sb-text-sm sb-rounded-md !sb-shadow-none data-[state=active]:!sb-bg-muted",Ou="!sb-flex !sb-justify-start !sb-flex-nowrap !sb-w-full !rtg-grid-cols-2 !sb-gap-2 sb-mx-6",Au="!sb-w-[160px] sb-gap-4 ";var T=(e=>(e.USER_PROFILE_CARD_HEADER_CONTAINER="sb-user-profile-card-header-container",e.USER_PROFILE_CONTAINER="sb-user-profile",e.USER_PROFILE_SIDEBAR="sb-user-profile-sidebar-tabs",e.USER_PROFILE_SIDEBAR_TABS="sb-user-profile-sidebar-tabs",e.USER_PROFILE_SIDEBAR_BURGER_MENU="sb-user-profile-sidebar-burger-menu",e.USER_PROFILE_INPUT_LABEL="sb-user-profile-input-label",e.USER_PROFILE_INPUT_FIELD="sb-user-profile-input-field",e.USER_PROFILE_EDIT_FORM="sb-user-profile-edit-form",e.USER_PROFILE_CARD_CONTAINER="sb-user-profile-card-container",e.USER_PROFILE_EDITABLE_INPUT_FIELD="sb-user-profile-editable-input-field",e.USER_PROFILE_DEFAULT_BUTTON="sb-user-profile-default-button",e.USER_PROFILE_OUTLINE_BUTTON="sb-user-profile-outline-button",e.USER_PROFILE_OTP="sb-user-profile-otp",e.USER_PROFILE_EDIT_BUTTON="sb-user-profile-edit-button",e))(T||{});const mt={xs:"475px",sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px","3xl":"1920px","4xl":"2560px"},Pu=/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/,Fu=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Tu=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;function qo(e,t,r){const i=e.formData[t],s=[],o=u=>{if(["input","checkbox","otp"].includes(u.element_type)&&"data_key"in u&&u.data_key===t)return u;if(u.element_type==="container")for(const g of u.properties.children){const y=o(g);if(y)return y}return null},n=e.renderSpec?o(e.renderSpec.root_container):null;if(!n||!("validation"in n.properties))return;const{validation:h}=n.properties;if(!(!h||r!=="submit"&&h.on_event!==r)){if(n.hidden){delete e.errors[t];return}for(const u of h.rules){if(n.hidden)continue;let g=!0;switch(u.type){case"required":g=Hd(i,n);break;case"min_length":g=Gd(i,u.length);break;case"max_length":g=Wd(i,u.length);break;case"min_value":g=Kd(i,u.value);break;case"max_value":g=Yd(i,u.value);break;case"regex":g=Xd(i,u.regex);break;case"field_match":g=Zd(i,u.field_match?e.formData[u.field_match]:void 0);break;case"email":g=Jd(i);break;case"phone":g=Qd(i);break;case"date":g=tc(i);break;default:g=!0}!g&&u.error_message&&s.push(u.error_message)}e.errors={...e.errors,[t]:s}}}function Hd(e,t){return!(e===void 0||e===""||e===!1||t&&t.element_type==="input"&&t.properties.type==="tel"&&typeof e=="string"&&e.split("-")[1]==="")}function Gd(e,t){return typeof e=="string"?e.length>=(t??0):!0}function Wd(e,t){return typeof e=="string"?e.length<=(t??1/0):!0}function Kd(e,t){const r=typeof t=="string"?parseFloat(t):t,i=typeof e=="string"?parseFloat(e):e;return typeof i=="number"&&typeof r=="number"&&!isNaN(i)&&!isNaN(r)?i>=r:!0}function Yd(e,t){const r=typeof t=="string"?parseFloat(t):t,i=typeof e=="string"?parseFloat(e):e;return typeof i=="number"&&typeof r=="number"&&!isNaN(i)&&!isNaN(r)?i<=r:!0}function Xd(e,t){return typeof e=="string"&&t?new RegExp(t).test(e):!0}function Zd(e,t){return t!==void 0?e===t:!0}function Jd(e){return typeof e=="string"?Fu.test(e):!0}function Qd(e){return typeof e=="string"?Pu.test(e):!0}function tc(e){return typeof e=="string"?Tu.test(e):!0}function ec(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=ec(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Lu(){for(var e,t,r=0,i="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=ec(e))&&(i&&(i+=" "),i+=t);return i}const mn="-",Nu=e=>{const t=Uu(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:n=>{const h=n.split(mn);return h[0]===""&&h.length!==1&&h.shift(),rc(h,t)||zu(n)},getConflictingClassGroupIds:(n,h)=>{const u=r[n]||[];return h&&i[n]?[...u,...i[n]]:u}}},rc=(e,t)=>{var n;if(e.length===0)return t.classGroupId;const r=e[0],i=t.nextPart.get(r),s=i?rc(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(mn);return(n=t.validators.find(({validator:h})=>h(o)))==null?void 0:n.classGroupId},ad=/^\[(.+)\]$/,zu=e=>{if(ad.test(e)){const t=ad.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Uu=e=>{const{theme:t,prefix:r}=e,i={nextPart:new Map,validators:[]};return Du(Object.entries(e.classGroups),r).forEach(([o,n])=>{Jo(n,i,o,t)}),i},Jo=(e,t,r,i)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:ld(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(ju(s)){Jo(s(i),t,r,i);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,n])=>{Jo(n,ld(t,o),r,i)})})},ld=(e,t)=>{let r=e;return t.split(mn).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},ju=e=>e.isThemeGetter,Du=(e,t)=>t?e.map(([r,i])=>{const s=i.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([n,h])=>[t+n,h])):o);return[r,s]}):e,Bu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,i=new Map;const s=(o,n)=>{r.set(o,n),t++,t>e&&(t=0,i=r,r=new Map)};return{get(o){let n=r.get(o);if(n!==void 0)return n;if((n=i.get(o))!==void 0)return s(o,n),n},set(o,n){r.has(o)?r.set(o,n):s(o,n)}}},ic="!",Mu=e=>{const{separator:t,experimentalParseClassName:r}=e,i=t.length===1,s=t[0],o=t.length,n=h=>{const u=[];let g=0,y=0,w;for(let O=0;O<h.length;O++){let A=h[O];if(g===0){if(A===s&&(i||h.slice(O,O+o)===t)){u.push(h.slice(y,O)),y=O+o;continue}if(A==="/"){w=O;continue}}A==="["?g++:A==="]"&&g--}const E=u.length===0?h:h.substring(y),C=E.startsWith(ic),S=C?E.substring(1):E,k=w&&w>y?w-y:void 0;return{modifiers:u,hasImportantModifier:C,baseClassName:S,maybePostfixModifierPosition:k}};return r?h=>r({className:h,parseClassName:n}):n},qu=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(i=>{i[0]==="["?(t.push(...r.sort(),i),r=[]):r.push(i)}),t.push(...r.sort()),t},Vu=e=>({cache:Bu(e.cacheSize),parseClassName:Mu(e),...Nu(e)}),Hu=/\s+/,Gu=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s}=t,o=[],n=e.trim().split(Hu);let h="";for(let u=n.length-1;u>=0;u-=1){const g=n[u],{modifiers:y,hasImportantModifier:w,baseClassName:E,maybePostfixModifierPosition:C}=r(g);let S=!!C,k=i(S?E.substring(0,C):E);if(!k){if(!S){h=g+(h.length>0?" "+h:h);continue}if(k=i(E),!k){h=g+(h.length>0?" "+h:h);continue}S=!1}const O=qu(y).join(":"),A=w?O+ic:O,F=A+k;if(o.includes(F))continue;o.push(F);const V=s(k,S);for(let M=0;M<V.length;++M){const Q=V[M];o.push(A+Q)}h=g+(h.length>0?" "+h:h)}return h};function Wu(){let e=0,t,r,i="";for(;e<arguments.length;)(t=arguments[e++])&&(r=sc(t))&&(i&&(i+=" "),i+=r);return i}const sc=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=sc(e[i]))&&(r&&(r+=" "),r+=t);return r};function Ku(e,...t){let r,i,s,o=n;function n(u){const g=t.reduce((y,w)=>w(y),e());return r=Vu(g),i=r.cache.get,s=r.cache.set,o=h,h(u)}function h(u){const g=i(u);if(g)return g;const y=Gu(u,r);return s(u,y),y}return function(){return o(Wu.apply(null,arguments))}}const X=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},oc=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yu=/^\d+\/\d+$/,Xu=new Set(["px","full","screen"]),Zu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ju=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Qu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ep=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fe=e=>Mr(e)||Xu.has(e)||Yu.test(e),Re=e=>Yr(e,"length",dp),Mr=e=>!!e&&!Number.isNaN(Number(e)),Vo=e=>Yr(e,"number",Mr),li=e=>!!e&&Number.isInteger(Number(e)),rp=e=>e.endsWith("%")&&Mr(e.slice(0,-1)),U=e=>oc.test(e),Ie=e=>Zu.test(e),ip=new Set(["length","size","percentage"]),sp=e=>Yr(e,ip,nc),op=e=>Yr(e,"position",nc),np=new Set(["image","url"]),ap=e=>Yr(e,np,hp),lp=e=>Yr(e,"",cp),di=()=>!0,Yr=(e,t,r)=>{const i=oc.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):r(i[2]):!1},dp=e=>Ju.test(e)&&!Qu.test(e),nc=()=>!1,cp=e=>tp.test(e),hp=e=>ep.test(e),up=()=>{const e=X("colors"),t=X("spacing"),r=X("blur"),i=X("brightness"),s=X("borderColor"),o=X("borderRadius"),n=X("borderSpacing"),h=X("borderWidth"),u=X("contrast"),g=X("grayscale"),y=X("hueRotate"),w=X("invert"),E=X("gap"),C=X("gradientColorStops"),S=X("gradientColorStopPositions"),k=X("inset"),O=X("margin"),A=X("opacity"),F=X("padding"),V=X("saturate"),M=X("scale"),Q=X("sepia"),it=X("skew"),st=X("space"),j=X("translate"),vt=()=>["auto","contain","none"],Wt=()=>["auto","hidden","clip","visible","scroll"],ue=()=>["auto",U,t],P=()=>[U,t],Be=()=>["",fe,Re],Nt=()=>["auto",Mr,U],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Kt=()=>["solid","dashed","dotted","double","none"],zt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ut=()=>["start","end","center","between","around","evenly","stretch"],Ft=()=>["","0",U],we=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ot=()=>[Mr,U];return{cacheSize:500,separator:":",theme:{colors:[di],spacing:[fe,Re],blur:["none","",Ie,U],brightness:ot(),borderColor:[e],borderRadius:["none","","full",Ie,U],borderSpacing:P(),borderWidth:Be(),contrast:ot(),grayscale:Ft(),hueRotate:ot(),invert:Ft(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[rp,Re],inset:ue(),margin:ue(),opacity:ot(),padding:P(),saturate:ot(),scale:ot(),sepia:Ft(),skew:ot(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",U]}],container:["container"],columns:[{columns:[Ie]}],"break-after":[{"break-after":we()}],"break-before":[{"break-before":we()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...pe(),U]}],overflow:[{overflow:Wt()}],"overflow-x":[{"overflow-x":Wt()}],"overflow-y":[{"overflow-y":Wt()}],overscroll:[{overscroll:vt()}],"overscroll-x":[{"overscroll-x":vt()}],"overscroll-y":[{"overscroll-y":vt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",li,U]}],basis:[{basis:ue()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",U]}],grow:[{grow:Ft()}],shrink:[{shrink:Ft()}],order:[{order:["first","last","none",li,U]}],"grid-cols":[{"grid-cols":[di]}],"col-start-end":[{col:["auto",{span:["full",li,U]},U]}],"col-start":[{"col-start":Nt()}],"col-end":[{"col-end":Nt()}],"grid-rows":[{"grid-rows":[di]}],"row-start-end":[{row:["auto",{span:[li,U]},U]}],"row-start":[{"row-start":Nt()}],"row-end":[{"row-end":Nt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",U]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",U]}],gap:[{gap:[E]}],"gap-x":[{"gap-x":[E]}],"gap-y":[{"gap-y":[E]}],"justify-content":[{justify:["normal",...Ut()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ut(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ut(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[F]}],px:[{px:[F]}],py:[{py:[F]}],ps:[{ps:[F]}],pe:[{pe:[F]}],pt:[{pt:[F]}],pr:[{pr:[F]}],pb:[{pb:[F]}],pl:[{pl:[F]}],m:[{m:[O]}],mx:[{mx:[O]}],my:[{my:[O]}],ms:[{ms:[O]}],me:[{me:[O]}],mt:[{mt:[O]}],mr:[{mr:[O]}],mb:[{mb:[O]}],ml:[{ml:[O]}],"space-x":[{"space-x":[st]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[st]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",U,t]}],"min-w":[{"min-w":[U,t,"min","max","fit"]}],"max-w":[{"max-w":[U,t,"none","full","min","max","fit","prose",{screen:[Ie]},Ie]}],h:[{h:[U,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[U,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[U,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[U,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ie,Re]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vo]}],"font-family":[{font:[di]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",U]}],"line-clamp":[{"line-clamp":["none",Mr,Vo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fe,U]}],"list-image":[{"list-image":["none",U]}],"list-style-type":[{list:["none","disc","decimal",U]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Kt(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fe,Re]}],"underline-offset":[{"underline-offset":["auto",fe,U]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...pe(),op]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",sp]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ap]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...Kt(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:Kt()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Kt()]}],"outline-offset":[{"outline-offset":[fe,U]}],"outline-w":[{outline:[fe,Re]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[fe,Re]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ie,lp]}],"shadow-color":[{shadow:[di]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...zt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":zt()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Ie,U]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[w]}],saturate:[{saturate:[V]}],sepia:[{sepia:[Q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",U]}],duration:[{duration:ot()}],ease:[{ease:["linear","in","out","in-out",U]}],delay:[{delay:ot()}],animate:[{animate:["none","spin","ping","pulse","bounce",U]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[li,U]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[it]}],"skew-y":[{"skew-y":[it]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",U]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",U]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",U]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fe,Re,Vo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},pp=Ku(up);function Z(...e){return pp(Lu(e))}function R(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function gp(e){document.documentElement.setAttribute("data-theme",e)}function mp(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&gp("light")}function dd(){return document.documentElement.getAttribute("data-theme")}function bn(e,t){return e.includes("{{theme}}")?e.replace("{{theme}}",t):e}function St(e){const t={},r={};for(const i in e){const s=e[i];s!=null&&(i in mt&&typeof s=="object"?r[i]=s:t[i]=s)}return{base:t,responsive:r}}function bp(e){return{...mt,...e??{}}}function $t(e,t,r){const i=bp(r);let s="";for(const n in t){const u=`(min-width: ${i[n]})`,g=Object.entries(t[n]).map(([y,w])=>`${y}: ${w} !important;`).join(" ");s+=`@media ${u} { #${e} { ${g} } }
5511
+ `}let o=document.getElementById(`responsive-style-${e}`);o||(o=document.createElement("style"),o.id=`responsive-style-${e}`,document.head.appendChild(o)),o.textContent=s}function Si(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}async function fp(e,t){if(!t.length)return;await Si();const r=e.offsetWidth,i=t.length,s=60,o=8;let n=1,h=0,u=-1;for(let g=1;g<=i;g++){const y=o*(g-1),w=(r-y)/g,E=i%g;if(w<s)continue;let C=0;if(E===0&&g>n)C=u+1;else if(E>=2)C=2;else continue;(C>u||C===u&&w>h)&&(n=g,h=w,u=C)}e.style.setProperty("--sso-cols",String(n)),e.style.setProperty("--sso-gap",`${o}px`),e.style.setProperty("--sso-item-width","calc(100% / var(--sso-cols) - var(--sso-gap) / var(--sso-cols) * (var(--sso-cols) - 1))")}function xs(e,t){const r={...e};for(const i in t){const s=t[i],o=r[i];s&&typeof s=="object"&&!Array.isArray(s)?r[i]=xs(o??{},s):r[i]=s}return r}function Vt(e,t){var r,i,s,o,n,h,u,g,y,w,E,C;return{default:(i=(r=t.byType)==null?void 0:r.buttons)==null?void 0:i.defaultButton,secondary:(o=(s=t.byType)==null?void 0:s.buttons)==null?void 0:o.secondaryButton,link:(h=(n=t.byType)==null?void 0:n.buttons)==null?void 0:h.linkButton,destructive:(g=(u=t.byType)==null?void 0:u.buttons)==null?void 0:g.destructiveButton,ghost:(w=(y=t.byType)==null?void 0:y.buttons)==null?void 0:w.ghostButton,outline:(C=(E=t.byType)==null?void 0:E.buttons)==null?void 0:C.outlineButton}[e]}function I(e,t,r,i,s,o=!1){var g,y;let n=e||"",h={...t};o&&((g=s==null?void 0:s.config)!=null&&g.font)&&(n=Z(n,s.config.font));const u=w=>{if(!w)return;const{class:E,style:C,font:S,rule:k="merge"}=w;k==="override"?(n=S||E||"",h=C||{}):(n=Z(n,E,S),h={...h,...C})};return u(r),i&&((y=s==null?void 0:s.byId)!=null&&y[i])&&u(s.byId[i]),{class:n,style:h}}const cd="abcdefghijklmnopqrstuvwxyz0123456789",vp=6;function yp(e){let t="";for(let r=0;r<vp;r++)t+=cd.charAt(Math.floor(Math.random()*cd.length));return t}const _t=()=>yp();function Ss(e){if(!(e!=null&&e.startsWith("data:image/svg+xml;base64,")))return null;try{const t=e.replace("data:image/svg+xml;base64,","");return atob(t)}catch(t){return console.error("Invalid base64 SVG:",t),null}}function ac(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function wp(e){try{const t=e.replace(/^data:text\/html;base64,/,"");return decodeURIComponent(escape(atob(t)))}catch(t){return console.error("Failed to decode base64 html:",t),""}}var _p=Object.defineProperty,xp=Object.getOwnPropertyDescriptor,fn=(e,t,r,i)=>{for(var s=i>1?void 0:i?xp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&_p(t,r,s),s};exports.SbTextRenderer=class extends v{createRenderRoot(){return this}render(){var o,n;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,{...this.element.style,textAlign:this.element.properties.text_alignment},void 0,this.element.id,void 0),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((n=(o=this.component.customizations)==null?void 0:o.config)==null?void 0:n.breakpoints)??mt),d`
5512
5512
  <p id=${this.element.id} class=${t} style=${R(i)}>
5513
5513
  ${this.element.properties.content}
5514
5514
  </p>
@@ -5516,7 +5516,7 @@ body {
5516
5516
  * @license
5517
5517
  * Copyright 2017 Google LLC
5518
5518
  * SPDX-License-Identifier: BSD-3-Clause
5519
- */class Qo extends fs{}Qo.directiveName="unsafeSVG",Qo.resultType=2;const $s=_s(Qo);var Sp=Object.defineProperty,$p=Object.getOwnPropertyDescriptor,Cs=(e,t,r,i)=>{for(var s=i>1?void 0:i?$p(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Sp(t,r,s),s};exports.SbButtonRenderer=class extends v{constructor(){super(...arguments),this.theme=dd(),this._onClick=()=>{this._disabled||this.component.handleEvent(this.element.properties.event,this.element)}}createRenderRoot(){return this}get _disabled(){var t;return!this.component||!this.element?!1:((t=this.element.properties.requires_valid)==null?void 0:t.some(r=>{var s;const i=this.component.findElementByKey(r);return i&&"validation"in i.properties&&((s=i.properties.validation)==null?void 0:s.on_event)!=="submit"&&!this.component.isFieldValid(r)}))??!1}get _loading(){var t,r;return((r=(t=this.component)==null?void 0:t.loadingButtons)==null?void 0:r[this.element.id])??!1}patchComponentUpdate(){if(!this.component)return;const t=this.component.requestUpdate.bind(this.component);this.component.requestUpdate=(...r)=>{const i=t(...r);return this.requestUpdate(),i}}observeThemeChanges(){this.observer=new MutationObserver(()=>{this.theme=dd()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}connectedCallback(){super.connectedCallback(),this.patchComponentUpdate(),this.observeThemeChanges()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.observer)==null||t.disconnect()}_renderIcon(){const t=this.element.properties.icon_url;if(!t)return null;const r=Ss(t);return r?d`${$s(r)}`:null}render(){var C,S;if(!this.element)return null;const{type:t,size:r,invalid:i,href:s,target:o,text:n,icon_position:h}=this.element.properties,u=Vt(t,this.component.customizations),{class:g,style:y}=I(this.element.class,this.element.style,u,this.element.id,this.component.customizations),{base:w,responsive:E}=St(y);return $t(this.element.id,E,((S=(C=this.component.customizations)==null?void 0:C.config)==null?void 0:S.breakpoints)??pt),d`
5519
+ */class Qo extends fs{}Qo.directiveName="unsafeSVG",Qo.resultType=2;const $s=_s(Qo);var Sp=Object.defineProperty,$p=Object.getOwnPropertyDescriptor,Cs=(e,t,r,i)=>{for(var s=i>1?void 0:i?$p(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Sp(t,r,s),s};exports.SbButtonRenderer=class extends v{constructor(){super(...arguments),this.theme=dd(),this._onClick=()=>{this._disabled||this.component.handleEvent(this.element.properties.event,this.element)}}createRenderRoot(){return this}get _disabled(){var t;return!this.component||!this.element?!1:((t=this.element.properties.requires_valid)==null?void 0:t.some(r=>{var s;const i=this.component.findElementByKey(r);return i&&"validation"in i.properties&&((s=i.properties.validation)==null?void 0:s.on_event)!=="submit"&&!this.component.isFieldValid(r)}))??!1}get _loading(){var t,r;return((r=(t=this.component)==null?void 0:t.loadingButtons)==null?void 0:r[this.element.id])??!1}patchComponentUpdate(){if(!this.component)return;const t=this.component.requestUpdate.bind(this.component);this.component.requestUpdate=(...r)=>{const i=t(...r);return this.requestUpdate(),i}}observeThemeChanges(){this.observer=new MutationObserver(()=>{this.theme=dd()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}connectedCallback(){super.connectedCallback(),this.patchComponentUpdate(),this.observeThemeChanges()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.observer)==null||t.disconnect()}_renderIcon(){const t=this.element.properties.icon_url;if(!t)return null;const r=Ss(t);return r?d`${$s(r)}`:null}render(){var C,S;if(!this.element)return null;const{type:t,size:r,invalid:i,href:s,target:o,text:n,icon_position:h}=this.element.properties,u=Vt(t,this.component.customizations),{class:g,style:y}=I(this.element.class,this.element.style,u,this.element.id,this.component.customizations),{base:w,responsive:E}=St(y);return $t(this.element.id,E,((S=(C=this.component.customizations)==null?void 0:C.config)==null?void 0:S.breakpoints)??mt),d`
5520
5520
  <rtg-button
5521
5521
  variant=${t}
5522
5522
  size=${r??m}
@@ -5537,7 +5537,7 @@ body {
5537
5537
  * @license
5538
5538
  * Copyright 2020 Google LLC
5539
5539
  * SPDX-License-Identifier: BSD-3-Clause
5540
- */const lc=Symbol.for(""),Cp=e=>{if((e==null?void 0:e.r)===lc)return e==null?void 0:e._$litStatic$},Es=e=>({_$litStatic$:e,r:lc}),hd=new Map,Ep=e=>(t,...r)=>{const i=r.length;let s,o;const n=[],h=[];let u,g=0,y=!1;for(;g<i;){for(u=t[g];g<i&&(o=r[g],(s=Cp(o))!==void 0);)u+=s+t[++g],y=!0;g!==i&&h.push(o),n.push(u),g++}if(g===i&&n.push(t[i]),y){const w=n.join("$$lit$$");(t=hd.get(w))===void 0&&(n.raw=n,hd.set(w,t=n)),r=h}return e(t,...r)},ys=Ep(d);var kp=Object.defineProperty,Rp=Object.getOwnPropertyDescriptor,vn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Rp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&kp(t,r,s),s};exports.SbDividerRenderer=class extends v{createRenderRoot(){return this}render(){var o,n,h,u;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.divider,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((u=(h=this.component.customizations)==null?void 0:h.config)==null?void 0:u.breakpoints)??pt),ys`
5540
+ */const lc=Symbol.for(""),Cp=e=>{if((e==null?void 0:e.r)===lc)return e==null?void 0:e._$litStatic$},Es=e=>({_$litStatic$:e,r:lc}),hd=new Map,Ep=e=>(t,...r)=>{const i=r.length;let s,o;const n=[],h=[];let u,g=0,y=!1;for(;g<i;){for(u=t[g];g<i&&(o=r[g],(s=Cp(o))!==void 0);)u+=s+t[++g],y=!0;g!==i&&h.push(o),n.push(u),g++}if(g===i&&n.push(t[i]),y){const w=n.join("$$lit$$");(t=hd.get(w))===void 0&&(n.raw=n,hd.set(w,t=n)),r=h}return e(t,...r)},ys=Ep(d);var kp=Object.defineProperty,Rp=Object.getOwnPropertyDescriptor,vn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Rp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&kp(t,r,s),s};exports.SbDividerRenderer=class extends v{createRenderRoot(){return this}render(){var o,n,h,u;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.divider,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((u=(h=this.component.customizations)==null?void 0:h.config)==null?void 0:u.breakpoints)??mt),ys`
5541
5541
  <rtg-field-separator
5542
5542
  id=${this.element.id}
5543
5543
  class=${t}
@@ -5560,7 +5560,7 @@ body {
5560
5560
  class=${Z("sb-basis-full",t)}
5561
5561
  style=${R(r)}
5562
5562
  ></rtg-field-error>
5563
- `}render(){var o,n;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,void 0,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((n=(o=this.component.customizations)==null?void 0:o.config)==null?void 0:n.breakpoints)??pt),d`
5563
+ `}render(){var o,n;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,void 0,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((n=(o=this.component.customizations)==null?void 0:o.config)==null?void 0:n.breakpoints)??mt),d`
5564
5564
  <rtg-field
5565
5565
  orientation="horizontal"
5566
5566
  ?invalid=${this._errors.length>0}
@@ -5653,7 +5653,7 @@ body {
5653
5653
  ></circle>
5654
5654
  </svg>
5655
5655
  ${this.label?d`<span class="sr-only">${this.label}</span>`:null}
5656
- `}};Xr([a({type:Number})],exports.SbSpinner.prototype,"size",2);Xr([a({type:Number,attribute:"stroke-width"})],exports.SbSpinner.prototype,"strokeWidth",2);Xr([a()],exports.SbSpinner.prototype,"color",2);Xr([a()],exports.SbSpinner.prototype,"label",2);Xr([a({type:Number})],exports.SbSpinner.prototype,"duration",2);exports.SbSpinner=Xr([p("sb-spinner")],exports.SbSpinner);var zp=Object.defineProperty,jp=Object.getOwnPropertyDescriptor,_n=(e,t,r,i)=>{for(var s=i>1?void 0:i?jp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&zp(t,r,s),s};exports.SbOtpRenderer=class extends v{constructor(){super(...arguments),this._onComplete=t=>{if(!this.element.data_key)return;this.component.handleInputChange(this.element.data_key,t);const{event:r}=this.element.properties;r&&this.component.handleEvent(r,this.element)},this._onFocus=()=>{this.element.data_key&&this.component.handleFocus(this.element.data_key,this.element.id)},this._onBlur=()=>{this.element.data_key&&this.component.handleBlur(this.element.data_key)}}createRenderRoot(){return this}patchComponentRequestUpdate(){if(!this.component)return;const t=this.component.requestUpdate.bind(this.component);this.component.requestUpdate=(...r)=>{const i=t(...r);return this.requestUpdate(),i}}connectedCallback(){super.connectedCallback(),this.patchComponentRequestUpdate()}_buildOTPContentHTML(){const t=this.element.properties.variant||"digits_only",r=this.element.properties.length||6,i=(n,h)=>Array.from({length:h-n},(u,g)=>`<rtg-input-otp-slot index="${n+g}"></rtg-input-otp-slot>`).join(""),s=n=>`<rtg-input-otp-group>${n}</rtg-input-otp-group>`,o="<rtg-input-otp-separator></rtg-input-otp-separator>";if(t==="simple"){const n=Math.ceil(r/2);return s(i(0,n))+o+s(i(n,r))}if(t==="with_separator"){const n=Math.ceil(r/3);return s(i(0,n))+o+s(i(n,n*2))+o+s(i(n*2,r))}return t==="with_spacing"?Array.from({length:r},(n,h)=>s(`<rtg-input-otp-slot index="${h}"></rtg-input-otp-slot>`)).join(""):s(i(0,r))}render(){var n,h,u,g,y;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(u=(h=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:h.inputs)==null?void 0:u.inputField,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);$t(this.element.id,s,((y=(g=this.component.customizations)==null?void 0:g.config)==null?void 0:y.breakpoints)??pt);const o=this.element.properties.variant||"digits_only";return ys`
5656
+ `}};Xr([a({type:Number})],exports.SbSpinner.prototype,"size",2);Xr([a({type:Number,attribute:"stroke-width"})],exports.SbSpinner.prototype,"strokeWidth",2);Xr([a()],exports.SbSpinner.prototype,"color",2);Xr([a()],exports.SbSpinner.prototype,"label",2);Xr([a({type:Number})],exports.SbSpinner.prototype,"duration",2);exports.SbSpinner=Xr([p("sb-spinner")],exports.SbSpinner);var zp=Object.defineProperty,Up=Object.getOwnPropertyDescriptor,_n=(e,t,r,i)=>{for(var s=i>1?void 0:i?Up(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&zp(t,r,s),s};exports.SbOtpRenderer=class extends v{constructor(){super(...arguments),this._onComplete=t=>{if(!this.element.data_key)return;this.component.handleInputChange(this.element.data_key,t);const{event:r}=this.element.properties;r&&this.component.handleEvent(r,this.element)},this._onFocus=()=>{this.element.data_key&&this.component.handleFocus(this.element.data_key,this.element.id)},this._onBlur=()=>{this.element.data_key&&this.component.handleBlur(this.element.data_key)}}createRenderRoot(){return this}patchComponentRequestUpdate(){if(!this.component)return;const t=this.component.requestUpdate.bind(this.component);this.component.requestUpdate=(...r)=>{const i=t(...r);return this.requestUpdate(),i}}connectedCallback(){super.connectedCallback(),this.patchComponentRequestUpdate()}_buildOTPContentHTML(){const t=this.element.properties.variant||"digits_only",r=this.element.properties.length||6,i=(n,h)=>Array.from({length:h-n},(u,g)=>`<rtg-input-otp-slot index="${n+g}"></rtg-input-otp-slot>`).join(""),s=n=>`<rtg-input-otp-group>${n}</rtg-input-otp-group>`,o="<rtg-input-otp-separator></rtg-input-otp-separator>";if(t==="simple"){const n=Math.ceil(r/2);return s(i(0,n))+o+s(i(n,r))}if(t==="with_separator"){const n=Math.ceil(r/3);return s(i(0,n))+o+s(i(n,n*2))+o+s(i(n*2,r))}return t==="with_spacing"?Array.from({length:r},(n,h)=>s(`<rtg-input-otp-slot index="${h}"></rtg-input-otp-slot>`)).join(""):s(i(0,r))}render(){var n,h,u,g,y;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(u=(h=(n=this.component.customizations)==null?void 0:n.byType)==null?void 0:h.inputs)==null?void 0:u.inputField,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);$t(this.element.id,s,((y=(g=this.component.customizations)==null?void 0:g.config)==null?void 0:y.breakpoints)??mt);const o=this.element.properties.variant||"digits_only";return ys`
5657
5657
  <rtg-input-otp
5658
5658
  id=${this.element.data_key??this.element.id??m}
5659
5659
  name=${this.element.data_key??this.element.id??m}
@@ -5668,9 +5668,9 @@ body {
5668
5668
  .onBlur=${this._onBlur}
5669
5669
  >${Es(this._buildOTPContentHTML())}</rtg-input-otp
5670
5670
  >
5671
- `}};_n([a({type:Object})],exports.SbOtpRenderer.prototype,"element",2);_n([a({attribute:!1})],exports.SbOtpRenderer.prototype,"component",2);exports.SbOtpRenderer=_n([p("sb-otp-renderer")],exports.SbOtpRenderer);var Up=Object.defineProperty,Dp=Object.getOwnPropertyDescriptor,xn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Dp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Up(t,r,s),s};exports.SbErrorRenderer=class extends v{createRenderRoot(){return this}_renderIcon(){const t=this.element.properties.icon_url;if(!t)return null;const r=Ss(t);return r?d`${$s(r)}`:null}_renderTitle(){const{title:t}=this.element.properties;return t?d`<rtg-alert-title>${t}</rtg-alert-title>`:null}_renderDescription(){const{description:t,message:r}=this.element.properties;return!t&&!r?null:d`
5671
+ `}};_n([a({type:Object})],exports.SbOtpRenderer.prototype,"element",2);_n([a({attribute:!1})],exports.SbOtpRenderer.prototype,"component",2);exports.SbOtpRenderer=_n([p("sb-otp-renderer")],exports.SbOtpRenderer);var jp=Object.defineProperty,Dp=Object.getOwnPropertyDescriptor,xn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Dp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&jp(t,r,s),s};exports.SbErrorRenderer=class extends v{createRenderRoot(){return this}_renderIcon(){const t=this.element.properties.icon_url;if(!t)return null;const r=Ss(t);return r?d`${$s(r)}`:null}_renderTitle(){const{title:t}=this.element.properties;return t?d`<rtg-alert-title>${t}</rtg-alert-title>`:null}_renderDescription(){const{description:t,message:r}=this.element.properties;return!t&&!r?null:d`
5672
5672
  <rtg-alert-description>${t??r}</rtg-alert-description>
5673
- `}render(){var o,n,h,u,g;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(h=(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.errors)==null?void 0:h.serviceError,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((g=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??pt),d`
5673
+ `}render(){var o,n,h,u,g;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(h=(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.errors)==null?void 0:h.serviceError,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((g=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??mt),d`
5674
5674
  <rtg-alert
5675
5675
  variant=${this.element.properties.variant??"destructive"}
5676
5676
  class=${t??m}
@@ -5680,21 +5680,21 @@ body {
5680
5680
  ${this._renderTitle()}
5681
5681
  ${this._renderDescription()}
5682
5682
  </rtg-alert>
5683
- `}};xn([a({type:Object})],exports.SbErrorRenderer.prototype,"element",2);xn([a({attribute:!1})],exports.SbErrorRenderer.prototype,"component",2);exports.SbErrorRenderer=xn([p("sb-error-renderer")],exports.SbErrorRenderer);var Bp=Object.defineProperty,Mp=Object.getOwnPropertyDescriptor,Sn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Mp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Bp(t,r,s),s};exports.SbHtmlRenderer=class extends v{constructor(){super(...arguments),this._onClick=t=>{if(!this.component||!this.element)return;const r=t.composedPath().find(i=>{var s;return i instanceof HTMLElement&&((s=i.dataset)==null?void 0:s.event)});r!=null&&r.dataset.event&&this.component.handleEvent(r.dataset.event,this.element)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._onClick)}render(){var o,n;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,void 0,this.element.id,void 0),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((n=(o=this.component.customizations)==null?void 0:o.config)==null?void 0:n.breakpoints)??pt),d`
5683
+ `}};xn([a({type:Object})],exports.SbErrorRenderer.prototype,"element",2);xn([a({attribute:!1})],exports.SbErrorRenderer.prototype,"component",2);exports.SbErrorRenderer=xn([p("sb-error-renderer")],exports.SbErrorRenderer);var Bp=Object.defineProperty,Mp=Object.getOwnPropertyDescriptor,Sn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Mp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Bp(t,r,s),s};exports.SbHtmlRenderer=class extends v{constructor(){super(...arguments),this._onClick=t=>{if(!this.component||!this.element)return;const r=t.composedPath().find(i=>{var s;return i instanceof HTMLElement&&((s=i.dataset)==null?void 0:s.event)});r!=null&&r.dataset.event&&this.component.handleEvent(r.dataset.event,this.element)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._onClick)}render(){var o,n;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,void 0,this.element.id,void 0),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((n=(o=this.component.customizations)==null?void 0:o.config)==null?void 0:n.breakpoints)??mt),d`
5684
5684
  <div id=${this.element.id} class=${t} style=${R(i)}>
5685
5685
  ${ln(wp(this.element.properties.content))}
5686
5686
  </div>
5687
- `}};Sn([a({type:Object})],exports.SbHtmlRenderer.prototype,"element",2);Sn([a({attribute:!1})],exports.SbHtmlRenderer.prototype,"component",2);exports.SbHtmlRenderer=Sn([p("sb-html-renderer")],exports.SbHtmlRenderer);var qp=Object.defineProperty,Vp=Object.getOwnPropertyDescriptor,$n=(e,t,r,i)=>{for(var s=i>1?void 0:i?Vp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&qp(t,r,s),s};exports.SbGapRenderer=class extends v{createRenderRoot(){return this}render(){var h,u;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,void 0,this.element.id,void 0),i=this.element.style?this.element.style["flex-grow"]:"0";i!=null&&this.style.setProperty("flex-grow",String(i));let s={width:"0px",height:"0px"};this.element.properties.type==="vertical"?s={width:"1px",height:this.element.properties.size}:s={height:"1px",width:this.element.properties.size};const{base:o,responsive:n}=St(r);return $t(this.element.id,n,((u=(h=this.component.customizations)==null?void 0:h.config)==null?void 0:u.breakpoints)??pt),d`
5687
+ `}};Sn([a({type:Object})],exports.SbHtmlRenderer.prototype,"element",2);Sn([a({attribute:!1})],exports.SbHtmlRenderer.prototype,"component",2);exports.SbHtmlRenderer=Sn([p("sb-html-renderer")],exports.SbHtmlRenderer);var qp=Object.defineProperty,Vp=Object.getOwnPropertyDescriptor,$n=(e,t,r,i)=>{for(var s=i>1?void 0:i?Vp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&qp(t,r,s),s};exports.SbGapRenderer=class extends v{createRenderRoot(){return this}render(){var h,u;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,void 0,this.element.id,void 0),i=this.element.style?this.element.style["flex-grow"]:"0";i!=null&&this.style.setProperty("flex-grow",String(i));let s={width:"0px",height:"0px"};this.element.properties.type==="vertical"?s={width:"1px",height:this.element.properties.size}:s={height:"1px",width:this.element.properties.size};const{base:o,responsive:n}=St(r);return $t(this.element.id,n,((u=(h=this.component.customizations)==null?void 0:h.config)==null?void 0:u.breakpoints)??mt),d`
5688
5688
  <div
5689
5689
  id=${this.element.id}
5690
5690
  class=${t}
5691
5691
  style=${R({...o,...s})}
5692
5692
  ></div>
5693
- `}};$n([a({type:Object})],exports.SbGapRenderer.prototype,"element",2);$n([a({attribute:!1})],exports.SbGapRenderer.prototype,"component",2);exports.SbGapRenderer=$n([p("sb-gap-renderer")],exports.SbGapRenderer);var Hp=Object.defineProperty,Gp=Object.getOwnPropertyDescriptor,ks=(e,t,r,i)=>{for(var s=i>1?void 0:i?Gp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Hp(t,r,s),s};exports.SbCountdownRenderer=class extends v{constructor(){super(...arguments),this.seconds=0,this.timerId=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){var r;const t=((r=this.element)==null?void 0:r.properties.duration)??5;this.seconds=Math.max(0,t),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer();const t=this.element.properties.redirect_url??"/";window.location.href=t}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.element.properties.content??""} ${this.seconds}s...`}render(){var o,n,h,u,g;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(h=(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.timer)==null?void 0:h.countdowns,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((g=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??pt),d`
5693
+ `}};$n([a({type:Object})],exports.SbGapRenderer.prototype,"element",2);$n([a({attribute:!1})],exports.SbGapRenderer.prototype,"component",2);exports.SbGapRenderer=$n([p("sb-gap-renderer")],exports.SbGapRenderer);var Hp=Object.defineProperty,Gp=Object.getOwnPropertyDescriptor,ks=(e,t,r,i)=>{for(var s=i>1?void 0:i?Gp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Hp(t,r,s),s};exports.SbCountdownRenderer=class extends v{constructor(){super(...arguments),this.seconds=0,this.timerId=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){var r;const t=((r=this.element)==null?void 0:r.properties.duration)??5;this.seconds=Math.max(0,t),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer();const t=this.element.properties.redirect_url??"/";window.location.href=t}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.element.properties.content??""} ${this.seconds}s...`}render(){var o,n,h,u,g;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(h=(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.timer)==null?void 0:h.countdowns,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((g=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??mt),d`
5694
5694
  <div id=${this.element.id} class=${t} style=${R(i)}>
5695
5695
  <span>${this.renderContent()}</span>
5696
5696
  </div>
5697
- `}};ks([a({type:Object})],exports.SbCountdownRenderer.prototype,"element",2);ks([a({attribute:!1})],exports.SbCountdownRenderer.prototype,"component",2);ks([x()],exports.SbCountdownRenderer.prototype,"seconds",2);exports.SbCountdownRenderer=ks([p("sb-countdown-renderer")],exports.SbCountdownRenderer);var Wp=Object.defineProperty,Kp=Object.getOwnPropertyDescriptor,Cn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Kp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Wp(t,r,s),s};exports.SbSpinnerRenderer=class extends v{createRenderRoot(){return this}render(){var o,n,h,u,g;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(h=(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.loader)==null?void 0:h.spinner,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((g=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??pt),d`
5697
+ `}};ks([a({type:Object})],exports.SbCountdownRenderer.prototype,"element",2);ks([a({attribute:!1})],exports.SbCountdownRenderer.prototype,"component",2);ks([x()],exports.SbCountdownRenderer.prototype,"seconds",2);exports.SbCountdownRenderer=ks([p("sb-countdown-renderer")],exports.SbCountdownRenderer);var Wp=Object.defineProperty,Kp=Object.getOwnPropertyDescriptor,Cn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Kp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Wp(t,r,s),s};exports.SbSpinnerRenderer=class extends v{createRenderRoot(){return this}render(){var o,n,h,u,g;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(h=(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.loader)==null?void 0:h.spinner,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((g=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??mt),d`
5698
5698
  <sb-spinner
5699
5699
  size="20"
5700
5700
  stroke-width="2"
@@ -5761,11 +5761,11 @@ body {
5761
5761
  .component=${e}
5762
5762
  .element=${t}
5763
5763
  ?hidden=${i}
5764
- ></sb-countdown-renderer>`;default:return d`<p>Unknown element type</p>`}}var Yp=Object.defineProperty,Xp=Object.getOwnPropertyDescriptor,kn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Xp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Yp(t,r,s),s};exports.SbContainerRenderer=class extends v{constructor(){super(...arguments),this.prevChildCount=0,this.prevContainerWidth=0,this.widthUpdateScheduled=!1}async firstUpdated(t){await this.updateComplete,await Si(),this.updateWidthsIfNeeded()}async updated(t){await this.updateComplete,await Si(),this.updateWidthsIfNeeded()}updateWidthsIfNeeded(){var s,o;if(!((o=(s=this.element)==null?void 0:s.class)!=null&&o.includes("sb_social_wrap")))return;const t=Array.from(this.querySelectorAll("sb-button-renderer")),r=t.length,i=this.offsetWidth;r===this.prevChildCount&&i===this.prevContainerWidth||(this.prevChildCount=r,this.prevContainerWidth=i,this.widthUpdateScheduled||(this.widthUpdateScheduled=!0,fp(this.querySelector("div"),t).finally(()=>{this.widthUpdateScheduled=!1})))}createRenderRoot(){return this}get containerStyles(){const t=this.element.properties.type==="flex_column";return{...this.element.style,display:"flex","flex-direction":t?"column":"row"}}renderChildren(){return this.element.properties.children?this.element.properties.children.map(t=>En(this.component,t)):m}render(){var o,n,h,u;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.containerStyles,(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.container,this.element.id,this.component.customizations,!0),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((u=(h=this.component.customizations)==null?void 0:h.config)==null?void 0:u.breakpoints)??pt),d`
5764
+ ></sb-countdown-renderer>`;default:return d`<p>Unknown element type</p>`}}var Yp=Object.defineProperty,Xp=Object.getOwnPropertyDescriptor,kn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Xp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Yp(t,r,s),s};exports.SbContainerRenderer=class extends v{constructor(){super(...arguments),this.prevChildCount=0,this.prevContainerWidth=0,this.widthUpdateScheduled=!1}async firstUpdated(t){await this.updateComplete,await Si(),this.updateWidthsIfNeeded()}async updated(t){await this.updateComplete,await Si(),this.updateWidthsIfNeeded()}updateWidthsIfNeeded(){var s,o;if(!((o=(s=this.element)==null?void 0:s.class)!=null&&o.includes("sb_social_wrap")))return;const t=Array.from(this.querySelectorAll("sb-button-renderer")),r=t.length,i=this.offsetWidth;r===this.prevChildCount&&i===this.prevContainerWidth||(this.prevChildCount=r,this.prevContainerWidth=i,this.widthUpdateScheduled||(this.widthUpdateScheduled=!0,fp(this.querySelector("div"),t).finally(()=>{this.widthUpdateScheduled=!1})))}createRenderRoot(){return this}get containerStyles(){const t=this.element.properties.type==="flex_column";return{...this.element.style,display:"flex","flex-direction":t?"column":"row"}}renderChildren(){return this.element.properties.children?this.element.properties.children.map(t=>En(this.component,t)):m}render(){var o,n,h,u;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.containerStyles,(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.container,this.element.id,this.component.customizations,!0),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((u=(h=this.component.customizations)==null?void 0:h.config)==null?void 0:u.breakpoints)??mt),d`
5765
5765
  <div id=${this.element.id} class=${t} style=${R(i)}>
5766
5766
  ${this.renderChildren()}
5767
5767
  </div>
5768
- `}};kn([a({type:Object})],exports.SbContainerRenderer.prototype,"element",2);kn([a({attribute:!1})],exports.SbContainerRenderer.prototype,"component",2);exports.SbContainerRenderer=kn([p("sb-container-renderer")],exports.SbContainerRenderer);var Zp=Object.defineProperty,Jp=Object.getOwnPropertyDescriptor,Rs=(e,t,r,i)=>{for(var s=i>1?void 0:i?Jp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Zp(t,r,s),s};exports.SbImage=class extends v{constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){var n,h;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,void 0,this.element.id,void 0),i=bn(this.element.properties.image_url,this.theme),{base:s,responsive:o}=St(r);return $t(this.element.id,o,((h=(n=this.component.customizations)==null?void 0:n.config)==null?void 0:h.breakpoints)??pt),d`
5768
+ `}};kn([a({type:Object})],exports.SbContainerRenderer.prototype,"element",2);kn([a({attribute:!1})],exports.SbContainerRenderer.prototype,"component",2);exports.SbContainerRenderer=kn([p("sb-container-renderer")],exports.SbContainerRenderer);var Zp=Object.defineProperty,Jp=Object.getOwnPropertyDescriptor,Rs=(e,t,r,i)=>{for(var s=i>1?void 0:i?Jp(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Zp(t,r,s),s};exports.SbImage=class extends v{constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){var n,h;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,void 0,this.element.id,void 0),i=bn(this.element.properties.image_url,this.theme),{base:s,responsive:o}=St(r);return $t(this.element.id,o,((h=(n=this.component.customizations)==null?void 0:n.config)==null?void 0:h.breakpoints)??mt),d`
5769
5769
  <img class=${t} src=${i} style=${R(s)} />
5770
5770
  `}};Rs([a({type:Object})],exports.SbImage.prototype,"element",2);Rs([a({attribute:!1})],exports.SbImage.prototype,"component",2);Rs([x()],exports.SbImage.prototype,"theme",2);exports.SbImage=Rs([p("sb-image")],exports.SbImage);var Qp=Object.defineProperty,tg=Object.getOwnPropertyDescriptor,Rn=(e,t,r,i)=>{for(var s=i>1?void 0:i?tg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Qp(t,r,s),s};exports.SbWatermarkRenderer=class extends v{constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){if(!this.element)return null;const{class:t}=I(this.element.class,void 0,void 0,this.element.id,void 0);return d`
5771
5771
  <sb-watermark
@@ -5773,7 +5773,7 @@ body {
5773
5773
  class=${t}
5774
5774
  label=${this.element.properties.label}
5775
5775
  ></sb-watermark>
5776
- `}};Rn([a({type:Object})],exports.SbWatermarkRenderer.prototype,"element",2);Rn([x()],exports.SbWatermarkRenderer.prototype,"theme",2);exports.SbWatermarkRenderer=Rn([p("sb-watermark-renderer")],exports.SbWatermarkRenderer);var eg=Object.defineProperty,rg=Object.getOwnPropertyDescriptor,Is=(e,t,r,i)=>{for(var s=i>1?void 0:i?rg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&eg(t,r,s),s};exports.SbLogoRenderer=class extends v{constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.style.display="grid",this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){var h,u,g,y;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(u=(h=this.component.customizations)==null?void 0:h.byType)==null?void 0:u.logo,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);$t(this.element.id,s,((y=(g=this.component.customizations)==null?void 0:g.config)==null?void 0:y.breakpoints)??pt);const o=bn(this.element.properties.image_url,this.theme),n=o?Ss(o):null;return n?d`
5776
+ `}};Rn([a({type:Object})],exports.SbWatermarkRenderer.prototype,"element",2);Rn([x()],exports.SbWatermarkRenderer.prototype,"theme",2);exports.SbWatermarkRenderer=Rn([p("sb-watermark-renderer")],exports.SbWatermarkRenderer);var eg=Object.defineProperty,rg=Object.getOwnPropertyDescriptor,Is=(e,t,r,i)=>{for(var s=i>1?void 0:i?rg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&eg(t,r,s),s};exports.SbLogoRenderer=class extends v{constructor(){super(...arguments),this.theme=this.getTheme()}connectedCallback(){super.connectedCallback(),this.style.display="grid",this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")}createRenderRoot(){return this}render(){var h,u,g,y;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(u=(h=this.component.customizations)==null?void 0:h.byType)==null?void 0:u.logo,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);$t(this.element.id,s,((y=(g=this.component.customizations)==null?void 0:g.config)==null?void 0:y.breakpoints)??mt);const o=bn(this.element.properties.image_url,this.theme),n=o?Ss(o):null;return n?d`
5777
5777
  <div class=${t} style=${R(i)}>
5778
5778
  ${$s(n)}
5779
5779
  </div>
@@ -5797,7 +5797,7 @@ body {
5797
5797
  class=${t}
5798
5798
  style=${r}
5799
5799
  ></rtg-field-error>
5800
- `}render(){var u,g,y,w,E,C,S,k;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(y=(g=(u=this.component.customizations)==null?void 0:u.byType)==null?void 0:g.inputs)==null?void 0:y.inputContainer,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);$t(this.element.id,s,((E=(w=this.component.customizations)==null?void 0:w.config)==null?void 0:E.breakpoints)??pt);const{class:o,style:n}=I("",{},(k=(S=(C=this.component.customizations)==null?void 0:C.byType)==null?void 0:S.inputs)==null?void 0:k.inputField,this.element.id,this.component.customizations),h=this.element.data_key?this.component.formData[this.element.data_key]:"";return d`
5800
+ `}render(){var u,g,y,w,E,C,S,k;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(y=(g=(u=this.component.customizations)==null?void 0:u.byType)==null?void 0:g.inputs)==null?void 0:y.inputContainer,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);$t(this.element.id,s,((E=(w=this.component.customizations)==null?void 0:w.config)==null?void 0:E.breakpoints)??mt);const{class:o,style:n}=I("",{},(k=(S=(C=this.component.customizations)==null?void 0:C.byType)==null?void 0:S.inputs)==null?void 0:k.inputField,this.element.id,this.component.customizations),h=this.element.data_key?this.component.formData[this.element.data_key]:"";return d`
5801
5801
  <rtg-field
5802
5802
  ?invalid=${this._invalid}
5803
5803
  class=${t}
@@ -5821,7 +5821,7 @@ body {
5821
5821
  ></rtg-input>
5822
5822
  ${this._invalid?this._renderError():this._renderHint()}
5823
5823
  </rtg-field>
5824
- `}};In([a({type:Object})],exports.SbInputRenderer.prototype,"element",2);In([a({attribute:!1})],exports.SbInputRenderer.prototype,"component",2);exports.SbInputRenderer=In([p("sb-input-renderer")],exports.SbInputRenderer);var og=Object.defineProperty,ng=Object.getOwnPropertyDescriptor,On=(e,t,r,i)=>{for(var s=i>1?void 0:i?ng(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&og(t,r,s),s};exports.SbLabelRenderer=class extends v{createRenderRoot(){return this}render(){var o,n,h,u,g;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(h=(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.labels)==null?void 0:h.inputLabel,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((g=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??pt),d`
5824
+ `}};In([a({type:Object})],exports.SbInputRenderer.prototype,"element",2);In([a({attribute:!1})],exports.SbInputRenderer.prototype,"component",2);exports.SbInputRenderer=In([p("sb-input-renderer")],exports.SbInputRenderer);var og=Object.defineProperty,ng=Object.getOwnPropertyDescriptor,On=(e,t,r,i)=>{for(var s=i>1?void 0:i?ng(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&og(t,r,s),s};exports.SbLabelRenderer=class extends v{createRenderRoot(){return this}render(){var o,n,h,u,g;if(!this.element)return null;const{class:t,style:r}=I(this.element.class,this.element.style,(h=(n=(o=this.component.customizations)==null?void 0:o.byType)==null?void 0:n.labels)==null?void 0:h.inputLabel,this.element.id,this.component.customizations),{base:i,responsive:s}=St(r);return $t(this.element.id,s,((g=(u=this.component.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??mt),d`
5825
5825
  <rtg-label
5826
5826
  for=${this.element.properties.for??m}
5827
5827
  class=${t??m}
@@ -5969,7 +5969,7 @@ body {
5969
5969
  </rtg-alert-description>
5970
5970
  `:m}
5971
5971
  </rtg-alert>
5972
- `}};exports.SbError._ROOT="error";exports.SbError._ICON="icon";exports.SbError._TITLE="title";exports.SbError._DESCRIPTION="description";Zr([a({type:String})],exports.SbError.prototype,"seed",2);Zr([a({attribute:"child-id",type:String})],exports.SbError.prototype,"childId",2);Zr([a({type:String})],exports.SbError.prototype,"variant",2);Zr([a({type:Object})],exports.SbError.prototype,"content",2);Zr([a({type:String})],exports.SbError.prototype,"icon",2);exports.SbError=Zr([p("sb-error")],exports.SbError);var bg=Object.defineProperty,fg=Object.getOwnPropertyDescriptor,Q=(e,t,r,i)=>{for(var s=i>1?void 0:i?fg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&bg(t,r,s),s};exports.SbPasswordField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="password",this.variant="simple",this.content="split",this.label="Password",this.rules=[{name:"uppercase",error:"Must contain an uppercase letter."},{name:"lowercase",error:"Must contain a lowercase letter."},{name:"number",error:"Must contain a number."},{name:"special",error:"Must contain a special character."}],this.requiredError="Password is a required field.",this.formatError="Enter a valid password.",this._invalid=!1,this._errors=[],this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbPasswordField.parts.input}"] input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=`[part="${exports.SbPasswordField.parts.input}"]`,r=this.variant==="toggle"?`rtg-password-input${t}`:`rtg-input${t}`,i=this.querySelector(r);i&&(i.value=""),this._value="",this._invalid=!1,this._errors=[]}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbPasswordField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbPasswordField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbPasswordField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbPasswordField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbPasswordField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbPasswordField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbPasswordField._ERROR}`}get _lengths(){const t={minlength:this.minlength&&this.minlength>0?this.minlength:void 0,maxlength:this.maxlength&&this.maxlength>0?this.maxlength:void 0};return t.minlength&&t.maxlength&&t.maxlength<t.minlength&&(t.maxlength=void 0),t}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbPasswordField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._errors=[r],this._dispatchValidate(!1,"required",t,r),!1}_validateMinlength(t){const{minlength:r}=this._lengths;if(!r||t.length>=r)return!0;const i=this.minlengthError??`Password must be at least ${r} characters.`;return this._invalid=!0,this._errors=[i],this._dispatchValidate(!1,"minlength",t,i),!1}_validateMaxlength(t){const{maxlength:r}=this._lengths;if(!r||t.length<=r)return!0;const i=this.maxlengthError??`Password must be at most ${r} characters.`;return this._invalid=!0,this._errors=[i],this._dispatchValidate(!1,"maxlength",t,i),!1}_validateFormat(t){let r=!0;const i=[];for(const o of this.rules)(o.name?exports.SbPasswordField._PATTERNS[o.name]:new RegExp(o.pattern)).test(t)||(r=!1,o.error&&i.push(o.error));if(r)return!0;const s=i.length?i.join(" "):this.formatError;return this._invalid=!0,this._errors=i.length?i:[this.formatError],this._dispatchValidate(!1,"format",t,s),!1}_doValidateSuccess(t,r){this._invalid=!1,this._errors=[],this._dispatchValidate(!0,"success",t,r)}_validate(){const t=this._value;let r=this._validateRequired(t);return r?t?(r=this._validateMinlength(t),!r||(r=this._validateMaxlength(t),!r)||(r=this._validateFormat(t),!r)?!1:(this._doValidateSuccess(t,"Valid password."),!0)):(this._doValidateSuccess(t,"Valid password (optional and empty)."),!0):!1}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
5972
+ `}};exports.SbError._ROOT="error";exports.SbError._ICON="icon";exports.SbError._TITLE="title";exports.SbError._DESCRIPTION="description";Zr([a({type:String})],exports.SbError.prototype,"seed",2);Zr([a({attribute:"child-id",type:String})],exports.SbError.prototype,"childId",2);Zr([a({type:String})],exports.SbError.prototype,"variant",2);Zr([a({type:Object})],exports.SbError.prototype,"content",2);Zr([a({type:String})],exports.SbError.prototype,"icon",2);exports.SbError=Zr([p("sb-error")],exports.SbError);var bg=Object.defineProperty,fg=Object.getOwnPropertyDescriptor,J=(e,t,r,i)=>{for(var s=i>1?void 0:i?fg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&bg(t,r,s),s};exports.SbPasswordField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="password",this.variant="toggle",this.content="split",this.label="Password",this.rules=[{name:"uppercase",error:"Must contain an uppercase letter."},{name:"lowercase",error:"Must contain a lowercase letter."},{name:"number",error:"Must contain a number."},{name:"special",error:"Must contain a special character."}],this.validation="default",this.requiredError="Password is a required field.",this.formatError="Enter a valid password.",this._invalid=!1,this._errors=[],this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbPasswordField.parts.input}"] input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=`[part="${exports.SbPasswordField.parts.input}"]`,r=this.variant==="toggle"?`rtg-password-input${t}`:`rtg-input${t}`,i=this.querySelector(r);i&&(i.value=""),this._value="",this._invalid=!1,this._errors=[]}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbPasswordField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbPasswordField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbPasswordField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbPasswordField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbPasswordField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbPasswordField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbPasswordField._ERROR}`}get _lengths(){const t={minlength:this.minlength&&this.minlength>0?this.minlength:void 0,maxlength:this.maxlength&&this.maxlength>0?this.maxlength:void 0};return t.minlength&&t.maxlength&&t.maxlength<t.minlength&&(t.maxlength=void 0),t}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbPasswordField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_handleValidateSuccess(t,r="Valid password."){this._invalid=!1,this._errors=[],this._dispatchValidate(!0,"success",t,r)}_handleValidateError(t,r,i="Invalid password.",s=[]){s.length||s.push(i),this._invalid=!0,this._errors=s,this._dispatchValidate(!1,t,r,s.join(" "))}_validate(){const t=this._value;if(this.required&&!t)return this._handleValidateError("required",t,this.requiredError),!1;if(!t||this.validation==="simple")return this._handleValidateSuccess(t),!0;const{minlength:r,maxlength:i}=this._lengths;if(r&&t.length<r)return this._handleValidateError("minlength",t,this.minlengthError??`Password must be at least ${r} characters.`),!1;if(i&&t.length>i)return this._handleValidateError("maxlength",t,this.maxlengthError??`Password must be at most ${i} characters.`),!1;let s=!0;const o=[];for(const n of this.rules)(n.name?exports.SbPasswordField._PATTERNS[n.name]:new RegExp(n.pattern)).test(t)||(s=!1,n.error&&o.push(n.error));return s?(this._handleValidateSuccess(t),!0):(this._handleValidateError("format",t,o.length?void 0:this.formatError,o),!1)}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
5973
5973
  <span
5974
5974
  id="${this.markId}"
5975
5975
  part="${exports.SbPasswordField.parts.mark}"
@@ -6044,7 +6044,7 @@ body {
6044
6044
  ${this._renderError()}
6045
6045
  ${this.content==="split"&&!this._invalid?this._renderDescription():m}
6046
6046
  </rtg-field>
6047
- `}};exports.SbPasswordField._ROOT="password-field";exports.SbPasswordField._CONTENT="content";exports.SbPasswordField._LABEL="label";exports.SbPasswordField._MARK="mark";exports.SbPasswordField._DESCRIPTION="description";exports.SbPasswordField._INPUT="input";exports.SbPasswordField._ERROR="error";exports.SbPasswordField.TAG=`sb-${exports.SbPasswordField._ROOT}`;exports.SbPasswordField._PATTERNS={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,special:/[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/};Q([a({type:String})],exports.SbPasswordField.prototype,"seed",2);Q([a({attribute:"child-id",type:String})],exports.SbPasswordField.prototype,"childId",2);Q([a({attribute:"field-id",type:String})],exports.SbPasswordField.prototype,"fieldId",2);Q([a({type:String})],exports.SbPasswordField.prototype,"name",2);Q([a({type:String})],exports.SbPasswordField.prototype,"variant",2);Q([a({type:String})],exports.SbPasswordField.prototype,"content",2);Q([a({type:String})],exports.SbPasswordField.prototype,"label",2);Q([a({type:String})],exports.SbPasswordField.prototype,"placeholder",2);Q([a({type:String})],exports.SbPasswordField.prototype,"description",2);Q([a({type:String})],exports.SbPasswordField.prototype,"mark",2);Q([a({type:Boolean})],exports.SbPasswordField.prototype,"caret",2);Q([a({type:Boolean})],exports.SbPasswordField.prototype,"disabled",2);Q([a({type:Boolean})],exports.SbPasswordField.prototype,"required",2);Q([a({type:Number})],exports.SbPasswordField.prototype,"minlength",2);Q([a({type:Number})],exports.SbPasswordField.prototype,"maxlength",2);Q([a({type:Array})],exports.SbPasswordField.prototype,"rules",2);Q([a({attribute:"required-error",type:String})],exports.SbPasswordField.prototype,"requiredError",2);Q([a({attribute:"minlength-error",type:String})],exports.SbPasswordField.prototype,"minlengthError",2);Q([a({attribute:"maxlength-error",type:String})],exports.SbPasswordField.prototype,"maxlengthError",2);Q([a({attribute:"format-error",type:String})],exports.SbPasswordField.prototype,"formatError",2);Q([x()],exports.SbPasswordField.prototype,"_invalid",2);Q([x()],exports.SbPasswordField.prototype,"_errors",2);Q([x()],exports.SbPasswordField.prototype,"_value",2);exports.SbPasswordField=Q([p("sb-password-field")],exports.SbPasswordField);var vg=Object.defineProperty,yg=Object.getOwnPropertyDescriptor,dt=(e,t,r,i)=>{for(var s=i>1?void 0:i?yg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&vg(t,r,s),s};exports.SbConfirmField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="confirm",this.variant="simple",this.content="split",this.pair="sb-password-field",this.label="Confirm Password",this.requiredError="Confirm password is a required field.",this.matchError="Passwords do not match.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbConfirmField.parts.input}"] input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=`[part="${exports.SbConfirmField.parts.input}"]`,r=this.variant==="toggle"?`rtg-password-input${t}`:`rtg-input${t}`,i=this.querySelector(r);i&&(i.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbConfirmField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbConfirmField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbConfirmField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbConfirmField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbConfirmField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbConfirmField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbConfirmField._ERROR}`}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_pairValue(){const t=this._form??document,r=this.pair,i=t.querySelector(r);if(!i)return"";const s=i.querySelector(`[part="${exports.SbPasswordField.parts.input}"] input`);return(s==null?void 0:s.value)??""}_dispatchValidate(t,r,i,s,o){const n=this.inputId,h=this.rootId,u=this.name,g=this.pair,y=new CustomEvent(exports.SbConfirmField.validateEventName,{detail:{id:n,parentId:h,name:u,value:i,pairSelector:g,pairValue:o,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(y)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateMatch(t){const r=this._pairValue();if(t===r)return!0;const i=this.matchError;return this._invalid=!0,this._error=i,this._dispatchValidate(!1,"match",t,i,r),!1}_doValidateSuccess(t,r){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_validate(){const t=this._value;let r=this._validateRequired(t);return r?t?(r=this._validateMatch(t),r?(this._doValidateSuccess(t,"Valid confirm password."),!0):!1):(this._doValidateSuccess(t,"Valid confirm password (optional and empty)."),!0):!1}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
6047
+ `}};exports.SbPasswordField._ROOT="password-field";exports.SbPasswordField._CONTENT="content";exports.SbPasswordField._LABEL="label";exports.SbPasswordField._MARK="mark";exports.SbPasswordField._DESCRIPTION="description";exports.SbPasswordField._INPUT="input";exports.SbPasswordField._ERROR="error";exports.SbPasswordField.TAG=`sb-${exports.SbPasswordField._ROOT}`;exports.SbPasswordField._PATTERNS={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,special:/[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/};J([a({type:String})],exports.SbPasswordField.prototype,"seed",2);J([a({attribute:"child-id",type:String})],exports.SbPasswordField.prototype,"childId",2);J([a({attribute:"field-id",type:String})],exports.SbPasswordField.prototype,"fieldId",2);J([a({type:String})],exports.SbPasswordField.prototype,"name",2);J([a({type:String})],exports.SbPasswordField.prototype,"variant",2);J([a({type:String})],exports.SbPasswordField.prototype,"content",2);J([a({type:String})],exports.SbPasswordField.prototype,"label",2);J([a({type:String})],exports.SbPasswordField.prototype,"placeholder",2);J([a({type:String})],exports.SbPasswordField.prototype,"description",2);J([a({type:String})],exports.SbPasswordField.prototype,"mark",2);J([a({type:Boolean})],exports.SbPasswordField.prototype,"caret",2);J([a({type:Boolean})],exports.SbPasswordField.prototype,"disabled",2);J([a({type:Boolean})],exports.SbPasswordField.prototype,"required",2);J([a({type:Number})],exports.SbPasswordField.prototype,"minlength",2);J([a({type:Number})],exports.SbPasswordField.prototype,"maxlength",2);J([a({type:Array})],exports.SbPasswordField.prototype,"rules",2);J([a({type:String})],exports.SbPasswordField.prototype,"validation",2);J([a({attribute:"required-error",type:String})],exports.SbPasswordField.prototype,"requiredError",2);J([a({attribute:"minlength-error",type:String})],exports.SbPasswordField.prototype,"minlengthError",2);J([a({attribute:"maxlength-error",type:String})],exports.SbPasswordField.prototype,"maxlengthError",2);J([a({attribute:"format-error",type:String})],exports.SbPasswordField.prototype,"formatError",2);J([x()],exports.SbPasswordField.prototype,"_invalid",2);J([x()],exports.SbPasswordField.prototype,"_errors",2);J([x()],exports.SbPasswordField.prototype,"_value",2);exports.SbPasswordField=J([p("sb-password-field")],exports.SbPasswordField);var vg=Object.defineProperty,yg=Object.getOwnPropertyDescriptor,dt=(e,t,r,i)=>{for(var s=i>1?void 0:i?yg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&vg(t,r,s),s};exports.SbConfirmField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="confirm",this.variant="toggle",this.content="split",this.pair="sb-password-field",this.label="Confirm Password",this.validation="default",this.requiredError="Confirm password is a required field.",this.matchError="Passwords do not match.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbConfirmField.parts.input}"] input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=`[part="${exports.SbConfirmField.parts.input}"]`,r=this.variant==="toggle"?`rtg-password-input${t}`:`rtg-input${t}`,i=this.querySelector(r);i&&(i.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbConfirmField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbConfirmField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbConfirmField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbConfirmField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbConfirmField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbConfirmField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbConfirmField._ERROR}`}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_pairValue(){const t=this._form??document,r=this.pair,i=t.querySelector(r);if(!i)return"";const s=i.querySelector(`[part="${exports.SbPasswordField.parts.input}"] input`);return(s==null?void 0:s.value)??""}_dispatchValidate(t,r,i,s,o){const n=this.inputId,h=this.rootId,u=this.name,g=this.pair,y=new CustomEvent(exports.SbConfirmField.validateEventName,{detail:{id:n,parentId:h,name:u,value:i,pairSelector:g,pairValue:o,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(y)}_handleValidateSuccess(t,r="Valid confirm."){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_handleValidateError(t,r,i){this._invalid=!0,this._error=i,this._dispatchValidate(!1,t,r,i)}_validate(){const t=this._value;if(this.required&&!t)return this._handleValidateError("required",t,this.requiredError),!1;if(!t||this.validation==="simple")return this._handleValidateSuccess(t),!0;const r=this._pairValue();return t!==r?(this._handleValidateError("match",t,this.matchError),!1):(this._handleValidateSuccess(t),!0)}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
6048
6048
  <span
6049
6049
  id="${this.markId}"
6050
6050
  part="${exports.SbConfirmField.parts.mark}"
@@ -6115,7 +6115,7 @@ body {
6115
6115
  ${this._renderError()}
6116
6116
  ${this.content==="split"&&!this._invalid?this._renderDescription():m}
6117
6117
  </rtg-field>
6118
- `}};exports.SbConfirmField._ROOT="confirm-field";exports.SbConfirmField._CONTENT="content";exports.SbConfirmField._LABEL="label";exports.SbConfirmField._MARK="mark";exports.SbConfirmField._DESCRIPTION="description";exports.SbConfirmField._INPUT="input";exports.SbConfirmField._ERROR="error";exports.SbConfirmField.TAG=`sb-${exports.SbConfirmField._ROOT}`;dt([a({type:String})],exports.SbConfirmField.prototype,"seed",2);dt([a({attribute:"child-id",type:String})],exports.SbConfirmField.prototype,"childId",2);dt([a({attribute:"field-id",type:String})],exports.SbConfirmField.prototype,"fieldId",2);dt([a({type:String})],exports.SbConfirmField.prototype,"name",2);dt([a({type:String})],exports.SbConfirmField.prototype,"variant",2);dt([a({type:String})],exports.SbConfirmField.prototype,"content",2);dt([a({type:String})],exports.SbConfirmField.prototype,"pair",2);dt([a({type:String})],exports.SbConfirmField.prototype,"label",2);dt([a({type:String})],exports.SbConfirmField.prototype,"placeholder",2);dt([a({type:String})],exports.SbConfirmField.prototype,"description",2);dt([a({type:String})],exports.SbConfirmField.prototype,"mark",2);dt([a({type:Boolean})],exports.SbConfirmField.prototype,"caret",2);dt([a({type:Boolean})],exports.SbConfirmField.prototype,"disabled",2);dt([a({type:Boolean})],exports.SbConfirmField.prototype,"required",2);dt([a({attribute:"required-error",type:String})],exports.SbConfirmField.prototype,"requiredError",2);dt([a({attribute:"match-error",type:String})],exports.SbConfirmField.prototype,"matchError",2);dt([x()],exports.SbConfirmField.prototype,"_invalid",2);dt([x()],exports.SbConfirmField.prototype,"_error",2);dt([x()],exports.SbConfirmField.prototype,"_value",2);exports.SbConfirmField=dt([p("sb-confirm-field")],exports.SbConfirmField);var wg=Object.defineProperty,_g=Object.getOwnPropertyDescriptor,gt=(e,t,r,i)=>{for(var s=i>1?void 0:i?_g(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&wg(t,r,s),s};exports.SbEmailField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="email",this.content="split",this.label="Email",this.requiredError="Email is a required field.",this.formatError="Enter a valid email address.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbEmailField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbEmailField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbEmailField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbEmailField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbEmailField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbEmailField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbEmailField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbEmailField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbEmailField._ERROR}`}get _normalizedValue(){return this._value.trim().toLowerCase()}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbEmailField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateFormat(t){if(!this.required&&t===""||exports.SbEmailField._PATTERN.test(t))return!0;const r=this.formatError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"format",t,r),!1}_validate(){const t=this._normalizedValue;let r=this._validateRequired(t);if(!r||(r=this._validateFormat(t),!r))return!1;const i=`Valid email address${!t&&" (optional and empty)"}.`;return this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,i),!0}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
6118
+ `}};exports.SbConfirmField._ROOT="confirm-field";exports.SbConfirmField._CONTENT="content";exports.SbConfirmField._LABEL="label";exports.SbConfirmField._MARK="mark";exports.SbConfirmField._DESCRIPTION="description";exports.SbConfirmField._INPUT="input";exports.SbConfirmField._ERROR="error";exports.SbConfirmField.TAG=`sb-${exports.SbConfirmField._ROOT}`;dt([a({type:String})],exports.SbConfirmField.prototype,"seed",2);dt([a({attribute:"child-id",type:String})],exports.SbConfirmField.prototype,"childId",2);dt([a({attribute:"field-id",type:String})],exports.SbConfirmField.prototype,"fieldId",2);dt([a({type:String})],exports.SbConfirmField.prototype,"name",2);dt([a({type:String})],exports.SbConfirmField.prototype,"variant",2);dt([a({type:String})],exports.SbConfirmField.prototype,"content",2);dt([a({type:String})],exports.SbConfirmField.prototype,"pair",2);dt([a({type:String})],exports.SbConfirmField.prototype,"label",2);dt([a({type:String})],exports.SbConfirmField.prototype,"placeholder",2);dt([a({type:String})],exports.SbConfirmField.prototype,"description",2);dt([a({type:String})],exports.SbConfirmField.prototype,"mark",2);dt([a({type:Boolean})],exports.SbConfirmField.prototype,"caret",2);dt([a({type:Boolean})],exports.SbConfirmField.prototype,"disabled",2);dt([a({type:Boolean})],exports.SbConfirmField.prototype,"required",2);dt([a({type:String})],exports.SbConfirmField.prototype,"validation",2);dt([a({attribute:"required-error",type:String})],exports.SbConfirmField.prototype,"requiredError",2);dt([a({attribute:"match-error",type:String})],exports.SbConfirmField.prototype,"matchError",2);dt([x()],exports.SbConfirmField.prototype,"_invalid",2);dt([x()],exports.SbConfirmField.prototype,"_error",2);dt([x()],exports.SbConfirmField.prototype,"_value",2);exports.SbConfirmField=dt([p("sb-confirm-field")],exports.SbConfirmField);var wg=Object.defineProperty,_g=Object.getOwnPropertyDescriptor,pt=(e,t,r,i)=>{for(var s=i>1?void 0:i?_g(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&wg(t,r,s),s};exports.SbEmailField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="email",this.content="split",this.label="Email",this.validation="default",this.requiredError="Email is a required field.",this.formatError="Enter a valid email address.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbEmailField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbEmailField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbEmailField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbEmailField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbEmailField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbEmailField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbEmailField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbEmailField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbEmailField._ERROR}`}get _normalizedValue(){return this._value.trim().toLowerCase()}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbEmailField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_handleValidateSuccess(t,r="Valid email."){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_handleValidateError(t,r,i){this._invalid=!0,this._error=i,this._dispatchValidate(!1,t,r,i)}_validate(){const t=this._normalizedValue;return this.required&&!t?(this._handleValidateError("required",t,this.requiredError),!1):!t||this.validation==="simple"?(this._handleValidateSuccess(t),!0):exports.SbEmailField._PATTERN.test(t)?(this._handleValidateSuccess(t),!0):(this._handleValidateError("format",t,this.formatError),!1)}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
6119
6119
  <span
6120
6120
  id="${this.markId}"
6121
6121
  part="${exports.SbEmailField.parts.mark}"
@@ -6175,7 +6175,7 @@ body {
6175
6175
  ${this._renderError()}
6176
6176
  ${this.content==="split"&&!this._invalid?this._renderDescription():m}
6177
6177
  </rtg-field>
6178
- `}};exports.SbEmailField._ROOT="email-field";exports.SbEmailField._CONTENT="content";exports.SbEmailField._LABEL="label";exports.SbEmailField._MARK="mark";exports.SbEmailField._DESCRIPTION="description";exports.SbEmailField._INPUT="input";exports.SbEmailField._ERROR="error";exports.SbEmailField.TAG=`sb-${exports.SbEmailField._ROOT}`;exports.SbEmailField._PATTERN=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;gt([a({type:String})],exports.SbEmailField.prototype,"seed",2);gt([a({attribute:"child-id",type:String})],exports.SbEmailField.prototype,"childId",2);gt([a({attribute:"field-id",type:String})],exports.SbEmailField.prototype,"fieldId",2);gt([a({type:String})],exports.SbEmailField.prototype,"name",2);gt([a({type:String})],exports.SbEmailField.prototype,"content",2);gt([a({type:String})],exports.SbEmailField.prototype,"label",2);gt([a({type:String})],exports.SbEmailField.prototype,"placeholder",2);gt([a({type:String})],exports.SbEmailField.prototype,"description",2);gt([a({type:String})],exports.SbEmailField.prototype,"mark",2);gt([a({type:Boolean})],exports.SbEmailField.prototype,"caret",2);gt([a({type:Boolean})],exports.SbEmailField.prototype,"disabled",2);gt([a({type:Boolean})],exports.SbEmailField.prototype,"required",2);gt([a({attribute:"required-error",type:String})],exports.SbEmailField.prototype,"requiredError",2);gt([a({attribute:"format-error",type:String})],exports.SbEmailField.prototype,"formatError",2);gt([x()],exports.SbEmailField.prototype,"_invalid",2);gt([x()],exports.SbEmailField.prototype,"_error",2);gt([x()],exports.SbEmailField.prototype,"_value",2);exports.SbEmailField=gt([p("sb-email-field")],exports.SbEmailField);var xg=Object.defineProperty,Sg=Object.getOwnPropertyDescriptor,ut=(e,t,r,i)=>{for(var s=i>1?void 0:i?Sg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&xg(t,r,s),s};exports.SbIdentifierField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="identifier",this.identifiers=[],this.content="split",this.requiredError="Identifier is a required field.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbIdentifierField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbIdentifierField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbIdentifierField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbIdentifierField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbIdentifierField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbIdentifierField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbIdentifierField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbIdentifierField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbIdentifierField._ERROR}`}get _normalizedValue(){return this._value.trim().toLowerCase()}get _label(){const t=this.identifiers;if(t.length===0)return"Identifier";let r=t[0];if(t.length>1){const i=t.slice(0,-1).join(", "),s=t.length>2?", or ":" or ",o=t.slice(-1)[0];r=i+s+o}return r.charAt(0).toUpperCase()+r.slice(1)}get _type(){return this.identifiers.length===1&&this.identifiers[0]==="email"?"email":this.identifiers.length===1&&this.identifiers[0]==="phone"?"tel":"text"}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=this.identifiers,g=new CustomEvent(exports.SbIdentifierField.validateEventName,{detail:{id:o,parentId:n,name:h,identifiers:u,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(g)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validate(){const t=this._normalizedValue;if(!this._validateRequired(t))return!1;const i=`Valid identifier${t?"":" (optional and empty)"}.`;return this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,i),!0}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
6178
+ `}};exports.SbEmailField._ROOT="email-field";exports.SbEmailField._CONTENT="content";exports.SbEmailField._LABEL="label";exports.SbEmailField._MARK="mark";exports.SbEmailField._DESCRIPTION="description";exports.SbEmailField._INPUT="input";exports.SbEmailField._ERROR="error";exports.SbEmailField.TAG=`sb-${exports.SbEmailField._ROOT}`;exports.SbEmailField._PATTERN=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;pt([a({type:String})],exports.SbEmailField.prototype,"seed",2);pt([a({attribute:"child-id",type:String})],exports.SbEmailField.prototype,"childId",2);pt([a({attribute:"field-id",type:String})],exports.SbEmailField.prototype,"fieldId",2);pt([a({type:String})],exports.SbEmailField.prototype,"name",2);pt([a({type:String})],exports.SbEmailField.prototype,"content",2);pt([a({type:String})],exports.SbEmailField.prototype,"label",2);pt([a({type:String})],exports.SbEmailField.prototype,"placeholder",2);pt([a({type:String})],exports.SbEmailField.prototype,"description",2);pt([a({type:String})],exports.SbEmailField.prototype,"mark",2);pt([a({type:Boolean})],exports.SbEmailField.prototype,"caret",2);pt([a({type:Boolean})],exports.SbEmailField.prototype,"disabled",2);pt([a({type:Boolean})],exports.SbEmailField.prototype,"required",2);pt([a({type:String})],exports.SbEmailField.prototype,"validation",2);pt([a({attribute:"required-error",type:String})],exports.SbEmailField.prototype,"requiredError",2);pt([a({attribute:"format-error",type:String})],exports.SbEmailField.prototype,"formatError",2);pt([x()],exports.SbEmailField.prototype,"_invalid",2);pt([x()],exports.SbEmailField.prototype,"_error",2);pt([x()],exports.SbEmailField.prototype,"_value",2);exports.SbEmailField=pt([p("sb-email-field")],exports.SbEmailField);var xg=Object.defineProperty,Sg=Object.getOwnPropertyDescriptor,ct=(e,t,r,i)=>{for(var s=i>1?void 0:i?Sg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&xg(t,r,s),s};exports.SbIdentifierField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="identifier",this.identifiers=[],this.content="split",this.validation="default",this.requiredError="Identifier is a required field.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbIdentifierField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbIdentifierField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbIdentifierField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbIdentifierField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbIdentifierField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbIdentifierField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbIdentifierField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbIdentifierField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbIdentifierField._ERROR}`}get _normalizedValue(){return this._value.trim().toLowerCase()}get _label(){const t=this.identifiers;if(t.length===0)return"Identifier";let r=t[0];if(t.length>1){const i=t.slice(0,-1).join(", "),s=t.length>2?", or ":" or ",o=t.slice(-1)[0];r=i+s+o}return r.charAt(0).toUpperCase()+r.slice(1)}get _type(){return this.identifiers.length===1&&this.identifiers[0]==="email"?"email":this.identifiers.length===1&&this.identifiers[0]==="phone"?"tel":"text"}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=this.identifiers,g=new CustomEvent(exports.SbIdentifierField.validateEventName,{detail:{id:o,parentId:n,name:h,identifiers:u,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(g)}_handleValidateSuccess(t,r="Valid identifier."){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_handleValidateError(t,r,i){this._invalid=!0,this._error=i,this._dispatchValidate(!1,t,r,i)}_validate(){const t=this._normalizedValue;return this.required&&!t?(this._handleValidateError("required",t,this.requiredError),!1):!t||this.validation==="simple"?(this._handleValidateSuccess(t),!0):(this._handleValidateSuccess(t),!0)}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
6179
6179
  <span
6180
6180
  id="${this.markId}"
6181
6181
  part="${exports.SbIdentifierField.parts.mark}"
@@ -6236,7 +6236,7 @@ body {
6236
6236
  ${this._renderError()}
6237
6237
  ${this.content==="split"&&!this._invalid?this._renderDescription():m}
6238
6238
  </rtg-field>
6239
- `}};exports.SbIdentifierField._ROOT="identifier-field";exports.SbIdentifierField._CONTENT="content";exports.SbIdentifierField._LABEL="label";exports.SbIdentifierField._MARK="mark";exports.SbIdentifierField._DESCRIPTION="description";exports.SbIdentifierField._INPUT="input";exports.SbIdentifierField._ERROR="error";exports.SbIdentifierField.TAG=`sb-${exports.SbIdentifierField._ROOT}`;ut([a({type:String})],exports.SbIdentifierField.prototype,"seed",2);ut([a({attribute:"child-id",type:String})],exports.SbIdentifierField.prototype,"childId",2);ut([a({attribute:"field-id",type:String})],exports.SbIdentifierField.prototype,"fieldId",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"name",2);ut([a({type:Array})],exports.SbIdentifierField.prototype,"identifiers",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"content",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"label",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"placeholder",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"description",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"mark",2);ut([a({type:Boolean})],exports.SbIdentifierField.prototype,"caret",2);ut([a({type:Boolean})],exports.SbIdentifierField.prototype,"disabled",2);ut([a({type:String})],exports.SbIdentifierField.prototype,"autocomplete",2);ut([a({type:Boolean})],exports.SbIdentifierField.prototype,"required",2);ut([a({attribute:"required-error",type:String})],exports.SbIdentifierField.prototype,"requiredError",2);ut([x()],exports.SbIdentifierField.prototype,"_invalid",2);ut([x()],exports.SbIdentifierField.prototype,"_error",2);ut([x()],exports.SbIdentifierField.prototype,"_value",2);exports.SbIdentifierField=ut([p("sb-identifier-field")],exports.SbIdentifierField);var $g=Object.defineProperty,Cg=Object.getOwnPropertyDescriptor,tt=(e,t,r,i)=>{for(var s=i>1?void 0:i?Cg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&$g(t,r,s),s};exports.SbNameField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="name",this.content="split",this.label="Name",this.requiredError="Name is a required field.",this.formatError="Enter a valid name.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbNameField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbNameField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbNameField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbNameField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbNameField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbNameField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbNameField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbNameField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbNameField._ERROR}`}get _normalizedValue(){return this._value.trim().replace(/\s+/g," ")}get _lengths(){const t={minlength:this.minlength&&this.minlength>0?this.minlength:void 0,maxlength:this.maxlength&&this.maxlength>0?this.maxlength:void 0};return t.minlength&&t.maxlength&&t.maxlength<t.minlength&&(t.maxlength=void 0),t}get _pattern(){return this.pattern?new RegExp(this.pattern):exports.SbNameField._PATTERN}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbNameField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateMinlength(t){const{minlength:r}=this._lengths;if(!r||t.length>=r)return!0;const i=this.minlengthError??`Name must be at least ${r} characters.`;return this._invalid=!0,this._error=i,this._dispatchValidate(!1,"minlength",t,i),!1}_validateMaxlength(t){const{maxlength:r}=this._lengths;if(!r||t.length<=r)return!0;const i=this.maxlengthError??`Name must be at most ${r} characters.`;return this._invalid=!0,this._error=i,this._dispatchValidate(!1,"maxlength",t,i),!1}_validateFormat(t){if(this._pattern.test(t))return!0;const r=this.formatError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"format",t,r),!1}_doValidateSuccess(t,r){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_validate(){const t=this._normalizedValue;let r=this._validateRequired(t);return r?t?(r=this._validateMinlength(t),!r||(r=this._validateMaxlength(t),!r)||(r=this._validateFormat(t),!r)?!1:(this._doValidateSuccess(t,"Valid name."),!0)):(this._doValidateSuccess(t,"Valid name (optional and empty)."),!0):!1}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
6239
+ `}};exports.SbIdentifierField._ROOT="identifier-field";exports.SbIdentifierField._CONTENT="content";exports.SbIdentifierField._LABEL="label";exports.SbIdentifierField._MARK="mark";exports.SbIdentifierField._DESCRIPTION="description";exports.SbIdentifierField._INPUT="input";exports.SbIdentifierField._ERROR="error";exports.SbIdentifierField.TAG=`sb-${exports.SbIdentifierField._ROOT}`;ct([a({type:String})],exports.SbIdentifierField.prototype,"seed",2);ct([a({attribute:"child-id",type:String})],exports.SbIdentifierField.prototype,"childId",2);ct([a({attribute:"field-id",type:String})],exports.SbIdentifierField.prototype,"fieldId",2);ct([a({type:String})],exports.SbIdentifierField.prototype,"name",2);ct([a({type:Array})],exports.SbIdentifierField.prototype,"identifiers",2);ct([a({type:String})],exports.SbIdentifierField.prototype,"content",2);ct([a({type:String})],exports.SbIdentifierField.prototype,"label",2);ct([a({type:String})],exports.SbIdentifierField.prototype,"placeholder",2);ct([a({type:String})],exports.SbIdentifierField.prototype,"description",2);ct([a({type:String})],exports.SbIdentifierField.prototype,"mark",2);ct([a({type:Boolean})],exports.SbIdentifierField.prototype,"caret",2);ct([a({type:Boolean})],exports.SbIdentifierField.prototype,"disabled",2);ct([a({type:String})],exports.SbIdentifierField.prototype,"autocomplete",2);ct([a({type:Boolean})],exports.SbIdentifierField.prototype,"required",2);ct([a({type:String})],exports.SbIdentifierField.prototype,"validation",2);ct([a({attribute:"required-error",type:String})],exports.SbIdentifierField.prototype,"requiredError",2);ct([x()],exports.SbIdentifierField.prototype,"_invalid",2);ct([x()],exports.SbIdentifierField.prototype,"_error",2);ct([x()],exports.SbIdentifierField.prototype,"_value",2);exports.SbIdentifierField=ct([p("sb-identifier-field")],exports.SbIdentifierField);var $g=Object.defineProperty,Cg=Object.getOwnPropertyDescriptor,tt=(e,t,r,i)=>{for(var s=i>1?void 0:i?Cg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&$g(t,r,s),s};exports.SbNameField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="name",this.content="split",this.label="Name",this.validation="default",this.requiredError="Name is a required field.",this.formatError="Enter a valid name.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbNameField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbNameField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbNameField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbNameField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbNameField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbNameField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbNameField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbNameField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbNameField._ERROR}`}get _normalizedValue(){return this._value.trim().replace(/\s+/g," ")}get _lengths(){const t={minlength:this.minlength&&this.minlength>0?this.minlength:void 0,maxlength:this.maxlength&&this.maxlength>0?this.maxlength:void 0};return t.minlength&&t.maxlength&&t.maxlength<t.minlength&&(t.maxlength=void 0),t}get _pattern(){return this.pattern?new RegExp(this.pattern):exports.SbNameField._PATTERN}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbNameField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_handleValidateSuccess(t,r="Valid name."){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_handleValidateError(t,r,i){this._invalid=!0,this._error=i,this._dispatchValidate(!1,t,r,i)}_validate(){const t=this._normalizedValue;if(this.required&&!t)return this._handleValidateError("required",t,this.requiredError),!1;if(!t||this.validation==="simple")return this._handleValidateSuccess(t),!0;const{minlength:r,maxlength:i}=this._lengths;return r&&t.length<r?(this._handleValidateError("minlength",t,this.minlengthError??`Username must be at least ${r} characters.`),!1):i&&t.length>i?(this._handleValidateError("maxlength",t,this.maxlengthError??`Username must be at most ${i} characters.`),!1):this._pattern.test(t)?(this._handleValidateSuccess(t),!0):(this._handleValidateError("format",t,this.formatError),!1)}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
6240
6240
  <span
6241
6241
  id="${this.markId}"
6242
6242
  part="${exports.SbNameField.parts.mark}"
@@ -6298,7 +6298,7 @@ body {
6298
6298
  ${this._renderError()}
6299
6299
  ${this.content==="split"&&!this._invalid?this._renderDescription():m}
6300
6300
  </rtg-field>
6301
- `}};exports.SbNameField._ROOT="name-field";exports.SbNameField._CONTENT="content";exports.SbNameField._LABEL="label";exports.SbNameField._MARK="mark";exports.SbNameField._DESCRIPTION="description";exports.SbNameField._INPUT="input";exports.SbNameField._ERROR="error";exports.SbNameField.TAG=`sb-${exports.SbNameField._ROOT}`;exports.SbNameField._PATTERN=/^[\p{L} .'-]*$/u;tt([a({type:String})],exports.SbNameField.prototype,"seed",2);tt([a({attribute:"child-id",type:String})],exports.SbNameField.prototype,"childId",2);tt([a({attribute:"field-id",type:String})],exports.SbNameField.prototype,"fieldId",2);tt([a({type:String})],exports.SbNameField.prototype,"name",2);tt([a({type:String})],exports.SbNameField.prototype,"content",2);tt([a({type:String})],exports.SbNameField.prototype,"label",2);tt([a({type:String})],exports.SbNameField.prototype,"placeholder",2);tt([a({type:String})],exports.SbNameField.prototype,"description",2);tt([a({type:String})],exports.SbNameField.prototype,"mark",2);tt([a({type:Boolean})],exports.SbNameField.prototype,"caret",2);tt([a({type:Boolean})],exports.SbNameField.prototype,"disabled",2);tt([a({type:Boolean})],exports.SbNameField.prototype,"required",2);tt([a({type:Number})],exports.SbNameField.prototype,"minlength",2);tt([a({type:Number})],exports.SbNameField.prototype,"maxlength",2);tt([a({type:String})],exports.SbNameField.prototype,"pattern",2);tt([a({attribute:"required-error",type:String})],exports.SbNameField.prototype,"requiredError",2);tt([a({attribute:"minlength-error",type:String})],exports.SbNameField.prototype,"minlengthError",2);tt([a({attribute:"maxlength-error",type:String})],exports.SbNameField.prototype,"maxlengthError",2);tt([a({attribute:"format-error",type:String})],exports.SbNameField.prototype,"formatError",2);tt([x()],exports.SbNameField.prototype,"_invalid",2);tt([x()],exports.SbNameField.prototype,"_error",2);tt([x()],exports.SbNameField.prototype,"_value",2);exports.SbNameField=tt([p("sb-name-field")],exports.SbNameField);var Eg=Object.defineProperty,kg=Object.getOwnPropertyDescriptor,mt=(e,t,r,i)=>{for(var s=i>1?void 0:i?kg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Eg(t,r,s),s};exports.SbPhoneField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="phone",this.content="split",this.label="Phone",this.requiredError="Phone is a required field.",this.formatError="Enter a valid phone number.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbPhoneField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbPhoneField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbPhoneField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbPhoneField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbPhoneField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbPhoneField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbPhoneField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbPhoneField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbPhoneField._ERROR}`}get _normalizedValue(){return this._value.replace(/\s/g,"")}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbPhoneField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateFormat(t){if(!this.required&&t===""||exports.SbPhoneField._PATTERN.test(t))return!0;const r=this.formatError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"format",t,r),!1}_validate(){const t=this._normalizedValue;let r=this._validateRequired(t);if(!r||(r=this._validateFormat(t),!r))return!1;const i=`Valid phone number${!t&&" (optional and empty)"}.`;return this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,i),!0}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
6301
+ `}};exports.SbNameField._ROOT="name-field";exports.SbNameField._CONTENT="content";exports.SbNameField._LABEL="label";exports.SbNameField._MARK="mark";exports.SbNameField._DESCRIPTION="description";exports.SbNameField._INPUT="input";exports.SbNameField._ERROR="error";exports.SbNameField.TAG=`sb-${exports.SbNameField._ROOT}`;exports.SbNameField._PATTERN=/^[\p{L} .'-]*$/u;tt([a({type:String})],exports.SbNameField.prototype,"seed",2);tt([a({attribute:"child-id",type:String})],exports.SbNameField.prototype,"childId",2);tt([a({attribute:"field-id",type:String})],exports.SbNameField.prototype,"fieldId",2);tt([a({type:String})],exports.SbNameField.prototype,"name",2);tt([a({type:String})],exports.SbNameField.prototype,"content",2);tt([a({type:String})],exports.SbNameField.prototype,"label",2);tt([a({type:String})],exports.SbNameField.prototype,"placeholder",2);tt([a({type:String})],exports.SbNameField.prototype,"description",2);tt([a({type:String})],exports.SbNameField.prototype,"mark",2);tt([a({type:Boolean})],exports.SbNameField.prototype,"caret",2);tt([a({type:Boolean})],exports.SbNameField.prototype,"disabled",2);tt([a({type:Boolean})],exports.SbNameField.prototype,"required",2);tt([a({type:Number})],exports.SbNameField.prototype,"minlength",2);tt([a({type:Number})],exports.SbNameField.prototype,"maxlength",2);tt([a({type:String})],exports.SbNameField.prototype,"pattern",2);tt([a({type:String})],exports.SbNameField.prototype,"validation",2);tt([a({attribute:"required-error",type:String})],exports.SbNameField.prototype,"requiredError",2);tt([a({attribute:"minlength-error",type:String})],exports.SbNameField.prototype,"minlengthError",2);tt([a({attribute:"maxlength-error",type:String})],exports.SbNameField.prototype,"maxlengthError",2);tt([a({attribute:"format-error",type:String})],exports.SbNameField.prototype,"formatError",2);tt([x()],exports.SbNameField.prototype,"_invalid",2);tt([x()],exports.SbNameField.prototype,"_error",2);tt([x()],exports.SbNameField.prototype,"_value",2);exports.SbNameField=tt([p("sb-name-field")],exports.SbNameField);var Eg=Object.defineProperty,kg=Object.getOwnPropertyDescriptor,gt=(e,t,r,i)=>{for(var s=i>1?void 0:i?kg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Eg(t,r,s),s};exports.SbPhoneField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="phone",this.content="split",this.label="Phone",this.validation="default",this.requiredError="Phone is a required field.",this.formatError="Enter a valid phone number.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbPhoneField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbPhoneField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbPhoneField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbPhoneField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbPhoneField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbPhoneField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbPhoneField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbPhoneField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbPhoneField._ERROR}`}get _normalizedValue(){return this._value.replace(/\s/g,"")}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbPhoneField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_handleValidateSuccess(t,r="Valid phone."){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_handleValidateError(t,r,i){this._invalid=!0,this._error=i,this._dispatchValidate(!1,t,r,i)}_validate(){const t=this._normalizedValue;return this.required&&!t?(this._handleValidateError("required",t,this.requiredError),!1):!t||this.validation==="simple"?(this._handleValidateSuccess(t),!0):exports.SbPhoneField._PATTERN.test(t)?(this._handleValidateSuccess(t),!0):(this._handleValidateError("format",t,this.formatError),!1)}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
6302
6302
  <span
6303
6303
  id="${this.markId}"
6304
6304
  part="${exports.SbPhoneField.parts.mark}"
@@ -6358,7 +6358,7 @@ body {
6358
6358
  ${this._renderError()}
6359
6359
  ${this.content==="split"&&!this._invalid?this._renderDescription():m}
6360
6360
  </rtg-field>
6361
- `}};exports.SbPhoneField._ROOT="phone-field";exports.SbPhoneField._CONTENT="content";exports.SbPhoneField._LABEL="label";exports.SbPhoneField._MARK="mark";exports.SbPhoneField._DESCRIPTION="description";exports.SbPhoneField._INPUT="input";exports.SbPhoneField._ERROR="error";exports.SbPhoneField.TAG=`sb-${exports.SbPhoneField._ROOT}`;exports.SbPhoneField._PATTERN=/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/;mt([a({type:String})],exports.SbPhoneField.prototype,"seed",2);mt([a({attribute:"child-id",type:String})],exports.SbPhoneField.prototype,"childId",2);mt([a({attribute:"field-id",type:String})],exports.SbPhoneField.prototype,"fieldId",2);mt([a({type:String})],exports.SbPhoneField.prototype,"name",2);mt([a({type:String})],exports.SbPhoneField.prototype,"content",2);mt([a({type:String})],exports.SbPhoneField.prototype,"label",2);mt([a({type:String})],exports.SbPhoneField.prototype,"placeholder",2);mt([a({type:String})],exports.SbPhoneField.prototype,"description",2);mt([a({type:String})],exports.SbPhoneField.prototype,"mark",2);mt([a({type:Boolean})],exports.SbPhoneField.prototype,"caret",2);mt([a({type:Boolean})],exports.SbPhoneField.prototype,"disabled",2);mt([a({type:Boolean})],exports.SbPhoneField.prototype,"required",2);mt([a({attribute:"required-error",type:String})],exports.SbPhoneField.prototype,"requiredError",2);mt([a({attribute:"format-error",type:String})],exports.SbPhoneField.prototype,"formatError",2);mt([x()],exports.SbPhoneField.prototype,"_invalid",2);mt([x()],exports.SbPhoneField.prototype,"_error",2);mt([x()],exports.SbPhoneField.prototype,"_value",2);exports.SbPhoneField=mt([p("sb-phone-field")],exports.SbPhoneField);var Rg=Object.defineProperty,Ig=Object.getOwnPropertyDescriptor,et=(e,t,r,i)=>{for(var s=i>1?void 0:i?Ig(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Rg(t,r,s),s};exports.SbUsernameField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="username",this.content="split",this.label="Username",this.requiredError="Username is a required field.",this.formatError="Enter a valid username.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbUsernameField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbUsernameField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbUsernameField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbUsernameField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbUsernameField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbUsernameField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbUsernameField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbUsernameField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbUsernameField._ERROR}`}get _normalizedValue(){return this._value.trim().toLowerCase()}get _lengths(){const t={minlength:this.minlength&&this.minlength>0?this.minlength:void 0,maxlength:this.maxlength&&this.maxlength>0?this.maxlength:void 0};return t.minlength&&t.maxlength&&t.maxlength<t.minlength&&(t.maxlength=void 0),t}get _pattern(){return this.pattern?new RegExp(this.pattern):exports.SbUsernameField._PATTERN}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbUsernameField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_validateRequired(t){if(!this.required||t)return!0;const r=this.requiredError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"required",t,r),!1}_validateMinlength(t){const{minlength:r}=this._lengths;if(!r||t.length>=r)return!0;const i=this.minlengthError??`Username must be at least ${r} characters.`;return this._invalid=!0,this._error=i,this._dispatchValidate(!1,"minlength",t,i),!1}_validateMaxlength(t){const{maxlength:r}=this._lengths;if(!r||t.length<=r)return!0;const i=this.maxlengthError??`Username must be at most ${r} characters.`;return this._invalid=!0,this._error=i,this._dispatchValidate(!1,"maxlength",t,i),!1}_validateFormat(t){if(this._pattern.test(t))return!0;const r=this.formatError;return this._invalid=!0,this._error=r,this._dispatchValidate(!1,"format",t,r),!1}_doValidateSuccess(t,r){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_validate(){const t=this._normalizedValue;let r=this._validateRequired(t);return r?t?(r=this._validateMinlength(t),!r||(r=this._validateMaxlength(t),!r)||(r=this._validateFormat(t),!r)?!1:(this._doValidateSuccess(t,"Valid username."),!0)):(this._doValidateSuccess(t,"Valid username (optional and empty)."),!0):!1}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
6361
+ `}};exports.SbPhoneField._ROOT="phone-field";exports.SbPhoneField._CONTENT="content";exports.SbPhoneField._LABEL="label";exports.SbPhoneField._MARK="mark";exports.SbPhoneField._DESCRIPTION="description";exports.SbPhoneField._INPUT="input";exports.SbPhoneField._ERROR="error";exports.SbPhoneField.TAG=`sb-${exports.SbPhoneField._ROOT}`;exports.SbPhoneField._PATTERN=/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/;gt([a({type:String})],exports.SbPhoneField.prototype,"seed",2);gt([a({attribute:"child-id",type:String})],exports.SbPhoneField.prototype,"childId",2);gt([a({attribute:"field-id",type:String})],exports.SbPhoneField.prototype,"fieldId",2);gt([a({type:String})],exports.SbPhoneField.prototype,"name",2);gt([a({type:String})],exports.SbPhoneField.prototype,"content",2);gt([a({type:String})],exports.SbPhoneField.prototype,"label",2);gt([a({type:String})],exports.SbPhoneField.prototype,"placeholder",2);gt([a({type:String})],exports.SbPhoneField.prototype,"description",2);gt([a({type:String})],exports.SbPhoneField.prototype,"mark",2);gt([a({type:Boolean})],exports.SbPhoneField.prototype,"caret",2);gt([a({type:Boolean})],exports.SbPhoneField.prototype,"disabled",2);gt([a({type:Boolean})],exports.SbPhoneField.prototype,"required",2);gt([a({type:String})],exports.SbPhoneField.prototype,"validation",2);gt([a({attribute:"required-error",type:String})],exports.SbPhoneField.prototype,"requiredError",2);gt([a({attribute:"format-error",type:String})],exports.SbPhoneField.prototype,"formatError",2);gt([x()],exports.SbPhoneField.prototype,"_invalid",2);gt([x()],exports.SbPhoneField.prototype,"_error",2);gt([x()],exports.SbPhoneField.prototype,"_value",2);exports.SbPhoneField=gt([p("sb-phone-field")],exports.SbPhoneField);var Rg=Object.defineProperty,Ig=Object.getOwnPropertyDescriptor,et=(e,t,r,i)=>{for(var s=i>1?void 0:i?Ig(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Rg(t,r,s),s};exports.SbUsernameField=class extends v{constructor(){super(...arguments),this.seed=_t(),this.name="username",this.content="split",this.label="Username",this.validation="default",this.requiredError="Username is a required field.",this.formatError="Enter a valid username.",this._invalid=!1,this._error="",this._value="",this._form=null,this._handleInput=t=>{const r=t.target;r.matches(`[part="${exports.SbUsernameField.parts.input}"]>input`)&&(this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=this.querySelector(`rtg-input[part="${exports.SbUsernameField.parts.input}"]`);t&&(t.value=""),this._value="",this._invalid=!1,this._error=""}}static get parts(){const t=this._ROOT,r=`${t}-${this._CONTENT}`,i=`${t}-${this._LABEL}`,s=`${t}-${this._MARK}`,o=`${t}-${this._DESCRIPTION}`,n=`${t}-${this._INPUT}`,h=`${t}-${this._ERROR}`;return{root:t,content:r,label:i,mark:s,description:o,input:n,error:h}}static get validateEventName(){return`${this.TAG}:validate`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbUsernameField.parts.root}-${this.seed}`}get contentId(){return`${this.rootId}-${exports.SbUsernameField._CONTENT}`}get labelId(){return`${this.rootId}-${exports.SbUsernameField._LABEL}`}get descriptionId(){return`${this.rootId}-${exports.SbUsernameField._DESCRIPTION}`}get markId(){return`${this.rootId}-${exports.SbUsernameField._MARK}`}get inputId(){return this.fieldId??`${this.rootId}-${exports.SbUsernameField._INPUT}`}get errorId(){return`${this.rootId}-${exports.SbUsernameField._ERROR}`}get _normalizedValue(){return this._value.trim().toLowerCase()}get _lengths(){const t={minlength:this.minlength&&this.minlength>0?this.minlength:void 0,maxlength:this.maxlength&&this.maxlength>0?this.maxlength:void 0};return t.minlength&&t.maxlength&&t.maxlength<t.minlength&&(t.maxlength=void 0),t}get _pattern(){return this.pattern?new RegExp(this.pattern):exports.SbUsernameField._PATTERN}connectedCallback(){var t,r;super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form&&(this._form.noValidate=!0),(t=this._form)==null||t.addEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.addEventListener("reset",this._handleFormReset)}disconnectedCallback(){var t,r;super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),(t=this._form)==null||t.removeEventListener("submit",this._handleFormSubmit),(r=this._form)==null||r.removeEventListener("reset",this._handleFormReset),this._form=null}validate(){return this._validate()}_dispatchValidate(t,r,i,s){const o=this.inputId,n=this.rootId,h=this.name,u=new CustomEvent(exports.SbUsernameField.validateEventName,{detail:{id:o,parentId:n,name:h,value:i,valid:t,type:r,message:s},bubbles:!0,composed:!0});this.dispatchEvent(u)}_handleValidateSuccess(t,r="Valid username."){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success",t,r)}_handleValidateError(t,r,i){this._invalid=!0,this._error=i,this._dispatchValidate(!1,t,r,i)}_validate(){const t=this._normalizedValue;if(this.required&&!t)return this._handleValidateError("required",t,this.requiredError),!1;if(!t||this.validation==="simple")return this._handleValidateSuccess(t),!0;const{minlength:r,maxlength:i}=this._lengths;return r&&t.length<r?(this._handleValidateError("minlength",t,this.minlengthError??`Username must be at least ${r} characters.`),!1):i&&t.length>i?(this._handleValidateError("maxlength",t,this.maxlengthError??`Username must be at most ${i} characters.`),!1):this._pattern.test(t)?(this._handleValidateSuccess(t),!0):(this._handleValidateError("format",t,this.formatError),!1)}_renderMark(){return!this.mark&&(!this.caret||!this.required)?m:d`
6362
6362
  <span
6363
6363
  id="${this.markId}"
6364
6364
  part="${exports.SbUsernameField.parts.mark}"
@@ -6420,7 +6420,7 @@ body {
6420
6420
  ${this._renderError()}
6421
6421
  ${this.content==="split"&&!this._invalid?this._renderDescription():m}
6422
6422
  </rtg-field>
6423
- `}};exports.SbUsernameField._ROOT="username-field";exports.SbUsernameField._CONTENT="content";exports.SbUsernameField._LABEL="label";exports.SbUsernameField._MARK="mark";exports.SbUsernameField._DESCRIPTION="description";exports.SbUsernameField._INPUT="input";exports.SbUsernameField._ERROR="error";exports.SbUsernameField.TAG=`sb-${exports.SbUsernameField._ROOT}`;exports.SbUsernameField._PATTERN=/^[a-z0-9_]*$/;et([a({type:String})],exports.SbUsernameField.prototype,"seed",2);et([a({attribute:"child-id",type:String})],exports.SbUsernameField.prototype,"childId",2);et([a({attribute:"field-id",type:String})],exports.SbUsernameField.prototype,"fieldId",2);et([a({type:String})],exports.SbUsernameField.prototype,"name",2);et([a({type:String})],exports.SbUsernameField.prototype,"content",2);et([a({type:String})],exports.SbUsernameField.prototype,"label",2);et([a({type:String})],exports.SbUsernameField.prototype,"placeholder",2);et([a({type:String})],exports.SbUsernameField.prototype,"description",2);et([a({type:String})],exports.SbUsernameField.prototype,"mark",2);et([a({type:Boolean})],exports.SbUsernameField.prototype,"caret",2);et([a({type:Boolean})],exports.SbUsernameField.prototype,"disabled",2);et([a({type:Boolean})],exports.SbUsernameField.prototype,"required",2);et([a({type:Number})],exports.SbUsernameField.prototype,"minlength",2);et([a({type:Number})],exports.SbUsernameField.prototype,"maxlength",2);et([a({type:String})],exports.SbUsernameField.prototype,"pattern",2);et([a({attribute:"required-error",type:String})],exports.SbUsernameField.prototype,"requiredError",2);et([a({attribute:"minlength-error",type:String})],exports.SbUsernameField.prototype,"minlengthError",2);et([a({attribute:"maxlength-error",type:String})],exports.SbUsernameField.prototype,"maxlengthError",2);et([a({attribute:"format-error",type:String})],exports.SbUsernameField.prototype,"formatError",2);et([x()],exports.SbUsernameField.prototype,"_invalid",2);et([x()],exports.SbUsernameField.prototype,"_error",2);et([x()],exports.SbUsernameField.prototype,"_value",2);exports.SbUsernameField=et([p("sb-username-field")],exports.SbUsernameField);var Og=Object.defineProperty,Ag=Object.getOwnPropertyDescriptor,ee=(e,t,r,i)=>{for(var s=i>1?void 0:i?Ag(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Og(t,r,s),s};exports.SbFormSubmit=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant="default",this.size="default",this.label="Submit",this.spinnerAlign="start",this._loading=!1,this._handleClick=()=>{this.disabled||this.isLoading||this.dispatchEvent(new CustomEvent(exports.SbFormSubmit.clickEventName,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}))}}static get parts(){const t=this._ROOT,r=`${t}-${this._SPINNER}`;return{root:t,spinner:r}}static get clickEventName(){return`${this.TAG}:click`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbFormSubmit.parts.root}-${this.seed}`}get spinnerId(){return`${this.rootId}-${exports.SbFormSubmit._SPINNER}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderSpinner(){return this.isLoading?d`
6423
+ `}};exports.SbUsernameField._ROOT="username-field";exports.SbUsernameField._CONTENT="content";exports.SbUsernameField._LABEL="label";exports.SbUsernameField._MARK="mark";exports.SbUsernameField._DESCRIPTION="description";exports.SbUsernameField._INPUT="input";exports.SbUsernameField._ERROR="error";exports.SbUsernameField.TAG=`sb-${exports.SbUsernameField._ROOT}`;exports.SbUsernameField._PATTERN=/^[a-z0-9_]*$/;et([a({type:String})],exports.SbUsernameField.prototype,"seed",2);et([a({attribute:"child-id",type:String})],exports.SbUsernameField.prototype,"childId",2);et([a({attribute:"field-id",type:String})],exports.SbUsernameField.prototype,"fieldId",2);et([a({type:String})],exports.SbUsernameField.prototype,"name",2);et([a({type:String})],exports.SbUsernameField.prototype,"content",2);et([a({type:String})],exports.SbUsernameField.prototype,"label",2);et([a({type:String})],exports.SbUsernameField.prototype,"placeholder",2);et([a({type:String})],exports.SbUsernameField.prototype,"description",2);et([a({type:String})],exports.SbUsernameField.prototype,"mark",2);et([a({type:Boolean})],exports.SbUsernameField.prototype,"caret",2);et([a({type:Boolean})],exports.SbUsernameField.prototype,"disabled",2);et([a({type:Boolean})],exports.SbUsernameField.prototype,"required",2);et([a({type:Number})],exports.SbUsernameField.prototype,"minlength",2);et([a({type:Number})],exports.SbUsernameField.prototype,"maxlength",2);et([a({type:String})],exports.SbUsernameField.prototype,"pattern",2);et([a({type:String})],exports.SbUsernameField.prototype,"validation",2);et([a({attribute:"required-error",type:String})],exports.SbUsernameField.prototype,"requiredError",2);et([a({attribute:"minlength-error",type:String})],exports.SbUsernameField.prototype,"minlengthError",2);et([a({attribute:"maxlength-error",type:String})],exports.SbUsernameField.prototype,"maxlengthError",2);et([a({attribute:"format-error",type:String})],exports.SbUsernameField.prototype,"formatError",2);et([x()],exports.SbUsernameField.prototype,"_invalid",2);et([x()],exports.SbUsernameField.prototype,"_error",2);et([x()],exports.SbUsernameField.prototype,"_value",2);exports.SbUsernameField=et([p("sb-username-field")],exports.SbUsernameField);var Og=Object.defineProperty,Ag=Object.getOwnPropertyDescriptor,ee=(e,t,r,i)=>{for(var s=i>1?void 0:i?Ag(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Og(t,r,s),s};exports.SbFormSubmit=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant="default",this.size="default",this.label="Submit",this.spinnerAlign="start",this._loading=!1,this._handleClick=()=>{this.disabled||this.isLoading||this.dispatchEvent(new CustomEvent(exports.SbFormSubmit.clickEventName,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}))}}static get parts(){const t=this._ROOT,r=`${t}-${this._SPINNER}`;return{root:t,spinner:r}}static get clickEventName(){return`${this.TAG}:click`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbFormSubmit.parts.root}-${this.seed}`}get spinnerId(){return`${this.rootId}-${exports.SbFormSubmit._SPINNER}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderSpinner(){return this.isLoading?d`
6424
6424
  <rtg-spinner
6425
6425
  id="${this.spinnerId}"
6426
6426
  part="${exports.SbFormSubmit.parts.spinner}"
@@ -6441,7 +6441,7 @@ body {
6441
6441
  ${this.label}
6442
6442
  ${this.spinnerAlign==="end"?this._renderSpinner():m}
6443
6443
  </rtg-button>
6444
- `}};exports.SbFormSubmit._ROOT="form-submit";exports.SbFormSubmit._SPINNER="spinner";exports.SbFormSubmit.TAG=`sb-${exports.SbFormSubmit._ROOT}`;ee([a({type:String})],exports.SbFormSubmit.prototype,"seed",2);ee([a({attribute:"child-id",type:String})],exports.SbFormSubmit.prototype,"childId",2);ee([a({type:String})],exports.SbFormSubmit.prototype,"variant",2);ee([a({type:String})],exports.SbFormSubmit.prototype,"size",2);ee([a({type:String})],exports.SbFormSubmit.prototype,"label",2);ee([a({attribute:"spinner-align",type:String})],exports.SbFormSubmit.prototype,"spinnerAlign",2);ee([a({type:Boolean})],exports.SbFormSubmit.prototype,"disabled",2);ee([a({type:Boolean})],exports.SbFormSubmit.prototype,"loading",2);ee([a({type:String})],exports.SbFormSubmit.prototype,"event",2);ee([x()],exports.SbFormSubmit.prototype,"_loading",2);exports.SbFormSubmit=ee([p("sb-form-submit")],exports.SbFormSubmit);const cc=[exports.SbEmailField,exports.SbPhoneField,exports.SbUsernameField,exports.SbIdentifierField,exports.SbNameField,exports.SbPasswordField,exports.SbConfirmField],Pg=cc.map(e=>e.TAG).join(", "),ud=cc.map(e=>e.validateEventName);var Fg=Object.defineProperty,Tg=Object.getOwnPropertyDescriptor,ki=(e,t,r,i)=>{for(var s=i>1?void 0:i?Tg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Fg(t,r,s),s};exports.SbForm=class extends v{constructor(){super(...arguments),this.seed=_t(),this._loading=!1,this._handleSubmitClick=t=>{var r;this._pendingEvent=(r=t.detail)==null?void 0:r.event},this._handleSubmit=async t=>{if(t.preventDefault(),this._loading)return;const r=this._fields,i={},s=g=>{const y=g.detail;(y==null?void 0:y.name)!==void 0&&y.value!==void 0&&(i[y.name]=y.value)};ud.forEach(g=>this.addEventListener(g,s));const o=r.map(g=>g.validate());if(ud.forEach(g=>this.removeEventListener(g,s)),!o.every(Boolean))return;const h=this._pendingEvent;if(this.onSubmit){this.onSubmit(i,h);return}if(!h)return;const u=r.map(g=>!!g.disabled);this._setLoading(!0,r,u);try{await ht.processLoginflowEvent({event:h,...Object.keys(i).length?{data:i}:{}}),this._dispatch(exports.SbForm.SUCCESS_EVENT,{id:this.rootId,data:i,event:h})}catch(g){const y=g instanceof Error?g.message:String(g);this._dispatch(exports.SbForm.ERROR_EVENT,{id:this.rootId,data:i,event:h,message:y})}finally{this._setLoading(!1,r,u),this._pendingEvent=void 0}},this._handleReset=t=>{this._pendingEvent=void 0,this.onReset&&this.onReset(t),this._dispatch(exports.SbForm.RESET_EVENT,{id:this.rootId})}}static get parts(){return{root:this._ROOT}}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbForm.parts.root}-${this.seed}`}get _form(){return this.querySelector(`form[part="${exports.SbForm.parts.root}"]`)}get _fields(){const t=this._form;return t?Array.from(t.querySelectorAll(Pg)):[]}get _submit(){const t=this._form;return t?t.querySelector(exports.SbFormSubmit.TAG):null}connectedCallback(){super.connectedCallback(),this.addEventListener(exports.SbFormSubmit.clickEventName,this._handleSubmitClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(exports.SbFormSubmit.clickEventName,this._handleSubmitClick)}firstUpdated(){const t=this._form;if(!t)return;Array.from(this.childNodes).filter(i=>i!==t).forEach(i=>t.appendChild(i))}_dispatch(t,r={}){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_setLoading(t,r,i){r.forEach((o,n)=>{o.disabled=t?!0:i[n]});const s=this._submit;s&&(s.loading=t),this._loading=t}render(){return d`
6444
+ `}};exports.SbFormSubmit._ROOT="form-submit";exports.SbFormSubmit._SPINNER="spinner";exports.SbFormSubmit.TAG=`sb-${exports.SbFormSubmit._ROOT}`;ee([a({type:String})],exports.SbFormSubmit.prototype,"seed",2);ee([a({attribute:"child-id",type:String})],exports.SbFormSubmit.prototype,"childId",2);ee([a({type:String})],exports.SbFormSubmit.prototype,"variant",2);ee([a({type:String})],exports.SbFormSubmit.prototype,"size",2);ee([a({type:String})],exports.SbFormSubmit.prototype,"label",2);ee([a({attribute:"spinner-align",type:String})],exports.SbFormSubmit.prototype,"spinnerAlign",2);ee([a({type:Boolean})],exports.SbFormSubmit.prototype,"disabled",2);ee([a({type:Boolean})],exports.SbFormSubmit.prototype,"loading",2);ee([a({type:String})],exports.SbFormSubmit.prototype,"event",2);ee([x()],exports.SbFormSubmit.prototype,"_loading",2);exports.SbFormSubmit=ee([p("sb-form-submit")],exports.SbFormSubmit);const cc=[exports.SbEmailField,exports.SbPhoneField,exports.SbUsernameField,exports.SbIdentifierField,exports.SbNameField,exports.SbPasswordField,exports.SbConfirmField],Pg=cc.map(e=>e.TAG).join(", "),ud=cc.map(e=>e.validateEventName);var Fg=Object.defineProperty,Tg=Object.getOwnPropertyDescriptor,ki=(e,t,r,i)=>{for(var s=i>1?void 0:i?Tg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Fg(t,r,s),s};exports.SbForm=class extends v{constructor(){super(...arguments),this.seed=_t(),this._loading=!1,this._handleSubmitClick=t=>{var r;this._pendingEvent=(r=t.detail)==null?void 0:r.event},this._handleSubmit=async t=>{if(t.preventDefault(),this._loading)return;const r=this._fields,i={},s=g=>{const y=g.detail;(y==null?void 0:y.name)!==void 0&&y.value!==void 0&&(i[y.name]=y.value)};ud.forEach(g=>this.addEventListener(g,s));const o=r.map(g=>g.validate());if(ud.forEach(g=>this.removeEventListener(g,s)),!o.every(Boolean))return;const h=this._pendingEvent;if(this.onSubmit){this.onSubmit(i,h);return}if(!h)return;const u=r.map(g=>!!g.disabled);this._setLoading(!0,r,u);try{await ut.processLoginflowEvent({event:h,...Object.keys(i).length?{data:i}:{}}),this._dispatch(exports.SbForm.SUCCESS_EVENT,{id:this.rootId,data:i,event:h})}catch(g){const y=g instanceof Error?g.message:String(g);this._dispatch(exports.SbForm.ERROR_EVENT,{id:this.rootId,data:i,event:h,message:y})}finally{this._setLoading(!1,r,u),this._pendingEvent=void 0}},this._handleReset=t=>{this._pendingEvent=void 0,this.onReset&&this.onReset(t),this._dispatch(exports.SbForm.RESET_EVENT,{id:this.rootId})}}static get parts(){return{root:this._ROOT}}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbForm.parts.root}-${this.seed}`}get _form(){return this.querySelector(`form[part="${exports.SbForm.parts.root}"]`)}get _fields(){const t=this._form;return t?Array.from(t.querySelectorAll(Pg)):[]}get _submit(){const t=this._form;return t?t.querySelector(exports.SbFormSubmit.TAG):null}connectedCallback(){super.connectedCallback(),this.addEventListener(exports.SbFormSubmit.clickEventName,this._handleSubmitClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(exports.SbFormSubmit.clickEventName,this._handleSubmitClick)}firstUpdated(){const t=this._form;if(!t)return;Array.from(this.childNodes).filter(i=>i!==t).forEach(i=>t.appendChild(i))}_dispatch(t,r={}){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_setLoading(t,r,i){r.forEach((o,n)=>{o.disabled=t?!0:i[n]});const s=this._submit;s&&(s.loading=t),this._loading=t}render(){return d`
6445
6445
  <form
6446
6446
  id="${this.rootId}"
6447
6447
  part="${exports.SbForm.parts.root}"
@@ -6456,7 +6456,7 @@ body {
6456
6456
  >
6457
6457
  ${this.content??m}
6458
6458
  </rtg-field-separator>
6459
- `}};exports.SbFormSeparator._ROOT="form-separator";Os([a({type:String})],exports.SbFormSeparator.prototype,"seed",2);Os([a({attribute:"child-id",type:String})],exports.SbFormSeparator.prototype,"childId",2);Os([a({type:String})],exports.SbFormSeparator.prototype,"content",2);exports.SbFormSeparator=Os([p("sb-form-separator")],exports.SbFormSeparator);var zg=Object.defineProperty,jg=Object.getOwnPropertyDescriptor,Ht=(e,t,r,i)=>{for(var s=i>1?void 0:i?jg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&zg(t,r,s),s};exports.SbFormSwitch=class extends v{constructor(){super(...arguments),this.seed=_t(),this.type="default",this.variant="secondary",this.size="default",this.label="Switch",this._loading=!1,this._handleClick=async()=>{if(!(this.disabled||this.isLoading)){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.SbFormSwitch.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}));try{this.event&&await ht.processLoginflowEvent({event:this.event})}finally{this._loading=!1}}}}static get parts(){const t=this._ROOT,r=`${t}-${this._WRAPPER}`,i=`${t}-${this._PROMPT}`,s=`${t}-${this._SPINNER}`;return{root:t,wrapper:r,prompt:i,spinner:s}}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbFormSwitch.parts.root}-${this.seed}`}get wrapperId(){return`${this.rootId}-${exports.SbFormSwitch._WRAPPER}`}get promptId(){return`${this.rootId}-${exports.SbFormSwitch._PROMPT}`}get spinnerId(){return`${this.rootId}-${exports.SbFormSwitch._SPINNER}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderPrompt(){return this.type==="button"||!this.prompt?m:d`
6459
+ `}};exports.SbFormSeparator._ROOT="form-separator";Os([a({type:String})],exports.SbFormSeparator.prototype,"seed",2);Os([a({attribute:"child-id",type:String})],exports.SbFormSeparator.prototype,"childId",2);Os([a({type:String})],exports.SbFormSeparator.prototype,"content",2);exports.SbFormSeparator=Os([p("sb-form-separator")],exports.SbFormSeparator);var zg=Object.defineProperty,Ug=Object.getOwnPropertyDescriptor,Ht=(e,t,r,i)=>{for(var s=i>1?void 0:i?Ug(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&zg(t,r,s),s};exports.SbFormSwitch=class extends v{constructor(){super(...arguments),this.seed=_t(),this.type="default",this.variant="secondary",this.size="default",this.label="Switch",this._loading=!1,this._handleClick=async()=>{if(!(this.disabled||this.isLoading)){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.SbFormSwitch.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}));try{this.event&&await ut.processLoginflowEvent({event:this.event})}finally{this._loading=!1}}}}static get parts(){const t=this._ROOT,r=`${t}-${this._WRAPPER}`,i=`${t}-${this._PROMPT}`,s=`${t}-${this._SPINNER}`;return{root:t,wrapper:r,prompt:i,spinner:s}}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbFormSwitch.parts.root}-${this.seed}`}get wrapperId(){return`${this.rootId}-${exports.SbFormSwitch._WRAPPER}`}get promptId(){return`${this.rootId}-${exports.SbFormSwitch._PROMPT}`}get spinnerId(){return`${this.rootId}-${exports.SbFormSwitch._SPINNER}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderPrompt(){return this.type==="button"||!this.prompt?m:d`
6460
6460
  <p id="${this.promptId}" part="${exports.SbFormSwitch.parts.prompt}">
6461
6461
  ${this.prompt}
6462
6462
  </p>
@@ -6482,7 +6482,7 @@ body {
6482
6482
  ${this.label} ${this._renderSpinner()}
6483
6483
  </rtg-button>
6484
6484
  </div>
6485
- `}};exports.SbFormSwitch._ROOT="form-switch";exports.SbFormSwitch._WRAPPER="wrapper";exports.SbFormSwitch._PROMPT="prompt";exports.SbFormSwitch._SPINNER="spinner";exports.SbFormSwitch.TAG=`sb-${exports.SbFormSwitch._ROOT}`;exports.SbFormSwitch.CLICK_EVENT=`${exports.SbFormSwitch.TAG}:click`;Ht([a({type:String})],exports.SbFormSwitch.prototype,"seed",2);Ht([a({attribute:"child-id",type:String})],exports.SbFormSwitch.prototype,"childId",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"type",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"variant",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"size",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"label",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"prompt",2);Ht([a({type:Boolean})],exports.SbFormSwitch.prototype,"disabled",2);Ht([a({type:Boolean})],exports.SbFormSwitch.prototype,"loading",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"event",2);Ht([x()],exports.SbFormSwitch.prototype,"_loading",2);exports.SbFormSwitch=Ht([p("sb-form-switch")],exports.SbFormSwitch);var Ug=Object.defineProperty,Dg=Object.getOwnPropertyDescriptor,re=(e,t,r,i)=>{for(var s=i>1?void 0:i?Dg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Ug(t,r,s),s};exports.SbPasskeyButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant="secondary",this.size="default",this.label="Use Passkey",this.spinnerAlign="start",this._loading=!1,this._handleClick=async()=>{if(!(this.disabled||this.isLoading)){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.SbPasskeyButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}));try{this.event&&await ht.processLoginflowEvent({event:this.event})}finally{this._loading=!1}}}}static get parts(){const t=this._ROOT,r=`${t}-${this._SPINNER}`;return{root:t,spinner:r}}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbPasskeyButton.parts.root}-${this.seed}`}get spinnerId(){return`${this.rootId}-${exports.SbPasskeyButton._SPINNER}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderSpinner(){return this.isLoading?d`
6485
+ `}};exports.SbFormSwitch._ROOT="form-switch";exports.SbFormSwitch._WRAPPER="wrapper";exports.SbFormSwitch._PROMPT="prompt";exports.SbFormSwitch._SPINNER="spinner";exports.SbFormSwitch.TAG=`sb-${exports.SbFormSwitch._ROOT}`;exports.SbFormSwitch.CLICK_EVENT=`${exports.SbFormSwitch.TAG}:click`;Ht([a({type:String})],exports.SbFormSwitch.prototype,"seed",2);Ht([a({attribute:"child-id",type:String})],exports.SbFormSwitch.prototype,"childId",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"type",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"variant",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"size",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"label",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"prompt",2);Ht([a({type:Boolean})],exports.SbFormSwitch.prototype,"disabled",2);Ht([a({type:Boolean})],exports.SbFormSwitch.prototype,"loading",2);Ht([a({type:String})],exports.SbFormSwitch.prototype,"event",2);Ht([x()],exports.SbFormSwitch.prototype,"_loading",2);exports.SbFormSwitch=Ht([p("sb-form-switch")],exports.SbFormSwitch);var jg=Object.defineProperty,Dg=Object.getOwnPropertyDescriptor,re=(e,t,r,i)=>{for(var s=i>1?void 0:i?Dg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&jg(t,r,s),s};exports.SbPasskeyButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant="secondary",this.size="default",this.label="Use Passkey",this.spinnerAlign="start",this._loading=!1,this._handleClick=async()=>{if(!(this.disabled||this.isLoading)){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.SbPasskeyButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}));try{this.event&&await ut.processLoginflowEvent({event:this.event})}finally{this._loading=!1}}}}static get parts(){const t=this._ROOT,r=`${t}-${this._SPINNER}`;return{root:t,spinner:r}}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbPasskeyButton.parts.root}-${this.seed}`}get spinnerId(){return`${this.rootId}-${exports.SbPasskeyButton._SPINNER}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderSpinner(){return this.isLoading?d`
6486
6486
  <rtg-spinner
6487
6487
  id="${this.spinnerId}"
6488
6488
  part="${exports.SbPasskeyButton.parts.spinner}"
@@ -6502,7 +6502,7 @@ body {
6502
6502
  ${this.label}
6503
6503
  ${this.spinnerAlign==="end"?this._renderSpinner():m}
6504
6504
  </rtg-button>
6505
- `}};exports.SbPasskeyButton._ROOT="passkey-button";exports.SbPasskeyButton._SPINNER="spinner";exports.SbPasskeyButton.TAG=`sb-${exports.SbPasskeyButton._ROOT}`;exports.SbPasskeyButton.CLICK_EVENT=`${exports.SbPasskeyButton.TAG}:click`;re([a({type:String})],exports.SbPasskeyButton.prototype,"seed",2);re([a({attribute:"child-id",type:String})],exports.SbPasskeyButton.prototype,"childId",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"variant",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"size",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"label",2);re([a({attribute:"spinner-align",type:String})],exports.SbPasskeyButton.prototype,"spinnerAlign",2);re([a({type:Boolean})],exports.SbPasskeyButton.prototype,"disabled",2);re([a({type:Boolean})],exports.SbPasskeyButton.prototype,"loading",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"event",2);re([x()],exports.SbPasskeyButton.prototype,"_loading",2);exports.SbPasskeyButton=re([p("sb-passkey-button")],exports.SbPasskeyButton);const Bg={apple:"Apple",discord:"Discord",facebook:"Facebook",github:"GitHub",google:"Google",linkedin:"LinkedIn",meta:"Meta",microsoft:"Microsoft",x:"X"},Mg={apple:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701",discord:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z",facebook:"M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z",github:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",google:"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z",linkedin:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",meta:"M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z",microsoft:"M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z",x:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.763l7.726-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z"};var qg=Object.defineProperty,Vg=Object.getOwnPropertyDescriptor,At=(e,t,r,i)=>{for(var s=i>1?void 0:i?Vg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&qg(t,r,s),s};exports.SbProviderButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.content="icon-label",this.variant="outline",this.size="default",this.prompt="Use",this.iconAlign="start",this._loading=!1,this._handleClick=()=>{this.disabled||this.isLoading||(this._loading=!0,this._dispatchClick(),this._emitClickEvent())}}static get parts(){const t=this._ROOT,r=`${t}-${this._ICON}`;return{root:t,icon:r}}static get clickEventName(){return`sb-${this._ROOT}:click`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbProviderButton.parts.root}-${this.provider}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.SbProviderButton._ICON}`}get iconCn(){return this.content==="icon"?"":`rtg-icon-align-${this.iconAlign}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_dispatchClick(){const t=new CustomEvent(exports.SbProviderButton.clickEventName,{detail:{id:this.rootId,provider:this.provider,event:this.event},bubbles:!0,composed:!0});this.dispatchEvent(t)}async _emitClickEvent(){if(this.event){this._loading||(this._loading=!0);try{await ht.processLoginflowEvent({event:this.event})}finally{this._loading=!1}}}_renderLogo(){return d`
6505
+ `}};exports.SbPasskeyButton._ROOT="passkey-button";exports.SbPasskeyButton._SPINNER="spinner";exports.SbPasskeyButton.TAG=`sb-${exports.SbPasskeyButton._ROOT}`;exports.SbPasskeyButton.CLICK_EVENT=`${exports.SbPasskeyButton.TAG}:click`;re([a({type:String})],exports.SbPasskeyButton.prototype,"seed",2);re([a({attribute:"child-id",type:String})],exports.SbPasskeyButton.prototype,"childId",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"variant",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"size",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"label",2);re([a({attribute:"spinner-align",type:String})],exports.SbPasskeyButton.prototype,"spinnerAlign",2);re([a({type:Boolean})],exports.SbPasskeyButton.prototype,"disabled",2);re([a({type:Boolean})],exports.SbPasskeyButton.prototype,"loading",2);re([a({type:String})],exports.SbPasskeyButton.prototype,"event",2);re([x()],exports.SbPasskeyButton.prototype,"_loading",2);exports.SbPasskeyButton=re([p("sb-passkey-button")],exports.SbPasskeyButton);const Bg={apple:"Apple",discord:"Discord",facebook:"Facebook",github:"GitHub",google:"Google",linkedin:"LinkedIn",meta:"Meta",microsoft:"Microsoft",x:"X"},Mg={apple:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701",discord:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z",facebook:"M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z",github:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",google:"M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z",linkedin:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",meta:"M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z",microsoft:"M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z",x:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.763l7.726-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z"};var qg=Object.defineProperty,Vg=Object.getOwnPropertyDescriptor,At=(e,t,r,i)=>{for(var s=i>1?void 0:i?Vg(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&qg(t,r,s),s};exports.SbProviderButton=class extends v{constructor(){super(...arguments),this.seed=_t(),this.content="icon-label",this.variant="outline",this.size="default",this.prompt="Use",this.iconAlign="start",this._loading=!1,this._handleClick=()=>{this.disabled||this.isLoading||(this._loading=!0,this._dispatchClick(),this._emitClickEvent())}}static get parts(){const t=this._ROOT,r=`${t}-${this._ICON}`;return{root:t,icon:r}}static get clickEventName(){return`sb-${this._ROOT}:click`}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbProviderButton.parts.root}-${this.provider}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.SbProviderButton._ICON}`}get iconCn(){return this.content==="icon"?"":`rtg-icon-align-${this.iconAlign}`}get isLoading(){return this._loading||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_dispatchClick(){const t=new CustomEvent(exports.SbProviderButton.clickEventName,{detail:{id:this.rootId,provider:this.provider,event:this.event},bubbles:!0,composed:!0});this.dispatchEvent(t)}async _emitClickEvent(){if(this.event){this._loading||(this._loading=!0);try{await ut.processLoginflowEvent({event:this.event})}finally{this._loading=!1}}}_renderLogo(){return d`
6506
6506
  <svg
6507
6507
  id="${this.iconId}"
6508
6508
  part="${exports.SbProviderButton.parts.icon}"
@@ -6740,7 +6740,7 @@ body {
6740
6740
  <svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg">
6741
6741
  <path d="M1 7H17M1 1H17M1 13H17" stroke="#0A0A0A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6742
6742
  </svg>
6743
- `}const Ls="sb-w-full sb-flex sb-justify-between sb-border-b sb-px-4 sb-py-2",Ns="sb-flex sb-items-center sb-text-[18px] sb-font-medium sb-gap-2 sb-text-muted-foreground !sb-min-w-9 !sb-min-h-9",zs="sb-w-full sb-basis-36 sb-shrink-0 sb-text-sm sb-text-foreground sb-font-medium sb-truncate sb-overflow-hidden sb-text-ellipsis",js="sb-w-full sb-border-none !sb-shadow-none !sb-px-0 disabled:!sb-opacity-100",Us="!sb-rounded-2xl !sb-p-0 !sb-bg-base-background",Ds="!sb-rounded-2xl !sb-p-0 sb-mb-4",Bs="!sb-bg-background",Ms="sb-w-full md:sb-w-[120px]",qs="sb-w-full md:sb-w-[120px]",Ln="sb-text-muted-foreground sb-text-sm sb-mr-2 sb-flex sb-items-center sb-gap-1";var fm=Object.defineProperty,vm=Object.getOwnPropertyDescriptor,xt=(e,t,r,i)=>{for(var s=i>1?void 0:i?vm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&fm(t,r,s),s};const ym=(e,t)=>{const r=Array.from({length:t}).map((o,n)=>d`<rtg-input-otp-slot
6743
+ `}const Ls="sb-w-full sb-flex sb-justify-between sb-border-b sb-px-4 sb-py-2",Ns="sb-flex sb-items-center sb-text-[18px] sb-font-medium sb-gap-2 sb-text-muted-foreground !sb-min-w-9 !sb-min-h-9",zs="sb-w-full sb-basis-36 sb-shrink-0 sb-text-sm sb-text-foreground sb-font-medium sb-truncate sb-overflow-hidden sb-text-ellipsis",Us="sb-w-full sb-border-none !sb-shadow-none !sb-px-0 disabled:!sb-opacity-100",js="!sb-rounded-2xl !sb-p-0 !sb-bg-base-background",Ds="!sb-rounded-2xl !sb-p-0 sb-mb-4",Bs="!sb-bg-background",Ms="sb-w-full md:sb-w-[120px]",qs="sb-w-full md:sb-w-[120px]",Ln="sb-text-muted-foreground sb-text-sm sb-mr-2 sb-flex sb-items-center sb-gap-1";var fm=Object.defineProperty,vm=Object.getOwnPropertyDescriptor,xt=(e,t,r,i)=>{for(var s=i>1?void 0:i?vm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&fm(t,r,s),s};const ym=(e,t)=>{const r=Array.from({length:t}).map((o,n)=>d`<rtg-input-otp-slot
6744
6744
  class="sb-bg-background"
6745
6745
  index=${n}
6746
6746
  ></rtg-input-otp-slot>`),i=o=>d`<rtg-input-otp-group>${o}</rtg-input-otp-group>`,s=()=>d`<rtg-input-otp-separator></rtg-input-otp-separator>`;switch(e){case"with_spacing":return d`<rtg-input-otp-group class="gap-2"
@@ -6748,7 +6748,7 @@ body {
6748
6748
  >`;case"simple":return d`${i(r.slice(0,3))}${s()}${i(r.slice(3))}`;case"with_separator":return d`
6749
6749
  ${i(r.slice(0,2))}${s()}
6750
6750
  ${i(r.slice(2,4))}${s()} ${i(r.slice(4))}
6751
- `;default:return i(r)}};exports.SbAccountInfo=class extends v{constructor(){super(...arguments),this.showAvatarMenu=!1,this.customizations=null,this.showIcons=!0,this.content=null,this.otpVariant="simple",this.otpLength=6,this.layout=Ot.ROW,this.isEditingEmail=!1,this.isVerifyingEmail=!1,this.isEditingPhone=!1,this.isVerifyingPhone=!1}getButtonStyles(){const t=Vt("default",this.customizations),r=Vt("outline",this.customizations),i=I(Ms,{},t,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),s=I(qs,{},r,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations);return{defaultMapped:i,outlineMapped:s}}getInputStyles(t=!1){var i,s,o;const r=t?Bs:Z(js);return I(r,{},(o=(s=(i=this.customizations)==null?void 0:i.byType)==null?void 0:s.inputs)==null?void 0:o.inputField,t?T.USER_PROFILE_EDITABLE_INPUT_FIELD:T.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,r,i;return I(Z(zs,"sb-hidden md:sb-inline"),{},(i=(r=(t=this.customizations)==null?void 0:t.byType)==null?void 0:r.labels)==null?void 0:i.inputLabel,T.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var r,i,s,o,n,h,u,g;return I(t?Us:Ds,{},t?(o=(s=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:s.userProfileCard)==null?void 0:o.editForm:(g=(u=(h=(n=this.customizations)==null?void 0:n.byType)==null?void 0:h.userProfile)==null?void 0:u.userProfileCard)==null?void 0:g.container,t?T.USER_PROFILE_EDIT_FORM:T.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderDisplayRow(t,r,i){const{class:s,style:o}=this.getLabelStyles(),{class:n,style:h}=this.getInputStyles(),u=this.layout===Ot.COLUMN;return d`
6751
+ `;default:return i(r)}};exports.SbAccountInfo=class extends v{constructor(){super(...arguments),this.showAvatarMenu=!1,this.customizations=null,this.showIcons=!0,this.content=null,this.otpVariant="simple",this.otpLength=6,this.layout=Ot.ROW,this.isEditingEmail=!1,this.isVerifyingEmail=!1,this.isEditingPhone=!1,this.isVerifyingPhone=!1}getButtonStyles(){const t=Vt("default",this.customizations),r=Vt("outline",this.customizations),i=I(Ms,{},t,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),s=I(qs,{},r,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations);return{defaultMapped:i,outlineMapped:s}}getInputStyles(t=!1){var i,s,o;const r=t?Bs:Z(Us);return I(r,{},(o=(s=(i=this.customizations)==null?void 0:i.byType)==null?void 0:s.inputs)==null?void 0:o.inputField,t?T.USER_PROFILE_EDITABLE_INPUT_FIELD:T.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,r,i;return I(Z(zs,"sb-hidden md:sb-inline"),{},(i=(r=(t=this.customizations)==null?void 0:t.byType)==null?void 0:r.labels)==null?void 0:i.inputLabel,T.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var r,i,s,o,n,h,u,g;return I(t?js:Ds,{},t?(o=(s=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:s.userProfileCard)==null?void 0:o.editForm:(g=(u=(h=(n=this.customizations)==null?void 0:n.byType)==null?void 0:h.userProfile)==null?void 0:u.userProfileCard)==null?void 0:g.container,t?T.USER_PROFILE_EDIT_FORM:T.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderDisplayRow(t,r,i){const{class:s,style:o}=this.getLabelStyles(),{class:n,style:h}=this.getInputStyles(),u=this.layout===Ot.COLUMN;return d`
6752
6752
  <div
6753
6753
  class=${Z("sb-w-full",u?"sb-flex sb-flex-row-reverse md:sb-flex-col sb-gap-2":"sb-flex sb-items-center sb-justify-between sb-gap-2")}
6754
6754
  >
@@ -6933,7 +6933,7 @@ body {
6933
6933
  </div>
6934
6934
  </rtg-card-content>
6935
6935
  </rtg-card>
6936
- `}createRenderRoot(){return this}};xt([a({type:Object})],exports.SbAccountInfo.prototype,"account",2);xt([a({type:Boolean})],exports.SbAccountInfo.prototype,"showAvatarMenu",2);xt([a({type:Object})],exports.SbAccountInfo.prototype,"customizations",2);xt([a({type:Function})],exports.SbAccountInfo.prototype,"toggleAvatarMenu",2);xt([a({type:Function})],exports.SbAccountInfo.prototype,"onAvatarChange",2);xt([a({type:Function})],exports.SbAccountInfo.prototype,"onAvatarRemove",2);xt([a({type:Boolean})],exports.SbAccountInfo.prototype,"showIcons",2);xt([a({type:Object})],exports.SbAccountInfo.prototype,"content",2);xt([a({type:String})],exports.SbAccountInfo.prototype,"otpVariant",2);xt([a({type:Number})],exports.SbAccountInfo.prototype,"otpLength",2);xt([a({type:String})],exports.SbAccountInfo.prototype,"layout",2);xt([x()],exports.SbAccountInfo.prototype,"isEditingEmail",2);xt([x()],exports.SbAccountInfo.prototype,"isVerifyingEmail",2);xt([x()],exports.SbAccountInfo.prototype,"isEditingPhone",2);xt([x()],exports.SbAccountInfo.prototype,"isVerifyingPhone",2);exports.SbAccountInfo=xt([p("sb-account-info")],exports.SbAccountInfo);var wm=Object.defineProperty,_m=Object.getOwnPropertyDescriptor,$r=(e,t,r,i)=>{for(var s=i>1?void 0:i?_m(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&wm(t,r,s),s};exports.SbPersonalInfo=class extends v{constructor(){super(...arguments),this.customizations=null,this.showIcons=!0,this.layout=Ot.ROW,this.content=null,this.isEditing=!1}handleEdit(){this.isEditing=!0}handleCancel(){this.isEditing=!1}handleSave(){this.isEditing=!1}createRenderRoot(){return this}getButtonStyles(){const t=Vt("default",this.customizations),r=Vt("outline",this.customizations),i=Vt("ghost",this.customizations),s=I(Ms,{},t,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),o=I(qs,{},r,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),n=I(Ln,{},i,T.USER_PROFILE_EDIT_BUTTON,this.customizations);return{defaultMapped:s,outlineMapped:o,ghostMapped:n}}getInputStyles(t=!1){var i,s,o;const r=t?Bs:Z(js);return I(r,{},(o=(s=(i=this.customizations)==null?void 0:i.byType)==null?void 0:s.inputs)==null?void 0:o.inputField,t?T.USER_PROFILE_EDITABLE_INPUT_FIELD:T.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,r,i;return I(Z(zs,this.layout!==Ot.ROW?"sb-basis-auto":""),{},(i=(r=(t=this.customizations)==null?void 0:t.byType)==null?void 0:r.labels)==null?void 0:i.inputLabel,T.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var r,i,s,o,n,h,u,g;return I(Z(t?Us+" sb-mb-4":Ds),{},t?(o=(s=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:s.userProfileCard)==null?void 0:o.editForm:(g=(u=(h=(n=this.customizations)==null?void 0:n.byType)==null?void 0:h.userProfile)==null?void 0:u.userProfileCard)==null?void 0:g.container,t?T.USER_PROFILE_EDIT_FORM:T.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderInput(t){const r=this.getInputStyles(this.isEditing);return d`
6936
+ `}createRenderRoot(){return this}};xt([a({type:Object})],exports.SbAccountInfo.prototype,"account",2);xt([a({type:Boolean})],exports.SbAccountInfo.prototype,"showAvatarMenu",2);xt([a({type:Object})],exports.SbAccountInfo.prototype,"customizations",2);xt([a({type:Function})],exports.SbAccountInfo.prototype,"toggleAvatarMenu",2);xt([a({type:Function})],exports.SbAccountInfo.prototype,"onAvatarChange",2);xt([a({type:Function})],exports.SbAccountInfo.prototype,"onAvatarRemove",2);xt([a({type:Boolean})],exports.SbAccountInfo.prototype,"showIcons",2);xt([a({type:Object})],exports.SbAccountInfo.prototype,"content",2);xt([a({type:String})],exports.SbAccountInfo.prototype,"otpVariant",2);xt([a({type:Number})],exports.SbAccountInfo.prototype,"otpLength",2);xt([a({type:String})],exports.SbAccountInfo.prototype,"layout",2);xt([x()],exports.SbAccountInfo.prototype,"isEditingEmail",2);xt([x()],exports.SbAccountInfo.prototype,"isVerifyingEmail",2);xt([x()],exports.SbAccountInfo.prototype,"isEditingPhone",2);xt([x()],exports.SbAccountInfo.prototype,"isVerifyingPhone",2);exports.SbAccountInfo=xt([p("sb-account-info")],exports.SbAccountInfo);var wm=Object.defineProperty,_m=Object.getOwnPropertyDescriptor,$r=(e,t,r,i)=>{for(var s=i>1?void 0:i?_m(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&wm(t,r,s),s};exports.SbPersonalInfo=class extends v{constructor(){super(...arguments),this.customizations=null,this.showIcons=!0,this.layout=Ot.ROW,this.content=null,this.isEditing=!1}handleEdit(){this.isEditing=!0}handleCancel(){this.isEditing=!1}handleSave(){this.isEditing=!1}createRenderRoot(){return this}getButtonStyles(){const t=Vt("default",this.customizations),r=Vt("outline",this.customizations),i=Vt("ghost",this.customizations),s=I(Ms,{},t,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),o=I(qs,{},r,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),n=I(Ln,{},i,T.USER_PROFILE_EDIT_BUTTON,this.customizations);return{defaultMapped:s,outlineMapped:o,ghostMapped:n}}getInputStyles(t=!1){var i,s,o;const r=t?Bs:Z(Us);return I(r,{},(o=(s=(i=this.customizations)==null?void 0:i.byType)==null?void 0:s.inputs)==null?void 0:o.inputField,t?T.USER_PROFILE_EDITABLE_INPUT_FIELD:T.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,r,i;return I(Z(zs,this.layout!==Ot.ROW?"sb-basis-auto":""),{},(i=(r=(t=this.customizations)==null?void 0:t.byType)==null?void 0:r.labels)==null?void 0:i.inputLabel,T.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var r,i,s,o,n,h,u,g;return I(Z(t?js+" sb-mb-4":Ds),{},t?(o=(s=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:s.userProfileCard)==null?void 0:o.editForm:(g=(u=(h=(n=this.customizations)==null?void 0:n.byType)==null?void 0:h.userProfile)==null?void 0:u.userProfileCard)==null?void 0:g.container,t?T.USER_PROFILE_EDIT_FORM:T.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderInput(t){const r=this.getInputStyles(this.isEditing);return d`
6937
6937
  <rtg-input
6938
6938
  customClass="${r.class}"
6939
6939
  customStyle="${R(r.style)}"
@@ -6962,7 +6962,7 @@ body {
6962
6962
  Cancel
6963
6963
  </rtg-button>
6964
6964
  </rtg-card-footer>
6965
- `}render(){var w,E,C,S,k,O,A,F,V,M,J,it,st,U;const t=[{label:"Username",value:this.personal.username},{label:"First name",value:this.personal.first},{label:"Middle name",value:this.personal.middle},{label:"Last name",value:this.personal.last},{label:"Nickname",value:this.personal.nickname},{label:"Gender",value:this.personal.gender},{label:"Bio",value:this.personal.bio}],r=this.getContainerStyles(!1),i=this.getContainerStyles(!0),{defaultMapped:s,outlineMapped:o,ghostMapped:n}=this.getButtonStyles(),h=I(Ls,{},(k=(S=(C=(E=(w=this.customizations)==null?void 0:w.byType)==null?void 0:E.userProfile)==null?void 0:C.userProfileCard)==null?void 0:S.header)==null?void 0:k.container,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),u=I(Ns,{},(M=(V=(F=(A=(O=this.customizations)==null?void 0:O.byType)==null?void 0:A.userProfile)==null?void 0:F.userProfileCard)==null?void 0:V.header)==null?void 0:M.title,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),g=this.getLabelStyles(),y=this.isEditing?i:r;return d`
6965
+ `}render(){var w,E,C,S,k,O,A,F,V,M,Q,it,st,j;const t=[{label:"Username",value:this.personal.username},{label:"First name",value:this.personal.first},{label:"Middle name",value:this.personal.middle},{label:"Last name",value:this.personal.last},{label:"Nickname",value:this.personal.nickname},{label:"Gender",value:this.personal.gender},{label:"Bio",value:this.personal.bio}],r=this.getContainerStyles(!1),i=this.getContainerStyles(!0),{defaultMapped:s,outlineMapped:o,ghostMapped:n}=this.getButtonStyles(),h=I(Ls,{},(k=(S=(C=(E=(w=this.customizations)==null?void 0:w.byType)==null?void 0:E.userProfile)==null?void 0:C.userProfileCard)==null?void 0:S.header)==null?void 0:k.container,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),u=I(Ns,{},(M=(V=(F=(A=(O=this.customizations)==null?void 0:O.byType)==null?void 0:A.userProfile)==null?void 0:F.userProfileCard)==null?void 0:V.header)==null?void 0:M.title,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),g=this.getLabelStyles(),y=this.isEditing?i:r;return d`
6966
6966
  <rtg-card
6967
6967
  customClass=${y.class}
6968
6968
  customStyle=${R(y.style)}
@@ -6976,10 +6976,10 @@ body {
6976
6976
  customClass=${u.class}
6977
6977
  customStyle=${R(u.style)}
6978
6978
  >
6979
- ${(J=this.content)!=null&&J.icon?(it=this.content)==null?void 0:it.icon:um()}
6979
+ ${(Q=this.content)!=null&&Q.icon?(it=this.content)==null?void 0:it.icon:um()}
6980
6980
 
6981
6981
  <span>
6982
- ${(st=this.content)!=null&&st.title?(U=this.content)==null?void 0:U.title:"Personal Info"}
6982
+ ${(st=this.content)!=null&&st.title?(j=this.content)==null?void 0:j.title:"Personal Info"}
6983
6983
  </span>
6984
6984
  </rtg-card-title>
6985
6985
  ${this.isEditing?null:d`
@@ -7018,7 +7018,7 @@ body {
7018
7018
  <!-- Footer -->
7019
7019
  ${this.isEditing?this.renderFooter(s,o):null}
7020
7020
  </rtg-card>
7021
- `}};$r([a({type:Object})],exports.SbPersonalInfo.prototype,"personal",2);$r([a({type:Object})],exports.SbPersonalInfo.prototype,"customizations",2);$r([a({type:Boolean})],exports.SbPersonalInfo.prototype,"showIcons",2);$r([a({type:String})],exports.SbPersonalInfo.prototype,"layout",2);$r([a({type:Object})],exports.SbPersonalInfo.prototype,"content",2);$r([x()],exports.SbPersonalInfo.prototype,"isEditing",2);exports.SbPersonalInfo=$r([p("sb-personal-info")],exports.SbPersonalInfo);var xm=Object.defineProperty,Sm=Object.getOwnPropertyDescriptor,Cr=(e,t,r,i)=>{for(var s=i>1?void 0:i?Sm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&xm(t,r,s),s};exports.SbLocationInfo=class extends v{constructor(){super(...arguments),this.customizations=null,this.showIcons=!0,this.layout=Ot.ROW,this.content=null,this.isEditing=!1}handleEdit(){this.isEditing=!0}handleCancel(){this.isEditing=!1}handleSave(){this.isEditing=!1}createRenderRoot(){return this}getButtonStyles(){const t=Vt("default",this.customizations),r=Vt("outline",this.customizations),i=Vt("ghost",this.customizations),s=I(Ms,{},t,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),o=I(qs,{},r,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),n=I(Ln,{},i,T.USER_PROFILE_EDIT_BUTTON,this.customizations);return{defaultMapped:s,outlineMapped:o,ghostMapped:n}}getInputStyles(t=!1){var i,s,o;const r=t?Bs:Z(js);return I(r,{},(o=(s=(i=this.customizations)==null?void 0:i.byType)==null?void 0:s.inputs)==null?void 0:o.inputField,t?T.USER_PROFILE_EDITABLE_INPUT_FIELD:T.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,r,i;return I(Z(zs,this.layout!==Ot.ROW?"sb-basis-auto":""),{},(i=(r=(t=this.customizations)==null?void 0:t.byType)==null?void 0:r.labels)==null?void 0:i.inputLabel,T.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var r,i,s,o,n,h,u,g;return I(Z(t?Us+" sb-mb-4":Ds),{},t?(o=(s=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:s.userProfileCard)==null?void 0:o.editForm:(g=(u=(h=(n=this.customizations)==null?void 0:n.byType)==null?void 0:h.userProfile)==null?void 0:u.userProfileCard)==null?void 0:g.container,t?T.USER_PROFILE_EDIT_FORM:T.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderInput(t){const r=this.getInputStyles(this.isEditing);return d`
7021
+ `}};$r([a({type:Object})],exports.SbPersonalInfo.prototype,"personal",2);$r([a({type:Object})],exports.SbPersonalInfo.prototype,"customizations",2);$r([a({type:Boolean})],exports.SbPersonalInfo.prototype,"showIcons",2);$r([a({type:String})],exports.SbPersonalInfo.prototype,"layout",2);$r([a({type:Object})],exports.SbPersonalInfo.prototype,"content",2);$r([x()],exports.SbPersonalInfo.prototype,"isEditing",2);exports.SbPersonalInfo=$r([p("sb-personal-info")],exports.SbPersonalInfo);var xm=Object.defineProperty,Sm=Object.getOwnPropertyDescriptor,Cr=(e,t,r,i)=>{for(var s=i>1?void 0:i?Sm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&xm(t,r,s),s};exports.SbLocationInfo=class extends v{constructor(){super(...arguments),this.customizations=null,this.showIcons=!0,this.layout=Ot.ROW,this.content=null,this.isEditing=!1}handleEdit(){this.isEditing=!0}handleCancel(){this.isEditing=!1}handleSave(){this.isEditing=!1}createRenderRoot(){return this}getButtonStyles(){const t=Vt("default",this.customizations),r=Vt("outline",this.customizations),i=Vt("ghost",this.customizations),s=I(Ms,{},t,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),o=I(qs,{},r,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),n=I(Ln,{},i,T.USER_PROFILE_EDIT_BUTTON,this.customizations);return{defaultMapped:s,outlineMapped:o,ghostMapped:n}}getInputStyles(t=!1){var i,s,o;const r=t?Bs:Z(Us);return I(r,{},(o=(s=(i=this.customizations)==null?void 0:i.byType)==null?void 0:s.inputs)==null?void 0:o.inputField,t?T.USER_PROFILE_EDITABLE_INPUT_FIELD:T.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,r,i;return I(Z(zs,this.layout!==Ot.ROW?"sb-basis-auto":""),{},(i=(r=(t=this.customizations)==null?void 0:t.byType)==null?void 0:r.labels)==null?void 0:i.inputLabel,T.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var r,i,s,o,n,h,u,g;return I(Z(t?js+" sb-mb-4":Ds),{},t?(o=(s=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:s.userProfileCard)==null?void 0:o.editForm:(g=(u=(h=(n=this.customizations)==null?void 0:n.byType)==null?void 0:h.userProfile)==null?void 0:u.userProfileCard)==null?void 0:g.container,t?T.USER_PROFILE_EDIT_FORM:T.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderInput(t){const r=this.getInputStyles(this.isEditing);return d`
7022
7022
  <rtg-input
7023
7023
  customClass="${r.class}"
7024
7024
  customStyle="${R(r.style)}"
@@ -7047,7 +7047,7 @@ body {
7047
7047
  Cancel
7048
7048
  </rtg-button>
7049
7049
  </rtg-card-footer>
7050
- `}render(){var w,E,C,S,k,O,A,F,V,M,J,it;const t=[{label:"Location",value:this.locationInfo.location},{label:"Zone Info",value:this.locationInfo.zoneInfo}],r=this.getContainerStyles(!1),i=this.getContainerStyles(!0),{defaultMapped:s,outlineMapped:o,ghostMapped:n}=this.getButtonStyles(),h=I(Ls,{},(k=(S=(C=(E=(w=this.customizations)==null?void 0:w.byType)==null?void 0:E.userProfile)==null?void 0:C.userProfileCard)==null?void 0:S.header)==null?void 0:k.container,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),u=I(Ns,{},(M=(V=(F=(A=(O=this.customizations)==null?void 0:O.byType)==null?void 0:A.userProfile)==null?void 0:F.userProfileCard)==null?void 0:V.header)==null?void 0:M.title,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),g=this.getLabelStyles(),y=this.isEditing?i:r;return d`
7050
+ `}render(){var w,E,C,S,k,O,A,F,V,M,Q,it;const t=[{label:"Location",value:this.locationInfo.location},{label:"Zone Info",value:this.locationInfo.zoneInfo}],r=this.getContainerStyles(!1),i=this.getContainerStyles(!0),{defaultMapped:s,outlineMapped:o,ghostMapped:n}=this.getButtonStyles(),h=I(Ls,{},(k=(S=(C=(E=(w=this.customizations)==null?void 0:w.byType)==null?void 0:E.userProfile)==null?void 0:C.userProfileCard)==null?void 0:S.header)==null?void 0:k.container,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),u=I(Ns,{},(M=(V=(F=(A=(O=this.customizations)==null?void 0:O.byType)==null?void 0:A.userProfile)==null?void 0:F.userProfileCard)==null?void 0:V.header)==null?void 0:M.title,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),g=this.getLabelStyles(),y=this.isEditing?i:r;return d`
7051
7051
  <rtg-card
7052
7052
  customClass=${y.class}
7053
7053
  customStyle=${R(y.style)}
@@ -7061,7 +7061,7 @@ body {
7061
7061
  customClass=${u.class}
7062
7062
  customStyle=${R(u.style)}
7063
7063
  >
7064
- ${(J=this.content)!=null&&J.icon?this.content.icon:pm()}
7064
+ ${(Q=this.content)!=null&&Q.icon?this.content.icon:pm()}
7065
7065
  <span>
7066
7066
  ${(it=this.content)!=null&&it.title?this.content.title:"Location"}
7067
7067
  </span>
@@ -7103,7 +7103,7 @@ body {
7103
7103
  <!-- Footer -->
7104
7104
  ${this.isEditing?this.renderFooter(s,o):null}
7105
7105
  </rtg-card>
7106
- `}};Cr([a({type:Object})],exports.SbLocationInfo.prototype,"locationInfo",2);Cr([a({type:Object})],exports.SbLocationInfo.prototype,"customizations",2);Cr([a({type:Boolean})],exports.SbLocationInfo.prototype,"showIcons",2);Cr([a({type:String})],exports.SbLocationInfo.prototype,"layout",2);Cr([a({type:Object})],exports.SbLocationInfo.prototype,"content",2);Cr([x()],exports.SbLocationInfo.prototype,"isEditing",2);exports.SbLocationInfo=Cr([p("sb-location-info")],exports.SbLocationInfo);var $m=Object.defineProperty,Cm=Object.getOwnPropertyDescriptor,Er=(e,t,r,i)=>{for(var s=i>1?void 0:i?Cm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&$m(t,r,s),s};exports.SbUrlsInfo=class extends v{constructor(){super(...arguments),this.showIcons=!0,this.customizations=null,this.layout=Ot.ROW,this.content=null,this.isEditing=!1}handleEdit(){this.isEditing=!0}handleCancel(){this.isEditing=!1}handleSave(){this.isEditing=!1}createRenderRoot(){return this}getButtonStyles(){const t=Vt("default",this.customizations),r=Vt("outline",this.customizations),i=Vt("ghost",this.customizations),s=I(Ms,{},t,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),o=I(qs,{},r,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),n=I(Ln,{},i,T.USER_PROFILE_EDIT_BUTTON,this.customizations);return{defaultMapped:s,outlineMapped:o,ghostMapped:n}}getInputStyles(t=!1){var i,s,o;const r=t?Bs:Z(js);return I(r,{},(o=(s=(i=this.customizations)==null?void 0:i.byType)==null?void 0:s.inputs)==null?void 0:o.inputField,t?T.USER_PROFILE_EDITABLE_INPUT_FIELD:T.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,r,i;return I(Z(zs,this.layout!==Ot.ROW?"sb-basis-auto":""),{},(i=(r=(t=this.customizations)==null?void 0:t.byType)==null?void 0:r.labels)==null?void 0:i.inputLabel,T.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var r,i,s,o,n,h,u,g;return I(Z(t?Us:Ds,"!sb-mb-0"),{},t?(o=(s=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:s.userProfileCard)==null?void 0:o.editForm:(g=(u=(h=(n=this.customizations)==null?void 0:n.byType)==null?void 0:h.userProfile)==null?void 0:u.userProfileCard)==null?void 0:g.container,t?T.USER_PROFILE_EDIT_FORM:T.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderInput(t){const r=this.getInputStyles(this.isEditing);return d`
7106
+ `}};Cr([a({type:Object})],exports.SbLocationInfo.prototype,"locationInfo",2);Cr([a({type:Object})],exports.SbLocationInfo.prototype,"customizations",2);Cr([a({type:Boolean})],exports.SbLocationInfo.prototype,"showIcons",2);Cr([a({type:String})],exports.SbLocationInfo.prototype,"layout",2);Cr([a({type:Object})],exports.SbLocationInfo.prototype,"content",2);Cr([x()],exports.SbLocationInfo.prototype,"isEditing",2);exports.SbLocationInfo=Cr([p("sb-location-info")],exports.SbLocationInfo);var $m=Object.defineProperty,Cm=Object.getOwnPropertyDescriptor,Er=(e,t,r,i)=>{for(var s=i>1?void 0:i?Cm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&$m(t,r,s),s};exports.SbUrlsInfo=class extends v{constructor(){super(...arguments),this.showIcons=!0,this.customizations=null,this.layout=Ot.ROW,this.content=null,this.isEditing=!1}handleEdit(){this.isEditing=!0}handleCancel(){this.isEditing=!1}handleSave(){this.isEditing=!1}createRenderRoot(){return this}getButtonStyles(){const t=Vt("default",this.customizations),r=Vt("outline",this.customizations),i=Vt("ghost",this.customizations),s=I(Ms,{},t,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),o=I(qs,{},r,T.USER_PROFILE_DEFAULT_BUTTON,this.customizations),n=I(Ln,{},i,T.USER_PROFILE_EDIT_BUTTON,this.customizations);return{defaultMapped:s,outlineMapped:o,ghostMapped:n}}getInputStyles(t=!1){var i,s,o;const r=t?Bs:Z(Us);return I(r,{},(o=(s=(i=this.customizations)==null?void 0:i.byType)==null?void 0:s.inputs)==null?void 0:o.inputField,t?T.USER_PROFILE_EDITABLE_INPUT_FIELD:T.USER_PROFILE_INPUT_FIELD,this.customizations)}getLabelStyles(){var t,r,i;return I(Z(zs,this.layout!==Ot.ROW?"sb-basis-auto":""),{},(i=(r=(t=this.customizations)==null?void 0:t.byType)==null?void 0:r.labels)==null?void 0:i.inputLabel,T.USER_PROFILE_INPUT_LABEL,this.customizations)}getContainerStyles(t){var r,i,s,o,n,h,u,g;return I(Z(t?js:Ds,"!sb-mb-0"),{},t?(o=(s=(i=(r=this.customizations)==null?void 0:r.byType)==null?void 0:i.userProfile)==null?void 0:s.userProfileCard)==null?void 0:o.editForm:(g=(u=(h=(n=this.customizations)==null?void 0:n.byType)==null?void 0:h.userProfile)==null?void 0:u.userProfileCard)==null?void 0:g.container,t?T.USER_PROFILE_EDIT_FORM:T.USER_PROFILE_CARD_CONTAINER,this.customizations)}renderInput(t){const r=this.getInputStyles(this.isEditing);return d`
7107
7107
  <rtg-input
7108
7108
  customClass="${r.class}"
7109
7109
  customStyle="${R(r.style)}"
@@ -7132,7 +7132,7 @@ body {
7132
7132
  Cancel
7133
7133
  </rtg-button>
7134
7134
  </rtg-card-footer>
7135
- `}render(){var w,E,C,S,k,O,A,F,V,M,J,it;const t=[{label:"Website",value:this.URLsInfo.website}],r=this.getContainerStyles(!1),i=this.getContainerStyles(!0),{defaultMapped:s,outlineMapped:o,ghostMapped:n}=this.getButtonStyles(),h=I(Ls,{},(k=(S=(C=(E=(w=this.customizations)==null?void 0:w.byType)==null?void 0:E.userProfile)==null?void 0:C.userProfileCard)==null?void 0:S.header)==null?void 0:k.container,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),u=I(Ns,{},(M=(V=(F=(A=(O=this.customizations)==null?void 0:O.byType)==null?void 0:A.userProfile)==null?void 0:F.userProfileCard)==null?void 0:V.header)==null?void 0:M.title,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),g=this.getLabelStyles(),y=this.isEditing?i:r;return d`
7135
+ `}render(){var w,E,C,S,k,O,A,F,V,M,Q,it;const t=[{label:"Website",value:this.URLsInfo.website}],r=this.getContainerStyles(!1),i=this.getContainerStyles(!0),{defaultMapped:s,outlineMapped:o,ghostMapped:n}=this.getButtonStyles(),h=I(Ls,{},(k=(S=(C=(E=(w=this.customizations)==null?void 0:w.byType)==null?void 0:E.userProfile)==null?void 0:C.userProfileCard)==null?void 0:S.header)==null?void 0:k.container,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),u=I(Ns,{},(M=(V=(F=(A=(O=this.customizations)==null?void 0:O.byType)==null?void 0:A.userProfile)==null?void 0:F.userProfileCard)==null?void 0:V.header)==null?void 0:M.title,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),g=this.getLabelStyles(),y=this.isEditing?i:r;return d`
7136
7136
  <rtg-card
7137
7137
  customClass=${y.class}
7138
7138
  customStyle=${R(y.style)}
@@ -7146,7 +7146,7 @@ body {
7146
7146
  customClass=${u.class}
7147
7147
  customStyle=${R(u.style)}
7148
7148
  >
7149
- ${(J=this.content)!=null&&J.icon?this.content.icon:gm()}
7149
+ ${(Q=this.content)!=null&&Q.icon?this.content.icon:gm()}
7150
7150
  <span>${((it=this.content)==null?void 0:it.title)??"URLs"}</span>
7151
7151
  </rtg-card-title>
7152
7152
 
@@ -7221,7 +7221,7 @@ body {
7221
7221
  .URLsInfo=${this.urls}
7222
7222
  .layout=${this.widgetsLayout}
7223
7223
  ></sb-urls-info>
7224
- `}};ft([a({type:Object})],exports.Profile.prototype,"account",2);ft([a({type:Object})],exports.Profile.prototype,"personal",2);ft([a({type:Object})],exports.Profile.prototype,"location",2);ft([a({type:Object})],exports.Profile.prototype,"urls",2);ft([a({type:Boolean})],exports.Profile.prototype,"showAvatarMenu",2);ft([a({type:Object})],exports.Profile.prototype,"customizations",2);ft([a({type:Boolean})],exports.Profile.prototype,"showIcons",2);ft([a({attribute:!1})],exports.Profile.prototype,"modalIcon",2);ft([a({type:String})],exports.Profile.prototype,"orientation",2);ft([a({type:String})],exports.Profile.prototype,"sidebarDisplayType",2);ft([a({type:String})],exports.Profile.prototype,"mode",2);ft([a({type:String})],exports.Profile.prototype,"widgetsLayout",2);ft([a({type:Function})],exports.Profile.prototype,"toggleAvatarMenu",2);ft([a({type:Function})],exports.Profile.prototype,"onAvatarChange",2);ft([a({type:Function})],exports.Profile.prototype,"onAvatarRemove",2);ft([a({type:Object})],exports.Profile.prototype,"content",2);exports.Profile=ft([p("sb-profile")],exports.Profile);const Rm="!sb-bg-background",pd={vertical:"sb-justify-between sb-w-full",horizontal:"sb-flex-col !sb-items-start sb-mx-4 md:sb-ml-6"},Im="sb-p-2 sb-mb-4 sb-rounded-lg sb-border-muted sb-bg-background",Om="sb-font-medium sb-ml-2 -sb-mt-4 sb-text-[18px] sb-text-foreground",Am="mobile-sidebar-drawer sb-fixed sb-top-0 sb-left-0 sb-h-full sb-max-w-xs sb-bg-background sb-shadow-lg sb-z-[9999] sb-transform sb-transition-all sb-duration-300 sb-ease-in-out",Pm="mobile-sidebar-overlay sb-fixed sb-inset-0 sb-bg-black/50 sb-z-[9998] sb-transition-opacity sb-duration-300 sb-ease-in-out";var Fm=Object.defineProperty,Tm=Object.getOwnPropertyDescriptor,kr=(e,t,r,i)=>{for(var s=i>1?void 0:i?Tm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Fm(t,r,s),s};const Ho=[{label:"Profile",value:tn.PROFILE},{label:"Security",value:tn.SECURITY}];let je=class extends v{constructor(){super(...arguments),this.orientation=Xt.HORIZONTAL,this.displayType=qt.REGULAR,this.mode=Ne.PAGE,this.config={showIcons:!0},this.customizations=null,this.isMenuOpen=!1}createRenderRoot(){return this}toggleMenu(){const e=this.closest('div[role="tab"]');e&&e.classList.toggle("sb-rotate-0"),this.isMenuOpen=!this.isMenuOpen,this.requestUpdate()}handleCloseProfile(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}renderTabs(e=Ho,t=!1,r){var o,n,h;const{class:i,style:s}=I("",{},(h=(n=(o=this.customizations)==null?void 0:o.byType)==null?void 0:n.userProfile)==null?void 0:h.sidebarTabs,T.USER_PROFILE_SIDEBAR_TABS,this.customizations);return d`
7224
+ `}};ft([a({type:Object})],exports.Profile.prototype,"account",2);ft([a({type:Object})],exports.Profile.prototype,"personal",2);ft([a({type:Object})],exports.Profile.prototype,"location",2);ft([a({type:Object})],exports.Profile.prototype,"urls",2);ft([a({type:Boolean})],exports.Profile.prototype,"showAvatarMenu",2);ft([a({type:Object})],exports.Profile.prototype,"customizations",2);ft([a({type:Boolean})],exports.Profile.prototype,"showIcons",2);ft([a({attribute:!1})],exports.Profile.prototype,"modalIcon",2);ft([a({type:String})],exports.Profile.prototype,"orientation",2);ft([a({type:String})],exports.Profile.prototype,"sidebarDisplayType",2);ft([a({type:String})],exports.Profile.prototype,"mode",2);ft([a({type:String})],exports.Profile.prototype,"widgetsLayout",2);ft([a({type:Function})],exports.Profile.prototype,"toggleAvatarMenu",2);ft([a({type:Function})],exports.Profile.prototype,"onAvatarChange",2);ft([a({type:Function})],exports.Profile.prototype,"onAvatarRemove",2);ft([a({type:Object})],exports.Profile.prototype,"content",2);exports.Profile=ft([p("sb-profile")],exports.Profile);const Rm="!sb-bg-background",pd={vertical:"sb-justify-between sb-w-full",horizontal:"sb-flex-col !sb-items-start sb-mx-4 md:sb-ml-6"},Im="sb-p-2 sb-mb-4 sb-rounded-lg sb-border-muted sb-bg-background",Om="sb-font-medium sb-ml-2 -sb-mt-4 sb-text-[18px] sb-text-foreground",Am="mobile-sidebar-drawer sb-fixed sb-top-0 sb-left-0 sb-h-full sb-max-w-xs sb-bg-background sb-shadow-lg sb-z-[9999] sb-transform sb-transition-all sb-duration-300 sb-ease-in-out",Pm="mobile-sidebar-overlay sb-fixed sb-inset-0 sb-bg-black/50 sb-z-[9998] sb-transition-opacity sb-duration-300 sb-ease-in-out";var Fm=Object.defineProperty,Tm=Object.getOwnPropertyDescriptor,kr=(e,t,r,i)=>{for(var s=i>1?void 0:i?Tm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Fm(t,r,s),s};const Ho=[{label:"Profile",value:tn.PROFILE},{label:"Security",value:tn.SECURITY}];let Ue=class extends v{constructor(){super(...arguments),this.orientation=Xt.HORIZONTAL,this.displayType=qt.REGULAR,this.mode=Ne.PAGE,this.config={showIcons:!0},this.customizations=null,this.isMenuOpen=!1}createRenderRoot(){return this}toggleMenu(){const e=this.closest('div[role="tab"]');e&&e.classList.toggle("sb-rotate-0"),this.isMenuOpen=!this.isMenuOpen,this.requestUpdate()}handleCloseProfile(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}renderTabs(e=Ho,t=!1,r){var o,n,h;const{class:i,style:s}=I("",{},(h=(n=(o=this.customizations)==null?void 0:o.byType)==null?void 0:n.userProfile)==null?void 0:h.sidebarTabs,T.USER_PROFILE_SIDEBAR_TABS,this.customizations);return d`
7225
7225
  <rtg-tab-list
7226
7226
  orientation=${t?"vertical":"horizontal"}
7227
7227
  class="sb-flex sb-w-full ${t?"":"sb-mb-4"}"
@@ -7279,7 +7279,7 @@ body {
7279
7279
  `:null}
7280
7280
  </div>
7281
7281
  ${this.displayType===qt.BURGER?this.renderMobileDrawer():null}
7282
- `}};kr([a({type:String})],je.prototype,"orientation",2);kr([a({type:String})],je.prototype,"displayType",2);kr([a({type:String})],je.prototype,"mode",2);kr([a({type:Object})],je.prototype,"config",2);kr([a({type:Object})],je.prototype,"customizations",2);kr([x()],je.prototype,"isMenuOpen",2);je=kr([p("sb-profile-sidebar")],je);var Lm=Object.defineProperty,he=(e,t,r,i)=>{for(var s=void 0,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=n(t,r,s)||s);return s&&Lm(t,r,s),s};const gd={xs:640,sm:768};class Gt extends v{constructor(){super(...arguments),this.showAvatarMenu=!1,this.orientation=Xt.HORIZONTAL,this.mobileDisplay=qt.REGULAR,this.mode=Ne.PAGE,this.widgetsLayout=Ot.ROW,this.content=null,this.customizations=null,this.providedCustomizations=null,this.isOpen=!0,this.currentBreakpoint="md",this.account={email:"J.Doe@gmail.com",phone:"+989390717800",avatar:"https://github.com/shadcn.png"},this.personal={username:"@JaneeDoe",first:"Jane",middle:"Michelle",last:"Doe",nickname:"Janee",gender:"Female",bio:"-"},this.location={location:"Iran, Tehran",zoneInfo:"GMT+3:30"},this.urls={website:"www.janeedoe.com"},this.defaultTab="Profile",this._handleResize=()=>{this._updateBreakpoint()},this._handleClose=()=>{this.mode===Ne.MODAL&&(this.isOpen=!1)},this._toggleAvatarMenu=t=>{t.stopPropagation(),this.showAvatarMenu=!this.showAvatarMenu},this._handleAvatarChange=()=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=r=>{var o;const i=(o=r.target.files)==null?void 0:o[0];if(!i)return;const s=new FileReader;s.onload=()=>{this.account.avatar=s.result,this.requestUpdate()},s.readAsDataURL(i)},t.click()},this._handleAvatarRemove=()=>{this.account.avatar="https://via.placeholder.com/80",this.showAvatarMenu=!1},this._handleClickOutside=t=>{if(!this.showAvatarMenu)return;const r=t.target,i=this.querySelector("sb-account-info"),s=this.querySelector("rtg-card");i!=null&&i.contains(r)||s!=null&&s.contains(r)||(this.showAvatarMenu=!1)}}connectedCallback(){super.connectedCallback(),this._updateBreakpoint(),window.addEventListener("resize",this._handleResize),document.addEventListener("remove-avatar",this._handleAvatarRemove),document.addEventListener("click",this._handleClickOutside),this.addEventListener("close-user-profile",this._handleClose),this.addEventListener("change-avatar",this._handleAvatarChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),document.removeEventListener("remove-avatar",this._handleAvatarRemove),document.removeEventListener("click",this._handleClickOutside),this.removeEventListener("close-user-profile",this._handleClose),this.removeEventListener("change-avatar",this._handleAvatarChange)}firstUpdated(){this.style.width="100%"}_updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t<gd.xs?"xs":t<gd.sm?"sm":"md"}get effectiveCustomizations(){return xs(this.providedCustomizations??{},this.customizations??{})}get isModal(){return this.mode===Ne.MODAL}get sidebarDisplayType(){return this.orientation===Xt.VERTICAL||this.currentBreakpoint==="md"?qt.REGULAR:qt.BURGER}get containerClasses(){return Z(Eu,this.isModal?Ru:ku,this.isModal?Su:xu,this.sidebarDisplayType===qt.BURGER||this.orientation===Xt.VERTICAL?"!sb-flex-col":"!sb-flex-row")}get contentClasses(){return Z("sb-flex-grow",this.isModal?"sb-max-h-[864px] sb-mx-4 sb-px-2 md:sb-mx-0 md:sb-px-6 md:sb-pl-0 sb-overflow-auto":"md:sb-max-h-[100%]",this.orientation===Xt.VERTICAL?"md:sb-pl-6 sb-mb-16":"")}renderCloseButton(){return this.isModal?d`
7282
+ `}};kr([a({type:String})],Ue.prototype,"orientation",2);kr([a({type:String})],Ue.prototype,"displayType",2);kr([a({type:String})],Ue.prototype,"mode",2);kr([a({type:Object})],Ue.prototype,"config",2);kr([a({type:Object})],Ue.prototype,"customizations",2);kr([x()],Ue.prototype,"isMenuOpen",2);Ue=kr([p("sb-profile-sidebar")],Ue);var Lm=Object.defineProperty,he=(e,t,r,i)=>{for(var s=void 0,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=n(t,r,s)||s);return s&&Lm(t,r,s),s};const gd={xs:640,sm:768};class Gt extends v{constructor(){super(...arguments),this.showAvatarMenu=!1,this.orientation=Xt.HORIZONTAL,this.mobileDisplay=qt.REGULAR,this.mode=Ne.PAGE,this.widgetsLayout=Ot.ROW,this.content=null,this.customizations=null,this.providedCustomizations=null,this.isOpen=!0,this.currentBreakpoint="md",this.account={email:"J.Doe@gmail.com",phone:"+989390717800",avatar:"https://github.com/shadcn.png"},this.personal={username:"@JaneeDoe",first:"Jane",middle:"Michelle",last:"Doe",nickname:"Janee",gender:"Female",bio:"-"},this.location={location:"Iran, Tehran",zoneInfo:"GMT+3:30"},this.urls={website:"www.janeedoe.com"},this.defaultTab="Profile",this._handleResize=()=>{this._updateBreakpoint()},this._handleClose=()=>{this.mode===Ne.MODAL&&(this.isOpen=!1)},this._toggleAvatarMenu=t=>{t.stopPropagation(),this.showAvatarMenu=!this.showAvatarMenu},this._handleAvatarChange=()=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=r=>{var o;const i=(o=r.target.files)==null?void 0:o[0];if(!i)return;const s=new FileReader;s.onload=()=>{this.account.avatar=s.result,this.requestUpdate()},s.readAsDataURL(i)},t.click()},this._handleAvatarRemove=()=>{this.account.avatar="https://via.placeholder.com/80",this.showAvatarMenu=!1},this._handleClickOutside=t=>{if(!this.showAvatarMenu)return;const r=t.target,i=this.querySelector("sb-account-info"),s=this.querySelector("rtg-card");i!=null&&i.contains(r)||s!=null&&s.contains(r)||(this.showAvatarMenu=!1)}}connectedCallback(){super.connectedCallback(),this._updateBreakpoint(),window.addEventListener("resize",this._handleResize),document.addEventListener("remove-avatar",this._handleAvatarRemove),document.addEventListener("click",this._handleClickOutside),this.addEventListener("close-user-profile",this._handleClose),this.addEventListener("change-avatar",this._handleAvatarChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),document.removeEventListener("remove-avatar",this._handleAvatarRemove),document.removeEventListener("click",this._handleClickOutside),this.removeEventListener("close-user-profile",this._handleClose),this.removeEventListener("change-avatar",this._handleAvatarChange)}firstUpdated(){this.style.width="100%"}_updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t<gd.xs?"xs":t<gd.sm?"sm":"md"}get effectiveCustomizations(){return xs(this.providedCustomizations??{},this.customizations??{})}get isModal(){return this.mode===Ne.MODAL}get sidebarDisplayType(){return this.orientation===Xt.VERTICAL||this.currentBreakpoint==="md"?qt.REGULAR:qt.BURGER}get containerClasses(){return Z(Eu,this.isModal?Ru:ku,this.isModal?Su:xu,this.sidebarDisplayType===qt.BURGER||this.orientation===Xt.VERTICAL?"!sb-flex-col":"!sb-flex-row")}get contentClasses(){return Z("sb-flex-grow",this.isModal?"sb-max-h-[864px] sb-mx-4 sb-px-2 md:sb-mx-0 md:sb-px-6 md:sb-pl-0 sb-overflow-auto":"md:sb-max-h-[100%]",this.orientation===Xt.VERTICAL?"md:sb-pl-6 sb-mb-16":"")}renderCloseButton(){return this.isModal?d`
7283
7283
  <button
7284
7284
  class="sb-absolute sb-bg-background sb-right-8 sb-top-8 sb-z-10"
7285
7285
  @click=${()=>this.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}
@@ -7353,7 +7353,7 @@ body {
7353
7353
  </signed-out>
7354
7354
  </sb-provider>
7355
7355
  `}
7356
- `}};Vs([a({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);Vs([a({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);Vs([a({type:Object})],exports.PreviewComponent.prototype,"customizations",2);exports.PreviewComponent=Vs([p("sb-preview")],exports.PreviewComponent);var jm=Object.defineProperty,Um=Object.getOwnPropertyDescriptor,Hs=(e,t,r,i)=>{for(var s=i>1?void 0:i?Um(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&jm(t,r,s),s};exports.SbSignIn=class extends v{constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.providedCustomizations=null,this.__flowStarted=!1,this.__flowInitAttempted=!1}get effectiveCustomizations(){const t=this.providedCustomizations??{},r=this.customizations??{};return xs(t,r)}createRenderRoot(){return this}async waitForAuthConfigured(t=5e3){var s;const r=ht??((s=window.__saasbaseCoreSdk)==null?void 0:s.Auth);if(!r||r.__configured)return;const i=r.__whenConfigured;i&&await Promise.race([i,new Promise(o=>setTimeout(o,t))])}async connectedCallback(){var t;if(super.connectedCallback(),!this.__flowInitAttempted&&(this.__flowInitAttempted=!0,await this.waitForAuthConfigured(),!this.__flowStarted)){this.__flowStarted=!0;try{const r=await ht.startLoginflow("signin-flow-passkey");console.log(r.isResumed?"Resumed login flow":"Started new login flow")}catch(r){if(console.error("Sign-in flow init failed:",r),r&&typeof r.message=="string"&&r.message.includes("Auth.configure() must be called")){this.__saasbaseFailedForConfig=!0;try{const i=ht??((t=window.__saasbaseCoreSdk)==null?void 0:t.Auth),s=i==null?void 0:i.__whenConfigured;if(s){await Promise.race([s,new Promise(o=>setTimeout(o,1e4))]);try{const o=await ht.startLoginflow("signin-flow-passkey");console.log(o.isResumed?"Resumed login flow":"Started new login flow")}catch(o){console.error("Sign-in retry failed:",o)}}}catch{}}else this.__flowStarted=!1}}}__saasbaseRetryInit(){this.__flowStarted||(this.__flowInitAttempted=!1,this.connectedCallback())}render(){var s,o;const t=this.effectiveCustomizations,{class:r,style:i}=I("",{},(o=(s=t==null?void 0:t.byType)==null?void 0:s.loader)==null?void 0:o.linear,"",t);return this.renderSpec?d`
7356
+ `}};Vs([a({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);Vs([a({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);Vs([a({type:Object})],exports.PreviewComponent.prototype,"customizations",2);exports.PreviewComponent=Vs([p("sb-preview")],exports.PreviewComponent);var Um=Object.defineProperty,jm=Object.getOwnPropertyDescriptor,Hs=(e,t,r,i)=>{for(var s=i>1?void 0:i?jm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Um(t,r,s),s};exports.SbSignIn=class extends v{constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.providedCustomizations=null,this.__flowStarted=!1,this.__flowInitAttempted=!1}get effectiveCustomizations(){const t=this.providedCustomizations??{},r=this.customizations??{};return xs(t,r)}createRenderRoot(){return this}async waitForAuthConfigured(t=5e3){var s;const r=ut??((s=window.__saasbaseCoreSdk)==null?void 0:s.Auth);if(!r||r.__configured)return;const i=r.__whenConfigured;i&&await Promise.race([i,new Promise(o=>setTimeout(o,t))])}async connectedCallback(){var t;if(super.connectedCallback(),!this.__flowInitAttempted&&(this.__flowInitAttempted=!0,await this.waitForAuthConfigured(),!this.__flowStarted)){this.__flowStarted=!0;try{const r=await ut.startLoginflow("signin-flow-passkey");console.log(r.isResumed?"Resumed login flow":"Started new login flow")}catch(r){if(console.error("Sign-in flow init failed:",r),r&&typeof r.message=="string"&&r.message.includes("Auth.configure() must be called")){this.__saasbaseFailedForConfig=!0;try{const i=ut??((t=window.__saasbaseCoreSdk)==null?void 0:t.Auth),s=i==null?void 0:i.__whenConfigured;if(s){await Promise.race([s,new Promise(o=>setTimeout(o,1e4))]);try{const o=await ut.startLoginflow("signin-flow-passkey");console.log(o.isResumed?"Resumed login flow":"Started new login flow")}catch(o){console.error("Sign-in retry failed:",o)}}}catch{}}else this.__flowStarted=!1}}}__saasbaseRetryInit(){this.__flowStarted||(this.__flowInitAttempted=!1,this.connectedCallback())}render(){var s,o;const t=this.effectiveCustomizations,{class:r,style:i}=I("",{},(o=(s=t==null?void 0:t.byType)==null?void 0:s.loader)==null?void 0:o.linear,"",t);return this.renderSpec?d`
7357
7357
  <sb-layout
7358
7358
  .renderSpec=${this.renderSpec}
7359
7359
  .customizations=${t}
@@ -7364,7 +7364,7 @@ body {
7364
7364
  customClass=${r}
7365
7365
  .customStyle=${i}
7366
7366
  ></linear-loader>
7367
- `}};Hs([Lt({context:Tn,subscribe:!0})],exports.SbSignIn.prototype,"renderSpec",2);Hs([a({type:Object})],exports.SbSignIn.prototype,"customizations",2);Hs([Lt({context:Ts,subscribe:!0})],exports.SbSignIn.prototype,"providedCustomizations",2);exports.SbSignIn=Hs([p("sb-signin")],exports.SbSignIn);var Dm=Object.defineProperty,Bm=Object.getOwnPropertyDescriptor,Gs=(e,t,r,i)=>{for(var s=i>1?void 0:i?Bm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Dm(t,r,s),s};exports.SbSignUp=class extends v{constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.providedCustomizations=null,this.__flowStarted=!1,this.__flowInitAttempted=!1}get effectiveCustomizations(){const t=this.providedCustomizations??{},r=this.customizations??{};return xs(t,r)}createRenderRoot(){return this}async waitForAuthConfigured(t=5e3){var s;const r=ht??((s=window.__saasbaseCoreSdk)==null?void 0:s.Auth);if(!r||r.__configured)return;const i=r.__whenConfigured;i&&await Promise.race([i,new Promise(o=>setTimeout(o,t))])}async connectedCallback(){var t;if(super.connectedCallback(),!this.__flowInitAttempted&&(this.__flowInitAttempted=!0,await this.waitForAuthConfigured(),!this.__flowStarted)){this.__flowStarted=!0;try{const r=await ht.startLoginflow("signup-flow");console.log(r.isResumed?"Resumed signup flow":"Started new signup flow")}catch(r){if(console.error("Sign-up flow init failed:",r),r&&typeof r.message=="string"&&r.message.includes("Auth.configure() must be called")){this.__saasbaseFailedForConfig=!0;try{const i=ht??((t=window.__saasbaseCoreSdk)==null?void 0:t.Auth),s=i==null?void 0:i.__whenConfigured;if(s){await Promise.race([s,new Promise(o=>setTimeout(o,1e4))]);try{const o=await ht.startLoginflow("signup-flow");console.log(o.isResumed?"Resumed signup flow":"Started new signup flow")}catch(o){console.error("Sign-up retry failed:",o)}}}catch{}}else this.__flowStarted=!1}}}__saasbaseRetryInit(){this.__flowStarted||(this.__flowInitAttempted=!1,this.connectedCallback())}render(){var s,o;const t=this.effectiveCustomizations,{class:r,style:i}=I("",{},(o=(s=t==null?void 0:t.byType)==null?void 0:s.loader)==null?void 0:o.linear,"",t);return console.log(""),this.renderSpec?d`
7367
+ `}};Hs([Lt({context:Tn,subscribe:!0})],exports.SbSignIn.prototype,"renderSpec",2);Hs([a({type:Object})],exports.SbSignIn.prototype,"customizations",2);Hs([Lt({context:Ts,subscribe:!0})],exports.SbSignIn.prototype,"providedCustomizations",2);exports.SbSignIn=Hs([p("sb-signin")],exports.SbSignIn);var Dm=Object.defineProperty,Bm=Object.getOwnPropertyDescriptor,Gs=(e,t,r,i)=>{for(var s=i>1?void 0:i?Bm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Dm(t,r,s),s};exports.SbSignUp=class extends v{constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.providedCustomizations=null,this.__flowStarted=!1,this.__flowInitAttempted=!1}get effectiveCustomizations(){const t=this.providedCustomizations??{},r=this.customizations??{};return xs(t,r)}createRenderRoot(){return this}async waitForAuthConfigured(t=5e3){var s;const r=ut??((s=window.__saasbaseCoreSdk)==null?void 0:s.Auth);if(!r||r.__configured)return;const i=r.__whenConfigured;i&&await Promise.race([i,new Promise(o=>setTimeout(o,t))])}async connectedCallback(){var t;if(super.connectedCallback(),!this.__flowInitAttempted&&(this.__flowInitAttempted=!0,await this.waitForAuthConfigured(),!this.__flowStarted)){this.__flowStarted=!0;try{const r=await ut.startLoginflow("signup-flow");console.log(r.isResumed?"Resumed signup flow":"Started new signup flow")}catch(r){if(console.error("Sign-up flow init failed:",r),r&&typeof r.message=="string"&&r.message.includes("Auth.configure() must be called")){this.__saasbaseFailedForConfig=!0;try{const i=ut??((t=window.__saasbaseCoreSdk)==null?void 0:t.Auth),s=i==null?void 0:i.__whenConfigured;if(s){await Promise.race([s,new Promise(o=>setTimeout(o,1e4))]);try{const o=await ut.startLoginflow("signup-flow");console.log(o.isResumed?"Resumed signup flow":"Started new signup flow")}catch(o){console.error("Sign-up retry failed:",o)}}}catch{}}else this.__flowStarted=!1}}}__saasbaseRetryInit(){this.__flowStarted||(this.__flowInitAttempted=!1,this.connectedCallback())}render(){var s,o;const t=this.effectiveCustomizations,{class:r,style:i}=I("",{},(o=(s=t==null?void 0:t.byType)==null?void 0:s.loader)==null?void 0:o.linear,"",t);return console.log(""),this.renderSpec?d`
7368
7368
  <sb-layout
7369
7369
  .renderSpec=${this.renderSpec}
7370
7370
  .customizations=${t}
@@ -7397,9 +7397,9 @@ body {
7397
7397
  ${this._wrapSubmitButtons(En(this,this.renderSpec.root_container,this.theme))}
7398
7398
  </div>
7399
7399
  </form>
7400
- `}async _onSubmit(t,r){t.preventDefault();const i=t.submitter;if(!i||!r||this.loadingButtons[r]||i.id!==r)return;const s=this._findButtonById(r);s&&await this.handleEvent(s.properties.event,s)}_findButtonById(t){const r=i=>{if(i.element_type==="button"&&i.id===t)return i;if(i.element_type==="container")for(const s of i.properties.children){const o=r(s);if(o)return o}return null};return this.renderSpec?r(this.renderSpec.root_container):null}animateHeight(){var u,g;const r=(((g=(u=this.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??pt).sm,i=r?parseInt(r.toString().replace(/\D/g,""),10):640;if(window.innerWidth<=i)return;const o=this.renderRoot.querySelector("#root-container");if(!o)return;const n=o.scrollHeight;if(this.prevHeight===0){this.prevHeight=n,o.style.height="auto";return}if(n===this.prevHeight||this.isAnimating)return;const h=Math.abs(n-this.prevHeight);this.isAnimating=!0,this.resizeRAF&&cancelAnimationFrame(this.resizeRAF),this.resizeRAF=requestAnimationFrame(()=>{const y=Math.min(600,Math.max(200,h*1));o.style.transition="none",o.style.height=this.prevHeight+"px",o.offsetHeight,o.style.transition=`height ${y}ms ease`,o.style.height=n+"px";const w=()=>{o.style.transition="",o.style.height="auto",this.prevHeight=o.scrollHeight,this.isAnimating=!1};let E=!1;const C=()=>{E||(E=!0,w())};o.addEventListener("transitionend",C,{once:!0}),setTimeout(C,y)})}collectDataKeys(t){const r={},i=s=>{if(s&&((s.element_type==="input"||s.element_type==="checkbox"||s.element_type==="otp")&&s.data_key&&!s.hidden&&(r[s.data_key]=""),s.element_type==="container"))for(const o of s.properties.children)i(o)};return i(t),r}handleInputChange(t,r){r!==void 0&&(this.formData={...this.formData,[t]:r},qo(this,t,"change"),this.requestUpdate())}handleBlur(t){qo(this,t,"blur"),this.requestUpdate()}handleFocus(t,r){var o;(o=this.errors[t])!=null&&o.length&&(this.errors={...this.errors,[t]:[]});const i=`${r}-error`,s=document.getElementById(i);s&&s.parentNode&&s.parentNode.removeChild(s)}async handleEvent(t,r){var i,s;if(r.element_type==="html")try{await ht.processLoginflowEvent({event:t,data:{}})}finally{this.eventEmitting=!1}else if(r.element_type==="otp")try{await ht.processLoginflowEvent({event:t,data:this.formData})}finally{this.eventEmitting=!1}else{if(this.loadingButtons[r.id])return;if((i=r.properties.requires_valid)==null||i.forEach(n=>{qo(this,n,"submit"),this.requestUpdate()}),!(((s=r.properties.requires_valid)==null?void 0:s.some(n=>{var h,u;return((u=(h=this.errors)==null?void 0:h[n])==null?void 0:u.length)>0}))??!1)){this.loadingButtons={...this.loadingButtons,[r.id]:!0},this.eventEmitting=!0;try{await ht.processLoginflowEvent({event:t,data:this.formData})}finally{this.loadingButtons={...this.loadingButtons,[r.id]:!1},this.eventEmitting=!1}}}}findElementByKey(t){const r=i=>{if((i.element_type==="input"||i.element_type==="checkbox"||i.element_type==="otp")&&i.data_key===t)return i;if(i.element_type==="container")for(const s of i.properties.children){const o=r(s);if(o)return o}return null};return this.renderSpec?r(this.renderSpec.root_container):null}isFieldValid(t){const r=this.findElementByKey(t);if(!r||!("validation"in r.properties))return!0;const{validation:i}=r.properties,{data_key:s}=r;if(!i||!s)return!0;const o=this.formData[s];return i.rules.every(h=>this.validateRule(h,o))}validateRule(t,r){switch(t.type){case"required":return Hd(r);case"min_length":return Gd(r,t.length);case"max_length":return Wd(r,t.length);case"min_value":return Kd(r,t.value);case"max_value":return Yd(r,t.value);case"regex":return Xd(r,t.regex);case"field_match":return Zd(r,t.field_match?this.formData[t.field_match]:void 0);case"email":return Jd(r);case"phone":return Qd(r);case"date":return tc(r);default:return!0}}};De([a({type:Object})],exports.SaasBaseLayout.prototype,"renderSpec",2);De([a({type:Object})],exports.SaasBaseLayout.prototype,"customizations",2);De([x()],exports.SaasBaseLayout.prototype,"formData",2);De([x()],exports.SaasBaseLayout.prototype,"errors",2);De([x()],exports.SaasBaseLayout.prototype,"loadingButtons",2);De([x()],exports.SaasBaseLayout.prototype,"eventEmitting",2);De([x()],exports.SaasBaseLayout.prototype,"theme",2);exports.SaasBaseLayout=De([p("sb-layout")],exports.SaasBaseLayout);var Vm=Object.defineProperty,Hm=Object.getOwnPropertyDescriptor,Rr=(e,t,r,i)=>{for(var s=i>1?void 0:i?Hm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Vm(t,r,s),s};exports.SbProvider=class extends v{constructor(){super(...arguments),this.customizations=null,this.providedCustomizations=this.customizations,this.env=null,this.auth={isAuthenticated:!1},this.renderSpec=null,this.autoRedirect=!0}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),mp(),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(r=>setTimeout(r,20));ht.configure({domain:this.env.domain,appId:this.env.appId,clientSecret:this.env.clientSecret??"",locale:this.env.locale,signinUrl:this.env.signinUrl,signupUrl:this.env.signupUrl,onFlowStateChange:r=>{r.render_spec&&(this.renderSpec=r.render_spec)}}),this.refreshAuthState()})().catch(r=>console.error("Error initializing SbProvider:",r))}updated(t){var r;super.updated(t),t.has("customizations")&&(this.providedCustomizations=this.customizations),t.has("env")&&(r=this.env)!=null&&r.domain&&ht.configure({domain:this.env.domain,appId:this.env.appId,clientSecret:this.env.clientSecret??"",locale:this.env.locale,signinUrl:this.env.signinUrl,signupUrl:this.env.signupUrl,onFlowStateChange:i=>{i.render_spec&&(this.renderSpec=i.render_spec)}}),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=window.location.pathname;if([this.env.signinUrl,this.env.signupUrl].some(s=>t.includes(s))){const n=new URLSearchParams(window.location.search).get("redirect_url")||this.env.signinRedirectUrl||"/";window.location.href=n}}refreshAuthState(){this.auth={isAuthenticated:ht.isAuthenticated()}}};Rr([a({type:Object})],exports.SbProvider.prototype,"customizations",2);Rr([Ue({context:Ts})],exports.SbProvider.prototype,"providedCustomizations",2);Rr([a({type:Object}),Ue({context:hc})],exports.SbProvider.prototype,"env",2);Rr([x(),Ue({context:Fs})],exports.SbProvider.prototype,"auth",2);Rr([x(),Ue({context:Tn})],exports.SbProvider.prototype,"renderSpec",2);Rr([a({type:Boolean})],exports.SbProvider.prototype,"autoRedirect",2);exports.SbProvider=Rr([p("sb-provider")],exports.SbProvider);var Gm=Object.defineProperty,Wm=Object.getOwnPropertyDescriptor,pc=(e,t,r,i)=>{for(var s=i>1?void 0:i?Wm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Gm(t,r,s),s};exports.SignedOut=class extends v{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){return this.auth?d`
7400
+ `}async _onSubmit(t,r){t.preventDefault();const i=t.submitter;if(!i||!r||this.loadingButtons[r]||i.id!==r)return;const s=this._findButtonById(r);s&&await this.handleEvent(s.properties.event,s)}_findButtonById(t){const r=i=>{if(i.element_type==="button"&&i.id===t)return i;if(i.element_type==="container")for(const s of i.properties.children){const o=r(s);if(o)return o}return null};return this.renderSpec?r(this.renderSpec.root_container):null}animateHeight(){var u,g;const r=(((g=(u=this.customizations)==null?void 0:u.config)==null?void 0:g.breakpoints)??mt).sm,i=r?parseInt(r.toString().replace(/\D/g,""),10):640;if(window.innerWidth<=i)return;const o=this.renderRoot.querySelector("#root-container");if(!o)return;const n=o.scrollHeight;if(this.prevHeight===0){this.prevHeight=n,o.style.height="auto";return}if(n===this.prevHeight||this.isAnimating)return;const h=Math.abs(n-this.prevHeight);this.isAnimating=!0,this.resizeRAF&&cancelAnimationFrame(this.resizeRAF),this.resizeRAF=requestAnimationFrame(()=>{const y=Math.min(600,Math.max(200,h*1));o.style.transition="none",o.style.height=this.prevHeight+"px",o.offsetHeight,o.style.transition=`height ${y}ms ease`,o.style.height=n+"px";const w=()=>{o.style.transition="",o.style.height="auto",this.prevHeight=o.scrollHeight,this.isAnimating=!1};let E=!1;const C=()=>{E||(E=!0,w())};o.addEventListener("transitionend",C,{once:!0}),setTimeout(C,y)})}collectDataKeys(t){const r={},i=s=>{if(s&&((s.element_type==="input"||s.element_type==="checkbox"||s.element_type==="otp")&&s.data_key&&!s.hidden&&(r[s.data_key]=""),s.element_type==="container"))for(const o of s.properties.children)i(o)};return i(t),r}handleInputChange(t,r){r!==void 0&&(this.formData={...this.formData,[t]:r},qo(this,t,"change"),this.requestUpdate())}handleBlur(t){qo(this,t,"blur"),this.requestUpdate()}handleFocus(t,r){var o;(o=this.errors[t])!=null&&o.length&&(this.errors={...this.errors,[t]:[]});const i=`${r}-error`,s=document.getElementById(i);s&&s.parentNode&&s.parentNode.removeChild(s)}async handleEvent(t,r){var i,s;if(r.element_type==="html")try{await ut.processLoginflowEvent({event:t,data:{}})}finally{this.eventEmitting=!1}else if(r.element_type==="otp")try{await ut.processLoginflowEvent({event:t,data:this.formData})}finally{this.eventEmitting=!1}else{if(this.loadingButtons[r.id])return;if((i=r.properties.requires_valid)==null||i.forEach(n=>{qo(this,n,"submit"),this.requestUpdate()}),!(((s=r.properties.requires_valid)==null?void 0:s.some(n=>{var h,u;return((u=(h=this.errors)==null?void 0:h[n])==null?void 0:u.length)>0}))??!1)){this.loadingButtons={...this.loadingButtons,[r.id]:!0},this.eventEmitting=!0;try{await ut.processLoginflowEvent({event:t,data:this.formData})}finally{this.loadingButtons={...this.loadingButtons,[r.id]:!1},this.eventEmitting=!1}}}}findElementByKey(t){const r=i=>{if((i.element_type==="input"||i.element_type==="checkbox"||i.element_type==="otp")&&i.data_key===t)return i;if(i.element_type==="container")for(const s of i.properties.children){const o=r(s);if(o)return o}return null};return this.renderSpec?r(this.renderSpec.root_container):null}isFieldValid(t){const r=this.findElementByKey(t);if(!r||!("validation"in r.properties))return!0;const{validation:i}=r.properties,{data_key:s}=r;if(!i||!s)return!0;const o=this.formData[s];return i.rules.every(h=>this.validateRule(h,o))}validateRule(t,r){switch(t.type){case"required":return Hd(r);case"min_length":return Gd(r,t.length);case"max_length":return Wd(r,t.length);case"min_value":return Kd(r,t.value);case"max_value":return Yd(r,t.value);case"regex":return Xd(r,t.regex);case"field_match":return Zd(r,t.field_match?this.formData[t.field_match]:void 0);case"email":return Jd(r);case"phone":return Qd(r);case"date":return tc(r);default:return!0}}};De([a({type:Object})],exports.SaasBaseLayout.prototype,"renderSpec",2);De([a({type:Object})],exports.SaasBaseLayout.prototype,"customizations",2);De([x()],exports.SaasBaseLayout.prototype,"formData",2);De([x()],exports.SaasBaseLayout.prototype,"errors",2);De([x()],exports.SaasBaseLayout.prototype,"loadingButtons",2);De([x()],exports.SaasBaseLayout.prototype,"eventEmitting",2);De([x()],exports.SaasBaseLayout.prototype,"theme",2);exports.SaasBaseLayout=De([p("sb-layout")],exports.SaasBaseLayout);var Vm=Object.defineProperty,Hm=Object.getOwnPropertyDescriptor,Rr=(e,t,r,i)=>{for(var s=i>1?void 0:i?Hm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Vm(t,r,s),s};exports.SbProvider=class extends v{constructor(){super(...arguments),this.customizations=null,this.providedCustomizations=this.customizations,this.env=null,this.auth={isAuthenticated:!1},this.renderSpec=null,this.autoRedirect=!0}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),mp(),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(r=>setTimeout(r,20));ut.configure({domain:this.env.domain,appId:this.env.appId,clientSecret:this.env.clientSecret??"",locale:this.env.locale,signinUrl:this.env.signinUrl,signupUrl:this.env.signupUrl,onFlowStateChange:r=>{r.render_spec&&(this.renderSpec=r.render_spec)}}),this.refreshAuthState()})().catch(r=>console.error("Error initializing SbProvider:",r))}updated(t){var r;super.updated(t),t.has("customizations")&&(this.providedCustomizations=this.customizations),t.has("env")&&(r=this.env)!=null&&r.domain&&ut.configure({domain:this.env.domain,appId:this.env.appId,clientSecret:this.env.clientSecret??"",locale:this.env.locale,signinUrl:this.env.signinUrl,signupUrl:this.env.signupUrl,onFlowStateChange:i=>{i.render_spec&&(this.renderSpec=i.render_spec)}}),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=window.location.pathname;if([this.env.signinUrl,this.env.signupUrl].some(s=>t.includes(s))){const n=new URLSearchParams(window.location.search).get("redirect_url")||this.env.signinRedirectUrl||"/";window.location.href=n}}refreshAuthState(){this.auth={isAuthenticated:ut.isAuthenticated()}}};Rr([a({type:Object})],exports.SbProvider.prototype,"customizations",2);Rr([je({context:Ts})],exports.SbProvider.prototype,"providedCustomizations",2);Rr([a({type:Object}),je({context:hc})],exports.SbProvider.prototype,"env",2);Rr([x(),je({context:Fs})],exports.SbProvider.prototype,"auth",2);Rr([x(),je({context:Tn})],exports.SbProvider.prototype,"renderSpec",2);Rr([a({type:Boolean})],exports.SbProvider.prototype,"autoRedirect",2);exports.SbProvider=Rr([p("sb-provider")],exports.SbProvider);var Gm=Object.defineProperty,Wm=Object.getOwnPropertyDescriptor,pc=(e,t,r,i)=>{for(var s=i>1?void 0:i?Wm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Gm(t,r,s),s};exports.SignedOut=class extends v{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){return this.auth?d`
7401
7401
  <div ?hidden=${this.auth.isAuthenticated}>${this._cachedChildren}</div>
7402
7402
  `:m}};pc([Lt({context:Fs,subscribe:!0}),a({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=pc([p("sb-signed-out")],exports.SignedOut);var Km=Object.defineProperty,Ym=Object.getOwnPropertyDescriptor,gc=(e,t,r,i)=>{for(var s=i>1?void 0:i?Ym(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Km(t,r,s),s};exports.SignedIn=class extends v{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){return this.auth?d`
7403
7403
  <div ?hidden=${!this.auth.isAuthenticated}>${this._cachedChildren}</div>
7404
- `:m}};gc([Lt({context:Fs,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=gc([p("sb-signed-in")],exports.SignedIn);var Xm=Object.defineProperty,Zm=Object.getOwnPropertyDescriptor,Ws=(e,t,r,i)=>{for(var s=i>1?void 0:i?Zm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Xm(t,r,s),s};exports.SbAuthenticated=class extends v{constructor(){super(...arguments),this._cachedChildren=[],this.redirectUrl="",this.env=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){var t;return this.auth?this.auth.isAuthenticated?d`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),m):m}};Ws([a({type:String})],exports.SbAuthenticated.prototype,"redirectUrl",2);Ws([Lt({context:hc}),a({attribute:!1})],exports.SbAuthenticated.prototype,"env",2);Ws([Lt({context:Fs,subscribe:!0}),a({attribute:!1})],exports.SbAuthenticated.prototype,"auth",2);exports.SbAuthenticated=Ws([p("sb-authenticated")],exports.SbAuthenticated);function Jm(){return ht}exports.BaseElement=de;exports.SbUserProfile=Gt;exports.renderElement=En;exports.useAuthProvider=Jm;
7404
+ `:m}};gc([Lt({context:Fs,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=gc([p("sb-signed-in")],exports.SignedIn);var Xm=Object.defineProperty,Zm=Object.getOwnPropertyDescriptor,Ws=(e,t,r,i)=>{for(var s=i>1?void 0:i?Zm(t,r):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,r,s):n(s))||s);return i&&s&&Xm(t,r,s),s};exports.SbAuthenticated=class extends v{constructor(){super(...arguments),this._cachedChildren=[],this.redirectUrl="",this.env=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}render(){var t;return this.auth?this.auth.isAuthenticated?d`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),m):m}};Ws([a({type:String})],exports.SbAuthenticated.prototype,"redirectUrl",2);Ws([Lt({context:hc}),a({attribute:!1})],exports.SbAuthenticated.prototype,"env",2);Ws([Lt({context:Fs,subscribe:!0}),a({attribute:!1})],exports.SbAuthenticated.prototype,"auth",2);exports.SbAuthenticated=Ws([p("sb-authenticated")],exports.SbAuthenticated);function Jm(){return ut}exports.BaseElement=de;exports.SbUserProfile=Gt;exports.renderElement=En;exports.useAuthProvider=Jm;
7405
7405
  //# sourceMappingURL=index.js.map