@saasbase-io/core-elements 1.17.0 → 1.18.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/components/renderers/_updated/form/_form-switch.d.ts +71 -27
- package/dist/components/renderers/_updated/form/form.stories/form-switch.stories.d.ts +2 -1
- package/dist/components/renderers/_updated/form/form.types.d.ts +7 -6
- package/dist/index.js +261 -269
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1499 -1446
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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 u(y){try{g(i.next(y))}catch(w){n(w)}}function h(y){try{g(i.throw(y))}catch(w){n(w)}}function g(y){y.done?o(y.value):s(y.value).then(u,h)}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,u=new AbortController,h=setTimeout(()=>u.abort(),n);try{const g=yield fetch(o,Object.assign(Object.assign({},i),{signal:u.signal,headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},s.apiKey&&{Authorization:`Bearer ${s.apiKey}`}),s.headers),i.headers)}));if(clearTimeout(h),!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(h),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),u=yield n.initializeFlowInternal();return{sdk:n,flowType:u.flowType,isResumed:u.isResumed,state:u.state,render_spec:u.render_spec,auth_result:u.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 u=this.flowStateManager.getFlowState();if(u){const h=s!==n.state;this.flowEventBus.emit("flow:updated",{flowState:u,isNewStep:h})}}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((u,h)=>{s[h]=u}),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 u=this.flowStateManager.getFlowState();u&&this.flowEventBus.emit("flow:started",{flowState:u})}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:u,response:h,type:g}=o;let y;typeof h.getTransports=="function"&&(y=h.getTransports());let w;if(typeof h.getPublicKeyAlgorithm=="function")try{w=h.getPublicKeyAlgorithm()}catch(S){Ks("getPublicKeyAlgorithm()",S)}let E;if(typeof h.getPublicKey=="function")try{const S=h.getPublicKey();S!==null&&(E=this.bufferToBase64URLString(S))}catch(S){Ks("getPublicKey()",S)}let C;if(typeof h.getAuthenticatorData=="function")try{C=this.bufferToBase64URLString(h.getAuthenticatorData())}catch(S){Ks("getAuthenticatorData()",S)}return{id:n,rawId:this.bufferToBase64URLString(u),response:{attestationObject:this.bufferToBase64URLString(h.attestationObject),clientDataJSON:this.bufferToBase64URLString(h.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),u=new Uint8Array(n);for(let h=0;h<o.length;h++)u[h]=o.charCodeAt(h);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
|
|
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;/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2019 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -7,13 +7,13 @@
|
|
|
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,
|
|
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");/**
|
|
11
11
|
* @license
|
|
12
12
|
* Copyright 2017 Google LLC
|
|
13
13
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
|
-
*/const
|
|
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),
|
|
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"),b=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=b,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===b||t==null||t===""?(this._$AH!==b&&this._$AR(),this._$AH=b):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!==b&&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=b,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=b}_$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===b?t=b:t!==b&&(t+=(g??"")+o[u+1]),this._$AH[u]=g}n&&!s&&this.j(t)}j(t){t===b?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===b?void 0:t}},Nc=class extends ws{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==b)}},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)??b)===vr)return;const i=this._$AH,s=t===b&&i!==b||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==b&&(i===b||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};/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2017 Google LLC
|
|
19
19
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/const Dc={attribute:!0,type:String,converter:gs,reflect:!1,hasChanged:on},Bc=(e=Dc,t,r)=>{const{kind:i,metadata:s}=r;let o=globalThis.litPropertyMetadata.get(s);if(o===void 0&&globalThis.litPropertyMetadata.set(s,o=new Map),i==="setter"&&((e=Object.create(e)).wrapped=!0),o.set(r.name,e),i==="accessor"){const{name:n}=r;return{set(
|
|
28
|
+
*/const Dc={attribute:!0,type:String,converter:gs,reflect:!1,hasChanged:on},Bc=(e=Dc,t,r)=>{const{kind:i,metadata:s}=r;let o=globalThis.litPropertyMetadata.get(s);if(o===void 0&&globalThis.litPropertyMetadata.set(s,o=new Map),i==="setter"&&((e=Object.create(e)).wrapped=!0),o.set(r.name,e),i==="accessor"){const{name:n}=r;return{set(h){const u=t.get.call(this);t.set.call(this,h),this.requestUpdate(n,u,e,!0,h)},init(h){return h!==void 0&&this.C(n,void 0,e,h),h}}}if(i==="setter"){const{name:n}=r;return function(h){const u=this[n];t.call(this,h),this.requestUpdate(n,u,e,!0,h)}}throw Error("Unsupported decorator location: "+i)};function a(e){return(t,r)=>typeof r=="object"?Bc(e,t,r):((i,s,o)=>{const n=s.hasOwnProperty(o);return s.constructor.createProperty(o,i),n?Object.getOwnPropertyDescriptor(s,o):void 0})(e,t,r)}/**
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright 2017 Google LLC
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright 2017 Google LLC
|
|
39
39
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
|
-
*/function Ci(e,t){return(r,i,s)=>{const o=n=>{var
|
|
40
|
+
*/function Ci(e,t){return(r,i,s)=>{const o=n=>{var h;return((h=n.renderRoot)==null?void 0:h.querySelector(e))??null};return Mc(r,i,{get(){return o(this)}})}}var qc=Object.defineProperty,Vc=(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&&qc(t,r,s),s};class de extends v{constructor(){super(),this.shadow=!1,this.__initialAttributesCache=null}parseJsonAttribute(t){try{const r=this.getAttribute(t);return r?JSON.parse(r):{}}catch{return{}}}get sbStyle(){return this.parseJsonAttribute("sb-style")}getAttributesToExclude(){return[]}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(t[r.name]=r.value??"")}),t}isCustomPropertySet(t){const r=getComputedStyle(this).getPropertyValue(t).trim();return r!=="inherit"&&r.length>0}applyCustomClass(t,r,i=""){var s,o;t.some(n=>this.isCustomPropertySet(n))&&((o=(s=this.shadowRoot)==null?void 0:s.querySelector(r))==null||o.classList.add(i))}moveAttributesToElement(t,r=["id","class"]){t&&r.forEach(i=>{const s=this.getAttribute(i);s!==null&&(t.setAttribute(i,s),this.removeAttribute(i))})}removeAttributesFromHost(t=["id","class"]){t.forEach(r=>{this.hasAttribute(r)&&this.removeAttribute(r)})}captureHostAttributes(){if(this.__initialAttributesCache)return this.__initialAttributesCache;const t={};return Array.from(this.attributes).forEach(r=>{t[r.name]=r.value}),this.__initialAttributesCache=t,t}getHostClass(){return this.captureHostAttributes().class??""}removeDuplicateContent(){var o;const t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{var h;return n.nodeType===Node.COMMENT_NODE||n.nodeType===Node.TEXT_NODE&&!((h=n.textContent)!=null&&h.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=new Map,i=[];let s;for(;s=t.nextNode();){let n;if(s.nodeType===Node.TEXT_NODE){const h=(o=s.textContent)==null?void 0:o.trim();if(!h)continue;n=`text:${h}`}else if(s instanceof HTMLElement){const h=Array.from(s.attributes).map(u=>`${u.name}=${u.value}`).sort().join(":");n=`element:${s.tagName}:${h}`}else continue;if(r.has(n)){const h=r.get(n);h!=null&&h.parentNode&&i.push(h),r.set(n,s)}else r.set(n,s)}i.forEach(n=>{var h;return(h=n.parentNode)==null?void 0:h.removeChild(n)})}moveLightDomChildrenInto(t,r){let i;r!=null&&r.length?(i=r.filter(s=>this.contains(s)&&s!==t&&!s.contains(t)),i.forEach(s=>{const o=Array.from(t.childNodes).find(n=>{var h;return(h=n.isEqualNode)==null?void 0:h.call(n,s)});o&&t.removeChild(o)})):i=Array.from(this.childNodes).filter(s=>s!==t&&!t.contains(s)&&!s.contains(t)),i.forEach(s=>t.appendChild(s))}}Vc([a({type:Boolean})],de.prototype,"shadow");/**
|
|
41
41
|
* @license
|
|
42
42
|
* Copyright 2017 Google LLC
|
|
43
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
* @license
|
|
74
74
|
* Copyright 2021 Google LLC
|
|
75
75
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
76
|
-
*/let Xc=class extends Event{constructor(t,r){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r}};class Kn extends Yc{constructor(t,r,i){var s,o;super(r.context!==void 0?r.initialValue:i),this.onContextRequest=n=>{if(n.context!==this.context)return;const
|
|
76
|
+
*/let Xc=class extends Event{constructor(t,r){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r}};class Kn extends Yc{constructor(t,r,i){var s,o;super(r.context!==void 0?r.initialValue:i),this.onContextRequest=n=>{if(n.context!==this.context)return;const h=n.contextTarget??n.composedPath()[0];h!==this.host&&(n.stopPropagation(),this.addCallback(n.callback,h,n.subscribe))},this.onProviderRequest=n=>{if(n.context!==this.context||(n.contextTarget??n.composedPath()[0])===this.host)return;const h=new Set;for(const[u,{consumerHost:g}]of this.subscriptions)h.has(u)||(h.add(u),g.dispatchEvent(new Ad(this.context,g,u,!0)));n.stopPropagation()},this.host=t,r.context!==void 0?this.context=r.context:this.context=r,this.attachListeners(),(o=(s=this.host).addController)==null||o.call(s,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Xc(this.context,this.host))}}/**
|
|
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(
|
|
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)}}}/**
|
|
81
81
|
* @license
|
|
82
82
|
* Copyright 2022 Google LLC
|
|
83
83
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
84
|
-
*/function Lt({context:e,subscribe:t}){return(r,i)=>{typeof i=="object"?i.addInitializer((function(){new Wn(this,{context:e,callback:s=>{r.set.call(this,s)},subscribe:t})})):r.constructor.addInitializer((s=>{new Wn(s,{context:e,callback:o=>{s[i]=o},subscribe:t})}))}}const Qs=new WeakMap,Zc=_s(class extends Od{render(e){return b}update(e,[t]){var i;const r=t!==this.G;return r&&this.G!==void 0&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=(i=e.options)==null?void 0:i.host,this.rt(this.ct=e.element)),b}rt(e){if(this.isConnected||(e=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let r=Qs.get(t);r===void 0&&(r=new WeakMap,Qs.set(t,r)),r.get(this.G)!==void 0&&this.G.call(this.ht,void 0),r.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){var e,t;return typeof this.G=="function"?(e=Qs.get(this.ht??globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Jc=Object.create,vs=Object.defineProperty,Qc=Object.getOwnPropertyDescriptor,
|
|
84
|
+
*/function Lt({context:e,subscribe:t}){return(r,i)=>{typeof i=="object"?i.addInitializer((function(){new Wn(this,{context:e,callback:s=>{r.set.call(this,s)},subscribe:t})})):r.constructor.addInitializer((s=>{new Wn(s,{context:e,callback:o=>{s[i]=o},subscribe:t})}))}}const Qs=new WeakMap,Zc=_s(class extends Od{render(e){return b}update(e,[t]){var i;const r=t!==this.G;return r&&this.G!==void 0&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=(i=e.options)==null?void 0:i.host,this.rt(this.ct=e.element)),b}rt(e){if(this.isConnected||(e=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let r=Qs.get(t);r===void 0&&(r=new WeakMap,Qs.set(t,r)),r.get(this.G)!==void 0&&this.G.call(this.ht,void 0),r.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){var e,t;return typeof this.G=="function"?(e=Qs.get(this.ht??globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Jc=Object.create,vs=Object.defineProperty,Qc=Object.getOwnPropertyDescriptor,th=Object.getOwnPropertyNames,eh=Object.getPrototypeOf,rh=Object.prototype.hasOwnProperty,Pd=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ih=(e,t)=>{let r={};for(var i in e)vs(r,i,{get:e[i],enumerable:!0});return vs(r,Symbol.toStringTag,{value:"Module"}),r},sh=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=th(t),o=0,n=s.length,h;o<n;o++)h=s[o],!rh.call(e,h)&&h!==r&&vs(e,h,{get:(u=>t[u]).bind(null,h),enumerable:!(i=Qc(t,h))||i.enumerable});return e},oh=(e,t,r)=>(r=e==null?{}:Jc(eh(e)),sh(vs(r,"default",{value:e,enumerable:!0}),e));function c(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function l(e,t,r,i){var s=arguments.length,o=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var h=e.length-1;h>=0;h--)(n=e[h])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o}var _=class extends v{constructor(){super(),this.customClass="",this.customStyle=""}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class"]}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.mutationObserver)==null||e.disconnect()}removeParentAttributes(){this.getAttributesToRemoveFromParent().forEach(e=>{e==="class"&&this.hasAttribute("class")&&(this.customClass=this.getAttribute("class")||""),e==="style"&&this.hasAttribute("style")&&(this.customStyle=this.getAttribute("style")||""),this.hasAttribute(e)&&this.removeAttribute(e)})}getFilteredAttributes(){let e={};return Array.from(this.attributes).forEach(t=>{this.getAttributesToExclude().includes(t.name)||(e[t.name]=t.value??"")}),e}isCustomPropertySet(e){let t=getComputedStyle(this).getPropertyValue(e).trim();return t!=="inherit"&&t.length>0}applyCustomClass(e,t,r=""){var s,o;let i="";e.some(n=>this.isCustomPropertySet(n))&&(i=r),i&&((o=(s=this.shadowRoot)==null?void 0:s.querySelector(t))==null||o.classList.add(i))}removeDuplicateContent(){var s;let e=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{var n;return o.nodeType===Node.COMMENT_NODE||o.nodeType===Node.TEXT_NODE&&!((n=o.textContent)!=null&&n.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),t=new Map,r=[],i;for(;i=e.nextNode();){let o;if(i.nodeType===Node.TEXT_NODE){let n=(s=i.textContent)==null?void 0:s.trim();if(!n)continue;o=`text:${n}`}else if(i instanceof HTMLElement){let n=Array.from(i.attributes).map(h=>`${h.name}=${h.value}`).sort().join(":");o=`element:${i.tagName}:${n}`}else continue;if(t.has(o)){let n=t.get(o);n&&n.parentNode&&r.push(n),t.set(o,i)}else t.set(o,i)}r.forEach(o=>{o.parentNode&&(console.log("Removing duplicate:",o),o.parentNode.removeChild(o))})}moveLightDomChildrenInto(e,t){let r;if(t&&t.length>0){r=t.filter(i=>this.contains(i)&&i!==e&&!i.contains(e));for(let i of r){let s=Array.from(e.childNodes).find(o=>{var n;return(n=o.isEqualNode)==null?void 0:n.call(o,i)});s&&e.removeChild(s)}}else r=Array.from(this.childNodes).filter(i=>i!==e&&!e.contains(i)&&!i.contains(e));for(let i of r)e.appendChild(i)}normalizeEnum(e,t,r){if(!e)return r;let i=Object.values(t),s=Object.keys(t);return i.includes(e)?e:s.includes(e)?t[e]:r}observeStyleAndClassSync(e){this.mutationObserver=new MutationObserver(t=>{for(let r of t)if(r.type==="attributes"){if(r.attributeName==="style"){let i=this.getAttribute("style")||"";i&&(this.customStyle=i,this.removeAttribute("style"))}if(r.attributeName==="class"){let i=this.getAttribute("class")||"";i&&(e.className=i,this.removeAttribute("class"))}}}),this.mutationObserver.observe(this,{attributes:!0,attributeFilter:["style","class"]})}};l([a({type:String,reflect:!0}),c("design:type",Object)],_.prototype,"customClass",void 0),l([a({type:String,reflect:!0}),c("design:type",Object)],_.prototype,"customStyle",void 0);function dn(){let e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let r=(e+Math.random()*16)%16|0;return(t=="x"?r:r&3|8).toString(16)})}var Yn=yd`
|
|
85
85
|
@font-face {
|
|
86
86
|
font-family: 'GeistSans';
|
|
87
87
|
|
|
@@ -2941,7 +2941,7 @@ body {
|
|
|
2941
2941
|
.\\[\\&_svg\\]\\:shrink-0 svg {
|
|
2942
2942
|
flex-shrink: 0;
|
|
2943
2943
|
}
|
|
2944
|
-
`,Fd=new CSSStyleSheet;Fd.replaceSync(Yn.cssText||Yn.toString());var qr,
|
|
2944
|
+
`,Fd=new CSSStyleSheet;Fd.replaceSync(Yn.cssText||Yn.toString());var qr,nh=(qr=class extends v{constructor(){super()}connectedCallback(){super.connectedCallback(),this.shadowRoot?this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,Fd]:console.error("Shadow root not available in ShadowWrapper")}render(){return d`<div><slot></slot></div>`}},qr.styles=yd`
|
|
2945
2945
|
:host {
|
|
2946
2946
|
display: block;
|
|
2947
2947
|
border: 2px solid black;
|
|
@@ -2950,7 +2950,7 @@ body {
|
|
|
2950
2950
|
.wrapper {
|
|
2951
2951
|
display: block;
|
|
2952
2952
|
}
|
|
2953
|
-
`,qr);customElements.define("shadow-wrapper",nu);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="-",au=e=>{let t=du(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)||lu(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:u})=>u(o)))==null?void 0:n.classGroupId},Xn=/^\[(.+)\]$/,lu=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}},du=e=>{let{theme:t,prefix:r}=e,i={nextPart:new Map,validators:[]};return uu(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(cu(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},cu=e=>e.isThemeGetter,uu=(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,hu=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="!",pu=e=>{let{separator:t,experimentalParseClassName:r}=e,i=t.length===1,s=t[0],o=t.length,n=u=>{let h=[],g=0,y=0,w;for(let S=0;S<u.length;S++){let k=u[S];if(g===0){if(k===s&&(i||u.slice(S,S+o)===t)){h.push(u.slice(y,S)),y=S+o;continue}if(k==="/"){w=S;continue}}k==="["?g++:k==="]"&&g--}let E=h.length===0?u:u.substring(y),C=E.startsWith(zd);return{modifiers:h,hasImportantModifier:C,baseClassName:C?E.substring(1):E,maybePostfixModifierPosition:w&&w>y?w-y:void 0}};return r?u=>r({className:u,parseClassName:n}):n},gu=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},mu=e=>({cache:hu(e.cacheSize),parseClassName:pu(e),...au(e)}),bu=/\s+/,fu=(e,t)=>{let{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s}=t,o=[],n=e.trim().split(bu),u="";for(let h=n.length-1;h>=0;--h){let g=n[h],{modifiers:y,hasImportantModifier:w,baseClassName:E,maybePostfixModifierPosition:C}=r(g),S=!!C,k=i(S?E.substring(0,C):E);if(!k){if(!S){u=g+(u.length>0?" "+u:u);continue}if(k=i(E),!k){u=g+(u.length>0?" "+u:u);continue}S=!1}let O=gu(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)}u=g+(u.length>0?" "+u:u)}return u};function vu(){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 yu(e,...t){let r,i,s,o=n;function n(h){return r=mu(t.reduce((g,y)=>y(g),e())),i=r.cache.get,s=r.cache.set,o=u,u(h)}function u(h){let g=i(h);if(g)return g;let y=fu(h,r);return s(h,y),y}return function(){return o(vu.apply(null,arguments))}}var Y=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ud=/^\[(?:([a-z-]+):)?(.+)\]$/i,wu=/^\d+\/\d+$/,_u=new Set(["px","full","screen"]),xu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Su=/\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$/,$u=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Cu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Eu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ge=e=>jr(e)||_u.has(e)||wu.test(e),_e=e=>Gr(e,"length",Tu),jr=e=>!!e&&!Number.isNaN(Number(e)),to=e=>Gr(e,"number",jr),ti=e=>!!e&&Number.isInteger(Number(e)),ku=e=>e.endsWith("%")&&jr(e.slice(0,-1)),z=e=>Ud.test(e),xe=e=>xu.test(e),Ru=new Set(["length","size","percentage"]),Iu=e=>Gr(e,Ru,Dd),Ou=e=>Gr(e,"position",Dd),Au=new Set(["image","url"]),Pu=e=>Gr(e,Au,Nu),Fu=e=>Gr(e,"",Lu),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},Tu=e=>Su.test(e)&&!$u.test(e),Dd=()=>!1,Lu=e=>Cu.test(e),Nu=e=>Eu.test(e),zu=yu(()=>{let e=Y("colors"),t=Y("spacing"),r=Y("blur"),i=Y("brightness"),s=Y("borderColor"),o=Y("borderRadius"),n=Y("borderSpacing"),u=Y("borderWidth"),h=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"],Gt=()=>["auto","hidden","clip","visible","scroll"],he=()=>["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"],Wt=()=>["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:[ku,_e],inset:he(),margin:he(),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:Gt()}],"overflow-x":[{"overflow-x":Gt()}],"overflow-y":[{"overflow-y":Gt()}],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:he()}],"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:[...Wt(),"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(),Ou]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Iu]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Pu]}],"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:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...Wt(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:Wt()}],"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:["",...Wt()]}],"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,Fu]}],"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:[h]}],"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":[h]}],"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 m(...e){return zu(Ld(e))}var ju=class extends Od{constructor(){super(...arguments),this.prevData={}}render(e){return b}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)}},Uu=class extends ju{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 Uu{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 oe);)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 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 m(...e){return zh(Ld(e))}var jh=class extends Od{constructor(){super(...arguments),this.prevData={}}render(e){return b}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`
|
|
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
|
|
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`
|
|
2965
2965
|
<div
|
|
2966
2966
|
data-state=${e?"open":"closed"}
|
|
2967
2967
|
class="${m(_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)],
|
|
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`
|
|
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
|
|
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`
|
|
3005
3005
|
<div
|
|
3006
3006
|
data-orientation="vertical"
|
|
3007
3007
|
${wt(this.getFilteredAttributes())}
|
|
@@ -3105,7 +3105,7 @@ body {
|
|
|
3105
3105
|
<path d="m9 18 6-6-6-6" />
|
|
3106
3106
|
</svg>
|
|
3107
3107
|
</li>
|
|
3108
|
-
`}};ca=l([p("rtg-bread-crumb-separator")],ca);var
|
|
3108
|
+
`}};ca=l([p("rtg-bread-crumb-separator")],ca);var ha=class extends _{get _containerElement(){return this.querySelector("span[part=breadcrumb-text]")}getAttributesToExclude(){return[""]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3109
3109
|
<span
|
|
3110
3110
|
${wt(this.getFilteredAttributes())}
|
|
3111
3111
|
id="rtg-bread-crumb-text"
|
|
@@ -3115,14 +3115,14 @@ body {
|
|
|
3115
3115
|
part="breadcrumb-text"
|
|
3116
3116
|
>
|
|
3117
3117
|
</span>
|
|
3118
|
-
`}};
|
|
3118
|
+
`}};ha=l([p("rtg-bread-crumb-text")],ha);var ua=class extends _{get _containerElement(){return this.querySelector("nav[part=breadcrumb]")}getAttributesToExclude(){return[""]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3119
3119
|
<nav
|
|
3120
3120
|
${wt(this.getFilteredAttributes())}
|
|
3121
3121
|
part="breadcrumb"
|
|
3122
3122
|
class="${m(this.className)}"
|
|
3123
3123
|
aria-label="breadcrumb"
|
|
3124
3124
|
></nav>
|
|
3125
|
-
`}};
|
|
3125
|
+
`}};ua=l([p("rtg-bread-crumb")],ua);var Yt=class extends v{constructor(...e){super(...e),this.variant="default",this.size="default",this.type="button"}get _rootSlot(){return this.querySelector('[data-slot="button"]')}_handleClick(e){this.onClick&&this.onClick(e)}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 this.href?d`
|
|
3126
3126
|
<a
|
|
3127
3127
|
data-slot="button"
|
|
3128
3128
|
data-variant=${this.variant}
|
|
@@ -3145,7 +3145,7 @@ body {
|
|
|
3145
3145
|
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":b}
|
|
3146
3146
|
@click=${this._handleClick}
|
|
3147
3147
|
></button>
|
|
3148
|
-
`}};l([a({type:String}),c("design:type",Object)],Kt.prototype,"variant",void 0),l([a({type:String}),c("design:type",Object)],Kt.prototype,"size",void 0),l([a({type:String}),c("design:type",Object)],Kt.prototype,"type",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Kt.prototype,"disabled",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Kt.prototype,"invalid",void 0),l([a({type:String}),c("design:type",String)],Kt.prototype,"href",void 0),l([a({type:String}),c("design:type",Object)],Kt.prototype,"target",void 0),l([a({attribute:!1,type:Function}),c("design:type",Function)],Kt.prototype,"onClick",void 0),Kt=l([p("rtg-button")],Kt);var Du=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Bu(e){let t=e%100;if(t>=11&&t<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function Mu(e){let t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),r=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),i=e.getDate(),s=e.getFullYear();return`${t}, ${r} ${i}${Bu(i)}, ${s}`}var pa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ga=Ld,un=(e,t)=>r=>{var u;if((t==null?void 0:t.variants)==null)return ga(e,r==null?void 0:r.class,r==null?void 0:r.className);let{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(h=>{let g=r==null?void 0:r[h],y=s==null?void 0:s[h];if(g===null)return null;let w=pa(g)||pa(y);return i[h][w]}),n=r&&Object.entries(r).reduce((h,g)=>{let[y,w]=g;return w===void 0||(h[y]=w),h},{});return ga(e,o,(u=t==null?void 0:t.compoundVariants)==null?void 0:u.reduce((h,g)=>{let{class:y,className:w,...E}=g;return Object.entries(E).every(C=>{let[S,k]=C;return Array.isArray(k)?k.includes({...s,...n}[S]):{...s,...n}[S]===k})?[...h,y,w]:h},[]),r==null?void 0:r.class,r==null?void 0:r.className)},gi=un(["rtg-inline-flex rtg-items-center rtg-justify-center rtg-shrink-0","rtg-text-button-font-size rtg-font-button-font-weight rtg-whitespace-nowrap","rtg-rounded-button-radius rtg-outline-none","rtg-transition-all","disabled:rtg-opacity-button-opacity-disabled disabled:rtg-pointer-events-none","focus-visible:rtg-border-button-width-border-focus focus-visible:rtg-border-button-color-border-focus focus-visible:rtg-ring-button-width-ring-focus","aria-invalid:rtg-border-button-width-border-invalid aria-invalid:rtg-border-button-color-border-invalid","aria-invalid:rtg-ring-button-width-ring-invalid aria-invalid:rtg-ring-button-color-ring-invalid",'[&_svg]:rtg-pointer-events-none [&_svg:not([class*="rtg-size-"])]:rtg-size-button-icon-space-size [&_svg]:rtg-shrink-0'],{variants:{variant:{default:["rtg-bg-button-default-color-bg rtg-text-button-default-color-text","hover:rtg-bg-button-default-color-bg-hover","focus-visible:rtg-ring-button-default-color-ring-focus"],destructive:["rtg-bg-button-destructive-color-bg rtg-text-button-destructive-color-text","hover:rtg-bg-button-destructive-color-bg-hover","focus-visible:rtg-ring-button-destructive-color-ring-focus"],outline:["rtg-bg-button-outline-color-bg","rtg-border-button-outline-width-border rtg-border-button-outline-color-border","hover:rtg-bg-button-outline-color-bg-hover hover:rtg-text-button-outline-color-text-hover","focus-visible:rtg-ring-button-outline-color-ring-focus"],secondary:["rtg-bg-button-secondary-color-bg rtg-text-button-secondary-color-text","hover:rtg-bg-button-secondary-color-bg-hover","focus-visible:rtg-ring-button-secondary-color-ring-focus"],ghost:["hover:rtg-bg-button-ghost-color-bg-hover hover:rtg-text-button-ghost-color-text-hover","focus-visible:rtg-ring-button-ghost-color-ring-focus"],link:["rtg-text-button-link-color-text rtg-underline-offset-4","hover:rtg-underline","focus-visible:rtg-ring-button-link-color-ring-focus"]},size:{default:["rtg-h-button-space-h-default","rtg-gap-button-space-gap-default rtg-px-button-space-px-default rtg-py-button-space-py-default","has-[>svg]:rtg-px-button-space-px-default-has-icon"],sm:["rtg-h-button-space-h-sm","rtg-gap-button-space-gap-sm rtg-px-button-space-px-sm","has-[>svg]:rtg-px-button-space-px-sm-has-icon"],lg:["rtg-h-button-space-h-lg","rtg-gap-button-space-gap-lg rtg-px-button-space-px-lg","has-[>svg]:rtg-px-button-space-px-lg-has-icon"],icon:"rtg-size-button-space-size-icon","icon-sm":"rtg-size-button-space-size-icon-sm","icon-lg":"rtg-size-button-space-size-icon-lg"}},defaultVariants:{variant:"default",size:"default"}}),q={host:["rtg-contents"],root:["group/calendar","rtg-relative","rtg-p-calendar-space-p","rtg-w-fit","rtg-bg-calendar-color-bg"],months:["rtg-flex rtg-relative","rtg-flex-col md:rtg-flex-row rtg-gap-calendar-months-space-gap"],nav:["rtg-flex rtg-absolute rtg-top-0 rtg-inset-x-0","rtg-gap-calendar-nav-space-gap rtg-justify-between rtg-items-center","rtg-w-full"],month:["rtg-flex","rtg-flex-col rtg-gap-calendar-month-space-gap","rtg-w-full"],buttonPrevious:[m(gi({variant:"ghost",size:"icon-sm"})),"rtg-select-none","aria-disabled:rtg-opacity-calendar-button-previous-opacity-disabled"],buttonNext:[m(gi({variant:"ghost",size:"icon-sm"})),"rtg-select-none","aria-disabled:rtg-opacity-calendar-button-next-opacity-disabled"],chevron:["rtg-size-calendar-chevron-space-size"],monthCaption:["rtg-flex rtg-justify-center rtg-items-center","rtg-px-calendar-month-caption-space-px","rtg-w-full rtg-h-calendar-month-caption-space-h"],captionLabel:["rtg-text-calendar-caption-label-font rtg-font-calendar-caption-label-font-weight","rtg-select-none"],monthGrid:["rtg-w-full","rtg-border-collapse"],weekdays:["rtg-flex"],weekday:["rtg-flex-1","rtg-text-calendar-weekday-font rtg-font-calendar-weekday-font-weight rtg-text-calendar-weekday-color-text","rtg-rounded-calendar-weekday-radius","rtg-select-none"],weeks:[""],week:["rtg-flex","rtg-mt-calendar-week-space-mt","rtg-w-full"],day:{base:["group/day","rtg-aspect-square rtg-relative","rtg-w-full rtg-h-full","rtg-p-calendar-day-space-p","rtg-text-center","rtg-select-none"],today:["rtg-bg-calendar-day-today-color-bg","rtg-rounded-calendar-day-radius"],selected:{common:["rtg-bg-calendar-day-color-bg-selected"],single:["rtg-rounded-calendar-day-radius"],range:{start:["rtg-rounded-l-calendar-day-radius"],middle:["rtg-rounded-none"],end:["rtg-rounded-r-calendar-day-radius"]}},index:{first:["rtg-rounded-l-calendar-day-radius"],last:["rtg-rounded-r-calendar-day-radius"]}},dayButton:{base:[gi({variant:"ghost",size:"icon"}),"rtg-aspect-square rtg-flex","rtg-flex-col rtg-gap-calendar-day-button-space-gap","rtg-size-auto rtg-w-full rtg-min-w-calendar-day-button-space-min-w","rtg-text-calendar-day-button-font rtg-font-calendar-day-button-font-weight","disabled:rtg-text-calendar-day-button-color-text-disabled disabled:rtg-opacity-calendar-day-button-opacity-disabled","data-[selected-single=true]:rtg-text-calendar-day-button-color-text-single-selected data-[selected-single=true]:rtg-bg-calendar-day-button-color-bg-single-selected","data-[range-start=true]:rtg-text-calendar-day-button-color-text-range-start data-[range-start=true]:rtg-bg-calendar-day-button-color-bg-range-start","data-[range-middle=true]:rtg-text-calendar-day-button-color-text-range-middle data-[range-middle=true]:rtg-bg-calendar-day-button-color-bg-range-middle","data-[range-end=true]:rtg-text-calendar-day-button-color-text-range-end data-[range-end=true]:rtg-bg-calendar-day-button-color-bg-range-end","[&>span]:rtg-text-calendar-day-button-span-font [&>span]:rtg-opacity-calendar-day-button-span-opacity","group-data-[focused=true]/day:rtg-relative group-data-[focused=true]/day:rtg-z-10","group-data-[focused=true]/day:rtg-border-calendar-day-width-border-focus group-data-[focused=true]/day:rtg-border-calendar-day-color-border-focus","group-data-[focused=true]/day:rtg-ring-calendar-day-width-ring-focus group-data-[focused=true]/day:rtg-ring-calendar-day-color-ring-focus"],outside:["rtg-text-calendar-day-button-outside-color-text"],today:["rtg-text-calendar-day-button-today-color-text","rtg-bg-calendar-day-button-today-color-bg"]}},ma,Or=class extends v{constructor(...e){super(...e),this.currentDate=new Date,this.selectedStartDate=null,this.selectedEndDate=null,this.mode="single",this._userClass="",this._userStyle=""}getDaysInMonth(e,t){return new Date(e,t+1,0).getDate()}previousMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()-1)}nextMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()+1)}selectDate(e,t){if(!t){let r=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),e);r.getMonth()===this.currentDate.getMonth()&&(this.mode==="single"?(this.selectedStartDate=r,this.selectedEndDate=null):this.mode==="range"&&(!this.selectedStartDate||this.selectedEndDate?(this.selectedStartDate=r,this.selectedEndDate=null):r>=this.selectedStartDate?this.selectedEndDate=r:(this.selectedEndDate=this.selectedStartDate,this.selectedStartDate=r)),this.dispatchEvent(new CustomEvent("date-selected",{detail:{startDate:this.selectedStartDate,endDate:this.selectedEndDate},bubbles:!0,composed:!0})))}}isDayInRange(e,t){return!this.selectedStartDate||!this.selectedEndDate||e.getMonth()!==this.currentDate.getMonth()?!1:t?e>this.selectedStartDate&&e<this.selectedEndDate:e>=this.selectedStartDate&&e<=this.selectedEndDate}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._userClass=((e=this.getAttribute("class"))==null?void 0:e.replace(m(q.host),""))??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=m(q.host)}firstUpdated(e){var r;let t=this.querySelector(".calendar");if(t&&(this._userClass&&(t.className=m("calendar",q.root,this._userClass)),this._userStyle)){let i=(r=t.getAttribute("style"))==null?void 0:r.trim(),s=this._userStyle.trim();t.setAttribute("style",[i,s].filter(Boolean).join("; "))}}render(){let e=this.currentDate.getFullYear(),t=this.currentDate.getMonth(),r=this.getDaysInMonth(e,t),i=new Date(e,t,1).getDay(),s=new Date(e,t,0).getDate(),o=[];for(let g=i-1;g>=0;g--)o.push({day:String(s-g),month:t-1,isOutside:!0});for(let g=1;g<=r;g++)o.push({day:String(g),month:t,isOutside:!1});let n=o.length%7;if(n!==0){let g=7-n;for(let y=1;y<=g;y++)o.push({day:String(y),month:t+1,isOutside:!0})}let u=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"}),h=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"});return d`
|
|
3148
|
+
`}};l([a({type:String}),c("design:type",Object)],Yt.prototype,"variant",void 0),l([a({type:String}),c("design:type",Object)],Yt.prototype,"size",void 0),l([a({type:String}),c("design:type",Object)],Yt.prototype,"type",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Yt.prototype,"disabled",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Yt.prototype,"invalid",void 0),l([a({type:String}),c("design:type",String)],Yt.prototype,"href",void 0),l([a({type:String}),c("design:type",Object)],Yt.prototype,"target",void 0),l([a({attribute:!1,type:Function}),c("design:type",Function)],Yt.prototype,"onClick",void 0),Yt=l([p("rtg-button")],Yt);var Dh=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Bh(e){let t=e%100;if(t>=11&&t<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function Mh(e){let t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),r=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),i=e.getDate(),s=e.getFullYear();return`${t}, ${r} ${i}${Bh(i)}, ${s}`}var pa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ga=Ld,hn=(e,t)=>r=>{var h;if((t==null?void 0:t.variants)==null)return ga(e,r==null?void 0:r.class,r==null?void 0:r.className);let{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{let g=r==null?void 0:r[u],y=s==null?void 0:s[u];if(g===null)return null;let w=pa(g)||pa(y);return i[u][w]}),n=r&&Object.entries(r).reduce((u,g)=>{let[y,w]=g;return w===void 0||(u[y]=w),u},{});return ga(e,o,(h=t==null?void 0:t.compoundVariants)==null?void 0:h.reduce((u,g)=>{let{class:y,className:w,...E}=g;return Object.entries(E).every(C=>{let[S,k]=C;return Array.isArray(k)?k.includes({...s,...n}[S]):{...s,...n}[S]===k})?[...u,y,w]:u},[]),r==null?void 0:r.class,r==null?void 0:r.className)},gi=hn(["rtg-inline-flex rtg-items-center rtg-justify-center rtg-shrink-0","rtg-text-button-font-size rtg-font-button-font-weight rtg-whitespace-nowrap","rtg-rounded-button-radius rtg-outline-none","rtg-transition-all","disabled:rtg-opacity-button-opacity-disabled disabled:rtg-pointer-events-none","focus-visible:rtg-border-button-width-border-focus focus-visible:rtg-border-button-color-border-focus focus-visible:rtg-ring-button-width-ring-focus","aria-invalid:rtg-border-button-width-border-invalid aria-invalid:rtg-border-button-color-border-invalid","aria-invalid:rtg-ring-button-width-ring-invalid aria-invalid:rtg-ring-button-color-ring-invalid",'[&_svg]:rtg-pointer-events-none [&_svg:not([class*="rtg-size-"])]:rtg-size-button-icon-space-size [&_svg]:rtg-shrink-0'],{variants:{variant:{default:["rtg-bg-button-default-color-bg rtg-text-button-default-color-text","hover:rtg-bg-button-default-color-bg-hover","focus-visible:rtg-ring-button-default-color-ring-focus"],destructive:["rtg-bg-button-destructive-color-bg rtg-text-button-destructive-color-text","hover:rtg-bg-button-destructive-color-bg-hover","focus-visible:rtg-ring-button-destructive-color-ring-focus"],outline:["rtg-bg-button-outline-color-bg","rtg-border-button-outline-width-border rtg-border-button-outline-color-border","hover:rtg-bg-button-outline-color-bg-hover hover:rtg-text-button-outline-color-text-hover","focus-visible:rtg-ring-button-outline-color-ring-focus"],secondary:["rtg-bg-button-secondary-color-bg rtg-text-button-secondary-color-text","hover:rtg-bg-button-secondary-color-bg-hover","focus-visible:rtg-ring-button-secondary-color-ring-focus"],ghost:["hover:rtg-bg-button-ghost-color-bg-hover hover:rtg-text-button-ghost-color-text-hover","focus-visible:rtg-ring-button-ghost-color-ring-focus"],link:["rtg-text-button-link-color-text rtg-underline-offset-4","hover:rtg-underline","focus-visible:rtg-ring-button-link-color-ring-focus"]},size:{default:["rtg-h-button-space-h-default","rtg-gap-button-space-gap-default rtg-px-button-space-px-default rtg-py-button-space-py-default","has-[>svg]:rtg-px-button-space-px-default-has-icon"],sm:["rtg-h-button-space-h-sm","rtg-gap-button-space-gap-sm rtg-px-button-space-px-sm","has-[>svg]:rtg-px-button-space-px-sm-has-icon"],lg:["rtg-h-button-space-h-lg","rtg-gap-button-space-gap-lg rtg-px-button-space-px-lg","has-[>svg]:rtg-px-button-space-px-lg-has-icon"],icon:"rtg-size-button-space-size-icon","icon-sm":"rtg-size-button-space-size-icon-sm","icon-lg":"rtg-size-button-space-size-icon-lg"}},defaultVariants:{variant:"default",size:"default"}}),q={host:["rtg-contents"],root:["group/calendar","rtg-relative","rtg-p-calendar-space-p","rtg-w-fit","rtg-bg-calendar-color-bg"],months:["rtg-flex rtg-relative","rtg-flex-col md:rtg-flex-row rtg-gap-calendar-months-space-gap"],nav:["rtg-flex rtg-absolute rtg-top-0 rtg-inset-x-0","rtg-gap-calendar-nav-space-gap rtg-justify-between rtg-items-center","rtg-w-full"],month:["rtg-flex","rtg-flex-col rtg-gap-calendar-month-space-gap","rtg-w-full"],buttonPrevious:[m(gi({variant:"ghost",size:"icon-sm"})),"rtg-select-none","aria-disabled:rtg-opacity-calendar-button-previous-opacity-disabled"],buttonNext:[m(gi({variant:"ghost",size:"icon-sm"})),"rtg-select-none","aria-disabled:rtg-opacity-calendar-button-next-opacity-disabled"],chevron:["rtg-size-calendar-chevron-space-size"],monthCaption:["rtg-flex rtg-justify-center rtg-items-center","rtg-px-calendar-month-caption-space-px","rtg-w-full rtg-h-calendar-month-caption-space-h"],captionLabel:["rtg-text-calendar-caption-label-font rtg-font-calendar-caption-label-font-weight","rtg-select-none"],monthGrid:["rtg-w-full","rtg-border-collapse"],weekdays:["rtg-flex"],weekday:["rtg-flex-1","rtg-text-calendar-weekday-font rtg-font-calendar-weekday-font-weight rtg-text-calendar-weekday-color-text","rtg-rounded-calendar-weekday-radius","rtg-select-none"],weeks:[""],week:["rtg-flex","rtg-mt-calendar-week-space-mt","rtg-w-full"],day:{base:["group/day","rtg-aspect-square rtg-relative","rtg-w-full rtg-h-full","rtg-p-calendar-day-space-p","rtg-text-center","rtg-select-none"],today:["rtg-bg-calendar-day-today-color-bg","rtg-rounded-calendar-day-radius"],selected:{common:["rtg-bg-calendar-day-color-bg-selected"],single:["rtg-rounded-calendar-day-radius"],range:{start:["rtg-rounded-l-calendar-day-radius"],middle:["rtg-rounded-none"],end:["rtg-rounded-r-calendar-day-radius"]}},index:{first:["rtg-rounded-l-calendar-day-radius"],last:["rtg-rounded-r-calendar-day-radius"]}},dayButton:{base:[gi({variant:"ghost",size:"icon"}),"rtg-aspect-square rtg-flex","rtg-flex-col rtg-gap-calendar-day-button-space-gap","rtg-size-auto rtg-w-full rtg-min-w-calendar-day-button-space-min-w","rtg-text-calendar-day-button-font rtg-font-calendar-day-button-font-weight","disabled:rtg-text-calendar-day-button-color-text-disabled disabled:rtg-opacity-calendar-day-button-opacity-disabled","data-[selected-single=true]:rtg-text-calendar-day-button-color-text-single-selected data-[selected-single=true]:rtg-bg-calendar-day-button-color-bg-single-selected","data-[range-start=true]:rtg-text-calendar-day-button-color-text-range-start data-[range-start=true]:rtg-bg-calendar-day-button-color-bg-range-start","data-[range-middle=true]:rtg-text-calendar-day-button-color-text-range-middle data-[range-middle=true]:rtg-bg-calendar-day-button-color-bg-range-middle","data-[range-end=true]:rtg-text-calendar-day-button-color-text-range-end data-[range-end=true]:rtg-bg-calendar-day-button-color-bg-range-end","[&>span]:rtg-text-calendar-day-button-span-font [&>span]:rtg-opacity-calendar-day-button-span-opacity","group-data-[focused=true]/day:rtg-relative group-data-[focused=true]/day:rtg-z-10","group-data-[focused=true]/day:rtg-border-calendar-day-width-border-focus group-data-[focused=true]/day:rtg-border-calendar-day-color-border-focus","group-data-[focused=true]/day:rtg-ring-calendar-day-width-ring-focus group-data-[focused=true]/day:rtg-ring-calendar-day-color-ring-focus"],outside:["rtg-text-calendar-day-button-outside-color-text"],today:["rtg-text-calendar-day-button-today-color-text","rtg-bg-calendar-day-button-today-color-bg"]}},ma,Or=class extends v{constructor(...e){super(...e),this.currentDate=new Date,this.selectedStartDate=null,this.selectedEndDate=null,this.mode="single",this._userClass="",this._userStyle=""}getDaysInMonth(e,t){return new Date(e,t+1,0).getDate()}previousMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()-1)}nextMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()+1)}selectDate(e,t){if(!t){let r=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),e);r.getMonth()===this.currentDate.getMonth()&&(this.mode==="single"?(this.selectedStartDate=r,this.selectedEndDate=null):this.mode==="range"&&(!this.selectedStartDate||this.selectedEndDate?(this.selectedStartDate=r,this.selectedEndDate=null):r>=this.selectedStartDate?this.selectedEndDate=r:(this.selectedEndDate=this.selectedStartDate,this.selectedStartDate=r)),this.dispatchEvent(new CustomEvent("date-selected",{detail:{startDate:this.selectedStartDate,endDate:this.selectedEndDate},bubbles:!0,composed:!0})))}}isDayInRange(e,t){return!this.selectedStartDate||!this.selectedEndDate||e.getMonth()!==this.currentDate.getMonth()?!1:t?e>this.selectedStartDate&&e<this.selectedEndDate:e>=this.selectedStartDate&&e<=this.selectedEndDate}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._userClass=((e=this.getAttribute("class"))==null?void 0:e.replace(m(q.host),""))??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=m(q.host)}firstUpdated(e){var r;let t=this.querySelector(".calendar");if(t&&(this._userClass&&(t.className=m("calendar",q.root,this._userClass)),this._userStyle)){let i=(r=t.getAttribute("style"))==null?void 0:r.trim(),s=this._userStyle.trim();t.setAttribute("style",[i,s].filter(Boolean).join("; "))}}render(){let e=this.currentDate.getFullYear(),t=this.currentDate.getMonth(),r=this.getDaysInMonth(e,t),i=new Date(e,t,1).getDay(),s=new Date(e,t,0).getDate(),o=[];for(let g=i-1;g>=0;g--)o.push({day:String(s-g),month:t-1,isOutside:!0});for(let g=1;g<=r;g++)o.push({day:String(g),month:t,isOutside:!1});let n=o.length%7;if(n!==0){let g=7-n;for(let y=1;y<=g;y++)o.push({day:String(y),month:t+1,isOutside:!0})}let h=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"}),u=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"});return d`
|
|
3149
3149
|
<div
|
|
3150
3150
|
class=${m("calendar",q.root,this._userClass)}
|
|
3151
3151
|
data-slot="calendar"
|
|
@@ -3207,19 +3207,19 @@ body {
|
|
|
3207
3207
|
role="status"
|
|
3208
3208
|
aria-live="polite"
|
|
3209
3209
|
>
|
|
3210
|
-
${
|
|
3210
|
+
${h}
|
|
3211
3211
|
</span>
|
|
3212
3212
|
</div>
|
|
3213
3213
|
|
|
3214
3214
|
<table
|
|
3215
3215
|
class=${m("calendar-month-grid",q.monthGrid)}
|
|
3216
3216
|
role="grid"
|
|
3217
|
-
aria-label=${
|
|
3217
|
+
aria-label=${u}
|
|
3218
3218
|
aria-multiselectable=${this.mode==="range"?"true":"false"}
|
|
3219
3219
|
>
|
|
3220
3220
|
<thead aria-hidden="true">
|
|
3221
3221
|
<tr class=${m("calendar-weekdays",q.weekdays)}>
|
|
3222
|
-
${
|
|
3222
|
+
${Dh.map(g=>d`
|
|
3223
3223
|
<th
|
|
3224
3224
|
class=${m("calendar-weekday",q.weekday)}
|
|
3225
3225
|
scope="col"
|
|
@@ -3234,7 +3234,7 @@ body {
|
|
|
3234
3234
|
<tbody class=${m("calendar-weeks",q.weeks)}>
|
|
3235
3235
|
${Array.from({length:Math.ceil(o.length/7)},(g,y)=>d`
|
|
3236
3236
|
<tr class=${m("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+=
|
|
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`
|
|
3238
3238
|
<td
|
|
3239
3239
|
class=${m("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)}
|
|
3240
3240
|
role="gridcell"
|
|
@@ -3278,7 +3278,7 @@ body {
|
|
|
3278
3278
|
<div data-slot="card-header" ?data-border=${this.border}></div>
|
|
3279
3279
|
`}};l([a({type:Boolean}),c("design:type",Boolean)],oo.prototype,"border",void 0),oo=l([p("rtg-card-header")],oo);var ba=class extends v{get _titleSlot(){return this.querySelector('[data-slot="card-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="card-title"></div>`}};ba=l([p("rtg-card-title")],ba);var fa=class extends v{get _descriptionSlot(){return this.querySelector('[data-slot="card-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="card-description"></div>`}};fa=l([p("rtg-card-description")],fa);var va=class extends v{get _actionSlot(){return this.querySelector('[data-slot="card-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="card-action"></div>`}};va=l([p("rtg-card-action")],va);var ya=class extends v{get _contentSlot(){return this.querySelector('[data-slot="card-content"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._contentSlot&&((r=this._contentSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`<div data-slot="card-content"></div>`}};ya=l([p("rtg-card-content")],ya);var no=class extends v{get _footerSlot(){return this.querySelector('[data-slot="card-footer"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._footerSlot&&((r=this._footerSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return d`
|
|
3280
3280
|
<div data-slot="card-footer" ?data-border=${this.border}></div>
|
|
3281
|
-
`}};l([a({type:Boolean}),c("design:type",Boolean)],no.prototype,"border",void 0),no=l([p("rtg-card-footer")],no);function
|
|
3281
|
+
`}};l([a({type:Boolean}),c("design:type",Boolean)],no.prototype,"border",void 0),no=l([p("rtg-card-footer")],no);function qh(){return te` <svg
|
|
3282
3282
|
class="shrink-0 size-3.5 text-gray-500 dark:text-neutral-500"
|
|
3283
3283
|
xmlns="http://www.w3.org/2000/svg"
|
|
3284
3284
|
width="24"
|
|
@@ -3293,7 +3293,7 @@ body {
|
|
|
3293
3293
|
<path d="m7 15 5 5 5-5"></path>
|
|
3294
3294
|
<path d="m7 9 5-5 5 5"></path>
|
|
3295
3295
|
</svg>
|
|
3296
|
-
`}function
|
|
3296
|
+
`}function Vh(){return te`
|
|
3297
3297
|
<svg
|
|
3298
3298
|
xmlns="http://www.w3.org/2000/svg"
|
|
3299
3299
|
width="24"
|
|
@@ -3309,7 +3309,7 @@ body {
|
|
|
3309
3309
|
<path d="m12 19-7-7 7-7"></path>
|
|
3310
3310
|
<path d="M19 12H5"></path>
|
|
3311
3311
|
</svg>
|
|
3312
|
-
`}function
|
|
3312
|
+
`}function Hh(){return te`
|
|
3313
3313
|
<svg
|
|
3314
3314
|
xmlns="http://www.w3.org/2000/svg"
|
|
3315
3315
|
width="24"
|
|
@@ -3325,7 +3325,7 @@ body {
|
|
|
3325
3325
|
<path d="M5 12h14"></path>
|
|
3326
3326
|
<path d="m12 5 7 7-7 7"></path>
|
|
3327
3327
|
</svg>
|
|
3328
|
-
`}function
|
|
3328
|
+
`}function Gh(e){return d`
|
|
3329
3329
|
<svg
|
|
3330
3330
|
xmlns="http://www.w3.org/2000/svg"
|
|
3331
3331
|
width="24"
|
|
@@ -3340,7 +3340,7 @@ body {
|
|
|
3340
3340
|
>
|
|
3341
3341
|
<path d="M20 6 9 17l-5-5"/>
|
|
3342
3342
|
</svg>
|
|
3343
|
-
`}function
|
|
3343
|
+
`}function Wh(e){return d`
|
|
3344
3344
|
<svg
|
|
3345
3345
|
xmlns="http://www.w3.org/2000/svg"
|
|
3346
3346
|
width="24"
|
|
@@ -3355,7 +3355,7 @@ body {
|
|
|
3355
3355
|
>
|
|
3356
3356
|
<path d="M5 12h14"/>
|
|
3357
3357
|
</svg>
|
|
3358
|
-
`}function
|
|
3358
|
+
`}function Kh(e){return d`
|
|
3359
3359
|
<svg
|
|
3360
3360
|
xmlns="http://www.w3.org/2000/svg"
|
|
3361
3361
|
width="24"
|
|
@@ -3371,7 +3371,7 @@ body {
|
|
|
3371
3371
|
<path d="m21 21-4.34-4.34"/>
|
|
3372
3372
|
<circle cx="11" cy="11" r="8"/>
|
|
3373
3373
|
</svg>
|
|
3374
|
-
`}function
|
|
3374
|
+
`}function Yh(){return te`
|
|
3375
3375
|
<svg
|
|
3376
3376
|
class="rtg-shrink-0 rtg-size-3.5 rtg-text-primary"
|
|
3377
3377
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -3402,7 +3402,7 @@ body {
|
|
|
3402
3402
|
?disabled="${e}"
|
|
3403
3403
|
class="${o}"
|
|
3404
3404
|
>
|
|
3405
|
-
${
|
|
3405
|
+
${Vh()}
|
|
3406
3406
|
</button>
|
|
3407
3407
|
|
|
3408
3408
|
<button
|
|
@@ -3410,7 +3410,7 @@ body {
|
|
|
3410
3410
|
?disabled="${r}"
|
|
3411
3411
|
class="${n}"
|
|
3412
3412
|
>
|
|
3413
|
-
${
|
|
3413
|
+
${Hh()}
|
|
3414
3414
|
</button>
|
|
3415
3415
|
</div>
|
|
3416
3416
|
</div>
|
|
@@ -3421,7 +3421,7 @@ body {
|
|
|
3421
3421
|
data-state=${this._getState()}
|
|
3422
3422
|
?data-disabled=${this.disabled}
|
|
3423
3423
|
>
|
|
3424
|
-
${
|
|
3424
|
+
${Gh()}
|
|
3425
3425
|
</span>
|
|
3426
3426
|
`:null}_renderInput(){return this.name===void 0?null:d`
|
|
3427
3427
|
<input
|
|
@@ -3483,7 +3483,7 @@ body {
|
|
|
3483
3483
|
data-radix-collection-item=""
|
|
3484
3484
|
@click=${this.handleClick}
|
|
3485
3485
|
>
|
|
3486
|
-
${
|
|
3486
|
+
${qh()}
|
|
3487
3487
|
</button>
|
|
3488
3488
|
`}};l([Ci("button"),c("design:type",typeof(Sa=typeof HTMLButtonElement<"u"&&HTMLButtonElement)=="function"?Sa:Object)],ao.prototype,"buttonElement",void 0),ao=l([p("rtg-combo-box-trigger")],ao);var lo=class extends v{constructor(...e){super(...e),this.placeholder="select a value",this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("rtg-combo-box")].forEach(t=>{var r;t.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(t.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)},this.renderLabel=()=>this._comboBox&&this._comboBox.selectedValue.length>0?this._comboBox.selectedValue:this.placeholder}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof Et);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",()=>{this.requestUpdate()})}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",t=>{t.stopPropagation()})}createRenderRoot(){return this}render(){return d`
|
|
3489
3489
|
<span
|
|
@@ -3501,7 +3501,7 @@ body {
|
|
|
3501
3501
|
></div>
|
|
3502
3502
|
`}};l([a({type:String}),c("design:type",Object)],Oi.prototype,"orientation",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Oi.prototype,"decorative",void 0),Oi=l([p("rtg-separator")],Oi);var Qe=class extends _{constructor(...t){super(...t),this.searchKey="",this.focusedIndex=0,this.selectedValue="",this.isOpen=!1,this.handleItemClicked=()=>{this.requestUpdate()},this.handleTriggerComboBox=r=>{var i,s;r.detail.isOpen!==((i=this._comboBox)==null?void 0:i.isOpen)&&this.requestUpdate(),r.detail.isOpen&&((s=this._comboBox)!=null&&s.selectedValue)&&(this.focusedIndex=this.comboBoxItems.findIndex(o=>{var n;return o.getAttribute("value")===((n=this._comboBox)==null?void 0:n.selectedValue)}),this.requestUpdate())},this.handleKeyDown=r=>{var s;if(!((s=this._comboBox)!=null&&s.isOpen))return;r.preventDefault();let i=this.filteredItems;switch(r.key){case"ArrowDown":if(i.length===0)return;this.focusedIndex=(this.focusedIndex+1)%i.length;break;case"ArrowUp":if(i.length===0)return;this.focusedIndex=(this.focusedIndex-1+i.length)%i.length;break;case"Enter":if(this.focusedIndex>=0&&this.focusedIndex<i.length){let o=i[this.focusedIndex].getAttribute("value");this.dispatchEvent(new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:o}}))}break}},this.handleMouseOver=(r,i)=>{r.preventDefault(),this.focusedIndex=i},this.onSelectedValue=(r,i)=>{this.focusedIndex=i,this.selectedValue=r},this.boundHandleComboBoxStateChanged=this.handleComboBoxStateChanged.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this)}get comboBoxItems(){return Array.from(this.querySelectorAll('[data-managed="true"][tag="rtg-combo-box-item"], rtg-combo-box-item')).filter(t=>t.hasAttribute("value"))}get comboBoxInput(){return this.querySelector("rtg-combo-box-input")}get comboBoxEmpty(){return this.querySelector("rtg-combo-box-empty")}get hasResults(){return!this.filteredItems.length}get filteredItems(){var r;let t=(r=this.searchKey)==null?void 0:r.toLowerCase();return this.comboBoxItems.filter(i=>{var s;return(s=i.getAttribute("value"))==null?void 0:s.toLowerCase().includes(t)})}get _comboBox(){let t=this.parentElement;for(;t&&!(t instanceof Et);)t=t.parentElement;return t}handleComboBoxStateChanged(t){var o;let{isOpen:r,targetComboBoxId:i}=t.detail;if(this.isOpen=r,i!==((o=this._comboBox)==null?void 0:o.uuid))return;let s=this.renderRoot.querySelector('[part="select-group"]');s&&(r?(clearTimeout(s._hideTimeout),s.classList.remove("rtg-scale-y-0","rtg-opacity-0"),s.classList.add("rtg-scale-y-100","rtg-opacity-100"),s.classList.remove("rtg-invisible","rtg-pointer-events-none"),s.classList.add("rtg-visible","rtg-pointer-events-auto")):(s.classList.remove("rtg-opacity-100"),s.classList.add("rtg-opacity-0"),s._hideTimeout=setTimeout(()=>{s.classList.remove("rtg-visible","rtg-pointer-events-auto","rtg-scale-y-100"),s.classList.add("rtg-invisible","rtg-pointer-events-none","rtg-scale-y-0")},300)))}moveChildren(){let t=this.renderRoot.querySelector('[part="select-group"]');if(!t)return;let r={top:t.querySelector("#topSlot"),empty:t.querySelector("#emptySlot"),list:t.querySelector("#listSlot")},i={"rtg-combo-box-input":"top","rtg-combo-box-empty":"empty","rtg-combo-box-item":"list"};Array.from(this.children).forEach(s=>{var n;let o=i[s.tagName.toLowerCase()];o&&(s.setAttribute("data-managed","true"),(n=r[o])==null||n.appendChild(s))})}renderFilteredItems(){return this.comboBoxItems.forEach(t=>t.setAttribute("hidden","true")),this.filteredItems.map((t,r)=>{var n;let i=t.getAttribute("value")??"",s=r===this.focusedIndex,o=i.toLowerCase()===((n=this._comboBox)==null?void 0:n.selectedValue.toLowerCase());return d`
|
|
3503
3503
|
<rtg-combo-box-item
|
|
3504
|
-
@mouseover="${
|
|
3504
|
+
@mouseover="${h=>this.handleMouseOver(h,r)}"
|
|
3505
3505
|
.value=${i}
|
|
3506
3506
|
.selectItemIndex=${r}
|
|
3507
3507
|
.isFocus=${s}
|
|
@@ -3539,12 +3539,12 @@ body {
|
|
|
3539
3539
|
<span
|
|
3540
3540
|
class="${this.isSelected?"rtg-visible":"rtg-invisible"} data-hs-combo-box-value rtg-mr-2"
|
|
3541
3541
|
>
|
|
3542
|
-
${
|
|
3542
|
+
${Yh()}
|
|
3543
3543
|
</span>
|
|
3544
3544
|
</div>
|
|
3545
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`
|
|
3546
3546
|
<div class="rtg-flex rtg-items-center rtg-px-2">
|
|
3547
|
-
${
|
|
3547
|
+
${Kh()}
|
|
3548
3548
|
<input
|
|
3549
3549
|
part="combo-box-input"
|
|
3550
3550
|
type="text"
|
|
@@ -3574,13 +3574,13 @@ body {
|
|
|
3574
3574
|
data-combo-box-uuid=${this.uuid}
|
|
3575
3575
|
part="combo-box"
|
|
3576
3576
|
></div>
|
|
3577
|
-
`}};l([a({type:Boolean}),c("design:type",Object)],Et.prototype,"isOpen",void 0),l([x(),c("design:type",Object)],Et.prototype,"selectedValue",void 0),l([x(),c("design:type",Object)],Et.prototype,"searchTerm",void 0),l([x(),c("design:type",Object)],Et.prototype,"focusedIndex",void 0),l([x(),c("design:type",Array)],Et.prototype,"filteredItems",void 0),l([x(),c("design:type",Object)],Et.prototype,"uuid",void 0),l([a({type:String}),c("design:type",String)],Et.prototype,"label",void 0),l([a({type:Array}),c("design:type",Object)],Et.prototype,"items",void 0),l([Ci('[part="combo-box"]'),c("design:type",typeof(Ea=typeof HTMLDivElement<"u"&&HTMLDivElement)=="function"?Ea:Object)],Et.prototype,"parentDiveElement",void 0),Et=l([p("rtg-combo-box"),c("design:paramtypes",[])],Et);var
|
|
3577
|
+
`}};l([a({type:Boolean}),c("design:type",Object)],Et.prototype,"isOpen",void 0),l([x(),c("design:type",Object)],Et.prototype,"selectedValue",void 0),l([x(),c("design:type",Object)],Et.prototype,"searchTerm",void 0),l([x(),c("design:type",Object)],Et.prototype,"focusedIndex",void 0),l([x(),c("design:type",Array)],Et.prototype,"filteredItems",void 0),l([x(),c("design:type",Object)],Et.prototype,"uuid",void 0),l([a({type:String}),c("design:type",String)],Et.prototype,"label",void 0),l([a({type:Array}),c("design:type",Object)],Et.prototype,"items",void 0),l([Ci('[part="combo-box"]'),c("design:type",typeof(Ea=typeof HTMLDivElement<"u"&&HTMLDivElement)=="function"?Ea:Object)],Et.prototype,"parentDiveElement",void 0),Et=l([p("rtg-combo-box"),c("design:paramtypes",[])],Et);var ae={root:["rtg-flex rtg-overflow-hidden","rtg-flex-col","rtg-w-command-space-w rtg-h-command-space-h","rtg-text-command-color-text","rtg-bg-command-color-bg","rtg-rounded-command-radius"],input:{wrapper:["rtg-flex","rtg-gap-command-input-wrapper-space-gap rtg-items-center","rtg-px-command-input-wrapper-space-px","rtg-h-command-input-wrapper-space-h","rtg-border-b-command-input-wrapper-width-border rtg-border-b-command-input-wrapper-color-border"],icon:["rtg-shrink-0","rtg-size-command-input-icon-space-size","rtg-opacity-command-input-icon-opacity"],input:["rtg-flex","rtg-py-command-input-space-py","rtg-w-command-input-space-w rtg-h-command-input-space-h","rtg-text-command-input-font","rtg-bg-command-input-color-bg","rtg-rounded-command-input-radius rtg-outline-hidden","focus:rtg-outline-none","disabled:rtg-opacity-command-input-opacity-disabled disabled:rtg-cursor-not-allowed","placeholder:rtg-text-command-input-placeholder-color-text"]},list:["rtg-overflow-x-hidden rtg-overflow-y-auto","rtg-max-h-command-list-space-max-h","rtg-scroll-py-1"],empty:["rtg-py-command-empty-space-py","rtg-text-command-empty-font rtg-text-center"],group:["rtg-overflow-hidden","rtg-p-command-group-space-p","rtg-text-command-group-color-text"],heading:["rtg-px-command-heading-space-px rtg-py-command-heading-space-py","rtg-text-command-heading-font rtg-font-command-heading-font-weight rtg-text-command-heading-color-text"],separator:["rtg-command-separator-space-mx","rtg-h-command-separator-space-h","rtg-bg-command-separator-color-bg"],item:["rtg-flex rtg-relative","rtg-gap-command-item-space-gap rtg-items-center","rtg-px-command-item-space-px rtg-py-command-item-space-py","rtg-text-command-item-font","rtg-rounded-command-item-radius rtg-outline-hidden","rtg-cursor-default rtg-select-none","hover:rtg-text-command-item-color-text-hover hover:rtg-bg-command-item-color-bg-hover","aria-selected:rtg-text-command-item-color-text-selected aria-selected:rtg-bg-command-item-color-bg-selected",'data-[disabled="true"]:rtg-opacity-command-item-opacity-disabled data-[disabled="true"]:rtg-pointer-events-none','[&_svg]:rtg-shrink-0 [&_svg:not([class*="rtg-size-"])]:rtg-size-command-item-icon-space-size [&_svg:not([class*="rtg-text-"])]:rtg-text-command-item-icon-color-text [&_svg]:rtg-pointer-events-none']},es,ir,Pi=(ir=class extends _{constructor(...t){super(...t),this._id="",this._hidden="true"}get containerElement(){return this.querySelector(`#${this.identifier}`)}get identifier(){if(this._id!=="")return this._id;let t=this.parentElement;return t?this._id=`${t.getAttribute("id")}e${es._counter++}`:this._id=`rtgcmdrxlxe${es._counter++}`,this._id}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this.containerElement)}render(){return d`
|
|
3578
3578
|
<div
|
|
3579
3579
|
rtgcmd-empty
|
|
3580
3580
|
id="${this.identifier}"
|
|
3581
3581
|
part="command-empty"
|
|
3582
3582
|
role="presentation"
|
|
3583
|
-
class=${m(
|
|
3583
|
+
class=${m(ae.empty,this._hidden==="true"&&"rtg-hidden",this.className)}
|
|
3584
3584
|
></div>
|
|
3585
3585
|
`}},es=ir,ir._counter=0,ir);l([a({type:String}),c("design:type",Object)],Pi.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Pi.prototype,"_hidden",void 0),Pi=es=l([p("rtg-command-empty")],Pi);var rs,sr,ii=(sr=class extends _{constructor(...t){super(...t),this.heading="",this._id="",this._hidden=""}get itemsContainerElement(){return this.querySelector(`#${this.identifier}g`)}get identifier(){if(this._id!=="")return this._id;let t=this.parentElement;return t?this._id=`${t.getAttribute("id")}g${rs._counter++}`:this._id=`rtgcmdrxlxg${rs._counter++}`,this._id}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(t){let r=this.itemsContainerElement;if(r){for(;r.firstChild;)r.removeChild(r.firstChild);this.moveLightDomChildrenInto(r)}}render(){return d`
|
|
3586
3586
|
<div
|
|
@@ -3588,13 +3588,13 @@ body {
|
|
|
3588
3588
|
id="${this.identifier}"
|
|
3589
3589
|
part="command-group"
|
|
3590
3590
|
role="presentation"
|
|
3591
|
-
class=${m(
|
|
3591
|
+
class=${m(ae.group,this._hidden==="true"&&"rtg-hidden",this.className)}
|
|
3592
3592
|
>
|
|
3593
3593
|
<div
|
|
3594
3594
|
rtgcmd-group-heading
|
|
3595
3595
|
aria-hidden="true"
|
|
3596
3596
|
id="${this.identifier}h"
|
|
3597
|
-
class=${m(
|
|
3597
|
+
class=${m(ae.heading)}
|
|
3598
3598
|
>
|
|
3599
3599
|
${this.heading}
|
|
3600
3600
|
</div>
|
|
@@ -3605,10 +3605,10 @@ body {
|
|
|
3605
3605
|
aria-labelledby="${this.identifier}h"
|
|
3606
3606
|
></div>
|
|
3607
3607
|
</div>
|
|
3608
|
-
`}},rs=sr,sr._counter=0,sr);l([a({type:String}),c("design:type",Object)],ii.prototype,"heading",void 0),l([a({attribute:"id",type:String}),c("design:type",Object)],ii.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],ii.prototype,"_hidden",void 0),ii=rs=l([p("rtg-command-group")],ii);var Fi=class extends v{constructor(...e){super(...e),this.placeholder="Type a command or search...",this._value=""}get identifier(){let e=this.parentElement;return e?`${e.getAttribute("id")}i`:"rtgcmdrxi"}filterItems(){let e=this.parentElement;if(e){let t=!0,r=e.querySelectorAll("rtg-command-group");r&&r.forEach(s=>{var
|
|
3608
|
+
`}},rs=sr,sr._counter=0,sr);l([a({type:String}),c("design:type",Object)],ii.prototype,"heading",void 0),l([a({attribute:"id",type:String}),c("design:type",Object)],ii.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],ii.prototype,"_hidden",void 0),ii=rs=l([p("rtg-command-group")],ii);var Fi=class extends v{constructor(...e){super(...e),this.placeholder="Type a command or search...",this._value=""}get identifier(){let e=this.parentElement;return e?`${e.getAttribute("id")}i`:"rtgcmdrxi"}filterItems(){let e=this.parentElement;if(e){let t=!0,r=e.querySelectorAll("rtg-command-group");r&&r.forEach(s=>{var u,g;let o=!0,n=s.querySelectorAll("rtg-command-item");n&&n.forEach(y=>{(y.value||"").toLowerCase().includes(this._value.toLowerCase())?(o=!1,t=!1,y._hidden="false"):y._hidden="true"}),s._hidden=o?"true":"false";let h=s.previousElementSibling;h&&(h._hidden=o||((u=h.previousElementSibling)==null?void 0:u.getAttribute("aria-hidden"))==="true"?"true":"false"),h=s.nextElementSibling,h&&(h._hidden=o||((g=h.nextElementSibling)==null?void 0:g.getAttribute("aria-hidden"))==="true"?"true":"false")});let i=e.querySelector("rtg-command-empty");i&&i.setAttribute("aria-hidden",t?"false":"true")}}handleChange(e){let t=e.target;t&&(this._value=t.value,this.filterItems())}createRenderRoot(){return this}render(){return d`
|
|
3609
3609
|
<div
|
|
3610
3610
|
part="command-input"
|
|
3611
|
-
class=${m(
|
|
3611
|
+
class=${m(ae.input.wrapper,this.className)}
|
|
3612
3612
|
name="rtgcmd-input-container"
|
|
3613
3613
|
data-slot="rtg-command-input-wrapper"
|
|
3614
3614
|
>
|
|
@@ -3622,7 +3622,7 @@ body {
|
|
|
3622
3622
|
stroke-width="2"
|
|
3623
3623
|
stroke-linecap="round"
|
|
3624
3624
|
stroke-linejoin="round"
|
|
3625
|
-
class=${m(
|
|
3625
|
+
class=${m(ae.input.icon,"lucide lucide-search-icon lucide-search")}
|
|
3626
3626
|
>
|
|
3627
3627
|
<path d="m21 21-4.34-4.34" />
|
|
3628
3628
|
<circle cx="11" cy="11" r="8" />
|
|
@@ -3643,7 +3643,7 @@ body {
|
|
|
3643
3643
|
aria-controls=":r1oe:"
|
|
3644
3644
|
aria-labelledby=":r1of:"
|
|
3645
3645
|
@input="${this.handleChange}"
|
|
3646
|
-
class=${m(
|
|
3646
|
+
class=${m(ae.input.input)}
|
|
3647
3647
|
/>
|
|
3648
3648
|
</div>
|
|
3649
3649
|
`}};l([a({type:String}),c("design:type",Object)],Fi.prototype,"placeholder",void 0),l([a({attribute:"value",type:String}),c("design:type",Object)],Fi.prototype,"_value",void 0),Fi=l([p("rtg-command-input")],Fi);var is,or,Ge=(or=class extends _{constructor(...t){super(...t),this.selected=!1,this._id="",this._hidden="false",this.onSelect=()=>{},this.disabled="false"}get containerElement(){return this.querySelector(`#${this.identifier}`)}get identifier(){if(this._id!=="")return this._id;let t=this.parentElement;return t?this._id=`${t.getAttribute("id")}li${is._counter++}`:this._id=`rtgcmdrxgxli${is._counter++}`,this._id}get value(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}handleMouseEvent(t){(t.type==="mouseover"||t.type==="focus")&&(this.selected=!0),t.type==="mouseleave"&&(this.selected=!1)}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(t){this.moveLightDomChildrenInto(this.containerElement)}updated(t){}render(){return d`
|
|
@@ -3661,7 +3661,7 @@ body {
|
|
|
3661
3661
|
@mouseleave="${this.handleMouseEvent}"
|
|
3662
3662
|
@focus="${this.handleMouseEvent}"
|
|
3663
3663
|
@click="${this.onSelect}"
|
|
3664
|
-
class=${m(
|
|
3664
|
+
class=${m(ae.item,this._hidden==="true"&&"rtg-hidden",this.className)}
|
|
3665
3665
|
></div>
|
|
3666
3666
|
`}},is=or,or._counter=0,or);l([a({type:String}),c("design:type",Object)],Ge.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Ge.prototype,"_hidden",void 0),l([a({type:Function}),c("design:type",Object)],Ge.prototype,"onSelect",void 0),l([a({attribute:"data-value",type:String}),a({type:Boolean}),c("design:type",Object),c("design:paramtypes",[])],Ge.prototype,"containerElement",null),l([a({attribute:"data-disabled",type:String}),c("design:type",String)],Ge.prototype,"disabled",void 0),Ge=is=l([p("rtg-command-item")],Ge);var ka=class extends _{get identifier(){let e=this.parentElement;return e?`${e.getAttribute("id")}l`:"rtgcmdrxl"}get containerElement(){return this.querySelector("div[rtgcmd-list]")}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.containerElement)}render(){return d`
|
|
3667
3667
|
<div
|
|
@@ -3669,7 +3669,7 @@ body {
|
|
|
3669
3669
|
id="${this.identifier}"
|
|
3670
3670
|
part="command-list"
|
|
3671
3671
|
role="listbox"
|
|
3672
|
-
class=${m(
|
|
3672
|
+
class=${m(ae.list,this.className)}
|
|
3673
3673
|
>
|
|
3674
3674
|
<div></div>
|
|
3675
3675
|
</div>
|
|
@@ -3679,12 +3679,12 @@ body {
|
|
|
3679
3679
|
id="${this.identifier}"
|
|
3680
3680
|
part="command-separator"
|
|
3681
3681
|
role="separator"
|
|
3682
|
-
class=${m(
|
|
3682
|
+
class=${m(ae.separator,this.className)}
|
|
3683
3683
|
></div>
|
|
3684
3684
|
`}`}},ss=nr,nr._counter=0,nr);l([a({type:String}),c("design:type",Object)],Ti.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Ti.prototype,"_hidden",void 0),Ti=ss=l([p("rtg-command-separator")],Ti);var Ra=class extends _{get containerElement(){return this.querySelector("div[rtgcmd-root]")}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class","style"]}createRenderRoot(){return this}firstUpdated(e){this.removeParentAttributes(),this.moveLightDomChildrenInto(this.containerElement),this.containerElement&&this.observeStyleAndClassSync(this.containerElement)}render(){let e=this.customClass||"",t=this.customStyle||"";return d`
|
|
3685
3685
|
<div
|
|
3686
3686
|
part="command"
|
|
3687
|
-
class="${m(
|
|
3687
|
+
class="${m(ae.root,e)}"
|
|
3688
3688
|
style="${t}"
|
|
3689
3689
|
id="rtgcmdr1"
|
|
3690
3690
|
rtgcmd-root
|
|
@@ -3729,7 +3729,7 @@ body {
|
|
|
3729
3729
|
part="context-menu-content"
|
|
3730
3730
|
class=${m(Rt.content,this.className)}
|
|
3731
3731
|
></div>
|
|
3732
|
-
`}};l([x(),c("design:type",Object)],co.prototype,"isOpen",void 0),co=l([p("rtg-context-menu-content"),c("design:paramtypes",[])],co);var
|
|
3732
|
+
`}};l([x(),c("design:type",Object)],co.prototype,"isOpen",void 0),co=l([p("rtg-context-menu-content"),c("design:paramtypes",[])],co);var ho=class extends _{constructor(...e){super(...e),this.heading=""}get _containerElement(){return this.querySelector("div[ rtgcontext-group-items]")}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3733
3733
|
<div
|
|
3734
3734
|
rtgcmd-group
|
|
3735
3735
|
part="context-menu-group"
|
|
@@ -3742,7 +3742,7 @@ body {
|
|
|
3742
3742
|
|
|
3743
3743
|
<div rtgcontext-group-items role="group"></div>
|
|
3744
3744
|
</div>
|
|
3745
|
-
`}};l([a({type:String}),c("design:type",Object)],
|
|
3745
|
+
`}};l([a({type:String}),c("design:type",Object)],ho.prototype,"heading",void 0),ho=l([p("rtg-context-menu-group")],ho);var Li=class extends _{constructor(...e){super(...e),this.disabled=!1}get _containerElement(){return this.querySelector("div[part=context-menu-item]")}getAttributesToExclude(){return[]}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}firstUpdated(e){var t;this.moveLightDomChildrenInto(this._containerElement),(t=this._containerElement)==null||t.addEventListener("click",()=>{this.dispatchEvent(new MouseEvent("click",{bubbles:!0,composed:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent("close-context-menu",{bubbles:!0,composed:!0}))})}connectedCallback(){super.connectedCallback()}disconnectedCallback(){}createRenderRoot(){return this}render(){return d`
|
|
3746
3746
|
<div
|
|
3747
3747
|
part="context-menu-item"
|
|
3748
3748
|
role="option"
|
|
@@ -3783,14 +3783,14 @@ body {
|
|
|
3783
3783
|
</span>
|
|
3784
3784
|
<div part="context-menu-radio-item-container"></div>
|
|
3785
3785
|
</div>
|
|
3786
|
-
`}};l([a({type:String}),c("design:type",Object)],Ke.prototype,"_id",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],Ke.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],Ke.prototype,"selected",void 0),l([a({type:Boolean}),c("design:type",Object)],Ke.prototype,"checked",void 0),l([a({attribute:"data-disabled",type:Boolean}),c("design:type",Object)],Ke.prototype,"disabled",void 0),Ke=l([p("rtg-context-menu-radio-item")],Ke);var
|
|
3786
|
+
`}};l([a({type:String}),c("design:type",Object)],Ke.prototype,"_id",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],Ke.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],Ke.prototype,"selected",void 0),l([a({type:Boolean}),c("design:type",Object)],Ke.prototype,"checked",void 0),l([a({attribute:"data-disabled",type:Boolean}),c("design:type",Object)],Ke.prototype,"disabled",void 0),Ke=l([p("rtg-context-menu-radio-item")],Ke);var uo=class extends v{constructor(...e){super(...e),this._id=""}createRenderRoot(){return this}render(){return d`
|
|
3787
3787
|
<div
|
|
3788
3788
|
rtgcmd-separator
|
|
3789
3789
|
part="context-menu-separator"
|
|
3790
3790
|
role="separator"
|
|
3791
3791
|
class=${m(Rt.separator,this.className)}
|
|
3792
3792
|
></div>
|
|
3793
|
-
`}};l([a({type:String}),c("design:type",Object)],
|
|
3793
|
+
`}};l([a({type:String}),c("design:type",Object)],uo.prototype,"_id",void 0),uo=l([p("rtg-context-menu-separator")],uo);var Ia=class extends _{get _containerElement(){return this.querySelector("span[part=context-menu-shortcut]")}getAttributesToExclude(){return[]}createRenderRoot(){return this.classList=m(Rt.shortcut),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3794
3794
|
<span
|
|
3795
3795
|
part="context-menu-shortcut"
|
|
3796
3796
|
class=${m(Rt.shortcut,this.className)}
|
|
@@ -3801,20 +3801,20 @@ body {
|
|
|
3801
3801
|
part="context-menu"
|
|
3802
3802
|
class=${m(Rt.root,this.className)}
|
|
3803
3803
|
></div>
|
|
3804
|
-
`}};l([x(),c("design:type",Object)],po.prototype,"isOpen",void 0),po=l([p("rtg-context-menu")],po);var
|
|
3804
|
+
`}};l([x(),c("design:type",Object)],po.prototype,"isOpen",void 0),po=l([p("rtg-context-menu")],po);var un={root:["rtg-relative"],trigger:[""],content:["rtg-absolute rtg-z-50","rtg-p-popover-content-space-p","rtg-w-popover-content-space-w","rtg-text-popover-content-color-text","rtg-bg-popover-content-color-bg","rtg-rounded-popover-content-radius rtg-border-popover-content-width-border rtg-border-popover-content-color-border rtg-outline-hidden","rtg-shadow-popover-content-shadow",'data-[state="open"]:rtg-block data-[state="closed"]:rtg-hidden','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',"rtg-translate-y-0.5"]},Ar=class extends _{constructor(...e){super(...e),this.enableDefaultStyle=!0,this.styleContent=!0,this.side="bottom",this.state="closed"}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof mi);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-content]")}handleClickOutside(e){let t=this._popover;t&&!t.contains(e.target)&&(t.isOpen=!1)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement),window.addEventListener("click",this.handleClickOutside.bind(this))}updated(e){var t;(t=this._popover)!=null&&t.isOpen||window.removeEventListener("click",this.handleClickOutside.bind(this))}preventClickPropagation(e){e.stopPropagation()}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return d`
|
|
3805
3805
|
<div
|
|
3806
3806
|
part="popover-content"
|
|
3807
3807
|
data-state=${this.state}
|
|
3808
|
-
class=${m(
|
|
3808
|
+
class=${m(un.content,this.className)}
|
|
3809
3809
|
@click="${this.preventClickPropagation}"
|
|
3810
3810
|
></div>
|
|
3811
3811
|
`}};l([a({type:Boolean}),c("design:type",Object)],Ar.prototype,"enableDefaultStyle",void 0),l([a({type:Boolean}),c("design:type",Object)],Ar.prototype,"styleContent",void 0),l([a({type:String}),c("design:type",String)],Ar.prototype,"side",void 0),l([a({attribute:"data-state",type:String}),c("design:type",String)],Ar.prototype,"state",void 0),Ar=l([p("rtg-popover-content")],Ar);var Aa=class extends _{constructor(...e){super(...e),this.handleClick=()=>{let t=this._popover;t&&(t.isOpen=!t.isOpen)}}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof mi);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{this.handleClick(),t.stopPropagation()})}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}render(){return d`
|
|
3812
3812
|
<div
|
|
3813
3813
|
part="popover-trigger"
|
|
3814
|
-
class=${m(
|
|
3814
|
+
class=${m(un.trigger,this.className)}
|
|
3815
3815
|
></div>
|
|
3816
3816
|
`}};Aa=l([p("rtg-popover-trigger")],Aa);var mi=class extends _{constructor(...e){super(...e),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=popover]")}get _contentElement(){return this.querySelector("rtg-popover-content")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){this._contentElement.state=this.isOpen?"open":"closed",this._contentElement.requestUpdate()}render(){return d`
|
|
3817
|
-
<div part="popover" class=${m(
|
|
3817
|
+
<div part="popover" class=${m(un.root,this.className)}></div>
|
|
3818
3818
|
`}};l([x(),c("design:type",Boolean)],mi.prototype,"isOpen",void 0),mi=l([p("rtg-popover")],mi);var Ni={root:[""],trigger:[""],triggerButton:[gi({variant:"outline"}).replace("rtg-justify-center",""),"rtg-justify-start","rtg-w-date-picker-trigger-button-space-w","rtg-text-left rtg-font-date-picker-trigger-button-font-weight","data-[empty=true]:rtg-text-date-picker-trigger-button-color-text-empty"],content:["rtg-p-date-picker-content-space-p","rtg-w-auto"]},go=class extends v{constructor(...e){super(...e),this.selectedDate=null}handleDateSelected(e){this.selectedDate=e.detail.startDate,this.requestUpdate()}createRenderRoot(){return this}render(){return d`
|
|
3819
3819
|
<rtg-popover
|
|
3820
3820
|
class=${m("date-picker",Ni.root,this.className)}
|
|
@@ -3858,16 +3858,16 @@ body {
|
|
|
3858
3858
|
<rtg-calendar mode="single"></rtg-calendar>
|
|
3859
3859
|
</rtg-popover-content>
|
|
3860
3860
|
</rtg-popover>
|
|
3861
|
-
`}};l([a({type:Object}),c("design:type",Object)],go.prototype,"selectedDate",void 0),go=l([p("rtg-date-picker")],go);var
|
|
3861
|
+
`}};l([a({type:Object}),c("design:type",Object)],go.prototype,"selectedDate",void 0),go=l([p("rtg-date-picker")],go);var Zt={root:[""],trigger:[""],close:[""],overlay:["rtg-fixed rtg-inset-0 rtg-z-50","rtg-bg-dialog-overlay-color-bg","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0"],content:{base:["rtg-fixed rtg-top-[50%] rtg-left-[50%] rtg-z-50","rtg-grid rtg-gap-dialog-content-space-gap","rtg-p-dialog-content-space-p","rtg-w-dialog-content-space-w rtg-max-w-dialog-content-space-max-w-sm sm:rtg-max-w-dialog-content-space-max-w","rtg-bg-dialog-content-color-bg","rtg-rounded-dialog-content-radius rtg-border-dialog-content-width-border rtg-border-dialog-content-color-border rtg-outline-none","rtg-shadow-dialog-content-shadow","rtg-duration-200","rtg-translate-x-[-50%] rtg-translate-y-[-50%]","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"],close:{base:["rtg-absolute rtg-top-4 rtg-right-4","rtg-rounded-dialog-close-radius","rtg-ring-offset-dialog-close-color-ring-offset","rtg-transition-opacity","focus:rtg-ring-dialog-close-width-ring-focus focus:rtg-ring-dialog-close-color-ring-focus focus:rtg-ring-offset-dialog-close-width-ring-offset focus:rtg-outline-hidden","disabled:rtg-pointer-events-none","data-[state=open]:rtg-bg-dialog-close-color-bg data-[state=open]:rtg-text-dialog-close-color-text"],icon:["rtg-shrink-0","rtg-size-dialog-close-icon-space-size","rtg-pointer-events-none"]}},header:["rtg-flex rtg-flex-col rtg-gap-dialog-header-space-gap","rtg-text-center","sm:rtg-text-left"],footer:["rtg-flex rtg-flex-col-reverse rtg-gap-dialog-footer-space-gap","sm:rtg-flex-row sm:rtg-justify-end"],title:["rtg-text-dialog-title-font rtg-font-dialog-title-font-weight"],description:["rtg-text-dialog-description-font rtg-font-dialog-description-font-weight rtg-text-dialog-description-color-text"]},Xh="closed",Pa=class extends _{get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof Dr)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=dialog-close]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",()=>{let t=this._dialog;t&&(t.dataset.state=Xh)})}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return d`
|
|
3862
3862
|
<div
|
|
3863
3863
|
part="dialog-close"
|
|
3864
|
-
class=${m(
|
|
3864
|
+
class=${m(Zt.close,this.className)}
|
|
3865
3865
|
></div>
|
|
3866
3866
|
`}};Pa=l([p("rtg-dialog-close")],Pa);var mo="closed",zi=class extends _{constructor(...e){super(...e),this.state=mo,this.showCloseButton=!1,this.handleCloseButtonClick=()=>{let t=this._dialog;t&&(t.dataset.state=mo)}}get _containerElement(){return this.querySelector("div[part=dialog-content-slot]")}get ـcomponentElement(){return this.querySelector("div[part=dialog-content]")}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof Dr)return e;e=e.parentElement}return e}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){requestAnimationFrame(()=>{e.get("state")===mo?this.ـcomponentElement.style.display="grid":this.ـcomponentElement.style.display="none"})}render(){return d`
|
|
3867
3867
|
<div
|
|
3868
3868
|
rtgdlg-content
|
|
3869
3869
|
part="dialog-content"
|
|
3870
|
-
class=${m(
|
|
3870
|
+
class=${m(Zt.content.base,this.className)}
|
|
3871
3871
|
>
|
|
3872
3872
|
<div part="dialog-content-slot"></div>
|
|
3873
3873
|
|
|
@@ -3876,7 +3876,7 @@ body {
|
|
|
3876
3876
|
data-slot="dialog-content-close"
|
|
3877
3877
|
type="button"
|
|
3878
3878
|
@click=${this.handleCloseButtonClick}
|
|
3879
|
-
class=${m(
|
|
3879
|
+
class=${m(Zt.content.close.base)}
|
|
3880
3880
|
>
|
|
3881
3881
|
<svg
|
|
3882
3882
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -3888,7 +3888,7 @@ body {
|
|
|
3888
3888
|
stroke-width="2"
|
|
3889
3889
|
stroke-linecap="round"
|
|
3890
3890
|
stroke-linejoin="round"
|
|
3891
|
-
class=${m(
|
|
3891
|
+
class=${m(Zt.content.close.icon,"lucide lucide-x-icon lucide-x")}
|
|
3892
3892
|
>
|
|
3893
3893
|
<path d="M18 6 6 18" />
|
|
3894
3894
|
<path d="m6 6 12 12" />
|
|
@@ -3901,43 +3901,43 @@ body {
|
|
|
3901
3901
|
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],zi.prototype,"state",void 0),l([a({attribute:"show-close-button",type:Boolean}),c("design:type",Object)],zi.prototype,"showCloseButton",void 0),zi=l([p("rtg-dialog-content")],zi);var Fa=class extends _{get _containerElement(){return this.querySelector("div[part=dialog-footer]")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3902
3902
|
<div
|
|
3903
3903
|
part="dialog-footer"
|
|
3904
|
-
class=${m(
|
|
3904
|
+
class=${m(Zt.footer,this.className)}
|
|
3905
3905
|
></div>
|
|
3906
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`
|
|
3907
3907
|
<div
|
|
3908
3908
|
part="dialog-header"
|
|
3909
|
-
class=${m(
|
|
3909
|
+
class=${m(Zt.header,this.className)}
|
|
3910
3910
|
>
|
|
3911
|
-
<h2 class=${m(
|
|
3911
|
+
<h2 class=${m(Zt.title,this.className)}>${this._title}</h2>
|
|
3912
3912
|
|
|
3913
|
-
<p class=${m(
|
|
3913
|
+
<p class=${m(Zt.description,this.className)}>
|
|
3914
3914
|
${this.description}
|
|
3915
3915
|
</p>
|
|
3916
3916
|
</div>
|
|
3917
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`
|
|
3918
3918
|
<div
|
|
3919
3919
|
part="dialog-overly"
|
|
3920
|
-
class=${m(
|
|
3920
|
+
class=${m(Zt.overlay,this.className)}
|
|
3921
3921
|
></div>
|
|
3922
|
-
`}};Ta=l([p("rtg-dialog-overlay")],Ta);var
|
|
3922
|
+
`}};Ta=l([p("rtg-dialog-overlay")],Ta);var Zh="open",La=class extends _{constructor(...e){super(...e),this.handleClick=()=>{let t=this._dialog;t&&(t.dataset.state=Zh)}}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof Dr)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=dialog-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{t.stopPropagation(),this.handleClick()})}getAttributesToExclude(){return[]}createRenderRoot(){return this}render(){return d`
|
|
3923
3923
|
<div
|
|
3924
3924
|
part="dialog-trigger"
|
|
3925
|
-
class=${m(
|
|
3925
|
+
class=${m(Zt.trigger,this.className)}
|
|
3926
3926
|
></div>
|
|
3927
|
-
`}};La=l([p("rtg-dialog-trigger")],La);var
|
|
3927
|
+
`}};La=l([p("rtg-dialog-trigger")],La);var Jh="open",Qh="closed",Dr=class extends _{constructor(...e){super(...e),this.state=Qh}get _containerElement(){return this.querySelector("div[rtgdlg-root]")}get _content(){return this.querySelector("rtg-dialog-content")||null}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.state)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}getAttributesToExclude(){return[]}render(){return d`
|
|
3928
3928
|
<div
|
|
3929
3929
|
rtgdlg-root
|
|
3930
3930
|
part="dialog"
|
|
3931
|
-
class=${m(
|
|
3931
|
+
class=${m(Zt.root,this.className)}
|
|
3932
3932
|
>
|
|
3933
|
-
${this.state===
|
|
3933
|
+
${this.state===Jh?d` <rtg-dialog-overlay></rtg-dialog-overlay>`:b}
|
|
3934
3934
|
</div>
|
|
3935
|
-
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],Dr.prototype,"state",void 0),Dr=l([p("rtg-dialog")],Dr);var
|
|
3935
|
+
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],Dr.prototype,"state",void 0),Dr=l([p("rtg-dialog")],Dr);var oe={open:"open",closed:"closed"},le={root:[""],trigger:[""],close:[""],overlay:["rtg-fixed rtg-inset-0 rtg-z-50","rtg-bg-drawer-overlay-color-bg","data-[state=open]:rtg-animate-in data-[state=open]:rtg-fade-in-0","data-[state=closed]:rtg-animate-out data-[state=closed]:rtg-fade-out-0"],content:{base:["rtg-fixed rtg-inset-x-0 rtg-bottom-0 rtg-z-50","rtg-flex rtg-flex-col","rtg-mt-drawer-content-space-mt","rtg-h-auto rtg-max-h-[80vh]","rtg-bg-drawer-content-color-bg","rtg-rounded-t-drawer-content-radius rtg-border-t-drawer-content-width-border rtg-border-t-drawer-content-color-border"],thumb:["rtg-shrink-0","rtg-mx-auto rtg-mt-drawer-thumb-space-mt","rtg-w-drawer-thumb-space-w rtg-h-drawer-thumb-space-h","rtg-bg-drawer-thumb-color-bg","rtg-rounded-drawer-thumb-radius"]},header:["rtg-flex rtg-flex-col rtg-gap-drawer-header-space-gap-sm md:rtg-gap-drawer-header-space-gap","rtg-p-drawer-header-space-p","rtg-text-center"],footer:["rtg-flex rtg-flex-col rtg-gap-drawer-footer-space-gap","rtg-p-drawer-footer-space-p rtg-mt-auto"],title:["rtg-text-drawer-title-font rtg-font-drawer-title-font-weight rtg-text-drawer-title-color-text"],description:["rtg-text-drawer-description-font rtg-font-drawer-description-font-weight rtg-text-drawer-description-color-text"]},Na=class extends _{get _drawer(){let e=this.parentElement;for(;e;){if(e instanceof bi)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=drawer-close]")}async firstUpdated(e){super.firstUpdated(e),await this.updateComplete;let t=this._containerElement;if(t){this.moveLightDomChildrenInto(t);let r=t.querySelector("button, [data-close], [role=button]");r&&r.addEventListener("click",i=>{i.stopPropagation();let s=this._drawer;s&&(s.dataset.state=oe.closed)})}}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return d`
|
|
3936
3936
|
<div
|
|
3937
3937
|
part="drawer-close"
|
|
3938
|
-
class=${m(
|
|
3938
|
+
class=${m(le.close,this.className)}
|
|
3939
3939
|
></div>
|
|
3940
|
-
`}};Na=l([p("rtg-drawer-close")],Na);var bo=class extends _{constructor(...e){super(...e),this.state=
|
|
3940
|
+
`}};Na=l([p("rtg-drawer-close")],Na);var bo=class extends _{constructor(...e){super(...e),this.state=oe.closed}connectedCallback(){super.connectedCallback();let e=document.createElement("style");e.textContent=`
|
|
3941
3941
|
@keyframes slideInUp {
|
|
3942
3942
|
from { transform: translateY(100%); }
|
|
3943
3943
|
to { transform: translateY(0); }
|
|
@@ -3957,52 +3957,52 @@ body {
|
|
|
3957
3957
|
.drawer-closed {
|
|
3958
3958
|
animation: slideOutDown 0.5s cubic-bezier(0.32, 0.72, 0, 1) forwards;
|
|
3959
3959
|
}
|
|
3960
|
-
`,this.querySelector("style[data-injected]")||(e.setAttribute("data-injected","true"),this.prepend(e))}get _containerElement(){return this.querySelector("div[part=drawer-content-slot]")}get ـcomponentElement(){return this.querySelector("div[part=drawer-content]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){requestAnimationFrame(()=>{e.get("state")===
|
|
3960
|
+
`,this.querySelector("style[data-injected]")||(e.setAttribute("data-injected","true"),this.prepend(e))}get _containerElement(){return this.querySelector("div[part=drawer-content-slot]")}get ـcomponentElement(){return this.querySelector("div[part=drawer-content]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){requestAnimationFrame(()=>{e.get("state")===oe.closed?this.ـcomponentElement.style.display="flex":this.ـcomponentElement.style.display="none"})}render(){return d`
|
|
3961
3961
|
<div
|
|
3962
3962
|
rtgdlg-content
|
|
3963
3963
|
part="drawer-content"
|
|
3964
|
-
class=${m(
|
|
3964
|
+
class=${m(le.content.base,this.state===oe.open?"drawer-open":"drawer-closed",this.className)}
|
|
3965
3965
|
>
|
|
3966
|
-
<div part="drawer-thumb" class=${m(
|
|
3966
|
+
<div part="drawer-thumb" class=${m(le.content.thumb)}></div>
|
|
3967
3967
|
<div part="drawer-content-slot"></div>
|
|
3968
3968
|
</div>
|
|
3969
3969
|
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],bo.prototype,"state",void 0),bo=l([p("rtg-drawer-content")],bo);var za=class extends _{get _containerElement(){return this.querySelector("p[part=drawer-description")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3970
3970
|
<p
|
|
3971
3971
|
part="drawer-description"
|
|
3972
|
-
class=${m(
|
|
3972
|
+
class=${m(le.description,this.className)}
|
|
3973
3973
|
></p>
|
|
3974
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`
|
|
3975
3975
|
<div
|
|
3976
3976
|
part="drawer-footer"
|
|
3977
|
-
class=${m(
|
|
3977
|
+
class=${m(le.footer,this.className)}
|
|
3978
3978
|
></div>
|
|
3979
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`
|
|
3980
3980
|
<div
|
|
3981
3981
|
part="drawer-header"
|
|
3982
|
-
class=${m(
|
|
3982
|
+
class=${m(le.header,this.className)}
|
|
3983
3983
|
></div>
|
|
3984
3984
|
`}};Ua=l([p("rtg-drawer-header")],Ua);var Da=class extends v{createRenderRoot(){return this}render(){return d`
|
|
3985
3985
|
<div
|
|
3986
3986
|
part="drawer-overly"
|
|
3987
|
-
class=${m(
|
|
3987
|
+
class=${m(le.overlay,this.className)}
|
|
3988
3988
|
></div>
|
|
3989
3989
|
`}};Da=l([p("rtg-drawer-overlay")],Da);var Ba=class extends _{get _containerElement(){return this.querySelector("h2[part=drawer-title")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
3990
3990
|
<h2
|
|
3991
3991
|
part="drawer-title"
|
|
3992
|
-
class=${m(
|
|
3992
|
+
class=${m(le.title,this.className)}
|
|
3993
3993
|
></h2>
|
|
3994
|
-
`}};Ba=l([p("rtg-drawer-title")],Ba);var Ma=class extends _{constructor(...e){super(...e),this.handleClick=()=>{let t=this._drawer;t&&(t.dataset.state=
|
|
3994
|
+
`}};Ba=l([p("rtg-drawer-title")],Ba);var Ma=class extends _{constructor(...e){super(...e),this.handleClick=()=>{let t=this._drawer;t&&(t.dataset.state=oe.open)}}get _drawer(){let e=this.parentElement;for(;e;){if(e instanceof bi)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=drawer-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{t.stopPropagation(),this.handleClick()})}getAttributesToExclude(){return[]}createRenderRoot(){return this}render(){return d`
|
|
3995
3995
|
<div
|
|
3996
3996
|
part="drawer-trigger"
|
|
3997
|
-
class=${m(
|
|
3997
|
+
class=${m(le.trigger,this.className)}
|
|
3998
3998
|
></div>
|
|
3999
|
-
`}};Ma=l([p("rtg-drawer-trigger")],Ma);var bi=class extends _{constructor(...e){super(...e),this.state=
|
|
3999
|
+
`}};Ma=l([p("rtg-drawer-trigger")],Ma);var bi=class extends _{constructor(...e){super(...e),this.state=oe.closed,this.handleOutsideClick=t=>{let r=this._content;this.state===oe.open&&r&&(r.contains(t.target)||(this.state=oe.closed,this.dispatchEvent(new CustomEvent("drawer-close"))))}}get _containerElement(){return this.querySelector("div[rtgdlg-root]")}get _content(){return this.querySelector("rtg-drawer-content")||null}connectedCallback(){super.connectedCallback(),this.setupOutsideClickHandler()}disconnectedCallback(){super.disconnectedCallback(),this.removeOutsideClickHandler()}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.state),e.has("state")&&this.setupOutsideClickHandler()}setupOutsideClickHandler(){this.state===oe.open?document.addEventListener("click",this.handleOutsideClick):this.removeOutsideClickHandler()}removeOutsideClickHandler(){document.removeEventListener("click",this.handleOutsideClick)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}getAttributesToExclude(){return[]}render(){return d`
|
|
4000
4000
|
<div
|
|
4001
4001
|
rtgdlg-root
|
|
4002
4002
|
part="drawer"
|
|
4003
|
-
class=${m(
|
|
4003
|
+
class=${m(le.root,this.className)}
|
|
4004
4004
|
>
|
|
4005
|
-
${this.state===
|
|
4005
|
+
${this.state===oe.open?d` <rtg-drawer-overlay></rtg-drawer-overlay>`:b}
|
|
4006
4006
|
</div>
|
|
4007
4007
|
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],bi.prototype,"state",void 0),bi=l([p("rtg-drawer")],bi);var It={root:[""],content:["rtg-overflow-x-hidden rtg-overflow-y-auto rtg-z-50","rtg-p-dropdown-menu-content-space-p","rtg-min-w-dropdown-menu-content-space-min-w","rtg-text-dropdown-menu-content-color-text","rtg-bg-dropdown-menu-content-color-bg","rtg-rounded-dropdown-menu-content-radius rtg-border-dropdown-menu-content-width-border rtg-border-dropdown-menu-content-color-border","rtg-shadow-dropdown-menu-content-shadow","rtg-translate-y-0.5","rtg-slide-in-from-top-2","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"],group:[""],item:["rtg-flex rtg-relative","rtg-gap-dropdown-menu-item-space-gap rtg-items-center","rtg-px-dropdown-menu-item-space-px rtg-py-dropdown-menu-item-space-py","rtg-text-dropdown-menu-item-font","rtg-rounded-dropdown-menu-item-radius rtg-outline-hidden","rtg-cursor-default","rtg-select-none","hover:rtg-bg-dropdown-menu-item-color-bg-hover hover:rtg-text-dropdown-menu-item-color-text-hover","focus:rtg-bg-dropdown-menu-item-color-bg-focus focus:rtg-text-dropdown-menu-item-color-text-focus","data-[disabled]:rtg-opacity-dropdown-menu-item-opacity-disabled data-[disabled]:rtg-pointer-events-none",'[&_svg]:rtg-shrink-0 [&_svg:not([class*="rtg-size-"])]:rtg-size-dropdown-menu-item-icon-space-size [&_svg:not([class*="rtg-text-"])]:rtg-text-dropdown-menu-item-icon-color-text [&_svg]:rtg-pointer-events-none'],checkboxItem:{base:["rtg-flex rtg-relative","rtg-gap-dropdown-menu-checkbox-item-space-gap rtg-items-center","rtg-pl-dropdown-menu-checkbox-item-space-pl rtg-pr-dropdown-menu-checkbox-item-space-pr rtg-py-dropdown-menu-checkbox-item-space-py","rtg-text-dropdown-menu-checkbox-item-font","rtg-rounded-dropdown-menu-checkbox-item-radius rtg-outline-hidden","rtg-cursor-default","rtg-select-none","aria-selected:rtg-bg-dropdown-menu-checkbox-item-color-bg-focus aria-selected:rtg-text-dropdown-menu-checkbox-item-color-text-focus","data-[disabled]:rtg-opacity-dropdown-menu-checkbox-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],span:["rtg-flex rtg-absolute rtg-left-2","rtg-justify-center rtg-items-center","rtg-size-dropdown-menu-checkbox-item-icon-container-space-size","rtg-pointer-events-none"],icon:["rtg-shrink-0","rtg-size-dropdown-menu-checkbox-item-icon-space-size","rtg-pointer-events-none"]},radioItem:{base:["rtg-flex rtg-relative","rtg-gap-dropdown-menu-radio-item-space-gap rtg-items-center","rtg-pl-dropdown-menu-radio-item-space-pl rtg-pr-dropdown-menu-radio-item-space-pr rtg-py-dropdown-menu-radio-item-space-py","rtg-text-dropdown-menu-radio-item-font","rtg-rounded-dropdown-menu-radio-item-radius rtg-outline-hidden","rtg-cursor-default","rtg-select-none","aria-selected:rtg-bg-dropdown-menu-radio-item-color-bg-focus aria-selected:rtg-text-dropdown-menu-radio-item-color-text-focus","data-[disabled]:rtg-opacity-dropdown-menu-radio-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],span:["rtg-flex rtg-absolute rtg-left-2","rtg-justify-center rtg-items-center","rtg-size-dropdown-menu-radio-item-icon-container-space-size","rtg-pointer-events-none"],icon:["rtg-shrink-0","rtg-size-dropdown-menu-radio-item-icon-space-size","rtg-pointer-events-none","rtg-fill-current"]},label:["rtg-px-dropdown-menu-label-space-px rtg-py-dropdown-menu-label-space-py","rtg-text-dropdown-menu-label-font rtg-font-dropdown-menu-label-font-weight"],separator:["rtg-mx-dropdown-menu-separator-space-mx rtg-my-dropdown-menu-separator-space-my","rtg-h-dropdown-menu-separator-space-h","rtg-bg-dropdown-menu-separator-color-bg"],shortcut:["rtg-ml-auto","rtg-text-dropdown-menu-shortcut-font rtg-text-dropdown-menu-shortcut-color-text"]},Ye=class extends _{constructor(...e){super(...e),this._id="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=dropdown-menu-checkbox-item-container]")}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof Br);)e=e.parentElement;return e}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this._dropdownMenu.isOpen=!1,this.checked=!this.checked}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4008
4008
|
<div
|
|
@@ -4158,27 +4158,27 @@ 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",
|
|
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`
|
|
4162
4162
|
<p
|
|
4163
4163
|
id="${this.itemContext.id}-description"
|
|
4164
4164
|
part="form-description"
|
|
4165
|
-
class="${m(
|
|
4165
|
+
class="${m(eu,this.className)}"
|
|
4166
4166
|
></p>
|
|
4167
|
-
`}};l([Lt({context:Bd}),c("design:type",Object)],Co.prototype,"itemContext",void 0),Co=l([p("rtg-form-description")],Co);var
|
|
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
|
-
class="${m(
|
|
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:
|
|
4169
|
+
class="${m(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
|
|
4171
4171
|
part="form-item"
|
|
4172
|
-
class="${m(
|
|
4172
|
+
class="${m(iu,this.className)}"
|
|
4173
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`
|
|
4174
4174
|
<label
|
|
4175
4175
|
part="form-label"
|
|
4176
4176
|
for="${this._field.name}"
|
|
4177
|
-
class="${m(
|
|
4177
|
+
class="${m(su,this.hasError&&"rtg-text-form-label-color-text-error",this.className)}"
|
|
4178
4178
|
></label>
|
|
4179
4179
|
`}};l([Lt({context:Ei}),c("design:type",typeof(rl=ze!==void 0&&ze)=="function"?rl:Object)],Di.prototype,"form",void 0),l([x(),c("design:type",Object)],Di.prototype,"hasError",void 0),Di=l([p("rtg-form-label")],Di);var il,Bi=class extends v{constructor(...e){super(...e),this.error=null,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof ye);)e=e.parentElement;return e}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.error=this.form.getError(this._field.name),this.unsubscribe=this.form.subscribe(()=>{this.error=this.form.getErrors()[this._field.name],this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return this.error?d`<p
|
|
4180
4180
|
id="${this._field.name}-message"
|
|
4181
|
-
class="${m(
|
|
4181
|
+
class="${m(ou,this.className)}"
|
|
4182
4182
|
>
|
|
4183
4183
|
${this.error}
|
|
4184
4184
|
</p>`:null}};l([Lt({context:Ei}),c("design:type",typeof(il=ze!==void 0&&ze)=="function"?il:Object)],Bi.prototype,"form",void 0),l([x(),c("design:type",Object)],Bi.prototype,"error",void 0),Bi=l([p("rtg-form-message")],Bi);var Mi=class extends _{constructor(...e){super(...e),this.form=new ze,this.onSubmit=()=>{},this.handleSubmit=t=>{t.preventDefault(),this.form.validateAll()&&(alert("form submitted successfully"),this.onSubmit(this.form.getValues()))}}createRenderRoot(){return this}get _formElement(){return this.querySelector("form[part=form-root]")}firstUpdated(){this.moveLightDomChildrenInto(this._formElement)}render(){return d`
|
|
@@ -4186,7 +4186,7 @@ body {
|
|
|
4186
4186
|
part="form-root"
|
|
4187
4187
|
id="rtg-form"
|
|
4188
4188
|
@submit=${this.handleSubmit}
|
|
4189
|
-
class="${m(
|
|
4189
|
+
class="${m(tu,this.className)}"
|
|
4190
4190
|
></form>
|
|
4191
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`
|
|
4192
4192
|
<div
|
|
@@ -4216,7 +4216,7 @@ body {
|
|
|
4216
4216
|
?data-border="${this.border}"
|
|
4217
4217
|
role="group"
|
|
4218
4218
|
></div>
|
|
4219
|
-
`}};l([a({type:String}),c("design:type",Object)],Vi.prototype,"align",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Vi.prototype,"border",void 0),Vi=l([p("rtg-input-group-addon")],Vi);var
|
|
4219
|
+
`}};l([a({type:String}),c("design:type",Object)],Vi.prototype,"align",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Vi.prototype,"border",void 0),Vi=l([p("rtg-input-group-addon")],Vi);var se=class extends v{constructor(...e){super(...e),this.variant="ghost",this.size="xs",this.type="button"}createRenderRoot(){return this}get _buttonSlot(){return this.querySelector('[data-slot="input-group-button"]')}firstUpdated(){let e=this._buttonSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`
|
|
4220
4220
|
<rtg-button
|
|
4221
4221
|
data-slot="input-group-button"
|
|
4222
4222
|
.variant=${this.variant}
|
|
@@ -4228,7 +4228,7 @@ body {
|
|
|
4228
4228
|
.target=${this.target}
|
|
4229
4229
|
.onclick=${this.onClick}
|
|
4230
4230
|
></rtg-button>
|
|
4231
|
-
`}};l([a({type:String}),c("design:type",Object)],
|
|
4231
|
+
`}};l([a({type:String}),c("design:type",Object)],se.prototype,"variant",void 0),l([a({type:String}),c("design:type",Object)],se.prototype,"size",void 0),l([a({type:String}),c("design:type",Object)],se.prototype,"type",void 0),l([a({type:Boolean}),c("design:type",Boolean)],se.prototype,"disabled",void 0),l([a({type:Boolean}),c("design:type",Boolean)],se.prototype,"invalid",void 0),l([a({type:String}),c("design:type",String)],se.prototype,"href",void 0),l([a({type:String}),c("design:type",Object)],se.prototype,"target",void 0),l([a({attribute:!1,type:Function}),c("design:type",Function)],se.prototype,"onClick",void 0),se=l([p("rtg-input-group-button")],se);var G=class extends v{constructor(...e){super(...e),this.id="",this.type="text",this._onClick=t=>{this.onClick&&this.onClick(t)},this._onInput=t=>{this.value=t.target.value,this.onInput&&this.onInput(t)},this._onChange=t=>{this.value=t.target.value,this.onChange&&this.onChange(t)},this._onFocus=t=>{this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:t.relatedTarget})),this.onFocus&&this.onFocus(t)},this._onBlur=t=>{this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:t.relatedTarget})),this.onBlur&&this.onBlur(t)}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id"))}firstUpdated(){this._inputId=this.id,this.removeAttribute("id")}render(){return d`
|
|
4232
4232
|
<input
|
|
4233
4233
|
data-slot="input"
|
|
4234
4234
|
accept=${this.type==="file"&&this.accept?this.accept:b}
|
|
@@ -4373,7 +4373,7 @@ body {
|
|
|
4373
4373
|
></div>
|
|
4374
4374
|
`}};l([a({type:Number}),c("design:type",Number)],Hi.prototype,"index",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Hi.prototype,"invalid",void 0),Hi=l([p("rtg-input-otp-slot")],Hi);var ll=class extends v{createRenderRoot(){return this}render(){return d`
|
|
4375
4375
|
<div data-slot="input-otp-separator" role="separator">
|
|
4376
|
-
${
|
|
4376
|
+
${Wh()}
|
|
4377
4377
|
</div>
|
|
4378
4378
|
`}};ll=l([p("rtg-input-otp-separator")],ll);var Pr=class extends v{constructor(...e){super(...e),this.variant="default",this.size="default"}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="item"]')}firstUpdated(){let e=this._rootSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return this.href?d`
|
|
4379
4379
|
<a
|
|
@@ -4389,7 +4389,7 @@ body {
|
|
|
4389
4389
|
data-variant="${this.variant}"
|
|
4390
4390
|
data-size="${this.size}"
|
|
4391
4391
|
></div>
|
|
4392
|
-
`}};l([a({type:String}),c("design:type",Object)],Pr.prototype,"variant",void 0),l([a({type:String}),c("design:type",Object)],Pr.prototype,"size",void 0),l([a({type:String}),c("design:type",String)],Pr.prototype,"href",void 0),l([a({type:String}),c("design:type",Object)],Pr.prototype,"target",void 0),Pr=l([p("rtg-item")],Pr);var dl=class extends v{createRenderRoot(){return this}get _actionsSlot(){return this.querySelector('[data-slot="item-actions"]')}firstUpdated(){let e=this._actionsSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="item-actions"></div>`}};dl=l([p("rtg-item-actions")],dl);var cl=class extends v{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="item-content"]')}firstUpdated(){let e=this._contentSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="item-content"></div>`}};cl=l([p("rtg-item-content")],cl);var
|
|
4392
|
+
`}};l([a({type:String}),c("design:type",Object)],Pr.prototype,"variant",void 0),l([a({type:String}),c("design:type",Object)],Pr.prototype,"size",void 0),l([a({type:String}),c("design:type",String)],Pr.prototype,"href",void 0),l([a({type:String}),c("design:type",Object)],Pr.prototype,"target",void 0),Pr=l([p("rtg-item")],Pr);var dl=class extends v{createRenderRoot(){return this}get _actionsSlot(){return this.querySelector('[data-slot="item-actions"]')}firstUpdated(){let e=this._actionsSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="item-actions"></div>`}};dl=l([p("rtg-item-actions")],dl);var cl=class extends v{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="item-content"]')}firstUpdated(){let e=this._contentSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="item-content"></div>`}};cl=l([p("rtg-item-content")],cl);var hl=class extends v{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="item-description"]')}firstUpdated(){let e=this._descriptionSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<p data-slot="item-description"></p>`}};hl=l([p("rtg-item-description")],hl);var ul=class extends v{createRenderRoot(){return this}get _footerSlot(){return this.querySelector('[data-slot="item-footer"]')}firstUpdated(){let e=this._footerSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="item-footer"></div>`}};ul=l([p("rtg-item-footer")],ul);var pl=class extends v{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="item-group"]')}firstUpdated(){let e=this._groupSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="item-group" role="list"></div>`}};pl=l([p("rtg-item-group")],pl);var gl=class extends v{createRenderRoot(){return this}get _headerSlot(){return this.querySelector('[data-slot="item-header"]')}firstUpdated(){let e=this._headerSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<div data-slot="item-header"></div>`}};gl=l([p("rtg-item-header")],gl);var Ro=class extends v{constructor(...e){super(...e),this.variant="default"}createRenderRoot(){return this}get _mediaSlot(){return this.querySelector('[data-slot="item-media"]')}firstUpdated(){let e=this._mediaSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`
|
|
4393
4393
|
<div data-slot="item-media" data-variant="${this.variant}"></div>
|
|
4394
4394
|
`}};l([a({type:String}),c("design:type",Object)],Ro.prototype,"variant",void 0),Ro=l([p("rtg-item-media")],Ro);var ml=class extends v{createRenderRoot(){return this}get _separatorSlot(){return this.querySelector('[data-slot="item-separator"]')}firstUpdated(){let e=this._separatorSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`
|
|
4395
4395
|
<rtg-separator
|
|
@@ -4499,7 +4499,7 @@ body {
|
|
|
4499
4499
|
id="${this.identifier}"
|
|
4500
4500
|
aria-hidden="${this.hidden}"
|
|
4501
4501
|
></div>
|
|
4502
|
-
`}`}},as=cr,cr._counter=0,cr);l([a({type:String}),c("design:type",Object)],Ze.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Ze.prototype,"_hidden",void 0),l([a({type:Boolean}),c("design:type",Object)],Ze.prototype,"disabled",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],Ze.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],Ze.prototype,"selected",void 0),Ze=as=l([p("rtg-menubar-item")],Ze);var ls,
|
|
4502
|
+
`}`}},as=cr,cr._counter=0,cr);l([a({type:String}),c("design:type",Object)],Ze.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Ze.prototype,"_hidden",void 0),l([a({type:Boolean}),c("design:type",Object)],Ze.prototype,"disabled",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],Ze.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],Ze.prototype,"selected",void 0),Ze=as=l([p("rtg-menubar-item")],Ze);var ls,hr,Ce=(hr=class extends _{constructor(...t){super(...t),this._id="",this._hidden="",this.selected=!1,this.checked=!1,this.disabled=!1}get _containerElement(){return this.querySelector("div[part=menubar-radio-item]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}get identifier(){var r,i;if(this._id!=="")return this._id;let t=(i=(r=this.parentElement)==null?void 0:r.shadowRoot)==null?void 0:i.querySelector("div[rtgcmd-group]");return t?this._id=`${t.getAttribute("id")}li${ls._counter++}`:this._id=`rtgcmdrxgxli${ls._counter++}`,this._id}get value(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}handleMouseEvent(t){(t.type==="mouseover"||t.type==="focus")&&(this.selected=!0),t.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}render(){return d`
|
|
4503
4503
|
<div
|
|
4504
4504
|
part="menubar-radio-item"
|
|
4505
4505
|
class=${m(yt.radioItem.base,this.disabled&&"rtg-opacity-menubar-item-opacity-disabled rtg-pointer-events-none",this.className)}
|
|
@@ -4532,7 +4532,7 @@ body {
|
|
|
4532
4532
|
</svg>`:b}
|
|
4533
4533
|
</span>
|
|
4534
4534
|
</div>
|
|
4535
|
-
`}},ls=
|
|
4535
|
+
`}},ls=hr,hr._counter=0,hr);l([a({type:String}),c("design:type",Object)],Ce.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Ce.prototype,"_hidden",void 0),l([a({attribute:"data-value",type:String}),c("design:type",void 0),c("design:paramtypes",[])],Ce.prototype,"value",null),l([a({type:Boolean}),c("design:type",Object)],Ce.prototype,"selected",void 0),l([a({type:Boolean}),c("design:type",Object)],Ce.prototype,"checked",void 0),l([a({type:Boolean}),c("design:type",Object)],Ce.prototype,"disabled",void 0),Ce=ls=l([p("rtg-menubar-radio-item")],Ce);var ds,ur,Gi=(ur=class extends _{constructor(...t){super(...t),this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-separator]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}get identifier(){var r;if(this._id!=="")return this._id;let t=(r=this.parentElement)==null?void 0:r.querySelector("div[rtgcmd-list]");return t?this._id=`${t.getAttribute("id")}s${ds._counter++}`:this._id=`rtgcmdrxlxs${ds._counter++}`,this._id}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`${this._hidden==="true"?b:d`
|
|
4536
4536
|
<div
|
|
4537
4537
|
class=${m(yt.separator,this.className)}
|
|
4538
4538
|
id="${this.identifier}"
|
|
@@ -4540,7 +4540,7 @@ body {
|
|
|
4540
4540
|
part="menubar-separator"
|
|
4541
4541
|
rtgcmd-separator
|
|
4542
4542
|
></div>
|
|
4543
|
-
`}`}},ds=
|
|
4543
|
+
`}`}},ds=ur,ur._counter=0,ur);l([a({type:String}),c("design:type",Object)],Gi.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Gi.prototype,"_hidden",void 0),Gi=ds=l([p("rtg-menubar-separator")],Gi);var yl=class extends _{get _containerElement(){return this.querySelector("span[part=menubar-shortcut]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this.classList=m(yt.shortcut),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4544
4544
|
<span
|
|
4545
4545
|
class=${m(yt.shortcut,this.className)}
|
|
4546
4546
|
part="menubar-shortcut"
|
|
@@ -4641,18 +4641,18 @@ body {
|
|
|
4641
4641
|
dir="ltr"
|
|
4642
4642
|
class="${m(yr.menu,this.className)}"
|
|
4643
4643
|
></nav>
|
|
4644
|
-
`}};$l=l([p("rtg-navigation-menu")],$l);var
|
|
4644
|
+
`}};$l=l([p("rtg-navigation-menu")],$l);var Jt={root:["rtg-flex","rtg-justify-center","rtg-mx-auto","rtg-w-full"],content:["rtg-flex","rtg-flex-row rtg-gap-pagination-content-space-gap rtg-items-center"],item:[""],link:gi,previous:{base:["rtg-gap-pagination-previous-space-gap","rtg-px-pagination-previous-space-px sm:rtg-pl-pagination-previous-space-px"],span:["rtg-hidden sm:rtg-block"]},next:{base:["rtg-gap-pagination-next-space-gap","rtg-px-pagination-next-space-px sm:rtg-pr-pagination-next-space-px"],span:["rtg-hidden sm:rtg-block"]},ellipsis:{base:["rtg-flex rtg-justify-center rtg-items-center","rtg-size-pagination-ellipsis-space-size"],icon:["rtg-size-pagination-ellipsis-icon-space-size"],span:["rtg-sr-only"]}},Cl=class extends _{get _containerElement(){return this.querySelector("ul[part=pagination-content]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4645
4645
|
<ul
|
|
4646
4646
|
data-slot="pagination-content"
|
|
4647
4647
|
part="pagination-content"
|
|
4648
|
-
class=${m(
|
|
4648
|
+
class=${m(Jt.content,this.className)}
|
|
4649
4649
|
></ul>
|
|
4650
4650
|
`}};Cl=l([p("rtg-pagination-content")],Cl);var El=class extends _{get _containerElement(){return this.querySelector("span[part=pagination-ellipsis]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4651
4651
|
<span
|
|
4652
4652
|
aria-hidden
|
|
4653
4653
|
data-slot="pagination-ellipsis"
|
|
4654
4654
|
part="pagination-ellipsis"
|
|
4655
|
-
class=${m(
|
|
4655
|
+
class=${m(Jt.ellipsis.base,this.className)}
|
|
4656
4656
|
>
|
|
4657
4657
|
<svg
|
|
4658
4658
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4664,14 +4664,14 @@ body {
|
|
|
4664
4664
|
stroke-width="2"
|
|
4665
4665
|
stroke-linecap="round"
|
|
4666
4666
|
stroke-linejoin="round"
|
|
4667
|
-
class=${m(
|
|
4667
|
+
class=${m(Jt.ellipsis.icon,"lucide lucide-ellipsis-icon lucide-ellipsis")}
|
|
4668
4668
|
>
|
|
4669
4669
|
<circle cx="12" cy="12" r="1" />
|
|
4670
4670
|
<circle cx="19" cy="12" r="1" />
|
|
4671
4671
|
<circle cx="5" cy="12" r="1" />
|
|
4672
4672
|
</svg>
|
|
4673
4673
|
|
|
4674
|
-
<span class=${m(
|
|
4674
|
+
<span class=${m(Jt.ellipsis.span)}>More pages</span>
|
|
4675
4675
|
</span>
|
|
4676
4676
|
`}};El=l([p("rtg-pagination-ellipsis")],El);var kl,tr=class extends _{constructor(...e){super(...e),this.state="close",this.isActive=!1,this.size="icon",this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("a[part=pagination-link]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){super.updated(e),this.state==="open"?this.isActive=!0:this.isActive=!1}render(){return d`
|
|
4677
4677
|
<a
|
|
@@ -4681,14 +4681,14 @@ body {
|
|
|
4681
4681
|
part="pagination-link"
|
|
4682
4682
|
id="${this.id}"
|
|
4683
4683
|
href="${this.href}"
|
|
4684
|
-
class=${m(
|
|
4684
|
+
class=${m(Jt.link({variant:this.isActive?"outline":"ghost",size:this.size}),this.className)}
|
|
4685
4685
|
>
|
|
4686
4686
|
</a>
|
|
4687
4687
|
`}};l([a({attribute:"data-state",type:String}),c("design:type",Object)],tr.prototype,"state",void 0),l([a({type:Boolean}),c("design:type",Boolean)],tr.prototype,"isActive",void 0),l([a({type:String}),c("design:type",typeof(kl=typeof Exclude<"u"&&Exclude)=="function"?kl:Object)],tr.prototype,"size",void 0),l([a({type:String}),c("design:type",String)],tr.prototype,"href",void 0),tr=l([p("rtg-pagination-link")],tr);var Wi=class extends _{constructor(...e){super(...e),this.uniqueIds=[],this.isActive=!1}get _containerElement(){return this.querySelector("li[part=pagination-item]")}get _content(){var t;let e=(t=this._containerElement)==null?void 0:t.children;if(e){for(let r=0;r<e.length;r++)if(e[r]instanceof tr)return e[r]}return null}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isActive?"open":"close")}handleClick(e){e.stopPropagation(),document.querySelectorAll("rtg-pagination-item").forEach(t=>{t!==this&&(t.isActive=!1)}),this.isActive=!this.isActive}firstUpdated(){var r;this.moveLightDomChildrenInto(this._containerElement);let e=(r=this._containerElement)==null?void 0:r.children,t=[];for(let i=0;i<e.length-1;i+=1){let s=e[i],o=crypto.randomUUID();t.push(o),s.dataset.pairId=o}this.uniqueIds=t,this._content&&this._content.removeEventListener("unique-ids-generated",()=>{this.requestUpdate()})}raiseEvent(){let e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}createRenderRoot(){return this}render(){return d`
|
|
4688
4688
|
<li
|
|
4689
4689
|
data-slot="pagination-item"
|
|
4690
4690
|
part="pagination-item"
|
|
4691
|
-
class=${m(
|
|
4691
|
+
class=${m(Jt.item,this.className)}
|
|
4692
4692
|
@click="${this.handleClick}"
|
|
4693
4693
|
></li>
|
|
4694
4694
|
`}};l([x(),c("design:type",Array)],Wi.prototype,"uniqueIds",void 0),l([a({type:Boolean}),c("design:type",Boolean)],Wi.prototype,"isActive",void 0),Wi=l([p("rtg-pagination-item")],Wi);var Oo=class extends _{constructor(...e){super(...e),this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("div[part=pagination-next]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
@@ -4696,9 +4696,9 @@ body {
|
|
|
4696
4696
|
aria-label="Go to next page"
|
|
4697
4697
|
size="default"
|
|
4698
4698
|
href=${this.href}
|
|
4699
|
-
class=${m(
|
|
4699
|
+
class=${m(Jt.next.base,this.className)}
|
|
4700
4700
|
>
|
|
4701
|
-
<span class=${m(
|
|
4701
|
+
<span class=${m(Jt.next.span)}>Next</span>
|
|
4702
4702
|
|
|
4703
4703
|
<svg
|
|
4704
4704
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4722,7 +4722,7 @@ body {
|
|
|
4722
4722
|
aria-label="Go to previous page"
|
|
4723
4723
|
size="default"
|
|
4724
4724
|
href=${this.href}
|
|
4725
|
-
class=${m(
|
|
4725
|
+
class=${m(Jt.previous.base,this.className)}
|
|
4726
4726
|
>
|
|
4727
4727
|
<svg
|
|
4728
4728
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4739,7 +4739,7 @@ body {
|
|
|
4739
4739
|
<path d="m15 18-6-6 6-6" />
|
|
4740
4740
|
</svg>
|
|
4741
4741
|
|
|
4742
|
-
<span class=${m(
|
|
4742
|
+
<span class=${m(Jt.previous.span)}>Previous</span>
|
|
4743
4743
|
|
|
4744
4744
|
<div part="pagination-previous"></div>
|
|
4745
4745
|
</rtg-pagination-link>
|
|
@@ -4749,7 +4749,7 @@ body {
|
|
|
4749
4749
|
aria-label="pagination"
|
|
4750
4750
|
data-slot="pagination"
|
|
4751
4751
|
part="pagination"
|
|
4752
|
-
class=${m(
|
|
4752
|
+
class=${m(Jt.root,this.className)}
|
|
4753
4753
|
></nav>
|
|
4754
4754
|
`}};Rl=l([p("rtg-pagination")],Rl);var lt=class extends v{constructor(...e){super(...e),this.id="",this._showPassword=!1,this._handleToggle=()=>{this._showPassword=!this._showPassword}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id"))}firstUpdated(){this._inputId=this.id,this.removeAttribute("id")}_renderIcon(){return this._showPassword?d`
|
|
4755
4755
|
<svg
|
|
@@ -4855,7 +4855,7 @@ body {
|
|
|
4855
4855
|
style="transform: translateX(-${100-(this.value||0)}%);"
|
|
4856
4856
|
></div>
|
|
4857
4857
|
</div>
|
|
4858
|
-
`}};l([a({type:Number}),c("design:type",Number)],Po.prototype,"value",void 0),Po=l([p("rtg-progress")],Po);var ci={root:["rtg-grid","rtg-gap-radio-group-space-gap"],item:{wrapper:["rtg-inline-flex","rtg-justify-center rtg-items-center","rtg-size-radio-group-item-space-size"],item:["rtg-aspect-square","rtg-shrink-0","rtg-size-radio-group-item-space-size","rtg-bg-radio-group-item-color-bg","rtg-rounded-radio-group-item-radius rtg-border-radio-group-item-width-border rtg-border-radio-group-item-color-border rtg-outline-none","rtg-transition-[color,box-shadow]","focus-visible:rtg-border-radio-group-item-color-border-focus focus-visible:rtg-ring-radio-group-item-width-ring-focus focus-visible:rtg-ring-radio-group-item-color-ring-focus","disabled:rtg-opacity-radio-group-item-opacity-disabled disabled:rtg-cursor-not-allowed","aria-invalid:rtg-border-radio-group-item-color-border-invalid aria-invalid:rtg-ring-radio-group-item-width-ring-invalid aria-invalid:rtg-ring-radio-group-item-color-ring-invalid"],indicator:["rtg-flex rtg-relative","rtg-justify-center rtg-items-center"],icon:["rtg-absolute rtg-top-1/2 rtg-left-1/2","rtg-size-radio-group-indicator-space-size","rtg--translate-x-1/2 rtg--translate-y-1/2","rtg-fill-radio-group-indicator-color-fill"]}},
|
|
4858
|
+
`}};l([a({type:Number}),c("design:type",Number)],Po.prototype,"value",void 0),Po=l([p("rtg-progress")],Po);var ci={root:["rtg-grid","rtg-gap-radio-group-space-gap"],item:{wrapper:["rtg-inline-flex","rtg-justify-center rtg-items-center","rtg-size-radio-group-item-space-size"],item:["rtg-aspect-square","rtg-shrink-0","rtg-size-radio-group-item-space-size","rtg-bg-radio-group-item-color-bg","rtg-rounded-radio-group-item-radius rtg-border-radio-group-item-width-border rtg-border-radio-group-item-color-border rtg-outline-none","rtg-transition-[color,box-shadow]","focus-visible:rtg-border-radio-group-item-color-border-focus focus-visible:rtg-ring-radio-group-item-width-ring-focus focus-visible:rtg-ring-radio-group-item-color-ring-focus","disabled:rtg-opacity-radio-group-item-opacity-disabled disabled:rtg-cursor-not-allowed","aria-invalid:rtg-border-radio-group-item-color-border-invalid aria-invalid:rtg-ring-radio-group-item-width-ring-invalid aria-invalid:rtg-ring-radio-group-item-color-ring-invalid"],indicator:["rtg-flex rtg-relative","rtg-justify-center rtg-items-center"],icon:["rtg-absolute rtg-top-1/2 rtg-left-1/2","rtg-size-radio-group-indicator-space-size","rtg--translate-x-1/2 rtg--translate-y-1/2","rtg-fill-radio-group-indicator-color-fill"]}},au="unChecked",me=class extends _{constructor(...e){super(...e),this.checked=!1,this.tabindex=0,this.value="",this.id="radio-group-item",this.state=au,this.disabled=!1,this.invalid=!1}get _containerElement(){return this.querySelector("button[part=radio-group-item]")}_onClick(e){e.defaultPrevented||this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}createRenderRoot(){return this.classList=m(ci.item.wrapper),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return d`
|
|
4859
4859
|
<button
|
|
4860
4860
|
type="button"
|
|
4861
4861
|
part="radio-group-item"
|
|
@@ -4896,11 +4896,11 @@ body {
|
|
|
4896
4896
|
part="radio-group"
|
|
4897
4897
|
class=${m(ci.root,this.className)}
|
|
4898
4898
|
></div>
|
|
4899
|
-
`}};l([a({type:String}),c("design:type",Object)],Fo.prototype,"defaultValue",void 0),Fo=l([p("rtg-radio-group")],Fo);var
|
|
4899
|
+
`}};l([a({type:String}),c("design:type",Object)],Fo.prototype,"defaultValue",void 0),Fo=l([p("rtg-radio-group")],Fo);var lu=["rtg-relative","rtg-border rtg-border-scrollarea-color-border","rtg-bg-scrollarea-color-bg"],Ol,To=class extends _{createRenderRoot(){return this}firstUpdated(){this.moveLightDomChildrenInto(this.viewportEl)}render(){return d`
|
|
4900
4900
|
<div
|
|
4901
4901
|
dir="ltr"
|
|
4902
4902
|
data-slot="scroll-area"
|
|
4903
|
-
class=${m(
|
|
4903
|
+
class=${m(lu,this.className)}
|
|
4904
4904
|
>
|
|
4905
4905
|
<style>
|
|
4906
4906
|
[data-radix-scroll-area-viewport] {
|
|
@@ -4933,16 +4933,16 @@ body {
|
|
|
4933
4933
|
style="overflow: hidden scroll;"
|
|
4934
4934
|
></div>
|
|
4935
4935
|
</div>
|
|
4936
|
-
`}};l([Ci("[data-radix-scroll-area-viewport]"),c("design:type",typeof(Ol=typeof HTMLElement<"u"&&HTMLElement)=="function"?Ol:Object)],To.prototype,"viewportEl",void 0),To=l([p("rtg-scroll-area")],To);var
|
|
4936
|
+
`}};l([Ci("[data-radix-scroll-area-viewport]"),c("design:type",typeof(Ol=typeof HTMLElement<"u"&&HTMLElement)=="function"?Ol:Object)],To.prototype,"viewportEl",void 0),To=l([p("rtg-scroll-area")],To);var du=class{constructor(){this.state={isOpen:!1,selectedValue:"",selectedText:""},this.listeners=new Set}subscribe(e){this.listeners.add(e)}unsubscribe(e){this.listeners.delete(e)}notify(){this.listeners.forEach(e=>e())}get isOpen(){return this.state.isOpen}get selectedValue(){return this.state.selectedValue}get selectedText(){return this.state.selectedText}open(){this.state.isOpen||(this.state.isOpen=!0,this.notify())}close(){this.state.isOpen&&(this.state.isOpen=!1,this.notify())}toggle(){this.state.isOpen=!this.state.isOpen,this.notify()}select(e,t,r){this.state.selectedValue=e,this.state.selectedText=t,this.state.isOpen=!1,this.notify()}},Qt={root:[""],value:["rtg-flex","rtg-gap-select-value-space-gap rtg-items-center","rtg-line-clamp-1"],trigger:{trigger:["rtg-flex","rtg-gap-select-trigger-space-gap rtg-justify-between rtg-items-center","rtg-px-select-trigger-space-px rtg-py-select-trigger-space-py","rtg-w-full rtg-h-select-trigger-space-h","rtg-text-select-trigger-font rtg-whitespace-nowrap","rtg-bg-select-trigger-color-bg","rtg-rounded-select-trigger-radius rtg-border-select-trigger-width-border rtg-border-select-trigger-color-border rtg-outline-none","rtg-transition-[color,box-shadow]","hover:rtg-bg-select-trigger-color-bg-hover","focus-visible:rtg-border-select-trigger-color-border-focus focus-visible:rtg-ring-select-trigger-width-ring-focus focus-visible:rtg-ring-select-trigger-color-ring-focus","disabled:rtg-opacity-select-trigger-opacity-disabled disabled:rtg-cursor-not-allowed","aria-invalid:rtg-border-select-trigger-color-border-invalid aria-invalid:rtg-ring-select-trigger-width-ring-invalid aria-invalid:rtg-ring-select-trigger-color-ring-invalid","data-[placeholder]:rtg-text-select-trigger-placeholder-color-text"],icon:["rtg-shrink-0","rtg-size-select-trigger-icon-space-size","rtg-text-select-trigger-icon-color-text","rtg-opacity-select-trigger-icon-opacity","rtg-pointer-events-none"]},content:{content:["rtg-absolute rtg-overflow-x-hidden rtg-overflow-y-auto rtg-z-50","rtg-w-fit","rtg-text-select-content-color-text","rtg-bg-select-content-color-bg","rtg-rounded-select-content-radius rtg-border-select-content-width-border rtg-border-select-content-color-border","rtg-shadow-select-content-shadow","rtg-slide-in-from-top-2","rtg-translate-y-1","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"],viewport:["rtg-p-select-content-viewport-space-p","rtg-w-full","rtg-scroll-my-1"]},label:["rtg-px-select-label-space-px rtg-py-select-label-space-py","rtg-text-select-label-font rtg-text-select-label-color-text"],item:{item:["rtg-flex rtg-relative","rtg-gap-select-item-space-gap rtg-items-center","rtg-pl-select-item-space-pl rtg-pr-select-item-space-pr rtg-py-select-item-space-py","rtg-w-full","rtg-text-select-item-font","rtg-rounded-select-item-radius rtg-outline-hidden","rtg-cursor-default rtg-select-none","hover:rtg-text-select-item-color-text-hover hover:rtg-bg-select-item-color-bg-hover","focus:rtg-text-select-item-color-text-focus focus:rtg-bg-select-item-color-bg-focus","data-[disabled]:rtg-opacity-select-item-opacity-disabled data-[disabled]:rtg-pointer-events-none"],indicator:["rtg-flex rtg-absolute rtg-right-2","rtg-justify-center rtg-items-center","rtg-size-select-item-indicator-space-size"],icon:["rtg-shrink-0","rtg-size-select-item-icon-space-size","rtg-text-select-item-icon-color-text","rtg-pointer-events-none"]},separator:["rtg-mx-select-separator-space-mx rtg-my-select-separator-space-my","rtg-h-select-separator-space-h","rtg-bg-select-separator-color-bg","rtg-pointer-events-none"]},Lo=class extends _{constructor(...e){super(...e),this.focusedIndex=0,this.childrenArray=[],this.onStoreChange=()=>{let t=this._containerElement;t&&(t.style.display=this._select.selectStore.isOpen?"block":"none",this._contentDiv&&(this._contentDiv.style.display=this._select.selectStore.isOpen?"block":"none",this._select.selectStore.isOpen&&requestAnimationFrame(()=>{this.updateTriggerWidth()}))),this._select.selectStore.isOpen&&this._select.selectStore.selectedValue&&(this.focusedIndex=this.childrenArray.findIndex(r=>r.value===this._select.selectStore.selectedValue)),this.updateFocusedItem(),this.requestUpdate()},this.handleKeyDown=t=>{var r;if(this._select.selectStore.isOpen)switch(t.preventDefault(),t.key){case"ArrowDown":this.focusedIndex=(this.focusedIndex+1)%this.childrenArray.length,this.updateFocusedItem();break;case"ArrowUp":this.focusedIndex=(this.focusedIndex-1+this.childrenArray.length)%this.childrenArray.length,this.updateFocusedItem();break;case"Enter":let i=this.childrenArray[this.focusedIndex],s=i.value,o=((r=i.textContent)==null?void 0:r.trim())||"";this._select.selectStore.select(s,o);break}}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof Hr);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange),document.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback()}getTriggerButton(){let e=this._select;return e?e.querySelector("button[part=select-trigger]"):null}updateTriggerWidth(){let e=this.getTriggerButton(),t=this._contentDiv;if(e&&t){let r=e.offsetWidth;if(r>0){let i=Math.max(128,r);t.style.setProperty("--select-trigger-width",`${r}px`),t.style.setProperty("min-width",`${i}px`)}}}get _containerElement(){return this.querySelector("div[part=select-viewport]")}get _contentDiv(){return this.querySelector("div[data-slot=select-content]")}firstUpdated(){let e=Array.from(this.children).filter(t=>t.tagName.toLowerCase()==="rtg-select-item");this.childrenArray=e,e.forEach((t,r)=>{t.tabIndex=r,t.selectItemIndex=r,t.isFocus=r===this.focusedIndex||t.value===this._select.selectStore.selectedValue,t.addEventListener("mouseover",i=>this.handleMouseOver(i,r))}),this.moveLightDomChildrenInto(this._containerElement),requestAnimationFrame(()=>{this.updateTriggerWidth()})}updateFocusedItem(){this.childrenArray.forEach((e,t)=>{var r;e.isFocus=t===this.focusedIndex,(r=e.requestUpdate)==null||r.call(e)})}handleMouseOver(e,t){e.preventDefault(),this.focusedIndex=t}createRenderRoot(){return this}render(){return d`
|
|
4937
4937
|
<div
|
|
4938
4938
|
part="select-group"
|
|
4939
4939
|
data-slot="select-content"
|
|
4940
|
-
class="${m(
|
|
4940
|
+
class="${m(Qt.content.content,this.className)}"
|
|
4941
4941
|
style=${"min-width: 128px; display: none;"}
|
|
4942
4942
|
>
|
|
4943
4943
|
<div
|
|
4944
4944
|
part="select-viewport"
|
|
4945
|
-
class=${m(
|
|
4945
|
+
class=${m(Qt.content.viewport)}
|
|
4946
4946
|
></div>
|
|
4947
4947
|
</div>
|
|
4948
4948
|
`}};l([x(),c("design:type",Object)],Lo.prototype,"focusedIndex",void 0),Lo=l([p("rtg-select-group")],Lo);var Ee=class extends _{constructor(...e){super(...e),this.value="",this.isSelected=!1,this.isFocus=!1,this.selectItemIndex=-1,this.onSelect=(t,r)=>{},this.class="",this._onStoreChange=()=>{var t,r;this.isSelected=this.value.toLowerCase()===((r=(t=this._select.selectStore.selectedValue)==null?void 0:t.toLowerCase)==null?void 0:r.call(t)),this.requestUpdate()},this.handleClick=t=>{t.stopPropagation();let r=this.getTextContent();this._select.selectStore.select(this.value,r),this.onSelect(this.value,this.selectItemIndex),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof Hr);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this._onStoreChange)}disconnectedCallback(){this._select.selectStore.unsubscribe(this._onStoreChange),super.disconnectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get _containerElement(){return this.querySelector("div[part=select-item-container]")}createRenderRoot(){return this}getTextContent(){var i,s;let e=this._containerElement;if(e&&e.textContent)return e.textContent.trim();let t=this.querySelector("[part=select-item-indicator]"),r=this.cloneNode(!0);return t&&((i=r.querySelector("[part=select-item-indicator]"))==null||i.remove()),((s=r.textContent)==null?void 0:s.trim())||""}render(){return d`
|
|
@@ -4950,7 +4950,7 @@ body {
|
|
|
4950
4950
|
${wt(this.getFilteredAttributes())}
|
|
4951
4951
|
part="select-item"
|
|
4952
4952
|
@click=${this.handleClick}
|
|
4953
|
-
class=${m(
|
|
4953
|
+
class=${m(Qt.item.item,this.className)}
|
|
4954
4954
|
data-hs-select-value=${this.value}
|
|
4955
4955
|
aria-selected="${this.isSelected}"
|
|
4956
4956
|
data-selected="${this.isSelected}"
|
|
@@ -4958,7 +4958,7 @@ body {
|
|
|
4958
4958
|
${this.isSelected?d`
|
|
4959
4959
|
<span
|
|
4960
4960
|
part="select-item-indicator"
|
|
4961
|
-
class=${m(
|
|
4961
|
+
class=${m(Qt.item.indicator)}
|
|
4962
4962
|
>
|
|
4963
4963
|
<svg
|
|
4964
4964
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -4970,7 +4970,7 @@ body {
|
|
|
4970
4970
|
stroke-width="2"
|
|
4971
4971
|
stroke-linecap="round"
|
|
4972
4972
|
stroke-linejoin="round"
|
|
4973
|
-
class=${m(
|
|
4973
|
+
class=${m(Qt.item.icon,"lucide lucide-check-icon lucide-check")}
|
|
4974
4974
|
>
|
|
4975
4975
|
<path d="M20 6 9 17l-5-5" />
|
|
4976
4976
|
</svg>
|
|
@@ -4982,7 +4982,7 @@ body {
|
|
|
4982
4982
|
`}};l([a(),c("design:type",Object)],Ee.prototype,"value",void 0),l([a(),c("design:type",Object)],Ee.prototype,"isSelected",void 0),l([a(),c("design:type",Object)],Ee.prototype,"isFocus",void 0),l([a(),c("design:type",Object)],Ee.prototype,"selectItemIndex",void 0),l([a({type:Function}),c("design:type",Object)],Ee.prototype,"onSelect",void 0),l([a(),c("design:type",Object)],Ee.prototype,"class",void 0),Ee=l([p("rtg-select-item")],Ee);var Al=class extends _{get _containerElement(){return this.querySelector("div[part=select-label]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return d`
|
|
4983
4983
|
<div
|
|
4984
4984
|
part="select-label"
|
|
4985
|
-
class=${m(
|
|
4985
|
+
class=${m(Qt.label,this.className)}
|
|
4986
4986
|
></div>
|
|
4987
4987
|
`}};Al=l([p("rtg-select-label")],Al);var Ki=class extends _{constructor(...e){super(...e),this.state=pn,this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=select-list]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return d`
|
|
4988
4988
|
<div
|
|
@@ -4997,14 +4997,14 @@ body {
|
|
|
4997
4997
|
rtgcmd-separator
|
|
4998
4998
|
part="select-separator"
|
|
4999
4999
|
role="separator"
|
|
5000
|
-
class=${m(
|
|
5000
|
+
class=${m(Qt.separator,this.className)}
|
|
5001
5001
|
></div>
|
|
5002
5002
|
`}};l([a({type:String}),c("design:type",Object)],Yi.prototype,"_id",void 0),l([a({attribute:"aria-hidden",type:String}),c("design:type",Object)],Yi.prototype,"_hidden",void 0),Yi=l([p("rtg-select-separator")],Yi);var Pl=class extends _{constructor(...e){super(...e),this.onStoreChange=()=>{this.requestUpdate()},this.handleClick=t=>{t.stopPropagation(),this._select&&this._select.selectStore.toggle()}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof Hr);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),this.classObserver=new MutationObserver(()=>{this.requestUpdate()}),this.classObserver.observe(this,{attributes:!0,attributeFilter:["class"]})}disconnectedCallback(){var e;this._select.selectStore.unsubscribe(this.onStoreChange),(e=this.classObserver)==null||e.disconnect()}get _containerElement(){return this.querySelector("span[part=select-trigger-container]")}firstUpdated(e){var t;super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),(t=this._containerElement)==null||t.addEventListener("click",this.handleClick)}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}getClassAttribute(){let e=this.getAttribute("class")||"",t=this.customClass||"",r=this.className||"";return e||t||r||""}filterConflictingWidthClasses(e,t){let r=/rtg-w-[\w-[\]]+/;return r.test(t)?e.map(i=>i.split(/\s+/).filter(s=>!r.test(s)).join(" ")):e}render(){let e=this.getClassAttribute();return d`
|
|
5003
5003
|
<button
|
|
5004
5004
|
type="button"
|
|
5005
5005
|
part="select-trigger"
|
|
5006
5006
|
role="tab"
|
|
5007
|
-
class=${m(...this.filterConflictingWidthClasses(
|
|
5007
|
+
class=${m(...this.filterConflictingWidthClasses(Qt.trigger.trigger,e),e)}
|
|
5008
5008
|
tabindex="-1"
|
|
5009
5009
|
data-orientation="horizontal"
|
|
5010
5010
|
data-radix-collection-item=""
|
|
@@ -5023,22 +5023,22 @@ body {
|
|
|
5023
5023
|
stroke-width="2"
|
|
5024
5024
|
stroke-linecap="round"
|
|
5025
5025
|
stroke-linejoin="round"
|
|
5026
|
-
class=${m(
|
|
5026
|
+
class=${m(Qt.trigger.icon,"lucide lucide-chevron-down-icon lucide-chevron-down")}
|
|
5027
5027
|
>
|
|
5028
5028
|
<path d="m6 9 6 6 6-6" />
|
|
5029
5029
|
</svg>
|
|
5030
5030
|
</button>
|
|
5031
5031
|
`}};Pl=l([p("rtg-select-trigger")],Pl);var No=class extends _{constructor(...e){super(...e),this.placeholder="select a value",this.onStoreChange=()=>{this.requestUpdate()},this.renderLabel=()=>{if(this._select&&this._select.selectStore.selectedValue.length>0){let t=this._select.selectStore.selectedText;return t.length>0?t:this._select.selectStore.selectedValue}return this.placeholder}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof Hr);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("clicked-select-item",()=>{this.requestUpdate()})}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange)}firstUpdated(e){super.firstUpdated(e)}createRenderRoot(){return this}render(){return d`
|
|
5032
|
-
<span part="select-value" class=${m(
|
|
5032
|
+
<span part="select-value" class=${m(Qt.value,this.className)}>
|
|
5033
5033
|
${this.renderLabel()}
|
|
5034
5034
|
</span>
|
|
5035
|
-
`}};l([a({type:String}),c("design:type",Object)],No.prototype,"placeholder",void 0),No=l([p("rtg-select-value")],No);var Hr=class extends _{constructor(...e){super(...e),this.uuid=dn(),this.selectStore=new
|
|
5035
|
+
`}};l([a({type:String}),c("design:type",Object)],No.prototype,"placeholder",void 0),No=l([p("rtg-select-value")],No);var Hr=class extends _{constructor(...e){super(...e),this.uuid=dn(),this.selectStore=new du,this.handleClickOutside=t=>{let r=this.querySelector("[data-select-uuid]"),i=t.target;r!=null&&r.contains(i)||this.selectStore.close()}}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}firstUpdated(){let e=this.querySelector("div[part=select]");this.moveLightDomChildrenInto(e)}createRenderRoot(){return this}render(){return d`
|
|
5036
5036
|
<div
|
|
5037
5037
|
part="select"
|
|
5038
5038
|
data-select-uuid=${this.uuid}
|
|
5039
|
-
class=${m(
|
|
5039
|
+
class=${m(Qt.root,this.className)}
|
|
5040
5040
|
></div>
|
|
5041
|
-
`}};Hr=l([p("rtg-select")],Hr);var
|
|
5041
|
+
`}};Hr=l([p("rtg-select")],Hr);var cu="rtg-bg-skeleton-color-bg rtg-animate-skeleton-animate rtg-rounded-skeleton-radius",Fl=class extends _{createRenderRoot(){return this}render(){return d` <div class=${m(cu,this.className)}></div> `}};Fl=l([p("rtg-skeleton")],Fl);var zo=class extends v{constructor(...e){super(...e),this.variant="circle"}createRenderRoot(){return this}render(){return this.variant==="basic"?d`
|
|
5042
5042
|
<svg
|
|
5043
5043
|
data-slot="spinner"
|
|
5044
5044
|
data-variant="basic"
|
|
@@ -5176,7 +5176,7 @@ body {
|
|
|
5176
5176
|
</table>
|
|
5177
5177
|
</div>
|
|
5178
5178
|
</div>
|
|
5179
|
-
`}};l([a({type:Array}),c("design:type",typeof(Ll=typeof Array<"u"&&Array)=="function"?Ll:Object)],ai.prototype,"dataTable",void 0),l([a({type:Array}),c("design:type",typeof(Nl=typeof Array<"u"&&Array)=="function"?Nl:Object)],ai.prototype,"footerData",void 0),l([a({type:String}),c("design:type",String)],ai.prototype,"captionText",void 0),ai=l([p("rtg-table")],ai);function
|
|
5179
|
+
`}};l([a({type:Array}),c("design:type",typeof(Ll=typeof Array<"u"&&Array)=="function"?Ll:Object)],ai.prototype,"dataTable",void 0),l([a({type:Array}),c("design:type",typeof(Nl=typeof Array<"u"&&Array)=="function"?Nl:Object)],ai.prototype,"footerData",void 0),l([a({type:String}),c("design:type",String)],ai.prototype,"captionText",void 0),ai=l([p("rtg-table")],ai);function hu(){return`rtg-${Date.now().toString(36)}${Math.random().toString(36).substring(2,7)}`}function uu(e,t){return`${e}-trigger-${t}`}function pu(e,t){return`${e}-content-${t}`}var be=class extends v{constructor(...e){super(...e),this.orientation="horizontal",this.dir="ltr",this.activationMode="automatic",this._baseId=hu(),this._onTriggerSelect=t=>{var i;let r=t.detail.value;this._isControlled?(i=this.onValueChange)==null||i.call(this,r):this._activeValue=r}}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="tabs"]')}get _list(){return this.querySelector("rtg-tabs-list")}get _triggers(){return Array.from(this.querySelectorAll("rtg-tabs-trigger"))}get _contents(){return Array.from(this.querySelectorAll("rtg-tabs-content"))}get _isControlled(){return this.value!==void 0}get _currentValue(){return this._isControlled?this.value:this._activeValue}_sync(){if(this._list){let e=this._list._listSlot;e.setAttribute("data-orientation",this.orientation),e.setAttribute("aria-orientation",this.orientation)}this._triggers.forEach(e=>{var s;let t=e._triggerSlot;t.setAttribute("data-orientation",this.orientation),t.id||(t.id=uu(this._baseId,e.value));let r=e.value===this._currentValue;t.setAttribute("data-state",r?"active":"inactive"),t.tabIndex=r?0:-1,t.setAttribute("aria-selected",String(r));let i=this._contents.find(o=>o.value===e.value);i!=null&&i._contentSlot&&((s=i._contentSlot).id||(s.id=pu(this._baseId,i.value)),i._contentSlot.setAttribute("aria-labelledby",t.id),t.setAttribute("aria-controls",i._contentSlot.id))}),this._contents.forEach(e=>{let t=e._contentSlot;t.setAttribute("data-orientation",this.orientation);let r=e.value===this._currentValue;t.setAttribute("data-state",r?"active":"inactive"),t.toggleAttribute("hidden",!r)})}firstUpdated(){var e;Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))}),this._activeValue=this.value??this.defaultValue??((e=this._triggers[0])==null?void 0:e.value),this.addEventListener("rtg-tabs:trigger-select",this._onTriggerSelect),this._sync()}updated(e){e.has("value")&&this._isControlled&&(this._activeValue=this.value),this._sync()}render(){return d`
|
|
5180
5180
|
<div
|
|
5181
5181
|
data-slot="tabs"
|
|
5182
5182
|
data-orientation=${this.orientation}
|
|
@@ -5206,7 +5206,7 @@ body {
|
|
|
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=
|
|
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
|
|
5210
5210
|
part="toast-view-port"
|
|
5211
5211
|
tabindex="-1"
|
|
5212
5212
|
@click="${t=>t.stopPropagation()}"
|
|
@@ -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,
|
|
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`
|
|
5228
5228
|
<button
|
|
5229
5229
|
${wt(this.getFilteredAttributes())}
|
|
5230
5230
|
part="toast-action"
|
|
5231
5231
|
type="button"
|
|
5232
|
-
class="${m(
|
|
5232
|
+
class="${m(hs.toastVariants.base,hs.toastVariants.variants[this.variant],this.className,"rtg-w-max")}"
|
|
5233
5233
|
></button>
|
|
5234
|
-
`}},
|
|
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`
|
|
5235
5235
|
<div
|
|
5236
5236
|
class="${m(xi.description,this.className)}"
|
|
5237
5237
|
part="toast-description"
|
|
@@ -5243,13 +5243,13 @@ body {
|
|
|
5243
5243
|
part="toast-title"
|
|
5244
5244
|
class="${m(xi.title,this.className)}"
|
|
5245
5245
|
></div>
|
|
5246
|
-
`}};Bl=l([p("rtg-toast-title")],Bl);var Ml=class extends _{constructor(){super(),this.handleClick=this.handleClick.bind(this)}get _containerElement(){return this.querySelector("div[part=toast-trigger]")}get _toast(){let e=this.parentElement;for(;e&&!(e instanceof
|
|
5246
|
+
`}};Bl=l([p("rtg-toast-title")],Bl);var Ml=class extends _{constructor(){super(),this.handleClick=this.handleClick.bind(this)}get _containerElement(){return this.querySelector("div[part=toast-trigger]")}get _toast(){let e=this.parentElement;for(;e&&!(e instanceof us);)e=e.parentElement;return e}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}handleClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("open-toast",{bubbles:!0})),this._toast.isOpen=!0}render(){return d`
|
|
5247
5247
|
<div
|
|
5248
5248
|
@click=${this.handleClick}
|
|
5249
5249
|
part="toast-trigger"
|
|
5250
5250
|
class="${m(this.className)}"
|
|
5251
5251
|
></div>
|
|
5252
|
-
`}};Ml=l([p("rtg-toast-trigger"),c("design:paramtypes",[])],Ml);var
|
|
5252
|
+
`}};Ml=l([p("rtg-toast-trigger"),c("design:paramtypes",[])],Ml);var us=class extends _{constructor(...e){super(...e),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=toast]")}onClick(){this.isOpen=!this.isOpen}connectedCallback(){super.connectedCallback(),this.addEventListener("close-toast",()=>{this.isOpen=!1}),this.addEventListener("open-toast",()=>{this.isOpen=!0})}get _content(){return this.querySelector("rtg-toast-view-port")}updated(e){super.updated(e);let t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return d` <div class="${m("",this.className)}" part="toast"></div> `}};l([x(),c("design:type",Object)],us.prototype,"isOpen",void 0),us=l([p("rtg-toast")],us);var wr=(function(e){return e.MULTIPLE="multiple",e.SINGLE="single",e})({}),_r=(function(e){return e.DEFAULT="default",e.OUTLINE="outline",e})({}),xr=(function(e){return e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e})({}),gu=hn("rtg-inline-flex rtg-items-center rtg-justify-center rtg-rounded-toggle-group-item-radius rtg-text-toggle-group-item-font rtg-font-toggle-group-item-font-weight rtg-transition-colors focus-visible:rtg-outline-none focus-visible:rtg-ring-toggle-group-item-width-ring-focus focus-visible:rtg-ring-toggle-group-item-color-ring-focus focus-visible:rtg-ring-offset-toggle-group-item-width-ring-offset-focus disabled:rtg-pointer-events-none disabled:rtg-opacity-toggle-group-item-opacity-disabled data-[state=on]:rtg-bg-toggle-group-item-color-bg-on data-[state=on]:rtg-text-toggle-group-item-color-text-on rtg-bg-transparent",{variants:{variant:{default:"hover:rtg-bg-toggle-group-item-default-color-bg-hover hover:rtg-text-toggle-group-item-default-color-text-hover",outline:"rtg-border rtg-border-toggle-group-item-outline-color-border hover:rtg-bg-toggle-group-item-outline-color-bg-hover hover:rtg-text-toggle-group-item-outline-color-text-hover"},size:{sm:"rtg-h-toggle-group-item-space-h-sm rtg-px-toggle-group-item-space-px-sm",md:"rtg-h-toggle-group-item-space-h-md rtg-px-toggle-group-item-space-px-md",lg:"rtg-h-toggle-group-item-space-h-lg rtg-px-toggle-group-item-space-px-lg"}}}),mu="rtg-flex rtg-items-center rtg-justify-center rtg-gap-toggle-group-space-gap",ql,Vl,Hl,Xo,mr,ke=(mr=class extends _{get _parent(){let t=this.parentElement;for(;t&&!(t instanceof ve);)t=t.parentElement;return t}get _containerElement(){return this.querySelector("button[part=toggle-group-item]")}get _siblings(){var t;return Array.from(((t=this.parentElement)==null?void 0:t.children)||[]).filter(r=>r!==this)}getAttributesToExclude(){return["disabled","type"]}createRenderRoot(){return this}firstUpdated(t){this.syncFromParent(),this.moveLightDomChildrenInto(this._containerElement)}constructor(){super(),this.checked=!1,this.id=dn(),this.variant=_r.DEFAULT,this.size=xr.SMALL,this.disabled=!1,this.type=wr.SINGLE,this.variant=_r.DEFAULT,this.size=xr.SMALL}syncFromParent(){let t=this._parent;if(!t)return;this.variant!==t.variant&&(this.variant=t.variant),this.size!==t.size&&(this.size=t.size);let r=t.selectedItems.includes(this.id);this.checked!==r&&(this.checked=r),this.type!==t.type&&(this.type=t.type)}syncSelection(){let t=this._parent;if(!t)return;let r=t.selectedItems.includes(this.id);this.checked!==r&&(this.checked=r)}toggleSelection(t){if(this.disabled||!this._parent)return;let r=this._parent,i=r.selectedItems.indexOf(t);this.type===wr.SINGLE?(i===-1?r.selectedItems[0]=t:r.selectedItems.splice(i,1),this._siblings.forEach(s=>s.syncSelection())):i===-1?r.selectedItems.push(t):r.selectedItems.splice(i,1),this.syncSelection()}render(){return console.log({variant:this.variant,size:this.size,className:this.className}),d`
|
|
5253
5253
|
<button
|
|
5254
5254
|
part="toggle-group-item"
|
|
5255
5255
|
id=${this.id}
|
|
@@ -5260,15 +5260,15 @@ body {
|
|
|
5260
5260
|
?disabled=${this.disabled}
|
|
5261
5261
|
@click=${()=>this.toggleSelection(this.id)}
|
|
5262
5262
|
></button>
|
|
5263
|
-
`}},Xo=mr,mr.toggleGroupVariants=
|
|
5263
|
+
`}},Xo=mr,mr.toggleGroupVariants=gu,mr);l([a({attribute:!0,type:Boolean,reflect:!0}),c("design:type",Object)],ke.prototype,"checked",void 0),l([a({attribute:!0,type:String,reflect:!0}),c("design:type",Object)],ke.prototype,"id",void 0),l([a(),c("design:type",typeof(ql=_r!==void 0&&_r)=="function"?ql:Object)],ke.prototype,"variant",void 0),l([a(),c("design:type",typeof(Vl=xr!==void 0&&xr)=="function"?Vl:Object)],ke.prototype,"size",void 0),l([a({type:Boolean}),c("design:type",Object)],ke.prototype,"disabled",void 0),l([a({type:String}),c("design:type",typeof(Hl=wr!==void 0&&wr)=="function"?Hl:Object)],ke.prototype,"type",void 0),ke=Xo=l([p("rtg-toggle-group-item"),c("design:paramtypes",[])],ke);var Gl,Wl,Kl,ve=class extends _{constructor(...e){super(...e),this.disabled=!1,this.type=wr.SINGLE,this.required=!1,this.variant=_r.DEFAULT,this.size=xr.SMALL,this.selectedItems=[]}get _containerElement(){return this.querySelector("div[part=toggle-group]")}getAttributesToExclude(){return["disabled","type","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement)}updated(e){(e.has("variant")||e.has("size")||e.has("disabled")||e.has("type"))&&this.querySelectorAll("rtg-toggle-group-item").forEach(t=>{t.variant=this.variant,t.size=this.size,t.disabled=this.disabled,t.type=this.type})}createRenderRoot(){return this}render(){let e=this.getFilteredAttributes();return console.log({variant:this.variant,size:this.size,className:this.className}),d`
|
|
5264
5264
|
<div
|
|
5265
5265
|
part="toggle-group"
|
|
5266
5266
|
role="group"
|
|
5267
5267
|
${wt(e)}
|
|
5268
|
-
class="${m(
|
|
5268
|
+
class="${m(mu,this.className)}"
|
|
5269
5269
|
?disable="${this.disabled}"
|
|
5270
5270
|
></div>
|
|
5271
|
-
`}};l([a({type:Boolean}),c("design:type",Object)],ve.prototype,"disabled",void 0),l([a({type:String}),c("design:type",typeof(Gl=wr!==void 0&&wr)=="function"?Gl:Object)],ve.prototype,"type",void 0),l([a({attribute:!0,type:Boolean,reflect:!0}),c("design:type",Object)],ve.prototype,"required",void 0),l([a(),c("design:type",typeof(Wl=_r!==void 0&&_r)=="function"?Wl:Object)],ve.prototype,"variant",void 0),l([a(),c("design:type",typeof(Kl=xr!==void 0&&xr)=="function"?Kl:Object)],ve.prototype,"size",void 0),l([a({type:Array}),c("design:type",Array)],ve.prototype,"selectedItems",void 0),ve=l([p("rtg-toggle-group")],ve);var fi=(function(e){return e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e})({}),vi=(function(e){return e.DEFAULT="default",e.OUTLINE="outline",e})({}),
|
|
5271
|
+
`}};l([a({type:Boolean}),c("design:type",Object)],ve.prototype,"disabled",void 0),l([a({type:String}),c("design:type",typeof(Gl=wr!==void 0&&wr)=="function"?Gl:Object)],ve.prototype,"type",void 0),l([a({attribute:!0,type:Boolean,reflect:!0}),c("design:type",Object)],ve.prototype,"required",void 0),l([a(),c("design:type",typeof(Wl=_r!==void 0&&_r)=="function"?Wl:Object)],ve.prototype,"variant",void 0),l([a(),c("design:type",typeof(Kl=xr!==void 0&&xr)=="function"?Kl:Object)],ve.prototype,"size",void 0),l([a({type:Array}),c("design:type",Array)],ve.prototype,"selectedItems",void 0),ve=l([p("rtg-toggle-group")],ve);var fi=(function(e){return e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e})({}),vi=(function(e){return e.DEFAULT="default",e.OUTLINE="outline",e})({}),bu=hn("rtg-inline-flex rtg-items-center rtg-justify-center rtg-rounded-toggle-radius rtg-text-toggle-font rtg-font-toggle-font-weight rtg-transition-colors focus-visible:rtg-outline-none focus-visible:rtg-ring-toggle-width-ring-focus focus-visible:rtg-ring-toggle-color-ring-focus focus-visible:rtg-ring-offset-toggle-width-ring-offset-focus disabled:rtg-pointer-events-none disabled:rtg-opacity-toggle-opacity-disabled data-[state=on]:rtg-bg-toggle-color-bg-on data-[state=on]:rtg-text-toggle-color-text-on rtg-bg-transparent",{variants:{variant:{default:"hover:rtg-bg-toggle-default-color-bg-hover hover:rtg-text-toggle-default-color-text-hover",outline:"rtg-border rtg-border-toggle-outline-color-border hover:rtg-bg-toggle-outline-color-bg-hover hover:rtg-text-toggle-outline-color-text-hover"},size:{sm:"rtg-h-toggle-space-h-sm rtg-px-toggle-space-px-sm",md:"rtg-h-toggle-space-h-md rtg-px-toggle-space-px-md",lg:"rtg-h-toggle-space-h-lg rtg-px-toggle-space-px-lg"}}}),Yl,Xl,Zo,br,Je=(br=class extends _{constructor(...t){super(...t),this.disabled=!1,this.checked=!1,this.required=!1,this.variant=vi.DEFAULT,this.size=fi.SMALL}willUpdate(t){t.has("variant")&&(this.variant=this.normalizeEnum(this.variant,vi,vi.DEFAULT)),t.has("size")&&(this.size=this.normalizeEnum(this.size,fi,fi.SMALL))}get _containerElement(){return this.querySelector("button[part=toggle]")}getAttributesToExclude(){return["disabled","checked","variant","size","required","data-testid"]}toggle(){this.disabled||(this.checked=!this.checked)}createRenderRoot(){return this}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}render(){let t=this.getFilteredAttributes();return d`
|
|
5272
5272
|
<button
|
|
5273
5273
|
type="button"
|
|
5274
5274
|
part="toggle"
|
|
@@ -5281,7 +5281,7 @@ body {
|
|
|
5281
5281
|
?disabled=${this.disabled}
|
|
5282
5282
|
${wt(t)}
|
|
5283
5283
|
></button>
|
|
5284
|
-
`}},Zo=br,br.toggleVariants=
|
|
5284
|
+
`}},Zo=br,br.toggleVariants=bu,br);l([a({type:Boolean}),c("design:type",Object)],Je.prototype,"disabled",void 0),l([a({attribute:!0,type:Boolean,reflect:!0}),c("design:type",Object)],Je.prototype,"checked",void 0),l([a({attribute:!0,type:Boolean,reflect:!0}),c("design:type",Object)],Je.prototype,"required",void 0),l([a({attribute:!0,type:String}),c("design:type",typeof(Yl=vi!==void 0&&vi)=="function"?Yl:Object)],Je.prototype,"variant",void 0),l([a({attribute:!0,type:String}),c("design:type",typeof(Xl=fi!==void 0&&fi)=="function"?Xl:Object)],Je.prototype,"size",void 0),Je=Zo=l([p("rtg-toggle")],Je);var Zl=class extends v{createRenderRoot(){return this}get _blockquoteSlot(){return this.querySelector('[data-slot="typography-blockquote"]')}firstUpdated(){let e=this._blockquoteSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<blockquote data-slot="typography-blockquote"></blockquote>`}};Zl=l([p("rtg-typography-blockquote")],Zl);var Jl=class extends v{createRenderRoot(){return this}get _codeSlot(){return this.querySelector('[data-slot="typography-code"]')}firstUpdated(){let e=this._codeSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return d`<code data-slot="typography-code"></code>`}};Jl=l([p("rtg-typography-code")],Jl);var Bo=class extends v{constructor(...e){super(...e),this.level="h1"}createRenderRoot(){return this}get _hSlot(){return this.querySelector('[data-slot="typography-h"]')}firstUpdated(){let e=this._hSlot;e&&Array.from(this.childNodes).filter(t=>t!==e).forEach(t=>e.appendChild(t))}render(){return this.level==="h2"?d`
|
|
5285
5285
|
<h2 data-slot="typography-h" data-level="${this.level}"></h2>
|
|
5286
5286
|
`:this.level==="h3"?d`
|
|
5287
5287
|
<h3 data-slot="typography-h" data-level="${this.level}"></h3>
|
|
@@ -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 fh=new Set(["children","localName","ref","style","className"]),nd=new WeakMap,vh=(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,u,h)=>{let g=nd.get(n);g===void 0&&nd.set(n,g=new Map);let y=g.get(u);h===void 0?y!==void 0&&(g.delete(u),n.removeEventListener(u,y)):y===void 0?(g.set(u,y={handleEvent:h}),n.addEventListener(u,y)):y.handleEvent=h})(e,o,r)},yh=(e,t)=>{typeof e=="function"?e(t):e.current=t};function qd(e=window.React,t,r,i,s){let o,n,u;{let C=e;({tagName:n,elementClass:u,events:i,displayName:s}=C),o=C.react}let h=o.Component,g=o.createElement,y=new Set(Object.keys(i??{}));class w extends h{constructor(){super(...arguments),this.o=null}t(S){if(this.o!==null)for(let k in this.i)vh(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&&yh(S,A),this.o=A,this.h=S}),this.i={};let O={ref:this.u};for(let[A,F]of Object.entries(k))fh.has(A)?O[A==="className"?"class":A]=F:y.has(A)||A in u.prototype?this.i[A]=F:O[A]=F;return O.suppressHydrationWarning=!0,g(n,O)}}w.displayName=s??u.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 wh=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"),u=Symbol.for("react.context"),h=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 Gt(f,$,N){var L=N.ref;return{$$typeof:t,type:f,key:$,ref:L===void 0?null:L,props:N}}function he(f,$){return Gt(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 Wt(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=he(B,N+(B.key==null||f&&f.key===B.key?"":(""+B.key).replace(Nt,"$&/")+"/")+K)),$.push(B)),1;K=0;var re=L===""?".":L+":";if(it(f))for(var Ct=0;Ct<f.length;Ct++)L=f[Ct],H=re+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=re+pe(L,Ct++),K+=zt(L,$,N,H,B);else if(H==="object"){if(typeof f.then=="function")return zt(Wt(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),re=0;re<H;re++)K[re]=arguments[re+2];L.children=K}return Gt(f.type,B,L)},e.createContext=function(f){return f={$$typeof:u,_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 re=Array(K),Ct=0;Ct<K;Ct++)re[Ct]=arguments[Ct+2];B.children=re}if(f&&f.defaultProps)for(L in K=f.defaultProps,K)B[L]===void 0&&(B[L]=K[L]);return Gt(f,H,B)},e.createRef=function(){return{current:null}},e.forwardRef=function(f){return{$$typeof:h,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=ou(Pd(((e,t)=>{t.exports=wh()}))());qd({tagName:"rtg-button",elementClass:Kt,react:Vd.default});qd({tagName:"rtg-checkbox",elementClass:Dt,react:Vd.default});const _h="sb-relative sb-overflow-hidden sb-w-1/3 sb-h-2 sb-linear-bar",xh="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]",Sh="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]",$h="sb-fixed sb-inset-0 sb-z-[9999] sb-flex sb-items-center sb-justify-center sb-p-4 sb-overflow-auto",Ch="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",Eh="sb-justify-self-center sb-rotate-0",kh="sb-border-0 sb-bg-background !sb-m-0",Rh="sb-border sb-rounded-2xl sb-relative sb-py-6",Ih="!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",Oh="!sb-flex !sb-justify-start !sb-flex-nowrap !sb-w-full !rtg-grid-cols-2 !sb-gap-2 sb-mx-6",Ah="!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"},Ph=/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/,Fh=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Th=/^\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=h=>{if(["input","checkbox","otp"].includes(h.element_type)&&"data_key"in h&&h.data_key===t)return h;if(h.element_type==="container")for(const g of h.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:u}=n.properties;if(!(!u||r!=="submit"&&u.on_event!==r)){if(n.hidden){delete e.errors[t];return}for(const h of u.rules){if(n.hidden)continue;let g=!0;switch(h.type){case"required":g=Hd(i,n);break;case"min_length":g=Gd(i,h.length);break;case"max_length":g=Wd(i,h.length);break;case"min_value":g=Kd(i,h.value);break;case"max_value":g=Yd(i,h.value);break;case"regex":g=Xd(i,h.regex);break;case"field_match":g=Zd(i,h.field_match?e.formData[h.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&&h.error_message&&s.push(h.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"?Fh.test(e):!0}function Qd(e){return typeof e=="string"?Ph.test(e):!0}function tc(e){return typeof e=="string"?Th.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 Lh(){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="-",Nh=e=>{const t=jh(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:n=>{const u=n.split(mn);return u[0]===""&&u.length!==1&&u.shift(),rc(u,t)||zh(n)},getConflictingClassGroupIds:(n,u)=>{const h=r[n]||[];return u&&i[n]?[...h,...i[n]]:h}}},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:u})=>u(o)))==null?void 0:n.classGroupId},ad=/^\[(.+)\]$/,zh=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}},jh=e=>{const{theme:t,prefix:r}=e,i={nextPart:new Map,validators:[]};return Dh(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(Uh(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},Uh=e=>e.isThemeGetter,Dh=(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,u])=>[t+n,u])):o);return[r,s]}):e,Bh=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="!",Mh=e=>{const{separator:t,experimentalParseClassName:r}=e,i=t.length===1,s=t[0],o=t.length,n=u=>{const h=[];let g=0,y=0,w;for(let O=0;O<u.length;O++){let A=u[O];if(g===0){if(A===s&&(i||u.slice(O,O+o)===t)){h.push(u.slice(y,O)),y=O+o;continue}if(A==="/"){w=O;continue}}A==="["?g++:A==="]"&&g--}const E=h.length===0?u:u.substring(y),C=E.startsWith(ic),S=C?E.substring(1):E,k=w&&w>y?w-y:void 0;return{modifiers:h,hasImportantModifier:C,baseClassName:S,maybePostfixModifierPosition:k}};return r?u=>r({className:u,parseClassName:n}):n},qh=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},Vh=e=>({cache:Bh(e.cacheSize),parseClassName:Mh(e),...Nh(e)}),Hh=/\s+/,Gh=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s}=t,o=[],n=e.trim().split(Hh);let u="";for(let h=n.length-1;h>=0;h-=1){const g=n[h],{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){u=g+(u.length>0?" "+u:u);continue}if(k=i(E),!k){u=g+(u.length>0?" "+u:u);continue}S=!1}const O=qh(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)}u=g+(u.length>0?" "+u:u)}return u};function Wh(){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 Kh(e,...t){let r,i,s,o=n;function n(h){const g=t.reduce((y,w)=>w(y),e());return r=Vh(g),i=r.cache.get,s=r.cache.set,o=u,u(h)}function u(h){const g=i(h);if(g)return g;const y=Gh(h,r);return s(h,y),y}return function(){return o(Wh.apply(null,arguments))}}const X=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},oc=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yh=/^\d+\/\d+$/,Xh=new Set(["px","full","screen"]),Zh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jh=/\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$/,Qh=/^(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)||Xh.has(e)||Yh.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=>Zh.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,up),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=>Jh.test(e)&&!Qh.test(e),nc=()=>!1,cp=e=>tp.test(e),up=e=>ep.test(e),hp=()=>{const e=X("colors"),t=X("spacing"),r=X("blur"),i=X("brightness"),s=X("borderColor"),o=X("borderRadius"),n=X("borderSpacing"),u=X("borderWidth"),h=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"],Gt=()=>["auto","hidden","clip","visible","scroll"],he=()=>["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"],Wt=()=>["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:he(),margin:he(),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:Gt()}],"overflow-x":[{"overflow-x":Gt()}],"overflow-y":[{"overflow-y":Gt()}],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:he()}],"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:[...Wt(),"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:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...Wt(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:Wt()}],"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:["",...Wt()]}],"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:[h]}],"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":[h]}],"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=Kh(hp);function Z(...e){return pp(Lh(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 h=`(min-width: ${i[n]})`,g=Object.entries(t[n]).map(([y,w])=>`${y}: ${w} !important;`).join(" ");s+=`@media ${h} { #${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,
|
|
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`
|
|
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:
|
|
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`
|
|
5520
5520
|
<rtg-button
|
|
5521
5521
|
variant=${t}
|
|
5522
5522
|
size=${r??b}
|
|
@@ -5529,15 +5529,15 @@ body {
|
|
|
5529
5529
|
style=${R(w)}
|
|
5530
5530
|
.onclick=${this._onClick}
|
|
5531
5531
|
>
|
|
5532
|
-
${
|
|
5532
|
+
${h==="start"?this._renderIcon():b}
|
|
5533
5533
|
${n}
|
|
5534
|
-
${
|
|
5534
|
+
${h!=="start"?this._renderIcon():b}
|
|
5535
5535
|
</rtg-button>
|
|
5536
5536
|
`}};Cs([a({type:Object})],exports.SbButtonRenderer.prototype,"element",2);Cs([a({attribute:!1})],exports.SbButtonRenderer.prototype,"component",2);Cs([x()],exports.SbButtonRenderer.prototype,"theme",2);exports.SbButtonRenderer=Cs([p("sb-button-renderer")],exports.SbButtonRenderer);/**
|
|
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}),
|
|
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`
|
|
5541
5541
|
<rtg-field-separator
|
|
5542
5542
|
id=${this.element.id}
|
|
5543
5543
|
class=${t}
|
|
@@ -5581,7 +5581,7 @@ body {
|
|
|
5581
5581
|
</rtg-field>
|
|
5582
5582
|
`}};yn([a({type:Object})],exports.SbCheckboxRenderer.prototype,"element",2);yn([a({attribute:!1})],exports.SbCheckboxRenderer.prototype,"component",2);exports.SbCheckboxRenderer=yn([p("sb-checkbox-renderer")],exports.SbCheckboxRenderer);var Ap=Object.defineProperty,Pp=Object.getOwnPropertyDescriptor,dc=(e,t,r,i)=>{for(var s=i>1?void 0:i?Pp(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&&Ap(t,r,s),s};exports.SbHint=class extends v{constructor(){super(...arguments),this.content=""}createRenderRoot(){return this}render(){return d`<p class="sb-mt-2">${this.content}</p>`}};dc([a({type:String})],exports.SbHint.prototype,"content",2);exports.SbHint=dc([p("sb-hint")],exports.SbHint);var Fp=Object.defineProperty,Tp=Object.getOwnPropertyDescriptor,wn=(e,t,r,i)=>{for(var s=i>1?void 0:i?Tp(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&&Fp(t,r,s),s};exports.LinearLoader=class extends v{constructor(){super(...arguments),this.customClass="",this.customStyle={}}createRenderRoot(){return this}render(){return d`
|
|
5583
5583
|
<div
|
|
5584
|
-
class=${Z(
|
|
5584
|
+
class=${Z(_u,this.customClass)}
|
|
5585
5585
|
style=${R(this.customStyle)}
|
|
5586
5586
|
></div>
|
|
5587
5587
|
`}};wn([a({type:String})],exports.LinearLoader.prototype,"customClass",2);wn([a({type:Object})],exports.LinearLoader.prototype,"customStyle",2);exports.LinearLoader=wn([p("linear-loader")],exports.LinearLoader);var Lp=Object.defineProperty,Np=Object.getOwnPropertyDescriptor,Xr=(e,t,r,i)=>{for(var s=i>1?void 0:i?Np(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&&Lp(t,r,s),s};exports.SbSpinner=class extends v{constructor(){super(...arguments),this.size=16,this.strokeWidth=2,this.color="currentColor",this.label="Loading…",this.duration=1}createRenderRoot(){return this}render(){const t=Math.max(0,(this.size-this.strokeWidth)/2),r=2*Math.PI*t,i=t-this.strokeWidth/2;return d`
|
|
@@ -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,
|
|
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`
|
|
5657
5657
|
<rtg-input-otp
|
|
5658
5658
|
id=${this.element.data_key??this.element.id??b}
|
|
5659
5659
|
name=${this.element.data_key??this.element.id??b}
|
|
@@ -5670,7 +5670,7 @@ body {
|
|
|
5670
5670
|
>
|
|
5671
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`
|
|
5672
5672
|
<rtg-alert-description>${t??r}</rtg-alert-description>
|
|
5673
|
-
`}render(){var o,n,u,
|
|
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`
|
|
5674
5674
|
<rtg-alert
|
|
5675
5675
|
variant=${this.element.properties.variant??"destructive"}
|
|
5676
5676
|
class=${t??b}
|
|
@@ -5684,17 +5684,17 @@ body {
|
|
|
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 u
|
|
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`
|
|
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,u,
|
|
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`
|
|
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,u,
|
|
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`
|
|
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)):b}render(){var o,n,u
|
|
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)):b}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`
|
|
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,
|
|
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`
|
|
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 u,
|
|
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`
|
|
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
|
|
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`
|
|
5801
5801
|
<rtg-field
|
|
5802
5802
|
?invalid=${this._invalid}
|
|
5803
5803
|
class=${t}
|
|
@@ -5810,7 +5810,7 @@ body {
|
|
|
5810
5810
|
type=${this.element.properties.type}
|
|
5811
5811
|
autocomplete=${this.element.properties.autocomplete??b}
|
|
5812
5812
|
placeholder=${this.element.properties.placeholder??b}
|
|
5813
|
-
value=${
|
|
5813
|
+
value=${h}
|
|
5814
5814
|
?invalid=${this._invalid}
|
|
5815
5815
|
data-key=${this.element.data_key||""}
|
|
5816
5816
|
class=${o}
|
|
@@ -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,u,
|
|
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`
|
|
5825
5825
|
<rtg-label
|
|
5826
5826
|
for=${this.element.properties.for??b}
|
|
5827
5827
|
class=${t??b}
|
|
@@ -5905,7 +5905,7 @@ body {
|
|
|
5905
5905
|
<path d="m15 9-6 6" />
|
|
5906
5906
|
<path d="m9 9 6 6" />
|
|
5907
5907
|
</svg>
|
|
5908
|
-
`,
|
|
5908
|
+
`,hg=(e,t)=>d`
|
|
5909
5909
|
<svg
|
|
5910
5910
|
id="${e}"
|
|
5911
5911
|
part="${t}"
|
|
@@ -5925,7 +5925,7 @@ body {
|
|
|
5925
5925
|
<path d="M12 8v4" />
|
|
5926
5926
|
<path d="M12 16h.01" />
|
|
5927
5927
|
</svg>
|
|
5928
|
-
`,
|
|
5928
|
+
`,ug=(e,t)=>d`
|
|
5929
5929
|
<svg
|
|
5930
5930
|
id="${e}"
|
|
5931
5931
|
part="${t}"
|
|
@@ -5945,7 +5945,7 @@ body {
|
|
|
5945
5945
|
<path d="m14.5 9.5-5 5" />
|
|
5946
5946
|
<path d="m9.5 9.5 5 5" />
|
|
5947
5947
|
</svg>
|
|
5948
|
-
`,pg={"badge-alert":ag,"badge-x":lg,"circle-alert":dg,"circle-x":cg,"shield-alert":
|
|
5948
|
+
`,pg={"badge-alert":ag,"badge-x":lg,"circle-alert":dg,"circle-x":cg,"shield-alert":hg,"shield-x":ug};var gg=Object.defineProperty,mg=Object.getOwnPropertyDescriptor,Zr=(e,t,r,i)=>{for(var s=i>1?void 0:i?mg(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&&gg(t,r,s),s};exports.SbError=class extends v{constructor(){super(...arguments),this.seed=_t(),this.variant="default",this.content={description:"Something went wrong."}}static get parts(){const t=this._ROOT,r=`${t}-${this._ICON}`,i=`${t}-${this._TITLE}`,s=`${t}-${this._DESCRIPTION}`;return{root:t,icon:r,title:i,description:s}}createRenderRoot(){return this}get rootId(){return this.childId??`sb-${exports.SbError.parts.root}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.SbError._ICON}`}get titleId(){return`${this.rootId}-${exports.SbError._TITLE}`}get descriptionId(){return`${this.rootId}-${exports.SbError._DESCRIPTION}`}get _variant(){let t="destructive";return this.variant==="tonal"&&(t+="-tonal"),t}render(){const t=this.icon?pg[this.icon]:null,{title:r,description:i}=this.content;return d`
|
|
5949
5949
|
<rtg-alert
|
|
5950
5950
|
id="${this.rootId}"
|
|
5951
5951
|
part="${exports.SbError.parts.root}"
|
|
@@ -5969,7 +5969,7 @@ body {
|
|
|
5969
5969
|
</rtg-alert-description>
|
|
5970
5970
|
`:b}
|
|
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}`,
|
|
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)?b: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():b}
|
|
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}`,
|
|
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)?b: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():b}
|
|
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}`,
|
|
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)?b: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():b}
|
|
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}`,
|
|
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)?b:d`
|
|
6179
6179
|
<span
|
|
6180
6180
|
id="${this.markId}"
|
|
6181
6181
|
part="${exports.SbIdentifierField.parts.mark}"
|
|
@@ -6306,7 +6306,7 @@ body {
|
|
|
6306
6306
|
<div class="sb-flex">
|
|
6307
6307
|
${this._renderFirstField()} ${this._renderLastField()}
|
|
6308
6308
|
</div>
|
|
6309
|
-
`}};exports.SbNameField._ROOT="name-field";exports.SbNameField._FIRST="first";exports.SbNameField._LAST="last";rt([a({type:String})],exports.SbNameField.prototype,"firstLabel",2);rt([a({type:String})],exports.SbNameField.prototype,"lastLabel",2);rt([a({type:String})],exports.SbNameField.prototype,"seed",2);rt([a({attribute:"child-id"})],exports.SbNameField.prototype,"childId",2);rt([a({type:String})],exports.SbNameField.prototype,"name",2);rt([a({type:Boolean})],exports.SbNameField.prototype,"required",2);rt([a({type:Boolean})],exports.SbNameField.prototype,"disabled",2);rt([a({type:String})],exports.SbNameField.prototype,"firstName",2);rt([a({type:String})],exports.SbNameField.prototype,"lastName",2);rt([a({type:String})],exports.SbNameField.prototype,"firstPlaceholder",2);rt([a({type:String})],exports.SbNameField.prototype,"lastPlaceholder",2);rt([a({type:String})],exports.SbNameField.prototype,"requiredError",2);rt([a({type:String})],exports.SbNameField.prototype,"formatError",2);rt([a({type:String})],exports.SbNameField.prototype,"mark",2);rt([a({type:Boolean})],exports.SbNameField.prototype,"caret",2);rt([x()],exports.SbNameField.prototype,"_first",2);rt([x()],exports.SbNameField.prototype,"_firstInvalid",2);rt([x()],exports.SbNameField.prototype,"_firstError",2);rt([x()],exports.SbNameField.prototype,"_last",2);rt([x()],exports.SbNameField.prototype,"_lastInvalid",2);rt([x()],exports.SbNameField.prototype,"_lastError",2);exports.SbNameField=rt([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}`,
|
|
6309
|
+
`}};exports.SbNameField._ROOT="name-field";exports.SbNameField._FIRST="first";exports.SbNameField._LAST="last";rt([a({type:String})],exports.SbNameField.prototype,"firstLabel",2);rt([a({type:String})],exports.SbNameField.prototype,"lastLabel",2);rt([a({type:String})],exports.SbNameField.prototype,"seed",2);rt([a({attribute:"child-id"})],exports.SbNameField.prototype,"childId",2);rt([a({type:String})],exports.SbNameField.prototype,"name",2);rt([a({type:Boolean})],exports.SbNameField.prototype,"required",2);rt([a({type:Boolean})],exports.SbNameField.prototype,"disabled",2);rt([a({type:String})],exports.SbNameField.prototype,"firstName",2);rt([a({type:String})],exports.SbNameField.prototype,"lastName",2);rt([a({type:String})],exports.SbNameField.prototype,"firstPlaceholder",2);rt([a({type:String})],exports.SbNameField.prototype,"lastPlaceholder",2);rt([a({type:String})],exports.SbNameField.prototype,"requiredError",2);rt([a({type:String})],exports.SbNameField.prototype,"formatError",2);rt([a({type:String})],exports.SbNameField.prototype,"mark",2);rt([a({type:Boolean})],exports.SbNameField.prototype,"caret",2);rt([x()],exports.SbNameField.prototype,"_first",2);rt([x()],exports.SbNameField.prototype,"_firstInvalid",2);rt([x()],exports.SbNameField.prototype,"_firstError",2);rt([x()],exports.SbNameField.prototype,"_last",2);rt([x()],exports.SbNameField.prototype,"_lastInvalid",2);rt([x()],exports.SbNameField.prototype,"_lastError",2);exports.SbNameField=rt([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)?b:d`
|
|
6310
6310
|
<span
|
|
6311
6311
|
id="${this.markId}"
|
|
6312
6312
|
part="${exports.SbPhoneField.parts.mark}"
|
|
@@ -6366,7 +6366,7 @@ body {
|
|
|
6366
6366
|
${this._renderError()}
|
|
6367
6367
|
${this.content==="split"&&!this._invalid?this._renderDescription():b}
|
|
6368
6368
|
</rtg-field>
|
|
6369
|
-
`}};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,tt=(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}`,
|
|
6369
|
+
`}};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,tt=(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)?b:d`
|
|
6370
6370
|
<span
|
|
6371
6371
|
id="${this.markId}"
|
|
6372
6372
|
part="${exports.SbUsernameField.parts.mark}"
|
|
@@ -6429,7 +6429,7 @@ body {
|
|
|
6429
6429
|
${this._renderError()}
|
|
6430
6430
|
${this.content==="split"&&!this._invalid?this._renderDescription():b}
|
|
6431
6431
|
</rtg-field>
|
|
6432
|
-
`}};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_]*$/;tt([a({type:String})],exports.SbUsernameField.prototype,"seed",2);tt([a({attribute:"child-id",type:String})],exports.SbUsernameField.prototype,"childId",2);tt([a({attribute:"field-id",type:String})],exports.SbUsernameField.prototype,"fieldId",2);tt([a({type:String})],exports.SbUsernameField.prototype,"name",2);tt([a({type:String})],exports.SbUsernameField.prototype,"content",2);tt([a({type:String})],exports.SbUsernameField.prototype,"label",2);tt([a({type:String})],exports.SbUsernameField.prototype,"placeholder",2);tt([a({type:String})],exports.SbUsernameField.prototype,"description",2);tt([a({type:String})],exports.SbUsernameField.prototype,"mark",2);tt([a({type:Boolean})],exports.SbUsernameField.prototype,"caret",2);tt([a({type:Boolean})],exports.SbUsernameField.prototype,"disabled",2);tt([a({type:Boolean})],exports.SbUsernameField.prototype,"required",2);tt([a({type:Number})],exports.SbUsernameField.prototype,"minlength",2);tt([a({type:Number})],exports.SbUsernameField.prototype,"maxlength",2);tt([a({type:String})],exports.SbUsernameField.prototype,"pattern",2);tt([a({attribute:"required-error",type:String})],exports.SbUsernameField.prototype,"requiredError",2);tt([a({attribute:"minlength-error",type:String})],exports.SbUsernameField.prototype,"minlengthError",2);tt([a({attribute:"maxlength-error",type:String})],exports.SbUsernameField.prototype,"maxlengthError",2);tt([a({attribute:"format-error",type:String})],exports.SbUsernameField.prototype,"formatError",2);tt([x()],exports.SbUsernameField.prototype,"_invalid",2);tt([x()],exports.SbUsernameField.prototype,"_error",2);tt([x()],exports.SbUsernameField.prototype,"_value",2);exports.SbUsernameField=tt([p("sb-username-field")],exports.SbUsernameField);var Og=Object.defineProperty,Ag=Object.getOwnPropertyDescriptor,
|
|
6432
|
+
`}};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_]*$/;tt([a({type:String})],exports.SbUsernameField.prototype,"seed",2);tt([a({attribute:"child-id",type:String})],exports.SbUsernameField.prototype,"childId",2);tt([a({attribute:"field-id",type:String})],exports.SbUsernameField.prototype,"fieldId",2);tt([a({type:String})],exports.SbUsernameField.prototype,"name",2);tt([a({type:String})],exports.SbUsernameField.prototype,"content",2);tt([a({type:String})],exports.SbUsernameField.prototype,"label",2);tt([a({type:String})],exports.SbUsernameField.prototype,"placeholder",2);tt([a({type:String})],exports.SbUsernameField.prototype,"description",2);tt([a({type:String})],exports.SbUsernameField.prototype,"mark",2);tt([a({type:Boolean})],exports.SbUsernameField.prototype,"caret",2);tt([a({type:Boolean})],exports.SbUsernameField.prototype,"disabled",2);tt([a({type:Boolean})],exports.SbUsernameField.prototype,"required",2);tt([a({type:Number})],exports.SbUsernameField.prototype,"minlength",2);tt([a({type:Number})],exports.SbUsernameField.prototype,"maxlength",2);tt([a({type:String})],exports.SbUsernameField.prototype,"pattern",2);tt([a({attribute:"required-error",type:String})],exports.SbUsernameField.prototype,"requiredError",2);tt([a({attribute:"minlength-error",type:String})],exports.SbUsernameField.prototype,"minlengthError",2);tt([a({attribute:"maxlength-error",type:String})],exports.SbUsernameField.prototype,"maxlengthError",2);tt([a({attribute:"format-error",type:String})],exports.SbUsernameField.prototype,"formatError",2);tt([x()],exports.SbUsernameField.prototype,"_invalid",2);tt([x()],exports.SbUsernameField.prototype,"_error",2);tt([x()],exports.SbUsernameField.prototype,"_value",2);exports.SbUsernameField=tt([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`
|
|
6433
6433
|
<rtg-spinner
|
|
6434
6434
|
id="${this.spinnerId}"
|
|
6435
6435
|
part="${exports.SbFormSubmit.parts.spinner}"
|
|
@@ -6450,7 +6450,7 @@ body {
|
|
|
6450
6450
|
${this.label}
|
|
6451
6451
|
${this.spinnerAlign==="end"?this._renderSpinner():b}
|
|
6452
6452
|
</rtg-button>
|
|
6453
|
-
`}};exports.SbFormSubmit._ROOT="form-submit";exports.SbFormSubmit._SPINNER="spinner";exports.SbFormSubmit.TAG=`sb-${exports.SbFormSubmit._ROOT}`;
|
|
6453
|
+
`}};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.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`
|
|
6454
6454
|
<form
|
|
6455
6455
|
id="${this.rootId}"
|
|
6456
6456
|
part="${exports.SbForm.parts.root}"
|
|
@@ -6465,41 +6465,33 @@ body {
|
|
|
6465
6465
|
>
|
|
6466
6466
|
${this.content??b}
|
|
6467
6467
|
</rtg-field-separator>
|
|
6468
|
-
`}};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,
|
|
6469
|
-
<
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6468
|
+
`}};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?b:d`
|
|
6469
|
+
<p id="${this.promptId}" part="${exports.SbFormSwitch.parts.prompt}">
|
|
6470
|
+
${this.prompt}
|
|
6471
|
+
</p>
|
|
6472
|
+
`}_renderSpinner(){return this.isLoading?d`
|
|
6473
|
+
<rtg-spinner
|
|
6474
|
+
id="${this.spinnerId}"
|
|
6475
|
+
part="${exports.SbFormSwitch.parts.spinner}"
|
|
6476
|
+
class="rtg-icon-inline-end"
|
|
6477
|
+
></rtg-spinner>
|
|
6478
|
+
`:b}render(){const t=this.type==="button"?this.variant:"link",r=this.type==="button"?this.size:"default";return d`
|
|
6479
|
+
<div id="${this.wrapperId}" part="${exports.SbFormSwitch.parts.wrapper}">
|
|
6480
|
+
${this._renderPrompt()}
|
|
6479
6481
|
<rtg-button
|
|
6480
6482
|
id="${this.rootId}"
|
|
6481
6483
|
part="${exports.SbFormSwitch.parts.root}"
|
|
6482
|
-
data-
|
|
6483
|
-
data-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
?disabled=${this.disabled}
|
|
6484
|
+
data-type="${this.type}"
|
|
6485
|
+
data-event="${this.event??b}"
|
|
6486
|
+
data-loading="${this.isLoading?"true":b}"
|
|
6487
|
+
variant="${t}"
|
|
6488
|
+
size="${r}"
|
|
6489
|
+
?disabled="${this.disabled||this.isLoading}"
|
|
6489
6490
|
>
|
|
6490
|
-
${this.label}
|
|
6491
|
+
${this.label} ${this._renderSpinner()}
|
|
6491
6492
|
</rtg-button>
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
id="${this.rootId}"
|
|
6495
|
-
part="${exports.SbFormSwitch.parts.root}"
|
|
6496
|
-
data-variant="${this.variant}"
|
|
6497
|
-
?data-disabled=${this.disabled}
|
|
6498
|
-
data-event="${this.event}"
|
|
6499
|
-
>
|
|
6500
|
-
${this.prompt??b} ${this._renderLink()}
|
|
6501
|
-
</rtg-field-description>
|
|
6502
|
-
`}};exports.SbFormSwitch._ROOT="form-switch";exports.SbFormSwitch._LINK="link";de([a({type:String})],exports.SbFormSwitch.prototype,"seed",2);de([a({attribute:"child-id",type:String})],exports.SbFormSwitch.prototype,"childId",2);de([a({type:String})],exports.SbFormSwitch.prototype,"variant",2);de([a({type:String})],exports.SbFormSwitch.prototype,"label",2);de([a({type:String})],exports.SbFormSwitch.prototype,"prompt",2);de([a({type:Boolean})],exports.SbFormSwitch.prototype,"disabled",2);de([a({attribute:"button-variant",type:String})],exports.SbFormSwitch.prototype,"buttonVariant",2);de([a({attribute:"button-size",type:String})],exports.SbFormSwitch.prototype,"buttonSize",2);de([a({type:String})],exports.SbFormSwitch.prototype,"event",2);exports.SbFormSwitch=de([p("sb-form-switch")],exports.SbFormSwitch);var Ug=Object.defineProperty,Dg=Object.getOwnPropertyDescriptor,ee=(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=()=>{this.disabled||this.isLoading||(this._loading=!0,this._dispatchClick(),this._emitClickEvent())}}static get parts(){const t=this._ROOT,r=`${t}-${this._SPINNER}`;return{root:t,spinner:r}}static get clickEventName(){return`sb-${this._ROOT}:click`}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)}_dispatchClick(){const t=new CustomEvent(exports.SbPasskeyButton.clickEventName,{detail:{id:this.rootId,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}}}_renderSpinner(){return this.isLoading?d`
|
|
6493
|
+
</div>
|
|
6494
|
+
`}};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=()=>{this.disabled||this.isLoading||(this._loading=!0,this._dispatchClick(),this._emitClickEvent())}}static get parts(){const t=this._ROOT,r=`${t}-${this._SPINNER}`;return{root:t,spinner:r}}static get clickEventName(){return`sb-${this._ROOT}:click`}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)}_dispatchClick(){const t=new CustomEvent(exports.SbPasskeyButton.clickEventName,{detail:{id:this.rootId,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}}}_renderSpinner(){return this.isLoading?d`
|
|
6503
6495
|
<rtg-spinner
|
|
6504
6496
|
id="${this.spinnerId}"
|
|
6505
6497
|
part="${exports.SbPasskeyButton.parts.spinner}"
|
|
@@ -6520,7 +6512,7 @@ body {
|
|
|
6520
6512
|
${this.label}
|
|
6521
6513
|
${this.spinnerAlign==="end"?this._renderSpinner():b}
|
|
6522
6514
|
</rtg-button>
|
|
6523
|
-
`}};exports.SbPasskeyButton._ROOT="passkey-button";exports.SbPasskeyButton._SPINNER="spinner";
|
|
6515
|
+
`}};exports.SbPasskeyButton._ROOT="passkey-button";exports.SbPasskeyButton._SPINNER="spinner";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`
|
|
6524
6516
|
<svg
|
|
6525
6517
|
id="${this.iconId}"
|
|
6526
6518
|
part="${exports.SbProviderButton.parts.icon}"
|
|
@@ -6582,17 +6574,17 @@ body {
|
|
|
6582
6574
|
>
|
|
6583
6575
|
${this._providers.map(r=>this._renderButton(t.find(i=>i.provider===r)??{provider:r}))}
|
|
6584
6576
|
</rtg-field>
|
|
6585
|
-
`}};exports.SbProviderField._ROOT="provider-field";exports.SbProviderField._BUTTON="button";Pt([a({type:String})],exports.SbProviderField.prototype,"seed",2);Pt([a({attribute:"child-id",type:String})],exports.SbProviderField.prototype,"childId",2);Pt([a({type:Array})],exports.SbProviderField.prototype,"providers",2);Pt([a({type:String})],exports.SbProviderField.prototype,"content",2);Pt([a({type:String})],exports.SbProviderField.prototype,"variant",2);Pt([a({type:String})],exports.SbProviderField.prototype,"size",2);Pt([a({type:String})],exports.SbProviderField.prototype,"prompt",2);Pt([a({attribute:"icon-align",type:String})],exports.SbProviderField.prototype,"iconAlign",2);Pt([a({type:String})],exports.SbProviderField.prototype,"label",2);Pt([a({type:Boolean})],exports.SbProviderField.prototype,"disabled",2);Pt([a({type:Boolean})],exports.SbProviderField.prototype,"loading",2);Pt([a({type:String})],exports.SbProviderField.prototype,"event",2);Pt([a({type:Array})],exports.SbProviderField.prototype,"overrides",2);exports.SbProviderField=Pt([p("sb-provider-field")],exports.SbProviderField);var Wg=Object.defineProperty,Kg=Object.getOwnPropertyDescriptor,As=(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&&Wg(t,r,s),s};exports.SbGap=class extends
|
|
6577
|
+
`}};exports.SbProviderField._ROOT="provider-field";exports.SbProviderField._BUTTON="button";Pt([a({type:String})],exports.SbProviderField.prototype,"seed",2);Pt([a({attribute:"child-id",type:String})],exports.SbProviderField.prototype,"childId",2);Pt([a({type:Array})],exports.SbProviderField.prototype,"providers",2);Pt([a({type:String})],exports.SbProviderField.prototype,"content",2);Pt([a({type:String})],exports.SbProviderField.prototype,"variant",2);Pt([a({type:String})],exports.SbProviderField.prototype,"size",2);Pt([a({type:String})],exports.SbProviderField.prototype,"prompt",2);Pt([a({attribute:"icon-align",type:String})],exports.SbProviderField.prototype,"iconAlign",2);Pt([a({type:String})],exports.SbProviderField.prototype,"label",2);Pt([a({type:Boolean})],exports.SbProviderField.prototype,"disabled",2);Pt([a({type:Boolean})],exports.SbProviderField.prototype,"loading",2);Pt([a({type:String})],exports.SbProviderField.prototype,"event",2);Pt([a({type:Array})],exports.SbProviderField.prototype,"overrides",2);exports.SbProviderField=Pt([p("sb-provider-field")],exports.SbProviderField);var Wg=Object.defineProperty,Kg=Object.getOwnPropertyDescriptor,As=(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&&Wg(t,r,s),s};exports.SbGap=class extends de{constructor(){super(...arguments),this.size="8px",this.type="vertical",this.id=""}createRenderRoot(){return this}render(){let t={width:"0px",height:"0px"};return this.type==="vertical"?t={width:"1px",height:this.size}:t={height:"1px",width:this.size},d`
|
|
6586
6578
|
<div
|
|
6587
6579
|
part=${this.id?this.id:"gap"}
|
|
6588
6580
|
style=${R({...t})}
|
|
6589
6581
|
></div>
|
|
6590
|
-
`}};As([a()],exports.SbGap.prototype,"size",2);As([a()],exports.SbGap.prototype,"type",2);As([a()],exports.SbGap.prototype,"id",2);exports.SbGap=As([p("sb-gap")],exports.SbGap);var Yg=Object.defineProperty,Xg=Object.getOwnPropertyDescriptor,An=(e,t,r,i)=>{for(var s=i>1?void 0:i?Xg(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&&Yg(t,r,s),s};exports.SbHeader=class extends
|
|
6582
|
+
`}};As([a()],exports.SbGap.prototype,"size",2);As([a()],exports.SbGap.prototype,"type",2);As([a()],exports.SbGap.prototype,"id",2);exports.SbGap=As([p("sb-gap")],exports.SbGap);var Yg=Object.defineProperty,Xg=Object.getOwnPropertyDescriptor,An=(e,t,r,i)=>{for(var s=i>1?void 0:i?Xg(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&&Yg(t,r,s),s};exports.SbHeader=class extends de{constructor(){super(...arguments),this.align="center",this.gap="8px"}get _containerElement(){return this.querySelector(`div[part=${this.id?this.id:"header"}]`)}firstUpdated(t){this.moveLightDomChildrenInto(this._containerElement)}render(){return d` <div part=${this.id?this.id:"header"}></div> `}};An([a({type:String})],exports.SbHeader.prototype,"align",2);An([a({type:String,attribute:"gap"})],exports.SbHeader.prototype,"gap",2);exports.SbHeader=An([p("sb-header")],exports.SbHeader);var Zg=Object.defineProperty,Jg=Object.getOwnPropertyDescriptor,Ps=(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.SbLogo=class extends de{constructor(){super(...arguments),this.theme=this.getTheme()}get _containerElement(){return this.querySelector(`img[part=${this.id?this.id:"logo"}]`)}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")??"light"}createRenderRoot(){return this}render(){const t=bn(this.imageUrl,this.theme),r=t?Ss(t):null;return r?d` <div>${$s(r)}</div> `:d`
|
|
6591
6583
|
<img
|
|
6592
6584
|
part=${this.id?this.id:"logo"}
|
|
6593
6585
|
src=${ac(t)}
|
|
6594
6586
|
/>
|
|
6595
|
-
`}};Ps([a({type:String})],exports.SbLogo.prototype,"id",2);Ps([a({type:String,attribute:"image-url"})],exports.SbLogo.prototype,"imageUrl",2);Ps([x()],exports.SbLogo.prototype,"theme",2);exports.SbLogo=Ps([p("sb-logo")],exports.SbLogo);var Qg=Object.defineProperty,tm=Object.getOwnPropertyDescriptor,ce=(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&&Qg(t,r,s),s};exports.SbOtp=class extends
|
|
6587
|
+
`}};Ps([a({type:String})],exports.SbLogo.prototype,"id",2);Ps([a({type:String,attribute:"image-url"})],exports.SbLogo.prototype,"imageUrl",2);Ps([x()],exports.SbLogo.prototype,"theme",2);exports.SbLogo=Ps([p("sb-logo")],exports.SbLogo);var Qg=Object.defineProperty,tm=Object.getOwnPropertyDescriptor,ce=(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&&Qg(t,r,s),s};exports.SbOtp=class extends de{constructor(){super(...arguments),this.variant="with_separator",this.length=6,this.timeout=300,this.dataKey="",this.event="",this.resendText="",this.resendButtonText="",this.resendEvent="",this.id="otp",this.handleComplete=t=>{this.emit("sb-otp:complete",{id:this.id,dataKey:this.dataKey,value:t,event:this.event||null})},this.handleFocus=()=>{this.emit("sb-otp:focus",{id:this.id,dataKey:this.dataKey})},this.handleBlur=()=>{this.emit("sb-otp:blur",{id:this.id,dataKey:this.dataKey})},this.handleResend=()=>{this.resendEvent&&this.emit("sb-otp:resend",{id:this.id,event:this.resendEvent})}}get _containerElement(){return this.querySelector(`rtg-input-otp[part=${this.id?this.id:"otp"}]`)}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}buildOTPContentHTML(){const t=this.variant,r=this.length,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(){const t=this.variant||"digits_only";return ys`
|
|
6596
6588
|
<rtg-input-otp
|
|
6597
6589
|
part=${this.id?this.id:"otp"}
|
|
6598
6590
|
id=${this.dataKey??this.id??b}
|
|
@@ -6616,18 +6608,18 @@ body {
|
|
|
6616
6608
|
</rtg-button>
|
|
6617
6609
|
</div>
|
|
6618
6610
|
`:b}
|
|
6619
|
-
`}};ce([a()],exports.SbOtp.prototype,"variant",2);ce([a({type:Number})],exports.SbOtp.prototype,"length",2);ce([a({type:Number})],exports.SbOtp.prototype,"timeout",2);ce([a({attribute:"data-key"})],exports.SbOtp.prototype,"dataKey",2);ce([a()],exports.SbOtp.prototype,"event",2);ce([a({attribute:"resend-text"})],exports.SbOtp.prototype,"resendText",2);ce([a({attribute:"resend-button-text"})],exports.SbOtp.prototype,"resendButtonText",2);ce([a({attribute:"resend-event"})],exports.SbOtp.prototype,"resendEvent",2);ce([a()],exports.SbOtp.prototype,"id",2);exports.SbOtp=ce([p("sb-otp")],exports.SbOtp);var em=Object.defineProperty,rm=Object.getOwnPropertyDescriptor,Pn=(e,t,r,i)=>{for(var s=i>1?void 0:i?rm(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&&em(t,r,s),s};exports.SbSubtitle=class extends
|
|
6611
|
+
`}};ce([a()],exports.SbOtp.prototype,"variant",2);ce([a({type:Number})],exports.SbOtp.prototype,"length",2);ce([a({type:Number})],exports.SbOtp.prototype,"timeout",2);ce([a({attribute:"data-key"})],exports.SbOtp.prototype,"dataKey",2);ce([a()],exports.SbOtp.prototype,"event",2);ce([a({attribute:"resend-text"})],exports.SbOtp.prototype,"resendText",2);ce([a({attribute:"resend-button-text"})],exports.SbOtp.prototype,"resendButtonText",2);ce([a({attribute:"resend-event"})],exports.SbOtp.prototype,"resendEvent",2);ce([a()],exports.SbOtp.prototype,"id",2);exports.SbOtp=ce([p("sb-otp")],exports.SbOtp);var em=Object.defineProperty,rm=Object.getOwnPropertyDescriptor,Pn=(e,t,r,i)=>{for(var s=i>1?void 0:i?rm(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&&em(t,r,s),s};exports.SbSubtitle=class extends de{get _containerElement(){return this.querySelector(`rtg-typography-p[part=${this.id?this.id:"subtitle"}]`)}createRenderRoot(){return this}render(){return d`
|
|
6620
6612
|
<rtg-typography-p part=${this.id?this.id:"subtitle"} id=${this.id}>
|
|
6621
6613
|
${this.content}
|
|
6622
6614
|
</rtg-typography-p>
|
|
6623
|
-
`}};Pn([a({type:String})],exports.SbSubtitle.prototype,"id",2);Pn([a({type:String})],exports.SbSubtitle.prototype,"content",2);exports.SbSubtitle=Pn([p("sb-subtitle")],exports.SbSubtitle);var im=Object.defineProperty,sm=Object.getOwnPropertyDescriptor,Ri=(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&&im(t,r,s),s};exports.SbContainer=class extends
|
|
6615
|
+
`}};Pn([a({type:String})],exports.SbSubtitle.prototype,"id",2);Pn([a({type:String})],exports.SbSubtitle.prototype,"content",2);exports.SbSubtitle=Pn([p("sb-subtitle")],exports.SbSubtitle);var im=Object.defineProperty,sm=Object.getOwnPropertyDescriptor,Ri=(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&&im(t,r,s),s};exports.SbContainer=class extends de{constructor(){super(...arguments),this.id="",this.type="flex_column",this.root=!1}createRenderRoot(){return this}async firstUpdated(t){if(await this.updateComplete,!this.root){const s=this.querySelector(`div[part=${this.id?this.id:"container"}]`);console.log("first updated",s),s&&this.moveLightDomChildrenInto(s);return}const r=this.querySelector("rtg-card-content");r!=null&&r.updateComplete&&await r.updateComplete;const i=r==null?void 0:r.querySelector('div[data-slot="card-content"]');i&&this.moveLightDomChildrenInto(i),await Si()}async updated(t){await this.updateComplete,await Si()}get containerStyles(){return{display:"flex","flex-direction":this.type==="flex_column"?"column":"row"}}render(){return this.root?d`
|
|
6624
6616
|
<rtg-card part=${this.id?this.id:"container"}>
|
|
6625
6617
|
<rtg-card-content></rtg-card-content>
|
|
6626
6618
|
</rtg-card>
|
|
6627
6619
|
`:d`<div
|
|
6628
6620
|
part=${this.id?this.id:"container"}
|
|
6629
6621
|
style=${R(this.containerStyles)}
|
|
6630
|
-
></div>`}};Ri([a()],exports.SbContainer.prototype,"id",2);Ri([a()],exports.SbContainer.prototype,"type",2);Ri([a({type:Boolean})],exports.SbContainer.prototype,"root",2);Ri([a()],exports.SbContainer.prototype,"alignment",2);exports.SbContainer=Ri([p("sb-container")],exports.SbContainer);var om=Object.defineProperty,nm=Object.getOwnPropertyDescriptor,Fn=(e,t,r,i)=>{for(var s=i>1?void 0:i?nm(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&&om(t,r,s),s};exports.SbTitle=class extends
|
|
6622
|
+
></div>`}};Ri([a()],exports.SbContainer.prototype,"id",2);Ri([a()],exports.SbContainer.prototype,"type",2);Ri([a({type:Boolean})],exports.SbContainer.prototype,"root",2);Ri([a()],exports.SbContainer.prototype,"alignment",2);exports.SbContainer=Ri([p("sb-container")],exports.SbContainer);var om=Object.defineProperty,nm=Object.getOwnPropertyDescriptor,Fn=(e,t,r,i)=>{for(var s=i>1?void 0:i?nm(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&&om(t,r,s),s};exports.SbTitle=class extends de{get _containerElement(){return this.querySelector(`rtg-typography-h[part=${this.id?this.id:"title"}]`)}createRenderRoot(){return this}render(){return d`
|
|
6631
6623
|
<rtg-typography-h
|
|
6632
6624
|
part=${this.id?this.id:"title"}
|
|
6633
6625
|
level="h4"
|
|
@@ -6668,11 +6660,11 @@ body {
|
|
|
6668
6660
|
${this.logoAlign==="start"?this._renderLogo():b}
|
|
6669
6661
|
${this.label} ${this.logoAlign==="end"?this._renderLogo():b}
|
|
6670
6662
|
</rtg-badge>
|
|
6671
|
-
`}};exports.SbWatermark._ROOT="watermark";exports.SbWatermark._LOGO="logo";Sr([a({type:String})],exports.SbWatermark.prototype,"seed",2);Sr([a({attribute:"child-id",type:String})],exports.SbWatermark.prototype,"childId",2);Sr([a({type:String})],exports.SbWatermark.prototype,"label",2);Sr([a({type:String})],exports.SbWatermark.prototype,"variant",2);Sr([a({type:String})],exports.SbWatermark.prototype,"badge",2);Sr([a({attribute:"logo-align",type:String})],exports.SbWatermark.prototype,"logoAlign",2);exports.SbWatermark=Sr([p("sb-watermark")],exports.SbWatermark);var dm=Object.defineProperty,cm=Object.getOwnPropertyDescriptor,Jr=(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&&dm(t,r,s),s};exports.SbCountdown=class extends
|
|
6663
|
+
`}};exports.SbWatermark._ROOT="watermark";exports.SbWatermark._LOGO="logo";Sr([a({type:String})],exports.SbWatermark.prototype,"seed",2);Sr([a({attribute:"child-id",type:String})],exports.SbWatermark.prototype,"childId",2);Sr([a({type:String})],exports.SbWatermark.prototype,"label",2);Sr([a({type:String})],exports.SbWatermark.prototype,"variant",2);Sr([a({type:String})],exports.SbWatermark.prototype,"badge",2);Sr([a({attribute:"logo-align",type:String})],exports.SbWatermark.prototype,"logoAlign",2);exports.SbWatermark=Sr([p("sb-watermark")],exports.SbWatermark);var dm=Object.defineProperty,cm=Object.getOwnPropertyDescriptor,Jr=(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&&dm(t,r,s),s};exports.SbCountdown=class extends de{constructor(){super(...arguments),this.content="",this.duration=5,this.redirectUrl="/",this.id="",this.seconds=0,this.timerId=null}get _containerElement(){return this.querySelector(`div[part=${this.id?this.id:"countdown"}]`)}createRenderRoot(){return this}firstUpdated(t){}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){this.seconds=Math.max(0,this.duration||0),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer(),window.location.href=this.redirectUrl||"/"}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.content} ${this.seconds}s...`}render(){return d`
|
|
6672
6664
|
<div part=${this.id?this.id:"countdown"}>
|
|
6673
6665
|
<rtg-typography-p>${this.renderContent()}</rtg-typography-p>
|
|
6674
6666
|
</div>
|
|
6675
|
-
`}};Jr([a()],exports.SbCountdown.prototype,"content",2);Jr([a({type:Number})],exports.SbCountdown.prototype,"duration",2);Jr([a({attribute:"redirect-url"})],exports.SbCountdown.prototype,"redirectUrl",2);Jr([a()],exports.SbCountdown.prototype,"id",2);Jr([x()],exports.SbCountdown.prototype,"seconds",2);exports.SbCountdown=Jr([p("sb-countdown")],exports.SbCountdown);const
|
|
6667
|
+
`}};Jr([a()],exports.SbCountdown.prototype,"content",2);Jr([a({type:Number})],exports.SbCountdown.prototype,"duration",2);Jr([a({attribute:"redirect-url"})],exports.SbCountdown.prototype,"redirectUrl",2);Jr([a()],exports.SbCountdown.prototype,"id",2);Jr([x()],exports.SbCountdown.prototype,"seconds",2);exports.SbCountdown=Jr([p("sb-countdown")],exports.SbCountdown);const hc="sb:env",Fs="sb:auth",Ts="customizations",Tn=Symbol("renderSpecContext");var uc=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(uc||{}),tn=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(tn||{}),Ne=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(Ne||{}),qt=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(qt||{}),Xt=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Xt||{}),Ot=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(Ot||{});function $i(){return te`<svg
|
|
6676
6668
|
width="16"
|
|
6677
6669
|
height="16"
|
|
6678
6670
|
viewBox="0 0 16 16"
|
|
@@ -6688,7 +6680,7 @@ body {
|
|
|
6688
6680
|
stroke-linecap="round"
|
|
6689
6681
|
stroke-linejoin="round"
|
|
6690
6682
|
/>
|
|
6691
|
-
</svg>`}function
|
|
6683
|
+
</svg>`}function hm(){return te`<svg
|
|
6692
6684
|
width="20"
|
|
6693
6685
|
height="20"
|
|
6694
6686
|
viewBox="0 0 20 20"
|
|
@@ -6704,7 +6696,7 @@ body {
|
|
|
6704
6696
|
d="M14.2328 11.7914C11.9078 10.2414 8.11615 10.2414 5.77448 11.7914C4.71615 12.4997 4.13281 13.4581 4.13281 14.4831C4.13281 15.5081 4.71615 16.4581 5.76615 17.1581C6.93281 17.9414 8.46615 18.3331 9.99948 18.3331C11.5328 18.3331 13.0661 17.9414 14.2328 17.1581C15.2828 16.4497 15.8661 15.4997 15.8661 14.4664C15.8578 13.4414 15.2828 12.4914 14.2328 11.7914Z"
|
|
6705
6697
|
fill="#737373"
|
|
6706
6698
|
/>
|
|
6707
|
-
</svg>`}function
|
|
6699
|
+
</svg>`}function um(){return te`<svg
|
|
6708
6700
|
width="24"
|
|
6709
6701
|
height="24"
|
|
6710
6702
|
viewBox="0 0 24 24"
|
|
@@ -6719,7 +6711,7 @@ body {
|
|
|
6719
6711
|
d="M12 6.92969C9.93 6.92969 8.25 8.60969 8.25 10.6797C8.25 12.7097 9.84 14.3597 11.95 14.4197C11.98 14.4197 12.02 14.4197 12.04 14.4197C12.06 14.4197 12.09 14.4197 12.11 14.4197C12.12 14.4197 12.13 14.4197 12.13 14.4197C14.15 14.3497 15.74 12.7097 15.75 10.6797C15.75 8.60969 14.07 6.92969 12 6.92969Z"
|
|
6720
6712
|
fill="#737373"
|
|
6721
6713
|
/>
|
|
6722
|
-
</svg>`}function pm(){return
|
|
6714
|
+
</svg>`}function pm(){return te`<svg
|
|
6723
6715
|
width="24"
|
|
6724
6716
|
height="24"
|
|
6725
6717
|
viewBox="0 0 24 24"
|
|
@@ -6730,7 +6722,7 @@ body {
|
|
|
6730
6722
|
d="M20.6191 8.45C19.5691 3.83 15.5391 1.75 11.9991 1.75C11.9991 1.75 11.9991 1.75 11.9891 1.75C8.45912 1.75 4.41912 3.82 3.36912 8.44C2.19912 13.6 5.35912 17.97 8.21912 20.72C9.27912 21.74 10.6391 22.25 11.9991 22.25C13.3591 22.25 14.7191 21.74 15.7691 20.72C18.6291 17.97 21.7891 13.61 20.6191 8.45ZM11.9991 13.46C10.2591 13.46 8.84912 12.05 8.84912 10.31C8.84912 8.57 10.2591 7.16 11.9991 7.16C13.7391 7.16 15.1491 8.57 15.1491 10.31C15.1491 12.05 13.7391 13.46 11.9991 13.46Z"
|
|
6731
6723
|
fill="#737373"
|
|
6732
6724
|
/>
|
|
6733
|
-
</svg>`}function gm(){return
|
|
6725
|
+
</svg>`}function gm(){return te`<svg
|
|
6734
6726
|
width="24"
|
|
6735
6727
|
height="24"
|
|
6736
6728
|
viewBox="0 0 24 24"
|
|
@@ -6744,7 +6736,7 @@ body {
|
|
|
6744
6736
|
stroke-linecap="round"
|
|
6745
6737
|
stroke-linejoin="round"
|
|
6746
6738
|
/>
|
|
6747
|
-
</svg>`}function mm(){return
|
|
6739
|
+
</svg>`}function mm(){return te`
|
|
6748
6740
|
<svg
|
|
6749
6741
|
class="sb-text-foreground"
|
|
6750
6742
|
xmlns="http://www.w3.org/2000/svg"]
|
|
@@ -6754,7 +6746,7 @@ body {
|
|
|
6754
6746
|
fill="none">
|
|
6755
6747
|
<path d="M9 1L1 9M1 1L9 9" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6756
6748
|
</svg>
|
|
6757
|
-
`}function bm(){return
|
|
6749
|
+
`}function bm(){return te`
|
|
6758
6750
|
<svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6759
6751
|
<path d="M1 7H17M1 1H17M1 13H17" stroke="#0A0A0A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6760
6752
|
</svg>
|
|
@@ -6766,11 +6758,11 @@ body {
|
|
|
6766
6758
|
>`;case"simple":return d`${i(r.slice(0,3))}${s()}${i(r.slice(3))}`;case"with_separator":return d`
|
|
6767
6759
|
${i(r.slice(0,2))}${s()}
|
|
6768
6760
|
${i(r.slice(2,4))}${s()} ${i(r.slice(4))}
|
|
6769
|
-
`;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,u,
|
|
6761
|
+
`;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`
|
|
6770
6762
|
<div
|
|
6771
|
-
class=${Z("sb-w-full",
|
|
6763
|
+
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")}
|
|
6772
6764
|
>
|
|
6773
|
-
${
|
|
6765
|
+
${u?d`
|
|
6774
6766
|
<div class="sb-flex sb-items-center sb-justify-between sb-gap-2">
|
|
6775
6767
|
<div class=${s} style=${R(o)}>
|
|
6776
6768
|
${t}
|
|
@@ -6782,7 +6774,7 @@ body {
|
|
|
6782
6774
|
<div class="sb-flex-1 sb-min-w-0">
|
|
6783
6775
|
<rtg-input
|
|
6784
6776
|
customClass=${n}
|
|
6785
|
-
customStyle=${R(
|
|
6777
|
+
customStyle=${R(h)}
|
|
6786
6778
|
.value=${r}
|
|
6787
6779
|
disabled
|
|
6788
6780
|
></rtg-input>
|
|
@@ -6794,7 +6786,7 @@ body {
|
|
|
6794
6786
|
<div class="sb-flex-1 sb-min-w-0">
|
|
6795
6787
|
<rtg-input
|
|
6796
6788
|
customClass=${n}
|
|
6797
|
-
customStyle=${R(
|
|
6789
|
+
customStyle=${R(h)}
|
|
6798
6790
|
.value=${r}
|
|
6799
6791
|
disabled
|
|
6800
6792
|
></rtg-input>
|
|
@@ -6804,7 +6796,7 @@ body {
|
|
|
6804
6796
|
</rtg-button>
|
|
6805
6797
|
`}
|
|
6806
6798
|
</div>
|
|
6807
|
-
`}renderEditForm(t,r,i,s){const{class:o,style:n}=this.getContainerStyles(!0),{class:
|
|
6799
|
+
`}renderEditForm(t,r,i,s){const{class:o,style:n}=this.getContainerStyles(!0),{class:h,style:u}=this.getInputStyles(!0),{defaultMapped:g,outlineMapped:y}=this.getButtonStyles(),w=t==="email"?"Edit email address":"Edit phone number",E=t==="email"?"Type your new email address to replace the old one.":"Type your new phone number to replace the old one.";return d`
|
|
6808
6800
|
<rtg-card
|
|
6809
6801
|
customClass=${Z("!sb-pt-4",o)}
|
|
6810
6802
|
customStyle=${R(n)}
|
|
@@ -6820,8 +6812,8 @@ body {
|
|
|
6820
6812
|
<rtg-card-content>
|
|
6821
6813
|
<div class="sb-flex sb-flex-col sb-gap-3 sb-mx-4 sb-mb-8 sb-mt-4">
|
|
6822
6814
|
<rtg-input
|
|
6823
|
-
customClass=${
|
|
6824
|
-
customStyle=${R(
|
|
6815
|
+
customClass=${h}
|
|
6816
|
+
customStyle=${R(u)}
|
|
6825
6817
|
placeholder=${r}
|
|
6826
6818
|
type=${t==="phone"?"tel":"text"}
|
|
6827
6819
|
></rtg-input>
|
|
@@ -6846,7 +6838,7 @@ body {
|
|
|
6846
6838
|
>
|
|
6847
6839
|
</rtg-card-footer>
|
|
6848
6840
|
</rtg-card>
|
|
6849
|
-
`}renderVerificationForm(t,r){const{class:i,style:s}=this.getContainerStyles(!0),{defaultMapped:o,outlineMapped:n}=this.getButtonStyles(),{class:
|
|
6841
|
+
`}renderVerificationForm(t,r){const{class:i,style:s}=this.getContainerStyles(!0),{defaultMapped:o,outlineMapped:n}=this.getButtonStyles(),{class:h,style:u}=this.getInputStyles(),g=t==="email"?"Email verification required":"Phone number verification required",y=t==="email"?"Please enter the code to verify this email.":"Please enter the code to verify this phone number.";return d`
|
|
6850
6842
|
<rtg-card
|
|
6851
6843
|
customClass=${Z("!sb-pt-4",i)}
|
|
6852
6844
|
customStyle=${R(s)}
|
|
@@ -6864,8 +6856,8 @@ body {
|
|
|
6864
6856
|
class="sb-flex sb-items-center sb-flex-col sb-gap-3 sb-mx-4 sb-mb-8 sb-mt-4"
|
|
6865
6857
|
>
|
|
6866
6858
|
<rtg-input-otp
|
|
6867
|
-
customClass=${
|
|
6868
|
-
customStyle=${R(
|
|
6859
|
+
customClass=${h}
|
|
6860
|
+
customStyle=${R(u)}
|
|
6869
6861
|
variant=${this.otpVariant}
|
|
6870
6862
|
>
|
|
6871
6863
|
${ym(this.otpVariant,this.otpLength)}
|
|
@@ -6893,7 +6885,7 @@ body {
|
|
|
6893
6885
|
>
|
|
6894
6886
|
</rtg-card-footer>
|
|
6895
6887
|
</rtg-card>
|
|
6896
|
-
`}renderEmailSection(){return this.isVerifyingEmail?this.renderVerificationForm("email",()=>(this.isVerifyingEmail=!1,this.isEditingEmail=!0)):this.isEditingEmail?this.renderEditForm("email","Email",()=>(this.isVerifyingEmail=!0,this.isEditingEmail=!1),()=>this.isEditingEmail=!1):this.renderDisplayRow("Email",this.account.email,()=>this.isEditingEmail=!0)}renderPhoneSection(){return this.isVerifyingPhone?this.renderVerificationForm("phone",()=>(this.isVerifyingPhone=!1,this.isEditingPhone=!0)):this.isEditingPhone?this.renderEditForm("phone","Phone Number",()=>(this.isVerifyingPhone=!0,this.isEditingPhone=!1),()=>this.isEditingPhone=!1):this.renderDisplayRow("Phone number",this.account.phone,()=>this.isEditingPhone=!0)}renderHeader(){var o,n,u,
|
|
6888
|
+
`}renderEmailSection(){return this.isVerifyingEmail?this.renderVerificationForm("email",()=>(this.isVerifyingEmail=!1,this.isEditingEmail=!0)):this.isEditingEmail?this.renderEditForm("email","Email",()=>(this.isVerifyingEmail=!0,this.isEditingEmail=!1),()=>this.isEditingEmail=!1):this.renderDisplayRow("Email",this.account.email,()=>this.isEditingEmail=!0)}renderPhoneSection(){return this.isVerifyingPhone?this.renderVerificationForm("phone",()=>(this.isVerifyingPhone=!1,this.isEditingPhone=!0)):this.isEditingPhone?this.renderEditForm("phone","Phone Number",()=>(this.isVerifyingPhone=!0,this.isEditingPhone=!1),()=>this.isEditingPhone=!1):this.renderDisplayRow("Phone number",this.account.phone,()=>this.isEditingPhone=!0)}renderHeader(){var o,n,h,u,g,y,w,E,C,S,k,O;const{class:t,style:r}=I(Ls,{},(g=(u=(h=(n=(o=this.customizations)==null?void 0:o.byType)==null?void 0:n.userProfile)==null?void 0:h.userProfileCard)==null?void 0:u.header)==null?void 0:g.container,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations),{class:i,style:s}=I(Ns,{},(S=(C=(E=(w=(y=this.customizations)==null?void 0:y.byType)==null?void 0:w.userProfile)==null?void 0:E.userProfileCard)==null?void 0:C.header)==null?void 0:S.title,T.USER_PROFILE_CARD_HEADER_CONTAINER,this.customizations);return d`
|
|
6897
6889
|
<rtg-card-header
|
|
6898
6890
|
customClass=${t}
|
|
6899
6891
|
customStyle=${R(r)}
|
|
@@ -6902,7 +6894,7 @@ body {
|
|
|
6902
6894
|
customClass=${i}
|
|
6903
6895
|
customStyle=${R(s)}
|
|
6904
6896
|
>
|
|
6905
|
-
${((k=this.content)==null?void 0:k.icon)||
|
|
6897
|
+
${((k=this.content)==null?void 0:k.icon)||hm()}
|
|
6906
6898
|
<span>${((O=this.content)==null?void 0:O.title)||"Account"}</span>
|
|
6907
6899
|
</rtg-card-title>
|
|
6908
6900
|
</rtg-card-header>
|
|
@@ -6951,7 +6943,7 @@ body {
|
|
|
6951
6943
|
</div>
|
|
6952
6944
|
</rtg-card-content>
|
|
6953
6945
|
</rtg-card>
|
|
6954
|
-
`}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,u,
|
|
6946
|
+
`}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`
|
|
6955
6947
|
<rtg-input
|
|
6956
6948
|
customClass="${r.class}"
|
|
6957
6949
|
customStyle="${R(r.style)}"
|
|
@@ -6980,21 +6972,21 @@ body {
|
|
|
6980
6972
|
Cancel
|
|
6981
6973
|
</rtg-button>
|
|
6982
6974
|
</rtg-card-footer>
|
|
6983
|
-
`}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(),
|
|
6975
|
+
`}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`
|
|
6984
6976
|
<rtg-card
|
|
6985
6977
|
customClass=${y.class}
|
|
6986
6978
|
customStyle=${R(y.style)}
|
|
6987
6979
|
>
|
|
6988
6980
|
<!-- Header -->
|
|
6989
6981
|
<rtg-card-header
|
|
6990
|
-
customClass=${
|
|
6991
|
-
customStyle=${R(
|
|
6982
|
+
customClass=${h.class}
|
|
6983
|
+
customStyle=${R(h.style)}
|
|
6992
6984
|
>
|
|
6993
6985
|
<rtg-card-title
|
|
6994
|
-
customClass=${
|
|
6995
|
-
customStyle=${R(
|
|
6986
|
+
customClass=${u.class}
|
|
6987
|
+
customStyle=${R(u.style)}
|
|
6996
6988
|
>
|
|
6997
|
-
${(J=this.content)!=null&&J.icon?(it=this.content)==null?void 0:it.icon:
|
|
6989
|
+
${(J=this.content)!=null&&J.icon?(it=this.content)==null?void 0:it.icon:um()}
|
|
6998
6990
|
|
|
6999
6991
|
<span>
|
|
7000
6992
|
${(st=this.content)!=null&&st.title?(U=this.content)==null?void 0:U.title:"Personal Info"}
|
|
@@ -7036,7 +7028,7 @@ body {
|
|
|
7036
7028
|
<!-- Footer -->
|
|
7037
7029
|
${this.isEditing?this.renderFooter(s,o):null}
|
|
7038
7030
|
</rtg-card>
|
|
7039
|
-
`}};$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,u,
|
|
7031
|
+
`}};$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`
|
|
7040
7032
|
<rtg-input
|
|
7041
7033
|
customClass="${r.class}"
|
|
7042
7034
|
customStyle="${R(r.style)}"
|
|
@@ -7065,19 +7057,19 @@ body {
|
|
|
7065
7057
|
Cancel
|
|
7066
7058
|
</rtg-button>
|
|
7067
7059
|
</rtg-card-footer>
|
|
7068
|
-
`}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(),
|
|
7060
|
+
`}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`
|
|
7069
7061
|
<rtg-card
|
|
7070
7062
|
customClass=${y.class}
|
|
7071
7063
|
customStyle=${R(y.style)}
|
|
7072
7064
|
>
|
|
7073
7065
|
<!-- Header -->
|
|
7074
7066
|
<rtg-card-header
|
|
7075
|
-
customClass=${
|
|
7076
|
-
customStyle=${R(
|
|
7067
|
+
customClass=${h.class}
|
|
7068
|
+
customStyle=${R(h.style)}
|
|
7077
7069
|
>
|
|
7078
7070
|
<rtg-card-title
|
|
7079
|
-
customClass=${
|
|
7080
|
-
customStyle=${R(
|
|
7071
|
+
customClass=${u.class}
|
|
7072
|
+
customStyle=${R(u.style)}
|
|
7081
7073
|
>
|
|
7082
7074
|
${(J=this.content)!=null&&J.icon?this.content.icon:pm()}
|
|
7083
7075
|
<span>
|
|
@@ -7121,7 +7113,7 @@ body {
|
|
|
7121
7113
|
<!-- Footer -->
|
|
7122
7114
|
${this.isEditing?this.renderFooter(s,o):null}
|
|
7123
7115
|
</rtg-card>
|
|
7124
|
-
`}};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,u,
|
|
7116
|
+
`}};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`
|
|
7125
7117
|
<rtg-input
|
|
7126
7118
|
customClass="${r.class}"
|
|
7127
7119
|
customStyle="${R(r.style)}"
|
|
@@ -7150,19 +7142,19 @@ body {
|
|
|
7150
7142
|
Cancel
|
|
7151
7143
|
</rtg-button>
|
|
7152
7144
|
</rtg-card-footer>
|
|
7153
|
-
`}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(),
|
|
7145
|
+
`}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`
|
|
7154
7146
|
<rtg-card
|
|
7155
7147
|
customClass=${y.class}
|
|
7156
7148
|
customStyle=${R(y.style)}
|
|
7157
7149
|
>
|
|
7158
7150
|
<!-- Header -->
|
|
7159
7151
|
<rtg-card-header
|
|
7160
|
-
customClass=${
|
|
7161
|
-
customStyle=${R(
|
|
7152
|
+
customClass=${h.class}
|
|
7153
|
+
customStyle=${R(h.style)}
|
|
7162
7154
|
>
|
|
7163
7155
|
<rtg-card-title
|
|
7164
|
-
customClass=${
|
|
7165
|
-
customStyle=${R(
|
|
7156
|
+
customClass=${u.class}
|
|
7157
|
+
customStyle=${R(u.style)}
|
|
7166
7158
|
>
|
|
7167
7159
|
${(J=this.content)!=null&&J.icon?this.content.icon:gm()}
|
|
7168
7160
|
<span>${((it=this.content)==null?void 0:it.title)??"URLs"}</span>
|
|
@@ -7205,8 +7197,8 @@ body {
|
|
|
7205
7197
|
<!-- Footer -->
|
|
7206
7198
|
${this.isEditing?this.renderFooter(s,o):null}
|
|
7207
7199
|
</rtg-card>
|
|
7208
|
-
`}};Er([a({type:Object})],exports.SbUrlsInfo.prototype,"URLsInfo",2);Er([a({type:Boolean})],exports.SbUrlsInfo.prototype,"showIcons",2);Er([a({type:Object})],exports.SbUrlsInfo.prototype,"customizations",2);Er([a({type:String})],exports.SbUrlsInfo.prototype,"layout",2);Er([a({type:Object})],exports.SbUrlsInfo.prototype,"content",2);Er([x()],exports.SbUrlsInfo.prototype,"isEditing",2);exports.SbUrlsInfo=Er([p("sb-urls-info")],exports.SbUrlsInfo);var Em=Object.defineProperty,km=Object.getOwnPropertyDescriptor,ft=(e,t,r,i)=>{for(var s=i>1?void 0:i?km(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&&Em(t,r,s),s};exports.Profile=class extends v{constructor(){super(...arguments),this.showAvatarMenu=!1,this.customizations=null,this.showIcons=!0,this.orientation=
|
|
7209
|
-
${this.orientation===
|
|
7200
|
+
`}};Er([a({type:Object})],exports.SbUrlsInfo.prototype,"URLsInfo",2);Er([a({type:Boolean})],exports.SbUrlsInfo.prototype,"showIcons",2);Er([a({type:Object})],exports.SbUrlsInfo.prototype,"customizations",2);Er([a({type:String})],exports.SbUrlsInfo.prototype,"layout",2);Er([a({type:Object})],exports.SbUrlsInfo.prototype,"content",2);Er([x()],exports.SbUrlsInfo.prototype,"isEditing",2);exports.SbUrlsInfo=Er([p("sb-urls-info")],exports.SbUrlsInfo);var Em=Object.defineProperty,km=Object.getOwnPropertyDescriptor,ft=(e,t,r,i)=>{for(var s=i>1?void 0:i?km(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&&Em(t,r,s),s};exports.Profile=class extends v{constructor(){super(...arguments),this.showAvatarMenu=!1,this.customizations=null,this.showIcons=!0,this.orientation=Xt.HORIZONTAL,this.sidebarDisplayType=qt.REGULAR,this.mode=Ne==null?void 0:Ne.PAGE,this.widgetsLayout=Ot.ROW,this.content=null}createRenderRoot(){return this}render(){var i,s,o,n;return d`
|
|
7201
|
+
${this.orientation===Xt.VERTICAL||this.sidebarDisplayType===qt.BURGER?null:d`
|
|
7210
7202
|
<div class=${"sb-flex sb-items-center sb-justify-between sb-mb-4"}>
|
|
7211
7203
|
<div class=${"sb-font-medium sb-text-[18px] sb-text-foreground"}>Profile</div>
|
|
7212
7204
|
</div>
|
|
@@ -7239,21 +7231,21 @@ body {
|
|
|
7239
7231
|
.URLsInfo=${this.urls}
|
|
7240
7232
|
.layout=${this.widgetsLayout}
|
|
7241
7233
|
></sb-urls-info>
|
|
7242
|
-
`}};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=
|
|
7234
|
+
`}};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`
|
|
7243
7235
|
<rtg-tab-list
|
|
7244
7236
|
orientation=${t?"vertical":"horizontal"}
|
|
7245
7237
|
class="sb-flex sb-w-full ${t?"":"sb-mb-4"}"
|
|
7246
7238
|
customStyle="${R(s)}"
|
|
7247
|
-
customClass="${Z(Rm,t?
|
|
7239
|
+
customClass="${Z(Rm,t?Au:Ou,i)}"
|
|
7248
7240
|
>
|
|
7249
|
-
${e.map(
|
|
7241
|
+
${e.map(u=>d`
|
|
7250
7242
|
<div class=${t?"sb-mb-2":""}>
|
|
7251
7243
|
<rtg-tab-trigger
|
|
7252
|
-
customClass="${
|
|
7253
|
-
value=${
|
|
7244
|
+
customClass="${Iu}"
|
|
7245
|
+
value=${u.value}
|
|
7254
7246
|
@tab-trigger-click=${r}
|
|
7255
7247
|
>
|
|
7256
|
-
${
|
|
7248
|
+
${u.label}
|
|
7257
7249
|
</rtg-tab-trigger>
|
|
7258
7250
|
</div>
|
|
7259
7251
|
`)}
|
|
@@ -7283,7 +7275,7 @@ body {
|
|
|
7283
7275
|
class="${Pm} ${this.isMenuOpen?"sb-block sb-opacity-100":"sb-hidden sb-opacity-0"}"
|
|
7284
7276
|
@click=${this.toggleMenu}
|
|
7285
7277
|
></div>
|
|
7286
|
-
`}render(){var s,o,n;const e=this.orientation===
|
|
7278
|
+
`}render(){var s,o,n;const e=this.orientation===Xt.VERTICAL,t=this.orientation===Xt.HORIZONTAL,{class:r,style:i}=I("",{},(n=(o=(s=this.customizations)==null?void 0:s.byType)==null?void 0:o.userProfile)==null?void 0:n.sidebar,T.USER_PROFILE_SIDEBAR,this.customizations);return d`
|
|
7287
7279
|
<div
|
|
7288
7280
|
style="${R(i)}"
|
|
7289
7281
|
class="${Z("sb-overflow-x-auto sb-flex sb-items-center sb-h-[100%]",e?pd.vertical:pd.horizontal,r)}"
|
|
@@ -7297,14 +7289,14 @@ body {
|
|
|
7297
7289
|
`:null}
|
|
7298
7290
|
</div>
|
|
7299
7291
|
${this.displayType===qt.BURGER?this.renderMobileDrawer():null}
|
|
7300
|
-
`}};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,
|
|
7292
|
+
`}};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`
|
|
7301
7293
|
<button
|
|
7302
7294
|
class="sb-absolute sb-bg-background sb-right-8 sb-top-8 sb-z-10"
|
|
7303
7295
|
@click=${()=>this.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}
|
|
7304
7296
|
>
|
|
7305
7297
|
${mm()}
|
|
7306
7298
|
</button>
|
|
7307
|
-
`:b}renderWatermark(){return this.orientation!==
|
|
7299
|
+
`:b}renderWatermark(){return this.orientation!==Xt.VERTICAL?b:d`
|
|
7308
7300
|
<div
|
|
7309
7301
|
class="sb-fixed sb-bottom-0 sb-w-[-webkit-fill-available] sb-py-4 sb-bg-background"
|
|
7310
7302
|
>
|
|
@@ -7329,7 +7321,7 @@ body {
|
|
|
7329
7321
|
|
|
7330
7322
|
<div class=${this.contentClasses}>
|
|
7331
7323
|
<div class="sb-relative sb-[transform:translateZ(0)]">
|
|
7332
|
-
<rtg-tab-content value=${
|
|
7324
|
+
<rtg-tab-content value=${uc.PROFILE}>
|
|
7333
7325
|
<sb-profile
|
|
7334
7326
|
.customizations=${t}
|
|
7335
7327
|
.content=${this.content}
|
|
@@ -7356,10 +7348,10 @@ body {
|
|
|
7356
7348
|
@click=${()=>this.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}
|
|
7357
7349
|
></div>
|
|
7358
7350
|
|
|
7359
|
-
<div class=${$
|
|
7360
|
-
<div class=${
|
|
7351
|
+
<div class=${$u}>
|
|
7352
|
+
<div class=${Cu}>${this.renderProfileContent()}</div>
|
|
7361
7353
|
</div>
|
|
7362
|
-
`:this.renderProfileContent():b}createRenderRoot(){return this}}
|
|
7354
|
+
`:this.renderProfileContent():b}createRenderRoot(){return this}}he([a({type:Boolean})],Gt.prototype,"showAvatarMenu");he([a({type:String})],Gt.prototype,"orientation");he([a({type:String})],Gt.prototype,"mobileDisplay");he([a({type:String})],Gt.prototype,"mode");he([a({type:String})],Gt.prototype,"widgetsLayout");he([a({type:Object})],Gt.prototype,"content");he([a({type:Object})],Gt.prototype,"customizations");he([Lt({context:Ts,subscribe:!0})],Gt.prototype,"providedCustomizations");he([x()],Gt.prototype,"isOpen");he([x()],Gt.prototype,"currentBreakpoint");customElements.define("sb-user-profile",Gt);var Nm=Object.defineProperty,zm=Object.getOwnPropertyDescriptor,Vs=(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&&Nm(t,r,s),s};exports.PreviewComponent=class extends v{constructor(){super(...arguments),this.loading=!1,this.renderSpec=null,this.customizations={byType:{},config:{font:"font-geist"}}}createRenderRoot(){return this}render(){return d`
|
|
7363
7355
|
${this.loading?d`<div class="sb-p-8 sb-text-center">Loading...</div>`:d`
|
|
7364
7356
|
<sb-provider>
|
|
7365
7357
|
<signed-out>
|
|
@@ -7393,14 +7385,14 @@ body {
|
|
|
7393
7385
|
customClass=${r}
|
|
7394
7386
|
.customStyle=${i}
|
|
7395
7387
|
></linear-loader>
|
|
7396
|
-
`}};Gs([Lt({context:Tn,subscribe:!0})],exports.SbSignUp.prototype,"renderSpec",2);Gs([a({type:Object})],exports.SbSignUp.prototype,"customizations",2);Gs([Lt({context:Ts,subscribe:!0})],exports.SbSignUp.prototype,"providedCustomizations",2);exports.SbSignUp=Gs([p("sb-signup")],exports.SbSignUp);var Mm=Object.defineProperty,qm=Object.getOwnPropertyDescriptor,De=(e,t,r,i)=>{for(var s=i>1?void 0:i?qm(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&&Mm(t,r,s),s};exports.SaasBaseLayout=class extends v{constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.formData={},this.errors={},this._prevErrors={},this.loadingButtons={},this.eventEmitting=!1,this.theme=this.getTheme(),this.prevHeight=0,this.resizeRAF=null,this.isAnimating=!1}createRenderRoot(){return this}getTheme(){return document.documentElement.getAttribute("data-theme")}firstUpdated(t){this.hydrateSbComponents()}updated(t){this.hydrateSbComponents(),t.has("renderSpec")&&this.renderSpec&&(this.formData=this.collectDataKeys(this.renderSpec.root_container)),JSON.stringify(this._prevErrors)!==JSON.stringify(this.errors)&&Promise.resolve().then(()=>this.animateHeight()),this._prevErrors={...this.errors}}hydrateSbComponents(){const t=this.renderRoot;if(!t)return;t.querySelectorAll("sb-otp, sb-logo, sb-title, sb-subtitle, sb-header, sb-gap, sb-countdown").forEach(i=>{const s=i;s.__hydrated||(s.component=this,s.__hydrated=!0)})}_findSubmitButton(t){const r=i=>{if(i.element_type==="button"&&i.properties.submit===!0)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 r(t)}_wrapSubmitButtons(t){return t}render(){var o,n,
|
|
7388
|
+
`}};Gs([Lt({context:Tn,subscribe:!0})],exports.SbSignUp.prototype,"renderSpec",2);Gs([a({type:Object})],exports.SbSignUp.prototype,"customizations",2);Gs([Lt({context:Ts,subscribe:!0})],exports.SbSignUp.prototype,"providedCustomizations",2);exports.SbSignUp=Gs([p("sb-signup")],exports.SbSignUp);var Mm=Object.defineProperty,qm=Object.getOwnPropertyDescriptor,De=(e,t,r,i)=>{for(var s=i>1?void 0:i?qm(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&&Mm(t,r,s),s};exports.SaasBaseLayout=class extends v{constructor(){super(...arguments),this.renderSpec=null,this.customizations=null,this.formData={},this.errors={},this._prevErrors={},this.loadingButtons={},this.eventEmitting=!1,this.theme=this.getTheme(),this.prevHeight=0,this.resizeRAF=null,this.isAnimating=!1}createRenderRoot(){return this}getTheme(){return document.documentElement.getAttribute("data-theme")}firstUpdated(t){this.hydrateSbComponents()}updated(t){this.hydrateSbComponents(),t.has("renderSpec")&&this.renderSpec&&(this.formData=this.collectDataKeys(this.renderSpec.root_container)),JSON.stringify(this._prevErrors)!==JSON.stringify(this.errors)&&Promise.resolve().then(()=>this.animateHeight()),this._prevErrors={...this.errors}}hydrateSbComponents(){const t=this.renderRoot;if(!t)return;t.querySelectorAll("sb-otp, sb-logo, sb-title, sb-subtitle, sb-header, sb-gap, sb-countdown").forEach(i=>{const s=i;s.__hydrated||(s.component=this,s.__hydrated=!0)})}_findSubmitButton(t){const r=i=>{if(i.element_type==="button"&&i.properties.submit===!0)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 r(t)}_wrapSubmitButtons(t){return t}render(){var o,n,h;const{class:t,style:r}=I("",{},(h=(n=(o=this.customizations)==null?void 0:o.byType)==null?void 0:n.loader)==null?void 0:h.linear,"",this.customizations);if(!this.renderSpec)return d`<linear-loader
|
|
7397
7389
|
class="sb-fixed sb-w-full sb-top-0 sb-left-0"
|
|
7398
7390
|
customClass=${t}
|
|
7399
7391
|
.customStyle=${r}
|
|
7400
7392
|
></linear-loader>`;const i=this._findSubmitButton(this.renderSpec.root_container),s=(i==null?void 0:i.id)??null;return d`
|
|
7401
7393
|
<form
|
|
7402
7394
|
id="sb-layout-form"
|
|
7403
|
-
@submit=${
|
|
7395
|
+
@submit=${u=>this._onSubmit(u,s)}
|
|
7404
7396
|
class="sb-w-full sb-h-full"
|
|
7405
7397
|
novalidate
|
|
7406
7398
|
>
|
|
@@ -7415,9 +7407,9 @@ body {
|
|
|
7415
7407
|
${this._wrapSubmitButtons(En(this,this.renderSpec.root_container,this.theme))}
|
|
7416
7408
|
</div>
|
|
7417
7409
|
</form>
|
|
7418
|
-
`}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
|
|
7410
|
+
`}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`
|
|
7419
7411
|
<div ?hidden=${this.auth.isAuthenticated}>${this._cachedChildren}</div>
|
|
7420
7412
|
`:b}};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`
|
|
7421
7413
|
<div ?hidden=${!this.auth.isAuthenticated}>${this._cachedChildren}</div>
|
|
7422
|
-
`:b}};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),b):b}};Ws([a({type:String})],exports.SbAuthenticated.prototype,"redirectUrl",2);Ws([Lt({context:
|
|
7414
|
+
`:b}};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),b):b}};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;
|
|
7423
7415
|
//# sourceMappingURL=index.js.map
|