@wacht/jsx 1.0.0-beta.61 → 1.0.0-beta.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("react"),en=require("react-dom"),Gr=require("@wacht/types");function W0(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(a,s,r.get?r:{enumerable:!0,get:()=>e[s]})}}return a.default=e,Object.freeze(a)}const n=W0(o),qr="__dev_session__",B0="__dev_session_updated_at",G0="__dev_session_updated_at";function Ja(){return typeof window<"u"&&typeof document<"u"}function Kr(e){if(!Ja())return null;const a=document.cookie?document.cookie.split(";"):[];for(const s of a){const[r,...i]=s.trim().split("=");if(r===e)return decodeURIComponent(i.join("="))}return null}function Yr(e,a){Ja()&&(document.cookie=`${e}=${encodeURIComponent(a)}; Path=/; Secure; SameSite=Lax`)}function zn(e){if(!Ja())return null;try{return window.localStorage.getItem(e)}catch{return null}}function qs(e,a){if(Ja())try{window.localStorage.setItem(e,a)}catch{}}function Qr(e){if(!e)return 0;const a=Number(e);return Number.isFinite(a)?a:0}function q0(e){const a=e==null?void 0:e.trim();if(!a)return null;try{return new URL(a.includes("://")?a:`https://${a}`).host.toLowerCase()}catch{return a.toLowerCase().replace(/\/+$/,"")}}function K0(e){const a=q0(e);if(!a)return"";const s=a.replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").slice(0,64);return s?`_${s}`:""}function fo(e){const a=K0(e);return{cookie:`${qr}${a}`,updatedAtCookie:`${B0}${a}`,storage:`${qr}${a}`,updatedAtStorage:`${G0}${a}`}}function Y0(e){const a=Kr(e.cookie);if(!a)return null;const s=Qr(Kr(e.updatedAtCookie)),r=zn(e.storage),i=Qr(zn(e.updatedAtStorage)),l=s>i||s===0&&a!==r;return(!r||l)&&(qs(e.storage,a),qs(e.updatedAtStorage,String(s||Date.now()))),a}function xt(e){if(!Ja())return null;const a=fo(e),s=Y0(a);return s||zn(a.storage)}function Ts(e,a){if(!Ja()||!e)return;const s=fo(a),r=Date.now();Yr(s.cookie,e),Yr(s.updatedAtCookie,String(r)),qs(s.storage,e),qs(s.updatedAtStorage,String(r))}const fr=o.createContext(void 0);function Q0({children:e,publicKey:a,adapter:s,uiOverrides:r}){const[i,l]=o.useState(!0),[m,c]=o.useState(null),d=o.useRef(!1);o.useEffect(()=>{async function u(){if(!d.current)try{d.current=!0,l(!0);const[f,h,g]=a.split("_");if(!g)throw new Error("Invalid public key");let x=atob(g),w=h==="test";const b=x;let j=null;if(new URLSearchParams(window.location.search).has("__dev_session__")){j=new URLSearchParams(window.location.search).get("__dev_session__"),Ts(j,b);const C=new URL(window.location.href);C.searchParams.delete("__dev_session__"),window.history.replaceState({},"",C.toString())}else j=xt(b),j&&Ts(j,b);let v={};const k=new URLSearchParams;w?k.append("__dev_session__",j??""):v={credentials:"include"};const N=await fetch(`${x}/deployment${w?"?":""}${k.toString()}`,v);if(!N.ok){l(!1);return}const _=await N.json();_.data.backend_host=x,r&&(_.data.ui_settings={..._.data.ui_settings,...r}),c(_.data),w&&N.headers.get("x-development-session")&&Ts(N.headers.get("x-development-session"),b),l(!1)}catch{l(!1)}}u()},[a,r]);const p=o.useMemo(()=>({loading:i,deployment:m,adapter:s}),[i,m,s]);return t.jsx(fr.Provider,{value:p,children:e})}async function I(e){if(!e.ok){let s=`HTTP ${e.status}: ${e.statusText}`,r;try{const l=await e.json();l.errors&&l.errors.length>0?(s=l.errors[0].message||s,r=l.errors[0].code):l.message&&(s=l.message)}catch{}const i=new Error(s);throw r&&(i.code=r),i}return{data:(await e.json()).data}}function Ce(){const e=o.useContext(fr);if(e===void 0)throw new Error("useDeployment must be used within a DeploymentProvider");if(!e.loading&&!e.deployment)throw new Error("Deployment is not loaded");return e}function je(){const{deployment:e,loading:a}=Ce(),s=o.useCallback(async(r,i)=>{if(a||!e)throw new Error("Deployment is loading");const l=J0(e),m=new Headers(l.headers);i!=null&&i.headers&&new Headers(i.headers).forEach((u,f)=>{m.set(f,u)});const c=new URL(`${e.backend_host??""}${r}`);e.mode==="staging"&&c.searchParams.append("__dev_session__",xt(e.backend_host)??"");const d=await fetch(c,{...l,...i,headers:m});return e.mode==="staging"&&d.headers.get("x-development-session")&&Ts(d.headers.get("x-development-session"),e.backend_host),d},[e,a]);return o.useMemo(()=>({client:s,loading:a}),[s,a])}function J0(e){return e.mode==="staging"?{}:{credentials:"include"}}var wo=(e=>(e.XOauth="x_oauth",e.GithubOauth="github_oauth",e.GitlabOauth="gitlab_oauth",e.GoogleOauth="google_oauth",e.FacebookOauth="facebook_oauth",e.MicrosoftOauth="microsoft_oauth",e.LinkedinOauth="linkedin_oauth",e.DiscordOauth="discord_oauth",e.AppleOauth="apple_oauth",e))(wo||{});function X0(e,a){const s={username:e1(e,a),email:t1(e,a),phone:a1(e,a),email_otp:s1(e,a),magic_link:n1(e,a),oauth:r1(e),passkey:i1(e),generic:o1(e,a)};return function(i){return s[i]}}function e1(e,a){return async({username:s,password:r,challenge_token:i})=>{var d,p;const l=new FormData;l.append("strategy","plain_username"),l.append("username",s),l.append("password",r),i&&l.append("challenge_token",i);const m=await e("/auth/signin",{method:"POST",body:l}),c=await I(m);return"data"in c&&((p=(d=c.data)==null?void 0:d.signin_attempts)!=null&&p.length)&&a(c.data.signin_attempts.at(-1)||null),c}}function t1(e,a){return async({email:s,password:r,challenge_token:i})=>{var d,p;const l=new FormData;l.append("strategy","plain_email"),l.append("email",s),l.append("password",r),i&&l.append("challenge_token",i);const m=await e("/auth/signin",{method:"POST",body:l}),c=await I(m);return"data"in c&&((p=(d=c.data)==null?void 0:d.signin_attempts)!=null&&p.length)&&a(c.data.signin_attempts.at(-1)||null),c}}function a1(e,a){return async({phone:s,challenge_token:r})=>{var c,d;const i=new FormData;i.append("strategy","phone_otp"),i.append("phone",s),r&&i.append("challenge_token",r);const l=await e("/auth/signin",{method:"POST",body:i}),m=await I(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signin_attempts)!=null&&d.length)&&a(m.data.signin_attempts.at(-1)||null),m}}function s1(e,a){return async({email:s,challenge_token:r})=>{var c,d;const i=new FormData;i.append("strategy","email_otp"),i.append("email",s),r&&i.append("challenge_token",r);const l=await e("/auth/signin",{method:"POST",body:i}),m=await I(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signin_attempts)!=null&&d.length)&&a(m.data.signin_attempts.at(-1)||null),m}}function n1(e,a){return async({email:s,challenge_token:r})=>{var c,d;const i=new FormData;i.append("strategy","magic_link"),i.append("email",s),r&&i.append("challenge_token",r);const l=await e("/auth/signin",{method:"POST",body:i}),m=await I(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signin_attempts)!=null&&d.length)&&a(m.data.signin_attempts.at(-1)||null),m}}function r1(e){return async({provider:a,redirectUri:s,challenge_token:r})=>{const i=new URLSearchParams({provider:a});s&&i.append("redirect_uri",s);const l=new FormData;r&&l.append("challenge_token",r);const m=await e(`/auth/oauth2/init?${i.toString()}`,{method:"POST",body:l}),c=await I(m);return"data"in c&&c.data.oauth_url&&(window.location.href=c.data.oauth_url),c}}function as(e){const a=new Uint8Array(e);let s="";for(let r=0;r<a.length;r++)s+=String.fromCharCode(a[r]);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Jr(e){const a=e.replace(/-/g,"+").replace(/_/g,"/"),s=a.padEnd(a.length+(4-a.length%4)%4,"="),r=atob(s),i=new Uint8Array(r.length);for(let l=0;l<r.length;l++)i[l]=r.charCodeAt(l);return i.buffer}function i1(e){return async a=>{var f;const s=new FormData;a!=null&&a.challenge_token&&s.append("challenge_token",a.challenge_token);const r=await e("/auth/passkey/login/begin",{method:"POST",body:s}),i=await I(r);if(!("data"in i))return i;const l=i.data.options.publicKey,m={challenge:Jr(l.challenge),timeout:l.timeout,rpId:l.rpId,userVerification:l.userVerification,allowCredentials:(f=l.allowCredentials)==null?void 0:f.map(h=>({type:h.type,id:Jr(h.id),transports:h.transports}))};let c;try{const h=await navigator.credentials.get({publicKey:m});if(!h)throw new Error("Failed to get credential");c=h}catch(h){throw h.name==="NotAllowedError"?new Error("No passkey found on this device. Please try a different sign-in method."):h.name==="AbortError"?new Error("Passkey sign-in was cancelled."):h}const d=c.response,p=new FormData;p.append("id",c.id),p.append("rawId",as(c.rawId)),p.append("type",c.type),p.append("clientDataJSON",as(d.clientDataJSON)),p.append("authenticatorData",as(d.authenticatorData)),p.append("signature",as(d.signature)),d.userHandle&&p.append("userHandle",as(d.userHandle));const u=await e("/auth/passkey/login/finish",{method:"POST",body:p});return I(u)}}function o1(e,a){return async({email:s,username:r,password:i,phone:l,strategy:m,challenge_token:c})=>{var f,h;const d=new FormData;m&&d.append("strategy",m),s&&d.append("email",s),r&&d.append("username",r),i&&d.append("password",i),l&&d.append("phone",l),c&&d.append("challenge_token",c);const p=await e("/auth/signin",{method:"POST",body:d}),u=await I(p);return"data"in u&&((h=(f=u.data)==null?void 0:f.signin_attempts)!=null&&h.length)&&a(u.data.signin_attempts.at(-1)||null),u}}function go(){const{client:e,loading:a}=je(),[s,r]=o.useState(null);return a?{loading:!0,signIn:null,signinAttempt:null,discardSignInAttempt:()=>{r(null)},setSignInAttempt:r}:{loading:!1,signinAttempt:s,signIn:{createStrategy:X0(e,r),completeVerification:async i=>{var d,p;const l=new FormData;l.append("verification_code",i);const m=await e(`/auth/attempt-verification?attempt_identifier=${s==null?void 0:s.id}&identifier_type=signin`,{method:"POST",body:l}),c=await I(m);if("data"in c&&((p=(d=c.data)==null?void 0:d.signin_attempts)!=null&&p.length)){const u=c.data.signin_attempts.at(-1);return r(u||null),c.data}else throw new Error("Verification failed")},prepareVerification:async i=>{var d;const l=new URL("/auth/prepare-verification",window.location.origin);l.searchParams.set("attempt_identifier",((d=s==null?void 0:s.id)==null?void 0:d.toString())||""),l.searchParams.set("strategy",i.strategy),l.searchParams.set("identifier_type","signin"),i.strategy==="phone_otp"&&i.lastDigits?l.searchParams.set("last_digits",i.lastDigits):(i.strategy==="email_otp"&&i.redirectUri||i.strategy==="magic_link"&&i.redirectUri)&&l.searchParams.set("redirect_uri",i.redirectUri);const m=new FormData;i.challenge_token&&m.append("challenge_token",i.challenge_token);const c=await e(l.pathname+l.search,{method:"POST",body:m});return I(c)},completeProfile:async i=>{var d;if(!s)throw new Error("No signin attempt found");const l=new FormData;for(const[p,u]of Object.entries(i))u&&l.append(p,u);const m=await e(`/auth/complete-profile?attempt_id=${s.id}`,{method:"POST",body:l}),c=await I(m);if("data"in c&&c.data){const p=(d=c.data.signin_attempts)==null?void 0:d.find(u=>u.id===s.id);return p&&r(p),c.data}else throw new Error("Profile completion failed")},identify:async(i,l)=>{const m=new FormData;m.append("identifier",i),l&&m.append("challenge_token",l);const c=await e("/auth/identify",{method:"POST",body:m});return(await I(c)).data},initEnterpriseSso:async(i,l,m)=>{const c=new URLSearchParams({connection_id:i});l&&c.append("redirect_uri",l);const d=new FormData;m&&d.append("challenge_token",m);const p=await e(`/auth/sso/login?${c.toString()}`,{method:"POST",body:d});return(await I(p)).data}},discardSignInAttempt:()=>{r(null)},setSignInAttempt:r}}function ls(e){const{loading:a,signIn:s,signinAttempt:r,discardSignInAttempt:i,setSignInAttempt:l}=go();if(a)return{loading:!0,signIn:null,signinAttempt:null,discardSignInAttempt:i,setSignInAttempt:l};const m=(()=>{switch(e){case"username":return s.createStrategy("username");case"email":return s.createStrategy("email");case"phone":return s.createStrategy("phone");case"email_otp":return s.createStrategy("email_otp");case"magic_link":return s.createStrategy("magic_link");case"oauth":return s.createStrategy("oauth");case"passkey":return s.createStrategy("passkey");case"generic":return s.createStrategy("generic");default:throw new Error("Invalid sign-in strategy")}})();return{loading:!1,signinAttempt:r,signIn:{create:m,completeVerification:s.completeVerification,prepareVerification:s.prepareVerification,completeProfile:s.completeProfile,identify:s.identify,initEnterpriseSso:s.initEnterpriseSso},discardSignInAttempt:i,setSignInAttempt:l}}function l1(e,a,s){return{create:async r=>{var c,d,p;const i=new FormData;for(const[u,f]of Object.entries(r))i.append(u,f);const l=await e("/auth/signup",{method:"POST",body:i}),m=await I(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signup_attempts)!=null&&d.length)&&s(((p=m.data.signup_attempts)==null?void 0:p.at(-1))||null),m},prepareVerification:async r=>{var c;const i=new URL("/auth/prepare-verification",window.location.origin);i.searchParams.set("attempt_identifier",((c=a==null?void 0:a.id)==null?void 0:c.toString())||""),i.searchParams.set("strategy",r.strategy),i.searchParams.set("identifier_type","signup"),r.strategy==="phone_otp"&&r.lastDigits?i.searchParams.set("last_digits",r.lastDigits):r.strategy==="email_otp"&&r.redirectUri&&i.searchParams.set("redirect_uri",r.redirectUri);const l=new FormData;r.challenge_token&&l.append("challenge_token",r.challenge_token);const m=await e(i.pathname+i.search,{method:"POST",body:l});return I(m)},completeVerification:async r=>{var c,d;const i=new FormData;i.append("verification_code",r);const l=await e(`/auth/attempt-verification?attempt_identifier=${a==null?void 0:a.id}&identifier_type=signup`,{method:"POST",body:i}),m=await I(l);return"data"in m&&((d=(c=m.data)==null?void 0:c.signup_attempts)!=null&&d.length)&&s(m.data.signup_attempts.at(-1)||null),m},validateDeploymentInvitation:async r=>{try{const i=await e(`/deployment/invitations/validate?token=${encodeURIComponent(r)}`,{method:"GET"}),l=await I(i);return"data"in l&&l.data?l.data:{valid:!1,message:"Failed to validate invitation",error_code:"VALIDATION_ERROR"}}catch(i){return{valid:!1,message:i.message||"Failed to validate invitation",error_code:"NETWORK_ERROR"}}}}}function xo(){const{client:e,loading:a}=je(),[s,r]=o.useState(null);return a?{loading:!0,signUp:null,signupAttempt:null,discardSignupAttempt:()=>{r(null)}}:{loading:!1,signupAttempt:s,discardSignupAttempt:()=>{r(null)},signUp:l1(e,s,r)}}var Ss={exports:{}},fn={};/**
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("react"),tn=require("react-dom"),Kr=require("@wacht/types");function q0(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(a,s,r.get?r:{enumerable:!0,get:()=>e[s]})}}return a.default=e,Object.freeze(a)}const n=q0(o),Yr="__dev_session__",K0="__dev_session_updated_at",Y0="__dev_session_updated_at";function Xa(){return typeof window<"u"&&typeof document<"u"}function Qr(e){if(!Xa())return null;const a=document.cookie?document.cookie.split(";"):[];for(const s of a){const[r,...i]=s.trim().split("=");if(r===e)return decodeURIComponent(i.join("="))}return null}function Jr(e,a){Xa()&&(document.cookie=`${e}=${encodeURIComponent(a)}; Path=/; Secure; SameSite=Lax`)}function Dn(e){if(!Xa())return null;try{return window.localStorage.getItem(e)}catch{return null}}function Ks(e,a){if(Xa())try{window.localStorage.setItem(e,a)}catch{}}function Xr(e){if(!e)return 0;const a=Number(e);return Number.isFinite(a)?a:0}function Q0(e){const a=e==null?void 0:e.trim();if(!a)return null;try{return new URL(a.includes("://")?a:`https://${a}`).host.toLowerCase()}catch{return a.toLowerCase().replace(/\/+$/,"")}}function J0(e){const a=Q0(e);if(!a)return"";const s=a.replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").slice(0,64);return s?`_${s}`:""}function go(e){const a=J0(e);return{cookie:`${Yr}${a}`,updatedAtCookie:`${K0}${a}`,storage:`${Yr}${a}`,updatedAtStorage:`${Y0}${a}`}}function X0(e){const a=Qr(e.cookie);if(!a)return null;const s=Xr(Qr(e.updatedAtCookie)),r=Dn(e.storage),i=Xr(Dn(e.updatedAtStorage)),l=s>i||s===0&&a!==r;return(!r||l)&&(Ks(e.storage,a),Ks(e.updatedAtStorage,String(s||Date.now()))),a}function xt(e){if(!Xa())return null;const a=go(e),s=X0(a);return s||Dn(a.storage)}function Is(e,a){if(!Xa()||!e)return;const s=go(a),r=Date.now();Jr(s.cookie,e),Jr(s.updatedAtCookie,String(r)),Ks(s.storage,e),Ks(s.updatedAtStorage,String(r))}const gr=o.createContext(void 0);function e1({children:e,publicKey:a,adapter:s,uiOverrides:r}){const[i,l]=o.useState(!0),[m,d]=o.useState(null),c=o.useRef(!1);o.useEffect(()=>{async function u(){if(!c.current)try{c.current=!0,l(!0);const[h,f,g]=a.split("_");if(!g)throw new Error("Invalid public key");let x=atob(g),w=f==="test";const b=x;let j=null;if(new URLSearchParams(window.location.search).has("__dev_session__")){j=new URLSearchParams(window.location.search).get("__dev_session__"),Is(j,b);const C=new URL(window.location.href);C.searchParams.delete("__dev_session__"),window.history.replaceState({},"",C.toString())}else j=xt(b),j&&Is(j,b);let v={};const k=new URLSearchParams;w?k.append("__dev_session__",j??""):v={credentials:"include"};const N=await fetch(`${x}/deployment${w?"?":""}${k.toString()}`,v);if(!N.ok){l(!1);return}const _=await N.json();_.data.backend_host=x,r&&(_.data.ui_settings={..._.data.ui_settings,...r}),d(_.data),w&&N.headers.get("x-development-session")&&Is(N.headers.get("x-development-session"),b),l(!1)}catch{l(!1)}}u()},[a,r]);const p=o.useMemo(()=>({loading:i,deployment:m,adapter:s}),[i,m,s]);return t.jsx(gr.Provider,{value:p,children:e})}async function I(e){if(!e.ok){let s=`HTTP ${e.status}: ${e.statusText}`,r;try{const l=await e.json();l.errors&&l.errors.length>0?(s=l.errors[0].message||s,r=l.errors[0].code):l.message&&(s=l.message)}catch{}const i=new Error(s);throw r&&(i.code=r),i}return{data:(await e.json()).data}}function _e(){const e=o.useContext(gr);if(e===void 0)throw new Error("useDeployment must be used within a DeploymentProvider");if(!e.loading&&!e.deployment)throw new Error("Deployment is not loaded");return e}function je(){const{deployment:e,loading:a}=_e(),s=o.useCallback(async(r,i)=>{if(a||!e)throw new Error("Deployment is loading");const l=t1(e),m=new Headers(l.headers);i!=null&&i.headers&&new Headers(i.headers).forEach((u,h)=>{m.set(h,u)});const d=new URL(`${e.backend_host??""}${r}`);e.mode==="staging"&&d.searchParams.append("__dev_session__",xt(e.backend_host)??"");const c=await fetch(d,{...l,...i,headers:m});return e.mode==="staging"&&c.headers.get("x-development-session")&&Is(c.headers.get("x-development-session"),e.backend_host),c},[e,a]);return o.useMemo(()=>({client:s,loading:a}),[s,a])}function t1(e){return e.mode==="staging"?{}:{credentials:"include"}}const a1="https://cdn.wacht.services/captcha/wacht-challenge.min.js",s1="https://cdn.wacht.services/captcha/cap_wasm_bg.wasm",ei="wacht-challenge-script";function n1(e){const a=e.trim().replace(/\/$/,"");return a?/^https?:\/\//i.test(a)?a:`https://${a}`:""}function r1(){return document.getElementById(ei)?Promise.resolve():new Promise((e,a)=>{const s=document.createElement("script");s.id=ei,s.src=a1,s.async=!0,s.onload=()=>e(),s.onerror=()=>a(new Error("Failed to load challenge script")),document.head.appendChild(s)})}async function xo(e){const a=n1(e);if(!a)throw new Error("Challenge API host is missing");if(await r1(),!window.Cap)throw new Error("Challenge script did not initialize");window.CAP_SILENT=!0,window.CAP_DISABLE_WIDGET_REF=!0,window.CAP_CUSTOM_WASM_URL=s1;const s=new window.Cap({apiEndpoint:`${a}/captcha/`});try{return(await s.solve()).token}finally{s.reset()}}async function Un(e,a){return a||xo(e)}var vo=(e=>(e.XOauth="x_oauth",e.GithubOauth="github_oauth",e.GitlabOauth="gitlab_oauth",e.GoogleOauth="google_oauth",e.FacebookOauth="facebook_oauth",e.MicrosoftOauth="microsoft_oauth",e.LinkedinOauth="linkedin_oauth",e.DiscordOauth="discord_oauth",e.AppleOauth="apple_oauth",e))(vo||{});function i1(e,a,s){const r={username:o1(e,a,s),email:l1(e,a,s),phone:c1(e,a,s),email_otp:d1(e,a,s),magic_link:u1(e,a,s),oauth:m1(e,a),passkey:p1(e,a),generic:h1(e,a,s)};return function(l){return r[l]}}async function $t(e,a,s){e.append("challenge_token",await Un(a,s))}function o1(e,a,s){return async({username:r,password:i,challenge_token:l})=>{var p,u;const m=new FormData;m.append("strategy","plain_username"),m.append("username",r),m.append("password",i),await $t(m,a,l);const d=await e("/auth/signin",{method:"POST",body:m}),c=await I(d);return"data"in c&&((u=(p=c.data)==null?void 0:p.signin_attempts)!=null&&u.length)&&s(c.data.signin_attempts.at(-1)||null),c}}function l1(e,a,s){return async({email:r,password:i,challenge_token:l})=>{var p,u;const m=new FormData;m.append("strategy","plain_email"),m.append("email",r),m.append("password",i),await $t(m,a,l);const d=await e("/auth/signin",{method:"POST",body:m}),c=await I(d);return"data"in c&&((u=(p=c.data)==null?void 0:p.signin_attempts)!=null&&u.length)&&s(c.data.signin_attempts.at(-1)||null),c}}function c1(e,a,s){return async({phone:r,challenge_token:i})=>{var c,p;const l=new FormData;l.append("strategy","phone_otp"),l.append("phone",r),await $t(l,a,i);const m=await e("/auth/signin",{method:"POST",body:l}),d=await I(m);return"data"in d&&((p=(c=d.data)==null?void 0:c.signin_attempts)!=null&&p.length)&&s(d.data.signin_attempts.at(-1)||null),d}}function d1(e,a,s){return async({email:r,challenge_token:i})=>{var c,p;const l=new FormData;l.append("strategy","email_otp"),l.append("email",r),await $t(l,a,i);const m=await e("/auth/signin",{method:"POST",body:l}),d=await I(m);return"data"in d&&((p=(c=d.data)==null?void 0:c.signin_attempts)!=null&&p.length)&&s(d.data.signin_attempts.at(-1)||null),d}}function u1(e,a,s){return async({email:r,challenge_token:i})=>{var c,p;const l=new FormData;l.append("strategy","magic_link"),l.append("email",r),await $t(l,a,i);const m=await e("/auth/signin",{method:"POST",body:l}),d=await I(m);return"data"in d&&((p=(c=d.data)==null?void 0:c.signin_attempts)!=null&&p.length)&&s(d.data.signin_attempts.at(-1)||null),d}}function m1(e,a){return async({provider:s,redirectUri:r,challenge_token:i})=>{const l=new URLSearchParams({provider:s});r&&l.append("redirect_uri",r);const m=new FormData;await $t(m,a,i);const d=await e(`/auth/oauth2/init?${l.toString()}`,{method:"POST",body:m}),c=await I(d);return"data"in c&&c.data.oauth_url&&(window.location.href=c.data.oauth_url),c}}function ss(e){const a=new Uint8Array(e);let s="";for(let r=0;r<a.length;r++)s+=String.fromCharCode(a[r]);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ti(e){const a=e.replace(/-/g,"+").replace(/_/g,"/"),s=a.padEnd(a.length+(4-a.length%4)%4,"="),r=atob(s),i=new Uint8Array(r.length);for(let l=0;l<r.length;l++)i[l]=r.charCodeAt(l);return i.buffer}function p1(e,a){return async s=>{var f;const r=new FormData;await $t(r,a,s==null?void 0:s.challenge_token);const i=await e("/auth/passkey/login/begin",{method:"POST",body:r}),l=await I(i);if(!("data"in l))return l;const m=l.data.options.publicKey,d={challenge:ti(m.challenge),timeout:m.timeout,rpId:m.rpId,userVerification:m.userVerification,allowCredentials:(f=m.allowCredentials)==null?void 0:f.map(g=>({type:g.type,id:ti(g.id),transports:g.transports}))};let c;try{const g=await navigator.credentials.get({publicKey:d});if(!g)throw new Error("Failed to get credential");c=g}catch(g){throw g.name==="NotAllowedError"?new Error("No passkey found on this device. Please try a different sign-in method."):g.name==="AbortError"?new Error("Passkey sign-in was cancelled."):g}const p=c.response,u=new FormData;u.append("id",c.id),u.append("rawId",ss(c.rawId)),u.append("type",c.type),u.append("clientDataJSON",ss(p.clientDataJSON)),u.append("authenticatorData",ss(p.authenticatorData)),u.append("signature",ss(p.signature)),p.userHandle&&u.append("userHandle",ss(p.userHandle));const h=await e("/auth/passkey/login/finish",{method:"POST",body:u});return I(h)}}function h1(e,a,s){return async({email:r,username:i,password:l,phone:m,strategy:d,challenge_token:c})=>{var f,g;const p=new FormData;d&&p.append("strategy",d),r&&p.append("email",r),i&&p.append("username",i),l&&p.append("password",l),m&&p.append("phone",m),await $t(p,a,c);const u=await e("/auth/signin",{method:"POST",body:p}),h=await I(u);return"data"in h&&((g=(f=h.data)==null?void 0:f.signin_attempts)!=null&&g.length)&&s(h.data.signin_attempts.at(-1)||null),h}}function bo(){const{client:e,loading:a}=je(),{deployment:s}=_e(),r=(s==null?void 0:s.backend_host)??"",[i,l]=o.useState(null);return a?{loading:!0,signIn:null,signinAttempt:null,discardSignInAttempt:()=>{l(null)},setSignInAttempt:l}:{loading:!1,signinAttempt:i,signIn:{createStrategy:i1(e,r,l),completeVerification:async m=>{var u,h;const d=new FormData;d.append("verification_code",m);const c=await e(`/auth/attempt-verification?attempt_identifier=${i==null?void 0:i.id}&identifier_type=signin`,{method:"POST",body:d}),p=await I(c);if("data"in p&&((h=(u=p.data)==null?void 0:u.signin_attempts)!=null&&h.length)){const f=p.data.signin_attempts.at(-1);return l(f||null),p.data}else throw new Error("Verification failed")},prepareVerification:async m=>{var u;const d=new URL("/auth/prepare-verification",window.location.origin);d.searchParams.set("attempt_identifier",((u=i==null?void 0:i.id)==null?void 0:u.toString())||""),d.searchParams.set("strategy",m.strategy),d.searchParams.set("identifier_type","signin"),m.strategy==="phone_otp"&&m.lastDigits?d.searchParams.set("last_digits",m.lastDigits):(m.strategy==="email_otp"&&m.redirectUri||m.strategy==="magic_link"&&m.redirectUri)&&d.searchParams.set("redirect_uri",m.redirectUri);const c=new FormData;await $t(c,r,m.challenge_token);const p=await e(d.pathname+d.search,{method:"POST",body:c});return I(p)},completeProfile:async m=>{var u;if(!i)throw new Error("No signin attempt found");const d=new FormData;for(const[h,f]of Object.entries(m))f&&d.append(h,f);const c=await e(`/auth/complete-profile?attempt_id=${i.id}`,{method:"POST",body:d}),p=await I(c);if("data"in p&&p.data){const h=(u=p.data.signin_attempts)==null?void 0:u.find(f=>f.id===i.id);return h&&l(h),p.data}else throw new Error("Profile completion failed")},identify:async(m,d)=>{const c=new FormData;c.append("identifier",m),await $t(c,r,d);const p=await e("/auth/identify",{method:"POST",body:c});return(await I(p)).data},initEnterpriseSso:async(m,d,c)=>{const p=new URLSearchParams({connection_id:m});d&&p.append("redirect_uri",d);const u=new FormData;await $t(u,r,c);const h=await e(`/auth/sso/login?${p.toString()}`,{method:"POST",body:u});return(await I(h)).data}},discardSignInAttempt:()=>{l(null)},setSignInAttempt:l}}function cs(e){const{loading:a,signIn:s,signinAttempt:r,discardSignInAttempt:i,setSignInAttempt:l}=bo();if(a)return{loading:!0,signIn:null,signinAttempt:null,discardSignInAttempt:i,setSignInAttempt:l};const m=(()=>{switch(e){case"username":return s.createStrategy("username");case"email":return s.createStrategy("email");case"phone":return s.createStrategy("phone");case"email_otp":return s.createStrategy("email_otp");case"magic_link":return s.createStrategy("magic_link");case"oauth":return s.createStrategy("oauth");case"passkey":return s.createStrategy("passkey");case"generic":return s.createStrategy("generic");default:throw new Error("Invalid sign-in strategy")}})();return{loading:!1,signinAttempt:r,signIn:{create:m,completeVerification:s.completeVerification,prepareVerification:s.prepareVerification,completeProfile:s.completeProfile,identify:s.identify,initEnterpriseSso:s.initEnterpriseSso},discardSignInAttempt:i,setSignInAttempt:l}}function f1(e,a,s,r){return{create:async i=>{var c,p,u;const l=new FormData;for(const[h,f]of Object.entries(i))h!=="challenge_token"&&l.append(h,f);l.append("challenge_token",await Un(a,i.challenge_token));const m=await e("/auth/signup",{method:"POST",body:l}),d=await I(m);return"data"in d&&((p=(c=d.data)==null?void 0:c.signup_attempts)!=null&&p.length)&&r(((u=d.data.signup_attempts)==null?void 0:u.at(-1))||null),d},prepareVerification:async i=>{var c;const l=new URL("/auth/prepare-verification",window.location.origin);l.searchParams.set("attempt_identifier",((c=s==null?void 0:s.id)==null?void 0:c.toString())||""),l.searchParams.set("strategy",i.strategy),l.searchParams.set("identifier_type","signup"),i.strategy==="phone_otp"&&i.lastDigits?l.searchParams.set("last_digits",i.lastDigits):i.strategy==="email_otp"&&i.redirectUri&&l.searchParams.set("redirect_uri",i.redirectUri);const m=new FormData;m.append("challenge_token",await Un(a,i.challenge_token));const d=await e(l.pathname+l.search,{method:"POST",body:m});return I(d)},completeVerification:async i=>{var c,p;const l=new FormData;l.append("verification_code",i);const m=await e(`/auth/attempt-verification?attempt_identifier=${s==null?void 0:s.id}&identifier_type=signup`,{method:"POST",body:l}),d=await I(m);return"data"in d&&((p=(c=d.data)==null?void 0:c.signup_attempts)!=null&&p.length)&&r(d.data.signup_attempts.at(-1)||null),d},validateDeploymentInvitation:async i=>{try{const l=await e(`/deployment/invitations/validate?token=${encodeURIComponent(i)}`,{method:"GET"}),m=await I(l);return"data"in m&&m.data?m.data:{valid:!1,message:"Failed to validate invitation",error_code:"VALIDATION_ERROR"}}catch(l){return{valid:!1,message:l.message||"Failed to validate invitation",error_code:"NETWORK_ERROR"}}}}}function yo(){const{client:e,loading:a}=je(),{deployment:s}=_e(),r=(s==null?void 0:s.backend_host)??"",[i,l]=o.useState(null);return a?{loading:!0,signUp:null,signupAttempt:null,discardSignupAttempt:()=>{l(null)}}:{loading:!1,signupAttempt:i,discardSignupAttempt:()=>{l(null)},signUp:f1(e,r,i,l)}}var Es={exports:{}},wn={};/**
3
3
  * @license React
4
4
  * use-sync-external-store-shim.production.js
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var Xr;function c1(){if(Xr)return fn;Xr=1;var e=o;function a(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var s=typeof Object.is=="function"?Object.is:a,r=e.useState,i=e.useEffect,l=e.useLayoutEffect,m=e.useDebugValue;function c(f,h){var g=h(),x=r({inst:{value:g,getSnapshot:h}}),w=x[0].inst,b=x[1];return l(function(){w.value=g,w.getSnapshot=h,d(w)&&b({inst:w})},[f,g,h]),i(function(){return d(w)&&b({inst:w}),f(function(){d(w)&&b({inst:w})})},[f]),m(g),g}function d(f){var h=f.getSnapshot;f=f.value;try{var g=h();return!s(f,g)}catch{return!0}}function p(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:c;return fn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,fn}var wn={};/**
10
+ */var ai;function w1(){if(ai)return wn;ai=1;var e=o;function a(h,f){return h===f&&(h!==0||1/h===1/f)||h!==h&&f!==f}var s=typeof Object.is=="function"?Object.is:a,r=e.useState,i=e.useEffect,l=e.useLayoutEffect,m=e.useDebugValue;function d(h,f){var g=f(),x=r({inst:{value:g,getSnapshot:f}}),w=x[0].inst,b=x[1];return l(function(){w.value=g,w.getSnapshot=f,c(w)&&b({inst:w})},[h,g,f]),i(function(){return c(w)&&b({inst:w}),h(function(){c(w)&&b({inst:w})})},[h]),m(g),g}function c(h){var f=h.getSnapshot;h=h.value;try{var g=f();return!s(h,g)}catch{return!0}}function p(h,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:d;return wn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,wn}var gn={};/**
11
11
  * @license React
12
12
  * use-sync-external-store-shim.development.js
13
13
  *
@@ -15,8 +15,8 @@
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var ei;function d1(){return ei||(ei=1,process.env.NODE_ENV!=="production"&&(function(){function e(g,x){return g===x&&(g!==0||1/g===1/x)||g!==g&&x!==x}function a(g,x){u||i.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var w=x();if(!f){var b=x();l(w,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}b=m({inst:{value:w,getSnapshot:x}});var j=b[0].inst,v=b[1];return d(function(){j.value=w,j.getSnapshot=x,s(j)&&v({inst:j})},[g,w,x]),c(function(){return s(j)&&v({inst:j}),g(function(){s(j)&&v({inst:j})})},[g]),p(w),w}function s(g){var x=g.getSnapshot;g=g.value;try{var w=x();return!l(g,w)}catch{return!0}}function r(g,x){return x()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=o,l=typeof Object.is=="function"?Object.is:e,m=i.useState,c=i.useEffect,d=i.useLayoutEffect,p=i.useDebugValue,u=!1,f=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:a;wn.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),wn}var ti;function u1(){return ti||(ti=1,process.env.NODE_ENV==="production"?Ss.exports=c1():Ss.exports=d1()),Ss.exports}var Dn=u1();const vo=0,bo=1,yo=2,ai=3;var si=Object.prototype.hasOwnProperty;function Un(e,a){var s,r;if(e===a)return!0;if(e&&a&&(s=e.constructor)===a.constructor){if(s===Date)return e.getTime()===a.getTime();if(s===RegExp)return e.toString()===a.toString();if(s===Array){if((r=e.length)===a.length)for(;r--&&Un(e[r],a[r]););return r===-1}if(!s||typeof e=="object"){r=0;for(s in e)if(si.call(e,s)&&++r&&!si.call(a,s)||!(s in a)||!Un(e[s],a[s]))return!1;return Object.keys(a).length===r}}return e!==e&&a!==a}const Vt=new WeakMap,Yt=()=>{},mt=Yt(),Wn=Object,ke=e=>e===mt,Lt=e=>typeof e=="function",wa=(e,a)=>({...e,...a}),jo=e=>Lt(e.then),gn={},Es={},wr="undefined",ws=typeof window!=wr,Bn=typeof document!=wr,m1=ws&&"Deno"in window,p1=()=>ws&&typeof window.requestAnimationFrame!=wr,ma=(e,a)=>{const s=Vt.get(e);return[()=>!ke(a)&&e.get(a)||gn,r=>{if(!ke(a)){const i=e.get(a);a in Es||(Es[a]=i),s[5](a,wa(i,r),i||gn)}},s[6],()=>!ke(a)&&a in Es?Es[a]:!ke(a)&&e.get(a)||gn]};let Gn=!0;const h1=()=>Gn,[qn,Kn]=ws&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Yt,Yt],f1=()=>{const e=Bn&&document.visibilityState;return ke(e)||e!=="hidden"},w1=e=>(Bn&&document.addEventListener("visibilitychange",e),qn("focus",e),()=>{Bn&&document.removeEventListener("visibilitychange",e),Kn("focus",e)}),g1=e=>{const a=()=>{Gn=!0,e()},s=()=>{Gn=!1};return qn("online",a),qn("offline",s),()=>{Kn("online",a),Kn("offline",s)}},x1={isOnline:h1,isVisible:f1},v1={initFocus:w1,initReconnect:g1},ni=!o.useId,Ba=!ws||m1,b1=e=>p1()?window.requestAnimationFrame(e):setTimeout(e,1),Is=Ba?o.useEffect:o.useLayoutEffect,xn=typeof navigator<"u"&&navigator.connection,ri=!Ba&&xn&&(["slow-2g","2g"].includes(xn.effectiveType)||xn.saveData),As=new WeakMap,y1=e=>Wn.prototype.toString.call(e),vn=(e,a)=>e===`[object ${a}]`;let j1=0;const Yn=e=>{const a=typeof e,s=y1(e),r=vn(s,"Date"),i=vn(s,"RegExp"),l=vn(s,"Object");let m,c;if(Wn(e)===e&&!r&&!i){if(m=As.get(e),m)return m;if(m=++j1+"~",As.set(e,m),Array.isArray(e)){for(m="@",c=0;c<e.length;c++)m+=Yn(e[c])+",";As.set(e,m)}if(l){m="#";const d=Wn.keys(e).sort();for(;!ke(c=d.pop());)ke(e[c])||(m+=c+":"+Yn(e[c])+",");As.set(e,m)}}else m=r?e.toJSON():a=="symbol"?e.toString():a=="string"?JSON.stringify(e):""+e;return m},ms=e=>{if(Lt(e))try{e=e()}catch{e=""}const a=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Yn(e):"",[e,a]};let _1=0;const Qn=()=>++_1;async function _o(...e){const[a,s,r,i]=e,l=wa({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let m=l.populateCache;const c=l.rollbackOnError;let d=l.optimisticData;const p=h=>typeof c=="function"?c(h):c!==!1,u=l.throwOnError;if(Lt(s)){const h=s,g=[],x=a.keys();for(const w of x)!/^\$(inf|sub)\$/.test(w)&&h(a.get(w)._k)&&g.push(w);return Promise.all(g.map(f))}return f(s);async function f(h){const[g]=ms(h);if(!g)return;const[x,w]=ma(a,g),[b,j,v,k]=Vt.get(a),N=()=>{const S=b[g];return(Lt(l.revalidate)?l.revalidate(x().data,h):l.revalidate!==!1)&&(delete v[g],delete k[g],S&&S[0])?S[0](yo).then(()=>x().data):x().data};if(e.length<3)return N();let _=r,C,y=!1;const E=Qn();j[g]=[E,0];const A=!ke(d),H=x(),M=H.data,T=H._c,P=ke(T)?M:T;if(A&&(d=Lt(d)?d(P,M):d,w({data:d,_c:P})),Lt(_))try{_=_(P)}catch(S){C=S,y=!0}if(_&&jo(_))if(_=await _.catch(S=>{C=S,y=!0}),E!==j[g][0]){if(y)throw C;return _}else y&&A&&p(C)&&(m=!0,w({data:P,_c:mt}));if(m&&!y)if(Lt(m)){const S=m(_,P);w({data:S,error:mt,_c:mt})}else w({data:_,error:mt,_c:mt});if(j[g][1]=Qn(),Promise.resolve(N()).then(()=>{w({_c:mt})}),y){if(u)throw C;return}return _}}const ii=(e,a)=>{for(const s in e)e[s][0]&&e[s][0](a)},k1=(e,a)=>{if(!Vt.has(e)){const s=wa(v1,a),r=Object.create(null),i=_o.bind(mt,e);let l=Yt;const m=Object.create(null),c=(u,f)=>{const h=m[u]||[];return m[u]=h,h.push(f),()=>h.splice(h.indexOf(f),1)},d=(u,f,h)=>{e.set(u,f);const g=m[u];if(g)for(const x of g)x(f,h)},p=()=>{if(!Vt.has(e)&&(Vt.set(e,[r,Object.create(null),Object.create(null),Object.create(null),i,d,c]),!Ba)){const u=s.initFocus(setTimeout.bind(mt,ii.bind(mt,r,vo))),f=s.initReconnect(setTimeout.bind(mt,ii.bind(mt,r,bo)));l=()=>{u&&u(),f&&f(),Vt.delete(e)}}};return p(),[e,i,p,l]}return[e,Vt.get(e)[4]]},C1=(e,a,s,r,i)=>{const l=s.errorRetryCount,m=i.retryCount,c=~~((Math.random()+.5)*(1<<(m<8?m:8)))*s.errorRetryInterval;!ke(l)&&m>l||setTimeout(r,c,i)},N1=Un,[gr,Ua]=k1(new Map),S1=wa({onLoadingSlow:Yt,onSuccess:Yt,onError:Yt,onErrorRetry:C1,onDiscarded:Yt,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ri?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:ri?5e3:3e3,compare:N1,isPaused:()=>!1,cache:gr,mutate:Ua,fallback:{}},x1),E1=(e,a)=>{const s=wa(e,a);if(a){const{use:r,fallback:i}=e,{use:l,fallback:m}=a;r&&l&&(s.use=r.concat(l)),i&&m&&(s.fallback=wa(i,m))}return s},A1=o.createContext({}),ko="$inf$",Co=ws&&window.__SWR_DEVTOOLS_USE__,M1=Co?window.__SWR_DEVTOOLS_USE__:[],R1=()=>{Co&&(window.__SWR_DEVTOOLS_REACT__=o)},No=e=>Lt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],So=()=>{const e=o.useContext(A1);return o.useMemo(()=>wa(S1,e),[e])},L1=e=>(a,s,r)=>e(a,s&&((...l)=>{const[m]=ms(a),[,,,c]=Vt.get(gr);if(m.startsWith(ko))return s(...l);const d=c[m];return ke(d)?s(...l):(delete c[m],d)}),r),P1=M1.concat(L1),$1=e=>function(...s){const r=So(),[i,l,m]=No(s),c=E1(r,m);let d=e;const{use:p}=c,u=(p||[]).concat(P1);for(let f=u.length;f--;)d=u[f](d);return d(i,l||c.fetcher||null,c)},O1=(e,a,s)=>{const r=a[e]||(a[e]=[]);return r.push(s),()=>{const i=r.indexOf(s);i>=0&&(r[i]=r[r.length-1],r.pop())}},Z1=(e,a)=>(...s)=>{const[r,i,l]=No(s),m=(l.use||[]).concat(a);return e(r,i,{...l,use:m})};R1();const bn=o.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(a=>{e.status="fulfilled",e.value=a},a=>{e.status="rejected",e.reason=a}),e}}),yn={dedupe:!0},oi=Promise.resolve(mt),H1=()=>Yt,F1=(e,a,s)=>{const{cache:r,compare:i,suspense:l,fallbackData:m,revalidateOnMount:c,revalidateIfStale:d,refreshInterval:p,refreshWhenHidden:u,refreshWhenOffline:f,keepPreviousData:h,strictServerPrefetchWarning:g}=s,[x,w,b,j]=Vt.get(r),[v,k]=ms(e),N=o.useRef(!1),_=o.useRef(!1),C=o.useRef(v),y=o.useRef(a),E=o.useRef(s),A=()=>E.current,H=()=>A().isVisible()&&A().isOnline(),[M,T,P,S]=ma(r,v),$=o.useRef({}).current,Z=ke(m)?ke(s.fallback)?mt:s.fallback[v]:m,R=(ce,B)=>{for(const q in $){const X=q;if(X==="data"){if(!i(ce[X],B[X])&&(!ke(ce[X])||!i(de,B[X])))return!1}else if(B[X]!==ce[X])return!1}return!0},L=!N.current,O=o.useMemo(()=>{const ce=M(),B=S(),q=z=>{const D=wa(z);return delete D._k,(()=>{if(!v||!a||A().isPaused())return!1;if(L&&!ke(c))return c;const ge=ke(Z)?D.data:Z;return ke(ge)||d})()?{isValidating:!0,isLoading:!0,...D}:D},X=q(ce),oe=ce===B?X:q(B);let Ee=X;return[()=>{const z=q(M());return R(z,Ee)?(Ee.data=z.data,Ee.isLoading=z.isLoading,Ee.isValidating=z.isValidating,Ee.error=z.error,Ee):(Ee=z,z)},()=>oe]},[r,v]),F=Dn.useSyncExternalStore(o.useCallback(ce=>P(v,(B,q)=>{R(q,B)||ce()}),[r,v]),O[0],O[1]),W=x[v]&&x[v].length>0,U=F.data,V=ke(U)?Z&&jo(Z)?bn(Z):Z:U,G=F.error,Y=o.useRef(V),de=h?ke(U)?ke(Y.current)?V:Y.current:U:V,fe=v&&ke(V),ne=o.useRef(null);!Ba&&Dn.useSyncExternalStore(H1,()=>(ne.current=!1,ne),()=>(ne.current=!0,ne));const ae=ne.current;g&&ae&&!l&&fe&&console.warn(`Missing pre-initiated data for serialized key "${v}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const re=!v||!a||A().isPaused()||W&&!ke(G)?!1:L&&!ke(c)?c:l?ke(V)?!1:d:ke(V)||d,Le=L&&re,K=ke(F.isValidating)?Le:F.isValidating,at=ke(F.isLoading)?Le:F.isLoading,ze=o.useCallback(async ce=>{const B=y.current;if(!v||!B||_.current||A().isPaused())return!1;let q,X,oe=!0;const Ee=ce||{},z=!b[v]||!Ee.dedupe,D=()=>ni?!_.current&&v===C.current&&N.current:v===C.current,we={isValidating:!1,isLoading:!1},ge=()=>{T(we)},xe=()=>{const Qe=b[v];Qe&&Qe[1]===X&&delete b[v]},lt={isValidating:!0};ke(M().data)&&(lt.isLoading=!0);try{if(z&&(T(lt),s.loadingTimeout&&ke(M().data)&&setTimeout(()=>{oe&&D()&&A().onLoadingSlow(v,s)},s.loadingTimeout),b[v]=[B(k),Qn()]),[q,X]=b[v],q=await q,z&&setTimeout(xe,s.dedupingInterval),!b[v]||b[v][1]!==X)return z&&D()&&A().onDiscarded(v),!1;we.error=mt;const Qe=w[v];if(!ke(Qe)&&(X<=Qe[0]||X<=Qe[1]||Qe[1]===0))return ge(),z&&D()&&A().onDiscarded(v),!1;const Q=M().data;we.data=i(Q,q)?Q:q,z&&D()&&A().onSuccess(q,v,s)}catch(Qe){xe();const Q=A(),{shouldRetryOnError:le}=Q;Q.isPaused()||(we.error=Qe,z&&D()&&(Q.onError(Qe,v,Q),(le===!0||Lt(le)&&le(Qe))&&(!A().revalidateOnFocus||!A().revalidateOnReconnect||H())&&Q.onErrorRetry(Qe,v,Q,me=>{const Te=x[v];Te&&Te[0]&&Te[0](ai,me)},{retryCount:(Ee.retryCount||0)+1,dedupe:!0})))}return oe=!1,ge(),!0},[v,r]),We=o.useCallback((...ce)=>_o(r,C.current,...ce),[]);if(Is(()=>{y.current=a,E.current=s,ke(U)||(Y.current=U)}),Is(()=>{if(!v)return;const ce=ze.bind(mt,yn);let B=0;A().revalidateOnFocus&&(B=Date.now()+A().focusThrottleInterval);const X=O1(v,x,(oe,Ee={})=>{if(oe==vo){const z=Date.now();A().revalidateOnFocus&&z>B&&H()&&(B=z+A().focusThrottleInterval,ce())}else if(oe==bo)A().revalidateOnReconnect&&H()&&ce();else{if(oe==yo)return ze();if(oe==ai)return ze(Ee)}});return _.current=!1,C.current=v,N.current=!0,T({_k:k}),re&&(b[v]||(ke(V)||Ba?ce():b1(ce))),()=>{_.current=!0,X()}},[v]),Is(()=>{let ce;function B(){const X=Lt(p)?p(M().data):p;X&&ce!==-1&&(ce=setTimeout(q,X))}function q(){!M().error&&(u||A().isVisible())&&(f||A().isOnline())?ze(yn).then(B):B()}return B(),()=>{ce&&(clearTimeout(ce),ce=-1)}},[p,u,f,v]),o.useDebugValue(de),l){if(!ni&&Ba&&fe)throw new Error("Fallback data is required when using Suspense in SSR.");fe&&(y.current=a,E.current=s,_.current=!1);const ce=j[v],B=!ke(ce)&&fe?We(ce):oi;if(bn(B),!ke(G)&&fe)throw G;const q=fe?ze(yn):oi;!ke(de)&&fe&&(q.status="fulfilled",q.value=!0),bn(q)}return{mutate:We,get data(){return $.data=!0,de},get error(){return $.error=!0,G},get isValidating(){return $.isValidating=!0,K},get isLoading(){return $.isLoading=!0,at}}},Se=$1(F1),kt=()=>{const{adapter:e,deployment:a}=Ce(),s=e.useNavigate(),r=(d,p)=>{s?s(d,p):window.location.href=d},i=d=>{if(d)return d;const u=new URLSearchParams(window.location.search).get("redirect_uri");return u||window.location.href};return{navigate:r,navigateToSignIn:d=>{if(!a)return;const p=i(d),u=new URLSearchParams;u.set("redirect_uri",p),(a==null?void 0:a.mode)==="staging"&&u.set("__dev_session__",xt(a.backend_host)??""),r(`${a.ui_settings.sign_in_page_url}?${u.toString()}`,{replace:!0})},navigateToAccountSelection:d=>{if(!a)return;const p=i(d),u=new URLSearchParams;u.set("redirect_uri",p),(a==null?void 0:a.mode)==="staging"&&u.set("__dev_session__",xt(a.backend_host)??""),r(`https://${a.frontend_host}?${u.toString()}`,{replace:!0})},navigateToSignUp:d=>{if(!a)return;const p=i(d),u=new URLSearchParams;u.set("redirect_uri",p),(a==null?void 0:a.mode)==="staging"&&u.set("__dev_session__",xt(a.backend_host)??""),r(`${a.ui_settings.sign_up_page_url}?${u.toString()}`,{replace:!0})}}};async function T1(e){const a=await e("/session",{method:"GET"});return(await I(a)).data}async function I1(e,a){const s=await e(`/session/switch-sign-in?sign_in_id=${a}`,{method:"POST"});return I(s)}async function V1(e,a){const s=a?`/session/sign-out?sign_in_id=${a}`:"/session/sign-out",r=await e(s,{method:"POST"});return I(r)}async function z1(e,a){const s=await e(`/session/switch-organization${a?`?organization_id=${a}`:""}`,{method:"POST"});return I(s)}async function D1(e,a){const s=await e(`/session/switch-workspace?workspace_id=${a}`,{method:"POST"});return I(s)}async function U1(e,a){const s=await e(`/session/ticket/exchange?ticket=${encodeURIComponent(a)}`,{method:"GET"});return I(s)}const Jn=new Map,rs=new Map;function Pt(){Jn.clear(),rs.clear()}async function W1(e,a){const s=await e(`/session/token${a?`?template=${a}`:""}`);return I(s)}function ot(){const{client:e,loading:a}=je(),{deployment:s}=Ce(),{navigate:r}=kt(),{cache:i}=So(),{data:l,error:m,mutate:c,isLoading:d}=Se(a?null:"/session",()=>T1(e),{refreshInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1,dedupingInterval:5e3}),p=o.useCallback(async()=>{await c(void 0,{revalidate:!0})},[c]),u=o.useCallback(async(f="default")=>{if(!l)throw new Error("no session");const h=Jn.get(f);if(h&&h.expires>Date.now())return(h==null?void 0:h.token)||"";rs.get(f)||rs.set(f,W1(e,f));const g=await rs.get(f);return rs.delete(f),Jn.set(f,g.data),g.data.token},[e,l==null?void 0:l.active_signin]);return a||!l||d?{loading:!0,error:m,session:null,switchSignIn:null,switchOrganization:null,switchWorkspace:null,exchangeTicket:null,signOut:null,getToken:null,refetch:p}:{loading:d,error:m,session:l,switchSignIn:async f=>{await I1(e,f),Pt(),await Ua("/me/organization-memberships",void 0,{revalidate:!1}),await Ua("/me/workspace-memberships",void 0,{revalidate:!1}),await c(void 0,{revalidate:!0}),await Ua("/me/organization-memberships"),await Ua("/me/workspace-memberships")},signOut:async f=>{await V1(e,f);const h=["/session","/user","/me/signins","/me/organization-memberships","/me/workspace-memberships","wacht-notifications:scope-unread"],g=["wacht-notifications:","wacht-agent-sessions:","wacht-agent-contexts:","wacht-org-domains:","wacht-api-workspaces:","wacht-api-organizations:"];if(i instanceof Map){const x=Array.from(i.keys());for(const w of x){let b=!1;(h.includes(w)||typeof w=="string"&&g.some(j=>w.startsWith(j)))&&(b=!0),b&&i.delete(w)}}Pt(),await c(void 0,{revalidate:!0}),s!=null&&s.ui_settings&&(f&&s.ui_settings.after_sign_out_one_page_url?r(s.ui_settings.after_sign_out_one_page_url):!f&&s.ui_settings.after_sign_out_all_page_url&&r(s.ui_settings.after_sign_out_all_page_url))},switchOrganization:async f=>{await z1(e,f),Pt(),await c(void 0,{revalidate:!0})},switchWorkspace:async f=>{await D1(e,f),Pt(),await c(void 0,{revalidate:!0})},exchangeTicket:async f=>{await U1(e,f),Pt(),await c(void 0,{revalidate:!0})},getToken:u,refetch:p}}const zt=()=>{const{organizationMemberships:e,refetch:a,loading:s}=xa(),{client:r}=je(),{refetch:i}=ot(),l=o.useCallback(async L=>(await I(await r(`/organizations/${L.id}/roles`,{method:"GET"}))).data,[r]),m=o.useCallback(async(L,O)=>{const F=new URLSearchParams;return O&&(F.set("page",O.page.toString()),F.set("limit",O.limit.toString()),O.search&&F.set("search",O.search)),(await I(await r(`/organizations/${L.id}/members?${F.toString()}`,{method:"GET"}))).data},[r]),c=o.useCallback(async L=>(await I(await r(`/organizations/${L.id}/invitations`,{method:"GET"}))).data,[r]),d=o.useCallback(async L=>(await I(await r(`/organizations/${L.id}/domains`,{method:"GET"}))).data,[r]),p=o.useCallback(async(L,O)=>{await r(`/organizations/${L.id}/members/${O.id}/remove`,{method:"POST"})},[r]),u=o.useCallback(async L=>{const O=new FormData;O.append("name",L.name),L.image&&O.append("image",L.image),L.description&&O.append("description",L.description);const F=await I(await r("/organizations",{method:"POST",body:O}));return Pt(),await a(),await i(),F},[i,a,r]),f=o.useCallback(async(L,O)=>{const F=Object.entries(O).reduce((U,[V,G])=>(G!=null&&(Array.isArray(G)?G.forEach(Y=>U.append(V,Y)):U.append(V,G)),U),new FormData),W=await I(await r(`/organizations/${L.id}/update`,{method:"POST",body:F}));return await a(),W},[a,r]),h=o.useCallback(async(L,O)=>{await r(`/organizations/${L.id}/roles/${O.id}/remove`,{method:"POST"})},[r]),g=o.useCallback(async(L,O)=>{const F=new FormData;return F.append("domain",O.fqdn),await I(await r(`/organizations/${L.id}/domains`,{method:"POST",body:F}))},[r]),x=o.useCallback(async(L,O)=>await I(await r(`/organizations/${L.id}/domains/${O.id}/verify`,{method:"POST"})),[r]),w=o.useCallback(async(L,O)=>await I(await r(`/organizations/${L.id}/domains/${O.id}/delete`,{method:"POST"})),[r]),b=o.useCallback(async L=>(await I(await r(`/organizations/${L.id}/enterprise-connections`,{method:"GET"}))).data,[r]),j=o.useCallback(async(L,O)=>{const F=new FormData;return F.append("protocol",O.protocol),O.domain_id&&F.append("domain_id",O.domain_id),O.idp_entity_id&&F.append("idp_entity_id",O.idp_entity_id),O.idp_sso_url&&F.append("idp_sso_url",O.idp_sso_url),O.idp_certificate&&F.append("idp_certificate",O.idp_certificate),O.oidc_client_id&&F.append("oidc_client_id",O.oidc_client_id),O.oidc_client_secret&&F.append("oidc_client_secret",O.oidc_client_secret),O.oidc_issuer_url&&F.append("oidc_issuer_url",O.oidc_issuer_url),O.oidc_scopes&&F.append("oidc_scopes",O.oidc_scopes),O.jit_enabled!==void 0&&F.append("jit_enabled",String(O.jit_enabled)),O.attribute_mapping&&F.append("attribute_mapping",JSON.stringify(O.attribute_mapping)),(await I(await r(`/organizations/${L.id}/enterprise-connections`,{method:"POST",body:F}))).data},[r]),v=o.useCallback(async(L,O,F)=>{const W=new FormData;return F.domain_id&&W.append("domain_id",F.domain_id),F.idp_entity_id&&W.append("idp_entity_id",F.idp_entity_id),F.idp_sso_url&&W.append("idp_sso_url",F.idp_sso_url),F.idp_certificate&&W.append("idp_certificate",F.idp_certificate),F.oidc_client_id&&W.append("oidc_client_id",F.oidc_client_id),F.oidc_client_secret&&W.append("oidc_client_secret",F.oidc_client_secret),F.oidc_issuer_url&&W.append("oidc_issuer_url",F.oidc_issuer_url),F.oidc_scopes&&W.append("oidc_scopes",F.oidc_scopes),F.attribute_mapping&&W.append("attribute_mapping",JSON.stringify(F.attribute_mapping)),(await I(await r(`/organizations/${L.id}/enterprise-connections/${O}/update`,{method:"POST",body:W}))).data},[r]),k=o.useCallback(async(L,O)=>{await r(`/organizations/${L.id}/enterprise-connections/${O}/delete`,{method:"POST"})},[r]),N=o.useCallback(async(L,O)=>{const F=new FormData;return F.append("protocol",O.protocol),O.idp_entity_id&&F.append("idp_entity_id",O.idp_entity_id),O.idp_sso_url&&F.append("idp_sso_url",O.idp_sso_url),O.idp_certificate&&F.append("idp_certificate",O.idp_certificate),O.oidc_issuer_url&&F.append("oidc_issuer_url",O.oidc_issuer_url),O.oidc_client_id&&F.append("oidc_client_id",O.oidc_client_id),O.oidc_client_secret&&F.append("oidc_client_secret",O.oidc_client_secret),(await I(await r(`/organizations/${L.id}/enterprise-connections/test`,{method:"POST",body:F}))).data},[r]),_=o.useCallback(async(L,O)=>(await I(await r(`/organizations/${L.id}/enterprise-connections/${O}/test`,{method:"POST"}))).data,[r]),C=o.useCallback(async(L,O)=>(await I(await r(`/organizations/${L.id}/enterprise-connections/${O}/scim/token`,{method:"POST"}))).data,[r]),y=o.useCallback(async(L,O)=>(await I(await r(`/organizations/${L.id}/enterprise-connections/${O}/scim/token`,{method:"GET"}))).data,[r]),E=o.useCallback(async(L,O)=>{await r(`/organizations/${L.id}/enterprise-connections/${O}/scim/token/revoke`,{method:"POST"})},[r]),A=o.useCallback(async(L,O)=>{const F=new FormData;return F.append("name",O.name),O.permissions&&O.permissions.forEach((U,V)=>{F.append(`permissions[${V}]`,U)}),await I(await r(`/organizations/${L.id}/roles`,{method:"POST",body:F}))},[r]),H=o.useCallback(async L=>(await I(await r(`/organizations/${L.id}/leave`,{method:"POST"}))).data,[r]),M=o.useCallback(async L=>{const O=await I(await r(`/organizations/${L.id}/delete`,{method:"POST"}));return Pt(),await a(),await i(),O.data},[r,a,i]),T=o.useCallback(async(L,O,F)=>(await I(await r(`/organizations/${L.id}/members/${O.id}/roles/${F.id}/add`,{method:"POST"}))).data,[r]),P=o.useCallback(async(L,O,F)=>(await I(await r(`/organizations/${L.id}/members/${O.id}/roles/${F.id}/remove`,{method:"POST"}))).data,[r]),S=o.useCallback(async(L,O)=>{var U,V;const F=new FormData;return F.append("email",O.email),F.append("role_id",O.organizationRole.id),(U=O.workspace)!=null&&U.id&&F.append("workspace_id",O.workspace.id),(V=O.workspaceRole)!=null&&V.id&&F.append("workspace_role_id",O.workspaceRole.id),(await I(await r(`/organizations/${L.id}/invitations`,{method:"POST",body:F}))).data},[r]),$=o.useCallback(async(L,O)=>(await I(await r(`/organizations/${L.id}/invitations/${O.id}/discard`,{method:"POST"}))).data,[r]),Z=o.useCallback(async(L,O)=>(await I(await r(`/organizations/${L.id}/invitations/${O.id}/resend`,{method:"POST"}))).data,[r]);return{organizations:o.useMemo(()=>e==null?void 0:e.map(L=>L.organization),[e]),loading:s,error:null,refetch:a,leaveOrganization:H,getOrganizationRoles:l,getOrganizationMembers:m,removeOrganizationMember:p,createOrganization:u,getOrganizationInvitations:c,getOrganizationDomains:d,addOrganizationDomain:g,verifyOrganizationDomain:x,removeOrganizationDomain:w,addRoleToOrganizationMember:T,removeRoleFromOrganizationMember:P,inviteOrganizationMember:S,discardOrganizationInvitation:$,resendOrganizationInvitation:Z,updateOrganization:f,addRole:A,removeOrganizationRoles:h,deleteOrganization:M,getEnterpriseConnections:b,createEnterpriseConnection:j,updateEnterpriseConnection:v,deleteEnterpriseConnection:k,testEnterpriseConnectionConfig:N,testEnterpriseConnection:_,generateSCIMToken:C,getSCIMToken:y,revokeSCIMToken:E}},ga=()=>{const{loading:e,error:a,refetch:s,getOrganizationMembers:r,getOrganizationRoles:i,leaveOrganization:l,removeOrganizationMember:m,getOrganizationInvitations:c,getOrganizationDomains:d,removeOrganizationDomain:p,addOrganizationDomain:u,verifyOrganizationDomain:f,addRoleToOrganizationMember:h,removeRoleFromOrganizationMember:g,inviteOrganizationMember:x,discardOrganizationInvitation:w,resendOrganizationInvitation:b,updateOrganization:j,removeOrganizationRoles:v,getEnterpriseConnections:k,createEnterpriseConnection:N,updateEnterpriseConnection:_,deleteEnterpriseConnection:C,testEnterpriseConnectionConfig:y,testEnterpriseConnection:E,generateSCIMToken:A,getSCIMToken:H,revokeSCIMToken:M}=zt(),{session:T,error:P,loading:S}=ot(),{organizationMemberships:$}=xa(),Z=o.useMemo(()=>($==null?void 0:$.find(z=>{var D;return z.id===((D=T==null?void 0:T.active_signin)==null?void 0:D.active_organization_membership_id)}))||null,[$,T]),R=o.useMemo(()=>(Z==null?void 0:Z.organization)||null,[Z]),L=o.useCallback(async z=>R?await j(R,z):[],[R,j]),O=o.useCallback(async()=>R?await r(R):[],[R,r]),F=o.useCallback(async()=>R?await i(R):[],[R,i]),W=o.useCallback(async z=>R?await m(R,z):[],[R,m]),U=o.useCallback(async z=>R?await v(R,z):void 0,[R,v]),V=o.useCallback(async()=>R?await d(R):[],[R,d]),G=o.useCallback(async z=>R?await u(R,z):void 0,[R,u]),Y=o.useCallback(async z=>R?await f(R,z):void 0,[R,f]),de=o.useCallback(async z=>R?await p(R,z):void 0,[R,p]),fe=o.useCallback(async(z,D)=>R?await h(R,z,D):void 0,[R,h]),ne=o.useCallback(async(z,D)=>R?await g(R,z,D):void 0,[R,g]),ae=o.useCallback(async z=>R?await x(R,z):void 0,[R,x]),re=o.useCallback(async z=>R?await w(R,z):void 0,[R,w]),Le=o.useCallback(async z=>R?await b(R,z):void 0,[R,b]),K=o.useCallback(async()=>{R&&await l(R)},[R,l]),at=o.useCallback(async()=>R?await c(R):[],[R,c]),ze=o.useCallback(async()=>R?await k(R):[],[R,k]),We=o.useCallback(async z=>{if(R)return await N(R,z)},[R,N]),Re=o.useCallback(async(z,D)=>{if(R)return await _(R,z,D)},[R,_]),ce=o.useCallback(async z=>{R&&await C(R,z)},[R,C]),B=o.useCallback(async z=>R?await y(R,z):null,[R,y]),q=o.useCallback(async z=>R?await E(R,z):null,[R,E]),X=o.useCallback(async z=>{if(R)return await A(R,z)},[R,A]),oe=o.useCallback(async z=>{if(R)return await H(R,z)},[R,H]),Ee=o.useCallback(async z=>{R&&await M(R,z)},[R,M]);return S||e?{activeOrganization:null,activeMembership:null,loading:!0,error:P||a,updateOrganization:null,getRoles:null,getMembers:null,getDomains:null,addDomain:null,verifyDomain:null,removeDomain:null,removeRole:null,getInvitations:null,removeMember:null,addMemberRole:null,removeMemberRole:null,inviteMember:null,discardInvitation:null,resendInvitation:null,leave:null,getEnterpriseConnections:null,createEnterpriseConnection:null,updateEnterpriseConnection:null,deleteEnterpriseConnection:null,generateSCIMToken:null,getSCIMToken:null,revokeSCIMToken:null}:{activeOrganization:R,activeMembership:Z,loading:!1,refetch:s,getRoles:F,updateOrganization:L,getMembers:O,getDomains:V,addDomain:G,verifyDomain:Y,removeDomain:de,getInvitations:at,removeMember:W,leave:K,removeRole:U,addMemberRole:fe,removeMemberRole:ne,inviteMember:ae,discardInvitation:re,resendInvitation:Le,getEnterpriseConnections:ze,createEnterpriseConnection:We,updateEnterpriseConnection:Re,deleteEnterpriseConnection:ce,testEnterpriseConnectionConfig:B,testEnterpriseConnection:q,generateSCIMToken:X,getSCIMToken:oe,revokeSCIMToken:Ee,error:null}};async function B1(e){return(await I(await e("/me/organization-memberships"))).data}const xa=()=>{const{client:e,loading:a}=je(),{data:s,isLoading:r,error:i,mutate:l}=Se(a?null:"/me/organization-memberships",()=>B1(e),{refreshInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1,dedupingInterval:5e3}),m=o.useCallback(async()=>{await l()},[l]);return{organizationMemberships:s,loading:a||r,error:i,refetch:m}};async function G1(e){return(await I(await e("/me/workspace-memberships"))).data}async function q1(e,a){return(await I(await e(`/workspaces/${a}/leave`,{method:"POST"}))).data}const tn=()=>{const{client:e,loading:a}=je(),{deployment:s}=Ce(),{data:r,isLoading:i,error:l,mutate:m}=Se(!a&&(s!=null&&s.b2b_settings.workspaces_enabled)?"/me/workspace-memberships":null,()=>G1(e),{refreshInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1,dedupingInterval:5e3}),c=o.useCallback(async()=>{await m(void 0,{revalidate:!0})},[m]);return{workspaceMemberships:r,loading:a||i,error:l,refetch:c}},va=()=>{const{workspaceMemberships:e,refetch:a,loading:s,error:r}=tn(),{client:i}=je(),{refetch:l}=ot(),m=o.useMemo(()=>e==null?void 0:e.map(C=>({...C.workspace,organization:C.organization,eligibility_restriction:C.eligibility_restriction})),[e]),c=o.useCallback(async(C,y,E,A)=>{const H=new FormData;H.append("name",y),E&&H.append("image",E),A&&H.append("description",A),H.append("organization_id",C);const M=await I(await i("/workspaces",{method:"POST",body:H}));return Pt(),await a(),M.data},[i,a]),d=o.useCallback(async C=>{const y=await q1(i,C);return Pt(),await a(),await l(),y},[i,a,l]),p=o.useCallback(async(C,y)=>{const E=new FormData;y.name&&E.append("name",y.name),y.description&&E.append("description",y.description),y.image&&E.append("image",y.image),y.enforce_2fa!==void 0&&E.append("enforce_2fa",String(y.enforce_2fa)),y.enable_ip_restriction!==void 0&&E.append("enable_ip_restriction",String(y.enable_ip_restriction)),y.whitelisted_ips&&y.whitelisted_ips.forEach(H=>E.append("whitelisted_ips",H));const A=await I(await i(`/workspaces/${C.id}/update`,{method:"POST",body:E}));return await a(),A.data},[i,a]),u=o.useCallback(async C=>{const y=await I(await i(`/workspaces/${C.id}/delete`,{method:"POST"}));return Pt(),await a(),y.data},[i,a]),f=o.useCallback(async(C,y)=>{const E=new URLSearchParams;return y&&(E.set("page",y.page.toString()),E.set("limit",y.limit.toString()),y.search&&E.set("search",y.search)),(await I(await i(`/workspaces/${C.id}/members?${E.toString()}`,{method:"GET"}))).data},[i]),h=o.useCallback(async C=>(await I(await i(`/workspaces/${C.id}/roles`,{method:"GET"}))).data,[i]),g=o.useCallback(async(C,y,E)=>{const A=new FormData;return A.append("name",y),E.forEach(M=>A.append("permissions",M)),(await I(await i(`/workspaces/${C.id}/roles`,{method:"POST",body:A}))).data},[i]),x=o.useCallback(async(C,y)=>(await I(await i(`/workspaces/${C.id}/roles/${y.id}/delete`,{method:"POST"}))).data,[i]),w=o.useCallback(async(C,y)=>{const E=await I(await i(`/workspaces/${C.id}/members/${y}/remove`,{method:"POST"}));return await a(),E.data},[i,a]),b=o.useCallback(async(C,y,E)=>(await I(await i(`/workspaces/${C.id}/members/${y}/roles/${E}/add`,{method:"POST"}))).data,[i]),j=o.useCallback(async(C,y,E)=>(await I(await i(`/workspaces/${C.id}/members/${y}/roles/${E}/remove`,{method:"POST"}))).data,[i]),v=o.useCallback(async C=>(await I(await i(`/organizations/${C.organization.id}/invitations?workspace_id=${C.id}`,{method:"GET"}))).data,[i]),k=o.useCallback(async(C,y,E)=>{const A=new FormData;return A.append("email",y),A.append("workspace_id",C.id),E&&A.append("workspace_role_id",E),(await I(await i(`/organizations/${C.organization.id}/invitations`,{method:"POST",body:A}))).data},[i]),N=o.useCallback(async(C,y)=>(await I(await i(`/organizations/${C.organization.id}/invitations/${y}/discard`,{method:"POST"}))).data,[i]),_=o.useCallback(async(C,y)=>(await I(await i(`/organizations/${C.organization.id}/invitations/${y}/resend`,{method:"POST"}))).data,[i]);return{workspaces:m||[],loading:s,error:r,refetch:a,leaveWorkspace:d,createWorkspace:c,updateWorkspace:p,deleteWorkspace:u,getWorkspaceMembers:f,getWorkspaceRoles:h,createWorkspaceRole:g,deleteWorkspaceRole:x,removeWorkspaceMember:w,addWorkspaceMemberRole:b,removeWorkspaceMemberRole:j,getWorkspaceInvitations:v,createWorkspaceInvitation:k,discardWorkspaceInvitation:N,resendWorkspaceInvitation:_}},Dt=()=>{const{refetch:e,loading:a,error:s,workspaces:r,leaveWorkspace:i,updateWorkspace:l,deleteWorkspace:m,getWorkspaceMembers:c,getWorkspaceRoles:d,createWorkspaceRole:p,deleteWorkspaceRole:u,removeWorkspaceMember:f,addWorkspaceMemberRole:h,removeWorkspaceMemberRole:g,getWorkspaceInvitations:x,createWorkspaceInvitation:w,discardWorkspaceInvitation:b,resendWorkspaceInvitation:j}=va(),{workspaceMemberships:v}=tn(),{session:k,loading:N,error:_}=ot(),C=o.useMemo(()=>(v==null?void 0:v.find(Y=>{var de;return Y.id===((de=k==null?void 0:k.active_signin)==null?void 0:de.active_workspace_membership_id)}))||null,[v,k]),y=o.useMemo(()=>(C==null?void 0:C.workspace)||null,[C]),E=o.useCallback(async()=>{if(y)return await i(y.id)},[y,i]),A=o.useCallback(async Y=>{if(y)return await l(y,Y)},[y,l]),H=o.useCallback(async()=>{if(y)return await m(y)},[y,m]),M=o.useCallback(async Y=>y?await c(y,Y):{data:[],meta:{total:0,page:1,limit:10}},[y,c]),T=o.useCallback(async()=>y?await d(y):[],[y,d]),P=o.useCallback(async(Y,de)=>{if(y)return await p(y,Y,de)},[y,p]),S=o.useCallback(async Y=>{if(y)return await u(y,Y)},[y,u]),$=o.useCallback(async Y=>{if(y)return await f(y,Y)},[y,f]),Z=o.useCallback(async(Y,de)=>{if(y)return await h(y,Y,de)},[y,h]),R=o.useCallback(async(Y,de)=>{if(y)return await g(y,Y,de)},[y,g]),L=o.useMemo(()=>(r==null?void 0:r.find(Y=>Y.id===(y==null?void 0:y.id)))||null,[r,y]),O=o.useCallback(async()=>L?await x(L):[],[L,x]),F=o.useCallback(async Y=>{if(L)return await w(L,Y.email,Y.workspaceRoleId)},[L,w]),W=o.useCallback(async Y=>{if(L)return await b(L,Y)},[L,b]),U=o.useCallback(async Y=>{if(L)return await j(L,Y)},[L,j]),V=a||N,G=s||_;return V?{activeWorkspace:null,activeMembership:null,loading:!0,error:G,refetch:e,leave:null,updateWorkspace:null,deleteWorkspace:null,getMembers:null,getRoles:null,createRole:null,deleteRole:null,inviteMember:null,removeMember:null,addMemberRole:null,removeMemberRole:null,getInvitations:null,discardInvitation:null,resendInvitation:null}:{activeWorkspace:y,activeMembership:C,loading:!1,error:G,refetch:e,leave:E,updateWorkspace:A,deleteWorkspace:H,getMembers:M,getRoles:T,createRole:P,deleteRole:S,inviteMember:F,removeMember:$,addMemberRole:Z,removeMemberRole:R,getInvitations:O,discardInvitation:W,resendInvitation:U}};function jn(e){const a=new Uint8Array(e);let s="";for(let r=0;r<a.length;r++)s+=String.fromCharCode(a[r]);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function _n(e){const a=e.replace(/-/g,"+").replace(/_/g,"/"),s=a.padEnd(a.length+(4-a.length%4)%4,"="),r=atob(s),i=new Uint8Array(r.length);for(let l=0;l<r.length;l++)i[l]=r.charCodeAt(l);return i.buffer}const K1=async e=>(await I(await e("/me"))).data,Y1=async e=>(await I(await e("/me/signins"))).data;function ba(){const{client:e,loading:a}=je(),{data:s,error:r,isLoading:i,mutate:l}=Se(a?null:"/user",()=>K1(e)),m=async L=>{const O=new FormData;for(const[W,U]of Object.entries(L))U!=null&&U!==""&&O.append(W,String(U));const F=await I(await e("/me",{method:"POST",body:O}));return l(),F},c=async()=>await I(await e("/me/email-addresses",{method:"GET"})),d=async L=>await I(await e(`/me/email-addresses/${L}`,{method:"GET"})),p=async L=>{const O=new FormData;return O.append("email",L),await I(await e("/me/email-addresses",{method:"POST",body:O}))},u=async L=>await I(await e(`/me/email-addresses/${L}/delete`,{method:"POST"})),f=async L=>await I(await e(`/me/email-addresses/${L}/prepare-verification`,{method:"POST"})),h=async(L,O)=>await I(await e(`/me/email-addresses/${L}/attempt-verification?code=${O}`,{method:"POST"})),g=async(L,O)=>{const F=new FormData;return F.append("phone_number",L),F.append("country_code",O),await I(await e("/me/phone-numbers",{method:"POST",body:F}))},x=async L=>await I(await e(`/me/phone-numbers/${L}/delete`,{method:"POST"})),w=async L=>await I(await e(`/me/phone-numbers/${L}/prepare-verification`,{method:"POST"})),b=async(L,O)=>{const F=new FormData;return F.append("code",O),await I(await e(`/me/phone-numbers/${L}/attempt-verification`,{method:"POST",body:F}))},j=async L=>{const O=await I(await e(`/me/phone-numbers/${L}/make-primary`,{method:"POST"}));return l(),O},v=async L=>await I(await e(`/me/email-addresses/${L}/make-primary`,{method:"POST"})),k=async()=>(await I(await e("/me/authenticator",{method:"POST"}))).data,N=async(L,O)=>{const F=new FormData;return F.append("authenticator_id",L),O.forEach(U=>{F.append("codes",U)}),await I(await e("/me/authenticator/attempt-verification",{method:"POST",body:F}))},_=async L=>await I(await e(`/me/authenticator/${L}/delete`,{method:"POST"})),C=async()=>(await I(await e("/me/backup-codes",{method:"POST"}))).data,y=async L=>{const O=new FormData;return O.append("file",L),await I(await e("/me/profile-picture",{method:"POST",body:O}))},E=async()=>(await I(await e("/me/backup-codes/regenerate",{method:"POST"}))).data,A=async(L,O)=>{const F=new FormData;return F.append("current_password",L),F.append("new_password",O),await I(await e("/me/update-password",{method:"POST",body:F}))},H=async L=>{const O=new FormData;O.append("current_password",L);const F=await I(await e("/me/remove-password",{method:"POST",body:O}));return l(),F},M=async L=>{const O=new FormData;return O.append("password",L),await I(await e("/me/account/delete",{method:"POST",body:O}))},T=async L=>await I(await e(`/me/social-connections/${L}/disconnect`,{method:"POST"})),P=async({provider:L,redirectUri:O})=>{var U;const F=new URLSearchParams({provider:L});O&&F.append("redirect_uri",O);const W=await I(await e(`/me/init-sso-connection?${F.toString()}`,{method:"POST"}));return"data"in W&&((U=W.data)!=null&&U.oauth_url)&&window.open(W.data.oauth_url,"_blank"),W},S=async()=>await I(await e("/me/passkeys",{method:"GET"})),$=async L=>{var de,fe;const O=await I(await e("/me/passkeys/register/begin",{method:"POST"}));if(!("data"in O))return O;const F=O.data.options.publicKey,W={challenge:_n(F.challenge),rp:F.rp,user:{id:_n(F.user.id),name:F.user.name,displayName:F.user.displayName},pubKeyCredParams:F.pubKeyCredParams,timeout:F.timeout,attestation:F.attestation,authenticatorSelection:F.authenticatorSelection,excludeCredentials:(de=F.excludeCredentials)==null?void 0:de.map(ne=>({type:ne.type,id:_n(ne.id),transports:ne.transports}))},U=await navigator.credentials.create({publicKey:W});if(!U)throw new Error("Failed to create credential");const V=U.response,G={id:U.id,rawId:jn(U.rawId),type:U.type,response:{clientDataJSON:jn(V.clientDataJSON),attestationObject:jn(V.attestationObject),transports:((fe=V.getTransports)==null?void 0:fe.call(V))||[]}};return await I(await e(`/me/passkeys/register/finish?name=${encodeURIComponent(L||"")}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(G)}))},Z=async L=>await I(await e(`/me/passkeys/${L}/delete`,{method:"POST"})),R=async(L,O)=>await I(await e(`/me/passkeys/${L}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:O})}));return{user:{...s,refetch:l},loading:a||i,error:r||null,updateProfile:m,getEmailAddresses:c,getEmailAddress:d,createEmailAddress:p,deleteEmailAddress:u,prepareEmailVerification:f,attemptEmailVerification:h,makeEmailPrimary:v,createPhoneNumber:g,deletePhoneNumber:x,preparePhoneVerification:w,attemptPhoneVerification:b,makePhonePrimary:j,setupAuthenticator:k,verifyAuthenticator:N,deleteAuthenticator:_,generateBackupCodes:C,regenerateBackupCodes:E,updateProfilePicture:y,disconnectSocialConnection:T,connectSocialAccount:P,updatePassword:A,removePassword:H,deleteAccount:M,getPasskeys:S,registerPasskey:$,deletePasskey:Z,renamePasskey:R}}function Eo(){const{client:e,loading:a}=je(),{data:s,error:r,isLoading:i,mutate:l}=Se(a?null:"/me/signins",()=>Y1(e));return{signins:s,error:r||null,removeSignin:async c=>await I(await e(`/me/signins/${c}/signout`,{method:"POST"})),refetch:l,loading:i||a}}function Ao(){const{session:e,loading:a}=ot(),{loading:s,organizationMemberships:r}=xa(),{loading:i,workspaceMemberships:l}=tn(),m=o.useMemo(()=>!e||!e.signins||e.signins.length===0?null:(r==null?void 0:r.find(d=>{var p;return d.id===((p=e.active_signin)==null?void 0:p.active_organization_membership_id)}))||null,[r,e]),c=o.useMemo(()=>!e||!e.signins||e.signins.length===0?null:(l==null?void 0:l.find(d=>{var p;return d.id===((p=e.active_signin)==null?void 0:p.active_workspace_membership_id)}))||null,[l,e]);return{loading:a||s||i,orgMembership:m,workspaceMembership:c}}function Mo(){const{client:e,loading:a}=je(),[s,r]=o.useState(!1),i=async l=>{r(!0);try{const m=new FormData;for(const[p,u]of Object.entries(l))u&&m.append(p,u);const c=await e("/waitlist/join",{method:"POST",body:m});return await I(c)}finally{r(!1)}};return a?{loading:!0,joinWaitlist:null}:{loading:s,joinWaitlist:i}}function Ro(){const{client:e,loading:a}=je(),[s,r]=o.useState(!1),[i,l]=o.useState(null),[m,c]=o.useState(null),[d,p]=o.useState(null),[u,f]=o.useState(!1),[h,g]=o.useState(null);o.useEffect(()=>{if(u||a)return;const w=new URLSearchParams(window.location.search),b=w.get("code"),j=w.get("state"),v=w.get("error"),k=w.get("error_description");if(!b&&!v){f(!0);const N=new Error("No OAuth callback data found.");l(N);return}if(f(!0),r(!0),v){const N=k||v,_=new Error(`OAuth Error: ${N}`);l(_),r(!1);return}if(b&&j)x(b,j);else{const N=new Error("Missing required OAuth parameters");l(N),r(!1)}},[u,a]);const x=async(w,b)=>{try{let j,v;try{const _=b.split(".");if(_.length!==3)throw new Error("Invalid OAuth state format - missing signature");const C=_[0].replace(/-/g,"+").replace(/_/g,"/"),y=C.length%4?"=".repeat(4-C.length%4):"",A=atob(C+y).split("|")[0];if(A==="sign_in")j="/auth/oauth2/callback",v="GET";else if(A==="connect_social")j="/me/sso-connection-callback",v="POST";else throw new Error(`Unknown OAuth action: ${A}`)}catch(_){const C=_ instanceof Error?_:new Error("Failed to parse OAuth state");l(new Error(`Invalid OAuth callback: ${C.message}. The authorization link may be expired or malformed. Please try signing in again.`)),r(!1);return}const k=await e(`${j}?code=${encodeURIComponent(w)}&state=${encodeURIComponent(b)}`,{method:v}),N=await I(k);if("data"in N){const _=N.data.session,C=N.data.redirect_uri||null;if(c(_),p(C),_.signin_attempts&&_.signin_attempts.length>0){const y=_.signin_attempts.at(-1);y&&g(y)}}else{const _=new Error("Social callback failed");l(_)}}catch(j){const v=j instanceof Error?j:new Error("Unknown error occurred");l(v)}finally{r(!1)}};return{loading:s,error:i,session:m,redirectUri:d,processed:u,signinAttempt:h}}function Lo(){const{client:e,loading:a}=je(),[s,r]=o.useState(!1),[i,l]=o.useState(null);return{loading:a||s,verifyMagicLink:async c=>{if(!c.token||!c.attempt)throw new Error("Invalid magic link parameters");r(!0),l(null);try{const d=new URL("/auth/verify-magic-link",window.location.origin);d.searchParams.set("token",c.token),d.searchParams.set("attempt",c.attempt),c.redirectUri&&d.searchParams.set("redirect_uri",c.redirectUri);const p=await e(d.pathname+d.search,{method:"GET"}),u=await I(p);return r(!1),l(!0),u}catch(d){throw r(!1),l(!1),d}},success:i}}function Q1(){const[e,a]=o.useState({});return o.useEffect(()=>{const s=new URLSearchParams(window.location.search);a({token:s.get("token")||void 0,attempt:s.get("attempt")||void 0,redirectUri:s.get("redirect_uri")||void 0})},[]),e}function Po(){const{client:e,loading:a}=je();return{loading:a,forgotPassword:async l=>{const m=new FormData;m.append("email",l);const c=await e("/auth/forgot-password",{method:"POST",body:m});return await I(c)},verifyOtp:async(l,m)=>{const c=new FormData;c.append("email",l),c.append("otp",m);const d=await e("/auth/forgot-password",{method:"POST",body:c});return await I(d)},resetPassword:async(l,m)=>{const c=new FormData;c.append("token",l),c.append("password",m);const d=await e("/auth/reset-password",{method:"POST",body:c});return await I(d)}}}const J1=()=>{},X1=J1(),Xn=Object,li=e=>e===X1,ed=e=>typeof e=="function",Ms=new WeakMap,td=e=>Xn.prototype.toString.call(e),kn=(e,a)=>e===`[object ${a}]`;let ad=0;const er=e=>{const a=typeof e,s=td(e),r=kn(s,"Date"),i=kn(s,"RegExp"),l=kn(s,"Object");let m,c;if(Xn(e)===e&&!r&&!i){if(m=Ms.get(e),m)return m;if(m=++ad+"~",Ms.set(e,m),Array.isArray(e)){for(m="@",c=0;c<e.length;c++)m+=er(e[c])+",";Ms.set(e,m)}if(l){m="#";const d=Xn.keys(e).sort();for(;!li(c=d.pop());)li(e[c])||(m+=c+":"+er(e[c])+",");Ms.set(e,m)}}else m=r?e.toJSON():a=="symbol"?e.toString():a=="string"?JSON.stringify(e):""+e;return m},sd=e=>{if(ed(e))try{e=e()}catch{e=""}const a=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?er(e):"",[e,a]},nd=e=>sd(e?e(0,null):null)[0],Cn=Promise.resolve(),rd=e=>(a,s,r)=>{const i=o.useRef(!1),{cache:l,initialSize:m=1,revalidateAll:c=!1,persistSize:d=!1,revalidateFirstPage:p=!0,revalidateOnMount:u=!1,parallel:f=!1}=r,[,,,h]=Vt.get(gr);let g;try{g=nd(a),g&&(g=ko+g)}catch{}const[x,w,b]=ma(l,g),j=o.useCallback(()=>ke(x()._l)?m:x()._l,[l,g,m]);Dn.useSyncExternalStore(o.useCallback(E=>g?b(g,()=>{E()}):()=>{},[l,g]),j,j);const v=o.useCallback(()=>{const E=x()._l;return ke(E)?m:E},[g,m]),k=o.useRef(v());Is(()=>{if(!i.current){i.current=!0;return}g&&w({_l:d?k.current:v()})},[g,l]);const N=u&&!i.current,_=e(g,async E=>{const A=x()._i,H=x()._r;w({_r:mt});const M=[],T=v(),[P]=ma(l,E),S=P().data,$=[];let Z=null;for(let R=0;R<T;++R){const[L,O]=ms(a(R,f?null:Z));if(!L)break;const[F,W]=ma(l,L);let U=F().data;const V=c||A||ke(U)||p&&!R&&!ke(S)||N||S&&!ke(S[R])&&!r.compare(S[R],U);if(s&&(typeof H=="function"?H(U,O):V)){const G=async()=>{if(!(L in h))U=await s(O);else{const de=h[L];delete h[L],U=await de}W({data:U,_k:O}),M[R]=U};f?$.push(G):await G()}else M[R]=U;f||(Z=U)}return f&&await Promise.all($.map(R=>R())),w({_i:mt}),M},r),C=o.useCallback(function(E,A){const H=typeof A=="boolean"?{revalidate:A}:A||{},M=H.revalidate!==!1;return g?(M&&(ke(E)?w({_i:!0,_r:H.revalidate}):w({_i:!1,_r:H.revalidate})),arguments.length?_.mutate(E,{...H,revalidate:M}):_.mutate()):Cn},[g,l]),y=o.useCallback(E=>{if(!g)return Cn;const[,A]=ma(l,g);let H;if(Lt(E)?H=E(v()):typeof E=="number"&&(H=E),typeof H!="number")return Cn;A({_l:H}),k.current=H;const M=[],[T]=ma(l,g);let P=null;for(let S=0;S<H;++S){const[$]=ms(a(S,P)),[Z]=ma(l,$),R=$?Z().data:mt;if(ke(R))return C(T().data);M.push(R),P=R}return C(M)},[g,l,C,v]);return{size:v(),setSize:y,mutate:C,get data(){return _.data},get error(){return _.error},get isValidating(){return _.isValidating},get isLoading(){return _.isLoading}}},Xa=Z1(Se,rd);function $o({enabled:e=!0,channels:a,organizationIds:s,workspaceIds:r,onNotification:i,onError:l,reconnectDelay:m=1e3,maxReconnectAttempts:c=5}={}){const{session:d,loading:p}=ot(),{deployment:u,loading:f}=Ce(),[h,g]=o.useState(!1),[x,w]=o.useState(null),b=o.useRef(null),j=o.useRef(null),v=o.useRef(0),k=o.useRef(null),N=o.useRef(i),_=o.useRef(l),C=o.useRef(a),y=o.useRef(s),E=o.useRef(r),A=o.useRef(m),H=o.useRef(c);N.current=i,_.current=l,C.current=a,y.current=s,E.current=r,A.current=m,H.current=c;const M=o.useCallback(()=>{j.current&&(clearTimeout(j.current),j.current=null),k.current&&(clearInterval(k.current),k.current=null),b.current&&(b.current.close(),b.current=null)},[]),T=o.useCallback(async()=>{var L;if(!e||p||f||!d||!u)return;M();const $=new URL(u.backend_host),Z=$.protocol==="https:"?"wss:":"ws:",R=new URL("/notifications/stream",`${Z}//${$.host}`);if(u.mode==="staging"){const O=xt(u.backend_host);O&&R.searchParams.set("__dev_session__",O)}C.current&&C.current.length>0&&R.searchParams.set("channels",C.current.join(",")),y.current&&y.current.length>0&&R.searchParams.set("organization_ids",y.current.join(",")),E.current&&E.current.length>0&&R.searchParams.set("workspace_ids",E.current.join(","));try{const O=new WebSocket(R.toString());b.current=O,O.onopen=()=>{g(!0),w(null),v.current=0,k.current=setInterval(()=>{O.readyState===WebSocket.OPEN&&O.send("ping")},3e4)},O.onmessage=F=>{var W,U;try{const V=JSON.parse(F.data);if(V.type==="notification"&&V.data)(W=N.current)==null||W.call(N,V.data);else if(V.type==="error"){const G=V.error||"Unknown error occurred";w(G),(U=_.current)==null||U.call(_,G)}else V.type}catch{}},O.onerror=()=>{var F;w("Connection error occurred"),(F=_.current)==null||F.call(_,"Connection error occurred")},O.onclose=F=>{var W;if(g(!1),k.current&&(clearInterval(k.current),k.current=null),e&&F.code!==1e3&&v.current<H.current){v.current++;const U=A.current*Math.pow(2,v.current-1);j.current=setTimeout(()=>{T()},U)}else v.current>=H.current&&(w("Max reconnection attempts reached"),(W=_.current)==null||W.call(_,"Max reconnection attempts reached"))}}catch{w("Failed to connect"),(L=_.current)==null||L.call(_,"Failed to connect")}},[e,p,f,d,u,M]);o.useEffect(()=>(T(),()=>{M()}),[T,M]),o.useEffect(()=>{b.current&&b.current.readyState===WebSocket.OPEN&&T()},[a,s,r,T]);const P=o.useCallback(()=>{M(),g(!1)},[M]),S=o.useCallback(()=>{v.current=0,T()},[T]);return{isConnected:h,connectionError:x,disconnect:P,reconnect:S}}function an(e){if(!e)return"";const a=new URLSearchParams;e.limit&&a.append("limit",e.limit.toString()),e.cursor&&a.append("cursor",e.cursor),e.scope&&a.append("scope",e.scope),e.channels&&e.channels.length>0&&e.channels.forEach(r=>a.append("channels",r)),e.organization_ids&&e.organization_ids.length>0&&e.organization_ids.forEach(r=>a.append("organization_ids",r)),e.workspace_ids&&e.workspace_ids.length>0&&e.workspace_ids.forEach(r=>a.append("workspace_ids",r)),e.is_read!==void 0&&a.append("is_read",e.is_read.toString()),e.is_archived!==void 0&&a.append("is_archived",e.is_archived.toString()),e.is_starred!==void 0&&a.append("is_starred",e.is_starred.toString()),e.severity&&a.append("severity",e.severity);const s=a.toString();return s?"?"+s:""}async function id(e,a){const s=`/notifications${an(a)}`,r=await e(s,{method:"GET"});return(await I(r)).data}async function od(e,a){const s=await e(`/notifications/${a}/read`,{method:"POST"});return I(s)}async function ld(e,a){const s=await e(`/notifications/${a}/unread`,{method:"POST"});return I(s)}async function cd(e,a){const s=await e(`/notifications/mark-all-read${an(a)}`,{method:"POST"});return I(s)}async function dd(e,a){const s=await e(`/notifications/archive-all-read${an(a)}`,{method:"POST"});return I(s)}async function ud(e,a){const s=await e(`/notifications/${a}/archive`,{method:"POST"});return I(s)}async function md(e,a){const s=await e(`/notifications/${a}/star`,{method:"POST"});return I(s)}function Oo(e){var E;const{client:a,loading:s}=je(),{data:r,error:i,mutate:l,isLoading:m,size:c,setSize:d,isValidating:p}=Xa((A,H)=>{var S;if(s||A>0&&(!H||!H.has_more))return null;const M=A===0||(S=H==null?void 0:H.notifications[H.notifications.length-1])==null?void 0:S.id,{onNotification:T,...P}=e||{};return["wacht-notifications",{...P,cursor:M}]},([,A])=>id(a,A),{refreshInterval:6e4,revalidateOnFocus:!0,revalidateFirstPage:!0}),u=o.useMemo(()=>r?r.flatMap(A=>A.notifications):[],[r]),f=r?(E=r[r.length-1])==null?void 0:E.has_more:!1,h=o.useMemo(()=>{if(e!=null&&e.channels&&e.channels.length>0)return e.channels;switch(e==null?void 0:e.scope){case"organization":return["organization"];case"workspace":return["workspace"];case"current":return["current"];case"all":return["user","organization","workspace"];case"user":return["user"];default:return}},[e==null?void 0:e.channels,e==null?void 0:e.scope]),g=o.useMemo(()=>e==null?void 0:e.organization_ids,[e==null?void 0:e.organization_ids]),x=o.useMemo(()=>e==null?void 0:e.workspace_ids,[e==null?void 0:e.workspace_ids]);$o({enabled:!s&&!!r,channels:h,organizationIds:g,workspaceIds:x,onNotification:o.useCallback(A=>{l(async H=>{var S;if(!H||H.length===0||H.some($=>$.notifications.some(Z=>Z.id===A.id.toString())))return H;(S=e==null?void 0:e.onNotification)==null||S.call(e,A);const T=H[0];return[{...T,notifications:[{id:A.id.toString(),user_id:A.user_id.toString(),deployment_id:A.deployment_id.toString(),title:A.title,body:A.body,severity:A.severity,ctas:A.ctas,is_read:!1,is_archived:!1,created_at:A.created_at,updated_at:A.created_at},...T.notifications]},...H.slice(1)]},!1)},[l,e]),onError:o.useCallback(()=>{},[])});const w=o.useCallback(async A=>{s||(await l(async H=>H&&H.map(M=>({...M,notifications:M.notifications.map(T=>T.id===A?{...T,is_read:!0}:T)})),!1),await od(a,A),await l())},[a,s,l]),b=o.useCallback(async A=>{s||(await l(async H=>H&&H.map(M=>({...M,notifications:M.notifications.map(T=>T.id===A?{...T,is_read:!1}:T)})),!1),await ld(a,A),await l())},[a,s,l]),j=o.useCallback(async()=>{s||(await l(async A=>A&&A.map(H=>({...H,notifications:H.notifications.map(M=>({...M,is_read:!0}))})),!1),await cd(a,e),await l())},[a,e,l,s]),v=o.useCallback(async()=>{s||(await l(async A=>A&&A.map(H=>({...H,notifications:H.notifications.filter(M=>!M.is_read)})),!1),await dd(a,e),await l())},[a,e,s,l]),k=o.useCallback(async A=>{s||(await l(async H=>H&&H.map(M=>({...M,notifications:(e==null?void 0:e.is_archived)!==void 0?M.notifications.filter(T=>T.id!==A):M.notifications.map(T=>T.id===A?{...T,is_archived:!T.is_archived}:T)})),!1),await ud(a,A),await l())},[a,s,l,e==null?void 0:e.is_archived]),N=o.useCallback(async A=>{s||(await l(async H=>H&&H.map(M=>({...M,notifications:M.notifications.map(T=>T.id===A?{...T,is_starred:!T.is_starred}:T)})),!1),await md(a,A),await l())},[a,s,l]),_=o.useCallback(async()=>{p||!f||await d(c+1)},[p,f,d,c]),C=o.useCallback(async()=>{await l()},[l]),y=s||m||c>0&&r&&typeof r[c-1]>"u";return!r||y?{loading:!0,notifications:u,hasMore:f,markAsRead:void 0,markAllAsRead:void 0,archiveAllRead:void 0,archiveNotification:void 0,starNotification:void 0,markAsUnread:void 0,error:i,refetch:C,loadMore:_}:{loading:!1,error:i,notifications:u,hasMore:f,markAsRead:w,markAllAsRead:j,archiveAllRead:v,archiveNotification:k,starNotification:N,markAsUnread:b,refetch:C,loadMore:_}}async function pd(e,a){const s=`/notifications/scope-unread${an(a)}`,r=await e(s,{method:"GET"});return(await I(r)).data}function Zo(e){const{client:a,loading:s}=je(),{data:r,error:i,mutate:l}=Se(s?null:["wacht-notifications-unread",e],([,c])=>pd(a,c),{refreshInterval:3e4,revalidateOnFocus:!0}),m=async()=>{await l()};return!r||s?{loading:!0,count:0,error:i,refetch:m}:{loading:!1,count:r.count,error:i,refetch:m}}const Ta={DISCONNECTED:"disconnected",CONNECTED:"connected",ERROR:"error"},Ie={IDLE:"idle",STARTING:"starting",RUNNING:"running",WAITING_FOR_INPUT:"waiting_for_input",COMPLETED:"completed",FAILED:"failed"},ja={IDLE:"Idle",STARTING:"Starting",RUNNING:"Running",WAITING_FOR_INPUT:"WaitingForInput",COMPLETED:"Completed",FAILED:"Failed",CANCELLED:"Cancelled"};function hd(e){switch(e.trim()){case ja.IDLE:return Ie.IDLE;case ja.STARTING:case"starting":return Ie.STARTING;case ja.RUNNING:case"running":return Ie.RUNNING;case ja.WAITING_FOR_INPUT:case"waiting_for_input":return Ie.WAITING_FOR_INPUT;case ja.COMPLETED:case"completed":return Ie.COMPLETED;case ja.FAILED:case ja.CANCELLED:case"failed":case"cancelled":return Ie.FAILED;default:return Ie.IDLE}}function Ia(e){return e===Ie.STARTING||e===Ie.RUNNING||e===Ie.WAITING_FOR_INPUT}function Jt(e){return e&&typeof e=="object"?e:null}function Sa(e){return typeof e=="string"?e:null}function fd(e){const a=Jt(e);return(a==null?void 0:a.ConversationMessage)??e}function wd(e){const a=Jt(e);if(!a)return null;const s=Jt(a.content),r=Jt(a.metadata),i=Sa(a.message_type)||Sa(r==null?void 0:r.message_type)||Sa(s==null?void 0:s.type);return{...a,metadata:{...r||{},message_type:i}}}function gd(e){const a=Jt(e.metadata),s=Jt(e.content);return Sa(a==null?void 0:a.message_type)||Sa(s==null?void 0:s.type)}function xd(e){const a=Jt(e.content);return Sa(a==null?void 0:a.status)}function vd(e){const a=Jt(e.content),s=Sa(a==null?void 0:a.step);return s==="execution_cancelled"||s==="abort"}function bd(e){const a=Jt(e.content);return(a==null?void 0:a.further_actions_required)===!1}function ci(e){return[...e].sort((a,s)=>new Date(a.timestamp).getTime()-new Date(s.timestamp).getTime())}function yd(e,a){return{id:e,timestamp:new Date().toISOString(),content:{type:"user_message",message:a},metadata:{message_type:"user_message"}}}function jd(e,a){const s=new FormData;s.append("message",e);for(const r of a??[])s.append("files",r);return s}function _d(e,a){const s=new FormData;s.append("request_message_id",e);for(const r of a)s.append("approval_tool_name",r.tool_name),s.append("approval_mode",r.mode);return s}function kd(){const e=new FormData;return e.append("cancel","true"),e}function Cd({deployment:e,threadId:a,file:s}){const r=s.url||s.filename;if(!r)return null;if(/^https?:\/\//i.test(r))return r;const i=e.backend_host.replace(/\/$/,"");let l;if(r.startsWith("/ai/threads/"))l=new URL(r,`${i}/`);else{const m=r.includes("/")?r.split("/").pop()??"":r;if(!m)return null;l=new URL(`/ai/threads/${encodeURIComponent(a)}/filesystem/file`,`${i}/`),l.searchParams.set("path",`uploads/${m}`)}if(e.mode==="staging"){const m=xt(e.backend_host);m&&l.searchParams.set("__dev_session__",m)}return l.toString()}const Nd=5e3,Sd=5e3;function Ed({threadId:e,initialThread:a=null,boardItemId:s,platformAdapter:r}){var lt,Qe;const{deployment:i}=Ce(),{client:l}=je(),[m,c]=o.useState([]),[d,p]=o.useState(null),[u,f]=o.useState(null),[h,g]=o.useState(a),[x,w]=o.useState(Ie.IDLE),[b,j]=o.useState({status:Ta.DISCONNECTED}),[v,k]=o.useState(!0),[N,_]=o.useState(!1),[C,y]=o.useState(!1),[E,A]=o.useState(null),H=o.useRef(null),M=o.useRef(e),T=o.useRef(0),P=o.useRef(Ie.IDLE),S=o.useRef(null),$=o.useCallback(Q=>{c(le=>{const me=[...le],Te=me.findIndex(Pe=>String(Pe.id)===String(Q.id));return Te>=0?me[Te]=Q:me.push(Q),ci(me)})},[]),Z=o.useCallback(({messages:Q,prepend:le,hasMore:me})=>{const Te=ci(Q);Te.length>0&&(H.current=Te[0].id),c(Pe=>le?[...Te,...Pe]:Te),me!==void 0&&k(me)},[]),R=o.useCallback(Q=>{P.current=Q,w(Q)},[]),L=o.useCallback(Q=>{T.current=Date.now()+Nd,R(Q)},[R]),O=o.useCallback(()=>{var Q;T.current>Date.now()&&Ia(P.current)||(R(Ie.IDLE),(Q=S.current)==null||Q.call(S))},[R]),F=o.useCallback(Q=>{const le=hd(Q),me=Ia(le);!me&&T.current>Date.now()&&Ia(P.current)||(me&&(T.current=0),R(le))},[R]),W=o.useCallback(()=>{p(null),f(null)},[]),U=o.useCallback(Q=>{g(le=>le&&{...le,...Q?{status:Q}:{},last_activity_at:new Date().toISOString()})},[]),V=o.useCallback((Q,le)=>{$(yd(Q,le)),W()},[W,$]),G=o.useCallback(Q=>{const le=wd(Q);if(!le)return;switch(gd(le)){case"system_decision":$(le),vd(le)&&O();return;case"execution_summary":case"tool_result":case"user_message":$(le);return;case"steer":$(le),bd(le)&&O();return;case"approval_request":T.current=0,R(Ie.WAITING_FOR_INPUT),$(le);return;case"approval_response":$(le),L(Ie.RUNNING);return;case"execution_status":{const Te=xd(le);if(!Te)return;F(Te),g(Pe=>Pe&&{...Pe,status:Te});return}default:$(le)}},[F,O,R,L,$]),Y=o.useCallback((Q,le)=>{var me;(me=r==null?void 0:r.onPlatformEvent)==null||me.call(r,Q,le)},[r]),de=o.useRef(G),fe=o.useRef(Y),ne=o.useRef(l),ae=o.useRef(i);o.useEffect(()=>{de.current=G,fe.current=Y,ne.current=l,ae.current=i}),o.useEffect(()=>{M.current=e},[e]);const re=o.useRef(null),Le=o.useRef(null),K=o.useRef(0),at=10,ze=o.useCallback(async Q=>{if(!e)return;const le=e;Q?_(!0):y(!0),A(null);try{const me=new URLSearchParams({limit:"100"});Q&&me.append("before_id",Q),s&&me.append("board_item_id",s);const Te=await l(`/ai/threads/${e}/messages?${me}`,{method:"GET"}),Pe=await I(Te);Pe.data&&M.current===le&&Z({messages:Pe.data.data,prepend:!!Q,hasMore:Pe.data.has_more||!1})}catch(me){M.current===le&&A(me instanceof Error?me:new Error("Failed to fetch messages"))}finally{M.current===le&&(Q?_(!1):y(!1))}},[e,s,l,Z]);o.useEffect(()=>{const Q=ae.current;if(!Q||!e)return;const le=()=>{re.current&&(re.current.close(),re.current=null);const me=new URL(`${Q.backend_host}/ai/threads/${encodeURIComponent(e)}/stream`);if(Q.mode==="staging"){const Pe=xt(Q.backend_host);Pe&&me.searchParams.append("__dev_session__",Pe)}const Te=new EventSource(me.toString(),{withCredentials:Q.mode!=="staging"});re.current=Te,Te.onopen=()=>{if(j({status:Ta.CONNECTED}),K.current>0){const Pe=e;setTimeout(()=>{l(`/ai/threads/${Pe}/messages?limit=100${s?`&board_item_id=${encodeURIComponent(s)}`:""}`,{method:"GET"}).then(async qe=>{const pt=await I(qe);pt.data&&M.current===Pe&&Z({messages:pt.data.data,hasMore:pt.data.has_more||!1})}).catch(()=>{})},100)}K.current=0},Te.onerror=()=>{if(j({status:Ta.ERROR}),Te.close(),re.current=null,K.current<at){const Pe=Math.min(1e3*Math.pow(2,K.current),3e4);Le.current=setTimeout(()=>{K.current++,le()},Pe)}else j({status:Ta.DISCONNECTED})},Te.addEventListener("conversation_message",Pe=>{try{const qe=fd(JSON.parse(Pe.data));if(!qe)return;if(s){const pt=qe.board_item_id;if((pt==null?"":String(pt))!==s)return}de.current(qe)}catch{}}),Te.addEventListener("platform_event",Pe=>{try{const qe=JSON.parse(Pe.data);qe!=null&&qe.PlatformEvent?fe.current(qe.PlatformEvent[0],qe.PlatformEvent[1]):qe!=null&&qe.event_label&&fe.current(qe.event_label,qe.event_data)}catch{}})};return le(),()=>{Le.current&&(clearTimeout(Le.current),Le.current=null),re.current&&(re.current.close(),re.current=null)}},[e,s,l,Z]);const We=o.useCallback(async()=>{if(!e)return;const Q=e;try{const le=await l(`/ai/threads/${Q}`,{method:"GET"});if(!le.ok)return;const me=await I(le);me.data&&M.current===Q&&(g(me.data),F(me.data.status),Ua(`wacht-ai-thread:${Q}`,me.data,{revalidate:!1}))}catch{}},[e,l,F]);o.useEffect(()=>{S.current=We},[We]),o.useEffect(()=>{if(!e)return;We();const Q=window.setInterval(()=>{!Ia(P.current)&&T.current<=Date.now()||We()},Sd);return()=>{window.clearInterval(Q)}},[e,We]),o.useEffect(()=>{c([]),g(null),k(!0),_(!1),A(null),y(!!e),j({status:Ta.DISCONNECTED}),H.current=null,T.current=0,P.current=Ie.IDLE,w(Ie.IDLE),W()},[e,W]),o.useEffect(()=>{!a||a.id!==e||g(a)},[a,e]);const Re=o.useCallback(async(Q,le)=>{var me,Te;if(!(!e||!i)){p(Q),le&&le.length>0&&f(le),L(Ie.STARTING);try{const Pe=await l(`/ai/threads/${e}/run`,{method:"POST",body:jd(Q,le)});if(Pe.ok){const qe=await I(Pe),pt=((me=qe.data)==null?void 0:me.conversation_id)??null;U(typeof((Te=qe.data)==null?void 0:Te.status)=="string"?qe.data.status:void 0),pt?V(pt,Q):W(),L(Ie.RUNNING)}else T.current=0,R(Ie.IDLE),W()}catch{T.current=0,R(Ie.IDLE),W()}}},[e,i,l,L,R,U,W,V]);o.useEffect(()=>{e&&ze()},[e,ze]);const ce=o.useCallback(async()=>{await ze()},[ze]),B=o.useCallback(async()=>{if(!(N||!v||!H.current)){_(!0);try{await ze(H.current)}finally{_(!1)}}},[N,v,ze]),q=o.useCallback(()=>{c([]),W()},[W]),X=o.useCallback(async(Q,le)=>{if(!e)return!1;L(Ie.STARTING);try{return(await l(`/ai/threads/${e}/run`,{method:"POST",body:_d(Q,le)})).ok?(U(),L(Ie.RUNNING),!0):(T.current=0,R(Ie.IDLE),!1)}catch{return T.current=0,R(Ie.IDLE),!1}},[e,l,L,R,U]),oe=o.useCallback(async Q=>{if(!e)return!1;L(Ie.STARTING);try{return(await l(`/ai/threads/${e}/messages/answer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q)})).ok?(U(),L(Ie.RUNNING),!0):(T.current=0,R(Ie.IDLE),!1)}catch{return T.current=0,R(Ie.IDLE),!1}},[e,l,L,R,U]),Ee=o.useCallback(async()=>{if(!(!e||!Ia(x)))try{await l(`/ai/threads/${e}/run`,{method:"POST",body:kd()}),T.current=0,U(),R(Ie.IDLE)}catch{}},[e,x,l,R,U]),z=o.useCallback(Q=>!i||!e||!Q?null:Cd({deployment:i,threadId:e,file:Q}),[e,i]),D=o.useCallback(Q=>{const le=z(Q);if(!le)return;const me=document.createElement("a");me.href=le,me.download=(Q==null?void 0:Q.filename)||"attachment",me.rel="noreferrer",document.body.appendChild(me),me.click(),document.body.removeChild(me)},[z]),we=((lt=h==null?void 0:h.execution_state)==null?void 0:lt.pending_approval_request)??null,ge=((Qe=h==null?void 0:h.execution_state)==null?void 0:Qe.pending_question)??null,xe=h==null?void 0:h.status;return{thread:h,threadState:h,threadStatus:xe,messages:m,pendingMessage:d,pendingFiles:u,connectionState:b,isConnected:b.status===Ta.CONNECTED,hasActiveRun:Ia(x),isRunning:x===Ie.STARTING||x===Ie.RUNNING,executionStatus:x,isWaitingForInput:x===Ie.WAITING_FOR_INPUT,pendingApprovalRequest:we,pendingClarificationRequest:ge,hasMoreMessages:v,isLoadingMore:N,messagesLoading:C,messagesError:E,refreshThread:We,refreshMessages:ce,sendMessage:Re,submitApprovalResponse:X,submitAnswer:oe,clearMessages:q,loadMoreMessages:B,cancelExecution:Ee,resolveMessageFileUrl:z,downloadMessageFile:D}}function Ad(e){const{client:a}=je(),[s,r]=o.useState(!e),[i,l]=o.useState(!!e),[m,c]=o.useState(null),d=o.useRef(!1),p=o.useRef(!1),u=o.useRef(null),f=s,h=o.useCallback(async()=>{const N=await a("/ai/session",{method:"GET"});if(!N.ok)throw N.status===401||N.status===403?new Error("NO_SESSION"):new Error("Failed to fetch session");return(await I(N)).data},[a]),{data:g,error:x,isLoading:w,mutate:b}=Se(f?"wacht-agent-session":null,h,{revalidateOnFocus:!1});o.useEffect(()=>{if(!e||p.current||u.current===e)return;u.current=e,(async()=>{p.current=!0,l(!0);try{(await a(`/session/ticket/exchange?ticket=${encodeURIComponent(e)}`,{method:"GET"})).ok?(d.current=!0,r(!0)):c(new Error("Failed to exchange ticket"))}catch(_){c(_ instanceof Error?_:new Error("Failed to exchange ticket"))}finally{l(!1),p.current=!1}})()},[e,a]);const j=!m&&(e?s:!0)&&(!x||x.message!=="NO_SESSION"),v=m||(x&&x.message!=="NO_SESSION"?x:null);return{hasSession:j,sessionLoading:i||f&&w,sessionError:v,sessionId:(g==null?void 0:g.session_id)||null,actor:(g==null?void 0:g.actor)||null,agents:(g==null?void 0:g.agents)||[],ticketExchanged:s,ticketLoading:i,refetch:async()=>{await b()}}}const di={exists:!1,files:[]};function Rs(e,a,s){const i=(e||[]).filter(l=>l.id!==a.id);return!s&&a.archived_at?i:[a,...i]}function Md(e,a){return a===void 0?"":`?${new URLSearchParams({[e]:String(a)}).toString()}`}function tr(e,a){const s=new URLSearchParams({path:e});return a&&s.set("include_archived","true"),`?${s.toString()}`}function Ho(e,a){const s=new URLSearchParams;e&&s.set("path",e),a&&s.set("include_archived","true");const r=s.toString();return r?`?${r}`:""}function Rd(e){const a=e.split("/").pop()||e,s=a.lastIndexOf(".");return s<0||s===a.length-1?"":a.slice(s+1).toLowerCase()}function Ld(e,a){const s=Rd(a),r=new Set(["doc","docx","ppt","pptx","xls","xlsx","pdf","zip","gz","tar","7z","rar","jar","war","bin"]),i=new Set(["txt","md","mdx","markdown","json","jsonc","js","jsx","ts","tsx","mts","cts","mjs","cjs","py","rb","php","java","kt","kts","go","rs","c","cc","cpp","cxx","h","hpp","swift","sh","bash","zsh","fish","ps1","sql","html","htm","css","scss","less","xml","svg","yaml","yml","toml","ini","cfg","conf","env","log"]);return r.has(s)?!1:i.has(s)?!0:e.startsWith("text/")||e.includes("json")||e.includes("javascript")||e.includes("typescript")||e.includes("python")||e.includes("xml")||e.includes("yaml")}function nt(e,a,s){if(s!=null){if(typeof s=="string"){e.set(a,s);return}if(typeof s=="boolean"||typeof s=="number"){e.set(a,String(s));return}}}function Pd(e,a,s){s&&e.set(a,JSON.stringify(s))}function ui(e){const a=new FormData;return nt(a,"name",e.name),nt(a,"agent_id","agent_id"in e?e.agent_id:void 0),nt(a,"description",e.description),nt(a,"status",e.status),a}function $d(e){const a=new FormData;if(nt(a,"title",e.title),nt(a,"agent_id",e.agent_id),nt(a,"system_instructions",e.system_instructions),nt(a,"thread_purpose",e.thread_purpose),nt(a,"responsibility",e.responsibility),nt(a,"reusable",e.reusable),nt(a,"accepts_assignments",e.accepts_assignments),Pd(a,"metadata",e.metadata),Array.isArray(e.capability_tags))for(const s of e.capability_tags)a.append("capability_tags",s);return a}function Fo(e){const a=new FormData;return nt(a,"title",e.title),nt(a,"agent_id",e.agent_id),nt(a,"system_instructions",e.system_instructions),a}function To(e,a=[]){const s=new FormData;nt(s,"title",e.title),nt(s,"description",e.description),nt(s,"status",e.status),nt(s,"schedule_kind",e.schedule_kind),nt(s,"next_run_at",e.next_run_at),nt(s,"interval_seconds",e.interval_seconds),"clear_schedule"in e&&nt(s,"clear_schedule",e.clear_schedule);for(const r of a)s.append("files",r);return s}function Od(e={}){const{client:a}=je(),{includeArchived:s=!1,enabled:r=!0}=e,i=r?`wacht-ai-actor-projects:${s}`:null,l=o.useCallback(async()=>{const g=await a(`/ai/projects${Md("include_archived",s)}`);return(await I(g)).data},[a,s]),{data:m,error:c,mutate:d}=Se(i,l,{revalidateOnFocus:!1,refreshInterval:15e3}),p=o.useCallback(async g=>{const x=await a("/ai/projects",{method:"POST",body:ui(g)}),w=await I(x);return await d(b=>Rs(b,w.data,s),{revalidate:!0}),w},[a,s,d]),u=o.useCallback(async(g,x)=>{const w=await a(`/ai/projects/${g}/update`,{method:"POST",body:ui(x)}),b=await I(w);return await d(j=>Rs(j,b.data,s),{revalidate:!0}),b},[a,s,d]),f=o.useCallback(async g=>{const x=await a(`/ai/projects/${g}/archive`,{method:"POST",body:new URLSearchParams}),w=await I(x);return await d(b=>Rs(b,w.data,s),{revalidate:!0}),w},[a,s,d]),h=o.useCallback(async g=>{const x=await a(`/ai/projects/${g}/unarchive`,{method:"POST",body:new URLSearchParams}),w=await I(x);return await d(b=>Rs(b,w.data,s),{revalidate:!0}),w},[a,s,d]);return{projects:m||[],loading:!m&&!c,error:c,createProject:p,updateProject:u,archiveProject:f,unarchiveProject:h,refetch:async()=>{await d()}}}function Zd(e={}){const{client:a}=je(),{enabled:s=!0,query:r="",limit:i=12}=e,l=r.trim(),m=s?`wacht-ai-actor-project-search:${l}:${i}`:null,c=o.useCallback(async()=>{const f=new URLSearchParams({limit:String(i)});l&&f.set("q",l);const h=await a(`/ai/projects/search?${f.toString()}`);return(await I(h)).data},[a,i,l]),{data:d,error:p,mutate:u}=Se(m,c,{revalidateOnFocus:!1});return{projects:(d==null?void 0:d.data)||[],loading:!d&&!p,error:p,hasMore:(d==null?void 0:d.has_more)||!1,nextCursor:d==null?void 0:d.next_cursor,refetch:async()=>{await u()}}}function Hd(e,a={}){const{client:s}=je(),{includeArchived:r=!1,enabled:i=!0}=a,l=i&&e?`wacht-ai-threads:${e}:${r}`:null,m=o.useCallback(async()=>{if(!e)return{data:[],has_more:!1,next_cursor:""};const w=new URLSearchParams({limit:"100"});r&&w.set("include_archived","true");const b=await s(`/ai/projects/${e}/threads?${w.toString()}`);return(await I(b)).data},[e,s,r]),{data:c,error:d,mutate:p}=Se(l,m,{revalidateOnFocus:!1,refreshInterval:15e3}),u=o.useCallback(async(w,b)=>{const j=await s(`/ai/projects/${w}/threads`,{method:"POST",body:$d(b)}),v=await I(j);return w===e&&await p(),v},[e,s,p]),f=o.useCallback(async w=>{if(!e)throw new Error("projectId is required");return u(e,w)},[e,u]),h=o.useCallback(async(w,b)=>{const j=await s(`/ai/threads/${w}/update`,{method:"POST",body:Fo(b)}),v=await I(j);return await p(),v},[s,p]),g=o.useCallback(async w=>{const b=await s(`/ai/threads/${w}/archive`,{method:"POST",body:new URLSearchParams}),j=await I(b);return await p(),j},[s,p]),x=o.useCallback(async w=>{const b=await s(`/ai/threads/${w}/unarchive`,{method:"POST",body:new URLSearchParams}),j=await I(b);return await p(),j},[s,p]);return{threads:(c==null?void 0:c.data)||[],loading:!c&&!d,error:d,hasMore:(c==null?void 0:c.has_more)||!1,nextCursor:(c==null?void 0:c.next_cursor)||"",createThread:f,createThreadForProject:u,updateThread:h,archiveThread:g,unarchiveThread:x,refetch:async()=>{await p()}}}function Fd(e,a={}){var g,x;const{client:s}=je(),{includeArchived:r=!1,archivedOnly:i=!1,enabled:l=!0,query:m="",limit:c=10}=a,d=m.trim(),p=Xa((w,b)=>{if(!l||!e||w>0&&b&&!b.has_more)return null;const j=w===0||b==null?void 0:b.next_cursor;return["wacht-ai-project-thread-feed",e,i?"archived-only":r?"with-archived":"active-only",d,c,j||""]},async([,w,b,j,v,k])=>{const N=new URLSearchParams({limit:String(v)});b==="with-archived"?N.set("include_archived","true"):b==="archived-only"&&(N.set("include_archived","true"),N.set("archived_only","true")),j&&N.set("q",String(j)),k&&N.set("cursor",String(k));const _=await s(`/ai/projects/${w}/threads?${N.toString()}`);return(await I(_)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),u=o.useMemo(()=>{var w;return((w=p.data)==null?void 0:w.flatMap(b=>b.data||[]))||[]},[p.data]),f=p.data&&((g=p.data[p.data.length-1])==null?void 0:g.has_more)||!1,h=p.isValidating&&!!p.data&&p.size>(((x=p.data)==null?void 0:x.length)||0);return{threads:u,loading:!p.data&&!p.error,error:p.error||null,hasMore:f,loadingMore:h,loadMore:async()=>{!f||h||await p.setSize(w=>w+1)},refetch:async()=>{await p.mutate()}}}function Td(e={}){const{client:a}=je(),{enabled:s=!0,query:r="",limit:i=16}=e,l=r.trim(),m=s?`wacht-ai-actor-thread-search:${l}:${i}`:null,c=o.useCallback(async()=>{const f=new URLSearchParams({limit:String(i)});l&&f.set("q",l);const h=await a(`/ai/threads/search?${f.toString()}`);return(await I(h)).data},[a,i,l]),{data:d,error:p,mutate:u}=Se(m,c,{revalidateOnFocus:!1});return{threads:(d==null?void 0:d.data)||[],loading:!d&&!p,error:p,hasMore:(d==null?void 0:d.has_more)||!1,nextCursor:d==null?void 0:d.next_cursor,refetch:async()=>{await u()}}}function Id(e,a=!0){const{client:s}=je(),r=a&&e?`wacht-ai-thread:${e}`:null,i=o.useCallback(async()=>{if(!e)return null;const u=await s(`/ai/threads/${e}`);return(await I(u)).data},[e,s]),l=Se(r,i,{revalidateOnFocus:!1}),m=o.useCallback(async u=>{if(!e)throw new Error("threadId is required");const f=await s(`/ai/threads/${e}/update`,{method:"POST",body:Fo(u)}),h=await I(f);return await l.mutate(),h},[e,s,l]),c=o.useCallback(async()=>{if(!e)throw new Error("threadId is required");const u=await s(`/ai/threads/${e}/archive`,{method:"POST",body:new URLSearchParams}),f=await I(u);return await l.mutate(),f},[e,s,l]),d=o.useCallback(async()=>{if(!e)throw new Error("threadId is required");const u=await s(`/ai/threads/${e}/unarchive`,{method:"POST",body:new URLSearchParams}),f=await I(u);return await l.mutate(),f},[e,s,l]),p=o.useCallback(async u=>{if(!e)throw new Error("threadId is required");await s(`/ai/threads/${e}/messages/answer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)})},[e,s]);return{thread:l.data||null,loading:!l.data&&!l.error,error:l.error||null,updateThread:m,archiveThread:c,unarchiveThread:d,submitAnswer:p,refetch:async()=>{await l.mutate()}}}function Vd(e,a=!0){const{client:s}=je(),r=a&&e?`wacht-ai-thread-filesystem:${e}`:null,i=o.useCallback(async c=>{if(!e)throw new Error("threadId is required");const d=await s(`/ai/threads/${e}/filesystem/file${tr(c)}`);if(!d.ok)throw new Error("Failed to load file");const p=await d.blob(),u=(d.headers.get("content-type")||"application/octet-stream").split(";")[0].trim().toLowerCase(),f=Ld(u,c);let h;return f&&(h=await p.text()),{path:c,name:c.split("/").pop()||"file",mime_type:u,is_text:f,size_bytes:p.size,truncated:!1,content:h,blob:p}},[e,s]),l=o.useCallback(async c=>{if(!e)return di;const d=await s(`/ai/threads/${e}/filesystem${Ho(c)}`);return(await I(d)).data},[e,s]),m=Se(r,()=>l(),{revalidateOnFocus:!1});return{filesystem:m.data||di,filesystemLoading:!m.data&&!m.error,filesystemError:m.error||null,getFile:i,listDirectory:l,refetch:async()=>{await m.mutate()}}}function zd(e,a={}){var f,h;const{client:s}=je(),{enabled:r=!0,limit:i=40,order:l="asc"}=a,m=Math.min(Math.max(i,1),200),c=Xa((g,x)=>{if(!r||!e||g>0&&x&&!x.has_more)return null;const w=g===0||x==null?void 0:x.next_cursor;return["wacht-ai-thread-assignments",e,m,l,w||""]},async([,g,x,w,b])=>{const j=new URLSearchParams({limit:String(x)});w==="desc"&&j.set("order","desc"),b&&j.set("cursor",String(b));const v=await s(`/ai/threads/${g}/assignments?${j.toString()}`);return(await I(v)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),d=o.useMemo(()=>{var g;return((g=c.data)==null?void 0:g.flatMap(x=>x.data||[]))||[]},[c.data]),p=c.data&&((f=c.data[c.data.length-1])==null?void 0:f.has_more)||!1,u=c.isValidating&&!!c.data&&c.size>(((h=c.data)==null?void 0:h.length)||0);return{assignments:d,loading:!c.data&&!c.error,error:c.error||null,hasMore:p,loadingMore:u,loadMore:async()=>{!p||u||await c.setSize(g=>g+1)},refetch:async()=>{await c.mutate()}}}function Dd(e={},a){const s=new URLSearchParams;e.statuses&&e.statuses.length>0&&s.set("status",e.statuses.join(",")),e.includeArchived&&s.set("include_archived","true"),e.archivedOnly&&s.set("archived_only","true"),e.limit&&s.set("limit",String(e.limit)),a&&s.set("cursor",a);const r=s.toString();return r?`?${r}`:""}function Ud(e,a=!0,s={}){var x,w,b;const{client:r}=je(),i=((x=s.statuses)==null?void 0:x.join(","))||"all",l=s.archivedOnly?"archived-only":s.includeArchived?"with-archived":"active-only",m=s.limit||60,c=Xa((j,v)=>{if(!a||!e||j>0&&v&&!v.has_more)return null;const k=j===0||v==null?void 0:v.next_cursor;return["wacht-ai-project-tasks",e,i,l,m,k||""]},async([,j,,,,v])=>{const k=await r(`/ai/projects/${j}/board/items${Dd(s,v||void 0)}`);return(await I(k)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),d=o.useMemo(()=>{var j;return((j=c.data)==null?void 0:j.flatMap(v=>v.data||[]))||[]},[c.data]),p=c.data&&((w=c.data[c.data.length-1])==null?void 0:w.has_more)||!1,u=c.isValidating&&!!c.data&&c.size>(((b=c.data)==null?void 0:b.length)||0),f=o.useCallback(async(j,v=[])=>{if(!e)throw new Error("projectId is required");const k=await r(`/ai/projects/${e}/board/items`,{method:"POST",body:To(j,v)}),N=await I(k);return await c.mutate(),N},[e,r,c]),h=o.useCallback(async j=>{if(!e)throw new Error("projectId is required");const v=await r(`/ai/projects/${e}/board/items/${j}/archive`,{method:"POST",body:new URLSearchParams}),k=await I(v);return await c.mutate(),k},[e,r,c]),g=o.useCallback(async j=>{if(!e)throw new Error("projectId is required");const v=await r(`/ai/projects/${e}/board/items/${j}/unarchive`,{method:"POST",body:new URLSearchParams}),k=await I(v);return await c.mutate(),k},[e,r,c]);return{tasks:d,loading:!c.data&&!c.error,error:c.error||null,hasMore:p,loadingMore:u,loadMore:async()=>{!p||u||await c.setSize(j=>j+1)},createTask:f,archiveTask:h,unarchiveTask:g,refetch:async()=>{await c.mutate()}}}function Wd(e,a,s=!0,r={}){var T,P;const{client:i}=je(),l=r.includeArchived?"with-archived":"active-only",m=r.includeArchived?"?include_archived=true":"",c=r.assignmentsOrder??"asc",d=Math.min(Math.max(r.assignmentsLimit??40,1),200),p=s&&e&&a?`wacht-ai-board-item:${e}:${a}:${l}`:null,u=s&&e&&a?`wacht-ai-board-item-workspace:${e}:${a}:${l}`:null,f=o.useCallback(async()=>{if(!e||!a)return null;const S=await i(`/ai/projects/${e}/board/items/${a}${m}`);return(await I(S)).data},[e,a,i,m]),h=Se(p,f,{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3}),g=Xa((S,$)=>{if(!s||!e||!a||S>0&&$&&!$.has_more)return null;const Z=S===0||$==null?void 0:$.next_cursor;return["wacht-ai-board-item-assignments",e,a,l,c,d,Z||""]},async([,S,$,,Z,R,L])=>{const O=new URLSearchParams({limit:String(R)});r.includeArchived&&O.set("include_archived","true"),Z==="desc"&&O.set("order","desc"),L&&O.set("cursor",String(L));const F=await i(`/ai/projects/${S}/board/items/${$}/assignments?${O.toString()}`);return(await I(F)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),x=o.useCallback(async()=>{if(!e||!a)return{exists:!1,files:[]};const S=await i(`/ai/projects/${e}/board/items/${a}/filesystem${m}`);return(await I(S)).data},[e,a,i,m]),w=Se(u,x,{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3}),b=o.useCallback(async(S,$=[])=>{if(!e||!a)throw new Error("projectId and itemId are required");const Z=await i(`/ai/projects/${e}/board/items/${a}/update`,{method:"POST",body:To(S,$)}),R=await I(Z);return await h.mutate(),await w.mutate(),R},[e,a,i,h,w]),j=o.useCallback(async()=>{if(!e||!a)throw new Error("projectId and itemId are required");const S=await i(`/ai/projects/${e}/board/items/${a}/archive`,{method:"POST",body:new URLSearchParams}),$=await I(S);return await h.mutate(),$},[e,a,i,h]),v=o.useCallback(async()=>{if(!e||!a)throw new Error("projectId and itemId are required");const S=await i(`/ai/projects/${e}/board/items/${a}/unarchive`,{method:"POST",body:new URLSearchParams}),$=await I(S);return await h.mutate(),$},[e,a,i,h]),k=o.useCallback(async()=>{if(!e||!a)throw new Error("projectId and itemId are required");const S=await i(`/ai/projects/${e}/board/items/${a}/cancel`,{method:"POST",body:new URLSearchParams}),$=await I(S);return await h.mutate(),await g.mutate(),$},[e,a,i,h,g]),N=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const $=new FormData;if(S.freeform_text&&S.freeform_text.trim()!=="")$.append("freeform_text",S.freeform_text);else for(const L of S.answers??[])$.append("answer_question_id",L.question_id),$.append("answer_value",JSON.stringify(L.value));const Z=await i(`/ai/projects/${e}/board/items/${a}/answer`,{method:"POST",body:$}),R=await I(Z);return await h.mutate(),R},[e,a,i,h]),_=o.useCallback(async S=>{var O;if(!e||!a)throw new Error("projectId and itemId are required");const $=h.data,Z=(O=$==null?void 0:$.pending_approval)==null?void 0:O.request_message_id;if(!Z)throw new Error("Task has no pending approval");const R=new FormData;R.set("request_message_id",Z);for(const F of S)R.append("approval_tool_name",F.tool_name),R.append("approval_mode",F.mode);const L=await i(`/ai/projects/${e}/board/items/${a}/approval`,{method:"POST",body:R});return await h.mutate(),L.ok},[e,a,i,h]),C=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const $=await i(`/ai/projects/${e}/board/items/${a}/filesystem/file${tr(S,r.includeArchived)}`);return await I($)},[e,a,i,r.includeArchived]),y=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const $=await i(`/ai/projects/${e}/board/items/${a}/filesystem/download${tr(S,r.includeArchived)}`);if(!$.ok)throw new Error("Failed to download file");const Z=await $.blob(),R=S.split("/").pop()||"file",L=URL.createObjectURL(Z),O=document.createElement("a");O.href=L,O.download=R,document.body.appendChild(O),O.click(),O.remove(),URL.revokeObjectURL(L)},[e,a,i,r.includeArchived]),E=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const $=await i(`/ai/projects/${e}/board/items/${a}/filesystem${Ho(S,r.includeArchived)}`);return await I($)},[e,a,i,r.includeArchived]),A=o.useMemo(()=>{var S;return((S=g.data)==null?void 0:S.flatMap($=>$.data||[]))||[]},[g.data]),H=g.data&&((T=g.data[g.data.length-1])==null?void 0:T.has_more)||!1,M=g.isValidating&&!!g.data&&g.size>(((P=g.data)==null?void 0:P.length)||0);return{item:h.data||null,assignments:A,assignmentsHasMore:H,assignmentsLoadingMore:M,loadMoreAssignments:async()=>{!H||M||await g.setSize(S=>S+1)},taskWorkspace:w.data||{exists:!1,files:[]},taskWorkspaceLoading:!w.data&&!w.error,taskWorkspaceError:w.error||null,loading:!h.data&&!h.error||!g.data&&!g.error,error:h.error||g.error||null,updateItem:b,archiveItem:j,unarchiveItem:v,cancelItem:k,submitAnswer:N,submitApproval:_,getTaskWorkspaceFile:C,downloadTaskWorkspaceFile:y,listTaskWorkspaceDirectory:E,refetch:async()=>{await h.mutate(),await g.mutate(),await w.mutate()},refetchAssignments:async()=>{await g.mutate()},refetchTaskWorkspace:async()=>{await w.mutate()}}}function Bd(e,a=!0){var g;const{client:s}=je(),{data:r,error:i,mutate:l,isLoading:m,size:c,setSize:d,isValidating:p}=Xa((x,w)=>{if(!a||!e||x>0&&(!w||!w.has_more))return null;const b=x===0||w==null?void 0:w.next_cursor;return["wacht-ai-thread-graphs",e,b]},async([,x,w])=>{const b=new URLSearchParams;b.set("limit","10"),w&&b.set("cursor",String(w));const j=await s(`/ai/threads/${x}/task-graphs?${b.toString()}`),k=(await I(j)).data||{data:[],limit:10,has_more:!1};return{...k,data:(k.data||[]).map(N=>({...N,nodes:Array.isArray(N.nodes)?N.nodes:[],edges:Array.isArray(N.edges)?N.edges:[],summary:N.summary||null}))}},{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3,revalidateFirstPage:!0,revalidateAll:!1,persistSize:!0}),u=o.useMemo(()=>r?r.flatMap(x=>x.data||[]):[],[r]),f=r&&((g=r[r.length-1])==null?void 0:g.has_more)||!1,h=p&&!!r&&c>((r==null?void 0:r.length)||0);return{graphs:u,latestGraph:u[0]||null,has_more:f,loadingMore:h,loading:m,error:i,loadMore:async()=>{!f||h||await d(c+1)},refetch:async()=>{await l()}}}function Gd(e,a,s=!0){const{client:r}=je(),i=s&&e&&a?`wacht-ai-board-item-comments:${e}:${a}`:null,l=o.useCallback(async()=>{if(!e||!a)return[];const d=await r(`/ai/projects/${e}/board/items/${a}/comments`);return(await I(d)).data},[e,a,r]),m=Se(i,l,{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3}),c=o.useCallback(async(d,p)=>{if(!e||!a)throw new Error("projectId and itemId are required");const u=new FormData;if(u.set("body",d),p)for(const g of p)u.append("attachments",g,g.name);const f=await r(`/ai/projects/${e}/board/items/${a}/comments`,{method:"POST",body:u}),h=await I(f);return await m.mutate(),h},[e,a,r,m]);return{comments:m.data||[],loading:!m.data&&!m.error,error:m.error||null,createComment:c,refetch:async()=>{await m.mutate()}}}function qd(e=!0){const{client:a}=je(),s=e?"wacht-ai-actor-mcp-servers":null,r=o.useCallback(async()=>{const u=await a("/ai/mcp-servers");return(await I(u)).data},[a]),{data:i,error:l,mutate:m,isLoading:c}=Se(s,r,{revalidateOnFocus:!1}),d=o.useCallback(async u=>{const f=await a(`/ai/mcp-servers/${u}/connect`,{method:"POST",body:new URLSearchParams});return I(f)},[a]),p=o.useCallback(async u=>{const f=await a(`/ai/mcp-servers/${u}/disconnect`,{method:"POST",body:new URLSearchParams}),h=await I(f);return await m(),h},[a,m]);return{servers:i??[],loading:c,error:l,connect:d,disconnect:p,refetch:async()=>{await m()}}}function Kd(e=!0){const{client:a}=je(),s=e?"wacht-ai-external-agent-connections":null,r=o.useCallback(async()=>{const u=await a("/ai/external-connections");return(await I(u)).data},[a]),{data:i,error:l,mutate:m,isLoading:c}=Se(s,r,{revalidateOnFocus:!1}),d=o.useCallback(async(u,f,h)=>{const g=await a(`/ai/external-connections/${encodeURIComponent(u)}/${encodeURIComponent(f)}/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({return_url:(h==null?void 0:h.returnUrl)??""})}),x=await I(g);return await m(),x.data},[a,m]),p=o.useCallback(async(u,f)=>{const h=await a(`/ai/external-connections/${encodeURIComponent(u)}/${encodeURIComponent(f)}`,{method:"DELETE"}),g=await I(h);return await m(),g.data},[a,m]);return{connections:i??[],loading:c,error:l,connect:d,disconnect:p,refetch:async()=>{await m()}}}function Io(e){const a=new URLSearchParams;return a.append("url",e.url),e.description&&a.append("description",e.description),e.subscribed_events&&e.subscribed_events.forEach(s=>a.append("subscribed_events",s)),e.subscriptions&&e.subscriptions.length>0&&a.append("subscriptions",JSON.stringify(e.subscriptions)),e.headers&&Object.entries(e.headers).forEach(([s,r])=>{a.append(`headers[${s}]`,r)}),e.rate_limit_config&&(a.append("rate_limit[duration_ms]",e.rate_limit_config.duration_ms.toString()),a.append("rate_limit[max_requests]",e.rate_limit_config.max_requests.toString())),a}function Yd(e){const a=new URLSearchParams;return e.url&&a.append("url",e.url),e.description!==void 0&&a.append("description",e.description||""),e.subscribed_events&&e.subscribed_events.forEach(s=>a.append("subscribed_events",s)),e.subscriptions&&e.subscriptions.length>0&&a.append("subscriptions",JSON.stringify(e.subscriptions)),e.headers&&Object.entries(e.headers).forEach(([s,r])=>{a.append(`headers[${s}]`,r)}),e.is_active!==void 0&&a.append("is_active",e.is_active.toString()),e.rate_limit_config&&(a.append("rate_limit[duration_ms]",e.rate_limit_config.duration_ms.toString()),a.append("rate_limit[max_requests]",e.rate_limit_config.max_requests.toString())),a}function Qd(e){const a=new URLSearchParams;return a.append("event_name",e.event_name),a.append("payload",JSON.stringify(e.payload||{})),a}function Jd(e){const a=new URLSearchParams;return(e.delivery_ids||[]).forEach(r=>a.append("delivery_ids",r)),e.start_date&&a.append("start_date",e.start_date),e.end_date&&a.append("end_date",e.end_date),e.status&&a.append("status",e.status),e.event_name&&a.append("event_name",e.event_name),e.endpoint_id&&a.append("endpoint_id",e.endpoint_id),e.idempotency_key&&a.append("idempotency_key",e.idempotency_key),a}const gs={"Content-Type":"application/x-www-form-urlencoded"};async function Mt(e,a){const s=await I(e);if(!s||!("data"in s))throw new Error(a);return s}async function Xd(e){const a=await e("/webhook/session",{method:"GET"});if(!a.ok)throw a.status===401||a.status===403?new Error("NO_SESSION"):new Error("Failed to fetch webhook app session");return(await Mt(a,"Failed to fetch webhook app session")).data}async function e2(e,a){if(!(await e(`/session/ticket/exchange?ticket=${encodeURIComponent(a)}`,{method:"GET"})).ok)throw new Error("Failed to exchange ticket")}async function t2(e,a){const s=Io(a),r=await e("/webhook/endpoints",{method:"POST",headers:gs,body:s.toString()});return Mt(r,"Failed to create webhook endpoint")}async function a2(e,a,s){const r=Yd(s),i=await e(`/webhook/endpoints/${a}`,{method:"PUT",headers:gs,body:r.toString()});return Mt(i,"Failed to update webhook endpoint")}async function s2(e,a){const s=await e(`/webhook/endpoints/${a}`,{method:"DELETE"});return Mt(s,"Failed to delete webhook endpoint")}async function n2(e,a,s){const r=Qd(s),i=await e(`/webhook/endpoints/${a}/test`,{method:"POST",headers:gs,body:r.toString()});return Mt(i,"Failed to test webhook endpoint")}async function r2(e){const a=await e("/webhook/rotate-secret",{method:"POST"});return Mt(a,"Failed to rotate signing secret")}async function i2(e,a){const s=new URLSearchParams;for(const i of a.failure_notification_emails)s.append("failure_notification_emails",i);const r=await e("/webhook/settings",{method:"PUT",headers:gs,body:s.toString()});return Mt(r,"Failed to update webhook settings")}async function o2(e,a){const s=Jd(a),r=await e("/webhook/deliveries/replay",{method:"POST",headers:gs,body:s.toString()});return Mt(r,"Failed to replay webhook delivery")}async function l2(e,a){const s=await e(`/webhook/deliveries/${a}`,{method:"GET"});return Mt(s,"Failed to fetch delivery details")}async function c2(e,{taskId:a}){const s=await e(`/webhook/deliveries/replay/${a}`,{method:"GET"});return Mt(s,"Failed to fetch replay task status")}async function d2(e,a){const s=(a==null?void 0:a.limit)??50,r=(a==null?void 0:a.offset)??0,i=await e(`/webhook/deliveries/replay?limit=${s}&offset=${r}`,{method:"GET"});return Mt(i,"Failed to fetch replay tasks")}async function u2(e,{taskId:a}){const s=await e(`/webhook/deliveries/replay/${a}/cancel`,{method:"POST"});return Mt(s,"Failed to cancel replay task")}function m2(e){const{client:a}=je(),[s,r]=o.useState(!e),[i,l]=o.useState(!!e),[m,c]=o.useState(null),d=o.useRef(!1),p=o.useRef(!1),u=o.useRef(null),f=s,h=o.useCallback(async()=>Xd(a),[a]),{data:g,error:x,isLoading:w,mutate:b}=Se(f?"wacht-webhook-app-session":null,h,{revalidateOnFocus:!1,shouldRetryOnError:!1});o.useEffect(()=>{if(!e||d.current||p.current||u.current===e)return;u.current=e,(async()=>{p.current=!0,l(!0);try{await e2(a,e),d.current=!0,r(!0)}catch(Z){c(Z instanceof Error?Z:new Error("Failed to exchange ticket"))}finally{l(!1),p.current=!1}})()},[e,a]);const j=o.useCallback(async $=>t2(a,$),[a]),v=o.useCallback(async($,Z)=>a2(a,$,Z),[a]),k=o.useCallback(async $=>s2(a,$),[a]),N=o.useCallback(async($,Z)=>n2(a,$,Z),[a]),_=o.useCallback(async()=>r2(a),[a]),C=o.useCallback(async $=>o2(a,$),[a]),y=o.useCallback(async $=>i2(a,$),[a]),E=o.useCallback(async $=>l2(a,$),[a]),A=o.useCallback(async $=>c2(a,$),[a]),H=o.useCallback(async $=>d2(a,$),[a]),M=o.useCallback(async $=>u2(a,$),[a]),T=!x||x.message!=="NO_SESSION",P=m||(x&&x.message!=="NO_SESSION"?x:null);return{hasSession:T,sessionLoading:i||f&&w,sessionError:P,sessionId:(g==null?void 0:g.session_id)||null,webhookApp:(g==null?void 0:g.webhook_app)||null,ticketExchanged:s,ticketLoading:i,refetch:async()=>{await b()},createEndpoint:j,updateEndpoint:v,deleteEndpoint:k,testEndpoint:N,rotateSecret:_,updateSettings:y,replayDelivery:C,fetchReplayTaskStatus:A,fetchReplayTasks:H,cancelReplayTask:M,fetchDeliveryDetail:E}}function p2(){const{client:e}=je(),a=o.useCallback(async()=>{const m=await e("/webhook/stats",{method:"GET"});return(await I(m)).data},[e]),{data:s,error:r,isLoading:i,mutate:l}=Se("wacht-webhook-stats",a,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{stats:s||null,loading:i,error:r,refetch:()=>l()}}function h2(){const{client:e}=je(),a=o.useCallback(async()=>{const m=await e("/webhook/endpoints",{method:"GET"});return(await I(m)).data},[e]),{data:s,error:r,isLoading:i,mutate:l}=Se("wacht-webhook-endpoints",a,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{endpoints:s||[],loading:i,error:r,refetch:()=>l()}}function f2(){const{client:e}=je();return{createEndpoint:o.useCallback(async s=>{const r=Io(s),i=await e("/webhook/endpoints",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});return await I(i)},[e]),loading:!1,error:null}}function w2(){const{client:e}=je(),a=o.useCallback(async()=>{const m=await e("/webhook/events",{method:"GET"});return(await I(m)).data},[e]),{data:s,error:r,isLoading:i,mutate:l}=Se("wacht-webhook-events",a,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{events:s||[],loading:i,error:r,refetch:()=>l()}}function g2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),e.status&&c.set("status",e.status),e.event_name&&c.set("event_name",e.event_name),e.limit&&c.set("limit",e.limit.toString()),e.cursor&&c.set("cursor",e.cursor);const d=await a(`/webhook/deliveries?${c.toString()}`,{method:"GET"});return(await I(d)).data},[a,e.endpoint_id,e.status,e.event_name,e.limit,e.cursor]),{data:r,error:i,isLoading:l,mutate:m}=Se(()=>{const c=new URLSearchParams;return e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),e.status&&c.set("status",e.status),e.event_name&&c.set("event_name",e.event_name),e.limit&&c.set("limit",e.limit.toString()),e.cursor&&c.set("cursor",e.cursor),`wacht-webhook-deliveries?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{deliveries:(r==null?void 0:r.data)||[],has_more:(r==null?void 0:r.has_more)||!1,next_cursor:r==null?void 0:r.next_cursor,loading:l,error:i,refetch:()=>m()}}function x2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),e.fields&&e.fields.length>0&&c.set("fields",e.fields.join(","));const d=await a(`/webhook/analytics?${c.toString()}`,{method:"GET"});return(await I(d)).data},[a,e.start_date,e.end_date,e.endpoint_id,e.fields]),{data:r,error:i,isLoading:l,mutate:m}=Se(()=>{const c=new URLSearchParams;return e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),e.fields&&e.fields.length>0&&c.set("fields",e.fields.join(",")),`wacht-webhook-analytics?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{analytics:r||null,loading:l,error:i,refetch:()=>m()}}function v2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.interval&&c.set("interval",e.interval),e.endpoint_id&&c.set("endpoint_id",e.endpoint_id);const d=await a(`/webhook/analytics/timeseries?${c.toString()}`,{method:"GET"});return(await I(d)).data},[a,e.start_date,e.end_date,e.interval,e.endpoint_id]),{data:r,error:i,isLoading:l,mutate:m}=Se(()=>{const c=new URLSearchParams;return e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.interval&&c.set("interval",e.interval),e.endpoint_id&&c.set("endpoint_id",e.endpoint_id),`wacht-webhook-timeseries?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{timeseries:(r==null?void 0:r.data)||[],interval:(r==null?void 0:r.interval)||"hour",loading:l,error:i,refetch:()=>m()}}function b2(e){const{client:a}=je(),[s,r]=o.useState(!e),[i,l]=o.useState(!!e),[m,c]=o.useState(null),d=o.useRef(!1),p=o.useRef(!1),u=o.useRef(null),f=s,h=o.useCallback(async()=>{const N=await a("/api-auth/session",{method:"GET"});if(!N.ok)throw N.status===401||N.status===403?new Error("NO_SESSION"):new Error("Failed to fetch API auth app session");return(await I(N)).data},[a]),{data:g,error:x,isLoading:w,mutate:b}=Se(f?"wacht-api-auth-app-session":null,h,{revalidateOnFocus:!1,shouldRetryOnError:!1});o.useEffect(()=>{if(!e||d.current||p.current||u.current===e)return;u.current=e,(async()=>{p.current=!0,l(!0);try{(await a(`/session/ticket/exchange?ticket=${encodeURIComponent(e)}`,{method:"GET"})).ok?(d.current=!0,r(!0)):c(new Error("Failed to exchange ticket"))}catch(_){c(_ instanceof Error?_:new Error("Failed to exchange ticket"))}finally{l(!1),p.current=!1}})()},[e,a]);const j=!x||x.message!=="NO_SESSION",v=m||(x&&x.message!=="NO_SESSION"?x:null);return{hasSession:j,sessionLoading:i||f&&w,sessionError:v,sessionId:(g==null?void 0:g.session_id)||null,apiAuthApp:(g==null?void 0:g.api_auth_app)||null,ticketExchanged:s,ticketLoading:i,refetch:async()=>{await b()}}}function y2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const u=new URLSearchParams;e.status&&u.set("status",e.status);const f=await a(`/api-auth/keys${u.toString()?`?${u.toString()}`:""}`,{method:"GET"});return(await I(f)).data},[a,e.status]),{data:r,error:i,isLoading:l,mutate:m}=Se(`wacht-api-auth-keys:${e.status||"all"}`,s,{revalidateOnFocus:!1,shouldRetryOnError:!1}),c=o.useCallback(async u=>{const f=new URLSearchParams;f.set("name",u.name),u.expires_at&&f.set("expires_at",u.expires_at);const h=await a("/api-auth/keys",{method:"POST",body:f}),g=await I(h);return await m(),g},[a,m]),d=o.useCallback(async u=>{const f=await a(`/api-auth/keys/${u.key_id}/rotate`,{method:"POST"}),h=await I(f);return await m(),h},[a,m]),p=o.useCallback(async u=>{const f=new URLSearchParams;u.reason&&f.set("reason",u.reason);const h=await a(`/api-auth/keys/${u.key_id}/revoke`,{method:"POST",body:f}),g=await I(h);return await m(),g},[a,m]);return{keys:r||[],createKey:c,rotateKey:d,revokeKey:p,loading:l,error:i,refetch:()=>m()}}function j2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.limit&&c.set("limit",e.limit.toString()),e.cursor&&c.set("cursor",e.cursor),e.outcome&&c.set("outcome",e.outcome),e.key_id&&c.set("key_id",e.key_id),e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date);const d=await a(`/api-auth/audit/logs?${c.toString()}`,{method:"GET"});return(await I(d)).data},[a,e.limit,e.cursor,e.outcome,e.key_id,e.start_date,e.end_date]),{data:r,error:i,isLoading:l,mutate:m}=Se(()=>{const c=new URLSearchParams;return e.limit&&c.set("limit",e.limit.toString()),e.cursor&&c.set("cursor",e.cursor),e.outcome&&c.set("outcome",e.outcome),e.key_id&&c.set("key_id",e.key_id),e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),`wacht-api-auth-audit-logs?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{logs:(r==null?void 0:r.data)||[],limit:(r==null?void 0:r.limit)||e.limit||0,has_more:(r==null?void 0:r.has_more)||!1,next_cursor:r==null?void 0:r.next_cursor,loading:l,error:i,refetch:()=>m()}}function _2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.key_id&&c.set("key_id",e.key_id),e.include_top_keys&&c.set("include_top_keys","true"),e.include_top_paths&&c.set("include_top_paths","true"),e.include_blocked_reasons&&c.set("include_blocked_reasons","true"),e.include_rate_limits&&c.set("include_rate_limits","true"),e.top_limit&&c.set("top_limit",e.top_limit.toString());const d=await a(`/api-auth/audit/analytics?${c.toString()}`,{method:"GET"});return(await I(d)).data},[a,e.start_date,e.end_date,e.key_id,e.include_top_keys,e.include_top_paths,e.include_blocked_reasons,e.include_rate_limits,e.top_limit]),{data:r,error:i,isLoading:l,mutate:m}=Se(()=>{const c=new URLSearchParams;return e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.key_id&&c.set("key_id",e.key_id),e.include_top_keys&&c.set("include_top_keys","true"),e.include_top_paths&&c.set("include_top_paths","true"),e.include_blocked_reasons&&c.set("include_blocked_reasons","true"),e.include_rate_limits&&c.set("include_rate_limits","true"),e.top_limit&&c.set("top_limit",e.top_limit.toString()),`wacht-api-auth-audit-analytics?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{analytics:r||null,loading:l,error:i,refetch:()=>m()}}function k2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const c=new URLSearchParams;e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.interval&&c.set("interval",e.interval),e.key_id&&c.set("key_id",e.key_id);const d=await a(`/api-auth/audit/timeseries?${c.toString()}`,{method:"GET"});return(await I(d)).data},[a,e.start_date,e.end_date,e.interval,e.key_id]),{data:r,error:i,isLoading:l,mutate:m}=Se(()=>{const c=new URLSearchParams;return e.start_date&&c.set("start_date",e.start_date),e.end_date&&c.set("end_date",e.end_date),e.interval&&c.set("interval",e.interval),e.key_id&&c.set("key_id",e.key_id),`wacht-api-auth-audit-timeseries?${c.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{timeseries:(r==null?void 0:r.data)||[],interval:(r==null?void 0:r.interval)||e.interval||"hour",loading:l,error:i,refetch:()=>m()}}const Vo=()=>{const{client:e}=je(),[a,s]=o.useState(!1),[r,i]=o.useState(null),[l,m]=o.useState(null),c=o.useCallback(async p=>{s(!0),i(null),m(null);try{const u=new FormData;u.append("token",p);const f=await e("/organizations/invitations/accept",{method:"POST",body:u}),g=(await I(f)).data;return m(g),g.error_code&&i(g.message||"Failed to accept invitation"),g}catch(u){const f=u.message||"Failed to accept invitation";i(f);const h={error_code:"NETWORK_ERROR",message:f};return m(h),h}finally{s(!1)}},[e]),d=o.useCallback(()=>{i(null),m(null)},[]);return{acceptInvitation:c,invitationData:l,loading:a,error:r,reset:d}},C2=({children:e})=>{const{loading:a}=Ce();return a?null:t.jsx(t.Fragment,{children:e})},N2=({children:e})=>{const{loading:a}=Ce();return a?t.jsx(t.Fragment,{children:e}):null},S2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,44H32A20,20,0,0,0,12,64V88a20,20,0,0,0,16,19.6V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V107.6A20,20,0,0,0,244,88V64A20,20,0,0,0,224,44ZM36,68H220V84H36ZM52,188V108H204v80Zm112-52a12,12,0,0,1-12,12H104a12,12,0,0,1,0-24h48A12,12,0,0,1,164,136Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,96v96a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96Z",opacity:"0.2"}),n.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM208,192H48V104H208ZM224,88H32V64H224V88ZM96,136a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm-72,96H104a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm72-56H32V64H224V88Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,50H32A14,14,0,0,0,18,64V88a14,14,0,0,0,14,14h2v90a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V102h2a14,14,0,0,0,14-14V64A14,14,0,0,0,224,50ZM210,192a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V102H210ZM226,88a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H224a2,2,0,0,1,2,2ZM98,136a6,6,0,0,1,6-6h48a6,6,0,0,1,0,12H104A6,6,0,0,1,98,136Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM208,192H48V104H208ZM224,88H32V64H224V88ZM96,136a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,52H32A12,12,0,0,0,20,64V88a12,12,0,0,0,12,12h4v92a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V100h4a12,12,0,0,0,12-12V64A12,12,0,0,0,224,52ZM212,192a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V100H212ZM228,88a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H224a4,4,0,0,1,4,4ZM100,136a4,4,0,0,1,4-4h48a4,4,0,0,1,0,8H104A4,4,0,0,1,100,136Z"}))]]),E2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),n.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"}))]]),A2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z",opacity:"0.2"}),n.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z"}))]]),M2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216.49,184.49l-32,32a12,12,0,0,1-17-17L179,188H48a12,12,0,0,1,0-24H179l-11.52-11.51a12,12,0,0,1,17-17l32,32A12,12,0,0,1,216.49,184.49Zm-145-64a12,12,0,0,0,17-17L77,92H208a12,12,0,0,0,0-24H77L88.49,56.49a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,80v96H48V80Z",opacity:"0.2"}),n.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M42.34,85.66a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,88,48V72H208a8,8,0,0,1,0,16H88v24a8,8,0,0,1-13.66,5.66Zm171.32,84.68-32-32A8,8,0,0,0,168,144v24H48a8,8,0,0,0,0,16H168v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,213.66,170.34Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M212.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L193.51,182H48a6,6,0,0,1,0-12H193.51l-21.75-21.76a6,6,0,0,1,8.48-8.48ZM75.76,116.24a6,6,0,0,0,8.48-8.48L62.49,86H208a6,6,0,0,0,0-12H62.49L84.24,52.24a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M210.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L198.34,180H48a4,4,0,0,1,0-8H198.34l-25.17-25.17a4,4,0,0,1,5.66-5.66ZM77.17,114.83a4,4,0,0,0,5.66-5.66L57.66,84H208a4,4,0,0,0,0-8H57.66L82.83,50.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66Z"}))]]),R2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),n.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"}))]]),L2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216.88,207.93l-160-176A12,12,0,1,0,39.12,48.07l14.8,16.29A83.58,83.58,0,0,0,44,104c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.68,186,19.75,19.75,0,0,0,48,196H84.19a44,44,0,0,0,87.62,0h1.79l25.52,28.07a12,12,0,0,0,17.76-16.14ZM68,104a59.84,59.84,0,0,1,3.52-20.29L151.78,172H54.68C63.52,154,68,131.14,68,104Zm60,108a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM88.89,42.35a12,12,0,0,1,6.37-15.73A84,84,0,0,1,212,104c0,18.68,2.38,34.93,7.07,48.28a12,12,0,1,1-22.64,8C190.83,144.32,188,125.4,188,104a60,60,0,0,0-83.38-55.28A12,12,0,0,1,88.89,42.35Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),n.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L58.82,63.8A79.59,79.59,0,0,0,48,104c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.8a40,40,0,0,0,78.4,0h15.44l19.44,21.38a8,8,0,1,0,11.84-10.76ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a63.65,63.65,0,0,1,6.26-27.62L168.09,184Zm166-4.73a8.13,8.13,0,0,1-2.93.55,8,8,0,0,1-7.44-5.08C196.35,156.19,192,129.75,192,104A64,64,0,0,0,96.43,48.31a8,8,0,0,1-7.9-13.91A80,80,0,0,1,208,104c0,35.35,8.05,58.59,10.52,64.88A8,8,0,0,1,214,179.25Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.84,192v0a1.85,1.85,0,0,1-3,.28L83.27,43.19a4,4,0,0,1,.8-6A79.55,79.55,0,0,1,129.17,24C173,24.66,207.8,61.1,208,104.92c.14,34.88,8.31,61.54,13.82,71A15.89,15.89,0,0,1,221.84,192Zm-7.92,18.62a8,8,0,0,1-11.85,10.76L182.62,200H167.16a40,40,0,0,1-78.41,0H47.91a15.78,15.78,0,0,1-13.59-7.59,16.42,16.42,0,0,1-.09-16.68c5.55-9.73,13.7-36.64,13.7-71.73A79.42,79.42,0,0,1,58.79,63.85L42,45.38A8,8,0,1,1,53.84,34.62ZM150.59,200H105.32a24,24,0,0,0,45.27,0Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L61.31,63.56A77.45,77.45,0,0,0,50,104c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198h42.5a38,38,0,0,0,75,0h18l20,22a6,6,0,0,0,8.88-8.08ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218ZM48,186a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.86,170,62,139.69,62,104a65.63,65.63,0,0,1,7.78-31.12L172.62,186Zm165.29-8.62a5.88,5.88,0,0,1-2.2.42,6,6,0,0,1-5.58-3.81c-7.2-18.31-11.49-44.48-11.49-70A66,66,0,0,0,95.45,46.57a6,6,0,1,1-5.93-10.43A78,78,0,0,1,206,104c0,35.7,8.16,59.24,10.66,65.61A6,6,0,0,1,213.27,177.38Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L58.82,63.8A79.59,79.59,0,0,0,48,104c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.8a40,40,0,0,0,78.4,0h15.44l19.44,21.38a8,8,0,1,0,11.84-10.76ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a63.65,63.65,0,0,1,6.26-27.62L168.09,184Zm166-4.73a8.13,8.13,0,0,1-2.93.55,8,8,0,0,1-7.44-5.08C196.35,156.19,192,129.75,192,104A64,64,0,0,0,96.43,48.31a8,8,0,0,1-7.9-13.91A80,80,0,0,1,208,104c0,35.35,8.05,58.59,10.52,64.88A8,8,0,0,1,214,179.25Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L63.8,63.32A75.52,75.52,0,0,0,52,104c0,36.13-8.58,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0h20.64L205,218.69a4,4,0,1,0,5.92-5.38ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220ZM48,188a3.89,3.89,0,0,1-3.43-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a67.58,67.58,0,0,1,9.4-34.51L177.14,188Zm164.55-12.48a3.94,3.94,0,0,1-1.46.28,4,4,0,0,1-3.72-2.54C200.24,155.17,196,129.28,196,104A68,68,0,0,0,94.46,44.83a4,4,0,1,1-4-6.95A76,76,0,0,1,204,104c0,36.05,8.26,59.89,10.79,66.34A4,4,0,0,1,212.53,175.52Z"}))]]),P2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,204H228V96a20,20,0,0,0-20-20H172V32a20,20,0,0,0-28.45-18.12l-104,48.54A20.06,20.06,0,0,0,28,80.55V204H16a12,12,0,0,0,0,24H240a12,12,0,0,0,0-24ZM204,100V204H172V100ZM52,83.09,148,38.3V204H52ZM132,112v12a12,12,0,0,1-24,0V112a12,12,0,0,1,24,0Zm-40,0v12a12,12,0,0,1-24,0V112a12,12,0,0,1,24,0Zm0,52v12a12,12,0,0,1-24,0V164a12,12,0,0,1,24,0Zm40,0v12a12,12,0,0,1-24,0V164a12,12,0,0,1,24,0Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M136,32V216H40V85.35a8,8,0,0,1,3.56-6.66l80-53.33A8,8,0,0,1,136,32Z",opacity:"0.2"}),n.createElement("path",{d:"M240,208H224V96a16,16,0,0,0-16-16H144V32a16,16,0,0,0-24.88-13.32L39.12,72A16,16,0,0,0,32,85.34V208H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM208,96V208H144V96ZM48,85.34,128,32V208H48ZM112,112v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm-32,0v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm0,56v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Zm32,0v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M239.73,208H224V96a16,16,0,0,0-16-16H164a4,4,0,0,0-4,4V208H144V32.41a16.43,16.43,0,0,0-6.16-13,16,16,0,0,0-18.72-.69L39.12,72A16,16,0,0,0,32,85.34V208H16.27A8.18,8.18,0,0,0,8,215.47,8,8,0,0,0,16,224H240a8,8,0,0,0,8-8.53A8.18,8.18,0,0,0,239.73,208ZM76,184a8,8,0,0,1-8.53,8A8.18,8.18,0,0,1,60,183.72V168.27A8.19,8.19,0,0,1,67.47,160,8,8,0,0,1,76,168Zm0-56a8,8,0,0,1-8.53,8A8.19,8.19,0,0,1,60,127.72V112.27A8.19,8.19,0,0,1,67.47,104,8,8,0,0,1,76,112Zm40,56a8,8,0,0,1-8.53,8,8.18,8.18,0,0,1-7.47-8.26V168.27a8.19,8.19,0,0,1,7.47-8.26,8,8,0,0,1,8.53,8Zm0-56a8,8,0,0,1-8.53,8,8.19,8.19,0,0,1-7.47-8.26V112.27a8.19,8.19,0,0,1,7.47-8.26,8,8,0,0,1,8.53,8Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,210H222V96a14,14,0,0,0-14-14H142V32a14,14,0,0,0-21.77-11.64l-80,53.33A14,14,0,0,0,34,85.34V210H16a6,6,0,0,0,0,12H240a6,6,0,0,0,0-12ZM208,94a2,2,0,0,1,2,2V210H142V94ZM46,85.34a2,2,0,0,1,.89-1.66l80-53.34A2,2,0,0,1,130,32V210H46ZM110,112v16a6,6,0,0,1-12,0V112a6,6,0,0,1,12,0Zm-32,0v16a6,6,0,0,1-12,0V112a6,6,0,0,1,12,0Zm0,56v16a6,6,0,0,1-12,0V168a6,6,0,0,1,12,0Zm32,0v16a6,6,0,0,1-12,0V168a6,6,0,0,1,12,0Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,208H224V96a16,16,0,0,0-16-16H144V32a16,16,0,0,0-24.88-13.32L39.12,72A16,16,0,0,0,32,85.34V208H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM208,96V208H144V96ZM48,85.34,128,32V208H48ZM112,112v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm-32,0v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm0,56v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Zm32,0v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,212H220V96a12,12,0,0,0-12-12H140V32a12,12,0,0,0-18.66-10l-80,53.33a12,12,0,0,0-5.34,10V212H16a4,4,0,0,0,0,8H240a4,4,0,0,0,0-8ZM208,92a4,4,0,0,1,4,4V212H140V92ZM44,85.34A4,4,0,0,1,45.78,82l80-53.33A4,4,0,0,1,132,32V212H44ZM108,112v16a4,4,0,0,1-8,0V112a4,4,0,0,1,8,0Zm-32,0v16a4,4,0,0,1-8,0V112a4,4,0,0,1,8,0Zm0,56v16a4,4,0,0,1-8,0V168a4,4,0,0,1,8,0Zm32,0v16a4,4,0,0,1-8,0V168a4,4,0,0,1,8,0Z"}))]]),$2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,52H182.42L170,33.34A12,12,0,0,0,160,28H96a12,12,0,0,0-10,5.34L73.57,52H48A28,28,0,0,0,20,80V192a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V80A28,28,0,0,0,208,52Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4H80a12,12,0,0,0,10-5.34L102.42,52h51.15L166,70.66A12,12,0,0,0,176,76h32a4,4,0,0,1,4,4ZM128,84a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,84Zm0,72a24,24,0,1,1,24-24A24,24,0,0,1,128,156Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,64H176L160,40H96L80,64H48A16,16,0,0,0,32,80V192a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V80A16,16,0,0,0,208,64ZM128,168a36,36,0,1,1,36-36A36,36,0,0,1,128,168Z",opacity:"0.2"}),n.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm-44,76a36,36,0,1,1-36-36A36,36,0,0,1,164,132Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,58H179.21L165,36.67A6,6,0,0,0,160,34H96a6,6,0,0,0-5,2.67L76.78,58H48A22,22,0,0,0,26,80V192a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V80A22,22,0,0,0,208,58Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V80A10,10,0,0,1,48,70H80a6,6,0,0,0,5-2.67L99.21,46h57.57L171,67.33A6,6,0,0,0,176,70h32a10,10,0,0,1,10,10ZM128,90a42,42,0,1,0,42,42A42,42,0,0,0,128,90Zm0,72a30,30,0,1,1,30-30A30,30,0,0,1,128,162Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,60H178.13L163.32,37.78A4,4,0,0,0,160,36H96a4,4,0,0,0-3.32,1.78L77.85,60H48A20,20,0,0,0,28,80V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V80A20,20,0,0,0,208,60Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V80A12,12,0,0,1,48,68H80a4,4,0,0,0,3.33-1.78L98.13,44h59.72l14.82,22.22A4,4,0,0,0,176,68h32a12,12,0,0,1,12,12ZM128,92a40,40,0,1,0,40,40A40,40,0,0,0,128,92Zm0,72a32,32,0,1,1,32-32A32,32,0,0,1,128,164Z"}))]]),O2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),n.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),Z2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),n.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]),H2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),n.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),F2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),n.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),T2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M80,176h96l-48,48ZM128,32,80,80h96Z",opacity:"0.2"}),n.createElement("path",{d:"M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z"}))]]),I2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),n.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),V2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M152.41,88.56l-89.6,88a12,12,0,0,1-16.82,0L7.59,138.85a12,12,0,0,1,16.82-17.13l30,29.46,81.19-79.74a12,12,0,0,1,16.82,17.12Zm96.15-17a12,12,0,0,0-17-.15L150.4,151.18l-7.88-7.74a12,12,0,0,0-16.82,17.12l16.29,16a12,12,0,0,0,16.82,0l89.6-88A12,12,0,0,0,248.56,71.59Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,64V192a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V64A16,16,0,0,1,32,48H224A16,16,0,0,1,240,64Z",opacity:"0.2"}),n.createElement("path",{d:"M149.61,85.71l-89.6,88a8,8,0,0,1-11.22,0L10.39,136a8,8,0,1,1,11.22-11.41L54.4,156.79l84-82.5a8,8,0,1,1,11.22,11.42Zm96.1-11.32a8,8,0,0,0-11.32-.1l-84,82.5-18.83-18.5a8,8,0,0,0-11.21,11.42l24.43,24a8,8,0,0,0,11.22,0l89.6-88A8,8,0,0,0,245.71,74.39Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM72,168a8,8,0,0,1-5.66-2.34l-24-24a8,8,0,0,1,11.32-11.32L72,148.69l58.34-58.35a8,8,0,0,1,11.32,11.32l-64,64A8,8,0,0,1,72,168Zm141.66-66.34-64,64a8,8,0,0,1-11.32,0l-16-16a8,8,0,0,1,11.32-11.32L144,148.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M148.2,84.28l-89.6,88a6,6,0,0,1-8.4,0L11.8,134.57A6,6,0,1,1,20.2,126l34.2,33.58,85.4-83.87a6,6,0,1,1,8.4,8.56Zm96.08-8.48a6,6,0,0,0-8.48-.08l-85.4,83.87-20.23-19.87a6,6,0,1,0-8.41,8.56l24.44,24a6,6,0,0,0,8.4,0l89.6-88A6,6,0,0,0,244.28,75.8Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M149.61,85.71l-89.6,88a8,8,0,0,1-11.22,0L10.39,136a8,8,0,1,1,11.22-11.41L54.4,156.79l84-82.5a8,8,0,1,1,11.22,11.42Zm96.1-11.32a8,8,0,0,0-11.32-.1l-84,82.5-18.83-18.5a8,8,0,0,0-11.21,11.42l24.43,24a8,8,0,0,0,11.22,0l89.6-88A8,8,0,0,0,245.71,74.39Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M146.8,82.85l-89.6,88a4,4,0,0,1-5.6,0L13.2,133.14a4,4,0,0,1,5.6-5.71l35.6,35,86.8-85.24a4,4,0,0,1,5.6,5.7Zm96-5.65a4,4,0,0,0-5.65,0l-86.8,85.24-21.63-21.24a4,4,0,1,0-5.61,5.7l24.44,24a4,4,0,0,0,5.6,0l89.6-88A4,4,0,0,0,242.85,77.2Z"}))]]),z2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M232,128A104,104,0,1,1,128,24,104.13,104.13,0,0,1,232,128Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z"}))]]),D2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm68-84a12,12,0,0,1-12,12H128a12,12,0,0,1-12-12V72a12,12,0,0,1,24,0v44h44A12,12,0,0,1,196,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm62-90a6,6,0,0,1-6,6H128a6,6,0,0,1-6-6V72a6,6,0,0,1,12,0v50h50A6,6,0,0,1,190,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm60-92a4,4,0,0,1-4,4H128a4,4,0,0,1-4-4V72a4,4,0,0,1,8,0v52h52A4,4,0,0,1,188,128Z"}))]]),U2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),n.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),W2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,12H80A28,28,0,0,0,52,40V216a28,28,0,0,0,28,28h96a28,28,0,0,0,28-28V40A28,28,0,0,0,176,12ZM76,76H180V180H76Zm4-40h96a4,4,0,0,1,4,4V52H76V40A4,4,0,0,1,80,36Zm96,184H80a4,4,0,0,1-4-4V204H180v12A4,4,0,0,1,176,220Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M192,56V200H64V56Z",opacity:"0.2"}),n.createElement("path",{d:"M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM72,64H184V192H72Zm8-32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM80,32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,18H80A22,22,0,0,0,58,40V216a22,22,0,0,0,22,22h96a22,22,0,0,0,22-22V40A22,22,0,0,0,176,18ZM70,62H186V194H70ZM80,30h96a10,10,0,0,1,10,10V50H70V40A10,10,0,0,1,80,30Zm96,196H80a10,10,0,0,1-10-10V206H186v10A10,10,0,0,1,176,226Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM72,64H184V192H72Zm8-32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,20H80A20,20,0,0,0,60,40V216a20,20,0,0,0,20,20h96a20,20,0,0,0,20-20V40A20,20,0,0,0,176,20ZM68,60H188V196H68ZM80,28h96a12,12,0,0,1,12,12V52H68V40A12,12,0,0,1,80,28Zm96,200H80a12,12,0,0,1-12-12V204H188v12A12,12,0,0,1,176,228Z"}))]]),B2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z",opacity:"0.2"}),n.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z"}))]]),G2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),n.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z"}))]]),q2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM193.15,68,128,127.72,62.85,68ZM44,188V83.28l75.89,69.57a12,12,0,0,0,16.22,0L212,83.28V188Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,56l-96,88L32,56Z",opacity:"0.2"}),n.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48Zm-8,144H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,50H32a6,6,0,0,0-6,6V192a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A6,6,0,0,0,224,50ZM208.58,62,128,135.86,47.42,62ZM216,194H40a2,2,0,0,1-2-2V69.64l86,78.78a6,6,0,0,0,8.1,0L218,69.64V192A2,2,0,0,1,216,194Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,52H32a4,4,0,0,0-4,4V192a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A4,4,0,0,0,224,52Zm-10.28,8L128,138.57,42.28,60ZM216,196H40a4,4,0,0,1-4-4V65.09L125.3,147a4,4,0,0,0,5.4,0L220,65.09V192A4,4,0,0,1,216,196Z"}))]]),K2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),n.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),Y2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),n.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z"}))]]),Q2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M160,128a224.48,224.48,0,0,1-26.37,105.54,12,12,0,1,1-21.16-11.32A200.33,200.33,0,0,0,136,128a8,8,0,0,0-16,0,12,12,0,0,1-24,0,32,32,0,0,1,64,0ZM128,56a12,12,0,1,0,0,24,48.05,48.05,0,0,1,48,48c0,7.62-.36,15.32-1.07,22.87A12,12,0,0,0,185.74,164c.38,0,.76,0,1.14,0a12,12,0,0,0,11.93-10.87c.79-8.3,1.18-16.76,1.18-25.13A72.08,72.08,0,0,0,128,56ZM96,92.23A12,12,0,0,0,80,74.35,72.1,72.1,0,0,0,56,128a120.11,120.11,0,0,1-15.12,58.37,12,12,0,0,0,21,11.69A144.14,144.14,0,0,0,80,128,48.08,48.08,0,0,1,96,92.23Zm10.1,64.1a12,12,0,0,0-14.46,8.9,158.61,158.61,0,0,1-18.88,45.86,12,12,0,0,0,20.5,12.48A182.86,182.86,0,0,0,115,170.79,12,12,0,0,0,106.1,156.33Zm76.73,24.07A12,12,0,0,0,168.19,189a241.5,241.5,0,0,1-8,24.87,12,12,0,0,0,6.91,15.49,11.76,11.76,0,0,0,4.29.8,12,12,0,0,0,11.21-7.71,260.2,260.2,0,0,0,8.79-27.37A12,12,0,0,0,182.83,180.4ZM128,16A112.12,112.12,0,0,0,16,127.44c0,.19,0,.38,0,.57a79.81,79.81,0,0,1-5,27.82,12,12,0,1,0,22.5,8.35A103.59,103.59,0,0,0,40,128.58c0-.19,0-.38,0-.57a88,88,0,0,1,176-.5c0,.16,0,.33,0,.5a282.12,282.12,0,0,1-6.74,61.38,12,12,0,0,0,9.09,14.33A11.84,11.84,0,0,0,221,204a12,12,0,0,0,11.7-9.38A305.87,305.87,0,0,0,240,128.55c0-.18,0-.36,0-.54A112.13,112.13,0,0,0,128,16Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M72,128a134.63,134.63,0,0,1-14.16,60.47,8,8,0,1,1-14.32-7.12A118.8,118.8,0,0,0,56,128,71.73,71.73,0,0,1,83,71.8,8,8,0,1,1,93,84.29,55.76,55.76,0,0,0,72,128Zm56-8a8,8,0,0,0-8,8,184.12,184.12,0,0,1-23,89.1,8,8,0,0,0,14,7.76A200.19,200.19,0,0,0,136,128,8,8,0,0,0,128,120Zm0-32a40,40,0,0,0-40,40,8,8,0,0,0,16,0,24,24,0,0,1,48,0,214.09,214.09,0,0,1-20.51,92A8,8,0,1,0,146,226.83,230,230,0,0,0,168,128,40,40,0,0,0,128,88Zm0-64A104.11,104.11,0,0,0,24,128a87.76,87.76,0,0,1-5,29.33,8,8,0,0,0,15.09,5.33A103.9,103.9,0,0,0,40,128a88,88,0,0,1,176,0,282.24,282.24,0,0,1-5.29,54.45,8,8,0,0,0,6.3,9.4,8.22,8.22,0,0,0,1.55.15,8,8,0,0,0,7.84-6.45A298.37,298.37,0,0,0,232,128,104.12,104.12,0,0,0,128,24ZM94.4,152.17A8,8,0,0,0,85,158.42a151,151,0,0,1-17.21,45.44,8,8,0,0,0,13.86,8,166.67,166.67,0,0,0,19-50.25A8,8,0,0,0,94.4,152.17ZM128,56a72.85,72.85,0,0,0-9,.56,8,8,0,0,0,2,15.87A56.08,56.08,0,0,1,184,128a252.12,252.12,0,0,1-1.92,31A8,8,0,0,0,189,168a8.39,8.39,0,0,0,1,.06,8,8,0,0,0,7.92-7,266.48,266.48,0,0,0,2-33A72.08,72.08,0,0,0,128,56Zm57.93,128.25a8,8,0,0,0-9.75,5.75c-1.46,5.69-3.15,11.4-5,17a8,8,0,0,0,5,10.13,7.88,7.88,0,0,0,2.55.42,8,8,0,0,0,7.58-5.46c2-5.92,3.79-12,5.35-18.05A8,8,0,0,0,185.94,184.26Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M126.42,24C70.73,24.85,25.21,70.09,24,125.81a103.53,103.53,0,0,0,13.52,53.54,4,4,0,0,0,7.1-.3,119.35,119.35,0,0,0,11.37-51A71.77,71.77,0,0,1,83,71.83a8,8,0,1,1,9.86,12.61A55.82,55.82,0,0,0,72,128.07a135.28,135.28,0,0,1-18.45,68.35,4,4,0,0,0,.61,4.85c2,2,4.09,4,6.25,5.82a4,4,0,0,0,6-1A151.18,151.18,0,0,0,85,158.49a8,8,0,1,1,15.68,3.19,167.33,167.33,0,0,1-21.07,53.64,4,4,0,0,0,1.6,5.63c2.47,1.25,5,2.41,7.57,3.47a4,4,0,0,0,5-1.61A183,183,0,0,0,120,128.28a8.16,8.16,0,0,1,7.44-8.21,8,8,0,0,1,8.56,8,198.94,198.94,0,0,1-25.21,97.16,4,4,0,0,0,2.95,5.92q4.55.63,9.21.86a4,4,0,0,0,3.67-2.1A214.88,214.88,0,0,0,152,128.8c.05-13.25-10.3-24.49-23.54-24.74A24,24,0,0,0,104,128a8.1,8.1,0,0,1-7.29,8,8,8,0,0,1-8.71-8,40,40,0,0,1,40.42-40c22,.23,39.68,19.17,39.57,41.16a231.37,231.37,0,0,1-20.52,94.57,4,4,0,0,0,4.62,5.51,103.49,103.49,0,0,0,10.26-3,4,4,0,0,0,2.35-2.22,243.76,243.76,0,0,0,11.48-34,8,8,0,1,1,15.5,4q-1.12,4.37-2.4,8.7a4,4,0,0,0,6.46,4.17A104,104,0,0,0,126.42,24ZM198,161.08a8,8,0,0,1-7.92,7,8.39,8.39,0,0,1-1-.06,8,8,0,0,1-6.95-8.93,252.57,252.57,0,0,0,1.92-31,56.08,56.08,0,0,0-56-56,56.78,56.78,0,0,0-7,.43,8,8,0,0,1-2-15.89,72.1,72.1,0,0,1,81,71.49A266.93,266.93,0,0,1,198,161.08Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M70,128a132.68,132.68,0,0,1-14,59.58,6,6,0,0,1-5.38,3.33,6,6,0,0,1-5.36-8.67A120.74,120.74,0,0,0,58,128,69.72,69.72,0,0,1,84.25,73.36a6,6,0,0,1,7.51,9.37A57.73,57.73,0,0,0,70,128Zm58-6a6,6,0,0,0-6,6,186.07,186.07,0,0,1-23.23,90.07,6,6,0,0,0,10.5,5.82A198.14,198.14,0,0,0,134,128,6,6,0,0,0,128,122Zm0-32a38,38,0,0,0-38,38,6,6,0,0,0,12,0,26,26,0,0,1,52,0,216.06,216.06,0,0,1-20.71,92.85A6,6,0,1,0,144.16,226,227.94,227.94,0,0,0,166,128,38,38,0,0,0,128,90Zm0-64A102.11,102.11,0,0,0,26,128a90,90,0,0,1-5.12,30,6,6,0,1,0,11.31,4A101.83,101.83,0,0,0,38,128a90,90,0,0,1,180,0,284.7,284.7,0,0,1-5.33,54.84,6,6,0,0,0,4.72,7.05,6.8,6.8,0,0,0,1.17.11,6,6,0,0,0,5.88-4.84A295.92,295.92,0,0,0,230,128,102.12,102.12,0,0,0,128,26ZM94,154.13a6,6,0,0,0-7.07,4.69,152.82,152.82,0,0,1-17.44,46,6,6,0,0,0,10.4,6,164.77,164.77,0,0,0,18.8-49.65A6,6,0,0,0,94,154.13ZM128,58a70.76,70.76,0,0,0-8.75.54,6,6,0,1,0,1.49,11.91A58,58,0,0,1,186,128a252.27,252.27,0,0,1-1.94,31.26,6,6,0,0,0,5.21,6.69,6.59,6.59,0,0,0,.75,0,6,6,0,0,0,5.95-5.26A266.46,266.46,0,0,0,198,128,70.08,70.08,0,0,0,128,58ZM185.44,186.2a6,6,0,0,0-7.31,4.31c-1.47,5.74-3.18,11.49-5.06,17.09a6,6,0,0,0,11.38,3.82c2-5.88,3.75-11.9,5.3-17.92A6,6,0,0,0,185.44,186.2Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M72,128a134.63,134.63,0,0,1-14.16,60.47,8,8,0,1,1-14.32-7.12A118.8,118.8,0,0,0,56,128,71.73,71.73,0,0,1,83,71.8,8,8,0,1,1,93,84.29,55.76,55.76,0,0,0,72,128Zm56-8a8,8,0,0,0-8,8,184.12,184.12,0,0,1-23,89.1,8,8,0,0,0,14,7.76A200.19,200.19,0,0,0,136,128,8,8,0,0,0,128,120Zm0-32a40,40,0,0,0-40,40,8,8,0,0,0,16,0,24,24,0,0,1,48,0,214.09,214.09,0,0,1-20.51,92A8,8,0,1,0,146,226.83,230,230,0,0,0,168,128,40,40,0,0,0,128,88Zm0-64A104.11,104.11,0,0,0,24,128a87.76,87.76,0,0,1-5,29.33,8,8,0,0,0,15.09,5.33A103.9,103.9,0,0,0,40,128a88,88,0,0,1,176,0,282.24,282.24,0,0,1-5.29,54.45,8,8,0,0,0,6.3,9.4,8.22,8.22,0,0,0,1.55.15,8,8,0,0,0,7.84-6.45A298.37,298.37,0,0,0,232,128,104.12,104.12,0,0,0,128,24ZM94.4,152.17A8,8,0,0,0,85,158.42a151,151,0,0,1-17.21,45.44,8,8,0,0,0,13.86,8,166.67,166.67,0,0,0,19-50.25A8,8,0,0,0,94.4,152.17ZM128,56a72.85,72.85,0,0,0-9,.56,8,8,0,0,0,2,15.87A56.08,56.08,0,0,1,184,128a252.12,252.12,0,0,1-1.92,31A8,8,0,0,0,189,168a8.39,8.39,0,0,0,1,.06,8,8,0,0,0,7.92-7,266.48,266.48,0,0,0,2-33A72.08,72.08,0,0,0,128,56Zm57.93,128.25a8,8,0,0,0-9.75,5.75c-1.46,5.69-3.15,11.4-5,17a8,8,0,0,0,5,10.13,7.88,7.88,0,0,0,2.55.42,8,8,0,0,0,7.58-5.46c2-5.92,3.79-12,5.35-18.05A8,8,0,0,0,185.94,184.26Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M68,128A130.71,130.71,0,0,1,54.27,186.7a4,4,0,0,1-3.58,2.22,3.91,3.91,0,0,1-1.78-.42,4,4,0,0,1-1.8-5.36A122.71,122.71,0,0,0,60,128,67.74,67.74,0,0,1,85.5,74.92a4,4,0,0,1,5,6.25A59.74,59.74,0,0,0,68,128Zm60-4a4,4,0,0,0-4,4,188.1,188.1,0,0,1-23.48,91,4,4,0,0,0,7,3.88A196.22,196.22,0,0,0,132,128,4,4,0,0,0,128,124Zm0-32a36,36,0,0,0-36,36,4,4,0,0,0,8,0,28,28,0,0,1,56,0,218,218,0,0,1-20.9,93.7,4,4,0,1,0,7.24,3.41A226,226,0,0,0,164,128,36,36,0,0,0,128,92Zm0-64A100.11,100.11,0,0,0,28,128a91.66,91.66,0,0,1-5.24,30.67,4,4,0,1,0,7.54,2.66A99.66,99.66,0,0,0,36,128a92,92,0,0,1,184,0,286.37,286.37,0,0,1-5.37,55.23,4,4,0,0,0,3.15,4.69,4.13,4.13,0,0,0,.78.08,4,4,0,0,0,3.92-3.23A294.25,294.25,0,0,0,228,128,100.11,100.11,0,0,0,128,28ZM93.6,156.09a4,4,0,0,0-4.71,3.12,155,155,0,0,1-17.66,46.64,4,4,0,0,0,6.93,4,163.13,163.13,0,0,0,18.57-49A4,4,0,0,0,93.6,156.09ZM128,60a68.79,68.79,0,0,0-8.5.53,4,4,0,0,0,1,7.93A62.57,62.57,0,0,1,128,68a60.07,60.07,0,0,1,60,60,256.15,256.15,0,0,1-1.95,31.5,4,4,0,0,0,3.47,4.47l.5,0a4,4,0,0,0,4-3.51A264.37,264.37,0,0,0,196,128,68.08,68.08,0,0,0,128,60Zm56.93,128.12a4,4,0,0,0-4.87,2.88c-1.49,5.78-3.21,11.58-5.1,17.23a4,4,0,1,0,7.58,2.54c2-5.83,3.73-11.81,5.27-17.77A4,4,0,0,0,184.94,188.13Z"}))]]),J2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),n.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z"}))]]),X2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M234.29,47.91A20,20,0,0,0,216,36H40A20,20,0,0,0,25.2,69.45l.12.14L92,140.75V216a20,20,0,0,0,31.1,16.64l32-21.33A20,20,0,0,0,164,194.66V140.75l66.67-71.16.12-.14A20,20,0,0,0,234.29,47.91Zm-91,79.89A12,12,0,0,0,140,136v56.52l-24,16V136a12,12,0,0,0-3.25-8.2L49.23,60H206.77Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.9,61.38,152,136v58.65a8,8,0,0,1-3.56,6.66l-32,21.33A8,8,0,0,1,104,216V136L34.1,61.38A8,8,0,0,1,40,48H216A8,8,0,0,1,221.9,61.38Z",opacity:"0.2"}),n.createElement("path",{d:"M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227.81,66.76l-.08.09L160,139.17v55.49A16,16,0,0,1,152.87,208l-32,21.34A16,16,0,0,1,96,216V139.17L28.27,66.85l-.08-.09A16,16,0,0,1,40,40H216a16,16,0,0,1,11.84,26.76Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228.77,50.34A13.8,13.8,0,0,0,216,42H40A14,14,0,0,0,29.67,65.42l.06.07L98,138.38V216a14,14,0,0,0,21.77,11.64l32-21.33A14,14,0,0,0,158,194.66V138.38l68.33-73A13.82,13.82,0,0,0,228.77,50.34Zm-11.26,6.94L147.62,131.9A6,6,0,0,0,146,136v58.66a2,2,0,0,1-.89,1.67l-32,21.33A2,2,0,0,1,110,216V136a6,6,0,0,0-1.62-4.1L38.53,57.32A2,2,0,0,1,40,54H216a1.9,1.9,0,0,1,1.83,1.19A1.86,1.86,0,0,1,217.51,57.28Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227,51.15A11.85,11.85,0,0,0,216,44H40a12,12,0,0,0-8.88,20.07l.05.05L100,137.59V216a12,12,0,0,0,18.66,10l32-21.33a12,12,0,0,0,5.35-10V137.59l68.86-73.52A11.85,11.85,0,0,0,227,51.15Zm-8,7.5-69.9,74.62A4,4,0,0,0,148,136v58.65a4,4,0,0,1-1.78,3.33l-32,21.33A4,4,0,0,1,108,216V136a4,4,0,0,0-1.08-2.74L37.05,58.67A4,4,0,0,1,40,52H216a4,4,0,0,1,3,6.65Z"}))]]),eu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm113.86-49.57A12,12,0,0,0,236,98.34L208.21,82.49l-.11-31.31a12,12,0,0,0-4.25-9.12,116,116,0,0,0-38-21.41,12,12,0,0,0-9.68.89L128,37.27,99.83,21.53a12,12,0,0,0-9.7-.9,116.06,116.06,0,0,0-38,21.47,12,12,0,0,0-4.24,9.1l-.14,31.34L20,98.35a12,12,0,0,0-5.85,8.11,110.7,110.7,0,0,0,0,43.11A12,12,0,0,0,20,157.66l27.82,15.85.11,31.31a12,12,0,0,0,4.25,9.12,116,116,0,0,0,38,21.41,12,12,0,0,0,9.68-.89L128,218.73l28.14,15.74a12,12,0,0,0,9.7.9,116.06,116.06,0,0,0,38-21.47,12,12,0,0,0,4.24-9.1l.14-31.34,27.81-15.81a12,12,0,0,0,5.85-8.11A110.7,110.7,0,0,0,241.86,106.43Zm-22.63,33.18-26.88,15.28a11.94,11.94,0,0,0-4.55,4.59c-.54,1-1.11,1.93-1.7,2.88a12,12,0,0,0-1.83,6.31L184.13,199a91.83,91.83,0,0,1-21.07,11.87l-27.15-15.19a12,12,0,0,0-5.86-1.53h-.29c-1.14,0-2.3,0-3.44,0a12.08,12.08,0,0,0-6.14,1.51L93,210.82A92.27,92.27,0,0,1,71.88,199l-.11-30.24a12,12,0,0,0-1.83-6.32c-.58-.94-1.16-1.91-1.7-2.88A11.92,11.92,0,0,0,63.7,155L36.8,139.63a86.53,86.53,0,0,1,0-23.24l26.88-15.28a12,12,0,0,0,4.55-4.58c.54-1,1.11-1.94,1.7-2.89a12,12,0,0,0,1.83-6.31L71.87,57A91.83,91.83,0,0,1,92.94,45.17l27.15,15.19a11.92,11.92,0,0,0,6.15,1.52c1.14,0,2.3,0,3.44,0a12.08,12.08,0,0,0,6.14-1.51L163,45.18A92.27,92.27,0,0,1,184.12,57l.11,30.24a12,12,0,0,0,1.83,6.32c.58.94,1.16,1.91,1.7,2.88A11.92,11.92,0,0,0,192.3,101l26.9,15.33A86.53,86.53,0,0,1,219.23,139.61Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.1,108.76,198.25,90.62c-.64-1.16-1.31-2.29-2-3.41l-.12-36A104.61,104.61,0,0,0,162,32L130,49.89c-1.34,0-2.69,0-4,0L94,32A104.58,104.58,0,0,0,59.89,51.25l-.16,36c-.7,1.12-1.37,2.26-2,3.41l-31.84,18.1a99.15,99.15,0,0,0,0,38.46l31.85,18.14c.64,1.16,1.31,2.29,2,3.41l.12,36A104.61,104.61,0,0,0,94,224l32-17.87c1.34,0,2.69,0,4,0L162,224a104.58,104.58,0,0,0,34.08-19.25l.16-36c.7-1.12,1.37-2.26,2-3.41l31.84-18.1A99.15,99.15,0,0,0,230.1,108.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),n.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.1,8.1,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8,8,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M237.94,107.21a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Zm108-54.4a6,6,0,0,0-2.92-4L202.64,86.22l-.42-.71L202.1,51.2A6,6,0,0,0,200,46.64a110.12,110.12,0,0,0-36.07-20.31,6,6,0,0,0-4.84.45L128.46,43.86h-1L96.91,26.76a6,6,0,0,0-4.86-.44A109.92,109.92,0,0,0,56,46.68a6,6,0,0,0-2.12,4.55l-.16,34.34c-.14.23-.28.47-.41.71L22.91,103.57A6,6,0,0,0,20,107.62a104.81,104.81,0,0,0,0,40.78,6,6,0,0,0,2.92,4l30.42,17.33.42.71.12,34.31A6,6,0,0,0,56,209.36a110.12,110.12,0,0,0,36.07,20.31,6,6,0,0,0,4.84-.45l30.61-17.08h1l30.56,17.1A6.09,6.09,0,0,0,162,230a5.83,5.83,0,0,0,1.93-.32,109.92,109.92,0,0,0,36-20.36,6,6,0,0,0,2.12-4.55l.16-34.34c.14-.23.28-.47.41-.71l30.42-17.29a6,6,0,0,0,2.92-4.05A104.81,104.81,0,0,0,236,107.6Zm-11.25,35.79L195.32,160.1a6.07,6.07,0,0,0-2.28,2.3c-.59,1-1.21,2.11-1.86,3.14a6,6,0,0,0-.91,3.16l-.16,33.21a98.15,98.15,0,0,1-27.52,15.53L133,200.88a6,6,0,0,0-2.93-.77h-.14c-1.24,0-2.5,0-3.74,0a6,6,0,0,0-3.07.76L93.45,217.43a98,98,0,0,1-27.56-15.49l-.12-33.17a6,6,0,0,0-.91-3.16c-.64-1-1.27-2.08-1.86-3.14a6,6,0,0,0-2.27-2.3L31.3,143.4a93,93,0,0,1,0-30.79L60.68,95.9A6.07,6.07,0,0,0,63,93.6c.59-1,1.21-2.11,1.86-3.14a6,6,0,0,0,.91-3.16l.16-33.21A98.15,98.15,0,0,1,93.41,38.56L123,55.12a5.81,5.81,0,0,0,3.07.76c1.24,0,2.5,0,3.74,0a6,6,0,0,0,3.07-.76l29.65-16.56a98,98,0,0,1,27.56,15.49l.12,33.17a6,6,0,0,0,.91,3.16c.64,1,1.27,2.08,1.86,3.14a6,6,0,0,0,2.27,2.3L224.7,112.6A93,93,0,0,1,224.73,143.39Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A112.1,112.1,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.62a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.08,8.08,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8.08,8.08,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm106-56a4,4,0,0,0-2-2.7l-30.89-17.6q-.47-.82-1-1.62L200.1,51.2a3.94,3.94,0,0,0-1.42-3,107.8,107.8,0,0,0-35.41-19.94,4,4,0,0,0-3.23.29L129,45.87h-2l-31-17.36a4,4,0,0,0-3.23-.3,108.05,108.05,0,0,0-35.39,20,4,4,0,0,0-1.41,3l-.16,34.9-1,1.62L23.9,105.3A4,4,0,0,0,22,108a102.76,102.76,0,0,0,0,40,4,4,0,0,0,1.95,2.7l30.89,17.6q.47.83,1,1.62l.12,34.87a3.94,3.94,0,0,0,1.42,3,107.8,107.8,0,0,0,35.41,19.94,4,4,0,0,0,3.23-.29L127,210.13h2l31,17.36a4,4,0,0,0,3.23.3,108.05,108.05,0,0,0,35.39-20,4,4,0,0,0,1.41-3l.16-34.9,1-1.62L232.1,150.7a4,4,0,0,0,2-2.71A102.76,102.76,0,0,0,234,108Zm-7.48,36.67L196.3,161.84a4,4,0,0,0-1.51,1.53c-.61,1.09-1.25,2.17-1.91,3.24a3.92,3.92,0,0,0-.61,2.1l-.16,34.15a99.8,99.8,0,0,1-29.7,16.77l-30.4-17a4.06,4.06,0,0,0-2-.51H130c-1.28,0-2.57,0-3.84,0a4.1,4.1,0,0,0-2.05.51l-30.45,17A100.23,100.23,0,0,1,63.89,202.9l-.12-34.12a3.93,3.93,0,0,0-.61-2.11c-.66-1-1.3-2.14-1.91-3.23a4,4,0,0,0-1.51-1.53L29.49,144.68a94.78,94.78,0,0,1,0-33.34L59.7,94.16a4,4,0,0,0,1.51-1.53c.61-1.09,1.25-2.17,1.91-3.23a4,4,0,0,0,.61-2.11l.16-34.15a99.8,99.8,0,0,1,29.7-16.77l30.4,17a4.1,4.1,0,0,0,2.05.51c1.28,0,2.57,0,3.84,0a4,4,0,0,0,2.05-.51l30.45-17A100.23,100.23,0,0,1,192.11,53.1l.12,34.12a3.93,3.93,0,0,0,.61,2.11c.66,1,1.3,2.14,1.91,3.23a4,4,0,0,0,1.51,1.53l30.25,17.23A94.78,94.78,0,0,1,226.54,144.66Z"}))]]),tu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,187a113.4,113.4,0,0,1-20.39-35h40.82a116.94,116.94,0,0,1-10,20.77A108.61,108.61,0,0,1,128,207Zm-26.49-59a135.42,135.42,0,0,1,0-40h53a135.42,135.42,0,0,1,0,40ZM44,128a83.49,83.49,0,0,1,2.43-20H77.25a160.63,160.63,0,0,0,0,40H46.43A83.49,83.49,0,0,1,44,128Zm84-79a113.4,113.4,0,0,1,20.39,35H107.59a116.94,116.94,0,0,1,10-20.77A108.61,108.61,0,0,1,128,49Zm50.73,59h30.82a83.52,83.52,0,0,1,0,40H178.75a160.63,160.63,0,0,0,0-40Zm20.77-24H173.71a140.82,140.82,0,0,0-15.5-34.36A84.51,84.51,0,0,1,199.52,84ZM97.79,49.64A140.82,140.82,0,0,0,82.29,84H56.48A84.51,84.51,0,0,1,97.79,49.64ZM56.48,172H82.29a140.82,140.82,0,0,0,15.5,34.36A84.51,84.51,0,0,1,56.48,172Zm101.73,34.36A140.82,140.82,0,0,0,173.71,172h25.81A84.51,84.51,0,0,1,158.21,206.36Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm78.36,64H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM216,128a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM128,43a115.27,115.27,0,0,1,26,45H102A115.11,115.11,0,0,1,128,43ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48Zm50.35,61.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,28h0A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,190.61c-6.33-6.09-23-24.41-31.27-54.61h62.54C151,194.2,134.33,212.52,128,218.61ZM94.82,156a140.42,140.42,0,0,1,0-56h66.36a140.42,140.42,0,0,1,0,56ZM128,37.39c6.33,6.09,23,24.41,31.27,54.61H96.73C105,61.8,121.67,43.48,128,37.39ZM169.41,100h46.23a92.09,92.09,0,0,1,0,56H169.41a152.65,152.65,0,0,0,0-56Zm43.25-8h-45a129.39,129.39,0,0,0-29.19-55.4A92.25,92.25,0,0,1,212.66,92ZM117.54,36.6A129.39,129.39,0,0,0,88.35,92h-45A92.25,92.25,0,0,1,117.54,36.6ZM40.36,100H86.59a152.65,152.65,0,0,0,0,56H40.36a92.09,92.09,0,0,1,0-56Zm3,64h45a129.39,129.39,0,0,0,29.19,55.4A92.25,92.25,0,0,1,43.34,164Zm95.12,55.4A129.39,129.39,0,0,0,167.65,164h45A92.25,92.25,0,0,1,138.46,219.4Z"}))]]),au=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,84H180.2l7.61-41.85a12,12,0,0,0-23.62-4.3L155.8,84H116.2l7.61-41.85a12,12,0,1,0-23.62-4.3L91.8,84H48a12,12,0,0,0,0,24H87.44l-7.27,40H32a12,12,0,0,0,0,24H75.8l-7.61,41.85a12,12,0,0,0,9.66,14A11.43,11.43,0,0,0,80,228a12,12,0,0,0,11.8-9.86L100.2,172h39.6l-7.61,41.85a12,12,0,0,0,9.66,14,11.43,11.43,0,0,0,2.16.2,12,12,0,0,0,11.8-9.86L164.2,172H208a12,12,0,0,0,0-24H168.56l7.27-40H224a12,12,0,0,0,0-24Zm-79.83,64H104.56l7.27-40h39.61Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M165.82,96l-11.64,64h-64l11.64-64Z",opacity:"0.2"}),n.createElement("path",{d:"M224,88H175.4l8.47-46.57a8,8,0,0,0-15.74-2.86l-9,49.43H111.4l8.47-46.57a8,8,0,0,0-15.74-2.86L95.14,88H48a8,8,0,0,0,0,16H92.23L83.5,152H32a8,8,0,0,0,0,16H80.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,80,224a8,8,0,0,0,7.86-6.57l9-49.43H144.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,144,224a8,8,0,0,0,7.86-6.57l9-49.43H208a8,8,0,0,0,0-16H163.77l8.73-48H224a8,8,0,0,0,0-16Zm-76.5,64H99.77l8.73-48h47.73Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M116.25,112h31.5l-8,32h-31.5ZM224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Zm-16,56a8,8,0,0,0-8-8H168.25l7.51-30.06a8,8,0,0,0-15.52-3.88L151.75,96h-31.5l7.51-30.06a8,8,0,0,0-15.52-3.88L103.75,96H64a8,8,0,0,0,0,16H99.75l-8,32H56a8,8,0,0,0,0,16H87.75l-7.51,30.06a8,8,0,0,0,5.82,9.7,8.13,8.13,0,0,0,2,.24,8,8,0,0,0,7.75-6.06L104.25,160h31.5l-7.51,30.06a8,8,0,0,0,5.82,9.7A8.13,8.13,0,0,0,136,200a8,8,0,0,0,7.75-6.06L152.25,160H192a8,8,0,0,0,0-16H156.25l8-32H200A8,8,0,0,0,208,104Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,90H173l8.89-48.93a6,6,0,1,0-11.8-2.14L160.81,90H109l8.89-48.93a6,6,0,0,0-11.8-2.14L96.81,90H48a6,6,0,0,0,0,12H94.63l-9.46,52H32a6,6,0,0,0,0,12H83L74.1,214.93a6,6,0,0,0,4.83,7A5.64,5.64,0,0,0,80,222a6,6,0,0,0,5.89-4.93L95.19,166H147l-8.89,48.93a6,6,0,0,0,4.83,7,5.64,5.64,0,0,0,1.08.1,6,6,0,0,0,5.89-4.93L159.19,166H208a6,6,0,0,0,0-12H161.37l9.46-52H224a6,6,0,0,0,0-12Zm-74.83,64H97.37l9.46-52h51.8Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,88H175.4l8.47-46.57a8,8,0,0,0-15.74-2.86l-9,49.43H111.4l8.47-46.57a8,8,0,0,0-15.74-2.86L95.14,88H48a8,8,0,0,0,0,16H92.23L83.5,152H32a8,8,0,0,0,0,16H80.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,80,224a8,8,0,0,0,7.86-6.57l9-49.43H144.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,144,224a8,8,0,0,0,7.86-6.57l9-49.43H208a8,8,0,0,0,0-16H163.77l8.73-48H224a8,8,0,0,0,0-16Zm-76.5,64H99.77l8.73-48h47.73Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,92H170.61l9.33-51.28a4,4,0,1,0-7.88-1.44L162.48,92H106.61l9.33-51.28a4,4,0,1,0-7.88-1.44L98.48,92H48a4,4,0,0,0,0,8H97L86.84,156H32a4,4,0,0,0,0,8H85.39l-9.33,51.28a4,4,0,0,0,3.22,4.65A3.65,3.65,0,0,0,80,220a4,4,0,0,0,3.94-3.29L93.52,164h55.87l-9.33,51.28a4,4,0,0,0,3.22,4.65,3.65,3.65,0,0,0,.72.07,4,4,0,0,0,3.94-3.29L157.52,164H208a4,4,0,0,0,0-8H159l10.19-56H224a4,4,0,0,0,0-8Zm-73.16,64H95l10.19-56H161Z"}))]]),su=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),nu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M196,76a16,16,0,1,1-16-16A16,16,0,0,1,196,76Zm48,22.74A84.3,84.3,0,0,1,160.11,180H160a83.52,83.52,0,0,1-23.65-3.38l-7.86,7.87A12,12,0,0,1,120,188H108v12a12,12,0,0,1-12,12H84v12a12,12,0,0,1-12,12H40a20,20,0,0,1-20-20V187.31a19.86,19.86,0,0,1,5.86-14.14l53.52-53.52A84,84,0,1,1,244,98.74ZM202.43,53.57A59.48,59.48,0,0,0,158,36c-32,1-58,27.89-58,59.89a59.69,59.69,0,0,0,4.2,22.19,12,12,0,0,1-2.55,13.21L44,189v23H60V200a12,12,0,0,1,12-12H84V176a12,12,0,0,1,12-12h19l9.65-9.65a12,12,0,0,1,13.22-2.55A59.58,59.58,0,0,0,160,156h.08c32,0,58.87-26.07,59.89-58A59.55,59.55,0,0,0,202.43,53.57Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M232,98.36C230.73,136.92,198.67,168,160.09,168a71.68,71.68,0,0,1-26.92-5.17h0L120,176H96v24H72v24H40a8,8,0,0,1-8-8V187.31a8,8,0,0,1,2.34-5.65l58.83-58.83h0A71.68,71.68,0,0,1,88,95.91c0-38.58,31.08-70.64,69.64-71.87A72,72,0,0,1,232,98.36Z",opacity:"0.2"}),n.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM180,92a16,16,0,1,1,16-16A16,16,0,0,1,180,92Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M215.15,40.85A78,78,0,0,0,86.2,121.31l-56.1,56.1a13.94,13.94,0,0,0-4.1,9.9V216a14,14,0,0,0,14,14H72a6,6,0,0,0,6-6V206H96a6,6,0,0,0,6-6V182h18a6,6,0,0,0,4.24-1.76l10.45-10.44A77.59,77.59,0,0,0,160,174h.1A78,78,0,0,0,215.15,40.85ZM226,98.16c-1.12,35.16-30.67,63.8-65.88,63.84a65.93,65.93,0,0,1-24.51-4.67,6,6,0,0,0-6.64,1.26L117.51,170H96a6,6,0,0,0-6,6v18H72a6,6,0,0,0-6,6v18H40a2,2,0,0,1-2-2V187.31a2,2,0,0,1,.58-1.41l58.83-58.83a6,6,0,0,0,1.26-6.64A65.61,65.61,0,0,1,94,95.92C94,60.71,122.68,31.16,157.83,30A66,66,0,0,1,226,98.16ZM190,76a10,10,0,1,1-10-10A10,10,0,0,1,190,76Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.74,42.26A76,76,0,0,0,88.51,121.84l-57,57A11.93,11.93,0,0,0,28,187.31V216a12,12,0,0,0,12,12H72a4,4,0,0,0,4-4V204H96a4,4,0,0,0,4-4V180h20a4,4,0,0,0,2.83-1.17l11.33-11.34A75.72,75.72,0,0,0,160,172h.1A76,76,0,0,0,213.74,42.26Zm14.22,56c-1.15,36.22-31.6,65.72-67.87,65.77H160a67.52,67.52,0,0,1-25.21-4.83,4,4,0,0,0-4.45.83l-12,12H96a4,4,0,0,0-4,4v20H72a4,4,0,0,0-4,4v20H40a4,4,0,0,1-4-4V187.31a4.06,4.06,0,0,1,1.17-2.83L96,125.66a4,4,0,0,0,.83-4.45A67.51,67.51,0,0,1,92,95.91C92,59.64,121.55,29.19,157.77,28A68,68,0,0,1,228,98.23ZM188,76a8,8,0,1,1-8-8A8,8,0,0,1,188,76Z"}))]]),ru=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),n.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),iu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M117.18,188.74a12,12,0,0,1,0,17l-5.12,5.12A58.26,58.26,0,0,1,70.6,228h0A58.62,58.62,0,0,1,29.14,127.92L63.89,93.17a58.64,58.64,0,0,1,98.56,28.11,12,12,0,1,1-23.37,5.44,34.65,34.65,0,0,0-58.22-16.58L46.11,144.89A34.62,34.62,0,0,0,70.57,204h0a34.41,34.41,0,0,0,24.49-10.14l5.11-5.12A12,12,0,0,1,117.18,188.74ZM226.83,45.17a58.65,58.65,0,0,0-82.93,0l-5.11,5.11a12,12,0,0,0,17,17l5.12-5.12a34.63,34.63,0,1,1,49,49L175.1,145.86A34.39,34.39,0,0,1,150.61,156h0a34.63,34.63,0,0,1-33.69-26.72,12,12,0,0,0-23.38,5.44A58.64,58.64,0,0,0,150.56,180h.05a58.28,58.28,0,0,0,41.47-17.17l34.75-34.75a58.62,58.62,0,0,0,0-82.91Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M218.34,119.6,183.6,154.34a46.58,46.58,0,0,1-44.31,12.26c-.31.34-.62.67-.95,1L103.6,202.34A46.63,46.63,0,1,1,37.66,136.4L72.4,101.66A46.6,46.6,0,0,1,116.71,89.4c.31-.34.62-.67,1-1L152.4,53.66a46.63,46.63,0,0,1,65.94,65.94Z",opacity:"0.2"}),n.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,7.78,8.22H152a8,8,0,0,0,8-7.78A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM115.7,192.49a43.31,43.31,0,0,1-55-66.43l25.37-25.37a43.35,43.35,0,0,1,61.25,0,42.9,42.9,0,0,1,9.95,15.43,8,8,0,1,1-15,5.6A27.33,27.33,0,0,0,97.37,112L72,137.37a27.32,27.32,0,0,0,34.68,41.91,8,8,0,1,1,9,13.21Zm79.61-62.55-25.37,25.37A43,43,0,0,1,139.32,168h0a43.35,43.35,0,0,1-40.53-28.12,8,8,0,1,1,15-5.6A27.35,27.35,0,0,0,139.28,152h0a27.14,27.14,0,0,0,19.32-8L184,118.63a27.32,27.32,0,0,0-34.68-41.91,8,8,0,1,1-9-13.21,43.32,43.32,0,0,1,55,66.43Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M238,88.18a52.42,52.42,0,0,1-15.4,35.66l-34.75,34.75A52.28,52.28,0,0,1,150.62,174h-.05A52.63,52.63,0,0,1,98,119.9a6,6,0,0,1,6-5.84h.17a6,6,0,0,1,5.83,6.16A40.62,40.62,0,0,0,150.58,162h0a40.4,40.4,0,0,0,28.73-11.9l34.75-34.74A40.63,40.63,0,0,0,156.63,57.9l-11,11a6,6,0,0,1-8.49-8.49l11-11a52.62,52.62,0,0,1,74.43,0A52.83,52.83,0,0,1,238,88.18Zm-127.62,98.9-11,11A40.36,40.36,0,0,1,70.6,210h0a40.63,40.63,0,0,1-28.7-69.36L76.62,105.9A40.63,40.63,0,0,1,146,135.77a6,6,0,0,0,5.83,6.16H152a6,6,0,0,0,6-5.84A52.63,52.63,0,0,0,68.14,97.42L33.38,132.16A52.63,52.63,0,0,0,70.56,222h0a52.26,52.26,0,0,0,37.22-15.42l11-11a6,6,0,1,0-8.49-8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,16,.45A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M236,88.12a50.44,50.44,0,0,1-14.81,34.31l-34.75,34.74A50.33,50.33,0,0,1,150.62,172h-.05A50.63,50.63,0,0,1,100,120a4,4,0,0,1,4-3.89h.11a4,4,0,0,1,3.89,4.11A42.64,42.64,0,0,0,150.58,164h0a42.32,42.32,0,0,0,30.14-12.49l34.75-34.74a42.63,42.63,0,1,0-60.29-60.28l-11,11a4,4,0,0,1-5.66-5.65l11-11A50.64,50.64,0,0,1,236,88.12ZM111.78,188.49l-11,11A42.33,42.33,0,0,1,70.6,212h0a42.63,42.63,0,0,1-30.11-72.77l34.75-34.74A42.63,42.63,0,0,1,148,135.82a4,4,0,0,0,8,.23A50.64,50.64,0,0,0,69.55,98.83L34.8,133.57A50.63,50.63,0,0,0,70.56,220h0a50.33,50.33,0,0,0,35.81-14.83l11-11a4,4,0,1,0-5.65-5.66Z"}))]]),ou=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Zm-60-52a16,16,0,1,1-16-16A16,16,0,0,1,144,152Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z",opacity:"0.2"}),n.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm-80,84a12,12,0,1,1,12-12A12,12,0,0,1,128,164Zm32-84H96V56a32,32,0,0,1,64,0Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Zm-72-56a10,10,0,1,1-10-10A10,10,0,0,1,138,152Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-76-56a8,8,0,1,1-8-8A8,8,0,0,1,136,152Z"}))]]),lu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),n.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),cu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),n.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]),du=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),n.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),uu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,154.8l-47.09-21.11-.18-.08a19.94,19.94,0,0,0-19,1.75,13.08,13.08,0,0,0-1.12.84l-22.31,19c-13-7.05-26.43-20.37-33.49-33.21l19.06-22.66a11.76,11.76,0,0,0,.85-1.15,20,20,0,0,0,1.66-18.83,1.42,1.42,0,0,1-.08-.18L101.2,32A20.06,20.06,0,0,0,80.42,20.15,60.27,60.27,0,0,0,28,80c0,81.61,66.39,148,148,148a60.27,60.27,0,0,0,59.85-52.42A20.06,20.06,0,0,0,224,154.8ZM176,204A124.15,124.15,0,0,1,52,80,36.29,36.29,0,0,1,80.48,44.46l18.82,42L80.14,109.28a12,12,0,0,0-.86,1.16A20,20,0,0,0,78,130.08c9.42,19.28,28.83,38.56,48.31,48A20,20,0,0,0,146,176.63a11.63,11.63,0,0,0,1.11-.85l22.43-19.07,42,18.81A36.29,36.29,0,0,1,176,204Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M223.94,174.08A48.33,48.33,0,0,1,176,216,136,136,0,0,1,40,80,48.33,48.33,0,0,1,81.92,32.06a8,8,0,0,1,8.3,4.8l21.13,47.2a8,8,0,0,1-.66,7.53L89.32,117a7.93,7.93,0,0,0-.54,7.81c8.27,16.93,25.77,34.22,42.75,42.41a7.92,7.92,0,0,0,7.83-.59l25-21.3a8,8,0,0,1,7.59-.69l47.16,21.13A8,8,0,0,1,223.94,174.08Z",opacity:"0.2"}),n.createElement("path",{d:"M222.37,158.46l-47.11-21.11-.13-.06a16,16,0,0,0-15.17,1.4,8.12,8.12,0,0,0-.75.56L134.87,160c-15.42-7.49-31.34-23.29-38.83-38.51l20.78-24.71c.2-.25.39-.5.57-.77a16,16,0,0,0,1.32-15.06l0-.12L97.54,33.64a16,16,0,0,0-16.62-9.52A56.26,56.26,0,0,0,32,80c0,79.4,64.6,144,144,144a56.26,56.26,0,0,0,55.88-48.92A16,16,0,0,0,222.37,158.46ZM176,208A128.14,128.14,0,0,1,48,80,40.2,40.2,0,0,1,82.87,40a.61.61,0,0,0,0,.12l21,47L83.2,111.86a6.13,6.13,0,0,0-.57.77,16,16,0,0,0-1,15.7c9.06,18.53,27.73,37.06,46.46,46.11a16,16,0,0,0,15.75-1.14,8.44,8.44,0,0,0,.74-.56L168.89,152l47,21.05h0s.08,0,.11,0A40.21,40.21,0,0,1,176,208Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M231.88,175.08A56.26,56.26,0,0,1,176,224C96.6,224,32,159.4,32,80A56.26,56.26,0,0,1,80.92,24.12a16,16,0,0,1,16.62,9.52l21.12,47.15,0,.12A16,16,0,0,1,117.39,96c-.18.27-.37.52-.57.77L96,121.45c7.49,15.22,23.41,31,38.83,38.51l24.34-20.71a8.12,8.12,0,0,1,.75-.56,16,16,0,0,1,15.17-1.4l.13.06,47.11,21.11A16,16,0,0,1,231.88,175.08Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.59,160.3l-47.24-21.17a14,14,0,0,0-13.28,1.22,4.81,4.81,0,0,0-.56.42l-24.69,21a1.88,1.88,0,0,1-1.68.06c-15.87-7.66-32.31-24-40-39.65a1.91,1.91,0,0,1,0-1.68l21.07-25a6.13,6.13,0,0,0,.42-.58,14,14,0,0,0,1.12-13.27L95.73,34.49a14,14,0,0,0-14.56-8.38A54.24,54.24,0,0,0,34,80c0,78.3,63.7,142,142,142a54.25,54.25,0,0,0,53.89-47.17A14,14,0,0,0,221.59,160.3ZM176,210C104.32,210,46,151.68,46,80A42.23,42.23,0,0,1,82.67,38h.23a2,2,0,0,1,1.84,1.31l21.1,47.11a2,2,0,0,1,0,1.67L84.73,113.15a4.73,4.73,0,0,0-.43.57,14,14,0,0,0-.91,13.73c8.87,18.16,27.17,36.32,45.53,45.19a14,14,0,0,0,13.77-1c.19-.13.38-.27.56-.42l24.68-21a1.92,1.92,0,0,1,1.6-.1l47.25,21.17a2,2,0,0,1,1.21,2A42.24,42.24,0,0,1,176,210Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222.37,158.46l-47.11-21.11-.13-.06a16,16,0,0,0-15.17,1.4,8.12,8.12,0,0,0-.75.56L134.87,160c-15.42-7.49-31.34-23.29-38.83-38.51l20.78-24.71c.2-.25.39-.5.57-.77a16,16,0,0,0,1.32-15.06l0-.12L97.54,33.64a16,16,0,0,0-16.62-9.52A56.26,56.26,0,0,0,32,80c0,79.4,64.6,144,144,144a56.26,56.26,0,0,0,55.88-48.92A16,16,0,0,0,222.37,158.46ZM176,208A128.14,128.14,0,0,1,48,80,40.2,40.2,0,0,1,82.87,40a.61.61,0,0,0,0,.12l21,47L83.2,111.86a6.13,6.13,0,0,0-.57.77,16,16,0,0,0-1,15.7c9.06,18.53,27.73,37.06,46.46,46.11a16,16,0,0,0,15.75-1.14,8.44,8.44,0,0,0,.74-.56L168.89,152l47,21.05h0s.08,0,.11,0A40.21,40.21,0,0,1,176,208Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220.78,162.13,173.56,141A12,12,0,0,0,162.18,142a3.37,3.37,0,0,0-.38.28L137,163.42a3.93,3.93,0,0,1-3.7.21c-16.24-7.84-33.05-24.52-40.89-40.57a3.9,3.9,0,0,1,.18-3.69l21.2-25.21c.1-.12.19-.25.28-.38a12,12,0,0,0,1-11.36L93.9,35.28a12,12,0,0,0-12.48-7.19A52.25,52.25,0,0,0,36,80c0,77.2,62.8,140,140,140a52.25,52.25,0,0,0,51.91-45.42A12,12,0,0,0,220.78,162.13ZM220,173.58A44.23,44.23,0,0,1,176,212C103.22,212,44,152.78,44,80A44.23,44.23,0,0,1,82.42,36a3.87,3.87,0,0,1,.48,0,4,4,0,0,1,3.67,2.49l21.11,47.14a4,4,0,0,1-.23,3.6l-21.19,25.2c-.1.13-.2.25-.29.39a12,12,0,0,0-.78,11.75c8.69,17.79,26.61,35.58,44.6,44.27a12,12,0,0,0,11.79-.87l.37-.28,24.83-21.12a3.93,3.93,0,0,1,3.57-.27l47.21,21.16A4,4,0,0,1,220,173.58Z"}))]]),mu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),n.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),pu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M96,40l33.52,88H56Zm104,88H129.52L160,208Z",opacity:"0.2"}),n.createElement("path",{d:"M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z"}))]]),hu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,36H48A20,20,0,0,0,28,56v56c0,54.29,26.32,87.22,48.4,105.29,23.71,19.39,47.44,26,48.44,26.29a12.1,12.1,0,0,0,6.32,0c1-.28,24.73-6.9,48.44-26.29,22.08-18.07,48.4-51,48.4-105.29V56A20,20,0,0,0,208,36Zm-4,76c0,35.71-13.09,64.69-38.91,86.15A126.28,126.28,0,0,1,128,219.38a126.14,126.14,0,0,1-37.09-21.23C65.09,176.69,52,147.71,52,112V60H204Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z",opacity:"0.2"}),n.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,42H48A14,14,0,0,0,34,56v56c0,51.94,25.12,83.4,46.2,100.64,22.73,18.6,45.27,24.89,46.22,25.15a6,6,0,0,0,3.16,0c.95-.26,23.49-6.55,46.22-25.15C196.88,195.4,222,163.94,222,112V56A14,14,0,0,0,208,42Zm2,70c0,37.76-13.94,68.39-41.44,91.06A131.17,131.17,0,0,1,128,225.72a130.94,130.94,0,0,1-40.56-22.66C59.94,180.39,46,149.76,46,112V56a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,44H48A12,12,0,0,0,36,56v56c0,51.16,24.73,82.12,45.47,99.1,22.4,18.32,44.55,24.5,45.48,24.76a4,4,0,0,0,2.1,0c.93-.26,23.08-6.44,45.48-24.76,20.74-17,45.47-47.94,45.47-99.1V56A12,12,0,0,0,208,44Zm4,68c0,38.44-14.23,69.63-42.29,92.71A132.45,132.45,0,0,1,128,227.82a132.23,132.23,0,0,1-41.71-23.11C58.23,181.63,44,150.44,44,112V56a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"}))]]),fu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z",opacity:"0.2"}),n.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z"}))]]),wu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M243,96a20.33,20.33,0,0,0-17.74-14l-56.59-4.57L146.83,24.62a20.36,20.36,0,0,0-37.66,0L87.35,77.44,30.76,82A20.45,20.45,0,0,0,19.1,117.88l43.18,37.24-13.2,55.7A20.37,20.37,0,0,0,79.57,233L128,203.19,176.43,233a20.39,20.39,0,0,0,30.49-22.15l-13.2-55.7,43.18-37.24A20.43,20.43,0,0,0,243,96ZM172.53,141.7a12,12,0,0,0-3.84,11.86L181.58,208l-47.29-29.08a12,12,0,0,0-12.58,0L74.42,208l12.89-54.4a12,12,0,0,0-3.84-11.86L41.2,105.24l55.4-4.47a12,12,0,0,0,10.13-7.38L128,41.89l21.27,51.5a12,12,0,0,0,10.13,7.38l55.4,4.47Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z",opacity:"0.2"}),n.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M237.28,97.87A14.18,14.18,0,0,0,224.76,88l-60.25-4.87-23.22-56.2a14.37,14.37,0,0,0-26.58,0L91.49,83.11,31.24,88a14.18,14.18,0,0,0-12.52,9.89A14.43,14.43,0,0,0,23,113.32L69,152.93l-14,59.25a14.4,14.4,0,0,0,5.59,15,14.1,14.1,0,0,0,15.91.6L128,196.12l51.58,31.71a14.1,14.1,0,0,0,15.91-.6,14.4,14.4,0,0,0,5.59-15l-14-59.25L233,113.32A14.43,14.43,0,0,0,237.28,97.87Zm-12.14,6.37-48.69,42a6,6,0,0,0-1.92,5.92l14.88,62.79a2.35,2.35,0,0,1-.95,2.57,2.24,2.24,0,0,1-2.6.1L131.14,184a6,6,0,0,0-6.28,0L70.14,217.61a2.24,2.24,0,0,1-2.6-.1,2.35,2.35,0,0,1-1-2.57l14.88-62.79a6,6,0,0,0-1.92-5.92l-48.69-42a2.37,2.37,0,0,1-.73-2.65,2.28,2.28,0,0,1,2.07-1.65l63.92-5.16a6,6,0,0,0,5.06-3.69l24.63-59.6a2.35,2.35,0,0,1,4.38,0l24.63,59.6a6,6,0,0,0,5.06,3.69l63.92,5.16a2.28,2.28,0,0,1,2.07,1.65A2.37,2.37,0,0,1,225.14,104.24Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M235.36,98.49A12.21,12.21,0,0,0,224.59,90l-61.47-5L139.44,27.67a12.37,12.37,0,0,0-22.88,0L92.88,85,31.41,90a12.45,12.45,0,0,0-7.07,21.84l46.85,40.41L56.87,212.64a12.35,12.35,0,0,0,18.51,13.49L128,193.77l52.62,32.36a12.12,12.12,0,0,0,13.69-.51,12.28,12.28,0,0,0,4.82-13l-14.32-60.42,46.85-40.41A12.29,12.29,0,0,0,235.36,98.49Zm-8.93,7.26-48.68,42a4,4,0,0,0-1.28,3.95l14.87,62.79a4.37,4.37,0,0,1-1.72,4.65,4.24,4.24,0,0,1-4.81.18L130.1,185.67a4,4,0,0,0-4.2,0L71.19,219.32a4.24,4.24,0,0,1-4.81-.18,4.37,4.37,0,0,1-1.72-4.65L79.53,151.7a4,4,0,0,0-1.28-3.95l-48.68-42A4.37,4.37,0,0,1,28.25,101a4.31,4.31,0,0,1,3.81-3L96,92.79a4,4,0,0,0,3.38-2.46L124,30.73a4.35,4.35,0,0,1,8.08,0l24.62,59.6A4,4,0,0,0,160,92.79l63.9,5.15a4.31,4.31,0,0,1,3.81,3A4.37,4.37,0,0,1,226.43,105.75Z"}))]]),gu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),n.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),xu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,24v92H179.31a19.86,19.86,0,0,0-14.14,5.86L147,168H109L90.83,149.86A19.86,19.86,0,0,0,76.69,144H52V52ZM52,204V168H75l18.14,18.14A19.86,19.86,0,0,0,107.31,192h41.38a19.86,19.86,0,0,0,14.14-5.86L181,168h23v36Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,48V160H179.31a8,8,0,0,0-5.66,2.34l-19.31,19.32a8,8,0,0,1-5.66,2.34H107.31a8,8,0,0,1-5.66-2.34L82.34,162.34A8,8,0,0,0,76.68,160H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.68A15.89,15.89,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H208a2,2,0,0,1,2,2V154H179.31a13.94,13.94,0,0,0-9.9,4.1L150.1,177.41a2,2,0,0,1-1.41.59H107.31a2,2,0,0,1-1.41-.58L86.59,158.1a13.94,13.94,0,0,0-9.9-4.1H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V166H76.69a2,2,0,0,1,1.41.58L97.41,185.9a13.94,13.94,0,0,0,9.9,4.1h41.38a13.94,13.94,0,0,0,9.9-4.1l19.31-19.31a2,2,0,0,1,1.41-.59H210v42A2,2,0,0,1,208,210Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.69A15.86,15.86,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.31A15.86,15.86,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H208a4,4,0,0,1,4,4V156H179.31a12,12,0,0,0-8.48,3.51l-19.32,19.32a4,4,0,0,1-2.82,1.17H107.31a4,4,0,0,1-2.82-1.17L85.17,159.51A12,12,0,0,0,76.69,156H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V164H76.69a4,4,0,0,1,2.82,1.17l19.32,19.32a12,12,0,0,0,8.48,3.51h41.38a12,12,0,0,0,8.48-3.51l19.32-19.32a4,4,0,0,1,2.82-1.17H212v44A4,4,0,0,1,208,212Z"}))]]),vu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M234.38,210a123.36,123.36,0,0,0-60.78-53.23,76,76,0,1,0-91.2,0A123.36,123.36,0,0,0,21.62,210a12,12,0,1,0,20.77,12c18.12-31.32,50.12-50,85.61-50s67.49,18.69,85.61,50a12,12,0,0,0,20.77-12ZM76,96a52,52,0,1,1,52,52A52.06,52.06,0,0,1,76,96Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M192,96a64,64,0,1,1-64-64A64,64,0,0,1,192,96Z",opacity:"0.2"}),n.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.93,220a8,8,0,0,1-6.93,4H32a8,8,0,0,1-6.92-12c15.23-26.33,38.7-45.21,66.09-54.16a72,72,0,1,1,73.66,0c27.39,8.95,50.86,27.83,66.09,54.16A8,8,0,0,1,230.93,220Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M229.19,213c-15.81-27.32-40.63-46.49-69.47-54.62a70,70,0,1,0-63.44,0C67.44,166.5,42.62,185.67,26.81,213a6,6,0,1,0,10.38,6C56.4,185.81,90.34,166,128,166s71.6,19.81,90.81,53a6,6,0,1,0,10.38-6ZM70,96a58,58,0,1,1,58,58A58.07,58.07,0,0,1,70,96Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227.46,214c-16.52-28.56-43-48.06-73.68-55.09a68,68,0,1,0-51.56,0c-30.64,7-57.16,26.53-73.68,55.09a4,4,0,0,0,6.92,4C55,184.19,89.62,164,128,164s73,20.19,92.54,54a4,4,0,0,0,3.46,2,3.93,3.93,0,0,0,2-.54A4,4,0,0,0,227.46,214ZM68,96a60,60,0,1,1,60,60A60.07,60.07,0,0,1,68,96Z"}))]]),bu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M164,56a12,12,0,0,1,12-12h12V32a12,12,0,0,1,24,0V44h12a12,12,0,0,1,0,24H212V80a12,12,0,0,1-24,0V68H176A12,12,0,0,1,164,56Zm70.51,54A107.88,107.88,0,1,1,146,21.49a12,12,0,0,1-4,23.67A85,85,0,0,0,128,44,83.94,83.94,0,0,0,62.05,179.94a83.48,83.48,0,0,1,29-23.42,52,52,0,1,1,74,0,83.36,83.36,0,0,1,29,23.42A83.52,83.52,0,0,0,212,128a85.2,85.2,0,0,0-1.16-14,12,12,0,0,1,23.67-4ZM128,148a28,28,0,1,0-28-28A28,28,0,0,0,128,148Zm0,64a83.53,83.53,0,0,0,48.43-15.43,60,60,0,0,0-96.86,0A83.53,83.53,0,0,0,128,212Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a95.76,95.76,0,0,1-31.8,71.37A72,72,0,0,0,128,160a40,40,0,1,0-40-40,40,40,0,0,0,40,40,72,72,0,0,0-64.2,39.37h0A96,96,0,1,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M168,56a8,8,0,0,1,8-8h16V32a8,8,0,0,1,16,0V48h16a8,8,0,0,1,0,16H208V80a8,8,0,0,1-16,0V64H176A8,8,0,0,1,168,56Zm62.56,54.68a103.92,103.92,0,1,1-85.24-85.24,8,8,0,0,1-2.64,15.78A88.07,88.07,0,0,0,40,128a87.62,87.62,0,0,0,22.24,58.41A79.66,79.66,0,0,1,98.3,157.66a48,48,0,1,1,59.4,0,79.66,79.66,0,0,1,36.06,28.75A87.62,87.62,0,0,0,216,128a88.85,88.85,0,0,0-1.22-14.68,8,8,0,1,1,15.78-2.64ZM128,152a32,32,0,1,0-32-32A32,32,0,0,0,128,152Zm0,64a87.57,87.57,0,0,0,53.92-18.5,64,64,0,0,0-107.84,0A87.57,87.57,0,0,0,128,216Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,76a44,44,0,1,1-44,44A44,44,0,0,1,128,76Zm48-12h16V80a8,8,0,0,0,16,0V64h16a8,8,0,0,0,0-16H208V32a8,8,0,0,0-16,0V48H176a8,8,0,0,0,0,16Zm45.35,40.11a8,8,0,0,0-6.57,9.21A88.85,88.85,0,0,1,216,128a87.62,87.62,0,0,1-22.24,58.41A79.86,79.86,0,0,0,172,165.1a4,4,0,0,0-4.84.32,59.81,59.81,0,0,1-78.27,0A4,4,0,0,0,84,165.1a79.71,79.71,0,0,0-21.79,21.31A88,88,0,0,1,128,40a88.76,88.76,0,0,1,14.68,1.22,8,8,0,0,0,2.64-15.78,103.92,103.92,0,1,0,85.24,85.24A8,8,0,0,0,221.35,104.11Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M170,56a6,6,0,0,1,6-6h18V32a6,6,0,0,1,12,0V50h18a6,6,0,0,1,0,12H206V80a6,6,0,0,1-12,0V62H176A6,6,0,0,1,170,56Zm58.59,55A101.9,101.9,0,1,1,145,27.41a6,6,0,1,1-2,11.83A91.66,91.66,0,0,0,128,38,89.95,89.95,0,0,0,62.49,189.64a77.53,77.53,0,0,1,40-31.38,46,46,0,1,1,51,0,77.53,77.53,0,0,1,40,31.38A89.65,89.65,0,0,0,218,128a91.76,91.76,0,0,0-1.24-15,6,6,0,1,1,11.83-2ZM128,154a34,34,0,1,0-34-34A34,34,0,0,0,128,154Zm0,64A89.58,89.58,0,0,0,184.56,198a66,66,0,0,0-113.12,0A89.58,89.58,0,0,0,128,218Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M168,56a8,8,0,0,1,8-8h16V32a8,8,0,0,1,16,0V48h16a8,8,0,0,1,0,16H208V80a8,8,0,0,1-16,0V64H176A8,8,0,0,1,168,56Zm62.56,54.68a103.92,103.92,0,1,1-85.24-85.24,8,8,0,0,1-2.64,15.78A88.07,88.07,0,0,0,40,128a87.62,87.62,0,0,0,22.24,58.41A79.66,79.66,0,0,1,98.3,157.66a48,48,0,1,1,59.4,0,79.66,79.66,0,0,1,36.06,28.75A87.62,87.62,0,0,0,216,128a88.85,88.85,0,0,0-1.22-14.68,8,8,0,1,1,15.78-2.64ZM128,152a32,32,0,1,0-32-32A32,32,0,0,0,128,152Zm0,64a87.57,87.57,0,0,0,53.92-18.5,64,64,0,0,0-107.84,0A87.57,87.57,0,0,0,128,216Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M172,56a4,4,0,0,1,4-4h20V32a4,4,0,0,1,8,0V52h20a4,4,0,0,1,0,8H204V80a4,4,0,0,1-8,0V60H176A4,4,0,0,1,172,56Zm54.62,55.34a99.89,99.89,0,1,1-82-82,4,4,0,0,1-1.32,7.89A93.4,93.4,0,0,0,128,36,92,92,0,0,0,62.83,192.87a75.61,75.61,0,0,1,44.51-34,44,44,0,1,1,41.32,0,75.61,75.61,0,0,1,44.51,34A91.69,91.69,0,0,0,220,128a93.58,93.58,0,0,0-1.27-15.34,4,4,0,0,1,7.89-1.32ZM128,156a36,36,0,1,0-36-36A36,36,0,0,0,128,156Zm0,64a91.61,91.61,0,0,0,59.14-21.58,68,68,0,0,0-118.27,0A91.56,91.56,0,0,0,128,220Z"}))]]),yu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M125.18,156.94a64,64,0,1,0-82.36,0,100.23,100.23,0,0,0-39.49,32,12,12,0,0,0,19.35,14.2,76,76,0,0,1,122.64,0,12,12,0,0,0,19.36-14.2A100.33,100.33,0,0,0,125.18,156.94ZM44,108a40,40,0,1,1,40,40A40,40,0,0,1,44,108Zm206.1,97.67a12,12,0,0,1-16.78-2.57A76.31,76.31,0,0,0,172,172a12,12,0,0,1,0-24,40,40,0,1,0-10.3-78.67,12,12,0,1,1-6.16-23.19,64,64,0,0,1,57.64,110.8,100.23,100.23,0,0,1,39.49,32A12,12,0,0,1,250.1,205.67Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M136,108A52,52,0,1,1,84,56,52,52,0,0,1,136,108Z",opacity:"0.2"}),n.createElement("path",{d:"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M164.47,195.63a8,8,0,0,1-6.7,12.37H10.23a8,8,0,0,1-6.7-12.37,95.83,95.83,0,0,1,47.22-37.71,60,60,0,1,1,66.5,0A95.83,95.83,0,0,1,164.47,195.63Zm87.91-.15a95.87,95.87,0,0,0-47.13-37.56A60,60,0,0,0,144.7,54.59a4,4,0,0,0-1.33,6A75.83,75.83,0,0,1,147,150.53a4,4,0,0,0,1.07,5.53,112.32,112.32,0,0,1,29.85,30.83,23.92,23.92,0,0,1,3.65,16.47,4,4,0,0,0,3.95,4.64h60.3a8,8,0,0,0,7.73-5.93A8.22,8.22,0,0,0,252.38,195.48Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M112.6,158.43a58,58,0,1,0-57.2,0A93.83,93.83,0,0,0,5.21,196.72a6,6,0,0,0,10.05,6.56,82,82,0,0,1,137.48,0,6,6,0,0,0,10-6.56A93.83,93.83,0,0,0,112.6,158.43ZM38,108a46,46,0,1,1,46,46A46.06,46.06,0,0,1,38,108Zm211,97a6,6,0,0,1-8.3-1.74A81.8,81.8,0,0,0,172,166a6,6,0,0,1,0-12,46,46,0,1,0-17.08-88.73,6,6,0,1,1-4.46-11.14,58,58,0,0,1,50.14,104.3,93.83,93.83,0,0,1,50.19,38.29A6,6,0,0,1,249,205Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M107.19,159a56,56,0,1,0-46.38,0A91.83,91.83,0,0,0,6.88,197.81a4,4,0,1,0,6.7,4.37,84,84,0,0,1,140.84,0,4,4,0,1,0,6.7-4.37A91.83,91.83,0,0,0,107.19,159ZM36,108a48,48,0,1,1,48,48A48.05,48.05,0,0,1,36,108Zm212,95.35a4,4,0,0,1-5.53-1.17A83.81,83.81,0,0,0,172,164a4,4,0,0,1,0-8,48,48,0,1,0-17.82-92.58,4,4,0,1,1-3-7.43,56,56,0,0,1,44,103,91.83,91.83,0,0,1,53.93,38.86A4,4,0,0,1,248,203.35Z"}))]]),ju=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),n.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),_u=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z"}))]]),ku=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),n.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),Cu=o.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),pe=n.forwardRef((e,a)=>{const{alt:s,color:r,size:i,weight:l,mirrored:m,children:c,weights:d,...p}=e,{color:u="currentColor",size:f,weight:h="regular",mirrored:g=!1,...x}=n.useContext(Cu);return n.createElement("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:i??f,height:i??f,fill:r??u,viewBox:"0 0 256 256",transform:m||g?"scale(-1, 1)":void 0,...x,...p},!!s&&n.createElement("title",null,s),c,d.get(l??h))});pe.displayName="IconBase";const zo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:S2}));zo.displayName="ArchiveIcon";const Do=zo,Uo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:E2}));Uo.displayName="ArrowCounterClockwiseIcon";const Wo=Uo,Bo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:A2}));Bo.displayName="ArrowSquareOutIcon";const Nu=Bo,Go=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:M2}));Go.displayName="ArrowsLeftRightIcon";const Su=Go,qo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:R2}));qo.displayName="BellIcon";const Eu=qo,Ko=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:L2}));Ko.displayName="BellSlashIcon";const mi=Ko,Yo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:P2}));Yo.displayName="BuildingsIcon";const ps=Yo,Qo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:$2}));Qo.displayName="CameraIcon";const sn=Qo,Jo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:O2}));Jo.displayName="CaretDownIcon";const Ut=Jo,Xo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Z2}));Xo.displayName="CaretLeftIcon";const nn=Xo,el=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:H2}));el.displayName="CaretRightIcon";const Qt=el,tl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:F2}));tl.displayName="CaretUpIcon";const al=tl,sl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:T2}));sl.displayName="CaretUpDownIcon";const Au=sl,nl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:I2}));nl.displayName="CheckIcon";const Ye=nl,rl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:V2}));rl.displayName="ChecksIcon";const Mu=rl,il=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:z2}));il.displayName="CircleIcon";const Ru=il,ol=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:D2}));ol.displayName="ClockIcon";const Lu=ol,ll=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:U2}));ll.displayName="CopyIcon";const Ga=ll,cl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:W2}));cl.displayName="DeviceMobileIcon";const Pu=cl,dl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:B2}));dl.displayName="DotsThreeIcon";const $u=dl,ul=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:G2}));ul.displayName="DownloadSimpleIcon";const ml=ul,pl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:q2}));pl.displayName="EnvelopeSimpleIcon";const hl=pl,fl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:K2}));fl.displayName="EyeIcon";const Nn=fl,wl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Y2}));wl.displayName="EyeSlashIcon";const Sn=wl,gl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Q2}));gl.displayName="FingerprintIcon";const ar=gl,xl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:J2}));xl.displayName="FolderSimpleIcon";const pi=xl,vl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:X2}));vl.displayName="FunnelIcon";const Ou=vl,bl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:eu}));bl.displayName="GearSixIcon";const Ea=bl,yl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:tu}));yl.displayName="GlobeIcon";const Zu=yl,jl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:au}));jl.displayName="HashIcon";const _l=jl,kl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:su}));kl.displayName="InfoIcon";const Hu=kl,Cl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:nu}));Cl.displayName="KeyIcon";const Fu=Cl,Nl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:ru}));Nl.displayName="LightningIcon";const Tu=Nl,Sl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:iu}));Sl.displayName="LinkIcon";const Iu=Sl,El=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:ou}));El.displayName="LockIcon";const hi=El,Al=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:lu}));Al.displayName="MagnifyingGlassIcon";const Ml=Al,Rl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:cu}));Rl.displayName="PaperPlaneTiltIcon";const Ll=Rl,Pl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:du}));Pl.displayName="PencilSimpleIcon";const $l=Pl,Ol=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:uu}));Ol.displayName="PhoneIcon";const Vu=Ol,Zl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:mu}));Zl.displayName="PlusIcon";const St=Zl,Hl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:pu}));Hl.displayName="PulseIcon";const zu=Hl,Fl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:hu}));Fl.displayName="ShieldIcon";const Xt=Fl,Tl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:fu}));Tl.displayName="SignOutIcon";const Aa=Tl,Il=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:wu}));Il.displayName="StarIcon";const Du=Il,Vl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:gu}));Vl.displayName="TrashIcon";const xr=Vl,zl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:xu}));zl.displayName="TrayIcon";const Uu=zl,Dl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:vu}));Dl.displayName="UserIcon";const hs=Dl,Ul=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:bu}));Ul.displayName="UserCirclePlusIcon";const Wu=Ul,Wl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:yu}));Wl.displayName="UsersIcon";const cs=Wl,Bl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:ju}));Bl.displayName="WarningIcon";const Fa=Bl,Gl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:_u}));Gl.displayName="WarningCircleIcon";const Ma=Gl,ql=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:ku}));ql.displayName="XIcon";const La=ql;function Bu(e){var a=Object.create(null);return function(s){return a[s]===void 0&&(a[s]=e(s)),a[s]}}var Gu=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qu=Bu(function(e){return Gu.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),et="-ms-",ds="-moz-",Be="-webkit-",Kl="comm",rn="rule",vr="decl",Ku="@import",Yu="@namespace",Yl="@keyframes",Qu="@layer",Ql=Math.abs,br=String.fromCharCode,sr=Object.assign;function Ju(e,a){return ut(e,0)^45?(((a<<2^ut(e,0))<<2^ut(e,1))<<2^ut(e,2))<<2^ut(e,3):0}function Jl(e){return e.trim()}function Gt(e,a){return(e=a.exec(e))?e[0]:e}function Me(e,a,s){return e.replace(a,s)}function Vs(e,a,s){return e.indexOf(a,s)}function ut(e,a){return e.charCodeAt(a)|0}function Pa(e,a,s){return e.slice(a,s)}function Rt(e){return e.length}function Xl(e){return e.length}function is(e,a){return a.push(e),e}function Xu(e,a){return e.map(a).join("")}function fi(e,a){return e.filter(function(s){return!Gt(s,a)})}var on=1,Ka=1,ec=0,At=0,ct=0,es="";function ln(e,a,s,r,i,l,m,c){return{value:e,root:a,parent:s,type:r,props:i,children:l,line:on,column:Ka,length:m,return:"",siblings:c}}function ua(e,a){return sr(ln("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},a)}function Va(e){for(;e.root;)e=ua(e.root,{children:[e]});is(e,e.siblings)}function e8(){return ct}function t8(){return ct=At>0?ut(es,--At):0,Ka--,ct===10&&(Ka=1,on--),ct}function $t(){return ct=At<ec?ut(es,At++):0,Ka++,ct===10&&(Ka=1,on++),ct}function pa(){return ut(es,At)}function zs(){return At}function cn(e,a){return Pa(es,e,a)}function fs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function a8(e){return on=Ka=1,ec=Rt(es=e),At=0,[]}function s8(e){return es="",e}function En(e){return Jl(cn(At-1,nr(e===91?e+2:e===40?e+1:e)))}function n8(e){for(;(ct=pa())&&ct<33;)$t();return fs(e)>2||fs(ct)>3?"":" "}function r8(e,a){for(;--a&&$t()&&!(ct<48||ct>102||ct>57&&ct<65||ct>70&&ct<97););return cn(e,zs()+(a<6&&pa()==32&&$t()==32))}function nr(e){for(;$t();)switch(ct){case e:return At;case 34:case 39:e!==34&&e!==39&&nr(ct);break;case 40:e===41&&nr(e);break;case 92:$t();break}return At}function i8(e,a){for(;$t()&&e+ct!==57;)if(e+ct===84&&pa()===47)break;return"/*"+cn(a,At-1)+"*"+br(e===47?e:$t())}function o8(e){for(;!fs(pa());)$t();return cn(e,At)}function l8(e){return s8(Ds("",null,null,null,[""],e=a8(e),0,[0],e))}function Ds(e,a,s,r,i,l,m,c,d){for(var p=0,u=0,f=m,h=0,g=0,x=0,w=1,b=1,j=1,v=0,k="",N=i,_=l,C=r,y=k;b;)switch(x=v,v=$t()){case 40:if(x!=108&&ut(y,f-1)==58){Vs(y+=Me(En(v),"&","&\f"),"&\f",Ql(p?c[p-1]:0))!=-1&&(j=-1);break}case 34:case 39:case 91:y+=En(v);break;case 9:case 10:case 13:case 32:y+=n8(x);break;case 92:y+=r8(zs()-1,7);continue;case 47:switch(pa()){case 42:case 47:is(c8(i8($t(),zs()),a,s,d),d),(fs(x||1)==5||fs(pa()||1)==5)&&Rt(y)&&Pa(y,-1,void 0)!==" "&&(y+=" ");break;default:y+="/"}break;case 123*w:c[p++]=Rt(y)*j;case 125*w:case 59:case 0:switch(v){case 0:case 125:b=0;case 59+u:j==-1&&(y=Me(y,/\f/g,"")),g>0&&(Rt(y)-f||w===0&&x===47)&&is(g>32?gi(y+";",r,s,f-1,d):gi(Me(y," ","")+";",r,s,f-2,d),d);break;case 59:y+=";";default:if(is(C=wi(y,a,s,p,u,i,c,k,N=[],_=[],f,l),l),v===123)if(u===0)Ds(y,a,C,C,N,l,f,c,_);else{switch(h){case 99:if(ut(y,3)===110)break;case 108:if(ut(y,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Ds(e,C,C,r&&is(wi(e,C,C,0,0,i,c,k,i,N=[],f,_),_),i,_,f,c,r?N:_):Ds(y,C,C,C,[""],_,0,c,_)}}p=u=g=0,w=j=1,k=y="",f=m;break;case 58:f=1+Rt(y),g=x;default:if(w<1){if(v==123)--w;else if(v==125&&w++==0&&t8()==125)continue}switch(y+=br(v),v*w){case 38:j=u>0?1:(y+="\f",-1);break;case 44:c[p++]=(Rt(y)-1)*j,j=1;break;case 64:pa()===45&&(y+=En($t())),h=pa(),u=f=Rt(k=y+=o8(zs())),v++;break;case 45:x===45&&Rt(y)==2&&(w=0)}}return l}function wi(e,a,s,r,i,l,m,c,d,p,u,f){for(var h=i-1,g=i===0?l:[""],x=Xl(g),w=0,b=0,j=0;w<r;++w)for(var v=0,k=Pa(e,h+1,h=Ql(b=m[w])),N=e;v<x;++v)(N=Jl(b>0?g[v]+" "+k:Me(k,/&\f/g,g[v])))&&(d[j++]=N);return ln(e,a,s,i===0?rn:c,d,p,u,f)}function c8(e,a,s,r){return ln(e,a,s,Kl,br(e8()),Pa(e,2,-2),0,r)}function gi(e,a,s,r,i){return ln(e,a,s,vr,Pa(e,0,r),Pa(e,r+1,-1),r,i)}function tc(e,a,s){switch(Ju(e,a)){case 5103:return Be+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Be+e+e;case 4855:return Be+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return ds+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Be+e+ds+e+et+e+e;case 5936:switch(ut(e,a+11)){case 114:return Be+e+et+Me(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Be+e+et+Me(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Be+e+et+Me(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Be+e+et+e+e;case 6165:return Be+e+et+"flex-"+e+e;case 5187:return Be+e+Me(e,/(\w+).+(:[^]+)/,Be+"box-$1$2"+et+"flex-$1$2")+e;case 5443:return Be+e+et+"flex-item-"+Me(e,/flex-|-self/g,"")+(Gt(e,/flex-|baseline/)?"":et+"grid-row-"+Me(e,/flex-|-self/g,""))+e;case 4675:return Be+e+et+"flex-line-pack"+Me(e,/align-content|flex-|-self/g,"")+e;case 5548:return Be+e+et+Me(e,"shrink","negative")+e;case 5292:return Be+e+et+Me(e,"basis","preferred-size")+e;case 6060:return Be+"box-"+Me(e,"-grow","")+Be+e+et+Me(e,"grow","positive")+e;case 4554:return Be+Me(e,/([^-])(transform)/g,"$1"+Be+"$2")+e;case 6187:return Me(Me(Me(e,/(zoom-|grab)/,Be+"$1"),/(image-set)/,Be+"$1"),e,"")+e;case 5495:case 3959:return Me(e,/(image-set\([^]*)/,Be+"$1$`$1");case 4968:return Me(Me(e,/(.+:)(flex-)?(.*)/,Be+"box-pack:$3"+et+"flex-pack:$3"),/space-between/,"justify")+Be+e+e;case 4200:if(!Gt(e,/flex-|baseline/))return et+"grid-column-align"+Pa(e,a)+e;break;case 2592:case 3360:return et+Me(e,"template-","")+e;case 4384:case 3616:return s&&s.some(function(r,i){return a=i,Gt(r.props,/grid-\w+-end/)})?~Vs(e+(s=s[a].value),"span",0)?e:et+Me(e,"-start","")+e+et+"grid-row-span:"+(~Vs(s,"span",0)?Gt(s,/\d+/):+Gt(s,/\d+/)-+Gt(e,/\d+/))+";":et+Me(e,"-start","")+e;case 4896:case 4128:return s&&s.some(function(r){return Gt(r.props,/grid-\w+-start/)})?e:et+Me(Me(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Me(e,/(.+)-inline(.+)/,Be+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Rt(e)-1-a>6)switch(ut(e,a+1)){case 109:if(ut(e,a+4)!==45)break;case 102:return Me(e,/(.+:)(.+)-([^]+)/,"$1"+Be+"$2-$3$1"+ds+(ut(e,a+3)==108?"$3":"$2-$3"))+e;case 115:return~Vs(e,"stretch",0)?tc(Me(e,"stretch","fill-available"),a,s)+e:e}break;case 5152:case 5920:return Me(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,i,l,m,c,d,p){return et+i+":"+l+p+(m?et+i+"-span:"+(c?d:+d-+l)+p:"")+e});case 4949:if(ut(e,a+6)===121)return Me(e,":",":"+Be)+e;break;case 6444:switch(ut(e,ut(e,14)===45?18:11)){case 120:return Me(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Be+(ut(e,14)===45?"inline-":"")+"box$3$1"+Be+"$2$3$1"+et+"$2box$3")+e;case 100:return Me(e,":",":"+et)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Me(e,"scroll-","scroll-snap-")+e}return e}function Ks(e,a){for(var s="",r=0;r<e.length;r++)s+=a(e[r],r,e,a)||"";return s}function d8(e,a,s,r){switch(e.type){case Qu:if(e.children.length)break;case Ku:case Yu:case vr:return e.return=e.return||e.value;case Kl:return"";case Yl:return e.return=e.value+"{"+Ks(e.children,r)+"}";case rn:if(!Rt(e.value=e.props.join(",")))return""}return Rt(s=Ks(e.children,r))?e.return=e.value+"{"+s+"}":""}function u8(e){var a=Xl(e);return function(s,r,i,l){for(var m="",c=0;c<a;c++)m+=e[c](s,r,i,l)||"";return m}}function m8(e){return function(a){a.root||(a=a.return)&&e(a)}}function p8(e,a,s,r){if(e.length>-1&&!e.return)switch(e.type){case vr:e.return=tc(e.value,e.length,s);return;case Yl:return Ks([ua(e,{value:Me(e.value,"@","@"+Be)})],r);case rn:if(e.length)return Xu(s=e.props,function(i){switch(Gt(i,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Va(ua(e,{props:[Me(i,/:(read-\w+)/,":"+ds+"$1")]})),Va(ua(e,{props:[i]})),sr(e,{props:fi(s,r)});break;case"::placeholder":Va(ua(e,{props:[Me(i,/:(plac\w+)/,":"+Be+"input-$1")]})),Va(ua(e,{props:[Me(i,/:(plac\w+)/,":"+ds+"$1")]})),Va(ua(e,{props:[Me(i,/:(plac\w+)/,et+"input-$1")]})),Va(ua(e,{props:[i]})),sr(e,{props:fi(s,r)});break}return""})}}var An,Mn;const $a=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ac="active",sc="data-styled-version",dn="6.4.1",yr=`/*!sc*/
19
- `,us=typeof window<"u"&&typeof document<"u";function xi(e){if(typeof process<"u"&&process.env!==void 0){const a=process.env[e];if(a!==void 0&&a!=="")return a!=="false"}}const h8=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:(Mn=(An=xi("REACT_APP_SC_DISABLE_SPEEDY"))!==null&&An!==void 0?An:xi("SC_DISABLE_SPEEDY"))!==null&&Mn!==void 0?Mn:typeof process>"u"||process.env===void 0||process.env.NODE_ENV!=="production"),f8="sc-keyframes-",w8={},g8=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
18
+ */var si;function g1(){return si||(si=1,process.env.NODE_ENV!=="production"&&(function(){function e(g,x){return g===x&&(g!==0||1/g===1/x)||g!==g&&x!==x}function a(g,x){u||i.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var w=x();if(!h){var b=x();l(w,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}b=m({inst:{value:w,getSnapshot:x}});var j=b[0].inst,v=b[1];return c(function(){j.value=w,j.getSnapshot=x,s(j)&&v({inst:j})},[g,w,x]),d(function(){return s(j)&&v({inst:j}),g(function(){s(j)&&v({inst:j})})},[g]),p(w),w}function s(g){var x=g.getSnapshot;g=g.value;try{var w=x();return!l(g,w)}catch{return!0}}function r(g,x){return x()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=o,l=typeof Object.is=="function"?Object.is:e,m=i.useState,d=i.useEffect,c=i.useLayoutEffect,p=i.useDebugValue,u=!1,h=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:a;gn.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),gn}var ni;function x1(){return ni||(ni=1,process.env.NODE_ENV==="production"?Es.exports=w1():Es.exports=g1()),Es.exports}var Wn=x1();const jo=0,_o=1,ko=2,ri=3;var ii=Object.prototype.hasOwnProperty;function Bn(e,a){var s,r;if(e===a)return!0;if(e&&a&&(s=e.constructor)===a.constructor){if(s===Date)return e.getTime()===a.getTime();if(s===RegExp)return e.toString()===a.toString();if(s===Array){if((r=e.length)===a.length)for(;r--&&Bn(e[r],a[r]););return r===-1}if(!s||typeof e=="object"){r=0;for(s in e)if(ii.call(e,s)&&++r&&!ii.call(a,s)||!(s in a)||!Bn(e[s],a[s]))return!1;return Object.keys(a).length===r}}return e!==e&&a!==a}const zt=new WeakMap,Qt=()=>{},mt=Qt(),Gn=Object,Ce=e=>e===mt,Lt=e=>typeof e=="function",ga=(e,a)=>({...e,...a}),Co=e=>Lt(e.then),xn={},As={},xr="undefined",gs=typeof window!=xr,qn=typeof document!=xr,v1=gs&&"Deno"in window,b1=()=>gs&&typeof window.requestAnimationFrame!=xr,pa=(e,a)=>{const s=zt.get(e);return[()=>!Ce(a)&&e.get(a)||xn,r=>{if(!Ce(a)){const i=e.get(a);a in As||(As[a]=i),s[5](a,ga(i,r),i||xn)}},s[6],()=>!Ce(a)&&a in As?As[a]:!Ce(a)&&e.get(a)||xn]};let Kn=!0;const y1=()=>Kn,[Yn,Qn]=gs&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Qt,Qt],j1=()=>{const e=qn&&document.visibilityState;return Ce(e)||e!=="hidden"},_1=e=>(qn&&document.addEventListener("visibilitychange",e),Yn("focus",e),()=>{qn&&document.removeEventListener("visibilitychange",e),Qn("focus",e)}),k1=e=>{const a=()=>{Kn=!0,e()},s=()=>{Kn=!1};return Yn("online",a),Yn("offline",s),()=>{Qn("online",a),Qn("offline",s)}},C1={isOnline:y1,isVisible:j1},N1={initFocus:_1,initReconnect:k1},oi=!o.useId,Ga=!gs||v1,S1=e=>b1()?window.requestAnimationFrame(e):setTimeout(e,1),Vs=Ga?o.useEffect:o.useLayoutEffect,vn=typeof navigator<"u"&&navigator.connection,li=!Ga&&vn&&(["slow-2g","2g"].includes(vn.effectiveType)||vn.saveData),Ms=new WeakMap,E1=e=>Gn.prototype.toString.call(e),bn=(e,a)=>e===`[object ${a}]`;let A1=0;const Jn=e=>{const a=typeof e,s=E1(e),r=bn(s,"Date"),i=bn(s,"RegExp"),l=bn(s,"Object");let m,d;if(Gn(e)===e&&!r&&!i){if(m=Ms.get(e),m)return m;if(m=++A1+"~",Ms.set(e,m),Array.isArray(e)){for(m="@",d=0;d<e.length;d++)m+=Jn(e[d])+",";Ms.set(e,m)}if(l){m="#";const c=Gn.keys(e).sort();for(;!Ce(d=c.pop());)Ce(e[d])||(m+=d+":"+Jn(e[d])+",");Ms.set(e,m)}}else m=r?e.toJSON():a=="symbol"?e.toString():a=="string"?JSON.stringify(e):""+e;return m},ps=e=>{if(Lt(e))try{e=e()}catch{e=""}const a=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Jn(e):"",[e,a]};let M1=0;const Xn=()=>++M1;async function No(...e){const[a,s,r,i]=e,l=ga({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let m=l.populateCache;const d=l.rollbackOnError;let c=l.optimisticData;const p=f=>typeof d=="function"?d(f):d!==!1,u=l.throwOnError;if(Lt(s)){const f=s,g=[],x=a.keys();for(const w of x)!/^\$(inf|sub)\$/.test(w)&&f(a.get(w)._k)&&g.push(w);return Promise.all(g.map(h))}return h(s);async function h(f){const[g]=ps(f);if(!g)return;const[x,w]=pa(a,g),[b,j,v,k]=zt.get(a),N=()=>{const S=b[g];return(Lt(l.revalidate)?l.revalidate(x().data,f):l.revalidate!==!1)&&(delete v[g],delete k[g],S&&S[0])?S[0](ko).then(()=>x().data):x().data};if(e.length<3)return N();let _=r,C,y=!1;const E=Xn();j[g]=[E,0];const A=!Ce(c),H=x(),M=H.data,T=H._c,P=Ce(T)?M:T;if(A&&(c=Lt(c)?c(P,M):c,w({data:c,_c:P})),Lt(_))try{_=_(P)}catch(S){C=S,y=!0}if(_&&Co(_))if(_=await _.catch(S=>{C=S,y=!0}),E!==j[g][0]){if(y)throw C;return _}else y&&A&&p(C)&&(m=!0,w({data:P,_c:mt}));if(m&&!y)if(Lt(m)){const S=m(_,P);w({data:S,error:mt,_c:mt})}else w({data:_,error:mt,_c:mt});if(j[g][1]=Xn(),Promise.resolve(N()).then(()=>{w({_c:mt})}),y){if(u)throw C;return}return _}}const ci=(e,a)=>{for(const s in e)e[s][0]&&e[s][0](a)},R1=(e,a)=>{if(!zt.has(e)){const s=ga(N1,a),r=Object.create(null),i=No.bind(mt,e);let l=Qt;const m=Object.create(null),d=(u,h)=>{const f=m[u]||[];return m[u]=f,f.push(h),()=>f.splice(f.indexOf(h),1)},c=(u,h,f)=>{e.set(u,h);const g=m[u];if(g)for(const x of g)x(h,f)},p=()=>{if(!zt.has(e)&&(zt.set(e,[r,Object.create(null),Object.create(null),Object.create(null),i,c,d]),!Ga)){const u=s.initFocus(setTimeout.bind(mt,ci.bind(mt,r,jo))),h=s.initReconnect(setTimeout.bind(mt,ci.bind(mt,r,_o)));l=()=>{u&&u(),h&&h(),zt.delete(e)}}};return p(),[e,i,p,l]}return[e,zt.get(e)[4]]},L1=(e,a,s,r,i)=>{const l=s.errorRetryCount,m=i.retryCount,d=~~((Math.random()+.5)*(1<<(m<8?m:8)))*s.errorRetryInterval;!Ce(l)&&m>l||setTimeout(r,d,i)},P1=Bn,[vr,Wa]=R1(new Map),$1=ga({onLoadingSlow:Qt,onSuccess:Qt,onError:Qt,onErrorRetry:L1,onDiscarded:Qt,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:li?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:li?5e3:3e3,compare:P1,isPaused:()=>!1,cache:vr,mutate:Wa,fallback:{}},C1),O1=(e,a)=>{const s=ga(e,a);if(a){const{use:r,fallback:i}=e,{use:l,fallback:m}=a;r&&l&&(s.use=r.concat(l)),i&&m&&(s.fallback=ga(i,m))}return s},Z1=o.createContext({}),So="$inf$",Eo=gs&&window.__SWR_DEVTOOLS_USE__,H1=Eo?window.__SWR_DEVTOOLS_USE__:[],F1=()=>{Eo&&(window.__SWR_DEVTOOLS_REACT__=o)},Ao=e=>Lt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Mo=()=>{const e=o.useContext(Z1);return o.useMemo(()=>ga($1,e),[e])},T1=e=>(a,s,r)=>e(a,s&&((...l)=>{const[m]=ps(a),[,,,d]=zt.get(vr);if(m.startsWith(So))return s(...l);const c=d[m];return Ce(c)?s(...l):(delete d[m],c)}),r),I1=H1.concat(T1),V1=e=>function(...s){const r=Mo(),[i,l,m]=Ao(s),d=O1(r,m);let c=e;const{use:p}=d,u=(p||[]).concat(I1);for(let h=u.length;h--;)c=u[h](c);return c(i,l||d.fetcher||null,d)},z1=(e,a,s)=>{const r=a[e]||(a[e]=[]);return r.push(s),()=>{const i=r.indexOf(s);i>=0&&(r[i]=r[r.length-1],r.pop())}},D1=(e,a)=>(...s)=>{const[r,i,l]=Ao(s),m=(l.use||[]).concat(a);return e(r,i,{...l,use:m})};F1();const yn=o.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(a=>{e.status="fulfilled",e.value=a},a=>{e.status="rejected",e.reason=a}),e}}),jn={dedupe:!0},di=Promise.resolve(mt),U1=()=>Qt,W1=(e,a,s)=>{const{cache:r,compare:i,suspense:l,fallbackData:m,revalidateOnMount:d,revalidateIfStale:c,refreshInterval:p,refreshWhenHidden:u,refreshWhenOffline:h,keepPreviousData:f,strictServerPrefetchWarning:g}=s,[x,w,b,j]=zt.get(r),[v,k]=ps(e),N=o.useRef(!1),_=o.useRef(!1),C=o.useRef(v),y=o.useRef(a),E=o.useRef(s),A=()=>E.current,H=()=>A().isVisible()&&A().isOnline(),[M,T,P,S]=pa(r,v),$=o.useRef({}).current,Z=Ce(m)?Ce(s.fallback)?mt:s.fallback[v]:m,R=(ce,B)=>{for(const q in $){const X=q;if(X==="data"){if(!i(ce[X],B[X])&&(!Ce(ce[X])||!i(de,B[X])))return!1}else if(B[X]!==ce[X])return!1}return!0},L=!N.current,O=o.useMemo(()=>{const ce=M(),B=S(),q=z=>{const D=ga(z);return delete D._k,(()=>{if(!v||!a||A().isPaused())return!1;if(L&&!Ce(d))return d;const ge=Ce(Z)?D.data:Z;return Ce(ge)||c})()?{isValidating:!0,isLoading:!0,...D}:D},X=q(ce),oe=ce===B?X:q(B);let Ee=X;return[()=>{const z=q(M());return R(z,Ee)?(Ee.data=z.data,Ee.isLoading=z.isLoading,Ee.isValidating=z.isValidating,Ee.error=z.error,Ee):(Ee=z,z)},()=>oe]},[r,v]),F=Wn.useSyncExternalStore(o.useCallback(ce=>P(v,(B,q)=>{R(q,B)||ce()}),[r,v]),O[0],O[1]),W=x[v]&&x[v].length>0,U=F.data,V=Ce(U)?Z&&Co(Z)?yn(Z):Z:U,G=F.error,Y=o.useRef(V),de=f?Ce(U)?Ce(Y.current)?V:Y.current:U:V,fe=v&&Ce(V),ne=o.useRef(null);!Ga&&Wn.useSyncExternalStore(U1,()=>(ne.current=!1,ne),()=>(ne.current=!0,ne));const ae=ne.current;g&&ae&&!l&&fe&&console.warn(`Missing pre-initiated data for serialized key "${v}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const re=!v||!a||A().isPaused()||W&&!Ce(G)?!1:L&&!Ce(d)?d:l?Ce(V)?!1:c:Ce(V)||c,Le=L&&re,K=Ce(F.isValidating)?Le:F.isValidating,at=Ce(F.isLoading)?Le:F.isLoading,ze=o.useCallback(async ce=>{const B=y.current;if(!v||!B||_.current||A().isPaused())return!1;let q,X,oe=!0;const Ee=ce||{},z=!b[v]||!Ee.dedupe,D=()=>oi?!_.current&&v===C.current&&N.current:v===C.current,we={isValidating:!1,isLoading:!1},ge=()=>{T(we)},xe=()=>{const Qe=b[v];Qe&&Qe[1]===X&&delete b[v]},lt={isValidating:!0};Ce(M().data)&&(lt.isLoading=!0);try{if(z&&(T(lt),s.loadingTimeout&&Ce(M().data)&&setTimeout(()=>{oe&&D()&&A().onLoadingSlow(v,s)},s.loadingTimeout),b[v]=[B(k),Xn()]),[q,X]=b[v],q=await q,z&&setTimeout(xe,s.dedupingInterval),!b[v]||b[v][1]!==X)return z&&D()&&A().onDiscarded(v),!1;we.error=mt;const Qe=w[v];if(!Ce(Qe)&&(X<=Qe[0]||X<=Qe[1]||Qe[1]===0))return ge(),z&&D()&&A().onDiscarded(v),!1;const Q=M().data;we.data=i(Q,q)?Q:q,z&&D()&&A().onSuccess(q,v,s)}catch(Qe){xe();const Q=A(),{shouldRetryOnError:le}=Q;Q.isPaused()||(we.error=Qe,z&&D()&&(Q.onError(Qe,v,Q),(le===!0||Lt(le)&&le(Qe))&&(!A().revalidateOnFocus||!A().revalidateOnReconnect||H())&&Q.onErrorRetry(Qe,v,Q,me=>{const Te=x[v];Te&&Te[0]&&Te[0](ri,me)},{retryCount:(Ee.retryCount||0)+1,dedupe:!0})))}return oe=!1,ge(),!0},[v,r]),We=o.useCallback((...ce)=>No(r,C.current,...ce),[]);if(Vs(()=>{y.current=a,E.current=s,Ce(U)||(Y.current=U)}),Vs(()=>{if(!v)return;const ce=ze.bind(mt,jn);let B=0;A().revalidateOnFocus&&(B=Date.now()+A().focusThrottleInterval);const X=z1(v,x,(oe,Ee={})=>{if(oe==jo){const z=Date.now();A().revalidateOnFocus&&z>B&&H()&&(B=z+A().focusThrottleInterval,ce())}else if(oe==_o)A().revalidateOnReconnect&&H()&&ce();else{if(oe==ko)return ze();if(oe==ri)return ze(Ee)}});return _.current=!1,C.current=v,N.current=!0,T({_k:k}),re&&(b[v]||(Ce(V)||Ga?ce():S1(ce))),()=>{_.current=!0,X()}},[v]),Vs(()=>{let ce;function B(){const X=Lt(p)?p(M().data):p;X&&ce!==-1&&(ce=setTimeout(q,X))}function q(){!M().error&&(u||A().isVisible())&&(h||A().isOnline())?ze(jn).then(B):B()}return B(),()=>{ce&&(clearTimeout(ce),ce=-1)}},[p,u,h,v]),o.useDebugValue(de),l){if(!oi&&Ga&&fe)throw new Error("Fallback data is required when using Suspense in SSR.");fe&&(y.current=a,E.current=s,_.current=!1);const ce=j[v],B=!Ce(ce)&&fe?We(ce):di;if(yn(B),!Ce(G)&&fe)throw G;const q=fe?ze(jn):di;!Ce(de)&&fe&&(q.status="fulfilled",q.value=!0),yn(q)}return{mutate:We,get data(){return $.data=!0,de},get error(){return $.error=!0,G},get isValidating(){return $.isValidating=!0,K},get isLoading(){return $.isLoading=!0,at}}},Se=V1(W1),kt=()=>{const{adapter:e,deployment:a}=_e(),s=e.useNavigate(),r=(c,p)=>{s?s(c,p):window.location.href=c},i=c=>{if(c)return c;const u=new URLSearchParams(window.location.search).get("redirect_uri");return u||window.location.href};return{navigate:r,navigateToSignIn:c=>{if(!a)return;const p=i(c),u=new URLSearchParams;u.set("redirect_uri",p),(a==null?void 0:a.mode)==="staging"&&u.set("__dev_session__",xt(a.backend_host)??""),r(`${a.ui_settings.sign_in_page_url}?${u.toString()}`,{replace:!0})},navigateToAccountSelection:c=>{if(!a)return;const p=i(c),u=new URLSearchParams;u.set("redirect_uri",p),(a==null?void 0:a.mode)==="staging"&&u.set("__dev_session__",xt(a.backend_host)??""),r(`https://${a.frontend_host}?${u.toString()}`,{replace:!0})},navigateToSignUp:c=>{if(!a)return;const p=i(c),u=new URLSearchParams;u.set("redirect_uri",p),(a==null?void 0:a.mode)==="staging"&&u.set("__dev_session__",xt(a.backend_host)??""),r(`${a.ui_settings.sign_up_page_url}?${u.toString()}`,{replace:!0})}}};async function B1(e){const a=await e("/session",{method:"GET"});return(await I(a)).data}async function G1(e,a){const s=await e(`/session/switch-sign-in?sign_in_id=${a}`,{method:"POST"});return I(s)}async function q1(e,a){const s=a?`/session/sign-out?sign_in_id=${a}`:"/session/sign-out",r=await e(s,{method:"POST"});return I(r)}async function K1(e,a){const s=await e(`/session/switch-organization${a?`?organization_id=${a}`:""}`,{method:"POST"});return I(s)}async function Y1(e,a){const s=await e(`/session/switch-workspace?workspace_id=${a}`,{method:"POST"});return I(s)}async function Q1(e,a){const s=await e(`/session/ticket/exchange?ticket=${encodeURIComponent(a)}`,{method:"GET"});return I(s)}const er=new Map,is=new Map;function Pt(){er.clear(),is.clear()}async function J1(e,a){const s=await e(`/session/token${a?`?template=${a}`:""}`);return I(s)}function ot(){const{client:e,loading:a}=je(),{deployment:s}=_e(),{navigate:r}=kt(),{cache:i}=Mo(),{data:l,error:m,mutate:d,isLoading:c}=Se(a?null:"/session",()=>B1(e),{refreshInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1,dedupingInterval:5e3}),p=o.useCallback(async()=>{await d(void 0,{revalidate:!0})},[d]),u=o.useCallback(async(h="default")=>{if(!l)throw new Error("no session");const f=er.get(h);if(f&&f.expires>Date.now())return(f==null?void 0:f.token)||"";is.get(h)||is.set(h,J1(e,h));const g=await is.get(h);return is.delete(h),er.set(h,g.data),g.data.token},[e,l==null?void 0:l.active_signin]);return a||!l||c?{loading:!0,error:m,session:null,switchSignIn:null,switchOrganization:null,switchWorkspace:null,exchangeTicket:null,signOut:null,getToken:null,refetch:p}:{loading:c,error:m,session:l,switchSignIn:async h=>{await G1(e,h),Pt(),await Wa("/me/organization-memberships",void 0,{revalidate:!1}),await Wa("/me/workspace-memberships",void 0,{revalidate:!1}),await d(void 0,{revalidate:!0}),await Wa("/me/organization-memberships"),await Wa("/me/workspace-memberships")},signOut:async h=>{await q1(e,h);const f=["/session","/user","/me/signins","/me/organization-memberships","/me/workspace-memberships","wacht-notifications:scope-unread"],g=["wacht-notifications:","wacht-agent-sessions:","wacht-agent-contexts:","wacht-org-domains:","wacht-api-workspaces:","wacht-api-organizations:"];if(i instanceof Map){const x=Array.from(i.keys());for(const w of x){let b=!1;(f.includes(w)||typeof w=="string"&&g.some(j=>w.startsWith(j)))&&(b=!0),b&&i.delete(w)}}Pt(),await d(void 0,{revalidate:!0}),s!=null&&s.ui_settings&&(h&&s.ui_settings.after_sign_out_one_page_url?r(s.ui_settings.after_sign_out_one_page_url):!h&&s.ui_settings.after_sign_out_all_page_url&&r(s.ui_settings.after_sign_out_all_page_url))},switchOrganization:async h=>{await K1(e,h),Pt(),await d(void 0,{revalidate:!0})},switchWorkspace:async h=>{await Y1(e,h),Pt(),await d(void 0,{revalidate:!0})},exchangeTicket:async h=>{await Q1(e,h),Pt(),await d(void 0,{revalidate:!0})},getToken:u,refetch:p}}const Dt=()=>{const{organizationMemberships:e,refetch:a,loading:s}=va(),{client:r}=je(),{refetch:i}=ot(),l=o.useCallback(async L=>(await I(await r(`/organizations/${L.id}/roles`,{method:"GET"}))).data,[r]),m=o.useCallback(async(L,O)=>{const F=new URLSearchParams;return O&&(F.set("page",O.page.toString()),F.set("limit",O.limit.toString()),O.search&&F.set("search",O.search)),(await I(await r(`/organizations/${L.id}/members?${F.toString()}`,{method:"GET"}))).data},[r]),d=o.useCallback(async L=>(await I(await r(`/organizations/${L.id}/invitations`,{method:"GET"}))).data,[r]),c=o.useCallback(async L=>(await I(await r(`/organizations/${L.id}/domains`,{method:"GET"}))).data,[r]),p=o.useCallback(async(L,O)=>{await r(`/organizations/${L.id}/members/${O.id}/remove`,{method:"POST"})},[r]),u=o.useCallback(async L=>{const O=new FormData;O.append("name",L.name),L.image&&O.append("image",L.image),L.description&&O.append("description",L.description);const F=await I(await r("/organizations",{method:"POST",body:O}));return Pt(),await a(),await i(),F},[i,a,r]),h=o.useCallback(async(L,O)=>{const F=Object.entries(O).reduce((U,[V,G])=>(G!=null&&(Array.isArray(G)?G.forEach(Y=>U.append(V,Y)):U.append(V,G)),U),new FormData),W=await I(await r(`/organizations/${L.id}/update`,{method:"POST",body:F}));return await a(),W},[a,r]),f=o.useCallback(async(L,O)=>{await r(`/organizations/${L.id}/roles/${O.id}/remove`,{method:"POST"})},[r]),g=o.useCallback(async(L,O)=>{const F=new FormData;return F.append("domain",O.fqdn),await I(await r(`/organizations/${L.id}/domains`,{method:"POST",body:F}))},[r]),x=o.useCallback(async(L,O)=>await I(await r(`/organizations/${L.id}/domains/${O.id}/verify`,{method:"POST"})),[r]),w=o.useCallback(async(L,O)=>await I(await r(`/organizations/${L.id}/domains/${O.id}/delete`,{method:"POST"})),[r]),b=o.useCallback(async L=>(await I(await r(`/organizations/${L.id}/enterprise-connections`,{method:"GET"}))).data,[r]),j=o.useCallback(async(L,O)=>{const F=new FormData;return F.append("protocol",O.protocol),O.domain_id&&F.append("domain_id",O.domain_id),O.idp_entity_id&&F.append("idp_entity_id",O.idp_entity_id),O.idp_sso_url&&F.append("idp_sso_url",O.idp_sso_url),O.idp_certificate&&F.append("idp_certificate",O.idp_certificate),O.oidc_client_id&&F.append("oidc_client_id",O.oidc_client_id),O.oidc_client_secret&&F.append("oidc_client_secret",O.oidc_client_secret),O.oidc_issuer_url&&F.append("oidc_issuer_url",O.oidc_issuer_url),O.oidc_scopes&&F.append("oidc_scopes",O.oidc_scopes),O.jit_enabled!==void 0&&F.append("jit_enabled",String(O.jit_enabled)),O.attribute_mapping&&F.append("attribute_mapping",JSON.stringify(O.attribute_mapping)),(await I(await r(`/organizations/${L.id}/enterprise-connections`,{method:"POST",body:F}))).data},[r]),v=o.useCallback(async(L,O,F)=>{const W=new FormData;return F.domain_id&&W.append("domain_id",F.domain_id),F.idp_entity_id&&W.append("idp_entity_id",F.idp_entity_id),F.idp_sso_url&&W.append("idp_sso_url",F.idp_sso_url),F.idp_certificate&&W.append("idp_certificate",F.idp_certificate),F.oidc_client_id&&W.append("oidc_client_id",F.oidc_client_id),F.oidc_client_secret&&W.append("oidc_client_secret",F.oidc_client_secret),F.oidc_issuer_url&&W.append("oidc_issuer_url",F.oidc_issuer_url),F.oidc_scopes&&W.append("oidc_scopes",F.oidc_scopes),F.attribute_mapping&&W.append("attribute_mapping",JSON.stringify(F.attribute_mapping)),(await I(await r(`/organizations/${L.id}/enterprise-connections/${O}/update`,{method:"POST",body:W}))).data},[r]),k=o.useCallback(async(L,O)=>{await r(`/organizations/${L.id}/enterprise-connections/${O}/delete`,{method:"POST"})},[r]),N=o.useCallback(async(L,O)=>{const F=new FormData;return F.append("protocol",O.protocol),O.idp_entity_id&&F.append("idp_entity_id",O.idp_entity_id),O.idp_sso_url&&F.append("idp_sso_url",O.idp_sso_url),O.idp_certificate&&F.append("idp_certificate",O.idp_certificate),O.oidc_issuer_url&&F.append("oidc_issuer_url",O.oidc_issuer_url),O.oidc_client_id&&F.append("oidc_client_id",O.oidc_client_id),O.oidc_client_secret&&F.append("oidc_client_secret",O.oidc_client_secret),(await I(await r(`/organizations/${L.id}/enterprise-connections/test`,{method:"POST",body:F}))).data},[r]),_=o.useCallback(async(L,O)=>(await I(await r(`/organizations/${L.id}/enterprise-connections/${O}/test`,{method:"POST"}))).data,[r]),C=o.useCallback(async(L,O)=>(await I(await r(`/organizations/${L.id}/enterprise-connections/${O}/scim/token`,{method:"POST"}))).data,[r]),y=o.useCallback(async(L,O)=>(await I(await r(`/organizations/${L.id}/enterprise-connections/${O}/scim/token`,{method:"GET"}))).data,[r]),E=o.useCallback(async(L,O)=>{await r(`/organizations/${L.id}/enterprise-connections/${O}/scim/token/revoke`,{method:"POST"})},[r]),A=o.useCallback(async(L,O)=>{const F=new FormData;return F.append("name",O.name),O.permissions&&O.permissions.forEach((U,V)=>{F.append(`permissions[${V}]`,U)}),await I(await r(`/organizations/${L.id}/roles`,{method:"POST",body:F}))},[r]),H=o.useCallback(async L=>(await I(await r(`/organizations/${L.id}/leave`,{method:"POST"}))).data,[r]),M=o.useCallback(async L=>{const O=await I(await r(`/organizations/${L.id}/delete`,{method:"POST"}));return Pt(),await a(),await i(),O.data},[r,a,i]),T=o.useCallback(async(L,O,F)=>(await I(await r(`/organizations/${L.id}/members/${O.id}/roles/${F.id}/add`,{method:"POST"}))).data,[r]),P=o.useCallback(async(L,O,F)=>(await I(await r(`/organizations/${L.id}/members/${O.id}/roles/${F.id}/remove`,{method:"POST"}))).data,[r]),S=o.useCallback(async(L,O)=>{var U,V;const F=new FormData;return F.append("email",O.email),F.append("role_id",O.organizationRole.id),(U=O.workspace)!=null&&U.id&&F.append("workspace_id",O.workspace.id),(V=O.workspaceRole)!=null&&V.id&&F.append("workspace_role_id",O.workspaceRole.id),(await I(await r(`/organizations/${L.id}/invitations`,{method:"POST",body:F}))).data},[r]),$=o.useCallback(async(L,O)=>(await I(await r(`/organizations/${L.id}/invitations/${O.id}/discard`,{method:"POST"}))).data,[r]),Z=o.useCallback(async(L,O)=>(await I(await r(`/organizations/${L.id}/invitations/${O.id}/resend`,{method:"POST"}))).data,[r]);return{organizations:o.useMemo(()=>e==null?void 0:e.map(L=>L.organization),[e]),loading:s,error:null,refetch:a,leaveOrganization:H,getOrganizationRoles:l,getOrganizationMembers:m,removeOrganizationMember:p,createOrganization:u,getOrganizationInvitations:d,getOrganizationDomains:c,addOrganizationDomain:g,verifyOrganizationDomain:x,removeOrganizationDomain:w,addRoleToOrganizationMember:T,removeRoleFromOrganizationMember:P,inviteOrganizationMember:S,discardOrganizationInvitation:$,resendOrganizationInvitation:Z,updateOrganization:h,addRole:A,removeOrganizationRoles:f,deleteOrganization:M,getEnterpriseConnections:b,createEnterpriseConnection:j,updateEnterpriseConnection:v,deleteEnterpriseConnection:k,testEnterpriseConnectionConfig:N,testEnterpriseConnection:_,generateSCIMToken:C,getSCIMToken:y,revokeSCIMToken:E}},xa=()=>{const{loading:e,error:a,refetch:s,getOrganizationMembers:r,getOrganizationRoles:i,leaveOrganization:l,removeOrganizationMember:m,getOrganizationInvitations:d,getOrganizationDomains:c,removeOrganizationDomain:p,addOrganizationDomain:u,verifyOrganizationDomain:h,addRoleToOrganizationMember:f,removeRoleFromOrganizationMember:g,inviteOrganizationMember:x,discardOrganizationInvitation:w,resendOrganizationInvitation:b,updateOrganization:j,removeOrganizationRoles:v,getEnterpriseConnections:k,createEnterpriseConnection:N,updateEnterpriseConnection:_,deleteEnterpriseConnection:C,testEnterpriseConnectionConfig:y,testEnterpriseConnection:E,generateSCIMToken:A,getSCIMToken:H,revokeSCIMToken:M}=Dt(),{session:T,error:P,loading:S}=ot(),{organizationMemberships:$}=va(),Z=o.useMemo(()=>($==null?void 0:$.find(z=>{var D;return z.id===((D=T==null?void 0:T.active_signin)==null?void 0:D.active_organization_membership_id)}))||null,[$,T]),R=o.useMemo(()=>(Z==null?void 0:Z.organization)||null,[Z]),L=o.useCallback(async z=>R?await j(R,z):[],[R,j]),O=o.useCallback(async()=>R?await r(R):[],[R,r]),F=o.useCallback(async()=>R?await i(R):[],[R,i]),W=o.useCallback(async z=>R?await m(R,z):[],[R,m]),U=o.useCallback(async z=>R?await v(R,z):void 0,[R,v]),V=o.useCallback(async()=>R?await c(R):[],[R,c]),G=o.useCallback(async z=>R?await u(R,z):void 0,[R,u]),Y=o.useCallback(async z=>R?await h(R,z):void 0,[R,h]),de=o.useCallback(async z=>R?await p(R,z):void 0,[R,p]),fe=o.useCallback(async(z,D)=>R?await f(R,z,D):void 0,[R,f]),ne=o.useCallback(async(z,D)=>R?await g(R,z,D):void 0,[R,g]),ae=o.useCallback(async z=>R?await x(R,z):void 0,[R,x]),re=o.useCallback(async z=>R?await w(R,z):void 0,[R,w]),Le=o.useCallback(async z=>R?await b(R,z):void 0,[R,b]),K=o.useCallback(async()=>{R&&await l(R)},[R,l]),at=o.useCallback(async()=>R?await d(R):[],[R,d]),ze=o.useCallback(async()=>R?await k(R):[],[R,k]),We=o.useCallback(async z=>{if(R)return await N(R,z)},[R,N]),Re=o.useCallback(async(z,D)=>{if(R)return await _(R,z,D)},[R,_]),ce=o.useCallback(async z=>{R&&await C(R,z)},[R,C]),B=o.useCallback(async z=>R?await y(R,z):null,[R,y]),q=o.useCallback(async z=>R?await E(R,z):null,[R,E]),X=o.useCallback(async z=>{if(R)return await A(R,z)},[R,A]),oe=o.useCallback(async z=>{if(R)return await H(R,z)},[R,H]),Ee=o.useCallback(async z=>{R&&await M(R,z)},[R,M]);return S||e?{activeOrganization:null,activeMembership:null,loading:!0,error:P||a,updateOrganization:null,getRoles:null,getMembers:null,getDomains:null,addDomain:null,verifyDomain:null,removeDomain:null,removeRole:null,getInvitations:null,removeMember:null,addMemberRole:null,removeMemberRole:null,inviteMember:null,discardInvitation:null,resendInvitation:null,leave:null,getEnterpriseConnections:null,createEnterpriseConnection:null,updateEnterpriseConnection:null,deleteEnterpriseConnection:null,generateSCIMToken:null,getSCIMToken:null,revokeSCIMToken:null}:{activeOrganization:R,activeMembership:Z,loading:!1,refetch:s,getRoles:F,updateOrganization:L,getMembers:O,getDomains:V,addDomain:G,verifyDomain:Y,removeDomain:de,getInvitations:at,removeMember:W,leave:K,removeRole:U,addMemberRole:fe,removeMemberRole:ne,inviteMember:ae,discardInvitation:re,resendInvitation:Le,getEnterpriseConnections:ze,createEnterpriseConnection:We,updateEnterpriseConnection:Re,deleteEnterpriseConnection:ce,testEnterpriseConnectionConfig:B,testEnterpriseConnection:q,generateSCIMToken:X,getSCIMToken:oe,revokeSCIMToken:Ee,error:null}};async function X1(e){return(await I(await e("/me/organization-memberships"))).data}const va=()=>{const{client:e,loading:a}=je(),{data:s,isLoading:r,error:i,mutate:l}=Se(a?null:"/me/organization-memberships",()=>X1(e),{refreshInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1,dedupingInterval:5e3}),m=o.useCallback(async()=>{await l()},[l]);return{organizationMemberships:s,loading:a||r,error:i,refetch:m}};async function ed(e){return(await I(await e("/me/workspace-memberships"))).data}async function td(e,a){return(await I(await e(`/workspaces/${a}/leave`,{method:"POST"}))).data}const an=()=>{const{client:e,loading:a}=je(),{deployment:s}=_e(),{data:r,isLoading:i,error:l,mutate:m}=Se(!a&&(s!=null&&s.b2b_settings.workspaces_enabled)?"/me/workspace-memberships":null,()=>ed(e),{refreshInterval:3e4,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1,dedupingInterval:5e3}),d=o.useCallback(async()=>{await m(void 0,{revalidate:!0})},[m]);return{workspaceMemberships:r,loading:a||i,error:l,refetch:d}},ba=()=>{const{workspaceMemberships:e,refetch:a,loading:s,error:r}=an(),{client:i}=je(),{refetch:l}=ot(),m=o.useMemo(()=>e==null?void 0:e.map(C=>({...C.workspace,organization:C.organization,eligibility_restriction:C.eligibility_restriction})),[e]),d=o.useCallback(async(C,y,E,A)=>{const H=new FormData;H.append("name",y),E&&H.append("image",E),A&&H.append("description",A),H.append("organization_id",C);const M=await I(await i("/workspaces",{method:"POST",body:H}));return Pt(),await a(),M.data},[i,a]),c=o.useCallback(async C=>{const y=await td(i,C);return Pt(),await a(),await l(),y},[i,a,l]),p=o.useCallback(async(C,y)=>{const E=new FormData;y.name&&E.append("name",y.name),y.description&&E.append("description",y.description),y.image&&E.append("image",y.image),y.enforce_2fa!==void 0&&E.append("enforce_2fa",String(y.enforce_2fa)),y.enable_ip_restriction!==void 0&&E.append("enable_ip_restriction",String(y.enable_ip_restriction)),y.whitelisted_ips&&y.whitelisted_ips.forEach(H=>E.append("whitelisted_ips",H));const A=await I(await i(`/workspaces/${C.id}/update`,{method:"POST",body:E}));return await a(),A.data},[i,a]),u=o.useCallback(async C=>{const y=await I(await i(`/workspaces/${C.id}/delete`,{method:"POST"}));return Pt(),await a(),y.data},[i,a]),h=o.useCallback(async(C,y)=>{const E=new URLSearchParams;return y&&(E.set("page",y.page.toString()),E.set("limit",y.limit.toString()),y.search&&E.set("search",y.search)),(await I(await i(`/workspaces/${C.id}/members?${E.toString()}`,{method:"GET"}))).data},[i]),f=o.useCallback(async C=>(await I(await i(`/workspaces/${C.id}/roles`,{method:"GET"}))).data,[i]),g=o.useCallback(async(C,y,E)=>{const A=new FormData;return A.append("name",y),E.forEach(M=>A.append("permissions",M)),(await I(await i(`/workspaces/${C.id}/roles`,{method:"POST",body:A}))).data},[i]),x=o.useCallback(async(C,y)=>(await I(await i(`/workspaces/${C.id}/roles/${y.id}/delete`,{method:"POST"}))).data,[i]),w=o.useCallback(async(C,y)=>{const E=await I(await i(`/workspaces/${C.id}/members/${y}/remove`,{method:"POST"}));return await a(),E.data},[i,a]),b=o.useCallback(async(C,y,E)=>(await I(await i(`/workspaces/${C.id}/members/${y}/roles/${E}/add`,{method:"POST"}))).data,[i]),j=o.useCallback(async(C,y,E)=>(await I(await i(`/workspaces/${C.id}/members/${y}/roles/${E}/remove`,{method:"POST"}))).data,[i]),v=o.useCallback(async C=>(await I(await i(`/organizations/${C.organization.id}/invitations?workspace_id=${C.id}`,{method:"GET"}))).data,[i]),k=o.useCallback(async(C,y,E)=>{const A=new FormData;return A.append("email",y),A.append("workspace_id",C.id),E&&A.append("workspace_role_id",E),(await I(await i(`/organizations/${C.organization.id}/invitations`,{method:"POST",body:A}))).data},[i]),N=o.useCallback(async(C,y)=>(await I(await i(`/organizations/${C.organization.id}/invitations/${y}/discard`,{method:"POST"}))).data,[i]),_=o.useCallback(async(C,y)=>(await I(await i(`/organizations/${C.organization.id}/invitations/${y}/resend`,{method:"POST"}))).data,[i]);return{workspaces:m||[],loading:s,error:r,refetch:a,leaveWorkspace:c,createWorkspace:d,updateWorkspace:p,deleteWorkspace:u,getWorkspaceMembers:h,getWorkspaceRoles:f,createWorkspaceRole:g,deleteWorkspaceRole:x,removeWorkspaceMember:w,addWorkspaceMemberRole:b,removeWorkspaceMemberRole:j,getWorkspaceInvitations:v,createWorkspaceInvitation:k,discardWorkspaceInvitation:N,resendWorkspaceInvitation:_}},Ut=()=>{const{refetch:e,loading:a,error:s,workspaces:r,leaveWorkspace:i,updateWorkspace:l,deleteWorkspace:m,getWorkspaceMembers:d,getWorkspaceRoles:c,createWorkspaceRole:p,deleteWorkspaceRole:u,removeWorkspaceMember:h,addWorkspaceMemberRole:f,removeWorkspaceMemberRole:g,getWorkspaceInvitations:x,createWorkspaceInvitation:w,discardWorkspaceInvitation:b,resendWorkspaceInvitation:j}=ba(),{workspaceMemberships:v}=an(),{session:k,loading:N,error:_}=ot(),C=o.useMemo(()=>(v==null?void 0:v.find(Y=>{var de;return Y.id===((de=k==null?void 0:k.active_signin)==null?void 0:de.active_workspace_membership_id)}))||null,[v,k]),y=o.useMemo(()=>(C==null?void 0:C.workspace)||null,[C]),E=o.useCallback(async()=>{if(y)return await i(y.id)},[y,i]),A=o.useCallback(async Y=>{if(y)return await l(y,Y)},[y,l]),H=o.useCallback(async()=>{if(y)return await m(y)},[y,m]),M=o.useCallback(async Y=>y?await d(y,Y):{data:[],meta:{total:0,page:1,limit:10}},[y,d]),T=o.useCallback(async()=>y?await c(y):[],[y,c]),P=o.useCallback(async(Y,de)=>{if(y)return await p(y,Y,de)},[y,p]),S=o.useCallback(async Y=>{if(y)return await u(y,Y)},[y,u]),$=o.useCallback(async Y=>{if(y)return await h(y,Y)},[y,h]),Z=o.useCallback(async(Y,de)=>{if(y)return await f(y,Y,de)},[y,f]),R=o.useCallback(async(Y,de)=>{if(y)return await g(y,Y,de)},[y,g]),L=o.useMemo(()=>(r==null?void 0:r.find(Y=>Y.id===(y==null?void 0:y.id)))||null,[r,y]),O=o.useCallback(async()=>L?await x(L):[],[L,x]),F=o.useCallback(async Y=>{if(L)return await w(L,Y.email,Y.workspaceRoleId)},[L,w]),W=o.useCallback(async Y=>{if(L)return await b(L,Y)},[L,b]),U=o.useCallback(async Y=>{if(L)return await j(L,Y)},[L,j]),V=a||N,G=s||_;return V?{activeWorkspace:null,activeMembership:null,loading:!0,error:G,refetch:e,leave:null,updateWorkspace:null,deleteWorkspace:null,getMembers:null,getRoles:null,createRole:null,deleteRole:null,inviteMember:null,removeMember:null,addMemberRole:null,removeMemberRole:null,getInvitations:null,discardInvitation:null,resendInvitation:null}:{activeWorkspace:y,activeMembership:C,loading:!1,error:G,refetch:e,leave:E,updateWorkspace:A,deleteWorkspace:H,getMembers:M,getRoles:T,createRole:P,deleteRole:S,inviteMember:F,removeMember:$,addMemberRole:Z,removeMemberRole:R,getInvitations:O,discardInvitation:W,resendInvitation:U}};function _n(e){const a=new Uint8Array(e);let s="";for(let r=0;r<a.length;r++)s+=String.fromCharCode(a[r]);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function kn(e){const a=e.replace(/-/g,"+").replace(/_/g,"/"),s=a.padEnd(a.length+(4-a.length%4)%4,"="),r=atob(s),i=new Uint8Array(r.length);for(let l=0;l<r.length;l++)i[l]=r.charCodeAt(l);return i.buffer}const ad=async e=>(await I(await e("/me"))).data,sd=async e=>(await I(await e("/me/signins"))).data;function ya(){const{client:e,loading:a}=je(),{data:s,error:r,isLoading:i,mutate:l}=Se(a?null:"/user",()=>ad(e)),m=async L=>{const O=new FormData;for(const[W,U]of Object.entries(L))U!=null&&U!==""&&O.append(W,String(U));const F=await I(await e("/me",{method:"POST",body:O}));return l(),F},d=async()=>await I(await e("/me/email-addresses",{method:"GET"})),c=async L=>await I(await e(`/me/email-addresses/${L}`,{method:"GET"})),p=async L=>{const O=new FormData;return O.append("email",L),await I(await e("/me/email-addresses",{method:"POST",body:O}))},u=async L=>await I(await e(`/me/email-addresses/${L}/delete`,{method:"POST"})),h=async L=>await I(await e(`/me/email-addresses/${L}/prepare-verification`,{method:"POST"})),f=async(L,O)=>await I(await e(`/me/email-addresses/${L}/attempt-verification?code=${O}`,{method:"POST"})),g=async(L,O)=>{const F=new FormData;return F.append("phone_number",L),F.append("country_code",O),await I(await e("/me/phone-numbers",{method:"POST",body:F}))},x=async L=>await I(await e(`/me/phone-numbers/${L}/delete`,{method:"POST"})),w=async L=>await I(await e(`/me/phone-numbers/${L}/prepare-verification`,{method:"POST"})),b=async(L,O)=>{const F=new FormData;return F.append("code",O),await I(await e(`/me/phone-numbers/${L}/attempt-verification`,{method:"POST",body:F}))},j=async L=>{const O=await I(await e(`/me/phone-numbers/${L}/make-primary`,{method:"POST"}));return l(),O},v=async L=>await I(await e(`/me/email-addresses/${L}/make-primary`,{method:"POST"})),k=async()=>(await I(await e("/me/authenticator",{method:"POST"}))).data,N=async(L,O)=>{const F=new FormData;return F.append("authenticator_id",L),O.forEach(U=>{F.append("codes",U)}),await I(await e("/me/authenticator/attempt-verification",{method:"POST",body:F}))},_=async L=>await I(await e(`/me/authenticator/${L}/delete`,{method:"POST"})),C=async()=>(await I(await e("/me/backup-codes",{method:"POST"}))).data,y=async L=>{const O=new FormData;return O.append("file",L),await I(await e("/me/profile-picture",{method:"POST",body:O}))},E=async()=>(await I(await e("/me/backup-codes/regenerate",{method:"POST"}))).data,A=async(L,O)=>{const F=new FormData;return F.append("current_password",L),F.append("new_password",O),await I(await e("/me/update-password",{method:"POST",body:F}))},H=async L=>{const O=new FormData;O.append("current_password",L);const F=await I(await e("/me/remove-password",{method:"POST",body:O}));return l(),F},M=async L=>{const O=new FormData;return O.append("password",L),await I(await e("/me/account/delete",{method:"POST",body:O}))},T=async L=>await I(await e(`/me/social-connections/${L}/disconnect`,{method:"POST"})),P=async({provider:L,redirectUri:O})=>{var U;const F=new URLSearchParams({provider:L});O&&F.append("redirect_uri",O);const W=await I(await e(`/me/init-sso-connection?${F.toString()}`,{method:"POST"}));return"data"in W&&((U=W.data)!=null&&U.oauth_url)&&window.open(W.data.oauth_url,"_blank"),W},S=async()=>await I(await e("/me/passkeys",{method:"GET"})),$=async L=>{var de,fe;const O=await I(await e("/me/passkeys/register/begin",{method:"POST"}));if(!("data"in O))return O;const F=O.data.options.publicKey,W={challenge:kn(F.challenge),rp:F.rp,user:{id:kn(F.user.id),name:F.user.name,displayName:F.user.displayName},pubKeyCredParams:F.pubKeyCredParams,timeout:F.timeout,attestation:F.attestation,authenticatorSelection:F.authenticatorSelection,excludeCredentials:(de=F.excludeCredentials)==null?void 0:de.map(ne=>({type:ne.type,id:kn(ne.id),transports:ne.transports}))},U=await navigator.credentials.create({publicKey:W});if(!U)throw new Error("Failed to create credential");const V=U.response,G={id:U.id,rawId:_n(U.rawId),type:U.type,response:{clientDataJSON:_n(V.clientDataJSON),attestationObject:_n(V.attestationObject),transports:((fe=V.getTransports)==null?void 0:fe.call(V))||[]}};return await I(await e(`/me/passkeys/register/finish?name=${encodeURIComponent(L||"")}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(G)}))},Z=async L=>await I(await e(`/me/passkeys/${L}/delete`,{method:"POST"})),R=async(L,O)=>await I(await e(`/me/passkeys/${L}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:O})}));return{user:{...s,refetch:l},loading:a||i,error:r||null,updateProfile:m,getEmailAddresses:d,getEmailAddress:c,createEmailAddress:p,deleteEmailAddress:u,prepareEmailVerification:h,attemptEmailVerification:f,makeEmailPrimary:v,createPhoneNumber:g,deletePhoneNumber:x,preparePhoneVerification:w,attemptPhoneVerification:b,makePhonePrimary:j,setupAuthenticator:k,verifyAuthenticator:N,deleteAuthenticator:_,generateBackupCodes:C,regenerateBackupCodes:E,updateProfilePicture:y,disconnectSocialConnection:T,connectSocialAccount:P,updatePassword:A,removePassword:H,deleteAccount:M,getPasskeys:S,registerPasskey:$,deletePasskey:Z,renamePasskey:R}}function Ro(){const{client:e,loading:a}=je(),{data:s,error:r,isLoading:i,mutate:l}=Se(a?null:"/me/signins",()=>sd(e));return{signins:s,error:r||null,removeSignin:async d=>await I(await e(`/me/signins/${d}/signout`,{method:"POST"})),refetch:l,loading:i||a}}function Lo(){const{session:e,loading:a}=ot(),{loading:s,organizationMemberships:r}=va(),{loading:i,workspaceMemberships:l}=an(),m=o.useMemo(()=>!e||!e.signins||e.signins.length===0?null:(r==null?void 0:r.find(c=>{var p;return c.id===((p=e.active_signin)==null?void 0:p.active_organization_membership_id)}))||null,[r,e]),d=o.useMemo(()=>!e||!e.signins||e.signins.length===0?null:(l==null?void 0:l.find(c=>{var p;return c.id===((p=e.active_signin)==null?void 0:p.active_workspace_membership_id)}))||null,[l,e]);return{loading:a||s||i,orgMembership:m,workspaceMembership:d}}function Po(){const{client:e,loading:a}=je(),[s,r]=o.useState(!1),i=async l=>{r(!0);try{const m=new FormData;for(const[p,u]of Object.entries(l))u&&m.append(p,u);const d=await e("/waitlist/join",{method:"POST",body:m});return await I(d)}finally{r(!1)}};return a?{loading:!0,joinWaitlist:null}:{loading:s,joinWaitlist:i}}function $o(){const{client:e,loading:a}=je(),[s,r]=o.useState(!1),[i,l]=o.useState(null),[m,d]=o.useState(null),[c,p]=o.useState(null),[u,h]=o.useState(!1),[f,g]=o.useState(null);o.useEffect(()=>{if(u||a)return;const w=new URLSearchParams(window.location.search),b=w.get("code"),j=w.get("state"),v=w.get("error"),k=w.get("error_description");if(!b&&!v){h(!0);const N=new Error("No OAuth callback data found.");l(N);return}if(h(!0),r(!0),v){const N=k||v,_=new Error(`OAuth Error: ${N}`);l(_),r(!1);return}if(b&&j)x(b,j);else{const N=new Error("Missing required OAuth parameters");l(N),r(!1)}},[u,a]);const x=async(w,b)=>{try{let j,v;try{const _=b.split(".");if(_.length!==3)throw new Error("Invalid OAuth state format - missing signature");const C=_[0].replace(/-/g,"+").replace(/_/g,"/"),y=C.length%4?"=".repeat(4-C.length%4):"",A=atob(C+y).split("|")[0];if(A==="sign_in")j="/auth/oauth2/callback",v="GET";else if(A==="connect_social")j="/me/sso-connection-callback",v="POST";else throw new Error(`Unknown OAuth action: ${A}`)}catch(_){const C=_ instanceof Error?_:new Error("Failed to parse OAuth state");l(new Error(`Invalid OAuth callback: ${C.message}. The authorization link may be expired or malformed. Please try signing in again.`)),r(!1);return}const k=await e(`${j}?code=${encodeURIComponent(w)}&state=${encodeURIComponent(b)}`,{method:v}),N=await I(k);if("data"in N){const _=N.data.session,C=N.data.redirect_uri||null;if(d(_),p(C),_.signin_attempts&&_.signin_attempts.length>0){const y=_.signin_attempts.at(-1);y&&g(y)}}else{const _=new Error("Social callback failed");l(_)}}catch(j){const v=j instanceof Error?j:new Error("Unknown error occurred");l(v)}finally{r(!1)}};return{loading:s,error:i,session:m,redirectUri:c,processed:u,signinAttempt:f}}function Oo(){const{client:e,loading:a}=je(),[s,r]=o.useState(!1),[i,l]=o.useState(null);return{loading:a||s,verifyMagicLink:async d=>{if(!d.token||!d.attempt)throw new Error("Invalid magic link parameters");r(!0),l(null);try{const c=new URL("/auth/verify-magic-link",window.location.origin);c.searchParams.set("token",d.token),c.searchParams.set("attempt",d.attempt),d.redirectUri&&c.searchParams.set("redirect_uri",d.redirectUri);const p=await e(c.pathname+c.search,{method:"GET"}),u=await I(p);return r(!1),l(!0),u}catch(c){throw r(!1),l(!1),c}},success:i}}function nd(){const[e,a]=o.useState({});return o.useEffect(()=>{const s=new URLSearchParams(window.location.search);a({token:s.get("token")||void 0,attempt:s.get("attempt")||void 0,redirectUri:s.get("redirect_uri")||void 0})},[]),e}function Zo(){const{client:e,loading:a}=je();return{loading:a,forgotPassword:async l=>{const m=new FormData;m.append("email",l);const d=await e("/auth/forgot-password",{method:"POST",body:m});return await I(d)},verifyOtp:async(l,m)=>{const d=new FormData;d.append("email",l),d.append("otp",m);const c=await e("/auth/forgot-password",{method:"POST",body:d});return await I(c)},resetPassword:async(l,m)=>{const d=new FormData;d.append("token",l),d.append("password",m);const c=await e("/auth/reset-password",{method:"POST",body:d});return await I(c)}}}const rd=()=>{},id=rd(),tr=Object,ui=e=>e===id,od=e=>typeof e=="function",Rs=new WeakMap,ld=e=>tr.prototype.toString.call(e),Cn=(e,a)=>e===`[object ${a}]`;let cd=0;const ar=e=>{const a=typeof e,s=ld(e),r=Cn(s,"Date"),i=Cn(s,"RegExp"),l=Cn(s,"Object");let m,d;if(tr(e)===e&&!r&&!i){if(m=Rs.get(e),m)return m;if(m=++cd+"~",Rs.set(e,m),Array.isArray(e)){for(m="@",d=0;d<e.length;d++)m+=ar(e[d])+",";Rs.set(e,m)}if(l){m="#";const c=tr.keys(e).sort();for(;!ui(d=c.pop());)ui(e[d])||(m+=d+":"+ar(e[d])+",");Rs.set(e,m)}}else m=r?e.toJSON():a=="symbol"?e.toString():a=="string"?JSON.stringify(e):""+e;return m},dd=e=>{if(od(e))try{e=e()}catch{e=""}const a=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?ar(e):"",[e,a]},ud=e=>dd(e?e(0,null):null)[0],Nn=Promise.resolve(),md=e=>(a,s,r)=>{const i=o.useRef(!1),{cache:l,initialSize:m=1,revalidateAll:d=!1,persistSize:c=!1,revalidateFirstPage:p=!0,revalidateOnMount:u=!1,parallel:h=!1}=r,[,,,f]=zt.get(vr);let g;try{g=ud(a),g&&(g=So+g)}catch{}const[x,w,b]=pa(l,g),j=o.useCallback(()=>Ce(x()._l)?m:x()._l,[l,g,m]);Wn.useSyncExternalStore(o.useCallback(E=>g?b(g,()=>{E()}):()=>{},[l,g]),j,j);const v=o.useCallback(()=>{const E=x()._l;return Ce(E)?m:E},[g,m]),k=o.useRef(v());Vs(()=>{if(!i.current){i.current=!0;return}g&&w({_l:c?k.current:v()})},[g,l]);const N=u&&!i.current,_=e(g,async E=>{const A=x()._i,H=x()._r;w({_r:mt});const M=[],T=v(),[P]=pa(l,E),S=P().data,$=[];let Z=null;for(let R=0;R<T;++R){const[L,O]=ps(a(R,h?null:Z));if(!L)break;const[F,W]=pa(l,L);let U=F().data;const V=d||A||Ce(U)||p&&!R&&!Ce(S)||N||S&&!Ce(S[R])&&!r.compare(S[R],U);if(s&&(typeof H=="function"?H(U,O):V)){const G=async()=>{if(!(L in f))U=await s(O);else{const de=f[L];delete f[L],U=await de}W({data:U,_k:O}),M[R]=U};h?$.push(G):await G()}else M[R]=U;h||(Z=U)}return h&&await Promise.all($.map(R=>R())),w({_i:mt}),M},r),C=o.useCallback(function(E,A){const H=typeof A=="boolean"?{revalidate:A}:A||{},M=H.revalidate!==!1;return g?(M&&(Ce(E)?w({_i:!0,_r:H.revalidate}):w({_i:!1,_r:H.revalidate})),arguments.length?_.mutate(E,{...H,revalidate:M}):_.mutate()):Nn},[g,l]),y=o.useCallback(E=>{if(!g)return Nn;const[,A]=pa(l,g);let H;if(Lt(E)?H=E(v()):typeof E=="number"&&(H=E),typeof H!="number")return Nn;A({_l:H}),k.current=H;const M=[],[T]=pa(l,g);let P=null;for(let S=0;S<H;++S){const[$]=ps(a(S,P)),[Z]=pa(l,$),R=$?Z().data:mt;if(Ce(R))return C(T().data);M.push(R),P=R}return C(M)},[g,l,C,v]);return{size:v(),setSize:y,mutate:C,get data(){return _.data},get error(){return _.error},get isValidating(){return _.isValidating},get isLoading(){return _.isLoading}}},es=D1(Se,md);function Ho({enabled:e=!0,channels:a,organizationIds:s,workspaceIds:r,onNotification:i,onError:l,reconnectDelay:m=1e3,maxReconnectAttempts:d=5}={}){const{session:c,loading:p}=ot(),{deployment:u,loading:h}=_e(),[f,g]=o.useState(!1),[x,w]=o.useState(null),b=o.useRef(null),j=o.useRef(null),v=o.useRef(0),k=o.useRef(null),N=o.useRef(i),_=o.useRef(l),C=o.useRef(a),y=o.useRef(s),E=o.useRef(r),A=o.useRef(m),H=o.useRef(d);N.current=i,_.current=l,C.current=a,y.current=s,E.current=r,A.current=m,H.current=d;const M=o.useCallback(()=>{j.current&&(clearTimeout(j.current),j.current=null),k.current&&(clearInterval(k.current),k.current=null),b.current&&(b.current.close(),b.current=null)},[]),T=o.useCallback(async()=>{var L;if(!e||p||h||!c||!u)return;M();const $=new URL(u.backend_host),Z=$.protocol==="https:"?"wss:":"ws:",R=new URL("/notifications/stream",`${Z}//${$.host}`);if(u.mode==="staging"){const O=xt(u.backend_host);O&&R.searchParams.set("__dev_session__",O)}C.current&&C.current.length>0&&R.searchParams.set("channels",C.current.join(",")),y.current&&y.current.length>0&&R.searchParams.set("organization_ids",y.current.join(",")),E.current&&E.current.length>0&&R.searchParams.set("workspace_ids",E.current.join(","));try{const O=new WebSocket(R.toString());b.current=O,O.onopen=()=>{g(!0),w(null),v.current=0,k.current=setInterval(()=>{O.readyState===WebSocket.OPEN&&O.send("ping")},3e4)},O.onmessage=F=>{var W,U;try{const V=JSON.parse(F.data);if(V.type==="notification"&&V.data)(W=N.current)==null||W.call(N,V.data);else if(V.type==="error"){const G=V.error||"Unknown error occurred";w(G),(U=_.current)==null||U.call(_,G)}else V.type}catch{}},O.onerror=()=>{var F;w("Connection error occurred"),(F=_.current)==null||F.call(_,"Connection error occurred")},O.onclose=F=>{var W;if(g(!1),k.current&&(clearInterval(k.current),k.current=null),e&&F.code!==1e3&&v.current<H.current){v.current++;const U=A.current*Math.pow(2,v.current-1);j.current=setTimeout(()=>{T()},U)}else v.current>=H.current&&(w("Max reconnection attempts reached"),(W=_.current)==null||W.call(_,"Max reconnection attempts reached"))}}catch{w("Failed to connect"),(L=_.current)==null||L.call(_,"Failed to connect")}},[e,p,h,c,u,M]);o.useEffect(()=>(T(),()=>{M()}),[T,M]),o.useEffect(()=>{b.current&&b.current.readyState===WebSocket.OPEN&&T()},[a,s,r,T]);const P=o.useCallback(()=>{M(),g(!1)},[M]),S=o.useCallback(()=>{v.current=0,T()},[T]);return{isConnected:f,connectionError:x,disconnect:P,reconnect:S}}function sn(e){if(!e)return"";const a=new URLSearchParams;e.limit&&a.append("limit",e.limit.toString()),e.cursor&&a.append("cursor",e.cursor),e.scope&&a.append("scope",e.scope),e.channels&&e.channels.length>0&&e.channels.forEach(r=>a.append("channels",r)),e.organization_ids&&e.organization_ids.length>0&&e.organization_ids.forEach(r=>a.append("organization_ids",r)),e.workspace_ids&&e.workspace_ids.length>0&&e.workspace_ids.forEach(r=>a.append("workspace_ids",r)),e.is_read!==void 0&&a.append("is_read",e.is_read.toString()),e.is_archived!==void 0&&a.append("is_archived",e.is_archived.toString()),e.is_starred!==void 0&&a.append("is_starred",e.is_starred.toString()),e.severity&&a.append("severity",e.severity);const s=a.toString();return s?"?"+s:""}async function pd(e,a){const s=`/notifications${sn(a)}`,r=await e(s,{method:"GET"});return(await I(r)).data}async function hd(e,a){const s=await e(`/notifications/${a}/read`,{method:"POST"});return I(s)}async function fd(e,a){const s=await e(`/notifications/${a}/unread`,{method:"POST"});return I(s)}async function wd(e,a){const s=await e(`/notifications/mark-all-read${sn(a)}`,{method:"POST"});return I(s)}async function gd(e,a){const s=await e(`/notifications/archive-all-read${sn(a)}`,{method:"POST"});return I(s)}async function xd(e,a){const s=await e(`/notifications/${a}/archive`,{method:"POST"});return I(s)}async function vd(e,a){const s=await e(`/notifications/${a}/star`,{method:"POST"});return I(s)}function Fo(e){var E;const{client:a,loading:s}=je(),{data:r,error:i,mutate:l,isLoading:m,size:d,setSize:c,isValidating:p}=es((A,H)=>{var S;if(s||A>0&&(!H||!H.has_more))return null;const M=A===0||(S=H==null?void 0:H.notifications[H.notifications.length-1])==null?void 0:S.id,{onNotification:T,...P}=e||{};return["wacht-notifications",{...P,cursor:M}]},([,A])=>pd(a,A),{refreshInterval:6e4,revalidateOnFocus:!0,revalidateFirstPage:!0}),u=o.useMemo(()=>r?r.flatMap(A=>A.notifications):[],[r]),h=r?(E=r[r.length-1])==null?void 0:E.has_more:!1,f=o.useMemo(()=>{if(e!=null&&e.channels&&e.channels.length>0)return e.channels;switch(e==null?void 0:e.scope){case"organization":return["organization"];case"workspace":return["workspace"];case"current":return["current"];case"all":return["user","organization","workspace"];case"user":return["user"];default:return}},[e==null?void 0:e.channels,e==null?void 0:e.scope]),g=o.useMemo(()=>e==null?void 0:e.organization_ids,[e==null?void 0:e.organization_ids]),x=o.useMemo(()=>e==null?void 0:e.workspace_ids,[e==null?void 0:e.workspace_ids]);Ho({enabled:!s&&!!r,channels:f,organizationIds:g,workspaceIds:x,onNotification:o.useCallback(A=>{l(async H=>{var S;if(!H||H.length===0||H.some($=>$.notifications.some(Z=>Z.id===A.id.toString())))return H;(S=e==null?void 0:e.onNotification)==null||S.call(e,A);const T=H[0];return[{...T,notifications:[{id:A.id.toString(),user_id:A.user_id.toString(),deployment_id:A.deployment_id.toString(),title:A.title,body:A.body,severity:A.severity,ctas:A.ctas,is_read:!1,is_archived:!1,created_at:A.created_at,updated_at:A.created_at},...T.notifications]},...H.slice(1)]},!1)},[l,e]),onError:o.useCallback(()=>{},[])});const w=o.useCallback(async A=>{s||(await l(async H=>H&&H.map(M=>({...M,notifications:M.notifications.map(T=>T.id===A?{...T,is_read:!0}:T)})),!1),await hd(a,A),await l())},[a,s,l]),b=o.useCallback(async A=>{s||(await l(async H=>H&&H.map(M=>({...M,notifications:M.notifications.map(T=>T.id===A?{...T,is_read:!1}:T)})),!1),await fd(a,A),await l())},[a,s,l]),j=o.useCallback(async()=>{s||(await l(async A=>A&&A.map(H=>({...H,notifications:H.notifications.map(M=>({...M,is_read:!0}))})),!1),await wd(a,e),await l())},[a,e,l,s]),v=o.useCallback(async()=>{s||(await l(async A=>A&&A.map(H=>({...H,notifications:H.notifications.filter(M=>!M.is_read)})),!1),await gd(a,e),await l())},[a,e,s,l]),k=o.useCallback(async A=>{s||(await l(async H=>H&&H.map(M=>({...M,notifications:(e==null?void 0:e.is_archived)!==void 0?M.notifications.filter(T=>T.id!==A):M.notifications.map(T=>T.id===A?{...T,is_archived:!T.is_archived}:T)})),!1),await xd(a,A),await l())},[a,s,l,e==null?void 0:e.is_archived]),N=o.useCallback(async A=>{s||(await l(async H=>H&&H.map(M=>({...M,notifications:M.notifications.map(T=>T.id===A?{...T,is_starred:!T.is_starred}:T)})),!1),await vd(a,A),await l())},[a,s,l]),_=o.useCallback(async()=>{p||!h||await c(d+1)},[p,h,c,d]),C=o.useCallback(async()=>{await l()},[l]),y=s||m||d>0&&r&&typeof r[d-1]>"u";return!r||y?{loading:!0,notifications:u,hasMore:h,markAsRead:void 0,markAllAsRead:void 0,archiveAllRead:void 0,archiveNotification:void 0,starNotification:void 0,markAsUnread:void 0,error:i,refetch:C,loadMore:_}:{loading:!1,error:i,notifications:u,hasMore:h,markAsRead:w,markAllAsRead:j,archiveAllRead:v,archiveNotification:k,starNotification:N,markAsUnread:b,refetch:C,loadMore:_}}async function bd(e,a){const s=`/notifications/scope-unread${sn(a)}`,r=await e(s,{method:"GET"});return(await I(r)).data}function To(e){const{client:a,loading:s}=je(),{data:r,error:i,mutate:l}=Se(s?null:["wacht-notifications-unread",e],([,d])=>bd(a,d),{refreshInterval:3e4,revalidateOnFocus:!0}),m=async()=>{await l()};return!r||s?{loading:!0,count:0,error:i,refetch:m}:{loading:!1,count:r.count,error:i,refetch:m}}const Ia={DISCONNECTED:"disconnected",CONNECTED:"connected",ERROR:"error"},Ie={IDLE:"idle",STARTING:"starting",RUNNING:"running",WAITING_FOR_INPUT:"waiting_for_input",COMPLETED:"completed",FAILED:"failed"},_a={IDLE:"Idle",STARTING:"Starting",RUNNING:"Running",WAITING_FOR_INPUT:"WaitingForInput",COMPLETED:"Completed",FAILED:"Failed",CANCELLED:"Cancelled"};function yd(e){switch(e.trim()){case _a.IDLE:return Ie.IDLE;case _a.STARTING:case"starting":return Ie.STARTING;case _a.RUNNING:case"running":return Ie.RUNNING;case _a.WAITING_FOR_INPUT:case"waiting_for_input":return Ie.WAITING_FOR_INPUT;case _a.COMPLETED:case"completed":return Ie.COMPLETED;case _a.FAILED:case _a.CANCELLED:case"failed":case"cancelled":return Ie.FAILED;default:return Ie.IDLE}}function Va(e){return e===Ie.STARTING||e===Ie.RUNNING||e===Ie.WAITING_FOR_INPUT}function Xt(e){return e&&typeof e=="object"?e:null}function Ea(e){return typeof e=="string"?e:null}function jd(e){const a=Xt(e);return(a==null?void 0:a.ConversationMessage)??e}function _d(e){const a=Xt(e);if(!a)return null;const s=Xt(a.content),r=Xt(a.metadata),i=Ea(a.message_type)||Ea(r==null?void 0:r.message_type)||Ea(s==null?void 0:s.type);return{...a,metadata:{...r||{},message_type:i}}}function kd(e){const a=Xt(e.metadata),s=Xt(e.content);return Ea(a==null?void 0:a.message_type)||Ea(s==null?void 0:s.type)}function Cd(e){const a=Xt(e.content);return Ea(a==null?void 0:a.status)}function Nd(e){const a=Xt(e.content),s=Ea(a==null?void 0:a.step);return s==="execution_cancelled"||s==="abort"}function Sd(e){const a=Xt(e.content);return(a==null?void 0:a.further_actions_required)===!1}function mi(e){return[...e].sort((a,s)=>new Date(a.timestamp).getTime()-new Date(s.timestamp).getTime())}function Ed(e,a){return{id:e,timestamp:new Date().toISOString(),content:{type:"user_message",message:a},metadata:{message_type:"user_message"}}}function Ad(e,a){const s=new FormData;s.append("message",e);for(const r of a??[])s.append("files",r);return s}function Md(e,a){const s=new FormData;s.append("request_message_id",e);for(const r of a)s.append("approval_tool_name",r.tool_name),s.append("approval_mode",r.mode);return s}function Rd(){const e=new FormData;return e.append("cancel","true"),e}function Ld({deployment:e,threadId:a,file:s}){const r=s.url||s.filename;if(!r)return null;if(/^https?:\/\//i.test(r))return r;const i=e.backend_host.replace(/\/$/,"");let l;if(r.startsWith("/ai/threads/"))l=new URL(r,`${i}/`);else{const m=r.includes("/")?r.split("/").pop()??"":r;if(!m)return null;l=new URL(`/ai/threads/${encodeURIComponent(a)}/filesystem/file`,`${i}/`),l.searchParams.set("path",`uploads/${m}`)}if(e.mode==="staging"){const m=xt(e.backend_host);m&&l.searchParams.set("__dev_session__",m)}return l.toString()}const Pd=5e3,$d=5e3;function Od({threadId:e,initialThread:a=null,boardItemId:s,platformAdapter:r}){var lt,Qe;const{deployment:i}=_e(),{client:l}=je(),[m,d]=o.useState([]),[c,p]=o.useState(null),[u,h]=o.useState(null),[f,g]=o.useState(a),[x,w]=o.useState(Ie.IDLE),[b,j]=o.useState({status:Ia.DISCONNECTED}),[v,k]=o.useState(!0),[N,_]=o.useState(!1),[C,y]=o.useState(!1),[E,A]=o.useState(null),H=o.useRef(null),M=o.useRef(e),T=o.useRef(0),P=o.useRef(Ie.IDLE),S=o.useRef(null),$=o.useCallback(Q=>{d(le=>{const me=[...le],Te=me.findIndex(Pe=>String(Pe.id)===String(Q.id));return Te>=0?me[Te]=Q:me.push(Q),mi(me)})},[]),Z=o.useCallback(({messages:Q,prepend:le,hasMore:me})=>{const Te=mi(Q);Te.length>0&&(H.current=Te[0].id),d(Pe=>le?[...Te,...Pe]:Te),me!==void 0&&k(me)},[]),R=o.useCallback(Q=>{P.current=Q,w(Q)},[]),L=o.useCallback(Q=>{T.current=Date.now()+Pd,R(Q)},[R]),O=o.useCallback(()=>{var Q;T.current>Date.now()&&Va(P.current)||(R(Ie.IDLE),(Q=S.current)==null||Q.call(S))},[R]),F=o.useCallback(Q=>{const le=yd(Q),me=Va(le);!me&&T.current>Date.now()&&Va(P.current)||(me&&(T.current=0),R(le))},[R]),W=o.useCallback(()=>{p(null),h(null)},[]),U=o.useCallback(Q=>{g(le=>le&&{...le,...Q?{status:Q}:{},last_activity_at:new Date().toISOString()})},[]),V=o.useCallback((Q,le)=>{$(Ed(Q,le)),W()},[W,$]),G=o.useCallback(Q=>{const le=_d(Q);if(!le)return;switch(kd(le)){case"system_decision":$(le),Nd(le)&&O();return;case"execution_summary":case"tool_result":case"user_message":$(le);return;case"steer":$(le),Sd(le)&&O();return;case"approval_request":T.current=0,R(Ie.WAITING_FOR_INPUT),$(le);return;case"approval_response":$(le),L(Ie.RUNNING);return;case"execution_status":{const Te=Cd(le);if(!Te)return;F(Te),g(Pe=>Pe&&{...Pe,status:Te});return}default:$(le)}},[F,O,R,L,$]),Y=o.useCallback((Q,le)=>{var me;(me=r==null?void 0:r.onPlatformEvent)==null||me.call(r,Q,le)},[r]),de=o.useRef(G),fe=o.useRef(Y),ne=o.useRef(l),ae=o.useRef(i);o.useEffect(()=>{de.current=G,fe.current=Y,ne.current=l,ae.current=i}),o.useEffect(()=>{M.current=e},[e]);const re=o.useRef(null),Le=o.useRef(null),K=o.useRef(0),at=10,ze=o.useCallback(async Q=>{if(!e)return;const le=e;Q?_(!0):y(!0),A(null);try{const me=new URLSearchParams({limit:"100"});Q&&me.append("before_id",Q),s&&me.append("board_item_id",s);const Te=await l(`/ai/threads/${e}/messages?${me}`,{method:"GET"}),Pe=await I(Te);Pe.data&&M.current===le&&Z({messages:Pe.data.data,prepend:!!Q,hasMore:Pe.data.has_more||!1})}catch(me){M.current===le&&A(me instanceof Error?me:new Error("Failed to fetch messages"))}finally{M.current===le&&(Q?_(!1):y(!1))}},[e,s,l,Z]);o.useEffect(()=>{const Q=ae.current;if(!Q||!e)return;const le=()=>{re.current&&(re.current.close(),re.current=null);const me=new URL(`${Q.backend_host}/ai/threads/${encodeURIComponent(e)}/stream`);if(Q.mode==="staging"){const Pe=xt(Q.backend_host);Pe&&me.searchParams.append("__dev_session__",Pe)}const Te=new EventSource(me.toString(),{withCredentials:Q.mode!=="staging"});re.current=Te,Te.onopen=()=>{if(j({status:Ia.CONNECTED}),K.current>0){const Pe=e;setTimeout(()=>{l(`/ai/threads/${Pe}/messages?limit=100${s?`&board_item_id=${encodeURIComponent(s)}`:""}`,{method:"GET"}).then(async qe=>{const pt=await I(qe);pt.data&&M.current===Pe&&Z({messages:pt.data.data,hasMore:pt.data.has_more||!1})}).catch(()=>{})},100)}K.current=0},Te.onerror=()=>{if(j({status:Ia.ERROR}),Te.close(),re.current=null,K.current<at){const Pe=Math.min(1e3*Math.pow(2,K.current),3e4);Le.current=setTimeout(()=>{K.current++,le()},Pe)}else j({status:Ia.DISCONNECTED})},Te.addEventListener("conversation_message",Pe=>{try{const qe=jd(JSON.parse(Pe.data));if(!qe)return;if(s){const pt=qe.board_item_id;if((pt==null?"":String(pt))!==s)return}de.current(qe)}catch{}}),Te.addEventListener("platform_event",Pe=>{try{const qe=JSON.parse(Pe.data);qe!=null&&qe.PlatformEvent?fe.current(qe.PlatformEvent[0],qe.PlatformEvent[1]):qe!=null&&qe.event_label&&fe.current(qe.event_label,qe.event_data)}catch{}})};return le(),()=>{Le.current&&(clearTimeout(Le.current),Le.current=null),re.current&&(re.current.close(),re.current=null)}},[e,s,l,Z]);const We=o.useCallback(async()=>{if(!e)return;const Q=e;try{const le=await l(`/ai/threads/${Q}`,{method:"GET"});if(!le.ok)return;const me=await I(le);me.data&&M.current===Q&&(g(me.data),F(me.data.status),Wa(`wacht-ai-thread:${Q}`,me.data,{revalidate:!1}))}catch{}},[e,l,F]);o.useEffect(()=>{S.current=We},[We]),o.useEffect(()=>{if(!e)return;We();const Q=window.setInterval(()=>{!Va(P.current)&&T.current<=Date.now()||We()},$d);return()=>{window.clearInterval(Q)}},[e,We]),o.useEffect(()=>{d([]),g(null),k(!0),_(!1),A(null),y(!!e),j({status:Ia.DISCONNECTED}),H.current=null,T.current=0,P.current=Ie.IDLE,w(Ie.IDLE),W()},[e,W]),o.useEffect(()=>{!a||a.id!==e||g(a)},[a,e]);const Re=o.useCallback(async(Q,le)=>{var me,Te;if(!(!e||!i)){p(Q),le&&le.length>0&&h(le),L(Ie.STARTING);try{const Pe=await l(`/ai/threads/${e}/run`,{method:"POST",body:Ad(Q,le)});if(Pe.ok){const qe=await I(Pe),pt=((me=qe.data)==null?void 0:me.conversation_id)??null;U(typeof((Te=qe.data)==null?void 0:Te.status)=="string"?qe.data.status:void 0),pt?V(pt,Q):W(),L(Ie.RUNNING)}else T.current=0,R(Ie.IDLE),W()}catch{T.current=0,R(Ie.IDLE),W()}}},[e,i,l,L,R,U,W,V]);o.useEffect(()=>{e&&ze()},[e,ze]);const ce=o.useCallback(async()=>{await ze()},[ze]),B=o.useCallback(async()=>{if(!(N||!v||!H.current)){_(!0);try{await ze(H.current)}finally{_(!1)}}},[N,v,ze]),q=o.useCallback(()=>{d([]),W()},[W]),X=o.useCallback(async(Q,le)=>{if(!e)return!1;L(Ie.STARTING);try{return(await l(`/ai/threads/${e}/run`,{method:"POST",body:Md(Q,le)})).ok?(U(),L(Ie.RUNNING),!0):(T.current=0,R(Ie.IDLE),!1)}catch{return T.current=0,R(Ie.IDLE),!1}},[e,l,L,R,U]),oe=o.useCallback(async Q=>{if(!e)return!1;L(Ie.STARTING);try{return(await l(`/ai/threads/${e}/messages/answer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q)})).ok?(U(),L(Ie.RUNNING),!0):(T.current=0,R(Ie.IDLE),!1)}catch{return T.current=0,R(Ie.IDLE),!1}},[e,l,L,R,U]),Ee=o.useCallback(async()=>{if(!(!e||!Va(x)))try{await l(`/ai/threads/${e}/run`,{method:"POST",body:Rd()}),T.current=0,U(),R(Ie.IDLE)}catch{}},[e,x,l,R,U]),z=o.useCallback(Q=>!i||!e||!Q?null:Ld({deployment:i,threadId:e,file:Q}),[e,i]),D=o.useCallback(Q=>{const le=z(Q);if(!le)return;const me=document.createElement("a");me.href=le,me.download=(Q==null?void 0:Q.filename)||"attachment",me.rel="noreferrer",document.body.appendChild(me),me.click(),document.body.removeChild(me)},[z]),we=((lt=f==null?void 0:f.execution_state)==null?void 0:lt.pending_approval_request)??null,ge=((Qe=f==null?void 0:f.execution_state)==null?void 0:Qe.pending_question)??null,xe=f==null?void 0:f.status;return{thread:f,threadState:f,threadStatus:xe,messages:m,pendingMessage:c,pendingFiles:u,connectionState:b,isConnected:b.status===Ia.CONNECTED,hasActiveRun:Va(x),isRunning:x===Ie.STARTING||x===Ie.RUNNING,executionStatus:x,isWaitingForInput:x===Ie.WAITING_FOR_INPUT,pendingApprovalRequest:we,pendingClarificationRequest:ge,hasMoreMessages:v,isLoadingMore:N,messagesLoading:C,messagesError:E,refreshThread:We,refreshMessages:ce,sendMessage:Re,submitApprovalResponse:X,submitAnswer:oe,clearMessages:q,loadMoreMessages:B,cancelExecution:Ee,resolveMessageFileUrl:z,downloadMessageFile:D}}function Zd(e){const{client:a}=je(),[s,r]=o.useState(!e),[i,l]=o.useState(!!e),[m,d]=o.useState(null),c=o.useRef(!1),p=o.useRef(!1),u=o.useRef(null),h=s,f=o.useCallback(async()=>{const N=await a("/ai/session",{method:"GET"});if(!N.ok)throw N.status===401||N.status===403?new Error("NO_SESSION"):new Error("Failed to fetch session");return(await I(N)).data},[a]),{data:g,error:x,isLoading:w,mutate:b}=Se(h?"wacht-agent-session":null,f,{revalidateOnFocus:!1});o.useEffect(()=>{if(!e||p.current||u.current===e)return;u.current=e,(async()=>{p.current=!0,l(!0);try{(await a(`/session/ticket/exchange?ticket=${encodeURIComponent(e)}`,{method:"GET"})).ok?(c.current=!0,r(!0)):d(new Error("Failed to exchange ticket"))}catch(_){d(_ instanceof Error?_:new Error("Failed to exchange ticket"))}finally{l(!1),p.current=!1}})()},[e,a]);const j=!m&&(e?s:!0)&&(!x||x.message!=="NO_SESSION"),v=m||(x&&x.message!=="NO_SESSION"?x:null);return{hasSession:j,sessionLoading:i||h&&w,sessionError:v,sessionId:(g==null?void 0:g.session_id)||null,actor:(g==null?void 0:g.actor)||null,agents:(g==null?void 0:g.agents)||[],ticketExchanged:s,ticketLoading:i,refetch:async()=>{await b()}}}const pi={exists:!1,files:[]};function Ls(e,a,s){const i=(e||[]).filter(l=>l.id!==a.id);return!s&&a.archived_at?i:[a,...i]}function Hd(e,a){return a===void 0?"":`?${new URLSearchParams({[e]:String(a)}).toString()}`}function sr(e,a){const s=new URLSearchParams({path:e});return a&&s.set("include_archived","true"),`?${s.toString()}`}function Io(e,a){const s=new URLSearchParams;e&&s.set("path",e),a&&s.set("include_archived","true");const r=s.toString();return r?`?${r}`:""}function Fd(e){const a=e.split("/").pop()||e,s=a.lastIndexOf(".");return s<0||s===a.length-1?"":a.slice(s+1).toLowerCase()}function Td(e,a){const s=Fd(a),r=new Set(["doc","docx","ppt","pptx","xls","xlsx","pdf","zip","gz","tar","7z","rar","jar","war","bin"]),i=new Set(["txt","md","mdx","markdown","json","jsonc","js","jsx","ts","tsx","mts","cts","mjs","cjs","py","rb","php","java","kt","kts","go","rs","c","cc","cpp","cxx","h","hpp","swift","sh","bash","zsh","fish","ps1","sql","html","htm","css","scss","less","xml","svg","yaml","yml","toml","ini","cfg","conf","env","log"]);return r.has(s)?!1:i.has(s)?!0:e.startsWith("text/")||e.includes("json")||e.includes("javascript")||e.includes("typescript")||e.includes("python")||e.includes("xml")||e.includes("yaml")}function nt(e,a,s){if(s!=null){if(typeof s=="string"){e.set(a,s);return}if(typeof s=="boolean"||typeof s=="number"){e.set(a,String(s));return}}}function Id(e,a,s){s&&e.set(a,JSON.stringify(s))}function hi(e){const a=new FormData;return nt(a,"name",e.name),nt(a,"agent_id","agent_id"in e?e.agent_id:void 0),nt(a,"description",e.description),nt(a,"status",e.status),a}function Vd(e){const a=new FormData;if(nt(a,"title",e.title),nt(a,"agent_id",e.agent_id),nt(a,"system_instructions",e.system_instructions),nt(a,"thread_purpose",e.thread_purpose),nt(a,"responsibility",e.responsibility),nt(a,"reusable",e.reusable),nt(a,"accepts_assignments",e.accepts_assignments),Id(a,"metadata",e.metadata),Array.isArray(e.capability_tags))for(const s of e.capability_tags)a.append("capability_tags",s);return a}function Vo(e){const a=new FormData;return nt(a,"title",e.title),nt(a,"agent_id",e.agent_id),nt(a,"system_instructions",e.system_instructions),a}function zo(e,a=[]){const s=new FormData;nt(s,"title",e.title),nt(s,"description",e.description),nt(s,"status",e.status),nt(s,"schedule_kind",e.schedule_kind),nt(s,"next_run_at",e.next_run_at),nt(s,"interval_seconds",e.interval_seconds),"clear_schedule"in e&&nt(s,"clear_schedule",e.clear_schedule);for(const r of a)s.append("files",r);return s}function zd(e={}){const{client:a}=je(),{includeArchived:s=!1,enabled:r=!0}=e,i=r?`wacht-ai-actor-projects:${s}`:null,l=o.useCallback(async()=>{const g=await a(`/ai/projects${Hd("include_archived",s)}`);return(await I(g)).data},[a,s]),{data:m,error:d,mutate:c}=Se(i,l,{revalidateOnFocus:!1,refreshInterval:15e3}),p=o.useCallback(async g=>{const x=await a("/ai/projects",{method:"POST",body:hi(g)}),w=await I(x);return await c(b=>Ls(b,w.data,s),{revalidate:!0}),w},[a,s,c]),u=o.useCallback(async(g,x)=>{const w=await a(`/ai/projects/${g}/update`,{method:"POST",body:hi(x)}),b=await I(w);return await c(j=>Ls(j,b.data,s),{revalidate:!0}),b},[a,s,c]),h=o.useCallback(async g=>{const x=await a(`/ai/projects/${g}/archive`,{method:"POST",body:new URLSearchParams}),w=await I(x);return await c(b=>Ls(b,w.data,s),{revalidate:!0}),w},[a,s,c]),f=o.useCallback(async g=>{const x=await a(`/ai/projects/${g}/unarchive`,{method:"POST",body:new URLSearchParams}),w=await I(x);return await c(b=>Ls(b,w.data,s),{revalidate:!0}),w},[a,s,c]);return{projects:m||[],loading:!m&&!d,error:d,createProject:p,updateProject:u,archiveProject:h,unarchiveProject:f,refetch:async()=>{await c()}}}function Dd(e={}){const{client:a}=je(),{enabled:s=!0,query:r="",limit:i=12}=e,l=r.trim(),m=s?`wacht-ai-actor-project-search:${l}:${i}`:null,d=o.useCallback(async()=>{const h=new URLSearchParams({limit:String(i)});l&&h.set("q",l);const f=await a(`/ai/projects/search?${h.toString()}`);return(await I(f)).data},[a,i,l]),{data:c,error:p,mutate:u}=Se(m,d,{revalidateOnFocus:!1});return{projects:(c==null?void 0:c.data)||[],loading:!c&&!p,error:p,hasMore:(c==null?void 0:c.has_more)||!1,nextCursor:c==null?void 0:c.next_cursor,refetch:async()=>{await u()}}}function Ud(e,a={}){const{client:s}=je(),{includeArchived:r=!1,enabled:i=!0}=a,l=i&&e?`wacht-ai-threads:${e}:${r}`:null,m=o.useCallback(async()=>{if(!e)return{data:[],has_more:!1,next_cursor:""};const w=new URLSearchParams({limit:"100"});r&&w.set("include_archived","true");const b=await s(`/ai/projects/${e}/threads?${w.toString()}`);return(await I(b)).data},[e,s,r]),{data:d,error:c,mutate:p}=Se(l,m,{revalidateOnFocus:!1,refreshInterval:15e3}),u=o.useCallback(async(w,b)=>{const j=await s(`/ai/projects/${w}/threads`,{method:"POST",body:Vd(b)}),v=await I(j);return w===e&&await p(),v},[e,s,p]),h=o.useCallback(async w=>{if(!e)throw new Error("projectId is required");return u(e,w)},[e,u]),f=o.useCallback(async(w,b)=>{const j=await s(`/ai/threads/${w}/update`,{method:"POST",body:Vo(b)}),v=await I(j);return await p(),v},[s,p]),g=o.useCallback(async w=>{const b=await s(`/ai/threads/${w}/archive`,{method:"POST",body:new URLSearchParams}),j=await I(b);return await p(),j},[s,p]),x=o.useCallback(async w=>{const b=await s(`/ai/threads/${w}/unarchive`,{method:"POST",body:new URLSearchParams}),j=await I(b);return await p(),j},[s,p]);return{threads:(d==null?void 0:d.data)||[],loading:!d&&!c,error:c,hasMore:(d==null?void 0:d.has_more)||!1,nextCursor:(d==null?void 0:d.next_cursor)||"",createThread:h,createThreadForProject:u,updateThread:f,archiveThread:g,unarchiveThread:x,refetch:async()=>{await p()}}}function Wd(e,a={}){var g,x;const{client:s}=je(),{includeArchived:r=!1,archivedOnly:i=!1,enabled:l=!0,query:m="",limit:d=10}=a,c=m.trim(),p=es((w,b)=>{if(!l||!e||w>0&&b&&!b.has_more)return null;const j=w===0||b==null?void 0:b.next_cursor;return["wacht-ai-project-thread-feed",e,i?"archived-only":r?"with-archived":"active-only",c,d,j||""]},async([,w,b,j,v,k])=>{const N=new URLSearchParams({limit:String(v)});b==="with-archived"?N.set("include_archived","true"):b==="archived-only"&&(N.set("include_archived","true"),N.set("archived_only","true")),j&&N.set("q",String(j)),k&&N.set("cursor",String(k));const _=await s(`/ai/projects/${w}/threads?${N.toString()}`);return(await I(_)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),u=o.useMemo(()=>{var w;return((w=p.data)==null?void 0:w.flatMap(b=>b.data||[]))||[]},[p.data]),h=p.data&&((g=p.data[p.data.length-1])==null?void 0:g.has_more)||!1,f=p.isValidating&&!!p.data&&p.size>(((x=p.data)==null?void 0:x.length)||0);return{threads:u,loading:!p.data&&!p.error,error:p.error||null,hasMore:h,loadingMore:f,loadMore:async()=>{!h||f||await p.setSize(w=>w+1)},refetch:async()=>{await p.mutate()}}}function Bd(e={}){const{client:a}=je(),{enabled:s=!0,query:r="",limit:i=16}=e,l=r.trim(),m=s?`wacht-ai-actor-thread-search:${l}:${i}`:null,d=o.useCallback(async()=>{const h=new URLSearchParams({limit:String(i)});l&&h.set("q",l);const f=await a(`/ai/threads/search?${h.toString()}`);return(await I(f)).data},[a,i,l]),{data:c,error:p,mutate:u}=Se(m,d,{revalidateOnFocus:!1});return{threads:(c==null?void 0:c.data)||[],loading:!c&&!p,error:p,hasMore:(c==null?void 0:c.has_more)||!1,nextCursor:c==null?void 0:c.next_cursor,refetch:async()=>{await u()}}}function Gd(e,a=!0){const{client:s}=je(),r=a&&e?`wacht-ai-thread:${e}`:null,i=o.useCallback(async()=>{if(!e)return null;const u=await s(`/ai/threads/${e}`);return(await I(u)).data},[e,s]),l=Se(r,i,{revalidateOnFocus:!1}),m=o.useCallback(async u=>{if(!e)throw new Error("threadId is required");const h=await s(`/ai/threads/${e}/update`,{method:"POST",body:Vo(u)}),f=await I(h);return await l.mutate(),f},[e,s,l]),d=o.useCallback(async()=>{if(!e)throw new Error("threadId is required");const u=await s(`/ai/threads/${e}/archive`,{method:"POST",body:new URLSearchParams}),h=await I(u);return await l.mutate(),h},[e,s,l]),c=o.useCallback(async()=>{if(!e)throw new Error("threadId is required");const u=await s(`/ai/threads/${e}/unarchive`,{method:"POST",body:new URLSearchParams}),h=await I(u);return await l.mutate(),h},[e,s,l]),p=o.useCallback(async u=>{if(!e)throw new Error("threadId is required");await s(`/ai/threads/${e}/messages/answer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)})},[e,s]);return{thread:l.data||null,loading:!l.data&&!l.error,error:l.error||null,updateThread:m,archiveThread:d,unarchiveThread:c,submitAnswer:p,refetch:async()=>{await l.mutate()}}}function qd(e,a=!0){const{client:s}=je(),r=a&&e?`wacht-ai-thread-filesystem:${e}`:null,i=o.useCallback(async d=>{if(!e)throw new Error("threadId is required");const c=await s(`/ai/threads/${e}/filesystem/file${sr(d)}`);if(!c.ok)throw new Error("Failed to load file");const p=await c.blob(),u=(c.headers.get("content-type")||"application/octet-stream").split(";")[0].trim().toLowerCase(),h=Td(u,d);let f;return h&&(f=await p.text()),{path:d,name:d.split("/").pop()||"file",mime_type:u,is_text:h,size_bytes:p.size,truncated:!1,content:f,blob:p}},[e,s]),l=o.useCallback(async d=>{if(!e)return pi;const c=await s(`/ai/threads/${e}/filesystem${Io(d)}`);return(await I(c)).data},[e,s]),m=Se(r,()=>l(),{revalidateOnFocus:!1});return{filesystem:m.data||pi,filesystemLoading:!m.data&&!m.error,filesystemError:m.error||null,getFile:i,listDirectory:l,refetch:async()=>{await m.mutate()}}}function Kd(e,a={}){var h,f;const{client:s}=je(),{enabled:r=!0,limit:i=40,order:l="asc"}=a,m=Math.min(Math.max(i,1),200),d=es((g,x)=>{if(!r||!e||g>0&&x&&!x.has_more)return null;const w=g===0||x==null?void 0:x.next_cursor;return["wacht-ai-thread-assignments",e,m,l,w||""]},async([,g,x,w,b])=>{const j=new URLSearchParams({limit:String(x)});w==="desc"&&j.set("order","desc"),b&&j.set("cursor",String(b));const v=await s(`/ai/threads/${g}/assignments?${j.toString()}`);return(await I(v)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),c=o.useMemo(()=>{var g;return((g=d.data)==null?void 0:g.flatMap(x=>x.data||[]))||[]},[d.data]),p=d.data&&((h=d.data[d.data.length-1])==null?void 0:h.has_more)||!1,u=d.isValidating&&!!d.data&&d.size>(((f=d.data)==null?void 0:f.length)||0);return{assignments:c,loading:!d.data&&!d.error,error:d.error||null,hasMore:p,loadingMore:u,loadMore:async()=>{!p||u||await d.setSize(g=>g+1)},refetch:async()=>{await d.mutate()}}}function Yd(e={},a){const s=new URLSearchParams;e.statuses&&e.statuses.length>0&&s.set("status",e.statuses.join(",")),e.includeArchived&&s.set("include_archived","true"),e.archivedOnly&&s.set("archived_only","true"),e.limit&&s.set("limit",String(e.limit)),a&&s.set("cursor",a);const r=s.toString();return r?`?${r}`:""}function Qd(e,a=!0,s={}){var x,w,b;const{client:r}=je(),i=((x=s.statuses)==null?void 0:x.join(","))||"all",l=s.archivedOnly?"archived-only":s.includeArchived?"with-archived":"active-only",m=s.limit||60,d=es((j,v)=>{if(!a||!e||j>0&&v&&!v.has_more)return null;const k=j===0||v==null?void 0:v.next_cursor;return["wacht-ai-project-tasks",e,i,l,m,k||""]},async([,j,,,,v])=>{const k=await r(`/ai/projects/${j}/board/items${Yd(s,v||void 0)}`);return(await I(k)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),c=o.useMemo(()=>{var j;return((j=d.data)==null?void 0:j.flatMap(v=>v.data||[]))||[]},[d.data]),p=d.data&&((w=d.data[d.data.length-1])==null?void 0:w.has_more)||!1,u=d.isValidating&&!!d.data&&d.size>(((b=d.data)==null?void 0:b.length)||0),h=o.useCallback(async(j,v=[])=>{if(!e)throw new Error("projectId is required");const k=await r(`/ai/projects/${e}/board/items`,{method:"POST",body:zo(j,v)}),N=await I(k);return await d.mutate(),N},[e,r,d]),f=o.useCallback(async j=>{if(!e)throw new Error("projectId is required");const v=await r(`/ai/projects/${e}/board/items/${j}/archive`,{method:"POST",body:new URLSearchParams}),k=await I(v);return await d.mutate(),k},[e,r,d]),g=o.useCallback(async j=>{if(!e)throw new Error("projectId is required");const v=await r(`/ai/projects/${e}/board/items/${j}/unarchive`,{method:"POST",body:new URLSearchParams}),k=await I(v);return await d.mutate(),k},[e,r,d]);return{tasks:c,loading:!d.data&&!d.error,error:d.error||null,hasMore:p,loadingMore:u,loadMore:async()=>{!p||u||await d.setSize(j=>j+1)},createTask:h,archiveTask:f,unarchiveTask:g,refetch:async()=>{await d.mutate()}}}function Jd(e,a,s=!0,r={}){var T,P;const{client:i}=je(),l=r.includeArchived?"with-archived":"active-only",m=r.includeArchived?"?include_archived=true":"",d=r.assignmentsOrder??"asc",c=Math.min(Math.max(r.assignmentsLimit??40,1),200),p=s&&e&&a?`wacht-ai-board-item:${e}:${a}:${l}`:null,u=s&&e&&a?`wacht-ai-board-item-workspace:${e}:${a}:${l}`:null,h=o.useCallback(async()=>{if(!e||!a)return null;const S=await i(`/ai/projects/${e}/board/items/${a}${m}`);return(await I(S)).data},[e,a,i,m]),f=Se(p,h,{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3}),g=es((S,$)=>{if(!s||!e||!a||S>0&&$&&!$.has_more)return null;const Z=S===0||$==null?void 0:$.next_cursor;return["wacht-ai-board-item-assignments",e,a,l,d,c,Z||""]},async([,S,$,,Z,R,L])=>{const O=new URLSearchParams({limit:String(R)});r.includeArchived&&O.set("include_archived","true"),Z==="desc"&&O.set("order","desc"),L&&O.set("cursor",String(L));const F=await i(`/ai/projects/${S}/board/items/${$}/assignments?${O.toString()}`);return(await I(F)).data},{revalidateOnFocus:!1,revalidateFirstPage:!0,persistSize:!0,refreshInterval:15e3,dedupingInterval:15e3}),x=o.useCallback(async()=>{if(!e||!a)return{exists:!1,files:[]};const S=await i(`/ai/projects/${e}/board/items/${a}/filesystem${m}`);return(await I(S)).data},[e,a,i,m]),w=Se(u,x,{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3}),b=o.useCallback(async(S,$=[])=>{if(!e||!a)throw new Error("projectId and itemId are required");const Z=await i(`/ai/projects/${e}/board/items/${a}/update`,{method:"POST",body:zo(S,$)}),R=await I(Z);return await f.mutate(),await w.mutate(),R},[e,a,i,f,w]),j=o.useCallback(async()=>{if(!e||!a)throw new Error("projectId and itemId are required");const S=await i(`/ai/projects/${e}/board/items/${a}/archive`,{method:"POST",body:new URLSearchParams}),$=await I(S);return await f.mutate(),$},[e,a,i,f]),v=o.useCallback(async()=>{if(!e||!a)throw new Error("projectId and itemId are required");const S=await i(`/ai/projects/${e}/board/items/${a}/unarchive`,{method:"POST",body:new URLSearchParams}),$=await I(S);return await f.mutate(),$},[e,a,i,f]),k=o.useCallback(async()=>{if(!e||!a)throw new Error("projectId and itemId are required");const S=await i(`/ai/projects/${e}/board/items/${a}/cancel`,{method:"POST",body:new URLSearchParams}),$=await I(S);return await f.mutate(),await g.mutate(),$},[e,a,i,f,g]),N=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const $=new FormData;if(S.freeform_text&&S.freeform_text.trim()!=="")$.append("freeform_text",S.freeform_text);else for(const L of S.answers??[])$.append("answer_question_id",L.question_id),$.append("answer_value",JSON.stringify(L.value));const Z=await i(`/ai/projects/${e}/board/items/${a}/answer`,{method:"POST",body:$}),R=await I(Z);return await f.mutate(),R},[e,a,i,f]),_=o.useCallback(async S=>{var O;if(!e||!a)throw new Error("projectId and itemId are required");const $=f.data,Z=(O=$==null?void 0:$.pending_approval)==null?void 0:O.request_message_id;if(!Z)throw new Error("Task has no pending approval");const R=new FormData;R.set("request_message_id",Z);for(const F of S)R.append("approval_tool_name",F.tool_name),R.append("approval_mode",F.mode);const L=await i(`/ai/projects/${e}/board/items/${a}/approval`,{method:"POST",body:R});return await f.mutate(),L.ok},[e,a,i,f]),C=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const $=await i(`/ai/projects/${e}/board/items/${a}/filesystem/file${sr(S,r.includeArchived)}`);return await I($)},[e,a,i,r.includeArchived]),y=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const $=await i(`/ai/projects/${e}/board/items/${a}/filesystem/download${sr(S,r.includeArchived)}`);if(!$.ok)throw new Error("Failed to download file");const Z=await $.blob(),R=S.split("/").pop()||"file",L=URL.createObjectURL(Z),O=document.createElement("a");O.href=L,O.download=R,document.body.appendChild(O),O.click(),O.remove(),URL.revokeObjectURL(L)},[e,a,i,r.includeArchived]),E=o.useCallback(async S=>{if(!e||!a)throw new Error("projectId and itemId are required");const $=await i(`/ai/projects/${e}/board/items/${a}/filesystem${Io(S,r.includeArchived)}`);return await I($)},[e,a,i,r.includeArchived]),A=o.useMemo(()=>{var S;return((S=g.data)==null?void 0:S.flatMap($=>$.data||[]))||[]},[g.data]),H=g.data&&((T=g.data[g.data.length-1])==null?void 0:T.has_more)||!1,M=g.isValidating&&!!g.data&&g.size>(((P=g.data)==null?void 0:P.length)||0);return{item:f.data||null,assignments:A,assignmentsHasMore:H,assignmentsLoadingMore:M,loadMoreAssignments:async()=>{!H||M||await g.setSize(S=>S+1)},taskWorkspace:w.data||{exists:!1,files:[]},taskWorkspaceLoading:!w.data&&!w.error,taskWorkspaceError:w.error||null,loading:!f.data&&!f.error||!g.data&&!g.error,error:f.error||g.error||null,updateItem:b,archiveItem:j,unarchiveItem:v,cancelItem:k,submitAnswer:N,submitApproval:_,getTaskWorkspaceFile:C,downloadTaskWorkspaceFile:y,listTaskWorkspaceDirectory:E,refetch:async()=>{await f.mutate(),await g.mutate(),await w.mutate()},refetchAssignments:async()=>{await g.mutate()},refetchTaskWorkspace:async()=>{await w.mutate()}}}function Xd(e,a=!0){var g;const{client:s}=je(),{data:r,error:i,mutate:l,isLoading:m,size:d,setSize:c,isValidating:p}=es((x,w)=>{if(!a||!e||x>0&&(!w||!w.has_more))return null;const b=x===0||w==null?void 0:w.next_cursor;return["wacht-ai-thread-graphs",e,b]},async([,x,w])=>{const b=new URLSearchParams;b.set("limit","10"),w&&b.set("cursor",String(w));const j=await s(`/ai/threads/${x}/task-graphs?${b.toString()}`),k=(await I(j)).data||{data:[],limit:10,has_more:!1};return{...k,data:(k.data||[]).map(N=>({...N,nodes:Array.isArray(N.nodes)?N.nodes:[],edges:Array.isArray(N.edges)?N.edges:[],summary:N.summary||null}))}},{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3,revalidateFirstPage:!0,revalidateAll:!1,persistSize:!0}),u=o.useMemo(()=>r?r.flatMap(x=>x.data||[]):[],[r]),h=r&&((g=r[r.length-1])==null?void 0:g.has_more)||!1,f=p&&!!r&&d>((r==null?void 0:r.length)||0);return{graphs:u,latestGraph:u[0]||null,has_more:h,loadingMore:f,loading:m,error:i,loadMore:async()=>{!h||f||await c(d+1)},refetch:async()=>{await l()}}}function e2(e,a,s=!0){const{client:r}=je(),i=s&&e&&a?`wacht-ai-board-item-comments:${e}:${a}`:null,l=o.useCallback(async()=>{if(!e||!a)return[];const c=await r(`/ai/projects/${e}/board/items/${a}/comments`);return(await I(c)).data},[e,a,r]),m=Se(i,l,{revalidateOnFocus:!1,refreshInterval:15e3,dedupingInterval:15e3}),d=o.useCallback(async(c,p)=>{if(!e||!a)throw new Error("projectId and itemId are required");const u=new FormData;if(u.set("body",c),p)for(const g of p)u.append("attachments",g,g.name);const h=await r(`/ai/projects/${e}/board/items/${a}/comments`,{method:"POST",body:u}),f=await I(h);return await m.mutate(),f},[e,a,r,m]);return{comments:m.data||[],loading:!m.data&&!m.error,error:m.error||null,createComment:d,refetch:async()=>{await m.mutate()}}}function t2(e=!0){const{client:a}=je(),s=e?"wacht-ai-actor-mcp-servers":null,r=o.useCallback(async()=>{const u=await a("/ai/mcp-servers");return(await I(u)).data},[a]),{data:i,error:l,mutate:m,isLoading:d}=Se(s,r,{revalidateOnFocus:!1}),c=o.useCallback(async u=>{const h=await a(`/ai/mcp-servers/${u}/connect`,{method:"POST",body:new URLSearchParams});return I(h)},[a]),p=o.useCallback(async u=>{const h=await a(`/ai/mcp-servers/${u}/disconnect`,{method:"POST",body:new URLSearchParams}),f=await I(h);return await m(),f},[a,m]);return{servers:i??[],loading:d,error:l,connect:c,disconnect:p,refetch:async()=>{await m()}}}function a2(e=!0){const{client:a}=je(),s=e?"wacht-ai-external-agent-connections":null,r=o.useCallback(async()=>{const u=await a("/ai/external-connections");return(await I(u)).data},[a]),{data:i,error:l,mutate:m,isLoading:d}=Se(s,r,{revalidateOnFocus:!1}),c=o.useCallback(async(u,h,f)=>{const g=await a(`/ai/external-connections/${encodeURIComponent(u)}/${encodeURIComponent(h)}/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({return_url:(f==null?void 0:f.returnUrl)??""})}),x=await I(g);return await m(),x.data},[a,m]),p=o.useCallback(async(u,h)=>{const f=await a(`/ai/external-connections/${encodeURIComponent(u)}/${encodeURIComponent(h)}`,{method:"DELETE"}),g=await I(f);return await m(),g.data},[a,m]);return{connections:i??[],loading:d,error:l,connect:c,disconnect:p,refetch:async()=>{await m()}}}function Do(e){const a=new URLSearchParams;return a.append("url",e.url),e.description&&a.append("description",e.description),e.subscribed_events&&e.subscribed_events.forEach(s=>a.append("subscribed_events",s)),e.subscriptions&&e.subscriptions.length>0&&a.append("subscriptions",JSON.stringify(e.subscriptions)),e.headers&&Object.entries(e.headers).forEach(([s,r])=>{a.append(`headers[${s}]`,r)}),e.rate_limit_config&&(a.append("rate_limit[duration_ms]",e.rate_limit_config.duration_ms.toString()),a.append("rate_limit[max_requests]",e.rate_limit_config.max_requests.toString())),a}function s2(e){const a=new URLSearchParams;return e.url&&a.append("url",e.url),e.description!==void 0&&a.append("description",e.description||""),e.subscribed_events&&e.subscribed_events.forEach(s=>a.append("subscribed_events",s)),e.subscriptions&&e.subscriptions.length>0&&a.append("subscriptions",JSON.stringify(e.subscriptions)),e.headers&&Object.entries(e.headers).forEach(([s,r])=>{a.append(`headers[${s}]`,r)}),e.is_active!==void 0&&a.append("is_active",e.is_active.toString()),e.rate_limit_config&&(a.append("rate_limit[duration_ms]",e.rate_limit_config.duration_ms.toString()),a.append("rate_limit[max_requests]",e.rate_limit_config.max_requests.toString())),a}function n2(e){const a=new URLSearchParams;return a.append("event_name",e.event_name),a.append("payload",JSON.stringify(e.payload||{})),a}function r2(e){const a=new URLSearchParams;return(e.delivery_ids||[]).forEach(r=>a.append("delivery_ids",r)),e.start_date&&a.append("start_date",e.start_date),e.end_date&&a.append("end_date",e.end_date),e.status&&a.append("status",e.status),e.event_name&&a.append("event_name",e.event_name),e.endpoint_id&&a.append("endpoint_id",e.endpoint_id),e.idempotency_key&&a.append("idempotency_key",e.idempotency_key),a}const xs={"Content-Type":"application/x-www-form-urlencoded"};async function Mt(e,a){const s=await I(e);if(!s||!("data"in s))throw new Error(a);return s}async function i2(e){const a=await e("/webhook/session",{method:"GET"});if(!a.ok)throw a.status===401||a.status===403?new Error("NO_SESSION"):new Error("Failed to fetch webhook app session");return(await Mt(a,"Failed to fetch webhook app session")).data}async function o2(e,a){if(!(await e(`/session/ticket/exchange?ticket=${encodeURIComponent(a)}`,{method:"GET"})).ok)throw new Error("Failed to exchange ticket")}async function l2(e,a){const s=Do(a),r=await e("/webhook/endpoints",{method:"POST",headers:xs,body:s.toString()});return Mt(r,"Failed to create webhook endpoint")}async function c2(e,a,s){const r=s2(s),i=await e(`/webhook/endpoints/${a}`,{method:"PUT",headers:xs,body:r.toString()});return Mt(i,"Failed to update webhook endpoint")}async function d2(e,a){const s=await e(`/webhook/endpoints/${a}`,{method:"DELETE"});return Mt(s,"Failed to delete webhook endpoint")}async function u2(e,a,s){const r=n2(s),i=await e(`/webhook/endpoints/${a}/test`,{method:"POST",headers:xs,body:r.toString()});return Mt(i,"Failed to test webhook endpoint")}async function m2(e){const a=await e("/webhook/rotate-secret",{method:"POST"});return Mt(a,"Failed to rotate signing secret")}async function p2(e,a){const s=new URLSearchParams;for(const i of a.failure_notification_emails)s.append("failure_notification_emails",i);const r=await e("/webhook/settings",{method:"PUT",headers:xs,body:s.toString()});return Mt(r,"Failed to update webhook settings")}async function h2(e,a){const s=r2(a),r=await e("/webhook/deliveries/replay",{method:"POST",headers:xs,body:s.toString()});return Mt(r,"Failed to replay webhook delivery")}async function f2(e,a){const s=await e(`/webhook/deliveries/${a}`,{method:"GET"});return Mt(s,"Failed to fetch delivery details")}async function w2(e,{taskId:a}){const s=await e(`/webhook/deliveries/replay/${a}`,{method:"GET"});return Mt(s,"Failed to fetch replay task status")}async function g2(e,a){const s=(a==null?void 0:a.limit)??50,r=(a==null?void 0:a.offset)??0,i=await e(`/webhook/deliveries/replay?limit=${s}&offset=${r}`,{method:"GET"});return Mt(i,"Failed to fetch replay tasks")}async function x2(e,{taskId:a}){const s=await e(`/webhook/deliveries/replay/${a}/cancel`,{method:"POST"});return Mt(s,"Failed to cancel replay task")}function v2(e){const{client:a}=je(),[s,r]=o.useState(!e),[i,l]=o.useState(!!e),[m,d]=o.useState(null),c=o.useRef(!1),p=o.useRef(!1),u=o.useRef(null),h=s,f=o.useCallback(async()=>i2(a),[a]),{data:g,error:x,isLoading:w,mutate:b}=Se(h?"wacht-webhook-app-session":null,f,{revalidateOnFocus:!1,shouldRetryOnError:!1});o.useEffect(()=>{if(!e||c.current||p.current||u.current===e)return;u.current=e,(async()=>{p.current=!0,l(!0);try{await o2(a,e),c.current=!0,r(!0)}catch(Z){d(Z instanceof Error?Z:new Error("Failed to exchange ticket"))}finally{l(!1),p.current=!1}})()},[e,a]);const j=o.useCallback(async $=>l2(a,$),[a]),v=o.useCallback(async($,Z)=>c2(a,$,Z),[a]),k=o.useCallback(async $=>d2(a,$),[a]),N=o.useCallback(async($,Z)=>u2(a,$,Z),[a]),_=o.useCallback(async()=>m2(a),[a]),C=o.useCallback(async $=>h2(a,$),[a]),y=o.useCallback(async $=>p2(a,$),[a]),E=o.useCallback(async $=>f2(a,$),[a]),A=o.useCallback(async $=>w2(a,$),[a]),H=o.useCallback(async $=>g2(a,$),[a]),M=o.useCallback(async $=>x2(a,$),[a]),T=!x||x.message!=="NO_SESSION",P=m||(x&&x.message!=="NO_SESSION"?x:null);return{hasSession:T,sessionLoading:i||h&&w,sessionError:P,sessionId:(g==null?void 0:g.session_id)||null,webhookApp:(g==null?void 0:g.webhook_app)||null,ticketExchanged:s,ticketLoading:i,refetch:async()=>{await b()},createEndpoint:j,updateEndpoint:v,deleteEndpoint:k,testEndpoint:N,rotateSecret:_,updateSettings:y,replayDelivery:C,fetchReplayTaskStatus:A,fetchReplayTasks:H,cancelReplayTask:M,fetchDeliveryDetail:E}}function b2(){const{client:e}=je(),a=o.useCallback(async()=>{const m=await e("/webhook/stats",{method:"GET"});return(await I(m)).data},[e]),{data:s,error:r,isLoading:i,mutate:l}=Se("wacht-webhook-stats",a,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{stats:s||null,loading:i,error:r,refetch:()=>l()}}function y2(){const{client:e}=je(),a=o.useCallback(async()=>{const m=await e("/webhook/endpoints",{method:"GET"});return(await I(m)).data},[e]),{data:s,error:r,isLoading:i,mutate:l}=Se("wacht-webhook-endpoints",a,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{endpoints:s||[],loading:i,error:r,refetch:()=>l()}}function j2(){const{client:e}=je();return{createEndpoint:o.useCallback(async s=>{const r=Do(s),i=await e("/webhook/endpoints",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});return await I(i)},[e]),loading:!1,error:null}}function _2(){const{client:e}=je(),a=o.useCallback(async()=>{const m=await e("/webhook/events",{method:"GET"});return(await I(m)).data},[e]),{data:s,error:r,isLoading:i,mutate:l}=Se("wacht-webhook-events",a,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{events:s||[],loading:i,error:r,refetch:()=>l()}}function k2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const d=new URLSearchParams;e.endpoint_id&&d.set("endpoint_id",e.endpoint_id),e.status&&d.set("status",e.status),e.event_name&&d.set("event_name",e.event_name),e.limit&&d.set("limit",e.limit.toString()),e.cursor&&d.set("cursor",e.cursor);const c=await a(`/webhook/deliveries?${d.toString()}`,{method:"GET"});return(await I(c)).data},[a,e.endpoint_id,e.status,e.event_name,e.limit,e.cursor]),{data:r,error:i,isLoading:l,mutate:m}=Se(()=>{const d=new URLSearchParams;return e.endpoint_id&&d.set("endpoint_id",e.endpoint_id),e.status&&d.set("status",e.status),e.event_name&&d.set("event_name",e.event_name),e.limit&&d.set("limit",e.limit.toString()),e.cursor&&d.set("cursor",e.cursor),`wacht-webhook-deliveries?${d.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{deliveries:(r==null?void 0:r.data)||[],has_more:(r==null?void 0:r.has_more)||!1,next_cursor:r==null?void 0:r.next_cursor,loading:l,error:i,refetch:()=>m()}}function C2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const d=new URLSearchParams;e.start_date&&d.set("start_date",e.start_date),e.end_date&&d.set("end_date",e.end_date),e.endpoint_id&&d.set("endpoint_id",e.endpoint_id),e.fields&&e.fields.length>0&&d.set("fields",e.fields.join(","));const c=await a(`/webhook/analytics?${d.toString()}`,{method:"GET"});return(await I(c)).data},[a,e.start_date,e.end_date,e.endpoint_id,e.fields]),{data:r,error:i,isLoading:l,mutate:m}=Se(()=>{const d=new URLSearchParams;return e.start_date&&d.set("start_date",e.start_date),e.end_date&&d.set("end_date",e.end_date),e.endpoint_id&&d.set("endpoint_id",e.endpoint_id),e.fields&&e.fields.length>0&&d.set("fields",e.fields.join(",")),`wacht-webhook-analytics?${d.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{analytics:r||null,loading:l,error:i,refetch:()=>m()}}function N2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const d=new URLSearchParams;e.start_date&&d.set("start_date",e.start_date),e.end_date&&d.set("end_date",e.end_date),e.interval&&d.set("interval",e.interval),e.endpoint_id&&d.set("endpoint_id",e.endpoint_id);const c=await a(`/webhook/analytics/timeseries?${d.toString()}`,{method:"GET"});return(await I(c)).data},[a,e.start_date,e.end_date,e.interval,e.endpoint_id]),{data:r,error:i,isLoading:l,mutate:m}=Se(()=>{const d=new URLSearchParams;return e.start_date&&d.set("start_date",e.start_date),e.end_date&&d.set("end_date",e.end_date),e.interval&&d.set("interval",e.interval),e.endpoint_id&&d.set("endpoint_id",e.endpoint_id),`wacht-webhook-timeseries?${d.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{timeseries:(r==null?void 0:r.data)||[],interval:(r==null?void 0:r.interval)||"hour",loading:l,error:i,refetch:()=>m()}}function S2(e){const{client:a}=je(),[s,r]=o.useState(!e),[i,l]=o.useState(!!e),[m,d]=o.useState(null),c=o.useRef(!1),p=o.useRef(!1),u=o.useRef(null),h=s,f=o.useCallback(async()=>{const N=await a("/api-auth/session",{method:"GET"});if(!N.ok)throw N.status===401||N.status===403?new Error("NO_SESSION"):new Error("Failed to fetch API auth app session");return(await I(N)).data},[a]),{data:g,error:x,isLoading:w,mutate:b}=Se(h?"wacht-api-auth-app-session":null,f,{revalidateOnFocus:!1,shouldRetryOnError:!1});o.useEffect(()=>{if(!e||c.current||p.current||u.current===e)return;u.current=e,(async()=>{p.current=!0,l(!0);try{(await a(`/session/ticket/exchange?ticket=${encodeURIComponent(e)}`,{method:"GET"})).ok?(c.current=!0,r(!0)):d(new Error("Failed to exchange ticket"))}catch(_){d(_ instanceof Error?_:new Error("Failed to exchange ticket"))}finally{l(!1),p.current=!1}})()},[e,a]);const j=!x||x.message!=="NO_SESSION",v=m||(x&&x.message!=="NO_SESSION"?x:null);return{hasSession:j,sessionLoading:i||h&&w,sessionError:v,sessionId:(g==null?void 0:g.session_id)||null,apiAuthApp:(g==null?void 0:g.api_auth_app)||null,ticketExchanged:s,ticketLoading:i,refetch:async()=>{await b()}}}function E2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const u=new URLSearchParams;e.status&&u.set("status",e.status);const h=await a(`/api-auth/keys${u.toString()?`?${u.toString()}`:""}`,{method:"GET"});return(await I(h)).data},[a,e.status]),{data:r,error:i,isLoading:l,mutate:m}=Se(`wacht-api-auth-keys:${e.status||"all"}`,s,{revalidateOnFocus:!1,shouldRetryOnError:!1}),d=o.useCallback(async u=>{const h=new URLSearchParams;h.set("name",u.name),u.expires_at&&h.set("expires_at",u.expires_at);const f=await a("/api-auth/keys",{method:"POST",body:h}),g=await I(f);return await m(),g},[a,m]),c=o.useCallback(async u=>{const h=await a(`/api-auth/keys/${u.key_id}/rotate`,{method:"POST"}),f=await I(h);return await m(),f},[a,m]),p=o.useCallback(async u=>{const h=new URLSearchParams;u.reason&&h.set("reason",u.reason);const f=await a(`/api-auth/keys/${u.key_id}/revoke`,{method:"POST",body:h}),g=await I(f);return await m(),g},[a,m]);return{keys:r||[],createKey:d,rotateKey:c,revokeKey:p,loading:l,error:i,refetch:()=>m()}}function A2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const d=new URLSearchParams;e.limit&&d.set("limit",e.limit.toString()),e.cursor&&d.set("cursor",e.cursor),e.outcome&&d.set("outcome",e.outcome),e.key_id&&d.set("key_id",e.key_id),e.start_date&&d.set("start_date",e.start_date),e.end_date&&d.set("end_date",e.end_date);const c=await a(`/api-auth/audit/logs?${d.toString()}`,{method:"GET"});return(await I(c)).data},[a,e.limit,e.cursor,e.outcome,e.key_id,e.start_date,e.end_date]),{data:r,error:i,isLoading:l,mutate:m}=Se(()=>{const d=new URLSearchParams;return e.limit&&d.set("limit",e.limit.toString()),e.cursor&&d.set("cursor",e.cursor),e.outcome&&d.set("outcome",e.outcome),e.key_id&&d.set("key_id",e.key_id),e.start_date&&d.set("start_date",e.start_date),e.end_date&&d.set("end_date",e.end_date),`wacht-api-auth-audit-logs?${d.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{logs:(r==null?void 0:r.data)||[],limit:(r==null?void 0:r.limit)||e.limit||0,has_more:(r==null?void 0:r.has_more)||!1,next_cursor:r==null?void 0:r.next_cursor,loading:l,error:i,refetch:()=>m()}}function M2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const d=new URLSearchParams;e.start_date&&d.set("start_date",e.start_date),e.end_date&&d.set("end_date",e.end_date),e.key_id&&d.set("key_id",e.key_id),e.include_top_keys&&d.set("include_top_keys","true"),e.include_top_paths&&d.set("include_top_paths","true"),e.include_blocked_reasons&&d.set("include_blocked_reasons","true"),e.include_rate_limits&&d.set("include_rate_limits","true"),e.top_limit&&d.set("top_limit",e.top_limit.toString());const c=await a(`/api-auth/audit/analytics?${d.toString()}`,{method:"GET"});return(await I(c)).data},[a,e.start_date,e.end_date,e.key_id,e.include_top_keys,e.include_top_paths,e.include_blocked_reasons,e.include_rate_limits,e.top_limit]),{data:r,error:i,isLoading:l,mutate:m}=Se(()=>{const d=new URLSearchParams;return e.start_date&&d.set("start_date",e.start_date),e.end_date&&d.set("end_date",e.end_date),e.key_id&&d.set("key_id",e.key_id),e.include_top_keys&&d.set("include_top_keys","true"),e.include_top_paths&&d.set("include_top_paths","true"),e.include_blocked_reasons&&d.set("include_blocked_reasons","true"),e.include_rate_limits&&d.set("include_rate_limits","true"),e.top_limit&&d.set("top_limit",e.top_limit.toString()),`wacht-api-auth-audit-analytics?${d.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{analytics:r||null,loading:l,error:i,refetch:()=>m()}}function R2(e={}){const{client:a}=je(),s=o.useCallback(async()=>{const d=new URLSearchParams;e.start_date&&d.set("start_date",e.start_date),e.end_date&&d.set("end_date",e.end_date),e.interval&&d.set("interval",e.interval),e.key_id&&d.set("key_id",e.key_id);const c=await a(`/api-auth/audit/timeseries?${d.toString()}`,{method:"GET"});return(await I(c)).data},[a,e.start_date,e.end_date,e.interval,e.key_id]),{data:r,error:i,isLoading:l,mutate:m}=Se(()=>{const d=new URLSearchParams;return e.start_date&&d.set("start_date",e.start_date),e.end_date&&d.set("end_date",e.end_date),e.interval&&d.set("interval",e.interval),e.key_id&&d.set("key_id",e.key_id),`wacht-api-auth-audit-timeseries?${d.toString()}`},s,{revalidateOnFocus:!1,shouldRetryOnError:!1});return{timeseries:(r==null?void 0:r.data)||[],interval:(r==null?void 0:r.interval)||e.interval||"hour",loading:l,error:i,refetch:()=>m()}}const Uo=()=>{const{client:e}=je(),[a,s]=o.useState(!1),[r,i]=o.useState(null),[l,m]=o.useState(null),d=o.useCallback(async p=>{s(!0),i(null),m(null);try{const u=new FormData;u.append("token",p);const h=await e("/organizations/invitations/accept",{method:"POST",body:u}),g=(await I(h)).data;return m(g),g.error_code&&i(g.message||"Failed to accept invitation"),g}catch(u){const h=u.message||"Failed to accept invitation";i(h);const f={error_code:"NETWORK_ERROR",message:h};return m(f),f}finally{s(!1)}},[e]),c=o.useCallback(()=>{i(null),m(null)},[]);return{acceptInvitation:d,invitationData:l,loading:a,error:r,reset:c}},L2=({children:e})=>{const{loading:a}=_e();return a?null:t.jsx(t.Fragment,{children:e})},P2=({children:e})=>{const{loading:a}=_e();return a?t.jsx(t.Fragment,{children:e}):null},$2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,44H32A20,20,0,0,0,12,64V88a20,20,0,0,0,16,19.6V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V107.6A20,20,0,0,0,244,88V64A20,20,0,0,0,224,44ZM36,68H220V84H36ZM52,188V108H204v80Zm112-52a12,12,0,0,1-12,12H104a12,12,0,0,1,0-24h48A12,12,0,0,1,164,136Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,96v96a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96Z",opacity:"0.2"}),n.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM208,192H48V104H208ZM224,88H32V64H224V88ZM96,136a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm-72,96H104a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm72-56H32V64H224V88Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,50H32A14,14,0,0,0,18,64V88a14,14,0,0,0,14,14h2v90a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V102h2a14,14,0,0,0,14-14V64A14,14,0,0,0,224,50ZM210,192a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V102H210ZM226,88a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H224a2,2,0,0,1,2,2ZM98,136a6,6,0,0,1,6-6h48a6,6,0,0,1,0,12H104A6,6,0,0,1,98,136Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V88a16,16,0,0,0,16,16v88a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V104a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM208,192H48V104H208ZM224,88H32V64H224V88ZM96,136a8,8,0,0,1,8-8h48a8,8,0,0,1,0,16H104A8,8,0,0,1,96,136Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,52H32A12,12,0,0,0,20,64V88a12,12,0,0,0,12,12h4v92a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V100h4a12,12,0,0,0,12-12V64A12,12,0,0,0,224,52ZM212,192a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V100H212ZM228,88a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H224a4,4,0,0,1,4,4ZM100,136a4,4,0,0,1,4-4h48a4,4,0,0,1,0,8H104A4,4,0,0,1,100,136Z"}))]]),O2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),n.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"}))]]),Z2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z",opacity:"0.2"}),n.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z"}))]]),H2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216.49,184.49l-32,32a12,12,0,0,1-17-17L179,188H48a12,12,0,0,1,0-24H179l-11.52-11.51a12,12,0,0,1,17-17l32,32A12,12,0,0,1,216.49,184.49Zm-145-64a12,12,0,0,0,17-17L77,92H208a12,12,0,0,0,0-24H77L88.49,56.49a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,80v96H48V80Z",opacity:"0.2"}),n.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M42.34,85.66a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,88,48V72H208a8,8,0,0,1,0,16H88v24a8,8,0,0,1-13.66,5.66Zm171.32,84.68-32-32A8,8,0,0,0,168,144v24H48a8,8,0,0,0,0,16H168v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,213.66,170.34Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M212.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L193.51,182H48a6,6,0,0,1,0-12H193.51l-21.75-21.76a6,6,0,0,1,8.48-8.48ZM75.76,116.24a6,6,0,0,0,8.48-8.48L62.49,86H208a6,6,0,0,0,0-12H62.49L84.24,52.24a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M210.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L198.34,180H48a4,4,0,0,1,0-8H198.34l-25.17-25.17a4,4,0,0,1,5.66-5.66ZM77.17,114.83a4,4,0,0,0,5.66-5.66L57.66,84H208a4,4,0,0,0,0-8H57.66L82.83,50.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66Z"}))]]),F2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),n.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"}))]]),T2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216.88,207.93l-160-176A12,12,0,1,0,39.12,48.07l14.8,16.29A83.58,83.58,0,0,0,44,104c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.68,186,19.75,19.75,0,0,0,48,196H84.19a44,44,0,0,0,87.62,0h1.79l25.52,28.07a12,12,0,0,0,17.76-16.14ZM68,104a59.84,59.84,0,0,1,3.52-20.29L151.78,172H54.68C63.52,154,68,131.14,68,104Zm60,108a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM88.89,42.35a12,12,0,0,1,6.37-15.73A84,84,0,0,1,212,104c0,18.68,2.38,34.93,7.07,48.28a12,12,0,1,1-22.64,8C190.83,144.32,188,125.4,188,104a60,60,0,0,0-83.38-55.28A12,12,0,0,1,88.89,42.35Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),n.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L58.82,63.8A79.59,79.59,0,0,0,48,104c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.8a40,40,0,0,0,78.4,0h15.44l19.44,21.38a8,8,0,1,0,11.84-10.76ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a63.65,63.65,0,0,1,6.26-27.62L168.09,184Zm166-4.73a8.13,8.13,0,0,1-2.93.55,8,8,0,0,1-7.44-5.08C196.35,156.19,192,129.75,192,104A64,64,0,0,0,96.43,48.31a8,8,0,0,1-7.9-13.91A80,80,0,0,1,208,104c0,35.35,8.05,58.59,10.52,64.88A8,8,0,0,1,214,179.25Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.84,192v0a1.85,1.85,0,0,1-3,.28L83.27,43.19a4,4,0,0,1,.8-6A79.55,79.55,0,0,1,129.17,24C173,24.66,207.8,61.1,208,104.92c.14,34.88,8.31,61.54,13.82,71A15.89,15.89,0,0,1,221.84,192Zm-7.92,18.62a8,8,0,0,1-11.85,10.76L182.62,200H167.16a40,40,0,0,1-78.41,0H47.91a15.78,15.78,0,0,1-13.59-7.59,16.42,16.42,0,0,1-.09-16.68c5.55-9.73,13.7-36.64,13.7-71.73A79.42,79.42,0,0,1,58.79,63.85L42,45.38A8,8,0,1,1,53.84,34.62ZM150.59,200H105.32a24,24,0,0,0,45.27,0Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L61.31,63.56A77.45,77.45,0,0,0,50,104c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198h42.5a38,38,0,0,0,75,0h18l20,22a6,6,0,0,0,8.88-8.08ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218ZM48,186a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.86,170,62,139.69,62,104a65.63,65.63,0,0,1,7.78-31.12L172.62,186Zm165.29-8.62a5.88,5.88,0,0,1-2.2.42,6,6,0,0,1-5.58-3.81c-7.2-18.31-11.49-44.48-11.49-70A66,66,0,0,0,95.45,46.57a6,6,0,1,1-5.93-10.43A78,78,0,0,1,206,104c0,35.7,8.16,59.24,10.66,65.61A6,6,0,0,1,213.27,177.38Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L58.82,63.8A79.59,79.59,0,0,0,48,104c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.8a40,40,0,0,0,78.4,0h15.44l19.44,21.38a8,8,0,1,0,11.84-10.76ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a63.65,63.65,0,0,1,6.26-27.62L168.09,184Zm166-4.73a8.13,8.13,0,0,1-2.93.55,8,8,0,0,1-7.44-5.08C196.35,156.19,192,129.75,192,104A64,64,0,0,0,96.43,48.31a8,8,0,0,1-7.9-13.91A80,80,0,0,1,208,104c0,35.35,8.05,58.59,10.52,64.88A8,8,0,0,1,214,179.25Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L63.8,63.32A75.52,75.52,0,0,0,52,104c0,36.13-8.58,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0h20.64L205,218.69a4,4,0,1,0,5.92-5.38ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220ZM48,188a3.89,3.89,0,0,1-3.43-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a67.58,67.58,0,0,1,9.4-34.51L177.14,188Zm164.55-12.48a3.94,3.94,0,0,1-1.46.28,4,4,0,0,1-3.72-2.54C200.24,155.17,196,129.28,196,104A68,68,0,0,0,94.46,44.83a4,4,0,1,1-4-6.95A76,76,0,0,1,204,104c0,36.05,8.26,59.89,10.79,66.34A4,4,0,0,1,212.53,175.52Z"}))]]),I2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,204H228V96a20,20,0,0,0-20-20H172V32a20,20,0,0,0-28.45-18.12l-104,48.54A20.06,20.06,0,0,0,28,80.55V204H16a12,12,0,0,0,0,24H240a12,12,0,0,0,0-24ZM204,100V204H172V100ZM52,83.09,148,38.3V204H52ZM132,112v12a12,12,0,0,1-24,0V112a12,12,0,0,1,24,0Zm-40,0v12a12,12,0,0,1-24,0V112a12,12,0,0,1,24,0Zm0,52v12a12,12,0,0,1-24,0V164a12,12,0,0,1,24,0Zm40,0v12a12,12,0,0,1-24,0V164a12,12,0,0,1,24,0Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M136,32V216H40V85.35a8,8,0,0,1,3.56-6.66l80-53.33A8,8,0,0,1,136,32Z",opacity:"0.2"}),n.createElement("path",{d:"M240,208H224V96a16,16,0,0,0-16-16H144V32a16,16,0,0,0-24.88-13.32L39.12,72A16,16,0,0,0,32,85.34V208H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM208,96V208H144V96ZM48,85.34,128,32V208H48ZM112,112v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm-32,0v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm0,56v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Zm32,0v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M239.73,208H224V96a16,16,0,0,0-16-16H164a4,4,0,0,0-4,4V208H144V32.41a16.43,16.43,0,0,0-6.16-13,16,16,0,0,0-18.72-.69L39.12,72A16,16,0,0,0,32,85.34V208H16.27A8.18,8.18,0,0,0,8,215.47,8,8,0,0,0,16,224H240a8,8,0,0,0,8-8.53A8.18,8.18,0,0,0,239.73,208ZM76,184a8,8,0,0,1-8.53,8A8.18,8.18,0,0,1,60,183.72V168.27A8.19,8.19,0,0,1,67.47,160,8,8,0,0,1,76,168Zm0-56a8,8,0,0,1-8.53,8A8.19,8.19,0,0,1,60,127.72V112.27A8.19,8.19,0,0,1,67.47,104,8,8,0,0,1,76,112Zm40,56a8,8,0,0,1-8.53,8,8.18,8.18,0,0,1-7.47-8.26V168.27a8.19,8.19,0,0,1,7.47-8.26,8,8,0,0,1,8.53,8Zm0-56a8,8,0,0,1-8.53,8,8.19,8.19,0,0,1-7.47-8.26V112.27a8.19,8.19,0,0,1,7.47-8.26,8,8,0,0,1,8.53,8Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,210H222V96a14,14,0,0,0-14-14H142V32a14,14,0,0,0-21.77-11.64l-80,53.33A14,14,0,0,0,34,85.34V210H16a6,6,0,0,0,0,12H240a6,6,0,0,0,0-12ZM208,94a2,2,0,0,1,2,2V210H142V94ZM46,85.34a2,2,0,0,1,.89-1.66l80-53.34A2,2,0,0,1,130,32V210H46ZM110,112v16a6,6,0,0,1-12,0V112a6,6,0,0,1,12,0Zm-32,0v16a6,6,0,0,1-12,0V112a6,6,0,0,1,12,0Zm0,56v16a6,6,0,0,1-12,0V168a6,6,0,0,1,12,0Zm32,0v16a6,6,0,0,1-12,0V168a6,6,0,0,1,12,0Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,208H224V96a16,16,0,0,0-16-16H144V32a16,16,0,0,0-24.88-13.32L39.12,72A16,16,0,0,0,32,85.34V208H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM208,96V208H144V96ZM48,85.34,128,32V208H48ZM112,112v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm-32,0v16a8,8,0,0,1-16,0V112a8,8,0,1,1,16,0Zm0,56v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Zm32,0v16a8,8,0,0,1-16,0V168a8,8,0,0,1,16,0Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,212H220V96a12,12,0,0,0-12-12H140V32a12,12,0,0,0-18.66-10l-80,53.33a12,12,0,0,0-5.34,10V212H16a4,4,0,0,0,0,8H240a4,4,0,0,0,0-8ZM208,92a4,4,0,0,1,4,4V212H140V92ZM44,85.34A4,4,0,0,1,45.78,82l80-53.33A4,4,0,0,1,132,32V212H44ZM108,112v16a4,4,0,0,1-8,0V112a4,4,0,0,1,8,0Zm-32,0v16a4,4,0,0,1-8,0V112a4,4,0,0,1,8,0Zm0,56v16a4,4,0,0,1-8,0V168a4,4,0,0,1,8,0Zm32,0v16a4,4,0,0,1-8,0V168a4,4,0,0,1,8,0Z"}))]]),V2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,52H182.42L170,33.34A12,12,0,0,0,160,28H96a12,12,0,0,0-10,5.34L73.57,52H48A28,28,0,0,0,20,80V192a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V80A28,28,0,0,0,208,52Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4H80a12,12,0,0,0,10-5.34L102.42,52h51.15L166,70.66A12,12,0,0,0,176,76h32a4,4,0,0,1,4,4ZM128,84a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,84Zm0,72a24,24,0,1,1,24-24A24,24,0,0,1,128,156Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,64H176L160,40H96L80,64H48A16,16,0,0,0,32,80V192a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V80A16,16,0,0,0,208,64ZM128,168a36,36,0,1,1,36-36A36,36,0,0,1,128,168Z",opacity:"0.2"}),n.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm-44,76a36,36,0,1,1-36-36A36,36,0,0,1,164,132Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,58H179.21L165,36.67A6,6,0,0,0,160,34H96a6,6,0,0,0-5,2.67L76.78,58H48A22,22,0,0,0,26,80V192a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V80A22,22,0,0,0,208,58Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V80A10,10,0,0,1,48,70H80a6,6,0,0,0,5-2.67L99.21,46h57.57L171,67.33A6,6,0,0,0,176,70h32a10,10,0,0,1,10,10ZM128,90a42,42,0,1,0,42,42A42,42,0,0,0,128,90Zm0,72a30,30,0,1,1,30-30A30,30,0,0,1,128,162Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,60H178.13L163.32,37.78A4,4,0,0,0,160,36H96a4,4,0,0,0-3.32,1.78L77.85,60H48A20,20,0,0,0,28,80V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V80A20,20,0,0,0,208,60Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V80A12,12,0,0,1,48,68H80a4,4,0,0,0,3.33-1.78L98.13,44h59.72l14.82,22.22A4,4,0,0,0,176,68h32a12,12,0,0,1,12,12ZM128,92a40,40,0,1,0,40,40A40,40,0,0,0,128,92Zm0,72a32,32,0,1,1,32-32A32,32,0,0,1,128,164Z"}))]]),z2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),n.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),D2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),n.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]),U2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),n.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),W2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),n.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),B2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M80,176h96l-48,48ZM128,32,80,80h96Z",opacity:"0.2"}),n.createElement("path",{d:"M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z"}))]]),G2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),n.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),q2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M152.41,88.56l-89.6,88a12,12,0,0,1-16.82,0L7.59,138.85a12,12,0,0,1,16.82-17.13l30,29.46,81.19-79.74a12,12,0,0,1,16.82,17.12Zm96.15-17a12,12,0,0,0-17-.15L150.4,151.18l-7.88-7.74a12,12,0,0,0-16.82,17.12l16.29,16a12,12,0,0,0,16.82,0l89.6-88A12,12,0,0,0,248.56,71.59Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,64V192a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V64A16,16,0,0,1,32,48H224A16,16,0,0,1,240,64Z",opacity:"0.2"}),n.createElement("path",{d:"M149.61,85.71l-89.6,88a8,8,0,0,1-11.22,0L10.39,136a8,8,0,1,1,11.22-11.41L54.4,156.79l84-82.5a8,8,0,1,1,11.22,11.42Zm96.1-11.32a8,8,0,0,0-11.32-.1l-84,82.5-18.83-18.5a8,8,0,0,0-11.21,11.42l24.43,24a8,8,0,0,0,11.22,0l89.6-88A8,8,0,0,0,245.71,74.39Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM72,168a8,8,0,0,1-5.66-2.34l-24-24a8,8,0,0,1,11.32-11.32L72,148.69l58.34-58.35a8,8,0,0,1,11.32,11.32l-64,64A8,8,0,0,1,72,168Zm141.66-66.34-64,64a8,8,0,0,1-11.32,0l-16-16a8,8,0,0,1,11.32-11.32L144,148.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M148.2,84.28l-89.6,88a6,6,0,0,1-8.4,0L11.8,134.57A6,6,0,1,1,20.2,126l34.2,33.58,85.4-83.87a6,6,0,1,1,8.4,8.56Zm96.08-8.48a6,6,0,0,0-8.48-.08l-85.4,83.87-20.23-19.87a6,6,0,1,0-8.41,8.56l24.44,24a6,6,0,0,0,8.4,0l89.6-88A6,6,0,0,0,244.28,75.8Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M149.61,85.71l-89.6,88a8,8,0,0,1-11.22,0L10.39,136a8,8,0,1,1,11.22-11.41L54.4,156.79l84-82.5a8,8,0,1,1,11.22,11.42Zm96.1-11.32a8,8,0,0,0-11.32-.1l-84,82.5-18.83-18.5a8,8,0,0,0-11.21,11.42l24.43,24a8,8,0,0,0,11.22,0l89.6-88A8,8,0,0,0,245.71,74.39Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M146.8,82.85l-89.6,88a4,4,0,0,1-5.6,0L13.2,133.14a4,4,0,0,1,5.6-5.71l35.6,35,86.8-85.24a4,4,0,0,1,5.6,5.7Zm96-5.65a4,4,0,0,0-5.65,0l-86.8,85.24-21.63-21.24a4,4,0,1,0-5.61,5.7l24.44,24a4,4,0,0,0,5.6,0l89.6-88A4,4,0,0,0,242.85,77.2Z"}))]]),K2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M232,128A104,104,0,1,1,128,24,104.13,104.13,0,0,1,232,128Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z"}))]]),Y2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm68-84a12,12,0,0,1-12,12H128a12,12,0,0,1-12-12V72a12,12,0,0,1,24,0v44h44A12,12,0,0,1,196,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm62-90a6,6,0,0,1-6,6H128a6,6,0,0,1-6-6V72a6,6,0,0,1,12,0v50h50A6,6,0,0,1,190,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm60-92a4,4,0,0,1-4,4H128a4,4,0,0,1-4-4V72a4,4,0,0,1,8,0v52h52A4,4,0,0,1,188,128Z"}))]]),Q2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),n.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),J2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,12H80A28,28,0,0,0,52,40V216a28,28,0,0,0,28,28h96a28,28,0,0,0,28-28V40A28,28,0,0,0,176,12ZM76,76H180V180H76Zm4-40h96a4,4,0,0,1,4,4V52H76V40A4,4,0,0,1,80,36Zm96,184H80a4,4,0,0,1-4-4V204H180v12A4,4,0,0,1,176,220Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M192,56V200H64V56Z",opacity:"0.2"}),n.createElement("path",{d:"M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM72,64H184V192H72Zm8-32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM80,32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,18H80A22,22,0,0,0,58,40V216a22,22,0,0,0,22,22h96a22,22,0,0,0,22-22V40A22,22,0,0,0,176,18ZM70,62H186V194H70ZM80,30h96a10,10,0,0,1,10,10V50H70V40A10,10,0,0,1,80,30Zm96,196H80a10,10,0,0,1-10-10V206H186v10A10,10,0,0,1,176,226Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM72,64H184V192H72Zm8-32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M176,20H80A20,20,0,0,0,60,40V216a20,20,0,0,0,20,20h96a20,20,0,0,0,20-20V40A20,20,0,0,0,176,20ZM68,60H188V196H68ZM80,28h96a12,12,0,0,1,12,12V52H68V40A12,12,0,0,1,80,28Zm96,200H80a12,12,0,0,1-12-12V204H188v12A12,12,0,0,1,176,228Z"}))]]),X2=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z",opacity:"0.2"}),n.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z"}))]]),eu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),n.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z"}))]]),tu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM193.15,68,128,127.72,62.85,68ZM44,188V83.28l75.89,69.57a12,12,0,0,0,16.22,0L212,83.28V188Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,56l-96,88L32,56Z",opacity:"0.2"}),n.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48Zm-8,144H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,50H32a6,6,0,0,0-6,6V192a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A6,6,0,0,0,224,50ZM208.58,62,128,135.86,47.42,62ZM216,194H40a2,2,0,0,1-2-2V69.64l86,78.78a6,6,0,0,0,8.1,0L218,69.64V192A2,2,0,0,1,216,194Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,52H32a4,4,0,0,0-4,4V192a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A4,4,0,0,0,224,52Zm-10.28,8L128,138.57,42.28,60ZM216,196H40a4,4,0,0,1-4-4V65.09L125.3,147a4,4,0,0,0,5.4,0L220,65.09V192A4,4,0,0,1,216,196Z"}))]]),au=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),n.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),su=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),n.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z"}))]]),nu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M160,128a224.48,224.48,0,0,1-26.37,105.54,12,12,0,1,1-21.16-11.32A200.33,200.33,0,0,0,136,128a8,8,0,0,0-16,0,12,12,0,0,1-24,0,32,32,0,0,1,64,0ZM128,56a12,12,0,1,0,0,24,48.05,48.05,0,0,1,48,48c0,7.62-.36,15.32-1.07,22.87A12,12,0,0,0,185.74,164c.38,0,.76,0,1.14,0a12,12,0,0,0,11.93-10.87c.79-8.3,1.18-16.76,1.18-25.13A72.08,72.08,0,0,0,128,56ZM96,92.23A12,12,0,0,0,80,74.35,72.1,72.1,0,0,0,56,128a120.11,120.11,0,0,1-15.12,58.37,12,12,0,0,0,21,11.69A144.14,144.14,0,0,0,80,128,48.08,48.08,0,0,1,96,92.23Zm10.1,64.1a12,12,0,0,0-14.46,8.9,158.61,158.61,0,0,1-18.88,45.86,12,12,0,0,0,20.5,12.48A182.86,182.86,0,0,0,115,170.79,12,12,0,0,0,106.1,156.33Zm76.73,24.07A12,12,0,0,0,168.19,189a241.5,241.5,0,0,1-8,24.87,12,12,0,0,0,6.91,15.49,11.76,11.76,0,0,0,4.29.8,12,12,0,0,0,11.21-7.71,260.2,260.2,0,0,0,8.79-27.37A12,12,0,0,0,182.83,180.4ZM128,16A112.12,112.12,0,0,0,16,127.44c0,.19,0,.38,0,.57a79.81,79.81,0,0,1-5,27.82,12,12,0,1,0,22.5,8.35A103.59,103.59,0,0,0,40,128.58c0-.19,0-.38,0-.57a88,88,0,0,1,176-.5c0,.16,0,.33,0,.5a282.12,282.12,0,0,1-6.74,61.38,12,12,0,0,0,9.09,14.33A11.84,11.84,0,0,0,221,204a12,12,0,0,0,11.7-9.38A305.87,305.87,0,0,0,240,128.55c0-.18,0-.36,0-.54A112.13,112.13,0,0,0,128,16Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M72,128a134.63,134.63,0,0,1-14.16,60.47,8,8,0,1,1-14.32-7.12A118.8,118.8,0,0,0,56,128,71.73,71.73,0,0,1,83,71.8,8,8,0,1,1,93,84.29,55.76,55.76,0,0,0,72,128Zm56-8a8,8,0,0,0-8,8,184.12,184.12,0,0,1-23,89.1,8,8,0,0,0,14,7.76A200.19,200.19,0,0,0,136,128,8,8,0,0,0,128,120Zm0-32a40,40,0,0,0-40,40,8,8,0,0,0,16,0,24,24,0,0,1,48,0,214.09,214.09,0,0,1-20.51,92A8,8,0,1,0,146,226.83,230,230,0,0,0,168,128,40,40,0,0,0,128,88Zm0-64A104.11,104.11,0,0,0,24,128a87.76,87.76,0,0,1-5,29.33,8,8,0,0,0,15.09,5.33A103.9,103.9,0,0,0,40,128a88,88,0,0,1,176,0,282.24,282.24,0,0,1-5.29,54.45,8,8,0,0,0,6.3,9.4,8.22,8.22,0,0,0,1.55.15,8,8,0,0,0,7.84-6.45A298.37,298.37,0,0,0,232,128,104.12,104.12,0,0,0,128,24ZM94.4,152.17A8,8,0,0,0,85,158.42a151,151,0,0,1-17.21,45.44,8,8,0,0,0,13.86,8,166.67,166.67,0,0,0,19-50.25A8,8,0,0,0,94.4,152.17ZM128,56a72.85,72.85,0,0,0-9,.56,8,8,0,0,0,2,15.87A56.08,56.08,0,0,1,184,128a252.12,252.12,0,0,1-1.92,31A8,8,0,0,0,189,168a8.39,8.39,0,0,0,1,.06,8,8,0,0,0,7.92-7,266.48,266.48,0,0,0,2-33A72.08,72.08,0,0,0,128,56Zm57.93,128.25a8,8,0,0,0-9.75,5.75c-1.46,5.69-3.15,11.4-5,17a8,8,0,0,0,5,10.13,7.88,7.88,0,0,0,2.55.42,8,8,0,0,0,7.58-5.46c2-5.92,3.79-12,5.35-18.05A8,8,0,0,0,185.94,184.26Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M126.42,24C70.73,24.85,25.21,70.09,24,125.81a103.53,103.53,0,0,0,13.52,53.54,4,4,0,0,0,7.1-.3,119.35,119.35,0,0,0,11.37-51A71.77,71.77,0,0,1,83,71.83a8,8,0,1,1,9.86,12.61A55.82,55.82,0,0,0,72,128.07a135.28,135.28,0,0,1-18.45,68.35,4,4,0,0,0,.61,4.85c2,2,4.09,4,6.25,5.82a4,4,0,0,0,6-1A151.18,151.18,0,0,0,85,158.49a8,8,0,1,1,15.68,3.19,167.33,167.33,0,0,1-21.07,53.64,4,4,0,0,0,1.6,5.63c2.47,1.25,5,2.41,7.57,3.47a4,4,0,0,0,5-1.61A183,183,0,0,0,120,128.28a8.16,8.16,0,0,1,7.44-8.21,8,8,0,0,1,8.56,8,198.94,198.94,0,0,1-25.21,97.16,4,4,0,0,0,2.95,5.92q4.55.63,9.21.86a4,4,0,0,0,3.67-2.1A214.88,214.88,0,0,0,152,128.8c.05-13.25-10.3-24.49-23.54-24.74A24,24,0,0,0,104,128a8.1,8.1,0,0,1-7.29,8,8,8,0,0,1-8.71-8,40,40,0,0,1,40.42-40c22,.23,39.68,19.17,39.57,41.16a231.37,231.37,0,0,1-20.52,94.57,4,4,0,0,0,4.62,5.51,103.49,103.49,0,0,0,10.26-3,4,4,0,0,0,2.35-2.22,243.76,243.76,0,0,0,11.48-34,8,8,0,1,1,15.5,4q-1.12,4.37-2.4,8.7a4,4,0,0,0,6.46,4.17A104,104,0,0,0,126.42,24ZM198,161.08a8,8,0,0,1-7.92,7,8.39,8.39,0,0,1-1-.06,8,8,0,0,1-6.95-8.93,252.57,252.57,0,0,0,1.92-31,56.08,56.08,0,0,0-56-56,56.78,56.78,0,0,0-7,.43,8,8,0,0,1-2-15.89,72.1,72.1,0,0,1,81,71.49A266.93,266.93,0,0,1,198,161.08Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M70,128a132.68,132.68,0,0,1-14,59.58,6,6,0,0,1-5.38,3.33,6,6,0,0,1-5.36-8.67A120.74,120.74,0,0,0,58,128,69.72,69.72,0,0,1,84.25,73.36a6,6,0,0,1,7.51,9.37A57.73,57.73,0,0,0,70,128Zm58-6a6,6,0,0,0-6,6,186.07,186.07,0,0,1-23.23,90.07,6,6,0,0,0,10.5,5.82A198.14,198.14,0,0,0,134,128,6,6,0,0,0,128,122Zm0-32a38,38,0,0,0-38,38,6,6,0,0,0,12,0,26,26,0,0,1,52,0,216.06,216.06,0,0,1-20.71,92.85A6,6,0,1,0,144.16,226,227.94,227.94,0,0,0,166,128,38,38,0,0,0,128,90Zm0-64A102.11,102.11,0,0,0,26,128a90,90,0,0,1-5.12,30,6,6,0,1,0,11.31,4A101.83,101.83,0,0,0,38,128a90,90,0,0,1,180,0,284.7,284.7,0,0,1-5.33,54.84,6,6,0,0,0,4.72,7.05,6.8,6.8,0,0,0,1.17.11,6,6,0,0,0,5.88-4.84A295.92,295.92,0,0,0,230,128,102.12,102.12,0,0,0,128,26ZM94,154.13a6,6,0,0,0-7.07,4.69,152.82,152.82,0,0,1-17.44,46,6,6,0,0,0,10.4,6,164.77,164.77,0,0,0,18.8-49.65A6,6,0,0,0,94,154.13ZM128,58a70.76,70.76,0,0,0-8.75.54,6,6,0,1,0,1.49,11.91A58,58,0,0,1,186,128a252.27,252.27,0,0,1-1.94,31.26,6,6,0,0,0,5.21,6.69,6.59,6.59,0,0,0,.75,0,6,6,0,0,0,5.95-5.26A266.46,266.46,0,0,0,198,128,70.08,70.08,0,0,0,128,58ZM185.44,186.2a6,6,0,0,0-7.31,4.31c-1.47,5.74-3.18,11.49-5.06,17.09a6,6,0,0,0,11.38,3.82c2-5.88,3.75-11.9,5.3-17.92A6,6,0,0,0,185.44,186.2Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M72,128a134.63,134.63,0,0,1-14.16,60.47,8,8,0,1,1-14.32-7.12A118.8,118.8,0,0,0,56,128,71.73,71.73,0,0,1,83,71.8,8,8,0,1,1,93,84.29,55.76,55.76,0,0,0,72,128Zm56-8a8,8,0,0,0-8,8,184.12,184.12,0,0,1-23,89.1,8,8,0,0,0,14,7.76A200.19,200.19,0,0,0,136,128,8,8,0,0,0,128,120Zm0-32a40,40,0,0,0-40,40,8,8,0,0,0,16,0,24,24,0,0,1,48,0,214.09,214.09,0,0,1-20.51,92A8,8,0,1,0,146,226.83,230,230,0,0,0,168,128,40,40,0,0,0,128,88Zm0-64A104.11,104.11,0,0,0,24,128a87.76,87.76,0,0,1-5,29.33,8,8,0,0,0,15.09,5.33A103.9,103.9,0,0,0,40,128a88,88,0,0,1,176,0,282.24,282.24,0,0,1-5.29,54.45,8,8,0,0,0,6.3,9.4,8.22,8.22,0,0,0,1.55.15,8,8,0,0,0,7.84-6.45A298.37,298.37,0,0,0,232,128,104.12,104.12,0,0,0,128,24ZM94.4,152.17A8,8,0,0,0,85,158.42a151,151,0,0,1-17.21,45.44,8,8,0,0,0,13.86,8,166.67,166.67,0,0,0,19-50.25A8,8,0,0,0,94.4,152.17ZM128,56a72.85,72.85,0,0,0-9,.56,8,8,0,0,0,2,15.87A56.08,56.08,0,0,1,184,128a252.12,252.12,0,0,1-1.92,31A8,8,0,0,0,189,168a8.39,8.39,0,0,0,1,.06,8,8,0,0,0,7.92-7,266.48,266.48,0,0,0,2-33A72.08,72.08,0,0,0,128,56Zm57.93,128.25a8,8,0,0,0-9.75,5.75c-1.46,5.69-3.15,11.4-5,17a8,8,0,0,0,5,10.13,7.88,7.88,0,0,0,2.55.42,8,8,0,0,0,7.58-5.46c2-5.92,3.79-12,5.35-18.05A8,8,0,0,0,185.94,184.26Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M68,128A130.71,130.71,0,0,1,54.27,186.7a4,4,0,0,1-3.58,2.22,3.91,3.91,0,0,1-1.78-.42,4,4,0,0,1-1.8-5.36A122.71,122.71,0,0,0,60,128,67.74,67.74,0,0,1,85.5,74.92a4,4,0,0,1,5,6.25A59.74,59.74,0,0,0,68,128Zm60-4a4,4,0,0,0-4,4,188.1,188.1,0,0,1-23.48,91,4,4,0,0,0,7,3.88A196.22,196.22,0,0,0,132,128,4,4,0,0,0,128,124Zm0-32a36,36,0,0,0-36,36,4,4,0,0,0,8,0,28,28,0,0,1,56,0,218,218,0,0,1-20.9,93.7,4,4,0,1,0,7.24,3.41A226,226,0,0,0,164,128,36,36,0,0,0,128,92Zm0-64A100.11,100.11,0,0,0,28,128a91.66,91.66,0,0,1-5.24,30.67,4,4,0,1,0,7.54,2.66A99.66,99.66,0,0,0,36,128a92,92,0,0,1,184,0,286.37,286.37,0,0,1-5.37,55.23,4,4,0,0,0,3.15,4.69,4.13,4.13,0,0,0,.78.08,4,4,0,0,0,3.92-3.23A294.25,294.25,0,0,0,228,128,100.11,100.11,0,0,0,128,28ZM93.6,156.09a4,4,0,0,0-4.71,3.12,155,155,0,0,1-17.66,46.64,4,4,0,0,0,6.93,4,163.13,163.13,0,0,0,18.57-49A4,4,0,0,0,93.6,156.09ZM128,60a68.79,68.79,0,0,0-8.5.53,4,4,0,0,0,1,7.93A62.57,62.57,0,0,1,128,68a60.07,60.07,0,0,1,60,60,256.15,256.15,0,0,1-1.95,31.5,4,4,0,0,0,3.47,4.47l.5,0a4,4,0,0,0,4-3.51A264.37,264.37,0,0,0,196,128,68.08,68.08,0,0,0,128,60Zm56.93,128.12a4,4,0,0,0-4.87,2.88c-1.49,5.78-3.21,11.58-5.1,17.23a4,4,0,1,0,7.58,2.54c2-5.83,3.73-11.81,5.27-17.77A4,4,0,0,0,184.94,188.13Z"}))]]),ru=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),n.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z"}))]]),iu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M234.29,47.91A20,20,0,0,0,216,36H40A20,20,0,0,0,25.2,69.45l.12.14L92,140.75V216a20,20,0,0,0,31.1,16.64l32-21.33A20,20,0,0,0,164,194.66V140.75l66.67-71.16.12-.14A20,20,0,0,0,234.29,47.91Zm-91,79.89A12,12,0,0,0,140,136v56.52l-24,16V136a12,12,0,0,0-3.25-8.2L49.23,60H206.77Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.9,61.38,152,136v58.65a8,8,0,0,1-3.56,6.66l-32,21.33A8,8,0,0,1,104,216V136L34.1,61.38A8,8,0,0,1,40,48H216A8,8,0,0,1,221.9,61.38Z",opacity:"0.2"}),n.createElement("path",{d:"M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227.81,66.76l-.08.09L160,139.17v55.49A16,16,0,0,1,152.87,208l-32,21.34A16,16,0,0,1,96,216V139.17L28.27,66.85l-.08-.09A16,16,0,0,1,40,40H216a16,16,0,0,1,11.84,26.76Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228.77,50.34A13.8,13.8,0,0,0,216,42H40A14,14,0,0,0,29.67,65.42l.06.07L98,138.38V216a14,14,0,0,0,21.77,11.64l32-21.33A14,14,0,0,0,158,194.66V138.38l68.33-73A13.82,13.82,0,0,0,228.77,50.34Zm-11.26,6.94L147.62,131.9A6,6,0,0,0,146,136v58.66a2,2,0,0,1-.89,1.67l-32,21.33A2,2,0,0,1,110,216V136a6,6,0,0,0-1.62-4.1L38.53,57.32A2,2,0,0,1,40,54H216a1.9,1.9,0,0,1,1.83,1.19A1.86,1.86,0,0,1,217.51,57.28Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227,51.15A11.85,11.85,0,0,0,216,44H40a12,12,0,0,0-8.88,20.07l.05.05L100,137.59V216a12,12,0,0,0,18.66,10l32-21.33a12,12,0,0,0,5.35-10V137.59l68.86-73.52A11.85,11.85,0,0,0,227,51.15Zm-8,7.5-69.9,74.62A4,4,0,0,0,148,136v58.65a4,4,0,0,1-1.78,3.33l-32,21.33A4,4,0,0,1,108,216V136a4,4,0,0,0-1.08-2.74L37.05,58.67A4,4,0,0,1,40,52H216a4,4,0,0,1,3,6.65Z"}))]]),ou=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm113.86-49.57A12,12,0,0,0,236,98.34L208.21,82.49l-.11-31.31a12,12,0,0,0-4.25-9.12,116,116,0,0,0-38-21.41,12,12,0,0,0-9.68.89L128,37.27,99.83,21.53a12,12,0,0,0-9.7-.9,116.06,116.06,0,0,0-38,21.47,12,12,0,0,0-4.24,9.1l-.14,31.34L20,98.35a12,12,0,0,0-5.85,8.11,110.7,110.7,0,0,0,0,43.11A12,12,0,0,0,20,157.66l27.82,15.85.11,31.31a12,12,0,0,0,4.25,9.12,116,116,0,0,0,38,21.41,12,12,0,0,0,9.68-.89L128,218.73l28.14,15.74a12,12,0,0,0,9.7.9,116.06,116.06,0,0,0,38-21.47,12,12,0,0,0,4.24-9.1l.14-31.34,27.81-15.81a12,12,0,0,0,5.85-8.11A110.7,110.7,0,0,0,241.86,106.43Zm-22.63,33.18-26.88,15.28a11.94,11.94,0,0,0-4.55,4.59c-.54,1-1.11,1.93-1.7,2.88a12,12,0,0,0-1.83,6.31L184.13,199a91.83,91.83,0,0,1-21.07,11.87l-27.15-15.19a12,12,0,0,0-5.86-1.53h-.29c-1.14,0-2.3,0-3.44,0a12.08,12.08,0,0,0-6.14,1.51L93,210.82A92.27,92.27,0,0,1,71.88,199l-.11-30.24a12,12,0,0,0-1.83-6.32c-.58-.94-1.16-1.91-1.7-2.88A11.92,11.92,0,0,0,63.7,155L36.8,139.63a86.53,86.53,0,0,1,0-23.24l26.88-15.28a12,12,0,0,0,4.55-4.58c.54-1,1.11-1.94,1.7-2.89a12,12,0,0,0,1.83-6.31L71.87,57A91.83,91.83,0,0,1,92.94,45.17l27.15,15.19a11.92,11.92,0,0,0,6.15,1.52c1.14,0,2.3,0,3.44,0a12.08,12.08,0,0,0,6.14-1.51L163,45.18A92.27,92.27,0,0,1,184.12,57l.11,30.24a12,12,0,0,0,1.83,6.32c.58.94,1.16,1.91,1.7,2.88A11.92,11.92,0,0,0,192.3,101l26.9,15.33A86.53,86.53,0,0,1,219.23,139.61Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.1,108.76,198.25,90.62c-.64-1.16-1.31-2.29-2-3.41l-.12-36A104.61,104.61,0,0,0,162,32L130,49.89c-1.34,0-2.69,0-4,0L94,32A104.58,104.58,0,0,0,59.89,51.25l-.16,36c-.7,1.12-1.37,2.26-2,3.41l-31.84,18.1a99.15,99.15,0,0,0,0,38.46l31.85,18.14c.64,1.16,1.31,2.29,2,3.41l.12,36A104.61,104.61,0,0,0,94,224l32-17.87c1.34,0,2.69,0,4,0L162,224a104.58,104.58,0,0,0,34.08-19.25l.16-36c.7-1.12,1.37-2.26,2-3.41l31.84-18.1A99.15,99.15,0,0,0,230.1,108.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),n.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.1,8.1,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8,8,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M237.94,107.21a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A111.92,111.92,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.63a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Zm108-54.4a6,6,0,0,0-2.92-4L202.64,86.22l-.42-.71L202.1,51.2A6,6,0,0,0,200,46.64a110.12,110.12,0,0,0-36.07-20.31,6,6,0,0,0-4.84.45L128.46,43.86h-1L96.91,26.76a6,6,0,0,0-4.86-.44A109.92,109.92,0,0,0,56,46.68a6,6,0,0,0-2.12,4.55l-.16,34.34c-.14.23-.28.47-.41.71L22.91,103.57A6,6,0,0,0,20,107.62a104.81,104.81,0,0,0,0,40.78,6,6,0,0,0,2.92,4l30.42,17.33.42.71.12,34.31A6,6,0,0,0,56,209.36a110.12,110.12,0,0,0,36.07,20.31,6,6,0,0,0,4.84-.45l30.61-17.08h1l30.56,17.1A6.09,6.09,0,0,0,162,230a5.83,5.83,0,0,0,1.93-.32,109.92,109.92,0,0,0,36-20.36,6,6,0,0,0,2.12-4.55l.16-34.34c.14-.23.28-.47.41-.71l30.42-17.29a6,6,0,0,0,2.92-4.05A104.81,104.81,0,0,0,236,107.6Zm-11.25,35.79L195.32,160.1a6.07,6.07,0,0,0-2.28,2.3c-.59,1-1.21,2.11-1.86,3.14a6,6,0,0,0-.91,3.16l-.16,33.21a98.15,98.15,0,0,1-27.52,15.53L133,200.88a6,6,0,0,0-2.93-.77h-.14c-1.24,0-2.5,0-3.74,0a6,6,0,0,0-3.07.76L93.45,217.43a98,98,0,0,1-27.56-15.49l-.12-33.17a6,6,0,0,0-.91-3.16c-.64-1-1.27-2.08-1.86-3.14a6,6,0,0,0-2.27-2.3L31.3,143.4a93,93,0,0,1,0-30.79L60.68,95.9A6.07,6.07,0,0,0,63,93.6c.59-1,1.21-2.11,1.86-3.14a6,6,0,0,0,.91-3.16l.16-33.21A98.15,98.15,0,0,1,93.41,38.56L123,55.12a5.81,5.81,0,0,0,3.07.76c1.24,0,2.5,0,3.74,0a6,6,0,0,0,3.07-.76l29.65-16.56a98,98,0,0,1,27.56,15.49l.12,33.17a6,6,0,0,0,.91,3.16c.64,1,1.27,2.08,1.86,3.14a6,6,0,0,0,2.27,2.3L224.7,112.6A93,93,0,0,1,224.73,143.39Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm109.94-52.79a8,8,0,0,0-3.89-5.4l-29.83-17-.12-33.62a8,8,0,0,0-2.83-6.08,111.91,111.91,0,0,0-36.72-20.67,8,8,0,0,0-6.46.59L128,41.85,97.88,25a8,8,0,0,0-6.47-.6A112.1,112.1,0,0,0,54.73,45.15a8,8,0,0,0-2.83,6.07l-.15,33.65-29.83,17a8,8,0,0,0-3.89,5.4,106.47,106.47,0,0,0,0,41.56,8,8,0,0,0,3.89,5.4l29.83,17,.12,33.62a8,8,0,0,0,2.83,6.08,111.91,111.91,0,0,0,36.72,20.67,8,8,0,0,0,6.46-.59L128,214.15,158.12,231a7.91,7.91,0,0,0,3.9,1,8.09,8.09,0,0,0,2.57-.42,112.1,112.1,0,0,0,36.68-20.73,8,8,0,0,0,2.83-6.07l.15-33.65,29.83-17a8,8,0,0,0,3.89-5.4A106.47,106.47,0,0,0,237.94,107.21Zm-15,34.91-28.57,16.25a8,8,0,0,0-3,3c-.58,1-1.19,2.06-1.81,3.06a7.94,7.94,0,0,0-1.22,4.21l-.15,32.25a95.89,95.89,0,0,1-25.37,14.3L134,199.13a8,8,0,0,0-3.91-1h-.19c-1.21,0-2.43,0-3.64,0a8.08,8.08,0,0,0-4.1,1l-28.84,16.1A96,96,0,0,1,67.88,201l-.11-32.2a8,8,0,0,0-1.22-4.22c-.62-1-1.23-2-1.8-3.06a8.09,8.09,0,0,0-3-3.06l-28.6-16.29a90.49,90.49,0,0,1,0-28.26L61.67,97.63a8,8,0,0,0,3-3c.58-1,1.19-2.06,1.81-3.06a7.94,7.94,0,0,0,1.22-4.21l.15-32.25a95.89,95.89,0,0,1,25.37-14.3L122,56.87a8,8,0,0,0,4.1,1c1.21,0,2.43,0,3.64,0a8.08,8.08,0,0,0,4.1-1l28.84-16.1A96,96,0,0,1,188.12,55l.11,32.2a8,8,0,0,0,1.22,4.22c.62,1,1.23,2,1.8,3.06a8.09,8.09,0,0,0,3,3.06l28.6,16.29A90.49,90.49,0,0,1,222.9,142.12Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm106-56a4,4,0,0,0-2-2.7l-30.89-17.6q-.47-.82-1-1.62L200.1,51.2a3.94,3.94,0,0,0-1.42-3,107.8,107.8,0,0,0-35.41-19.94,4,4,0,0,0-3.23.29L129,45.87h-2l-31-17.36a4,4,0,0,0-3.23-.3,108.05,108.05,0,0,0-35.39,20,4,4,0,0,0-1.41,3l-.16,34.9-1,1.62L23.9,105.3A4,4,0,0,0,22,108a102.76,102.76,0,0,0,0,40,4,4,0,0,0,1.95,2.7l30.89,17.6q.47.83,1,1.62l.12,34.87a3.94,3.94,0,0,0,1.42,3,107.8,107.8,0,0,0,35.41,19.94,4,4,0,0,0,3.23-.29L127,210.13h2l31,17.36a4,4,0,0,0,3.23.3,108.05,108.05,0,0,0,35.39-20,4,4,0,0,0,1.41-3l.16-34.9,1-1.62L232.1,150.7a4,4,0,0,0,2-2.71A102.76,102.76,0,0,0,234,108Zm-7.48,36.67L196.3,161.84a4,4,0,0,0-1.51,1.53c-.61,1.09-1.25,2.17-1.91,3.24a3.92,3.92,0,0,0-.61,2.1l-.16,34.15a99.8,99.8,0,0,1-29.7,16.77l-30.4-17a4.06,4.06,0,0,0-2-.51H130c-1.28,0-2.57,0-3.84,0a4.1,4.1,0,0,0-2.05.51l-30.45,17A100.23,100.23,0,0,1,63.89,202.9l-.12-34.12a3.93,3.93,0,0,0-.61-2.11c-.66-1-1.3-2.14-1.91-3.23a4,4,0,0,0-1.51-1.53L29.49,144.68a94.78,94.78,0,0,1,0-33.34L59.7,94.16a4,4,0,0,0,1.51-1.53c.61-1.09,1.25-2.17,1.91-3.23a4,4,0,0,0,.61-2.11l.16-34.15a99.8,99.8,0,0,1,29.7-16.77l30.4,17a4.1,4.1,0,0,0,2.05.51c1.28,0,2.57,0,3.84,0a4,4,0,0,0,2.05-.51l30.45-17A100.23,100.23,0,0,1,192.11,53.1l.12,34.12a3.93,3.93,0,0,0,.61,2.11c.66,1,1.3,2.14,1.91,3.23a4,4,0,0,0,1.51,1.53l30.25,17.23A94.78,94.78,0,0,1,226.54,144.66Z"}))]]),lu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,187a113.4,113.4,0,0,1-20.39-35h40.82a116.94,116.94,0,0,1-10,20.77A108.61,108.61,0,0,1,128,207Zm-26.49-59a135.42,135.42,0,0,1,0-40h53a135.42,135.42,0,0,1,0,40ZM44,128a83.49,83.49,0,0,1,2.43-20H77.25a160.63,160.63,0,0,0,0,40H46.43A83.49,83.49,0,0,1,44,128Zm84-79a113.4,113.4,0,0,1,20.39,35H107.59a116.94,116.94,0,0,1,10-20.77A108.61,108.61,0,0,1,128,49Zm50.73,59h30.82a83.52,83.52,0,0,1,0,40H178.75a160.63,160.63,0,0,0,0-40Zm20.77-24H173.71a140.82,140.82,0,0,0-15.5-34.36A84.51,84.51,0,0,1,199.52,84ZM97.79,49.64A140.82,140.82,0,0,0,82.29,84H56.48A84.51,84.51,0,0,1,97.79,49.64ZM56.48,172H82.29a140.82,140.82,0,0,0,15.5,34.36A84.51,84.51,0,0,1,56.48,172Zm101.73,34.36A140.82,140.82,0,0,0,173.71,172h25.81A84.51,84.51,0,0,1,158.21,206.36Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm78.36,64H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM216,128a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM128,43a115.27,115.27,0,0,1,26,45H102A115.11,115.11,0,0,1,128,43ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48Zm50.35,61.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,28h0A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,190.61c-6.33-6.09-23-24.41-31.27-54.61h62.54C151,194.2,134.33,212.52,128,218.61ZM94.82,156a140.42,140.42,0,0,1,0-56h66.36a140.42,140.42,0,0,1,0,56ZM128,37.39c6.33,6.09,23,24.41,31.27,54.61H96.73C105,61.8,121.67,43.48,128,37.39ZM169.41,100h46.23a92.09,92.09,0,0,1,0,56H169.41a152.65,152.65,0,0,0,0-56Zm43.25-8h-45a129.39,129.39,0,0,0-29.19-55.4A92.25,92.25,0,0,1,212.66,92ZM117.54,36.6A129.39,129.39,0,0,0,88.35,92h-45A92.25,92.25,0,0,1,117.54,36.6ZM40.36,100H86.59a152.65,152.65,0,0,0,0,56H40.36a92.09,92.09,0,0,1,0-56Zm3,64h45a129.39,129.39,0,0,0,29.19,55.4A92.25,92.25,0,0,1,43.34,164Zm95.12,55.4A129.39,129.39,0,0,0,167.65,164h45A92.25,92.25,0,0,1,138.46,219.4Z"}))]]),cu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,84H180.2l7.61-41.85a12,12,0,0,0-23.62-4.3L155.8,84H116.2l7.61-41.85a12,12,0,1,0-23.62-4.3L91.8,84H48a12,12,0,0,0,0,24H87.44l-7.27,40H32a12,12,0,0,0,0,24H75.8l-7.61,41.85a12,12,0,0,0,9.66,14A11.43,11.43,0,0,0,80,228a12,12,0,0,0,11.8-9.86L100.2,172h39.6l-7.61,41.85a12,12,0,0,0,9.66,14,11.43,11.43,0,0,0,2.16.2,12,12,0,0,0,11.8-9.86L164.2,172H208a12,12,0,0,0,0-24H168.56l7.27-40H224a12,12,0,0,0,0-24Zm-79.83,64H104.56l7.27-40h39.61Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M165.82,96l-11.64,64h-64l11.64-64Z",opacity:"0.2"}),n.createElement("path",{d:"M224,88H175.4l8.47-46.57a8,8,0,0,0-15.74-2.86l-9,49.43H111.4l8.47-46.57a8,8,0,0,0-15.74-2.86L95.14,88H48a8,8,0,0,0,0,16H92.23L83.5,152H32a8,8,0,0,0,0,16H80.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,80,224a8,8,0,0,0,7.86-6.57l9-49.43H144.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,144,224a8,8,0,0,0,7.86-6.57l9-49.43H208a8,8,0,0,0,0-16H163.77l8.73-48H224a8,8,0,0,0,0-16Zm-76.5,64H99.77l8.73-48h47.73Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M116.25,112h31.5l-8,32h-31.5ZM224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Zm-16,56a8,8,0,0,0-8-8H168.25l7.51-30.06a8,8,0,0,0-15.52-3.88L151.75,96h-31.5l7.51-30.06a8,8,0,0,0-15.52-3.88L103.75,96H64a8,8,0,0,0,0,16H99.75l-8,32H56a8,8,0,0,0,0,16H87.75l-7.51,30.06a8,8,0,0,0,5.82,9.7,8.13,8.13,0,0,0,2,.24,8,8,0,0,0,7.75-6.06L104.25,160h31.5l-7.51,30.06a8,8,0,0,0,5.82,9.7A8.13,8.13,0,0,0,136,200a8,8,0,0,0,7.75-6.06L152.25,160H192a8,8,0,0,0,0-16H156.25l8-32H200A8,8,0,0,0,208,104Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,90H173l8.89-48.93a6,6,0,1,0-11.8-2.14L160.81,90H109l8.89-48.93a6,6,0,0,0-11.8-2.14L96.81,90H48a6,6,0,0,0,0,12H94.63l-9.46,52H32a6,6,0,0,0,0,12H83L74.1,214.93a6,6,0,0,0,4.83,7A5.64,5.64,0,0,0,80,222a6,6,0,0,0,5.89-4.93L95.19,166H147l-8.89,48.93a6,6,0,0,0,4.83,7,5.64,5.64,0,0,0,1.08.1,6,6,0,0,0,5.89-4.93L159.19,166H208a6,6,0,0,0,0-12H161.37l9.46-52H224a6,6,0,0,0,0-12Zm-74.83,64H97.37l9.46-52h51.8Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,88H175.4l8.47-46.57a8,8,0,0,0-15.74-2.86l-9,49.43H111.4l8.47-46.57a8,8,0,0,0-15.74-2.86L95.14,88H48a8,8,0,0,0,0,16H92.23L83.5,152H32a8,8,0,0,0,0,16H80.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,80,224a8,8,0,0,0,7.86-6.57l9-49.43H144.6l-8.47,46.57a8,8,0,0,0,6.44,9.3A7.79,7.79,0,0,0,144,224a8,8,0,0,0,7.86-6.57l9-49.43H208a8,8,0,0,0,0-16H163.77l8.73-48H224a8,8,0,0,0,0-16Zm-76.5,64H99.77l8.73-48h47.73Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,92H170.61l9.33-51.28a4,4,0,1,0-7.88-1.44L162.48,92H106.61l9.33-51.28a4,4,0,1,0-7.88-1.44L98.48,92H48a4,4,0,0,0,0,8H97L86.84,156H32a4,4,0,0,0,0,8H85.39l-9.33,51.28a4,4,0,0,0,3.22,4.65A3.65,3.65,0,0,0,80,220a4,4,0,0,0,3.94-3.29L93.52,164h55.87l-9.33,51.28a4,4,0,0,0,3.22,4.65,3.65,3.65,0,0,0,.72.07,4,4,0,0,0,3.94-3.29L157.52,164H208a4,4,0,0,0,0-8H159l10.19-56H224a4,4,0,0,0,0-8Zm-73.16,64H95l10.19-56H161Z"}))]]),du=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),uu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M196,76a16,16,0,1,1-16-16A16,16,0,0,1,196,76Zm48,22.74A84.3,84.3,0,0,1,160.11,180H160a83.52,83.52,0,0,1-23.65-3.38l-7.86,7.87A12,12,0,0,1,120,188H108v12a12,12,0,0,1-12,12H84v12a12,12,0,0,1-12,12H40a20,20,0,0,1-20-20V187.31a19.86,19.86,0,0,1,5.86-14.14l53.52-53.52A84,84,0,1,1,244,98.74ZM202.43,53.57A59.48,59.48,0,0,0,158,36c-32,1-58,27.89-58,59.89a59.69,59.69,0,0,0,4.2,22.19,12,12,0,0,1-2.55,13.21L44,189v23H60V200a12,12,0,0,1,12-12H84V176a12,12,0,0,1,12-12h19l9.65-9.65a12,12,0,0,1,13.22-2.55A59.58,59.58,0,0,0,160,156h.08c32,0,58.87-26.07,59.89-58A59.55,59.55,0,0,0,202.43,53.57Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M232,98.36C230.73,136.92,198.67,168,160.09,168a71.68,71.68,0,0,1-26.92-5.17h0L120,176H96v24H72v24H40a8,8,0,0,1-8-8V187.31a8,8,0,0,1,2.34-5.65l58.83-58.83h0A71.68,71.68,0,0,1,88,95.91c0-38.58,31.08-70.64,69.64-71.87A72,72,0,0,1,232,98.36Z",opacity:"0.2"}),n.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM180,92a16,16,0,1,1,16-16A16,16,0,0,1,180,92Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M215.15,40.85A78,78,0,0,0,86.2,121.31l-56.1,56.1a13.94,13.94,0,0,0-4.1,9.9V216a14,14,0,0,0,14,14H72a6,6,0,0,0,6-6V206H96a6,6,0,0,0,6-6V182h18a6,6,0,0,0,4.24-1.76l10.45-10.44A77.59,77.59,0,0,0,160,174h.1A78,78,0,0,0,215.15,40.85ZM226,98.16c-1.12,35.16-30.67,63.8-65.88,63.84a65.93,65.93,0,0,1-24.51-4.67,6,6,0,0,0-6.64,1.26L117.51,170H96a6,6,0,0,0-6,6v18H72a6,6,0,0,0-6,6v18H40a2,2,0,0,1-2-2V187.31a2,2,0,0,1,.58-1.41l58.83-58.83a6,6,0,0,0,1.26-6.64A65.61,65.61,0,0,1,94,95.92C94,60.71,122.68,31.16,157.83,30A66,66,0,0,1,226,98.16ZM190,76a10,10,0,1,1-10-10A10,10,0,0,1,190,76Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.74,42.26A76,76,0,0,0,88.51,121.84l-57,57A11.93,11.93,0,0,0,28,187.31V216a12,12,0,0,0,12,12H72a4,4,0,0,0,4-4V204H96a4,4,0,0,0,4-4V180h20a4,4,0,0,0,2.83-1.17l11.33-11.34A75.72,75.72,0,0,0,160,172h.1A76,76,0,0,0,213.74,42.26Zm14.22,56c-1.15,36.22-31.6,65.72-67.87,65.77H160a67.52,67.52,0,0,1-25.21-4.83,4,4,0,0,0-4.45.83l-12,12H96a4,4,0,0,0-4,4v20H72a4,4,0,0,0-4,4v20H40a4,4,0,0,1-4-4V187.31a4.06,4.06,0,0,1,1.17-2.83L96,125.66a4,4,0,0,0,.83-4.45A67.51,67.51,0,0,1,92,95.91C92,59.64,121.55,29.19,157.77,28A68,68,0,0,1,228,98.23ZM188,76a8,8,0,1,1-8-8A8,8,0,0,1,188,76Z"}))]]),mu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),n.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),pu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M117.18,188.74a12,12,0,0,1,0,17l-5.12,5.12A58.26,58.26,0,0,1,70.6,228h0A58.62,58.62,0,0,1,29.14,127.92L63.89,93.17a58.64,58.64,0,0,1,98.56,28.11,12,12,0,1,1-23.37,5.44,34.65,34.65,0,0,0-58.22-16.58L46.11,144.89A34.62,34.62,0,0,0,70.57,204h0a34.41,34.41,0,0,0,24.49-10.14l5.11-5.12A12,12,0,0,1,117.18,188.74ZM226.83,45.17a58.65,58.65,0,0,0-82.93,0l-5.11,5.11a12,12,0,0,0,17,17l5.12-5.12a34.63,34.63,0,1,1,49,49L175.1,145.86A34.39,34.39,0,0,1,150.61,156h0a34.63,34.63,0,0,1-33.69-26.72,12,12,0,0,0-23.38,5.44A58.64,58.64,0,0,0,150.56,180h.05a58.28,58.28,0,0,0,41.47-17.17l34.75-34.75a58.62,58.62,0,0,0,0-82.91Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M218.34,119.6,183.6,154.34a46.58,46.58,0,0,1-44.31,12.26c-.31.34-.62.67-.95,1L103.6,202.34A46.63,46.63,0,1,1,37.66,136.4L72.4,101.66A46.6,46.6,0,0,1,116.71,89.4c.31-.34.62-.67,1-1L152.4,53.66a46.63,46.63,0,0,1,65.94,65.94Z",opacity:"0.2"}),n.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,7.78,8.22H152a8,8,0,0,0,8-7.78A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM115.7,192.49a43.31,43.31,0,0,1-55-66.43l25.37-25.37a43.35,43.35,0,0,1,61.25,0,42.9,42.9,0,0,1,9.95,15.43,8,8,0,1,1-15,5.6A27.33,27.33,0,0,0,97.37,112L72,137.37a27.32,27.32,0,0,0,34.68,41.91,8,8,0,1,1,9,13.21Zm79.61-62.55-25.37,25.37A43,43,0,0,1,139.32,168h0a43.35,43.35,0,0,1-40.53-28.12,8,8,0,1,1,15-5.6A27.35,27.35,0,0,0,139.28,152h0a27.14,27.14,0,0,0,19.32-8L184,118.63a27.32,27.32,0,0,0-34.68-41.91,8,8,0,1,1-9-13.21,43.32,43.32,0,0,1,55,66.43Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M238,88.18a52.42,52.42,0,0,1-15.4,35.66l-34.75,34.75A52.28,52.28,0,0,1,150.62,174h-.05A52.63,52.63,0,0,1,98,119.9a6,6,0,0,1,6-5.84h.17a6,6,0,0,1,5.83,6.16A40.62,40.62,0,0,0,150.58,162h0a40.4,40.4,0,0,0,28.73-11.9l34.75-34.74A40.63,40.63,0,0,0,156.63,57.9l-11,11a6,6,0,0,1-8.49-8.49l11-11a52.62,52.62,0,0,1,74.43,0A52.83,52.83,0,0,1,238,88.18Zm-127.62,98.9-11,11A40.36,40.36,0,0,1,70.6,210h0a40.63,40.63,0,0,1-28.7-69.36L76.62,105.9A40.63,40.63,0,0,1,146,135.77a6,6,0,0,0,5.83,6.16H152a6,6,0,0,0,6-5.84A52.63,52.63,0,0,0,68.14,97.42L33.38,132.16A52.63,52.63,0,0,0,70.56,222h0a52.26,52.26,0,0,0,37.22-15.42l11-11a6,6,0,1,0-8.49-8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,16,.45A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M236,88.12a50.44,50.44,0,0,1-14.81,34.31l-34.75,34.74A50.33,50.33,0,0,1,150.62,172h-.05A50.63,50.63,0,0,1,100,120a4,4,0,0,1,4-3.89h.11a4,4,0,0,1,3.89,4.11A42.64,42.64,0,0,0,150.58,164h0a42.32,42.32,0,0,0,30.14-12.49l34.75-34.74a42.63,42.63,0,1,0-60.29-60.28l-11,11a4,4,0,0,1-5.66-5.65l11-11A50.64,50.64,0,0,1,236,88.12ZM111.78,188.49l-11,11A42.33,42.33,0,0,1,70.6,212h0a42.63,42.63,0,0,1-30.11-72.77l34.75-34.74A42.63,42.63,0,0,1,148,135.82a4,4,0,0,0,8,.23A50.64,50.64,0,0,0,69.55,98.83L34.8,133.57A50.63,50.63,0,0,0,70.56,220h0a50.33,50.33,0,0,0,35.81-14.83l11-11a4,4,0,1,0-5.65-5.66Z"}))]]),hu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Zm-60-52a16,16,0,1,1-16-16A16,16,0,0,1,144,152Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z",opacity:"0.2"}),n.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm-80,84a12,12,0,1,1,12-12A12,12,0,0,1,128,164Zm32-84H96V56a32,32,0,0,1,64,0Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Zm-72-56a10,10,0,1,1-10-10A10,10,0,0,1,138,152Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-76-56a8,8,0,1,1-8-8A8,8,0,0,1,136,152Z"}))]]),fu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),n.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),wu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),n.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]),gu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),n.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),xu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,154.8l-47.09-21.11-.18-.08a19.94,19.94,0,0,0-19,1.75,13.08,13.08,0,0,0-1.12.84l-22.31,19c-13-7.05-26.43-20.37-33.49-33.21l19.06-22.66a11.76,11.76,0,0,0,.85-1.15,20,20,0,0,0,1.66-18.83,1.42,1.42,0,0,1-.08-.18L101.2,32A20.06,20.06,0,0,0,80.42,20.15,60.27,60.27,0,0,0,28,80c0,81.61,66.39,148,148,148a60.27,60.27,0,0,0,59.85-52.42A20.06,20.06,0,0,0,224,154.8ZM176,204A124.15,124.15,0,0,1,52,80,36.29,36.29,0,0,1,80.48,44.46l18.82,42L80.14,109.28a12,12,0,0,0-.86,1.16A20,20,0,0,0,78,130.08c9.42,19.28,28.83,38.56,48.31,48A20,20,0,0,0,146,176.63a11.63,11.63,0,0,0,1.11-.85l22.43-19.07,42,18.81A36.29,36.29,0,0,1,176,204Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M223.94,174.08A48.33,48.33,0,0,1,176,216,136,136,0,0,1,40,80,48.33,48.33,0,0,1,81.92,32.06a8,8,0,0,1,8.3,4.8l21.13,47.2a8,8,0,0,1-.66,7.53L89.32,117a7.93,7.93,0,0,0-.54,7.81c8.27,16.93,25.77,34.22,42.75,42.41a7.92,7.92,0,0,0,7.83-.59l25-21.3a8,8,0,0,1,7.59-.69l47.16,21.13A8,8,0,0,1,223.94,174.08Z",opacity:"0.2"}),n.createElement("path",{d:"M222.37,158.46l-47.11-21.11-.13-.06a16,16,0,0,0-15.17,1.4,8.12,8.12,0,0,0-.75.56L134.87,160c-15.42-7.49-31.34-23.29-38.83-38.51l20.78-24.71c.2-.25.39-.5.57-.77a16,16,0,0,0,1.32-15.06l0-.12L97.54,33.64a16,16,0,0,0-16.62-9.52A56.26,56.26,0,0,0,32,80c0,79.4,64.6,144,144,144a56.26,56.26,0,0,0,55.88-48.92A16,16,0,0,0,222.37,158.46ZM176,208A128.14,128.14,0,0,1,48,80,40.2,40.2,0,0,1,82.87,40a.61.61,0,0,0,0,.12l21,47L83.2,111.86a6.13,6.13,0,0,0-.57.77,16,16,0,0,0-1,15.7c9.06,18.53,27.73,37.06,46.46,46.11a16,16,0,0,0,15.75-1.14,8.44,8.44,0,0,0,.74-.56L168.89,152l47,21.05h0s.08,0,.11,0A40.21,40.21,0,0,1,176,208Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M231.88,175.08A56.26,56.26,0,0,1,176,224C96.6,224,32,159.4,32,80A56.26,56.26,0,0,1,80.92,24.12a16,16,0,0,1,16.62,9.52l21.12,47.15,0,.12A16,16,0,0,1,117.39,96c-.18.27-.37.52-.57.77L96,121.45c7.49,15.22,23.41,31,38.83,38.51l24.34-20.71a8.12,8.12,0,0,1,.75-.56,16,16,0,0,1,15.17-1.4l.13.06,47.11,21.11A16,16,0,0,1,231.88,175.08Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.59,160.3l-47.24-21.17a14,14,0,0,0-13.28,1.22,4.81,4.81,0,0,0-.56.42l-24.69,21a1.88,1.88,0,0,1-1.68.06c-15.87-7.66-32.31-24-40-39.65a1.91,1.91,0,0,1,0-1.68l21.07-25a6.13,6.13,0,0,0,.42-.58,14,14,0,0,0,1.12-13.27L95.73,34.49a14,14,0,0,0-14.56-8.38A54.24,54.24,0,0,0,34,80c0,78.3,63.7,142,142,142a54.25,54.25,0,0,0,53.89-47.17A14,14,0,0,0,221.59,160.3ZM176,210C104.32,210,46,151.68,46,80A42.23,42.23,0,0,1,82.67,38h.23a2,2,0,0,1,1.84,1.31l21.1,47.11a2,2,0,0,1,0,1.67L84.73,113.15a4.73,4.73,0,0,0-.43.57,14,14,0,0,0-.91,13.73c8.87,18.16,27.17,36.32,45.53,45.19a14,14,0,0,0,13.77-1c.19-.13.38-.27.56-.42l24.68-21a1.92,1.92,0,0,1,1.6-.1l47.25,21.17a2,2,0,0,1,1.21,2A42.24,42.24,0,0,1,176,210Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222.37,158.46l-47.11-21.11-.13-.06a16,16,0,0,0-15.17,1.4,8.12,8.12,0,0,0-.75.56L134.87,160c-15.42-7.49-31.34-23.29-38.83-38.51l20.78-24.71c.2-.25.39-.5.57-.77a16,16,0,0,0,1.32-15.06l0-.12L97.54,33.64a16,16,0,0,0-16.62-9.52A56.26,56.26,0,0,0,32,80c0,79.4,64.6,144,144,144a56.26,56.26,0,0,0,55.88-48.92A16,16,0,0,0,222.37,158.46ZM176,208A128.14,128.14,0,0,1,48,80,40.2,40.2,0,0,1,82.87,40a.61.61,0,0,0,0,.12l21,47L83.2,111.86a6.13,6.13,0,0,0-.57.77,16,16,0,0,0-1,15.7c9.06,18.53,27.73,37.06,46.46,46.11a16,16,0,0,0,15.75-1.14,8.44,8.44,0,0,0,.74-.56L168.89,152l47,21.05h0s.08,0,.11,0A40.21,40.21,0,0,1,176,208Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220.78,162.13,173.56,141A12,12,0,0,0,162.18,142a3.37,3.37,0,0,0-.38.28L137,163.42a3.93,3.93,0,0,1-3.7.21c-16.24-7.84-33.05-24.52-40.89-40.57a3.9,3.9,0,0,1,.18-3.69l21.2-25.21c.1-.12.19-.25.28-.38a12,12,0,0,0,1-11.36L93.9,35.28a12,12,0,0,0-12.48-7.19A52.25,52.25,0,0,0,36,80c0,77.2,62.8,140,140,140a52.25,52.25,0,0,0,51.91-45.42A12,12,0,0,0,220.78,162.13ZM220,173.58A44.23,44.23,0,0,1,176,212C103.22,212,44,152.78,44,80A44.23,44.23,0,0,1,82.42,36a3.87,3.87,0,0,1,.48,0,4,4,0,0,1,3.67,2.49l21.11,47.14a4,4,0,0,1-.23,3.6l-21.19,25.2c-.1.13-.2.25-.29.39a12,12,0,0,0-.78,11.75c8.69,17.79,26.61,35.58,44.6,44.27a12,12,0,0,0,11.79-.87l.37-.28,24.83-21.12a3.93,3.93,0,0,1,3.57-.27l47.21,21.16A4,4,0,0,1,220,173.58Z"}))]]),vu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),n.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),bu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M96,40l33.52,88H56Zm104,88H129.52L160,208Z",opacity:"0.2"}),n.createElement("path",{d:"M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z"}))]]),yu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,36H48A20,20,0,0,0,28,56v56c0,54.29,26.32,87.22,48.4,105.29,23.71,19.39,47.44,26,48.44,26.29a12.1,12.1,0,0,0,6.32,0c1-.28,24.73-6.9,48.44-26.29,22.08-18.07,48.4-51,48.4-105.29V56A20,20,0,0,0,208,36Zm-4,76c0,35.71-13.09,64.69-38.91,86.15A126.28,126.28,0,0,1,128,219.38a126.14,126.14,0,0,1-37.09-21.23C65.09,176.69,52,147.71,52,112V60H204Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z",opacity:"0.2"}),n.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,42H48A14,14,0,0,0,34,56v56c0,51.94,25.12,83.4,46.2,100.64,22.73,18.6,45.27,24.89,46.22,25.15a6,6,0,0,0,3.16,0c.95-.26,23.49-6.55,46.22-25.15C196.88,195.4,222,163.94,222,112V56A14,14,0,0,0,208,42Zm2,70c0,37.76-13.94,68.39-41.44,91.06A131.17,131.17,0,0,1,128,225.72a130.94,130.94,0,0,1-40.56-22.66C59.94,180.39,46,149.76,46,112V56a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,44H48A12,12,0,0,0,36,56v56c0,51.16,24.73,82.12,45.47,99.1,22.4,18.32,44.55,24.5,45.48,24.76a4,4,0,0,0,2.1,0c.93-.26,23.08-6.44,45.48-24.76,20.74-17,45.47-47.94,45.47-99.1V56A12,12,0,0,0,208,44Zm4,68c0,38.44-14.23,69.63-42.29,92.71A132.45,132.45,0,0,1,128,227.82a132.23,132.23,0,0,1-41.71-23.11C58.23,181.63,44,150.44,44,112V56a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"}))]]),ju=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z",opacity:"0.2"}),n.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z"}))]]),_u=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M243,96a20.33,20.33,0,0,0-17.74-14l-56.59-4.57L146.83,24.62a20.36,20.36,0,0,0-37.66,0L87.35,77.44,30.76,82A20.45,20.45,0,0,0,19.1,117.88l43.18,37.24-13.2,55.7A20.37,20.37,0,0,0,79.57,233L128,203.19,176.43,233a20.39,20.39,0,0,0,30.49-22.15l-13.2-55.7,43.18-37.24A20.43,20.43,0,0,0,243,96ZM172.53,141.7a12,12,0,0,0-3.84,11.86L181.58,208l-47.29-29.08a12,12,0,0,0-12.58,0L74.42,208l12.89-54.4a12,12,0,0,0-3.84-11.86L41.2,105.24l55.4-4.47a12,12,0,0,0,10.13-7.38L128,41.89l21.27,51.5a12,12,0,0,0,10.13,7.38l55.4,4.47Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z",opacity:"0.2"}),n.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M237.28,97.87A14.18,14.18,0,0,0,224.76,88l-60.25-4.87-23.22-56.2a14.37,14.37,0,0,0-26.58,0L91.49,83.11,31.24,88a14.18,14.18,0,0,0-12.52,9.89A14.43,14.43,0,0,0,23,113.32L69,152.93l-14,59.25a14.4,14.4,0,0,0,5.59,15,14.1,14.1,0,0,0,15.91.6L128,196.12l51.58,31.71a14.1,14.1,0,0,0,15.91-.6,14.4,14.4,0,0,0,5.59-15l-14-59.25L233,113.32A14.43,14.43,0,0,0,237.28,97.87Zm-12.14,6.37-48.69,42a6,6,0,0,0-1.92,5.92l14.88,62.79a2.35,2.35,0,0,1-.95,2.57,2.24,2.24,0,0,1-2.6.1L131.14,184a6,6,0,0,0-6.28,0L70.14,217.61a2.24,2.24,0,0,1-2.6-.1,2.35,2.35,0,0,1-1-2.57l14.88-62.79a6,6,0,0,0-1.92-5.92l-48.69-42a2.37,2.37,0,0,1-.73-2.65,2.28,2.28,0,0,1,2.07-1.65l63.92-5.16a6,6,0,0,0,5.06-3.69l24.63-59.6a2.35,2.35,0,0,1,4.38,0l24.63,59.6a6,6,0,0,0,5.06,3.69l63.92,5.16a2.28,2.28,0,0,1,2.07,1.65A2.37,2.37,0,0,1,225.14,104.24Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M235.36,98.49A12.21,12.21,0,0,0,224.59,90l-61.47-5L139.44,27.67a12.37,12.37,0,0,0-22.88,0L92.88,85,31.41,90a12.45,12.45,0,0,0-7.07,21.84l46.85,40.41L56.87,212.64a12.35,12.35,0,0,0,18.51,13.49L128,193.77l52.62,32.36a12.12,12.12,0,0,0,13.69-.51,12.28,12.28,0,0,0,4.82-13l-14.32-60.42,46.85-40.41A12.29,12.29,0,0,0,235.36,98.49Zm-8.93,7.26-48.68,42a4,4,0,0,0-1.28,3.95l14.87,62.79a4.37,4.37,0,0,1-1.72,4.65,4.24,4.24,0,0,1-4.81.18L130.1,185.67a4,4,0,0,0-4.2,0L71.19,219.32a4.24,4.24,0,0,1-4.81-.18,4.37,4.37,0,0,1-1.72-4.65L79.53,151.7a4,4,0,0,0-1.28-3.95l-48.68-42A4.37,4.37,0,0,1,28.25,101a4.31,4.31,0,0,1,3.81-3L96,92.79a4,4,0,0,0,3.38-2.46L124,30.73a4.35,4.35,0,0,1,8.08,0l24.62,59.6A4,4,0,0,0,160,92.79l63.9,5.15a4.31,4.31,0,0,1,3.81,3A4.37,4.37,0,0,1,226.43,105.75Z"}))]]),ku=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),n.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),Cu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,24v92H179.31a19.86,19.86,0,0,0-14.14,5.86L147,168H109L90.83,149.86A19.86,19.86,0,0,0,76.69,144H52V52ZM52,204V168H75l18.14,18.14A19.86,19.86,0,0,0,107.31,192h41.38a19.86,19.86,0,0,0,14.14-5.86L181,168h23v36Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,48V160H179.31a8,8,0,0,0-5.66,2.34l-19.31,19.32a8,8,0,0,1-5.66,2.34H107.31a8,8,0,0,1-5.66-2.34L82.34,162.34A8,8,0,0,0,76.68,160H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.68A15.89,15.89,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H208a2,2,0,0,1,2,2V154H179.31a13.94,13.94,0,0,0-9.9,4.1L150.1,177.41a2,2,0,0,1-1.41.59H107.31a2,2,0,0,1-1.41-.58L86.59,158.1a13.94,13.94,0,0,0-9.9-4.1H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V166H76.69a2,2,0,0,1,1.41.58L97.41,185.9a13.94,13.94,0,0,0,9.9,4.1h41.38a13.94,13.94,0,0,0,9.9-4.1l19.31-19.31a2,2,0,0,1,1.41-.59H210v42A2,2,0,0,1,208,210Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.69A15.86,15.86,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.31A15.86,15.86,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H208a4,4,0,0,1,4,4V156H179.31a12,12,0,0,0-8.48,3.51l-19.32,19.32a4,4,0,0,1-2.82,1.17H107.31a4,4,0,0,1-2.82-1.17L85.17,159.51A12,12,0,0,0,76.69,156H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V164H76.69a4,4,0,0,1,2.82,1.17l19.32,19.32a12,12,0,0,0,8.48,3.51h41.38a12,12,0,0,0,8.48-3.51l19.32-19.32a4,4,0,0,1,2.82-1.17H212v44A4,4,0,0,1,208,212Z"}))]]),Nu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M234.38,210a123.36,123.36,0,0,0-60.78-53.23,76,76,0,1,0-91.2,0A123.36,123.36,0,0,0,21.62,210a12,12,0,1,0,20.77,12c18.12-31.32,50.12-50,85.61-50s67.49,18.69,85.61,50a12,12,0,0,0,20.77-12ZM76,96a52,52,0,1,1,52,52A52.06,52.06,0,0,1,76,96Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M192,96a64,64,0,1,1-64-64A64,64,0,0,1,192,96Z",opacity:"0.2"}),n.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.93,220a8,8,0,0,1-6.93,4H32a8,8,0,0,1-6.92-12c15.23-26.33,38.7-45.21,66.09-54.16a72,72,0,1,1,73.66,0c27.39,8.95,50.86,27.83,66.09,54.16A8,8,0,0,1,230.93,220Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M229.19,213c-15.81-27.32-40.63-46.49-69.47-54.62a70,70,0,1,0-63.44,0C67.44,166.5,42.62,185.67,26.81,213a6,6,0,1,0,10.38,6C56.4,185.81,90.34,166,128,166s71.6,19.81,90.81,53a6,6,0,1,0,10.38-6ZM70,96a58,58,0,1,1,58,58A58.07,58.07,0,0,1,70,96Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227.46,214c-16.52-28.56-43-48.06-73.68-55.09a68,68,0,1,0-51.56,0c-30.64,7-57.16,26.53-73.68,55.09a4,4,0,0,0,6.92,4C55,184.19,89.62,164,128,164s73,20.19,92.54,54a4,4,0,0,0,3.46,2,3.93,3.93,0,0,0,2-.54A4,4,0,0,0,227.46,214ZM68,96a60,60,0,1,1,60,60A60.07,60.07,0,0,1,68,96Z"}))]]),Su=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M164,56a12,12,0,0,1,12-12h12V32a12,12,0,0,1,24,0V44h12a12,12,0,0,1,0,24H212V80a12,12,0,0,1-24,0V68H176A12,12,0,0,1,164,56Zm70.51,54A107.88,107.88,0,1,1,146,21.49a12,12,0,0,1-4,23.67A85,85,0,0,0,128,44,83.94,83.94,0,0,0,62.05,179.94a83.48,83.48,0,0,1,29-23.42,52,52,0,1,1,74,0,83.36,83.36,0,0,1,29,23.42A83.52,83.52,0,0,0,212,128a85.2,85.2,0,0,0-1.16-14,12,12,0,0,1,23.67-4ZM128,148a28,28,0,1,0-28-28A28,28,0,0,0,128,148Zm0,64a83.53,83.53,0,0,0,48.43-15.43,60,60,0,0,0-96.86,0A83.53,83.53,0,0,0,128,212Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a95.76,95.76,0,0,1-31.8,71.37A72,72,0,0,0,128,160a40,40,0,1,0-40-40,40,40,0,0,0,40,40,72,72,0,0,0-64.2,39.37h0A96,96,0,1,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M168,56a8,8,0,0,1,8-8h16V32a8,8,0,0,1,16,0V48h16a8,8,0,0,1,0,16H208V80a8,8,0,0,1-16,0V64H176A8,8,0,0,1,168,56Zm62.56,54.68a103.92,103.92,0,1,1-85.24-85.24,8,8,0,0,1-2.64,15.78A88.07,88.07,0,0,0,40,128a87.62,87.62,0,0,0,22.24,58.41A79.66,79.66,0,0,1,98.3,157.66a48,48,0,1,1,59.4,0,79.66,79.66,0,0,1,36.06,28.75A87.62,87.62,0,0,0,216,128a88.85,88.85,0,0,0-1.22-14.68,8,8,0,1,1,15.78-2.64ZM128,152a32,32,0,1,0-32-32A32,32,0,0,0,128,152Zm0,64a87.57,87.57,0,0,0,53.92-18.5,64,64,0,0,0-107.84,0A87.57,87.57,0,0,0,128,216Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,76a44,44,0,1,1-44,44A44,44,0,0,1,128,76Zm48-12h16V80a8,8,0,0,0,16,0V64h16a8,8,0,0,0,0-16H208V32a8,8,0,0,0-16,0V48H176a8,8,0,0,0,0,16Zm45.35,40.11a8,8,0,0,0-6.57,9.21A88.85,88.85,0,0,1,216,128a87.62,87.62,0,0,1-22.24,58.41A79.86,79.86,0,0,0,172,165.1a4,4,0,0,0-4.84.32,59.81,59.81,0,0,1-78.27,0A4,4,0,0,0,84,165.1a79.71,79.71,0,0,0-21.79,21.31A88,88,0,0,1,128,40a88.76,88.76,0,0,1,14.68,1.22,8,8,0,0,0,2.64-15.78,103.92,103.92,0,1,0,85.24,85.24A8,8,0,0,0,221.35,104.11Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M170,56a6,6,0,0,1,6-6h18V32a6,6,0,0,1,12,0V50h18a6,6,0,0,1,0,12H206V80a6,6,0,0,1-12,0V62H176A6,6,0,0,1,170,56Zm58.59,55A101.9,101.9,0,1,1,145,27.41a6,6,0,1,1-2,11.83A91.66,91.66,0,0,0,128,38,89.95,89.95,0,0,0,62.49,189.64a77.53,77.53,0,0,1,40-31.38,46,46,0,1,1,51,0,77.53,77.53,0,0,1,40,31.38A89.65,89.65,0,0,0,218,128a91.76,91.76,0,0,0-1.24-15,6,6,0,1,1,11.83-2ZM128,154a34,34,0,1,0-34-34A34,34,0,0,0,128,154Zm0,64A89.58,89.58,0,0,0,184.56,198a66,66,0,0,0-113.12,0A89.58,89.58,0,0,0,128,218Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M168,56a8,8,0,0,1,8-8h16V32a8,8,0,0,1,16,0V48h16a8,8,0,0,1,0,16H208V80a8,8,0,0,1-16,0V64H176A8,8,0,0,1,168,56Zm62.56,54.68a103.92,103.92,0,1,1-85.24-85.24,8,8,0,0,1-2.64,15.78A88.07,88.07,0,0,0,40,128a87.62,87.62,0,0,0,22.24,58.41A79.66,79.66,0,0,1,98.3,157.66a48,48,0,1,1,59.4,0,79.66,79.66,0,0,1,36.06,28.75A87.62,87.62,0,0,0,216,128a88.85,88.85,0,0,0-1.22-14.68,8,8,0,1,1,15.78-2.64ZM128,152a32,32,0,1,0-32-32A32,32,0,0,0,128,152Zm0,64a87.57,87.57,0,0,0,53.92-18.5,64,64,0,0,0-107.84,0A87.57,87.57,0,0,0,128,216Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M172,56a4,4,0,0,1,4-4h20V32a4,4,0,0,1,8,0V52h20a4,4,0,0,1,0,8H204V80a4,4,0,0,1-8,0V60H176A4,4,0,0,1,172,56Zm54.62,55.34a99.89,99.89,0,1,1-82-82,4,4,0,0,1-1.32,7.89A93.4,93.4,0,0,0,128,36,92,92,0,0,0,62.83,192.87a75.61,75.61,0,0,1,44.51-34,44,44,0,1,1,41.32,0,75.61,75.61,0,0,1,44.51,34A91.69,91.69,0,0,0,220,128a93.58,93.58,0,0,0-1.27-15.34,4,4,0,0,1,7.89-1.32ZM128,156a36,36,0,1,0-36-36A36,36,0,0,0,128,156Zm0,64a91.61,91.61,0,0,0,59.14-21.58,68,68,0,0,0-118.27,0A91.56,91.56,0,0,0,128,220Z"}))]]),Eu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M125.18,156.94a64,64,0,1,0-82.36,0,100.23,100.23,0,0,0-39.49,32,12,12,0,0,0,19.35,14.2,76,76,0,0,1,122.64,0,12,12,0,0,0,19.36-14.2A100.33,100.33,0,0,0,125.18,156.94ZM44,108a40,40,0,1,1,40,40A40,40,0,0,1,44,108Zm206.1,97.67a12,12,0,0,1-16.78-2.57A76.31,76.31,0,0,0,172,172a12,12,0,0,1,0-24,40,40,0,1,0-10.3-78.67,12,12,0,1,1-6.16-23.19,64,64,0,0,1,57.64,110.8,100.23,100.23,0,0,1,39.49,32A12,12,0,0,1,250.1,205.67Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M136,108A52,52,0,1,1,84,56,52,52,0,0,1,136,108Z",opacity:"0.2"}),n.createElement("path",{d:"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M164.47,195.63a8,8,0,0,1-6.7,12.37H10.23a8,8,0,0,1-6.7-12.37,95.83,95.83,0,0,1,47.22-37.71,60,60,0,1,1,66.5,0A95.83,95.83,0,0,1,164.47,195.63Zm87.91-.15a95.87,95.87,0,0,0-47.13-37.56A60,60,0,0,0,144.7,54.59a4,4,0,0,0-1.33,6A75.83,75.83,0,0,1,147,150.53a4,4,0,0,0,1.07,5.53,112.32,112.32,0,0,1,29.85,30.83,23.92,23.92,0,0,1,3.65,16.47,4,4,0,0,0,3.95,4.64h60.3a8,8,0,0,0,7.73-5.93A8.22,8.22,0,0,0,252.38,195.48Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M112.6,158.43a58,58,0,1,0-57.2,0A93.83,93.83,0,0,0,5.21,196.72a6,6,0,0,0,10.05,6.56,82,82,0,0,1,137.48,0,6,6,0,0,0,10-6.56A93.83,93.83,0,0,0,112.6,158.43ZM38,108a46,46,0,1,1,46,46A46.06,46.06,0,0,1,38,108Zm211,97a6,6,0,0,1-8.3-1.74A81.8,81.8,0,0,0,172,166a6,6,0,0,1,0-12,46,46,0,1,0-17.08-88.73,6,6,0,1,1-4.46-11.14,58,58,0,0,1,50.14,104.3,93.83,93.83,0,0,1,50.19,38.29A6,6,0,0,1,249,205Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M107.19,159a56,56,0,1,0-46.38,0A91.83,91.83,0,0,0,6.88,197.81a4,4,0,1,0,6.7,4.37,84,84,0,0,1,140.84,0,4,4,0,1,0,6.7-4.37A91.83,91.83,0,0,0,107.19,159ZM36,108a48,48,0,1,1,48,48A48.05,48.05,0,0,1,36,108Zm212,95.35a4,4,0,0,1-5.53-1.17A83.81,83.81,0,0,0,172,164a4,4,0,0,1,0-8,48,48,0,1,0-17.82-92.58,4,4,0,1,1-3-7.43,56,56,0,0,1,44,103,91.83,91.83,0,0,1,53.93,38.86A4,4,0,0,1,248,203.35Z"}))]]),Au=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),n.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),Mu=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z"}))]]),Ru=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),n.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),Lu=o.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),pe=n.forwardRef((e,a)=>{const{alt:s,color:r,size:i,weight:l,mirrored:m,children:d,weights:c,...p}=e,{color:u="currentColor",size:h,weight:f="regular",mirrored:g=!1,...x}=n.useContext(Lu);return n.createElement("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:i??h,height:i??h,fill:r??u,viewBox:"0 0 256 256",transform:m||g?"scale(-1, 1)":void 0,...x,...p},!!s&&n.createElement("title",null,s),d,c.get(l??f))});pe.displayName="IconBase";const Wo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:$2}));Wo.displayName="ArchiveIcon";const Bo=Wo,Go=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:O2}));Go.displayName="ArrowCounterClockwiseIcon";const qo=Go,Ko=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Z2}));Ko.displayName="ArrowSquareOutIcon";const Pu=Ko,Yo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:H2}));Yo.displayName="ArrowsLeftRightIcon";const $u=Yo,Qo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:F2}));Qo.displayName="BellIcon";const Ou=Qo,Jo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:T2}));Jo.displayName="BellSlashIcon";const fi=Jo,Xo=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:I2}));Xo.displayName="BuildingsIcon";const hs=Xo,el=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:V2}));el.displayName="CameraIcon";const nn=el,tl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:z2}));tl.displayName="CaretDownIcon";const Wt=tl,al=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:D2}));al.displayName="CaretLeftIcon";const rn=al,sl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:U2}));sl.displayName="CaretRightIcon";const Jt=sl,nl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:W2}));nl.displayName="CaretUpIcon";const rl=nl,il=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:B2}));il.displayName="CaretUpDownIcon";const Zu=il,ol=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:G2}));ol.displayName="CheckIcon";const Ye=ol,ll=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:q2}));ll.displayName="ChecksIcon";const Hu=ll,cl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:K2}));cl.displayName="CircleIcon";const Fu=cl,dl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Y2}));dl.displayName="ClockIcon";const Tu=dl,ul=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Q2}));ul.displayName="CopyIcon";const qa=ul,ml=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:J2}));ml.displayName="DeviceMobileIcon";const Iu=ml,pl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:X2}));pl.displayName="DotsThreeIcon";const Vu=pl,hl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:eu}));hl.displayName="DownloadSimpleIcon";const fl=hl,wl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:tu}));wl.displayName="EnvelopeSimpleIcon";const gl=wl,xl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:au}));xl.displayName="EyeIcon";const Sn=xl,vl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:su}));vl.displayName="EyeSlashIcon";const En=vl,bl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:nu}));bl.displayName="FingerprintIcon";const nr=bl,yl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:ru}));yl.displayName="FolderSimpleIcon";const wi=yl,jl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:iu}));jl.displayName="FunnelIcon";const zu=jl,_l=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:ou}));_l.displayName="GearSixIcon";const Aa=_l,kl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:lu}));kl.displayName="GlobeIcon";const Du=kl,Cl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:cu}));Cl.displayName="HashIcon";const Nl=Cl,Sl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:du}));Sl.displayName="InfoIcon";const Uu=Sl,El=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:uu}));El.displayName="KeyIcon";const Wu=El,Al=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:mu}));Al.displayName="LightningIcon";const Bu=Al,Ml=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:pu}));Ml.displayName="LinkIcon";const Gu=Ml,Rl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:hu}));Rl.displayName="LockIcon";const gi=Rl,Ll=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:fu}));Ll.displayName="MagnifyingGlassIcon";const Pl=Ll,$l=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:wu}));$l.displayName="PaperPlaneTiltIcon";const Ol=$l,Zl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:gu}));Zl.displayName="PencilSimpleIcon";const Hl=Zl,Fl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:xu}));Fl.displayName="PhoneIcon";const qu=Fl,Tl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:vu}));Tl.displayName="PlusIcon";const St=Tl,Il=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:bu}));Il.displayName="PulseIcon";const Ku=Il,Vl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:yu}));Vl.displayName="ShieldIcon";const ea=Vl,zl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:ju}));zl.displayName="SignOutIcon";const Ma=zl,Dl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:_u}));Dl.displayName="StarIcon";const Yu=Dl,Ul=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:ku}));Ul.displayName="TrashIcon";const br=Ul,Wl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Cu}));Wl.displayName="TrayIcon";const Qu=Wl,Bl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Nu}));Bl.displayName="UserIcon";const fs=Bl,Gl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Su}));Gl.displayName="UserCirclePlusIcon";const Ju=Gl,ql=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Eu}));ql.displayName="UsersIcon";const ds=ql,Kl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Au}));Kl.displayName="WarningIcon";const Ta=Kl,Yl=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Mu}));Yl.displayName="WarningCircleIcon";const Ra=Yl,Ql=n.forwardRef((e,a)=>n.createElement(pe,{ref:a,...e,weights:Ru}));Ql.displayName="XIcon";const Pa=Ql;function Xu(e){var a=Object.create(null);return function(s){return a[s]===void 0&&(a[s]=e(s)),a[s]}}var e8=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,t8=Xu(function(e){return e8.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),et="-ms-",us="-moz-",Be="-webkit-",Jl="comm",on="rule",yr="decl",a8="@import",s8="@namespace",Xl="@keyframes",n8="@layer",ec=Math.abs,jr=String.fromCharCode,rr=Object.assign;function r8(e,a){return ut(e,0)^45?(((a<<2^ut(e,0))<<2^ut(e,1))<<2^ut(e,2))<<2^ut(e,3):0}function tc(e){return e.trim()}function qt(e,a){return(e=a.exec(e))?e[0]:e}function Me(e,a,s){return e.replace(a,s)}function zs(e,a,s){return e.indexOf(a,s)}function ut(e,a){return e.charCodeAt(a)|0}function $a(e,a,s){return e.slice(a,s)}function Rt(e){return e.length}function ac(e){return e.length}function os(e,a){return a.push(e),e}function i8(e,a){return e.map(a).join("")}function xi(e,a){return e.filter(function(s){return!qt(s,a)})}var ln=1,Ya=1,sc=0,At=0,ct=0,ts="";function cn(e,a,s,r,i,l,m,d){return{value:e,root:a,parent:s,type:r,props:i,children:l,line:ln,column:Ya,length:m,return:"",siblings:d}}function ma(e,a){return rr(cn("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},a)}function za(e){for(;e.root;)e=ma(e.root,{children:[e]});os(e,e.siblings)}function o8(){return ct}function l8(){return ct=At>0?ut(ts,--At):0,Ya--,ct===10&&(Ya=1,ln--),ct}function Ot(){return ct=At<sc?ut(ts,At++):0,Ya++,ct===10&&(Ya=1,ln++),ct}function ha(){return ut(ts,At)}function Ds(){return At}function dn(e,a){return $a(ts,e,a)}function ws(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function c8(e){return ln=Ya=1,sc=Rt(ts=e),At=0,[]}function d8(e){return ts="",e}function An(e){return tc(dn(At-1,ir(e===91?e+2:e===40?e+1:e)))}function u8(e){for(;(ct=ha())&&ct<33;)Ot();return ws(e)>2||ws(ct)>3?"":" "}function m8(e,a){for(;--a&&Ot()&&!(ct<48||ct>102||ct>57&&ct<65||ct>70&&ct<97););return dn(e,Ds()+(a<6&&ha()==32&&Ot()==32))}function ir(e){for(;Ot();)switch(ct){case e:return At;case 34:case 39:e!==34&&e!==39&&ir(ct);break;case 40:e===41&&ir(e);break;case 92:Ot();break}return At}function p8(e,a){for(;Ot()&&e+ct!==57;)if(e+ct===84&&ha()===47)break;return"/*"+dn(a,At-1)+"*"+jr(e===47?e:Ot())}function h8(e){for(;!ws(ha());)Ot();return dn(e,At)}function f8(e){return d8(Us("",null,null,null,[""],e=c8(e),0,[0],e))}function Us(e,a,s,r,i,l,m,d,c){for(var p=0,u=0,h=m,f=0,g=0,x=0,w=1,b=1,j=1,v=0,k="",N=i,_=l,C=r,y=k;b;)switch(x=v,v=Ot()){case 40:if(x!=108&&ut(y,h-1)==58){zs(y+=Me(An(v),"&","&\f"),"&\f",ec(p?d[p-1]:0))!=-1&&(j=-1);break}case 34:case 39:case 91:y+=An(v);break;case 9:case 10:case 13:case 32:y+=u8(x);break;case 92:y+=m8(Ds()-1,7);continue;case 47:switch(ha()){case 42:case 47:os(w8(p8(Ot(),Ds()),a,s,c),c),(ws(x||1)==5||ws(ha()||1)==5)&&Rt(y)&&$a(y,-1,void 0)!==" "&&(y+=" ");break;default:y+="/"}break;case 123*w:d[p++]=Rt(y)*j;case 125*w:case 59:case 0:switch(v){case 0:case 125:b=0;case 59+u:j==-1&&(y=Me(y,/\f/g,"")),g>0&&(Rt(y)-h||w===0&&x===47)&&os(g>32?bi(y+";",r,s,h-1,c):bi(Me(y," ","")+";",r,s,h-2,c),c);break;case 59:y+=";";default:if(os(C=vi(y,a,s,p,u,i,d,k,N=[],_=[],h,l),l),v===123)if(u===0)Us(y,a,C,C,N,l,h,d,_);else{switch(f){case 99:if(ut(y,3)===110)break;case 108:if(ut(y,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Us(e,C,C,r&&os(vi(e,C,C,0,0,i,d,k,i,N=[],h,_),_),i,_,h,d,r?N:_):Us(y,C,C,C,[""],_,0,d,_)}}p=u=g=0,w=j=1,k=y="",h=m;break;case 58:h=1+Rt(y),g=x;default:if(w<1){if(v==123)--w;else if(v==125&&w++==0&&l8()==125)continue}switch(y+=jr(v),v*w){case 38:j=u>0?1:(y+="\f",-1);break;case 44:d[p++]=(Rt(y)-1)*j,j=1;break;case 64:ha()===45&&(y+=An(Ot())),f=ha(),u=h=Rt(k=y+=h8(Ds())),v++;break;case 45:x===45&&Rt(y)==2&&(w=0)}}return l}function vi(e,a,s,r,i,l,m,d,c,p,u,h){for(var f=i-1,g=i===0?l:[""],x=ac(g),w=0,b=0,j=0;w<r;++w)for(var v=0,k=$a(e,f+1,f=ec(b=m[w])),N=e;v<x;++v)(N=tc(b>0?g[v]+" "+k:Me(k,/&\f/g,g[v])))&&(c[j++]=N);return cn(e,a,s,i===0?on:d,c,p,u,h)}function w8(e,a,s,r){return cn(e,a,s,Jl,jr(o8()),$a(e,2,-2),0,r)}function bi(e,a,s,r,i){return cn(e,a,s,yr,$a(e,0,r),$a(e,r+1,-1),r,i)}function nc(e,a,s){switch(r8(e,a)){case 5103:return Be+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Be+e+e;case 4855:return Be+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return us+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Be+e+us+e+et+e+e;case 5936:switch(ut(e,a+11)){case 114:return Be+e+et+Me(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Be+e+et+Me(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Be+e+et+Me(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Be+e+et+e+e;case 6165:return Be+e+et+"flex-"+e+e;case 5187:return Be+e+Me(e,/(\w+).+(:[^]+)/,Be+"box-$1$2"+et+"flex-$1$2")+e;case 5443:return Be+e+et+"flex-item-"+Me(e,/flex-|-self/g,"")+(qt(e,/flex-|baseline/)?"":et+"grid-row-"+Me(e,/flex-|-self/g,""))+e;case 4675:return Be+e+et+"flex-line-pack"+Me(e,/align-content|flex-|-self/g,"")+e;case 5548:return Be+e+et+Me(e,"shrink","negative")+e;case 5292:return Be+e+et+Me(e,"basis","preferred-size")+e;case 6060:return Be+"box-"+Me(e,"-grow","")+Be+e+et+Me(e,"grow","positive")+e;case 4554:return Be+Me(e,/([^-])(transform)/g,"$1"+Be+"$2")+e;case 6187:return Me(Me(Me(e,/(zoom-|grab)/,Be+"$1"),/(image-set)/,Be+"$1"),e,"")+e;case 5495:case 3959:return Me(e,/(image-set\([^]*)/,Be+"$1$`$1");case 4968:return Me(Me(e,/(.+:)(flex-)?(.*)/,Be+"box-pack:$3"+et+"flex-pack:$3"),/space-between/,"justify")+Be+e+e;case 4200:if(!qt(e,/flex-|baseline/))return et+"grid-column-align"+$a(e,a)+e;break;case 2592:case 3360:return et+Me(e,"template-","")+e;case 4384:case 3616:return s&&s.some(function(r,i){return a=i,qt(r.props,/grid-\w+-end/)})?~zs(e+(s=s[a].value),"span",0)?e:et+Me(e,"-start","")+e+et+"grid-row-span:"+(~zs(s,"span",0)?qt(s,/\d+/):+qt(s,/\d+/)-+qt(e,/\d+/))+";":et+Me(e,"-start","")+e;case 4896:case 4128:return s&&s.some(function(r){return qt(r.props,/grid-\w+-start/)})?e:et+Me(Me(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Me(e,/(.+)-inline(.+)/,Be+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Rt(e)-1-a>6)switch(ut(e,a+1)){case 109:if(ut(e,a+4)!==45)break;case 102:return Me(e,/(.+:)(.+)-([^]+)/,"$1"+Be+"$2-$3$1"+us+(ut(e,a+3)==108?"$3":"$2-$3"))+e;case 115:return~zs(e,"stretch",0)?nc(Me(e,"stretch","fill-available"),a,s)+e:e}break;case 5152:case 5920:return Me(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,i,l,m,d,c,p){return et+i+":"+l+p+(m?et+i+"-span:"+(d?c:+c-+l)+p:"")+e});case 4949:if(ut(e,a+6)===121)return Me(e,":",":"+Be)+e;break;case 6444:switch(ut(e,ut(e,14)===45?18:11)){case 120:return Me(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Be+(ut(e,14)===45?"inline-":"")+"box$3$1"+Be+"$2$3$1"+et+"$2box$3")+e;case 100:return Me(e,":",":"+et)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Me(e,"scroll-","scroll-snap-")+e}return e}function Ys(e,a){for(var s="",r=0;r<e.length;r++)s+=a(e[r],r,e,a)||"";return s}function g8(e,a,s,r){switch(e.type){case n8:if(e.children.length)break;case a8:case s8:case yr:return e.return=e.return||e.value;case Jl:return"";case Xl:return e.return=e.value+"{"+Ys(e.children,r)+"}";case on:if(!Rt(e.value=e.props.join(",")))return""}return Rt(s=Ys(e.children,r))?e.return=e.value+"{"+s+"}":""}function x8(e){var a=ac(e);return function(s,r,i,l){for(var m="",d=0;d<a;d++)m+=e[d](s,r,i,l)||"";return m}}function v8(e){return function(a){a.root||(a=a.return)&&e(a)}}function b8(e,a,s,r){if(e.length>-1&&!e.return)switch(e.type){case yr:e.return=nc(e.value,e.length,s);return;case Xl:return Ys([ma(e,{value:Me(e.value,"@","@"+Be)})],r);case on:if(e.length)return i8(s=e.props,function(i){switch(qt(i,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":za(ma(e,{props:[Me(i,/:(read-\w+)/,":"+us+"$1")]})),za(ma(e,{props:[i]})),rr(e,{props:xi(s,r)});break;case"::placeholder":za(ma(e,{props:[Me(i,/:(plac\w+)/,":"+Be+"input-$1")]})),za(ma(e,{props:[Me(i,/:(plac\w+)/,":"+us+"$1")]})),za(ma(e,{props:[Me(i,/:(plac\w+)/,et+"input-$1")]})),za(ma(e,{props:[i]})),rr(e,{props:xi(s,r)});break}return""})}}var Mn,Rn;const Oa=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",rc="active",ic="data-styled-version",un="6.4.1",_r=`/*!sc*/
19
+ `,ms=typeof window<"u"&&typeof document<"u";function yi(e){if(typeof process<"u"&&process.env!==void 0){const a=process.env[e];if(a!==void 0&&a!=="")return a!=="false"}}const y8=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:(Rn=(Mn=yi("REACT_APP_SC_DISABLE_SPEEDY"))!==null&&Mn!==void 0?Mn:yi("SC_DISABLE_SPEEDY"))!==null&&Rn!==void 0?Rn:typeof process>"u"||process.env===void 0||process.env.NODE_ENV!=="production"),j8="sc-keyframes-",_8={},k8=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
20
20
 
21
21
  `,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
22
22
 
@@ -79,11 +79,11 @@ export function App() {
79
79
  \`\`\`
80
80
 
81
81
  If you need access to the theme in an uncertain composition scenario, \`React.useContext(ThemeContext)\` will not emit an error if there is no \`ThemeProvider\` ancestor.
82
- `}:{};function xs(e,...a){return process.env.NODE_ENV==="production"?new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${a.length>0?` Args: ${a.join(", ")}`:""}`):new Error((function(...s){let r=s[0];const i=[];for(let l=1,m=s.length;l<m;l+=1)i.push(s[l]);return i.forEach(l=>{r=r.replace(/%[a-z]/,l)}),r})(g8[e],...a).trim())}const x8=1<<30;let Us=new Map,Ys=new Map,Ws=1;const Ls=e=>{if(Us.has(e))return Us.get(e);for(;Ys.has(Ws);)Ws++;const a=Ws++;if(process.env.NODE_ENV!=="production"&&((0|a)<0||a>x8))throw xs(16,`${a}`);return Us.set(e,a),Ys.set(a,e),a},v8=e=>Ys.get(e),b8=(e,a)=>{Ws=a+1,Us.set(e,a),Ys.set(a,e)},vi=/invalid hook call/i,Ps=new Set,nc=(e,a)=>{if(process.env.NODE_ENV!=="production"){const s=`The component ${e}${a?` with the id of "${a}"`:""} has been created dynamically.
82
+ `}:{};function vs(e,...a){return process.env.NODE_ENV==="production"?new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${a.length>0?` Args: ${a.join(", ")}`:""}`):new Error((function(...s){let r=s[0];const i=[];for(let l=1,m=s.length;l<m;l+=1)i.push(s[l]);return i.forEach(l=>{r=r.replace(/%[a-z]/,l)}),r})(k8[e],...a).trim())}const C8=1<<30;let Ws=new Map,Qs=new Map,Bs=1;const Ps=e=>{if(Ws.has(e))return Ws.get(e);for(;Qs.has(Bs);)Bs++;const a=Bs++;if(process.env.NODE_ENV!=="production"&&((0|a)<0||a>C8))throw vs(16,`${a}`);return Ws.set(e,a),Qs.set(a,e),a},N8=e=>Qs.get(e),S8=(e,a)=>{Bs=a+1,Ws.set(e,a),Qs.set(a,e)},ji=/invalid hook call/i,$s=new Set,oc=(e,a)=>{if(process.env.NODE_ENV!=="production"){const s=`The component ${e}${a?` with the id of "${a}"`:""} has been created dynamically.
83
83
  You may see this warning because you've called styled inside another component.
84
84
  To resolve this only create new StyledComponents outside of any render method and function component.
85
85
  See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
86
- `,r=console.error;try{let i=!0;console.error=(l,...m)=>{vi.test(l)?(i=!1,Ps.delete(s)):r(l,...m)},typeof o.useState=="function"&&o.useState(null),i&&!Ps.has(s)&&(console.warn(s),Ps.add(s))}catch(i){vi.test(i.message)&&Ps.delete(s)}finally{console.error=r}}},jr=Object.freeze([]),Ya=Object.freeze({});function rc(e,a,s=Ya){return e.theme!==s.theme&&e.theme||a||s.theme}const y8=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,j8=/(^-|-$)/g;function ic(e){return e.replace(y8,"-").replace(j8,"")}const _8=/(a)(d)/gi,bi=e=>String.fromCharCode(e+(e>25?39:97));function oc(e){let a,s="";for(a=Math.abs(e);a>52;a=a/52|0)s=bi(a%52)+s;return(bi(a%52)+s).replace(_8,"$1-$2")}const rr=5381,Ra=(e,a)=>{let s=a.length;for(;s;)e=33*e^a.charCodeAt(--s);return e},lc=e=>Ra(rr,e);function cc(e){return oc(lc(e)>>>0)}function _r(e){return process.env.NODE_ENV!=="production"&&typeof e=="string"&&e||e.displayName||e.name||"Component"}function Bs(e){return typeof e=="string"&&(process.env.NODE_ENV==="production"||e.charAt(0)===e.charAt(0).toLowerCase())}function k8(e){return Bs(e)?`styled.${e}`:`Styled(${_r(e)})`}const dc=Symbol.for("react.memo"),C8=Symbol.for("react.forward_ref"),N8={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},S8={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},uc={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},E8={[C8]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[dc]:uc};function yi(e){return("type"in(a=e)&&a.type.$$typeof)===dc?uc:"$$typeof"in e?E8[e.$$typeof]:N8;var a}const A8=Object.defineProperty,M8=Object.getOwnPropertyNames,R8=Object.getOwnPropertySymbols,L8=Object.getOwnPropertyDescriptor,P8=Object.getPrototypeOf,$8=Object.prototype;function mc(e,a,s){if(typeof a!="string"){const r=P8(a);r&&r!==$8&&mc(e,r,s);const i=M8(a).concat(R8(a)),l=yi(e),m=yi(a);for(let c=0;c<i.length;++c){const d=i[c];if(!(d in S8||s&&s[d]||m&&d in m||l&&d in l)){const p=L8(a,d);try{A8(e,d,p)}catch{}}}}return e}function vs(e){return typeof e=="function"}function kr(e){return typeof e=="object"&&"styledComponentId"in e}function os(e,a){return e&&a?e+" "+a:e||a||""}function ir(e,a){return e.join("")}function Oa(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function or(e,a,s=!1){if(!s&&!Oa(e)&&!Array.isArray(e))return a;if(Array.isArray(a))for(let r=0;r<a.length;r++)e[r]=or(e[r],a[r]);else if(Oa(a))for(const r in a)e[r]=or(e[r],a[r]);return e}function pc(e,a){Object.defineProperty(e,"toString",{value:a})}const O8=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let a=this._cIndex;if(e>this._cGroup)for(let s=this._cGroup;s<e;s++)a+=this.groupSizes[s];else for(let s=this._cGroup-1;s>=e;s--)a-=this.groupSizes[s];return this._cGroup=e,this._cIndex=a,a}insertRules(e,a){if(e>=this.groupSizes.length){const i=this.groupSizes,l=i.length;let m=l;for(;e>=m;)if(m<<=1,m<0)throw xs(16,`${e}`);this.groupSizes=new Uint32Array(m),this.groupSizes.set(i),this.length=m;for(let c=l;c<m;c++)this.groupSizes[c]=0}let s=this.indexOfGroup(e+1),r=0;for(let i=0,l=a.length;i<l;i++)this.tag.insertRule(s,a[i])&&(this.groupSizes[e]++,s++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){const a=this.groupSizes[e],s=this.indexOfGroup(e),r=s+a;this.groupSizes[e]=0;for(let i=s;i<r;i++)this.tag.deleteRule(s);a>0&&this._cGroup>e&&(this._cIndex-=a)}}getGroup(e){let a="";if(e>=this.length||this.groupSizes[e]===0)return a;const s=this.groupSizes[e],r=this.indexOfGroup(e),i=r+s;for(let l=r;l<i;l++)a+=this.tag.getRule(l)+yr;return a}},Z8=`style[${$a}][${sc}="${dn}"]`,H8=new RegExp(`^${$a}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),ji=e=>typeof ShadowRoot<"u"&&e instanceof ShadowRoot||"host"in e&&e.nodeType===11,lr=e=>{if(!e)return document;if(ji(e))return e;if("getRootNode"in e){const a=e.getRootNode();if(ji(a))return a}return document},F8=(e,a,s)=>{const r=s.split(",");let i;for(let l=0,m=r.length;l<m;l++)(i=r[l])&&e.registerName(a,i)},T8=(e,a)=>{var s;const r=((s=a.textContent)!==null&&s!==void 0?s:"").split(yr),i=[];for(let l=0,m=r.length;l<m;l++){const c=r[l].trim();if(!c)continue;const d=c.match(H8);if(d){const p=0|parseInt(d[1],10),u=d[2];p!==0&&(b8(u,p),F8(e,u,d[3]),e.getTag().insertRules(p,i)),i.length=0}else i.push(c)}},Rn=e=>{const a=lr(e.options.target).querySelectorAll(Z8);for(let s=0,r=a.length;s<r;s++){const i=a[s];i&&i.getAttribute($a)!==ac&&(T8(e,i),i.parentNode&&i.parentNode.removeChild(i))}};let ss=!1;function I8(){if(ss!==!1)return ss;if(typeof document<"u"){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return ss=e.nonce||e.getAttribute("content")||void 0;const a=document.head.querySelector('meta[name="sc-nonce"]');if(a)return ss=a.getAttribute("content")||void 0}return ss=typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0}const hc=(e,a)=>{const s=document.head,r=e||s,i=document.createElement("style"),l=(d=>{const p=Array.from(d.querySelectorAll(`style[${$a}]`));return p[p.length-1]})(r),m=l!==void 0?l.nextSibling:null;i.setAttribute($a,ac),i.setAttribute(sc,dn);const c=a||I8();return c&&i.setAttribute("nonce",c),r.insertBefore(i,m),i},V8=class{constructor(e,a){this.element=hc(e,a),this.element.appendChild(document.createTextNode("")),this.sheet=(s=>{var r;if(s.sheet)return s.sheet;const i=(r=s.getRootNode().styleSheets)!==null&&r!==void 0?r:document.styleSheets;for(let l=0,m=i.length;l<m;l++){const c=i[l];if(c.ownerNode===s)return c}throw xs(17)})(this.element),this.length=0}insertRule(e,a){try{return this.sheet.insertRule(a,e),this.length++,!0}catch{return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const a=this.sheet.cssRules[e];return a&&a.cssText?a.cssText:""}},z8=class{constructor(e,a){this.element=hc(e,a),this.nodes=this.element.childNodes,this.length=0}insertRule(e,a){if(e<=this.length&&e>=0){const s=document.createTextNode(a);return this.element.insertBefore(s,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let _i=us;const D8={isServer:!us,useCSSOMInjection:!h8};class bs{static registerId(a){return Ls(a)}constructor(a=Ya,s={},r){this.options=Object.assign(Object.assign({},D8),a),this.gs=s,this.keyframeIds=new Set,this.names=new Map(r),this.server=!!a.isServer,!this.server&&us&&_i&&(_i=!1,Rn(this)),pc(this,()=>(i=>{const l=i.getTag(),{length:m}=l;let c="";for(let d=0;d<m;d++){const p=v8(d);if(p===void 0)continue;const u=i.names.get(p);if(u===void 0||!u.size)continue;const f=l.getGroup(d);if(f.length===0)continue;const h=$a+".g"+d+'[id="'+p+'"]';let g="";for(const x of u)x.length>0&&(g+=x+",");c+=f+h+'{content:"'+g+'"}'+yr}return c})(this))}rehydrate(){!this.server&&us&&Rn(this)}reconstructWithOptions(a,s=!0){const r=new bs(Object.assign(Object.assign({},this.options),a),this.gs,s&&this.names||void 0);return r.keyframeIds=new Set(this.keyframeIds),!this.server&&us&&a.target!==this.options.target&&lr(this.options.target)!==lr(a.target)&&Rn(r),r}allocateGSInstance(a){return this.gs[a]=(this.gs[a]||0)+1}getTag(){return this.tag||(this.tag=(a=(({useCSSOMInjection:s,target:r,nonce:i})=>s?new V8(r,i):new z8(r,i))(this.options),new O8(a)));var a}hasNameForId(a,s){var r,i;return(i=(r=this.names.get(a))===null||r===void 0?void 0:r.has(s))!==null&&i!==void 0&&i}registerName(a,s){Ls(a),a.startsWith(f8)&&this.keyframeIds.add(a);const r=this.names.get(a);r?r.add(s):this.names.set(a,new Set([s]))}insertRules(a,s,r){this.registerName(a,s),this.getTag().insertRules(Ls(a),r)}clearNames(a){this.names.has(a)&&this.names.get(a).clear()}clearRules(a){this.getTag().clearGroup(Ls(a)),this.clearNames(a)}clearTag(){this.tag=void 0}}const fc=new WeakSet,U8={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function W8(e,a){return a==null||typeof a=="boolean"||a===""?"":typeof a!="number"||a===0||e in U8||e.startsWith("--")?String(a).trim():a+"px"}const Na=47;function ki(e){if(e.charCodeAt(0)===45&&e.charCodeAt(1)===45)return e;let a="";for(let s=0;s<e.length;s++){const r=e.charCodeAt(s);a+=r>=65&&r<=90?"-"+String.fromCharCode(r+32):e[s]}return a.startsWith("ms-")?"-"+a:a}const B8=Symbol.for("sc-keyframes");function cr(e){return typeof e=="object"&&e!==null&&B8 in e}function wc(e){return vs(e)&&!(e.prototype&&e.prototype.isReactComponent)}const gc=e=>e==null||e===!1||e==="",G8=Symbol.for("react.client.reference");function Ci(e){return e.$$typeof===G8}function Ni(e){const a=e.$$id,s=(a&&a.includes("#")?a.split("#").pop():a)||e.name||"unknown";console.warn(`Interpolating a client component (${s}) as a selector is not supported in server components. The component selector pattern requires access to the component's internal class name, which is not available across the server/client boundary. Use a plain CSS class selector instead.`)}function xc(e,a){for(const s in e){const r=e[s];e.hasOwnProperty(s)&&!gc(r)&&(Array.isArray(r)&&fc.has(r)||vs(r)?a.push(ki(s)+":",r,";"):Oa(r)?(a.push(s+" {"),xc(r,a),a.push("}")):a.push(ki(s)+": "+W8(s,r)+";"))}}function ha(e,a,s,r,i=[]){if(gc(e))return i;const l=typeof e;if(l==="string")return i.push(e),i;if(l==="function"){if(Ci(e))return process.env.NODE_ENV!=="production"&&Ni(e),i;if(wc(e)&&a){const m=e(a);return process.env.NODE_ENV==="production"||typeof m!="object"||Array.isArray(m)||cr(m)||Oa(m)||m===null||console.error(`${_r(e)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),ha(m,a,s,r,i)}return i.push(e),i}if(Array.isArray(e)){for(let m=0;m<e.length;m++)ha(e[m],a,s,r,i);return i}return kr(e)?(i.push(`.${e.styledComponentId}`),i):cr(e)?(s?(e.inject(s,r),i.push(e.getName(r))):i.push(e),i):Ci(e)?(process.env.NODE_ENV!=="production"&&Ni(e),i):Oa(e)?(xc(e,i),i):(i.push(e.toString()),i)}const q8=lc(dn);class K8{constructor(a,s,r){this.rules=a,this.componentId=s,this.baseHash=Ra(q8,s),this.baseStyle=r,bs.registerId(s)}generateAndInjectStyles(a,s,r){let i=this.baseStyle?this.baseStyle.generateAndInjectStyles(a,s,r):"";{let l="";for(let m=0;m<this.rules.length;m++){const c=this.rules[m];if(typeof c=="string")l+=c;else if(c)if(wc(c)){const d=c(a);typeof d=="string"?l+=d:d!=null&&d!==!1&&(process.env.NODE_ENV==="production"||typeof d!="object"||Array.isArray(d)||cr(d)||Oa(d)||console.error(`${_r(c)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),l+=ir(ha(d,a,s,r)))}else l+=ir(ha(c,a,s,r))}if(l){this.dynamicNameCache||(this.dynamicNameCache=new Map);const m=r.hash?r.hash+l:l;let c=this.dynamicNameCache.get(m);if(!c){if(c=oc(Ra(Ra(this.baseHash,r.hash),l)>>>0),this.dynamicNameCache.size>=200){const d=this.dynamicNameCache.keys().next().value;d!==void 0&&this.dynamicNameCache.delete(d)}this.dynamicNameCache.set(m,c)}if(!s.hasNameForId(this.componentId,c)){const d=r(l,"."+c,void 0,this.componentId);s.insertRules(this.componentId,c,d)}i=os(i,c)}}return i}}const Y8=/&/g;function vc(e,a){let s=0;for(;--a>=0&&e.charCodeAt(a)===92;)s++;return!(1&~s)}function Ln(e){const a=e.length;let s="",r=0,i=0,l=0,m=!1,c=!1;for(let d=0;d<a;d++){const p=e.charCodeAt(d);if(l!==0||m||p!==Na||e.charCodeAt(d+1)!==42)if(m)p===42&&e.charCodeAt(d+1)===Na&&(m=!1,d++);else if(p!==34&&p!==39||vc(e,d)){if(l===0)if(p===123)i++;else if(p===125){if(i--,i<0){c=!0;let u=d+1;for(;u<a;){const f=e.charCodeAt(u);if(f===59||f===10)break;u++}u<a&&e.charCodeAt(u)===59&&u++,i=0,d=u-1,r=u;continue}i===0&&(s+=e.substring(r,d+1),r=d+1)}else p===59&&i===0&&(s+=e.substring(r,d+1),r=d+1)}else l===0?l=p:l===p&&(l=0);else m=!0,d++}return c||i!==0||l!==0?(r<a&&i===0&&l===0&&(s+=e.substring(r)),s):e}function bc(e,a){const s=a+" ",r=","+s;for(let i=0;i<e.length;i++){const l=e[i];if(l.type==="rule"){l.value=(s+l.value).replaceAll(",",r);const m=l.props,c=[];for(let d=0;d<m.length;d++)c[d]=s+m[d];l.props=c}Array.isArray(l.children)&&l.type!=="@keyframes"&&bc(l.children,a)}return e}function Q8({options:e=Ya,plugins:a=jr}=Ya){let s,r,i;const l=(h,g,x)=>x.startsWith(r)&&x.endsWith(r)&&x.replaceAll(r,"").length>0?`.${s}`:h,m=a.slice();m.push(h=>{h.type===rn&&h.value.includes("&")&&(i||(i=new RegExp(`\\${r}\\b`,"g")),h.props[0]=h.props[0].replace(Y8,r).replace(i,l))}),e.prefix&&m.push(p8),m.push(d8);let c=[];const d=u8(m.concat(m8(h=>c.push(h)))),p=(h,g="",x="",w="&")=>{s=w,r=g,i=void 0;const b=(function(v){const k=v.indexOf("//")!==-1,N=v.indexOf("}")!==-1;if(!k&&!N)return v;if(!k)return Ln(v);const _=v.length;let C="",y=0,E=0,A=0,H=0,M=0,T=!1;for(;E<_;){const P=v.charCodeAt(E);if(P!==34&&P!==39||vc(v,E))if(A===0)if(P===Na&&E+1<_&&v.charCodeAt(E+1)===42){for(E+=2;E+1<_&&(v.charCodeAt(E)!==42||v.charCodeAt(E+1)!==Na);)E++;E+=2}else if(P!==40)if(P!==41)if(H>0)E++;else if(P===42&&E+1<_&&v.charCodeAt(E+1)===Na)C+=v.substring(y,E),E+=2,y=E,T=!0;else if(P===Na&&E+1<_&&v.charCodeAt(E+1)===Na){for(C+=v.substring(y,E);E<_&&v.charCodeAt(E)!==10;)E++;y=E,T=!0}else P===123?M++:P===125&&M--,E++;else H>0&&H--,E++;else H++,E++;else E++;else A===0?A=P:A===P&&(A=0),E++}return T?(y<_&&(C+=v.substring(y)),M===0?C:Ln(C)):M===0?v:Ln(v)})(h);let j=l8(x||g?x+" "+g+" { "+b+" }":b);return e.namespace&&(j=bc(j,e.namespace)),c=[],Ks(j,d),c},u=e;let f=rr;for(let h=0;h<a.length;h++)a[h].name||xs(15),f=Ra(f,a[h].name);return u!=null&&u.namespace&&(f=Ra(f,u.namespace)),u!=null&&u.prefix&&(f=Ra(f,"p")),p.hash=f!==rr?f.toString():"",p}const J8=new bs,X8=Q8(),yc=o.createContext({shouldForwardProp:void 0,styleSheet:J8,stylis:X8,stylisPlugins:void 0});yc.Consumer;function jc(){return o.useContext(yc)}const Cr=o.createContext(void 0);Cr.Consumer;const Si=Object.prototype.hasOwnProperty,Pn={};function e4(e,a){const s=typeof e!="string"?"sc":ic(e);Pn[s]=(Pn[s]||0)+1;const r=s+"-"+cc(dn+s+Pn[s]);return a?a+"-"+r:r}let $n;function t4(e,a,s){const r=kr(e),i=e,l=!Bs(e),{attrs:m=jr,componentId:c=e4(a.displayName,a.parentComponentId),displayName:d=k8(e)}=a,p=a.displayName&&a.componentId?ic(a.displayName)+"-"+a.componentId:a.componentId||c,u=r&&i.attrs?i.attrs.concat(m).filter(Boolean):m;let{shouldForwardProp:f}=a;if(r&&i.shouldForwardProp){const w=i.shouldForwardProp;if(a.shouldForwardProp){const b=a.shouldForwardProp;f=(j,v)=>w(j,v)&&b(j,v)}else f=w}const h=new K8(s,p,r?i.componentStyle:void 0);function g(w,b){return(function(j,v,k){const{attrs:N,componentStyle:_,defaultProps:C,foldedComponentIds:y,styledComponentId:E,target:A}=j,H=o.useContext(Cr),M=jc(),T=j.shouldForwardProp||M.shouldForwardProp;process.env.NODE_ENV!=="production"&&o.useDebugValue&&o.useDebugValue(E);const P=rc(v,H,C)||Ya;let S,$;{const O=o.useRef(null),F=O.current;if(F!==null&&F[1]===P&&F[2]===M.styleSheet&&F[3]===M.stylis&&F[7]===_&&(function(W,U,V){const G=W,Y=U;let de=0;for(const fe in Y)if(Si.call(Y,fe)&&(de++,G[fe]!==Y[fe]))return!1;return de===V})(F[0],v,F[4]))S=F[5],$=F[6];else{S=(function(U,V,G){const Y=Object.assign(Object.assign({},V),{className:void 0,theme:G}),de=U.length>1;for(let fe=0;fe<U.length;fe++){const ne=U[fe],ae=vs(ne)?ne(de?Object.assign({},Y):Y):ne;for(const re in ae)re==="className"?Y.className=os(Y.className,ae[re]):re==="style"?Y.style=Object.assign(Object.assign({},Y.style),ae[re]):re in V&&V[re]===void 0||(Y[re]=ae[re])}return"className"in V&&typeof V.className=="string"&&(Y.className=os(Y.className,V.className)),Y})(N,v,P),$=(function(U,V,G,Y){const de=U.generateAndInjectStyles(V,G,Y);return process.env.NODE_ENV!=="production"&&o.useDebugValue&&o.useDebugValue(de),de})(_,S,M.styleSheet,M.stylis);let W=0;for(const U in v)Si.call(v,U)&&W++;O.current=[v,P,M.styleSheet,M.stylis,W,S,$,_]}}process.env.NODE_ENV!=="production"&&j.warnTooManyClasses&&j.warnTooManyClasses($);const Z=S.as||A,R=(function(O,F,W,U){const V={};for(const G in O)O[G]===void 0||G[0]==="$"||G==="as"||G==="theme"&&O.theme===W||(G==="forwardedAs"?V.as=O.forwardedAs:U&&!U(G,F)||(V[G]=O[G],U||process.env.NODE_ENV!=="development"||qu(G)||($n||($n=new Set)).has(G)||!Bs(F)||F.includes("-")||($n.add(G),console.warn(`styled-components: it looks like an unknown prop "${G}" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via \`<StyleSheetManager shouldForwardProp={...}>\` (connect an API like \`@emotion/is-prop-valid\`) or consider using transient props (\`$\` prefix for automatic filtering.)`))));return V})(S,Z,P,T);let L=os(y,E);return $&&(L+=" "+$),S.className&&(L+=" "+S.className),R[Bs(Z)&&Z.includes("-")?"class":"className"]=L,k&&(R.ref=k),o.createElement(Z,R)})(x,w,b)}g.displayName=d;let x=o.forwardRef(g);return x.attrs=u,x.componentStyle=h,x.displayName=d,x.shouldForwardProp=f,x.foldedComponentIds=r?os(i.foldedComponentIds,i.styledComponentId):"",x.styledComponentId=p,x.target=r?i.target:e,Object.defineProperty(x,"defaultProps",{get(){return this._foldedDefaultProps},set(w){this._foldedDefaultProps=r?(function(b,...j){for(const v of j)or(b,v,!0);return b})({},i.defaultProps,w):w}}),process.env.NODE_ENV!=="production"&&(nc(d,p),x.warnTooManyClasses=((w,b)=>{let j={},v=!1;return k=>{!v&&(j[k]=!0,Object.keys(j).length>=200)&&(console.warn(`Over 200 classes were generated for component ${w}${b?` with the id of "${b}"`:""}.
86
+ `,r=console.error;try{let i=!0;console.error=(l,...m)=>{ji.test(l)?(i=!1,$s.delete(s)):r(l,...m)},typeof o.useState=="function"&&o.useState(null),i&&!$s.has(s)&&(console.warn(s),$s.add(s))}catch(i){ji.test(i.message)&&$s.delete(s)}finally{console.error=r}}},kr=Object.freeze([]),Qa=Object.freeze({});function lc(e,a,s=Qa){return e.theme!==s.theme&&e.theme||a||s.theme}const E8=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,A8=/(^-|-$)/g;function cc(e){return e.replace(E8,"-").replace(A8,"")}const M8=/(a)(d)/gi,_i=e=>String.fromCharCode(e+(e>25?39:97));function dc(e){let a,s="";for(a=Math.abs(e);a>52;a=a/52|0)s=_i(a%52)+s;return(_i(a%52)+s).replace(M8,"$1-$2")}const or=5381,La=(e,a)=>{let s=a.length;for(;s;)e=33*e^a.charCodeAt(--s);return e},uc=e=>La(or,e);function mc(e){return dc(uc(e)>>>0)}function Cr(e){return process.env.NODE_ENV!=="production"&&typeof e=="string"&&e||e.displayName||e.name||"Component"}function Gs(e){return typeof e=="string"&&(process.env.NODE_ENV==="production"||e.charAt(0)===e.charAt(0).toLowerCase())}function R8(e){return Gs(e)?`styled.${e}`:`Styled(${Cr(e)})`}const pc=Symbol.for("react.memo"),L8=Symbol.for("react.forward_ref"),P8={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},$8={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},hc={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},O8={[L8]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[pc]:hc};function ki(e){return("type"in(a=e)&&a.type.$$typeof)===pc?hc:"$$typeof"in e?O8[e.$$typeof]:P8;var a}const Z8=Object.defineProperty,H8=Object.getOwnPropertyNames,F8=Object.getOwnPropertySymbols,T8=Object.getOwnPropertyDescriptor,I8=Object.getPrototypeOf,V8=Object.prototype;function fc(e,a,s){if(typeof a!="string"){const r=I8(a);r&&r!==V8&&fc(e,r,s);const i=H8(a).concat(F8(a)),l=ki(e),m=ki(a);for(let d=0;d<i.length;++d){const c=i[d];if(!(c in $8||s&&s[c]||m&&c in m||l&&c in l)){const p=T8(a,c);try{Z8(e,c,p)}catch{}}}}return e}function bs(e){return typeof e=="function"}function Nr(e){return typeof e=="object"&&"styledComponentId"in e}function ls(e,a){return e&&a?e+" "+a:e||a||""}function lr(e,a){return e.join("")}function Za(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function cr(e,a,s=!1){if(!s&&!Za(e)&&!Array.isArray(e))return a;if(Array.isArray(a))for(let r=0;r<a.length;r++)e[r]=cr(e[r],a[r]);else if(Za(a))for(const r in a)e[r]=cr(e[r],a[r]);return e}function wc(e,a){Object.defineProperty(e,"toString",{value:a})}const z8=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let a=this._cIndex;if(e>this._cGroup)for(let s=this._cGroup;s<e;s++)a+=this.groupSizes[s];else for(let s=this._cGroup-1;s>=e;s--)a-=this.groupSizes[s];return this._cGroup=e,this._cIndex=a,a}insertRules(e,a){if(e>=this.groupSizes.length){const i=this.groupSizes,l=i.length;let m=l;for(;e>=m;)if(m<<=1,m<0)throw vs(16,`${e}`);this.groupSizes=new Uint32Array(m),this.groupSizes.set(i),this.length=m;for(let d=l;d<m;d++)this.groupSizes[d]=0}let s=this.indexOfGroup(e+1),r=0;for(let i=0,l=a.length;i<l;i++)this.tag.insertRule(s,a[i])&&(this.groupSizes[e]++,s++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){const a=this.groupSizes[e],s=this.indexOfGroup(e),r=s+a;this.groupSizes[e]=0;for(let i=s;i<r;i++)this.tag.deleteRule(s);a>0&&this._cGroup>e&&(this._cIndex-=a)}}getGroup(e){let a="";if(e>=this.length||this.groupSizes[e]===0)return a;const s=this.groupSizes[e],r=this.indexOfGroup(e),i=r+s;for(let l=r;l<i;l++)a+=this.tag.getRule(l)+_r;return a}},D8=`style[${Oa}][${ic}="${un}"]`,U8=new RegExp(`^${Oa}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),Ci=e=>typeof ShadowRoot<"u"&&e instanceof ShadowRoot||"host"in e&&e.nodeType===11,dr=e=>{if(!e)return document;if(Ci(e))return e;if("getRootNode"in e){const a=e.getRootNode();if(Ci(a))return a}return document},W8=(e,a,s)=>{const r=s.split(",");let i;for(let l=0,m=r.length;l<m;l++)(i=r[l])&&e.registerName(a,i)},B8=(e,a)=>{var s;const r=((s=a.textContent)!==null&&s!==void 0?s:"").split(_r),i=[];for(let l=0,m=r.length;l<m;l++){const d=r[l].trim();if(!d)continue;const c=d.match(U8);if(c){const p=0|parseInt(c[1],10),u=c[2];p!==0&&(S8(u,p),W8(e,u,c[3]),e.getTag().insertRules(p,i)),i.length=0}else i.push(d)}},Ln=e=>{const a=dr(e.options.target).querySelectorAll(D8);for(let s=0,r=a.length;s<r;s++){const i=a[s];i&&i.getAttribute(Oa)!==rc&&(B8(e,i),i.parentNode&&i.parentNode.removeChild(i))}};let ns=!1;function G8(){if(ns!==!1)return ns;if(typeof document<"u"){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return ns=e.nonce||e.getAttribute("content")||void 0;const a=document.head.querySelector('meta[name="sc-nonce"]');if(a)return ns=a.getAttribute("content")||void 0}return ns=typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0}const gc=(e,a)=>{const s=document.head,r=e||s,i=document.createElement("style"),l=(c=>{const p=Array.from(c.querySelectorAll(`style[${Oa}]`));return p[p.length-1]})(r),m=l!==void 0?l.nextSibling:null;i.setAttribute(Oa,rc),i.setAttribute(ic,un);const d=a||G8();return d&&i.setAttribute("nonce",d),r.insertBefore(i,m),i},q8=class{constructor(e,a){this.element=gc(e,a),this.element.appendChild(document.createTextNode("")),this.sheet=(s=>{var r;if(s.sheet)return s.sheet;const i=(r=s.getRootNode().styleSheets)!==null&&r!==void 0?r:document.styleSheets;for(let l=0,m=i.length;l<m;l++){const d=i[l];if(d.ownerNode===s)return d}throw vs(17)})(this.element),this.length=0}insertRule(e,a){try{return this.sheet.insertRule(a,e),this.length++,!0}catch{return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const a=this.sheet.cssRules[e];return a&&a.cssText?a.cssText:""}},K8=class{constructor(e,a){this.element=gc(e,a),this.nodes=this.element.childNodes,this.length=0}insertRule(e,a){if(e<=this.length&&e>=0){const s=document.createTextNode(a);return this.element.insertBefore(s,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let Ni=ms;const Y8={isServer:!ms,useCSSOMInjection:!y8};class ys{static registerId(a){return Ps(a)}constructor(a=Qa,s={},r){this.options=Object.assign(Object.assign({},Y8),a),this.gs=s,this.keyframeIds=new Set,this.names=new Map(r),this.server=!!a.isServer,!this.server&&ms&&Ni&&(Ni=!1,Ln(this)),wc(this,()=>(i=>{const l=i.getTag(),{length:m}=l;let d="";for(let c=0;c<m;c++){const p=N8(c);if(p===void 0)continue;const u=i.names.get(p);if(u===void 0||!u.size)continue;const h=l.getGroup(c);if(h.length===0)continue;const f=Oa+".g"+c+'[id="'+p+'"]';let g="";for(const x of u)x.length>0&&(g+=x+",");d+=h+f+'{content:"'+g+'"}'+_r}return d})(this))}rehydrate(){!this.server&&ms&&Ln(this)}reconstructWithOptions(a,s=!0){const r=new ys(Object.assign(Object.assign({},this.options),a),this.gs,s&&this.names||void 0);return r.keyframeIds=new Set(this.keyframeIds),!this.server&&ms&&a.target!==this.options.target&&dr(this.options.target)!==dr(a.target)&&Ln(r),r}allocateGSInstance(a){return this.gs[a]=(this.gs[a]||0)+1}getTag(){return this.tag||(this.tag=(a=(({useCSSOMInjection:s,target:r,nonce:i})=>s?new q8(r,i):new K8(r,i))(this.options),new z8(a)));var a}hasNameForId(a,s){var r,i;return(i=(r=this.names.get(a))===null||r===void 0?void 0:r.has(s))!==null&&i!==void 0&&i}registerName(a,s){Ps(a),a.startsWith(j8)&&this.keyframeIds.add(a);const r=this.names.get(a);r?r.add(s):this.names.set(a,new Set([s]))}insertRules(a,s,r){this.registerName(a,s),this.getTag().insertRules(Ps(a),r)}clearNames(a){this.names.has(a)&&this.names.get(a).clear()}clearRules(a){this.getTag().clearGroup(Ps(a)),this.clearNames(a)}clearTag(){this.tag=void 0}}const xc=new WeakSet,Q8={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function J8(e,a){return a==null||typeof a=="boolean"||a===""?"":typeof a!="number"||a===0||e in Q8||e.startsWith("--")?String(a).trim():a+"px"}const Sa=47;function Si(e){if(e.charCodeAt(0)===45&&e.charCodeAt(1)===45)return e;let a="";for(let s=0;s<e.length;s++){const r=e.charCodeAt(s);a+=r>=65&&r<=90?"-"+String.fromCharCode(r+32):e[s]}return a.startsWith("ms-")?"-"+a:a}const X8=Symbol.for("sc-keyframes");function ur(e){return typeof e=="object"&&e!==null&&X8 in e}function vc(e){return bs(e)&&!(e.prototype&&e.prototype.isReactComponent)}const bc=e=>e==null||e===!1||e==="",e4=Symbol.for("react.client.reference");function Ei(e){return e.$$typeof===e4}function Ai(e){const a=e.$$id,s=(a&&a.includes("#")?a.split("#").pop():a)||e.name||"unknown";console.warn(`Interpolating a client component (${s}) as a selector is not supported in server components. The component selector pattern requires access to the component's internal class name, which is not available across the server/client boundary. Use a plain CSS class selector instead.`)}function yc(e,a){for(const s in e){const r=e[s];e.hasOwnProperty(s)&&!bc(r)&&(Array.isArray(r)&&xc.has(r)||bs(r)?a.push(Si(s)+":",r,";"):Za(r)?(a.push(s+" {"),yc(r,a),a.push("}")):a.push(Si(s)+": "+J8(s,r)+";"))}}function fa(e,a,s,r,i=[]){if(bc(e))return i;const l=typeof e;if(l==="string")return i.push(e),i;if(l==="function"){if(Ei(e))return process.env.NODE_ENV!=="production"&&Ai(e),i;if(vc(e)&&a){const m=e(a);return process.env.NODE_ENV==="production"||typeof m!="object"||Array.isArray(m)||ur(m)||Za(m)||m===null||console.error(`${Cr(e)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),fa(m,a,s,r,i)}return i.push(e),i}if(Array.isArray(e)){for(let m=0;m<e.length;m++)fa(e[m],a,s,r,i);return i}return Nr(e)?(i.push(`.${e.styledComponentId}`),i):ur(e)?(s?(e.inject(s,r),i.push(e.getName(r))):i.push(e),i):Ei(e)?(process.env.NODE_ENV!=="production"&&Ai(e),i):Za(e)?(yc(e,i),i):(i.push(e.toString()),i)}const t4=uc(un);class a4{constructor(a,s,r){this.rules=a,this.componentId=s,this.baseHash=La(t4,s),this.baseStyle=r,ys.registerId(s)}generateAndInjectStyles(a,s,r){let i=this.baseStyle?this.baseStyle.generateAndInjectStyles(a,s,r):"";{let l="";for(let m=0;m<this.rules.length;m++){const d=this.rules[m];if(typeof d=="string")l+=d;else if(d)if(vc(d)){const c=d(a);typeof c=="string"?l+=c:c!=null&&c!==!1&&(process.env.NODE_ENV==="production"||typeof c!="object"||Array.isArray(c)||ur(c)||Za(c)||console.error(`${Cr(d)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),l+=lr(fa(c,a,s,r)))}else l+=lr(fa(d,a,s,r))}if(l){this.dynamicNameCache||(this.dynamicNameCache=new Map);const m=r.hash?r.hash+l:l;let d=this.dynamicNameCache.get(m);if(!d){if(d=dc(La(La(this.baseHash,r.hash),l)>>>0),this.dynamicNameCache.size>=200){const c=this.dynamicNameCache.keys().next().value;c!==void 0&&this.dynamicNameCache.delete(c)}this.dynamicNameCache.set(m,d)}if(!s.hasNameForId(this.componentId,d)){const c=r(l,"."+d,void 0,this.componentId);s.insertRules(this.componentId,d,c)}i=ls(i,d)}}return i}}const s4=/&/g;function jc(e,a){let s=0;for(;--a>=0&&e.charCodeAt(a)===92;)s++;return!(1&~s)}function Pn(e){const a=e.length;let s="",r=0,i=0,l=0,m=!1,d=!1;for(let c=0;c<a;c++){const p=e.charCodeAt(c);if(l!==0||m||p!==Sa||e.charCodeAt(c+1)!==42)if(m)p===42&&e.charCodeAt(c+1)===Sa&&(m=!1,c++);else if(p!==34&&p!==39||jc(e,c)){if(l===0)if(p===123)i++;else if(p===125){if(i--,i<0){d=!0;let u=c+1;for(;u<a;){const h=e.charCodeAt(u);if(h===59||h===10)break;u++}u<a&&e.charCodeAt(u)===59&&u++,i=0,c=u-1,r=u;continue}i===0&&(s+=e.substring(r,c+1),r=c+1)}else p===59&&i===0&&(s+=e.substring(r,c+1),r=c+1)}else l===0?l=p:l===p&&(l=0);else m=!0,c++}return d||i!==0||l!==0?(r<a&&i===0&&l===0&&(s+=e.substring(r)),s):e}function _c(e,a){const s=a+" ",r=","+s;for(let i=0;i<e.length;i++){const l=e[i];if(l.type==="rule"){l.value=(s+l.value).replaceAll(",",r);const m=l.props,d=[];for(let c=0;c<m.length;c++)d[c]=s+m[c];l.props=d}Array.isArray(l.children)&&l.type!=="@keyframes"&&_c(l.children,a)}return e}function n4({options:e=Qa,plugins:a=kr}=Qa){let s,r,i;const l=(f,g,x)=>x.startsWith(r)&&x.endsWith(r)&&x.replaceAll(r,"").length>0?`.${s}`:f,m=a.slice();m.push(f=>{f.type===on&&f.value.includes("&")&&(i||(i=new RegExp(`\\${r}\\b`,"g")),f.props[0]=f.props[0].replace(s4,r).replace(i,l))}),e.prefix&&m.push(b8),m.push(g8);let d=[];const c=x8(m.concat(v8(f=>d.push(f)))),p=(f,g="",x="",w="&")=>{s=w,r=g,i=void 0;const b=(function(v){const k=v.indexOf("//")!==-1,N=v.indexOf("}")!==-1;if(!k&&!N)return v;if(!k)return Pn(v);const _=v.length;let C="",y=0,E=0,A=0,H=0,M=0,T=!1;for(;E<_;){const P=v.charCodeAt(E);if(P!==34&&P!==39||jc(v,E))if(A===0)if(P===Sa&&E+1<_&&v.charCodeAt(E+1)===42){for(E+=2;E+1<_&&(v.charCodeAt(E)!==42||v.charCodeAt(E+1)!==Sa);)E++;E+=2}else if(P!==40)if(P!==41)if(H>0)E++;else if(P===42&&E+1<_&&v.charCodeAt(E+1)===Sa)C+=v.substring(y,E),E+=2,y=E,T=!0;else if(P===Sa&&E+1<_&&v.charCodeAt(E+1)===Sa){for(C+=v.substring(y,E);E<_&&v.charCodeAt(E)!==10;)E++;y=E,T=!0}else P===123?M++:P===125&&M--,E++;else H>0&&H--,E++;else H++,E++;else E++;else A===0?A=P:A===P&&(A=0),E++}return T?(y<_&&(C+=v.substring(y)),M===0?C:Pn(C)):M===0?v:Pn(v)})(f);let j=f8(x||g?x+" "+g+" { "+b+" }":b);return e.namespace&&(j=_c(j,e.namespace)),d=[],Ys(j,c),d},u=e;let h=or;for(let f=0;f<a.length;f++)a[f].name||vs(15),h=La(h,a[f].name);return u!=null&&u.namespace&&(h=La(h,u.namespace)),u!=null&&u.prefix&&(h=La(h,"p")),p.hash=h!==or?h.toString():"",p}const r4=new ys,i4=n4(),kc=o.createContext({shouldForwardProp:void 0,styleSheet:r4,stylis:i4,stylisPlugins:void 0});kc.Consumer;function Cc(){return o.useContext(kc)}const Sr=o.createContext(void 0);Sr.Consumer;const Mi=Object.prototype.hasOwnProperty,$n={};function o4(e,a){const s=typeof e!="string"?"sc":cc(e);$n[s]=($n[s]||0)+1;const r=s+"-"+mc(un+s+$n[s]);return a?a+"-"+r:r}let On;function l4(e,a,s){const r=Nr(e),i=e,l=!Gs(e),{attrs:m=kr,componentId:d=o4(a.displayName,a.parentComponentId),displayName:c=R8(e)}=a,p=a.displayName&&a.componentId?cc(a.displayName)+"-"+a.componentId:a.componentId||d,u=r&&i.attrs?i.attrs.concat(m).filter(Boolean):m;let{shouldForwardProp:h}=a;if(r&&i.shouldForwardProp){const w=i.shouldForwardProp;if(a.shouldForwardProp){const b=a.shouldForwardProp;h=(j,v)=>w(j,v)&&b(j,v)}else h=w}const f=new a4(s,p,r?i.componentStyle:void 0);function g(w,b){return(function(j,v,k){const{attrs:N,componentStyle:_,defaultProps:C,foldedComponentIds:y,styledComponentId:E,target:A}=j,H=o.useContext(Sr),M=Cc(),T=j.shouldForwardProp||M.shouldForwardProp;process.env.NODE_ENV!=="production"&&o.useDebugValue&&o.useDebugValue(E);const P=lc(v,H,C)||Qa;let S,$;{const O=o.useRef(null),F=O.current;if(F!==null&&F[1]===P&&F[2]===M.styleSheet&&F[3]===M.stylis&&F[7]===_&&(function(W,U,V){const G=W,Y=U;let de=0;for(const fe in Y)if(Mi.call(Y,fe)&&(de++,G[fe]!==Y[fe]))return!1;return de===V})(F[0],v,F[4]))S=F[5],$=F[6];else{S=(function(U,V,G){const Y=Object.assign(Object.assign({},V),{className:void 0,theme:G}),de=U.length>1;for(let fe=0;fe<U.length;fe++){const ne=U[fe],ae=bs(ne)?ne(de?Object.assign({},Y):Y):ne;for(const re in ae)re==="className"?Y.className=ls(Y.className,ae[re]):re==="style"?Y.style=Object.assign(Object.assign({},Y.style),ae[re]):re in V&&V[re]===void 0||(Y[re]=ae[re])}return"className"in V&&typeof V.className=="string"&&(Y.className=ls(Y.className,V.className)),Y})(N,v,P),$=(function(U,V,G,Y){const de=U.generateAndInjectStyles(V,G,Y);return process.env.NODE_ENV!=="production"&&o.useDebugValue&&o.useDebugValue(de),de})(_,S,M.styleSheet,M.stylis);let W=0;for(const U in v)Mi.call(v,U)&&W++;O.current=[v,P,M.styleSheet,M.stylis,W,S,$,_]}}process.env.NODE_ENV!=="production"&&j.warnTooManyClasses&&j.warnTooManyClasses($);const Z=S.as||A,R=(function(O,F,W,U){const V={};for(const G in O)O[G]===void 0||G[0]==="$"||G==="as"||G==="theme"&&O.theme===W||(G==="forwardedAs"?V.as=O.forwardedAs:U&&!U(G,F)||(V[G]=O[G],U||process.env.NODE_ENV!=="development"||t8(G)||(On||(On=new Set)).has(G)||!Gs(F)||F.includes("-")||(On.add(G),console.warn(`styled-components: it looks like an unknown prop "${G}" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via \`<StyleSheetManager shouldForwardProp={...}>\` (connect an API like \`@emotion/is-prop-valid\`) or consider using transient props (\`$\` prefix for automatic filtering.)`))));return V})(S,Z,P,T);let L=ls(y,E);return $&&(L+=" "+$),S.className&&(L+=" "+S.className),R[Gs(Z)&&Z.includes("-")?"class":"className"]=L,k&&(R.ref=k),o.createElement(Z,R)})(x,w,b)}g.displayName=c;let x=o.forwardRef(g);return x.attrs=u,x.componentStyle=f,x.displayName=c,x.shouldForwardProp=h,x.foldedComponentIds=r?ls(i.foldedComponentIds,i.styledComponentId):"",x.styledComponentId=p,x.target=r?i.target:e,Object.defineProperty(x,"defaultProps",{get(){return this._foldedDefaultProps},set(w){this._foldedDefaultProps=r?(function(b,...j){for(const v of j)cr(b,v,!0);return b})({},i.defaultProps,w):w}}),process.env.NODE_ENV!=="production"&&(oc(c,p),x.warnTooManyClasses=((w,b)=>{let j={},v=!1;return k=>{!v&&(j[k]=!0,Object.keys(j).length>=200)&&(console.warn(`Over 200 classes were generated for component ${w}${b?` with the id of "${b}"`:""}.
87
87
  Consider using the attrs method, together with a style object for frequently changed styles.
88
88
  Example:
89
89
  const Component = styled.div.attrs(props => ({
@@ -92,28 +92,28 @@ Example:
92
92
  },
93
93
  }))\`width: 100%;\`
94
94
 
95
- <Component />`),v=!0,j={})}})(d,p)),pc(x,()=>`.${x.styledComponentId}`),l&&mc(x,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),x}var a4=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function Ei(e,a){const s=[e[0]];for(let r=0,i=a.length;r<i;r+=1)s.push(a[r],e[r+1]);return s}const Ai=e=>(fc.add(e),e);function _c(e,...a){if(vs(e)||Oa(e))return Ai(ha(Ei(jr,[e,...a])));const s=e;return a.length===0&&s.length===1&&typeof s[0]=="string"?ha(s):Ai(ha(Ei(s,a)))}function dr(e,a,s=Ya){if(!a)throw xs(1,a);const r=(i,...l)=>e(a,s,_c(i,...l));return r.attrs=i=>dr(e,a,Object.assign(Object.assign({},s),{attrs:Array.prototype.concat(s.attrs,i).filter(Boolean)})),r.withConfig=i=>dr(e,a,Object.assign(Object.assign({},s),i)),r}const kc=e=>dr(t4,e),s4=kc;a4.forEach(e=>{s4[e]=kc(e)});class n4{constructor(a,s){this.instanceRules=new Map,this.rules=a,this.componentId=s,this.isStatic=(function(r){for(let i=0;i<r.length;i+=1){const l=r[i];if(vs(l)&&!kr(l))return!1}return!0})(a),bs.registerId(this.componentId)}removeStyles(a,s){this.instanceRules.delete(a),this.rebuildGroup(s)}renderStyles(a,s,r,i){const l=this.componentId;if(this.isStatic){if(r.hasNameForId(l,l+a))this.instanceRules.has(a)||this.computeRules(a,s,r,i);else{const c=this.computeRules(a,s,r,i);r.insertRules(l,c.name,c.rules)}return}const m=this.instanceRules.get(a);if(this.computeRules(a,s,r,i),!r.server&&m){const c=m.rules,d=this.instanceRules.get(a).rules;if(c.length===d.length){let p=!0;for(let u=0;u<c.length;u++)if(c[u]!==d[u]){p=!1;break}if(p)return}}this.rebuildGroup(r)}computeRules(a,s,r,i){const l=ir(ha(this.rules,s,r,i)),m={name:this.componentId+a,rules:i(l,"")};return this.instanceRules.set(a,m),m}rebuildGroup(a){const s=this.componentId;a.clearRules(s);for(const r of this.instanceRules.values())a.insertRules(s,r.name,r.rules)}}function r4(e,...a){const s=_c(e,...a),r=`sc-global-${cc(JSON.stringify(s))}`,i=new n4(s,r);process.env.NODE_ENV!=="production"&&nc(r);const l=c=>{const d=jc(),p=o.useContext(Cr);let u;{const f=o.useRef(null);f.current===null&&(f.current=d.styleSheet.allocateGSInstance(r)),u=f.current}process.env.NODE_ENV!=="production"&&o.Children.count(c.children)&&console.warn(`The global style component ${r} was given child JSX. createGlobalStyle does not render children.`),process.env.NODE_ENV!=="production"&&s.some(f=>typeof f=="string"&&f.indexOf("@import")!==-1)&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),d.styleSheet.server&&m(u,c,d.styleSheet,p,d.stylis);{const f=i.isStatic?[u,d.styleSheet,i]:[u,c,d.styleSheet,p,d.stylis,i],h=o.useRef(i);o.useLayoutEffect(()=>{d.styleSheet.server||(h.current!==i&&(d.styleSheet.clearRules(r),h.current=i),m(u,c,d.styleSheet,p,d.stylis))},f),o.useLayoutEffect(()=>()=>{d.styleSheet.server||i.removeStyles(u,d.styleSheet)},[u,d.styleSheet,i])}return d.styleSheet.server&&i.instanceRules.delete(u),null};function m(c,d,p,u,f){if(i.isStatic)i.renderStyles(c,w8,p,f);else{const h=Object.assign(Object.assign({},d),{theme:rc(d,u,l.defaultProps)});i.renderStyles(c,h,p,f)}}return o.memo(l)}process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
95
+ <Component />`),v=!0,j={})}})(c,p)),wc(x,()=>`.${x.styledComponentId}`),l&&fc(x,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),x}var c4=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function Ri(e,a){const s=[e[0]];for(let r=0,i=a.length;r<i;r+=1)s.push(a[r],e[r+1]);return s}const Li=e=>(xc.add(e),e);function Nc(e,...a){if(bs(e)||Za(e))return Li(fa(Ri(kr,[e,...a])));const s=e;return a.length===0&&s.length===1&&typeof s[0]=="string"?fa(s):Li(fa(Ri(s,a)))}function mr(e,a,s=Qa){if(!a)throw vs(1,a);const r=(i,...l)=>e(a,s,Nc(i,...l));return r.attrs=i=>mr(e,a,Object.assign(Object.assign({},s),{attrs:Array.prototype.concat(s.attrs,i).filter(Boolean)})),r.withConfig=i=>mr(e,a,Object.assign(Object.assign({},s),i)),r}const Sc=e=>mr(l4,e),d4=Sc;c4.forEach(e=>{d4[e]=Sc(e)});class u4{constructor(a,s){this.instanceRules=new Map,this.rules=a,this.componentId=s,this.isStatic=(function(r){for(let i=0;i<r.length;i+=1){const l=r[i];if(bs(l)&&!Nr(l))return!1}return!0})(a),ys.registerId(this.componentId)}removeStyles(a,s){this.instanceRules.delete(a),this.rebuildGroup(s)}renderStyles(a,s,r,i){const l=this.componentId;if(this.isStatic){if(r.hasNameForId(l,l+a))this.instanceRules.has(a)||this.computeRules(a,s,r,i);else{const d=this.computeRules(a,s,r,i);r.insertRules(l,d.name,d.rules)}return}const m=this.instanceRules.get(a);if(this.computeRules(a,s,r,i),!r.server&&m){const d=m.rules,c=this.instanceRules.get(a).rules;if(d.length===c.length){let p=!0;for(let u=0;u<d.length;u++)if(d[u]!==c[u]){p=!1;break}if(p)return}}this.rebuildGroup(r)}computeRules(a,s,r,i){const l=lr(fa(this.rules,s,r,i)),m={name:this.componentId+a,rules:i(l,"")};return this.instanceRules.set(a,m),m}rebuildGroup(a){const s=this.componentId;a.clearRules(s);for(const r of this.instanceRules.values())a.insertRules(s,r.name,r.rules)}}function m4(e,...a){const s=Nc(e,...a),r=`sc-global-${mc(JSON.stringify(s))}`,i=new u4(s,r);process.env.NODE_ENV!=="production"&&oc(r);const l=d=>{const c=Cc(),p=o.useContext(Sr);let u;{const h=o.useRef(null);h.current===null&&(h.current=c.styleSheet.allocateGSInstance(r)),u=h.current}process.env.NODE_ENV!=="production"&&o.Children.count(d.children)&&console.warn(`The global style component ${r} was given child JSX. createGlobalStyle does not render children.`),process.env.NODE_ENV!=="production"&&s.some(h=>typeof h=="string"&&h.indexOf("@import")!==-1)&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),c.styleSheet.server&&m(u,d,c.styleSheet,p,c.stylis);{const h=i.isStatic?[u,c.styleSheet,i]:[u,d,c.styleSheet,p,c.stylis,i],f=o.useRef(i);o.useLayoutEffect(()=>{c.styleSheet.server||(f.current!==i&&(c.styleSheet.clearRules(r),f.current=i),m(u,d,c.styleSheet,p,c.stylis))},h),o.useLayoutEffect(()=>()=>{c.styleSheet.server||i.removeStyles(u,c.styleSheet)},[u,c.styleSheet,i])}return c.styleSheet.server&&i.instanceRules.delete(u),null};function m(d,c,p,u,h){if(i.isStatic)i.renderStyles(d,_8,p,h);else{const f=Object.assign(Object.assign({},c),{theme:lc(c,u,l.defaultProps)});i.renderStyles(d,f,p,h)}}return o.memo(l)}process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
96
96
  Perhaps you're looking to import 'styled-components/native'?
97
- Read more about this at https://styled-components.com/docs/basics#react-native`);const $s=`__sc-${$a}__`;process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window[$s]||(window[$s]=0),window[$s]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
98
-
99
- See https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info.`),window[$s]+=1);const i4='.wacht-root{--wa-surface: var(--wa-ov-light-surface, #ffffff);--wa-surface-subtle: var(--wa-ov-light-surface_subtle, #fafaf8);--wa-background: var(--wa-ov-light-background, #f5f5f2);--wa-canvas: var(--wa-ov-light-canvas, #ebebe7);--wa-text: var(--wa-ov-light-text, #161618);--wa-text-secondary: var(--wa-ov-light-text_secondary, #3b3b3f);--wa-text-muted: var(--wa-ov-light-text_muted, #76767c);--wa-text-faint: var(--wa-ov-light-text_faint, #a8a8ad);--wa-border: var(--wa-ov-light-border, rgba(20, 20, 22, .08));--wa-border-strong: var(--wa-ov-light-border_strong, rgba(20, 20, 22, .14));--wa-primary: var(--wa-ov-light-primary, #6b3df5);--wa-primary-soft: var(--wa-ov-light-primary_soft, rgba(107, 61, 245, .1));--wa-primary-foreground: var(--wa-ov-light-primary_foreground, #ffffff);--wa-success: var(--wa-ov-light-success, #0f8a4a);--wa-success-soft: var(--wa-ov-light-success_soft, rgba(15, 138, 74, .12));--wa-info: var(--wa-ov-light-info, #2f6fdb);--wa-info-soft: var(--wa-ov-light-info_soft, rgba(47, 111, 219, .1));--wa-warning: var(--wa-ov-light-warning, #a8650a);--wa-warning-soft: var(--wa-ov-light-warning_soft, rgba(168, 101, 10, .12));--wa-error: var(--wa-ov-light-error, #c4271f);--wa-error-soft: var(--wa-ov-light-error_soft, rgba(196, 39, 31, .1));--wa-radius: var(--wa-ov-light-radius, 6px);--wa-radius-lg: var(--wa-ov-light-radius_lg, 10px);--wa-font-sans: var(--wa-ov-light-font_sans, "Geist", "Inter"), system-ui, -apple-system, sans-serif;--wa-font-mono: var(--wa-ov-light-font_mono, "Geist Mono"), ui-monospace, SFMono-Regular, Menlo, monospace;font-family:var(--wa-font-sans)}.dark .wacht-root,.wacht-root.dark{--wa-surface: var(--wa-ov-dark-surface, #131318);--wa-surface-subtle: var(--wa-ov-dark-surface_subtle, #101015);--wa-background: var(--wa-ov-dark-background, #0d0d10);--wa-canvas: var(--wa-ov-dark-canvas, #050507);--wa-text: var(--wa-ov-dark-text, #ececef);--wa-text-secondary: var(--wa-ov-dark-text_secondary, #c5c5cb);--wa-text-muted: var(--wa-ov-dark-text_muted, #8a8a92);--wa-text-faint: var(--wa-ov-dark-text_faint, #57575e);--wa-border: var(--wa-ov-dark-border, rgba(255, 255, 255, .07));--wa-border-strong: var(--wa-ov-dark-border_strong, rgba(255, 255, 255, .14));--wa-primary: var(--wa-ov-dark-primary, #9277ff);--wa-primary-soft: var(--wa-ov-dark-primary_soft, rgba(146, 119, 255, .16));--wa-primary-foreground: var(--wa-ov-dark-primary_foreground, #ffffff);--wa-success: var(--wa-ov-dark-success, #0f8a4a);--wa-success-soft: var(--wa-ov-dark-success_soft, rgba(15, 138, 74, .18));--wa-info: var(--wa-ov-dark-info, #2f6fdb);--wa-info-soft: var(--wa-ov-dark-info_soft, rgba(47, 111, 219, .18));--wa-warning: var(--wa-ov-dark-warning, #a8650a);--wa-warning-soft: var(--wa-ov-dark-warning_soft, rgba(168, 101, 10, .18));--wa-error: var(--wa-ov-dark-error, #c4271f);--wa-error-soft: var(--wa-ov-dark-error_soft, rgba(196, 39, 31, .18));--wa-radius: var(--wa-ov-dark-radius, 6px);--wa-radius-lg: var(--wa-ov-dark-radius_lg, 10px);--wa-font-sans: var(--wa-ov-dark-font_sans, "Geist", "Inter"), system-ui, -apple-system, sans-serif;--wa-font-mono: var(--wa-ov-dark-font_mono, "Geist Mono"), ui-monospace, SFMono-Regular, Menlo, monospace}.wacht-root *{box-sizing:border-box}',o4='.w-flex-col{display:flex;flex-direction:column}.w-inline{display:inline-flex;align-items:center}.w-wrap{flex-wrap:wrap}.w-grow{flex:1 1 auto;min-width:0}.w-none{flex:none}.w-full{width:100%}.w-gap-1{gap:4px}.w-gap-2{gap:8px}.w-gap-3{gap:12px}.w-gap-4{gap:16px}.w-gap-5{gap:20px}.w-gap-6{gap:24px}.w-truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-contents{display:contents}.w-h-full{height:100%}.w-minh-full{min-height:100%}.w-mono-sm{font:400 12px/1.4 var(--wa-font-mono);color:var(--wa-text-muted)}.w-text-primary{color:var(--wa-primary)}.w-text-secondary{color:var(--wa-text-secondary)}.w-text-muted{color:var(--wa-text-muted)}.w-text-faint{color:var(--wa-text-faint)}.w-text-error{color:var(--wa-error)}.w-text-success{color:var(--wa-success)}.w-text-warning{color:var(--wa-warning)}.w-mb-4{margin-bottom:16px}.w-mt-6{margin-top:24px}.w-maxw-sm{max-width:340px}.w-rolepick-btn{min-width:120px}.w-combo-menu--pop{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:60}.w-relative{position:relative}.w-card{background:var(--wa-surface);border:0;border-radius:var(--wa-radius-lg);box-shadow:0 0 0 .5px var(--wa-border),0 1px 1px #1414160a,0 4px 8px -4px #14141614,0 24px 48px -16px #14141629;overflow:hidden}.w-eyebrow{font:400 10px/1 var(--wa-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--wa-text-faint)}.w-title{font:400 17px/1.25 var(--wa-font-sans);letter-spacing:-.02em;color:var(--wa-text);margin:0}.w-title-lg{font:400 19px/1.2 var(--wa-font-sans);letter-spacing:-.022em;color:var(--wa-text);margin:0}.w-sub{font:400 13px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);margin:0}.w-sec{font:400 13px/1.3 var(--wa-font-sans);color:var(--wa-text);margin:0}.w-secsub{font:400 12px/1.45 var(--wa-font-sans);color:var(--wa-text-muted);margin:0}.w-btn{height:32px;padding:0 13px;border-radius:var(--wa-radius);border:.5px solid transparent;font:400 12.5px/1 var(--wa-font-sans);display:inline-flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:background .14s ease,border-color .14s ease,filter .14s ease,box-shadow .14s ease;background:transparent;color:var(--wa-text)}.w-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-btn:disabled{opacity:.6;cursor:not-allowed}.w-btn svg{width:14px;height:14px;flex:none}.w-btn.w-notif-bell{width:32px;height:32px}.w-btn.w-notif-bell svg{width:18px;height:18px}.w-btn--primary{background:var(--wa-primary);color:var(--wa-primary-foreground);box-shadow:inset 0 1px #ffffff2e,0 1px 2px #1414161f,0 2px 8px -2px color-mix(in srgb,var(--wa-primary) 50%,transparent);background-image:linear-gradient(180deg,#ffffff1a,#fff0 42%)}.w-btn--primary:active:not(:disabled){filter:brightness(.97);box-shadow:inset 0 1px 2px #14141633}.w-btn--block{width:100%;height:38px;font-size:13px}.w-btn--secondary{background:var(--wa-surface);border-color:var(--wa-border-strong);color:var(--wa-text);box-shadow:inset 0 1px #ffffff80,0 1px 1.5px #1414160a}.w-btn--ghost{background:transparent;color:var(--wa-text-secondary)}.w-btn--danger{background:transparent;color:var(--wa-error);border-color:color-mix(in srgb,var(--wa-error) 26%,transparent)}.w-btn--danger-solid{background:var(--wa-error);color:#fff}.w-btn--sm{height:26px;padding:0 9px;font-size:11.5px}.w-btn--lg{height:42px;padding:0 18px;font-size:13.5px}.w-btn--icon{height:28px;width:28px;padding:0;color:var(--wa-text-muted)}.w-btn--icon:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-social{height:40px;width:100%;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface);color:var(--wa-text);font:400 13px/1 var(--wa-font-sans);display:flex;align-items:center;justify-content:center;gap:10px;padding:0 14px;cursor:pointer;position:relative;box-shadow:inset 0 1px #ffffff80,0 1px 1.5px #1414160a;transition:background .14s ease,border-color .14s ease,box-shadow .14s ease,transform .1s ease}.w-social:active{transform:translateY(.5px)}.w-social:focus-visible{outline:none;box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-social svg,.w-social img{width:17px;height:17px;flex:none}.w-social .w-social-label{flex:none}.w-social .w-lastused{position:absolute;top:-9px;right:12px;white-space:nowrap;font:400 9.5px/1 var(--wa-font-mono);letter-spacing:.04em;color:var(--wa-text-muted);background:var(--wa-surface);border:.5px solid var(--wa-border);padding:3px 6px;border-radius:5px}.w-field{display:flex;flex-direction:column;gap:7px}.w-label{font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);display:flex;align-items:center;gap:4px;letter-spacing:-.005em;white-space:nowrap}.w-req{color:var(--wa-error);font-size:12px}.w-input{height:34px;padding:0 12px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface);color:var(--wa-text);font:400 13px/1 var(--wa-font-sans);width:100%;box-shadow:inset 0 1px 2px #1414160d;transition:border-color .14s ease,box-shadow .14s ease}.w-input::placeholder{color:var(--wa-text-faint)}.w-input:focus{outline:none;border-color:var(--wa-primary);box-shadow:inset 0 1px 2px #1414160a,0 0 0 3px var(--wa-primary-soft)}.w-input-row{display:flex;align-items:center;gap:6px}.w-input-trail{margin-left:-34px;z-index:1}.w-input-wrap{position:relative}.w-input--valid:focus{border-color:var(--wa-success);box-shadow:0 0 0 3px var(--wa-success-soft)}.w-input--invalid,.w-input[aria-invalid=true]{border-color:color-mix(in srgb,var(--wa-error) 55%,var(--wa-border-strong))}.w-input--invalid:focus,.w-input[aria-invalid=true]:focus{border-color:var(--wa-error);box-shadow:0 0 0 3px var(--wa-error-soft)}.w-input:disabled,.w-input[data-disabled]{opacity:.55;cursor:not-allowed}.w-input-err{font:400 11.5px/1.3 var(--wa-font-sans);color:var(--wa-error)}.w-input-ok{font:400 11.5px/1.3 var(--wa-font-sans);color:var(--wa-success)}.w-input-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:28px;height:28px;display:grid;place-items:center;border:0;background:none;cursor:pointer;color:var(--wa-text-faint);border-radius:6px}.w-input-eye:hover{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-input-eye svg{width:15px;height:15px}.w-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font:400 var(--av-fs, 13px)/1 var(--wa-font-sans);color:#fff;flex:none;background:var( --av-bg, linear-gradient( 135deg, var(--wa-primary), var( --wa-primary-tint, color-mix(in srgb, var(--wa-primary), #fff 25%) ) ) );box-shadow:inset 0 0 0 .5px #ffffff29;letter-spacing:.01em;overflow:hidden}.w-avatar img{width:100%;height:100%;object-fit:cover}.w-avatar--square{border-radius:var(--wa-radius)}.w-avatar--sm{width:20px;height:20px;font-size:10px}.w-avatar--md{width:28px;height:28px;font-size:11px}.w-avatar--lg{width:44px;height:44px;font-size:15px}.w-avatar--xl{width:80px;height:80px;font-size:24px}.w-avatar-edit{position:relative;cursor:pointer;border:0;padding:0}.w-avatar-edit .w-avatar-veil{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;display:grid;place-items:center;color:#fff;background:color-mix(in srgb,#000 45%,transparent);opacity:0;transition:opacity .15s ease;font:400 11px/1.2 var(--wa-font-sans);text-align:center;padding:0 6px}.w-avatar-edit:hover .w-avatar-veil,.w-avatar-edit[data-busy] .w-avatar-veil{opacity:1}.w-avatar-veil svg{width:18px;height:18px}.w-pill{display:inline-flex;align-items:center;gap:6px;height:21px;padding:0 8px;border-radius:4px;font:400 10.5px/1 var(--wa-font-mono);text-transform:lowercase;letter-spacing:.01em;background:var(--wa-surface-subtle);color:var(--wa-text-muted);border:.5px solid var(--wa-border);white-space:nowrap;flex:none}.w-pill .w-dot{width:5px;height:5px;border-radius:999px;background:var(--wa-text-faint)}.w-pill--success{background:var(--wa-success-soft);color:var(--wa-success);border-color:color-mix(in srgb,var(--wa-success) 26%,transparent)}.w-pill--success .w-dot{background:var(--wa-success)}.w-pill--warning{background:var(--wa-warning-soft);color:var(--wa-warning);border-color:color-mix(in srgb,var(--wa-warning) 26%,transparent)}.w-pill--warning .w-dot{background:var(--wa-warning)}.w-pill--info{background:var(--wa-info-soft);color:var(--wa-info);border-color:color-mix(in srgb,var(--wa-info) 26%,transparent)}.w-pill--info .w-dot{background:var(--wa-info)}.w-pill--current{background:var(--wa-primary-soft);color:var(--wa-primary);border-color:color-mix(in srgb,var(--wa-primary) 26%,transparent)}.w-pill--error{background:var(--wa-error-soft);color:var(--wa-error);border-color:color-mix(in srgb,var(--wa-error) 26%,transparent)}.w-pill--error .w-dot{background:var(--wa-error)}.w-pill--pending{background:transparent;color:var(--wa-warning);border:.5px dashed color-mix(in srgb,var(--wa-warning) 55%,transparent)}.w-pill--pending .w-dot{background:var(--wa-warning)}.w-chip{display:inline-flex;align-items:center;gap:7px;height:24px;padding:0 5px 0 9px;border-radius:var(--wa-radius);background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);font:400 12px/1 var(--wa-font-mono);color:var(--wa-text-secondary)}.w-chip-x{display:grid;place-items:center;width:16px;height:16px;border-radius:3px;color:var(--wa-text-faint);cursor:pointer}.w-chip-x:hover{background:var(--wa-border);color:var(--wa-text)}.w-chip-x svg{width:11px;height:11px}.w-or{display:flex;align-items:center;gap:14px;margin:18px 0}.w-or:before,.w-or:after{content:"";height:.5px;background:var(--wa-border);flex:1}.w-or span{font:400 10px/1 var(--wa-font-mono);letter-spacing:.14em;color:var(--wa-text-faint)}.w-hr{height:.5px;background:var(--wa-border);border:0;margin:0;width:100%}.w-list{display:flex;flex-direction:column}.w-listhead{display:grid;align-items:center;padding:0 2px 8px;font:400 10px/1 var(--wa-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--wa-text-faint);border-bottom:.5px solid var(--wa-border)}.w-row{display:grid;align-items:center;padding:13px 2px;border-bottom:.5px solid var(--wa-border)}.w-row:last-child{border-bottom:0}.w-row--hover{border-radius:var(--wa-radius);margin:0 -8px;padding:11px 10px;border-bottom:0;transition:background .12s ease}.w-row--hover:hover{background:var(--wa-surface-subtle)}.w-acct{display:flex;align-items:center;gap:13px;width:100%;text-align:left;padding:11px 12px;border:.5px solid transparent;border-radius:var(--wa-radius-lg);background:none;cursor:pointer;transition:background .13s ease,border-color .13s ease}.w-acct:hover{background:var(--wa-surface-subtle)}.w-acct[data-active]{background:var(--wa-surface-subtle);border-color:var(--wa-border)}.w-acct .w-acct-go{color:var(--wa-text-faint);flex:none;opacity:0;transform:translate(-4px);transition:opacity .13s ease,transform .13s ease}.w-acct:hover .w-acct-go{opacity:1;transform:none;color:var(--wa-text-muted)}.w-acct[data-busy]{opacity:.55;pointer-events:none}.w-acct-list{border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);overflow:hidden;margin-bottom:18px}.w-acct-list-head{padding:11px 14px;border-bottom:.5px solid var(--wa-border)}.w-acct-list-body{padding:6px}.w-acct-text{flex:1;min-width:0;text-align:left}.w-acct-name{display:block;font:400 13px/1.3 var(--wa-font-sans);color:var(--wa-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-acct-text .w-secsub{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-acct .w-avatar{width:34px;height:34px;flex:none}.w-acct[data-active] .w-avatar{width:40px;height:40px}.w-acct-add-ic{width:36px;height:36px;border-radius:50%;background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);display:grid;place-items:center;color:var(--wa-text-muted);flex:none;transition:color .13s ease,border-color .13s ease}.w-acct--add:hover .w-acct-add-ic{color:var(--wa-text);border-color:var(--wa-text-muted)}.w-acct-out{color:var(--wa-text-faint);flex:none;margin-right:-6px}.w-acct-out:hover{color:var(--wa-error);background:var(--wa-error-soft)}.w-acct--add:hover{background:var(--wa-surface-subtle)}.w-acct-foot{margin-top:8px;padding-top:10px}.w-acct-add{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;height:36px;border:0;background:none;cursor:pointer;border-radius:var(--wa-radius);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text-muted);transition:background .13s ease,color .13s ease}.w-acct-add svg{width:15px;height:15px}.w-acct-add:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-tabs{display:flex;gap:2px}.w-tab{display:inline-flex;align-items:center;gap:7px;height:30px;flex:none;white-space:nowrap;padding:0 12px;border-radius:var(--wa-radius);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text-muted);background:none;border:0;cursor:pointer;transition:color .14s ease,background .14s ease}.w-tab svg{width:14px;height:14px}.w-tab:hover,.w-tab--active{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-tab--active svg{color:var(--wa-primary)}.w-menu{width:264px;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;padding:4px;overflow:hidden}.w-menu-head{display:flex;align-items:center;gap:11px;padding:11px 9px}.w-menu-item{display:flex;align-items:center;justify-content:flex-start;gap:10px;height:32px;padding:0 8px;border-radius:var(--wa-radius);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);cursor:pointer;transition:background .12s ease;width:100%;border:0;background:none;text-align:left;white-space:nowrap}.w-menu-item:hover{background:var(--wa-surface-subtle)}.w-menu-item svg{width:15px;height:15px;color:var(--wa-text-muted);flex:none}.w-menu-item .w-avatar svg{color:inherit}.w-menu-item--danger{color:var(--wa-error)}.w-menu-item--danger svg{color:var(--wa-error)}.w-menu-item--danger:hover{background:var(--wa-error-soft)}.w-menu-trail{margin-left:auto;font:400 10.5px/1 var(--wa-font-mono);color:var(--wa-text-faint)}.w-menu-label{font:400 10px/1 var(--wa-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--wa-text-faint);padding:10px 9px 5px}.w-orgtrigger{display:flex;align-items:center;gap:9px;width:100%;height:40px;padding:0 9px;border:0;border-radius:var(--wa-radius);background:transparent;color:var(--wa-text);cursor:pointer;font:400 13px/1 var(--wa-font-sans);text-align:left;transition:background .12s ease}.w-orgtrigger:hover,.w-orgtrigger[data-open]{background:var(--wa-surface-subtle)}.w-orgtrigger:disabled{opacity:.6;cursor:default}.w-orgtrigger>svg{color:var(--wa-text-faint);flex:none}.w-switch-body{overflow-y:auto;padding:4px 0}.w-switch-banner{margin:8px 8px 0}.w-switch-nest{display:flex;flex-direction:column;margin:2px 0 6px 24px;padding-left:8px;border-left:.5px solid var(--wa-border)}.w-menu-item--muted{color:var(--wa-text-muted)}.w-menu-item--muted svg{color:var(--wa-text-muted)}.w-rowact{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:5px;color:var(--wa-text-muted);cursor:pointer}.w-rowact:hover{color:var(--wa-text);background:var(--wa-border)}.w-rowact svg{width:13px;height:13px}.w-danger{border:.5px solid color-mix(in srgb,var(--wa-error) 30%,transparent);background:var(--wa-error-soft);border-radius:var(--wa-radius);padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:20px}.w-link{color:var(--wa-text);font-weight:400;cursor:pointer;text-decoration:none}.w-link--sm{font-size:12px}.w-link:hover{text-decoration:underline}.w-link--muted{color:var(--wa-text-muted)}.w-mono-faint{font:400 12px/1.4 var(--wa-font-mono);color:var(--wa-text-faint)}@keyframes w-spin{to{transform:rotate(360deg)}}.w-spin{display:inline-block;border-radius:50%;border:2px solid var(--wa-border-strong);border-top-color:var(--wa-primary);animation:w-spin .7s linear infinite}.w-spin--on-accent{border-color:#ffffff59;border-top-color:#fff}.w-loading{display:grid;place-items:center;gap:14px;padding:40px;text-align:center}.w-otp{display:flex;gap:8px}.w-otp .w-otp-cell{width:42px;height:48px;text-align:center;font:400 20px/1 var(--wa-font-mono);color:var(--wa-text);border:.5px solid var(--wa-border-strong);border-radius:var(--wa-radius);background:var(--wa-surface);display:grid;place-items:center}.w-otp .w-otp-cell[data-active],.w-otp .w-otp-cell:focus{outline:none;border-color:var(--wa-primary);box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-otp .w-otp-cell[data-filled]{border-color:var(--wa-text-muted)}.w-otp[data-error] .w-otp-cell{border-color:color-mix(in srgb,var(--wa-error) 50%,var(--wa-border-strong))}.w-otp-caret{width:1.5px;height:22px;background:var(--wa-primary);animation:w-blink 1s steps(1) infinite}@keyframes w-blink{50%{opacity:0}}.w-addr-badge{display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 6px 0 12px;border-radius:999px;background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text-secondary)}.w-addr-badge button{border:0;background:none;cursor:pointer;color:var(--wa-primary);font:400 12px/1 var(--wa-font-sans);padding:4px 8px;border-radius:6px}.w-addr-badge button:hover{background:var(--wa-primary-soft)}.w-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px;padding:48px 24px}.w-empty .w-empty-ic{display:grid;place-items:center;width:44px;height:44px;border-radius:var(--wa-radius-lg);background:var(--wa-primary-soft);color:var(--wa-primary)}.w-empty .w-empty-ic svg{width:20px;height:20px;color:var(--wa-primary)}.w-empty-text{display:flex;flex-direction:column;gap:4px}.w-empty h4{margin:0;font:500 14px/1.4 var(--wa-font-sans);color:var(--wa-text)}.w-empty p{margin:0;font:400 12px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);max-width:384px;text-wrap:pretty}.w-empty-action{margin-top:4px}.w-empty--fill{height:100%}.w-empty-ic--accent{width:44px;height:44px}.w-toast{display:inline-flex;align-items:center;gap:11px;padding:11px 13px 11px 14px;border-radius:var(--wa-radius-lg);background:var(--wa-surface);border:.5px solid var(--wa-border);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;min-width:280px;max-width:380px}.w-toast .w-toast-ic{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none}.w-toast .w-toast-ic svg{width:12px;height:12px}.w-toast--success .w-toast-ic{background:var(--wa-success-soft);color:var(--wa-success)}.w-toast--error .w-toast-ic{background:var(--wa-error-soft);color:var(--wa-error)}.w-toast-msg{flex:1;font:400 13px/1.35 var(--wa-font-sans);color:var(--wa-text)}.w-toast-x{border:0;background:none;cursor:pointer;color:var(--wa-text-faint);width:22px;height:22px;border-radius:6px;display:grid;place-items:center;flex:none}.w-toast-x:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-toast-x svg{width:12px;height:12px}.w-pop{width:320px;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;overflow:hidden}.w-pop-body{padding:15px 15px 13px;display:flex;flex-direction:column;gap:11px}.w-pop-title{margin:0;font:400 13.5px/1.3 var(--wa-font-sans);letter-spacing:-.01em;color:var(--wa-text)}.w-pop-sub{margin:0;font:400 12.5px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);text-wrap:pretty}.w-pop-title+.w-pop-sub{margin-top:-7px}.w-pop-foot{display:flex;gap:8px;justify-content:flex-end;padding:10px 14px;border-top:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-pop-foot .w-btn{width:auto}.w-pop-icon{width:38px;height:38px;border-radius:var(--wa-radius);display:grid;place-items:center;flex:none}.w-pop-icon--danger{background:var(--wa-error-soft);color:var(--wa-error)}.w-pop-icon--warn{background:var(--wa-warning-soft);color:var(--wa-warning)}.w-pop-icon svg{width:18px;height:18px}.w-locked{display:flex;align-items:center;gap:10px;height:38px;padding:0 8px 0 13px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-locked .w-locked-ic{color:var(--wa-text-faint);flex:none}.w-locked .w-locked-ic svg{width:15px;height:15px;display:block}.w-locked .w-locked-val{flex:1;font:400 13.5px/1 var(--wa-font-sans);color:var(--wa-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-restricted{opacity:.55;cursor:not-allowed}.w-restricted *{pointer-events:none}.w-warn-ic{color:var(--wa-warning);display:inline-grid;place-items:center}.w-warn-ic svg{width:15px;height:15px}.w-codes{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px;border-radius:var(--wa-radius);background:var(--wa-surface-subtle);border:.5px solid var(--wa-border)}.w-codes span{font:400 13px/1.6 var(--wa-font-mono);color:var(--wa-text);text-align:center;letter-spacing:.04em}.w-qr{width:148px;height:148px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border);background:var(--wa-surface);display:grid;place-items:center;color:var(--wa-text)}.w-banner{display:flex;gap:11px;padding:12px 14px;border-radius:var(--wa-radius);align-items:flex-start}.w-banner svg{width:16px;height:16px;flex:none;margin-top:1px}.w-banner-txt{font:400 12.5px/1.5 var(--wa-font-sans);text-wrap:pretty;color:var(--wa-text-secondary)}.w-banner--error{background:var(--wa-error-soft)}.w-banner--warn{background:var(--wa-warning-soft)}.w-banner--info{background:var(--wa-info-soft)}.w-banner--error svg{color:var(--wa-error)}.w-banner--warn svg{color:var(--wa-warning)}.w-banner--info svg{color:var(--wa-info)}.w-seg{display:inline-flex;padding:3px;gap:2px;background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);border-radius:var(--wa-radius)}.w-seg button{height:28px;padding:0 12px;border:0;background:none;cursor:pointer;border-radius:4px;font:400 12px/1 var(--wa-font-sans);color:var(--wa-text-muted);white-space:nowrap}.w-seg button[data-on]{background:var(--wa-surface);color:var(--wa-text);box-shadow:0 0 0 .5px var(--wa-border)}.w-steps{display:flex;gap:6px;justify-content:center}.w-steps i{width:5px;height:5px;border-radius:999px;background:var(--wa-border-strong);transition:background .2s ease,width .2s ease}.w-steps i[data-on]{background:var(--wa-primary);width:16px}.w-ibadge{display:grid;place-items:center;width:48px;height:48px;flex:none;border-radius:var(--wa-radius-lg);background:var(--wa-primary-soft);color:var(--wa-primary);overflow:hidden}.w-ibadge svg{width:24px;height:24px}.w-ibadge img{width:100%;height:100%;object-fit:cover}.w-ibadge--done{width:52px;height:52px;border-radius:999px;background:var(--wa-success-soft);color:var(--wa-success)}.w-ibadge--done svg{width:26px;height:26px}.w-ibadge-wrap{position:relative}.w-ibadge-x{position:absolute;top:-6px;right:-6px;width:20px;height:20px;display:grid;place-items:center;border-radius:999px;border:.5px solid var(--wa-border);background:var(--wa-surface);color:var(--wa-text-muted);cursor:pointer;box-shadow:0 1px 2px #1414161f}.w-ibadge-x svg{width:11px;height:11px}.w-create-foot{padding:13px 32px;border-top:.5px solid var(--wa-border);background:var(--wa-surface-subtle);text-align:center}.w-create-summary{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;padding:12px 16px;border:.5px solid var(--wa-border);border-radius:var(--wa-radius)}.w-auth-card{width:min(440px,100%)}.w-auth-head{display:flex;flex-direction:column;align-items:center;gap:14px;margin-bottom:24px}.w-auth-head-text{display:flex;flex-direction:column;gap:6px;text-align:center}.w-auth-title{margin:0;font:400 21px/1.2 var(--wa-font-sans);letter-spacing:-.025em;color:var(--wa-text)}.w-auth-sub{margin:0;font:400 12.5px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);text-wrap:pretty}.w-auth-status{display:flex;flex-direction:column;align-items:center;gap:16px;padding-top:4px;text-align:center}.w-auth-foot{font:400 12.5px/1.5 var(--wa-font-sans);color:var(--wa-text-muted)}.w-fineprint{margin:2px 2px 0;font:400 11px/1.5 var(--wa-font-sans);color:var(--wa-text-faint);text-align:center;text-wrap:pretty}.w-switch{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none}.w-switch .w-switch-track{width:36px;height:20px;border-radius:999px;background:var(--wa-border-strong);border:.5px solid transparent;position:relative;transition:background .16s ease;flex:none}.w-switch .w-switch-knob{position:absolute;top:1.5px;left:1.5px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #00000040;transition:transform .16s ease}.w-switch[data-on] .w-switch-track{background:var(--wa-primary)}.w-switch[data-on] .w-switch-knob{transform:translate(16px)}.w-switch-label{font:400 13px/1 var(--wa-font-sans);color:var(--wa-text)}.w-search{display:flex;align-items:center;gap:8px;height:32px;width:240px;max-width:100%;padding:0 11px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface)}.w-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:14px}.w-search svg{width:15px;height:15px;color:var(--wa-text-faint);flex:none}.w-search input{border:0;background:none;outline:none;flex:1;font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);min-width:0}.w-search input::placeholder{color:var(--wa-text-faint)}.w-combo{display:flex;align-items:center;gap:8px;height:34px;padding:0 10px 0 12px;width:100%;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface);cursor:pointer;font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);transition:border-color .14s ease}.w-combo:hover{border-color:var(--wa-text-muted)}.w-combo[data-open]{border-color:var(--wa-primary);box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-combo .w-combo-val{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-combo .w-combo-val[data-ph]{color:var(--wa-text-faint)}.w-combo svg{width:15px;height:15px;color:var(--wa-text-muted);flex:none}.w-combo-menu{width:100%;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;padding:4px;overflow:hidden}.w-combo-opt{display:flex;align-items:center;justify-content:flex-start;gap:9px;height:30px;padding:0 8px;border-radius:5px;font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);cursor:pointer;width:100%;border:0;background:none;text-align:left;white-space:nowrap}.w-combo-opt>svg{width:15px;height:15px;flex:none;color:var(--wa-text-muted)}.w-combo-opt:hover{background:var(--wa-surface-subtle)}.w-combo-opt .w-combo-check{margin-left:auto;color:var(--wa-primary);display:grid;place-items:center}.w-combo-opt .w-combo-check svg{width:14px;height:14px}.w-combo-opt[data-disabled]{opacity:.5;cursor:not-allowed}.w-combo-grp{font:400 10px/1 var(--wa-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--wa-text-faint);padding:9px 9px 5px}.w-phone{display:flex;align-items:stretch;gap:0;width:100%}.w-phone .w-phone-cc{display:flex;align-items:center;gap:7px;height:34px;padding:0 10px;border:.5px solid var(--wa-border-strong);border-right:0;border-radius:var(--wa-radius) 0 0 var(--wa-radius);background:var(--wa-surface-subtle);cursor:pointer;font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);white-space:nowrap}.w-phone .w-phone-cc svg{width:13px;height:13px;color:var(--wa-text-muted)}.w-phone input{flex:1;height:34px;padding:0 12px;border:.5px solid var(--wa-border-strong);border-radius:0 var(--wa-radius) var(--wa-radius) 0;background:var(--wa-surface);font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);outline:none;min-width:0}.w-phone input:focus{border-color:var(--wa-primary);box-shadow:0 0 0 3px var(--wa-primary-soft);position:relative}.w-flag{width:18px;height:13px;border-radius:2px;display:inline-block;flex:none;box-shadow:inset 0 0 0 .5px #00000026}.w-country-pop{position:absolute;top:calc(100% + 6px);left:0;z-index:50;width:260px;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;overflow:hidden}.w-country-search{display:flex;align-items:center;gap:8px;padding:9px 11px;border-bottom:.5px solid var(--wa-border)}.w-country-search svg{width:14px;height:14px;color:var(--wa-text-faint);flex:none}.w-country-search input{border:0;background:none;outline:none;flex:1;font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);min-width:0}.w-country-search input::placeholder{color:var(--wa-text-faint)}.w-country-list{max-height:220px;overflow-y:auto;padding:5px}.w-country-opt{display:flex;align-items:center;gap:9px;height:32px;padding:0 9px;border-radius:5px;cursor:pointer;font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);width:100%;border:0;background:none;text-align:left}.w-country-opt:hover{background:var(--wa-surface-subtle)}.w-country-opt .dial{margin-left:auto;color:var(--wa-text-muted);font:400 12px/1 var(--wa-font-mono);flex:none}.w-method-stack{display:flex;flex-direction:column;gap:10px}.w-method{display:flex;align-items:center;gap:13px;width:100%;padding:13px 14px;border:.5px solid var(--wa-border-strong);border-radius:var(--wa-radius);background:var(--wa-surface);cursor:pointer;text-align:left;transition:background .14s ease,border-color .14s ease}.w-method .w-method-ic{width:34px;height:34px;border-radius:var(--wa-radius);display:grid;place-items:center;background:var(--wa-surface-subtle);color:var(--wa-text-secondary);flex:none}.w-method .w-method-ic svg{width:17px;height:17px}.w-method .w-method-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.w-method .w-method-title{font:400 13.5px/1 var(--wa-font-sans);color:var(--wa-text)}.w-method .w-method-desc{font:400 12px/1.4 var(--wa-font-sans);color:var(--wa-text-muted)}.w-method .w-method-go{color:var(--wa-text-faint);flex:none}.w-method .w-method-go svg{width:16px;height:16px}.w-method[data-disabled]{opacity:.5;cursor:not-allowed}.w-overlay{position:relative;width:100%;height:100%;background:color-mix(in srgb,#000 38%,transparent);display:grid;place-items:center;border-radius:inherit}.w-dialog{background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;width:100%;max-width:480px;overflow:hidden;display:flex;flex-direction:column}.w-dialog--panel{display:block;width:880px;max-width:100%;height:min(560px,calc(100dvh - 40px));overflow-y:auto}.w-dialog--panel .w-card{background:transparent;border-radius:0;box-shadow:none}@media(max-width:640px){.w-dialog--panel{height:calc(100dvh - 16px)}}.w-dialog--create{background:transparent;border:0;box-shadow:none;width:440px;max-width:100%;align-items:center;scrollbar-gutter:stable both-edges}.w-create-card{width:440px;max-width:100%}.w-create-body{padding:34px 32px 28px}.w-create-head{margin-bottom:24px}.w-create-steps{margin-bottom:22px}.w-text-center{text-align:center}.w-linkbtn{background:none;border:0;padding:0;cursor:pointer}.w-modal{position:fixed;top:0;right:0;bottom:0;left:0;background:#08080c80;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);display:flex;justify-content:center;align-items:center;padding:20px;z-index:99999}@media(max-width:640px){.w-modal{padding:8px}}.w-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:.5px solid var(--wa-border)}.w-dialog-title{margin:0;font:400 15px/1.2 var(--wa-font-sans);letter-spacing:-.01em;color:var(--wa-text)}.w-dialog-body{padding:20px;display:flex;flex-direction:column;gap:14px}.w-dialog-foot{display:flex;gap:8px;justify-content:flex-end;padding:14px 20px;border-top:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-vtabs{display:flex;flex-direction:column;gap:2px}.w-vtab{display:flex;align-items:center;gap:10px;height:34px;padding:0 11px;border-radius:var(--wa-radius);font:400 13px/1 var(--wa-font-sans);color:var(--wa-text-muted);background:none;border:0;cursor:pointer;text-align:left;width:100%}.w-vtab svg{width:15px;height:15px}.w-vtab:hover,.w-vtab[data-on]{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-vtab[data-on] svg{color:var(--wa-primary)}@keyframes w-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.w-skel{border-radius:6px;background:linear-gradient(90deg,var(--wa-surface-subtle) 25%,var(--wa-border) 37%,var(--wa-surface-subtle) 63%);background-size:200% 100%;animation:w-shimmer 1.4s ease infinite}.w-auth-skel{display:flex;flex-direction:column;gap:22px}.w-auth-skel-head{display:flex;flex-direction:column;align-items:center;gap:12px;margin-bottom:2px}.w-auth-skel-fields{display:flex;flex-direction:column;gap:15px}.w-auth-skel-field{display:flex;flex-direction:column;gap:7px}.w-skel-avatar{width:44px;height:44px;border-radius:50%}.w-skel-line{height:10px}.w-skel-title{height:16px;width:56%}.w-skel-sub{height:11px;width:78%}.w-skel-label{height:9px;width:34%}.w-skel-input{height:38px;border-radius:var(--wa-radius)}.w-skel-btn{height:38px;border-radius:var(--wa-radius);margin-top:3px}.w-table{width:100%;border-collapse:separate;border-spacing:0;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);overflow:hidden}.w-table thead{background:var(--wa-surface-subtle)}.w-table th{text-align:left;padding:9px 16px;font:400 11px/1 var(--wa-font-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--wa-text-faint);white-space:nowrap;border-bottom:.5px solid var(--wa-border)}.w-table th:last-child{text-align:right}.w-table td{padding:11px 16px;font:400 13px/1.35 var(--wa-font-sans);color:var(--wa-text-secondary);vertical-align:middle;white-space:nowrap}.w-table tbody tr{transition:background .12s ease}.w-table tbody tr:not(:last-child) td{border-bottom:.5px solid var(--wa-border)}.w-table tbody tr:hover td{background:var(--wa-surface-subtle)}.w-table tbody tr:last-child td:last-child{overflow:visible}.w-td--flex>div{display:flex;align-items:center;gap:10px}.w-td--actions{text-align:right;width:auto;white-space:nowrap;position:relative;overflow:visible}.w-td--actions>*{width:fit-content;margin-left:auto}.w-td--actions>[data-dropdown-trigger]{display:inline-flex;width:fit-content;margin-left:auto}.w-actions{display:flex;gap:6px;justify-content:flex-end;align-items:center}.w-kebab{width:28px;height:28px;border-radius:6px;border:0;background:none;cursor:pointer;color:var(--wa-text-muted);display:grid;place-items:center}.w-kebab:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-kebab svg{width:16px;height:16px}.w-token{display:flex;align-items:center;gap:8px;height:36px;padding:0 6px 0 12px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-token code{flex:1;font:400 12px/1 var(--wa-font-mono);color:var(--wa-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-page-head{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:18px 22px}.w-tabsbar{flex:none;padding:0 22px;border-bottom:.5px solid var(--wa-border);overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.w-tabsbar::-webkit-scrollbar{display:none}.w-tabbody{flex:1;min-height:0;padding:20px 22px;overflow-y:auto;overflow-x:auto}.w-tabpane{min-width:300px}.w-card-head{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:16px 20px}.w-card-body{padding:16px 20px}.w-card-foot{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;padding:14px 20px;border-top:.5px solid var(--wa-border)}.w-sechead{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.w-iconbox{width:22px;height:22px;flex:none;display:inline-flex;align-items:center;justify-content:center;overflow:hidden}.w-iconbox svg,.w-iconbox img{width:22px;height:22px;display:block}.w-vrow{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0}.w-vrow:not(:last-child){border-bottom:.5px solid var(--wa-border)}.w-row-act-top{align-self:flex-start;margin-top:20px}.w-rowitem{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px}.w-rowitem:not(:last-child){border-bottom:.5px solid var(--wa-border)}.w-aside-copy{max-width:220px;text-align:center}.w-split{display:flex;min-height:400px;border-radius:var(--wa-radius-lg);overflow:hidden;border:.5px solid var(--wa-border);background:var(--wa-surface)}.w-split-aside{width:35%;min-width:200px;flex:none;background:var(--wa-surface-subtle);border-right:.5px solid var(--wa-border);padding:28px;display:flex;flex-direction:column;gap:14px}.w-split-main{flex:1;min-width:0;padding:28px;display:flex;flex-direction:column;gap:16px}@media(max-width:600px){.w-split{flex-direction:column}.w-split-aside{width:100%;border-right:0;border-bottom:.5px solid var(--wa-border)}}.w-listrow{display:flex;align-items:center;gap:12px;width:100%;padding:12px 0;text-align:left;border:0;border-bottom:.5px solid var(--wa-border);background:transparent;cursor:pointer;transition:background .12s ease}.w-listrow:last-child{border-bottom:0}.w-listrow:hover{background:var(--wa-surface-subtle)}.w-listrow:disabled{opacity:.6;cursor:not-allowed}.w-tile{border:.5px solid var(--wa-border);border-radius:var(--wa-radius);padding:12px;background:var(--wa-surface-subtle)}.w-input--area{min-height:80px;padding-top:9px;padding-bottom:9px;resize:vertical;line-height:1.5}.w-input--mono{font-family:var(--wa-font-mono)}.w-pop--wide{width:372px;max-width:calc(100vw - 24px);overflow:visible}.w-pop .w-input:not(.w-input--area),.w-pop .w-combo{height:32px}.w-feature-badge{width:52px;height:52px;border-radius:999px;display:grid;place-items:center;color:var(--wa-primary-foreground);background:linear-gradient(135deg,var(--wa-primary),var(--wa-primary-tint, #9277ff));box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-primary) 55%,transparent);margin-bottom:18px}.w-narrow{max-width:420px;margin:0 auto}.w-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.w-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.w-grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}@media(max-width:600px){.w-grid-2,.w-grid-3,.w-grid-4{grid-template-columns:1fr}}.w-toast--fixed{position:fixed;bottom:20px;right:20px;z-index:1000}.w-toast--contained{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:20;width:max-content;max-width:calc(100% - 32px)}.w-notif-badge{position:absolute;top:4px;right:4px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:var(--wa-error);color:#fff;font:500 9px/1 var(--wa-font-sans);display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--wa-surface)}.w-notif-badge[data-dot]{top:6px;right:6px;min-width:8px;height:8px;padding:0}.w-notif-row{cursor:pointer;padding:12px 18px;border-bottom:.5px solid var(--wa-border);transition:background .12s ease}.w-notif-row:hover,.w-notif-row[data-unread]{background:var(--wa-surface-subtle)}.w-notif-row:hover .w-notif-actions button{color:var(--wa-text-secondary)}.w-notif-row .w-notif-actions button{color:var(--wa-text-faint);transition:color .12s ease}.w-notif-row .w-notif-actions button:hover{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-notif-row .w-notif-actions button[data-on]{color:var(--wa-warning)}.w-notif-dot{width:8px;height:8px;border-radius:50%;background:var(--wa-primary);flex:none}.w-notif-pop{position:fixed;width:450px;max-width:calc(100vw - 24px);z-index:99999}.w-notif-panel{width:450px;max-width:100%;height:100%;background:var(--wa-surface);overflow:hidden}.w-notif-panel--fill{width:100%}.w-notif-head{position:relative;padding:14px 18px;border-bottom:.5px solid var(--wa-border)}.w-notif-body{overflow-x:hidden;overflow-y:auto;background:var(--wa-surface)}.w-notif-menu{position:absolute;top:calc(100% + 4px);right:12px;width:200px;z-index:100000}.w-notif-menu .w-menu-check{margin-left:auto;color:var(--wa-primary)}.w-notif-filter-dot{position:absolute;top:5px;right:5px;width:6px;height:6px;border-radius:50%;background:var(--wa-primary)}.w-banner--success{background:var(--wa-success-soft)}.w-banner--success svg{color:var(--wa-success)}@keyframes w-pop{0%{transform:scale(.5);opacity:0}60%{transform:scale(1.06)}to{transform:scale(1);opacity:1}}@keyframes w-ring{0%{transform:scale(.85);opacity:.45}to{transform:scale(1.9);opacity:0}}@keyframes w-draw{to{stroke-dashoffset:0}}@keyframes w-indeterminate{0%{transform:translate(-100%)}to{transform:translate(330%)}}.w-success{position:relative;display:grid;place-items:center;width:56px;height:56px}.w-success .ring{position:absolute;top:2px;right:2px;bottom:2px;left:2px;border-radius:999px;border:1.5px solid var(--wa-success);opacity:0}.w-success .disc{width:52px;height:52px;border-radius:999px;background:var(--wa-success);color:#fff;display:grid;place-items:center;box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-success) 55%,transparent)}.w-success .disc svg{width:26px;height:26px}.w-success--error .ring{border-color:var(--wa-error)}.w-success--error .disc{background:var(--wa-error);box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-error) 55%,transparent)}.w-success--info .ring{border-color:var(--wa-info)}.w-success--info .disc{background:var(--wa-info);box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-info) 55%,transparent)}.w-progress{position:relative;width:70%;height:3px;border-radius:999px;background:var(--wa-border);overflow:hidden}.w-progress:after{content:"";position:absolute;top:0;left:0;width:30%;height:100%;border-radius:999px;background:var(--wa-primary)}@media(prefers-reduced-motion:no-preference){.w-success .ring{animation:w-ring 1.7s ease-out infinite}.w-success .disc{animation:w-pop .42s cubic-bezier(.2,.9,.3,1.2)}.w-success .disc svg path{stroke-dasharray:26;stroke-dashoffset:26;animation:w-draw .4s .22s ease forwards}.w-progress:after{animation:w-indeterminate 1.15s ease-in-out infinite}}.w-sso-conn{padding-bottom:24px}.w-sso-conn:not(:last-child){margin-bottom:24px;border-bottom:.5px solid var(--wa-border)}.w-sso-detail{display:grid;grid-template-columns:auto 1fr;gap:4px 32px}.w-sso-scim{padding-top:16px;border-top:.5px solid var(--wa-border)}.w-sso-template{padding:12px;background:var(--wa-primary-soft);border-radius:var(--wa-radius);border:.5px solid var(--wa-primary)}.w-sso-check{padding:8px 12px;background:var(--wa-surface);border-radius:var(--wa-radius);border:.5px solid var(--wa-border)}.w-sso-check-mark{min-width:12px}.w-sso-tile{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 10px;border:.5px solid var(--wa-border);border-radius:var(--wa-radius);background:var(--wa-surface);cursor:pointer;transition:border-color .14s ease,background .14s ease}.w-sso-tile:hover{border-color:var(--wa-border-strong);background:var(--wa-surface-subtle)}.w-sso-logo{object-fit:contain;background:var(--wa-surface);padding:4px}.w-sso-logo--ph{background:var(--wa-surface)}.w-token-chip{background:var(--wa-surface-subtle);padding:2px 6px;border-radius:4px;color:var(--wa-text)}.w-disclosure{cursor:pointer;font:400 12.5px/1 var(--wa-font-sans)}.w-disclosure-caret{font-size:9px}.w-break-all{word-break:break-all}.w-col-full{grid-column:1 / -1}.dark .w-card{box-shadow:0 0 0 .5px var(--wa-border),0 2px 4px #0006,0 28px 60px -20px #000000b3}.dark .w-menu,.dark .w-pop,.dark .w-toast,.dark .w-dialog,.dark .w-combo-menu,.dark .w-country-pop{box-shadow:0 1px 2px #00000080,0 18px 44px -14px #000000b3}.dark .w-btn--secondary,.dark .w-social{box-shadow:inset 0 1px #ffffff0d,0 1px 1.5px #1414160a}.w-flex{display:flex}.w-inline{display:inline-flex}.w-items-center{align-items:center}.w-items-start{align-items:flex-start}.w-items-end{align-items:flex-end}.w-justify-start{justify-content:flex-start}.w-justify-center{justify-content:center}.w-justify-end{justify-content:flex-end}.w-justify-between{justify-content:space-between}',l4=r4`
100
- ${i4}
101
- ${o4}
102
- `,c4={display:"contents"};function d4(e){const a={};if(!e)return a;const s=(r,i)=>{if(i)for(const l in i){const m=i[l];typeof m=="string"&&m.trim()!==""&&(a[`--wa-ov-${r}-${l}`]=m)}};return s("light",e.light),s("dark",e.dark),a}function ts(){var s,r;const e=o.useContext(fr),a=(r=(s=e==null?void 0:e.deployment)==null?void 0:s.ui_settings)==null?void 0:r.theme_tokens;return o.useMemo(()=>d4(a),[a])}const Mi=o.createContext(!1),u4=o.memo(function(){return t.jsx(l4,{})});function $e({children:e,className:a,style:s,...r}){const i=o.useContext(Mi),l=ts(),[m,c]=o.useState(!1);if(o.useEffect(()=>c(!0),[]),!m)return null;const d=t.jsx("div",{...r,className:a?`wacht-root ${a}`:"wacht-root",style:{...c4,...l,...s},children:e});return i?d:t.jsxs(Mi.Provider,{value:!0,children:[t.jsx(u4,{}),d]})}function ya({length:e=6,onComplete:a,onResend:s,error:r,isSubmitting:i=!1}){const[l,m]=o.useState(new Array(e).fill("")),[c,d]=o.useState(60),[p,u]=o.useState(!1),f=o.useRef([]),h=o.useCallback(()=>{const j=setInterval(()=>{d(v=>v<=1?(u(!0),clearInterval(j),0):v-1)},1e3);return j},[]);o.useEffect(()=>{const j=h();return()=>clearInterval(j)},[h]);const g=async()=>{var j;!p||i||!s||(await s(),u(!1),d(60),m(new Array(e).fill("")),(j=f.current[0])==null||j.focus(),h())},x=(j,v)=>{var C;if(i)return;const k=j.value,N=[...l];N[v]=k.replace(/[^0-9]/g,""),m(N);const _=N.join("");_.length===e&&a(_),k&&v<e-1&&((C=f.current[v+1])==null||C.focus())},w=(j,v)=>{var k;i||j.key==="Backspace"&&!l[v]&&v>0&&((k=f.current[v-1])==null||k.focus())},b=(j,v)=>{var C,y;if(i)return;j.preventDefault();const k=j.clipboardData.getData("text/plain").replace(/[^0-9]/g,"").slice(0,e);if(!k.length)return;const N=[...l];for(let E=0;E<k.length&&v+E<e;E++)N[v+E]=k[E];if(v===0&&k.length===e)for(let E=0;E<e;E++)N[E]=k[E];m(N);const _=N.join("");if(_.length===e)a(_),(C=f.current[e-1])==null||C.focus();else{const E=N.findIndex((A,H)=>H>=v&&!A);E!==-1&&((y=f.current[E])==null||y.focus())}};return t.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",gap:16},children:[t.jsx("div",{className:"w-otp","data-error":r?"":void 0,children:l.map((j,v)=>t.jsx("input",{className:"w-otp-cell",type:"text",inputMode:"numeric",maxLength:1,value:j,"data-filled":j?"":void 0,onChange:k=>x(k.target,v),onKeyDown:k=>w(k,v),onPaste:k=>b(k,v),ref:k=>{f.current[v]=k},disabled:i,autoFocus:v===0},v))}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[r&&t.jsx("span",{className:"w-input-err",children:r}),s&&(p?t.jsx("button",{type:"button",className:"w-link",style:{background:"none",border:0,cursor:"pointer",fontSize:12.5},onClick:g,disabled:i,children:"Didn't receive a code? Resend"}):t.jsxs("span",{className:"w-secsub",children:["Resend code in ",c,"s"]}))]})]})}const Cc=e=>t.jsxs("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-labelledby":"githubIconTitle",...e,children:[t.jsx("title",{id:"githubIconTitle",children:"GitHub"}),t.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.109-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.91 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})]}),Nc=e=>t.jsxs("svg",{width:"800px",height:"800px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",...e,children:[t.jsx("path",{fill:"#4285F4",d:"M14.9 8.161c0-.476-.039-.954-.121-1.422h-6.64v2.695h3.802a3.24 3.24 0 01-1.407 2.127v1.75h2.269c1.332-1.22 2.097-3.02 2.097-5.15z"}),t.jsx("path",{fill:"#34A853",d:"M8.14 15c1.898 0 3.499-.62 4.665-1.69l-2.268-1.749c-.631.427-1.446.669-2.395.669-1.836 0-3.393-1.232-3.952-2.888H1.85v1.803A7.044 7.044 0 008.14 15z"}),t.jsx("path",{fill:"#FBBC04",d:"M4.187 9.342a4.17 4.17 0 010-2.68V4.859H1.849a6.97 6.97 0 000 6.286l2.338-1.803z"}),t.jsx("path",{fill:"#EA4335",d:"M8.14 3.77a3.837 3.837 0 012.7 1.05l2.01-1.999a6.786 6.786 0 00-4.71-1.82 7.042 7.042 0 00-6.29 3.858L4.186 6.66c.556-1.658 2.116-2.89 3.952-2.89z"})]}),Sc=e=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"50",height:"50",viewBox:"0 0 50 50",...e,children:t.jsx("path",{d:"M 6.9199219 6 L 21.136719 26.726562 L 6.2285156 44 L 9.40625 44 L 22.544922 28.777344 L 32.986328 44 L 43 44 L 28.123047 22.3125 L 42.203125 6 L 39.027344 6 L 26.716797 20.261719 L 16.933594 6 L 6.9199219 6 z"})}),m4=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),Ec=()=>t.jsx("svg",{width:"20",height:"20",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",children:t.jsx("path",{fill:"#0A66C2",d:"M12.225 12.225h-1.778V9.44c0-.664-.012-1.519-.925-1.519-.926 0-1.068.724-1.068 1.47v2.834H6.676V6.498h1.707v.783h.024c.348-.594.996-.95 1.684-.925 1.802 0 2.135 1.185 2.135 2.728l-.001 3.14zM4.67 5.715a1.037 1.037 0 01-1.032-1.031c0-.566.466-1.032 1.032-1.032.566 0 1.031.466 1.032 1.032 0 .566-.466 1.032-1.032 1.032zm.889 6.51h-1.78V6.498h1.78v5.727zM13.11 2H2.885A.88.88 0 002 2.866v10.268a.88.88 0 00.885.866h10.226a.882.882 0 00.889-.866V2.865a.88.88 0 00-.889-.864z"})}),Ac=()=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M12 21.42L15.54 10.86H8.46L12 21.42Z",fill:"#E24329"}),t.jsx("path",{d:"M12 21.42L8.46 10.86H2.28L12 21.42Z",fill:"#FC6D26"}),t.jsx("path",{d:"M2.28 10.86L0.86 15.14C0.72 15.54 0.86 15.98 1.18 16.24L12 21.42L2.28 10.86Z",fill:"#FCA326"}),t.jsx("path",{d:"M2.28 10.86H8.46L6.12 3.58C5.98 3.18 5.42 3.18 5.28 3.58L2.28 10.86Z",fill:"#E24329"}),t.jsx("path",{d:"M12 21.42L15.54 10.86H21.72L12 21.42Z",fill:"#FC6D26"}),t.jsx("path",{d:"M21.72 10.86L23.14 15.14C23.28 15.54 23.14 15.98 22.82 16.24L12 21.42L21.72 10.86Z",fill:"#FCA326"}),t.jsx("path",{d:"M21.72 10.86H15.54L17.88 3.58C18.02 3.18 18.58 3.18 18.72 3.58L21.72 10.86Z",fill:"#E24329"})]}),p4=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"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"})}),Mc=()=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("circle",{cx:"512",cy:"512",r:"512",style:{fill:"#5865f2"}}),t.jsx("path",{d:"M689.43 349a422.21 422.21 0 0 0-104.22-32.32 1.58 1.58 0 0 0-1.68.79 294.11 294.11 0 0 0-13 26.66 389.78 389.78 0 0 0-117.05 0 269.75 269.75 0 0 0-13.18-26.66 1.64 1.64 0 0 0-1.68-.79A421 421 0 0 0 334.44 349a1.49 1.49 0 0 0-.69.59c-66.37 99.17-84.55 195.9-75.63 291.41a1.76 1.76 0 0 0 .67 1.2 424.58 424.58 0 0 0 127.85 64.63 1.66 1.66 0 0 0 1.8-.59 303.45 303.45 0 0 0 26.15-42.54 1.62 1.62 0 0 0-.89-2.25 279.6 279.6 0 0 1-39.94-19 1.64 1.64 0 0 1-.16-2.72c2.68-2 5.37-4.1 7.93-6.22a1.58 1.58 0 0 1 1.65-.22c83.79 38.26 174.51 38.26 257.31 0a1.58 1.58 0 0 1 1.68.2c2.56 2.11 5.25 4.23 8 6.24a1.64 1.64 0 0 1-.14 2.72 262.37 262.37 0 0 1-40 19 1.63 1.63 0 0 0-.87 2.28 340.72 340.72 0 0 0 26.13 42.52 1.62 1.62 0 0 0 1.8.61 423.17 423.17 0 0 0 128-64.63 1.64 1.64 0 0 0 .67-1.18c10.68-110.44-17.88-206.38-75.7-291.42a1.3 1.3 0 0 0-.63-.63zM427.09 582.85c-25.23 0-46-23.16-46-51.6s20.38-51.6 46-51.6c25.83 0 46.42 23.36 46 51.6.02 28.44-20.37 51.6-46 51.6zm170.13 0c-25.23 0-46-23.16-46-51.6s20.38-51.6 46-51.6c25.83 0 46.42 23.36 46 51.6.01 28.44-20.17 51.6-46 51.6z",style:{fill:"#fff"}})]}),h4={google_oauth:{label:"Continue with Google",icon:t.jsx(Nc,{})},github_oauth:{label:"Continue with GitHub",icon:t.jsx(Cc,{})},x_oauth:{label:"Continue with X",icon:t.jsx(Sc,{})},facebook_oauth:{label:"Continue with Facebook",icon:t.jsx(m4,{})},linkedin_oauth:{label:"Continue with LinkedIn",icon:t.jsx(Ec,{})},gitlab_oauth:{label:"Continue with GitLab",icon:t.jsx(Ac,{})},apple_oauth:{label:"Continue with Apple",icon:t.jsx(p4,{})},discord_oauth:{label:"Continue with Discord",icon:t.jsx(Mc,{})}},Nr=({connections:e,callback:a})=>{const s=e.map(r=>({connection:r,config:h4[r.provider]})).filter(r=>r.config);if(!s.length)return null;if(s.length>3){const r=Math.min(s.length,4);return t.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${r}, 1fr)`,gap:8},children:s.map(({connection:i,config:l})=>t.jsx("button",{type:"button",className:"w-social",style:{justifyContent:"center",padding:0},onClick:()=>a(i),title:l.label,"aria-label":l.label,children:l.icon},i.provider))})}return t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:s.map(({connection:r,config:i})=>t.jsxs("button",{type:"button",className:"w-social",onClick:()=>a(r),children:[i.icon,t.jsx("span",{className:"w-social-label",children:i.label})]},r.provider))})},Et=({to:e,replace:a,children:s,...r})=>{const{navigate:i}=kt(),l=o.useCallback(m=>{m.preventDefault(),i(e,{replace:a})},[e,a,i]);return t.jsx("a",{href:e||void 0,onClick:l,...r,children:s})},qt=o.forwardRef(({onFocus:e,readOnly:a,...s},r)=>{const[i,l]=o.useState(!1);return t.jsx("input",{ref:r,...s,readOnly:a||!i,onFocus:m=>{i||l(!0),e==null||e(m)}})});qt.displayName="NoPrefillInput";const Gs=[{name:"Afghanistan",code:"AF",dialCode:"+93",flag:"🇦🇫"},{name:"Albania",code:"AL",dialCode:"+355",flag:"🇦🇱"},{name:"Algeria",code:"DZ",dialCode:"+213",flag:"🇩🇿"},{name:"American Samoa",code:"AS",dialCode:"+1684",flag:"🇺🇸"},{name:"Andorra",code:"AD",dialCode:"+376",flag:"🇦🇩"},{name:"Angola",code:"AO",dialCode:"+244",flag:"🇦🇴"},{name:"Anguilla",code:"AI",dialCode:"+1264",flag:"🇦🇮"},{name:"Antarctica",code:"AQ",dialCode:"+672",flag:"🇦🇶"},{name:"Antigua and Barbuda",code:"AG",dialCode:"+1268",flag:"🇦🇬"},{name:"Argentina",code:"AR",dialCode:"+54",flag:"🇦🇷"},{name:"Armenia",code:"AM",dialCode:"+374",flag:"🇦🇲"},{name:"Aruba",code:"AW",dialCode:"+297",flag:"🇦🇼"},{name:"Australia",code:"AU",dialCode:"+61",flag:"🇦🇺"},{name:"Austria",code:"AT",dialCode:"+43",flag:"🇦🇹"},{name:"Azerbaijan",code:"AZ",dialCode:"+994",flag:"🇦🇿"},{name:"Bahamas",code:"BS",dialCode:"+1242",flag:"🇧🇸"},{name:"Bahrain",code:"BH",dialCode:"+973",flag:"🇧🇭"},{name:"Bangladesh",code:"BD",dialCode:"+880",flag:"🇧🇩"},{name:"Barbados",code:"BB",dialCode:"+1246",flag:"🇧🇧"},{name:"Belarus",code:"BY",dialCode:"+375",flag:"🇧🇾"},{name:"Belgium",code:"BE",dialCode:"+32",flag:"🇧🇪"},{name:"Belize",code:"BZ",dialCode:"+501",flag:"🇧🇿"},{name:"Benin",code:"BJ",dialCode:"+229",flag:"🇧🇯"},{name:"Bermuda",code:"BM",dialCode:"+1441",flag:"🇧🇲"},{name:"Bhutan",code:"BT",dialCode:"+975",flag:"🇧🇹"},{name:"Bolivia",code:"BO",dialCode:"+591",flag:"🇧🇴"},{name:"Bosnia and Herzegovina",code:"BA",dialCode:"+387",flag:"🇧🇦"},{name:"Botswana",code:"BW",dialCode:"+267",flag:"🇧🇼"},{name:"Brazil",code:"BR",dialCode:"+55",flag:"🇧🇷"},{name:"British Indian Ocean Territory",code:"IO",dialCode:"+246",flag:"🇮🇴"},{name:"British Virgin Islands",code:"VG",dialCode:"+1284",flag:"🇻🇬"},{name:"Brunei",code:"BN",dialCode:"+673",flag:"🇧🇳"},{name:"Bulgaria",code:"BG",dialCode:"+359",flag:"🇧🇬"},{name:"Burkina Faso",code:"BF",dialCode:"+226",flag:"🇧🇫"},{name:"Burundi",code:"BI",dialCode:"+257",flag:"🇧🇮"},{name:"Cambodia",code:"KH",dialCode:"+855",flag:"🇰🇭"},{name:"Cameroon",code:"CM",dialCode:"+237",flag:"🇨🇲"},{name:"Canada",code:"CA",dialCode:"+1",flag:"🇨🇦"},{name:"Cape Verde",code:"CV",dialCode:"+238",flag:"🇨🇻"},{name:"Cayman Islands",code:"KY",dialCode:"+1345",flag:"🇰🇾"},{name:"Central African Republic",code:"CF",dialCode:"+236",flag:"🇨🇫"},{name:"Chad",code:"TD",dialCode:"+235",flag:"🇹🇩"},{name:"Chile",code:"CL",dialCode:"+56",flag:"🇨🇱"},{name:"China",code:"CN",dialCode:"+86",flag:"🇨🇳"},{name:"Christmas Island",code:"CX",dialCode:"+61",flag:"🇨🇽"},{name:"Cocos Islands",code:"CC",dialCode:"+61",flag:"🇨🇨"},{name:"Colombia",code:"CO",dialCode:"+57",flag:"🇨🇴"},{name:"Comoros",code:"KM",dialCode:"+269",flag:"🇰🇲"},{name:"Cook Islands",code:"CK",dialCode:"+682",flag:"🇨🇰"},{name:"Costa Rica",code:"CR",dialCode:"+506",flag:"🇨🇷"},{name:"Croatia",code:"HR",dialCode:"+385",flag:"🇭🇷"},{name:"Cuba",code:"CU",dialCode:"+53",flag:"🇨🇺"},{name:"Curacao",code:"CW",dialCode:"+599",flag:"🇨🇼"},{name:"Cyprus",code:"CY",dialCode:"+357",flag:"🇨🇾"},{name:"Czech Republic",code:"CZ",dialCode:"+420",flag:"🇨🇿"},{name:"Democratic Republic of the Congo",code:"CD",dialCode:"+243",flag:"🇨🇩"},{name:"Denmark",code:"DK",dialCode:"+45",flag:"🇩🇰"},{name:"Djibouti",code:"DJ",dialCode:"+253",flag:"🇩🇯"},{name:"Dominica",code:"DM",dialCode:"+1767",flag:"🇩🇲"},{name:"Dominican Republic",code:"DO",dialCode:"+1849",flag:"🇩🇴"},{name:"East Timor",code:"TL",dialCode:"+670",flag:"🇹🇱"},{name:"Ecuador",code:"EC",dialCode:"+593",flag:"🇪🇨"},{name:"Egypt",code:"EG",dialCode:"+20",flag:"🇪🇬"},{name:"El Salvador",code:"SV",dialCode:"+503",flag:"🇸🇻"},{name:"Equatorial Guinea",code:"GQ",dialCode:"+240",flag:"🇬🇶"},{name:"Eritrea",code:"ER",dialCode:"+291",flag:"🇪🇷"},{name:"Estonia",code:"EE",dialCode:"+372",flag:"🇪🇪"},{name:"Ethiopia",code:"ET",dialCode:"+251",flag:"🇪🇹"},{name:"Falkland Islands",code:"FK",dialCode:"+500",flag:"🇫🇰"},{name:"Faroe Islands",code:"FO",dialCode:"+298",flag:"🇫🇴"},{name:"Fiji",code:"FJ",dialCode:"+679",flag:"🇫🇯"},{name:"Finland",code:"FI",dialCode:"+358",flag:"🇫🇮"},{name:"France",code:"FR",dialCode:"+33",flag:"🇫🇷"},{name:"French Polynesia",code:"PF",dialCode:"+689",flag:"🇵🇫"},{name:"Gabon",code:"GA",dialCode:"+241",flag:"🇬🇦"},{name:"Gambia",code:"GM",dialCode:"+220",flag:"🇬🇲"},{name:"Georgia",code:"GE",dialCode:"+995",flag:"🇬🇪"},{name:"Germany",code:"DE",dialCode:"+49",flag:"🇩🇪"},{name:"Ghana",code:"GH",dialCode:"+233",flag:"🇬🇭"},{name:"Gibraltar",code:"GI",dialCode:"+350",flag:"🇬🇮"},{name:"Greece",code:"GR",dialCode:"+30",flag:"🇬🇷"},{name:"Greenland",code:"GL",dialCode:"+299",flag:"🇬🇱"},{name:"Grenada",code:"GD",dialCode:"+1473",flag:"🇬🇩"},{name:"Guam",code:"GU",dialCode:"+1671",flag:"🇬🇺"},{name:"Guatemala",code:"GT",dialCode:"+502",flag:"🇬🇹"},{name:"Guernsey",code:"GG",dialCode:"+44",flag:"🇬🇬"},{name:"Guinea",code:"GN",dialCode:"+224",flag:"🇬🇳"},{name:"Guinea-Bissau",code:"GW",dialCode:"+245",flag:"🇬🇼"},{name:"Guyana",code:"GY",dialCode:"+592",flag:"🇬🇾"},{name:"Haiti",code:"HT",dialCode:"+509",flag:"🇭🇹"},{name:"Honduras",code:"HN",dialCode:"+504",flag:"🇭🇳"},{name:"Hong Kong",code:"HK",dialCode:"+852",flag:"🇭🇰"},{name:"Hungary",code:"HU",dialCode:"+36",flag:"🇭🇺"},{name:"Iceland",code:"IS",dialCode:"+354",flag:"🇮🇸"},{name:"India",code:"IN",dialCode:"+91",flag:"🇮🇳"},{name:"Indonesia",code:"ID",dialCode:"+62",flag:"🇮🇩"},{name:"Iran",code:"IR",dialCode:"+98",flag:"🇮🇷"},{name:"Iraq",code:"IQ",dialCode:"+964",flag:"🇮🇶"},{name:"Ireland",code:"IE",dialCode:"+353",flag:"🇮🇪"},{name:"Isle of Man",code:"IM",dialCode:"+44",flag:"🇮🇲"},{name:"Israel",code:"IL",dialCode:"+972",flag:"🇮🇱"},{name:"Italy",code:"IT",dialCode:"+39",flag:"🇮🇹"},{name:"Ivory Coast",code:"CI",dialCode:"+225",flag:"🇨🇮"},{name:"Jamaica",code:"JM",dialCode:"+1876",flag:"🇯🇲"},{name:"Japan",code:"JP",dialCode:"+81",flag:"🇯🇵"},{name:"Jersey",code:"JE",dialCode:"+44",flag:"🇬🇬"},{name:"Jordan",code:"JO",dialCode:"+962",flag:"🇯🇴"},{name:"Kazakhstan",code:"KZ",dialCode:"+7",flag:"🇰🇿"},{name:"Kenya",code:"KE",dialCode:"+254",flag:"🇰🇪"},{name:"Kiribati",code:"KI",dialCode:"+686",flag:"🇰🇮"},{name:"Kosovo",code:"XK",dialCode:"+383",flag:"🇽🇰"},{name:"Kuwait",code:"KW",dialCode:"+965",flag:"🇰🇼"},{name:"Kyrgyzstan",code:"KG",dialCode:"+996",flag:"🇰🇬"},{name:"Laos",code:"LA",dialCode:"+856",flag:"🇱🇦"},{name:"Latvia",code:"LV",dialCode:"+371",flag:"🇱🇻"},{name:"Lebanon",code:"LB",dialCode:"+961",flag:"🇱🇧"},{name:"Lesotho",code:"LS",dialCode:"+266",flag:"🇱🇸"},{name:"Liberia",code:"LR",dialCode:"+231",flag:"🇱🇷"},{name:"Libya",code:"LY",dialCode:"+218",flag:"🇱🇾"},{name:"Liechtenstein",code:"LI",dialCode:"+423",flag:"🇱🇮"},{name:"Lithuania",code:"LT",dialCode:"+370",flag:"🇱🇹"},{name:"Luxembourg",code:"LU",dialCode:"+352",flag:"🇱🇺"},{name:"Macau",code:"MO",dialCode:"+853",flag:"🇲🇴"},{name:"Macedonia",code:"MK",dialCode:"+389",flag:"🇲🇰"},{name:"Madagascar",code:"MG",dialCode:"+261",flag:"🇲🇬"},{name:"Malawi",code:"MW",dialCode:"+265",flag:"🇲🇼"},{name:"Malaysia",code:"MY",dialCode:"+60",flag:"🇲🇾"},{name:"Maldives",code:"MV",dialCode:"+960",flag:"🇲🇻"},{name:"Mali",code:"ML",dialCode:"+223",flag:"🇲🇱"},{name:"Malta",code:"MT",dialCode:"+356",flag:"🇲🇹"},{name:"Marshall Islands",code:"MH",dialCode:"+692",flag:"🇲🇭"},{name:"Mauritania",code:"MR",dialCode:"+222",flag:"🇲🇷"},{name:"Mauritius",code:"MU",dialCode:"+230",flag:"🇲🇺"},{name:"Mayotte",code:"YT",dialCode:"+262",flag:"🇾🇹"},{name:"Mexico",code:"MX",dialCode:"+52",flag:"🇲🇽"},{name:"Micronesia",code:"FM",dialCode:"+691",flag:"🇫🇲"},{name:"Moldova",code:"MD",dialCode:"+373",flag:"🇲🇩"},{name:"Monaco",code:"MC",dialCode:"+377",flag:"🇲🇨"},{name:"Mongolia",code:"MN",dialCode:"+976",flag:"🇲🇳"},{name:"Montenegro",code:"ME",dialCode:"+382",flag:"🇲🇪"},{name:"Montserrat",code:"MS",dialCode:"+1664",flag:"🇲🇸"},{name:"Morocco",code:"MA",dialCode:"+212",flag:"🇲🇦"},{name:"Mozambique",code:"MZ",dialCode:"+258",flag:"🇲🇿"},{name:"Myanmar",code:"MM",dialCode:"+95",flag:"🇲🇲"},{name:"Namibia",code:"NA",dialCode:"+264",flag:"🇳🇦"},{name:"Nauru",code:"NR",dialCode:"+674",flag:"🇳🇷"},{name:"Nepal",code:"NP",dialCode:"+977",flag:"🇳🇵"},{name:"Netherlands",code:"NL",dialCode:"+31",flag:"🇳🇱"},{name:"Netherlands Antilles",code:"AN",dialCode:"+599",flag:"🇳🇱"},{name:"New Caledonia",code:"NC",dialCode:"+687",flag:"🇳🇨"},{name:"New Zealand",code:"NZ",dialCode:"+64",flag:"🇳🇿"},{name:"Nicaragua",code:"NI",dialCode:"+505",flag:"🇳🇮"},{name:"Niger",code:"NE",dialCode:"+227",flag:"🇳🇪"},{name:"Nigeria",code:"NG",dialCode:"+234",flag:"🇳🇬"},{name:"Niue",code:"NU",dialCode:"+683",flag:"🇳🇺"},{name:"North Korea",code:"KP",dialCode:"+850",flag:"🇰🇵"},{name:"Northern Mariana Islands",code:"MP",dialCode:"+1670",flag:"🇲🇵"},{name:"Norway",code:"NO",dialCode:"+47",flag:"🇳🇴"},{name:"Oman",code:"OM",dialCode:"+968",flag:"🇴🇲"},{name:"Pakistan",code:"PK",dialCode:"+92",flag:"🇵🇰"},{name:"Palau",code:"PW",dialCode:"+680",flag:"🇵🇼"},{name:"Palestine",code:"PS",dialCode:"+970",flag:"🇵🇸"},{name:"Panama",code:"PA",dialCode:"+507",flag:"🇵🇦"},{name:"Papua New Guinea",code:"PG",dialCode:"+675",flag:"🇵🇬"},{name:"Paraguay",code:"PY",dialCode:"+595",flag:"🇵🇾"},{name:"Peru",code:"PE",dialCode:"+51",flag:"🇵🇪"},{name:"Philippines",code:"PH",dialCode:"+63",flag:"🇵🇭"},{name:"Pitcairn",code:"PN",dialCode:"+64",flag:"🇵🇳"},{name:"Poland",code:"PL",dialCode:"+48",flag:"🇵🇱"},{name:"Portugal",code:"PT",dialCode:"+351",flag:"🇵🇹"},{name:"Puerto Rico",code:"PR",dialCode:"+1939",flag:"🇵🇷"},{name:"Qatar",code:"QA",dialCode:"+974",flag:"🇶🇦"},{name:"Republic of the Congo",code:"CG",dialCode:"+242",flag:"🇨🇬"},{name:"Reunion",code:"RE",dialCode:"+262",flag:"🇷🇪"},{name:"Romania",code:"RO",dialCode:"+40",flag:"🇷🇴"},{name:"Russia",code:"RU",dialCode:"+7",flag:"🇷🇺"},{name:"Rwanda",code:"RW",dialCode:"+250",flag:"🇷🇼"},{name:"Saint Barthelemy",code:"BL",dialCode:"+590",flag:"🇧🇱"},{name:"Saint Helena",code:"SH",dialCode:"+290",flag:"🇸🇭"},{name:"Saint Kitts and Nevis",code:"KN",dialCode:"+1869",flag:"🇰🇳"},{name:"Saint Lucia",code:"LC",dialCode:"+1758",flag:"🇱🇨"},{name:"Saint Martin",code:"MF",dialCode:"+590",flag:"🇲🇫"},{name:"Saint Pierre and Miquelon",code:"PM",dialCode:"+508",flag:"🇵🇲"},{name:"Saint Vincent and the Grenadines",code:"VC",dialCode:"+1784",flag:"🇻🇨"},{name:"Samoa",code:"WS",dialCode:"+685",flag:"🇼🇸"},{name:"San Marino",code:"SM",dialCode:"+378",flag:"🇸🇲"},{name:"Sao Tome and Principe",code:"ST",dialCode:"+239",flag:"🇸🇹"},{name:"Saudi Arabia",code:"SA",dialCode:"+966",flag:"🇸🇦"},{name:"Senegal",code:"SN",dialCode:"+221",flag:"🇸🇳"},{name:"Serbia",code:"RS",dialCode:"+381",flag:"🇷🇸"},{name:"Seychelles",code:"SC",dialCode:"+248",flag:"🇸🇨"},{name:"Sierra Leone",code:"SL",dialCode:"+232",flag:"🇸🇱"},{name:"Singapore",code:"SG",dialCode:"+65",flag:"🇸🇬"},{name:"Sint Maarten",code:"SX",dialCode:"+1721",flag:"🇸🇽"},{name:"Slovakia",code:"SK",dialCode:"+421",flag:"🇸🇰"},{name:"Slovenia",code:"SI",dialCode:"+386",flag:"🇸🇮"},{name:"Solomon Islands",code:"SB",dialCode:"+677",flag:"🇸🇧"},{name:"Somalia",code:"SO",dialCode:"+252",flag:"🇸🇴"},{name:"South Africa",code:"ZA",dialCode:"+27",flag:"🇿🇦"},{name:"South Korea",code:"KR",dialCode:"+82",flag:"🇰🇷"},{name:"South Sudan",code:"SS",dialCode:"+211",flag:"🇸🇸"},{name:"Spain",code:"ES",dialCode:"+34",flag:"🇪🇸"},{name:"Sri Lanka",code:"LK",dialCode:"+94",flag:"🇱🇰"},{name:"Sudan",code:"SD",dialCode:"+249",flag:"🇸🇩"},{name:"Suriname",code:"SR",dialCode:"+597",flag:"🇸🇷"},{name:"Svalbard and Jan Mayen",code:"SJ",dialCode:"+47",flag:"🇸🇯"},{name:"Swaziland",code:"SZ",dialCode:"+268",flag:"🇸🇿"},{name:"Sweden",code:"SE",dialCode:"+46",flag:"🇸🇪"},{name:"Switzerland",code:"CH",dialCode:"+41",flag:"🇨🇭"},{name:"Syria",code:"SY",dialCode:"+963",flag:"🇸🇾"},{name:"Taiwan",code:"TW",dialCode:"+886",flag:"🇹🇼"},{name:"Tajikistan",code:"TJ",dialCode:"+992",flag:"🇹🇯"},{name:"Tanzania",code:"TZ",dialCode:"+255",flag:"🇹🇿"},{name:"Thailand",code:"TH",dialCode:"+66",flag:"🇹🇭"},{name:"Togo",code:"TG",dialCode:"+228",flag:"🇹🇬"},{name:"Tokelau",code:"TK",dialCode:"+690",flag:"🇹🇰"},{name:"Tonga",code:"TO",dialCode:"+676",flag:"🇹🇴"},{name:"Trinidad and Tobago",code:"TT",dialCode:"+1868",flag:"🇹🇹"},{name:"Tunisia",code:"TN",dialCode:"+216",flag:"🇹🇳"},{name:"Turkey",code:"TR",dialCode:"+90",flag:"🇹🇷"},{name:"Turkmenistan",code:"TM",dialCode:"+993",flag:"🇹🇲"},{name:"Turks and Caicos Islands",code:"TC",dialCode:"+1649",flag:"🇹🇨"},{name:"Tuvalu",code:"TV",dialCode:"+688",flag:"🇹🇻"},{name:"U.S. Virgin Islands",code:"VI",dialCode:"+1340",flag:"🇻🇮"},{name:"Uganda",code:"UG",dialCode:"+256",flag:"🇺🇬"},{name:"Ukraine",code:"UA",dialCode:"+380",flag:"🇺🇦"},{name:"United Arab Emirates",code:"AE",dialCode:"+971",flag:"🇦🇪"},{name:"United Kingdom",code:"GB",dialCode:"+44",flag:"🇬🇧"},{name:"United States",code:"US",dialCode:"+1",flag:"🇺🇸"},{name:"Uruguay",code:"UY",dialCode:"+598",flag:"🇺🇾"},{name:"Uzbekistan",code:"UZ",dialCode:"+998",flag:"🇺🇿"},{name:"Vanuatu",code:"VU",dialCode:"+678",flag:"🇻🇺"},{name:"Vatican",code:"VA",dialCode:"+379",flag:"🇻🇦"},{name:"Venezuela",code:"VE",dialCode:"+58",flag:"🇻🇪"},{name:"Vietnam",code:"VN",dialCode:"+84",flag:"🇻🇳"},{name:"Wallis and Futuna",code:"WF",dialCode:"+681",flag:"🇼🇫"},{name:"Western Sahara",code:"EH",dialCode:"+212",flag:"🇪🇭"},{name:"Yemen",code:"YE",dialCode:"+967",flag:"🇾🇪"},{name:"Zambia",code:"ZM",dialCode:"+260",flag:"🇿🇲"},{name:"Zimbabwe",code:"ZW",dialCode:"+263",flag:"🇿🇼"}],ys=({value:e,onChange:a,error:s,countryCode:r,setCountryCode:i})=>{const[l,m]=o.useState(!1),[c,d]=o.useState(Gs.find(x=>x.code===r)||Gs[0]),p=o.useRef(null),[u,f]=o.useState(""),h=o.useRef(null);o.useEffect(()=>{function x(w){p.current&&!p.current.contains(w.target)&&m(!1)}return document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x)}},[]);const g=Gs.filter(x=>x.name.toLowerCase().includes(u.toLowerCase())||x.dialCode.includes(u));return o.useEffect(()=>{i(c.dialCode)},[c,i]),t.jsxs("div",{className:"w-phone",children:[t.jsxs("div",{style:{position:"relative"},ref:p,children:[t.jsxs("button",{type:"button",className:"w-phone-cc",style:{height:"100%"},onClick:()=>m(x=>!x),children:[t.jsx("span",{children:c.flag}),t.jsx("span",{children:c.dialCode}),t.jsx(Ut,{weight:"bold"})]}),l&&t.jsxs("div",{className:"w-country-pop",children:[t.jsxs("div",{className:"w-country-search",children:[t.jsx(Ml,{}),t.jsx("input",{type:"text",placeholder:"Search country…",value:u,onChange:x=>f(x.target.value),onClick:x=>x.stopPropagation()})]}),t.jsx("div",{className:"w-country-list",children:g.map(x=>t.jsxs("button",{type:"button",className:"w-country-opt",onClick:w=>{var b;w.stopPropagation(),w.preventDefault(),d(x),m(!1),(b=h.current)==null||b.focus()},children:[t.jsx("span",{children:x.flag}),t.jsx("span",{children:x.name}),t.jsx("span",{className:"dial",children:x.dialCode})]},x.code))})]})]}),t.jsx("input",{type:"tel",id:"phone",name:"phone",required:!0,minLength:7,maxLength:15,ref:h,value:e,onChange:a,placeholder:"Phone number","aria-invalid":!!s,pattern:"^\\d{7,15}$"})]})};function Sr({placement:e="center"}){var m;const{deployment:a}=Ce(),[s,r]=o.useState(!1),i=(m=a==null?void 0:a.ui_settings)==null?void 0:m.logo_image_url;if(!i||s)return null;const l=e==="left"?"flex-start":e==="right"?"flex-end":"center";return t.jsx("div",{style:{display:"flex",justifyContent:l,width:"100%"},children:t.jsx("img",{src:i,alt:"Logo",onError:()=>r(!0),style:{maxWidth:40,maxHeight:40,width:"auto",height:"auto",objectFit:"contain"}})})}function tt({children:e,footer:a}){return t.jsxs("div",{className:"w-card w-auth-card",children:[t.jsx("div",{className:"w-create-body",children:e}),a&&t.jsx("div",{className:"w-create-foot",children:a})]})}function rt({title:e,sub:a,children:s}){return t.jsxs("div",{className:"w-auth-head",children:[t.jsx(Sr,{}),t.jsxs("div",{className:"w-auth-head-text",children:[t.jsx("h1",{className:"w-auth-title",children:e}),a&&t.jsx("p",{className:"w-auth-sub",children:a})]}),s]})}function vt({size:e=16,onAccent:a}){return t.jsx("span",{className:a?"w-spin w-spin--on-accent":"w-spin",style:{width:e,height:e}})}function js(){return t.jsx($e,{children:t.jsx("div",{className:"w-card w-auth-card",children:t.jsx("div",{className:"w-create-body",children:t.jsxs("div",{className:"w-auth-skel","aria-hidden":"true",children:[t.jsxs("div",{className:"w-auth-skel-head",children:[t.jsx("span",{className:"w-skel w-skel-avatar"}),t.jsx("span",{className:"w-skel w-skel-title"}),t.jsx("span",{className:"w-skel w-skel-sub"})]}),t.jsxs("div",{className:"w-auth-skel-fields",children:[t.jsxs("div",{className:"w-auth-skel-field",children:[t.jsx("span",{className:"w-skel w-skel-label"}),t.jsx("span",{className:"w-skel w-skel-input"})]}),t.jsxs("div",{className:"w-auth-skel-field",children:[t.jsx("span",{className:"w-skel w-skel-label"}),t.jsx("span",{className:"w-skel w-skel-input"})]}),t.jsx("span",{className:"w-skel w-skel-btn"})]})]})})})})}function f4(e){const a=e.indexOf(":");return a>=0?e.slice(0,a):e}function w4(e){const a=e.trim();if(!a)return null;try{return new URL(a.includes("://")?a:`https://${a}`).hostname.toLowerCase()||null}catch{return null}}function g4(e){try{return new URL(e)}catch{if(typeof window>"u")return null;try{return new URL(e,window.location.origin)}catch{return null}}}function x4(e,a){return!e||!a?!1:e===a?!0:e.endsWith(`.${a}`)}function v4(e,a){if(!a)return!1;const s=g4(a);if(!s||s.protocol!=="https:"&&s.protocol!=="http:")return!1;if((e==null?void 0:e.mode)==="staging")return!0;if(s.protocol!=="https:"||!(e!=null&&e.frontend_host))return!1;const r=w4(f4(e.frontend_host));return r?x4(s.hostname.toLowerCase(),r):!1}function gt(e,a){return a&&v4(e,a)?a:null}const b4="https://cdn.wacht.services/captcha/wacht-challenge.min.js",Ri="wacht-challenge-script";function y4(e){const a=e.trim().replace(/\/$/,"");return a?/^https?:\/\//i.test(a)?a:`https://${a}`:""}function j4(){return document.getElementById(Ri)?Promise.resolve():new Promise((e,a)=>{const s=document.createElement("script");s.id=Ri,s.src=b4,s.async=!0,s.onload=()=>e(),s.onerror=()=>a(new Error("Failed to load challenge script")),document.head.appendChild(s)})}function Rc({apiHost:e,onSolve:a,onError:s}){const r=o.useRef(null),[i,l]=o.useState(null),m=o.useRef(a),c=o.useRef(s),d=o.useRef(!1);return m.current=a,c.current=s,o.useEffect(()=>{if(d.current)return;d.current=!0;const p=y4(e);if(!p)return;let u=!1;return(async()=>{var f;try{if(await j4(),u||!window.Cap)return;window.CAP_SILENT=!0,window.CAP_DISABLE_WIDGET_REF=!0;const h=new window.Cap({apiEndpoint:`${p}/captcha/`});r.current=h;const g=await h.solve();if(u)return;m.current(g.token)}catch(h){if(u)return;const g=h instanceof Error?h.message:"Challenge failed";l(g),(f=c.current)==null||f.call(c,"challenge_failed")}})(),()=>{var f;u=!0,(f=r.current)==null||f.reset(),r.current=null}},[e]),i?t.jsx("div",{style:{fontSize:12,color:"var(--wa-error)",marginBottom:12},children:i}):null}function _4(){var fe,ne,ae,re,Le,K,at,ze,We,Re,ce,B,q,X,oe,Ee;const{loading:e,signUp:a,signupAttempt:s,discardSignupAttempt:r}=xo(),{signIn:i}=ls("oauth"),{deployment:l}=Ce(),{navigate:m}=kt(),{session:c,refetch:d,loading:p}=ot(),[u,f]=o.useState({first_name:"",last_name:"",email:"",password:"",username:"",phone_number:""}),[h,g]=o.useState({}),[x,w]=o.useState(!1),[b,j]=o.useState(void 0),[v,k]=o.useState(null),[N,_]=o.useState(null),[C,y]=o.useState(!1),[E,A]=o.useState(""),H=!!E,M=((fe=l==null?void 0:l.restrictions)==null?void 0:fe.sign_up_mode)==="restricted",T=((ne=l==null?void 0:l.restrictions)==null?void 0:ne.sign_up_mode)==="waitlist",P=((re=(ae=l==null?void 0:l.auth_settings)==null?void 0:ae.multi_session_support)==null?void 0:re.enabled)??!1;o.useEffect(()=>{var z;if(!p&&(c!=null&&c.active_signin)&&!P&&!C){y(!0);let D=gt(l,new URLSearchParams(window.location.search).get("redirect_uri"));D||(D=((z=l==null?void 0:l.ui_settings)==null?void 0:z.after_signin_redirect_url)||null),!D&&(l!=null&&l.frontend_host)&&(D=`https://${l.frontend_host}`),D&&m(D)}},[c,p,P,l,m,C]),o.useEffect(()=>{var we;if(!l)return;const D=new URLSearchParams(window.location.search).get("invite_token");if(T&&!D){y(!0);const ge=((we=l.ui_settings)==null?void 0:we.waitlist_page_url)||`https://${l.frontend_host}/waitlist`;m(ge);return}D&&!v&&a&&(_(D),a.validateDeploymentInvitation(D).then(ge=>{k(ge),ge.valid&&f(xe=>({...xe,first_name:ge.first_name||xe.first_name,last_name:ge.last_name||xe.last_name,email:ge.email||xe.email}))}).catch(()=>{g(ge=>({...ge,submit:"Failed to validate invitation."}))}))},[l,T,m,v,a]);const[S,$]=o.useState(!1),[Z,R]=o.useState(""),L=z=>{let{name:D,value:we}=z.target;D==="phone_number"?we=we.replace(/[^0-9-]/g,""):D==="email"&&(we=we.toLowerCase()),f(ge=>({...ge,[D]:we})),g(ge=>({...ge,[D]:""}))},O=()=>{f({first_name:"",last_name:"",email:"",password:"",username:"",phone_number:""}),g({}),$(!1),R(""),r()},F=async z=>{if(z.preventDefault(),e||x)return;const D={};H||(D.submit="Challenge verification is still loading. Please try again.");const we=/^[a-zA-Z]{3,30}$/,ge=/^[a-zA-Z][a-zA-Z0-9_.]{2,29}$/,xe=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,lt=/^\d{7,15}$/,Qe=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,125}$/;if(V!=null&&V.first_name.enabled&&(V!=null&&V.first_name.required&&!u.first_name?D.first_name="First name is required":u.first_name&&!we.test(u.first_name)&&(D.first_name="Invalid name")),V!=null&&V.last_name.enabled&&(V!=null&&V.last_name.required&&!u.last_name?D.last_name="Last name is required":u.last_name&&!we.test(u.last_name)&&(D.last_name="Invalid last name")),V!=null&&V.username.enabled&&(V!=null&&V.username.required&&!u.username?D.username="Username is required":u.username&&!ge.test(u.username)&&(D.username="Username must be 3-20 characters")),V!=null&&V.email_address.enabled&&(V!=null&&V.email_address.required&&!u.email?D.email="Email address is required":u.email&&!xe.test(u.email)&&(D.email="Invalid email address")),V!=null&&V.phone_number.enabled&&(V!=null&&V.phone_number.required&&!u.phone_number?D.phone_number="Phone number is required":u.phone_number&&!lt.test(u.phone_number)&&(D.phone_number="Phone number must contain 7-15 digits")),V!=null&&V.password.enabled&&(u.password?Qe.test(u.password)||(D.password="Password must be 8-125 characters and include uppercase, lowercase, number, and special character"):D.password="Password is required"),g(D),!(Object.keys(D).length>0)){w(!0);try{const Q={...u};u.phone_number&&b&&(Q.phone_country_code=b),N&&(Q.invite_token=N),E&&(Q.challenge_token=E),await a.create(Q)}catch(Q){g({submit:Q.message})}finally{w(!1)}}},W=async z=>{if(!(e||x||!H)){w(!0);try{const D=new URLSearchParams(window.location.search),we=gt(l,D.get("redirect_uri"))||void 0,{data:ge}=await i.create({provider:z.provider,redirectUri:we,challenge_token:E});ge&&typeof ge=="object"&&"oauth_url"in ge&&(window.location.href=ge.oauth_url)}catch(D){g({submit:D.message})}finally{w(!1)}}},U=(l==null?void 0:l.social_connections.filter(z=>z.enabled))||[],V=l==null?void 0:l.auth_settings,G=!!((Le=V==null?void 0:V.first_name)!=null&&Le.enabled&&((K=V==null?void 0:V.last_name)!=null&&K.enabled)),Y=async z=>{var we;if(z.preventDefault(),e||x)return;w(!0);const D={};if(!Z){D.otp="OTP code is required",g(D),w(!1);return}g(D);try{const ge=await a.completeVerification(Z);"data"in ge&&((we=ge.data)!=null&&we.active_signin)&&await d()}catch{g(ge=>({...ge,submit:"Verification failed. Please try again."}))}finally{w(!1)}};if(o.useEffect(()=>{var z;if(s){if(s.completed){let D=gt(l,new URLSearchParams(window.location.search).get("redirect_uri"));if(D||(D=((z=l==null?void 0:l.ui_settings)==null?void 0:z.after_signup_redirect_url)||null),!D&&(l!=null&&l.frontend_host)&&(D=`https://${l.frontend_host}`),D){let we;try{we=new URL(D)}catch{we=new URL(D,window.location.origin)}(l==null?void 0:l.mode)==="staging"&&we.searchParams.set("__dev_session__",xt(l.backend_host)||""),m(we.toString())}return}if(!S){switch(s.current_step){case"verify_email":a.prepareVerification({strategy:"email_otp",challenge_token:E});break;case"verify_phone":a.prepareVerification({strategy:"phone_otp",challenge_token:E});break}$(!0)}}},[s,a,S,l,c,m]),p||C)return t.jsx(js,{});const de=((at=l==null?void 0:l.ui_settings)==null?void 0:at.app_name)||"App";if(M)return t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Need assistance?"," ",t.jsx(Et,{className:"w-link",to:(ze=l==null?void 0:l.ui_settings)!=null&&ze.sign_in_page_url?`${l.ui_settings.sign_in_page_url}?help=true`:"#",children:"Get help"})]}),children:[t.jsx(rt,{title:"Sign-up restricted",sub:"This app isn't open for public sign-up right now."}),t.jsx("div",{className:"w-banner w-banner--warn",children:t.jsx("span",{className:"w-banner-txt",children:"New account registration is currently restricted. Please check back later or contact your administrator for an invitation."})})]})});if(S){const z=(s==null?void 0:s.current_step)==="verify_phone";return t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(Et,{className:"w-link",to:((We=l==null?void 0:l.ui_settings)==null?void 0:We.support_page_url)||"#",children:"Get help"})]}),children:[t.jsx(rt,{title:z?"Check your phone":"Enter the code",sub:z?"We sent a verification code via SMS.":"We sent a 6-digit code to your email.",children:t.jsxs("button",{type:"button",className:"w-addr-badge",onClick:O,children:[t.jsx($l,{weight:"bold"}),z?`+${u.phone_number}`:u.email]})}),t.jsxs("form",{onSubmit:Y,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[t.jsx(ya,{onComplete:async D=>{R(D)},onResend:async()=>{const D=z?"phone_otp":"email_otp";await a.prepareVerification({strategy:D,challenge_token:E})},error:h.otp,isSubmitting:x}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:x||e||!Z,children:x&&Z?t.jsx(vt,{size:15,onAccent:!0}):`Continue to ${de}`})]})]})})}return t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Already have an account?"," ",t.jsx(Et,{className:"w-link",to:`${((Re=l==null?void 0:l.ui_settings)==null?void 0:Re.sign_in_page_url)??""}${window.location.search}`,children:"Sign in"})]}),children:[t.jsx(rt,{title:"Create your account",sub:v!=null&&v.valid?"You've been invited — complete your registration below.":"Get started in a few seconds."}),U.length>0&&t.jsxs(t.Fragment,{children:[t.jsx(Nr,{connections:U,callback:W}),t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"OR"})})]}),t.jsxs("form",{onSubmit:F,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[(((ce=V==null?void 0:V.first_name)==null?void 0:ce.enabled)||((B=V==null?void 0:V.last_name)==null?void 0:B.enabled))&&t.jsxs("div",{className:G?"w-grid-2":"",children:[((q=V==null?void 0:V.first_name)==null?void 0:q.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["First name",((X=V==null?void 0:V.first_name)==null?void 0:X.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"text",id:"first_name",name:"first_name",autoComplete:"given-name",required:!0,minLength:3,maxLength:30,value:u.first_name,onChange:L,placeholder:"Jane","aria-invalid":!!h.first_name,pattern:"^[a-zA-Z]{3,30}$"}),h.first_name&&t.jsx("span",{className:"w-input-err",children:h.first_name})]}),((oe=V==null?void 0:V.last_name)==null?void 0:oe.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Last name",((Ee=V==null?void 0:V.last_name)==null?void 0:Ee.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"text",id:"last_name",name:"last_name",autoComplete:"family-name",required:!0,minLength:3,maxLength:30,value:u.last_name,onChange:L,placeholder:"Doe","aria-invalid":!!h.last_name,pattern:"^[a-zA-Z]{3,30}$"}),h.last_name&&t.jsx("span",{className:"w-input-err",children:h.last_name})]})]}),(V==null?void 0:V.username.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Username",V.username.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"text",id:"username",name:"username",autoComplete:"username",minLength:3,maxLength:20,value:u.username,onChange:L,placeholder:"yourname","aria-invalid":!!h.username,required:!0,pattern:"^[a-zA-Z][a-zA-Z0-9_.]{2,29}$"}),h.username&&t.jsx("span",{className:"w-input-err",children:h.username})]}),(V==null?void 0:V.email_address.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Email address",V.email_address.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"email",id:"email",name:"email",autoComplete:"email",maxLength:320,value:u.email,onChange:L,placeholder:"you@company.com","aria-invalid":!!h.email,required:!0,readOnly:(v==null?void 0:v.valid)&&!!(v!=null&&v.email),pattern:"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"}),h.email&&t.jsx("span",{className:"w-input-err",children:h.email})]}),(V==null?void 0:V.phone_number.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Phone number",V.phone_number.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(ys,{value:u.phone_number,onChange:L,error:h.phone_number,countryCode:b,setCountryCode:j}),h.phone_number&&t.jsx("span",{className:"w-input-err",children:h.phone_number})]}),(V==null?void 0:V.password.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Password",V.password.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(qt,{className:"w-input",type:"password",id:"password",name:"password",autoComplete:"new-password",value:u.password,onChange:L,placeholder:"Create a password","aria-invalid":!!h.password,required:!0,minLength:8,maxLength:128,pattern:"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,125}$"}),h.password&&t.jsx("span",{className:"w-input-err",children:h.password})]}),h.submit&&t.jsx("span",{className:"w-input-err",children:h.submit}),t.jsx(Rc,{apiHost:(l==null?void 0:l.backend_host)??"",onSolve:z=>A(z),onError:()=>A("")}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:x||e||!H,children:x?t.jsx(vt,{size:15,onAccent:!0}):"Continue"}),(()=>{var we,ge;const z=(we=l==null?void 0:l.ui_settings)==null?void 0:we.tos_page_url,D=(ge=l==null?void 0:l.ui_settings)==null?void 0:ge.privacy_policy_url;return!z&&!D?null:t.jsxs("p",{className:"w-fineprint",children:["By continuing you agree to our"," ",z&&t.jsx(Et,{className:"w-link w-link--muted",to:z,children:"Terms of Service"}),z&&D&&" and ",D&&t.jsx(Et,{className:"w-link w-link--muted",to:D,children:"Privacy Policy"}),"."]})})()]})]})})}function Lc({icon:e,label:a,description:s,onClick:r,disabled:i,type:l="button"}){return t.jsxs("button",{type:l,className:"w-method",onClick:r,disabled:i,"data-disabled":i?"":void 0,children:[t.jsx("span",{className:"w-method-ic",children:e}),t.jsxs("span",{className:"w-method-body",children:[t.jsx("span",{className:"w-method-title",children:a}),s&&t.jsx("span",{className:"w-method-desc",children:s})]}),t.jsx("span",{className:"w-method-go",children:t.jsx(Qt,{})})]})}const Pc=o.createContext(void 0);function $c(){const e=o.useContext(Pc);if(!e)throw new Error("useSignIn must be used within a SignInProvider");return e}function k4({children:e}){var j;const{deployment:a}=Ce(),[s,r]=o.useState((a==null?void 0:a.auth_settings.first_factor)||"email_password"),i=o.useRef(!!(a!=null&&a.auth_settings.first_factor)),[l,m]=o.useState(""),[c,d]=o.useState(!1),[p,u]=o.useState(!1),[f,h]=o.useState(!1),[g,x]=o.useState("identifier"),w=(a==null?void 0:a.social_connections.filter(v=>v.enabled))||[],b=a==null?void 0:a.auth_settings;return o.useEffect(()=>{var k;const v=(k=a==null?void 0:a.auth_settings)==null?void 0:k.first_factor;!i.current&&v&&(r(v),i.current=!0)},[(j=a==null?void 0:a.auth_settings)==null?void 0:j.first_factor]),t.jsx(Pc.Provider,{value:{email:l,showOtherOptions:c,showForgotPassword:p,otpSent:f,setFirstFactor:r,setEmail:m,setShowOtherOptions:d,setShowForgotPassword:u,setOtpSent:h,enabledSocialsProviders:w,authSettings:b,firstFactor:s,signInStep:g,setSignInStep:x},children:e})}const C4=[{key:"email_magic_link",icon:t.jsx(Tu,{}),label:"Magic link",description:"We'll email you a one-click sign-in link"},{key:"email_password",icon:t.jsx(Fu,{}),label:"Email and password",description:"Sign in with your email and password"},{key:"email_otp",icon:t.jsx(_l,{}),label:"Email one-time code",description:"We'll send a verification code to your email"},{key:"phone_otp",icon:t.jsx(Pu,{}),label:"Phone number",description:"We'll send a verification code via SMS"},{key:"username_password",icon:t.jsx(hs,{}),label:"Username and password",description:"Sign in with your username and password"}];function Oc(){const{deployment:e}=Ce(),{signIn:a}=ls("oauth"),{setFirstFactor:s,firstFactor:r,setShowOtherOptions:i,setSignInStep:l}=$c(),[m,c]=o.useState(!1),d=e==null?void 0:e.auth_settings,p=(e==null?void 0:e.social_connections.filter(x=>x.enabled))||[],u=async x=>{if(!m){c(!0);try{const{data:w}=await a.create({provider:x.provider});w&&typeof w=="object"&&"oauth_url"in w&&(window.location.href=w.oauth_url)}catch{}finally{c(!1)}}},f=C4.filter(x=>{if(x.key===r)return!1;const w=d==null?void 0:d.auth_factors_enabled;return w?w[x.key]:!1}),h=p.length>0,g=f.length>0;return t.jsxs(t.Fragment,{children:[h&&t.jsx(Nr,{connections:p,callback:u}),h&&g&&t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"or"})}),g&&t.jsx("div",{className:"w-method-stack",children:f.map(x=>t.jsx(Lc,{icon:x.icon,label:x.label,description:x.description,onClick:()=>{s(x.key),l("identifier"),i(!1)}},x.key))})]})}function N4({onBack:e}){var H;const{deployment:a}=Ce(),{navigate:s}=kt(),[r,i]=o.useState("start"),[l,m]=o.useState(""),[c,d]=o.useState(""),[p,u]=o.useState(""),[f,h]=o.useState(""),[g,x]=o.useState(""),{forgotPassword:w,verifyOtp:b,resetPassword:j}=Po(),[v,k]=o.useState(!1),[N,_]=o.useState(null),C=async M=>{if(M.preventDefault(),!!l){k(!0),_(null);try{await w(l),i("otp")}catch(T){_(T)}finally{k(!1)}}},y=async M=>{if(M.preventDefault(),c.length===6){k(!0),_(null);try{const T=await b(l,c);T.data&&(u(T.data.token),i("reset"))}catch(T){_(T)}finally{k(!1)}}},E=async M=>{var T,P;if(M.preventDefault(),f===g&&!(f.length<8)){k(!0),_(null);try{const S=await j(p,f);if(S.data){const $=S.data,Z=$.signin_attempts&&$.signin_attempts.length>0?$.signin_attempts[$.signin_attempts.length-1]:null;if(Z&&!Z.completed){const R=(T=a==null?void 0:a.ui_settings)==null?void 0:T.sign_in_page_url;if(R){const L=new URL(R,window.location.origin);L.searchParams.set("signin_attempt_id",Z.id),s(L.toString())}else e()}else{const R=((P=a==null?void 0:a.ui_settings)==null?void 0:P.after_signin_redirect_url)||"/";s(R)}}}catch(S){_(S)}finally{k(!1)}}},A=t.jsx("span",{className:"w-auth-foot",children:t.jsx("span",{className:"w-link",style:{cursor:"pointer"},onClick:e,children:"Back to sign in"})});return t.jsxs($e,{children:[r==="start"&&t.jsxs(tt,{footer:A,children:[t.jsx(rt,{title:"Forgot your password?",sub:"Reset it, or sign in another way."}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:()=>i("email"),disabled:v,children:"Reset your password"}),t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"OR"})}),t.jsx(Oc,{}),t.jsxs("p",{className:"w-secsub",style:{textAlign:"center",marginTop:16},children:["Unable to reset password?"," ",t.jsx("a",{className:"w-link",href:((H=a==null?void 0:a.ui_settings)==null?void 0:H.support_page_url)||"#",children:"Get help"})]})]}),r==="email"&&t.jsxs(tt,{footer:A,children:[t.jsx(rt,{title:"Forgot password",sub:"Enter your email and we'll send you a code to reset your password."}),t.jsxs("form",{onSubmit:C,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Email address"}),t.jsx("input",{className:"w-input",type:"email",id:"email",value:l,onChange:M=>m(M.target.value),placeholder:"you@company.com",required:!0})]}),N&&t.jsx("span",{className:"w-input-err",children:N.message}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:v,children:v?t.jsx(vt,{size:15,onAccent:!0}):"Send code"})]})]}),r==="otp"&&t.jsxs(tt,{footer:A,children:[t.jsx(rt,{title:"Enter verification code",sub:`We sent a 6-digit code to ${l}.`}),t.jsxs("form",{onSubmit:y,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[t.jsx(ya,{onComplete:M=>d(M),isSubmitting:v,error:N==null?void 0:N.message,onResend:async()=>{await w(l)}}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:v||c.length!==6,children:v?t.jsx(vt,{size:15,onAccent:!0}):"Verify"})]})]}),r==="reset"&&t.jsxs(tt,{footer:A,children:[t.jsx(rt,{title:"Reset password",sub:"Create a new password for your account."}),t.jsxs("form",{onSubmit:E,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"New password"}),t.jsx("input",{className:"w-input",type:"password",id:"password",value:f,onChange:M=>h(M.target.value),placeholder:"Enter new password",required:!0})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Confirm new password"}),t.jsx("input",{className:"w-input",type:"password",id:"confirmPassword",value:g,onChange:M=>x(M.target.value),placeholder:"Confirm new password",required:!0})]}),N&&t.jsx("span",{className:"w-input-err",children:N.message}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:v,children:v?t.jsx(vt,{size:15,onAccent:!0}):"Reset password"})]})]})]})}function S4({onBack:e}){var r;const{deployment:a}=Ce(),s=(r=a==null?void 0:a.ui_settings)==null?void 0:r.app_name;return t.jsx($e,{children:t.jsxs(tt,{footer:t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:e,children:"Back to sign in"})}),children:[t.jsx(rt,{title:"All sign-in methods",sub:`Choose another way to sign in to ${s||"your account"}`}),t.jsx(Oc,{})]})})}function Zc({methods:e,onSelectMethod:a,onBack:s}){return t.jsx($e,{children:t.jsxs(tt,{footer:s?t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:s,children:"Back to login"})}):void 0,children:[t.jsx(rt,{title:"Two-factor authentication",sub:"Choose how you'd like to verify your identity"}),t.jsx("div",{className:"w-method-stack",children:e.map(r=>t.jsx(Lc,{icon:r.icon,label:r.name,description:r.phoneNumber?`${r.description} ${r.phoneNumber}`:r.description,onClick:()=>a(r.id),disabled:!r.available},r.id))})]})})}function Hc({onVerify:e,onBack:a,loading:s}){const[r,i]=o.useState(""),[l,m]=o.useState(""),c=p=>{if(p.preventDefault(),r.length!==4){m("Please enter the last 4 digits of your phone number");return}e(r)},d=p=>{const u=p.target.value.replace(/\D/g,"").slice(0,4);i(u),m("")};return t.jsx($e,{children:t.jsxs(tt,{footer:t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:a,children:"Choose a different method"})}),children:[t.jsx(rt,{title:"Verify phone",sub:"Enter the last 4 digits of your phone number."}),t.jsxs("form",{onSubmit:c,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",htmlFor:"lastDigits",children:"Last 4 digits"}),t.jsx("input",{className:`w-input${l?" w-input--invalid":""}`,type:"text",id:"lastDigits",name:"lastDigits",value:r,onChange:d,placeholder:"0000",maxLength:4,autoComplete:"off","aria-invalid":!!l,autoFocus:!0}),l&&t.jsx("span",{className:"w-input-err",children:l})]}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:s||r.length!==4,children:s?t.jsx(vt,{onAccent:!0}):"Send code"})]})]})})}const E4=()=>t.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),A4=()=>t.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}),t.jsx("path",{d:"M12 18h.01"})]}),M4=()=>t.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"m21 2-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0 3 3L22 7l-3-3m-3.5 3.5L19 4"})});function Fc({onBack:e,attempt:a,completeVerification:s,prepareVerification:r}){const{deployment:i}=Ce(),[l,m]=o.useState(""),[c,d]=o.useState({}),[p,u]=o.useState(!1),[f,h]=o.useState(null),[g,x]=o.useState(!0),[w,b]=o.useState(!1),[j,v]=o.useState(""),[k,N]=o.useState(!1),{navigate:_}=kt(),C=(a==null?void 0:a.available_2fa_methods)||[],y=[{id:"authenticator",name:"Authenticator app",description:"Use your authenticator app",icon:t.jsx(E4,{}),available:C.includes("authenticator")},{id:"phone_otp",name:"Text message",description:"Get a code via SMS",icon:t.jsx(A4,{}),available:C.includes("phone_otp"),phoneNumber:j},{id:"backup_code",name:"Backup code",description:"Use one of your backup codes",icon:t.jsx(M4,{}),available:C.includes("backup_code")}].filter(P=>P.available),E=async P=>{h(P),x(!1),P==="phone_otp"&&b(!0)},A=async P=>{var S,$;if(a){u(!0);try{const Z=await r({strategy:"phone_otp",lastDigits:P});Z&&"data"in Z&&((S=Z.data)!=null&&S.otp_sent)?(($=Z.data)!=null&&$.masked_phone&&v(Z.data.masked_phone),b(!1)):d({phone:"Phone number verification failed"})}catch(Z){d({phone:Z.message})}finally{u(!1)}}},H=async(P,S)=>{if(P.preventDefault(),p)return;const $=S||l,Z={};if($?f==="authenticator"&&$.length!==6?Z.code="Authentication code must be 6 digits":f==="phone_otp"&&$.length!==6&&(Z.code="SMS code must be 6 digits"):Z.code="Verification code is required",d(Z),!(Object.keys(Z).length>0)){u(!0);try{await s($)}catch(R){d({submit:R.message})}finally{u(!1)}}},M=P=>{let S=P.target.value;f!=="backup_code"&&(S=S.replace(/\D/g,"").slice(0,6)),m(S),d($=>({...$,code:""}))};if(o.useEffect(()=>{var P;if(a.completed){N(!0);let S=gt(i,new URLSearchParams(window.location.search).get("redirect_uri"));if(S||(S=((P=i==null?void 0:i.ui_settings)==null?void 0:P.after_signin_redirect_url)||null),!S&&(i!=null&&i.frontend_host)&&(S=`https://${i.frontend_host}`),S){let $;try{$=new URL(S)}catch{$=new URL(S,window.location.origin)}(i==null?void 0:i.mode)==="staging"&&$.searchParams.set("__dev_session__",xt(i.backend_host)||""),_($.toString())}return}},[a,i]),k)return t.jsx(js,{});if(g)return y.length===0?t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(Et,{to:(i==null?void 0:i.ui_settings.support_page_url)||"#",className:"w-link",children:"Get help"})]}),children:[t.jsx(rt,{title:"Set up two-factor authentication",sub:"Your account requires two-factor authentication, but you haven't set up any methods yet. Please contact your administrator to set up 2FA."}),e&&t.jsx("div",{style:{textAlign:"center"},children:t.jsx("button",{type:"button",className:"w-link",onClick:e,children:"Back to login"})})]})}):t.jsx(Zc,{methods:y,onSelectMethod:E,onBack:e});if(w&&f==="phone_otp")return t.jsx(Hc,{onVerify:A,onBack:()=>{b(!1),x(!0),h(null)},loading:p});const T=f==="authenticator"?"Enter the 6-digit code from your authenticator app":f==="phone_otp"?`Enter the 6-digit code sent to your phone ${j}`:"Enter one of your backup codes";return t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(Et,{to:(i==null?void 0:i.ui_settings.support_page_url)||"#",className:"w-link",children:"Get help"})]}),children:[t.jsx(rt,{title:"Two-factor authentication",sub:T}),t.jsxs("form",{onSubmit:H,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[f==="backup_code"?t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",htmlFor:"code",children:"Backup code"}),t.jsx("input",{className:`w-input${c.code?" w-input--invalid":""}`,type:"text",id:"code",name:"code",value:l,onChange:M,placeholder:"Enter backup code",maxLength:20,autoComplete:"one-time-code","aria-invalid":!!c.code,autoFocus:!0}),c.code&&t.jsx("span",{className:"w-input-err",children:c.code})]}):t.jsx(ya,{onComplete:async P=>{if(m(P),f!=="backup_code"){const S=new Event("submit",{bubbles:!0,cancelable:!0});await H(S,P)}},onResend:f==="phone_otp"?async()=>{try{await r({strategy:"phone_otp",lastDigits:j.slice(-4)})}catch(P){d({submit:P.message})}}:void 0,error:c.code,isSubmitting:p}),c.submit&&t.jsx("span",{className:"w-input-err",children:c.submit}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:p||!l,children:p?t.jsx(vt,{onAccent:!0}):"Verify"})]}),t.jsxs("div",{style:{marginTop:18,textAlign:"center",display:"flex",flexDirection:"column",gap:8},children:[t.jsx("button",{type:"button",className:"w-link",onClick:()=>{x(!0),h(null),m(""),d({})},children:"Try another method"}),e&&t.jsx("button",{type:"button",className:"w-link w-link--muted",onClick:e,children:"Back to login"})]})]})})}function Tc({attempt:e,onBack:a,completeProfile:s,completeVerification:r,prepareVerification:i}){var O,F,W,U,V,G,Y,de,fe;const{deployment:l}=Ce(),{navigate:m}=kt(),[c,d]=o.useState({}),[p,u]=o.useState({}),[f,h]=o.useState("US"),[g,x]=o.useState(!1),[w,b]=o.useState(!1),[j,v]=o.useState(null),[k,N]=o.useState(!1),_=j,C=w,y=()=>{var ae;N(!0);let ne=gt(l,new URLSearchParams(window.location.search).get("redirect_uri"));if(ne||(ne=((ae=l==null?void 0:l.ui_settings)==null?void 0:ae.after_signin_redirect_url)||null),!ne&&(l!=null&&l.frontend_host)&&(ne=`https://${l.frontend_host}`),ne){let re;try{re=new URL(ne)}catch{re=new URL(ne,window.location.origin)}(l==null?void 0:l.mode)==="staging"&&re.searchParams.set("__dev_session__",xt(l.backend_host)||""),m(re.toString())}},E=async ne=>{b(!0),v(null);try{await s(ne)&&y()}catch(ae){const re=ae;throw v(re),re}finally{b(!1)}},A=async ne=>{b(!0),v(null);try{return await r(ne)&&y(),!0}catch(ae){return v(ae),!1}finally{b(!1)}};if(k||!e)return t.jsx(js,{});const H=e.missing_fields||[],M=l==null?void 0:l.auth_settings,T=(e==null?void 0:e.current_step)==="verify_phone_otp"||(e==null?void 0:e.current_step)==="verify_email_otp"||g,P=ne=>{const{name:ae,value:re}=ne.target;d(Le=>({...Le,[ae]:re})),p[ae]&&u(Le=>({...Le,[ae]:""}))},S=()=>{const ne={};return H.forEach(ae=>{var K,at,ze,We,Re;const re=c[ae];let Le=!1;switch(ae){case"first_name":Le=((K=M==null?void 0:M.first_name)==null?void 0:K.enabled)||!1;break;case"last_name":Le=((at=M==null?void 0:M.last_name)==null?void 0:at.enabled)||!1;break;case"username":Le=((ze=M==null?void 0:M.username)==null?void 0:ze.enabled)||!1;break;case"phone_number":Le=((We=M==null?void 0:M.phone_number)==null?void 0:We.enabled)||!1;break;case"email_address":Le=((Re=M==null?void 0:M.email_address)==null?void 0:Re.enabled)||!1;break;default:Le=!0}if(Le&&(!re||re.trim()==="")){const ce=ae.replace("_"," ").replace(/\b\w/g,B=>B.toUpperCase());ne[ae]=`${ce} is required`}}),c.username&&H.includes("username")&&(/^[a-zA-Z0-9_-]{3,30}$/.test(c.username)||(ne.username="Username must be 3-30 characters and contain only letters, numbers, underscores, and hyphens")),c.phone_number&&H.includes("phone_number")&&(/^\d{7,15}$/.test(c.phone_number)||(ne.phone_number="Phone number must contain 7-15 digits")),c.email&&H.includes("email_address")&&(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(c.email)||(ne.email_address="Please enter a valid email address")),u(ne),Object.keys(ne).length===0},$=async ne=>{if(ne.preventDefault(),!S())return;const ae={...c};c.phone_number&&f&&(ae.phone_country_code=f),await E(ae)},Z=ne=>{const ae=ne.target.value;d(re=>({...re,phone_number:ae})),p.phone_number&&u(re=>({...re,phone_number:""}))},R=t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(Et,{to:(l==null?void 0:l.ui_settings.support_page_url)||"#",className:"w-link",children:"Get help"})]});if(T){const ne=e.current_step==="verify_phone_otp"?"Verify your phone number":"Verify your email",ae=e.current_step==="verify_phone_otp"?"Enter the 6-digit code sent to your phone":"Enter the 6-digit code sent to your email",re=e.current_step==="verify_phone_otp"?"phone_otp":"email_otp";return t.jsx($e,{children:t.jsxs(tt,{footer:R,children:[t.jsx(rt,{title:ne,sub:ae}),t.jsxs("form",{onSubmit:Le=>Le.preventDefault(),noValidate:!0,style:{display:"flex",flexDirection:"column",gap:14},children:[t.jsx(ya,{onComplete:A,onResend:async()=>{await i({strategy:re})},error:_==null?void 0:_.message,isSubmitting:C}),_&&t.jsx("span",{className:"w-input-err",children:_.message})]}),t.jsx("div",{style:{marginTop:16,textAlign:"center"},children:t.jsx("button",{type:"button",className:"w-link",onClick:()=>x(!1),children:"Back to profile completion"})})]})})}const L=!!((O=M==null?void 0:M.first_name)!=null&&O.enabled&&((F=M==null?void 0:M.last_name)!=null&&F.enabled)&&H.includes("first_name")&&H.includes("last_name"));return t.jsx($e,{children:t.jsxs(tt,{footer:a?t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:a,children:"Back to login"})}):R,children:[t.jsx(rt,{title:"Complete your profile",sub:"Please provide the following information to continue"}),t.jsxs("form",{onSubmit:$,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[(H.includes("first_name")||H.includes("last_name"))&&(((W=M==null?void 0:M.first_name)==null?void 0:W.enabled)||((U=M==null?void 0:M.last_name)==null?void 0:U.enabled))&&t.jsxs("div",{className:L?"w-grid-2":"",children:[H.includes("first_name")&&((V=M==null?void 0:M.first_name)==null?void 0:V.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"first_name",children:["First name",M.first_name.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.first_name?" w-input--invalid":""}`,type:"text",id:"first_name",name:"first_name",value:c.first_name||"",onChange:P,placeholder:"Enter your first name",disabled:C,autoComplete:"given-name"}),p.first_name&&t.jsx("span",{className:"w-input-err",children:p.first_name})]}),H.includes("last_name")&&((G=M==null?void 0:M.last_name)==null?void 0:G.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"last_name",children:["Last name",M.last_name.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.last_name?" w-input--invalid":""}`,type:"text",id:"last_name",name:"last_name",value:c.last_name||"",onChange:P,placeholder:"Enter your last name",disabled:C,autoComplete:"family-name"}),p.last_name&&t.jsx("span",{className:"w-input-err",children:p.last_name})]})]}),H.includes("username")&&((Y=M==null?void 0:M.username)==null?void 0:Y.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"username",children:["Username",M.username.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.username?" w-input--invalid":""}`,type:"text",id:"username",name:"username",value:c.username||"",onChange:P,placeholder:"Choose a username",disabled:C,autoComplete:"username"}),p.username&&t.jsx("span",{className:"w-input-err",children:p.username})]}),H.includes("phone_number")&&((de=M==null?void 0:M.phone_number)==null?void 0:de.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"phone_number",children:["Phone number",M.phone_number.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(ys,{value:c.phone_number||"",onChange:Z,error:p.phone_number,countryCode:f,setCountryCode:h}),p.phone_number&&t.jsx("span",{className:"w-input-err",children:p.phone_number})]}),H.includes("email_address")&&((fe=M==null?void 0:M.email_address)==null?void 0:fe.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"email",children:["Email address",M.email_address.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.email_address?" w-input--invalid":""}`,type:"email",id:"email",name:"email",value:c.email||"",onChange:P,placeholder:"Enter your email address",disabled:C,autoComplete:"email"}),p.email_address&&t.jsx("span",{className:"w-input-err",children:p.email_address})]}),_&&t.jsx("span",{className:"w-input-err",children:_.message}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:C,children:C?t.jsx(vt,{onAccent:!0}):"Continue"})]})]})})}function Ic({onComplete:e,onSkip:a}){var u;const[s,r]=o.useState(!1),[i,l]=o.useState(null),{registerPasskey:m}=ba(),{deployment:c}=Ce(),d=async()=>{r(!0),l(null);try{await m(),e==null||e()}catch(f){l(f instanceof Error?f.message:"Failed to register passkey")}finally{r(!1)}},p=((u=c==null?void 0:c.ui_settings)==null?void 0:u.app_name)||"this app";return t.jsxs("div",{className:"w-flex w-flex-col w-items-center w-text-center",children:[t.jsx("div",{className:"w-feature-badge",children:t.jsx(ar,{size:26})}),t.jsx("h1",{className:"w-title-lg",children:"Add a passkey"}),t.jsxs("p",{className:"w-sub",style:{marginTop:6,maxWidth:320},children:["Sign in faster and more securely with a passkey. Use your fingerprint, face, or screen lock to access ",p,"."]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,width:"100%",marginTop:24},children:[t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:d,disabled:s,children:s?t.jsxs(t.Fragment,{children:[t.jsx(vt,{size:15,onAccent:!0}),"Registering…"]}):t.jsxs(t.Fragment,{children:[t.jsx(ar,{}),"Add passkey"]})}),t.jsx("button",{type:"button",className:"w-social",onClick:a,children:"Maybe later"})]}),i&&t.jsx("p",{className:"w-input-err",style:{marginTop:14},children:i})]})}function R4(){return t.jsx(k4,{children:t.jsx(L4,{})})}function L4(){var yt,na,ra,ia,oa,ie,ve,Ae,J,be,Je,De,jt,_t,Ke,wt,Bt,la,ca,da,Ur,Wr,Br;const{deployment:e}=Ce(),{navigate:a}=kt(),{session:s,loading:r,refetch:i,exchangeTicket:l,switchSignIn:m}=ot(),c=((na=(yt=e==null?void 0:e.auth_settings)==null?void 0:yt.multi_session_support)==null?void 0:na.enabled)??!1,{setEmail:d,otpSent:p,setOtpSent:u,showForgotPassword:f,setShowForgotPassword:h,showOtherOptions:g,setShowOtherOptions:x,enabledSocialsProviders:w,firstFactor:b,setFirstFactor:j,signInStep:v,setSignInStep:k}=$c(),{loading:N,signIn:_,signinAttempt:C,discardSignInAttempt:y,setSignInAttempt:E}=ls("generic"),{signIn:A}=ls("oauth"),{signIn:H}=ls("passkey"),[M,T]=o.useState({email:"",username:"",password:"",phone:""}),[P,S]=o.useState({}),[$,Z]=o.useState(!1),[R,L]=o.useState(""),[O,F]=o.useState("US"),[W,U]=o.useState(!1),[V,G]=o.useState(null),[Y,de]=o.useState(!1),[fe,ne]=o.useState(!1),[ae,re]=o.useState(!1),[Le,K]=o.useState(60),[at,ze]=o.useState(!1),[We,Re]=o.useState(null),[ce,B]=o.useState(""),q=!!ce,X=[...(s==null?void 0:s.signins)||[]].sort((ee,te)=>{var ue,Ze;return ee.id===((ue=s==null?void 0:s.active_signin)==null?void 0:ue.id)?-1:te.id===((Ze=s==null?void 0:s.active_signin)==null?void 0:Ze.id)?1:0});o.useEffect(()=>{const ee=new URLSearchParams(window.location.search),te=ee.get("error"),ue=ee.get("error_description");if(te==="access_denied"&&ue){G(ue),ee.delete("error"),ee.delete("error_description");const Ze=ee.toString()?`${window.location.pathname}?${ee.toString()}`:window.location.pathname;window.history.replaceState({},"",Ze)}},[]),o.useEffect(()=>{if(b!=="email_magic_link"||!p)return;K(60),ze(!1);const ee=setInterval(()=>{K(te=>te<=1?(ze(!0),clearInterval(ee),0):te-1)},1e3);return()=>clearInterval(ee)},[b,p]),o.useEffect(()=>{var ee,te,ue,Ze;if(!r&&(s!=null&&s.active_signin)&&!c&&!W&&!Y){let Ne=gt(e,new URLSearchParams(window.location.search).get("redirect_uri"));Ne||(Ne=((ee=e==null?void 0:e.ui_settings)==null?void 0:ee.after_signin_redirect_url)||null),!Ne&&(e!=null&&e.frontend_host)&&(Ne=`https://${e.frontend_host}`);const dt=(te=e==null?void 0:e.auth_settings)==null?void 0:te.passkey;(dt==null?void 0:dt.enabled)&&(dt==null?void 0:dt.prompt_registration_on_auth)&&!((Ze=(ue=s.active_signin)==null?void 0:ue.user)!=null&&Ze.has_passkeys)?(Re(Ne),de(!0)):Ne&&(U(!0),a(Ne))}},[s,r,c,e,a,W]);const oe=ee=>{let{name:te,value:ue}=ee.target;te==="phone"?ue=ue.replace(/[^0-9]/g,""):te==="email"&&(d(ue),ue=ue.toLowerCase()),T(Ze=>({...Ze,[te]:ue})),S(Ze=>({...Ze,[te]:""}))},Ee=()=>{T({email:"",username:"",password:"",phone:""}),S({}),F("US"),k("identifier")},z=async ee=>{if(!ee){S({email:"Email address is required"});return}if(!q){S({submit:"Challenge verification is still loading. Please try again."});return}Z(!0),S({});try{const te=await _.identify(ee,ce);if(te.strategy==="sso"&&te.connection_id){const ue=new URLSearchParams(window.location.search),Ze=gt(e,ue.get("redirect_uri"))||void 0,Ne=await _.initEnterpriseSso(te.connection_id,Ze,ce);if(Ne&&Ne.sso_url){U(!0),window.location.href=Ne.sso_url;return}}else if(te.strategy==="social"&&te.provider){const ue=w.find(Ze=>Ze.provider===te.provider);if(ue){const Ze=new URLSearchParams(window.location.search),Ne=gt(e,Ze.get("redirect_uri"))||void 0,{data:dt}=await A.create({provider:ue.provider,redirectUri:Ne,challenge_token:ce});if(dt&&typeof dt=="object"&&"oauth_url"in dt){U(!0),window.location.href=dt.oauth_url;return}}else k("password")}else k("password")}catch(te){S({submit:te.message})}finally{W||Z(!1)}},D=async ee=>{if(ee.preventDefault(),N||$)return;y();const te={};if(v==="identifier"&&b==="email_password"){if(!M.email){S({email:"Email address is required"});return}await z(M.email);return}if(v==="identifier"&&b==="username_password"){if(!M.username){S({username:"Username is required"});return}S({}),k("password");return}if(b==="email_password"?(M.email||(te.email="Email address is required"),M.password||(te.password="Password is required")):b==="username_password"?(M.username||(te.username="Username is required"),M.password||(te.password="Password is required")):b==="email_otp"||b==="email_magic_link"?M.email||(te.email="Email address is required"):b==="phone_otp"&&(M.phone?/^\d{7,15}$/.test(M.phone)||(te.phone="Phone number must contain 7-15 digits"):te.phone="Phone number is required"),S(te),Object.keys(te).length>0)return;let ue="";switch(b){case"email_password":ue="plain_email";break;case"username_password":ue="plain_username";break;case"email_otp":ue="email_otp";break;case"email_magic_link":ue="magic_link";break;case"phone_otp":ue="phone_otp";break}const Ze=b==="email_otp"||b==="email_magic_link"||b==="phone_otp";if(!q){S({submit:"Challenge verification is still loading. Please try again."});return}Z(!0);try{const Ne={...M,strategy:ue};b==="phone_otp"&&O&&(Ne.phone_country_code=O),ce&&(Ne.challenge_token=ce),await _.create(Ne),Ze||Z(!1)}catch(Ne){S({submit:Ne.message}),Z(!1)}},we=async ee=>{if(ee.preventDefault(),N||$)return;const te={};if(!R){te.otp="OTP code is required",S(te);return}Z(!0),S({});try{await _.completeVerification(R),u(!1),L("")}catch(ue){S({otp:ue.message||"Verification failed"})}finally{Z(!1)}},ge=async ee=>{if(!(N||$||!q)){Z(!0);try{const te=new URLSearchParams(window.location.search),ue=gt(e,te.get("redirect_uri"))||void 0,{data:Ze}=await A.create({provider:ee.provider,redirectUri:ue,challenge_token:ce});Ze&&typeof Ze=="object"&&"oauth_url"in Ze&&(window.location.href=Ze.oauth_url)}catch(te){S({submit:te.message})}finally{Z(!1)}}},xe=async()=>{var ee;if(!(N||$||!q)){Z(!0),S({});try{const te=await H.create({challenge_token:ce});if("data"in te&&te.data){await i();let ue=gt(e,new URLSearchParams(window.location.search).get("redirect_uri"));ue||(ue=((ee=e==null?void 0:e.ui_settings)==null?void 0:ee.after_signin_redirect_url)||null),!ue&&(e!=null&&e.frontend_host)&&(ue=`https://${e.frontend_host}`),U(!0),ue&&a(ue)}}catch(te){S({submit:te.message||"Passkey sign-in failed"})}finally{Z(!1)}}},lt=()=>{var ue;let ee=gt(e,new URLSearchParams(window.location.search).get("redirect_uri"));if(ee||(ee=((ue=e==null?void 0:e.ui_settings)==null?void 0:ue.after_signin_redirect_url)||null),!ee&&(e!=null&&e.frontend_host)&&(ee=`https://${e.frontend_host}`),!ee)return null;let te;try{te=new URL(ee)}catch{te=new URL(ee,window.location.origin)}return(e==null?void 0:e.mode)==="staging"&&te.searchParams.set("__dev_session__",xt(e.backend_host)||""),te.toString()},Qe=async ee=>{if(!(N||$)){S({}),Z(!0);try{await m(ee);const te=lt();te&&(U(!0),a(te))}catch(te){S({submit:te.message||"Failed to continue with selected account"})}finally{Z(!1)}}},Q=(ee,te)=>`${ee||""} ${te||""}`.trim().split(" ").filter(Boolean).map(ue=>ue[0]).join("").toUpperCase().slice(0,2)||"?",le=o.useRef(!1);if(o.useEffect(()=>{if(r)return;const ee=new URLSearchParams(window.location.search),te=ee.get("ticket");if(te&&!le.current&&!N){le.current=!0,ee.delete("ticket");const Ze=ee.toString()?`${window.location.pathname}?${ee.toString()}`:window.location.pathname;window.history.replaceState({},"",Ze),(async()=>{var dt;try{Z(!0),await l(te),U(!0);let It=gt(e,new URLSearchParams(window.location.search).get("redirect_uri"));if(It||(It=((dt=e==null?void 0:e.ui_settings)==null?void 0:dt.after_signin_redirect_url)||null),!It&&(e!=null&&e.frontend_host)&&(It=`https://${e.frontend_host}`),It){let Ns;try{Ns=new URL(It)}catch{Ns=new URL(It,window.location.origin)}(e==null?void 0:e.mode)==="staging"&&Ns.searchParams.set("__dev_session__",xt(e.backend_host)||""),a(Ns.toString())}return}catch(It){S({submit:It.message||"Failed to exchange ticket"}),le.current=!1}finally{Z(!1)}})();return}const ue=ee.get("signin_attempt_id");if(ue&&(s!=null&&s.signin_attempts)&&!C){const Ze=s.signin_attempts.find(Ne=>Ne.id===ue);if(Ze){E(Ze),ee.delete("signin_attempt_id");const Ne=ee.toString()?`${window.location.pathname}?${ee.toString()}`:window.location.pathname;window.history.replaceState({},"",Ne)}}},[s,r,C,E,N]),o.useEffect(()=>{var Ze;if(!C)return;if(C.completed){U(!0);let Ne=new URLSearchParams(window.location.search).get("redirect_uri");if(Ne||(Ne=((Ze=e==null?void 0:e.ui_settings)==null?void 0:Ze.after_signin_redirect_url)||null),!Ne&&(e!=null&&e.frontend_host)&&(Ne=`https://${e.frontend_host}`),Ne){let dt;try{dt=new URL(Ne)}catch{dt=new URL(Ne,window.location.origin)}(e==null?void 0:e.mode)==="staging"&&dt.searchParams.set("__dev_session__",xt(e.backend_host)||""),a(dt.toString())}return}if(!_||p)return;const te={verify_email:"email_otp",verify_email_otp:"email_otp",verify_email_link:"magic_link",verify_phone:"phone_otp",verify_phone_otp:"phone_otp"}[C.current_step];if(!te)return;(async()=>{try{await _.prepareVerification({strategy:te,challenge_token:ce}),Z(!1),u(!0)}catch{S({submit:"Failed to send verification. Please try again."}),Z(!1)}})()},[C,_,p,u,a,e]),g)return t.jsx(S4,{onBack:()=>x(!1)});if(f)return t.jsx(N4,{onBack:()=>h(!1)});if((C==null?void 0:C.current_step)==="verify_second_factor")return t.jsx(Fc,{attempt:C,completeVerification:_.completeVerification,prepareVerification:_.prepareVerification,onBack:()=>{y(),Ee(),u(!1)}});if((C==null?void 0:C.current_step)==="complete_profile")return t.jsx(Tc,{attempt:C,completeProfile:_.completeProfile,completeVerification:_.completeVerification,prepareVerification:_.prepareVerification,onBack:()=>{y(),Ee(),u(!1)}});if(Y){const ee=()=>{de(!1),We&&(U(!0),a(We))},te=()=>{de(!1),We&&(U(!0),a(We))};return t.jsx($e,{children:t.jsx(tt,{children:t.jsx(Ic,{onComplete:ee,onSkip:te})})})}if(r||W)return t.jsx(js,{});const me=((ra=e==null?void 0:e.ui_settings)==null?void 0:ra.app_name)||"App",Pe=(C==null?void 0:C.current_step)&&["verify_email","verify_email_otp","verify_email_link","verify_phone","verify_phone_otp"].includes(C.current_step)&&p,qe=b==="email_magic_link",pt=c&&!Pe&&X.length>0&&!ae,aa=()=>{u(!1),y(),Ee()};let Tt;if(Pe){const ee=b==="phone_otp"?"Check your phone":qe?"Check your inbox":"Enter the code",te=qe?"We sent a magic link to your email — click it to sign in instantly.":b==="phone_otp"?"We sent a verification code via SMS.":"We sent a 6-digit code to your email.",ue=(b==="email_otp"||qe)&&M.email?M.email:b==="phone_otp"&&M.phone?`+${M.phone}`:null;Tt=t.jsx(rt,{title:ee,sub:te,children:ue&&t.jsxs("button",{type:"button",className:"w-addr-badge",onClick:aa,children:[t.jsx($l,{weight:"bold"}),ue]})})}else Tt=t.jsx(rt,{title:"Sign in to your account",sub:`Please enter your details to continue to ${me}.`});let sa;Pe?sa=t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(Et,{className:"w-link",to:((ia=e==null?void 0:e.ui_settings)==null?void 0:ia.support_page_url)||"#",children:"Get help"})]}):sa=t.jsxs("span",{className:"w-auth-foot",children:["Don't have an account?"," ",t.jsx(Et,{className:"w-link",to:`${((oa=e==null?void 0:e.ui_settings)==null?void 0:oa.sign_up_page_url)??""}${window.location.search}`,children:"Sign up"})]});let Wt;if(Pe&&qe)Wt=t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:16,padding:"12px 0 4px"},children:at?t.jsx("button",{type:"button",className:"w-link w-linkbtn",onClick:async()=>{ze(!1),K(60);try{await _.prepareVerification({strategy:"magic_link",challenge_token:ce})}catch{}},children:"Resend magic link"}):t.jsxs("span",{className:"w-secsub",children:["Resend in ",Le,"s"]})});else if(Pe)Wt=t.jsxs("form",{onSubmit:we,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[t.jsx(ya,{onComplete:async ee=>{if(L(ee),ee&&ee.length===6){Z(!0),S({});try{await _.completeVerification(ee),u(!1)}catch(te){S({otp:te.message||"Verification failed"})}finally{Z(!1)}}},onResend:async()=>{const ee=b==="email_otp"?"email_otp":"phone_otp";await _.prepareVerification({strategy:ee,challenge_token:ce})},error:P.otp,isSubmitting:$}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:$||N||!R,children:$&&R?t.jsx(vt,{size:15,onAccent:!0}):`Continue to ${me}`})]});else{const ee=(b==="email_password"||b==="email_otp"||b==="email_magic_link")&&((ve=(ie=e==null?void 0:e.auth_settings)==null?void 0:ie.email_address)==null?void 0:ve.enabled),te=b==="username_password"&&((J=(Ae=e==null?void 0:e.auth_settings)==null?void 0:Ae.username)==null?void 0:J.enabled),ue=b==="phone_otp"&&((Je=(be=e==null?void 0:e.auth_settings)==null?void 0:be.phone_number)==null?void 0:Je.enabled),Ze=v==="password"&&(b==="email_password"||b==="username_password")&&((jt=(De=e==null?void 0:e.auth_settings)==null?void 0:De.password)==null?void 0:jt.enabled);Wt=t.jsxs(t.Fragment,{children:[w.length>0&&t.jsx(Nr,{connections:w,callback:ge}),((Ke=(_t=e==null?void 0:e.auth_settings)==null?void 0:_t.passkey)==null?void 0:Ke.enabled)&&t.jsxs("button",{type:"button",className:"w-social",style:{marginTop:w.length>0?10:0},onClick:xe,disabled:$,children:[t.jsx(ar,{}),t.jsx("span",{children:"Sign in with a passkey"})]}),(w.length>0||((Bt=(wt=e==null?void 0:e.auth_settings)==null?void 0:wt.passkey)==null?void 0:Bt.enabled))&&t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"OR"})}),t.jsxs("form",{onSubmit:D,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[ee&&t.jsxs("label",{className:"w-field",children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx("span",{className:"w-label",children:"Email address"}),v==="identifier"&&t.jsx("span",{className:"w-link w-link--muted w-link--sm",onClick:()=>x(!0),children:"Other methods"})]}),v==="password"&&b==="email_password"&&M.email?t.jsxs("div",{className:"w-locked",children:[t.jsx("span",{className:"w-locked-ic",children:t.jsx(hi,{})}),t.jsx("span",{className:"w-locked-val",children:M.email}),t.jsx("button",{type:"button",className:"w-link w-link--muted",style:{fontSize:12,cursor:"pointer",background:"none",border:0},onClick:()=>k("identifier"),children:"Edit"})]}):t.jsx(qt,{className:"w-input",type:"email",id:"email",name:"email",autoComplete:"email",value:M.email,onChange:oe,placeholder:"you@company.com","aria-invalid":!!P.email}),P.email&&t.jsx("span",{className:"w-input-err",children:P.email})]}),te&&t.jsxs("label",{className:"w-field",children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx("span",{className:"w-label",children:"Username"}),v==="identifier"&&t.jsx("span",{className:"w-link w-link--muted w-link--sm",onClick:()=>x(!0),children:"Other methods"})]}),v==="password"&&M.username?t.jsxs("div",{className:"w-locked",children:[t.jsx("span",{className:"w-locked-ic",children:t.jsx(hi,{})}),t.jsx("span",{className:"w-locked-val",children:M.username}),t.jsx("button",{type:"button",className:"w-link w-link--muted",style:{fontSize:12,cursor:"pointer",background:"none",border:0},onClick:()=>{k("identifier"),T(Ne=>({...Ne,password:""}))},children:"Edit"})]}):t.jsx(qt,{className:"w-input",type:"text",id:"username",name:"username",value:M.username,onChange:oe,placeholder:"yourname","aria-invalid":!!P.username,autoComplete:"username"}),P.username&&t.jsx("span",{className:"w-input-err",children:P.username})]}),ue&&t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Phone number"}),t.jsx(ys,{value:M.phone,onChange:oe,error:P.phone,countryCode:O,setCountryCode:F}),P.phone&&t.jsx("span",{className:"w-input-err",children:P.phone})]}),Ze&&t.jsxs("label",{className:"w-field",children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t.jsx("span",{className:"w-label",children:"Password"}),t.jsx("span",{className:"w-link w-link--muted",style:{fontSize:12,cursor:"pointer"},onClick:()=>h(!0),children:"Forgot?"})]}),t.jsx(qt,{className:"w-input",type:"password",id:"password",name:"password",autoComplete:"current-password",value:M.password,onChange:oe,placeholder:"••••••••","aria-invalid":!!P.password}),P.password&&t.jsx("span",{className:"w-input-err",children:P.password})]}),P.submit&&t.jsx("span",{className:"w-input-err",children:P.submit}),t.jsx(Rc,{apiHost:(e==null?void 0:e.backend_host)??"",onSolve:Ne=>B(Ne),onError:()=>B("")}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:$||N||!q,children:$?t.jsx(vt,{size:15,onAccent:!0}):t.jsxs(t.Fragment,{children:[v==="identifier"?"Continue":"Sign in",t.jsx(Qt,{weight:"bold"})]})}),v==="password"&&((ca=(la=e==null?void 0:e.auth_settings)==null?void 0:la.auth_factors_enabled)==null?void 0:ca.email_otp)&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-or",style:{margin:"5px 0"},children:t.jsx("span",{children:"OR"})}),t.jsxs("button",{type:"button",className:"w-method",disabled:$,onClick:async()=>{Z(!0),S({});try{await _.create({email:M.email,strategy:"email_otp",challenge_token:ce}),j("email_otp")}catch(Ne){S({submit:Ne.message}),Z(!1)}},children:[t.jsx("span",{className:"w-method-ic",children:t.jsx(_l,{})}),t.jsxs("span",{className:"w-method-body",children:[t.jsx("span",{className:"w-method-title",children:"Sign in with a code"}),t.jsx("span",{className:"w-method-desc",children:"We'll send a 6-digit code to your email"})]}),t.jsx("span",{className:"w-method-go",children:t.jsx(Qt,{})})]})]})]})]})}return t.jsx($e,{children:t.jsxs(tt,{footer:sa,children:[Tt,V&&t.jsxs("div",{className:"w-banner w-banner--error",style:{marginBottom:18},children:[t.jsx(Fa,{weight:"fill"}),t.jsxs("span",{className:"w-banner-txt",children:[t.jsx("strong",{children:"Access denied."})," ",V," ",t.jsx("span",{className:"w-link",onClick:()=>G(null),children:"Try again"})]})]}),pt&&(fe?t.jsxs("div",{className:"w-acct-list",children:[t.jsx("div",{className:"w-secsub w-acct-list-head",children:"Choose an account"}),t.jsxs("div",{className:"w-acct-list-body",children:[X.map(ee=>{var te,ue,Ze,Ne;return t.jsxs("button",{type:"button",className:"w-acct",onClick:()=>Qe(ee.id),disabled:$||N,children:[t.jsx("span",{className:"w-avatar",children:ee.user.has_profile_picture?t.jsx("img",{src:ee.user.profile_picture_url,alt:((te=ee.user.primary_email_address)==null?void 0:te.email)||"account"}):Q(ee.user.first_name,ee.user.last_name)}),t.jsxs("span",{className:"w-acct-text",children:[t.jsx("span",{className:"w-acct-name",children:ee.user.first_name&&ee.user.last_name?`${ee.user.first_name} ${ee.user.last_name}`:ee.user.first_name||((Ze=(ue=ee.user.primary_email_address)==null?void 0:ue.email)==null?void 0:Ze.split("@")[0])||"Account"}),t.jsx("span",{className:"w-secsub",children:(Ne=ee.user.primary_email_address)==null?void 0:Ne.email})]}),t.jsx(Qt,{className:"w-acct-go"})]},ee.id)}),t.jsxs("button",{type:"button",className:"w-acct",onClick:()=>{ne(!1),re(!0),Ee()},children:[t.jsx("span",{className:"w-avatar",style:{background:"var(--wa-surface-subtle)",color:"var(--wa-text-muted)"},children:t.jsx(Wu,{size:16})}),t.jsx("span",{className:"w-acct-text w-acct-name",children:"Use a different account"}),t.jsx(Qt,{className:"w-acct-go"})]})]})]}):t.jsxs("button",{type:"button",className:"w-acct","data-active":!0,style:{marginBottom:18},onClick:()=>Qe(X[0].id),disabled:$||N,children:[t.jsx("span",{className:"w-avatar",children:X[0].user.has_profile_picture?t.jsx("img",{src:X[0].user.profile_picture_url,alt:((da=X[0].user.primary_email_address)==null?void 0:da.email)||"account"}):Q(X[0].user.first_name,X[0].user.last_name)}),t.jsxs("span",{className:"w-acct-text",children:[t.jsxs("span",{className:"w-acct-name",children:["Welcome back,"," ",X[0].user.first_name||((Wr=(Ur=X[0].user.primary_email_address)==null?void 0:Ur.email)==null?void 0:Wr.split("@")[0])||"back"]}),t.jsx("span",{className:"w-secsub",children:(Br=X[0].user.primary_email_address)==null?void 0:Br.email})]}),t.jsx("span",{className:"w-link w-link--muted w-link--sm",style:{flex:"none"},onClick:ee=>{ee.stopPropagation(),X.length>1?ne(!0):(re(!0),Ee())},children:"Not you?"})]})),Wt]})})}function P4(){var b,j,v,k,N,_,C,y,E,A,H,M;const{deployment:e}=Ce(),{loading:a,joinWaitlist:s}=Mo(),[r,i]=o.useState({first_name:"",last_name:"",email:""}),[l,m]=o.useState(!1),[c,d]=o.useState(!1),[p,u]=o.useState(null),f=()=>{if(p)return p.message},h=e==null?void 0:e.auth_settings,g=!!((b=h==null?void 0:h.first_name)!=null&&b.enabled&&((j=h==null?void 0:h.last_name)!=null&&j.enabled)),x=T=>{const{name:P,value:S}=T.target;i($=>({...$,[P]:S}))},w=async T=>{if(T.preventDefault(),!!h){d(!0),u(null);try{(await s(r)).data&&m(!0)}catch(P){u(P)}finally{d(!1)}}};return l?t.jsx($e,{children:t.jsx(tt,{children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:16,textAlign:"center"},children:[t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ye,{weight:"bold"})})]}),t.jsx("h1",{className:"w-auth-title",children:"You're on the waitlist"}),t.jsxs("p",{className:"w-auth-sub",children:["Thanks for your interest! We'll notify you at"," ",r.email," when we're ready for you to join."]})]})})}):t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Need assistance?"," ",t.jsx("a",{href:"/contact",className:"w-link",children:"Get help"})]}),children:[t.jsx(rt,{title:"Join the waitlist",sub:"Be the first to know when we launch!"}),t.jsxs("form",{onSubmit:w,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[(((v=h==null?void 0:h.first_name)==null?void 0:v.enabled)||((k=h==null?void 0:h.last_name)==null?void 0:k.enabled))&&t.jsxs("div",{className:g?"w-grid-2":"",children:[((N=h==null?void 0:h.first_name)==null?void 0:N.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"first_name",children:["First name",((_=h==null?void 0:h.first_name)==null?void 0:_.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:"w-input",type:"text",id:"first_name",name:"first_name",required:(C=h==null?void 0:h.first_name)==null?void 0:C.required,minLength:2,maxLength:50,value:r.first_name,onChange:x,placeholder:"First name"})]}),((y=h==null?void 0:h.last_name)==null?void 0:y.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"last_name",children:["Last name",((E=h==null?void 0:h.last_name)==null?void 0:E.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:"w-input",type:"text",id:"last_name",name:"last_name",required:(A=h==null?void 0:h.last_name)==null?void 0:A.required,minLength:2,maxLength:50,value:r.last_name,onChange:x,placeholder:"Last name"})]})]}),t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"email",children:["Email address",((H=h==null?void 0:h.email_address)==null?void 0:H.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:"w-input",type:"email",id:"email",name:"email",required:(M=h==null?void 0:h.email_address)==null?void 0:M.required,value:r.email,onChange:x,placeholder:"Enter your email address"})]}),f()&&t.jsx("span",{className:"w-input-err",children:f()}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:c||a,children:c||a?t.jsx(vt,{onAccent:!0}):"Join waitlist"})]})]})})}function On({title:e,sub:a,icon:s,message:r,action:i,footer:l}){return t.jsx($e,{children:t.jsxs(tt,{footer:l,children:[t.jsx(rt,{title:e,sub:a}),t.jsxs("div",{className:"w-auth-status",children:[s,t.jsx("p",{className:"w-auth-sub",children:r}),i]})]})})}function $4(){const{deployment:e}=Ce(),{navigate:a}=kt(),{error:s,session:r,processed:i,signinAttempt:l,redirectUri:m,loading:c}=Ro(),[d,p]=o.useState(!1),[u,f]=o.useState(null),h=()=>{window.location.reload()},g=()=>{var j;const b=((j=e==null?void 0:e.ui_settings)==null?void 0:j.sign_in_page_url)||"/sign-in";a(b)},x=()=>{p(!1),u&&a(u)},w=()=>{p(!1),u&&a(u)};if(o.useEffect(()=>{var b,j,v,k,N;if(!(!i||c||d)){if(l&&!l.completed){const _=(b=e==null?void 0:e.ui_settings)==null?void 0:b.sign_in_page_url;if(_){const C=new URL(_,window.location.origin);C.searchParams.set("signin_attempt_id",l.id),m&&C.searchParams.set("redirect_uri",m),a(C.toString())}return}if(l!=null&&l.completed){const C=gt(e,m)||((j=e==null?void 0:e.ui_settings)==null?void 0:j.after_signin_redirect_url)||(e==null?void 0:e.frontend_host)||"/";let y;try{y=new URL(C)}catch{y=new URL(C,window.location.origin)}if(y){(e==null?void 0:e.mode)==="staging"&&y.searchParams.set("__dev_session__",xt(e.backend_host)||"");const E=(v=e==null?void 0:e.auth_settings)==null?void 0:v.passkey;(E==null?void 0:E.enabled)&&(E==null?void 0:E.prompt_registration_on_auth)&&!((N=(k=r==null?void 0:r.active_signin)==null?void 0:k.user)!=null&&N.has_passkeys)?(f(y.toString()),p(!0)):a(y.toString())}}}},[r,i,c,m,e,l,a]),o.useEffect(()=>{s&&s.message.includes("No OAuth callback data found")&&setTimeout(()=>{var j;const b=((j=e==null?void 0:e.ui_settings)==null?void 0:j.sign_in_page_url)||(e==null?void 0:e.frontend_host);b&&a(b)},2e3)},[s,e,a]),d)return t.jsx($e,{children:t.jsx(tt,{children:t.jsx(Ic,{onComplete:x,onSkip:w})})});if(r&&i&&!s)return t.jsx(On,{title:"Success",sub:"Authentication completed successfully",icon:t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ye,{weight:"bold"})})]}),message:"You'll be redirected to your destination shortly."});if(s){const b=s.message.includes("No OAuth callback data found");return t.jsx(On,{title:"Something went wrong",sub:"We couldn't complete your sign in",icon:t.jsxs("div",{className:"w-success w-success--error",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(La,{weight:"bold"})})]}),message:s.message||"An unexpected error occurred during authentication.",action:b?void 0:t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:h,children:"Try again"}),footer:b?void 0:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx("button",{type:"button",className:"w-link",onClick:g,children:"Return to sign in"})]})})}return t.jsx(On,{title:"Completing sign in",sub:"Please wait while we authenticate you",icon:t.jsx(vt,{size:32}),message:"Verifying your credentials… this will only take a moment."})}function O4({onSuccess:e,onError:a}={}){const[s,r]=o.useState("loading"),[i,l]=o.useState(""),{token:m,attempt:c,redirectUri:d}=Q1(),{verifyMagicLink:p}=Lo(),{navigate:u}=kt(),{deployment:f}=Ce(),h=o.useRef(!1);o.useEffect(()=>{(async()=>{if(!h.current){if(!m||!c){r("error"),l("The magic link appears to be malformed. Please try signing in again."),a==null||a("Invalid magic link parameters");return}h.current=!0,r("loading"),l("Please wait while we verify your magic link.");try{await p({token:m,attempt:c,redirectUri:d}),r("success"),l("You will be redirected to your account shortly."),e==null||e(),setTimeout(()=>{var b;let w=gt(f,d);if(w||(w=(b=f==null?void 0:f.ui_settings)==null?void 0:b.after_signin_redirect_url),!w&&(f!=null&&f.frontend_host)&&(w=`https://${f.frontend_host}`),w){const j=new URL(w);(f==null?void 0:f.mode)==="staging"&&j.searchParams.set("__dev_session__",xt(f.backend_host)||""),u(j.toString())}},2e3)}catch(w){r("error"),l("The magic link may have expired or already been used. Please try signing in again."),a==null||a(w.message)}}})()},[m,c]);const g=()=>{var x;(x=f==null?void 0:f.ui_settings)!=null&&x.sign_in_page_url&&u(f.ui_settings.sign_in_page_url)};return t.jsx($e,{children:t.jsxs(tt,{children:[t.jsx(rt,{title:"Magic link",sub:"Verifying your magic link"}),t.jsxs("div",{className:"w-auth-status",children:[s==="loading"&&t.jsx(vt,{size:32}),s==="success"&&t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ye,{weight:"bold"})})]}),s==="error"&&t.jsxs("div",{className:"w-success w-success--error",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(La,{weight:"bold"})})]}),t.jsx("p",{className:"w-auth-sub",children:i}),s==="error"&&t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:g,children:"Try again"})]})]})})}function Z4(e){var r,i;return e?((r=e.signin_attempts)==null?void 0:r.find(l=>l.requires_completion&&!l.completed))?!0:!!((i=e.signup_attempts)==null?void 0:i.find(l=>{var m,c;return((m=l.missing_fields)==null?void 0:m.length)>0||((c=l.remaining_steps)==null?void 0:c.length)>0&&!l.completed})):!1}function H4(e){const a=e?`/profile-completion?redirect_uri=${encodeURIComponent(e)}`:"/profile-completion";window.location.href=a}function ns({kind:e}){const a=e==="success"?"w-success":e==="error"?"w-success w-success--error":"w-success w-success--info",s=e==="success"?Ye:e==="error"?La:Hu;return t.jsxs("div",{className:a,children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(s,{weight:"bold"})})]})}function _a({title:e,sub:a,icon:s,message:r,action:i,footer:l}){return t.jsx($e,{children:t.jsxs(tt,{footer:l,children:[t.jsx(rt,{title:e,sub:a}),t.jsxs("div",{className:"w-auth-status",children:[s,t.jsx("p",{className:"w-auth-sub",children:r}),i]})]})})}function F4({token:e,onSuccess:a,onError:s}){var b;const{acceptInvitation:r,invitationData:i,loading:l,error:m}=Vo(),{navigate:c}=kt(),{deployment:d}=Ce(),p=o.useRef(!1),u=()=>{var v;const j=new URLSearchParams(window.location.search);return{token:e||j.get("invite_token")||j.get("token"),redirectUri:gt(d,j.get("redirect_uri"))||((v=d==null?void 0:d.ui_settings)==null?void 0:v.after_signin_redirect_url)||"/"}};o.useEffect(()=>{if(p.current)return;const{token:j}=u();j&&(p.current=!0,r(j))},[r]),o.useEffect(()=>{var j;i&&(i.organization&&!i.requires_signin&&a&&a(i.organization.id,(j=i.workspace)==null?void 0:j.id),i.error_code&&s&&s(i.message||"Failed to accept invitation"))},[i,a,s]);const f=()=>{const{redirectUri:j}=u();c(j)},h=()=>{var E,A;const{token:j}=u(),v=((E=d==null?void 0:d.ui_settings)==null?void 0:E.sign_in_page_url)||"/sign-in",k=((A=d==null?void 0:d.ui_settings)==null?void 0:A.sign_up_page_url)||"/sign-up",N=new URLSearchParams;j&&N.set("invite_token",j),i!=null&&i.invited_email&&N.set("invited_email",i.invited_email);const C=`${window.location.pathname}?token=${j}`;N.set("redirect_uri",C),i!=null&&i.message&&N.set("message",i.message);const y=(i==null?void 0:i.error_code)==="INVITATION_REQUIRES_SIGNUP";c(`${y?k:v}?${N.toString()}`)},g=()=>{const{token:j}=u();j&&(p.current=!1,r(j))},x=(j,v)=>t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:v,children:j}),{token:w}=u();if(!w&&!l)return t.jsx(_a,{title:"Invalid invitation",sub:"No invitation token found",icon:t.jsx(ns,{kind:"error"}),message:"The invitation link appears to be invalid or incomplete.",action:x("Go to home",()=>c("/"))});if(l)return t.jsx(_a,{title:"Processing invitation",sub:"Please wait while we verify your invitation",icon:t.jsx(vt,{size:32}),message:"Verifying invitation… this will only take a moment."});if(i!=null&&i.organization&&!i.requires_signin)return t.jsx(_a,{title:"Invitation accepted",sub:"You've successfully joined the organization",icon:t.jsx(ns,{kind:"success"}),message:t.jsxs(t.Fragment,{children:["Welcome to"," ",t.jsx("strong",{children:i.organization.name}),i.workspace?`. You've been added to the ${i.workspace.name} workspace.`:"."]}),action:x("Continue to application",f)});if(i!=null&&i.already_member)return t.jsx(_a,{title:"Already a member",sub:"You're already part of this organization",icon:t.jsx(ns,{kind:"info"}),message:`You're already a member of ${((b=i.organization)==null?void 0:b.name)||"this organization"}. No action needed.`,action:x("Continue to application",f)});if(i!=null&&i.requires_signin){const j=i.error_code==="INVITATION_REQUIRES_SIGNUP";return t.jsx(_a,{title:j?"Sign up required":"Sign in required",sub:"To accept this invitation",icon:t.jsx(ns,{kind:"info"}),message:t.jsxs(t.Fragment,{children:["This invitation is for"," ",t.jsx("strong",{className:"w-text-primary",children:i.invited_email}),"."," ",j?"Create an account with this email address to accept it.":i.error_code==="INVITATION_EMAIL_MISMATCH"?"You're signed in with a different account. Please sign in with the invited email.":"Please sign in to accept this invitation."]}),action:x(j?"Sign up to accept":"Sign in to accept",h)})}return(i==null?void 0:i.error_code)==="INVITATION_EXPIRED"?t.jsx(_a,{title:"Invitation expired",sub:"This invitation is no longer valid",icon:t.jsxs("div",{className:"w-success w-success--error",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Lu,{weight:"bold"})})]}),message:t.jsxs(t.Fragment,{children:["Invitation for"," ",t.jsx("strong",{className:"w-text-primary",children:i.invited_email})," ","has expired. Invitations are valid for 10 days — please request a new one from your organization administrator."]})}):m||i!=null&&i.error_code?t.jsx(_a,{title:"Invitation error",sub:"Unable to process invitation",icon:t.jsx(ns,{kind:"error"}),message:(i==null?void 0:i.message)||m||"Failed to accept invitation",action:x("Try again",g),footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx("button",{type:"button",className:"w-link",onClick:h,children:"Sign in manually"})]})}):null}const Vc=o.createContext(void 0),zc=()=>{const e=o.useContext(Vc);if(!e)throw new Error("Dialog components must be used within a Dialog");return e},T4=({isOpen:e,onClose:a,children:s})=>{const[r,i]=o.useState(!1),l=ts();return o.useEffect(()=>{i(!0);const m=c=>{c.key==="Escape"&&e&&(a==null||a())};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[e,a]),!e||!r?null:en.createPortal(t.jsx("div",{className:"wacht-root",style:l,children:t.jsx(Vc.Provider,{value:{isOpen:e,onClose:a},children:s})}),document.body)},I4=({children:e})=>{const{onClose:a}=zc(),s=o.useRef(null),r=i=>{s.current&&!s.current.contains(i.target)&&(a==null||a())};return t.jsx("div",{className:"w-modal",onClick:r,children:t.jsx("div",{ref:s,style:{maxWidth:"100%",minWidth:0},children:e})})},V4=({children:e,style:a,className:s})=>t.jsx("div",{className:`w-dialog${s?` ${s}`:""}`,style:{maxHeight:"90vh",overflowY:"auto",...a},children:e}),z4=({children:e,showCloseButton:a=!0})=>{const{onClose:s}=zc();return t.jsxs("div",{className:"w-dialog-head",children:[typeof e=="string"?t.jsx("h2",{className:"w-dialog-title",children:e}):e,a&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:s,children:t.jsx(La,{size:18})})]})},D4=({children:e,style:a,className:s})=>t.jsx("div",{className:`w-dialog-body${s?` ${s}`:""}`,style:a,children:e}),U4=({children:e})=>t.jsx("div",{className:"w-dialog-foot",children:e}),Ue=Object.assign(T4,{Overlay:I4,Content:V4,Header:z4,Body:D4,Footer:U4}),W4=({isOpen:e,onClose:a,title:s,children:r,showCloseButton:i=!0})=>t.jsx(Ue,{isOpen:e,onClose:a,children:t.jsx(Ue.Overlay,{children:t.jsxs(Ue.Content,{children:[s&&t.jsx(Ue.Header,{showCloseButton:i,children:s}),t.jsx(Ue.Body,{children:r})]})})}),B4=({trigger:e,renderDialog:a})=>{const[s,r]=o.useState(!1),i=()=>r(!0),l=()=>r(!1);return t.jsxs(t.Fragment,{children:[e({onClick:i}),a({isOpen:s,onClose:l})]})},Dc=o.createContext(void 0),Uc=()=>{const e=o.useContext(Dc);if(!e)throw new Error("useDropdownContext must be used within a DropdownProvider");return e},_s=({children:e,open:a,openChange:s,style:r})=>{const i=o.useRef(null),[l,m]=o.useState(!1);return o.useEffect(()=>{const c=d=>{i.current&&!i.current.contains(d.target)&&m(!1)};return l&&document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[l,s]),o.useEffect(()=>{s==null||s(l)},[l]),o.useEffect(()=>{m(!!a)},[a]),t.jsx(Dc.Provider,{value:{open:l,openChange:c=>m(c)},children:t.jsx("div",{style:{width:"fit-content",...r},ref:i,children:e})})},ks=({children:e,style:a,className:s})=>{const{open:r}=Uc(),[i,l]=o.useState({top:0,left:0}),[m,c]=o.useState(!1),d=o.useRef(null);return o.useEffect(()=>{r&&d.current?(c(!1),requestAnimationFrame(()=>{var f,h;const p=(f=d.current)==null?void 0:f.parentElement;if(!p)return;const u=p.querySelector("[data-dropdown-trigger]")||p.firstElementChild;if(u&&u!==d.current){const g=u.getBoundingClientRect(),x=(h=d.current)==null?void 0:h.getBoundingClientRect(),w=window.innerWidth,b=window.innerHeight;let j=g.bottom+4,v=g.right-((x==null?void 0:x.width)||200);v<8&&(v=g.left),v+((x==null?void 0:x.width)||200)>w-8&&(v=w-((x==null?void 0:x.width)||200)-8),x&&j+x.height>b-8&&(j=g.top-(x.height+4)),l({top:j,left:v}),c(!0)}})):c(!1)},[r]),r?t.jsx("div",{className:s?`w-menu ${s}`:"w-menu",ref:d,style:{position:"fixed",zIndex:1e3,width:"max-content",minWidth:140,maxWidth:240,...a,top:`${i.top}px`,left:`${i.left}px`,visibility:m?"visible":"hidden",opacity:m?1:0,transition:m?"opacity 0.15s ease-in-out":"none"},children:e}):null},Cs=({children:e})=>{const{openChange:a,open:s}=Uc(),r=o.useCallback(()=>{a(!s)},[s,a]);return t.jsx("div",{style:{position:"relative",display:"inline-flex"},onClick:r,"data-dropdown-trigger":!0,children:e})},ea=o.forwardRef(({$destructive:e,className:a,...s},r)=>t.jsx("button",{ref:r,className:`w-menu-item${e?" w-menu-item--danger":""}${a?` ${a}`:""}`,...s}));ea.displayName="DropdownItem";const Wc=()=>t.jsx("div",{style:{height:"0.5px",background:"var(--wa-border)",width:"100%",margin:"4px 0"}}),Bc=o.forwardRef(({className:e,style:a,...s},r)=>t.jsx("form",{ref:r,className:e,style:{display:"flex",flexDirection:"column",gap:16,...a},...s}));Bc.displayName="Form";const Ge=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:`w-field${e?` ${e}`:""}`,...a}));Ge.displayName="FormGroup";const Ve=o.forwardRef(({className:e,...a},s)=>t.jsx("label",{ref:s,className:`w-label${e?` ${e}`:""}`,...a}));Ve.displayName="Label";const ye=o.forwardRef(({as:e="input",className:a,...s},r)=>{const i=`w-input${a?` ${a}`:""}`;return e==="textarea"?t.jsx("textarea",{className:i,...s}):t.jsx("input",{ref:r,className:i,...s})});ye.displayName="Input";const _e=({size:e,className:a})=>t.jsx("div",{className:a,style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:e?`${e}px`:"100%"},children:t.jsx("span",{className:"w-spin",style:{width:e??40,height:e??40}})}),Za=({checked:e,onChange:a})=>t.jsxs("label",{className:"w-switch","data-on":e?"":void 0,children:[t.jsx("input",{type:"checkbox",checked:e,onChange:s=>a(s.target.checked),style:{position:"absolute",opacity:0,width:0,height:0}}),t.jsx("span",{className:"w-switch-track",children:t.jsx("span",{className:"w-switch-knob"})})]}),Kt=(e=!1)=>{const[a,s]=o.useState(e),r=o.useCallback(()=>{s(!0)},[]),i=o.useCallback(()=>{s(!1)},[]),l=o.useCallback(()=>{s(m=>!m)},[]);return{isOpen:a,open:r,close:i,toggle:l}},Gc=({onChange:e,placeholder:a,value:s})=>t.jsxs("div",{className:"w-search",children:[t.jsx(Ml,{}),t.jsx("input",{type:"text",placeholder:a,value:s,onChange:r=>e(r.target.value)})]}),se=o.forwardRef(({$primary:e,$outline:a,$destructive:s,$fullWidth:r,$size:i,className:l,style:m,...c},d)=>{const f=`w-btn ${s?"w-btn--danger-solid":a?"w-btn--secondary":"w-btn--primary"}${i==="sm"?" w-btn--sm":i==="lg"?" w-btn--lg":""}${l?` ${l}`:""}`;return t.jsx("button",{ref:d,className:f,style:r?{width:"100%",...m}:m,...c})});se.displayName="Button";const qc=e=>({position:"absolute",top:"calc(100% + 6px)",left:0,width:"100%",maxHeight:260,overflowY:"auto",zIndex:1e3,opacity:e?1:0,transform:e?"scale(1)":"scale(0.97)",transformOrigin:"top",pointerEvents:e?"auto":"none",transition:"opacity 0.15s ease, transform 0.15s ease"}),Kc={width:"100%",height:32,padding:"0 9px",border:"none",borderBottom:"0.5px solid var(--wa-border)",borderRadius:0,fontFamily:"var(--wa-font-sans)",fontSize:13,outline:"none",background:"transparent",color:"var(--wa-text)",marginBottom:4},Qs=({children:e})=>t.jsx("div",{style:{padding:"10px 9px",color:"var(--wa-text-faint)",fontFamily:"var(--wa-font-sans)",fontSize:12.5,textAlign:"center"},children:e}),un=({options:e,value:a,onChange:s,placeholder:r="Select an option",disabled:i=!1,searchable:l=!1,width:m,name:c,id:d,groupsEnabled:p=!1,className:u})=>{const[f,h]=o.useState(!1),[g,x]=o.useState(""),w=o.useRef(null),b=o.useRef(null),j=p&&"options"in e[0],k=(j?e.flatMap(y=>y.options):e).find(y=>y.value===a),N=g?j?e.map(y=>({...y,options:y.options.filter(E=>E.label.toLowerCase().includes(g.toLowerCase()))})).filter(y=>y.options.length>0):e.filter(y=>y.label.toLowerCase().includes(g.toLowerCase())):e,_=(y,E=!1)=>{E||(s(y),h(!1),x(""))},C=()=>{i||h(!f)};return o.useEffect(()=>{f&&l&&b.current&&setTimeout(()=>{var y;(y=b.current)==null||y.focus()},10)},[f,l]),o.useEffect(()=>{const y=E=>{w.current&&!w.current.contains(E.target)&&(h(!1),x(""))};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),t.jsxs("div",{ref:w,style:{position:"relative",width:m||"100%"},className:u,children:[t.jsxs("button",{type:"button",className:"w-combo","data-open":f?"":void 0,onClick:C,disabled:i,"aria-haspopup":"listbox","aria-expanded":f,id:d,children:[t.jsx("span",{className:"w-combo-val","data-ph":k?void 0:"",children:k?k.label:r}),f?t.jsx(al,{size:16}):t.jsx(Ut,{size:16})]}),t.jsxs("div",{className:"w-combo-menu",style:qc(f),role:"listbox",children:[l&&t.jsx("input",{ref:b,type:"text",style:Kc,placeholder:"Search...",value:g,onChange:y=>x(y.target.value),onClick:y=>y.stopPropagation()}),j?N.map((y,E)=>t.jsxs(o.Fragment,{children:[t.jsx("div",{className:"w-combo-grp",children:y.label}),y.options.length===0?t.jsx(Qs,{children:"No options available"}):y.options.map(A=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":A.disabled?"":void 0,onClick:()=>_(A.value,A.disabled),role:"option","aria-selected":A.value===a,children:[A.label,A.value===a&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ye,{size:16})})]},A.value))]},`group-${E}`)):t.jsx(t.Fragment,{children:N.length===0?t.jsx(Qs,{children:"No options available"}):N.map(y=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":y.disabled?"":void 0,onClick:()=>_(y.value,y.disabled),role:"option","aria-selected":y.value===a,children:[y.label,y.value===a&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ye,{size:16})})]},y.value))})]}),c&&t.jsx("input",{type:"hidden",name:c,value:a||""})]})},Yc=({options:e,value:a,onChange:s,placeholder:r="Select options",disabled:i=!1,searchable:l=!1,width:m,name:c,id:d,groupsEnabled:p=!1,className:u})=>{const[f,h]=o.useState(!1),[g,x]=o.useState(""),w=o.useRef(null),b=o.useRef(null),j=p&&"options"in e[0],k=(j?e.flatMap(y=>y.options):e).filter(y=>a.includes(y.value)),N=g?j?e.map(y=>({...y,options:y.options.filter(E=>E.label.toLowerCase().includes(g.toLowerCase()))})).filter(y=>y.options.length>0):e.filter(y=>y.label.toLowerCase().includes(g.toLowerCase())):e,_=(y,E=!1)=>{E||(a.includes(y)?s(a.filter(A=>A!==y)):s([...a,y]))},C=()=>{i||h(!f)};return o.useEffect(()=>{f&&l&&b.current&&setTimeout(()=>{var y;(y=b.current)==null||y.focus()},10)},[f,l]),o.useEffect(()=>{const y=E=>{w.current&&!w.current.contains(E.target)&&(h(!1),x(""))};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),t.jsxs("div",{ref:w,style:{position:"relative",width:m||"100%"},className:u,children:[t.jsxs("button",{type:"button",className:"w-combo","data-open":f?"":void 0,onClick:C,disabled:i,"aria-haspopup":"listbox","aria-expanded":f,id:d,children:[t.jsx("span",{className:"w-combo-val","data-ph":k.length>0?void 0:"",children:k.length>0?k.map(y=>y.label).join(", "):r}),f?t.jsx(al,{size:16}):t.jsx(Ut,{size:16})]}),t.jsxs("div",{className:"w-combo-menu",style:qc(f),role:"listbox",children:[l&&t.jsx("input",{ref:b,type:"text",style:Kc,placeholder:"Search...",value:g,onChange:y=>x(y.target.value),onClick:y=>y.stopPropagation()}),j?N.map((y,E)=>t.jsxs(o.Fragment,{children:[t.jsx("div",{className:"w-combo-grp",children:y.label}),y.options.length===0?t.jsx(Qs,{children:"No options available"}):y.options.map(A=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":A.disabled?"":void 0,onClick:()=>_(A.value,A.disabled),role:"option","aria-selected":a.includes(A.value),children:[A.label,a.includes(A.value)&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ye,{size:16})})]},A.value))]},`group-${E}`)):t.jsx(t.Fragment,{children:N.length===0?t.jsx(Qs,{children:"No options available"}):N.map(y=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":y.disabled?"":void 0,onClick:()=>_(y.value,y.disabled),role:"option","aria-selected":a.includes(y.value),children:[y.label,a.includes(y.value)&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ye,{size:16})})]},y.value))})]}),c&&t.jsx("input",{type:"hidden",name:c,value:a.join(",")})]})},Os=e=>e.split(" ").map(a=>a[0]).join("").toUpperCase().slice(0,2)||"?",Li=e=>e.trim().replace(/[<>"'&]/g,""),G4=e=>e.length>=2&&e.length<=100&&/^[a-zA-Z0-9\s_.-]+$/.test(e),q4=e=>/.+@.+\..+/.test(e),Pi=(e,a)=>e.length?e.find(s=>s.name===a)||e[0]:null,K4=({roles:e,value:a,onChange:s,fullWidth:r})=>{const[i,l]=o.useState(!1),m=o.useRef(null);return o.useEffect(()=>{if(!i)return;const c=d=>{m.current&&!m.current.contains(d.target)&&l(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[i]),t.jsxs("div",{ref:m,className:`w-relative${r?" w-full":" w-none"}`,children:[t.jsxs("button",{type:"button",className:`w-combo${r?" w-full":" w-rolepick-btn"}`,"data-open":i?"":void 0,onClick:()=>l(c=>!c),disabled:!e.length,children:[t.jsx("span",{className:"w-combo-val",children:(a==null?void 0:a.name)||"Role"}),t.jsx(Ut,{size:14})]}),i&&t.jsx("div",{className:"w-combo-menu w-combo-menu--pop",children:e.map(c=>t.jsxs("button",{type:"button",className:"w-combo-opt",onClick:()=>{s(c),l(!1)},children:[c.name,c.id===(a==null?void 0:a.id)&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ye,{size:13})})]},c.id))})]})},Qc=({mode:e,organizationId:a,onSuccess:s,onCancel:r,onCreateOrganization:i})=>{var ce;const l=e==="org",m=l?"organization":"workspace",c=l?"Organization":"Workspace",{createOrganization:d,getOrganizationRoles:p,inviteOrganizationMember:u}=zt(),{createWorkspace:f,getWorkspaceRoles:h,createWorkspaceInvitation:g}=va(),{organizationMemberships:x}=xa(),{refetch:w}=ot(),[b,j]=o.useState(0),[v,k]=o.useState(""),[N,_]=o.useState(""),[C,y]=o.useState(),[E,A]=o.useState(null),[H,M]=o.useState(!1),[T,P]=o.useState(null),[S,$]=o.useState(a),[Z,R]=o.useState(!1),L=o.useRef(null),O=o.useRef(null),[F,W]=o.useState(null),[U,V]=o.useState([]),[G,Y]=o.useState([]),[de,fe]=o.useState(""),[ne,ae]=o.useState(null),re=(ce=x==null?void 0:x.find(B=>B.organization.id===S))==null?void 0:ce.organization;o.useEffect(()=>()=>{E&&URL.revokeObjectURL(E)},[E]),o.useEffect(()=>{if(!Z)return;const B=q=>{L.current&&!L.current.contains(q.target)&&R(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[Z]);const Le=B=>{var X;const q=(X=B.target.files)==null?void 0:X[0];if(q){if(q.size>2*1024*1024){P("Image must be under 2 MB.");return}if(!q.type.startsWith("image/")){P("Please choose a valid image file.");return}E&&URL.revokeObjectURL(E),P(null),y(q),A(URL.createObjectURL(q))}},K=async()=>{var X;const B=Li(v),q=Li(N);if(!G4(B)){P(`Enter a valid ${m} name (2–100 characters).`);return}if(!l&&!S){P("Select an organization first.");return}M(!0),P(null);try{if(l){const oe=await d({name:B,description:q,image:C}),Ee=((X=oe==null?void 0:oe.data)==null?void 0:X.organization)??(oe==null?void 0:oe.organization)??oe;W(Ee);const z=await p(Ee).catch(()=>[]);V(z),ae(Pi(z,"Member"))}else{const oe=await f(S,B,C,q),Ee=(oe==null?void 0:oe.workspace)??oe,z={...Ee,organization:{id:S}};W(z);const D=await h(Ee).catch(()=>[]);V(D),ae(Pi(D,"Editor"))}await w(),j(1)}catch(oe){P((oe==null?void 0:oe.message)||`Failed to create ${m}.`)}finally{M(!1)}},at=()=>{const B=de.trim();!q4(B)||G.some(q=>q.email===B)||ne&&(Y(q=>[...q,{email:B,roleId:ne.id,roleName:ne.name}]),fe(""))},ze=B=>{(B.key==="Enter"||B.key===",")&&(B.preventDefault(),at())},We=async()=>{if(!G.length){j(2);return}M(!0),P(null);try{for(const B of G)l?await u(F,{email:B.email,organizationRole:{id:B.roleId}}):await g(F,B.email,B.roleId);j(2)}catch(B){P((B==null?void 0:B.message)||"Some invitations could not be sent.")}finally{M(!1)}},Re=()=>{j(0),k(""),_(""),y(void 0),E&&URL.revokeObjectURL(E),A(null),W(null),V([]),Y([]),fe(""),P(null)};return t.jsxs("div",{className:"w-card w-create-card",children:[t.jsxs("div",{className:"w-create-body",children:[t.jsxs("div",{className:"w-flex-col w-items-center w-gap-3 w-create-head",children:[b===0?t.jsxs("span",{className:"w-ibadge-wrap",children:[t.jsxs("button",{type:"button",className:"w-ibadge w-avatar-edit","data-busy":H?"":void 0,onClick:()=>{var B;return(B=O.current)==null?void 0:B.click()},title:`Upload ${m} logo`,"aria-label":`Upload ${m} logo`,children:[E?t.jsx("img",{src:E,alt:`${c} logo`}):l?t.jsx(ps,{}):t.jsx(pi,{}),t.jsx("span",{className:"w-avatar-veil",children:t.jsx(sn,{})})]}),t.jsx("input",{ref:O,type:"file",className:"w-none",hidden:!0,accept:"image/png, image/jpeg, image/gif, image/svg+xml",onChange:Le,disabled:H}),E&&t.jsx("button",{type:"button",className:"w-ibadge-x",title:"Remove logo","aria-label":"Remove logo",onClick:()=>{E&&URL.revokeObjectURL(E),A(null),y(void 0)},children:t.jsx(La,{})})]}):t.jsx("span",{className:`w-ibadge${b===2?" w-ibadge--done":""}`,children:b===2?t.jsx(Ye,{}):l?t.jsx(ps,{}):t.jsx(pi,{})}),t.jsxs("div",{className:"w-flex-col w-gap-1 w-text-center",children:[t.jsx("h1",{className:"w-title-lg",children:b===0?`Create ${l?"an":"a"} ${m}`:b===1?"Invite your team":`${c} created`}),t.jsx("p",{className:"w-sub",children:b===0?`Set up a new ${m}${l?" to collaborate with your team.":" inside your organization."}`:b===1?"Add people now, or skip and do it later.":`${v} is ready to go.`})]})]}),b<2&&t.jsxs("div",{className:"w-steps w-create-steps",children:[t.jsx("i",{"data-on":""}),t.jsx("i",{"data-on":b>=1?"":void 0})]}),T&&t.jsx("div",{className:"w-banner w-banner--error w-mb-4",children:T}),b===0&&t.jsxs("div",{className:"w-flex-col w-gap-4",children:[!l&&t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Organization"}),t.jsxs("div",{className:"w-relative",ref:L,children:[t.jsxs("button",{type:"button",className:"w-combo w-full","data-open":Z?"":void 0,onClick:()=>R(B=>!B),disabled:H,children:[t.jsxs("span",{className:"w-combo-val w-inline w-gap-2",children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:re!=null&&re.image_url?t.jsx("img",{src:re.image_url,alt:re.name}):Os((re==null?void 0:re.name)||"O").charAt(0)}),t.jsx("span",{children:(re==null?void 0:re.name)||"Select organization"})]}),t.jsx(Ut,{size:14})]}),Z&&t.jsxs("div",{className:"w-combo-menu w-combo-menu--pop",children:[x==null?void 0:x.map(B=>{var X;const q=!!((X=B.eligibility_restriction)!=null&&X.type)&&B.eligibility_restriction.type!=="none";return t.jsxs("button",{type:"button",className:"w-combo-opt",disabled:q,"data-disabled":q?"":void 0,onClick:()=>{q||($(B.organization.id),R(!1))},children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:B.organization.image_url?t.jsx("img",{src:B.organization.image_url,alt:B.organization.name}):Os(B.organization.name).charAt(0)}),t.jsx("span",{children:B.organization.name})]},B.organization.id)}),i&&t.jsxs("button",{type:"button",className:"w-combo-opt w-text-primary",onClick:()=>{R(!1),i()},children:[t.jsx(St,{size:13}),"Create new organization"]})]})]})]}),t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:[c," name"]}),t.jsx(ye,{autoFocus:!0,value:v,onChange:B=>k(B.target.value),placeholder:l?"Acme Inc":"Product",disabled:H})]}),t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Description"," ",t.jsx("span",{className:"w-secsub",children:"· optional"})]}),t.jsx(ye,{as:"textarea",className:"w-input--area",value:N,onChange:B=>_(B.target.value),placeholder:l?"What does your team do?":"What's this workspace for?",disabled:H})]}),t.jsxs("div",{className:"w-flex-col w-gap-2",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:K,disabled:H||!v.trim(),children:H?t.jsx(_e,{size:15}):t.jsxs(t.Fragment,{children:["Continue",t.jsx(Qt,{size:15})]})}),r&&t.jsx("button",{type:"button",className:"w-btn w-btn--secondary w-btn--block",onClick:r,disabled:H,children:"Cancel"})]})]}),b===1&&t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Invite by email"}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx(ye,{autoFocus:!0,className:"w-grow",value:de,onChange:B=>fe(B.target.value),onKeyDown:ze,placeholder:"teammate@acme.com"}),t.jsx(K4,{roles:U,value:ne,onChange:ae})]}),t.jsx("span",{className:"w-secsub",children:"Press Enter to add each person."})]}),G.length>0&&t.jsx("div",{className:"w-list",children:G.map(B=>t.jsxs("div",{className:"w-row",style:{gridTemplateColumns:"1fr auto",padding:"10px 0"},children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:Os(B.email)}),t.jsx("span",{className:"w-truncate w-text-secondary",children:B.email})]}),t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-pill",children:B.roleName}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",title:"Remove",onClick:()=>Y(q=>q.filter(X=>X.email!==B.email)),children:t.jsx(La,{size:13})})]})]},B.email))}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--secondary w-none",onClick:()=>j(2),disabled:H,children:"Skip"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-grow",onClick:We,disabled:H,children:H?t.jsx(_e,{size:15}):G.length?`Invite ${G.length} & finish`:"Finish"})]})]}),b===2&&t.jsxs("div",{className:"w-flex-col w-items-center w-gap-4",children:[t.jsxs("div",{className:"w-create-summary",children:[t.jsx("span",{className:"w-avatar w-avatar--md",children:E?t.jsx("img",{src:E,alt:v}):Os(v)}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-sec",children:v}),t.jsx("span",{className:"w-secsub",children:G.length?`${G.length} invite${G.length>1?"s":""} sent`:"No invites yet"})]})]}),t.jsxs("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:()=>s==null?void 0:s(F),children:["Go to ",m,t.jsx(Qt,{size:15})]}),t.jsxs("button",{type:"button",className:"w-link w-link--muted w-linkbtn w-inline w-gap-1",onClick:Re,children:[t.jsx(Wo,{size:12})," Create another"]})]})]}),b===0&&t.jsx("div",{className:"w-create-foot",children:t.jsx("span",{className:"w-secsub",children:l?"Organizations group your team, billing and settings.":"Workspaces live inside an organization."})})]})},mn=({onSuccess:e,onCancel:a})=>t.jsx($e,{children:t.jsx("div",{className:"w-flex w-justify-center w-full",children:t.jsx(Qc,{mode:"org",onSuccess:e,onCancel:a})})}),Jc=({isOpen:e,onClose:a,onCreated:s})=>{const r=()=>{s==null||s(),a==null||a()};return t.jsx($e,{children:t.jsx(Ue,{isOpen:e,onClose:a,children:t.jsx(Ue.Overlay,{children:t.jsx(Ue.Content,{className:"w-dialog--create",children:t.jsx(mn,{onSuccess:r,onCancel:a})})})})})},Er=o.createContext({screen:null,setScreen:()=>{},toast:(e,a)=>{}}),Ct=()=>{const e=o.useContext(Er);if(!e)throw new Error("useScreenContext must be used within a ScreenContextProvider");return e},Qa=({title:e,description:a,onConfirm:s,onCancel:r,style:i})=>{const l=o.useRef(null);return o.useEffect(()=>{const m=c=>{l.current&&!l.current.contains(c.target)&&r()};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[r]),t.jsxs("div",{ref:l,className:"w-pop",style:{position:"fixed",zIndex:1e3,right:44,...i},children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("h3",{className:"w-pop-title",children:e}),a&&t.jsx("p",{className:"w-pop-sub",children:a})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:r,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--danger-solid w-btn--sm",onClick:s,children:"Confirm"})]})]})},$i=[{id:"okta",name:"Okta",logo:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",protocol:"saml",description:"SAML",docUrl:"https://help.okta.com/en-us/content/topics/apps/apps_app_integration_wizard_saml.htm",placeholders:{entityId:"http://www.okta.com/{yourOktaDomain}",ssoUrl:"https://{yourOktaDomain}.okta.com/app/{appId}/sso/saml"},attributeMapping:{first_name:"firstName",last_name:"lastName",email:"email"}},{id:"okta-oidc",name:"Okta",logo:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",protocol:"oidc",description:"OIDC",docUrl:"https://developer.okta.com/docs/guides/implement-oauth-for-okta/main/",placeholders:{issuerUrl:"https://{yourOktaDomain}.okta.com",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"azure",name:"Azure AD",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Microsoft_Azure.svg/150px-Microsoft_Azure.svg.png",protocol:"saml",description:"SAML",docUrl:"https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/add-application-portal-setup-sso",placeholders:{entityId:"https://sts.windows.net/{tenantId}/",ssoUrl:"https://login.microsoftonline.com/{tenantId}/saml2"},attributeMapping:{first_name:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname",last_name:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",email:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"}},{id:"azure-oidc",name:"Azure AD",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Microsoft_Azure.svg/150px-Microsoft_Azure.svg.png",protocol:"oidc",description:"OIDC",docUrl:"https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc",placeholders:{issuerUrl:"https://login.microsoftonline.com/{tenantId}/v2.0",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"google",name:"Google",logo:"https://www.gstatic.com/images/branding/product/1x/googleg_48dp.png",protocol:"saml",description:"SAML",docUrl:"https://support.google.com/a/answer/6087519",placeholders:{entityId:"https://accounts.google.com/o/saml2?idpid={idpId}",ssoUrl:"https://accounts.google.com/o/saml2/idp?idpid={idpId}"},attributeMapping:{first_name:"FirstName",last_name:"LastName",email:"email"}},{id:"google-oidc",name:"Google",logo:"https://www.gstatic.com/images/branding/product/1x/googleg_48dp.png",protocol:"oidc",description:"OIDC",docUrl:"https://developers.google.com/identity/openid-connect/openid-connect",placeholders:{issuerUrl:"https://accounts.google.com",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"auth0",name:"Auth0",logo:"https://cdn.auth0.com/styleguide/latest/lib/logos/img/badge.png",protocol:"oidc",description:"OIDC",docUrl:"https://auth0.com/docs/authenticate/protocols/openid-connect-protocol",placeholders:{issuerUrl:"https://{yourDomain}.auth0.com/",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"onelogin",name:"OneLogin",logo:"",protocol:"saml",description:"SAML",docUrl:"https://onelogin.service-now.com/support?id=kb_article&sys_id=912bb23adbdc1cd0ca1c400e0b96197d",placeholders:{entityId:"https://app.onelogin.com/saml/metadata/{appId}",ssoUrl:"https://{subdomain}.onelogin.com/trust/saml2/http-post/sso/{appId}"}},{id:"ping",name:"PingOne",logo:"",protocol:"saml",description:"SAML",docUrl:"https://docs.pingidentity.com/pingone/latest/connector/configure-saml.html",placeholders:{entityId:"https://auth.pingone.com/{envId}",ssoUrl:"https://auth.pingone.com/{envId}/saml20/idp/sso"}},{id:"jumpcloud",name:"JumpCloud",logo:"",protocol:"saml",description:"SAML",docUrl:"https://support.jumpcloud.com/support/s/article/single-sign-on-sso-with-saml",placeholders:{entityId:"https://sso.jumpcloud.com/saml2/{appId}",ssoUrl:"https://sso.jumpcloud.com/saml2/{appId}"}},{id:"duo",name:"Duo",logo:"",protocol:"saml",description:"SAML",docUrl:"https://duo.com/docs/sso",placeholders:{entityId:"https://sso.duosecurity.com/saml2/sp/{appId}",ssoUrl:"https://sso.duosecurity.com/saml2/idp/{appId}/sso"}},{id:"keycloak",name:"Keycloak",logo:"https://www.keycloak.org/resources/images/icon.svg",protocol:"oidc",description:"OIDC",docUrl:"https://www.keycloak.org/docs/latest/securing_apps/",placeholders:{issuerUrl:"https://{host}/realms/{realm}",scopes:"openid profile email"}},{id:"adfs",name:"ADFS",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Microsoft_logo.svg/100px-Microsoft_logo.svg.png",protocol:"saml",description:"SAML",docUrl:"https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/create-a-relying-party-trust",placeholders:{entityId:"http://{adfsServer}/adfs/services/trust",ssoUrl:"https://{adfsServer}/adfs/ls/"}},{id:"custom-saml",name:"Custom",logo:"",protocol:"saml",description:"SAML",docUrl:"",placeholders:{}},{id:"custom-oidc",name:"Custom",logo:"",protocol:"oidc",description:"OIDC",docUrl:"",placeholders:{}}],Y4=({template:e})=>{const[a,s]=o.useState(!1);return!e.logo||a?t.jsx("span",{className:"w-avatar w-avatar--square w-avatar--md w-sso-logo--ph",children:t.jsx(Xt,{size:18,className:"w-text-muted"})}):t.jsx("img",{className:"w-avatar w-avatar--square w-avatar--md w-sso-logo",src:e.logo,alt:e.name,onError:()=>s(!0)})},Q4=({organization:e})=>{const{getEnterpriseConnections:a,createEnterpriseConnection:s,deleteEnterpriseConnection:r,testEnterpriseConnection:i,generateSCIMToken:l,getSCIMToken:m,revokeSCIMToken:c}=zt(),{toast:d}=Ct(),[p,u]=o.useState(!1),[f,h]=o.useState(null),{data:g=[],isLoading:x,mutate:w}=Se(e!=null&&e.id?`wacht-org-sso:${e.id}`:null,async()=>await(a==null?void 0:a(e))||[],{refreshInterval:3e4,revalidateOnFocus:!1}),b=async j=>{try{await(r==null?void 0:r(e,j)),w(),d("SSO connection deleted","info")}catch(v){d(v.message||"Failed to delete connection","error")}h(null)};return x?t.jsx("div",{className:"w-loading",children:t.jsx(_e,{})}):p?t.jsx(X4,{organization:e,onClose:()=>u(!1),onCreate:async j=>{try{await(s==null?void 0:s(e,j)),w(),u(!1),d("SSO connection created","info")}catch(v){d(v.message||"Failed to create connection","error")}}}):t.jsx(t.Fragment,{children:g.length===0?t.jsxs("div",{className:"w-empty w-empty--fill",children:[t.jsx("div",{className:"w-empty-ic",children:t.jsx(Xt,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:"Enterprise SSO"}),t.jsx("p",{children:"Let members sign in with your identity provider."})]}),t.jsx("div",{className:"w-empty-action",children:t.jsxs(se,{onClick:()=>u(!0),children:[t.jsx(St,{size:16})," Configure SSO"]})})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-flex w-items-center w-justify-between w-gap-4 w-sechead",children:t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("h3",{className:"w-title",children:"Enterprise SSO"}),t.jsx("p",{className:"w-sub",children:"Configure SAML or OIDC SSO for your organization"})]})}),g.map(j=>t.jsx(J4,{connection:j,onDelete:v=>h(v),connectionToDelete:f,onConfirmDelete:b,onCancelDelete:()=>h(null),testConnection:v=>i(e,v),generateSCIMToken:v=>l(e,v),getSCIMToken:v=>m(e,v),revokeSCIMToken:v=>c(e,v),toast:d},j.id))]})})},J4=({connection:e,onDelete:a,connectionToDelete:s,onConfirmDelete:r,onCancelDelete:i,testConnection:l,generateSCIMToken:m,getSCIMToken:c,revokeSCIMToken:d,toast:p})=>{var H,M,T,P,S;const[u,f]=o.useState(null),[h,g]=o.useState(!1),[x,w]=o.useState(null),[b,j]=o.useState(null),[v,k]=o.useState(!1),[N,_]=o.useState(null);o.useEffect(()=>{c&&e.id&&c(e.id).then(f).catch(()=>{})},[e.id,c]);const C=async()=>{if(l){k(!0),_(null);try{const $=await l(e.id);_($)}catch($){_({success:!1,checks:{},errors:{general:$.message||"Test failed"}})}finally{k(!1)}}},y=async()=>{if(m){g(!0);try{const $=await m(e.id);w($.token),f({exists:!0,token:$}),p("SCIM token generated. Copy it now - it won't be shown again!","info")}catch($){p($.message||"Failed to generate token","error")}finally{g(!1)}}},E=async()=>{if(d){g(!0);try{await d(e.id),f({exists:!1,scim_base_url:u==null?void 0:u.scim_base_url}),w(null),p("SCIM token revoked","info")}catch($){p($.message||"Failed to revoke token","error")}finally{g(!1)}}},A=($,Z)=>{navigator.clipboard.writeText($),j(Z),setTimeout(()=>j(null),2e3)};return t.jsxs("div",{className:"w-flex-col w-gap-4 w-sso-conn",children:[t.jsxs("div",{className:"w-flex w-justify-between w-items-start",children:[t.jsxs("h3",{className:"w-sec w-inline w-gap-2",children:[t.jsx(Xt,{size:16}),e.protocol==="oidc"?"OIDC SSO":"SAML SSO",t.jsx("span",{className:"w-pill w-pill--current",children:e.protocol.toUpperCase()})]}),t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx(se,{$size:"sm",onClick:C,disabled:v,children:v?t.jsx(_e,{size:14}):"Test"}),t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",$outline:!0,onClick:()=>a(e.id),className:"w-text-error",children:"Remove"}),s===e.id&&t.jsx(Qa,{title:"Delete this SSO connection?",onConfirm:()=>r(e.id),onCancel:i})]})]})]}),N&&t.jsx("div",{className:`w-banner ${N.success?"w-banner--success":"w-banner--error"}`,children:t.jsxs("span",{className:`w-banner-txt w-flex-col w-gap-1 ${N.success?"w-text-success":"w-text-error"}`,children:[t.jsx("span",{children:N.success?"✓ Connection is valid":"✗ Connection failed"}),N.errors&&Object.entries(N.errors).map(([$,Z])=>t.jsxs("div",{children:[$.replace(/_/g," "),": ",Z]},$))]})}),t.jsxs("div",{className:"w-sso-detail",children:[e.protocol==="saml"?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"w-secsub",children:"Entity ID"}),t.jsx("span",{className:"w-sec w-break-all",children:e.idp_entity_id}),t.jsx("span",{className:"w-secsub",children:"SSO URL"}),t.jsx("span",{className:"w-sec w-break-all",children:e.idp_sso_url})]}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"w-secsub",children:"Issuer URL"}),t.jsx("span",{className:"w-sec w-break-all",children:e.oidc_issuer_url}),t.jsx("span",{className:"w-secsub",children:"Client ID"}),t.jsx("span",{className:"w-sec",children:e.oidc_client_id}),t.jsx("span",{className:"w-secsub",children:"Scopes"}),t.jsx("span",{className:"w-sec",children:e.oidc_scopes||"openid profile email"})]}),t.jsx("span",{className:"w-secsub",children:"Created"}),t.jsx("span",{className:"w-sec",children:new Date(e.created_at).toLocaleDateString()})]}),t.jsxs("div",{className:"w-flex-col w-gap-3 w-sso-scim",children:[t.jsxs("div",{className:"w-flex w-justify-between w-items-center",children:[t.jsxs("div",{className:"w-sec w-inline w-gap-2",children:[t.jsx(Xt,{size:14}),"SCIM Provisioning"]}),t.jsx("div",{className:"w-flex w-wrap w-gap-2",children:!(u!=null&&u.exists)||!((H=u==null?void 0:u.token)!=null&&H.enabled)?t.jsx(se,{$size:"sm",onClick:y,disabled:h,children:h?t.jsx(_e,{size:14}):"Generate Token"}):t.jsxs(t.Fragment,{children:[t.jsx(se,{$size:"sm",onClick:y,disabled:h,children:h?t.jsx(_e,{size:14}):"Rotate"}),t.jsx(se,{$size:"sm",$outline:!0,onClick:E,disabled:h,className:"w-text-error",children:"Revoke"})]})})]}),(((M=u==null?void 0:u.token)==null?void 0:M.scim_base_url)||x)&&t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Base URL:"}),t.jsx("code",{children:((T=u==null?void 0:u.token)==null?void 0:T.scim_base_url)||"Loading..."}),((P=u==null?void 0:u.token)==null?void 0:P.scim_base_url)&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:()=>A(u.token.scim_base_url,"scim-url"),children:b==="scim-url"?t.jsx(Ye,{size:12}):t.jsx(Ga,{size:12})})]}),x&&t.jsxs("div",{className:"w-flex-col w-gap-2",children:[t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Token:"}),t.jsx("code",{children:x}),t.jsx("button",{className:"w-btn w-btn--icon",onClick:()=>A(x,"scim-token"),children:b==="scim-token"?t.jsx(Ye,{size:12}):t.jsx(Ga,{size:12})})]}),t.jsx("div",{className:"w-mono-faint w-text-warning",children:"⚠️ Copy this token now. It won't be shown again."})]}),(u==null?void 0:u.exists)&&((S=u==null?void 0:u.token)==null?void 0:S.enabled)&&!x&&t.jsxs("div",{className:"w-secsub",children:["Token:"," ",t.jsxs("code",{className:"w-mono-sm w-token-chip",children:[u.token.token_prefix,"..."]}),u.token.last_used_at&&t.jsxs("span",{children:[" ","· Last used:"," ",new Date(u.token.last_used_at).toLocaleDateString()]})]})]})]})},X4=({onCreate:e,organization:a})=>{const{getOrganizationDomains:s,testEnterpriseConnectionConfig:r}=zt(),{deployment:i}=Ce(),{toast:l}=Ct(),[m,c]=o.useState(!1),[d,p]=o.useState(null),[u,f]=o.useState("saml"),[h,g]=o.useState(null),[x,w]=o.useState(!1),[b,j]=o.useState({domain_id:"",idp_entity_id:"",idp_sso_url:"",idp_certificate:"",oidc_issuer_url:"",oidc_client_id:"",oidc_client_secret:"",oidc_scopes:"openid profile email",jit_enabled:!0,attr_first_name:"",attr_last_name:"",attr_email:""}),[v,k]=o.useState(!1),[N,_]=o.useState(null),{data:C=[],isLoading:y}=Se("wacht-org-verified-domains-for-sso-screen",async()=>(await(s==null?void 0:s(a))||[]).filter(R=>R.verified),{revalidateOnFocus:!1}),E=Z=>{p(Z),f(Z.protocol),Z.protocol==="saml"?j(R=>{var L,O,F;return{...R,idp_entity_id:Z.placeholders.entityId||"",idp_sso_url:Z.placeholders.ssoUrl||"",attr_first_name:((L=Z.attributeMapping)==null?void 0:L.first_name)||"",attr_last_name:((O=Z.attributeMapping)==null?void 0:O.last_name)||"",attr_email:((F=Z.attributeMapping)==null?void 0:F.email)||""}}):j(R=>{var L,O,F;return{...R,oidc_issuer_url:Z.placeholders.issuerUrl||"",oidc_scopes:Z.placeholders.scopes||"openid profile email",attr_first_name:((L=Z.attributeMapping)==null?void 0:L.first_name)||"",attr_last_name:((O=Z.attributeMapping)==null?void 0:O.last_name)||"",attr_email:((F=Z.attributeMapping)==null?void 0:F.email)||""}})},A=i!=null&&i.backend_host?`${i.backend_host.startsWith("https://")?"":"https://"}${i.backend_host}/auth/sso/oidc/callback`:"",H=i!=null&&i.backend_host?`https://${i.backend_host}/auth/sso/metadata`:"",M=i!=null&&i.backend_host?`https://${i.backend_host}/auth/sso/callback`:"",T=(Z,R)=>{navigator.clipboard.writeText(Z),g(R),setTimeout(()=>g(null),2e3)},P=async Z=>{Z.preventDefault();const R=L=>L.includes("{")||L.includes("}");if(u==="saml"){if(!b.idp_entity_id||R(b.idp_entity_id)){l("Please enter a valid IdP Entity ID (no placeholders)","error");return}if(!b.idp_sso_url||R(b.idp_sso_url)){l("Please enter a valid IdP SSO URL (no placeholders)","error");return}if(!b.idp_certificate){l("Please provide the X.509 Certificate","error");return}}else{if(!b.oidc_issuer_url||R(b.oidc_issuer_url)){l("Please enter a valid Issuer URL (no placeholders)","error");return}if(!b.oidc_client_id||R(b.oidc_client_id)){l("Please enter a valid Client ID (no placeholders)","error");return}if(!b.oidc_client_secret){l("Please enter the Client Secret","error");return}}c(!0);try{const L={};b.attr_first_name&&(L.first_name=b.attr_first_name),b.attr_last_name&&(L.last_name=b.attr_last_name),b.attr_email&&(L.email=b.attr_email);const O=Object.keys(L).length>0;u==="saml"?await e({protocol:"saml",domain_id:b.domain_id||void 0,idp_entity_id:b.idp_entity_id,idp_sso_url:b.idp_sso_url,idp_certificate:b.idp_certificate,jit_enabled:b.jit_enabled,...O&&{attribute_mapping:L}}):await e({protocol:"oidc",domain_id:b.domain_id||void 0,oidc_issuer_url:b.oidc_issuer_url,oidc_client_id:b.oidc_client_id,oidc_client_secret:b.oidc_client_secret,oidc_scopes:b.oidc_scopes,jit_enabled:b.jit_enabled,...O&&{attribute_mapping:L}})}finally{c(!1)}},S=async()=>{k(!0),_(null);const Z=O=>O.includes("{")||O.includes("}"),R={},L={};if(u==="saml"?(b.idp_entity_id?Z(b.idp_entity_id)?(L.entity_id_valid=!1,R.entity_id_valid="IdP Entity ID contains placeholder values - please replace with actual values"):L.entity_id_valid=!0:(L.entity_id_valid=!1,R.entity_id_valid="IdP Entity ID is required"),b.idp_sso_url?Z(b.idp_sso_url)?(L.sso_url_valid=!1,R.sso_url_valid="IdP SSO URL contains placeholder values - please replace with actual values"):L.sso_url_valid=!0:(L.sso_url_valid=!1,R.sso_url_valid="IdP SSO URL is required"),b.idp_certificate?L.certificate_provided=!0:(L.certificate_provided=!1,R.certificate_provided="X.509 Certificate is required")):(b.oidc_issuer_url?Z(b.oidc_issuer_url)?(L.issuer_url_valid=!1,R.issuer_url_valid="Issuer URL contains placeholder values - please replace with actual values"):L.issuer_url_valid=!0:(L.issuer_url_valid=!1,R.issuer_url_valid="Issuer URL is required"),b.oidc_client_id?Z(b.oidc_client_id)?(L.client_id_valid=!1,R.client_id_valid="Client ID contains placeholder values - please replace with actual values"):L.client_id_valid=!0:(L.client_id_valid=!1,R.client_id_valid="Client ID is required")),Object.keys(R).length>0){_({success:!1,checks:L,errors:R}),k(!1);return}try{const O=u==="saml"?{protocol:"saml",idp_entity_id:b.idp_entity_id,idp_sso_url:b.idp_sso_url,idp_certificate:b.idp_certificate}:{protocol:"oidc",oidc_issuer_url:b.oidc_issuer_url,oidc_client_id:b.oidc_client_id,oidc_client_secret:b.oidc_client_secret},F=await(r==null?void 0:r(a,O));F&&_(F)}catch(O){_({success:!1,checks:{},errors:{general:"Test failed: "+O.message}})}finally{k(!1)}},$=Z=>t.jsx(Y4,{template:Z});return t.jsxs("form",{onSubmit:P,autoComplete:"off",className:"w-flex-col w-gap-4",children:[d?t.jsxs("div",{className:"w-flex w-items-center w-gap-4 w-sso-template",children:[$(d),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:d.name}),t.jsx("div",{className:"w-eyebrow",children:d.protocol})]}),t.jsx(se,{type:"button",$size:"sm",$outline:!0,onClick:()=>p(null),children:"Change"})]}):t.jsxs("div",{className:"w-flex-col w-gap-5",children:[t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-eyebrow",children:"SAML Providers"}),t.jsx("div",{className:"w-grid-4",children:$i.filter(Z=>Z.protocol==="saml").map(Z=>t.jsxs("button",{type:"button",className:"w-sso-tile",onClick:()=>E(Z),children:[$(Z),t.jsx("span",{className:"w-secsub",children:Z.name})]},Z.id))})]}),t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-eyebrow",children:"OIDC Providers"}),t.jsx("div",{className:"w-grid-4",children:$i.filter(Z=>Z.protocol==="oidc").map(Z=>t.jsxs("button",{type:"button",className:"w-sso-tile",onClick:()=>E(Z),children:[$(Z),t.jsx("span",{className:"w-secsub",children:Z.name})]},Z.id))})]})]}),d&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-tile w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-sec",children:"Service Provider Details"}),t.jsx("div",{className:"w-flex-col w-gap-2 w-full",children:u==="saml"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"ACS URL:"}),t.jsx("code",{children:M}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",onClick:()=>T(M,"acs"),children:h==="acs"?t.jsx(Ye,{size:12}):t.jsx(Ga,{size:12})})]}),t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Metadata:"}),t.jsx("code",{children:H}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",onClick:()=>T(H,"metadata"),children:h==="metadata"?t.jsx(Ye,{size:12}):t.jsx(Ga,{size:12})})]})]}):t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Callback:"}),t.jsx("code",{children:A}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",onClick:()=>T(A,"callback"),children:h==="callback"?t.jsx(Ye,{size:12}):t.jsx(Ga,{size:12})})]})})]}),t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs("div",{className:"w-flex w-justify-between w-items-center w-gap-3",children:[t.jsx("div",{className:"w-eyebrow",children:d?`${d.name} Configuration`:"Configuration"}),t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[d&&d.docUrl&&t.jsxs("a",{href:d.docUrl,target:"_blank",rel:"noopener noreferrer",className:"w-link w-link--sm w-text-primary w-inline w-gap-1",children:[t.jsx(Nu,{size:12})," Docs"]}),t.jsx(se,{type:"button",$size:"sm",$outline:!0,onClick:S,disabled:v||!d,children:v?t.jsx(_e,{size:16}):"Test Connection"}),t.jsx(se,{$size:"sm",type:"submit",disabled:m||C.length===0||!d,children:m?t.jsx(_e,{size:16}):"Create Connection"})]})]}),N&&(()=>{const Z={entity_id_valid:"IdP Entity ID",sso_url_valid:"IdP SSO URL",certificate_provided:"X.509 Certificate",issuer_url_valid:"Issuer URL",client_id_valid:"Client ID",certificate_valid:"Certificate Valid",sso_url_reachable:"SSO URL Reachable",discovery_reachable:"Discovery Endpoint",discovery_valid:"Discovery Valid",authorization_endpoint:"Authorization Endpoint",token_endpoint:"Token Endpoint",issuer_valid:"Issuer URL Valid"};return t.jsxs("div",{className:`w-banner ${N.success?"w-banner--success":"w-banner--error"} w-flex-col w-gap-3`,children:[t.jsx("div",{className:`w-sec ${N.success?"w-text-success":"w-text-error"}`,children:N.success?"✓ All checks passed":"✗ Some checks failed"}),t.jsx("div",{className:"w-flex-col w-gap-2 w-full",children:Object.entries(N.checks).map(([R,L])=>{var O;return t.jsxs("div",{className:"w-flex w-items-start w-gap-2 w-sso-check",children:[t.jsx("span",{className:`w-sso-check-mark ${L?"w-text-success":"w-text-error"}`,children:L?"✓":"✗"}),t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:Z[R]||R.replace(/_/g," ").replace(/\b\w/g,F=>F.toUpperCase())}),((O=N.errors)==null?void 0:O[R])&&t.jsx("div",{className:"w-secsub w-text-error",children:N.errors[R]})]})]},R)})})]})})(),t.jsxs("div",{className:"w-grid-2",children:[!d&&t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Protocol *"}),t.jsxs("select",{className:"w-input",value:u,onChange:Z=>f(Z.target.value),children:[t.jsx("option",{value:"saml",children:"SAML"}),t.jsx("option",{value:"oidc",children:"OpenID Connect (OIDC)"})]})]}),t.jsxs(Ge,{className:"w-col-full",children:[t.jsx(Ve,{children:"Domain *"}),y?t.jsx("div",{className:"w-secsub",children:"Loading domains..."}):C.length===0?t.jsx("div",{className:"w-banner w-banner--warn",children:t.jsx("span",{className:"w-banner-txt",children:"No verified domains found. Please add and verify a domain first."})}):t.jsxs("select",{className:"w-input",value:b.domain_id,onChange:Z=>j({...b,domain_id:Z.target.value}),required:!0,children:[t.jsx("option",{value:"",children:"Select a verified domain"}),C.map(Z=>t.jsx("option",{value:Z.id,children:Z.fqdn},Z.id))]})]}),u==="saml"?t.jsxs(t.Fragment,{children:[t.jsxs(Ge,{children:[t.jsx(Ve,{children:"IdP Entity ID *"}),t.jsx(ye,{type:"text",value:b.idp_entity_id,onChange:Z=>j({...b,idp_entity_id:Z.target.value}),placeholder:"https://idp.example.com/entity",required:!0})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"IdP SSO URL *"}),t.jsx(ye,{type:"url",value:b.idp_sso_url,onChange:Z=>j({...b,idp_sso_url:Z.target.value}),placeholder:"https://idp.example.com/sso",required:!0})]}),t.jsxs(Ge,{className:"w-col-full",children:[t.jsx(Ve,{children:"X.509 Certificate *"}),t.jsx(ye,{as:"textarea",value:b.idp_certificate,onChange:Z=>j({...b,idp_certificate:Z.target.value}),placeholder:"-----BEGIN CERTIFICATE-----...",required:!0,className:"w-input--area w-input--mono"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Issuer URL *"}),t.jsx(ye,{type:"url",value:b.oidc_issuer_url,onChange:Z=>j({...b,oidc_issuer_url:Z.target.value}),placeholder:"https://login.example.com",required:!0})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Client ID *"}),t.jsx(ye,{type:"text",value:b.oidc_client_id,onChange:Z=>j({...b,oidc_client_id:Z.target.value}),placeholder:"your-client-id",required:!0,autoComplete:"off","data-lpignore":"true","data-form-type":"other"})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Client Secret *"}),t.jsx(ye,{type:"password",value:b.oidc_client_secret,onChange:Z=>j({...b,oidc_client_secret:Z.target.value}),placeholder:"your-client-secret",required:!0,autoComplete:"new-password","data-lpignore":"true","data-form-type":"other"})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Scopes"}),t.jsx(ye,{type:"text",value:b.oidc_scopes,onChange:Z=>j({...b,oidc_scopes:Z.target.value}),placeholder:"openid profile email"})]})]}),t.jsx(Ge,{className:"w-col-full",children:t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-sec",children:"Enable JIT Provisioning"}),t.jsx("div",{className:"w-secsub",children:"When enabled, new users are automatically created on their first SSO login. When disabled, only pre-existing users can sign in via SSO."})]}),t.jsx(Za,{checked:b.jit_enabled,onChange:()=>j({...b,jit_enabled:!b.jit_enabled})})]})}),t.jsxs("div",{className:"w-col-full w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-inline w-gap-2 w-text-primary w-disclosure",onClick:()=>w(!x),children:[t.jsx("span",{className:"w-disclosure-caret",children:x?"▼":"▶"}),"Advanced Options (Attribute Mapping)"]}),x&&t.jsxs("div",{className:"w-tile w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-secsub",children:"Map IdP attribute names to Wacht user fields. Leave empty to use default attribute names."}),t.jsxs("div",{className:"w-grid-3",children:[t.jsxs(Ge,{children:[t.jsx(Ve,{children:"First Name Attribute"}),t.jsx(ye,{type:"text",value:b.attr_first_name,onChange:Z=>j({...b,attr_first_name:Z.target.value}),placeholder:u==="saml"?"givenName":"given_name"})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Last Name Attribute"}),t.jsx(ye,{type:"text",value:b.attr_last_name,onChange:Z=>j({...b,attr_last_name:Z.target.value}),placeholder:u==="saml"?"surname":"family_name"})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Email Attribute"}),t.jsx(ye,{type:"text",value:b.attr_email,onChange:Z=>j({...b,attr_email:Z.target.value}),placeholder:"email"})]})]})]})]})]})]})]})]})},ht=(...e)=>e.filter(Boolean).join(" "),Oi=({className:e,...a})=>t.jsx("div",{className:ht("w-contents",e),...a}),Zn=({className:e,...a})=>t.jsx("div",{className:ht("w-card","w-flex-col","w-full","w-minh-full",e),...a}),em=({className:e,...a})=>t.jsx("div",{className:ht("w-tabsbar",e),...a}),tm=({className:e,...a})=>t.jsx("div",{className:ht("w-flex","w-items-center","w-gap-1","w-tabs",e),...a}),za=({className:e,$isActive:a,...s})=>t.jsx("button",{className:ht("w-tab",a&&"w-tab--active",e),...s}),Da=({className:e,...a})=>t.jsx("span",{className:ht("w-inline","w-gap-2",e),...a}),am=({className:e,children:a,...s})=>t.jsx("div",{className:ht("w-tabbody",e),...s,children:t.jsx("div",{className:"w-tabpane",children:a})}),Ar=({className:e,...a})=>t.jsx("div",{className:ht("w-sechead",e),...a}),Zi=({className:e,...a})=>t.jsx("div",{className:ht("w-flex","w-items-center","w-justify-between","w-gap-4",e),...a}),Hi=({className:e,...a})=>t.jsx("div",{className:ht("w-grow",e),...a}),Fi=({className:e,...a})=>t.jsx("div",{className:ht("w-flex","w-items-center","w-gap-3","w-none",e),...a}),pn=({className:e,...a})=>t.jsx("div",{className:ht("w-full",e),...a}),sm=({className:e,...a})=>t.jsx("div",{className:ht("w-page-head",e),...a}),nm=({className:e,...a})=>t.jsx("div",{className:ht("w-grow","w-flex-col","w-gap-1",e),...a}),rm=({className:e,...a})=>t.jsx("div",{className:ht("w-sec","w-truncate",e),...a}),im=({className:e,...a})=>t.jsx("div",{className:ht("w-secsub","w-truncate",e),...a}),om={primary:"w-pill--current",success:"w-pill--success",warning:"w-pill--pending",danger:"w-pill--error",neutral:""},fa=({className:e,$variant:a="neutral",children:s,...r})=>t.jsxs("span",{className:ht("w-pill",om[a],e),...r,children:[t.jsx("span",{className:"w-dot"}),s]}),Ti=({className:e,$first:a,...s})=>t.jsx("div",{className:ht("w-sec",e),...s}),lm=({organization:e})=>{var M,T,P,S,$,Z;const{switchOrganization:a,refetch:s}=ot(),{workspaces:r}=va(),{deployment:i}=Ce(),{deleteOrganization:l,updateOrganization:m}=zt(),{toast:c}=Ct(),[d,p]=o.useState((e==null?void 0:e.name)||""),[u,f]=o.useState((e==null?void 0:e.description)||""),[h,g]=o.useState(!1),[x,w]=o.useState({mfa_required:!1,ip_restrictions:!1,allowed_ips:"",default_workspace_id:""}),[b,j]=o.useState(""),[v,k]=o.useState(!1),[N,_]=o.useState(!1),C=o.useRef({name:d,description:u,security:x,isSaving:h});o.useEffect(()=>{C.current={name:d,description:u,security:x,isSaving:h}},[d,u,x,h]);const y=o.useCallback(async()=>{if(!e)return;const R=C.current;try{g(!0),await m(e,{name:R.name,description:R.description,whitelisted_ips:R.security.allowed_ips.split(`
103
- `).filter(L=>L.trim()),enable_ip_restriction:R.security.ip_restrictions,enforce_mfa:R.security.mfa_required,auto_assigned_workspace_id:R.security.default_workspace_id||"0"}),c("Changes saved","info")}catch(L){c(L.message||"Failed to save changes","error")}finally{g(!1)}},[e,m,c]),E=o.useCallback(()=>{C.current.isSaving||y()},[y]);o.useEffect(()=>{var R;e&&(p(e.name||""),f(e.description||""),w({allowed_ips:((R=e.whitelisted_ips)==null?void 0:R.join(`
104
- `))||"",ip_restrictions:e.enable_ip_restriction||!1,mfa_required:e.enforce_mfa||!1,default_workspace_id:e.auto_assigned_workspace_id||""}))},[e]);const A=o.useMemo(()=>r.filter(R=>R.organization.id===(e==null?void 0:e.id)),[r,e==null?void 0:e.id]),H=async()=>{if(!(!e||b!==e.name))try{k(!0),await a(""),await l(e),await s(),c("Organization deleted","info")}catch{c("Failed to delete organization","error")}finally{k(!1),j("")}};return e?t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"name",children:"Organization name"}),t.jsx(ye,{id:"name",value:d,onChange:R=>p(R.target.value),onBlur:E,placeholder:"Organization name",required:!0})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"description",children:"Description"}),t.jsx(ye,{id:"description",as:"textarea",value:u,onChange:R=>f(R.target.value),onBlur:E,placeholder:"Optional description",className:"w-input--area"})]}),((M=i==null?void 0:i.b2b_settings)==null?void 0:M.workspaces_enabled)&&A.length>0&&t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"default_workspace",children:"Default workspace"}),t.jsx(un,{options:A.map(R=>({value:R.id,label:R.name})),value:x.default_workspace_id,onChange:R=>{w(L=>({...L,default_workspace_id:R})),setTimeout(E,0)},placeholder:"Select default workspace"})]})]}),(((T=i==null?void 0:i.b2b_settings)==null?void 0:T.enforce_mfa_per_org_enabled)||((P=i==null?void 0:i.b2b_settings)==null?void 0:P.ip_allowlist_per_org_enabled))&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(Ti,{children:"Security"}),((S=i==null?void 0:i.b2b_settings)==null?void 0:S.enforce_mfa_per_org_enabled)&&t.jsxs(Zi,{children:[t.jsxs(Hi,{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Multi-factor authentication"}),t.jsx("p",{className:"w-secsub",children:"Require all members to set up MFA for added security."})]}),t.jsx(Fi,{children:t.jsx(Za,{checked:x.mfa_required,onChange:()=>{const R=!x.mfa_required;w(L=>({...L,mfa_required:R})),setTimeout(E,0)}})})]}),(($=i==null?void 0:i.b2b_settings)==null?void 0:$.ip_allowlist_per_org_enabled)&&t.jsxs(t.Fragment,{children:[t.jsxs(Zi,{children:[t.jsxs(Hi,{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"IP restrictions"}),t.jsx("p",{className:"w-secsub",children:"Only allow access from specific IP addresses."})]}),t.jsx(Fi,{children:t.jsx(Za,{checked:x.ip_restrictions,onChange:()=>{const R=!x.ip_restrictions;w(L=>({...L,ip_restrictions:R})),setTimeout(E,0)}})})]}),x.ip_restrictions&&t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"allowed_ips",children:"Allowed IP addresses"}),t.jsx(ye,{id:"allowed_ips",as:"textarea",value:x.allowed_ips,onChange:R=>w(L=>({...L,allowed_ips:R.target.value})),onBlur:E,placeholder:`192.168.1.1
105
- 10.0.0.0/24`,className:"w-input--area w-input--mono"})]})]})]}),((Z=i==null?void 0:i.b2b_settings)==null?void 0:Z.allow_org_deletion)&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(Ti,{children:"Danger zone"}),t.jsxs("div",{className:"w-danger w-flex-col w-items-start w-gap-3",children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-2 w-full",children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Delete organization"}),t.jsx("div",{className:"w-secsub",children:"Once you delete this organization, there is no going back."})]}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,onClick:()=>{_(!N),j("")},children:N?"Cancel":"Delete organization"})]}),N&&t.jsxs("div",{className:"w-flex-col w-gap-3 w-full",children:[t.jsxs(Ge,{children:[t.jsxs(Ve,{htmlFor:"confirm_org_name",children:["Type"," ",t.jsx("strong",{children:e.name})," ","to confirm"]}),t.jsx(ye,{id:"confirm_org_name",type:"text",value:b,onChange:R=>j(R.target.value),placeholder:e.name})]}),t.jsx(se,{$size:"sm",$destructive:!0,onClick:H,disabled:b!==e.name||v,children:v?t.jsx(_e,{size:12}):"Delete forever"})]})]})]})]}):t.jsx(_e,{})},Mr=(e,a)=>a?`${e} ${a}`:e,Ot=o.forwardRef(({className:e,...a},s)=>t.jsx("table",{ref:s,className:Mr("w-table",e),...a}));Ot.displayName="Table";const Zt=o.forwardRef((e,a)=>t.jsx("thead",{ref:a,...e}));Zt.displayName="TableHead";const Ht=o.forwardRef((e,a)=>t.jsx("tbody",{ref:a,...e}));Ht.displayName="TableBody";const it=o.forwardRef((e,a)=>t.jsx("tr",{ref:a,...e}));it.displayName="TableRow";const Fe=o.forwardRef((e,a)=>t.jsx("th",{ref:a,...e}));Fe.displayName="TableHeader";const Xe=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:e,...a}));Xe.displayName="TableCell";const cm=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:Mr("w-td--flex",e),...a}));cm.displayName="TableCellFlex";const Ft=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:Mr("w-td--actions",e),...a}));Ft.displayName="ActionsCell";const Nt=({title:e,description:a,icon:s,action:r})=>t.jsxs("div",{className:"w-empty",children:[t.jsx("div",{className:"w-empty-ic",children:s??t.jsx(Uu,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:e}),t.jsx("p",{children:a})]}),r&&t.jsx("div",{className:"w-empty-action",children:r})]}),bt=({triggerRef:e,isOpen:a,minWidth:s=300,defaultMaxHeight:r=400,offset:i=8,contentRef:l})=>{const[m,c]=o.useState();return o.useEffect(()=>{if(!a||!e.current){c(void 0);return}const d=()=>{var N;if(!e.current)return;const u=e.current.getBoundingClientRect(),f=window.innerWidth,h=window.innerHeight,g=((N=l==null?void 0:l.current)==null?void 0:N.offsetWidth)||s,x=h-u.bottom,w=u.top,b={};x>=w?(b.top=u.bottom+i,b.maxHeight=Math.min(r,x-i*2)):(b.bottom=h-u.top+i,b.maxHeight=Math.min(r,w-i*2));const j=f-u.left,v=u.right,k=j>=v?u.left:u.right-g;b.left=Math.max(i,Math.min(f-g-i,k)),c(b)},p=requestAnimationFrame(d);return window.addEventListener("resize",d),window.addEventListener("scroll",d,!0),()=>{cancelAnimationFrame(p),window.removeEventListener("resize",d),window.removeEventListener("scroll",d,!0)}},[a,s,r,i,l]),m},Ii=({onClose:e,domain:a,triggerRef:s})=>{const r=o.useRef(null),[i,l]=o.useState(),[m,c]=o.useState(""),[d,p]=o.useState(!1),[u,f]=o.useState(!1),{addDomain:h,verifyDomain:g}=ga(),{toast:x}=Ct(),w=bt({contentRef:r,triggerRef:s??{current:null},isOpen:u,minWidth:360,defaultMaxHeight:420}),b=_=>/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/.test(_),j=_=>_.trim().toLowerCase().replace(/^https?:\/\//,""),v=async()=>{const _=j(m);if(!_){x("Please enter a domain name","error");return}if(!b(_)){x("Please enter a valid domain (e.g., example.com)","error");return}if(_.length>253){x("Domain name is too long","error");return}p(!0);try{const C=await h({fqdn:_});x("Domain added","info"),l(C.data)}catch(C){x(C.message||"Failed to add domain. Please try again.","error")}finally{p(!1)}},k=async()=>{if(!(!i||d)){p(!0);try{await g(i),e==null||e(),x("Domain verified","info")}catch(_){x(_.message||"Failed to verify domain. Check DNS records and try again.","error")}finally{p(!1)}}};if(o.useEffect(()=>{f(!0);const _=y=>{r.current&&!r.current.contains(y.target)&&(e==null||e())},C=y=>{y.key==="Escape"&&(e==null||e())};return document.addEventListener("mousedown",_),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",C)}},[e]),o.useEffect(()=>{a&&l(a)},[a]),!u)return null;const N={position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"};return i?t.jsxs("div",{ref:r,className:"w-pop w-pop--wide",style:N,onClick:_=>_.stopPropagation(),role:"dialog","aria-labelledby":"verify-domain-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"verify-domain-title",children:"Verify domain"}),t.jsx("p",{className:"w-pop-sub",children:"Add this DNS record, then verify."}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Type"}),t.jsx(ye,{value:i==null?void 0:i.verification_dns_record_type,disabled:!0})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Name"}),t.jsx(ye,{value:i==null?void 0:i.verification_dns_record_name,disabled:!0})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Value"}),t.jsx(ye,{value:i==null?void 0:i.verification_dns_record_data,disabled:!0})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:k,disabled:d,children:d?t.jsx(_e,{size:12}):"Verify"})]})]}):t.jsxs("div",{ref:r,className:"w-pop w-pop--wide",style:N,onClick:_=>_.stopPropagation(),role:"dialog","aria-labelledby":"add-domain-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"add-domain-title",children:"Add domain"}),t.jsx("p",{className:"w-pop-sub",children:"Verified members auto-join this org."}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Domain"}),t.jsx(ye,{type:"text",placeholder:"example.com",value:m,onChange:_=>c(_.target.value),onKeyDown:_=>{_.key==="Enter"&&m&&v()},autoFocus:!0,"aria-label":"Domain name"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:v,disabled:!m||d,children:d?t.jsx(_e,{size:12}):"Continue"})]})]})},dm=({organization:e})=>{const{getOrganizationDomains:a,removeOrganizationDomain:s}=zt(),[r,i]=o.useState(null),[l,m]=o.useState(!1),[c,d]=o.useState(null),[p,u]=o.useState(new Set),f=o.useRef(null),h=o.useRef({}),{data:g=[],isLoading:x,mutate:w}=Se(e!=null&&e.id?`wacht-org-domains:${e.id}`:null,async()=>(await(a==null?void 0:a(e))||[]).map(k=>({...k,verified:k.verified!==void 0?k.verified:!1}))),b=(v,k)=>{u(N=>{const _=new Set(N);return k?_.add(v):_.delete(v),_})},j=async v=>{b(v.id,!0);try{await s(e,v),w()}finally{b(v.id,!1),i(null)}};return x?t.jsx(_e,{}):t.jsxs(t.Fragment,{children:[t.jsxs(Ar,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Domains"}),t.jsx("div",{className:"w-secsub",children:"Users with verified domain emails auto-join this organization."})]}),t.jsx(se,{ref:f,onClick:()=>m(!0),$size:"sm",children:"Add domain"}),l&&t.jsx(Ii,{onClose:()=>{m(!1),w()},triggerRef:f})]}),g!=null&&g.length?t.jsx(pn,{children:t.jsxs(Ot,{children:[t.jsx(Zt,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Domain"}),t.jsx(Fe,{children:"Status"}),t.jsx(Fe,{children:"Added"}),t.jsx(Fe,{})]})}),t.jsx(Ht,{children:g.map(v=>{const k=p.has(v.id);return t.jsxs(it,{children:[t.jsx(Xe,{children:v.fqdn}),t.jsx(Xe,{children:v.verified?t.jsx(fa,{$variant:"success",children:"Verified"}):t.jsx(fa,{$variant:"warning",children:"Pending"})}),t.jsx(Xe,{children:new Date(v.created_at).toLocaleDateString()}),t.jsx(Ft,{children:t.jsxs("div",{className:"w-actions",children:[t.jsx(se,{ref:N=>{N&&(h.current[v.id]=N)},$size:"sm",$outline:!0,disabled:k,onClick:()=>d(v.id),children:v.verified?"View DNS":"Verify"}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,disabled:k,onClick:()=>i(v.id),children:k?t.jsx(_e,{size:12}):"Remove"})]})})]},v.id)})})]})}):t.jsx(Nt,{title:"No domains added",description:"Users with verified domain emails automatically join this organization."}),r&&t.jsx(Qa,{title:"Remove domain?",description:"Active users aren't affected, but new users with this domain won't auto-join.",onConfirm:()=>{const v=g.find(k=>k.id===r);v&&j(v)},onCancel:()=>i(null)}),c&&t.jsx(Ii,{domain:g.find(v=>v.id===c),onClose:()=>d(null),triggerRef:{current:h.current[c]}})]})},Xc=({onClose:e,onSuccess:a,roles:s,triggerRef:r})=>{const i=o.useRef(null),[l,m]=o.useState(""),[c,d]=o.useState(null),[p,u]=o.useState(!1),[f,h]=o.useState(!1),{inviteMember:g}=ga(),{toast:x}=Ct(),w=bt({contentRef:i,triggerRef:r??{current:null},isOpen:f,minWidth:360,defaultMaxHeight:360}),b=s.map(k=>({value:k.id,label:k.name})),j=k=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k),v=async()=>{const k=l.trim().toLowerCase();if(!(!k||!c)){if(!j(k)){x("Please enter a valid email address","error");return}if(k.length>320){x("Email address is too long","error");return}u(!0);try{await g({email:k,organizationRole:c}),a==null||a()}catch(N){x(N.message||"Failed to send invitation. Please try again.","error")}finally{u(!1)}}};return o.useEffect(()=>{h(!0);const k=_=>{i.current&&!i.current.contains(_.target)&&(e==null||e())},N=_=>{_.key==="Escape"&&(e==null||e())};return document.addEventListener("mousedown",k),document.addEventListener("keydown",N),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",N)}},[e]),f?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:k=>k.stopPropagation(),role:"dialog","aria-labelledby":"invite-member-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"invite-member-title",children:"Invite member"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Email"}),t.jsx(ye,{type:"email",placeholder:"colleague@company.com",value:l,onChange:k=>m(k.target.value),onKeyDown:k=>{k.key==="Enter"&&l&&c&&v()},autoFocus:!0,"aria-label":"Email address for invitation"})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Role"}),t.jsx(un,{options:b,value:c==null?void 0:c.id,onChange:k=>d(s.find(N=>N.id===k)),placeholder:"Select a role","aria-label":"Select role for invited member"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:v,disabled:!l||!c||p,children:p?t.jsx(_e,{size:12}):"Send invite"})]})]}):null},um=({organization:e})=>{const{getOrganizationMembers:a,getOrganizationRoles:s,addRoleToOrganizationMember:r,removeRoleFromOrganizationMember:i,removeOrganizationMember:l}=zt(),{session:m}=ot(),{toast:c}=Ct(),[d,p]=o.useState(""),[u,f]=o.useState(1),[h]=o.useState(10),[g,x]=o.useState(!1),[w,b]=o.useState(new Set),j=o.useRef(null),[v,k]=o.useState(d);o.useEffect(()=>{const S=setTimeout(()=>{k(d),f(1)},500);return()=>clearTimeout(S)},[d]);const{data:N,mutate:_}=Se(e?`wacht-api-organizations:${e.id}:members:${u}:${h}:${v}`:null,()=>a==null?void 0:a(e,{page:u,limit:h,search:v}),{keepPreviousData:!0}),C=(N==null?void 0:N.data)||[],y=(N==null?void 0:N.meta)||{total:0,limit:10},E=Math.ceil(y.total/(y.limit||10)),{data:A=[]}=Se(e?`wacht-api-organizations:${e.id}:roles`:null,()=>(s==null?void 0:s(e))||[]),H=A,M=(S,$)=>{b(Z=>{const R=new Set(Z);return $?R.add(S):R.delete(S),R})},T=async(S,$,Z)=>{M(S.id,!0);try{Z?(await i(e,S,$),c("Role removed","info")):(await r(e,S,$),c("Role added","info")),_()}catch(R){c(R.message||"Failed to update role","error")}finally{M(S.id,!1)}},P=async S=>{M(S.id,!0);try{await l(e,S),_(),c("Member removed","info")}catch($){c($.message||"Failed to remove member","error")}finally{M(S.id,!1)}};return N?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-toolbar",children:[t.jsx(Gc,{value:d,onChange:p,placeholder:"Search members..."}),t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[y.total>0&&t.jsxs("div",{className:"w-secsub",children:[y.total," member",y.total!==1?"s":""]}),t.jsx(se,{ref:j,onClick:()=>x(!0),$size:"sm",children:"Invite"})]})]}),g&&t.jsx(Xc,{onClose:()=>x(!1),onSuccess:()=>{_(),x(!1)},roles:H,triggerRef:j}),C.length===0?t.jsx(Nt,{title:d?"No members match":"No members yet",description:"Invite someone or connect a corporate domain to auto-join."}):t.jsx(pn,{children:t.jsxs(Ot,{children:[t.jsx(Zt,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Member"}),t.jsx(Fe,{children:"Joined"}),t.jsx(Fe,{children:"Roles"}),t.jsx(Fe,{})]})}),t.jsx(Ht,{children:C.map(S=>{var R,L;const $=((R=S.user)==null?void 0:R.id)===((L=m==null?void 0:m.active_signin)==null?void 0:L.user_id),Z=w.has(S.id);return t.jsxs(it,{children:[t.jsx(Xe,{children:t.jsx(mm,{member:S,isCurrentUser:$})}),t.jsx(Xe,{children:new Date(S.created_at).toLocaleDateString()}),t.jsx(Xe,{children:t.jsx(pm,{member:S,roles:H,onToggle:T,disabled:Z})}),t.jsx(Ft,{children:t.jsx("div",{className:"w-actions",children:t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,disabled:Z||$,onClick:()=>P(S),title:$?"You cannot remove yourself":"Remove member",children:Z?t.jsx(_e,{size:12}):"Remove"})})})]},S.id)})})]})}),E>1&&t.jsxs("div",{className:"w-flex w-items-center w-justify-center w-gap-4 w-mt-6",children:[t.jsx(se,{onClick:()=>f(S=>Math.max(1,S-1)),disabled:u===1,$size:"sm",$outline:!0,children:"Previous"}),t.jsxs("span",{className:"w-secsub",children:[u," / ",E]}),t.jsx(se,{onClick:()=>f(S=>Math.min(E,S+1)),disabled:u===E,$size:"sm",$outline:!0,children:"Next"})]})]}):t.jsx(_e,{})},mm=({member:e,isCurrentUser:a})=>{var l,m;const s=e.user,r=(c="",d="")=>`${c[0]||""}${d[0]||""}`.toUpperCase()||"?",i=s?`${s.first_name||""} ${s.last_name||""}`.trim()||((l=s.primary_email_address)==null?void 0:l.email):"Unknown";return t.jsxs("div",{className:"w-flex w-items-center w-gap-3 w-grow",children:[t.jsx("div",{className:"w-avatar w-avatar--md",children:s!=null&&s.profile_picture_url?t.jsx("img",{src:s.profile_picture_url,alt:i}):r(s==null?void 0:s.first_name,s==null?void 0:s.last_name)}),t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-sec",children:i}),a&&t.jsx(fa,{$variant:"neutral",children:"You"})]}),t.jsx("span",{className:"w-secsub",children:(m=s==null?void 0:s.primary_email_address)==null?void 0:m.email})]})]})},pm=({member:e,roles:a,onToggle:s,disabled:r})=>{var c;const i=e.roles||[],l=d=>i.some(p=>p.id===d),m=i.length===0?"No role":i.length===1?(c=i[0])==null?void 0:c.name:`${i.length} roles`;return t.jsxs(_s,{children:[t.jsx(Cs,{children:t.jsxs(se,{$size:"sm",$outline:!0,disabled:r,className:"w-justify-between w-rolepick-btn",children:[m,t.jsx(Ut,{size:12})]})}),t.jsx(ks,{children:a.length===0?t.jsx("div",{className:"w-secsub w-menu-head",children:"No roles configured"}):a.map(d=>{const p=l(d.id);return t.jsx(ea,{onClick:()=>s(e,d,p),children:t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-3 w-full",children:[t.jsx("span",{children:d.name}),p&&t.jsx(Ye,{size:13,className:"w-text-primary"})]})},d.id)})})]})},hm=e=>{const a=e.expires_at;return a?new Date(a).getTime()<Date.now():!1},fm=({organization:e})=>{const{getOrganizationInvitations:a,getOrganizationRoles:s,discardOrganizationInvitation:r,resendOrganizationInvitation:i}=zt(),{toast:l}=Ct(),[m,c]=o.useState(!1),[d,p]=o.useState(new Set),u=o.useRef(null),{data:f=[],isLoading:h,mutate:g}=Se(e?`wacht-api-organizations:${e.id}:invitations`:null,()=>(a==null?void 0:a(e))||[]),{data:x=[],isLoading:w}=Se(e?`wacht-api-organizations:${e.id}:roles`:null,()=>(s==null?void 0:s(e))||[]),b=x,j=(N,_)=>{p(C=>{const y=new Set(C);return _?y.add(N):y.delete(N),y})},v=async N=>{j(N.id,!0);try{await r(e,N),g(),l("Invitation cancelled","info")}catch(_){l(_.message||"Failed to cancel invitation","error")}finally{j(N.id,!1)}},k=async N=>{j(N.id,!0);try{await i(e,N),l("Invitation resent","info")}catch(_){l(_.message||"Failed to resend invitation","error")}finally{j(N.id,!1)}};return h||w?t.jsx(_e,{}):t.jsxs(t.Fragment,{children:[t.jsxs(Ar,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Invitations"}),t.jsx("div",{className:"w-secsub",children:"Pending invites to join this organization."})]}),t.jsx(se,{ref:u,onClick:()=>c(!0),$size:"sm",children:"Invite"})]}),m&&t.jsx(Xc,{onClose:()=>c(!1),onSuccess:()=>{g(),c(!1)},roles:b,triggerRef:u}),f.length===0?t.jsx(Nt,{title:"No pending invitations",description:"Invite members to collaborate."}):t.jsx(pn,{children:t.jsxs(Ot,{children:[t.jsx(Zt,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Email"}),t.jsx(Fe,{children:"Role"}),t.jsx(Fe,{children:"Status"}),t.jsx(Fe,{children:"Invited"}),t.jsx(Fe,{})]})}),t.jsx(Ht,{children:f.map(N=>{var y;const _=hm(N),C=d.has(N.id);return t.jsxs(it,{children:[t.jsx(Xe,{children:N.email}),t.jsx(Xe,{children:((y=N.initial_organization_role)==null?void 0:y.name)||"No role"}),t.jsx(Xe,{children:_?t.jsx(fa,{$variant:"danger",children:"Expired"}):t.jsx(fa,{$variant:"warning",children:"Pending"})}),t.jsx(Xe,{children:new Date(N.created_at).toLocaleDateString()}),t.jsx(Ft,{children:t.jsxs("div",{className:"w-actions",children:[t.jsx(se,{$size:"sm",$outline:!0,disabled:C,onClick:()=>k(N),children:"Resend"}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,disabled:C,onClick:()=>v(N),children:C?t.jsx(_e,{size:12}):"Cancel"})]})})]},N.id)})})]})})]})},Vi=({onClose:e,onSuccess:a,role:s,triggerRef:r})=>{var _;const i=o.useRef(null),[l,m]=o.useState((s==null?void 0:s.name)||""),[c,d]=o.useState((s==null?void 0:s.permissions)||[]),[p,u]=o.useState(!1),[f,h]=o.useState(!1),{deployment:g}=Ce(),{toast:x}=Ct(),w=bt({contentRef:i,triggerRef:r??{current:null},isOpen:f,minWidth:400,defaultMaxHeight:500}),b=!!s,j=Array.isArray((_=g==null?void 0:g.b2b_settings)==null?void 0:_.organization_permissions)?g.b2b_settings.organization_permissions.map(C=>({value:C,label:C})):[];o.useEffect(()=>{h(!0);const C=A=>{i.current&&!i.current.contains(A.target)&&(e==null||e())},y=A=>{A.key==="Escape"&&(e==null||e())},E=setTimeout(()=>{document.addEventListener("mousedown",C),document.addEventListener("keydown",y)},100);return()=>{clearTimeout(E),document.removeEventListener("mousedown",C),document.removeEventListener("keydown",y)}},[e]);const v=C=>C.trim().replace(/[<>"'&]/g,""),k=C=>C.length>=2&&C.length<=50&&/^[a-zA-Z0-9\s_-]+$/.test(C),N=async()=>{const C=v(l);if(!C){x("Please enter a role name","error");return}if(!k(C)){x("Role name must be 2–50 characters, letters/numbers/spaces only.","error");return}if(c.length===0){x("Please select at least one permission","error");return}u(!0);try{const y={id:s==null?void 0:s.id,name:C,permissions:c};a==null||a(y)}catch(y){x(y.message||`Failed to ${b?"update":"create"} role. Please try again.`,"error")}finally{u(!1)}};return f?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:C=>C.stopPropagation(),role:"dialog","aria-labelledby":"role-dialog-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"role-dialog-title",children:b?"Edit role":"New role"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Name"}),t.jsx(ye,{type:"text",placeholder:"e.g. Admin, Editor, Viewer",value:l,onChange:C=>m(C.target.value),autoFocus:!0,"aria-label":"Role name"})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Permissions"}),t.jsx(Yc,{options:j,value:c,onChange:d,placeholder:"Select permissions","aria-label":"Select permissions for role"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:N,disabled:!l||p,children:p?t.jsx(_e,{size:12}):b?"Update":"Create"})]})]}):null};function Rr(e){return typeof e=="object"&&e!==null}function e0(e,a){const s=e[a];return typeof s=="string"?s.length>0&&s!=="0":typeof s=="number"?Number.isFinite(s)&&s>0:!1}function wm(e,a){const s=e[a];return typeof s=="boolean"?s:null}function t0(e){if(!Rr(e))return!1;const a=wm(e,"is_deployment_level");return a!==null?a:!1}function gm(e){return!Rr(e)||t0(e)?!1:e0(e,"organization_id")}function ur(e){return!Rr(e)||t0(e)?!1:e0(e,"workspace_id")}const xm=({organization:e})=>{var _;const{getOrganizationRoles:a,removeOrganizationRoles:s}=zt(),{deployment:r}=Ce(),[i,l]=o.useState({isOpen:!1}),[m,c]=o.useState(null),[d,p]=o.useState(null),[u,f]=o.useState(new Set),h=o.useRef(null),g=o.useRef(new Map),{data:x=[],isLoading:w,mutate:b}=Se(e?`wacht-api-organizations:${e.id}:roles`:null,()=>(a==null?void 0:a(e))||[]),j=(C,y)=>{f(E=>{const A=new Set(E);return y?A.add(C):A.delete(C),A})},v=async C=>{try{await new Promise(y=>setTimeout(y,500)),c({text:`Role ${C.id?"updated":"created"} successfully`,type:"success"}),l({isOpen:!1}),b()}catch(y){const E=y instanceof Error?y.message:"Failed to save role";c({text:E,type:"error"})}finally{setTimeout(()=>c(null),3e3)}},k=async C=>{j(C.id,!0);try{await s(e,C),b()}finally{j(C.id,!1),p(null)}};if(w&&x.length===0)return t.jsx(_e,{});const N=C=>{const y=gm(C),E=u.has(C.id),A=C.permissions.length;return t.jsxs(it,{children:[t.jsx(Xe,{children:t.jsxs("span",{className:"w-inline w-gap-2 w-sec",children:[C.name,!y&&t.jsx(fa,{$variant:"neutral",children:"Default"})]})}),t.jsx(Xe,{children:A===0?t.jsx(fa,{$variant:"neutral",children:"No permissions"}):t.jsxs("div",{className:"w-inline w-items-center w-gap-2",children:[t.jsxs(fa,{$variant:"primary",children:[A," ",A===1?"permission":"permissions"]}),t.jsx("span",{className:"w-truncate w-text-secondary w-maxw-sm",children:C.permissions.join(", ")})]})}),t.jsx(Ft,{children:y?t.jsxs("div",{className:"w-actions",children:[t.jsx(se,{ref:H=>{H&&g.current.set(C.id,H)},$size:"sm",$outline:!0,disabled:E,onClick:()=>l({isOpen:!0,role:C,triggerElement:g.current.get(C.id)??null}),children:"Edit"}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,disabled:E,onClick:()=>p(C.id),children:E?t.jsx(_e,{size:12}):"Delete"})]}):t.jsx("span",{className:"w-secsub",children:"Read-only"})})]},C.id)};return t.jsxs(t.Fragment,{children:[m&&t.jsxs("div",{className:`w-banner ${m.type==="success"?"w-banner--success":"w-banner--error"} w-mb-4`,children:[m.type==="success"?t.jsx(Ye,{size:16}):t.jsx(Fa,{size:16}),t.jsx("span",{className:"w-banner-txt",children:m.text})]}),t.jsxs(Ar,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Roles"}),t.jsx("div",{className:"w-secsub",children:"Define granular permissions for members."})]}),((_=r==null?void 0:r.b2b_settings)==null?void 0:_.custom_org_role_enabled)&&t.jsx(se,{ref:h,onClick:()=>l({isOpen:!0,triggerElement:h.current}),$size:"sm",children:"Add role"})]}),i.isOpen&&!i.role&&t.jsx(Vi,{onClose:()=>l({isOpen:!1}),onSuccess:v,triggerRef:{current:i.triggerElement||h.current}}),x.length===0?t.jsx(Nt,{title:"No roles yet",description:"Define custom roles to manage granular permissions."}):t.jsx(t.Fragment,{children:t.jsx(pn,{children:t.jsxs(Ot,{children:[t.jsx(Zt,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Role"}),t.jsx(Fe,{children:"Permissions"}),t.jsx(Fe,{})]})}),t.jsx(Ht,{children:x.map(N)})]})})}),d&&t.jsx(Qa,{title:"Delete role?",description:"This action cannot be undone. Users with this role might lose access to certain features.",onConfirm:()=>{const C=x.find(y=>y.id===d);C&&k(C)},onCancel:()=>p(null)}),i.isOpen&&i.role&&t.jsx(Vi,{role:i.role,onClose:()=>l({isOpen:!1}),onSuccess:v,triggerRef:{current:i.triggerElement||null}})]})},vm=()=>{const{activeOrganization:e,loading:a}=ga(),[s,r]=o.useState(null);return o.useEffect(()=>{e?r(e):!a&&!e&&s&&r(null)},[e,a,s]),{activeOrganization:s||e,loading:a}},a0=()=>{var w,b,j;const{loading:e,activeOrganization:a}=vm(),{updateOrganization:s}=ga(),{deployment:r}=Ce(),[i,l]=o.useState("general"),[m,c]=o.useState(null),[d,p]=o.useState("info"),[u,f]=o.useState(!1),h=o.useRef(null),g=o.useCallback((v,k="info")=>{c(v),p(k),setTimeout(()=>c(null),3e3)},[]),x=async v=>{var N;const k=(N=v.target.files)==null?void 0:N[0];if(k){if(k.size>2*1024*1024){g("File size cannot exceed 2MB","error");return}if(!k.type.startsWith("image/")){g("Please select a valid image file","error");return}try{f(!0),await s({image:k}),g("Logo updated","info")}catch(_){g((_==null?void 0:_.message)||"Failed to update logo","error")}finally{f(!1),h.current&&(h.current.value="")}}};return e&&!a?t.jsx($e,{children:t.jsx(Zn,{className:"w-items-center w-justify-center",children:t.jsx(_e,{})})}):a?t.jsx($e,{children:t.jsx(Oi,{children:t.jsx(Er.Provider,{value:{screen:null,setScreen:()=>{},toast:g},children:t.jsxs(Zn,{className:"w-relative",children:[t.jsxs(sm,{children:[t.jsxs("button",{type:"button",className:"w-avatar w-avatar--lg w-avatar-edit","data-busy":u?"":void 0,onClick:()=>{var v;return(v=h.current)==null?void 0:v.click()},disabled:u,title:"Change logo","aria-label":"Change organization logo",children:[a.image_url?t.jsx("img",{src:a.image_url,alt:a.name}):((w=a.name)==null?void 0:w.slice(0,2).toUpperCase())||"O",t.jsx("span",{className:"w-avatar-veil",children:u?t.jsx(_e,{size:14}):t.jsx(sn,{size:16})})]}),t.jsx("input",{ref:h,type:"file",accept:"image/*",style:{display:"none"},onChange:x}),t.jsxs(nm,{children:[t.jsx(rm,{children:a.name}),t.jsx(im,{children:a.member_count!=null?`${a.member_count} members`:"Organization settings"})]})]}),t.jsx(em,{children:t.jsxs(tm,{children:[t.jsx(za,{$isActive:i==="general",onClick:()=>l("general"),children:t.jsxs(Da,{children:[t.jsx(Ea,{size:16})," General"]})}),t.jsx(za,{$isActive:i==="domains",onClick:()=>l("domains"),children:t.jsxs(Da,{children:[t.jsx(Zu,{size:16})," Domains"]})}),t.jsx(za,{$isActive:i==="members",onClick:()=>l("members"),children:t.jsxs(Da,{children:[t.jsx(cs,{size:16})," Members"]})}),t.jsx(za,{$isActive:i==="invitations",onClick:()=>l("invitations"),children:t.jsxs(Da,{children:[t.jsx(hl,{size:16})," Invitations"]})}),((b=r==null?void 0:r.b2b_settings)==null?void 0:b.custom_org_role_enabled)&&t.jsx(za,{$isActive:i==="roles",onClick:()=>l("roles"),children:t.jsxs(Da,{children:[t.jsx(Xt,{size:16})," Roles"]})}),((j=r==null?void 0:r.b2b_settings)==null?void 0:j.enterprise_sso_enabled)&&t.jsx(za,{$isActive:i==="sso",onClick:()=>l("sso"),children:t.jsxs(Da,{children:[t.jsx(Xt,{size:16})," SSO"]})})]})}),t.jsxs(am,{children:[i==="general"&&t.jsx(lm,{organization:a}),i==="domains"&&t.jsx(dm,{organization:a}),i==="members"&&t.jsx(um,{organization:a}),i==="invitations"&&t.jsx(fm,{organization:a}),i==="roles"&&t.jsx(xm,{organization:a}),i==="sso"&&t.jsx(Q4,{organization:a})]}),m&&t.jsxs("div",{className:`w-toast w-toast--contained ${d==="error"?"w-toast--error":"w-toast--success"}`,children:[t.jsx("span",{className:"w-toast-ic",children:d==="error"?t.jsx(Fa,{size:12}):t.jsx(Ye,{size:12})}),t.jsx("span",{className:"w-toast-msg",children:m})]})]})})})}):t.jsx($e,{children:t.jsx(Oi,{children:t.jsx(Zn,{className:"w-items-center w-justify-center",children:t.jsxs("div",{className:"w-empty",children:[t.jsx("span",{className:"w-empty-ic",children:t.jsx(ps,{size:20})}),t.jsx("h4",{children:"No Organization Selected"}),t.jsx(d0,{})]})})})})},s0=({isOpen:e,onClose:a,title:s,showHeader:r,headerContent:i,footerContent:l,customContent:m,children:c,showCloseButton:d})=>t.jsx(Ue,{isOpen:e,onClose:a,children:t.jsx(Ue.Overlay,{children:t.jsxs(Ue.Content,{className:"w-dialog--panel",children:[r&&t.jsx(Ue.Header,{showCloseButton:d,children:i||s}),m||c||t.jsx(a0,{}),l&&t.jsx(Ue.Footer,{children:l})]})})}),Lr=({organizationId:e,onSuccess:a,onCancel:s,onCreateOrganization:r})=>t.jsx($e,{children:t.jsx("div",{className:"w-flex w-justify-center w-full",children:t.jsx(Qc,{mode:"ws",organizationId:e,onSuccess:a,onCancel:s,onCreateOrganization:r})})}),Pr=({isOpen:e,onClose:a,onCreated:s,organizationId:r})=>{const[i,l]=o.useState(!1),[m,c]=o.useState(r),d=()=>{s==null||s(),a==null||a()},p=()=>{l(!0)},u=f=>{var g,x,w;const h=((x=(g=f==null?void 0:f.data)==null?void 0:g.organization)==null?void 0:x.id)??((w=f==null?void 0:f.organization)==null?void 0:w.id)??(f==null?void 0:f.id);h&&c(h),l(!1)};return t.jsx($e,{children:t.jsx(Ue,{isOpen:e,onClose:a,children:t.jsx(Ue.Overlay,{children:t.jsx(Ue.Content,{className:"w-dialog--create",children:i?t.jsx(mn,{onSuccess:u,onCancel:()=>l(!1)}):t.jsx(Lr,{organizationId:m||r,onSuccess:d,onCancel:a,onCreateOrganization:p})})})})})},ft=(...e)=>e.filter(Boolean).join(" "),bm=({className:e,...a})=>t.jsx("div",{className:ft("w-contents",e),...a}),zi=({className:e,...a})=>t.jsx("div",{className:ft("w-card","w-flex-col","w-full","w-minh-full",e),...a}),ym=({className:e,...a})=>t.jsx("div",{className:ft("w-tabsbar",e),...a}),jm=({className:e,...a})=>t.jsx("div",{className:ft("w-flex","w-items-center","w-gap-1","w-tabs",e),...a}),Zs=({$isActive:e,className:a,...s})=>t.jsx("button",{className:ft("w-tab",e&&"w-tab--active",a),...s}),Hs=({className:e,...a})=>t.jsx("span",{className:ft("w-inline","w-gap-2",e),...a}),_m=({className:e,children:a,...s})=>t.jsx("div",{className:ft("w-tabbody",e),...s,children:t.jsx("div",{className:"w-tabpane",children:a})}),Js=o.forwardRef(({className:e,...a},s)=>t.jsx("button",{ref:s,className:ft("w-kebab",e),...a}));Js.displayName="IconButton";const n0=({className:e,...a})=>t.jsx("div",{className:ft("w-sechead",e),...a}),Di=({className:e,...a})=>t.jsx("div",{className:ft("w-flex","w-items-center","w-justify-between","w-gap-4",e),...a}),Ui=({className:e,...a})=>t.jsx("div",{className:ft("w-grow",e),...a}),Wi=({className:e,...a})=>t.jsx("div",{className:ft("w-flex","w-items-center","w-gap-3","w-none",e),...a}),$r=({className:e,...a})=>t.jsx("div",{className:ft("w-full",e),...a}),km=({className:e,...a})=>t.jsx("div",{className:ft("w-page-head",e),...a}),Cm=({className:e,...a})=>t.jsx("div",{className:ft("w-grow","w-flex-col","w-gap-1",e),...a}),Nm=({className:e,...a})=>t.jsx("div",{className:ft("w-sec","w-truncate",e),...a}),Sm=({className:e,...a})=>t.jsx("div",{className:ft("w-secsub","w-truncate",e),...a}),Bi=({$first:e,className:a,...s})=>t.jsx("div",{className:ft("w-sec",a),...s}),Em=()=>{var E,A;const{activeWorkspace:e,loading:a,updateWorkspace:s}=Dt(),{deleteWorkspace:r}=va(),{deployment:i}=Ce(),{toast:l}=Ct(),[m,c]=o.useState((e==null?void 0:e.name)||""),[d,p]=o.useState((e==null?void 0:e.description)||""),[u,f]=o.useState({mfa_required:!1,ip_restrictions:!1,allowed_ips:""}),[h,g]=o.useState(!1),[x,w]=o.useState(""),[b,j]=o.useState(!1),[v,k]=o.useState(!1);o.useEffect(()=>{var H;e&&(c(e.name||""),p(e.description||""),f({mfa_required:e.enforce_2fa||!1,ip_restrictions:e.enable_ip_restriction||!1,allowed_ips:((H=e.whitelisted_ips)==null?void 0:H.join(`
106
- `))||""}))},[e]);const N=async()=>{if(!(!e||h))try{g(!0),await s({name:m,description:d,enforce_2fa:u.mfa_required,enable_ip_restriction:u.ip_restrictions,whitelisted_ips:u.allowed_ips.split(`
107
- `).filter(H=>H.trim())}),l("Changes saved","info")}catch(H){l(H.message||"Failed to save changes","error")}finally{g(!1)}},_=async()=>{if(!(!e||x!==e.name))try{j(!0),await r(e),l("Workspace deleted","info")}catch{l("Failed to delete workspace","error")}finally{j(!1),w("")}};if(a&&!e)return t.jsx(_e,{});if(!e)return null;const C=(E=i==null?void 0:i.b2b_settings)==null?void 0:E.enforce_mfa_per_workspace_enabled,y=(A=i==null?void 0:i.b2b_settings)==null?void 0:A.ip_allowlist_per_workspace_enabled;return t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"name",children:"Workspace name"}),t.jsx(ye,{id:"name",value:m,onChange:H=>c(H.target.value),onBlur:N,placeholder:"Workspace name",required:!0})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"description",children:"Description"}),t.jsx(ye,{id:"description",as:"textarea",value:d,onChange:H=>p(H.target.value),onBlur:N,placeholder:"Optional description",className:"w-input--area"})]})]}),(C||y)&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(Bi,{children:"Security"}),C&&t.jsxs(Di,{children:[t.jsxs(Ui,{children:[t.jsx("div",{className:"w-sec",children:"Multi-factor authentication"}),t.jsx("p",{className:"w-secsub",children:"Require all workspace members to set up MFA."})]}),t.jsx(Wi,{children:t.jsx(Za,{checked:u.mfa_required,onChange:()=>{f(H=>({...H,mfa_required:!H.mfa_required})),setTimeout(N,0)}})})]}),y&&t.jsxs(t.Fragment,{children:[t.jsxs(Di,{children:[t.jsxs(Ui,{children:[t.jsx("div",{className:"w-sec",children:"IP restrictions"}),t.jsx("p",{className:"w-secsub",children:"Only allow access from specific IP addresses."})]}),t.jsx(Wi,{children:t.jsx(Za,{checked:u.ip_restrictions,onChange:()=>{f(H=>({...H,ip_restrictions:!H.ip_restrictions})),setTimeout(N,0)}})})]}),u.ip_restrictions&&t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"allowed_ips",children:"Allowed IP addresses"}),t.jsx(ye,{id:"allowed_ips",as:"textarea",value:u.allowed_ips,onChange:H=>f(M=>({...M,allowed_ips:H.target.value})),onBlur:N,placeholder:`192.168.1.1
108
- 10.0.0.0/24`,className:"w-input--area w-mono-sm"})]})]})]}),t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(Bi,{children:"Danger zone"}),t.jsxs("div",{className:"w-danger",children:[t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:"Delete workspace"}),t.jsx("div",{className:"w-secsub",children:"Once you delete this workspace, there is no going back."})]}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,onClick:()=>{k(!v),w("")},children:v?"Cancel":"Delete workspace"})]}),v&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs(Ge,{children:[t.jsxs(Ve,{htmlFor:"confirm_workspace_name",children:["Type ",t.jsx("strong",{children:e.name})," to confirm"]}),t.jsx(ye,{id:"confirm_workspace_name",type:"text",value:x,onChange:H=>w(H.target.value),placeholder:e.name})]}),t.jsx(se,{$size:"sm",$destructive:!0,onClick:_,disabled:x!==e.name||b,children:b?t.jsx(_e,{size:12}):"Delete forever"})]})]})]})},Am=({onClose:e,onSuccess:a,roles:s,triggerRef:r})=>{const i=o.useRef(null),[l,m]=o.useState(""),[c,d]=o.useState(null),[p,u]=o.useState(!1),[f,h]=o.useState(!1),{toast:g}=Ct(),{inviteMember:x}=Dt(),w=bt({contentRef:i,triggerRef:r??{current:null},isOpen:f,minWidth:360,defaultMaxHeight:320}),b=s.map(k=>({value:k.id,label:k.name}));o.useEffect(()=>{h(!0);const k=C=>{i.current&&!i.current.contains(C.target)&&(e==null||e())},N=C=>{C.key==="Escape"&&(e==null||e())},_=setTimeout(()=>{document.addEventListener("mousedown",k),document.addEventListener("keydown",N)},100);return()=>{clearTimeout(_),document.removeEventListener("mousedown",k),document.removeEventListener("keydown",N)}},[e]);const j=k=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k),v=async()=>{const k=l.trim().toLowerCase();if(!(!k||!c)){if(!j(k)){g("Please enter a valid email address","error");return}if(k.length>320){g("Email address is too long","error");return}u(!0);try{await x({email:k,workspaceRoleId:c.id}),a==null||a()}catch(N){const _=N.message||"Failed to send invitation. Please try again.";g(_,"error")}finally{u(!1)}}};return f?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,maxHeight:w!=null&&w.maxHeight?`${w.maxHeight}px`:void 0,visibility:w?"visible":"hidden"},onClick:k=>k.stopPropagation(),role:"dialog","aria-labelledby":"invite-workspace-member-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"invite-workspace-member-title",children:"Invite member"}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Email Address"}),t.jsx(ye,{type:"email",placeholder:"colleague@company.com",value:l,onChange:k=>m(k.target.value),autoFocus:!0,"aria-label":"Email address for workspace invitation","aria-describedby":"workspace-email-help"})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Role"}),t.jsx(un,{options:b,value:c==null?void 0:c.id,onChange:k=>d(s.find(N=>N.id===k)),placeholder:"Select a role","aria-label":"Select role for invited workspace member"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:v,disabled:!l||!c||p,children:p?t.jsx(_e,{size:14}):"Send invite"})]})]}):null},Mm=()=>{const{activeWorkspace:e,getMembers:a,getRoles:s,removeMember:r,addMemberRole:i,removeMemberRole:l}=Dt(),{session:m}=ot(),{toast:c}=Ct(),[d,p]=o.useState(""),[u,f]=o.useState(1),[h]=o.useState(10),[g,x]=o.useState(""),[w,b]=o.useState(!1),j=o.useRef(null);o.useEffect(()=>{const M=setTimeout(()=>{x(d),f(1)},500);return()=>clearTimeout(M)},[d]);const{data:v,mutate:k}=Se(e?`wacht-api-workspaces:${e.id}:members:${u}:${h}:${g}`:null,()=>a==null?void 0:a({page:u,limit:h,search:g}),{keepPreviousData:!0}),N=(v==null?void 0:v.data)||[],_=(v==null?void 0:v.meta)||{total:0,limit:10},C=Math.ceil(_.total/(_.limit||10)),{data:y=[]}=Se(e?`wacht-api-workspaces:${e.id}:roles`:null,()=>s()||[]),E=y,A=async(M,T,P)=>{try{P?(await l(M,T),c("Role removed","info")):(await i(M,T),c("Role added","info")),k()}catch{c("Failed to update role","error")}},H=async M=>{try{await r(M),c("Member removed","info"),k()}catch{c("Failed to remove member","error")}};return v?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-toolbar",children:[t.jsx(Gc,{value:d,onChange:p,placeholder:"Search members..."}),t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[_.total>0&&t.jsxs("div",{className:"w-text-muted w-secsub",children:[_.total," member",_.total!==1?"s":""]}),t.jsx(se,{ref:j,onClick:()=>b(!0),$size:"sm",children:"Invite"})]})]}),w&&t.jsx(Am,{onClose:()=>b(!1),onSuccess:()=>{k(),b(!1)},roles:E,triggerRef:j}),N.length===0?t.jsx(Nt,{title:d?"No members match":"No members yet",description:"Members added to the organization can be invited here."}):t.jsx(t.Fragment,{children:t.jsx($r,{children:t.jsxs(Ot,{children:[t.jsx(Zt,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Member"}),t.jsx(Fe,{children:"Joined"}),t.jsx(Fe,{children:"Role"})]})}),t.jsx(Ht,{children:N.map(M=>t.jsxs(it,{children:[t.jsx(Xe,{children:t.jsx(Rm,{member:M,session:m})}),t.jsx(Xe,{children:new Date(M.created_at).toLocaleDateString()}),t.jsx(Ft,{children:t.jsx(Lm,{member:M,roles:E,onToggle:(T,P)=>A(M.id,T,P),onRemove:()=>H(M.id)})})]},M.id))})]})})}),C>1&&t.jsxs("div",{className:"w-flex w-items-center w-justify-center w-gap-4",children:[t.jsx(se,{onClick:()=>f(M=>Math.max(1,M-1)),disabled:u===1,$size:"sm",children:"Previous"}),t.jsxs("span",{className:"w-secsub",children:[u," / ",C]}),t.jsx(se,{onClick:()=>f(M=>Math.min(C,M+1)),disabled:u===C,$size:"sm",children:"Next"})]})]}):t.jsx(_e,{})},Rm=({member:e,session:a,subtitle:s})=>{var m,c,d;const r=e.public_user_data||e.user,i=(r==null?void 0:r.id)===((m=a==null?void 0:a.active_signin)==null?void 0:m.user_id),l=(p="",u="")=>`${p[0]||""}${u[0]||""} `.toUpperCase();return t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[t.jsx("div",{className:"w-avatar",children:r!=null&&r.profile_picture_url?t.jsx("img",{src:r.profile_picture_url,alt:"Avatar"}):l(r==null?void 0:r.first_name,r==null?void 0:r.last_name)||"?"}),t.jsxs("div",{children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-sec",children:r?`${r.first_name||""} ${r.last_name||""} `.trim()||((c=r.primary_email_address)==null?void 0:c.email):"Unknown"}),i&&t.jsx("span",{className:"w-pill",children:"You"})]}),t.jsxs("div",{className:"w-flex w-wrap w-gap-2 w-secsub",children:[t.jsx("span",{children:(d=r==null?void 0:r.primary_email_address)==null?void 0:d.email}),s&&t.jsxs("span",{className:"w-text-muted",children:["• ",s]})]})]})]})},Lm=({member:e,roles:a,onToggle:s,onRemove:r})=>{var m;const i=e.roles||[],l=c=>i.some(d=>d.id===c);return t.jsxs(_s,{children:[t.jsx(Cs,{children:t.jsxs(se,{$outline:!0,$size:"sm",className:"w-justify-between w-rolepick-btn",children:[i.length>0?(m=i==null?void 0:i[0])==null?void 0:m.name:"No role"," ",t.jsx(Ut,{size:14})]})}),t.jsxs(ks,{children:[a.map(c=>{const d=l(c.id);return t.jsx(ea,{onClick:()=>s(c.id,d),children:t.jsxs("div",{className:"w-flex w-justify-between w-full w-gap-3",children:[t.jsx("span",{children:c.name}),d&&t.jsx(Ye,{size:14,className:"w-text-success"})]})},c.id)}),t.jsx(Wc,{}),t.jsx(ea,{$destructive:!0,onClick:r,children:t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx(xr,{size:14})," Remove Member"]})})]})]})},Pm=({onClose:e,onSuccess:a,roles:s,createInvitation:r,triggerRef:i})=>{const l=o.useRef(null),[m,c]=o.useState(""),[d,p]=o.useState(s[0]||null),[u,f]=o.useState(!1),[h,g]=o.useState(!1),{toast:x}=Ct(),w=bt({contentRef:l,triggerRef:i,isOpen:h,minWidth:360,defaultMaxHeight:320}),b=s.map(k=>({value:k.id,label:k.name})),j=k=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k),v=async()=>{const k=m.trim().toLowerCase();if(!(!k||!d)){if(!j(k)){x("Please enter a valid email address","error");return}if(k.length>320){x("Email address is too long","error");return}f(!0);try{await r({email:k,role_id:d.id}),a()}catch(N){x(N.message||"Failed to send invitation. Please try again.","error")}finally{f(!1)}}};return o.useEffect(()=>{g(!0);const k=_=>{l.current&&!l.current.contains(_.target)&&(e==null||e())},N=_=>{_.key==="Escape"&&(e==null||e())};return document.addEventListener("mousedown",k),document.addEventListener("keydown",N),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",N)}},[e]),h?t.jsxs("div",{ref:l,className:"w-pop w-pop--wide w-pop-body",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:k=>k.stopPropagation(),role:"dialog","aria-labelledby":"invite-member-title","aria-modal":"true",children:[t.jsx("div",{className:"w-pop-title",id:"invite-member-title",children:"Invite member"}),t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",children:"Email"}),t.jsx(ye,{type:"email",placeholder:"colleague@company.com",value:m,onChange:k=>c(k.target.value),onKeyDown:k=>{k.key==="Enter"&&m&&d&&v()},autoFocus:!0,"aria-label":"Email address for invitation"})]}),t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",children:"Role"}),t.jsx(un,{options:b,value:d==null?void 0:d.id,onChange:k=>p(s.find(N=>N.id===k)),placeholder:"Select a role","aria-label":"Select role for invited member"})]}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx(se,{$size:"sm",$outline:!0,$fullWidth:!0,onClick:e,children:"Cancel"}),t.jsx(se,{$size:"sm",$fullWidth:!0,onClick:v,disabled:!m||!d||u,children:u?t.jsx(_e,{size:12}):"Send invite"})]})]}):null},$m=()=>{const{activeWorkspace:e,loading:a,getRoles:s,getInvitations:r,inviteMember:i,discardInvitation:l,resendInvitation:m}=Dt(),{toast:c}=Ct(),[d,p]=o.useState(!0),[u,f]=o.useState(!0),[h,g]=o.useState([]),[x,w]=o.useState([]),[b,j]=o.useState(!1),v=o.useRef(null),k=async()=>{if(e){p(!0),f(!0);try{const[C,y]=await Promise.all([s(),r()]);w(C),g(y)}catch{}finally{p(!1),f(!1)}}};o.useEffect(()=>{k()},[e==null?void 0:e.id]);const N=async C=>{try{await l(C),k(),c("Invitation cancelled","info")}catch{c("Failed to cancel invitation","error")}},_=async C=>{try{await m(C),k(),c("Invitation resent","info")}catch{c("Failed to resend invitation","error")}};return a||d||u?t.jsx(_e,{}):t.jsxs(t.Fragment,{children:[t.jsxs(n0,{children:[t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:"Invitations"}),t.jsx("div",{className:"w-secsub",children:"Pending invites to join this workspace."})]}),t.jsx(se,{ref:v,onClick:()=>j(!0),$size:"sm",children:"Invite"})]}),b&&t.jsx(Pm,{onClose:()=>j(!1),onSuccess:()=>{k(),j(!1),c("Invitation sent","info")},roles:x,createInvitation:C=>i({email:C.email,workspaceRoleId:C.role_id}),triggerRef:v}),h.length===0?t.jsx(Nt,{title:"No pending invitations",description:"Invite members to your workspace."}):t.jsx(t.Fragment,{children:t.jsx($r,{children:t.jsxs(Ot,{children:[t.jsx(Zt,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Email"}),t.jsx(Fe,{children:"Role"}),t.jsx(Fe,{children:"Invited"}),t.jsx(Fe,{})]})}),t.jsx(Ht,{children:h.map(C=>{var y,E;return t.jsxs(it,{children:[t.jsx(Xe,{children:C.email}),t.jsx(Xe,{children:((y=C.initial_workspace_role)==null?void 0:y.name)||((E=C.initial_organization_role)==null?void 0:E.name)||"No role"}),t.jsx(Xe,{children:new Date(C.created_at).toLocaleDateString()}),t.jsx(Ft,{children:t.jsx(Om,{onResend:()=>_(C.id),onCancel:()=>N(C.id)})})]},C.id)})})]})})})]})},Om=({onResend:e,onCancel:a})=>t.jsxs(_s,{children:[t.jsx(Cs,{children:t.jsx(Js,{children:"•••"})}),t.jsxs(ks,{children:[t.jsxs(ea,{onClick:e,children:[t.jsx(Ll,{size:16})," Resend"]}),t.jsxs(ea,{$destructive:!0,onClick:a,children:[t.jsx(xr,{size:16})," Cancel"]})]})]}),Gi=({onClose:e,onSuccess:a,role:s,triggerRef:r})=>{var C,y;const i=o.useRef(null),[l,m]=o.useState((s==null?void 0:s.name)||""),[c,d]=o.useState((s==null?void 0:s.permissions)||[]),[p,u]=o.useState(!1),[f,h]=o.useState(!1),{deployment:g}=Ce(),{toast:x}=Ct(),w=bt({contentRef:i,triggerRef:r??{current:null},isOpen:f,minWidth:400,defaultMaxHeight:500}),b=!!s,j=((C=g==null?void 0:g.b2b_settings)==null?void 0:C.workspace_permissions)||((y=g==null?void 0:g.b2b_settings)==null?void 0:y.organization_permissions)||[],v=Array.isArray(j)?j.map(E=>({value:E,label:E})):[];o.useEffect(()=>{h(!0);const E=M=>{i.current&&!i.current.contains(M.target)&&(e==null||e())},A=M=>{M.key==="Escape"&&(e==null||e())},H=setTimeout(()=>{document.addEventListener("mousedown",E),document.addEventListener("keydown",A)},100);return()=>{clearTimeout(H),document.removeEventListener("mousedown",E),document.removeEventListener("keydown",A)}},[e]);const k=E=>E.trim().replace(/[<>"'&]/g,""),N=E=>E.length>=2&&E.length<=50&&/^[a-zA-Z0-9\s_-]+$/.test(E),_=async()=>{const E=k(l);if(!E){x("Please enter a role name","error");return}if(!N(E)){x("Role name must be 2–50 characters, letters/numbers/spaces only.","error");return}if(c.length===0){x("Please select at least one permission","error");return}u(!0);try{const A={id:s==null?void 0:s.id,name:E,permissions:c};a==null||a(A)}catch(A){x(A.message||`Failed to ${b?"update":"create"} role. Please try again.`,"error")}finally{u(!1)}};return f?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:E=>E.stopPropagation(),role:"dialog","aria-labelledby":"role-dialog-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"role-dialog-title",children:b?"Edit role":"New role"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Name"}),t.jsx(ye,{type:"text",placeholder:"e.g. Admin, Editor, Viewer",value:l,onChange:E=>m(E.target.value),autoFocus:!0,"aria-label":"Role name"})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Permissions"}),t.jsx(Yc,{options:v,value:c,onChange:d,placeholder:"Select permissions","aria-label":"Select permissions for role"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:_,disabled:!l||p,children:p?t.jsx(_e,{size:12}):b?"Update":"Create"})]})]}):null},Zm=()=>{var N;const{activeWorkspace:e,loading:a,getRoles:s,createRole:r,deleteRole:i}=Dt(),{deployment:l}=Ce(),{toast:m}=Ct(),[c,d]=o.useState({isOpen:!1}),[p,u]=o.useState(null),[f,h]=o.useState(null),g=o.useRef(null),x=o.useRef(new Map),{data:w=[],isLoading:b,mutate:j}=Se(e?`wacht-api-workspaces:${e.id}:roles`:null,()=>s()||[]),v=async _=>{try{await r(_.name,_.permissions||[]),m("Role saved successfully","info"),d({isOpen:!1}),j()}catch{m("Failed to save role","error")}},k=async _=>{try{await i(_),m("Role deleted","info"),u(null),j()}catch{m("Failed to delete role","error")}};return a||b?t.jsx(_e,{}):t.jsxs(t.Fragment,{children:[t.jsxs(n0,{children:[t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:"Roles"}),t.jsx("div",{className:"w-secsub",children:"Define granular permissions for this workspace."})]}),((N=l==null?void 0:l.b2b_settings)==null?void 0:N.custom_workspace_role_enabled)&&t.jsx(se,{ref:g,onClick:()=>d({isOpen:!0,triggerElement:g.current}),$size:"sm",children:"Add role"})]}),c.isOpen&&!c.role&&t.jsx(Gi,{triggerRef:{current:c.triggerElement||null},onClose:()=>d({isOpen:!1}),onSuccess:v}),w.length===0?t.jsx(Nt,{title:"No roles yet",description:"Create workspace-specific roles to manage access."}):t.jsx(t.Fragment,{children:t.jsx($r,{children:t.jsxs(Ot,{children:[t.jsx(Zt,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Role"}),t.jsx(Fe,{children:"Permissions"}),t.jsx(Fe,{})]})}),t.jsx(Ht,{children:w.map(_=>{var C;return t.jsxs(it,{children:[t.jsx(Xe,{children:t.jsxs("div",{className:"w-flex w-items-center w-gap-2 w-wrap",children:[t.jsx("span",{className:"w-sec",children:_.name}),!ur(_)&&t.jsx("span",{className:"w-pill",children:"Default"})]})}),t.jsx(Xe,{children:t.jsxs("span",{className:"w-text-secondary",children:[(C=_.permissions)==null?void 0:C.join(", "),!ur(_)&&" • Cannot be edited or deleted"]})}),t.jsx(Ft,{children:t.jsx(Hm,{role:_,onEdit:y=>d({isOpen:!0,role:_,triggerElement:y}),onDelete:()=>u(_.id),open:f===_.id,onOpenChange:y=>h(y?_.id:null),dropdownButtonRefs:x})})]},_.id)})})]})})}),p&&t.jsx(Qa,{title:"Delete role?",description:"Are you sure? This will remove the role from all workspace members.",onConfirm:()=>{const _=w.find(C=>C.id===p);_&&k(_)},onCancel:()=>u(null)}),c.isOpen&&c.role&&t.jsx(Gi,{role:c.role,triggerRef:{current:c.triggerElement||null},onClose:()=>d({isOpen:!1}),onSuccess:v})]})},Hm=({role:e,onEdit:a,onDelete:s,open:r,onOpenChange:i,dropdownButtonRefs:l})=>ur(e)?t.jsxs(_s,{open:r,openChange:i,children:[t.jsx(Cs,{children:t.jsx(Js,{ref:c=>{c&&l.current.set(e.id,c)},children:"•••"})}),t.jsxs(ks,{children:[t.jsx(ea,{onClick:()=>a(l.current.get(e.id)??null),children:"Edit Role"}),t.jsxs(ea,{$destructive:!0,onClick:s,children:[t.jsx(xr,{size:16})," Remove Role"]})]})]}):t.jsx(Js,{disabled:!0,title:"Deployment roles cannot be edited","aria-label":"Deployment roles cannot be edited",children:"•••"}),Fm=e=>(e||"").slice(0,2).toUpperCase()||"W",r0=()=>{var b,j;const{activeWorkspace:e,loading:a,updateWorkspace:s}=Dt(),{deployment:r}=Ce(),[i,l]=o.useState("general"),[m,c]=o.useState(null),[d,p]=o.useState("info"),[u,f]=o.useState(!1),h=o.useRef(null),g=o.useCallback((v,k="info")=>{c(v),p(k),setTimeout(()=>c(null),3e3)},[]),x=async v=>{var N;const k=(N=v.target.files)==null?void 0:N[0];if(k){if(k.size>2*1024*1024){g("File size cannot exceed 2MB","error");return}if(!k.type.startsWith("image/")){g("Please select a valid image file","error");return}try{f(!0),await s({image:k}),g("Logo updated","info")}catch(_){g((_==null?void 0:_.message)||"Failed to update logo","error")}finally{f(!1),h.current&&(h.current.value="")}}};if(a&&!e)return t.jsx($e,{children:t.jsx(zi,{className:"w-items-center w-justify-center",children:t.jsx(_e,{})})});if(!e)return null;const w=(b=e.organization)==null?void 0:b.name;return t.jsx($e,{children:t.jsx(bm,{children:t.jsx(Er.Provider,{value:{screen:null,setScreen:()=>{},toast:g},children:t.jsxs(zi,{className:"w-relative",children:[t.jsxs(km,{children:[t.jsxs("button",{type:"button",className:"w-avatar w-avatar--lg w-avatar-edit",onClick:()=>{var v;return(v=h.current)==null?void 0:v.click()},disabled:u,"data-busy":u?"":void 0,title:"Change logo","aria-label":"Change workspace logo",children:[e.image_url?t.jsx("img",{src:e.image_url,alt:e.name}):Fm(e.name),t.jsx("span",{className:"w-avatar-veil",children:u?t.jsx(_e,{size:14}):t.jsx(sn,{size:16})})]}),t.jsx("input",{ref:h,type:"file",accept:"image/*",className:"w-none",hidden:!0,onChange:x}),t.jsxs(Cm,{children:[t.jsx(Nm,{children:e.name}),t.jsx(Sm,{children:w?`${w} · Workspace settings`:"Workspace settings"})]})]}),t.jsx(ym,{children:t.jsxs(jm,{children:[t.jsx(Zs,{$isActive:i==="general",onClick:()=>l("general"),children:t.jsxs(Hs,{children:[t.jsx(Ea,{size:14})," General"]})}),t.jsx(Zs,{$isActive:i==="members",onClick:()=>l("members"),children:t.jsxs(Hs,{children:[t.jsx(cs,{size:14})," Members"]})}),t.jsx(Zs,{$isActive:i==="invitations",onClick:()=>l("invitations"),children:t.jsxs(Hs,{children:[t.jsx(Ll,{size:14})," Invitations"]})}),((j=r==null?void 0:r.b2b_settings)==null?void 0:j.custom_workspace_role_enabled)&&t.jsx(Zs,{$isActive:i==="roles",onClick:()=>l("roles"),children:t.jsxs(Hs,{children:[t.jsx(Xt,{size:14})," Roles"]})})]})}),t.jsxs(_m,{children:[i==="general"&&t.jsx(Em,{}),i==="members"&&t.jsx(Mm,{}),i==="invitations"&&t.jsx($m,{}),i==="roles"&&t.jsx(Zm,{})]}),m&&t.jsxs("div",{className:`w-toast w-toast--contained ${d==="error"?"w-toast--error":"w-toast--success"}`,children:[t.jsx("span",{className:"w-toast-ic",children:d==="error"?t.jsx(Fa,{size:14}):t.jsx(Ye,{size:14})}),t.jsx("span",{className:"w-toast-msg",children:m})]})]})})})})},Or=({isOpen:e,onClose:a,title:s,showHeader:r,headerContent:i,footerContent:l,customContent:m,children:c,showCloseButton:d})=>t.jsx(Ue,{isOpen:e,onClose:a,children:t.jsx(Ue.Overlay,{children:t.jsxs(Ue.Content,{className:"w-dialog--panel",children:[r&&t.jsx(Ue.Header,{showCloseButton:d,children:i||s}),m||c||t.jsx(r0,{}),l&&t.jsx(Ue.Footer,{children:l})]})})}),i0=["organization:admin"],o0=["organization:admin","organization:manage"],l0=["workspace:admin"],c0=["workspace:admin","workspace:manage"];function Zr(e,a){return e!=null&&e.roles?e.roles.some(s=>{var r;return(r=s.permissions)==null?void 0:r.some(i=>a.includes(i))}):!1}function Hr(e){return Zr(e,o0)}function Tm(e){return Zr(e,i0)}function Fr(e,a){return e!=null&&e.roles?e.roles.some(s=>{var r;return(r=s.permissions)==null?void 0:r.some(i=>a.includes(i))}):!1}function Tr(e){return Fr(e,c0)}function Im(e){return Fr(e,l0)}const d0=({showPersonal:e=!0})=>{var Re,ce,B;const[a,s]=o.useState(!1),[r,i]=o.useState(!1),[l,m]=o.useState(new Set),c=o.useRef(null),d=o.useRef(null),p=bt({triggerRef:c,isOpen:a,minWidth:300}),u=Kt(!1),f=Kt(!1),h=Kt(!1),g=Kt(!1),[x,w]=o.useState(null),[b,j]=o.useState(null),v=ts(),{organizationMemberships:k,loading:N,refetch:_}=xa(),{activeOrganization:C,activeMembership:y,leave:E}=ga(),{activeWorkspace:A,activeMembership:H,leave:M}=Dt(),{workspaces:T,loading:P}=va(),{session:S,switchOrganization:$,switchWorkspace:Z}=ot(),{deployment:R}=Ce(),L=R==null?void 0:R.b2b_settings.organizations_enabled,O=L&&(R==null?void 0:R.b2b_settings.workspaces_enabled),F=R==null?void 0:R.b2b_settings.allow_users_to_create_orgs,W=!y,U=o.useMemo(()=>{var X,oe;return W?{name:"Personal account",image_url:(oe=(X=S==null?void 0:S.active_signin)==null?void 0:X.user)==null?void 0:oe.profile_picture_url,isPersonal:!0}:{name:O&&A?`${C==null?void 0:C.name} / ${A.name}`:(C==null?void 0:C.name)||"",image_url:C==null?void 0:C.image_url,isPersonal:!1}},[W,C,A,S,O]);if(o.useEffect(()=>{C&&O&&m(q=>{if(q.has(C.id))return q;const X=new Set(q);return X.add(C.id),X})},[C,O]),o.useEffect(()=>{if(!a)return;let q=null;const X=setTimeout(()=>{const oe=Ee=>{var D,we;const z=Ee.target;(D=c.current)!=null&&D.contains(z)||(we=d.current)!=null&&we.contains(z)||(s(!1),j(null))};document.addEventListener("mousedown",oe),q=()=>document.removeEventListener("mousedown",oe)},50);return()=>{clearTimeout(X),q==null||q()}},[a]),o.useEffect(()=>{if(!b)return;const q=setTimeout(()=>j(null),5e3);return()=>clearTimeout(q)},[b]),!L)return null;const V=q=>q.split(" ").map(X=>X[0]).join("").toUpperCase().slice(0,2),G=q=>{i(!0),$(q).finally(()=>i(!1))},Y=q=>{i(!0),Z(q).finally(()=>i(!1))},de=q=>{m(X=>{const oe=new Set(X);return oe.has(q)?oe.delete(q):oe.add(q),oe})},fe=()=>{f.open(),s(!1)},ne=()=>{g.open(),s(!1)},ae=async()=>{if(E){j(null);try{await E(),await _(),s(!1)}catch(q){j(q instanceof Error?q.message:"Failed to leave organization")}}},re=async()=>{if(M){j(null);try{await M(),s(!1)}catch(q){j(q instanceof Error?q.message:"Failed to leave workspace")}}},Le=!!((Re=y==null?void 0:y.eligibility_restriction)!=null&&Re.type)&&y.eligibility_restriction.type!=="none",K=!!C&&!Le&&Hr(y),at=!!O&&!!A&&!Le&&Tr(H);return!!!S||N||O&&P?t.jsx($e,{children:t.jsx("div",{className:"w-full w-relative",children:t.jsxs("div",{className:"w-combo",children:[t.jsx("span",{className:"w-skel",style:{width:20,height:20}}),t.jsx("span",{className:"w-skel w-grow",style:{height:12}})]})})}):t.jsx($e,{children:t.jsxs("div",{className:"w-full w-relative",children:[t.jsxs("button",{ref:c,className:"w-orgtrigger","data-open":a?"":void 0,onClick:()=>{s(!a),a||j(null)},disabled:r,children:[t.jsx("span",{className:`w-avatar w-avatar--sm${U.isPersonal,""}`,children:U.image_url?t.jsx("img",{src:U.image_url,alt:U.name}):U.isPersonal?t.jsx(hs,{size:11}):V(U.name)}),t.jsx("span",{className:"w-grow w-truncate",children:U.name}),t.jsx(Au,{size:13})]}),typeof window<"u"&&en.createPortal(t.jsxs("div",{ref:d,className:"wacht-root w-menu w-flex-col",style:{position:"fixed",width:300,maxWidth:"calc(100vw - 16px)",maxHeight:p!=null&&p.maxHeight?`${p.maxHeight}px`:420,padding:0,zIndex:99999,top:(p==null?void 0:p.top)!==void 0?`${p.top}px`:void 0,bottom:(p==null?void 0:p.bottom)!==void 0?`${p.bottom}px`:void 0,left:(p==null?void 0:p.left)!==void 0?`${p.left}px`:void 0,right:(p==null?void 0:p.right)!==void 0?`${p.right}px`:void 0,visibility:p&&a?"visible":"hidden",opacity:a&&p?1:0,transform:a?"translateY(0)":"translateY(-4px)",pointerEvents:a?"auto":"none",transition:`opacity 0.15s ease, transform 0.15s ease, visibility 0s linear ${a?"0s":"0.15s"}`,...v},children:[b&&t.jsxs("div",{className:"w-banner w-banner--error w-switch-banner",children:[t.jsx(Ma,{size:13}),t.jsx("span",{className:"w-banner-txt w-text-error",children:b})]}),t.jsx("div",{className:"w-grow w-switch-body",children:N||P?t.jsx(t.Fragment,{children:[1,2,3].map(q=>t.jsxs("div",{className:"w-flex w-items-center w-gap-3",style:{padding:"0 8px",height:34},children:[t.jsx("span",{className:"w-skel",style:{width:22,height:22}}),t.jsx("span",{className:"w-skel",style:{width:q===2?"60%":"80%",height:11}})]},q))}):t.jsxs(t.Fragment,{children:[e&&t.jsxs("button",{className:"w-menu-item",onClick:()=>{W||G()},disabled:r||W,children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:(B=(ce=S==null?void 0:S.active_signin)==null?void 0:ce.user)!=null&&B.profile_picture_url?t.jsx("img",{src:S.active_signin.user.profile_picture_url,alt:"Personal"}):t.jsx(hs,{size:12})}),t.jsx("span",{className:"w-grow w-truncate",children:"Personal account"}),W&&t.jsx(Ye,{size:13,className:"w-text-primary w-none"})]}),((k==null?void 0:k.length)??0)>0&&t.jsxs(t.Fragment,{children:[t.jsx("hr",{className:"w-hr"}),t.jsx("div",{className:"w-menu-label",children:"Organizations"})]}),k==null?void 0:k.map(q=>{var we,ge;const X=q.organization,oe=X.id===(C==null?void 0:C.id),Ee=l.has(X.id),z=O?(T==null?void 0:T.filter(xe=>xe.organization.id===X.id))||[]:[],D=!!((we=q.eligibility_restriction)!=null&&we.type)&&q.eligibility_restriction.type!=="none";return t.jsxs(o.Fragment,{children:[t.jsxs("button",{className:"w-menu-item",onClick:()=>{D||(O?de(X.id):oe||G(X.id))},disabled:r,style:D?{opacity:.55,cursor:"not-allowed"}:void 0,title:(ge=q.eligibility_restriction)==null?void 0:ge.message,children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:X.image_url?t.jsx("img",{src:X.image_url,alt:X.name}):V(X.name)}),t.jsx("span",{className:"w-grow w-truncate",children:X.name}),t.jsxs("span",{className:"w-inline w-gap-1 w-none",children:[D&&t.jsx(Ma,{size:12,className:"w-text-error"}),oe&&K&&t.jsx("span",{className:"w-rowact",role:"button",title:"Organization settings","aria-label":"Organization settings",onClick:xe=>{xe.stopPropagation(),fe()},children:t.jsx(Ea,{size:13})}),oe&&!D&&t.jsx("span",{className:"w-rowact",role:"button",title:"Leave organization","aria-label":"Leave organization",onClick:xe=>{xe.stopPropagation(),ae()},children:t.jsx(Aa,{size:13})}),oe&&!O&&t.jsx(Ye,{size:13,className:"w-text-primary"}),O&&t.jsx(Ut,{size:11,className:"w-text-muted",style:{transition:"transform 0.2s ease",transform:Ee?"rotate(0deg)":"rotate(-90deg)"}})]})]}),O&&Ee&&!D&&t.jsxs("div",{className:"w-switch-nest",children:[z.map(xe=>{var Q,le;const lt=oe&&(A==null?void 0:A.id)===xe.id,Qe=((Q=xe.eligibility_restriction)==null?void 0:Q.type)&&xe.eligibility_restriction.type!=="none";return t.jsxs("button",{className:"w-menu-item",onClick:()=>{!lt&&!Qe&&Y(xe.id)},disabled:r,style:Qe?{opacity:.55,cursor:"not-allowed"}:void 0,title:(le=xe.eligibility_restriction)==null?void 0:le.message,children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:xe.image_url?t.jsx("img",{src:xe.image_url,alt:xe.name}):V(xe.name).charAt(0)}),t.jsx("span",{className:"w-grow w-truncate",children:xe.name}),t.jsxs("span",{className:"w-inline w-gap-1 w-none",children:[Qe&&t.jsx(Ma,{size:12,className:"w-text-error"}),lt&&at&&t.jsx("span",{className:"w-rowact",role:"button",title:"Workspace settings","aria-label":"Workspace settings",onClick:me=>{me.stopPropagation(),ne()},children:t.jsx(Ea,{size:13})}),lt&&t.jsx("span",{className:"w-rowact",role:"button",title:"Leave workspace","aria-label":"Leave workspace",onClick:me=>{me.stopPropagation(),re()},children:t.jsx(Aa,{size:13})}),lt&&t.jsx(Ye,{size:12,className:"w-text-primary"})]})]},xe.id)}),t.jsxs("button",{className:"w-menu-item w-menu-item--muted",onClick:()=>{w(X.id),h.open()},disabled:r,children:[t.jsx(St,{size:13}),t.jsx("span",{className:"w-grow w-truncate",children:"New workspace"})]})]})]},X.id)}),F&&t.jsxs(t.Fragment,{children:[t.jsx("hr",{className:"w-hr"}),t.jsxs("button",{className:"w-menu-item w-menu-item--muted",onClick:()=>u.open(),disabled:r,children:[t.jsx(St,{size:13}),t.jsx("span",{className:"w-grow w-truncate",children:"New organization"})]})]})]})})]}),document.body),L&&F&&t.jsx(Jc,{isOpen:u.isOpen,onClose:u.close,onCreated:_}),t.jsx(s0,{isOpen:f.isOpen,onClose:f.close}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Or,{isOpen:g.isOpen,onClose:g.close}),t.jsx(Pr,{isOpen:h.isOpen,onClose:()=>{h.close(),w(null)},organizationId:x||void 0})]})]})})},u0=o.createContext(void 0),ta=()=>{const e=o.useContext(u0);if(!e)throw new Error("useScreenContext must be used within a ScreenProvider");return e},he=(...e)=>e.filter(Boolean).join(" "),m0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-contents",e),...a}));m0.displayName="TypographyProvider";const mr=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card","w-flex-col","w-full","w-minh-full",e),...a}));mr.displayName="Container";const p0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-tabsbar",e),...a}));p0.displayName="TabsContainer";const h0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-1","w-tabs",e),...a}));h0.displayName="TabsList";const ka=o.forwardRef(({$isActive:e,className:a,...s},r)=>t.jsx("button",{ref:r,className:he("w-tab",e&&"w-tab--active",a),...s}));ka.displayName="Tab";const Ca=o.forwardRef(({className:e,...a},s)=>t.jsx("span",{ref:s,className:he("w-inline","w-gap-1",e),...a}));Ca.displayName="TabIcon";const f0=o.forwardRef(({className:e,children:a,...s},r)=>t.jsx("div",{ref:r,className:he("w-tabbody",e),...s,children:t.jsx("div",{className:"w-tabpane",children:a})}));f0.displayName="TabContent";const Vm=o.forwardRef(({className:e,...a},s)=>t.jsx("button",{ref:s,className:he("w-btn","w-btn--icon",e),...a}));Vm.displayName="IconButton";const w0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-justify-between","w-wrap","w-gap-3",e),...a}));w0.displayName="HeaderCTAContainer";const zm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-start","w-gap-6",e),...a}));zm.displayName="ProfileSectionLayout";const Dm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-none",e),...a}));Dm.displayName="ProfileImageContainer";const g0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-vrow",e),...a}));g0.displayName="SecurityItemRow";const x0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-grow",e),...a}));x0.displayName="SecurityItemContent";const v0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-2","w-none",e),...a}));v0.displayName="SecurityItemActions";const Ir=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-sechead",e),...a}));Ir.displayName="ResponsiveHeaderContainer";const hn=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-full",e),...a}));hn.displayName="DesktopTableContainer";const b0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-gap-3",e),...a}));b0.displayName="FormRow";const Um=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-vrow",e),...a}));Um.displayName="ConnectionItemRow";const Wm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-2","w-grow",e),...a}));Wm.displayName="ConnectionLeft";const Bm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-justify-end","w-gap-1","w-none",e),...a}));Bm.displayName="ConnectionRight";const Vr=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-iconbox",e),...a}));Vr.displayName="IconWrapper";const Gm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-wrap","w-gap-2",e),...a}));Gm.displayName="ButtonActions";const y0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-page-head",e),...a}));y0.displayName="PageHeader";const qm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-avatar",e),...a}));qm.displayName="PageHeaderAvatar";const j0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-1","w-grow",e),...a}));j0.displayName="PageHeaderInfo";const _0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-sec","w-truncate",e),...a}));_0.displayName="PageHeaderName";const k0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-secsub","w-truncate",e),...a}));k0.displayName="PageHeaderSub";const Km=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-1","w-none",e),...a}));Km.displayName="PageHeaderActions";const Ym=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-4",e),...a}));Ym.displayName="PageContent";const Qm=o.forwardRef(({className:e,...a},s)=>t.jsx("section",{ref:s,className:he("w-card",e),...a}));Qm.displayName="Card";const Jm=o.forwardRef(({className:e,...a},s)=>t.jsx("section",{ref:s,className:he("w-card","w-danger",e),...a}));Jm.displayName="DangerCard";const Xm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card-head",e),...a}));Xm.displayName="CardHeader";const e6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-1","w-grow",e),...a}));e6.displayName="CardTitleBlock";const t6=o.forwardRef(({className:e,...a},s)=>t.jsx("h3",{ref:s,className:he("w-sec",e),...a}));t6.displayName="CardTitle";const a6=o.forwardRef(({className:e,...a},s)=>t.jsx("p",{ref:s,className:he("w-secsub",e),...a}));a6.displayName="CardSubtitle";const s6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-wrap","w-gap-2","w-none",e),...a}));s6.displayName="CardActions";const n6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-hr",e),...a}));n6.displayName="CardDivider";const r6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card-body",e),...a}));r6.displayName="CardBody";const i6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card-foot",e),...a}));i6.displayName="CardFooter";const o6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-list",e),...a}));o6.displayName="RowList";const l6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-rowitem",e),...a}));l6.displayName="RowItem";const c6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-1","w-grow",e),...a}));c6.displayName="RowInfo";const d6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-sec",e),...a}));d6.displayName="RowTitle";const u6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-secsub",e),...a}));u6.displayName="RowSub";const m6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-wrap","w-gap-2","w-none",e),...a}));m6.displayName="RowActions";const p6={primary:"w-pill--current",success:"w-pill--success",warning:"w-pill--pending",danger:"w-pill--error",neutral:""},qa=({$variant:e="neutral",className:a,children:s,...r})=>t.jsxs("span",{className:he("w-pill",p6[e],a),...r,children:[t.jsx("span",{className:"w-dot"}),s]}),h6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-list",e),...a}));h6.displayName="Table";const f6=o.forwardRef(({$cols:e,className:a,style:s,...r},i)=>t.jsx("div",{ref:i,className:he("w-listhead","w-gap-4",a),style:{gridTemplateColumns:e||"1fr 1fr auto",...s},...r}));f6.displayName="TableHead";const w6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:e,...a}));w6.displayName="Th";const g6=o.forwardRef(({$cols:e,className:a,style:s,...r},i)=>t.jsx("div",{ref:i,className:he("w-row","w-gap-4",a),style:{gridTemplateColumns:e||"1fr 1fr auto",...s},...r}));g6.displayName="Tr";const x6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-truncate","w-text-secondary",e),...a}));x6.displayName="Td";const v6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-grid-2",e),...a}));v6.displayName="FieldGrid";const b6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-field",e),...a}));b6.displayName="Field";const y6=o.forwardRef(({className:e,...a},s)=>t.jsx("label",{ref:s,className:he("w-label",e),...a}));y6.displayName="FieldLabel";const j6=()=>{var T,P;const{deployment:e}=Ce(),{refetch:a}=ot(),{user:s,updateProfile:r,deleteAccount:i}=ba(),{toast:l}=ta(),[m,c]=o.useState(""),[d,p]=o.useState(""),[u,f]=o.useState(""),[h,g]=o.useState(!1),[x,w]=o.useState(!1),[b,j]=o.useState(!1),[v,k]=o.useState("");o.useEffect(()=>{s&&!h&&(c(s.first_name||""),p(s.last_name||""),f(s.username||""),g(!0))},[s,h]);const N=o.useCallback(async()=>{if(s)try{const S={};m!==s.first_name&&(S.first_name=m),d!==s.last_name&&(S.last_name=d),u!==s.username&&(S.username=u),Object.keys(S).length>0&&await r(S)}catch(S){l(S.message||"Failed to save profile changes","error")}},[s,r,m,d,u,l]),_=S=>{c(S.target.value)},C=S=>{p(S.target.value)},y=S=>{f(S.target.value)},E=()=>{N()},A=()=>{N()},H=()=>{N()};if(!s)return t.jsx("div",{className:"w-loading",children:t.jsx(_e,{})});const M=async()=>{if(!(!s||v!=="delete this account")){j(!0);try{await i(""),l("Account deleted successfully","info"),await a()}catch(S){l(S.message||"Failed to delete account","error")}finally{j(!1),k(""),w(!1)}}};return t.jsxs("div",{className:"w-flex-col w-gap-6",children:[t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsx("p",{className:"w-secsub",children:"Basic information about your profile"}),t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs(b0,{children:[t.jsxs(Ge,{className:"w-grow",children:[t.jsx(Ve,{htmlFor:"firstName",children:"First Name"}),t.jsx(ye,{id:"firstName",type:"text",value:m,onChange:_,onBlur:E,placeholder:"Enter your first name",required:!0})]}),t.jsxs(Ge,{className:"w-grow",children:[t.jsx(Ve,{htmlFor:"lastName",children:"Last Name"}),t.jsx(ye,{id:"lastName",type:"text",value:d,onChange:C,onBlur:A,placeholder:"Enter your last name",required:!0})]})]}),((P=(T=e==null?void 0:e.auth_settings)==null?void 0:T.username)==null?void 0:P.enabled)&&t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"username",children:"Username"}),t.jsx(ye,{id:"username",type:"text",value:u,onChange:y,onBlur:H,placeholder:"Enter your username",required:!0})]})]})]}),t.jsx("div",{className:"w-hr"}),t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("h3",{className:"w-sec",children:"Danger Zone"}),t.jsx("p",{className:"w-secsub",children:"Irreversible and destructive actions"})]}),t.jsxs("div",{className:"w-danger w-flex-col w-items-start",children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-4 w-full",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Delete Account"}),t.jsx("div",{className:"w-secsub",children:"Once you delete your account, there is no going back. Please be certain."})]}),t.jsx(se,{$destructive:!0,$size:"sm",onClick:()=>{x?(w(!1),k("")):w(!0)},children:x?"Cancel":"Delete"})]}),x&&t.jsxs("div",{className:"w-full w-flex-col w-gap-3",children:[t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"confirm_username",children:'Type "delete this account" to confirm'}),t.jsx(ye,{id:"confirm_username",type:"text",value:v,onChange:S=>k(S.target.value),placeholder:"delete this account"})]}),t.jsx(se,{$destructive:!0,$fullWidth:!0,onClick:M,disabled:v!=="delete this account"||b,children:b?t.jsx(_e,{size:12}):"Delete Forever"})]})]})]})]})},qi=({onClose:e,onAddEmail:a,onAttemptVerification:s,onPrepareVerification:r,existingEmail:i,triggerRef:l})=>{const m=o.useRef(null),[c,d]=o.useState(!1),{toast:p}=ta(),u=bt({contentRef:m,triggerRef:l??{current:null},isOpen:c,minWidth:340,defaultMaxHeight:360});o.useEffect(()=>{d(!0);const _=y=>{m.current&&!m.current.contains(y.target)&&e()},C=y=>{y.key==="Escape"&&e()};return document.addEventListener("mousedown",_),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",C)}},[e]);const[f,h]=o.useState(i?"otp":"email"),[g,x]=o.useState(i||""),[w,b]=o.useState(""),[j,v]=o.useState(!1),k=async()=>{if(!(!g||j)){v(!0);try{await a(g),h("otp")}catch(_){p(_.message||"Failed to add email. Please try again.","error")}finally{v(!1)}}},N=async()=>{v(!0);try{await s(w),e()}catch(_){p(_.message||"Failed to verify email. Check the code and try again.","error")}finally{v(!1)}};return c?t.jsx("div",{ref:m,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(u==null?void 0:u.top)!==void 0?`${u.top}px`:void 0,bottom:(u==null?void 0:u.bottom)!==void 0?`${u.bottom}px`:void 0,left:(u==null?void 0:u.left)!==void 0?`${u.left}px`:void 0,right:(u==null?void 0:u.right)!==void 0?`${u.right}px`:void 0,visibility:u?"visible":"hidden"},onClick:_=>_.stopPropagation(),children:f==="email"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Add email address"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Email address"}),t.jsx(ye,{id:"email-input",type:"email",placeholder:"you@company.com",value:g,onChange:_=>x(_.target.value),onKeyDown:_=>{_.key==="Enter"&&k()},autoFocus:!0})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:k,disabled:!g||j,children:j?"Sending…":"Send code"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[!i&&t.jsxs("button",{type:"button",className:"w-link w-link--muted w-inline w-gap-1",style:{alignSelf:"flex-start",background:"none",border:0,cursor:"pointer"},onClick:()=>h("email"),children:[t.jsx(nn,{size:11})," Back"]}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Verify your email"}),t.jsxs("p",{className:"w-pop-sub",children:["Enter the 6-digit code sent to ",t.jsx("strong",{children:g})]})]}),t.jsx(ya,{onComplete:async _=>b(_),onResend:r,isSubmitting:j})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:N,disabled:w.length<6||j,children:j?"Verifying…":"Verify"})]})]})}):null},_6=()=>{var A,H,M,T;const{deployment:e}=Ce(),{toast:a}=ta(),[s,r]=o.useState(""),[i,l]=o.useState(!1),[m,c]=o.useState(null),[d,p]=o.useState(new Set),u=o.useRef(null),f=o.useRef({}),{user:h,createEmailAddress:g,deleteEmailAddress:x,prepareEmailVerification:w,attemptEmailVerification:b,makeEmailPrimary:j}=ba();if(!((H=(A=e==null?void 0:e.auth_settings)==null?void 0:A.email_address)!=null&&H.enabled))return null;const v=(P,S)=>{p($=>{const Z=new Set($);return S?Z.add(P):Z.delete(P),Z})},k=async P=>{v(P,!0);try{await j(P),await h.refetch(),a("Primary email updated","info")}catch(S){a(S.message||"Failed to update primary email","error")}finally{v(P,!1)}},N=async P=>{if(P===(h==null?void 0:h.primary_email_address_id)){a("Cannot delete primary email. Set another email as primary first.","error");return}v(P,!0);try{await x(P),await h.refetch(),a("Email removed","info")}catch(S){a(S.message||"Failed to delete email address. Please try again.","error")}finally{v(P,!1)}},_=async P=>{v(P,!0);try{await w(P),await h.refetch(),c(P)}catch(S){a(S.message||"Failed to send verification","error")}finally{v(P,!1)}},C=(h==null?void 0:h.user_email_addresses)||[],y=P=>P.id===(h==null?void 0:h.primary_email_address_id)?t.jsx(qa,{$variant:"success",children:"Primary"}):P.verified?t.jsx(qa,{$variant:"neutral",children:"Backup"}):t.jsx(qa,{$variant:"warning",children:"Pending verification"}),E=P=>{const S=P.id===(h==null?void 0:h.primary_email_address_id),$=d.has(P.id);return S?t.jsx("span",{className:"w-secsub",children:"Cannot remove"}):t.jsxs("div",{className:"w-actions",children:[P.verified&&t.jsx(se,{$size:"sm",$outline:!0,disabled:$,onClick:()=>k(P.id),children:"Make primary"}),!P.verified&&t.jsx(se,{ref:Z=>{Z&&(f.current[P.id]=Z)},$size:"sm",$outline:!0,disabled:$,onClick:()=>_(P.id),children:"Resend"}),t.jsx(se,{$size:"sm",$destructive:!0,disabled:$,onClick:()=>N(P.id),children:$?t.jsx(_e,{size:12}):"Remove"})]})};return t.jsxs(t.Fragment,{children:[t.jsxs(Ir,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Email addresses"}),t.jsx("div",{className:"w-secsub",children:"Sign in and receive notifications at these addresses."})]}),t.jsxs("div",{className:"w-none w-relative",children:[t.jsx(se,{ref:u,$size:"sm",onClick:()=>l(!0),children:"Add email"}),i&&t.jsx(qi,{triggerRef:u,onClose:()=>l(!1),onAddEmail:async P=>{const S=await g(P);r(S.data.id),await w(S.data.id),h.refetch()},onPrepareVerification:async()=>{await w(s),h.refetch()},onAttemptVerification:async P=>{await b(s,P),h.refetch(),l(!1),r(""),a("Email added and verified","info")}})]})]}),C.length?t.jsx(t.Fragment,{children:t.jsx(hn,{children:t.jsxs(Ot,{children:[t.jsx(Zt,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Email address"}),t.jsx(Fe,{children:"Status"}),t.jsx(Fe,{})]})}),t.jsx(Ht,{children:C.map(P=>t.jsxs(it,{children:[t.jsx(Xe,{children:P.email}),t.jsx(Xe,{children:y(P)}),t.jsx(Ft,{children:E(P)})]},P.id))})]})})}):t.jsx(Nt,{title:"No email addresses",description:"Add an email address to get started."}),m&&t.jsx(qi,{existingEmail:(T=(M=h==null?void 0:h.user_email_addresses)==null?void 0:M.find(P=>P.id===m))==null?void 0:T.email,triggerRef:{current:f.current[m]},onClose:()=>c(null),onAddEmail:async()=>{},onPrepareVerification:async()=>{await w(m),h.refetch()},onAttemptVerification:async P=>{await b(m,P),h.refetch(),c(null),a("Email verified","info")}})]})},Ki=({onClose:e,onAddPhone:a,onAttemptVerification:s,existingPhone:r,onPrepareVerification:i,triggerRef:l})=>{var y;const m=o.useRef(null),[c,d]=o.useState(!1),{toast:p}=ta(),u=bt({contentRef:m,triggerRef:l??{current:null},isOpen:c,minWidth:340,defaultMaxHeight:360});o.useEffect(()=>{d(!0);const E=H=>{m.current&&!m.current.contains(H.target)&&e()},A=H=>{H.key==="Escape"&&e()};return document.addEventListener("mousedown",E),document.addEventListener("keydown",A),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("keydown",A)}},[e]);const[f,h]=o.useState(r?"otp":"phone"),[g,x]=o.useState((r==null?void 0:r.replace(/^\+\d+/,""))||""),[w,b]=o.useState((y=Intl.DateTimeFormat().resolvedOptions().locale.split("-"))==null?void 0:y.pop()),[j,v]=o.useState(""),[k,N]=o.useState(!1),_=async()=>{if(!(!g||k)){N(!0);try{await a(g,w||""),h("otp")}catch(E){p(E.message||"Failed to add phone number. Please try again.","error")}finally{N(!1)}}},C=async()=>{N(!0);try{await s(j),e()}catch(E){p(E.message||"Failed to verify phone. Check the code and try again.","error")}finally{N(!1)}};return c?t.jsx("div",{ref:m,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(u==null?void 0:u.top)!==void 0?`${u.top}px`:void 0,bottom:(u==null?void 0:u.bottom)!==void 0?`${u.bottom}px`:void 0,left:(u==null?void 0:u.left)!==void 0?`${u.left}px`:void 0,right:(u==null?void 0:u.right)!==void 0?`${u.right}px`:void 0,visibility:u?"visible":"hidden"},onClick:E=>E.stopPropagation(),children:f==="phone"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Add phone number"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Phone number"}),t.jsx(ys,{value:g,onChange:E=>x(E.target.value),error:"",countryCode:w,setCountryCode:b})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:_,disabled:!g||k,children:k?"Sending…":"Send code"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[!r&&t.jsxs("button",{type:"button",className:"w-link w-link--muted w-inline w-gap-1",style:{alignSelf:"flex-start",background:"none",border:0,cursor:"pointer"},onClick:()=>h("phone"),children:[t.jsx(nn,{size:11})," Back"]}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Verify phone number"}),t.jsxs("p",{className:"w-pop-sub",children:["Enter the 6-digit code sent to ",t.jsx("strong",{children:r||g})]})]}),t.jsx(ya,{onComplete:E=>v(E),onResend:async()=>i(),isSubmitting:k})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:C,disabled:j.length!==6||k,children:k?"Verifying…":"Verify"})]})]})}):null},k6=()=>{var H,M,T,P;const{deployment:e}=Ce(),{toast:a}=ta(),[s,r]=o.useState(""),[i,l]=o.useState(!1),[m,c]=o.useState(null),[d,p]=o.useState(new Set),u=o.useRef(null),f=o.useRef({}),{user:h,createPhoneNumber:g,deletePhoneNumber:x,preparePhoneVerification:w,attemptPhoneVerification:b,makePhonePrimary:j}=ba();if(!((M=(H=e==null?void 0:e.auth_settings)==null?void 0:H.phone_number)!=null&&M.enabled))return null;const v=(S,$)=>{p(Z=>{const R=new Set(Z);return $?R.add(S):R.delete(S),R})},k=S=>{const $=Gs.find(Z=>Z.dialCode===S);return($==null?void 0:$.flag)||"🌍"},N=async S=>{v(S,!0);try{await j(S),await h.refetch(),a("Primary phone updated","info")}catch($){a($.message||"Failed to update primary phone","error")}finally{v(S,!1)}},_=async S=>{if(S===(h==null?void 0:h.primary_phone_number_id)){a("Cannot delete primary phone. Set another phone as primary first.","error");return}v(S,!0);try{await x(S),await h.refetch(),a("Phone removed","info")}catch($){a($.message||"Failed to delete phone. Please try again.","error")}finally{v(S,!1)}},C=async S=>{v(S,!0);try{await w(S),await h.refetch(),c(S)}catch($){a($.message||"Failed to send verification","error")}finally{v(S,!1)}},y=(h==null?void 0:h.user_phone_numbers)||[],E=S=>S.id===(h==null?void 0:h.primary_phone_number_id)?t.jsx(qa,{$variant:"success",children:"Primary"}):S.verified?t.jsx(qa,{$variant:"neutral",children:"Backup"}):t.jsx(qa,{$variant:"warning",children:"Pending verification"}),A=S=>{const $=S.id===(h==null?void 0:h.primary_phone_number_id),Z=d.has(S.id);return $?t.jsx("span",{className:"w-secsub",children:"Cannot remove"}):t.jsxs("div",{className:"w-actions",children:[S.verified&&t.jsx(se,{$size:"sm",$outline:!0,disabled:Z,onClick:()=>N(S.id),children:"Make primary"}),!S.verified&&t.jsx(se,{ref:R=>{R&&(f.current[S.id]=R)},$size:"sm",$outline:!0,disabled:Z,onClick:()=>C(S.id),children:"Resend"}),t.jsx(se,{$size:"sm",$destructive:!0,disabled:Z,onClick:()=>_(S.id),children:Z?t.jsx(_e,{size:12}):"Remove"})]})};return t.jsxs(t.Fragment,{children:[t.jsxs(Ir,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Phone numbers"}),t.jsx("div",{className:"w-secsub",children:"Used for sign-in and two-factor authentication."})]}),t.jsxs("div",{className:"w-none w-relative",children:[t.jsx(se,{ref:u,$size:"sm",onClick:()=>l(!0),children:"Add phone"}),i&&t.jsx(Ki,{triggerRef:u,onClose:()=>l(!1),onAddPhone:async(S,$)=>{const Z=await g(S,$);r(Z.data.id),await w(Z.data.id)},onPrepareVerification:async()=>{await w(s),h.refetch()},onAttemptVerification:async S=>{await b(s,S),h.refetch(),l(!1),r(""),a("Phone added and verified","info")}}),m&&t.jsx(Ki,{existingPhone:(P=(T=h==null?void 0:h.user_phone_numbers)==null?void 0:T.find(S=>S.id===m))==null?void 0:P.phone_number,triggerRef:{current:f.current[m]},onClose:()=>c(null),onAddPhone:async()=>{},onPrepareVerification:async()=>{await w(m),h.refetch()},onAttemptVerification:async S=>{await b(m,S),h.refetch(),c(null),a("Phone verified","info")}})]})]}),y.length?t.jsx(t.Fragment,{children:t.jsx(hn,{children:t.jsxs(Ot,{children:[t.jsx(Zt,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Phone number"}),t.jsx(Fe,{children:"Status"}),t.jsx(Fe,{})]})}),t.jsx(Ht,{children:y.map(S=>t.jsxs(it,{children:[t.jsx(Xe,{children:t.jsxs("span",{className:"w-inline w-gap-2",children:[t.jsx("span",{children:k(S.country_code)}),t.jsx("span",{className:"w-text-secondary",children:S.country_code}),t.jsx("span",{children:S.phone_number})]})}),t.jsx(Xe,{children:E(S)}),t.jsx(Ft,{children:A(S)})]},S.id))})]})})}):t.jsx(Nt,{title:"No phone numbers",description:"Add a phone number to get started."})]})},C6=e=>t.jsxs("svg",{width:"800px",height:"800px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",...e,children:[t.jsx("path",{fill:"#F35325",d:"M1 1h6.5v6.5H1V1z"}),t.jsx("path",{fill:"#81BC06",d:"M8.5 1H15v6.5H8.5V1z"}),t.jsx("path",{fill:"#05A6F0",d:"M1 8.5h6.5V15H1V8.5z"}),t.jsx("path",{fill:"#FFBA08",d:"M8.5 8.5H15V15H8.5V8.5z"})]}),N6={google_oauth:{icon:t.jsx(Nc,{}),label:"Google"},microsoft_oauth:{icon:t.jsx(C6,{}),label:"Microsoft"},github_oauth:{icon:t.jsx(Cc,{}),label:"GitHub"},gitlab_oauth:{icon:t.jsx(Ac,{}),label:"GitLab"},linkedin_oauth:{icon:t.jsx(Ec,{}),label:"LinkedIn"},discord_oauth:{icon:t.jsx(Mc,{}),label:"Discord"},x_oauth:{icon:t.jsx(Sc,{}),label:"X"}},S6=()=>{const{user:e,disconnectSocialConnection:a,connectSocialAccount:s}=ba(),{deployment:r}=Ce(),i=(r==null?void 0:r.social_connections.filter(c=>c.enabled))||[],l=c=>{s({provider:c,redirectUri:window.location.href})},m=async c=>{await a(c.toString()),e.refetch()};return i.length===0?t.jsx(Nt,{title:"No providers available",description:"Social sign-in providers have not been configured for this app."}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-flex w-items-center w-gap-3",children:t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Connected accounts"}),t.jsx("div",{className:"w-secsub",children:"Sign in faster by linking third-party accounts."})]})}),t.jsx("div",{className:"w-list",children:i.map(c=>{var f;const d=N6[c.provider];if(!d)return null;const p=((f=e==null?void 0:e.social_connections)==null?void 0:f.filter(h=>h.provider===c.provider))||[],u=p.length>0;return t.jsxs("div",{className:"w-vrow",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-3 w-grow",children:[t.jsx(Vr,{children:d.icon}),t.jsxs("div",{className:"w-flex-col w-gap-1 w-grow",children:[t.jsx("div",{className:"w-sec",children:d.label}),u?t.jsx("div",{className:"w-flex w-wrap w-gap-1",children:p.map(h=>t.jsxs("span",{className:"w-chip",children:[t.jsx("span",{className:"w-truncate",children:h.email_address}),t.jsx("span",{className:"w-chip-x",role:"button",onClick:()=>m(h.id),title:"Remove connection","aria-label":"Remove connection",children:t.jsx(La,{size:10,weight:"bold"})})]},h.id))}):t.jsx("span",{className:"w-secsub",children:"Not linked"})]})]}),t.jsx("div",{className:`w-flex w-justify-end w-none${u?" w-row-act-top":""}`,children:t.jsx(se,{$size:"sm",$outline:!0,onClick:()=>l(c.provider),children:u?"Link another":"Link"})})]},c.provider)})})]})};var E6=Object.defineProperty,Xs=Object.getOwnPropertySymbols,C0=Object.prototype.hasOwnProperty,N0=Object.prototype.propertyIsEnumerable,Yi=(e,a,s)=>a in e?E6(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s,pr=(e,a)=>{for(var s in a||(a={}))C0.call(a,s)&&Yi(e,s,a[s]);if(Xs)for(var s of Xs(a))N0.call(a,s)&&Yi(e,s,a[s]);return e},hr=(e,a)=>{var s={};for(var r in e)C0.call(e,r)&&a.indexOf(r)<0&&(s[r]=e[r]);if(e!=null&&Xs)for(var r of Xs(e))a.indexOf(r)<0&&N0.call(e,r)&&(s[r]=e[r]);return s};/**
97
+ Read more about this at https://styled-components.com/docs/basics#react-native`);const Os=`__sc-${Oa}__`;process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window[Os]||(window[Os]=0),window[Os]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
98
+
99
+ See https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info.`),window[Os]+=1);const p4='.wacht-root{--wa-surface: var(--wa-ov-light-surface, #ffffff);--wa-surface-subtle: var(--wa-ov-light-surface_subtle, #fafaf8);--wa-background: var(--wa-ov-light-background, #f5f5f2);--wa-canvas: var(--wa-ov-light-canvas, #ebebe7);--wa-text: var(--wa-ov-light-text, #161618);--wa-text-secondary: var(--wa-ov-light-text_secondary, #3b3b3f);--wa-text-muted: var(--wa-ov-light-text_muted, #76767c);--wa-text-faint: var(--wa-ov-light-text_faint, #a8a8ad);--wa-border: var(--wa-ov-light-border, rgba(20, 20, 22, .08));--wa-border-strong: var(--wa-ov-light-border_strong, rgba(20, 20, 22, .14));--wa-primary: var(--wa-ov-light-primary, #6b3df5);--wa-primary-soft: var(--wa-ov-light-primary_soft, rgba(107, 61, 245, .1));--wa-primary-foreground: var(--wa-ov-light-primary_foreground, #ffffff);--wa-success: var(--wa-ov-light-success, #0f8a4a);--wa-success-soft: var(--wa-ov-light-success_soft, rgba(15, 138, 74, .12));--wa-info: var(--wa-ov-light-info, #2f6fdb);--wa-info-soft: var(--wa-ov-light-info_soft, rgba(47, 111, 219, .1));--wa-warning: var(--wa-ov-light-warning, #a8650a);--wa-warning-soft: var(--wa-ov-light-warning_soft, rgba(168, 101, 10, .12));--wa-error: var(--wa-ov-light-error, #c4271f);--wa-error-soft: var(--wa-ov-light-error_soft, rgba(196, 39, 31, .1));--wa-radius: var(--wa-ov-light-radius, 6px);--wa-radius-lg: var(--wa-ov-light-radius_lg, 10px);--wa-font-sans: var(--wa-ov-light-font_sans, "Geist", "Inter"), system-ui, -apple-system, sans-serif;--wa-font-mono: var(--wa-ov-light-font_mono, "Geist Mono"), ui-monospace, SFMono-Regular, Menlo, monospace;font-family:var(--wa-font-sans)}.dark .wacht-root,.wacht-root.dark{--wa-surface: var(--wa-ov-dark-surface, #131318);--wa-surface-subtle: var(--wa-ov-dark-surface_subtle, #101015);--wa-background: var(--wa-ov-dark-background, #0d0d10);--wa-canvas: var(--wa-ov-dark-canvas, #050507);--wa-text: var(--wa-ov-dark-text, #ececef);--wa-text-secondary: var(--wa-ov-dark-text_secondary, #c5c5cb);--wa-text-muted: var(--wa-ov-dark-text_muted, #8a8a92);--wa-text-faint: var(--wa-ov-dark-text_faint, #57575e);--wa-border: var(--wa-ov-dark-border, rgba(255, 255, 255, .07));--wa-border-strong: var(--wa-ov-dark-border_strong, rgba(255, 255, 255, .14));--wa-primary: var(--wa-ov-dark-primary, #9277ff);--wa-primary-soft: var(--wa-ov-dark-primary_soft, rgba(146, 119, 255, .16));--wa-primary-foreground: var(--wa-ov-dark-primary_foreground, #ffffff);--wa-success: var(--wa-ov-dark-success, #0f8a4a);--wa-success-soft: var(--wa-ov-dark-success_soft, rgba(15, 138, 74, .18));--wa-info: var(--wa-ov-dark-info, #2f6fdb);--wa-info-soft: var(--wa-ov-dark-info_soft, rgba(47, 111, 219, .18));--wa-warning: var(--wa-ov-dark-warning, #a8650a);--wa-warning-soft: var(--wa-ov-dark-warning_soft, rgba(168, 101, 10, .18));--wa-error: var(--wa-ov-dark-error, #c4271f);--wa-error-soft: var(--wa-ov-dark-error_soft, rgba(196, 39, 31, .18));--wa-radius: var(--wa-ov-dark-radius, 6px);--wa-radius-lg: var(--wa-ov-dark-radius_lg, 10px);--wa-font-sans: var(--wa-ov-dark-font_sans, "Geist", "Inter"), system-ui, -apple-system, sans-serif;--wa-font-mono: var(--wa-ov-dark-font_mono, "Geist Mono"), ui-monospace, SFMono-Regular, Menlo, monospace}.wacht-root *{box-sizing:border-box}',h4='.w-flex-col{display:flex;flex-direction:column}.w-inline{display:inline-flex;align-items:center}.w-wrap{flex-wrap:wrap}.w-grow{flex:1 1 auto;min-width:0}.w-none{flex:none}.w-full{width:100%}.w-gap-1{gap:4px}.w-gap-2{gap:8px}.w-gap-3{gap:12px}.w-gap-4{gap:16px}.w-gap-5{gap:20px}.w-gap-6{gap:24px}.w-truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-contents{display:contents}.w-h-full{height:100%}.w-minh-full{min-height:100%}.w-mono-sm{font:400 12px/1.4 var(--wa-font-mono);color:var(--wa-text-muted)}.w-text-primary{color:var(--wa-primary)}.w-text-secondary{color:var(--wa-text-secondary)}.w-text-muted{color:var(--wa-text-muted)}.w-text-faint{color:var(--wa-text-faint)}.w-text-error{color:var(--wa-error)}.w-text-success{color:var(--wa-success)}.w-text-warning{color:var(--wa-warning)}.w-mb-4{margin-bottom:16px}.w-mt-6{margin-top:24px}.w-maxw-sm{max-width:340px}.w-rolepick-btn{min-width:120px}.w-combo-menu--pop{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:60}.w-relative{position:relative}.w-card{background:var(--wa-surface);border:0;border-radius:var(--wa-radius-lg);box-shadow:0 0 0 .5px var(--wa-border),0 1px 1px #1414160a,0 4px 8px -4px #14141614,0 24px 48px -16px #14141629;overflow:hidden}.w-eyebrow{font:400 10px/1 var(--wa-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--wa-text-faint)}.w-title{font:400 17px/1.25 var(--wa-font-sans);letter-spacing:-.02em;color:var(--wa-text);margin:0}.w-title-lg{font:400 19px/1.2 var(--wa-font-sans);letter-spacing:-.022em;color:var(--wa-text);margin:0}.w-sub{font:400 13px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);margin:0}.w-sec{font:400 13px/1.3 var(--wa-font-sans);color:var(--wa-text);margin:0}.w-secsub{font:400 12px/1.45 var(--wa-font-sans);color:var(--wa-text-muted);margin:0}.w-btn{height:32px;padding:0 13px;border-radius:var(--wa-radius);border:.5px solid transparent;font:400 12.5px/1 var(--wa-font-sans);display:inline-flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:background .14s ease,border-color .14s ease,filter .14s ease,box-shadow .14s ease;background:transparent;color:var(--wa-text)}.w-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-btn:disabled{opacity:.6;cursor:not-allowed}.w-btn svg{width:14px;height:14px;flex:none}.w-btn.w-notif-bell{width:32px;height:32px}.w-btn.w-notif-bell svg{width:18px;height:18px}.w-btn--primary{background:var(--wa-primary);color:var(--wa-primary-foreground);box-shadow:inset 0 1px #ffffff2e,0 1px 2px #1414161f,0 2px 8px -2px color-mix(in srgb,var(--wa-primary) 50%,transparent);background-image:linear-gradient(180deg,#ffffff1a,#fff0 42%)}.w-btn--primary:active:not(:disabled){filter:brightness(.97);box-shadow:inset 0 1px 2px #14141633}.w-btn--block{width:100%;height:38px;font-size:13px}.w-btn--secondary{background:var(--wa-surface);border-color:var(--wa-border-strong);color:var(--wa-text);box-shadow:inset 0 1px #ffffff80,0 1px 1.5px #1414160a}.w-btn--ghost{background:transparent;color:var(--wa-text-secondary)}.w-btn--danger{background:transparent;color:var(--wa-error);border-color:color-mix(in srgb,var(--wa-error) 26%,transparent)}.w-btn--danger-solid{background:var(--wa-error);color:#fff}.w-btn--sm{height:26px;padding:0 9px;font-size:11.5px}.w-btn--lg{height:42px;padding:0 18px;font-size:13.5px}.w-btn--icon{height:28px;width:28px;padding:0;color:var(--wa-text-muted)}.w-btn--icon:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-social{height:40px;width:100%;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface);color:var(--wa-text);font:400 13px/1 var(--wa-font-sans);display:flex;align-items:center;justify-content:center;gap:10px;padding:0 14px;cursor:pointer;position:relative;box-shadow:inset 0 1px #ffffff80,0 1px 1.5px #1414160a;transition:background .14s ease,border-color .14s ease,box-shadow .14s ease,transform .1s ease}.w-social:active{transform:translateY(.5px)}.w-social:focus-visible{outline:none;box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-social svg,.w-social img{width:17px;height:17px;flex:none}.w-social .w-social-label{flex:none}.w-social .w-lastused{position:absolute;top:-9px;right:12px;white-space:nowrap;font:400 9.5px/1 var(--wa-font-mono);letter-spacing:.04em;color:var(--wa-text-muted);background:var(--wa-surface);border:.5px solid var(--wa-border);padding:3px 6px;border-radius:5px}.w-field{display:flex;flex-direction:column;gap:7px}.w-label{font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);display:flex;align-items:center;gap:4px;letter-spacing:-.005em;white-space:nowrap}.w-req{color:var(--wa-error);font-size:12px}.w-input{height:34px;padding:0 12px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface);color:var(--wa-text);font:400 13px/1 var(--wa-font-sans);width:100%;box-shadow:inset 0 1px 2px #1414160d;transition:border-color .14s ease,box-shadow .14s ease}.w-input::placeholder{color:var(--wa-text-faint)}.w-input:focus{outline:none;border-color:var(--wa-primary);box-shadow:inset 0 1px 2px #1414160a,0 0 0 3px var(--wa-primary-soft)}.w-input-row{display:flex;align-items:center;gap:6px}.w-input-trail{margin-left:-34px;z-index:1}.w-input-wrap{position:relative}.w-input--valid:focus{border-color:var(--wa-success);box-shadow:0 0 0 3px var(--wa-success-soft)}.w-input--invalid,.w-input[aria-invalid=true]{border-color:color-mix(in srgb,var(--wa-error) 55%,var(--wa-border-strong))}.w-input--invalid:focus,.w-input[aria-invalid=true]:focus{border-color:var(--wa-error);box-shadow:0 0 0 3px var(--wa-error-soft)}.w-input:disabled,.w-input[data-disabled]{opacity:.55;cursor:not-allowed}.w-input-err{font:400 11.5px/1.3 var(--wa-font-sans);color:var(--wa-error)}.w-input-ok{font:400 11.5px/1.3 var(--wa-font-sans);color:var(--wa-success)}.w-input-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:28px;height:28px;display:grid;place-items:center;border:0;background:none;cursor:pointer;color:var(--wa-text-faint);border-radius:6px}.w-input-eye:hover{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-input-eye svg{width:15px;height:15px}.w-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font:400 var(--av-fs, 13px)/1 var(--wa-font-sans);color:#fff;flex:none;background:var( --av-bg, linear-gradient( 135deg, var(--wa-primary), var( --wa-primary-tint, color-mix(in srgb, var(--wa-primary), #fff 25%) ) ) );box-shadow:inset 0 0 0 .5px #ffffff29;letter-spacing:.01em;overflow:hidden}.w-avatar img{width:100%;height:100%;object-fit:cover}.w-avatar--square{border-radius:var(--wa-radius)}.w-avatar--sm{width:20px;height:20px;font-size:10px}.w-avatar--md{width:28px;height:28px;font-size:11px}.w-avatar--lg{width:44px;height:44px;font-size:15px}.w-avatar--xl{width:80px;height:80px;font-size:24px}.w-avatar-edit{position:relative;cursor:pointer;border:0;padding:0}.w-avatar-edit .w-avatar-veil{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;display:grid;place-items:center;color:#fff;background:color-mix(in srgb,#000 45%,transparent);opacity:0;transition:opacity .15s ease;font:400 11px/1.2 var(--wa-font-sans);text-align:center;padding:0 6px}.w-avatar-edit:hover .w-avatar-veil,.w-avatar-edit[data-busy] .w-avatar-veil{opacity:1}.w-avatar-veil svg{width:18px;height:18px}.w-pill{display:inline-flex;align-items:center;gap:6px;height:21px;padding:0 8px;border-radius:4px;font:400 10.5px/1 var(--wa-font-mono);text-transform:lowercase;letter-spacing:.01em;background:var(--wa-surface-subtle);color:var(--wa-text-muted);border:.5px solid var(--wa-border);white-space:nowrap;flex:none}.w-pill .w-dot{width:5px;height:5px;border-radius:999px;background:var(--wa-text-faint)}.w-pill--success{background:var(--wa-success-soft);color:var(--wa-success);border-color:color-mix(in srgb,var(--wa-success) 26%,transparent)}.w-pill--success .w-dot{background:var(--wa-success)}.w-pill--warning{background:var(--wa-warning-soft);color:var(--wa-warning);border-color:color-mix(in srgb,var(--wa-warning) 26%,transparent)}.w-pill--warning .w-dot{background:var(--wa-warning)}.w-pill--info{background:var(--wa-info-soft);color:var(--wa-info);border-color:color-mix(in srgb,var(--wa-info) 26%,transparent)}.w-pill--info .w-dot{background:var(--wa-info)}.w-pill--current{background:var(--wa-primary-soft);color:var(--wa-primary);border-color:color-mix(in srgb,var(--wa-primary) 26%,transparent)}.w-pill--error{background:var(--wa-error-soft);color:var(--wa-error);border-color:color-mix(in srgb,var(--wa-error) 26%,transparent)}.w-pill--error .w-dot{background:var(--wa-error)}.w-pill--pending{background:transparent;color:var(--wa-warning);border:.5px dashed color-mix(in srgb,var(--wa-warning) 55%,transparent)}.w-pill--pending .w-dot{background:var(--wa-warning)}.w-chip{display:inline-flex;align-items:center;gap:7px;height:24px;padding:0 5px 0 9px;border-radius:var(--wa-radius);background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);font:400 12px/1 var(--wa-font-mono);color:var(--wa-text-secondary)}.w-chip-x{display:grid;place-items:center;width:16px;height:16px;border-radius:3px;color:var(--wa-text-faint);cursor:pointer}.w-chip-x:hover{background:var(--wa-border);color:var(--wa-text)}.w-chip-x svg{width:11px;height:11px}.w-or{display:flex;align-items:center;gap:14px;margin:18px 0}.w-or:before,.w-or:after{content:"";height:.5px;background:var(--wa-border);flex:1}.w-or span{font:400 10px/1 var(--wa-font-mono);letter-spacing:.14em;color:var(--wa-text-faint)}.w-hr{height:.5px;background:var(--wa-border);border:0;margin:0;width:100%}.w-list{display:flex;flex-direction:column}.w-listhead{display:grid;align-items:center;padding:0 2px 8px;font:400 10px/1 var(--wa-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--wa-text-faint);border-bottom:.5px solid var(--wa-border)}.w-row{display:grid;align-items:center;padding:13px 2px;border-bottom:.5px solid var(--wa-border)}.w-row:last-child{border-bottom:0}.w-row--hover{border-radius:var(--wa-radius);margin:0 -8px;padding:11px 10px;border-bottom:0;transition:background .12s ease}.w-row--hover:hover{background:var(--wa-surface-subtle)}.w-acct{display:flex;align-items:center;gap:13px;width:100%;text-align:left;padding:11px 12px;border:.5px solid transparent;border-radius:var(--wa-radius-lg);background:none;cursor:pointer;transition:background .13s ease,border-color .13s ease}.w-acct:hover{background:var(--wa-surface-subtle)}.w-acct[data-active]{background:var(--wa-surface-subtle);border-color:var(--wa-border)}.w-acct .w-acct-go{color:var(--wa-text-faint);flex:none;opacity:0;transform:translate(-4px);transition:opacity .13s ease,transform .13s ease}.w-acct:hover .w-acct-go{opacity:1;transform:none;color:var(--wa-text-muted)}.w-acct[data-busy]{opacity:.55;pointer-events:none}.w-acct-list{border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);overflow:hidden;margin-bottom:18px}.w-acct-list-head{padding:11px 14px;border-bottom:.5px solid var(--wa-border)}.w-acct-list-body{padding:6px}.w-acct-text{flex:1;min-width:0;text-align:left}.w-acct-name{display:block;font:400 13px/1.3 var(--wa-font-sans);color:var(--wa-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-acct-text .w-secsub{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-acct .w-avatar{width:34px;height:34px;flex:none}.w-acct[data-active] .w-avatar{width:40px;height:40px}.w-acct-add-ic{width:36px;height:36px;border-radius:50%;background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);display:grid;place-items:center;color:var(--wa-text-muted);flex:none;transition:color .13s ease,border-color .13s ease}.w-acct--add:hover .w-acct-add-ic{color:var(--wa-text);border-color:var(--wa-text-muted)}.w-acct-out{color:var(--wa-text-faint);flex:none;margin-right:-6px}.w-acct-out:hover{color:var(--wa-error);background:var(--wa-error-soft)}.w-acct--add:hover{background:var(--wa-surface-subtle)}.w-acct-foot{margin-top:8px;padding-top:10px}.w-acct-add{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;height:36px;border:0;background:none;cursor:pointer;border-radius:var(--wa-radius);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text-muted);transition:background .13s ease,color .13s ease}.w-acct-add svg{width:15px;height:15px}.w-acct-add:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-tabs{display:flex;gap:2px}.w-tab{display:inline-flex;align-items:center;gap:7px;height:30px;flex:none;white-space:nowrap;padding:0 12px;border-radius:var(--wa-radius);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text-muted);background:none;border:0;cursor:pointer;transition:color .14s ease,background .14s ease}.w-tab svg{width:14px;height:14px}.w-tab:hover,.w-tab--active{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-tab--active svg{color:var(--wa-primary)}.w-menu{width:264px;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;padding:4px;overflow:hidden}.w-menu-head{display:flex;align-items:center;gap:11px;padding:11px 9px}.w-menu-item{display:flex;align-items:center;justify-content:flex-start;gap:10px;height:32px;padding:0 8px;border-radius:var(--wa-radius);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);cursor:pointer;transition:background .12s ease;width:100%;border:0;background:none;text-align:left;white-space:nowrap}.w-menu-item:hover{background:var(--wa-surface-subtle)}.w-menu-item svg{width:15px;height:15px;color:var(--wa-text-muted);flex:none}.w-menu-item .w-avatar svg{color:inherit}.w-menu-item--danger{color:var(--wa-error)}.w-menu-item--danger svg{color:var(--wa-error)}.w-menu-item--danger:hover{background:var(--wa-error-soft)}.w-menu-trail{margin-left:auto;font:400 10.5px/1 var(--wa-font-mono);color:var(--wa-text-faint)}.w-menu-label{font:400 10px/1 var(--wa-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--wa-text-faint);padding:10px 9px 5px}.w-orgtrigger{display:flex;align-items:center;gap:9px;width:100%;height:40px;padding:0 9px;border:0;border-radius:var(--wa-radius);background:transparent;color:var(--wa-text);cursor:pointer;font:400 13px/1 var(--wa-font-sans);text-align:left;transition:background .12s ease}.w-orgtrigger:hover,.w-orgtrigger[data-open]{background:var(--wa-surface-subtle)}.w-orgtrigger:disabled{opacity:.6;cursor:default}.w-orgtrigger>svg{color:var(--wa-text-faint);flex:none}.w-switch-body{overflow-y:auto;padding:4px 0}.w-switch-banner{margin:8px 8px 0}.w-switch-nest{display:flex;flex-direction:column;margin:2px 0 6px 24px;padding-left:8px;border-left:.5px solid var(--wa-border)}.w-menu-item--muted{color:var(--wa-text-muted)}.w-menu-item--muted svg{color:var(--wa-text-muted)}.w-rowact{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:5px;color:var(--wa-text-muted);cursor:pointer}.w-rowact:hover{color:var(--wa-text);background:var(--wa-border)}.w-rowact svg{width:13px;height:13px}.w-danger{border:.5px solid color-mix(in srgb,var(--wa-error) 30%,transparent);background:var(--wa-error-soft);border-radius:var(--wa-radius);padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:20px}.w-link{color:var(--wa-text);font-weight:400;cursor:pointer;text-decoration:none}.w-link--sm{font-size:12px}.w-link:hover{text-decoration:underline}.w-link--muted{color:var(--wa-text-muted)}.w-mono-faint{font:400 12px/1.4 var(--wa-font-mono);color:var(--wa-text-faint)}@keyframes w-spin{to{transform:rotate(360deg)}}.w-spin{display:inline-block;border-radius:50%;border:2px solid var(--wa-border-strong);border-top-color:var(--wa-primary);animation:w-spin .7s linear infinite}.w-spin--on-accent{border-color:#ffffff59;border-top-color:#fff}.w-loading{display:grid;place-items:center;gap:14px;padding:40px;text-align:center}.w-otp{display:flex;gap:8px}.w-otp .w-otp-cell{width:42px;height:48px;text-align:center;font:400 20px/1 var(--wa-font-mono);color:var(--wa-text);border:.5px solid var(--wa-border-strong);border-radius:var(--wa-radius);background:var(--wa-surface);display:grid;place-items:center}.w-otp .w-otp-cell[data-active],.w-otp .w-otp-cell:focus{outline:none;border-color:var(--wa-primary);box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-otp .w-otp-cell[data-filled]{border-color:var(--wa-text-muted)}.w-otp[data-error] .w-otp-cell{border-color:color-mix(in srgb,var(--wa-error) 50%,var(--wa-border-strong))}.w-otp-caret{width:1.5px;height:22px;background:var(--wa-primary);animation:w-blink 1s steps(1) infinite}@keyframes w-blink{50%{opacity:0}}.w-addr-badge{display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 6px 0 12px;border-radius:999px;background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text-secondary)}.w-addr-badge button{border:0;background:none;cursor:pointer;color:var(--wa-primary);font:400 12px/1 var(--wa-font-sans);padding:4px 8px;border-radius:6px}.w-addr-badge button:hover{background:var(--wa-primary-soft)}.w-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px;padding:48px 24px}.w-empty .w-empty-ic{display:grid;place-items:center;width:44px;height:44px;border-radius:var(--wa-radius-lg);background:var(--wa-primary-soft);color:var(--wa-primary)}.w-empty .w-empty-ic svg{width:20px;height:20px;color:var(--wa-primary)}.w-empty-text{display:flex;flex-direction:column;gap:4px}.w-empty h4{margin:0;font:500 14px/1.4 var(--wa-font-sans);color:var(--wa-text)}.w-empty p{margin:0;font:400 12px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);max-width:384px;text-wrap:pretty}.w-empty-action{margin-top:4px}.w-empty--fill{height:100%}.w-empty-ic--accent{width:44px;height:44px}.w-toast{display:inline-flex;align-items:center;gap:11px;padding:11px 13px 11px 14px;border-radius:var(--wa-radius-lg);background:var(--wa-surface);border:.5px solid var(--wa-border);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;min-width:280px;max-width:380px}.w-toast .w-toast-ic{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none}.w-toast .w-toast-ic svg{width:12px;height:12px}.w-toast--success .w-toast-ic{background:var(--wa-success-soft);color:var(--wa-success)}.w-toast--error .w-toast-ic{background:var(--wa-error-soft);color:var(--wa-error)}.w-toast-msg{flex:1;font:400 13px/1.35 var(--wa-font-sans);color:var(--wa-text)}.w-toast-x{border:0;background:none;cursor:pointer;color:var(--wa-text-faint);width:22px;height:22px;border-radius:6px;display:grid;place-items:center;flex:none}.w-toast-x:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-toast-x svg{width:12px;height:12px}.w-pop{width:320px;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;overflow:hidden}.w-pop-body{padding:15px 15px 13px;display:flex;flex-direction:column;gap:11px}.w-pop-title{margin:0;font:400 13.5px/1.3 var(--wa-font-sans);letter-spacing:-.01em;color:var(--wa-text)}.w-pop-sub{margin:0;font:400 12.5px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);text-wrap:pretty}.w-pop-title+.w-pop-sub{margin-top:-7px}.w-pop-foot{display:flex;gap:8px;justify-content:flex-end;padding:10px 14px;border-top:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-pop-foot .w-btn{width:auto}.w-pop-icon{width:38px;height:38px;border-radius:var(--wa-radius);display:grid;place-items:center;flex:none}.w-pop-icon--danger{background:var(--wa-error-soft);color:var(--wa-error)}.w-pop-icon--warn{background:var(--wa-warning-soft);color:var(--wa-warning)}.w-pop-icon svg{width:18px;height:18px}.w-locked{display:flex;align-items:center;gap:10px;height:38px;padding:0 8px 0 13px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-locked .w-locked-ic{color:var(--wa-text-faint);flex:none}.w-locked .w-locked-ic svg{width:15px;height:15px;display:block}.w-locked .w-locked-val{flex:1;font:400 13.5px/1 var(--wa-font-sans);color:var(--wa-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-restricted{opacity:.55;cursor:not-allowed}.w-restricted *{pointer-events:none}.w-warn-ic{color:var(--wa-warning);display:inline-grid;place-items:center}.w-warn-ic svg{width:15px;height:15px}.w-codes{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px;border-radius:var(--wa-radius);background:var(--wa-surface-subtle);border:.5px solid var(--wa-border)}.w-codes span{font:400 13px/1.6 var(--wa-font-mono);color:var(--wa-text);text-align:center;letter-spacing:.04em}.w-qr{width:148px;height:148px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border);background:var(--wa-surface);display:grid;place-items:center;color:var(--wa-text)}.w-banner{display:flex;gap:11px;padding:12px 14px;border-radius:var(--wa-radius);align-items:flex-start}.w-banner svg{width:16px;height:16px;flex:none;margin-top:1px}.w-banner-txt{font:400 12.5px/1.5 var(--wa-font-sans);text-wrap:pretty;color:var(--wa-text-secondary)}.w-banner--error{background:var(--wa-error-soft)}.w-banner--warn{background:var(--wa-warning-soft)}.w-banner--info{background:var(--wa-info-soft)}.w-banner--error svg{color:var(--wa-error)}.w-banner--warn svg{color:var(--wa-warning)}.w-banner--info svg{color:var(--wa-info)}.w-seg{display:inline-flex;padding:3px;gap:2px;background:var(--wa-surface-subtle);border:.5px solid var(--wa-border);border-radius:var(--wa-radius)}.w-seg button{height:28px;padding:0 12px;border:0;background:none;cursor:pointer;border-radius:4px;font:400 12px/1 var(--wa-font-sans);color:var(--wa-text-muted);white-space:nowrap}.w-seg button[data-on]{background:var(--wa-surface);color:var(--wa-text);box-shadow:0 0 0 .5px var(--wa-border)}.w-steps{display:flex;gap:6px;justify-content:center}.w-steps i{width:5px;height:5px;border-radius:999px;background:var(--wa-border-strong);transition:background .2s ease,width .2s ease}.w-steps i[data-on]{background:var(--wa-primary);width:16px}.w-ibadge{display:grid;place-items:center;width:48px;height:48px;flex:none;border-radius:var(--wa-radius-lg);background:var(--wa-primary-soft);color:var(--wa-primary);overflow:hidden}.w-ibadge svg{width:24px;height:24px}.w-ibadge img{width:100%;height:100%;object-fit:cover}.w-ibadge--done{width:52px;height:52px;border-radius:999px;background:var(--wa-success-soft);color:var(--wa-success)}.w-ibadge--done svg{width:26px;height:26px}.w-ibadge-wrap{position:relative}.w-ibadge-x{position:absolute;top:-6px;right:-6px;width:20px;height:20px;display:grid;place-items:center;border-radius:999px;border:.5px solid var(--wa-border);background:var(--wa-surface);color:var(--wa-text-muted);cursor:pointer;box-shadow:0 1px 2px #1414161f}.w-ibadge-x svg{width:11px;height:11px}.w-create-foot{padding:13px 32px;border-top:.5px solid var(--wa-border);background:var(--wa-surface-subtle);text-align:center}.w-create-summary{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;padding:12px 16px;border:.5px solid var(--wa-border);border-radius:var(--wa-radius)}.w-auth-card{width:min(440px,100%)}.w-auth-head{display:flex;flex-direction:column;align-items:center;gap:14px;margin-bottom:24px}.w-auth-head-text{display:flex;flex-direction:column;gap:6px;text-align:center}.w-auth-title{margin:0;font:400 21px/1.2 var(--wa-font-sans);letter-spacing:-.025em;color:var(--wa-text)}.w-auth-sub{margin:0;font:400 12.5px/1.5 var(--wa-font-sans);color:var(--wa-text-muted);text-wrap:pretty}.w-auth-status{display:flex;flex-direction:column;align-items:center;gap:16px;padding-top:4px;text-align:center}.w-auth-foot{font:400 12.5px/1.5 var(--wa-font-sans);color:var(--wa-text-muted)}.w-fineprint{margin:2px 2px 0;font:400 11px/1.5 var(--wa-font-sans);color:var(--wa-text-faint);text-align:center;text-wrap:pretty}.w-switch{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none}.w-switch .w-switch-track{width:36px;height:20px;border-radius:999px;background:var(--wa-border-strong);border:.5px solid transparent;position:relative;transition:background .16s ease;flex:none}.w-switch .w-switch-knob{position:absolute;top:1.5px;left:1.5px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #00000040;transition:transform .16s ease}.w-switch[data-on] .w-switch-track{background:var(--wa-primary)}.w-switch[data-on] .w-switch-knob{transform:translate(16px)}.w-switch-label{font:400 13px/1 var(--wa-font-sans);color:var(--wa-text)}.w-search{display:flex;align-items:center;gap:8px;height:32px;width:240px;max-width:100%;padding:0 11px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface)}.w-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:14px}.w-search svg{width:15px;height:15px;color:var(--wa-text-faint);flex:none}.w-search input{border:0;background:none;outline:none;flex:1;font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);min-width:0}.w-search input::placeholder{color:var(--wa-text-faint)}.w-combo{display:flex;align-items:center;gap:8px;height:34px;padding:0 10px 0 12px;width:100%;border-radius:var(--wa-radius);border:.5px solid var(--wa-border-strong);background:var(--wa-surface);cursor:pointer;font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);transition:border-color .14s ease}.w-combo:hover{border-color:var(--wa-text-muted)}.w-combo[data-open]{border-color:var(--wa-primary);box-shadow:0 0 0 3px var(--wa-primary-soft)}.w-combo .w-combo-val{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-combo .w-combo-val[data-ph]{color:var(--wa-text-faint)}.w-combo svg{width:15px;height:15px;color:var(--wa-text-muted);flex:none}.w-combo-menu{width:100%;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;padding:4px;overflow:hidden}.w-combo-opt{display:flex;align-items:center;justify-content:flex-start;gap:9px;height:30px;padding:0 8px;border-radius:5px;font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);cursor:pointer;width:100%;border:0;background:none;text-align:left;white-space:nowrap}.w-combo-opt>svg{width:15px;height:15px;flex:none;color:var(--wa-text-muted)}.w-combo-opt:hover{background:var(--wa-surface-subtle)}.w-combo-opt .w-combo-check{margin-left:auto;color:var(--wa-primary);display:grid;place-items:center}.w-combo-opt .w-combo-check svg{width:14px;height:14px}.w-combo-opt[data-disabled]{opacity:.5;cursor:not-allowed}.w-combo-grp{font:400 10px/1 var(--wa-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--wa-text-faint);padding:9px 9px 5px}.w-phone{display:flex;align-items:stretch;gap:0;width:100%}.w-phone .w-phone-cc{display:flex;align-items:center;gap:7px;height:34px;padding:0 10px;border:.5px solid var(--wa-border-strong);border-right:0;border-radius:var(--wa-radius) 0 0 var(--wa-radius);background:var(--wa-surface-subtle);cursor:pointer;font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);white-space:nowrap}.w-phone .w-phone-cc svg{width:13px;height:13px;color:var(--wa-text-muted)}.w-phone input{flex:1;height:34px;padding:0 12px;border:.5px solid var(--wa-border-strong);border-radius:0 var(--wa-radius) var(--wa-radius) 0;background:var(--wa-surface);font:400 13px/1 var(--wa-font-sans);color:var(--wa-text);outline:none;min-width:0}.w-phone input:focus{border-color:var(--wa-primary);box-shadow:0 0 0 3px var(--wa-primary-soft);position:relative}.w-flag{width:18px;height:13px;border-radius:2px;display:inline-block;flex:none;box-shadow:inset 0 0 0 .5px #00000026}.w-country-pop{position:absolute;top:calc(100% + 6px);left:0;z-index:50;width:260px;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;overflow:hidden}.w-country-search{display:flex;align-items:center;gap:8px;padding:9px 11px;border-bottom:.5px solid var(--wa-border)}.w-country-search svg{width:14px;height:14px;color:var(--wa-text-faint);flex:none}.w-country-search input{border:0;background:none;outline:none;flex:1;font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);min-width:0}.w-country-search input::placeholder{color:var(--wa-text-faint)}.w-country-list{max-height:220px;overflow-y:auto;padding:5px}.w-country-opt{display:flex;align-items:center;gap:9px;height:32px;padding:0 9px;border-radius:5px;cursor:pointer;font:400 12.5px/1 var(--wa-font-sans);color:var(--wa-text);width:100%;border:0;background:none;text-align:left}.w-country-opt:hover{background:var(--wa-surface-subtle)}.w-country-opt .dial{margin-left:auto;color:var(--wa-text-muted);font:400 12px/1 var(--wa-font-mono);flex:none}.w-method-stack{display:flex;flex-direction:column;gap:10px}.w-method{display:flex;align-items:center;gap:13px;width:100%;padding:13px 14px;border:.5px solid var(--wa-border-strong);border-radius:var(--wa-radius);background:var(--wa-surface);cursor:pointer;text-align:left;transition:background .14s ease,border-color .14s ease}.w-method .w-method-ic{width:34px;height:34px;border-radius:var(--wa-radius);display:grid;place-items:center;background:var(--wa-surface-subtle);color:var(--wa-text-secondary);flex:none}.w-method .w-method-ic svg{width:17px;height:17px}.w-method .w-method-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.w-method .w-method-title{font:400 13.5px/1 var(--wa-font-sans);color:var(--wa-text)}.w-method .w-method-desc{font:400 12px/1.4 var(--wa-font-sans);color:var(--wa-text-muted)}.w-method .w-method-go{color:var(--wa-text-faint);flex:none}.w-method .w-method-go svg{width:16px;height:16px}.w-method[data-disabled]{opacity:.5;cursor:not-allowed}.w-overlay{position:relative;width:100%;height:100%;background:color-mix(in srgb,#000 38%,transparent);display:grid;place-items:center;border-radius:inherit}.w-dialog{background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);box-shadow:0 1px 2px #1414160d,0 12px 32px -10px #14141629;width:100%;max-width:480px;overflow:hidden;display:flex;flex-direction:column}.w-dialog--panel{display:block;width:880px;max-width:100%;height:min(560px,calc(100dvh - 40px));overflow-y:auto}.w-dialog--panel .w-card{background:transparent;border-radius:0;box-shadow:none}@media(max-width:640px){.w-dialog--panel{height:calc(100dvh - 16px)}}.w-dialog--create{background:transparent;border:0;box-shadow:none;width:440px;max-width:100%;align-items:center;scrollbar-gutter:stable both-edges}.w-create-card{width:440px;max-width:100%}.w-create-body{padding:34px 32px 28px}.w-create-head{margin-bottom:24px}.w-create-steps{margin-bottom:22px}.w-text-center{text-align:center}.w-linkbtn{background:none;border:0;padding:0;cursor:pointer}.w-modal{position:fixed;top:0;right:0;bottom:0;left:0;background:#08080c80;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);display:flex;justify-content:center;align-items:center;padding:20px;z-index:99999}@media(max-width:640px){.w-modal{padding:8px}}.w-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:.5px solid var(--wa-border)}.w-dialog-title{margin:0;font:400 15px/1.2 var(--wa-font-sans);letter-spacing:-.01em;color:var(--wa-text)}.w-dialog-body{padding:20px;display:flex;flex-direction:column;gap:14px}.w-dialog-foot{display:flex;gap:8px;justify-content:flex-end;padding:14px 20px;border-top:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-vtabs{display:flex;flex-direction:column;gap:2px}.w-vtab{display:flex;align-items:center;gap:10px;height:34px;padding:0 11px;border-radius:var(--wa-radius);font:400 13px/1 var(--wa-font-sans);color:var(--wa-text-muted);background:none;border:0;cursor:pointer;text-align:left;width:100%}.w-vtab svg{width:15px;height:15px}.w-vtab:hover,.w-vtab[data-on]{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-vtab[data-on] svg{color:var(--wa-primary)}@keyframes w-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.w-skel{border-radius:6px;background:linear-gradient(90deg,var(--wa-surface-subtle) 25%,var(--wa-border) 37%,var(--wa-surface-subtle) 63%);background-size:200% 100%;animation:w-shimmer 1.4s ease infinite}.w-auth-skel{display:flex;flex-direction:column;gap:22px}.w-auth-skel-head{display:flex;flex-direction:column;align-items:center;gap:12px;margin-bottom:2px}.w-auth-skel-fields{display:flex;flex-direction:column;gap:15px}.w-auth-skel-field{display:flex;flex-direction:column;gap:7px}.w-skel-avatar{width:44px;height:44px;border-radius:50%}.w-skel-line{height:10px}.w-skel-title{height:16px;width:56%}.w-skel-sub{height:11px;width:78%}.w-skel-label{height:9px;width:34%}.w-skel-input{height:38px;border-radius:var(--wa-radius)}.w-skel-btn{height:38px;border-radius:var(--wa-radius);margin-top:3px}.w-table{width:100%;border-collapse:separate;border-spacing:0;background:var(--wa-surface);border:.5px solid var(--wa-border);border-radius:var(--wa-radius-lg);overflow:hidden}.w-table thead{background:var(--wa-surface-subtle)}.w-table th{text-align:left;padding:9px 16px;font:400 11px/1 var(--wa-font-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--wa-text-faint);white-space:nowrap;border-bottom:.5px solid var(--wa-border)}.w-table th:last-child{text-align:right}.w-table td{padding:11px 16px;font:400 13px/1.35 var(--wa-font-sans);color:var(--wa-text-secondary);vertical-align:middle;white-space:nowrap}.w-table tbody tr{transition:background .12s ease}.w-table tbody tr:not(:last-child) td{border-bottom:.5px solid var(--wa-border)}.w-table tbody tr:hover td{background:var(--wa-surface-subtle)}.w-table tbody tr:last-child td:last-child{overflow:visible}.w-td--flex>div{display:flex;align-items:center;gap:10px}.w-td--actions{text-align:right;width:auto;white-space:nowrap;position:relative;overflow:visible}.w-td--actions>*{width:fit-content;margin-left:auto}.w-td--actions>[data-dropdown-trigger]{display:inline-flex;width:fit-content;margin-left:auto}.w-actions{display:flex;gap:6px;justify-content:flex-end;align-items:center}.w-kebab{width:28px;height:28px;border-radius:6px;border:0;background:none;cursor:pointer;color:var(--wa-text-muted);display:grid;place-items:center}.w-kebab:hover{background:var(--wa-surface-subtle);color:var(--wa-text)}.w-kebab svg{width:16px;height:16px}.w-token{display:flex;align-items:center;gap:8px;height:36px;padding:0 6px 0 12px;border-radius:var(--wa-radius);border:.5px solid var(--wa-border);background:var(--wa-surface-subtle)}.w-token code{flex:1;font:400 12px/1 var(--wa-font-mono);color:var(--wa-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-page-head{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:18px 22px}.w-tabsbar{flex:none;padding:0 22px;border-bottom:.5px solid var(--wa-border);overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.w-tabsbar::-webkit-scrollbar{display:none}.w-tabbody{flex:1;min-height:0;padding:20px 22px;overflow-y:auto;overflow-x:auto}.w-tabpane{min-width:300px}.w-card-head{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:16px 20px}.w-card-body{padding:16px 20px}.w-card-foot{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;padding:14px 20px;border-top:.5px solid var(--wa-border)}.w-sechead{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.w-iconbox{width:22px;height:22px;flex:none;display:inline-flex;align-items:center;justify-content:center;overflow:hidden}.w-iconbox svg,.w-iconbox img{width:22px;height:22px;display:block}.w-vrow{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0}.w-vrow:not(:last-child){border-bottom:.5px solid var(--wa-border)}.w-row-act-top{align-self:flex-start;margin-top:20px}.w-rowitem{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px}.w-rowitem:not(:last-child){border-bottom:.5px solid var(--wa-border)}.w-aside-copy{max-width:220px;text-align:center}.w-split{display:flex;min-height:400px;border-radius:var(--wa-radius-lg);overflow:hidden;border:.5px solid var(--wa-border);background:var(--wa-surface)}.w-split-aside{width:35%;min-width:200px;flex:none;background:var(--wa-surface-subtle);border-right:.5px solid var(--wa-border);padding:28px;display:flex;flex-direction:column;gap:14px}.w-split-main{flex:1;min-width:0;padding:28px;display:flex;flex-direction:column;gap:16px}@media(max-width:600px){.w-split{flex-direction:column}.w-split-aside{width:100%;border-right:0;border-bottom:.5px solid var(--wa-border)}}.w-listrow{display:flex;align-items:center;gap:12px;width:100%;padding:12px 0;text-align:left;border:0;border-bottom:.5px solid var(--wa-border);background:transparent;cursor:pointer;transition:background .12s ease}.w-listrow:last-child{border-bottom:0}.w-listrow:hover{background:var(--wa-surface-subtle)}.w-listrow:disabled{opacity:.6;cursor:not-allowed}.w-tile{border:.5px solid var(--wa-border);border-radius:var(--wa-radius);padding:12px;background:var(--wa-surface-subtle)}.w-input--area{min-height:80px;padding-top:9px;padding-bottom:9px;resize:vertical;line-height:1.5}.w-input--mono{font-family:var(--wa-font-mono)}.w-pop--wide{width:372px;max-width:calc(100vw - 24px);overflow:visible}.w-pop .w-input:not(.w-input--area),.w-pop .w-combo{height:32px}.w-feature-badge{width:52px;height:52px;border-radius:999px;display:grid;place-items:center;color:var(--wa-primary-foreground);background:linear-gradient(135deg,var(--wa-primary),var(--wa-primary-tint, #9277ff));box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-primary) 55%,transparent);margin-bottom:18px}.w-narrow{max-width:420px;margin:0 auto}.w-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.w-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.w-grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}@media(max-width:600px){.w-grid-2,.w-grid-3,.w-grid-4{grid-template-columns:1fr}}.w-toast--fixed{position:fixed;bottom:20px;right:20px;z-index:1000}.w-toast--contained{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:20;width:max-content;max-width:calc(100% - 32px)}.w-notif-badge{position:absolute;top:4px;right:4px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:var(--wa-error);color:#fff;font:500 9px/1 var(--wa-font-sans);display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--wa-surface)}.w-notif-badge[data-dot]{top:6px;right:6px;min-width:8px;height:8px;padding:0}.w-notif-row{cursor:pointer;padding:12px 18px;border-bottom:.5px solid var(--wa-border);transition:background .12s ease}.w-notif-row:hover,.w-notif-row[data-unread]{background:var(--wa-surface-subtle)}.w-notif-row:hover .w-notif-actions button{color:var(--wa-text-secondary)}.w-notif-row .w-notif-actions button{color:var(--wa-text-faint);transition:color .12s ease}.w-notif-row .w-notif-actions button:hover{color:var(--wa-text);background:var(--wa-surface-subtle)}.w-notif-row .w-notif-actions button[data-on]{color:var(--wa-warning)}.w-notif-dot{width:8px;height:8px;border-radius:50%;background:var(--wa-primary);flex:none}.w-notif-pop{position:fixed;width:450px;max-width:calc(100vw - 24px);z-index:99999}.w-notif-panel{width:450px;max-width:100%;height:100%;background:var(--wa-surface);overflow:hidden}.w-notif-panel--fill{width:100%}.w-notif-head{position:relative;padding:14px 18px;border-bottom:.5px solid var(--wa-border)}.w-notif-body{overflow-x:hidden;overflow-y:auto;background:var(--wa-surface)}.w-notif-menu{position:absolute;top:calc(100% + 4px);right:12px;width:200px;z-index:100000}.w-notif-menu .w-menu-check{margin-left:auto;color:var(--wa-primary)}.w-notif-filter-dot{position:absolute;top:5px;right:5px;width:6px;height:6px;border-radius:50%;background:var(--wa-primary)}.w-banner--success{background:var(--wa-success-soft)}.w-banner--success svg{color:var(--wa-success)}@keyframes w-pop{0%{transform:scale(.5);opacity:0}60%{transform:scale(1.06)}to{transform:scale(1);opacity:1}}@keyframes w-ring{0%{transform:scale(.85);opacity:.45}to{transform:scale(1.9);opacity:0}}@keyframes w-draw{to{stroke-dashoffset:0}}@keyframes w-indeterminate{0%{transform:translate(-100%)}to{transform:translate(330%)}}.w-success{position:relative;display:grid;place-items:center;width:56px;height:56px}.w-success .ring{position:absolute;top:2px;right:2px;bottom:2px;left:2px;border-radius:999px;border:1.5px solid var(--wa-success);opacity:0}.w-success .disc{width:52px;height:52px;border-radius:999px;background:var(--wa-success);color:#fff;display:grid;place-items:center;box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-success) 55%,transparent)}.w-success .disc svg{width:26px;height:26px}.w-success--error .ring{border-color:var(--wa-error)}.w-success--error .disc{background:var(--wa-error);box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-error) 55%,transparent)}.w-success--info .ring{border-color:var(--wa-info)}.w-success--info .disc{background:var(--wa-info);box-shadow:0 4px 14px -3px color-mix(in srgb,var(--wa-info) 55%,transparent)}.w-progress{position:relative;width:70%;height:3px;border-radius:999px;background:var(--wa-border);overflow:hidden}.w-progress:after{content:"";position:absolute;top:0;left:0;width:30%;height:100%;border-radius:999px;background:var(--wa-primary)}@media(prefers-reduced-motion:no-preference){.w-success .ring{animation:w-ring 1.7s ease-out infinite}.w-success .disc{animation:w-pop .42s cubic-bezier(.2,.9,.3,1.2)}.w-success .disc svg path{stroke-dasharray:26;stroke-dashoffset:26;animation:w-draw .4s .22s ease forwards}.w-progress:after{animation:w-indeterminate 1.15s ease-in-out infinite}}.w-sso-conn{padding-bottom:24px}.w-sso-conn:not(:last-child){margin-bottom:24px;border-bottom:.5px solid var(--wa-border)}.w-sso-detail{display:grid;grid-template-columns:auto 1fr;gap:4px 32px}.w-sso-scim{padding-top:16px;border-top:.5px solid var(--wa-border)}.w-sso-template{padding:12px;background:var(--wa-primary-soft);border-radius:var(--wa-radius);border:.5px solid var(--wa-primary)}.w-sso-check{padding:8px 12px;background:var(--wa-surface);border-radius:var(--wa-radius);border:.5px solid var(--wa-border)}.w-sso-check-mark{min-width:12px}.w-sso-tile{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 10px;border:.5px solid var(--wa-border);border-radius:var(--wa-radius);background:var(--wa-surface);cursor:pointer;transition:border-color .14s ease,background .14s ease}.w-sso-tile:hover{border-color:var(--wa-border-strong);background:var(--wa-surface-subtle)}.w-sso-logo{object-fit:contain;background:var(--wa-surface);padding:4px}.w-sso-logo--ph{background:var(--wa-surface)}.w-token-chip{background:var(--wa-surface-subtle);padding:2px 6px;border-radius:4px;color:var(--wa-text)}.w-disclosure{cursor:pointer;font:400 12.5px/1 var(--wa-font-sans)}.w-disclosure-caret{font-size:9px}.w-break-all{word-break:break-all}.w-col-full{grid-column:1 / -1}.dark .w-card{box-shadow:0 0 0 .5px var(--wa-border),0 2px 4px #0006,0 28px 60px -20px #000000b3}.dark .w-menu,.dark .w-pop,.dark .w-toast,.dark .w-dialog,.dark .w-combo-menu,.dark .w-country-pop{box-shadow:0 1px 2px #00000080,0 18px 44px -14px #000000b3}.dark .w-btn--secondary,.dark .w-social{box-shadow:inset 0 1px #ffffff0d,0 1px 1.5px #1414160a}.w-flex{display:flex}.w-inline{display:inline-flex}.w-items-center{align-items:center}.w-items-start{align-items:flex-start}.w-items-end{align-items:flex-end}.w-justify-start{justify-content:flex-start}.w-justify-center{justify-content:center}.w-justify-end{justify-content:flex-end}.w-justify-between{justify-content:space-between}',f4=m4`
100
+ ${p4}
101
+ ${h4}
102
+ `,w4={display:"contents"};function g4(e){const a={};if(!e)return a;const s=(r,i)=>{if(i)for(const l in i){const m=i[l];typeof m=="string"&&m.trim()!==""&&(a[`--wa-ov-${r}-${l}`]=m)}};return s("light",e.light),s("dark",e.dark),a}function as(){var s,r;const e=o.useContext(gr),a=(r=(s=e==null?void 0:e.deployment)==null?void 0:s.ui_settings)==null?void 0:r.theme_tokens;return o.useMemo(()=>g4(a),[a])}const Pi=o.createContext(!1),x4=o.memo(function(){return t.jsx(f4,{})});function $e({children:e,className:a,style:s,...r}){const i=o.useContext(Pi),l=as(),[m,d]=o.useState(!1);if(o.useEffect(()=>d(!0),[]),!m)return null;const c=t.jsx("div",{...r,className:a?`wacht-root ${a}`:"wacht-root",style:{...w4,...l,...s},children:e});return i?c:t.jsxs(Pi.Provider,{value:!0,children:[t.jsx(x4,{}),c]})}function ja({length:e=6,onComplete:a,onResend:s,error:r,isSubmitting:i=!1}){const[l,m]=o.useState(new Array(e).fill("")),[d,c]=o.useState(60),[p,u]=o.useState(!1),h=o.useRef([]),f=o.useCallback(()=>{const j=setInterval(()=>{c(v=>v<=1?(u(!0),clearInterval(j),0):v-1)},1e3);return j},[]);o.useEffect(()=>{const j=f();return()=>clearInterval(j)},[f]);const g=async()=>{var j;!p||i||!s||(await s(),u(!1),c(60),m(new Array(e).fill("")),(j=h.current[0])==null||j.focus(),f())},x=(j,v)=>{var C;if(i)return;const k=j.value,N=[...l];N[v]=k.replace(/[^0-9]/g,""),m(N);const _=N.join("");_.length===e&&a(_),k&&v<e-1&&((C=h.current[v+1])==null||C.focus())},w=(j,v)=>{var k;i||j.key==="Backspace"&&!l[v]&&v>0&&((k=h.current[v-1])==null||k.focus())},b=(j,v)=>{var C,y;if(i)return;j.preventDefault();const k=j.clipboardData.getData("text/plain").replace(/[^0-9]/g,"").slice(0,e);if(!k.length)return;const N=[...l];for(let E=0;E<k.length&&v+E<e;E++)N[v+E]=k[E];if(v===0&&k.length===e)for(let E=0;E<e;E++)N[E]=k[E];m(N);const _=N.join("");if(_.length===e)a(_),(C=h.current[e-1])==null||C.focus();else{const E=N.findIndex((A,H)=>H>=v&&!A);E!==-1&&((y=h.current[E])==null||y.focus())}};return t.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",gap:16},children:[t.jsx("div",{className:"w-otp","data-error":r?"":void 0,children:l.map((j,v)=>t.jsx("input",{className:"w-otp-cell",type:"text",inputMode:"numeric",maxLength:1,value:j,"data-filled":j?"":void 0,onChange:k=>x(k.target,v),onKeyDown:k=>w(k,v),onPaste:k=>b(k,v),ref:k=>{h.current[v]=k},disabled:i,autoFocus:v===0},v))}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[r&&t.jsx("span",{className:"w-input-err",children:r}),s&&(p?t.jsx("button",{type:"button",className:"w-link",style:{background:"none",border:0,cursor:"pointer",fontSize:12.5},onClick:g,disabled:i,children:"Didn't receive a code? Resend"}):t.jsxs("span",{className:"w-secsub",children:["Resend code in ",d,"s"]}))]})]})}const Ec=e=>t.jsxs("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-labelledby":"githubIconTitle",...e,children:[t.jsx("title",{id:"githubIconTitle",children:"GitHub"}),t.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.109-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.91 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})]}),Ac=e=>t.jsxs("svg",{width:"800px",height:"800px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",...e,children:[t.jsx("path",{fill:"#4285F4",d:"M14.9 8.161c0-.476-.039-.954-.121-1.422h-6.64v2.695h3.802a3.24 3.24 0 01-1.407 2.127v1.75h2.269c1.332-1.22 2.097-3.02 2.097-5.15z"}),t.jsx("path",{fill:"#34A853",d:"M8.14 15c1.898 0 3.499-.62 4.665-1.69l-2.268-1.749c-.631.427-1.446.669-2.395.669-1.836 0-3.393-1.232-3.952-2.888H1.85v1.803A7.044 7.044 0 008.14 15z"}),t.jsx("path",{fill:"#FBBC04",d:"M4.187 9.342a4.17 4.17 0 010-2.68V4.859H1.849a6.97 6.97 0 000 6.286l2.338-1.803z"}),t.jsx("path",{fill:"#EA4335",d:"M8.14 3.77a3.837 3.837 0 012.7 1.05l2.01-1.999a6.786 6.786 0 00-4.71-1.82 7.042 7.042 0 00-6.29 3.858L4.186 6.66c.556-1.658 2.116-2.89 3.952-2.89z"})]}),Mc=e=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"50",height:"50",viewBox:"0 0 50 50",...e,children:t.jsx("path",{d:"M 6.9199219 6 L 21.136719 26.726562 L 6.2285156 44 L 9.40625 44 L 22.544922 28.777344 L 32.986328 44 L 43 44 L 28.123047 22.3125 L 42.203125 6 L 39.027344 6 L 26.716797 20.261719 L 16.933594 6 L 6.9199219 6 z"})}),v4=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),Rc=()=>t.jsx("svg",{width:"20",height:"20",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",children:t.jsx("path",{fill:"#0A66C2",d:"M12.225 12.225h-1.778V9.44c0-.664-.012-1.519-.925-1.519-.926 0-1.068.724-1.068 1.47v2.834H6.676V6.498h1.707v.783h.024c.348-.594.996-.95 1.684-.925 1.802 0 2.135 1.185 2.135 2.728l-.001 3.14zM4.67 5.715a1.037 1.037 0 01-1.032-1.031c0-.566.466-1.032 1.032-1.032.566 0 1.031.466 1.032 1.032 0 .566-.466 1.032-1.032 1.032zm.889 6.51h-1.78V6.498h1.78v5.727zM13.11 2H2.885A.88.88 0 002 2.866v10.268a.88.88 0 00.885.866h10.226a.882.882 0 00.889-.866V2.865a.88.88 0 00-.889-.864z"})}),Lc=()=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M12 21.42L15.54 10.86H8.46L12 21.42Z",fill:"#E24329"}),t.jsx("path",{d:"M12 21.42L8.46 10.86H2.28L12 21.42Z",fill:"#FC6D26"}),t.jsx("path",{d:"M2.28 10.86L0.86 15.14C0.72 15.54 0.86 15.98 1.18 16.24L12 21.42L2.28 10.86Z",fill:"#FCA326"}),t.jsx("path",{d:"M2.28 10.86H8.46L6.12 3.58C5.98 3.18 5.42 3.18 5.28 3.58L2.28 10.86Z",fill:"#E24329"}),t.jsx("path",{d:"M12 21.42L15.54 10.86H21.72L12 21.42Z",fill:"#FC6D26"}),t.jsx("path",{d:"M21.72 10.86L23.14 15.14C23.28 15.54 23.14 15.98 22.82 16.24L12 21.42L21.72 10.86Z",fill:"#FCA326"}),t.jsx("path",{d:"M21.72 10.86H15.54L17.88 3.58C18.02 3.18 18.58 3.18 18.72 3.58L21.72 10.86Z",fill:"#E24329"})]}),b4=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"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"})}),Pc=()=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("circle",{cx:"512",cy:"512",r:"512",style:{fill:"#5865f2"}}),t.jsx("path",{d:"M689.43 349a422.21 422.21 0 0 0-104.22-32.32 1.58 1.58 0 0 0-1.68.79 294.11 294.11 0 0 0-13 26.66 389.78 389.78 0 0 0-117.05 0 269.75 269.75 0 0 0-13.18-26.66 1.64 1.64 0 0 0-1.68-.79A421 421 0 0 0 334.44 349a1.49 1.49 0 0 0-.69.59c-66.37 99.17-84.55 195.9-75.63 291.41a1.76 1.76 0 0 0 .67 1.2 424.58 424.58 0 0 0 127.85 64.63 1.66 1.66 0 0 0 1.8-.59 303.45 303.45 0 0 0 26.15-42.54 1.62 1.62 0 0 0-.89-2.25 279.6 279.6 0 0 1-39.94-19 1.64 1.64 0 0 1-.16-2.72c2.68-2 5.37-4.1 7.93-6.22a1.58 1.58 0 0 1 1.65-.22c83.79 38.26 174.51 38.26 257.31 0a1.58 1.58 0 0 1 1.68.2c2.56 2.11 5.25 4.23 8 6.24a1.64 1.64 0 0 1-.14 2.72 262.37 262.37 0 0 1-40 19 1.63 1.63 0 0 0-.87 2.28 340.72 340.72 0 0 0 26.13 42.52 1.62 1.62 0 0 0 1.8.61 423.17 423.17 0 0 0 128-64.63 1.64 1.64 0 0 0 .67-1.18c10.68-110.44-17.88-206.38-75.7-291.42a1.3 1.3 0 0 0-.63-.63zM427.09 582.85c-25.23 0-46-23.16-46-51.6s20.38-51.6 46-51.6c25.83 0 46.42 23.36 46 51.6.02 28.44-20.37 51.6-46 51.6zm170.13 0c-25.23 0-46-23.16-46-51.6s20.38-51.6 46-51.6c25.83 0 46.42 23.36 46 51.6.01 28.44-20.17 51.6-46 51.6z",style:{fill:"#fff"}})]}),y4={google_oauth:{label:"Continue with Google",icon:t.jsx(Ac,{})},github_oauth:{label:"Continue with GitHub",icon:t.jsx(Ec,{})},x_oauth:{label:"Continue with X",icon:t.jsx(Mc,{})},facebook_oauth:{label:"Continue with Facebook",icon:t.jsx(v4,{})},linkedin_oauth:{label:"Continue with LinkedIn",icon:t.jsx(Rc,{})},gitlab_oauth:{label:"Continue with GitLab",icon:t.jsx(Lc,{})},apple_oauth:{label:"Continue with Apple",icon:t.jsx(b4,{})},discord_oauth:{label:"Continue with Discord",icon:t.jsx(Pc,{})}},Er=({connections:e,callback:a})=>{const s=e.map(r=>({connection:r,config:y4[r.provider]})).filter(r=>r.config);if(!s.length)return null;if(s.length>3){const r=Math.min(s.length,4);return t.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${r}, 1fr)`,gap:8},children:s.map(({connection:i,config:l})=>t.jsx("button",{type:"button",className:"w-social",style:{justifyContent:"center",padding:0},onClick:()=>a(i),title:l.label,"aria-label":l.label,children:l.icon},i.provider))})}return t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:s.map(({connection:r,config:i})=>t.jsxs("button",{type:"button",className:"w-social",onClick:()=>a(r),children:[i.icon,t.jsx("span",{className:"w-social-label",children:i.label})]},r.provider))})},Et=({to:e,replace:a,children:s,...r})=>{const{navigate:i}=kt(),l=o.useCallback(m=>{m.preventDefault(),i(e,{replace:a})},[e,a,i]);return t.jsx("a",{href:e||void 0,onClick:l,...r,children:s})},Kt=o.forwardRef(({onFocus:e,readOnly:a,...s},r)=>{const[i,l]=o.useState(!1);return t.jsx("input",{ref:r,...s,readOnly:a||!i,onFocus:m=>{i||l(!0),e==null||e(m)}})});Kt.displayName="NoPrefillInput";const qs=[{name:"Afghanistan",code:"AF",dialCode:"+93",flag:"🇦🇫"},{name:"Albania",code:"AL",dialCode:"+355",flag:"🇦🇱"},{name:"Algeria",code:"DZ",dialCode:"+213",flag:"🇩🇿"},{name:"American Samoa",code:"AS",dialCode:"+1684",flag:"🇺🇸"},{name:"Andorra",code:"AD",dialCode:"+376",flag:"🇦🇩"},{name:"Angola",code:"AO",dialCode:"+244",flag:"🇦🇴"},{name:"Anguilla",code:"AI",dialCode:"+1264",flag:"🇦🇮"},{name:"Antarctica",code:"AQ",dialCode:"+672",flag:"🇦🇶"},{name:"Antigua and Barbuda",code:"AG",dialCode:"+1268",flag:"🇦🇬"},{name:"Argentina",code:"AR",dialCode:"+54",flag:"🇦🇷"},{name:"Armenia",code:"AM",dialCode:"+374",flag:"🇦🇲"},{name:"Aruba",code:"AW",dialCode:"+297",flag:"🇦🇼"},{name:"Australia",code:"AU",dialCode:"+61",flag:"🇦🇺"},{name:"Austria",code:"AT",dialCode:"+43",flag:"🇦🇹"},{name:"Azerbaijan",code:"AZ",dialCode:"+994",flag:"🇦🇿"},{name:"Bahamas",code:"BS",dialCode:"+1242",flag:"🇧🇸"},{name:"Bahrain",code:"BH",dialCode:"+973",flag:"🇧🇭"},{name:"Bangladesh",code:"BD",dialCode:"+880",flag:"🇧🇩"},{name:"Barbados",code:"BB",dialCode:"+1246",flag:"🇧🇧"},{name:"Belarus",code:"BY",dialCode:"+375",flag:"🇧🇾"},{name:"Belgium",code:"BE",dialCode:"+32",flag:"🇧🇪"},{name:"Belize",code:"BZ",dialCode:"+501",flag:"🇧🇿"},{name:"Benin",code:"BJ",dialCode:"+229",flag:"🇧🇯"},{name:"Bermuda",code:"BM",dialCode:"+1441",flag:"🇧🇲"},{name:"Bhutan",code:"BT",dialCode:"+975",flag:"🇧🇹"},{name:"Bolivia",code:"BO",dialCode:"+591",flag:"🇧🇴"},{name:"Bosnia and Herzegovina",code:"BA",dialCode:"+387",flag:"🇧🇦"},{name:"Botswana",code:"BW",dialCode:"+267",flag:"🇧🇼"},{name:"Brazil",code:"BR",dialCode:"+55",flag:"🇧🇷"},{name:"British Indian Ocean Territory",code:"IO",dialCode:"+246",flag:"🇮🇴"},{name:"British Virgin Islands",code:"VG",dialCode:"+1284",flag:"🇻🇬"},{name:"Brunei",code:"BN",dialCode:"+673",flag:"🇧🇳"},{name:"Bulgaria",code:"BG",dialCode:"+359",flag:"🇧🇬"},{name:"Burkina Faso",code:"BF",dialCode:"+226",flag:"🇧🇫"},{name:"Burundi",code:"BI",dialCode:"+257",flag:"🇧🇮"},{name:"Cambodia",code:"KH",dialCode:"+855",flag:"🇰🇭"},{name:"Cameroon",code:"CM",dialCode:"+237",flag:"🇨🇲"},{name:"Canada",code:"CA",dialCode:"+1",flag:"🇨🇦"},{name:"Cape Verde",code:"CV",dialCode:"+238",flag:"🇨🇻"},{name:"Cayman Islands",code:"KY",dialCode:"+1345",flag:"🇰🇾"},{name:"Central African Republic",code:"CF",dialCode:"+236",flag:"🇨🇫"},{name:"Chad",code:"TD",dialCode:"+235",flag:"🇹🇩"},{name:"Chile",code:"CL",dialCode:"+56",flag:"🇨🇱"},{name:"China",code:"CN",dialCode:"+86",flag:"🇨🇳"},{name:"Christmas Island",code:"CX",dialCode:"+61",flag:"🇨🇽"},{name:"Cocos Islands",code:"CC",dialCode:"+61",flag:"🇨🇨"},{name:"Colombia",code:"CO",dialCode:"+57",flag:"🇨🇴"},{name:"Comoros",code:"KM",dialCode:"+269",flag:"🇰🇲"},{name:"Cook Islands",code:"CK",dialCode:"+682",flag:"🇨🇰"},{name:"Costa Rica",code:"CR",dialCode:"+506",flag:"🇨🇷"},{name:"Croatia",code:"HR",dialCode:"+385",flag:"🇭🇷"},{name:"Cuba",code:"CU",dialCode:"+53",flag:"🇨🇺"},{name:"Curacao",code:"CW",dialCode:"+599",flag:"🇨🇼"},{name:"Cyprus",code:"CY",dialCode:"+357",flag:"🇨🇾"},{name:"Czech Republic",code:"CZ",dialCode:"+420",flag:"🇨🇿"},{name:"Democratic Republic of the Congo",code:"CD",dialCode:"+243",flag:"🇨🇩"},{name:"Denmark",code:"DK",dialCode:"+45",flag:"🇩🇰"},{name:"Djibouti",code:"DJ",dialCode:"+253",flag:"🇩🇯"},{name:"Dominica",code:"DM",dialCode:"+1767",flag:"🇩🇲"},{name:"Dominican Republic",code:"DO",dialCode:"+1849",flag:"🇩🇴"},{name:"East Timor",code:"TL",dialCode:"+670",flag:"🇹🇱"},{name:"Ecuador",code:"EC",dialCode:"+593",flag:"🇪🇨"},{name:"Egypt",code:"EG",dialCode:"+20",flag:"🇪🇬"},{name:"El Salvador",code:"SV",dialCode:"+503",flag:"🇸🇻"},{name:"Equatorial Guinea",code:"GQ",dialCode:"+240",flag:"🇬🇶"},{name:"Eritrea",code:"ER",dialCode:"+291",flag:"🇪🇷"},{name:"Estonia",code:"EE",dialCode:"+372",flag:"🇪🇪"},{name:"Ethiopia",code:"ET",dialCode:"+251",flag:"🇪🇹"},{name:"Falkland Islands",code:"FK",dialCode:"+500",flag:"🇫🇰"},{name:"Faroe Islands",code:"FO",dialCode:"+298",flag:"🇫🇴"},{name:"Fiji",code:"FJ",dialCode:"+679",flag:"🇫🇯"},{name:"Finland",code:"FI",dialCode:"+358",flag:"🇫🇮"},{name:"France",code:"FR",dialCode:"+33",flag:"🇫🇷"},{name:"French Polynesia",code:"PF",dialCode:"+689",flag:"🇵🇫"},{name:"Gabon",code:"GA",dialCode:"+241",flag:"🇬🇦"},{name:"Gambia",code:"GM",dialCode:"+220",flag:"🇬🇲"},{name:"Georgia",code:"GE",dialCode:"+995",flag:"🇬🇪"},{name:"Germany",code:"DE",dialCode:"+49",flag:"🇩🇪"},{name:"Ghana",code:"GH",dialCode:"+233",flag:"🇬🇭"},{name:"Gibraltar",code:"GI",dialCode:"+350",flag:"🇬🇮"},{name:"Greece",code:"GR",dialCode:"+30",flag:"🇬🇷"},{name:"Greenland",code:"GL",dialCode:"+299",flag:"🇬🇱"},{name:"Grenada",code:"GD",dialCode:"+1473",flag:"🇬🇩"},{name:"Guam",code:"GU",dialCode:"+1671",flag:"🇬🇺"},{name:"Guatemala",code:"GT",dialCode:"+502",flag:"🇬🇹"},{name:"Guernsey",code:"GG",dialCode:"+44",flag:"🇬🇬"},{name:"Guinea",code:"GN",dialCode:"+224",flag:"🇬🇳"},{name:"Guinea-Bissau",code:"GW",dialCode:"+245",flag:"🇬🇼"},{name:"Guyana",code:"GY",dialCode:"+592",flag:"🇬🇾"},{name:"Haiti",code:"HT",dialCode:"+509",flag:"🇭🇹"},{name:"Honduras",code:"HN",dialCode:"+504",flag:"🇭🇳"},{name:"Hong Kong",code:"HK",dialCode:"+852",flag:"🇭🇰"},{name:"Hungary",code:"HU",dialCode:"+36",flag:"🇭🇺"},{name:"Iceland",code:"IS",dialCode:"+354",flag:"🇮🇸"},{name:"India",code:"IN",dialCode:"+91",flag:"🇮🇳"},{name:"Indonesia",code:"ID",dialCode:"+62",flag:"🇮🇩"},{name:"Iran",code:"IR",dialCode:"+98",flag:"🇮🇷"},{name:"Iraq",code:"IQ",dialCode:"+964",flag:"🇮🇶"},{name:"Ireland",code:"IE",dialCode:"+353",flag:"🇮🇪"},{name:"Isle of Man",code:"IM",dialCode:"+44",flag:"🇮🇲"},{name:"Israel",code:"IL",dialCode:"+972",flag:"🇮🇱"},{name:"Italy",code:"IT",dialCode:"+39",flag:"🇮🇹"},{name:"Ivory Coast",code:"CI",dialCode:"+225",flag:"🇨🇮"},{name:"Jamaica",code:"JM",dialCode:"+1876",flag:"🇯🇲"},{name:"Japan",code:"JP",dialCode:"+81",flag:"🇯🇵"},{name:"Jersey",code:"JE",dialCode:"+44",flag:"🇬🇬"},{name:"Jordan",code:"JO",dialCode:"+962",flag:"🇯🇴"},{name:"Kazakhstan",code:"KZ",dialCode:"+7",flag:"🇰🇿"},{name:"Kenya",code:"KE",dialCode:"+254",flag:"🇰🇪"},{name:"Kiribati",code:"KI",dialCode:"+686",flag:"🇰🇮"},{name:"Kosovo",code:"XK",dialCode:"+383",flag:"🇽🇰"},{name:"Kuwait",code:"KW",dialCode:"+965",flag:"🇰🇼"},{name:"Kyrgyzstan",code:"KG",dialCode:"+996",flag:"🇰🇬"},{name:"Laos",code:"LA",dialCode:"+856",flag:"🇱🇦"},{name:"Latvia",code:"LV",dialCode:"+371",flag:"🇱🇻"},{name:"Lebanon",code:"LB",dialCode:"+961",flag:"🇱🇧"},{name:"Lesotho",code:"LS",dialCode:"+266",flag:"🇱🇸"},{name:"Liberia",code:"LR",dialCode:"+231",flag:"🇱🇷"},{name:"Libya",code:"LY",dialCode:"+218",flag:"🇱🇾"},{name:"Liechtenstein",code:"LI",dialCode:"+423",flag:"🇱🇮"},{name:"Lithuania",code:"LT",dialCode:"+370",flag:"🇱🇹"},{name:"Luxembourg",code:"LU",dialCode:"+352",flag:"🇱🇺"},{name:"Macau",code:"MO",dialCode:"+853",flag:"🇲🇴"},{name:"Macedonia",code:"MK",dialCode:"+389",flag:"🇲🇰"},{name:"Madagascar",code:"MG",dialCode:"+261",flag:"🇲🇬"},{name:"Malawi",code:"MW",dialCode:"+265",flag:"🇲🇼"},{name:"Malaysia",code:"MY",dialCode:"+60",flag:"🇲🇾"},{name:"Maldives",code:"MV",dialCode:"+960",flag:"🇲🇻"},{name:"Mali",code:"ML",dialCode:"+223",flag:"🇲🇱"},{name:"Malta",code:"MT",dialCode:"+356",flag:"🇲🇹"},{name:"Marshall Islands",code:"MH",dialCode:"+692",flag:"🇲🇭"},{name:"Mauritania",code:"MR",dialCode:"+222",flag:"🇲🇷"},{name:"Mauritius",code:"MU",dialCode:"+230",flag:"🇲🇺"},{name:"Mayotte",code:"YT",dialCode:"+262",flag:"🇾🇹"},{name:"Mexico",code:"MX",dialCode:"+52",flag:"🇲🇽"},{name:"Micronesia",code:"FM",dialCode:"+691",flag:"🇫🇲"},{name:"Moldova",code:"MD",dialCode:"+373",flag:"🇲🇩"},{name:"Monaco",code:"MC",dialCode:"+377",flag:"🇲🇨"},{name:"Mongolia",code:"MN",dialCode:"+976",flag:"🇲🇳"},{name:"Montenegro",code:"ME",dialCode:"+382",flag:"🇲🇪"},{name:"Montserrat",code:"MS",dialCode:"+1664",flag:"🇲🇸"},{name:"Morocco",code:"MA",dialCode:"+212",flag:"🇲🇦"},{name:"Mozambique",code:"MZ",dialCode:"+258",flag:"🇲🇿"},{name:"Myanmar",code:"MM",dialCode:"+95",flag:"🇲🇲"},{name:"Namibia",code:"NA",dialCode:"+264",flag:"🇳🇦"},{name:"Nauru",code:"NR",dialCode:"+674",flag:"🇳🇷"},{name:"Nepal",code:"NP",dialCode:"+977",flag:"🇳🇵"},{name:"Netherlands",code:"NL",dialCode:"+31",flag:"🇳🇱"},{name:"Netherlands Antilles",code:"AN",dialCode:"+599",flag:"🇳🇱"},{name:"New Caledonia",code:"NC",dialCode:"+687",flag:"🇳🇨"},{name:"New Zealand",code:"NZ",dialCode:"+64",flag:"🇳🇿"},{name:"Nicaragua",code:"NI",dialCode:"+505",flag:"🇳🇮"},{name:"Niger",code:"NE",dialCode:"+227",flag:"🇳🇪"},{name:"Nigeria",code:"NG",dialCode:"+234",flag:"🇳🇬"},{name:"Niue",code:"NU",dialCode:"+683",flag:"🇳🇺"},{name:"North Korea",code:"KP",dialCode:"+850",flag:"🇰🇵"},{name:"Northern Mariana Islands",code:"MP",dialCode:"+1670",flag:"🇲🇵"},{name:"Norway",code:"NO",dialCode:"+47",flag:"🇳🇴"},{name:"Oman",code:"OM",dialCode:"+968",flag:"🇴🇲"},{name:"Pakistan",code:"PK",dialCode:"+92",flag:"🇵🇰"},{name:"Palau",code:"PW",dialCode:"+680",flag:"🇵🇼"},{name:"Palestine",code:"PS",dialCode:"+970",flag:"🇵🇸"},{name:"Panama",code:"PA",dialCode:"+507",flag:"🇵🇦"},{name:"Papua New Guinea",code:"PG",dialCode:"+675",flag:"🇵🇬"},{name:"Paraguay",code:"PY",dialCode:"+595",flag:"🇵🇾"},{name:"Peru",code:"PE",dialCode:"+51",flag:"🇵🇪"},{name:"Philippines",code:"PH",dialCode:"+63",flag:"🇵🇭"},{name:"Pitcairn",code:"PN",dialCode:"+64",flag:"🇵🇳"},{name:"Poland",code:"PL",dialCode:"+48",flag:"🇵🇱"},{name:"Portugal",code:"PT",dialCode:"+351",flag:"🇵🇹"},{name:"Puerto Rico",code:"PR",dialCode:"+1939",flag:"🇵🇷"},{name:"Qatar",code:"QA",dialCode:"+974",flag:"🇶🇦"},{name:"Republic of the Congo",code:"CG",dialCode:"+242",flag:"🇨🇬"},{name:"Reunion",code:"RE",dialCode:"+262",flag:"🇷🇪"},{name:"Romania",code:"RO",dialCode:"+40",flag:"🇷🇴"},{name:"Russia",code:"RU",dialCode:"+7",flag:"🇷🇺"},{name:"Rwanda",code:"RW",dialCode:"+250",flag:"🇷🇼"},{name:"Saint Barthelemy",code:"BL",dialCode:"+590",flag:"🇧🇱"},{name:"Saint Helena",code:"SH",dialCode:"+290",flag:"🇸🇭"},{name:"Saint Kitts and Nevis",code:"KN",dialCode:"+1869",flag:"🇰🇳"},{name:"Saint Lucia",code:"LC",dialCode:"+1758",flag:"🇱🇨"},{name:"Saint Martin",code:"MF",dialCode:"+590",flag:"🇲🇫"},{name:"Saint Pierre and Miquelon",code:"PM",dialCode:"+508",flag:"🇵🇲"},{name:"Saint Vincent and the Grenadines",code:"VC",dialCode:"+1784",flag:"🇻🇨"},{name:"Samoa",code:"WS",dialCode:"+685",flag:"🇼🇸"},{name:"San Marino",code:"SM",dialCode:"+378",flag:"🇸🇲"},{name:"Sao Tome and Principe",code:"ST",dialCode:"+239",flag:"🇸🇹"},{name:"Saudi Arabia",code:"SA",dialCode:"+966",flag:"🇸🇦"},{name:"Senegal",code:"SN",dialCode:"+221",flag:"🇸🇳"},{name:"Serbia",code:"RS",dialCode:"+381",flag:"🇷🇸"},{name:"Seychelles",code:"SC",dialCode:"+248",flag:"🇸🇨"},{name:"Sierra Leone",code:"SL",dialCode:"+232",flag:"🇸🇱"},{name:"Singapore",code:"SG",dialCode:"+65",flag:"🇸🇬"},{name:"Sint Maarten",code:"SX",dialCode:"+1721",flag:"🇸🇽"},{name:"Slovakia",code:"SK",dialCode:"+421",flag:"🇸🇰"},{name:"Slovenia",code:"SI",dialCode:"+386",flag:"🇸🇮"},{name:"Solomon Islands",code:"SB",dialCode:"+677",flag:"🇸🇧"},{name:"Somalia",code:"SO",dialCode:"+252",flag:"🇸🇴"},{name:"South Africa",code:"ZA",dialCode:"+27",flag:"🇿🇦"},{name:"South Korea",code:"KR",dialCode:"+82",flag:"🇰🇷"},{name:"South Sudan",code:"SS",dialCode:"+211",flag:"🇸🇸"},{name:"Spain",code:"ES",dialCode:"+34",flag:"🇪🇸"},{name:"Sri Lanka",code:"LK",dialCode:"+94",flag:"🇱🇰"},{name:"Sudan",code:"SD",dialCode:"+249",flag:"🇸🇩"},{name:"Suriname",code:"SR",dialCode:"+597",flag:"🇸🇷"},{name:"Svalbard and Jan Mayen",code:"SJ",dialCode:"+47",flag:"🇸🇯"},{name:"Swaziland",code:"SZ",dialCode:"+268",flag:"🇸🇿"},{name:"Sweden",code:"SE",dialCode:"+46",flag:"🇸🇪"},{name:"Switzerland",code:"CH",dialCode:"+41",flag:"🇨🇭"},{name:"Syria",code:"SY",dialCode:"+963",flag:"🇸🇾"},{name:"Taiwan",code:"TW",dialCode:"+886",flag:"🇹🇼"},{name:"Tajikistan",code:"TJ",dialCode:"+992",flag:"🇹🇯"},{name:"Tanzania",code:"TZ",dialCode:"+255",flag:"🇹🇿"},{name:"Thailand",code:"TH",dialCode:"+66",flag:"🇹🇭"},{name:"Togo",code:"TG",dialCode:"+228",flag:"🇹🇬"},{name:"Tokelau",code:"TK",dialCode:"+690",flag:"🇹🇰"},{name:"Tonga",code:"TO",dialCode:"+676",flag:"🇹🇴"},{name:"Trinidad and Tobago",code:"TT",dialCode:"+1868",flag:"🇹🇹"},{name:"Tunisia",code:"TN",dialCode:"+216",flag:"🇹🇳"},{name:"Turkey",code:"TR",dialCode:"+90",flag:"🇹🇷"},{name:"Turkmenistan",code:"TM",dialCode:"+993",flag:"🇹🇲"},{name:"Turks and Caicos Islands",code:"TC",dialCode:"+1649",flag:"🇹🇨"},{name:"Tuvalu",code:"TV",dialCode:"+688",flag:"🇹🇻"},{name:"U.S. Virgin Islands",code:"VI",dialCode:"+1340",flag:"🇻🇮"},{name:"Uganda",code:"UG",dialCode:"+256",flag:"🇺🇬"},{name:"Ukraine",code:"UA",dialCode:"+380",flag:"🇺🇦"},{name:"United Arab Emirates",code:"AE",dialCode:"+971",flag:"🇦🇪"},{name:"United Kingdom",code:"GB",dialCode:"+44",flag:"🇬🇧"},{name:"United States",code:"US",dialCode:"+1",flag:"🇺🇸"},{name:"Uruguay",code:"UY",dialCode:"+598",flag:"🇺🇾"},{name:"Uzbekistan",code:"UZ",dialCode:"+998",flag:"🇺🇿"},{name:"Vanuatu",code:"VU",dialCode:"+678",flag:"🇻🇺"},{name:"Vatican",code:"VA",dialCode:"+379",flag:"🇻🇦"},{name:"Venezuela",code:"VE",dialCode:"+58",flag:"🇻🇪"},{name:"Vietnam",code:"VN",dialCode:"+84",flag:"🇻🇳"},{name:"Wallis and Futuna",code:"WF",dialCode:"+681",flag:"🇼🇫"},{name:"Western Sahara",code:"EH",dialCode:"+212",flag:"🇪🇭"},{name:"Yemen",code:"YE",dialCode:"+967",flag:"🇾🇪"},{name:"Zambia",code:"ZM",dialCode:"+260",flag:"🇿🇲"},{name:"Zimbabwe",code:"ZW",dialCode:"+263",flag:"🇿🇼"}],js=({value:e,onChange:a,error:s,countryCode:r,setCountryCode:i})=>{const[l,m]=o.useState(!1),[d,c]=o.useState(qs.find(x=>x.code===r)||qs[0]),p=o.useRef(null),[u,h]=o.useState(""),f=o.useRef(null);o.useEffect(()=>{function x(w){p.current&&!p.current.contains(w.target)&&m(!1)}return document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x)}},[]);const g=qs.filter(x=>x.name.toLowerCase().includes(u.toLowerCase())||x.dialCode.includes(u));return o.useEffect(()=>{i(d.dialCode)},[d,i]),t.jsxs("div",{className:"w-phone",children:[t.jsxs("div",{style:{position:"relative"},ref:p,children:[t.jsxs("button",{type:"button",className:"w-phone-cc",style:{height:"100%"},onClick:()=>m(x=>!x),children:[t.jsx("span",{children:d.flag}),t.jsx("span",{children:d.dialCode}),t.jsx(Wt,{weight:"bold"})]}),l&&t.jsxs("div",{className:"w-country-pop",children:[t.jsxs("div",{className:"w-country-search",children:[t.jsx(Pl,{}),t.jsx("input",{type:"text",placeholder:"Search country…",value:u,onChange:x=>h(x.target.value),onClick:x=>x.stopPropagation()})]}),t.jsx("div",{className:"w-country-list",children:g.map(x=>t.jsxs("button",{type:"button",className:"w-country-opt",onClick:w=>{var b;w.stopPropagation(),w.preventDefault(),c(x),m(!1),(b=f.current)==null||b.focus()},children:[t.jsx("span",{children:x.flag}),t.jsx("span",{children:x.name}),t.jsx("span",{className:"dial",children:x.dialCode})]},x.code))})]})]}),t.jsx("input",{type:"tel",id:"phone",name:"phone",required:!0,minLength:7,maxLength:15,ref:f,value:e,onChange:a,placeholder:"Phone number","aria-invalid":!!s,pattern:"^\\d{7,15}$"})]})};function Ar({placement:e="center"}){var m;const{deployment:a}=_e(),[s,r]=o.useState(!1),i=(m=a==null?void 0:a.ui_settings)==null?void 0:m.logo_image_url;if(!i||s)return null;const l=e==="left"?"flex-start":e==="right"?"flex-end":"center";return t.jsx("div",{style:{display:"flex",justifyContent:l,width:"100%"},children:t.jsx("img",{src:i,alt:"Logo",onError:()=>r(!0),style:{maxWidth:40,maxHeight:40,width:"auto",height:"auto",objectFit:"contain"}})})}function tt({children:e,footer:a}){return t.jsxs("div",{className:"w-card w-auth-card",children:[t.jsx("div",{className:"w-create-body",children:e}),a&&t.jsx("div",{className:"w-create-foot",children:a})]})}function rt({title:e,sub:a,children:s}){return t.jsxs("div",{className:"w-auth-head",children:[t.jsx(Ar,{}),t.jsxs("div",{className:"w-auth-head-text",children:[t.jsx("h1",{className:"w-auth-title",children:e}),a&&t.jsx("p",{className:"w-auth-sub",children:a})]}),s]})}function vt({size:e=16,onAccent:a}){return t.jsx("span",{className:a?"w-spin w-spin--on-accent":"w-spin",style:{width:e,height:e}})}function _s(){return t.jsx($e,{children:t.jsx("div",{className:"w-card w-auth-card",children:t.jsx("div",{className:"w-create-body",children:t.jsxs("div",{className:"w-auth-skel","aria-hidden":"true",children:[t.jsxs("div",{className:"w-auth-skel-head",children:[t.jsx("span",{className:"w-skel w-skel-avatar"}),t.jsx("span",{className:"w-skel w-skel-title"}),t.jsx("span",{className:"w-skel w-skel-sub"})]}),t.jsxs("div",{className:"w-auth-skel-fields",children:[t.jsxs("div",{className:"w-auth-skel-field",children:[t.jsx("span",{className:"w-skel w-skel-label"}),t.jsx("span",{className:"w-skel w-skel-input"})]}),t.jsxs("div",{className:"w-auth-skel-field",children:[t.jsx("span",{className:"w-skel w-skel-label"}),t.jsx("span",{className:"w-skel w-skel-input"})]}),t.jsx("span",{className:"w-skel w-skel-btn"})]})]})})})})}function j4(e){const a=e.indexOf(":");return a>=0?e.slice(0,a):e}function _4(e){const a=e.trim();if(!a)return null;try{return new URL(a.includes("://")?a:`https://${a}`).hostname.toLowerCase()||null}catch{return null}}function k4(e){try{return new URL(e)}catch{if(typeof window>"u")return null;try{return new URL(e,window.location.origin)}catch{return null}}}function C4(e,a){return!e||!a?!1:e===a?!0:e.endsWith(`.${a}`)}function N4(e,a){if(!a)return!1;const s=k4(a);if(!s||s.protocol!=="https:"&&s.protocol!=="http:")return!1;if((e==null?void 0:e.mode)==="staging")return!0;if(s.protocol!=="https:"||!(e!=null&&e.frontend_host))return!1;const r=_4(j4(e.frontend_host));return r?C4(s.hostname.toLowerCase(),r):!1}function gt(e,a){return a&&N4(e,a)?a:null}function $c({apiHost:e,onSolve:a,onError:s}){const[r,i]=o.useState(null),l=o.useRef(a),m=o.useRef(s),d=o.useRef(!1);return l.current=a,m.current=s,o.useEffect(()=>{if(d.current)return;d.current=!0;let c=!1;return(async()=>{var p;try{const u=await xo(e);if(c)return;l.current(u)}catch(u){if(c)return;const h=u instanceof Error?u.message:"Challenge failed";i(h),(p=m.current)==null||p.call(m,"challenge_failed")}})(),()=>{c=!0}},[e]),r?t.jsx("div",{style:{fontSize:12,color:"var(--wa-error)",marginBottom:12},children:r}):null}function S4(){var fe,ne,ae,re,Le,K,at,ze,We,Re,ce,B,q,X,oe,Ee;const{loading:e,signUp:a,signupAttempt:s,discardSignupAttempt:r}=yo(),{signIn:i}=cs("oauth"),{deployment:l}=_e(),{navigate:m}=kt(),{session:d,refetch:c,loading:p}=ot(),[u,h]=o.useState({first_name:"",last_name:"",email:"",password:"",username:"",phone_number:""}),[f,g]=o.useState({}),[x,w]=o.useState(!1),[b,j]=o.useState(void 0),[v,k]=o.useState(null),[N,_]=o.useState(null),[C,y]=o.useState(!1),[E,A]=o.useState(""),H=!!E,M=((fe=l==null?void 0:l.restrictions)==null?void 0:fe.sign_up_mode)==="restricted",T=((ne=l==null?void 0:l.restrictions)==null?void 0:ne.sign_up_mode)==="waitlist",P=((re=(ae=l==null?void 0:l.auth_settings)==null?void 0:ae.multi_session_support)==null?void 0:re.enabled)??!1;o.useEffect(()=>{var z;if(!p&&(d!=null&&d.active_signin)&&!P&&!C){y(!0);let D=gt(l,new URLSearchParams(window.location.search).get("redirect_uri"));D||(D=((z=l==null?void 0:l.ui_settings)==null?void 0:z.after_signin_redirect_url)||null),!D&&(l!=null&&l.frontend_host)&&(D=`https://${l.frontend_host}`),D&&m(D)}},[d,p,P,l,m,C]),o.useEffect(()=>{var we;if(!l)return;const D=new URLSearchParams(window.location.search).get("invite_token");if(T&&!D){y(!0);const ge=((we=l.ui_settings)==null?void 0:we.waitlist_page_url)||`https://${l.frontend_host}/waitlist`;m(ge);return}D&&!v&&a&&(_(D),a.validateDeploymentInvitation(D).then(ge=>{k(ge),ge.valid&&h(xe=>({...xe,first_name:ge.first_name||xe.first_name,last_name:ge.last_name||xe.last_name,email:ge.email||xe.email}))}).catch(()=>{g(ge=>({...ge,submit:"Failed to validate invitation."}))}))},[l,T,m,v,a]);const[S,$]=o.useState(!1),[Z,R]=o.useState(""),L=z=>{let{name:D,value:we}=z.target;D==="phone_number"?we=we.replace(/[^0-9-]/g,""):D==="email"&&(we=we.toLowerCase()),h(ge=>({...ge,[D]:we})),g(ge=>({...ge,[D]:""}))},O=()=>{h({first_name:"",last_name:"",email:"",password:"",username:"",phone_number:""}),g({}),$(!1),R(""),r()},F=async z=>{if(z.preventDefault(),e||x)return;const D={};H||(D.submit="Challenge verification is still loading. Please try again.");const we=/^[a-zA-Z]{3,30}$/,ge=/^[a-zA-Z][a-zA-Z0-9_.]{2,29}$/,xe=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,lt=/^\d{7,15}$/,Qe=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,125}$/;if(V!=null&&V.first_name.enabled&&(V!=null&&V.first_name.required&&!u.first_name?D.first_name="First name is required":u.first_name&&!we.test(u.first_name)&&(D.first_name="Invalid name")),V!=null&&V.last_name.enabled&&(V!=null&&V.last_name.required&&!u.last_name?D.last_name="Last name is required":u.last_name&&!we.test(u.last_name)&&(D.last_name="Invalid last name")),V!=null&&V.username.enabled&&(V!=null&&V.username.required&&!u.username?D.username="Username is required":u.username&&!ge.test(u.username)&&(D.username="Username must be 3-20 characters")),V!=null&&V.email_address.enabled&&(V!=null&&V.email_address.required&&!u.email?D.email="Email address is required":u.email&&!xe.test(u.email)&&(D.email="Invalid email address")),V!=null&&V.phone_number.enabled&&(V!=null&&V.phone_number.required&&!u.phone_number?D.phone_number="Phone number is required":u.phone_number&&!lt.test(u.phone_number)&&(D.phone_number="Phone number must contain 7-15 digits")),V!=null&&V.password.enabled&&(u.password?Qe.test(u.password)||(D.password="Password must be 8-125 characters and include uppercase, lowercase, number, and special character"):D.password="Password is required"),g(D),!(Object.keys(D).length>0)){w(!0);try{const Q={...u};u.phone_number&&b&&(Q.phone_country_code=b),N&&(Q.invite_token=N),E&&(Q.challenge_token=E),await a.create(Q)}catch(Q){g({submit:Q.message})}finally{w(!1)}}},W=async z=>{if(!(e||x||!H)){w(!0);try{const D=new URLSearchParams(window.location.search),we=gt(l,D.get("redirect_uri"))||void 0,{data:ge}=await i.create({provider:z.provider,redirectUri:we,challenge_token:E});ge&&typeof ge=="object"&&"oauth_url"in ge&&(window.location.href=ge.oauth_url)}catch(D){g({submit:D.message})}finally{w(!1)}}},U=(l==null?void 0:l.social_connections.filter(z=>z.enabled))||[],V=l==null?void 0:l.auth_settings,G=!!((Le=V==null?void 0:V.first_name)!=null&&Le.enabled&&((K=V==null?void 0:V.last_name)!=null&&K.enabled)),Y=async z=>{var we;if(z.preventDefault(),e||x)return;w(!0);const D={};if(!Z){D.otp="OTP code is required",g(D),w(!1);return}g(D);try{const ge=await a.completeVerification(Z);"data"in ge&&((we=ge.data)!=null&&we.active_signin)&&await c()}catch{g(ge=>({...ge,submit:"Verification failed. Please try again."}))}finally{w(!1)}};if(o.useEffect(()=>{var z;if(s){if(s.completed){let D=gt(l,new URLSearchParams(window.location.search).get("redirect_uri"));if(D||(D=((z=l==null?void 0:l.ui_settings)==null?void 0:z.after_signup_redirect_url)||null),!D&&(l!=null&&l.frontend_host)&&(D=`https://${l.frontend_host}`),D){let we;try{we=new URL(D)}catch{we=new URL(D,window.location.origin)}(l==null?void 0:l.mode)==="staging"&&we.searchParams.set("__dev_session__",xt(l.backend_host)||""),m(we.toString())}return}if(!S){switch(s.current_step){case"verify_email":a.prepareVerification({strategy:"email_otp",challenge_token:E});break;case"verify_phone":a.prepareVerification({strategy:"phone_otp",challenge_token:E});break}$(!0)}}},[s,a,S,l,d,m]),p||C)return t.jsx(_s,{});const de=((at=l==null?void 0:l.ui_settings)==null?void 0:at.app_name)||"App";if(M)return t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Need assistance?"," ",t.jsx(Et,{className:"w-link",to:(ze=l==null?void 0:l.ui_settings)!=null&&ze.sign_in_page_url?`${l.ui_settings.sign_in_page_url}?help=true`:"#",children:"Get help"})]}),children:[t.jsx(rt,{title:"Sign-up restricted",sub:"This app isn't open for public sign-up right now."}),t.jsx("div",{className:"w-banner w-banner--warn",children:t.jsx("span",{className:"w-banner-txt",children:"New account registration is currently restricted. Please check back later or contact your administrator for an invitation."})})]})});if(S){const z=(s==null?void 0:s.current_step)==="verify_phone";return t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(Et,{className:"w-link",to:((We=l==null?void 0:l.ui_settings)==null?void 0:We.support_page_url)||"#",children:"Get help"})]}),children:[t.jsx(rt,{title:z?"Check your phone":"Enter the code",sub:z?"We sent a verification code via SMS.":"We sent a 6-digit code to your email.",children:t.jsxs("button",{type:"button",className:"w-addr-badge",onClick:O,children:[t.jsx(Hl,{weight:"bold"}),z?`+${u.phone_number}`:u.email]})}),t.jsxs("form",{onSubmit:Y,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[t.jsx(ja,{onComplete:async D=>{R(D)},onResend:async()=>{const D=z?"phone_otp":"email_otp";await a.prepareVerification({strategy:D,challenge_token:E})},error:f.otp,isSubmitting:x}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:x||e||!Z,children:x&&Z?t.jsx(vt,{size:15,onAccent:!0}):`Continue to ${de}`})]})]})})}return t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Already have an account?"," ",t.jsx(Et,{className:"w-link",to:`${((Re=l==null?void 0:l.ui_settings)==null?void 0:Re.sign_in_page_url)??""}${window.location.search}`,children:"Sign in"})]}),children:[t.jsx(rt,{title:"Create your account",sub:v!=null&&v.valid?"You've been invited — complete your registration below.":"Get started in a few seconds."}),U.length>0&&t.jsxs(t.Fragment,{children:[t.jsx(Er,{connections:U,callback:W}),t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"OR"})})]}),t.jsxs("form",{onSubmit:F,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[(((ce=V==null?void 0:V.first_name)==null?void 0:ce.enabled)||((B=V==null?void 0:V.last_name)==null?void 0:B.enabled))&&t.jsxs("div",{className:G?"w-grid-2":"",children:[((q=V==null?void 0:V.first_name)==null?void 0:q.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["First name",((X=V==null?void 0:V.first_name)==null?void 0:X.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(Kt,{className:"w-input",type:"text",id:"first_name",name:"first_name",autoComplete:"given-name",required:!0,minLength:3,maxLength:30,value:u.first_name,onChange:L,placeholder:"Jane","aria-invalid":!!f.first_name,pattern:"^[a-zA-Z]{3,30}$"}),f.first_name&&t.jsx("span",{className:"w-input-err",children:f.first_name})]}),((oe=V==null?void 0:V.last_name)==null?void 0:oe.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Last name",((Ee=V==null?void 0:V.last_name)==null?void 0:Ee.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(Kt,{className:"w-input",type:"text",id:"last_name",name:"last_name",autoComplete:"family-name",required:!0,minLength:3,maxLength:30,value:u.last_name,onChange:L,placeholder:"Doe","aria-invalid":!!f.last_name,pattern:"^[a-zA-Z]{3,30}$"}),f.last_name&&t.jsx("span",{className:"w-input-err",children:f.last_name})]})]}),(V==null?void 0:V.username.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Username",V.username.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(Kt,{className:"w-input",type:"text",id:"username",name:"username",autoComplete:"username",minLength:3,maxLength:20,value:u.username,onChange:L,placeholder:"yourname","aria-invalid":!!f.username,required:!0,pattern:"^[a-zA-Z][a-zA-Z0-9_.]{2,29}$"}),f.username&&t.jsx("span",{className:"w-input-err",children:f.username})]}),(V==null?void 0:V.email_address.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Email address",V.email_address.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(Kt,{className:"w-input",type:"email",id:"email",name:"email",autoComplete:"email",maxLength:320,value:u.email,onChange:L,placeholder:"you@company.com","aria-invalid":!!f.email,required:!0,readOnly:(v==null?void 0:v.valid)&&!!(v!=null&&v.email),pattern:"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"}),f.email&&t.jsx("span",{className:"w-input-err",children:f.email})]}),(V==null?void 0:V.phone_number.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Phone number",V.phone_number.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(js,{value:u.phone_number,onChange:L,error:f.phone_number,countryCode:b,setCountryCode:j}),f.phone_number&&t.jsx("span",{className:"w-input-err",children:f.phone_number})]}),(V==null?void 0:V.password.enabled)&&t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Password",V.password.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(Kt,{className:"w-input",type:"password",id:"password",name:"password",autoComplete:"new-password",value:u.password,onChange:L,placeholder:"Create a password","aria-invalid":!!f.password,required:!0,minLength:8,maxLength:128,pattern:"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,125}$"}),f.password&&t.jsx("span",{className:"w-input-err",children:f.password})]}),f.submit&&t.jsx("span",{className:"w-input-err",children:f.submit}),t.jsx($c,{apiHost:(l==null?void 0:l.backend_host)??"",onSolve:z=>A(z),onError:()=>A("")}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:x||e||!H,children:x?t.jsx(vt,{size:15,onAccent:!0}):"Continue"}),(()=>{var we,ge;const z=(we=l==null?void 0:l.ui_settings)==null?void 0:we.tos_page_url,D=(ge=l==null?void 0:l.ui_settings)==null?void 0:ge.privacy_policy_url;return!z&&!D?null:t.jsxs("p",{className:"w-fineprint",children:["By continuing you agree to our"," ",z&&t.jsx(Et,{className:"w-link w-link--muted",to:z,children:"Terms of Service"}),z&&D&&" and ",D&&t.jsx(Et,{className:"w-link w-link--muted",to:D,children:"Privacy Policy"}),"."]})})()]})]})})}function Oc({icon:e,label:a,description:s,onClick:r,disabled:i,type:l="button"}){return t.jsxs("button",{type:l,className:"w-method",onClick:r,disabled:i,"data-disabled":i?"":void 0,children:[t.jsx("span",{className:"w-method-ic",children:e}),t.jsxs("span",{className:"w-method-body",children:[t.jsx("span",{className:"w-method-title",children:a}),s&&t.jsx("span",{className:"w-method-desc",children:s})]}),t.jsx("span",{className:"w-method-go",children:t.jsx(Jt,{})})]})}const Zc=o.createContext(void 0);function Hc(){const e=o.useContext(Zc);if(!e)throw new Error("useSignIn must be used within a SignInProvider");return e}function E4({children:e}){var j;const{deployment:a}=_e(),[s,r]=o.useState((a==null?void 0:a.auth_settings.first_factor)||"email_password"),i=o.useRef(!!(a!=null&&a.auth_settings.first_factor)),[l,m]=o.useState(""),[d,c]=o.useState(!1),[p,u]=o.useState(!1),[h,f]=o.useState(!1),[g,x]=o.useState("identifier"),w=(a==null?void 0:a.social_connections.filter(v=>v.enabled))||[],b=a==null?void 0:a.auth_settings;return o.useEffect(()=>{var k;const v=(k=a==null?void 0:a.auth_settings)==null?void 0:k.first_factor;!i.current&&v&&(r(v),i.current=!0)},[(j=a==null?void 0:a.auth_settings)==null?void 0:j.first_factor]),t.jsx(Zc.Provider,{value:{email:l,showOtherOptions:d,showForgotPassword:p,otpSent:h,setFirstFactor:r,setEmail:m,setShowOtherOptions:c,setShowForgotPassword:u,setOtpSent:f,enabledSocialsProviders:w,authSettings:b,firstFactor:s,signInStep:g,setSignInStep:x},children:e})}const A4=[{key:"email_magic_link",icon:t.jsx(Bu,{}),label:"Magic link",description:"We'll email you a one-click sign-in link"},{key:"email_password",icon:t.jsx(Wu,{}),label:"Email and password",description:"Sign in with your email and password"},{key:"email_otp",icon:t.jsx(Nl,{}),label:"Email one-time code",description:"We'll send a verification code to your email"},{key:"phone_otp",icon:t.jsx(Iu,{}),label:"Phone number",description:"We'll send a verification code via SMS"},{key:"username_password",icon:t.jsx(fs,{}),label:"Username and password",description:"Sign in with your username and password"}];function Fc(){const{deployment:e}=_e(),{signIn:a}=cs("oauth"),{setFirstFactor:s,firstFactor:r,setShowOtherOptions:i,setSignInStep:l}=Hc(),[m,d]=o.useState(!1),c=e==null?void 0:e.auth_settings,p=(e==null?void 0:e.social_connections.filter(x=>x.enabled))||[],u=async x=>{if(!m){d(!0);try{const{data:w}=await a.create({provider:x.provider});w&&typeof w=="object"&&"oauth_url"in w&&(window.location.href=w.oauth_url)}catch{}finally{d(!1)}}},h=A4.filter(x=>{if(x.key===r)return!1;const w=c==null?void 0:c.auth_factors_enabled;return w?w[x.key]:!1}),f=p.length>0,g=h.length>0;return t.jsxs(t.Fragment,{children:[f&&t.jsx(Er,{connections:p,callback:u}),f&&g&&t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"or"})}),g&&t.jsx("div",{className:"w-method-stack",children:h.map(x=>t.jsx(Oc,{icon:x.icon,label:x.label,description:x.description,onClick:()=>{s(x.key),l("identifier"),i(!1)}},x.key))})]})}function M4({onBack:e}){var H;const{deployment:a}=_e(),{navigate:s}=kt(),[r,i]=o.useState("start"),[l,m]=o.useState(""),[d,c]=o.useState(""),[p,u]=o.useState(""),[h,f]=o.useState(""),[g,x]=o.useState(""),{forgotPassword:w,verifyOtp:b,resetPassword:j}=Zo(),[v,k]=o.useState(!1),[N,_]=o.useState(null),C=async M=>{if(M.preventDefault(),!!l){k(!0),_(null);try{await w(l),i("otp")}catch(T){_(T)}finally{k(!1)}}},y=async M=>{if(M.preventDefault(),d.length===6){k(!0),_(null);try{const T=await b(l,d);T.data&&(u(T.data.token),i("reset"))}catch(T){_(T)}finally{k(!1)}}},E=async M=>{var T,P;if(M.preventDefault(),h===g&&!(h.length<8)){k(!0),_(null);try{const S=await j(p,h);if(S.data){const $=S.data,Z=$.signin_attempts&&$.signin_attempts.length>0?$.signin_attempts[$.signin_attempts.length-1]:null;if(Z&&!Z.completed){const R=(T=a==null?void 0:a.ui_settings)==null?void 0:T.sign_in_page_url;if(R){const L=new URL(R,window.location.origin);L.searchParams.set("signin_attempt_id",Z.id),s(L.toString())}else e()}else{const R=((P=a==null?void 0:a.ui_settings)==null?void 0:P.after_signin_redirect_url)||"/";s(R)}}}catch(S){_(S)}finally{k(!1)}}},A=t.jsx("span",{className:"w-auth-foot",children:t.jsx("span",{className:"w-link",style:{cursor:"pointer"},onClick:e,children:"Back to sign in"})});return t.jsxs($e,{children:[r==="start"&&t.jsxs(tt,{footer:A,children:[t.jsx(rt,{title:"Forgot your password?",sub:"Reset it, or sign in another way."}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:()=>i("email"),disabled:v,children:"Reset your password"}),t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"OR"})}),t.jsx(Fc,{}),t.jsxs("p",{className:"w-secsub",style:{textAlign:"center",marginTop:16},children:["Unable to reset password?"," ",t.jsx("a",{className:"w-link",href:((H=a==null?void 0:a.ui_settings)==null?void 0:H.support_page_url)||"#",children:"Get help"})]})]}),r==="email"&&t.jsxs(tt,{footer:A,children:[t.jsx(rt,{title:"Forgot password",sub:"Enter your email and we'll send you a code to reset your password."}),t.jsxs("form",{onSubmit:C,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Email address"}),t.jsx("input",{className:"w-input",type:"email",id:"email",value:l,onChange:M=>m(M.target.value),placeholder:"you@company.com",required:!0})]}),N&&t.jsx("span",{className:"w-input-err",children:N.message}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:v,children:v?t.jsx(vt,{size:15,onAccent:!0}):"Send code"})]})]}),r==="otp"&&t.jsxs(tt,{footer:A,children:[t.jsx(rt,{title:"Enter verification code",sub:`We sent a 6-digit code to ${l}.`}),t.jsxs("form",{onSubmit:y,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[t.jsx(ja,{onComplete:M=>c(M),isSubmitting:v,error:N==null?void 0:N.message,onResend:async()=>{await w(l)}}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:v||d.length!==6,children:v?t.jsx(vt,{size:15,onAccent:!0}):"Verify"})]})]}),r==="reset"&&t.jsxs(tt,{footer:A,children:[t.jsx(rt,{title:"Reset password",sub:"Create a new password for your account."}),t.jsxs("form",{onSubmit:E,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"New password"}),t.jsx("input",{className:"w-input",type:"password",id:"password",value:h,onChange:M=>f(M.target.value),placeholder:"Enter new password",required:!0})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Confirm new password"}),t.jsx("input",{className:"w-input",type:"password",id:"confirmPassword",value:g,onChange:M=>x(M.target.value),placeholder:"Confirm new password",required:!0})]}),N&&t.jsx("span",{className:"w-input-err",children:N.message}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:v,children:v?t.jsx(vt,{size:15,onAccent:!0}):"Reset password"})]})]})]})}function R4({onBack:e}){var r;const{deployment:a}=_e(),s=(r=a==null?void 0:a.ui_settings)==null?void 0:r.app_name;return t.jsx($e,{children:t.jsxs(tt,{footer:t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:e,children:"Back to sign in"})}),children:[t.jsx(rt,{title:"All sign-in methods",sub:`Choose another way to sign in to ${s||"your account"}`}),t.jsx(Fc,{})]})})}function Tc({methods:e,onSelectMethod:a,onBack:s}){return t.jsx($e,{children:t.jsxs(tt,{footer:s?t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:s,children:"Back to login"})}):void 0,children:[t.jsx(rt,{title:"Two-factor authentication",sub:"Choose how you'd like to verify your identity"}),t.jsx("div",{className:"w-method-stack",children:e.map(r=>t.jsx(Oc,{icon:r.icon,label:r.name,description:r.phoneNumber?`${r.description} ${r.phoneNumber}`:r.description,onClick:()=>a(r.id),disabled:!r.available},r.id))})]})})}function Ic({onVerify:e,onBack:a,loading:s}){const[r,i]=o.useState(""),[l,m]=o.useState(""),d=p=>{if(p.preventDefault(),r.length!==4){m("Please enter the last 4 digits of your phone number");return}e(r)},c=p=>{const u=p.target.value.replace(/\D/g,"").slice(0,4);i(u),m("")};return t.jsx($e,{children:t.jsxs(tt,{footer:t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:a,children:"Choose a different method"})}),children:[t.jsx(rt,{title:"Verify phone",sub:"Enter the last 4 digits of your phone number."}),t.jsxs("form",{onSubmit:d,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",htmlFor:"lastDigits",children:"Last 4 digits"}),t.jsx("input",{className:`w-input${l?" w-input--invalid":""}`,type:"text",id:"lastDigits",name:"lastDigits",value:r,onChange:c,placeholder:"0000",maxLength:4,autoComplete:"off","aria-invalid":!!l,autoFocus:!0}),l&&t.jsx("span",{className:"w-input-err",children:l})]}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:s||r.length!==4,children:s?t.jsx(vt,{onAccent:!0}):"Send code"})]})]})})}const L4=()=>t.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),P4=()=>t.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}),t.jsx("path",{d:"M12 18h.01"})]}),$4=()=>t.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"m21 2-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0 3 3L22 7l-3-3m-3.5 3.5L19 4"})});function Vc({onBack:e,attempt:a,completeVerification:s,prepareVerification:r}){const{deployment:i}=_e(),[l,m]=o.useState(""),[d,c]=o.useState({}),[p,u]=o.useState(!1),[h,f]=o.useState(null),[g,x]=o.useState(!0),[w,b]=o.useState(!1),[j,v]=o.useState(""),[k,N]=o.useState(!1),{navigate:_}=kt(),C=(a==null?void 0:a.available_2fa_methods)||[],y=[{id:"authenticator",name:"Authenticator app",description:"Use your authenticator app",icon:t.jsx(L4,{}),available:C.includes("authenticator")},{id:"phone_otp",name:"Text message",description:"Get a code via SMS",icon:t.jsx(P4,{}),available:C.includes("phone_otp"),phoneNumber:j},{id:"backup_code",name:"Backup code",description:"Use one of your backup codes",icon:t.jsx($4,{}),available:C.includes("backup_code")}].filter(P=>P.available),E=async P=>{f(P),x(!1),P==="phone_otp"&&b(!0)},A=async P=>{var S,$;if(a){u(!0);try{const Z=await r({strategy:"phone_otp",lastDigits:P});Z&&"data"in Z&&((S=Z.data)!=null&&S.otp_sent)?(($=Z.data)!=null&&$.masked_phone&&v(Z.data.masked_phone),b(!1)):c({phone:"Phone number verification failed"})}catch(Z){c({phone:Z.message})}finally{u(!1)}}},H=async(P,S)=>{if(P.preventDefault(),p)return;const $=S||l,Z={};if($?h==="authenticator"&&$.length!==6?Z.code="Authentication code must be 6 digits":h==="phone_otp"&&$.length!==6&&(Z.code="SMS code must be 6 digits"):Z.code="Verification code is required",c(Z),!(Object.keys(Z).length>0)){u(!0);try{await s($)}catch(R){c({submit:R.message})}finally{u(!1)}}},M=P=>{let S=P.target.value;h!=="backup_code"&&(S=S.replace(/\D/g,"").slice(0,6)),m(S),c($=>({...$,code:""}))};if(o.useEffect(()=>{var P;if(a.completed){N(!0);let S=gt(i,new URLSearchParams(window.location.search).get("redirect_uri"));if(S||(S=((P=i==null?void 0:i.ui_settings)==null?void 0:P.after_signin_redirect_url)||null),!S&&(i!=null&&i.frontend_host)&&(S=`https://${i.frontend_host}`),S){let $;try{$=new URL(S)}catch{$=new URL(S,window.location.origin)}(i==null?void 0:i.mode)==="staging"&&$.searchParams.set("__dev_session__",xt(i.backend_host)||""),_($.toString())}return}},[a,i]),k)return t.jsx(_s,{});if(g)return y.length===0?t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(Et,{to:(i==null?void 0:i.ui_settings.support_page_url)||"#",className:"w-link",children:"Get help"})]}),children:[t.jsx(rt,{title:"Set up two-factor authentication",sub:"Your account requires two-factor authentication, but you haven't set up any methods yet. Please contact your administrator to set up 2FA."}),e&&t.jsx("div",{style:{textAlign:"center"},children:t.jsx("button",{type:"button",className:"w-link",onClick:e,children:"Back to login"})})]})}):t.jsx(Tc,{methods:y,onSelectMethod:E,onBack:e});if(w&&h==="phone_otp")return t.jsx(Ic,{onVerify:A,onBack:()=>{b(!1),x(!0),f(null)},loading:p});const T=h==="authenticator"?"Enter the 6-digit code from your authenticator app":h==="phone_otp"?`Enter the 6-digit code sent to your phone ${j}`:"Enter one of your backup codes";return t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(Et,{to:(i==null?void 0:i.ui_settings.support_page_url)||"#",className:"w-link",children:"Get help"})]}),children:[t.jsx(rt,{title:"Two-factor authentication",sub:T}),t.jsxs("form",{onSubmit:H,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[h==="backup_code"?t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",htmlFor:"code",children:"Backup code"}),t.jsx("input",{className:`w-input${d.code?" w-input--invalid":""}`,type:"text",id:"code",name:"code",value:l,onChange:M,placeholder:"Enter backup code",maxLength:20,autoComplete:"one-time-code","aria-invalid":!!d.code,autoFocus:!0}),d.code&&t.jsx("span",{className:"w-input-err",children:d.code})]}):t.jsx(ja,{onComplete:async P=>{if(m(P),h!=="backup_code"){const S=new Event("submit",{bubbles:!0,cancelable:!0});await H(S,P)}},onResend:h==="phone_otp"?async()=>{try{await r({strategy:"phone_otp",lastDigits:j.slice(-4)})}catch(P){c({submit:P.message})}}:void 0,error:d.code,isSubmitting:p}),d.submit&&t.jsx("span",{className:"w-input-err",children:d.submit}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:p||!l,children:p?t.jsx(vt,{onAccent:!0}):"Verify"})]}),t.jsxs("div",{style:{marginTop:18,textAlign:"center",display:"flex",flexDirection:"column",gap:8},children:[t.jsx("button",{type:"button",className:"w-link",onClick:()=>{x(!0),f(null),m(""),c({})},children:"Try another method"}),e&&t.jsx("button",{type:"button",className:"w-link w-link--muted",onClick:e,children:"Back to login"})]})]})})}function zc({attempt:e,onBack:a,completeProfile:s,completeVerification:r,prepareVerification:i}){var O,F,W,U,V,G,Y,de,fe;const{deployment:l}=_e(),{navigate:m}=kt(),[d,c]=o.useState({}),[p,u]=o.useState({}),[h,f]=o.useState("US"),[g,x]=o.useState(!1),[w,b]=o.useState(!1),[j,v]=o.useState(null),[k,N]=o.useState(!1),_=j,C=w,y=()=>{var ae;N(!0);let ne=gt(l,new URLSearchParams(window.location.search).get("redirect_uri"));if(ne||(ne=((ae=l==null?void 0:l.ui_settings)==null?void 0:ae.after_signin_redirect_url)||null),!ne&&(l!=null&&l.frontend_host)&&(ne=`https://${l.frontend_host}`),ne){let re;try{re=new URL(ne)}catch{re=new URL(ne,window.location.origin)}(l==null?void 0:l.mode)==="staging"&&re.searchParams.set("__dev_session__",xt(l.backend_host)||""),m(re.toString())}},E=async ne=>{b(!0),v(null);try{await s(ne)&&y()}catch(ae){const re=ae;throw v(re),re}finally{b(!1)}},A=async ne=>{b(!0),v(null);try{return await r(ne)&&y(),!0}catch(ae){return v(ae),!1}finally{b(!1)}};if(k||!e)return t.jsx(_s,{});const H=e.missing_fields||[],M=l==null?void 0:l.auth_settings,T=(e==null?void 0:e.current_step)==="verify_phone_otp"||(e==null?void 0:e.current_step)==="verify_email_otp"||g,P=ne=>{const{name:ae,value:re}=ne.target;c(Le=>({...Le,[ae]:re})),p[ae]&&u(Le=>({...Le,[ae]:""}))},S=()=>{const ne={};return H.forEach(ae=>{var K,at,ze,We,Re;const re=d[ae];let Le=!1;switch(ae){case"first_name":Le=((K=M==null?void 0:M.first_name)==null?void 0:K.enabled)||!1;break;case"last_name":Le=((at=M==null?void 0:M.last_name)==null?void 0:at.enabled)||!1;break;case"username":Le=((ze=M==null?void 0:M.username)==null?void 0:ze.enabled)||!1;break;case"phone_number":Le=((We=M==null?void 0:M.phone_number)==null?void 0:We.enabled)||!1;break;case"email_address":Le=((Re=M==null?void 0:M.email_address)==null?void 0:Re.enabled)||!1;break;default:Le=!0}if(Le&&(!re||re.trim()==="")){const ce=ae.replace("_"," ").replace(/\b\w/g,B=>B.toUpperCase());ne[ae]=`${ce} is required`}}),d.username&&H.includes("username")&&(/^[a-zA-Z0-9_-]{3,30}$/.test(d.username)||(ne.username="Username must be 3-30 characters and contain only letters, numbers, underscores, and hyphens")),d.phone_number&&H.includes("phone_number")&&(/^\d{7,15}$/.test(d.phone_number)||(ne.phone_number="Phone number must contain 7-15 digits")),d.email&&H.includes("email_address")&&(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(d.email)||(ne.email_address="Please enter a valid email address")),u(ne),Object.keys(ne).length===0},$=async ne=>{if(ne.preventDefault(),!S())return;const ae={...d};d.phone_number&&h&&(ae.phone_country_code=h),await E(ae)},Z=ne=>{const ae=ne.target.value;c(re=>({...re,phone_number:ae})),p.phone_number&&u(re=>({...re,phone_number:""}))},R=t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(Et,{to:(l==null?void 0:l.ui_settings.support_page_url)||"#",className:"w-link",children:"Get help"})]});if(T){const ne=e.current_step==="verify_phone_otp"?"Verify your phone number":"Verify your email",ae=e.current_step==="verify_phone_otp"?"Enter the 6-digit code sent to your phone":"Enter the 6-digit code sent to your email",re=e.current_step==="verify_phone_otp"?"phone_otp":"email_otp";return t.jsx($e,{children:t.jsxs(tt,{footer:R,children:[t.jsx(rt,{title:ne,sub:ae}),t.jsxs("form",{onSubmit:Le=>Le.preventDefault(),noValidate:!0,style:{display:"flex",flexDirection:"column",gap:14},children:[t.jsx(ja,{onComplete:A,onResend:async()=>{await i({strategy:re})},error:_==null?void 0:_.message,isSubmitting:C}),_&&t.jsx("span",{className:"w-input-err",children:_.message})]}),t.jsx("div",{style:{marginTop:16,textAlign:"center"},children:t.jsx("button",{type:"button",className:"w-link",onClick:()=>x(!1),children:"Back to profile completion"})})]})})}const L=!!((O=M==null?void 0:M.first_name)!=null&&O.enabled&&((F=M==null?void 0:M.last_name)!=null&&F.enabled)&&H.includes("first_name")&&H.includes("last_name"));return t.jsx($e,{children:t.jsxs(tt,{footer:a?t.jsx("span",{className:"w-auth-foot",children:t.jsx("button",{type:"button",className:"w-link",onClick:a,children:"Back to login"})}):R,children:[t.jsx(rt,{title:"Complete your profile",sub:"Please provide the following information to continue"}),t.jsxs("form",{onSubmit:$,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[(H.includes("first_name")||H.includes("last_name"))&&(((W=M==null?void 0:M.first_name)==null?void 0:W.enabled)||((U=M==null?void 0:M.last_name)==null?void 0:U.enabled))&&t.jsxs("div",{className:L?"w-grid-2":"",children:[H.includes("first_name")&&((V=M==null?void 0:M.first_name)==null?void 0:V.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"first_name",children:["First name",M.first_name.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.first_name?" w-input--invalid":""}`,type:"text",id:"first_name",name:"first_name",value:d.first_name||"",onChange:P,placeholder:"Enter your first name",disabled:C,autoComplete:"given-name"}),p.first_name&&t.jsx("span",{className:"w-input-err",children:p.first_name})]}),H.includes("last_name")&&((G=M==null?void 0:M.last_name)==null?void 0:G.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"last_name",children:["Last name",M.last_name.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.last_name?" w-input--invalid":""}`,type:"text",id:"last_name",name:"last_name",value:d.last_name||"",onChange:P,placeholder:"Enter your last name",disabled:C,autoComplete:"family-name"}),p.last_name&&t.jsx("span",{className:"w-input-err",children:p.last_name})]})]}),H.includes("username")&&((Y=M==null?void 0:M.username)==null?void 0:Y.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"username",children:["Username",M.username.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.username?" w-input--invalid":""}`,type:"text",id:"username",name:"username",value:d.username||"",onChange:P,placeholder:"Choose a username",disabled:C,autoComplete:"username"}),p.username&&t.jsx("span",{className:"w-input-err",children:p.username})]}),H.includes("phone_number")&&((de=M==null?void 0:M.phone_number)==null?void 0:de.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"phone_number",children:["Phone number",M.phone_number.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx(js,{value:d.phone_number||"",onChange:Z,error:p.phone_number,countryCode:h,setCountryCode:f}),p.phone_number&&t.jsx("span",{className:"w-input-err",children:p.phone_number})]}),H.includes("email_address")&&((fe=M==null?void 0:M.email_address)==null?void 0:fe.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"email",children:["Email address",M.email_address.required&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:`w-input${p.email_address?" w-input--invalid":""}`,type:"email",id:"email",name:"email",value:d.email||"",onChange:P,placeholder:"Enter your email address",disabled:C,autoComplete:"email"}),p.email_address&&t.jsx("span",{className:"w-input-err",children:p.email_address})]}),_&&t.jsx("span",{className:"w-input-err",children:_.message}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:C,children:C?t.jsx(vt,{onAccent:!0}):"Continue"})]})]})})}function Dc({onComplete:e,onSkip:a}){var u;const[s,r]=o.useState(!1),[i,l]=o.useState(null),{registerPasskey:m}=ya(),{deployment:d}=_e(),c=async()=>{r(!0),l(null);try{await m(),e==null||e()}catch(h){l(h instanceof Error?h.message:"Failed to register passkey")}finally{r(!1)}},p=((u=d==null?void 0:d.ui_settings)==null?void 0:u.app_name)||"this app";return t.jsxs("div",{className:"w-flex w-flex-col w-items-center w-text-center",children:[t.jsx("div",{className:"w-feature-badge",children:t.jsx(nr,{size:26})}),t.jsx("h1",{className:"w-title-lg",children:"Add a passkey"}),t.jsxs("p",{className:"w-sub",style:{marginTop:6,maxWidth:320},children:["Sign in faster and more securely with a passkey. Use your fingerprint, face, or screen lock to access ",p,"."]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,width:"100%",marginTop:24},children:[t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:c,disabled:s,children:s?t.jsxs(t.Fragment,{children:[t.jsx(vt,{size:15,onAccent:!0}),"Registering…"]}):t.jsxs(t.Fragment,{children:[t.jsx(nr,{}),"Add passkey"]})}),t.jsx("button",{type:"button",className:"w-social",onClick:a,children:"Maybe later"})]}),i&&t.jsx("p",{className:"w-input-err",style:{marginTop:14},children:i})]})}function O4(){return t.jsx(E4,{children:t.jsx(Z4,{})})}function Z4(){var yt,ra,ia,oa,la,ie,ve,Ae,J,be,Je,De,jt,_t,Ke,wt,Gt,ca,da,ua,Br,Gr,qr;const{deployment:e}=_e(),{navigate:a}=kt(),{session:s,loading:r,refetch:i,exchangeTicket:l,switchSignIn:m}=ot(),d=((ra=(yt=e==null?void 0:e.auth_settings)==null?void 0:yt.multi_session_support)==null?void 0:ra.enabled)??!1,{setEmail:c,otpSent:p,setOtpSent:u,showForgotPassword:h,setShowForgotPassword:f,showOtherOptions:g,setShowOtherOptions:x,enabledSocialsProviders:w,firstFactor:b,setFirstFactor:j,signInStep:v,setSignInStep:k}=Hc(),{loading:N,signIn:_,signinAttempt:C,discardSignInAttempt:y,setSignInAttempt:E}=cs("generic"),{signIn:A}=cs("oauth"),{signIn:H}=cs("passkey"),[M,T]=o.useState({email:"",username:"",password:"",phone:""}),[P,S]=o.useState({}),[$,Z]=o.useState(!1),[R,L]=o.useState(""),[O,F]=o.useState("US"),[W,U]=o.useState(!1),[V,G]=o.useState(null),[Y,de]=o.useState(!1),[fe,ne]=o.useState(!1),[ae,re]=o.useState(!1),[Le,K]=o.useState(60),[at,ze]=o.useState(!1),[We,Re]=o.useState(null),[ce,B]=o.useState(""),q=!!ce,X=[...(s==null?void 0:s.signins)||[]].sort((ee,te)=>{var ue,Ze;return ee.id===((ue=s==null?void 0:s.active_signin)==null?void 0:ue.id)?-1:te.id===((Ze=s==null?void 0:s.active_signin)==null?void 0:Ze.id)?1:0});o.useEffect(()=>{const ee=new URLSearchParams(window.location.search),te=ee.get("error"),ue=ee.get("error_description");if(te==="access_denied"&&ue){G(ue),ee.delete("error"),ee.delete("error_description");const Ze=ee.toString()?`${window.location.pathname}?${ee.toString()}`:window.location.pathname;window.history.replaceState({},"",Ze)}},[]),o.useEffect(()=>{if(b!=="email_magic_link"||!p)return;K(60),ze(!1);const ee=setInterval(()=>{K(te=>te<=1?(ze(!0),clearInterval(ee),0):te-1)},1e3);return()=>clearInterval(ee)},[b,p]),o.useEffect(()=>{var ee,te,ue,Ze;if(!r&&(s!=null&&s.active_signin)&&!d&&!W&&!Y){let Ne=gt(e,new URLSearchParams(window.location.search).get("redirect_uri"));Ne||(Ne=((ee=e==null?void 0:e.ui_settings)==null?void 0:ee.after_signin_redirect_url)||null),!Ne&&(e!=null&&e.frontend_host)&&(Ne=`https://${e.frontend_host}`);const dt=(te=e==null?void 0:e.auth_settings)==null?void 0:te.passkey;(dt==null?void 0:dt.enabled)&&(dt==null?void 0:dt.prompt_registration_on_auth)&&!((Ze=(ue=s.active_signin)==null?void 0:ue.user)!=null&&Ze.has_passkeys)?(Re(Ne),de(!0)):Ne&&(U(!0),a(Ne))}},[s,r,d,e,a,W]);const oe=ee=>{let{name:te,value:ue}=ee.target;te==="phone"?ue=ue.replace(/[^0-9]/g,""):te==="email"&&(c(ue),ue=ue.toLowerCase()),T(Ze=>({...Ze,[te]:ue})),S(Ze=>({...Ze,[te]:""}))},Ee=()=>{T({email:"",username:"",password:"",phone:""}),S({}),F("US"),k("identifier")},z=async ee=>{if(!ee){S({email:"Email address is required"});return}if(!q){S({submit:"Challenge verification is still loading. Please try again."});return}Z(!0),S({});try{const te=await _.identify(ee,ce);if(te.strategy==="sso"&&te.connection_id){const ue=new URLSearchParams(window.location.search),Ze=gt(e,ue.get("redirect_uri"))||void 0,Ne=await _.initEnterpriseSso(te.connection_id,Ze,ce);if(Ne&&Ne.sso_url){U(!0),window.location.href=Ne.sso_url;return}}else if(te.strategy==="social"&&te.provider){const ue=w.find(Ze=>Ze.provider===te.provider);if(ue){const Ze=new URLSearchParams(window.location.search),Ne=gt(e,Ze.get("redirect_uri"))||void 0,{data:dt}=await A.create({provider:ue.provider,redirectUri:Ne,challenge_token:ce});if(dt&&typeof dt=="object"&&"oauth_url"in dt){U(!0),window.location.href=dt.oauth_url;return}}else k("password")}else k("password")}catch(te){S({submit:te.message})}finally{W||Z(!1)}},D=async ee=>{if(ee.preventDefault(),N||$)return;y();const te={};if(v==="identifier"&&b==="email_password"){if(!M.email){S({email:"Email address is required"});return}await z(M.email);return}if(v==="identifier"&&b==="username_password"){if(!M.username){S({username:"Username is required"});return}S({}),k("password");return}if(b==="email_password"?(M.email||(te.email="Email address is required"),M.password||(te.password="Password is required")):b==="username_password"?(M.username||(te.username="Username is required"),M.password||(te.password="Password is required")):b==="email_otp"||b==="email_magic_link"?M.email||(te.email="Email address is required"):b==="phone_otp"&&(M.phone?/^\d{7,15}$/.test(M.phone)||(te.phone="Phone number must contain 7-15 digits"):te.phone="Phone number is required"),S(te),Object.keys(te).length>0)return;let ue="";switch(b){case"email_password":ue="plain_email";break;case"username_password":ue="plain_username";break;case"email_otp":ue="email_otp";break;case"email_magic_link":ue="magic_link";break;case"phone_otp":ue="phone_otp";break}const Ze=b==="email_otp"||b==="email_magic_link"||b==="phone_otp";if(!q){S({submit:"Challenge verification is still loading. Please try again."});return}Z(!0);try{const Ne={...M,strategy:ue};b==="phone_otp"&&O&&(Ne.phone_country_code=O),ce&&(Ne.challenge_token=ce),await _.create(Ne),Ze||Z(!1)}catch(Ne){S({submit:Ne.message}),Z(!1)}},we=async ee=>{if(ee.preventDefault(),N||$)return;const te={};if(!R){te.otp="OTP code is required",S(te);return}Z(!0),S({});try{await _.completeVerification(R),u(!1),L("")}catch(ue){S({otp:ue.message||"Verification failed"})}finally{Z(!1)}},ge=async ee=>{if(!(N||$||!q)){Z(!0);try{const te=new URLSearchParams(window.location.search),ue=gt(e,te.get("redirect_uri"))||void 0,{data:Ze}=await A.create({provider:ee.provider,redirectUri:ue,challenge_token:ce});Ze&&typeof Ze=="object"&&"oauth_url"in Ze&&(window.location.href=Ze.oauth_url)}catch(te){S({submit:te.message})}finally{Z(!1)}}},xe=async()=>{var ee;if(!(N||$||!q)){Z(!0),S({});try{const te=await H.create({challenge_token:ce});if("data"in te&&te.data){await i();let ue=gt(e,new URLSearchParams(window.location.search).get("redirect_uri"));ue||(ue=((ee=e==null?void 0:e.ui_settings)==null?void 0:ee.after_signin_redirect_url)||null),!ue&&(e!=null&&e.frontend_host)&&(ue=`https://${e.frontend_host}`),U(!0),ue&&a(ue)}}catch(te){S({submit:te.message||"Passkey sign-in failed"})}finally{Z(!1)}}},lt=()=>{var ue;let ee=gt(e,new URLSearchParams(window.location.search).get("redirect_uri"));if(ee||(ee=((ue=e==null?void 0:e.ui_settings)==null?void 0:ue.after_signin_redirect_url)||null),!ee&&(e!=null&&e.frontend_host)&&(ee=`https://${e.frontend_host}`),!ee)return null;let te;try{te=new URL(ee)}catch{te=new URL(ee,window.location.origin)}return(e==null?void 0:e.mode)==="staging"&&te.searchParams.set("__dev_session__",xt(e.backend_host)||""),te.toString()},Qe=async ee=>{if(!(N||$)){S({}),Z(!0);try{await m(ee);const te=lt();te&&(U(!0),a(te))}catch(te){S({submit:te.message||"Failed to continue with selected account"})}finally{Z(!1)}}},Q=(ee,te)=>`${ee||""} ${te||""}`.trim().split(" ").filter(Boolean).map(ue=>ue[0]).join("").toUpperCase().slice(0,2)||"?",le=o.useRef(!1);if(o.useEffect(()=>{if(r)return;const ee=new URLSearchParams(window.location.search),te=ee.get("ticket");if(te&&!le.current&&!N){le.current=!0,ee.delete("ticket");const Ze=ee.toString()?`${window.location.pathname}?${ee.toString()}`:window.location.pathname;window.history.replaceState({},"",Ze),(async()=>{var dt;try{Z(!0),await l(te),U(!0);let Vt=gt(e,new URLSearchParams(window.location.search).get("redirect_uri"));if(Vt||(Vt=((dt=e==null?void 0:e.ui_settings)==null?void 0:dt.after_signin_redirect_url)||null),!Vt&&(e!=null&&e.frontend_host)&&(Vt=`https://${e.frontend_host}`),Vt){let Ss;try{Ss=new URL(Vt)}catch{Ss=new URL(Vt,window.location.origin)}(e==null?void 0:e.mode)==="staging"&&Ss.searchParams.set("__dev_session__",xt(e.backend_host)||""),a(Ss.toString())}return}catch(Vt){S({submit:Vt.message||"Failed to exchange ticket"}),le.current=!1}finally{Z(!1)}})();return}const ue=ee.get("signin_attempt_id");if(ue&&(s!=null&&s.signin_attempts)&&!C){const Ze=s.signin_attempts.find(Ne=>Ne.id===ue);if(Ze){E(Ze),ee.delete("signin_attempt_id");const Ne=ee.toString()?`${window.location.pathname}?${ee.toString()}`:window.location.pathname;window.history.replaceState({},"",Ne)}}},[s,r,C,E,N]),o.useEffect(()=>{var Ze;if(!C)return;if(C.completed){U(!0);let Ne=new URLSearchParams(window.location.search).get("redirect_uri");if(Ne||(Ne=((Ze=e==null?void 0:e.ui_settings)==null?void 0:Ze.after_signin_redirect_url)||null),!Ne&&(e!=null&&e.frontend_host)&&(Ne=`https://${e.frontend_host}`),Ne){let dt;try{dt=new URL(Ne)}catch{dt=new URL(Ne,window.location.origin)}(e==null?void 0:e.mode)==="staging"&&dt.searchParams.set("__dev_session__",xt(e.backend_host)||""),a(dt.toString())}return}if(!_||p)return;const te={verify_email:"email_otp",verify_email_otp:"email_otp",verify_email_link:"magic_link",verify_phone:"phone_otp",verify_phone_otp:"phone_otp"}[C.current_step];if(!te)return;(async()=>{try{await _.prepareVerification({strategy:te,challenge_token:ce}),Z(!1),u(!0)}catch{S({submit:"Failed to send verification. Please try again."}),Z(!1)}})()},[C,_,p,u,a,e]),g)return t.jsx(R4,{onBack:()=>x(!1)});if(h)return t.jsx(M4,{onBack:()=>f(!1)});if((C==null?void 0:C.current_step)==="verify_second_factor")return t.jsx(Vc,{attempt:C,completeVerification:_.completeVerification,prepareVerification:_.prepareVerification,onBack:()=>{y(),Ee(),u(!1)}});if((C==null?void 0:C.current_step)==="complete_profile")return t.jsx(zc,{attempt:C,completeProfile:_.completeProfile,completeVerification:_.completeVerification,prepareVerification:_.prepareVerification,onBack:()=>{y(),Ee(),u(!1)}});if(Y){const ee=()=>{de(!1),We&&(U(!0),a(We))},te=()=>{de(!1),We&&(U(!0),a(We))};return t.jsx($e,{children:t.jsx(tt,{children:t.jsx(Dc,{onComplete:ee,onSkip:te})})})}if(r||W)return t.jsx(_s,{});const me=((ia=e==null?void 0:e.ui_settings)==null?void 0:ia.app_name)||"App",Pe=(C==null?void 0:C.current_step)&&["verify_email","verify_email_otp","verify_email_link","verify_phone","verify_phone_otp"].includes(C.current_step)&&p,qe=b==="email_magic_link",pt=d&&!Pe&&X.length>0&&!ae,sa=()=>{u(!1),y(),Ee()};let It;if(Pe){const ee=b==="phone_otp"?"Check your phone":qe?"Check your inbox":"Enter the code",te=qe?"We sent a magic link to your email — click it to sign in instantly.":b==="phone_otp"?"We sent a verification code via SMS.":"We sent a 6-digit code to your email.",ue=(b==="email_otp"||qe)&&M.email?M.email:b==="phone_otp"&&M.phone?`+${M.phone}`:null;It=t.jsx(rt,{title:ee,sub:te,children:ue&&t.jsxs("button",{type:"button",className:"w-addr-badge",onClick:sa,children:[t.jsx(Hl,{weight:"bold"}),ue]})})}else It=t.jsx(rt,{title:"Sign in to your account",sub:`Please enter your details to continue to ${me}.`});let na;Pe?na=t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx(Et,{className:"w-link",to:((oa=e==null?void 0:e.ui_settings)==null?void 0:oa.support_page_url)||"#",children:"Get help"})]}):na=t.jsxs("span",{className:"w-auth-foot",children:["Don't have an account?"," ",t.jsx(Et,{className:"w-link",to:`${((la=e==null?void 0:e.ui_settings)==null?void 0:la.sign_up_page_url)??""}${window.location.search}`,children:"Sign up"})]});let Bt;if(Pe&&qe)Bt=t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:16,padding:"12px 0 4px"},children:at?t.jsx("button",{type:"button",className:"w-link w-linkbtn",onClick:async()=>{ze(!1),K(60);try{await _.prepareVerification({strategy:"magic_link",challenge_token:ce})}catch{}},children:"Resend magic link"}):t.jsxs("span",{className:"w-secsub",children:["Resend in ",Le,"s"]})});else if(Pe)Bt=t.jsxs("form",{onSubmit:we,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[t.jsx(ja,{onComplete:async ee=>{if(L(ee),ee&&ee.length===6){Z(!0),S({});try{await _.completeVerification(ee),u(!1)}catch(te){S({otp:te.message||"Verification failed"})}finally{Z(!1)}}},onResend:async()=>{const ee=b==="email_otp"?"email_otp":"phone_otp";await _.prepareVerification({strategy:ee,challenge_token:ce})},error:P.otp,isSubmitting:$}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:$||N||!R,children:$&&R?t.jsx(vt,{size:15,onAccent:!0}):`Continue to ${me}`})]});else{const ee=(b==="email_password"||b==="email_otp"||b==="email_magic_link")&&((ve=(ie=e==null?void 0:e.auth_settings)==null?void 0:ie.email_address)==null?void 0:ve.enabled),te=b==="username_password"&&((J=(Ae=e==null?void 0:e.auth_settings)==null?void 0:Ae.username)==null?void 0:J.enabled),ue=b==="phone_otp"&&((Je=(be=e==null?void 0:e.auth_settings)==null?void 0:be.phone_number)==null?void 0:Je.enabled),Ze=v==="password"&&(b==="email_password"||b==="username_password")&&((jt=(De=e==null?void 0:e.auth_settings)==null?void 0:De.password)==null?void 0:jt.enabled);Bt=t.jsxs(t.Fragment,{children:[w.length>0&&t.jsx(Er,{connections:w,callback:ge}),((Ke=(_t=e==null?void 0:e.auth_settings)==null?void 0:_t.passkey)==null?void 0:Ke.enabled)&&t.jsxs("button",{type:"button",className:"w-social",style:{marginTop:w.length>0?10:0},onClick:xe,disabled:$,children:[t.jsx(nr,{}),t.jsx("span",{children:"Sign in with a passkey"})]}),(w.length>0||((Gt=(wt=e==null?void 0:e.auth_settings)==null?void 0:wt.passkey)==null?void 0:Gt.enabled))&&t.jsx("div",{className:"w-or",children:t.jsx("span",{children:"OR"})}),t.jsxs("form",{onSubmit:D,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:13},children:[ee&&t.jsxs("label",{className:"w-field",children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx("span",{className:"w-label",children:"Email address"}),v==="identifier"&&t.jsx("span",{className:"w-link w-link--muted w-link--sm",onClick:()=>x(!0),children:"Other methods"})]}),v==="password"&&b==="email_password"&&M.email?t.jsxs("div",{className:"w-locked",children:[t.jsx("span",{className:"w-locked-ic",children:t.jsx(gi,{})}),t.jsx("span",{className:"w-locked-val",children:M.email}),t.jsx("button",{type:"button",className:"w-link w-link--muted",style:{fontSize:12,cursor:"pointer",background:"none",border:0},onClick:()=>k("identifier"),children:"Edit"})]}):t.jsx(Kt,{className:"w-input",type:"email",id:"email",name:"email",autoComplete:"email",value:M.email,onChange:oe,placeholder:"you@company.com","aria-invalid":!!P.email}),P.email&&t.jsx("span",{className:"w-input-err",children:P.email})]}),te&&t.jsxs("label",{className:"w-field",children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx("span",{className:"w-label",children:"Username"}),v==="identifier"&&t.jsx("span",{className:"w-link w-link--muted w-link--sm",onClick:()=>x(!0),children:"Other methods"})]}),v==="password"&&M.username?t.jsxs("div",{className:"w-locked",children:[t.jsx("span",{className:"w-locked-ic",children:t.jsx(gi,{})}),t.jsx("span",{className:"w-locked-val",children:M.username}),t.jsx("button",{type:"button",className:"w-link w-link--muted",style:{fontSize:12,cursor:"pointer",background:"none",border:0},onClick:()=>{k("identifier"),T(Ne=>({...Ne,password:""}))},children:"Edit"})]}):t.jsx(Kt,{className:"w-input",type:"text",id:"username",name:"username",value:M.username,onChange:oe,placeholder:"yourname","aria-invalid":!!P.username,autoComplete:"username"}),P.username&&t.jsx("span",{className:"w-input-err",children:P.username})]}),ue&&t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Phone number"}),t.jsx(js,{value:M.phone,onChange:oe,error:P.phone,countryCode:O,setCountryCode:F}),P.phone&&t.jsx("span",{className:"w-input-err",children:P.phone})]}),Ze&&t.jsxs("label",{className:"w-field",children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t.jsx("span",{className:"w-label",children:"Password"}),t.jsx("span",{className:"w-link w-link--muted",style:{fontSize:12,cursor:"pointer"},onClick:()=>f(!0),children:"Forgot?"})]}),t.jsx(Kt,{className:"w-input",type:"password",id:"password",name:"password",autoComplete:"current-password",value:M.password,onChange:oe,placeholder:"••••••••","aria-invalid":!!P.password}),P.password&&t.jsx("span",{className:"w-input-err",children:P.password})]}),P.submit&&t.jsx("span",{className:"w-input-err",children:P.submit}),t.jsx($c,{apiHost:(e==null?void 0:e.backend_host)??"",onSolve:Ne=>B(Ne),onError:()=>B("")}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:$||N||!q,children:$?t.jsx(vt,{size:15,onAccent:!0}):t.jsxs(t.Fragment,{children:[v==="identifier"?"Continue":"Sign in",t.jsx(Jt,{weight:"bold"})]})}),v==="password"&&((da=(ca=e==null?void 0:e.auth_settings)==null?void 0:ca.auth_factors_enabled)==null?void 0:da.email_otp)&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-or",style:{margin:"5px 0"},children:t.jsx("span",{children:"OR"})}),t.jsxs("button",{type:"button",className:"w-method",disabled:$,onClick:async()=>{Z(!0),S({});try{await _.create({email:M.email,strategy:"email_otp",challenge_token:ce}),j("email_otp")}catch(Ne){S({submit:Ne.message}),Z(!1)}},children:[t.jsx("span",{className:"w-method-ic",children:t.jsx(Nl,{})}),t.jsxs("span",{className:"w-method-body",children:[t.jsx("span",{className:"w-method-title",children:"Sign in with a code"}),t.jsx("span",{className:"w-method-desc",children:"We'll send a 6-digit code to your email"})]}),t.jsx("span",{className:"w-method-go",children:t.jsx(Jt,{})})]})]})]})]})}return t.jsx($e,{children:t.jsxs(tt,{footer:na,children:[It,V&&t.jsxs("div",{className:"w-banner w-banner--error",style:{marginBottom:18},children:[t.jsx(Ta,{weight:"fill"}),t.jsxs("span",{className:"w-banner-txt",children:[t.jsx("strong",{children:"Access denied."})," ",V," ",t.jsx("span",{className:"w-link",onClick:()=>G(null),children:"Try again"})]})]}),pt&&(fe?t.jsxs("div",{className:"w-acct-list",children:[t.jsx("div",{className:"w-secsub w-acct-list-head",children:"Choose an account"}),t.jsxs("div",{className:"w-acct-list-body",children:[X.map(ee=>{var te,ue,Ze,Ne;return t.jsxs("button",{type:"button",className:"w-acct",onClick:()=>Qe(ee.id),disabled:$||N,children:[t.jsx("span",{className:"w-avatar",children:ee.user.has_profile_picture?t.jsx("img",{src:ee.user.profile_picture_url,alt:((te=ee.user.primary_email_address)==null?void 0:te.email)||"account"}):Q(ee.user.first_name,ee.user.last_name)}),t.jsxs("span",{className:"w-acct-text",children:[t.jsx("span",{className:"w-acct-name",children:ee.user.first_name&&ee.user.last_name?`${ee.user.first_name} ${ee.user.last_name}`:ee.user.first_name||((Ze=(ue=ee.user.primary_email_address)==null?void 0:ue.email)==null?void 0:Ze.split("@")[0])||"Account"}),t.jsx("span",{className:"w-secsub",children:(Ne=ee.user.primary_email_address)==null?void 0:Ne.email})]}),t.jsx(Jt,{className:"w-acct-go"})]},ee.id)}),t.jsxs("button",{type:"button",className:"w-acct",onClick:()=>{ne(!1),re(!0),Ee()},children:[t.jsx("span",{className:"w-avatar",style:{background:"var(--wa-surface-subtle)",color:"var(--wa-text-muted)"},children:t.jsx(Ju,{size:16})}),t.jsx("span",{className:"w-acct-text w-acct-name",children:"Use a different account"}),t.jsx(Jt,{className:"w-acct-go"})]})]})]}):t.jsxs("button",{type:"button",className:"w-acct","data-active":!0,style:{marginBottom:18},onClick:()=>Qe(X[0].id),disabled:$||N,children:[t.jsx("span",{className:"w-avatar",children:X[0].user.has_profile_picture?t.jsx("img",{src:X[0].user.profile_picture_url,alt:((ua=X[0].user.primary_email_address)==null?void 0:ua.email)||"account"}):Q(X[0].user.first_name,X[0].user.last_name)}),t.jsxs("span",{className:"w-acct-text",children:[t.jsxs("span",{className:"w-acct-name",children:["Welcome back,"," ",X[0].user.first_name||((Gr=(Br=X[0].user.primary_email_address)==null?void 0:Br.email)==null?void 0:Gr.split("@")[0])||"back"]}),t.jsx("span",{className:"w-secsub",children:(qr=X[0].user.primary_email_address)==null?void 0:qr.email})]}),t.jsx("span",{className:"w-link w-link--muted w-link--sm",style:{flex:"none"},onClick:ee=>{ee.stopPropagation(),X.length>1?ne(!0):(re(!0),Ee())},children:"Not you?"})]})),Bt]})})}function H4(){var b,j,v,k,N,_,C,y,E,A,H,M;const{deployment:e}=_e(),{loading:a,joinWaitlist:s}=Po(),[r,i]=o.useState({first_name:"",last_name:"",email:""}),[l,m]=o.useState(!1),[d,c]=o.useState(!1),[p,u]=o.useState(null),h=()=>{if(p)return p.message},f=e==null?void 0:e.auth_settings,g=!!((b=f==null?void 0:f.first_name)!=null&&b.enabled&&((j=f==null?void 0:f.last_name)!=null&&j.enabled)),x=T=>{const{name:P,value:S}=T.target;i($=>({...$,[P]:S}))},w=async T=>{if(T.preventDefault(),!!f){c(!0),u(null);try{(await s(r)).data&&m(!0)}catch(P){u(P)}finally{c(!1)}}};return l?t.jsx($e,{children:t.jsx(tt,{children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:16,textAlign:"center"},children:[t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ye,{weight:"bold"})})]}),t.jsx("h1",{className:"w-auth-title",children:"You're on the waitlist"}),t.jsxs("p",{className:"w-auth-sub",children:["Thanks for your interest! We'll notify you at"," ",r.email," when we're ready for you to join."]})]})})}):t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-auth-foot",children:["Need assistance?"," ",t.jsx("a",{href:"/contact",className:"w-link",children:"Get help"})]}),children:[t.jsx(rt,{title:"Join the waitlist",sub:"Be the first to know when we launch!"}),t.jsxs("form",{onSubmit:w,noValidate:!0,style:{display:"flex",flexDirection:"column",gap:16},children:[(((v=f==null?void 0:f.first_name)==null?void 0:v.enabled)||((k=f==null?void 0:f.last_name)==null?void 0:k.enabled))&&t.jsxs("div",{className:g?"w-grid-2":"",children:[((N=f==null?void 0:f.first_name)==null?void 0:N.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"first_name",children:["First name",((_=f==null?void 0:f.first_name)==null?void 0:_.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:"w-input",type:"text",id:"first_name",name:"first_name",required:(C=f==null?void 0:f.first_name)==null?void 0:C.required,minLength:2,maxLength:50,value:r.first_name,onChange:x,placeholder:"First name"})]}),((y=f==null?void 0:f.last_name)==null?void 0:y.enabled)&&t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"last_name",children:["Last name",((E=f==null?void 0:f.last_name)==null?void 0:E.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:"w-input",type:"text",id:"last_name",name:"last_name",required:(A=f==null?void 0:f.last_name)==null?void 0:A.required,minLength:2,maxLength:50,value:r.last_name,onChange:x,placeholder:"Last name"})]})]}),t.jsxs("div",{className:"w-field",children:[t.jsxs("label",{className:"w-label",htmlFor:"email",children:["Email address",((H=f==null?void 0:f.email_address)==null?void 0:H.required)&&t.jsx("span",{className:"w-req",children:"*"})]}),t.jsx("input",{className:"w-input",type:"email",id:"email",name:"email",required:(M=f==null?void 0:f.email_address)==null?void 0:M.required,value:r.email,onChange:x,placeholder:"Enter your email address"})]}),h()&&t.jsx("span",{className:"w-input-err",children:h()}),t.jsx("button",{type:"submit",className:"w-btn w-btn--primary w-btn--block",disabled:d||a,children:d||a?t.jsx(vt,{onAccent:!0}):"Join waitlist"})]})]})})}function Zn({title:e,sub:a,icon:s,message:r,action:i,footer:l}){return t.jsx($e,{children:t.jsxs(tt,{footer:l,children:[t.jsx(rt,{title:e,sub:a}),t.jsxs("div",{className:"w-auth-status",children:[s,t.jsx("p",{className:"w-auth-sub",children:r}),i]})]})})}function F4(){const{deployment:e}=_e(),{navigate:a}=kt(),{error:s,session:r,processed:i,signinAttempt:l,redirectUri:m,loading:d}=$o(),[c,p]=o.useState(!1),[u,h]=o.useState(null),f=()=>{window.location.reload()},g=()=>{var j;const b=((j=e==null?void 0:e.ui_settings)==null?void 0:j.sign_in_page_url)||"/sign-in";a(b)},x=()=>{p(!1),u&&a(u)},w=()=>{p(!1),u&&a(u)};if(o.useEffect(()=>{var b,j,v,k,N;if(!(!i||d||c)){if(l&&!l.completed){const _=(b=e==null?void 0:e.ui_settings)==null?void 0:b.sign_in_page_url;if(_){const C=new URL(_,window.location.origin);C.searchParams.set("signin_attempt_id",l.id),m&&C.searchParams.set("redirect_uri",m),a(C.toString())}return}if(l!=null&&l.completed){const C=gt(e,m)||((j=e==null?void 0:e.ui_settings)==null?void 0:j.after_signin_redirect_url)||(e==null?void 0:e.frontend_host)||"/";let y;try{y=new URL(C)}catch{y=new URL(C,window.location.origin)}if(y){(e==null?void 0:e.mode)==="staging"&&y.searchParams.set("__dev_session__",xt(e.backend_host)||"");const E=(v=e==null?void 0:e.auth_settings)==null?void 0:v.passkey;(E==null?void 0:E.enabled)&&(E==null?void 0:E.prompt_registration_on_auth)&&!((N=(k=r==null?void 0:r.active_signin)==null?void 0:k.user)!=null&&N.has_passkeys)?(h(y.toString()),p(!0)):a(y.toString())}}}},[r,i,d,m,e,l,a]),o.useEffect(()=>{s&&s.message.includes("No OAuth callback data found")&&setTimeout(()=>{var j;const b=((j=e==null?void 0:e.ui_settings)==null?void 0:j.sign_in_page_url)||(e==null?void 0:e.frontend_host);b&&a(b)},2e3)},[s,e,a]),c)return t.jsx($e,{children:t.jsx(tt,{children:t.jsx(Dc,{onComplete:x,onSkip:w})})});if(r&&i&&!s)return t.jsx(Zn,{title:"Success",sub:"Authentication completed successfully",icon:t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ye,{weight:"bold"})})]}),message:"You'll be redirected to your destination shortly."});if(s){const b=s.message.includes("No OAuth callback data found");return t.jsx(Zn,{title:"Something went wrong",sub:"We couldn't complete your sign in",icon:t.jsxs("div",{className:"w-success w-success--error",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Pa,{weight:"bold"})})]}),message:s.message||"An unexpected error occurred during authentication.",action:b?void 0:t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:f,children:"Try again"}),footer:b?void 0:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx("button",{type:"button",className:"w-link",onClick:g,children:"Return to sign in"})]})})}return t.jsx(Zn,{title:"Completing sign in",sub:"Please wait while we authenticate you",icon:t.jsx(vt,{size:32}),message:"Verifying your credentials… this will only take a moment."})}function T4({onSuccess:e,onError:a}={}){const[s,r]=o.useState("loading"),[i,l]=o.useState(""),{token:m,attempt:d,redirectUri:c}=nd(),{verifyMagicLink:p}=Oo(),{navigate:u}=kt(),{deployment:h}=_e(),f=o.useRef(!1);o.useEffect(()=>{(async()=>{if(!f.current){if(!m||!d){r("error"),l("The magic link appears to be malformed. Please try signing in again."),a==null||a("Invalid magic link parameters");return}f.current=!0,r("loading"),l("Please wait while we verify your magic link.");try{await p({token:m,attempt:d,redirectUri:c}),r("success"),l("You will be redirected to your account shortly."),e==null||e(),setTimeout(()=>{var b;let w=gt(h,c);if(w||(w=(b=h==null?void 0:h.ui_settings)==null?void 0:b.after_signin_redirect_url),!w&&(h!=null&&h.frontend_host)&&(w=`https://${h.frontend_host}`),w){const j=new URL(w);(h==null?void 0:h.mode)==="staging"&&j.searchParams.set("__dev_session__",xt(h.backend_host)||""),u(j.toString())}},2e3)}catch(w){r("error"),l("The magic link may have expired or already been used. Please try signing in again."),a==null||a(w.message)}}})()},[m,d]);const g=()=>{var x;(x=h==null?void 0:h.ui_settings)!=null&&x.sign_in_page_url&&u(h.ui_settings.sign_in_page_url)};return t.jsx($e,{children:t.jsxs(tt,{children:[t.jsx(rt,{title:"Magic link",sub:"Verifying your magic link"}),t.jsxs("div",{className:"w-auth-status",children:[s==="loading"&&t.jsx(vt,{size:32}),s==="success"&&t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ye,{weight:"bold"})})]}),s==="error"&&t.jsxs("div",{className:"w-success w-success--error",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Pa,{weight:"bold"})})]}),t.jsx("p",{className:"w-auth-sub",children:i}),s==="error"&&t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:g,children:"Try again"})]})]})})}function I4(e){var r,i;return e?((r=e.signin_attempts)==null?void 0:r.find(l=>l.requires_completion&&!l.completed))?!0:!!((i=e.signup_attempts)==null?void 0:i.find(l=>{var m,d;return((m=l.missing_fields)==null?void 0:m.length)>0||((d=l.remaining_steps)==null?void 0:d.length)>0&&!l.completed})):!1}function V4(e){const a=e?`/profile-completion?redirect_uri=${encodeURIComponent(e)}`:"/profile-completion";window.location.href=a}function rs({kind:e}){const a=e==="success"?"w-success":e==="error"?"w-success w-success--error":"w-success w-success--info",s=e==="success"?Ye:e==="error"?Pa:Uu;return t.jsxs("div",{className:a,children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(s,{weight:"bold"})})]})}function ka({title:e,sub:a,icon:s,message:r,action:i,footer:l}){return t.jsx($e,{children:t.jsxs(tt,{footer:l,children:[t.jsx(rt,{title:e,sub:a}),t.jsxs("div",{className:"w-auth-status",children:[s,t.jsx("p",{className:"w-auth-sub",children:r}),i]})]})})}function z4({token:e,onSuccess:a,onError:s}){var b;const{acceptInvitation:r,invitationData:i,loading:l,error:m}=Uo(),{navigate:d}=kt(),{deployment:c}=_e(),p=o.useRef(!1),u=()=>{var v;const j=new URLSearchParams(window.location.search);return{token:e||j.get("invite_token")||j.get("token"),redirectUri:gt(c,j.get("redirect_uri"))||((v=c==null?void 0:c.ui_settings)==null?void 0:v.after_signin_redirect_url)||"/"}};o.useEffect(()=>{if(p.current)return;const{token:j}=u();j&&(p.current=!0,r(j))},[r]),o.useEffect(()=>{var j;i&&(i.organization&&!i.requires_signin&&a&&a(i.organization.id,(j=i.workspace)==null?void 0:j.id),i.error_code&&s&&s(i.message||"Failed to accept invitation"))},[i,a,s]);const h=()=>{const{redirectUri:j}=u();d(j)},f=()=>{var E,A;const{token:j}=u(),v=((E=c==null?void 0:c.ui_settings)==null?void 0:E.sign_in_page_url)||"/sign-in",k=((A=c==null?void 0:c.ui_settings)==null?void 0:A.sign_up_page_url)||"/sign-up",N=new URLSearchParams;j&&N.set("invite_token",j),i!=null&&i.invited_email&&N.set("invited_email",i.invited_email);const C=`${window.location.pathname}?token=${j}`;N.set("redirect_uri",C),i!=null&&i.message&&N.set("message",i.message);const y=(i==null?void 0:i.error_code)==="INVITATION_REQUIRES_SIGNUP";d(`${y?k:v}?${N.toString()}`)},g=()=>{const{token:j}=u();j&&(p.current=!1,r(j))},x=(j,v)=>t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:v,children:j}),{token:w}=u();if(!w&&!l)return t.jsx(ka,{title:"Invalid invitation",sub:"No invitation token found",icon:t.jsx(rs,{kind:"error"}),message:"The invitation link appears to be invalid or incomplete.",action:x("Go to home",()=>d("/"))});if(l)return t.jsx(ka,{title:"Processing invitation",sub:"Please wait while we verify your invitation",icon:t.jsx(vt,{size:32}),message:"Verifying invitation… this will only take a moment."});if(i!=null&&i.organization&&!i.requires_signin)return t.jsx(ka,{title:"Invitation accepted",sub:"You've successfully joined the organization",icon:t.jsx(rs,{kind:"success"}),message:t.jsxs(t.Fragment,{children:["Welcome to"," ",t.jsx("strong",{children:i.organization.name}),i.workspace?`. You've been added to the ${i.workspace.name} workspace.`:"."]}),action:x("Continue to application",h)});if(i!=null&&i.already_member)return t.jsx(ka,{title:"Already a member",sub:"You're already part of this organization",icon:t.jsx(rs,{kind:"info"}),message:`You're already a member of ${((b=i.organization)==null?void 0:b.name)||"this organization"}. No action needed.`,action:x("Continue to application",h)});if(i!=null&&i.requires_signin){const j=i.error_code==="INVITATION_REQUIRES_SIGNUP";return t.jsx(ka,{title:j?"Sign up required":"Sign in required",sub:"To accept this invitation",icon:t.jsx(rs,{kind:"info"}),message:t.jsxs(t.Fragment,{children:["This invitation is for"," ",t.jsx("strong",{className:"w-text-primary",children:i.invited_email}),"."," ",j?"Create an account with this email address to accept it.":i.error_code==="INVITATION_EMAIL_MISMATCH"?"You're signed in with a different account. Please sign in with the invited email.":"Please sign in to accept this invitation."]}),action:x(j?"Sign up to accept":"Sign in to accept",f)})}return(i==null?void 0:i.error_code)==="INVITATION_EXPIRED"?t.jsx(ka,{title:"Invitation expired",sub:"This invitation is no longer valid",icon:t.jsxs("div",{className:"w-success w-success--error",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Tu,{weight:"bold"})})]}),message:t.jsxs(t.Fragment,{children:["Invitation for"," ",t.jsx("strong",{className:"w-text-primary",children:i.invited_email})," ","has expired. Invitations are valid for 10 days — please request a new one from your organization administrator."]})}):m||i!=null&&i.error_code?t.jsx(ka,{title:"Invitation error",sub:"Unable to process invitation",icon:t.jsx(rs,{kind:"error"}),message:(i==null?void 0:i.message)||m||"Failed to accept invitation",action:x("Try again",g),footer:t.jsxs("span",{className:"w-auth-foot",children:["Having trouble?"," ",t.jsx("button",{type:"button",className:"w-link",onClick:f,children:"Sign in manually"})]})}):null}const Uc=o.createContext(void 0),Wc=()=>{const e=o.useContext(Uc);if(!e)throw new Error("Dialog components must be used within a Dialog");return e},D4=({isOpen:e,onClose:a,children:s})=>{const[r,i]=o.useState(!1),l=as();return o.useEffect(()=>{i(!0);const m=d=>{d.key==="Escape"&&e&&(a==null||a())};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[e,a]),!e||!r?null:tn.createPortal(t.jsx("div",{className:"wacht-root",style:l,children:t.jsx(Uc.Provider,{value:{isOpen:e,onClose:a},children:s})}),document.body)},U4=({children:e})=>{const{onClose:a}=Wc(),s=o.useRef(null),r=i=>{s.current&&!s.current.contains(i.target)&&(a==null||a())};return t.jsx("div",{className:"w-modal",onClick:r,children:t.jsx("div",{ref:s,style:{maxWidth:"100%",minWidth:0},children:e})})},W4=({children:e,style:a,className:s})=>t.jsx("div",{className:`w-dialog${s?` ${s}`:""}`,style:{maxHeight:"90vh",overflowY:"auto",...a},children:e}),B4=({children:e,showCloseButton:a=!0})=>{const{onClose:s}=Wc();return t.jsxs("div",{className:"w-dialog-head",children:[typeof e=="string"?t.jsx("h2",{className:"w-dialog-title",children:e}):e,a&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:s,children:t.jsx(Pa,{size:18})})]})},G4=({children:e,style:a,className:s})=>t.jsx("div",{className:`w-dialog-body${s?` ${s}`:""}`,style:a,children:e}),q4=({children:e})=>t.jsx("div",{className:"w-dialog-foot",children:e}),Ue=Object.assign(D4,{Overlay:U4,Content:W4,Header:B4,Body:G4,Footer:q4}),K4=({isOpen:e,onClose:a,title:s,children:r,showCloseButton:i=!0})=>t.jsx(Ue,{isOpen:e,onClose:a,children:t.jsx(Ue.Overlay,{children:t.jsxs(Ue.Content,{children:[s&&t.jsx(Ue.Header,{showCloseButton:i,children:s}),t.jsx(Ue.Body,{children:r})]})})}),Y4=({trigger:e,renderDialog:a})=>{const[s,r]=o.useState(!1),i=()=>r(!0),l=()=>r(!1);return t.jsxs(t.Fragment,{children:[e({onClick:i}),a({isOpen:s,onClose:l})]})},Bc=o.createContext(void 0),Gc=()=>{const e=o.useContext(Bc);if(!e)throw new Error("useDropdownContext must be used within a DropdownProvider");return e},ks=({children:e,open:a,openChange:s,style:r})=>{const i=o.useRef(null),[l,m]=o.useState(!1);return o.useEffect(()=>{const d=c=>{i.current&&!i.current.contains(c.target)&&m(!1)};return l&&document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[l,s]),o.useEffect(()=>{s==null||s(l)},[l]),o.useEffect(()=>{m(!!a)},[a]),t.jsx(Bc.Provider,{value:{open:l,openChange:d=>m(d)},children:t.jsx("div",{style:{width:"fit-content",...r},ref:i,children:e})})},Cs=({children:e,style:a,className:s})=>{const{open:r}=Gc(),[i,l]=o.useState({top:0,left:0}),[m,d]=o.useState(!1),c=o.useRef(null);return o.useEffect(()=>{r&&c.current?(d(!1),requestAnimationFrame(()=>{var h,f;const p=(h=c.current)==null?void 0:h.parentElement;if(!p)return;const u=p.querySelector("[data-dropdown-trigger]")||p.firstElementChild;if(u&&u!==c.current){const g=u.getBoundingClientRect(),x=(f=c.current)==null?void 0:f.getBoundingClientRect(),w=window.innerWidth,b=window.innerHeight;let j=g.bottom+4,v=g.right-((x==null?void 0:x.width)||200);v<8&&(v=g.left),v+((x==null?void 0:x.width)||200)>w-8&&(v=w-((x==null?void 0:x.width)||200)-8),x&&j+x.height>b-8&&(j=g.top-(x.height+4)),l({top:j,left:v}),d(!0)}})):d(!1)},[r]),r?t.jsx("div",{className:s?`w-menu ${s}`:"w-menu",ref:c,style:{position:"fixed",zIndex:1e3,width:"max-content",minWidth:140,maxWidth:240,...a,top:`${i.top}px`,left:`${i.left}px`,visibility:m?"visible":"hidden",opacity:m?1:0,transition:m?"opacity 0.15s ease-in-out":"none"},children:e}):null},Ns=({children:e})=>{const{openChange:a,open:s}=Gc(),r=o.useCallback(()=>{a(!s)},[s,a]);return t.jsx("div",{style:{position:"relative",display:"inline-flex"},onClick:r,"data-dropdown-trigger":!0,children:e})},ta=o.forwardRef(({$destructive:e,className:a,...s},r)=>t.jsx("button",{ref:r,className:`w-menu-item${e?" w-menu-item--danger":""}${a?` ${a}`:""}`,...s}));ta.displayName="DropdownItem";const qc=()=>t.jsx("div",{style:{height:"0.5px",background:"var(--wa-border)",width:"100%",margin:"4px 0"}}),Kc=o.forwardRef(({className:e,style:a,...s},r)=>t.jsx("form",{ref:r,className:e,style:{display:"flex",flexDirection:"column",gap:16,...a},...s}));Kc.displayName="Form";const Ge=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:`w-field${e?` ${e}`:""}`,...a}));Ge.displayName="FormGroup";const Ve=o.forwardRef(({className:e,...a},s)=>t.jsx("label",{ref:s,className:`w-label${e?` ${e}`:""}`,...a}));Ve.displayName="Label";const ye=o.forwardRef(({as:e="input",className:a,...s},r)=>{const i=`w-input${a?` ${a}`:""}`;return e==="textarea"?t.jsx("textarea",{className:i,...s}):t.jsx("input",{ref:r,className:i,...s})});ye.displayName="Input";const ke=({size:e,className:a})=>t.jsx("div",{className:a,style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:e?`${e}px`:"100%"},children:t.jsx("span",{className:"w-spin",style:{width:e??40,height:e??40}})}),Ha=({checked:e,onChange:a})=>t.jsxs("label",{className:"w-switch","data-on":e?"":void 0,children:[t.jsx("input",{type:"checkbox",checked:e,onChange:s=>a(s.target.checked),style:{position:"absolute",opacity:0,width:0,height:0}}),t.jsx("span",{className:"w-switch-track",children:t.jsx("span",{className:"w-switch-knob"})})]}),Yt=(e=!1)=>{const[a,s]=o.useState(e),r=o.useCallback(()=>{s(!0)},[]),i=o.useCallback(()=>{s(!1)},[]),l=o.useCallback(()=>{s(m=>!m)},[]);return{isOpen:a,open:r,close:i,toggle:l}},Yc=({onChange:e,placeholder:a,value:s})=>t.jsxs("div",{className:"w-search",children:[t.jsx(Pl,{}),t.jsx("input",{type:"text",placeholder:a,value:s,onChange:r=>e(r.target.value)})]}),se=o.forwardRef(({$primary:e,$outline:a,$destructive:s,$fullWidth:r,$size:i,className:l,style:m,...d},c)=>{const h=`w-btn ${s?"w-btn--danger-solid":a?"w-btn--secondary":"w-btn--primary"}${i==="sm"?" w-btn--sm":i==="lg"?" w-btn--lg":""}${l?` ${l}`:""}`;return t.jsx("button",{ref:c,className:h,style:r?{width:"100%",...m}:m,...d})});se.displayName="Button";const Qc=e=>({position:"absolute",top:"calc(100% + 6px)",left:0,width:"100%",maxHeight:260,overflowY:"auto",zIndex:1e3,opacity:e?1:0,transform:e?"scale(1)":"scale(0.97)",transformOrigin:"top",pointerEvents:e?"auto":"none",transition:"opacity 0.15s ease, transform 0.15s ease"}),Jc={width:"100%",height:32,padding:"0 9px",border:"none",borderBottom:"0.5px solid var(--wa-border)",borderRadius:0,fontFamily:"var(--wa-font-sans)",fontSize:13,outline:"none",background:"transparent",color:"var(--wa-text)",marginBottom:4},Js=({children:e})=>t.jsx("div",{style:{padding:"10px 9px",color:"var(--wa-text-faint)",fontFamily:"var(--wa-font-sans)",fontSize:12.5,textAlign:"center"},children:e}),mn=({options:e,value:a,onChange:s,placeholder:r="Select an option",disabled:i=!1,searchable:l=!1,width:m,name:d,id:c,groupsEnabled:p=!1,className:u})=>{const[h,f]=o.useState(!1),[g,x]=o.useState(""),w=o.useRef(null),b=o.useRef(null),j=p&&"options"in e[0],k=(j?e.flatMap(y=>y.options):e).find(y=>y.value===a),N=g?j?e.map(y=>({...y,options:y.options.filter(E=>E.label.toLowerCase().includes(g.toLowerCase()))})).filter(y=>y.options.length>0):e.filter(y=>y.label.toLowerCase().includes(g.toLowerCase())):e,_=(y,E=!1)=>{E||(s(y),f(!1),x(""))},C=()=>{i||f(!h)};return o.useEffect(()=>{h&&l&&b.current&&setTimeout(()=>{var y;(y=b.current)==null||y.focus()},10)},[h,l]),o.useEffect(()=>{const y=E=>{w.current&&!w.current.contains(E.target)&&(f(!1),x(""))};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),t.jsxs("div",{ref:w,style:{position:"relative",width:m||"100%"},className:u,children:[t.jsxs("button",{type:"button",className:"w-combo","data-open":h?"":void 0,onClick:C,disabled:i,"aria-haspopup":"listbox","aria-expanded":h,id:c,children:[t.jsx("span",{className:"w-combo-val","data-ph":k?void 0:"",children:k?k.label:r}),h?t.jsx(rl,{size:16}):t.jsx(Wt,{size:16})]}),t.jsxs("div",{className:"w-combo-menu",style:Qc(h),role:"listbox",children:[l&&t.jsx("input",{ref:b,type:"text",style:Jc,placeholder:"Search...",value:g,onChange:y=>x(y.target.value),onClick:y=>y.stopPropagation()}),j?N.map((y,E)=>t.jsxs(o.Fragment,{children:[t.jsx("div",{className:"w-combo-grp",children:y.label}),y.options.length===0?t.jsx(Js,{children:"No options available"}):y.options.map(A=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":A.disabled?"":void 0,onClick:()=>_(A.value,A.disabled),role:"option","aria-selected":A.value===a,children:[A.label,A.value===a&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ye,{size:16})})]},A.value))]},`group-${E}`)):t.jsx(t.Fragment,{children:N.length===0?t.jsx(Js,{children:"No options available"}):N.map(y=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":y.disabled?"":void 0,onClick:()=>_(y.value,y.disabled),role:"option","aria-selected":y.value===a,children:[y.label,y.value===a&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ye,{size:16})})]},y.value))})]}),d&&t.jsx("input",{type:"hidden",name:d,value:a||""})]})},Xc=({options:e,value:a,onChange:s,placeholder:r="Select options",disabled:i=!1,searchable:l=!1,width:m,name:d,id:c,groupsEnabled:p=!1,className:u})=>{const[h,f]=o.useState(!1),[g,x]=o.useState(""),w=o.useRef(null),b=o.useRef(null),j=p&&"options"in e[0],k=(j?e.flatMap(y=>y.options):e).filter(y=>a.includes(y.value)),N=g?j?e.map(y=>({...y,options:y.options.filter(E=>E.label.toLowerCase().includes(g.toLowerCase()))})).filter(y=>y.options.length>0):e.filter(y=>y.label.toLowerCase().includes(g.toLowerCase())):e,_=(y,E=!1)=>{E||(a.includes(y)?s(a.filter(A=>A!==y)):s([...a,y]))},C=()=>{i||f(!h)};return o.useEffect(()=>{h&&l&&b.current&&setTimeout(()=>{var y;(y=b.current)==null||y.focus()},10)},[h,l]),o.useEffect(()=>{const y=E=>{w.current&&!w.current.contains(E.target)&&(f(!1),x(""))};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),t.jsxs("div",{ref:w,style:{position:"relative",width:m||"100%"},className:u,children:[t.jsxs("button",{type:"button",className:"w-combo","data-open":h?"":void 0,onClick:C,disabled:i,"aria-haspopup":"listbox","aria-expanded":h,id:c,children:[t.jsx("span",{className:"w-combo-val","data-ph":k.length>0?void 0:"",children:k.length>0?k.map(y=>y.label).join(", "):r}),h?t.jsx(rl,{size:16}):t.jsx(Wt,{size:16})]}),t.jsxs("div",{className:"w-combo-menu",style:Qc(h),role:"listbox",children:[l&&t.jsx("input",{ref:b,type:"text",style:Jc,placeholder:"Search...",value:g,onChange:y=>x(y.target.value),onClick:y=>y.stopPropagation()}),j?N.map((y,E)=>t.jsxs(o.Fragment,{children:[t.jsx("div",{className:"w-combo-grp",children:y.label}),y.options.length===0?t.jsx(Js,{children:"No options available"}):y.options.map(A=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":A.disabled?"":void 0,onClick:()=>_(A.value,A.disabled),role:"option","aria-selected":a.includes(A.value),children:[A.label,a.includes(A.value)&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ye,{size:16})})]},A.value))]},`group-${E}`)):t.jsx(t.Fragment,{children:N.length===0?t.jsx(Js,{children:"No options available"}):N.map(y=>t.jsxs("button",{type:"button",className:"w-combo-opt","data-disabled":y.disabled?"":void 0,onClick:()=>_(y.value,y.disabled),role:"option","aria-selected":a.includes(y.value),children:[y.label,a.includes(y.value)&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ye,{size:16})})]},y.value))})]}),d&&t.jsx("input",{type:"hidden",name:d,value:a.join(",")})]})},Zs=e=>e.split(" ").map(a=>a[0]).join("").toUpperCase().slice(0,2)||"?",$i=e=>e.trim().replace(/[<>"'&]/g,""),Q4=e=>e.length>=2&&e.length<=100&&/^[a-zA-Z0-9\s_.-]+$/.test(e),J4=e=>/.+@.+\..+/.test(e),Oi=(e,a)=>e.length?e.find(s=>s.name===a)||e[0]:null,X4=({roles:e,value:a,onChange:s,fullWidth:r})=>{const[i,l]=o.useState(!1),m=o.useRef(null);return o.useEffect(()=>{if(!i)return;const d=c=>{m.current&&!m.current.contains(c.target)&&l(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[i]),t.jsxs("div",{ref:m,className:`w-relative${r?" w-full":" w-none"}`,children:[t.jsxs("button",{type:"button",className:`w-combo${r?" w-full":" w-rolepick-btn"}`,"data-open":i?"":void 0,onClick:()=>l(d=>!d),disabled:!e.length,children:[t.jsx("span",{className:"w-combo-val",children:(a==null?void 0:a.name)||"Role"}),t.jsx(Wt,{size:14})]}),i&&t.jsx("div",{className:"w-combo-menu w-combo-menu--pop",children:e.map(d=>t.jsxs("button",{type:"button",className:"w-combo-opt",onClick:()=>{s(d),l(!1)},children:[d.name,d.id===(a==null?void 0:a.id)&&t.jsx("span",{className:"w-combo-check",children:t.jsx(Ye,{size:13})})]},d.id))})]})},e0=({mode:e,organizationId:a,onSuccess:s,onCancel:r,onCreateOrganization:i})=>{var ce;const l=e==="org",m=l?"organization":"workspace",d=l?"Organization":"Workspace",{createOrganization:c,getOrganizationRoles:p,inviteOrganizationMember:u}=Dt(),{createWorkspace:h,getWorkspaceRoles:f,createWorkspaceInvitation:g}=ba(),{organizationMemberships:x}=va(),{refetch:w}=ot(),[b,j]=o.useState(0),[v,k]=o.useState(""),[N,_]=o.useState(""),[C,y]=o.useState(),[E,A]=o.useState(null),[H,M]=o.useState(!1),[T,P]=o.useState(null),[S,$]=o.useState(a),[Z,R]=o.useState(!1),L=o.useRef(null),O=o.useRef(null),[F,W]=o.useState(null),[U,V]=o.useState([]),[G,Y]=o.useState([]),[de,fe]=o.useState(""),[ne,ae]=o.useState(null),re=(ce=x==null?void 0:x.find(B=>B.organization.id===S))==null?void 0:ce.organization;o.useEffect(()=>()=>{E&&URL.revokeObjectURL(E)},[E]),o.useEffect(()=>{if(!Z)return;const B=q=>{L.current&&!L.current.contains(q.target)&&R(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[Z]);const Le=B=>{var X;const q=(X=B.target.files)==null?void 0:X[0];if(q){if(q.size>2*1024*1024){P("Image must be under 2 MB.");return}if(!q.type.startsWith("image/")){P("Please choose a valid image file.");return}E&&URL.revokeObjectURL(E),P(null),y(q),A(URL.createObjectURL(q))}},K=async()=>{var X;const B=$i(v),q=$i(N);if(!Q4(B)){P(`Enter a valid ${m} name (2–100 characters).`);return}if(!l&&!S){P("Select an organization first.");return}M(!0),P(null);try{if(l){const oe=await c({name:B,description:q,image:C}),Ee=((X=oe==null?void 0:oe.data)==null?void 0:X.organization)??(oe==null?void 0:oe.organization)??oe;W(Ee);const z=await p(Ee).catch(()=>[]);V(z),ae(Oi(z,"Member"))}else{const oe=await h(S,B,C,q),Ee=(oe==null?void 0:oe.workspace)??oe,z={...Ee,organization:{id:S}};W(z);const D=await f(Ee).catch(()=>[]);V(D),ae(Oi(D,"Editor"))}await w(),j(1)}catch(oe){P((oe==null?void 0:oe.message)||`Failed to create ${m}.`)}finally{M(!1)}},at=()=>{const B=de.trim();!J4(B)||G.some(q=>q.email===B)||ne&&(Y(q=>[...q,{email:B,roleId:ne.id,roleName:ne.name}]),fe(""))},ze=B=>{(B.key==="Enter"||B.key===",")&&(B.preventDefault(),at())},We=async()=>{if(!G.length){j(2);return}M(!0),P(null);try{for(const B of G)l?await u(F,{email:B.email,organizationRole:{id:B.roleId}}):await g(F,B.email,B.roleId);j(2)}catch(B){P((B==null?void 0:B.message)||"Some invitations could not be sent.")}finally{M(!1)}},Re=()=>{j(0),k(""),_(""),y(void 0),E&&URL.revokeObjectURL(E),A(null),W(null),V([]),Y([]),fe(""),P(null)};return t.jsxs("div",{className:"w-card w-create-card",children:[t.jsxs("div",{className:"w-create-body",children:[t.jsxs("div",{className:"w-flex-col w-items-center w-gap-3 w-create-head",children:[b===0?t.jsxs("span",{className:"w-ibadge-wrap",children:[t.jsxs("button",{type:"button",className:"w-ibadge w-avatar-edit","data-busy":H?"":void 0,onClick:()=>{var B;return(B=O.current)==null?void 0:B.click()},title:`Upload ${m} logo`,"aria-label":`Upload ${m} logo`,children:[E?t.jsx("img",{src:E,alt:`${d} logo`}):l?t.jsx(hs,{}):t.jsx(wi,{}),t.jsx("span",{className:"w-avatar-veil",children:t.jsx(nn,{})})]}),t.jsx("input",{ref:O,type:"file",className:"w-none",hidden:!0,accept:"image/png, image/jpeg, image/gif, image/svg+xml",onChange:Le,disabled:H}),E&&t.jsx("button",{type:"button",className:"w-ibadge-x",title:"Remove logo","aria-label":"Remove logo",onClick:()=>{E&&URL.revokeObjectURL(E),A(null),y(void 0)},children:t.jsx(Pa,{})})]}):t.jsx("span",{className:`w-ibadge${b===2?" w-ibadge--done":""}`,children:b===2?t.jsx(Ye,{}):l?t.jsx(hs,{}):t.jsx(wi,{})}),t.jsxs("div",{className:"w-flex-col w-gap-1 w-text-center",children:[t.jsx("h1",{className:"w-title-lg",children:b===0?`Create ${l?"an":"a"} ${m}`:b===1?"Invite your team":`${d} created`}),t.jsx("p",{className:"w-sub",children:b===0?`Set up a new ${m}${l?" to collaborate with your team.":" inside your organization."}`:b===1?"Add people now, or skip and do it later.":`${v} is ready to go.`})]})]}),b<2&&t.jsxs("div",{className:"w-steps w-create-steps",children:[t.jsx("i",{"data-on":""}),t.jsx("i",{"data-on":b>=1?"":void 0})]}),T&&t.jsx("div",{className:"w-banner w-banner--error w-mb-4",children:T}),b===0&&t.jsxs("div",{className:"w-flex-col w-gap-4",children:[!l&&t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Organization"}),t.jsxs("div",{className:"w-relative",ref:L,children:[t.jsxs("button",{type:"button",className:"w-combo w-full","data-open":Z?"":void 0,onClick:()=>R(B=>!B),disabled:H,children:[t.jsxs("span",{className:"w-combo-val w-inline w-gap-2",children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:re!=null&&re.image_url?t.jsx("img",{src:re.image_url,alt:re.name}):Zs((re==null?void 0:re.name)||"O").charAt(0)}),t.jsx("span",{children:(re==null?void 0:re.name)||"Select organization"})]}),t.jsx(Wt,{size:14})]}),Z&&t.jsxs("div",{className:"w-combo-menu w-combo-menu--pop",children:[x==null?void 0:x.map(B=>{var X;const q=!!((X=B.eligibility_restriction)!=null&&X.type)&&B.eligibility_restriction.type!=="none";return t.jsxs("button",{type:"button",className:"w-combo-opt",disabled:q,"data-disabled":q?"":void 0,onClick:()=>{q||($(B.organization.id),R(!1))},children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:B.organization.image_url?t.jsx("img",{src:B.organization.image_url,alt:B.organization.name}):Zs(B.organization.name).charAt(0)}),t.jsx("span",{children:B.organization.name})]},B.organization.id)}),i&&t.jsxs("button",{type:"button",className:"w-combo-opt w-text-primary",onClick:()=>{R(!1),i()},children:[t.jsx(St,{size:13}),"Create new organization"]})]})]})]}),t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:[d," name"]}),t.jsx(ye,{autoFocus:!0,value:v,onChange:B=>k(B.target.value),placeholder:l?"Acme Inc":"Product",disabled:H})]}),t.jsxs("label",{className:"w-field",children:[t.jsxs("span",{className:"w-label",children:["Description"," ",t.jsx("span",{className:"w-secsub",children:"· optional"})]}),t.jsx(ye,{as:"textarea",className:"w-input--area",value:N,onChange:B=>_(B.target.value),placeholder:l?"What does your team do?":"What's this workspace for?",disabled:H})]}),t.jsxs("div",{className:"w-flex-col w-gap-2",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:K,disabled:H||!v.trim(),children:H?t.jsx(ke,{size:15}):t.jsxs(t.Fragment,{children:["Continue",t.jsx(Jt,{size:15})]})}),r&&t.jsx("button",{type:"button",className:"w-btn w-btn--secondary w-btn--block",onClick:r,disabled:H,children:"Cancel"})]})]}),b===1&&t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Invite by email"}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx(ye,{autoFocus:!0,className:"w-grow",value:de,onChange:B=>fe(B.target.value),onKeyDown:ze,placeholder:"teammate@acme.com"}),t.jsx(X4,{roles:U,value:ne,onChange:ae})]}),t.jsx("span",{className:"w-secsub",children:"Press Enter to add each person."})]}),G.length>0&&t.jsx("div",{className:"w-list",children:G.map(B=>t.jsxs("div",{className:"w-row",style:{gridTemplateColumns:"1fr auto",padding:"10px 0"},children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:Zs(B.email)}),t.jsx("span",{className:"w-truncate w-text-secondary",children:B.email})]}),t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-pill",children:B.roleName}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",title:"Remove",onClick:()=>Y(q=>q.filter(X=>X.email!==B.email)),children:t.jsx(Pa,{size:13})})]})]},B.email))}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--secondary w-none",onClick:()=>j(2),disabled:H,children:"Skip"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-grow",onClick:We,disabled:H,children:H?t.jsx(ke,{size:15}):G.length?`Invite ${G.length} & finish`:"Finish"})]})]}),b===2&&t.jsxs("div",{className:"w-flex-col w-items-center w-gap-4",children:[t.jsxs("div",{className:"w-create-summary",children:[t.jsx("span",{className:"w-avatar w-avatar--md",children:E?t.jsx("img",{src:E,alt:v}):Zs(v)}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-sec",children:v}),t.jsx("span",{className:"w-secsub",children:G.length?`${G.length} invite${G.length>1?"s":""} sent`:"No invites yet"})]})]}),t.jsxs("button",{type:"button",className:"w-btn w-btn--primary w-btn--block",onClick:()=>s==null?void 0:s(F),children:["Go to ",m,t.jsx(Jt,{size:15})]}),t.jsxs("button",{type:"button",className:"w-link w-link--muted w-linkbtn w-inline w-gap-1",onClick:Re,children:[t.jsx(qo,{size:12})," Create another"]})]})]}),b===0&&t.jsx("div",{className:"w-create-foot",children:t.jsx("span",{className:"w-secsub",children:l?"Organizations group your team, billing and settings.":"Workspaces live inside an organization."})})]})},pn=({onSuccess:e,onCancel:a})=>t.jsx($e,{children:t.jsx("div",{className:"w-flex w-justify-center w-full",children:t.jsx(e0,{mode:"org",onSuccess:e,onCancel:a})})}),t0=({isOpen:e,onClose:a,onCreated:s})=>{const r=()=>{s==null||s(),a==null||a()};return t.jsx($e,{children:t.jsx(Ue,{isOpen:e,onClose:a,children:t.jsx(Ue.Overlay,{children:t.jsx(Ue.Content,{className:"w-dialog--create",children:t.jsx(pn,{onSuccess:r,onCancel:a})})})})})},Mr=o.createContext({screen:null,setScreen:()=>{},toast:(e,a)=>{}}),Ct=()=>{const e=o.useContext(Mr);if(!e)throw new Error("useScreenContext must be used within a ScreenContextProvider");return e},Ja=({title:e,description:a,onConfirm:s,onCancel:r,style:i})=>{const l=o.useRef(null);return o.useEffect(()=>{const m=d=>{l.current&&!l.current.contains(d.target)&&r()};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[r]),t.jsxs("div",{ref:l,className:"w-pop",style:{position:"fixed",zIndex:1e3,right:44,...i},children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("h3",{className:"w-pop-title",children:e}),a&&t.jsx("p",{className:"w-pop-sub",children:a})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:r,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--danger-solid w-btn--sm",onClick:s,children:"Confirm"})]})]})},Zi=[{id:"okta",name:"Okta",logo:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",protocol:"saml",description:"SAML",docUrl:"https://help.okta.com/en-us/content/topics/apps/apps_app_integration_wizard_saml.htm",placeholders:{entityId:"http://www.okta.com/{yourOktaDomain}",ssoUrl:"https://{yourOktaDomain}.okta.com/app/{appId}/sso/saml"},attributeMapping:{first_name:"firstName",last_name:"lastName",email:"email"}},{id:"okta-oidc",name:"Okta",logo:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",protocol:"oidc",description:"OIDC",docUrl:"https://developer.okta.com/docs/guides/implement-oauth-for-okta/main/",placeholders:{issuerUrl:"https://{yourOktaDomain}.okta.com",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"azure",name:"Azure AD",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Microsoft_Azure.svg/150px-Microsoft_Azure.svg.png",protocol:"saml",description:"SAML",docUrl:"https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/add-application-portal-setup-sso",placeholders:{entityId:"https://sts.windows.net/{tenantId}/",ssoUrl:"https://login.microsoftonline.com/{tenantId}/saml2"},attributeMapping:{first_name:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname",last_name:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",email:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"}},{id:"azure-oidc",name:"Azure AD",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Microsoft_Azure.svg/150px-Microsoft_Azure.svg.png",protocol:"oidc",description:"OIDC",docUrl:"https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc",placeholders:{issuerUrl:"https://login.microsoftonline.com/{tenantId}/v2.0",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"google",name:"Google",logo:"https://www.gstatic.com/images/branding/product/1x/googleg_48dp.png",protocol:"saml",description:"SAML",docUrl:"https://support.google.com/a/answer/6087519",placeholders:{entityId:"https://accounts.google.com/o/saml2?idpid={idpId}",ssoUrl:"https://accounts.google.com/o/saml2/idp?idpid={idpId}"},attributeMapping:{first_name:"FirstName",last_name:"LastName",email:"email"}},{id:"google-oidc",name:"Google",logo:"https://www.gstatic.com/images/branding/product/1x/googleg_48dp.png",protocol:"oidc",description:"OIDC",docUrl:"https://developers.google.com/identity/openid-connect/openid-connect",placeholders:{issuerUrl:"https://accounts.google.com",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"auth0",name:"Auth0",logo:"https://cdn.auth0.com/styleguide/latest/lib/logos/img/badge.png",protocol:"oidc",description:"OIDC",docUrl:"https://auth0.com/docs/authenticate/protocols/openid-connect-protocol",placeholders:{issuerUrl:"https://{yourDomain}.auth0.com/",scopes:"openid profile email"},attributeMapping:{first_name:"given_name",last_name:"family_name",email:"email"}},{id:"onelogin",name:"OneLogin",logo:"",protocol:"saml",description:"SAML",docUrl:"https://onelogin.service-now.com/support?id=kb_article&sys_id=912bb23adbdc1cd0ca1c400e0b96197d",placeholders:{entityId:"https://app.onelogin.com/saml/metadata/{appId}",ssoUrl:"https://{subdomain}.onelogin.com/trust/saml2/http-post/sso/{appId}"}},{id:"ping",name:"PingOne",logo:"",protocol:"saml",description:"SAML",docUrl:"https://docs.pingidentity.com/pingone/latest/connector/configure-saml.html",placeholders:{entityId:"https://auth.pingone.com/{envId}",ssoUrl:"https://auth.pingone.com/{envId}/saml20/idp/sso"}},{id:"jumpcloud",name:"JumpCloud",logo:"",protocol:"saml",description:"SAML",docUrl:"https://support.jumpcloud.com/support/s/article/single-sign-on-sso-with-saml",placeholders:{entityId:"https://sso.jumpcloud.com/saml2/{appId}",ssoUrl:"https://sso.jumpcloud.com/saml2/{appId}"}},{id:"duo",name:"Duo",logo:"",protocol:"saml",description:"SAML",docUrl:"https://duo.com/docs/sso",placeholders:{entityId:"https://sso.duosecurity.com/saml2/sp/{appId}",ssoUrl:"https://sso.duosecurity.com/saml2/idp/{appId}/sso"}},{id:"keycloak",name:"Keycloak",logo:"https://www.keycloak.org/resources/images/icon.svg",protocol:"oidc",description:"OIDC",docUrl:"https://www.keycloak.org/docs/latest/securing_apps/",placeholders:{issuerUrl:"https://{host}/realms/{realm}",scopes:"openid profile email"}},{id:"adfs",name:"ADFS",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Microsoft_logo.svg/100px-Microsoft_logo.svg.png",protocol:"saml",description:"SAML",docUrl:"https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/create-a-relying-party-trust",placeholders:{entityId:"http://{adfsServer}/adfs/services/trust",ssoUrl:"https://{adfsServer}/adfs/ls/"}},{id:"custom-saml",name:"Custom",logo:"",protocol:"saml",description:"SAML",docUrl:"",placeholders:{}},{id:"custom-oidc",name:"Custom",logo:"",protocol:"oidc",description:"OIDC",docUrl:"",placeholders:{}}],em=({template:e})=>{const[a,s]=o.useState(!1);return!e.logo||a?t.jsx("span",{className:"w-avatar w-avatar--square w-avatar--md w-sso-logo--ph",children:t.jsx(ea,{size:18,className:"w-text-muted"})}):t.jsx("img",{className:"w-avatar w-avatar--square w-avatar--md w-sso-logo",src:e.logo,alt:e.name,onError:()=>s(!0)})},tm=({organization:e})=>{const{getEnterpriseConnections:a,createEnterpriseConnection:s,deleteEnterpriseConnection:r,testEnterpriseConnection:i,generateSCIMToken:l,getSCIMToken:m,revokeSCIMToken:d}=Dt(),{toast:c}=Ct(),[p,u]=o.useState(!1),[h,f]=o.useState(null),{data:g=[],isLoading:x,mutate:w}=Se(e!=null&&e.id?`wacht-org-sso:${e.id}`:null,async()=>await(a==null?void 0:a(e))||[],{refreshInterval:3e4,revalidateOnFocus:!1}),b=async j=>{try{await(r==null?void 0:r(e,j)),w(),c("SSO connection deleted","info")}catch(v){c(v.message||"Failed to delete connection","error")}f(null)};return x?t.jsx("div",{className:"w-loading",children:t.jsx(ke,{})}):p?t.jsx(sm,{organization:e,onClose:()=>u(!1),onCreate:async j=>{try{await(s==null?void 0:s(e,j)),w(),u(!1),c("SSO connection created","info")}catch(v){c(v.message||"Failed to create connection","error")}}}):t.jsx(t.Fragment,{children:g.length===0?t.jsxs("div",{className:"w-empty w-empty--fill",children:[t.jsx("div",{className:"w-empty-ic",children:t.jsx(ea,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:"Enterprise SSO"}),t.jsx("p",{children:"Let members sign in with your identity provider."})]}),t.jsx("div",{className:"w-empty-action",children:t.jsxs(se,{onClick:()=>u(!0),children:[t.jsx(St,{size:16})," Configure SSO"]})})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-flex w-items-center w-justify-between w-gap-4 w-sechead",children:t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("h3",{className:"w-title",children:"Enterprise SSO"}),t.jsx("p",{className:"w-sub",children:"Configure SAML or OIDC SSO for your organization"})]})}),g.map(j=>t.jsx(am,{connection:j,onDelete:v=>f(v),connectionToDelete:h,onConfirmDelete:b,onCancelDelete:()=>f(null),testConnection:v=>i(e,v),generateSCIMToken:v=>l(e,v),getSCIMToken:v=>m(e,v),revokeSCIMToken:v=>d(e,v),toast:c},j.id))]})})},am=({connection:e,onDelete:a,connectionToDelete:s,onConfirmDelete:r,onCancelDelete:i,testConnection:l,generateSCIMToken:m,getSCIMToken:d,revokeSCIMToken:c,toast:p})=>{var H,M,T,P,S;const[u,h]=o.useState(null),[f,g]=o.useState(!1),[x,w]=o.useState(null),[b,j]=o.useState(null),[v,k]=o.useState(!1),[N,_]=o.useState(null);o.useEffect(()=>{d&&e.id&&d(e.id).then(h).catch(()=>{})},[e.id,d]);const C=async()=>{if(l){k(!0),_(null);try{const $=await l(e.id);_($)}catch($){_({success:!1,checks:{},errors:{general:$.message||"Test failed"}})}finally{k(!1)}}},y=async()=>{if(m){g(!0);try{const $=await m(e.id);w($.token),h({exists:!0,token:$}),p("SCIM token generated. Copy it now - it won't be shown again!","info")}catch($){p($.message||"Failed to generate token","error")}finally{g(!1)}}},E=async()=>{if(c){g(!0);try{await c(e.id),h({exists:!1,scim_base_url:u==null?void 0:u.scim_base_url}),w(null),p("SCIM token revoked","info")}catch($){p($.message||"Failed to revoke token","error")}finally{g(!1)}}},A=($,Z)=>{navigator.clipboard.writeText($),j(Z),setTimeout(()=>j(null),2e3)};return t.jsxs("div",{className:"w-flex-col w-gap-4 w-sso-conn",children:[t.jsxs("div",{className:"w-flex w-justify-between w-items-start",children:[t.jsxs("h3",{className:"w-sec w-inline w-gap-2",children:[t.jsx(ea,{size:16}),e.protocol==="oidc"?"OIDC SSO":"SAML SSO",t.jsx("span",{className:"w-pill w-pill--current",children:e.protocol.toUpperCase()})]}),t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx(se,{$size:"sm",onClick:C,disabled:v,children:v?t.jsx(ke,{size:14}):"Test"}),t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",$outline:!0,onClick:()=>a(e.id),className:"w-text-error",children:"Remove"}),s===e.id&&t.jsx(Ja,{title:"Delete this SSO connection?",onConfirm:()=>r(e.id),onCancel:i})]})]})]}),N&&t.jsx("div",{className:`w-banner ${N.success?"w-banner--success":"w-banner--error"}`,children:t.jsxs("span",{className:`w-banner-txt w-flex-col w-gap-1 ${N.success?"w-text-success":"w-text-error"}`,children:[t.jsx("span",{children:N.success?"✓ Connection is valid":"✗ Connection failed"}),N.errors&&Object.entries(N.errors).map(([$,Z])=>t.jsxs("div",{children:[$.replace(/_/g," "),": ",Z]},$))]})}),t.jsxs("div",{className:"w-sso-detail",children:[e.protocol==="saml"?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"w-secsub",children:"Entity ID"}),t.jsx("span",{className:"w-sec w-break-all",children:e.idp_entity_id}),t.jsx("span",{className:"w-secsub",children:"SSO URL"}),t.jsx("span",{className:"w-sec w-break-all",children:e.idp_sso_url})]}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"w-secsub",children:"Issuer URL"}),t.jsx("span",{className:"w-sec w-break-all",children:e.oidc_issuer_url}),t.jsx("span",{className:"w-secsub",children:"Client ID"}),t.jsx("span",{className:"w-sec",children:e.oidc_client_id}),t.jsx("span",{className:"w-secsub",children:"Scopes"}),t.jsx("span",{className:"w-sec",children:e.oidc_scopes||"openid profile email"})]}),t.jsx("span",{className:"w-secsub",children:"Created"}),t.jsx("span",{className:"w-sec",children:new Date(e.created_at).toLocaleDateString()})]}),t.jsxs("div",{className:"w-flex-col w-gap-3 w-sso-scim",children:[t.jsxs("div",{className:"w-flex w-justify-between w-items-center",children:[t.jsxs("div",{className:"w-sec w-inline w-gap-2",children:[t.jsx(ea,{size:14}),"SCIM Provisioning"]}),t.jsx("div",{className:"w-flex w-wrap w-gap-2",children:!(u!=null&&u.exists)||!((H=u==null?void 0:u.token)!=null&&H.enabled)?t.jsx(se,{$size:"sm",onClick:y,disabled:f,children:f?t.jsx(ke,{size:14}):"Generate Token"}):t.jsxs(t.Fragment,{children:[t.jsx(se,{$size:"sm",onClick:y,disabled:f,children:f?t.jsx(ke,{size:14}):"Rotate"}),t.jsx(se,{$size:"sm",$outline:!0,onClick:E,disabled:f,className:"w-text-error",children:"Revoke"})]})})]}),(((M=u==null?void 0:u.token)==null?void 0:M.scim_base_url)||x)&&t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Base URL:"}),t.jsx("code",{children:((T=u==null?void 0:u.token)==null?void 0:T.scim_base_url)||"Loading..."}),((P=u==null?void 0:u.token)==null?void 0:P.scim_base_url)&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:()=>A(u.token.scim_base_url,"scim-url"),children:b==="scim-url"?t.jsx(Ye,{size:12}):t.jsx(qa,{size:12})})]}),x&&t.jsxs("div",{className:"w-flex-col w-gap-2",children:[t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Token:"}),t.jsx("code",{children:x}),t.jsx("button",{className:"w-btn w-btn--icon",onClick:()=>A(x,"scim-token"),children:b==="scim-token"?t.jsx(Ye,{size:12}):t.jsx(qa,{size:12})})]}),t.jsx("div",{className:"w-mono-faint w-text-warning",children:"⚠️ Copy this token now. It won't be shown again."})]}),(u==null?void 0:u.exists)&&((S=u==null?void 0:u.token)==null?void 0:S.enabled)&&!x&&t.jsxs("div",{className:"w-secsub",children:["Token:"," ",t.jsxs("code",{className:"w-mono-sm w-token-chip",children:[u.token.token_prefix,"..."]}),u.token.last_used_at&&t.jsxs("span",{children:[" ","· Last used:"," ",new Date(u.token.last_used_at).toLocaleDateString()]})]})]})]})},sm=({onCreate:e,organization:a})=>{const{getOrganizationDomains:s,testEnterpriseConnectionConfig:r}=Dt(),{deployment:i}=_e(),{toast:l}=Ct(),[m,d]=o.useState(!1),[c,p]=o.useState(null),[u,h]=o.useState("saml"),[f,g]=o.useState(null),[x,w]=o.useState(!1),[b,j]=o.useState({domain_id:"",idp_entity_id:"",idp_sso_url:"",idp_certificate:"",oidc_issuer_url:"",oidc_client_id:"",oidc_client_secret:"",oidc_scopes:"openid profile email",jit_enabled:!0,attr_first_name:"",attr_last_name:"",attr_email:""}),[v,k]=o.useState(!1),[N,_]=o.useState(null),{data:C=[],isLoading:y}=Se("wacht-org-verified-domains-for-sso-screen",async()=>(await(s==null?void 0:s(a))||[]).filter(R=>R.verified),{revalidateOnFocus:!1}),E=Z=>{p(Z),h(Z.protocol),Z.protocol==="saml"?j(R=>{var L,O,F;return{...R,idp_entity_id:Z.placeholders.entityId||"",idp_sso_url:Z.placeholders.ssoUrl||"",attr_first_name:((L=Z.attributeMapping)==null?void 0:L.first_name)||"",attr_last_name:((O=Z.attributeMapping)==null?void 0:O.last_name)||"",attr_email:((F=Z.attributeMapping)==null?void 0:F.email)||""}}):j(R=>{var L,O,F;return{...R,oidc_issuer_url:Z.placeholders.issuerUrl||"",oidc_scopes:Z.placeholders.scopes||"openid profile email",attr_first_name:((L=Z.attributeMapping)==null?void 0:L.first_name)||"",attr_last_name:((O=Z.attributeMapping)==null?void 0:O.last_name)||"",attr_email:((F=Z.attributeMapping)==null?void 0:F.email)||""}})},A=i!=null&&i.backend_host?`${i.backend_host.startsWith("https://")?"":"https://"}${i.backend_host}/auth/sso/oidc/callback`:"",H=i!=null&&i.backend_host?`https://${i.backend_host}/auth/sso/metadata`:"",M=i!=null&&i.backend_host?`https://${i.backend_host}/auth/sso/callback`:"",T=(Z,R)=>{navigator.clipboard.writeText(Z),g(R),setTimeout(()=>g(null),2e3)},P=async Z=>{Z.preventDefault();const R=L=>L.includes("{")||L.includes("}");if(u==="saml"){if(!b.idp_entity_id||R(b.idp_entity_id)){l("Please enter a valid IdP Entity ID (no placeholders)","error");return}if(!b.idp_sso_url||R(b.idp_sso_url)){l("Please enter a valid IdP SSO URL (no placeholders)","error");return}if(!b.idp_certificate){l("Please provide the X.509 Certificate","error");return}}else{if(!b.oidc_issuer_url||R(b.oidc_issuer_url)){l("Please enter a valid Issuer URL (no placeholders)","error");return}if(!b.oidc_client_id||R(b.oidc_client_id)){l("Please enter a valid Client ID (no placeholders)","error");return}if(!b.oidc_client_secret){l("Please enter the Client Secret","error");return}}d(!0);try{const L={};b.attr_first_name&&(L.first_name=b.attr_first_name),b.attr_last_name&&(L.last_name=b.attr_last_name),b.attr_email&&(L.email=b.attr_email);const O=Object.keys(L).length>0;u==="saml"?await e({protocol:"saml",domain_id:b.domain_id||void 0,idp_entity_id:b.idp_entity_id,idp_sso_url:b.idp_sso_url,idp_certificate:b.idp_certificate,jit_enabled:b.jit_enabled,...O&&{attribute_mapping:L}}):await e({protocol:"oidc",domain_id:b.domain_id||void 0,oidc_issuer_url:b.oidc_issuer_url,oidc_client_id:b.oidc_client_id,oidc_client_secret:b.oidc_client_secret,oidc_scopes:b.oidc_scopes,jit_enabled:b.jit_enabled,...O&&{attribute_mapping:L}})}finally{d(!1)}},S=async()=>{k(!0),_(null);const Z=O=>O.includes("{")||O.includes("}"),R={},L={};if(u==="saml"?(b.idp_entity_id?Z(b.idp_entity_id)?(L.entity_id_valid=!1,R.entity_id_valid="IdP Entity ID contains placeholder values - please replace with actual values"):L.entity_id_valid=!0:(L.entity_id_valid=!1,R.entity_id_valid="IdP Entity ID is required"),b.idp_sso_url?Z(b.idp_sso_url)?(L.sso_url_valid=!1,R.sso_url_valid="IdP SSO URL contains placeholder values - please replace with actual values"):L.sso_url_valid=!0:(L.sso_url_valid=!1,R.sso_url_valid="IdP SSO URL is required"),b.idp_certificate?L.certificate_provided=!0:(L.certificate_provided=!1,R.certificate_provided="X.509 Certificate is required")):(b.oidc_issuer_url?Z(b.oidc_issuer_url)?(L.issuer_url_valid=!1,R.issuer_url_valid="Issuer URL contains placeholder values - please replace with actual values"):L.issuer_url_valid=!0:(L.issuer_url_valid=!1,R.issuer_url_valid="Issuer URL is required"),b.oidc_client_id?Z(b.oidc_client_id)?(L.client_id_valid=!1,R.client_id_valid="Client ID contains placeholder values - please replace with actual values"):L.client_id_valid=!0:(L.client_id_valid=!1,R.client_id_valid="Client ID is required")),Object.keys(R).length>0){_({success:!1,checks:L,errors:R}),k(!1);return}try{const O=u==="saml"?{protocol:"saml",idp_entity_id:b.idp_entity_id,idp_sso_url:b.idp_sso_url,idp_certificate:b.idp_certificate}:{protocol:"oidc",oidc_issuer_url:b.oidc_issuer_url,oidc_client_id:b.oidc_client_id,oidc_client_secret:b.oidc_client_secret},F=await(r==null?void 0:r(a,O));F&&_(F)}catch(O){_({success:!1,checks:{},errors:{general:"Test failed: "+O.message}})}finally{k(!1)}},$=Z=>t.jsx(em,{template:Z});return t.jsxs("form",{onSubmit:P,autoComplete:"off",className:"w-flex-col w-gap-4",children:[c?t.jsxs("div",{className:"w-flex w-items-center w-gap-4 w-sso-template",children:[$(c),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:c.name}),t.jsx("div",{className:"w-eyebrow",children:c.protocol})]}),t.jsx(se,{type:"button",$size:"sm",$outline:!0,onClick:()=>p(null),children:"Change"})]}):t.jsxs("div",{className:"w-flex-col w-gap-5",children:[t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-eyebrow",children:"SAML Providers"}),t.jsx("div",{className:"w-grid-4",children:Zi.filter(Z=>Z.protocol==="saml").map(Z=>t.jsxs("button",{type:"button",className:"w-sso-tile",onClick:()=>E(Z),children:[$(Z),t.jsx("span",{className:"w-secsub",children:Z.name})]},Z.id))})]}),t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-eyebrow",children:"OIDC Providers"}),t.jsx("div",{className:"w-grid-4",children:Zi.filter(Z=>Z.protocol==="oidc").map(Z=>t.jsxs("button",{type:"button",className:"w-sso-tile",onClick:()=>E(Z),children:[$(Z),t.jsx("span",{className:"w-secsub",children:Z.name})]},Z.id))})]})]}),c&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-tile w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-sec",children:"Service Provider Details"}),t.jsx("div",{className:"w-flex-col w-gap-2 w-full",children:u==="saml"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"ACS URL:"}),t.jsx("code",{children:M}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",onClick:()=>T(M,"acs"),children:f==="acs"?t.jsx(Ye,{size:12}):t.jsx(qa,{size:12})})]}),t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Metadata:"}),t.jsx("code",{children:H}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",onClick:()=>T(H,"metadata"),children:f==="metadata"?t.jsx(Ye,{size:12}):t.jsx(qa,{size:12})})]})]}):t.jsxs("div",{className:"w-token",children:[t.jsx("span",{className:"w-secsub w-none",children:"Callback:"}),t.jsx("code",{children:A}),t.jsx("button",{type:"button",className:"w-btn w-btn--icon",onClick:()=>T(A,"callback"),children:f==="callback"?t.jsx(Ye,{size:12}):t.jsx(qa,{size:12})})]})})]}),t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs("div",{className:"w-flex w-justify-between w-items-center w-gap-3",children:[t.jsx("div",{className:"w-eyebrow",children:c?`${c.name} Configuration`:"Configuration"}),t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[c&&c.docUrl&&t.jsxs("a",{href:c.docUrl,target:"_blank",rel:"noopener noreferrer",className:"w-link w-link--sm w-text-primary w-inline w-gap-1",children:[t.jsx(Pu,{size:12})," Docs"]}),t.jsx(se,{type:"button",$size:"sm",$outline:!0,onClick:S,disabled:v||!c,children:v?t.jsx(ke,{size:16}):"Test Connection"}),t.jsx(se,{$size:"sm",type:"submit",disabled:m||C.length===0||!c,children:m?t.jsx(ke,{size:16}):"Create Connection"})]})]}),N&&(()=>{const Z={entity_id_valid:"IdP Entity ID",sso_url_valid:"IdP SSO URL",certificate_provided:"X.509 Certificate",issuer_url_valid:"Issuer URL",client_id_valid:"Client ID",certificate_valid:"Certificate Valid",sso_url_reachable:"SSO URL Reachable",discovery_reachable:"Discovery Endpoint",discovery_valid:"Discovery Valid",authorization_endpoint:"Authorization Endpoint",token_endpoint:"Token Endpoint",issuer_valid:"Issuer URL Valid"};return t.jsxs("div",{className:`w-banner ${N.success?"w-banner--success":"w-banner--error"} w-flex-col w-gap-3`,children:[t.jsx("div",{className:`w-sec ${N.success?"w-text-success":"w-text-error"}`,children:N.success?"✓ All checks passed":"✗ Some checks failed"}),t.jsx("div",{className:"w-flex-col w-gap-2 w-full",children:Object.entries(N.checks).map(([R,L])=>{var O;return t.jsxs("div",{className:"w-flex w-items-start w-gap-2 w-sso-check",children:[t.jsx("span",{className:`w-sso-check-mark ${L?"w-text-success":"w-text-error"}`,children:L?"✓":"✗"}),t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:Z[R]||R.replace(/_/g," ").replace(/\b\w/g,F=>F.toUpperCase())}),((O=N.errors)==null?void 0:O[R])&&t.jsx("div",{className:"w-secsub w-text-error",children:N.errors[R]})]})]},R)})})]})})(),t.jsxs("div",{className:"w-grid-2",children:[!c&&t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Protocol *"}),t.jsxs("select",{className:"w-input",value:u,onChange:Z=>h(Z.target.value),children:[t.jsx("option",{value:"saml",children:"SAML"}),t.jsx("option",{value:"oidc",children:"OpenID Connect (OIDC)"})]})]}),t.jsxs(Ge,{className:"w-col-full",children:[t.jsx(Ve,{children:"Domain *"}),y?t.jsx("div",{className:"w-secsub",children:"Loading domains..."}):C.length===0?t.jsx("div",{className:"w-banner w-banner--warn",children:t.jsx("span",{className:"w-banner-txt",children:"No verified domains found. Please add and verify a domain first."})}):t.jsxs("select",{className:"w-input",value:b.domain_id,onChange:Z=>j({...b,domain_id:Z.target.value}),required:!0,children:[t.jsx("option",{value:"",children:"Select a verified domain"}),C.map(Z=>t.jsx("option",{value:Z.id,children:Z.fqdn},Z.id))]})]}),u==="saml"?t.jsxs(t.Fragment,{children:[t.jsxs(Ge,{children:[t.jsx(Ve,{children:"IdP Entity ID *"}),t.jsx(ye,{type:"text",value:b.idp_entity_id,onChange:Z=>j({...b,idp_entity_id:Z.target.value}),placeholder:"https://idp.example.com/entity",required:!0})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"IdP SSO URL *"}),t.jsx(ye,{type:"url",value:b.idp_sso_url,onChange:Z=>j({...b,idp_sso_url:Z.target.value}),placeholder:"https://idp.example.com/sso",required:!0})]}),t.jsxs(Ge,{className:"w-col-full",children:[t.jsx(Ve,{children:"X.509 Certificate *"}),t.jsx(ye,{as:"textarea",value:b.idp_certificate,onChange:Z=>j({...b,idp_certificate:Z.target.value}),placeholder:"-----BEGIN CERTIFICATE-----...",required:!0,className:"w-input--area w-input--mono"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Issuer URL *"}),t.jsx(ye,{type:"url",value:b.oidc_issuer_url,onChange:Z=>j({...b,oidc_issuer_url:Z.target.value}),placeholder:"https://login.example.com",required:!0})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Client ID *"}),t.jsx(ye,{type:"text",value:b.oidc_client_id,onChange:Z=>j({...b,oidc_client_id:Z.target.value}),placeholder:"your-client-id",required:!0,autoComplete:"off","data-lpignore":"true","data-form-type":"other"})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Client Secret *"}),t.jsx(ye,{type:"password",value:b.oidc_client_secret,onChange:Z=>j({...b,oidc_client_secret:Z.target.value}),placeholder:"your-client-secret",required:!0,autoComplete:"new-password","data-lpignore":"true","data-form-type":"other"})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Scopes"}),t.jsx(ye,{type:"text",value:b.oidc_scopes,onChange:Z=>j({...b,oidc_scopes:Z.target.value}),placeholder:"openid profile email"})]})]}),t.jsx(Ge,{className:"w-col-full",children:t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-sec",children:"Enable JIT Provisioning"}),t.jsx("div",{className:"w-secsub",children:"When enabled, new users are automatically created on their first SSO login. When disabled, only pre-existing users can sign in via SSO."})]}),t.jsx(Ha,{checked:b.jit_enabled,onChange:()=>j({...b,jit_enabled:!b.jit_enabled})})]})}),t.jsxs("div",{className:"w-col-full w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-inline w-gap-2 w-text-primary w-disclosure",onClick:()=>w(!x),children:[t.jsx("span",{className:"w-disclosure-caret",children:x?"▼":"▶"}),"Advanced Options (Attribute Mapping)"]}),x&&t.jsxs("div",{className:"w-tile w-flex-col w-gap-3",children:[t.jsx("div",{className:"w-secsub",children:"Map IdP attribute names to Wacht user fields. Leave empty to use default attribute names."}),t.jsxs("div",{className:"w-grid-3",children:[t.jsxs(Ge,{children:[t.jsx(Ve,{children:"First Name Attribute"}),t.jsx(ye,{type:"text",value:b.attr_first_name,onChange:Z=>j({...b,attr_first_name:Z.target.value}),placeholder:u==="saml"?"givenName":"given_name"})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Last Name Attribute"}),t.jsx(ye,{type:"text",value:b.attr_last_name,onChange:Z=>j({...b,attr_last_name:Z.target.value}),placeholder:u==="saml"?"surname":"family_name"})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Email Attribute"}),t.jsx(ye,{type:"text",value:b.attr_email,onChange:Z=>j({...b,attr_email:Z.target.value}),placeholder:"email"})]})]})]})]})]})]})]})]})},ht=(...e)=>e.filter(Boolean).join(" "),Hi=({className:e,...a})=>t.jsx("div",{className:ht("w-contents",e),...a}),Hn=({className:e,...a})=>t.jsx("div",{className:ht("w-card","w-flex-col","w-full","w-minh-full",e),...a}),nm=({className:e,...a})=>t.jsx("div",{className:ht("w-tabsbar",e),...a}),rm=({className:e,...a})=>t.jsx("div",{className:ht("w-flex","w-items-center","w-gap-1","w-tabs",e),...a}),Da=({className:e,$isActive:a,...s})=>t.jsx("button",{className:ht("w-tab",a&&"w-tab--active",e),...s}),Ua=({className:e,...a})=>t.jsx("span",{className:ht("w-inline","w-gap-2",e),...a}),im=({className:e,children:a,...s})=>t.jsx("div",{className:ht("w-tabbody",e),...s,children:t.jsx("div",{className:"w-tabpane",children:a})}),Rr=({className:e,...a})=>t.jsx("div",{className:ht("w-sechead",e),...a}),Fi=({className:e,...a})=>t.jsx("div",{className:ht("w-flex","w-items-center","w-justify-between","w-gap-4",e),...a}),Ti=({className:e,...a})=>t.jsx("div",{className:ht("w-grow",e),...a}),Ii=({className:e,...a})=>t.jsx("div",{className:ht("w-flex","w-items-center","w-gap-3","w-none",e),...a}),hn=({className:e,...a})=>t.jsx("div",{className:ht("w-full",e),...a}),om=({className:e,...a})=>t.jsx("div",{className:ht("w-page-head",e),...a}),lm=({className:e,...a})=>t.jsx("div",{className:ht("w-grow","w-flex-col","w-gap-1",e),...a}),cm=({className:e,...a})=>t.jsx("div",{className:ht("w-sec","w-truncate",e),...a}),dm=({className:e,...a})=>t.jsx("div",{className:ht("w-secsub","w-truncate",e),...a}),um={primary:"w-pill--current",success:"w-pill--success",warning:"w-pill--pending",danger:"w-pill--error",neutral:""},wa=({className:e,$variant:a="neutral",children:s,...r})=>t.jsxs("span",{className:ht("w-pill",um[a],e),...r,children:[t.jsx("span",{className:"w-dot"}),s]}),Vi=({className:e,$first:a,...s})=>t.jsx("div",{className:ht("w-sec",e),...s}),mm=({organization:e})=>{var M,T,P,S,$,Z;const{switchOrganization:a,refetch:s}=ot(),{workspaces:r}=ba(),{deployment:i}=_e(),{deleteOrganization:l,updateOrganization:m}=Dt(),{toast:d}=Ct(),[c,p]=o.useState((e==null?void 0:e.name)||""),[u,h]=o.useState((e==null?void 0:e.description)||""),[f,g]=o.useState(!1),[x,w]=o.useState({mfa_required:!1,ip_restrictions:!1,allowed_ips:"",default_workspace_id:""}),[b,j]=o.useState(""),[v,k]=o.useState(!1),[N,_]=o.useState(!1),C=o.useRef({name:c,description:u,security:x,isSaving:f});o.useEffect(()=>{C.current={name:c,description:u,security:x,isSaving:f}},[c,u,x,f]);const y=o.useCallback(async()=>{if(!e)return;const R=C.current;try{g(!0),await m(e,{name:R.name,description:R.description,whitelisted_ips:R.security.allowed_ips.split(`
103
+ `).filter(L=>L.trim()),enable_ip_restriction:R.security.ip_restrictions,enforce_mfa:R.security.mfa_required,auto_assigned_workspace_id:R.security.default_workspace_id||"0"}),d("Changes saved","info")}catch(L){d(L.message||"Failed to save changes","error")}finally{g(!1)}},[e,m,d]),E=o.useCallback(()=>{C.current.isSaving||y()},[y]);o.useEffect(()=>{var R;e&&(p(e.name||""),h(e.description||""),w({allowed_ips:((R=e.whitelisted_ips)==null?void 0:R.join(`
104
+ `))||"",ip_restrictions:e.enable_ip_restriction||!1,mfa_required:e.enforce_mfa||!1,default_workspace_id:e.auto_assigned_workspace_id||""}))},[e]);const A=o.useMemo(()=>r.filter(R=>R.organization.id===(e==null?void 0:e.id)),[r,e==null?void 0:e.id]),H=async()=>{if(!(!e||b!==e.name))try{k(!0),await a(""),await l(e),await s(),d("Organization deleted","info")}catch{d("Failed to delete organization","error")}finally{k(!1),j("")}};return e?t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"name",children:"Organization name"}),t.jsx(ye,{id:"name",value:c,onChange:R=>p(R.target.value),onBlur:E,placeholder:"Organization name",required:!0})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"description",children:"Description"}),t.jsx(ye,{id:"description",as:"textarea",value:u,onChange:R=>h(R.target.value),onBlur:E,placeholder:"Optional description",className:"w-input--area"})]}),((M=i==null?void 0:i.b2b_settings)==null?void 0:M.workspaces_enabled)&&A.length>0&&t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"default_workspace",children:"Default workspace"}),t.jsx(mn,{options:A.map(R=>({value:R.id,label:R.name})),value:x.default_workspace_id,onChange:R=>{w(L=>({...L,default_workspace_id:R})),setTimeout(E,0)},placeholder:"Select default workspace"})]})]}),(((T=i==null?void 0:i.b2b_settings)==null?void 0:T.enforce_mfa_per_org_enabled)||((P=i==null?void 0:i.b2b_settings)==null?void 0:P.ip_allowlist_per_org_enabled))&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(Vi,{children:"Security"}),((S=i==null?void 0:i.b2b_settings)==null?void 0:S.enforce_mfa_per_org_enabled)&&t.jsxs(Fi,{children:[t.jsxs(Ti,{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Multi-factor authentication"}),t.jsx("p",{className:"w-secsub",children:"Require all members to set up MFA for added security."})]}),t.jsx(Ii,{children:t.jsx(Ha,{checked:x.mfa_required,onChange:()=>{const R=!x.mfa_required;w(L=>({...L,mfa_required:R})),setTimeout(E,0)}})})]}),(($=i==null?void 0:i.b2b_settings)==null?void 0:$.ip_allowlist_per_org_enabled)&&t.jsxs(t.Fragment,{children:[t.jsxs(Fi,{children:[t.jsxs(Ti,{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"IP restrictions"}),t.jsx("p",{className:"w-secsub",children:"Only allow access from specific IP addresses."})]}),t.jsx(Ii,{children:t.jsx(Ha,{checked:x.ip_restrictions,onChange:()=>{const R=!x.ip_restrictions;w(L=>({...L,ip_restrictions:R})),setTimeout(E,0)}})})]}),x.ip_restrictions&&t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"allowed_ips",children:"Allowed IP addresses"}),t.jsx(ye,{id:"allowed_ips",as:"textarea",value:x.allowed_ips,onChange:R=>w(L=>({...L,allowed_ips:R.target.value})),onBlur:E,placeholder:`192.168.1.1
105
+ 10.0.0.0/24`,className:"w-input--area w-input--mono"})]})]})]}),((Z=i==null?void 0:i.b2b_settings)==null?void 0:Z.allow_org_deletion)&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(Vi,{children:"Danger zone"}),t.jsxs("div",{className:"w-danger w-flex-col w-items-start w-gap-3",children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-2 w-full",children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Delete organization"}),t.jsx("div",{className:"w-secsub",children:"Once you delete this organization, there is no going back."})]}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,onClick:()=>{_(!N),j("")},children:N?"Cancel":"Delete organization"})]}),N&&t.jsxs("div",{className:"w-flex-col w-gap-3 w-full",children:[t.jsxs(Ge,{children:[t.jsxs(Ve,{htmlFor:"confirm_org_name",children:["Type"," ",t.jsx("strong",{children:e.name})," ","to confirm"]}),t.jsx(ye,{id:"confirm_org_name",type:"text",value:b,onChange:R=>j(R.target.value),placeholder:e.name})]}),t.jsx(se,{$size:"sm",$destructive:!0,onClick:H,disabled:b!==e.name||v,children:v?t.jsx(ke,{size:12}):"Delete forever"})]})]})]})]}):t.jsx(ke,{})},Lr=(e,a)=>a?`${e} ${a}`:e,Zt=o.forwardRef(({className:e,...a},s)=>t.jsx("table",{ref:s,className:Lr("w-table",e),...a}));Zt.displayName="Table";const Ht=o.forwardRef((e,a)=>t.jsx("thead",{ref:a,...e}));Ht.displayName="TableHead";const Ft=o.forwardRef((e,a)=>t.jsx("tbody",{ref:a,...e}));Ft.displayName="TableBody";const it=o.forwardRef((e,a)=>t.jsx("tr",{ref:a,...e}));it.displayName="TableRow";const Fe=o.forwardRef((e,a)=>t.jsx("th",{ref:a,...e}));Fe.displayName="TableHeader";const Xe=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:e,...a}));Xe.displayName="TableCell";const pm=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:Lr("w-td--flex",e),...a}));pm.displayName="TableCellFlex";const Tt=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:Lr("w-td--actions",e),...a}));Tt.displayName="ActionsCell";const Nt=({title:e,description:a,icon:s,action:r})=>t.jsxs("div",{className:"w-empty",children:[t.jsx("div",{className:"w-empty-ic",children:s??t.jsx(Qu,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:e}),t.jsx("p",{children:a})]}),r&&t.jsx("div",{className:"w-empty-action",children:r})]}),bt=({triggerRef:e,isOpen:a,minWidth:s=300,defaultMaxHeight:r=400,offset:i=8,contentRef:l})=>{const[m,d]=o.useState();return o.useEffect(()=>{if(!a||!e.current){d(void 0);return}const c=()=>{var N;if(!e.current)return;const u=e.current.getBoundingClientRect(),h=window.innerWidth,f=window.innerHeight,g=((N=l==null?void 0:l.current)==null?void 0:N.offsetWidth)||s,x=f-u.bottom,w=u.top,b={};x>=w?(b.top=u.bottom+i,b.maxHeight=Math.min(r,x-i*2)):(b.bottom=f-u.top+i,b.maxHeight=Math.min(r,w-i*2));const j=h-u.left,v=u.right,k=j>=v?u.left:u.right-g;b.left=Math.max(i,Math.min(h-g-i,k)),d(b)},p=requestAnimationFrame(c);return window.addEventListener("resize",c),window.addEventListener("scroll",c,!0),()=>{cancelAnimationFrame(p),window.removeEventListener("resize",c),window.removeEventListener("scroll",c,!0)}},[a,s,r,i,l]),m},zi=({onClose:e,domain:a,triggerRef:s})=>{const r=o.useRef(null),[i,l]=o.useState(),[m,d]=o.useState(""),[c,p]=o.useState(!1),[u,h]=o.useState(!1),{addDomain:f,verifyDomain:g}=xa(),{toast:x}=Ct(),w=bt({contentRef:r,triggerRef:s??{current:null},isOpen:u,minWidth:360,defaultMaxHeight:420}),b=_=>/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/.test(_),j=_=>_.trim().toLowerCase().replace(/^https?:\/\//,""),v=async()=>{const _=j(m);if(!_){x("Please enter a domain name","error");return}if(!b(_)){x("Please enter a valid domain (e.g., example.com)","error");return}if(_.length>253){x("Domain name is too long","error");return}p(!0);try{const C=await f({fqdn:_});x("Domain added","info"),l(C.data)}catch(C){x(C.message||"Failed to add domain. Please try again.","error")}finally{p(!1)}},k=async()=>{if(!(!i||c)){p(!0);try{await g(i),e==null||e(),x("Domain verified","info")}catch(_){x(_.message||"Failed to verify domain. Check DNS records and try again.","error")}finally{p(!1)}}};if(o.useEffect(()=>{h(!0);const _=y=>{r.current&&!r.current.contains(y.target)&&(e==null||e())},C=y=>{y.key==="Escape"&&(e==null||e())};return document.addEventListener("mousedown",_),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",C)}},[e]),o.useEffect(()=>{a&&l(a)},[a]),!u)return null;const N={position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"};return i?t.jsxs("div",{ref:r,className:"w-pop w-pop--wide",style:N,onClick:_=>_.stopPropagation(),role:"dialog","aria-labelledby":"verify-domain-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"verify-domain-title",children:"Verify domain"}),t.jsx("p",{className:"w-pop-sub",children:"Add this DNS record, then verify."}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Type"}),t.jsx(ye,{value:i==null?void 0:i.verification_dns_record_type,disabled:!0})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Name"}),t.jsx(ye,{value:i==null?void 0:i.verification_dns_record_name,disabled:!0})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Value"}),t.jsx(ye,{value:i==null?void 0:i.verification_dns_record_data,disabled:!0})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:k,disabled:c,children:c?t.jsx(ke,{size:12}):"Verify"})]})]}):t.jsxs("div",{ref:r,className:"w-pop w-pop--wide",style:N,onClick:_=>_.stopPropagation(),role:"dialog","aria-labelledby":"add-domain-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"add-domain-title",children:"Add domain"}),t.jsx("p",{className:"w-pop-sub",children:"Verified members auto-join this org."}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Domain"}),t.jsx(ye,{type:"text",placeholder:"example.com",value:m,onChange:_=>d(_.target.value),onKeyDown:_=>{_.key==="Enter"&&m&&v()},autoFocus:!0,"aria-label":"Domain name"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:v,disabled:!m||c,children:c?t.jsx(ke,{size:12}):"Continue"})]})]})},hm=({organization:e})=>{const{getOrganizationDomains:a,removeOrganizationDomain:s}=Dt(),[r,i]=o.useState(null),[l,m]=o.useState(!1),[d,c]=o.useState(null),[p,u]=o.useState(new Set),h=o.useRef(null),f=o.useRef({}),{data:g=[],isLoading:x,mutate:w}=Se(e!=null&&e.id?`wacht-org-domains:${e.id}`:null,async()=>(await(a==null?void 0:a(e))||[]).map(k=>({...k,verified:k.verified!==void 0?k.verified:!1}))),b=(v,k)=>{u(N=>{const _=new Set(N);return k?_.add(v):_.delete(v),_})},j=async v=>{b(v.id,!0);try{await s(e,v),w()}finally{b(v.id,!1),i(null)}};return x?t.jsx(ke,{}):t.jsxs(t.Fragment,{children:[t.jsxs(Rr,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Domains"}),t.jsx("div",{className:"w-secsub",children:"Users with verified domain emails auto-join this organization."})]}),t.jsx(se,{ref:h,onClick:()=>m(!0),$size:"sm",children:"Add domain"}),l&&t.jsx(zi,{onClose:()=>{m(!1),w()},triggerRef:h})]}),g!=null&&g.length?t.jsx(hn,{children:t.jsxs(Zt,{children:[t.jsx(Ht,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Domain"}),t.jsx(Fe,{children:"Status"}),t.jsx(Fe,{children:"Added"}),t.jsx(Fe,{})]})}),t.jsx(Ft,{children:g.map(v=>{const k=p.has(v.id);return t.jsxs(it,{children:[t.jsx(Xe,{children:v.fqdn}),t.jsx(Xe,{children:v.verified?t.jsx(wa,{$variant:"success",children:"Verified"}):t.jsx(wa,{$variant:"warning",children:"Pending"})}),t.jsx(Xe,{children:new Date(v.created_at).toLocaleDateString()}),t.jsx(Tt,{children:t.jsxs("div",{className:"w-actions",children:[t.jsx(se,{ref:N=>{N&&(f.current[v.id]=N)},$size:"sm",$outline:!0,disabled:k,onClick:()=>c(v.id),children:v.verified?"View DNS":"Verify"}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,disabled:k,onClick:()=>i(v.id),children:k?t.jsx(ke,{size:12}):"Remove"})]})})]},v.id)})})]})}):t.jsx(Nt,{title:"No domains added",description:"Users with verified domain emails automatically join this organization."}),r&&t.jsx(Ja,{title:"Remove domain?",description:"Active users aren't affected, but new users with this domain won't auto-join.",onConfirm:()=>{const v=g.find(k=>k.id===r);v&&j(v)},onCancel:()=>i(null)}),d&&t.jsx(zi,{domain:g.find(v=>v.id===d),onClose:()=>c(null),triggerRef:{current:f.current[d]}})]})},a0=({onClose:e,onSuccess:a,roles:s,triggerRef:r})=>{const i=o.useRef(null),[l,m]=o.useState(""),[d,c]=o.useState(null),[p,u]=o.useState(!1),[h,f]=o.useState(!1),{inviteMember:g}=xa(),{toast:x}=Ct(),w=bt({contentRef:i,triggerRef:r??{current:null},isOpen:h,minWidth:360,defaultMaxHeight:360}),b=s.map(k=>({value:k.id,label:k.name})),j=k=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k),v=async()=>{const k=l.trim().toLowerCase();if(!(!k||!d)){if(!j(k)){x("Please enter a valid email address","error");return}if(k.length>320){x("Email address is too long","error");return}u(!0);try{await g({email:k,organizationRole:d}),a==null||a()}catch(N){x(N.message||"Failed to send invitation. Please try again.","error")}finally{u(!1)}}};return o.useEffect(()=>{f(!0);const k=_=>{i.current&&!i.current.contains(_.target)&&(e==null||e())},N=_=>{_.key==="Escape"&&(e==null||e())};return document.addEventListener("mousedown",k),document.addEventListener("keydown",N),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",N)}},[e]),h?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:k=>k.stopPropagation(),role:"dialog","aria-labelledby":"invite-member-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"invite-member-title",children:"Invite member"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Email"}),t.jsx(ye,{type:"email",placeholder:"colleague@company.com",value:l,onChange:k=>m(k.target.value),onKeyDown:k=>{k.key==="Enter"&&l&&d&&v()},autoFocus:!0,"aria-label":"Email address for invitation"})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Role"}),t.jsx(mn,{options:b,value:d==null?void 0:d.id,onChange:k=>c(s.find(N=>N.id===k)),placeholder:"Select a role","aria-label":"Select role for invited member"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:v,disabled:!l||!d||p,children:p?t.jsx(ke,{size:12}):"Send invite"})]})]}):null},fm=({organization:e})=>{const{getOrganizationMembers:a,getOrganizationRoles:s,addRoleToOrganizationMember:r,removeRoleFromOrganizationMember:i,removeOrganizationMember:l}=Dt(),{session:m}=ot(),{toast:d}=Ct(),[c,p]=o.useState(""),[u,h]=o.useState(1),[f]=o.useState(10),[g,x]=o.useState(!1),[w,b]=o.useState(new Set),j=o.useRef(null),[v,k]=o.useState(c);o.useEffect(()=>{const S=setTimeout(()=>{k(c),h(1)},500);return()=>clearTimeout(S)},[c]);const{data:N,mutate:_}=Se(e?`wacht-api-organizations:${e.id}:members:${u}:${f}:${v}`:null,()=>a==null?void 0:a(e,{page:u,limit:f,search:v}),{keepPreviousData:!0}),C=(N==null?void 0:N.data)||[],y=(N==null?void 0:N.meta)||{total:0,limit:10},E=Math.ceil(y.total/(y.limit||10)),{data:A=[]}=Se(e?`wacht-api-organizations:${e.id}:roles`:null,()=>(s==null?void 0:s(e))||[]),H=A,M=(S,$)=>{b(Z=>{const R=new Set(Z);return $?R.add(S):R.delete(S),R})},T=async(S,$,Z)=>{M(S.id,!0);try{Z?(await i(e,S,$),d("Role removed","info")):(await r(e,S,$),d("Role added","info")),_()}catch(R){d(R.message||"Failed to update role","error")}finally{M(S.id,!1)}},P=async S=>{M(S.id,!0);try{await l(e,S),_(),d("Member removed","info")}catch($){d($.message||"Failed to remove member","error")}finally{M(S.id,!1)}};return N?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-toolbar",children:[t.jsx(Yc,{value:c,onChange:p,placeholder:"Search members..."}),t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[y.total>0&&t.jsxs("div",{className:"w-secsub",children:[y.total," member",y.total!==1?"s":""]}),t.jsx(se,{ref:j,onClick:()=>x(!0),$size:"sm",children:"Invite"})]})]}),g&&t.jsx(a0,{onClose:()=>x(!1),onSuccess:()=>{_(),x(!1)},roles:H,triggerRef:j}),C.length===0?t.jsx(Nt,{title:c?"No members match":"No members yet",description:"Invite someone or connect a corporate domain to auto-join."}):t.jsx(hn,{children:t.jsxs(Zt,{children:[t.jsx(Ht,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Member"}),t.jsx(Fe,{children:"Joined"}),t.jsx(Fe,{children:"Roles"}),t.jsx(Fe,{})]})}),t.jsx(Ft,{children:C.map(S=>{var R,L;const $=((R=S.user)==null?void 0:R.id)===((L=m==null?void 0:m.active_signin)==null?void 0:L.user_id),Z=w.has(S.id);return t.jsxs(it,{children:[t.jsx(Xe,{children:t.jsx(wm,{member:S,isCurrentUser:$})}),t.jsx(Xe,{children:new Date(S.created_at).toLocaleDateString()}),t.jsx(Xe,{children:t.jsx(gm,{member:S,roles:H,onToggle:T,disabled:Z})}),t.jsx(Tt,{children:t.jsx("div",{className:"w-actions",children:t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,disabled:Z||$,onClick:()=>P(S),title:$?"You cannot remove yourself":"Remove member",children:Z?t.jsx(ke,{size:12}):"Remove"})})})]},S.id)})})]})}),E>1&&t.jsxs("div",{className:"w-flex w-items-center w-justify-center w-gap-4 w-mt-6",children:[t.jsx(se,{onClick:()=>h(S=>Math.max(1,S-1)),disabled:u===1,$size:"sm",$outline:!0,children:"Previous"}),t.jsxs("span",{className:"w-secsub",children:[u," / ",E]}),t.jsx(se,{onClick:()=>h(S=>Math.min(E,S+1)),disabled:u===E,$size:"sm",$outline:!0,children:"Next"})]})]}):t.jsx(ke,{})},wm=({member:e,isCurrentUser:a})=>{var l,m;const s=e.user,r=(d="",c="")=>`${d[0]||""}${c[0]||""}`.toUpperCase()||"?",i=s?`${s.first_name||""} ${s.last_name||""}`.trim()||((l=s.primary_email_address)==null?void 0:l.email):"Unknown";return t.jsxs("div",{className:"w-flex w-items-center w-gap-3 w-grow",children:[t.jsx("div",{className:"w-avatar w-avatar--md",children:s!=null&&s.profile_picture_url?t.jsx("img",{src:s.profile_picture_url,alt:i}):r(s==null?void 0:s.first_name,s==null?void 0:s.last_name)}),t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-sec",children:i}),a&&t.jsx(wa,{$variant:"neutral",children:"You"})]}),t.jsx("span",{className:"w-secsub",children:(m=s==null?void 0:s.primary_email_address)==null?void 0:m.email})]})]})},gm=({member:e,roles:a,onToggle:s,disabled:r})=>{var d;const i=e.roles||[],l=c=>i.some(p=>p.id===c),m=i.length===0?"No role":i.length===1?(d=i[0])==null?void 0:d.name:`${i.length} roles`;return t.jsxs(ks,{children:[t.jsx(Ns,{children:t.jsxs(se,{$size:"sm",$outline:!0,disabled:r,className:"w-justify-between w-rolepick-btn",children:[m,t.jsx(Wt,{size:12})]})}),t.jsx(Cs,{children:a.length===0?t.jsx("div",{className:"w-secsub w-menu-head",children:"No roles configured"}):a.map(c=>{const p=l(c.id);return t.jsx(ta,{onClick:()=>s(e,c,p),children:t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-3 w-full",children:[t.jsx("span",{children:c.name}),p&&t.jsx(Ye,{size:13,className:"w-text-primary"})]})},c.id)})})]})},xm=e=>{const a=e.expires_at;return a?new Date(a).getTime()<Date.now():!1},vm=({organization:e})=>{const{getOrganizationInvitations:a,getOrganizationRoles:s,discardOrganizationInvitation:r,resendOrganizationInvitation:i}=Dt(),{toast:l}=Ct(),[m,d]=o.useState(!1),[c,p]=o.useState(new Set),u=o.useRef(null),{data:h=[],isLoading:f,mutate:g}=Se(e?`wacht-api-organizations:${e.id}:invitations`:null,()=>(a==null?void 0:a(e))||[]),{data:x=[],isLoading:w}=Se(e?`wacht-api-organizations:${e.id}:roles`:null,()=>(s==null?void 0:s(e))||[]),b=x,j=(N,_)=>{p(C=>{const y=new Set(C);return _?y.add(N):y.delete(N),y})},v=async N=>{j(N.id,!0);try{await r(e,N),g(),l("Invitation cancelled","info")}catch(_){l(_.message||"Failed to cancel invitation","error")}finally{j(N.id,!1)}},k=async N=>{j(N.id,!0);try{await i(e,N),l("Invitation resent","info")}catch(_){l(_.message||"Failed to resend invitation","error")}finally{j(N.id,!1)}};return f||w?t.jsx(ke,{}):t.jsxs(t.Fragment,{children:[t.jsxs(Rr,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Invitations"}),t.jsx("div",{className:"w-secsub",children:"Pending invites to join this organization."})]}),t.jsx(se,{ref:u,onClick:()=>d(!0),$size:"sm",children:"Invite"})]}),m&&t.jsx(a0,{onClose:()=>d(!1),onSuccess:()=>{g(),d(!1)},roles:b,triggerRef:u}),h.length===0?t.jsx(Nt,{title:"No pending invitations",description:"Invite members to collaborate."}):t.jsx(hn,{children:t.jsxs(Zt,{children:[t.jsx(Ht,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Email"}),t.jsx(Fe,{children:"Role"}),t.jsx(Fe,{children:"Status"}),t.jsx(Fe,{children:"Invited"}),t.jsx(Fe,{})]})}),t.jsx(Ft,{children:h.map(N=>{var y;const _=xm(N),C=c.has(N.id);return t.jsxs(it,{children:[t.jsx(Xe,{children:N.email}),t.jsx(Xe,{children:((y=N.initial_organization_role)==null?void 0:y.name)||"No role"}),t.jsx(Xe,{children:_?t.jsx(wa,{$variant:"danger",children:"Expired"}):t.jsx(wa,{$variant:"warning",children:"Pending"})}),t.jsx(Xe,{children:new Date(N.created_at).toLocaleDateString()}),t.jsx(Tt,{children:t.jsxs("div",{className:"w-actions",children:[t.jsx(se,{$size:"sm",$outline:!0,disabled:C,onClick:()=>k(N),children:"Resend"}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,disabled:C,onClick:()=>v(N),children:C?t.jsx(ke,{size:12}):"Cancel"})]})})]},N.id)})})]})})]})},Di=({onClose:e,onSuccess:a,role:s,triggerRef:r})=>{var _;const i=o.useRef(null),[l,m]=o.useState((s==null?void 0:s.name)||""),[d,c]=o.useState((s==null?void 0:s.permissions)||[]),[p,u]=o.useState(!1),[h,f]=o.useState(!1),{deployment:g}=_e(),{toast:x}=Ct(),w=bt({contentRef:i,triggerRef:r??{current:null},isOpen:h,minWidth:400,defaultMaxHeight:500}),b=!!s,j=Array.isArray((_=g==null?void 0:g.b2b_settings)==null?void 0:_.organization_permissions)?g.b2b_settings.organization_permissions.map(C=>({value:C,label:C})):[];o.useEffect(()=>{f(!0);const C=A=>{i.current&&!i.current.contains(A.target)&&(e==null||e())},y=A=>{A.key==="Escape"&&(e==null||e())},E=setTimeout(()=>{document.addEventListener("mousedown",C),document.addEventListener("keydown",y)},100);return()=>{clearTimeout(E),document.removeEventListener("mousedown",C),document.removeEventListener("keydown",y)}},[e]);const v=C=>C.trim().replace(/[<>"'&]/g,""),k=C=>C.length>=2&&C.length<=50&&/^[a-zA-Z0-9\s_-]+$/.test(C),N=async()=>{const C=v(l);if(!C){x("Please enter a role name","error");return}if(!k(C)){x("Role name must be 2–50 characters, letters/numbers/spaces only.","error");return}if(d.length===0){x("Please select at least one permission","error");return}u(!0);try{const y={id:s==null?void 0:s.id,name:C,permissions:d};a==null||a(y)}catch(y){x(y.message||`Failed to ${b?"update":"create"} role. Please try again.`,"error")}finally{u(!1)}};return h?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:C=>C.stopPropagation(),role:"dialog","aria-labelledby":"role-dialog-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"role-dialog-title",children:b?"Edit role":"New role"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Name"}),t.jsx(ye,{type:"text",placeholder:"e.g. Admin, Editor, Viewer",value:l,onChange:C=>m(C.target.value),autoFocus:!0,"aria-label":"Role name"})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Permissions"}),t.jsx(Xc,{options:j,value:d,onChange:c,placeholder:"Select permissions","aria-label":"Select permissions for role"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:N,disabled:!l||p,children:p?t.jsx(ke,{size:12}):b?"Update":"Create"})]})]}):null};function Pr(e){return typeof e=="object"&&e!==null}function s0(e,a){const s=e[a];return typeof s=="string"?s.length>0&&s!=="0":typeof s=="number"?Number.isFinite(s)&&s>0:!1}function bm(e,a){const s=e[a];return typeof s=="boolean"?s:null}function n0(e){if(!Pr(e))return!1;const a=bm(e,"is_deployment_level");return a!==null?a:!1}function ym(e){return!Pr(e)||n0(e)?!1:s0(e,"organization_id")}function pr(e){return!Pr(e)||n0(e)?!1:s0(e,"workspace_id")}const jm=({organization:e})=>{var _;const{getOrganizationRoles:a,removeOrganizationRoles:s}=Dt(),{deployment:r}=_e(),[i,l]=o.useState({isOpen:!1}),[m,d]=o.useState(null),[c,p]=o.useState(null),[u,h]=o.useState(new Set),f=o.useRef(null),g=o.useRef(new Map),{data:x=[],isLoading:w,mutate:b}=Se(e?`wacht-api-organizations:${e.id}:roles`:null,()=>(a==null?void 0:a(e))||[]),j=(C,y)=>{h(E=>{const A=new Set(E);return y?A.add(C):A.delete(C),A})},v=async C=>{try{await new Promise(y=>setTimeout(y,500)),d({text:`Role ${C.id?"updated":"created"} successfully`,type:"success"}),l({isOpen:!1}),b()}catch(y){const E=y instanceof Error?y.message:"Failed to save role";d({text:E,type:"error"})}finally{setTimeout(()=>d(null),3e3)}},k=async C=>{j(C.id,!0);try{await s(e,C),b()}finally{j(C.id,!1),p(null)}};if(w&&x.length===0)return t.jsx(ke,{});const N=C=>{const y=ym(C),E=u.has(C.id),A=C.permissions.length;return t.jsxs(it,{children:[t.jsx(Xe,{children:t.jsxs("span",{className:"w-inline w-gap-2 w-sec",children:[C.name,!y&&t.jsx(wa,{$variant:"neutral",children:"Default"})]})}),t.jsx(Xe,{children:A===0?t.jsx(wa,{$variant:"neutral",children:"No permissions"}):t.jsxs("div",{className:"w-inline w-items-center w-gap-2",children:[t.jsxs(wa,{$variant:"primary",children:[A," ",A===1?"permission":"permissions"]}),t.jsx("span",{className:"w-truncate w-text-secondary w-maxw-sm",children:C.permissions.join(", ")})]})}),t.jsx(Tt,{children:y?t.jsxs("div",{className:"w-actions",children:[t.jsx(se,{ref:H=>{H&&g.current.set(C.id,H)},$size:"sm",$outline:!0,disabled:E,onClick:()=>l({isOpen:!0,role:C,triggerElement:g.current.get(C.id)??null}),children:"Edit"}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,disabled:E,onClick:()=>p(C.id),children:E?t.jsx(ke,{size:12}):"Delete"})]}):t.jsx("span",{className:"w-secsub",children:"Read-only"})})]},C.id)};return t.jsxs(t.Fragment,{children:[m&&t.jsxs("div",{className:`w-banner ${m.type==="success"?"w-banner--success":"w-banner--error"} w-mb-4`,children:[m.type==="success"?t.jsx(Ye,{size:16}):t.jsx(Ta,{size:16}),t.jsx("span",{className:"w-banner-txt",children:m.text})]}),t.jsxs(Rr,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Roles"}),t.jsx("div",{className:"w-secsub",children:"Define granular permissions for members."})]}),((_=r==null?void 0:r.b2b_settings)==null?void 0:_.custom_org_role_enabled)&&t.jsx(se,{ref:f,onClick:()=>l({isOpen:!0,triggerElement:f.current}),$size:"sm",children:"Add role"})]}),i.isOpen&&!i.role&&t.jsx(Di,{onClose:()=>l({isOpen:!1}),onSuccess:v,triggerRef:{current:i.triggerElement||f.current}}),x.length===0?t.jsx(Nt,{title:"No roles yet",description:"Define custom roles to manage granular permissions."}):t.jsx(t.Fragment,{children:t.jsx(hn,{children:t.jsxs(Zt,{children:[t.jsx(Ht,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Role"}),t.jsx(Fe,{children:"Permissions"}),t.jsx(Fe,{})]})}),t.jsx(Ft,{children:x.map(N)})]})})}),c&&t.jsx(Ja,{title:"Delete role?",description:"This action cannot be undone. Users with this role might lose access to certain features.",onConfirm:()=>{const C=x.find(y=>y.id===c);C&&k(C)},onCancel:()=>p(null)}),i.isOpen&&i.role&&t.jsx(Di,{role:i.role,onClose:()=>l({isOpen:!1}),onSuccess:v,triggerRef:{current:i.triggerElement||null}})]})},_m=()=>{const{activeOrganization:e,loading:a}=xa(),[s,r]=o.useState(null);return o.useEffect(()=>{e?r(e):!a&&!e&&s&&r(null)},[e,a,s]),{activeOrganization:s||e,loading:a}},r0=()=>{var w,b,j;const{loading:e,activeOrganization:a}=_m(),{updateOrganization:s}=xa(),{deployment:r}=_e(),[i,l]=o.useState("general"),[m,d]=o.useState(null),[c,p]=o.useState("info"),[u,h]=o.useState(!1),f=o.useRef(null),g=o.useCallback((v,k="info")=>{d(v),p(k),setTimeout(()=>d(null),3e3)},[]),x=async v=>{var N;const k=(N=v.target.files)==null?void 0:N[0];if(k){if(k.size>2*1024*1024){g("File size cannot exceed 2MB","error");return}if(!k.type.startsWith("image/")){g("Please select a valid image file","error");return}try{h(!0),await s({image:k}),g("Logo updated","info")}catch(_){g((_==null?void 0:_.message)||"Failed to update logo","error")}finally{h(!1),f.current&&(f.current.value="")}}};return e&&!a?t.jsx($e,{children:t.jsx(Hn,{className:"w-items-center w-justify-center",children:t.jsx(ke,{})})}):a?t.jsx($e,{children:t.jsx(Hi,{children:t.jsx(Mr.Provider,{value:{screen:null,setScreen:()=>{},toast:g},children:t.jsxs(Hn,{className:"w-relative",children:[t.jsxs(om,{children:[t.jsxs("button",{type:"button",className:"w-avatar w-avatar--lg w-avatar-edit","data-busy":u?"":void 0,onClick:()=>{var v;return(v=f.current)==null?void 0:v.click()},disabled:u,title:"Change logo","aria-label":"Change organization logo",children:[a.image_url?t.jsx("img",{src:a.image_url,alt:a.name}):((w=a.name)==null?void 0:w.slice(0,2).toUpperCase())||"O",t.jsx("span",{className:"w-avatar-veil",children:u?t.jsx(ke,{size:14}):t.jsx(nn,{size:16})})]}),t.jsx("input",{ref:f,type:"file",accept:"image/*",style:{display:"none"},onChange:x}),t.jsxs(lm,{children:[t.jsx(cm,{children:a.name}),t.jsx(dm,{children:a.member_count!=null?`${a.member_count} members`:"Organization settings"})]})]}),t.jsx(nm,{children:t.jsxs(rm,{children:[t.jsx(Da,{$isActive:i==="general",onClick:()=>l("general"),children:t.jsxs(Ua,{children:[t.jsx(Aa,{size:16})," General"]})}),t.jsx(Da,{$isActive:i==="domains",onClick:()=>l("domains"),children:t.jsxs(Ua,{children:[t.jsx(Du,{size:16})," Domains"]})}),t.jsx(Da,{$isActive:i==="members",onClick:()=>l("members"),children:t.jsxs(Ua,{children:[t.jsx(ds,{size:16})," Members"]})}),t.jsx(Da,{$isActive:i==="invitations",onClick:()=>l("invitations"),children:t.jsxs(Ua,{children:[t.jsx(gl,{size:16})," Invitations"]})}),((b=r==null?void 0:r.b2b_settings)==null?void 0:b.custom_org_role_enabled)&&t.jsx(Da,{$isActive:i==="roles",onClick:()=>l("roles"),children:t.jsxs(Ua,{children:[t.jsx(ea,{size:16})," Roles"]})}),((j=r==null?void 0:r.b2b_settings)==null?void 0:j.enterprise_sso_enabled)&&t.jsx(Da,{$isActive:i==="sso",onClick:()=>l("sso"),children:t.jsxs(Ua,{children:[t.jsx(ea,{size:16})," SSO"]})})]})}),t.jsxs(im,{children:[i==="general"&&t.jsx(mm,{organization:a}),i==="domains"&&t.jsx(hm,{organization:a}),i==="members"&&t.jsx(fm,{organization:a}),i==="invitations"&&t.jsx(vm,{organization:a}),i==="roles"&&t.jsx(jm,{organization:a}),i==="sso"&&t.jsx(tm,{organization:a})]}),m&&t.jsxs("div",{className:`w-toast w-toast--contained ${c==="error"?"w-toast--error":"w-toast--success"}`,children:[t.jsx("span",{className:"w-toast-ic",children:c==="error"?t.jsx(Ta,{size:12}):t.jsx(Ye,{size:12})}),t.jsx("span",{className:"w-toast-msg",children:m})]})]})})})}):t.jsx($e,{children:t.jsx(Hi,{children:t.jsx(Hn,{className:"w-items-center w-justify-center",children:t.jsxs("div",{className:"w-empty",children:[t.jsx("span",{className:"w-empty-ic",children:t.jsx(hs,{size:20})}),t.jsx("h4",{children:"No Organization Selected"}),t.jsx(p0,{})]})})})})},i0=({isOpen:e,onClose:a,title:s,showHeader:r,headerContent:i,footerContent:l,customContent:m,children:d,showCloseButton:c})=>t.jsx(Ue,{isOpen:e,onClose:a,children:t.jsx(Ue.Overlay,{children:t.jsxs(Ue.Content,{className:"w-dialog--panel",children:[r&&t.jsx(Ue.Header,{showCloseButton:c,children:i||s}),m||d||t.jsx(r0,{}),l&&t.jsx(Ue.Footer,{children:l})]})})}),$r=({organizationId:e,onSuccess:a,onCancel:s,onCreateOrganization:r})=>t.jsx($e,{children:t.jsx("div",{className:"w-flex w-justify-center w-full",children:t.jsx(e0,{mode:"ws",organizationId:e,onSuccess:a,onCancel:s,onCreateOrganization:r})})}),Or=({isOpen:e,onClose:a,onCreated:s,organizationId:r})=>{const[i,l]=o.useState(!1),[m,d]=o.useState(r),c=()=>{s==null||s(),a==null||a()},p=()=>{l(!0)},u=h=>{var g,x,w;const f=((x=(g=h==null?void 0:h.data)==null?void 0:g.organization)==null?void 0:x.id)??((w=h==null?void 0:h.organization)==null?void 0:w.id)??(h==null?void 0:h.id);f&&d(f),l(!1)};return t.jsx($e,{children:t.jsx(Ue,{isOpen:e,onClose:a,children:t.jsx(Ue.Overlay,{children:t.jsx(Ue.Content,{className:"w-dialog--create",children:i?t.jsx(pn,{onSuccess:u,onCancel:()=>l(!1)}):t.jsx($r,{organizationId:m||r,onSuccess:c,onCancel:a,onCreateOrganization:p})})})})})},ft=(...e)=>e.filter(Boolean).join(" "),km=({className:e,...a})=>t.jsx("div",{className:ft("w-contents",e),...a}),Ui=({className:e,...a})=>t.jsx("div",{className:ft("w-card","w-flex-col","w-full","w-minh-full",e),...a}),Cm=({className:e,...a})=>t.jsx("div",{className:ft("w-tabsbar",e),...a}),Nm=({className:e,...a})=>t.jsx("div",{className:ft("w-flex","w-items-center","w-gap-1","w-tabs",e),...a}),Hs=({$isActive:e,className:a,...s})=>t.jsx("button",{className:ft("w-tab",e&&"w-tab--active",a),...s}),Fs=({className:e,...a})=>t.jsx("span",{className:ft("w-inline","w-gap-2",e),...a}),Sm=({className:e,children:a,...s})=>t.jsx("div",{className:ft("w-tabbody",e),...s,children:t.jsx("div",{className:"w-tabpane",children:a})}),Xs=o.forwardRef(({className:e,...a},s)=>t.jsx("button",{ref:s,className:ft("w-kebab",e),...a}));Xs.displayName="IconButton";const o0=({className:e,...a})=>t.jsx("div",{className:ft("w-sechead",e),...a}),Wi=({className:e,...a})=>t.jsx("div",{className:ft("w-flex","w-items-center","w-justify-between","w-gap-4",e),...a}),Bi=({className:e,...a})=>t.jsx("div",{className:ft("w-grow",e),...a}),Gi=({className:e,...a})=>t.jsx("div",{className:ft("w-flex","w-items-center","w-gap-3","w-none",e),...a}),Zr=({className:e,...a})=>t.jsx("div",{className:ft("w-full",e),...a}),Em=({className:e,...a})=>t.jsx("div",{className:ft("w-page-head",e),...a}),Am=({className:e,...a})=>t.jsx("div",{className:ft("w-grow","w-flex-col","w-gap-1",e),...a}),Mm=({className:e,...a})=>t.jsx("div",{className:ft("w-sec","w-truncate",e),...a}),Rm=({className:e,...a})=>t.jsx("div",{className:ft("w-secsub","w-truncate",e),...a}),qi=({$first:e,className:a,...s})=>t.jsx("div",{className:ft("w-sec",a),...s}),Lm=()=>{var E,A;const{activeWorkspace:e,loading:a,updateWorkspace:s}=Ut(),{deleteWorkspace:r}=ba(),{deployment:i}=_e(),{toast:l}=Ct(),[m,d]=o.useState((e==null?void 0:e.name)||""),[c,p]=o.useState((e==null?void 0:e.description)||""),[u,h]=o.useState({mfa_required:!1,ip_restrictions:!1,allowed_ips:""}),[f,g]=o.useState(!1),[x,w]=o.useState(""),[b,j]=o.useState(!1),[v,k]=o.useState(!1);o.useEffect(()=>{var H;e&&(d(e.name||""),p(e.description||""),h({mfa_required:e.enforce_2fa||!1,ip_restrictions:e.enable_ip_restriction||!1,allowed_ips:((H=e.whitelisted_ips)==null?void 0:H.join(`
106
+ `))||""}))},[e]);const N=async()=>{if(!(!e||f))try{g(!0),await s({name:m,description:c,enforce_2fa:u.mfa_required,enable_ip_restriction:u.ip_restrictions,whitelisted_ips:u.allowed_ips.split(`
107
+ `).filter(H=>H.trim())}),l("Changes saved","info")}catch(H){l(H.message||"Failed to save changes","error")}finally{g(!1)}},_=async()=>{if(!(!e||x!==e.name))try{j(!0),await r(e),l("Workspace deleted","info")}catch{l("Failed to delete workspace","error")}finally{j(!1),w("")}};if(a&&!e)return t.jsx(ke,{});if(!e)return null;const C=(E=i==null?void 0:i.b2b_settings)==null?void 0:E.enforce_mfa_per_workspace_enabled,y=(A=i==null?void 0:i.b2b_settings)==null?void 0:A.ip_allowlist_per_workspace_enabled;return t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"name",children:"Workspace name"}),t.jsx(ye,{id:"name",value:m,onChange:H=>d(H.target.value),onBlur:N,placeholder:"Workspace name",required:!0})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"description",children:"Description"}),t.jsx(ye,{id:"description",as:"textarea",value:c,onChange:H=>p(H.target.value),onBlur:N,placeholder:"Optional description",className:"w-input--area"})]})]}),(C||y)&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(qi,{children:"Security"}),C&&t.jsxs(Wi,{children:[t.jsxs(Bi,{children:[t.jsx("div",{className:"w-sec",children:"Multi-factor authentication"}),t.jsx("p",{className:"w-secsub",children:"Require all workspace members to set up MFA."})]}),t.jsx(Gi,{children:t.jsx(Ha,{checked:u.mfa_required,onChange:()=>{h(H=>({...H,mfa_required:!H.mfa_required})),setTimeout(N,0)}})})]}),y&&t.jsxs(t.Fragment,{children:[t.jsxs(Wi,{children:[t.jsxs(Bi,{children:[t.jsx("div",{className:"w-sec",children:"IP restrictions"}),t.jsx("p",{className:"w-secsub",children:"Only allow access from specific IP addresses."})]}),t.jsx(Gi,{children:t.jsx(Ha,{checked:u.ip_restrictions,onChange:()=>{h(H=>({...H,ip_restrictions:!H.ip_restrictions})),setTimeout(N,0)}})})]}),u.ip_restrictions&&t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"allowed_ips",children:"Allowed IP addresses"}),t.jsx(ye,{id:"allowed_ips",as:"textarea",value:u.allowed_ips,onChange:H=>h(M=>({...M,allowed_ips:H.target.value})),onBlur:N,placeholder:`192.168.1.1
108
+ 10.0.0.0/24`,className:"w-input--area w-mono-sm"})]})]})]}),t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsx(qi,{children:"Danger zone"}),t.jsxs("div",{className:"w-danger",children:[t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:"Delete workspace"}),t.jsx("div",{className:"w-secsub",children:"Once you delete this workspace, there is no going back."})]}),t.jsx(se,{$size:"sm",$outline:!0,$destructive:!0,onClick:()=>{k(!v),w("")},children:v?"Cancel":"Delete workspace"})]}),v&&t.jsxs("div",{className:"w-flex-col w-gap-3",children:[t.jsxs(Ge,{children:[t.jsxs(Ve,{htmlFor:"confirm_workspace_name",children:["Type ",t.jsx("strong",{children:e.name})," to confirm"]}),t.jsx(ye,{id:"confirm_workspace_name",type:"text",value:x,onChange:H=>w(H.target.value),placeholder:e.name})]}),t.jsx(se,{$size:"sm",$destructive:!0,onClick:_,disabled:x!==e.name||b,children:b?t.jsx(ke,{size:12}):"Delete forever"})]})]})]})},Pm=({onClose:e,onSuccess:a,roles:s,triggerRef:r})=>{const i=o.useRef(null),[l,m]=o.useState(""),[d,c]=o.useState(null),[p,u]=o.useState(!1),[h,f]=o.useState(!1),{toast:g}=Ct(),{inviteMember:x}=Ut(),w=bt({contentRef:i,triggerRef:r??{current:null},isOpen:h,minWidth:360,defaultMaxHeight:320}),b=s.map(k=>({value:k.id,label:k.name}));o.useEffect(()=>{f(!0);const k=C=>{i.current&&!i.current.contains(C.target)&&(e==null||e())},N=C=>{C.key==="Escape"&&(e==null||e())},_=setTimeout(()=>{document.addEventListener("mousedown",k),document.addEventListener("keydown",N)},100);return()=>{clearTimeout(_),document.removeEventListener("mousedown",k),document.removeEventListener("keydown",N)}},[e]);const j=k=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k),v=async()=>{const k=l.trim().toLowerCase();if(!(!k||!d)){if(!j(k)){g("Please enter a valid email address","error");return}if(k.length>320){g("Email address is too long","error");return}u(!0);try{await x({email:k,workspaceRoleId:d.id}),a==null||a()}catch(N){const _=N.message||"Failed to send invitation. Please try again.";g(_,"error")}finally{u(!1)}}};return h?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,maxHeight:w!=null&&w.maxHeight?`${w.maxHeight}px`:void 0,visibility:w?"visible":"hidden"},onClick:k=>k.stopPropagation(),role:"dialog","aria-labelledby":"invite-workspace-member-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"invite-workspace-member-title",children:"Invite member"}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Email Address"}),t.jsx(ye,{type:"email",placeholder:"colleague@company.com",value:l,onChange:k=>m(k.target.value),autoFocus:!0,"aria-label":"Email address for workspace invitation","aria-describedby":"workspace-email-help"})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{children:"Role"}),t.jsx(mn,{options:b,value:d==null?void 0:d.id,onChange:k=>c(s.find(N=>N.id===k)),placeholder:"Select a role","aria-label":"Select role for invited workspace member"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:v,disabled:!l||!d||p,children:p?t.jsx(ke,{size:14}):"Send invite"})]})]}):null},$m=()=>{const{activeWorkspace:e,getMembers:a,getRoles:s,removeMember:r,addMemberRole:i,removeMemberRole:l}=Ut(),{session:m}=ot(),{toast:d}=Ct(),[c,p]=o.useState(""),[u,h]=o.useState(1),[f]=o.useState(10),[g,x]=o.useState(""),[w,b]=o.useState(!1),j=o.useRef(null);o.useEffect(()=>{const M=setTimeout(()=>{x(c),h(1)},500);return()=>clearTimeout(M)},[c]);const{data:v,mutate:k}=Se(e?`wacht-api-workspaces:${e.id}:members:${u}:${f}:${g}`:null,()=>a==null?void 0:a({page:u,limit:f,search:g}),{keepPreviousData:!0}),N=(v==null?void 0:v.data)||[],_=(v==null?void 0:v.meta)||{total:0,limit:10},C=Math.ceil(_.total/(_.limit||10)),{data:y=[]}=Se(e?`wacht-api-workspaces:${e.id}:roles`:null,()=>s()||[]),E=y,A=async(M,T,P)=>{try{P?(await l(M,T),d("Role removed","info")):(await i(M,T),d("Role added","info")),k()}catch{d("Failed to update role","error")}},H=async M=>{try{await r(M),d("Member removed","info"),k()}catch{d("Failed to remove member","error")}};return v?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-toolbar",children:[t.jsx(Yc,{value:c,onChange:p,placeholder:"Search members..."}),t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[_.total>0&&t.jsxs("div",{className:"w-text-muted w-secsub",children:[_.total," member",_.total!==1?"s":""]}),t.jsx(se,{ref:j,onClick:()=>b(!0),$size:"sm",children:"Invite"})]})]}),w&&t.jsx(Pm,{onClose:()=>b(!1),onSuccess:()=>{k(),b(!1)},roles:E,triggerRef:j}),N.length===0?t.jsx(Nt,{title:c?"No members match":"No members yet",description:"Members added to the organization can be invited here."}):t.jsx(t.Fragment,{children:t.jsx(Zr,{children:t.jsxs(Zt,{children:[t.jsx(Ht,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Member"}),t.jsx(Fe,{children:"Joined"}),t.jsx(Fe,{children:"Role"})]})}),t.jsx(Ft,{children:N.map(M=>t.jsxs(it,{children:[t.jsx(Xe,{children:t.jsx(Om,{member:M,session:m})}),t.jsx(Xe,{children:new Date(M.created_at).toLocaleDateString()}),t.jsx(Tt,{children:t.jsx(Zm,{member:M,roles:E,onToggle:(T,P)=>A(M.id,T,P),onRemove:()=>H(M.id)})})]},M.id))})]})})}),C>1&&t.jsxs("div",{className:"w-flex w-items-center w-justify-center w-gap-4",children:[t.jsx(se,{onClick:()=>h(M=>Math.max(1,M-1)),disabled:u===1,$size:"sm",children:"Previous"}),t.jsxs("span",{className:"w-secsub",children:[u," / ",C]}),t.jsx(se,{onClick:()=>h(M=>Math.min(C,M+1)),disabled:u===C,$size:"sm",children:"Next"})]})]}):t.jsx(ke,{})},Om=({member:e,session:a,subtitle:s})=>{var m,d,c;const r=e.public_user_data||e.user,i=(r==null?void 0:r.id)===((m=a==null?void 0:a.active_signin)==null?void 0:m.user_id),l=(p="",u="")=>`${p[0]||""}${u[0]||""} `.toUpperCase();return t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[t.jsx("div",{className:"w-avatar",children:r!=null&&r.profile_picture_url?t.jsx("img",{src:r.profile_picture_url,alt:"Avatar"}):l(r==null?void 0:r.first_name,r==null?void 0:r.last_name)||"?"}),t.jsxs("div",{children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx("span",{className:"w-sec",children:r?`${r.first_name||""} ${r.last_name||""} `.trim()||((d=r.primary_email_address)==null?void 0:d.email):"Unknown"}),i&&t.jsx("span",{className:"w-pill",children:"You"})]}),t.jsxs("div",{className:"w-flex w-wrap w-gap-2 w-secsub",children:[t.jsx("span",{children:(c=r==null?void 0:r.primary_email_address)==null?void 0:c.email}),s&&t.jsxs("span",{className:"w-text-muted",children:["• ",s]})]})]})]})},Zm=({member:e,roles:a,onToggle:s,onRemove:r})=>{var m;const i=e.roles||[],l=d=>i.some(c=>c.id===d);return t.jsxs(ks,{children:[t.jsx(Ns,{children:t.jsxs(se,{$outline:!0,$size:"sm",className:"w-justify-between w-rolepick-btn",children:[i.length>0?(m=i==null?void 0:i[0])==null?void 0:m.name:"No role"," ",t.jsx(Wt,{size:14})]})}),t.jsxs(Cs,{children:[a.map(d=>{const c=l(d.id);return t.jsx(ta,{onClick:()=>s(d.id,c),children:t.jsxs("div",{className:"w-flex w-justify-between w-full w-gap-3",children:[t.jsx("span",{children:d.name}),c&&t.jsx(Ye,{size:14,className:"w-text-success"})]})},d.id)}),t.jsx(qc,{}),t.jsx(ta,{$destructive:!0,onClick:r,children:t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsx(br,{size:14})," Remove Member"]})})]})]})},Hm=({onClose:e,onSuccess:a,roles:s,createInvitation:r,triggerRef:i})=>{const l=o.useRef(null),[m,d]=o.useState(""),[c,p]=o.useState(s[0]||null),[u,h]=o.useState(!1),[f,g]=o.useState(!1),{toast:x}=Ct(),w=bt({contentRef:l,triggerRef:i,isOpen:f,minWidth:360,defaultMaxHeight:320}),b=s.map(k=>({value:k.id,label:k.name})),j=k=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k),v=async()=>{const k=m.trim().toLowerCase();if(!(!k||!c)){if(!j(k)){x("Please enter a valid email address","error");return}if(k.length>320){x("Email address is too long","error");return}h(!0);try{await r({email:k,role_id:c.id}),a()}catch(N){x(N.message||"Failed to send invitation. Please try again.","error")}finally{h(!1)}}};return o.useEffect(()=>{g(!0);const k=_=>{l.current&&!l.current.contains(_.target)&&(e==null||e())},N=_=>{_.key==="Escape"&&(e==null||e())};return document.addEventListener("mousedown",k),document.addEventListener("keydown",N),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",N)}},[e]),f?t.jsxs("div",{ref:l,className:"w-pop w-pop--wide w-pop-body",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:k=>k.stopPropagation(),role:"dialog","aria-labelledby":"invite-member-title","aria-modal":"true",children:[t.jsx("div",{className:"w-pop-title",id:"invite-member-title",children:"Invite member"}),t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",children:"Email"}),t.jsx(ye,{type:"email",placeholder:"colleague@company.com",value:m,onChange:k=>d(k.target.value),onKeyDown:k=>{k.key==="Enter"&&m&&c&&v()},autoFocus:!0,"aria-label":"Email address for invitation"})]}),t.jsxs("div",{className:"w-field",children:[t.jsx("label",{className:"w-label",children:"Role"}),t.jsx(mn,{options:b,value:c==null?void 0:c.id,onChange:k=>p(s.find(N=>N.id===k)),placeholder:"Select a role","aria-label":"Select role for invited member"})]}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx(se,{$size:"sm",$outline:!0,$fullWidth:!0,onClick:e,children:"Cancel"}),t.jsx(se,{$size:"sm",$fullWidth:!0,onClick:v,disabled:!m||!c||u,children:u?t.jsx(ke,{size:12}):"Send invite"})]})]}):null},Fm=()=>{const{activeWorkspace:e,loading:a,getRoles:s,getInvitations:r,inviteMember:i,discardInvitation:l,resendInvitation:m}=Ut(),{toast:d}=Ct(),[c,p]=o.useState(!0),[u,h]=o.useState(!0),[f,g]=o.useState([]),[x,w]=o.useState([]),[b,j]=o.useState(!1),v=o.useRef(null),k=async()=>{if(e){p(!0),h(!0);try{const[C,y]=await Promise.all([s(),r()]);w(C),g(y)}catch{}finally{p(!1),h(!1)}}};o.useEffect(()=>{k()},[e==null?void 0:e.id]);const N=async C=>{try{await l(C),k(),d("Invitation cancelled","info")}catch{d("Failed to cancel invitation","error")}},_=async C=>{try{await m(C),k(),d("Invitation resent","info")}catch{d("Failed to resend invitation","error")}};return a||c||u?t.jsx(ke,{}):t.jsxs(t.Fragment,{children:[t.jsxs(o0,{children:[t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:"Invitations"}),t.jsx("div",{className:"w-secsub",children:"Pending invites to join this workspace."})]}),t.jsx(se,{ref:v,onClick:()=>j(!0),$size:"sm",children:"Invite"})]}),b&&t.jsx(Hm,{onClose:()=>j(!1),onSuccess:()=>{k(),j(!1),d("Invitation sent","info")},roles:x,createInvitation:C=>i({email:C.email,workspaceRoleId:C.role_id}),triggerRef:v}),f.length===0?t.jsx(Nt,{title:"No pending invitations",description:"Invite members to your workspace."}):t.jsx(t.Fragment,{children:t.jsx(Zr,{children:t.jsxs(Zt,{children:[t.jsx(Ht,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Email"}),t.jsx(Fe,{children:"Role"}),t.jsx(Fe,{children:"Invited"}),t.jsx(Fe,{})]})}),t.jsx(Ft,{children:f.map(C=>{var y,E;return t.jsxs(it,{children:[t.jsx(Xe,{children:C.email}),t.jsx(Xe,{children:((y=C.initial_workspace_role)==null?void 0:y.name)||((E=C.initial_organization_role)==null?void 0:E.name)||"No role"}),t.jsx(Xe,{children:new Date(C.created_at).toLocaleDateString()}),t.jsx(Tt,{children:t.jsx(Tm,{onResend:()=>_(C.id),onCancel:()=>N(C.id)})})]},C.id)})})]})})})]})},Tm=({onResend:e,onCancel:a})=>t.jsxs(ks,{children:[t.jsx(Ns,{children:t.jsx(Xs,{children:"•••"})}),t.jsxs(Cs,{children:[t.jsxs(ta,{onClick:e,children:[t.jsx(Ol,{size:16})," Resend"]}),t.jsxs(ta,{$destructive:!0,onClick:a,children:[t.jsx(br,{size:16})," Cancel"]})]})]}),Ki=({onClose:e,onSuccess:a,role:s,triggerRef:r})=>{var C,y;const i=o.useRef(null),[l,m]=o.useState((s==null?void 0:s.name)||""),[d,c]=o.useState((s==null?void 0:s.permissions)||[]),[p,u]=o.useState(!1),[h,f]=o.useState(!1),{deployment:g}=_e(),{toast:x}=Ct(),w=bt({contentRef:i,triggerRef:r??{current:null},isOpen:h,minWidth:400,defaultMaxHeight:500}),b=!!s,j=((C=g==null?void 0:g.b2b_settings)==null?void 0:C.workspace_permissions)||((y=g==null?void 0:g.b2b_settings)==null?void 0:y.organization_permissions)||[],v=Array.isArray(j)?j.map(E=>({value:E,label:E})):[];o.useEffect(()=>{f(!0);const E=M=>{i.current&&!i.current.contains(M.target)&&(e==null||e())},A=M=>{M.key==="Escape"&&(e==null||e())},H=setTimeout(()=>{document.addEventListener("mousedown",E),document.addEventListener("keydown",A)},100);return()=>{clearTimeout(H),document.removeEventListener("mousedown",E),document.removeEventListener("keydown",A)}},[e]);const k=E=>E.trim().replace(/[<>"'&]/g,""),N=E=>E.length>=2&&E.length<=50&&/^[a-zA-Z0-9\s_-]+$/.test(E),_=async()=>{const E=k(l);if(!E){x("Please enter a role name","error");return}if(!N(E)){x("Role name must be 2–50 characters, letters/numbers/spaces only.","error");return}if(d.length===0){x("Please select at least one permission","error");return}u(!0);try{const A={id:s==null?void 0:s.id,name:E,permissions:d};a==null||a(A)}catch(A){x(A.message||`Failed to ${b?"update":"create"} role. Please try again.`,"error")}finally{u(!1)}};return h?t.jsxs("div",{ref:i,className:"w-pop w-pop--wide",style:{position:"fixed",zIndex:1001,top:(w==null?void 0:w.top)!==void 0?`${w.top}px`:void 0,bottom:(w==null?void 0:w.bottom)!==void 0?`${w.bottom}px`:void 0,left:(w==null?void 0:w.left)!==void 0?`${w.left}px`:void 0,right:(w==null?void 0:w.right)!==void 0?`${w.right}px`:void 0,visibility:w?"visible":"hidden"},onClick:E=>E.stopPropagation(),role:"dialog","aria-labelledby":"role-dialog-title","aria-modal":"true",children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",id:"role-dialog-title",children:b?"Edit role":"New role"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Name"}),t.jsx(ye,{type:"text",placeholder:"e.g. Admin, Editor, Viewer",value:l,onChange:E=>m(E.target.value),autoFocus:!0,"aria-label":"Role name"})]}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Permissions"}),t.jsx(Xc,{options:v,value:d,onChange:c,placeholder:"Select permissions","aria-label":"Select permissions for role"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:_,disabled:!l||p,children:p?t.jsx(ke,{size:12}):b?"Update":"Create"})]})]}):null},Im=()=>{var N;const{activeWorkspace:e,loading:a,getRoles:s,createRole:r,deleteRole:i}=Ut(),{deployment:l}=_e(),{toast:m}=Ct(),[d,c]=o.useState({isOpen:!1}),[p,u]=o.useState(null),[h,f]=o.useState(null),g=o.useRef(null),x=o.useRef(new Map),{data:w=[],isLoading:b,mutate:j}=Se(e?`wacht-api-workspaces:${e.id}:roles`:null,()=>s()||[]),v=async _=>{try{await r(_.name,_.permissions||[]),m("Role saved successfully","info"),c({isOpen:!1}),j()}catch{m("Failed to save role","error")}},k=async _=>{try{await i(_),m("Role deleted","info"),u(null),j()}catch{m("Failed to delete role","error")}};return a||b?t.jsx(ke,{}):t.jsxs(t.Fragment,{children:[t.jsxs(o0,{children:[t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec",children:"Roles"}),t.jsx("div",{className:"w-secsub",children:"Define granular permissions for this workspace."})]}),((N=l==null?void 0:l.b2b_settings)==null?void 0:N.custom_workspace_role_enabled)&&t.jsx(se,{ref:g,onClick:()=>c({isOpen:!0,triggerElement:g.current}),$size:"sm",children:"Add role"})]}),d.isOpen&&!d.role&&t.jsx(Ki,{triggerRef:{current:d.triggerElement||null},onClose:()=>c({isOpen:!1}),onSuccess:v}),w.length===0?t.jsx(Nt,{title:"No roles yet",description:"Create workspace-specific roles to manage access."}):t.jsx(t.Fragment,{children:t.jsx(Zr,{children:t.jsxs(Zt,{children:[t.jsx(Ht,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Role"}),t.jsx(Fe,{children:"Permissions"}),t.jsx(Fe,{})]})}),t.jsx(Ft,{children:w.map(_=>{var C;return t.jsxs(it,{children:[t.jsx(Xe,{children:t.jsxs("div",{className:"w-flex w-items-center w-gap-2 w-wrap",children:[t.jsx("span",{className:"w-sec",children:_.name}),!pr(_)&&t.jsx("span",{className:"w-pill",children:"Default"})]})}),t.jsx(Xe,{children:t.jsxs("span",{className:"w-text-secondary",children:[(C=_.permissions)==null?void 0:C.join(", "),!pr(_)&&" • Cannot be edited or deleted"]})}),t.jsx(Tt,{children:t.jsx(Vm,{role:_,onEdit:y=>c({isOpen:!0,role:_,triggerElement:y}),onDelete:()=>u(_.id),open:h===_.id,onOpenChange:y=>f(y?_.id:null),dropdownButtonRefs:x})})]},_.id)})})]})})}),p&&t.jsx(Ja,{title:"Delete role?",description:"Are you sure? This will remove the role from all workspace members.",onConfirm:()=>{const _=w.find(C=>C.id===p);_&&k(_)},onCancel:()=>u(null)}),d.isOpen&&d.role&&t.jsx(Ki,{role:d.role,triggerRef:{current:d.triggerElement||null},onClose:()=>c({isOpen:!1}),onSuccess:v})]})},Vm=({role:e,onEdit:a,onDelete:s,open:r,onOpenChange:i,dropdownButtonRefs:l})=>pr(e)?t.jsxs(ks,{open:r,openChange:i,children:[t.jsx(Ns,{children:t.jsx(Xs,{ref:d=>{d&&l.current.set(e.id,d)},children:"•••"})}),t.jsxs(Cs,{children:[t.jsx(ta,{onClick:()=>a(l.current.get(e.id)??null),children:"Edit Role"}),t.jsxs(ta,{$destructive:!0,onClick:s,children:[t.jsx(br,{size:16})," Remove Role"]})]})]}):t.jsx(Xs,{disabled:!0,title:"Deployment roles cannot be edited","aria-label":"Deployment roles cannot be edited",children:"•••"}),zm=e=>(e||"").slice(0,2).toUpperCase()||"W",l0=()=>{var b,j;const{activeWorkspace:e,loading:a,updateWorkspace:s}=Ut(),{deployment:r}=_e(),[i,l]=o.useState("general"),[m,d]=o.useState(null),[c,p]=o.useState("info"),[u,h]=o.useState(!1),f=o.useRef(null),g=o.useCallback((v,k="info")=>{d(v),p(k),setTimeout(()=>d(null),3e3)},[]),x=async v=>{var N;const k=(N=v.target.files)==null?void 0:N[0];if(k){if(k.size>2*1024*1024){g("File size cannot exceed 2MB","error");return}if(!k.type.startsWith("image/")){g("Please select a valid image file","error");return}try{h(!0),await s({image:k}),g("Logo updated","info")}catch(_){g((_==null?void 0:_.message)||"Failed to update logo","error")}finally{h(!1),f.current&&(f.current.value="")}}};if(a&&!e)return t.jsx($e,{children:t.jsx(Ui,{className:"w-items-center w-justify-center",children:t.jsx(ke,{})})});if(!e)return null;const w=(b=e.organization)==null?void 0:b.name;return t.jsx($e,{children:t.jsx(km,{children:t.jsx(Mr.Provider,{value:{screen:null,setScreen:()=>{},toast:g},children:t.jsxs(Ui,{className:"w-relative",children:[t.jsxs(Em,{children:[t.jsxs("button",{type:"button",className:"w-avatar w-avatar--lg w-avatar-edit",onClick:()=>{var v;return(v=f.current)==null?void 0:v.click()},disabled:u,"data-busy":u?"":void 0,title:"Change logo","aria-label":"Change workspace logo",children:[e.image_url?t.jsx("img",{src:e.image_url,alt:e.name}):zm(e.name),t.jsx("span",{className:"w-avatar-veil",children:u?t.jsx(ke,{size:14}):t.jsx(nn,{size:16})})]}),t.jsx("input",{ref:f,type:"file",accept:"image/*",className:"w-none",hidden:!0,onChange:x}),t.jsxs(Am,{children:[t.jsx(Mm,{children:e.name}),t.jsx(Rm,{children:w?`${w} · Workspace settings`:"Workspace settings"})]})]}),t.jsx(Cm,{children:t.jsxs(Nm,{children:[t.jsx(Hs,{$isActive:i==="general",onClick:()=>l("general"),children:t.jsxs(Fs,{children:[t.jsx(Aa,{size:14})," General"]})}),t.jsx(Hs,{$isActive:i==="members",onClick:()=>l("members"),children:t.jsxs(Fs,{children:[t.jsx(ds,{size:14})," Members"]})}),t.jsx(Hs,{$isActive:i==="invitations",onClick:()=>l("invitations"),children:t.jsxs(Fs,{children:[t.jsx(Ol,{size:14})," Invitations"]})}),((j=r==null?void 0:r.b2b_settings)==null?void 0:j.custom_workspace_role_enabled)&&t.jsx(Hs,{$isActive:i==="roles",onClick:()=>l("roles"),children:t.jsxs(Fs,{children:[t.jsx(ea,{size:14})," Roles"]})})]})}),t.jsxs(Sm,{children:[i==="general"&&t.jsx(Lm,{}),i==="members"&&t.jsx($m,{}),i==="invitations"&&t.jsx(Fm,{}),i==="roles"&&t.jsx(Im,{})]}),m&&t.jsxs("div",{className:`w-toast w-toast--contained ${c==="error"?"w-toast--error":"w-toast--success"}`,children:[t.jsx("span",{className:"w-toast-ic",children:c==="error"?t.jsx(Ta,{size:14}):t.jsx(Ye,{size:14})}),t.jsx("span",{className:"w-toast-msg",children:m})]})]})})})})},Hr=({isOpen:e,onClose:a,title:s,showHeader:r,headerContent:i,footerContent:l,customContent:m,children:d,showCloseButton:c})=>t.jsx(Ue,{isOpen:e,onClose:a,children:t.jsx(Ue.Overlay,{children:t.jsxs(Ue.Content,{className:"w-dialog--panel",children:[r&&t.jsx(Ue.Header,{showCloseButton:c,children:i||s}),m||d||t.jsx(l0,{}),l&&t.jsx(Ue.Footer,{children:l})]})})}),c0=["organization:admin"],d0=["organization:admin","organization:manage"],u0=["workspace:admin"],m0=["workspace:admin","workspace:manage"];function Fr(e,a){return e!=null&&e.roles?e.roles.some(s=>{var r;return(r=s.permissions)==null?void 0:r.some(i=>a.includes(i))}):!1}function Tr(e){return Fr(e,d0)}function Dm(e){return Fr(e,c0)}function Ir(e,a){return e!=null&&e.roles?e.roles.some(s=>{var r;return(r=s.permissions)==null?void 0:r.some(i=>a.includes(i))}):!1}function Vr(e){return Ir(e,m0)}function Um(e){return Ir(e,u0)}const p0=({showPersonal:e=!0})=>{var Re,ce,B;const[a,s]=o.useState(!1),[r,i]=o.useState(!1),[l,m]=o.useState(new Set),d=o.useRef(null),c=o.useRef(null),p=bt({triggerRef:d,isOpen:a,minWidth:300}),u=Yt(!1),h=Yt(!1),f=Yt(!1),g=Yt(!1),[x,w]=o.useState(null),[b,j]=o.useState(null),v=as(),{organizationMemberships:k,loading:N,refetch:_}=va(),{activeOrganization:C,activeMembership:y,leave:E}=xa(),{activeWorkspace:A,activeMembership:H,leave:M}=Ut(),{workspaces:T,loading:P}=ba(),{session:S,switchOrganization:$,switchWorkspace:Z}=ot(),{deployment:R}=_e(),L=R==null?void 0:R.b2b_settings.organizations_enabled,O=L&&(R==null?void 0:R.b2b_settings.workspaces_enabled),F=R==null?void 0:R.b2b_settings.allow_users_to_create_orgs,W=!y,U=o.useMemo(()=>{var X,oe;return W?{name:"Personal account",image_url:(oe=(X=S==null?void 0:S.active_signin)==null?void 0:X.user)==null?void 0:oe.profile_picture_url,isPersonal:!0}:{name:O&&A?`${C==null?void 0:C.name} / ${A.name}`:(C==null?void 0:C.name)||"",image_url:C==null?void 0:C.image_url,isPersonal:!1}},[W,C,A,S,O]);if(o.useEffect(()=>{C&&O&&m(q=>{if(q.has(C.id))return q;const X=new Set(q);return X.add(C.id),X})},[C,O]),o.useEffect(()=>{if(!a)return;let q=null;const X=setTimeout(()=>{const oe=Ee=>{var D,we;const z=Ee.target;(D=d.current)!=null&&D.contains(z)||(we=c.current)!=null&&we.contains(z)||(s(!1),j(null))};document.addEventListener("mousedown",oe),q=()=>document.removeEventListener("mousedown",oe)},50);return()=>{clearTimeout(X),q==null||q()}},[a]),o.useEffect(()=>{if(!b)return;const q=setTimeout(()=>j(null),5e3);return()=>clearTimeout(q)},[b]),!L)return null;const V=q=>q.split(" ").map(X=>X[0]).join("").toUpperCase().slice(0,2),G=q=>{i(!0),$(q).finally(()=>i(!1))},Y=q=>{i(!0),Z(q).finally(()=>i(!1))},de=q=>{m(X=>{const oe=new Set(X);return oe.has(q)?oe.delete(q):oe.add(q),oe})},fe=()=>{h.open(),s(!1)},ne=()=>{g.open(),s(!1)},ae=async()=>{if(E){j(null);try{await E(),await _(),s(!1)}catch(q){j(q instanceof Error?q.message:"Failed to leave organization")}}},re=async()=>{if(M){j(null);try{await M(),s(!1)}catch(q){j(q instanceof Error?q.message:"Failed to leave workspace")}}},Le=!!((Re=y==null?void 0:y.eligibility_restriction)!=null&&Re.type)&&y.eligibility_restriction.type!=="none",K=!!C&&!Le&&Tr(y),at=!!O&&!!A&&!Le&&Vr(H);return!!!S||N||O&&P?t.jsx($e,{children:t.jsx("div",{className:"w-full w-relative",children:t.jsxs("div",{className:"w-combo",children:[t.jsx("span",{className:"w-skel",style:{width:20,height:20}}),t.jsx("span",{className:"w-skel w-grow",style:{height:12}})]})})}):t.jsx($e,{children:t.jsxs("div",{className:"w-full w-relative",children:[t.jsxs("button",{ref:d,className:"w-orgtrigger","data-open":a?"":void 0,onClick:()=>{s(!a),a||j(null)},disabled:r,children:[t.jsx("span",{className:`w-avatar w-avatar--sm${U.isPersonal,""}`,children:U.image_url?t.jsx("img",{src:U.image_url,alt:U.name}):U.isPersonal?t.jsx(fs,{size:11}):V(U.name)}),t.jsx("span",{className:"w-grow w-truncate",children:U.name}),t.jsx(Zu,{size:13})]}),typeof window<"u"&&tn.createPortal(t.jsxs("div",{ref:c,className:"wacht-root w-menu w-flex-col",style:{position:"fixed",width:300,maxWidth:"calc(100vw - 16px)",maxHeight:p!=null&&p.maxHeight?`${p.maxHeight}px`:420,padding:0,zIndex:99999,top:(p==null?void 0:p.top)!==void 0?`${p.top}px`:void 0,bottom:(p==null?void 0:p.bottom)!==void 0?`${p.bottom}px`:void 0,left:(p==null?void 0:p.left)!==void 0?`${p.left}px`:void 0,right:(p==null?void 0:p.right)!==void 0?`${p.right}px`:void 0,visibility:p&&a?"visible":"hidden",opacity:a&&p?1:0,transform:a?"translateY(0)":"translateY(-4px)",pointerEvents:a?"auto":"none",transition:`opacity 0.15s ease, transform 0.15s ease, visibility 0s linear ${a?"0s":"0.15s"}`,...v},children:[b&&t.jsxs("div",{className:"w-banner w-banner--error w-switch-banner",children:[t.jsx(Ra,{size:13}),t.jsx("span",{className:"w-banner-txt w-text-error",children:b})]}),t.jsx("div",{className:"w-grow w-switch-body",children:N||P?t.jsx(t.Fragment,{children:[1,2,3].map(q=>t.jsxs("div",{className:"w-flex w-items-center w-gap-3",style:{padding:"0 8px",height:34},children:[t.jsx("span",{className:"w-skel",style:{width:22,height:22}}),t.jsx("span",{className:"w-skel",style:{width:q===2?"60%":"80%",height:11}})]},q))}):t.jsxs(t.Fragment,{children:[e&&t.jsxs("button",{className:"w-menu-item",onClick:()=>{W||G()},disabled:r||W,children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:(B=(ce=S==null?void 0:S.active_signin)==null?void 0:ce.user)!=null&&B.profile_picture_url?t.jsx("img",{src:S.active_signin.user.profile_picture_url,alt:"Personal"}):t.jsx(fs,{size:12})}),t.jsx("span",{className:"w-grow w-truncate",children:"Personal account"}),W&&t.jsx(Ye,{size:13,className:"w-text-primary w-none"})]}),((k==null?void 0:k.length)??0)>0&&t.jsxs(t.Fragment,{children:[t.jsx("hr",{className:"w-hr"}),t.jsx("div",{className:"w-menu-label",children:"Organizations"})]}),k==null?void 0:k.map(q=>{var we,ge;const X=q.organization,oe=X.id===(C==null?void 0:C.id),Ee=l.has(X.id),z=O?(T==null?void 0:T.filter(xe=>xe.organization.id===X.id))||[]:[],D=!!((we=q.eligibility_restriction)!=null&&we.type)&&q.eligibility_restriction.type!=="none";return t.jsxs(o.Fragment,{children:[t.jsxs("button",{className:"w-menu-item",onClick:()=>{D||(O?de(X.id):oe||G(X.id))},disabled:r,style:D?{opacity:.55,cursor:"not-allowed"}:void 0,title:(ge=q.eligibility_restriction)==null?void 0:ge.message,children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:X.image_url?t.jsx("img",{src:X.image_url,alt:X.name}):V(X.name)}),t.jsx("span",{className:"w-grow w-truncate",children:X.name}),t.jsxs("span",{className:"w-inline w-gap-1 w-none",children:[D&&t.jsx(Ra,{size:12,className:"w-text-error"}),oe&&K&&t.jsx("span",{className:"w-rowact",role:"button",title:"Organization settings","aria-label":"Organization settings",onClick:xe=>{xe.stopPropagation(),fe()},children:t.jsx(Aa,{size:13})}),oe&&!D&&t.jsx("span",{className:"w-rowact",role:"button",title:"Leave organization","aria-label":"Leave organization",onClick:xe=>{xe.stopPropagation(),ae()},children:t.jsx(Ma,{size:13})}),oe&&!O&&t.jsx(Ye,{size:13,className:"w-text-primary"}),O&&t.jsx(Wt,{size:11,className:"w-text-muted",style:{transition:"transform 0.2s ease",transform:Ee?"rotate(0deg)":"rotate(-90deg)"}})]})]}),O&&Ee&&!D&&t.jsxs("div",{className:"w-switch-nest",children:[z.map(xe=>{var Q,le;const lt=oe&&(A==null?void 0:A.id)===xe.id,Qe=((Q=xe.eligibility_restriction)==null?void 0:Q.type)&&xe.eligibility_restriction.type!=="none";return t.jsxs("button",{className:"w-menu-item",onClick:()=>{!lt&&!Qe&&Y(xe.id)},disabled:r,style:Qe?{opacity:.55,cursor:"not-allowed"}:void 0,title:(le=xe.eligibility_restriction)==null?void 0:le.message,children:[t.jsx("span",{className:"w-avatar w-avatar--sm",children:xe.image_url?t.jsx("img",{src:xe.image_url,alt:xe.name}):V(xe.name).charAt(0)}),t.jsx("span",{className:"w-grow w-truncate",children:xe.name}),t.jsxs("span",{className:"w-inline w-gap-1 w-none",children:[Qe&&t.jsx(Ra,{size:12,className:"w-text-error"}),lt&&at&&t.jsx("span",{className:"w-rowact",role:"button",title:"Workspace settings","aria-label":"Workspace settings",onClick:me=>{me.stopPropagation(),ne()},children:t.jsx(Aa,{size:13})}),lt&&t.jsx("span",{className:"w-rowact",role:"button",title:"Leave workspace","aria-label":"Leave workspace",onClick:me=>{me.stopPropagation(),re()},children:t.jsx(Ma,{size:13})}),lt&&t.jsx(Ye,{size:12,className:"w-text-primary"})]})]},xe.id)}),t.jsxs("button",{className:"w-menu-item w-menu-item--muted",onClick:()=>{w(X.id),f.open()},disabled:r,children:[t.jsx(St,{size:13}),t.jsx("span",{className:"w-grow w-truncate",children:"New workspace"})]})]})]},X.id)}),F&&t.jsxs(t.Fragment,{children:[t.jsx("hr",{className:"w-hr"}),t.jsxs("button",{className:"w-menu-item w-menu-item--muted",onClick:()=>u.open(),disabled:r,children:[t.jsx(St,{size:13}),t.jsx("span",{className:"w-grow w-truncate",children:"New organization"})]})]})]})})]}),document.body),L&&F&&t.jsx(t0,{isOpen:u.isOpen,onClose:u.close,onCreated:_}),t.jsx(i0,{isOpen:h.isOpen,onClose:h.close}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Hr,{isOpen:g.isOpen,onClose:g.close}),t.jsx(Or,{isOpen:f.isOpen,onClose:()=>{f.close(),w(null)},organizationId:x||void 0})]})]})})},h0=o.createContext(void 0),aa=()=>{const e=o.useContext(h0);if(!e)throw new Error("useScreenContext must be used within a ScreenProvider");return e},he=(...e)=>e.filter(Boolean).join(" "),f0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-contents",e),...a}));f0.displayName="TypographyProvider";const hr=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card","w-flex-col","w-full","w-minh-full",e),...a}));hr.displayName="Container";const w0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-tabsbar",e),...a}));w0.displayName="TabsContainer";const g0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-1","w-tabs",e),...a}));g0.displayName="TabsList";const Ca=o.forwardRef(({$isActive:e,className:a,...s},r)=>t.jsx("button",{ref:r,className:he("w-tab",e&&"w-tab--active",a),...s}));Ca.displayName="Tab";const Na=o.forwardRef(({className:e,...a},s)=>t.jsx("span",{ref:s,className:he("w-inline","w-gap-1",e),...a}));Na.displayName="TabIcon";const x0=o.forwardRef(({className:e,children:a,...s},r)=>t.jsx("div",{ref:r,className:he("w-tabbody",e),...s,children:t.jsx("div",{className:"w-tabpane",children:a})}));x0.displayName="TabContent";const Wm=o.forwardRef(({className:e,...a},s)=>t.jsx("button",{ref:s,className:he("w-btn","w-btn--icon",e),...a}));Wm.displayName="IconButton";const v0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-justify-between","w-wrap","w-gap-3",e),...a}));v0.displayName="HeaderCTAContainer";const Bm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-start","w-gap-6",e),...a}));Bm.displayName="ProfileSectionLayout";const Gm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-none",e),...a}));Gm.displayName="ProfileImageContainer";const b0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-vrow",e),...a}));b0.displayName="SecurityItemRow";const y0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-grow",e),...a}));y0.displayName="SecurityItemContent";const j0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-2","w-none",e),...a}));j0.displayName="SecurityItemActions";const zr=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-sechead",e),...a}));zr.displayName="ResponsiveHeaderContainer";const fn=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-full",e),...a}));fn.displayName="DesktopTableContainer";const _0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-gap-3",e),...a}));_0.displayName="FormRow";const qm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-vrow",e),...a}));qm.displayName="ConnectionItemRow";const Km=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-2","w-grow",e),...a}));Km.displayName="ConnectionLeft";const Ym=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-justify-end","w-gap-1","w-none",e),...a}));Ym.displayName="ConnectionRight";const Dr=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-iconbox",e),...a}));Dr.displayName="IconWrapper";const Qm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-wrap","w-gap-2",e),...a}));Qm.displayName="ButtonActions";const k0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-page-head",e),...a}));k0.displayName="PageHeader";const Jm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-avatar",e),...a}));Jm.displayName="PageHeaderAvatar";const C0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-1","w-grow",e),...a}));C0.displayName="PageHeaderInfo";const N0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-sec","w-truncate",e),...a}));N0.displayName="PageHeaderName";const S0=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-secsub","w-truncate",e),...a}));S0.displayName="PageHeaderSub";const Xm=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-gap-1","w-none",e),...a}));Xm.displayName="PageHeaderActions";const e6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-4",e),...a}));e6.displayName="PageContent";const t6=o.forwardRef(({className:e,...a},s)=>t.jsx("section",{ref:s,className:he("w-card",e),...a}));t6.displayName="Card";const a6=o.forwardRef(({className:e,...a},s)=>t.jsx("section",{ref:s,className:he("w-card","w-danger",e),...a}));a6.displayName="DangerCard";const s6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card-head",e),...a}));s6.displayName="CardHeader";const n6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-1","w-grow",e),...a}));n6.displayName="CardTitleBlock";const r6=o.forwardRef(({className:e,...a},s)=>t.jsx("h3",{ref:s,className:he("w-sec",e),...a}));r6.displayName="CardTitle";const i6=o.forwardRef(({className:e,...a},s)=>t.jsx("p",{ref:s,className:he("w-secsub",e),...a}));i6.displayName="CardSubtitle";const o6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-wrap","w-gap-2","w-none",e),...a}));o6.displayName="CardActions";const l6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-hr",e),...a}));l6.displayName="CardDivider";const c6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card-body",e),...a}));c6.displayName="CardBody";const d6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-card-foot",e),...a}));d6.displayName="CardFooter";const u6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-list",e),...a}));u6.displayName="RowList";const m6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-rowitem",e),...a}));m6.displayName="RowItem";const p6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex-col","w-gap-1","w-grow",e),...a}));p6.displayName="RowInfo";const h6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-sec",e),...a}));h6.displayName="RowTitle";const f6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-secsub",e),...a}));f6.displayName="RowSub";const w6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-flex","w-items-center","w-wrap","w-gap-2","w-none",e),...a}));w6.displayName="RowActions";const g6={primary:"w-pill--current",success:"w-pill--success",warning:"w-pill--pending",danger:"w-pill--error",neutral:""},Ka=({$variant:e="neutral",className:a,children:s,...r})=>t.jsxs("span",{className:he("w-pill",g6[e],a),...r,children:[t.jsx("span",{className:"w-dot"}),s]}),x6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-list",e),...a}));x6.displayName="Table";const v6=o.forwardRef(({$cols:e,className:a,style:s,...r},i)=>t.jsx("div",{ref:i,className:he("w-listhead","w-gap-4",a),style:{gridTemplateColumns:e||"1fr 1fr auto",...s},...r}));v6.displayName="TableHead";const b6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:e,...a}));b6.displayName="Th";const y6=o.forwardRef(({$cols:e,className:a,style:s,...r},i)=>t.jsx("div",{ref:i,className:he("w-row","w-gap-4",a),style:{gridTemplateColumns:e||"1fr 1fr auto",...s},...r}));y6.displayName="Tr";const j6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-truncate","w-text-secondary",e),...a}));j6.displayName="Td";const _6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-grid-2",e),...a}));_6.displayName="FieldGrid";const k6=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{ref:s,className:he("w-field",e),...a}));k6.displayName="Field";const C6=o.forwardRef(({className:e,...a},s)=>t.jsx("label",{ref:s,className:he("w-label",e),...a}));C6.displayName="FieldLabel";const N6=()=>{var T,P;const{deployment:e}=_e(),{refetch:a}=ot(),{user:s,updateProfile:r,deleteAccount:i}=ya(),{toast:l}=aa(),[m,d]=o.useState(""),[c,p]=o.useState(""),[u,h]=o.useState(""),[f,g]=o.useState(!1),[x,w]=o.useState(!1),[b,j]=o.useState(!1),[v,k]=o.useState("");o.useEffect(()=>{s&&!f&&(d(s.first_name||""),p(s.last_name||""),h(s.username||""),g(!0))},[s,f]);const N=o.useCallback(async()=>{if(s)try{const S={};m!==s.first_name&&(S.first_name=m),c!==s.last_name&&(S.last_name=c),u!==s.username&&(S.username=u),Object.keys(S).length>0&&await r(S)}catch(S){l(S.message||"Failed to save profile changes","error")}},[s,r,m,c,u,l]),_=S=>{d(S.target.value)},C=S=>{p(S.target.value)},y=S=>{h(S.target.value)},E=()=>{N()},A=()=>{N()},H=()=>{N()};if(!s)return t.jsx("div",{className:"w-loading",children:t.jsx(ke,{})});const M=async()=>{if(!(!s||v!=="delete this account")){j(!0);try{await i(""),l("Account deleted successfully","info"),await a()}catch(S){l(S.message||"Failed to delete account","error")}finally{j(!1),k(""),w(!1)}}};return t.jsxs("div",{className:"w-flex-col w-gap-6",children:[t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsx("p",{className:"w-secsub",children:"Basic information about your profile"}),t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs(_0,{children:[t.jsxs(Ge,{className:"w-grow",children:[t.jsx(Ve,{htmlFor:"firstName",children:"First Name"}),t.jsx(ye,{id:"firstName",type:"text",value:m,onChange:_,onBlur:E,placeholder:"Enter your first name",required:!0})]}),t.jsxs(Ge,{className:"w-grow",children:[t.jsx(Ve,{htmlFor:"lastName",children:"Last Name"}),t.jsx(ye,{id:"lastName",type:"text",value:c,onChange:C,onBlur:A,placeholder:"Enter your last name",required:!0})]})]}),((P=(T=e==null?void 0:e.auth_settings)==null?void 0:T.username)==null?void 0:P.enabled)&&t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"username",children:"Username"}),t.jsx(ye,{id:"username",type:"text",value:u,onChange:y,onBlur:H,placeholder:"Enter your username",required:!0})]})]})]}),t.jsx("div",{className:"w-hr"}),t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("h3",{className:"w-sec",children:"Danger Zone"}),t.jsx("p",{className:"w-secsub",children:"Irreversible and destructive actions"})]}),t.jsxs("div",{className:"w-danger w-flex-col w-items-start",children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-4 w-full",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Delete Account"}),t.jsx("div",{className:"w-secsub",children:"Once you delete your account, there is no going back. Please be certain."})]}),t.jsx(se,{$destructive:!0,$size:"sm",onClick:()=>{x?(w(!1),k("")):w(!0)},children:x?"Cancel":"Delete"})]}),x&&t.jsxs("div",{className:"w-full w-flex-col w-gap-3",children:[t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"confirm_username",children:'Type "delete this account" to confirm'}),t.jsx(ye,{id:"confirm_username",type:"text",value:v,onChange:S=>k(S.target.value),placeholder:"delete this account"})]}),t.jsx(se,{$destructive:!0,$fullWidth:!0,onClick:M,disabled:v!=="delete this account"||b,children:b?t.jsx(ke,{size:12}):"Delete Forever"})]})]})]})]})},Yi=({onClose:e,onAddEmail:a,onAttemptVerification:s,onPrepareVerification:r,existingEmail:i,triggerRef:l})=>{const m=o.useRef(null),[d,c]=o.useState(!1),{toast:p}=aa(),u=bt({contentRef:m,triggerRef:l??{current:null},isOpen:d,minWidth:340,defaultMaxHeight:360});o.useEffect(()=>{c(!0);const _=y=>{m.current&&!m.current.contains(y.target)&&e()},C=y=>{y.key==="Escape"&&e()};return document.addEventListener("mousedown",_),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",C)}},[e]);const[h,f]=o.useState(i?"otp":"email"),[g,x]=o.useState(i||""),[w,b]=o.useState(""),[j,v]=o.useState(!1),k=async()=>{if(!(!g||j)){v(!0);try{await a(g),f("otp")}catch(_){p(_.message||"Failed to add email. Please try again.","error")}finally{v(!1)}}},N=async()=>{v(!0);try{await s(w),e()}catch(_){p(_.message||"Failed to verify email. Check the code and try again.","error")}finally{v(!1)}};return d?t.jsx("div",{ref:m,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(u==null?void 0:u.top)!==void 0?`${u.top}px`:void 0,bottom:(u==null?void 0:u.bottom)!==void 0?`${u.bottom}px`:void 0,left:(u==null?void 0:u.left)!==void 0?`${u.left}px`:void 0,right:(u==null?void 0:u.right)!==void 0?`${u.right}px`:void 0,visibility:u?"visible":"hidden"},onClick:_=>_.stopPropagation(),children:h==="email"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Add email address"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Email address"}),t.jsx(ye,{id:"email-input",type:"email",placeholder:"you@company.com",value:g,onChange:_=>x(_.target.value),onKeyDown:_=>{_.key==="Enter"&&k()},autoFocus:!0})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:k,disabled:!g||j,children:j?"Sending…":"Send code"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[!i&&t.jsxs("button",{type:"button",className:"w-link w-link--muted w-inline w-gap-1",style:{alignSelf:"flex-start",background:"none",border:0,cursor:"pointer"},onClick:()=>f("email"),children:[t.jsx(rn,{size:11})," Back"]}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Verify your email"}),t.jsxs("p",{className:"w-pop-sub",children:["Enter the 6-digit code sent to ",t.jsx("strong",{children:g})]})]}),t.jsx(ja,{onComplete:async _=>b(_),onResend:r,isSubmitting:j})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:N,disabled:w.length<6||j,children:j?"Verifying…":"Verify"})]})]})}):null},S6=()=>{var A,H,M,T;const{deployment:e}=_e(),{toast:a}=aa(),[s,r]=o.useState(""),[i,l]=o.useState(!1),[m,d]=o.useState(null),[c,p]=o.useState(new Set),u=o.useRef(null),h=o.useRef({}),{user:f,createEmailAddress:g,deleteEmailAddress:x,prepareEmailVerification:w,attemptEmailVerification:b,makeEmailPrimary:j}=ya();if(!((H=(A=e==null?void 0:e.auth_settings)==null?void 0:A.email_address)!=null&&H.enabled))return null;const v=(P,S)=>{p($=>{const Z=new Set($);return S?Z.add(P):Z.delete(P),Z})},k=async P=>{v(P,!0);try{await j(P),await f.refetch(),a("Primary email updated","info")}catch(S){a(S.message||"Failed to update primary email","error")}finally{v(P,!1)}},N=async P=>{if(P===(f==null?void 0:f.primary_email_address_id)){a("Cannot delete primary email. Set another email as primary first.","error");return}v(P,!0);try{await x(P),await f.refetch(),a("Email removed","info")}catch(S){a(S.message||"Failed to delete email address. Please try again.","error")}finally{v(P,!1)}},_=async P=>{v(P,!0);try{await w(P),await f.refetch(),d(P)}catch(S){a(S.message||"Failed to send verification","error")}finally{v(P,!1)}},C=(f==null?void 0:f.user_email_addresses)||[],y=P=>P.id===(f==null?void 0:f.primary_email_address_id)?t.jsx(Ka,{$variant:"success",children:"Primary"}):P.verified?t.jsx(Ka,{$variant:"neutral",children:"Backup"}):t.jsx(Ka,{$variant:"warning",children:"Pending verification"}),E=P=>{const S=P.id===(f==null?void 0:f.primary_email_address_id),$=c.has(P.id);return S?t.jsx("span",{className:"w-secsub",children:"Cannot remove"}):t.jsxs("div",{className:"w-actions",children:[P.verified&&t.jsx(se,{$size:"sm",$outline:!0,disabled:$,onClick:()=>k(P.id),children:"Make primary"}),!P.verified&&t.jsx(se,{ref:Z=>{Z&&(h.current[P.id]=Z)},$size:"sm",$outline:!0,disabled:$,onClick:()=>_(P.id),children:"Resend"}),t.jsx(se,{$size:"sm",$destructive:!0,disabled:$,onClick:()=>N(P.id),children:$?t.jsx(ke,{size:12}):"Remove"})]})};return t.jsxs(t.Fragment,{children:[t.jsxs(zr,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Email addresses"}),t.jsx("div",{className:"w-secsub",children:"Sign in and receive notifications at these addresses."})]}),t.jsxs("div",{className:"w-none w-relative",children:[t.jsx(se,{ref:u,$size:"sm",onClick:()=>l(!0),children:"Add email"}),i&&t.jsx(Yi,{triggerRef:u,onClose:()=>l(!1),onAddEmail:async P=>{const S=await g(P);r(S.data.id),await w(S.data.id),f.refetch()},onPrepareVerification:async()=>{await w(s),f.refetch()},onAttemptVerification:async P=>{await b(s,P),f.refetch(),l(!1),r(""),a("Email added and verified","info")}})]})]}),C.length?t.jsx(t.Fragment,{children:t.jsx(fn,{children:t.jsxs(Zt,{children:[t.jsx(Ht,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Email address"}),t.jsx(Fe,{children:"Status"}),t.jsx(Fe,{})]})}),t.jsx(Ft,{children:C.map(P=>t.jsxs(it,{children:[t.jsx(Xe,{children:P.email}),t.jsx(Xe,{children:y(P)}),t.jsx(Tt,{children:E(P)})]},P.id))})]})})}):t.jsx(Nt,{title:"No email addresses",description:"Add an email address to get started."}),m&&t.jsx(Yi,{existingEmail:(T=(M=f==null?void 0:f.user_email_addresses)==null?void 0:M.find(P=>P.id===m))==null?void 0:T.email,triggerRef:{current:h.current[m]},onClose:()=>d(null),onAddEmail:async()=>{},onPrepareVerification:async()=>{await w(m),f.refetch()},onAttemptVerification:async P=>{await b(m,P),f.refetch(),d(null),a("Email verified","info")}})]})},Qi=({onClose:e,onAddPhone:a,onAttemptVerification:s,existingPhone:r,onPrepareVerification:i,triggerRef:l})=>{var y;const m=o.useRef(null),[d,c]=o.useState(!1),{toast:p}=aa(),u=bt({contentRef:m,triggerRef:l??{current:null},isOpen:d,minWidth:340,defaultMaxHeight:360});o.useEffect(()=>{c(!0);const E=H=>{m.current&&!m.current.contains(H.target)&&e()},A=H=>{H.key==="Escape"&&e()};return document.addEventListener("mousedown",E),document.addEventListener("keydown",A),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("keydown",A)}},[e]);const[h,f]=o.useState(r?"otp":"phone"),[g,x]=o.useState((r==null?void 0:r.replace(/^\+\d+/,""))||""),[w,b]=o.useState((y=Intl.DateTimeFormat().resolvedOptions().locale.split("-"))==null?void 0:y.pop()),[j,v]=o.useState(""),[k,N]=o.useState(!1),_=async()=>{if(!(!g||k)){N(!0);try{await a(g,w||""),f("otp")}catch(E){p(E.message||"Failed to add phone number. Please try again.","error")}finally{N(!1)}}},C=async()=>{N(!0);try{await s(j),e()}catch(E){p(E.message||"Failed to verify phone. Check the code and try again.","error")}finally{N(!1)}};return d?t.jsx("div",{ref:m,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(u==null?void 0:u.top)!==void 0?`${u.top}px`:void 0,bottom:(u==null?void 0:u.bottom)!==void 0?`${u.bottom}px`:void 0,left:(u==null?void 0:u.left)!==void 0?`${u.left}px`:void 0,right:(u==null?void 0:u.right)!==void 0?`${u.right}px`:void 0,visibility:u?"visible":"hidden"},onClick:E=>E.stopPropagation(),children:h==="phone"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Add phone number"}),t.jsxs("label",{className:"w-field",children:[t.jsx("span",{className:"w-label",children:"Phone number"}),t.jsx(js,{value:g,onChange:E=>x(E.target.value),error:"",countryCode:w,setCountryCode:b})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:_,disabled:!g||k,children:k?"Sending…":"Send code"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[!r&&t.jsxs("button",{type:"button",className:"w-link w-link--muted w-inline w-gap-1",style:{alignSelf:"flex-start",background:"none",border:0,cursor:"pointer"},onClick:()=>f("phone"),children:[t.jsx(rn,{size:11})," Back"]}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Verify phone number"}),t.jsxs("p",{className:"w-pop-sub",children:["Enter the 6-digit code sent to ",t.jsx("strong",{children:r||g})]})]}),t.jsx(ja,{onComplete:E=>v(E),onResend:async()=>i(),isSubmitting:k})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{type:"button",className:"w-btn w-btn--ghost w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{type:"button",className:"w-btn w-btn--primary w-btn--sm",onClick:C,disabled:j.length!==6||k,children:k?"Verifying…":"Verify"})]})]})}):null},E6=()=>{var H,M,T,P;const{deployment:e}=_e(),{toast:a}=aa(),[s,r]=o.useState(""),[i,l]=o.useState(!1),[m,d]=o.useState(null),[c,p]=o.useState(new Set),u=o.useRef(null),h=o.useRef({}),{user:f,createPhoneNumber:g,deletePhoneNumber:x,preparePhoneVerification:w,attemptPhoneVerification:b,makePhonePrimary:j}=ya();if(!((M=(H=e==null?void 0:e.auth_settings)==null?void 0:H.phone_number)!=null&&M.enabled))return null;const v=(S,$)=>{p(Z=>{const R=new Set(Z);return $?R.add(S):R.delete(S),R})},k=S=>{const $=qs.find(Z=>Z.dialCode===S);return($==null?void 0:$.flag)||"🌍"},N=async S=>{v(S,!0);try{await j(S),await f.refetch(),a("Primary phone updated","info")}catch($){a($.message||"Failed to update primary phone","error")}finally{v(S,!1)}},_=async S=>{if(S===(f==null?void 0:f.primary_phone_number_id)){a("Cannot delete primary phone. Set another phone as primary first.","error");return}v(S,!0);try{await x(S),await f.refetch(),a("Phone removed","info")}catch($){a($.message||"Failed to delete phone. Please try again.","error")}finally{v(S,!1)}},C=async S=>{v(S,!0);try{await w(S),await f.refetch(),d(S)}catch($){a($.message||"Failed to send verification","error")}finally{v(S,!1)}},y=(f==null?void 0:f.user_phone_numbers)||[],E=S=>S.id===(f==null?void 0:f.primary_phone_number_id)?t.jsx(Ka,{$variant:"success",children:"Primary"}):S.verified?t.jsx(Ka,{$variant:"neutral",children:"Backup"}):t.jsx(Ka,{$variant:"warning",children:"Pending verification"}),A=S=>{const $=S.id===(f==null?void 0:f.primary_phone_number_id),Z=c.has(S.id);return $?t.jsx("span",{className:"w-secsub",children:"Cannot remove"}):t.jsxs("div",{className:"w-actions",children:[S.verified&&t.jsx(se,{$size:"sm",$outline:!0,disabled:Z,onClick:()=>N(S.id),children:"Make primary"}),!S.verified&&t.jsx(se,{ref:R=>{R&&(h.current[S.id]=R)},$size:"sm",$outline:!0,disabled:Z,onClick:()=>C(S.id),children:"Resend"}),t.jsx(se,{$size:"sm",$destructive:!0,disabled:Z,onClick:()=>_(S.id),children:Z?t.jsx(ke,{size:12}):"Remove"})]})};return t.jsxs(t.Fragment,{children:[t.jsxs(zr,{children:[t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Phone numbers"}),t.jsx("div",{className:"w-secsub",children:"Used for sign-in and two-factor authentication."})]}),t.jsxs("div",{className:"w-none w-relative",children:[t.jsx(se,{ref:u,$size:"sm",onClick:()=>l(!0),children:"Add phone"}),i&&t.jsx(Qi,{triggerRef:u,onClose:()=>l(!1),onAddPhone:async(S,$)=>{const Z=await g(S,$);r(Z.data.id),await w(Z.data.id)},onPrepareVerification:async()=>{await w(s),f.refetch()},onAttemptVerification:async S=>{await b(s,S),f.refetch(),l(!1),r(""),a("Phone added and verified","info")}}),m&&t.jsx(Qi,{existingPhone:(P=(T=f==null?void 0:f.user_phone_numbers)==null?void 0:T.find(S=>S.id===m))==null?void 0:P.phone_number,triggerRef:{current:h.current[m]},onClose:()=>d(null),onAddPhone:async()=>{},onPrepareVerification:async()=>{await w(m),f.refetch()},onAttemptVerification:async S=>{await b(m,S),f.refetch(),d(null),a("Phone verified","info")}})]})]}),y.length?t.jsx(t.Fragment,{children:t.jsx(fn,{children:t.jsxs(Zt,{children:[t.jsx(Ht,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Phone number"}),t.jsx(Fe,{children:"Status"}),t.jsx(Fe,{})]})}),t.jsx(Ft,{children:y.map(S=>t.jsxs(it,{children:[t.jsx(Xe,{children:t.jsxs("span",{className:"w-inline w-gap-2",children:[t.jsx("span",{children:k(S.country_code)}),t.jsx("span",{className:"w-text-secondary",children:S.country_code}),t.jsx("span",{children:S.phone_number})]})}),t.jsx(Xe,{children:E(S)}),t.jsx(Tt,{children:A(S)})]},S.id))})]})})}):t.jsx(Nt,{title:"No phone numbers",description:"Add a phone number to get started."})]})},A6=e=>t.jsxs("svg",{width:"800px",height:"800px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"none",...e,children:[t.jsx("path",{fill:"#F35325",d:"M1 1h6.5v6.5H1V1z"}),t.jsx("path",{fill:"#81BC06",d:"M8.5 1H15v6.5H8.5V1z"}),t.jsx("path",{fill:"#05A6F0",d:"M1 8.5h6.5V15H1V8.5z"}),t.jsx("path",{fill:"#FFBA08",d:"M8.5 8.5H15V15H8.5V8.5z"})]}),M6={google_oauth:{icon:t.jsx(Ac,{}),label:"Google"},microsoft_oauth:{icon:t.jsx(A6,{}),label:"Microsoft"},github_oauth:{icon:t.jsx(Ec,{}),label:"GitHub"},gitlab_oauth:{icon:t.jsx(Lc,{}),label:"GitLab"},linkedin_oauth:{icon:t.jsx(Rc,{}),label:"LinkedIn"},discord_oauth:{icon:t.jsx(Pc,{}),label:"Discord"},x_oauth:{icon:t.jsx(Mc,{}),label:"X"}},R6=()=>{const{user:e,disconnectSocialConnection:a,connectSocialAccount:s}=ya(),{deployment:r}=_e(),i=(r==null?void 0:r.social_connections.filter(d=>d.enabled))||[],l=d=>{s({provider:d,redirectUri:window.location.href})},m=async d=>{await a(d.toString()),e.refetch()};return i.length===0?t.jsx(Nt,{title:"No providers available",description:"Social sign-in providers have not been configured for this app."}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-flex w-items-center w-gap-3",children:t.jsxs("div",{className:"w-grow w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Connected accounts"}),t.jsx("div",{className:"w-secsub",children:"Sign in faster by linking third-party accounts."})]})}),t.jsx("div",{className:"w-list",children:i.map(d=>{var h;const c=M6[d.provider];if(!c)return null;const p=((h=e==null?void 0:e.social_connections)==null?void 0:h.filter(f=>f.provider===d.provider))||[],u=p.length>0;return t.jsxs("div",{className:"w-vrow",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-3 w-grow",children:[t.jsx(Dr,{children:c.icon}),t.jsxs("div",{className:"w-flex-col w-gap-1 w-grow",children:[t.jsx("div",{className:"w-sec",children:c.label}),u?t.jsx("div",{className:"w-flex w-wrap w-gap-1",children:p.map(f=>t.jsxs("span",{className:"w-chip",children:[t.jsx("span",{className:"w-truncate",children:f.email_address}),t.jsx("span",{className:"w-chip-x",role:"button",onClick:()=>m(f.id),title:"Remove connection","aria-label":"Remove connection",children:t.jsx(Pa,{size:10,weight:"bold"})})]},f.id))}):t.jsx("span",{className:"w-secsub",children:"Not linked"})]})]}),t.jsx("div",{className:`w-flex w-justify-end w-none${u?" w-row-act-top":""}`,children:t.jsx(se,{$size:"sm",$outline:!0,onClick:()=>l(d.provider),children:u?"Link another":"Link"})})]},d.provider)})})]})};var L6=Object.defineProperty,en=Object.getOwnPropertySymbols,E0=Object.prototype.hasOwnProperty,A0=Object.prototype.propertyIsEnumerable,Ji=(e,a,s)=>a in e?L6(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s,fr=(e,a)=>{for(var s in a||(a={}))E0.call(a,s)&&Ji(e,s,a[s]);if(en)for(var s of en(a))A0.call(a,s)&&Ji(e,s,a[s]);return e},wr=(e,a)=>{var s={};for(var r in e)E0.call(e,r)&&a.indexOf(r)<0&&(s[r]=e[r]);if(e!=null&&en)for(var r of en(e))a.indexOf(r)<0&&A0.call(e,r)&&(s[r]=e[r]);return s};/**
109
109
  * @license QR Code generator library (TypeScript)
110
110
  * Copyright (c) Project Nayuki.
111
111
  * SPDX-License-Identifier: MIT
112
- */var Ha;(e=>{const a=class He{constructor(d,p,u,f){if(this.version=d,this.errorCorrectionLevel=p,this.modules=[],this.isFunction=[],d<He.MIN_VERSION||d>He.MAX_VERSION)throw new RangeError("Version value out of range");if(f<-1||f>7)throw new RangeError("Mask value out of range");this.size=d*4+17;let h=[];for(let x=0;x<this.size;x++)h.push(!1);for(let x=0;x<this.size;x++)this.modules.push(h.slice()),this.isFunction.push(h.slice());this.drawFunctionPatterns();const g=this.addEccAndInterleave(u);if(this.drawCodewords(g),f==-1){let x=1e9;for(let w=0;w<8;w++){this.applyMask(w),this.drawFormatBits(w);const b=this.getPenaltyScore();b<x&&(f=w,x=b),this.applyMask(w)}}i(0<=f&&f<=7),this.mask=f,this.applyMask(f),this.drawFormatBits(f),this.isFunction=[]}static encodeText(d,p){const u=e.QrSegment.makeSegments(d);return He.encodeSegments(u,p)}static encodeBinary(d,p){const u=e.QrSegment.makeBytes(d);return He.encodeSegments([u],p)}static encodeSegments(d,p,u=1,f=40,h=-1,g=!0){if(!(He.MIN_VERSION<=u&&u<=f&&f<=He.MAX_VERSION)||h<-1||h>7)throw new RangeError("Invalid value");let x,w;for(x=u;;x++){const k=He.getNumDataCodewords(x,p)*8,N=m.getTotalBits(d,x);if(N<=k){w=N;break}if(x>=f)throw new RangeError("Data too long")}for(const k of[He.Ecc.MEDIUM,He.Ecc.QUARTILE,He.Ecc.HIGH])g&&w<=He.getNumDataCodewords(x,k)*8&&(p=k);let b=[];for(const k of d){s(k.mode.modeBits,4,b),s(k.numChars,k.mode.numCharCountBits(x),b);for(const N of k.getData())b.push(N)}i(b.length==w);const j=He.getNumDataCodewords(x,p)*8;i(b.length<=j),s(0,Math.min(4,j-b.length),b),s(0,(8-b.length%8)%8,b),i(b.length%8==0);for(let k=236;b.length<j;k^=253)s(k,8,b);let v=[];for(;v.length*8<b.length;)v.push(0);return b.forEach((k,N)=>v[N>>>3]|=k<<7-(N&7)),new He(x,p,v,h)}getModule(d,p){return 0<=d&&d<this.size&&0<=p&&p<this.size&&this.modules[p][d]}getModules(){return this.modules}drawFunctionPatterns(){for(let u=0;u<this.size;u++)this.setFunctionModule(6,u,u%2==0),this.setFunctionModule(u,6,u%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const d=this.getAlignmentPatternPositions(),p=d.length;for(let u=0;u<p;u++)for(let f=0;f<p;f++)u==0&&f==0||u==0&&f==p-1||u==p-1&&f==0||this.drawAlignmentPattern(d[u],d[f]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(d){const p=this.errorCorrectionLevel.formatBits<<3|d;let u=p;for(let h=0;h<10;h++)u=u<<1^(u>>>9)*1335;const f=(p<<10|u)^21522;i(f>>>15==0);for(let h=0;h<=5;h++)this.setFunctionModule(8,h,r(f,h));this.setFunctionModule(8,7,r(f,6)),this.setFunctionModule(8,8,r(f,7)),this.setFunctionModule(7,8,r(f,8));for(let h=9;h<15;h++)this.setFunctionModule(14-h,8,r(f,h));for(let h=0;h<8;h++)this.setFunctionModule(this.size-1-h,8,r(f,h));for(let h=8;h<15;h++)this.setFunctionModule(8,this.size-15+h,r(f,h));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let d=this.version;for(let u=0;u<12;u++)d=d<<1^(d>>>11)*7973;const p=this.version<<12|d;i(p>>>18==0);for(let u=0;u<18;u++){const f=r(p,u),h=this.size-11+u%3,g=Math.floor(u/3);this.setFunctionModule(h,g,f),this.setFunctionModule(g,h,f)}}drawFinderPattern(d,p){for(let u=-4;u<=4;u++)for(let f=-4;f<=4;f++){const h=Math.max(Math.abs(f),Math.abs(u)),g=d+f,x=p+u;0<=g&&g<this.size&&0<=x&&x<this.size&&this.setFunctionModule(g,x,h!=2&&h!=4)}}drawAlignmentPattern(d,p){for(let u=-2;u<=2;u++)for(let f=-2;f<=2;f++)this.setFunctionModule(d+f,p+u,Math.max(Math.abs(f),Math.abs(u))!=1)}setFunctionModule(d,p,u){this.modules[p][d]=u,this.isFunction[p][d]=!0}addEccAndInterleave(d){const p=this.version,u=this.errorCorrectionLevel;if(d.length!=He.getNumDataCodewords(p,u))throw new RangeError("Invalid argument");const f=He.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][p],h=He.ECC_CODEWORDS_PER_BLOCK[u.ordinal][p],g=Math.floor(He.getNumRawDataModules(p)/8),x=f-g%f,w=Math.floor(g/f);let b=[];const j=He.reedSolomonComputeDivisor(h);for(let k=0,N=0;k<f;k++){let _=d.slice(N,N+w-h+(k<x?0:1));N+=_.length;const C=He.reedSolomonComputeRemainder(_,j);k<x&&_.push(0),b.push(_.concat(C))}let v=[];for(let k=0;k<b[0].length;k++)b.forEach((N,_)=>{(k!=w-h||_>=x)&&v.push(N[k])});return i(v.length==g),v}drawCodewords(d){if(d.length!=Math.floor(He.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let p=0;for(let u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(let f=0;f<this.size;f++)for(let h=0;h<2;h++){const g=u-h,w=(u+1&2)==0?this.size-1-f:f;!this.isFunction[w][g]&&p<d.length*8&&(this.modules[w][g]=r(d[p>>>3],7-(p&7)),p++)}}i(p==d.length*8)}applyMask(d){if(d<0||d>7)throw new RangeError("Mask value out of range");for(let p=0;p<this.size;p++)for(let u=0;u<this.size;u++){let f;switch(d){case 0:f=(u+p)%2==0;break;case 1:f=p%2==0;break;case 2:f=u%3==0;break;case 3:f=(u+p)%3==0;break;case 4:f=(Math.floor(u/3)+Math.floor(p/2))%2==0;break;case 5:f=u*p%2+u*p%3==0;break;case 6:f=(u*p%2+u*p%3)%2==0;break;case 7:f=((u+p)%2+u*p%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[p][u]&&f&&(this.modules[p][u]=!this.modules[p][u])}}getPenaltyScore(){let d=0;for(let h=0;h<this.size;h++){let g=!1,x=0,w=[0,0,0,0,0,0,0];for(let b=0;b<this.size;b++)this.modules[h][b]==g?(x++,x==5?d+=He.PENALTY_N1:x>5&&d++):(this.finderPenaltyAddHistory(x,w),g||(d+=this.finderPenaltyCountPatterns(w)*He.PENALTY_N3),g=this.modules[h][b],x=1);d+=this.finderPenaltyTerminateAndCount(g,x,w)*He.PENALTY_N3}for(let h=0;h<this.size;h++){let g=!1,x=0,w=[0,0,0,0,0,0,0];for(let b=0;b<this.size;b++)this.modules[b][h]==g?(x++,x==5?d+=He.PENALTY_N1:x>5&&d++):(this.finderPenaltyAddHistory(x,w),g||(d+=this.finderPenaltyCountPatterns(w)*He.PENALTY_N3),g=this.modules[b][h],x=1);d+=this.finderPenaltyTerminateAndCount(g,x,w)*He.PENALTY_N3}for(let h=0;h<this.size-1;h++)for(let g=0;g<this.size-1;g++){const x=this.modules[h][g];x==this.modules[h][g+1]&&x==this.modules[h+1][g]&&x==this.modules[h+1][g+1]&&(d+=He.PENALTY_N2)}let p=0;for(const h of this.modules)p=h.reduce((g,x)=>g+(x?1:0),p);const u=this.size*this.size,f=Math.ceil(Math.abs(p*20-u*10)/u)-1;return i(0<=f&&f<=9),d+=f*He.PENALTY_N4,i(0<=d&&d<=2568888),d}getAlignmentPatternPositions(){if(this.version==1)return[];{const d=Math.floor(this.version/7)+2,p=this.version==32?26:Math.ceil((this.version*4+4)/(d*2-2))*2;let u=[6];for(let f=this.size-7;u.length<d;f-=p)u.splice(1,0,f);return u}}static getNumRawDataModules(d){if(d<He.MIN_VERSION||d>He.MAX_VERSION)throw new RangeError("Version number out of range");let p=(16*d+128)*d+64;if(d>=2){const u=Math.floor(d/7)+2;p-=(25*u-10)*u-55,d>=7&&(p-=36)}return i(208<=p&&p<=29648),p}static getNumDataCodewords(d,p){return Math.floor(He.getNumRawDataModules(d)/8)-He.ECC_CODEWORDS_PER_BLOCK[p.ordinal][d]*He.NUM_ERROR_CORRECTION_BLOCKS[p.ordinal][d]}static reedSolomonComputeDivisor(d){if(d<1||d>255)throw new RangeError("Degree out of range");let p=[];for(let f=0;f<d-1;f++)p.push(0);p.push(1);let u=1;for(let f=0;f<d;f++){for(let h=0;h<p.length;h++)p[h]=He.reedSolomonMultiply(p[h],u),h+1<p.length&&(p[h]^=p[h+1]);u=He.reedSolomonMultiply(u,2)}return p}static reedSolomonComputeRemainder(d,p){let u=p.map(f=>0);for(const f of d){const h=f^u.shift();u.push(0),p.forEach((g,x)=>u[x]^=He.reedSolomonMultiply(g,h))}return u}static reedSolomonMultiply(d,p){if(d>>>8||p>>>8)throw new RangeError("Byte out of range");let u=0;for(let f=7;f>=0;f--)u=u<<1^(u>>>7)*285,u^=(p>>>f&1)*d;return i(u>>>8==0),u}finderPenaltyCountPatterns(d){const p=d[1];i(p<=this.size*3);const u=p>0&&d[2]==p&&d[3]==p*3&&d[4]==p&&d[5]==p;return(u&&d[0]>=p*4&&d[6]>=p?1:0)+(u&&d[6]>=p*4&&d[0]>=p?1:0)}finderPenaltyTerminateAndCount(d,p,u){return d&&(this.finderPenaltyAddHistory(p,u),p=0),p+=this.size,this.finderPenaltyAddHistory(p,u),this.finderPenaltyCountPatterns(u)}finderPenaltyAddHistory(d,p){p[0]==0&&(d+=this.size),p.pop(),p.unshift(d)}};a.MIN_VERSION=1,a.MAX_VERSION=40,a.PENALTY_N1=3,a.PENALTY_N2=3,a.PENALTY_N3=40,a.PENALTY_N4=10,a.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],a.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=a;function s(c,d,p){if(d<0||d>31||c>>>d)throw new RangeError("Value out of range");for(let u=d-1;u>=0;u--)p.push(c>>>u&1)}function r(c,d){return(c>>>d&1)!=0}function i(c){if(!c)throw new Error("Assertion error")}const l=class st{constructor(d,p,u){if(this.mode=d,this.numChars=p,this.bitData=u,p<0)throw new RangeError("Invalid argument");this.bitData=u.slice()}static makeBytes(d){let p=[];for(const u of d)s(u,8,p);return new st(st.Mode.BYTE,d.length,p)}static makeNumeric(d){if(!st.isNumeric(d))throw new RangeError("String contains non-numeric characters");let p=[];for(let u=0;u<d.length;){const f=Math.min(d.length-u,3);s(parseInt(d.substring(u,u+f),10),f*3+1,p),u+=f}return new st(st.Mode.NUMERIC,d.length,p)}static makeAlphanumeric(d){if(!st.isAlphanumeric(d))throw new RangeError("String contains unencodable characters in alphanumeric mode");let p=[],u;for(u=0;u+2<=d.length;u+=2){let f=st.ALPHANUMERIC_CHARSET.indexOf(d.charAt(u))*45;f+=st.ALPHANUMERIC_CHARSET.indexOf(d.charAt(u+1)),s(f,11,p)}return u<d.length&&s(st.ALPHANUMERIC_CHARSET.indexOf(d.charAt(u)),6,p),new st(st.Mode.ALPHANUMERIC,d.length,p)}static makeSegments(d){return d==""?[]:st.isNumeric(d)?[st.makeNumeric(d)]:st.isAlphanumeric(d)?[st.makeAlphanumeric(d)]:[st.makeBytes(st.toUtf8ByteArray(d))]}static makeEci(d){let p=[];if(d<0)throw new RangeError("ECI assignment value out of range");if(d<128)s(d,8,p);else if(d<16384)s(2,2,p),s(d,14,p);else if(d<1e6)s(6,3,p),s(d,21,p);else throw new RangeError("ECI assignment value out of range");return new st(st.Mode.ECI,0,p)}static isNumeric(d){return st.NUMERIC_REGEX.test(d)}static isAlphanumeric(d){return st.ALPHANUMERIC_REGEX.test(d)}getData(){return this.bitData.slice()}static getTotalBits(d,p){let u=0;for(const f of d){const h=f.mode.numCharCountBits(p);if(f.numChars>=1<<h)return 1/0;u+=4+h+f.bitData.length}return u}static toUtf8ByteArray(d){d=encodeURI(d);let p=[];for(let u=0;u<d.length;u++)d.charAt(u)!="%"?p.push(d.charCodeAt(u)):(p.push(parseInt(d.substring(u+1,u+3),16)),u+=2);return p}};l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let m=l;e.QrSegment=l})(Ha||(Ha={}));(e=>{(a=>{const s=class{constructor(i,l){this.ordinal=i,this.formatBits=l}};s.LOW=new s(0,1),s.MEDIUM=new s(1,0),s.QUARTILE=new s(2,3),s.HIGH=new s(3,2),a.Ecc=s})(e.QrCode||(e.QrCode={}))})(Ha||(Ha={}));(e=>{(a=>{const s=class{constructor(i,l){this.modeBits=i,this.numBitsCharCount=l}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};s.NUMERIC=new s(1,[10,12,14]),s.ALPHANUMERIC=new s(2,[9,11,13]),s.BYTE=new s(4,[8,16,16]),s.KANJI=new s(8,[8,10,12]),s.ECI=new s(7,[0,0,0]),a.Mode=s})(e.QrSegment||(e.QrSegment={}))})(Ha||(Ha={}));var Wa=Ha;/**
112
+ */var Fa;(e=>{const a=class He{constructor(c,p,u,h){if(this.version=c,this.errorCorrectionLevel=p,this.modules=[],this.isFunction=[],c<He.MIN_VERSION||c>He.MAX_VERSION)throw new RangeError("Version value out of range");if(h<-1||h>7)throw new RangeError("Mask value out of range");this.size=c*4+17;let f=[];for(let x=0;x<this.size;x++)f.push(!1);for(let x=0;x<this.size;x++)this.modules.push(f.slice()),this.isFunction.push(f.slice());this.drawFunctionPatterns();const g=this.addEccAndInterleave(u);if(this.drawCodewords(g),h==-1){let x=1e9;for(let w=0;w<8;w++){this.applyMask(w),this.drawFormatBits(w);const b=this.getPenaltyScore();b<x&&(h=w,x=b),this.applyMask(w)}}i(0<=h&&h<=7),this.mask=h,this.applyMask(h),this.drawFormatBits(h),this.isFunction=[]}static encodeText(c,p){const u=e.QrSegment.makeSegments(c);return He.encodeSegments(u,p)}static encodeBinary(c,p){const u=e.QrSegment.makeBytes(c);return He.encodeSegments([u],p)}static encodeSegments(c,p,u=1,h=40,f=-1,g=!0){if(!(He.MIN_VERSION<=u&&u<=h&&h<=He.MAX_VERSION)||f<-1||f>7)throw new RangeError("Invalid value");let x,w;for(x=u;;x++){const k=He.getNumDataCodewords(x,p)*8,N=m.getTotalBits(c,x);if(N<=k){w=N;break}if(x>=h)throw new RangeError("Data too long")}for(const k of[He.Ecc.MEDIUM,He.Ecc.QUARTILE,He.Ecc.HIGH])g&&w<=He.getNumDataCodewords(x,k)*8&&(p=k);let b=[];for(const k of c){s(k.mode.modeBits,4,b),s(k.numChars,k.mode.numCharCountBits(x),b);for(const N of k.getData())b.push(N)}i(b.length==w);const j=He.getNumDataCodewords(x,p)*8;i(b.length<=j),s(0,Math.min(4,j-b.length),b),s(0,(8-b.length%8)%8,b),i(b.length%8==0);for(let k=236;b.length<j;k^=253)s(k,8,b);let v=[];for(;v.length*8<b.length;)v.push(0);return b.forEach((k,N)=>v[N>>>3]|=k<<7-(N&7)),new He(x,p,v,f)}getModule(c,p){return 0<=c&&c<this.size&&0<=p&&p<this.size&&this.modules[p][c]}getModules(){return this.modules}drawFunctionPatterns(){for(let u=0;u<this.size;u++)this.setFunctionModule(6,u,u%2==0),this.setFunctionModule(u,6,u%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const c=this.getAlignmentPatternPositions(),p=c.length;for(let u=0;u<p;u++)for(let h=0;h<p;h++)u==0&&h==0||u==0&&h==p-1||u==p-1&&h==0||this.drawAlignmentPattern(c[u],c[h]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(c){const p=this.errorCorrectionLevel.formatBits<<3|c;let u=p;for(let f=0;f<10;f++)u=u<<1^(u>>>9)*1335;const h=(p<<10|u)^21522;i(h>>>15==0);for(let f=0;f<=5;f++)this.setFunctionModule(8,f,r(h,f));this.setFunctionModule(8,7,r(h,6)),this.setFunctionModule(8,8,r(h,7)),this.setFunctionModule(7,8,r(h,8));for(let f=9;f<15;f++)this.setFunctionModule(14-f,8,r(h,f));for(let f=0;f<8;f++)this.setFunctionModule(this.size-1-f,8,r(h,f));for(let f=8;f<15;f++)this.setFunctionModule(8,this.size-15+f,r(h,f));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let c=this.version;for(let u=0;u<12;u++)c=c<<1^(c>>>11)*7973;const p=this.version<<12|c;i(p>>>18==0);for(let u=0;u<18;u++){const h=r(p,u),f=this.size-11+u%3,g=Math.floor(u/3);this.setFunctionModule(f,g,h),this.setFunctionModule(g,f,h)}}drawFinderPattern(c,p){for(let u=-4;u<=4;u++)for(let h=-4;h<=4;h++){const f=Math.max(Math.abs(h),Math.abs(u)),g=c+h,x=p+u;0<=g&&g<this.size&&0<=x&&x<this.size&&this.setFunctionModule(g,x,f!=2&&f!=4)}}drawAlignmentPattern(c,p){for(let u=-2;u<=2;u++)for(let h=-2;h<=2;h++)this.setFunctionModule(c+h,p+u,Math.max(Math.abs(h),Math.abs(u))!=1)}setFunctionModule(c,p,u){this.modules[p][c]=u,this.isFunction[p][c]=!0}addEccAndInterleave(c){const p=this.version,u=this.errorCorrectionLevel;if(c.length!=He.getNumDataCodewords(p,u))throw new RangeError("Invalid argument");const h=He.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][p],f=He.ECC_CODEWORDS_PER_BLOCK[u.ordinal][p],g=Math.floor(He.getNumRawDataModules(p)/8),x=h-g%h,w=Math.floor(g/h);let b=[];const j=He.reedSolomonComputeDivisor(f);for(let k=0,N=0;k<h;k++){let _=c.slice(N,N+w-f+(k<x?0:1));N+=_.length;const C=He.reedSolomonComputeRemainder(_,j);k<x&&_.push(0),b.push(_.concat(C))}let v=[];for(let k=0;k<b[0].length;k++)b.forEach((N,_)=>{(k!=w-f||_>=x)&&v.push(N[k])});return i(v.length==g),v}drawCodewords(c){if(c.length!=Math.floor(He.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let p=0;for(let u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(let h=0;h<this.size;h++)for(let f=0;f<2;f++){const g=u-f,w=(u+1&2)==0?this.size-1-h:h;!this.isFunction[w][g]&&p<c.length*8&&(this.modules[w][g]=r(c[p>>>3],7-(p&7)),p++)}}i(p==c.length*8)}applyMask(c){if(c<0||c>7)throw new RangeError("Mask value out of range");for(let p=0;p<this.size;p++)for(let u=0;u<this.size;u++){let h;switch(c){case 0:h=(u+p)%2==0;break;case 1:h=p%2==0;break;case 2:h=u%3==0;break;case 3:h=(u+p)%3==0;break;case 4:h=(Math.floor(u/3)+Math.floor(p/2))%2==0;break;case 5:h=u*p%2+u*p%3==0;break;case 6:h=(u*p%2+u*p%3)%2==0;break;case 7:h=((u+p)%2+u*p%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[p][u]&&h&&(this.modules[p][u]=!this.modules[p][u])}}getPenaltyScore(){let c=0;for(let f=0;f<this.size;f++){let g=!1,x=0,w=[0,0,0,0,0,0,0];for(let b=0;b<this.size;b++)this.modules[f][b]==g?(x++,x==5?c+=He.PENALTY_N1:x>5&&c++):(this.finderPenaltyAddHistory(x,w),g||(c+=this.finderPenaltyCountPatterns(w)*He.PENALTY_N3),g=this.modules[f][b],x=1);c+=this.finderPenaltyTerminateAndCount(g,x,w)*He.PENALTY_N3}for(let f=0;f<this.size;f++){let g=!1,x=0,w=[0,0,0,0,0,0,0];for(let b=0;b<this.size;b++)this.modules[b][f]==g?(x++,x==5?c+=He.PENALTY_N1:x>5&&c++):(this.finderPenaltyAddHistory(x,w),g||(c+=this.finderPenaltyCountPatterns(w)*He.PENALTY_N3),g=this.modules[b][f],x=1);c+=this.finderPenaltyTerminateAndCount(g,x,w)*He.PENALTY_N3}for(let f=0;f<this.size-1;f++)for(let g=0;g<this.size-1;g++){const x=this.modules[f][g];x==this.modules[f][g+1]&&x==this.modules[f+1][g]&&x==this.modules[f+1][g+1]&&(c+=He.PENALTY_N2)}let p=0;for(const f of this.modules)p=f.reduce((g,x)=>g+(x?1:0),p);const u=this.size*this.size,h=Math.ceil(Math.abs(p*20-u*10)/u)-1;return i(0<=h&&h<=9),c+=h*He.PENALTY_N4,i(0<=c&&c<=2568888),c}getAlignmentPatternPositions(){if(this.version==1)return[];{const c=Math.floor(this.version/7)+2,p=this.version==32?26:Math.ceil((this.version*4+4)/(c*2-2))*2;let u=[6];for(let h=this.size-7;u.length<c;h-=p)u.splice(1,0,h);return u}}static getNumRawDataModules(c){if(c<He.MIN_VERSION||c>He.MAX_VERSION)throw new RangeError("Version number out of range");let p=(16*c+128)*c+64;if(c>=2){const u=Math.floor(c/7)+2;p-=(25*u-10)*u-55,c>=7&&(p-=36)}return i(208<=p&&p<=29648),p}static getNumDataCodewords(c,p){return Math.floor(He.getNumRawDataModules(c)/8)-He.ECC_CODEWORDS_PER_BLOCK[p.ordinal][c]*He.NUM_ERROR_CORRECTION_BLOCKS[p.ordinal][c]}static reedSolomonComputeDivisor(c){if(c<1||c>255)throw new RangeError("Degree out of range");let p=[];for(let h=0;h<c-1;h++)p.push(0);p.push(1);let u=1;for(let h=0;h<c;h++){for(let f=0;f<p.length;f++)p[f]=He.reedSolomonMultiply(p[f],u),f+1<p.length&&(p[f]^=p[f+1]);u=He.reedSolomonMultiply(u,2)}return p}static reedSolomonComputeRemainder(c,p){let u=p.map(h=>0);for(const h of c){const f=h^u.shift();u.push(0),p.forEach((g,x)=>u[x]^=He.reedSolomonMultiply(g,f))}return u}static reedSolomonMultiply(c,p){if(c>>>8||p>>>8)throw new RangeError("Byte out of range");let u=0;for(let h=7;h>=0;h--)u=u<<1^(u>>>7)*285,u^=(p>>>h&1)*c;return i(u>>>8==0),u}finderPenaltyCountPatterns(c){const p=c[1];i(p<=this.size*3);const u=p>0&&c[2]==p&&c[3]==p*3&&c[4]==p&&c[5]==p;return(u&&c[0]>=p*4&&c[6]>=p?1:0)+(u&&c[6]>=p*4&&c[0]>=p?1:0)}finderPenaltyTerminateAndCount(c,p,u){return c&&(this.finderPenaltyAddHistory(p,u),p=0),p+=this.size,this.finderPenaltyAddHistory(p,u),this.finderPenaltyCountPatterns(u)}finderPenaltyAddHistory(c,p){p[0]==0&&(c+=this.size),p.pop(),p.unshift(c)}};a.MIN_VERSION=1,a.MAX_VERSION=40,a.PENALTY_N1=3,a.PENALTY_N2=3,a.PENALTY_N3=40,a.PENALTY_N4=10,a.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],a.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=a;function s(d,c,p){if(c<0||c>31||d>>>c)throw new RangeError("Value out of range");for(let u=c-1;u>=0;u--)p.push(d>>>u&1)}function r(d,c){return(d>>>c&1)!=0}function i(d){if(!d)throw new Error("Assertion error")}const l=class st{constructor(c,p,u){if(this.mode=c,this.numChars=p,this.bitData=u,p<0)throw new RangeError("Invalid argument");this.bitData=u.slice()}static makeBytes(c){let p=[];for(const u of c)s(u,8,p);return new st(st.Mode.BYTE,c.length,p)}static makeNumeric(c){if(!st.isNumeric(c))throw new RangeError("String contains non-numeric characters");let p=[];for(let u=0;u<c.length;){const h=Math.min(c.length-u,3);s(parseInt(c.substring(u,u+h),10),h*3+1,p),u+=h}return new st(st.Mode.NUMERIC,c.length,p)}static makeAlphanumeric(c){if(!st.isAlphanumeric(c))throw new RangeError("String contains unencodable characters in alphanumeric mode");let p=[],u;for(u=0;u+2<=c.length;u+=2){let h=st.ALPHANUMERIC_CHARSET.indexOf(c.charAt(u))*45;h+=st.ALPHANUMERIC_CHARSET.indexOf(c.charAt(u+1)),s(h,11,p)}return u<c.length&&s(st.ALPHANUMERIC_CHARSET.indexOf(c.charAt(u)),6,p),new st(st.Mode.ALPHANUMERIC,c.length,p)}static makeSegments(c){return c==""?[]:st.isNumeric(c)?[st.makeNumeric(c)]:st.isAlphanumeric(c)?[st.makeAlphanumeric(c)]:[st.makeBytes(st.toUtf8ByteArray(c))]}static makeEci(c){let p=[];if(c<0)throw new RangeError("ECI assignment value out of range");if(c<128)s(c,8,p);else if(c<16384)s(2,2,p),s(c,14,p);else if(c<1e6)s(6,3,p),s(c,21,p);else throw new RangeError("ECI assignment value out of range");return new st(st.Mode.ECI,0,p)}static isNumeric(c){return st.NUMERIC_REGEX.test(c)}static isAlphanumeric(c){return st.ALPHANUMERIC_REGEX.test(c)}getData(){return this.bitData.slice()}static getTotalBits(c,p){let u=0;for(const h of c){const f=h.mode.numCharCountBits(p);if(h.numChars>=1<<f)return 1/0;u+=4+f+h.bitData.length}return u}static toUtf8ByteArray(c){c=encodeURI(c);let p=[];for(let u=0;u<c.length;u++)c.charAt(u)!="%"?p.push(c.charCodeAt(u)):(p.push(parseInt(c.substring(u+1,u+3),16)),u+=2);return p}};l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let m=l;e.QrSegment=l})(Fa||(Fa={}));(e=>{(a=>{const s=class{constructor(i,l){this.ordinal=i,this.formatBits=l}};s.LOW=new s(0,1),s.MEDIUM=new s(1,0),s.QUARTILE=new s(2,3),s.HIGH=new s(3,2),a.Ecc=s})(e.QrCode||(e.QrCode={}))})(Fa||(Fa={}));(e=>{(a=>{const s=class{constructor(i,l){this.modeBits=i,this.numBitsCharCount=l}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};s.NUMERIC=new s(1,[10,12,14]),s.ALPHANUMERIC=new s(2,[9,11,13]),s.BYTE=new s(4,[8,16,16]),s.KANJI=new s(8,[8,10,12]),s.ECI=new s(7,[0,0,0]),a.Mode=s})(e.QrSegment||(e.QrSegment={}))})(Fa||(Fa={}));var Ba=Fa;/**
113
113
  * @license qrcode.react
114
114
  * Copyright (c) Paul O'Shannessy
115
115
  * SPDX-License-Identifier: ISC
116
- */var A6={L:Wa.QrCode.Ecc.LOW,M:Wa.QrCode.Ecc.MEDIUM,Q:Wa.QrCode.Ecc.QUARTILE,H:Wa.QrCode.Ecc.HIGH},S0=128,E0="L",A0="#FFFFFF",M0="#000000",R0=!1,L0=1,M6=4,R6=0,L6=.1;function P0(e,a=0){const s=[];return e.forEach(function(r,i){let l=null;r.forEach(function(m,c){if(!m&&l!==null){s.push(`M${l+a} ${i+a}h${c-l}v1H${l+a}z`),l=null;return}if(c===r.length-1){if(!m)return;l===null?s.push(`M${c+a},${i+a} h1v1H${c+a}z`):s.push(`M${l+a},${i+a} h${c+1-l}v1H${l+a}z`);return}m&&l===null&&(l=c)})}),s.join("")}function $0(e,a){return e.slice().map((s,r)=>r<a.y||r>=a.y+a.h?s:s.map((i,l)=>l<a.x||l>=a.x+a.w?i:!1))}function P6(e,a,s,r){if(r==null)return null;const i=e.length+s*2,l=Math.floor(a*L6),m=i/a,c=(r.width||l)*m,d=(r.height||l)*m,p=r.x==null?e.length/2-c/2:r.x*m,u=r.y==null?e.length/2-d/2:r.y*m,f=r.opacity==null?1:r.opacity;let h=null;if(r.excavate){let x=Math.floor(p),w=Math.floor(u),b=Math.ceil(c+p-x),j=Math.ceil(d+u-w);h={x,y:w,w:b,h:j}}const g=r.crossOrigin;return{x:p,y:u,h:d,w:c,excavation:h,opacity:f,crossOrigin:g}}function $6(e,a){return a!=null?Math.max(Math.floor(a),0):e?M6:R6}function O0({value:e,level:a,minVersion:s,includeMargin:r,marginSize:i,imageSettings:l,size:m,boostLevel:c}){let d=o.useMemo(()=>{const x=(Array.isArray(e)?e:[e]).reduce((w,b)=>(w.push(...Wa.QrSegment.makeSegments(b)),w),[]);return Wa.QrCode.encodeSegments(x,A6[a],s,void 0,void 0,c)},[e,a,s,c]);const{cells:p,margin:u,numCells:f,calculatedImageSettings:h}=o.useMemo(()=>{let g=d.getModules();const x=$6(r,i),w=g.length+x*2,b=P6(g,m,x,l);return{cells:g,margin:x,numCells:w,calculatedImageSettings:b}},[d,m,l,r,i]);return{qrcode:d,margin:u,cells:p,numCells:f,calculatedImageSettings:h}}var O6=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Z6=o.forwardRef(function(a,s){const r=a,{value:i,size:l=S0,level:m=E0,bgColor:c=A0,fgColor:d=M0,includeMargin:p=R0,minVersion:u=L0,boostLevel:f,marginSize:h,imageSettings:g}=r,w=hr(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:b}=w,j=hr(w,["style"]),v=g==null?void 0:g.src,k=o.useRef(null),N=o.useRef(null),_=o.useCallback(S=>{k.current=S,typeof s=="function"?s(S):s&&(s.current=S)},[s]),[C,y]=o.useState(!1),{margin:E,cells:A,numCells:H,calculatedImageSettings:M}=O0({value:i,level:m,minVersion:u,boostLevel:f,includeMargin:p,marginSize:h,imageSettings:g,size:l});o.useEffect(()=>{if(k.current!=null){const S=k.current,$=S.getContext("2d");if(!$)return;let Z=A;const R=N.current,L=M!=null&&R!==null&&R.complete&&R.naturalHeight!==0&&R.naturalWidth!==0;L&&M.excavation!=null&&(Z=$0(A,M.excavation));const O=window.devicePixelRatio||1;S.height=S.width=l*O;const F=l/H*O;$.scale(F,F),$.fillStyle=c,$.fillRect(0,0,H,H),$.fillStyle=d,O6?$.fill(new Path2D(P0(Z,E))):A.forEach(function(W,U){W.forEach(function(V,G){V&&$.fillRect(G+E,U+E,1,1)})}),M&&($.globalAlpha=M.opacity),L&&$.drawImage(R,M.x+E,M.y+E,M.w,M.h)}}),o.useEffect(()=>{y(!1)},[v]);const T=pr({height:l,width:l},b);let P=null;return v!=null&&(P=o.createElement("img",{src:v,key:v,style:{display:"none"},onLoad:()=>{y(!0)},ref:N,crossOrigin:M==null?void 0:M.crossOrigin})),o.createElement(o.Fragment,null,o.createElement("canvas",pr({style:T,height:l,width:l,ref:_,role:"img"},j)),P)});Z6.displayName="QRCodeCanvas";var zr=o.forwardRef(function(a,s){const r=a,{value:i,size:l=S0,level:m=E0,bgColor:c=A0,fgColor:d=M0,includeMargin:p=R0,minVersion:u=L0,boostLevel:f,title:h,marginSize:g,imageSettings:x}=r,w=hr(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:b,cells:j,numCells:v,calculatedImageSettings:k}=O0({value:i,level:m,minVersion:u,boostLevel:f,includeMargin:p,marginSize:g,imageSettings:x,size:l});let N=j,_=null;x!=null&&k!=null&&(k.excavation!=null&&(N=$0(j,k.excavation)),_=o.createElement("image",{href:x.src,height:k.h,width:k.w,x:k.x+b,y:k.y+b,preserveAspectRatio:"none",opacity:k.opacity,crossOrigin:k.crossOrigin}));const C=P0(N,b);return o.createElement("svg",pr({height:l,width:l,viewBox:`0 0 ${v} ${v}`,ref:s,role:"img"},w),!!h&&o.createElement("title",null,h),o.createElement("path",{fill:c,d:`M0,0 h${v}v${v}H0z`,shapeRendering:"crispEdges"}),o.createElement("path",{fill:d,d:C,shapeRendering:"crispEdges"}),_)});zr.displayName="QRCodeSVG";const Qi=({onClose:e,onChangePassword:a,triggerRef:s,isSetup:r=!1})=>{const i=o.useRef(null),[l,m]=o.useState(!1),[c,d]=o.useState(""),[p,u]=o.useState(""),[f,h]=o.useState(""),[g,x]=o.useState(!1),[w,b]=o.useState(!1),[j,v]=o.useState(!1),[k,N]=o.useState(!1),[_,C]=o.useState({}),y=bt({contentRef:i,triggerRef:s??{current:null},isOpen:l,minWidth:380,defaultMaxHeight:420});o.useEffect(()=>{m(!0);const A=M=>{i.current&&!i.current.contains(M.target)&&e()},H=M=>{M.key==="Escape"&&e()};return document.addEventListener("mousedown",A),document.addEventListener("keydown",H),()=>{document.removeEventListener("mousedown",A),document.removeEventListener("keydown",H)}},[e]);const E=async()=>{if(k)return;const A={};if(!r&&!c&&(A.currentPassword="Current password is required"),p?p.length<8&&(A.newPassword="Password must be at least 8 characters"):A.newPassword="New password is required",p!==f&&(A.confirmPassword="Passwords do not match"),Object.keys(A).length>0){C(A);return}N(!0);try{await a(r?"":c,p),e()}catch(H){C({form:H.message||"Failed to update password"})}finally{N(!1)}};return l?t.jsxs("div",{ref:i,className:"w-pop",style:{position:"fixed",zIndex:1001,width:380,maxWidth:"calc(100vw - 24px)",top:(y==null?void 0:y.top)!==void 0?`${y.top}px`:void 0,bottom:(y==null?void 0:y.bottom)!==void 0?`${y.bottom}px`:void 0,left:(y==null?void 0:y.left)!==void 0?`${y.left}px`:void 0,right:(y==null?void 0:y.right)!==void 0?`${y.right}px`:void 0,maxHeight:y!=null&&y.maxHeight?`${y.maxHeight}px`:void 0,visibility:y?"visible":"hidden"},onClick:A=>A.stopPropagation(),children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:r?"Set Password":"Change Password"}),t.jsx("p",{className:"w-pop-sub",children:r?"Set a password for your account to enable password authentication.":"Update your account password to keep it secure."})]}),!r&&t.jsxs("div",{className:"w-field",children:[t.jsx(Ve,{children:"Current Password"}),t.jsxs("div",{className:"w-input-wrap",children:[t.jsx(ye,{type:g?"text":"password",placeholder:"Enter your current password",value:c,onChange:A=>d(A.target.value),style:{paddingRight:40}}),t.jsx("button",{type:"button",className:"w-input-eye",onClick:()=>x(!g),"aria-label":g?"Hide current password":"Show current password",children:g?t.jsx(Sn,{size:16}):t.jsx(Nn,{size:16})})]}),_.currentPassword&&t.jsx("span",{className:"w-input-err",children:_.currentPassword})]}),t.jsxs("div",{className:"w-field",children:[t.jsx(Ve,{children:r?"Password":"New Password"}),t.jsxs("div",{className:"w-input-wrap",children:[t.jsx(ye,{type:w?"text":"password",placeholder:r?"Enter your password":"Enter your new password",value:p,onChange:A=>u(A.target.value),style:{paddingRight:40}}),t.jsx("button",{type:"button",className:"w-input-eye",onClick:()=>b(!w),"aria-label":w?"Hide new password":"Show new password",children:w?t.jsx(Sn,{size:16}):t.jsx(Nn,{size:16})})]}),_.newPassword&&t.jsx("span",{className:"w-input-err",children:_.newPassword})]}),t.jsxs("div",{className:"w-field",children:[t.jsx(Ve,{children:"Confirm New Password"}),t.jsxs("div",{className:"w-input-wrap",children:[t.jsx(ye,{type:j?"text":"password",placeholder:"Confirm your new password",value:f,onChange:A=>h(A.target.value),style:{paddingRight:40}}),t.jsx("button",{type:"button",className:"w-input-eye",onClick:()=>v(!j),"aria-label":j?"Hide confirm password":"Show confirm password",children:j?t.jsx(Sn,{size:16}):t.jsx(Nn,{size:16})})]}),_.confirmPassword&&t.jsx("span",{className:"w-input-err",children:_.confirmPassword})]}),_.form&&t.jsx("span",{className:"w-input-err",children:_.form})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:E,disabled:k,children:k?r?"Setting...":"Updating...":r?"Set Password":"Update Password"})]})]}):null},H6=({onClose:e,onRemovePassword:a,triggerRef:s})=>{const r=o.useRef(null),[i,l]=o.useState(!1),[m,c]=o.useState(""),[d,p]=o.useState(!1),{toast:u}=ta(),f=bt({contentRef:r,triggerRef:s??{current:null},isOpen:i,minWidth:400,defaultMaxHeight:360});o.useEffect(()=>{l(!0);const g=w=>{r.current&&!r.current.contains(w.target)&&e()},x=w=>{w.key==="Escape"&&e()};return document.addEventListener("mousedown",g),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",x)}},[e]);const h=async()=>{if(!(!m||d)){p(!0);try{await a(m),e()}catch(g){const x=g.message||"Failed to remove password. Please try again.";u(x,"error")}finally{p(!1)}}};return i?t.jsxs("div",{ref:r,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(f==null?void 0:f.top)!==void 0?`${f.top}px`:void 0,bottom:(f==null?void 0:f.bottom)!==void 0?`${f.bottom}px`:void 0,left:(f==null?void 0:f.left)!==void 0?`${f.left}px`:void 0,right:(f==null?void 0:f.right)!==void 0?`${f.right}px`:void 0,maxHeight:f!=null&&f.maxHeight?`${f.maxHeight}px`:void 0,visibility:f?"visible":"hidden"},onClick:g=>g.stopPropagation(),children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Remove Password"}),t.jsxs("div",{className:"w-banner w-banner--warn",children:[t.jsx(Fa,{size:16}),t.jsx("span",{className:"w-banner-txt",children:"You're about to remove password authentication from your account. Make sure you have another way to sign in (email, phone, social login, or passkey) before continuing."})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"current-password",children:"Confirm your current password"}),t.jsx(ye,{id:"current-password",type:"password",placeholder:"Enter current password",value:m,onChange:g=>c(g.target.value),autoFocus:!0})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--danger-solid w-btn--sm",onClick:h,disabled:!m||d,children:d?"Removing...":"Remove Password"})]})]}):null},F6=({onClose:e,onSetupTOTP:a,onVerifyTOTP:s,triggerRef:r})=>{const i=o.useRef(null),[l,m]=o.useState("qr"),[c,d]=o.useState(""),[p,u]=o.useState(""),[f,h]=o.useState(["",""]),[g,x]=o.useState(!1),[w,b]=o.useState(!1),{toast:j}=ta(),v=bt({contentRef:i,triggerRef:r??{current:null},isOpen:w,minWidth:380,defaultMaxHeight:460});o.useEffect(()=>{b(!0);const N=C=>{i.current&&!i.current.contains(C.target)&&e()},_=C=>{C.key==="Escape"&&e()};return document.addEventListener("mousedown",N),document.addEventListener("keydown",_),()=>{document.removeEventListener("mousedown",N),document.removeEventListener("keydown",_)}},[e]),o.useEffect(()=>{(async()=>{x(!0);try{const _=await a();d(_.otp_url||""),u(_.totp_secret||"")}catch(_){const C=_.message||"Failed to setup two-factor authentication. Please try again.";j(C,"error")}finally{x(!1)}})()},[]);const k=async()=>{if(!f.some(N=>N.length!==6)){x(!0);try{await s(f),e()}catch(N){const _=N.message||"Failed to verify codes. Please check your authenticator app and try again.";j(_,"error")}finally{x(!1)}}};return w?t.jsx("div",{ref:i,className:"w-pop",style:{position:"fixed",zIndex:1001,width:340,maxWidth:"calc(100vw - 24px)",top:(v==null?void 0:v.top)!==void 0?`${v.top}px`:void 0,bottom:(v==null?void 0:v.bottom)!==void 0?`${v.bottom}px`:void 0,left:(v==null?void 0:v.left)!==void 0?`${v.left}px`:void 0,right:(v==null?void 0:v.right)!==void 0?`${v.right}px`:void 0,maxHeight:v!=null&&v.maxHeight?`${v.maxHeight}px`:void 0,visibility:v?"visible":"hidden"},onClick:N=>N.stopPropagation(),children:l==="qr"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Setup Two-Factor Authentication"}),t.jsx("p",{className:"w-pop-sub",children:"Scan this QR code with your authenticator app (Google Authenticator, Authy, etc.)"})]}),t.jsx("div",{className:"w-flex w-justify-center",children:g?t.jsx("div",{className:"w-qr w-text-muted",children:"Loading..."}):c?t.jsx("div",{className:"w-qr",style:{background:"#fff",padding:8},children:t.jsx(zr,{value:c,size:130,title:"QR Code for Two-Factor Authentication Setup","aria-label":"Scan this QR code with your authenticator app to set up two-factor authentication"})}):t.jsx("div",{className:"w-qr w-text-error",children:"QR Code Not Available"})}),p&&t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-secsub",children:"Or enter manually:"}),t.jsx("div",{className:"w-token",children:t.jsx("code",{style:{wordBreak:"break-all"},children:p})})]})]}),t.jsx("div",{className:"w-pop-foot",children:t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:()=>m("verify"),disabled:g||!c,children:"I've Scanned the Code"})})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Verify Your Authenticator"}),t.jsx("p",{className:"w-pop-sub",children:"Enter two consecutive codes from your authenticator app"})]}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx(ye,{id:"totp-code-1",type:"text",placeholder:"000000",value:f[0],onChange:N=>{const _=N.target.value.replace(/[^0-9]/g,"").substring(0,6);h([_,f[1]])},maxLength:6,style:{textAlign:"center",fontFamily:"var(--wa-font-mono)"},"aria-label":"First verification code from authenticator app"}),t.jsx(ye,{id:"totp-code-2",type:"text",placeholder:"000000",value:f[1],onChange:N=>{const _=N.target.value.replace(/[^0-9]/g,"").substring(0,6);h([f[0],_])},maxLength:6,style:{textAlign:"center",fontFamily:"var(--wa-font-mono)"},"aria-label":"Second verification code from authenticator app"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:()=>m("qr"),children:"Back"}),t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:k,disabled:g||f.some(N=>N.length!==6),children:g?"Verifying...":"Verify"})]})]})}):null},T6=({codes:e,onClose:a,onCopy:s,onDownload:r,triggerRef:i})=>{const l=o.useRef(null),[m,c]=o.useState(!1),d=bt({contentRef:l,triggerRef:i??{current:null},isOpen:m,minWidth:380,defaultMaxHeight:360});return o.useEffect(()=>{c(!0);const p=f=>{l.current&&!l.current.contains(f.target)&&a()},u=f=>{f.key==="Escape"&&a()};return document.addEventListener("mousedown",p),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",u)}},[a]),m?t.jsx("div",{ref:l,className:"w-pop",style:{position:"fixed",zIndex:1001,width:380,maxWidth:"calc(100vw - 24px)",top:(d==null?void 0:d.top)!==void 0?`${d.top}px`:void 0,bottom:(d==null?void 0:d.bottom)!==void 0?`${d.bottom}px`:void 0,left:(d==null?void 0:d.left)!==void 0?`${d.left}px`:void 0,right:(d==null?void 0:d.right)!==void 0?`${d.right}px`:void 0,maxHeight:d!=null&&d.maxHeight?`${d.maxHeight}px`:void 0,visibility:d?"visible":"hidden"},onClick:p=>p.stopPropagation(),children:t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-2",children:[t.jsx("div",{className:"w-pop-title",children:"Backup Codes"}),t.jsxs("div",{className:"w-flex w-gap-2 w-none",children:[t.jsxs(se,{$outline:!0,$size:"sm",onClick:s,children:[t.jsx(Ga,{size:14}),"Copy"]}),t.jsxs(se,{$outline:!0,$size:"sm",onClick:r,children:[t.jsx(ml,{size:14}),"DownloadSimple"]})]})]}),t.jsx("p",{className:"w-pop-sub",children:"Save these backup codes in a secure location. Each code can only be used once."}),t.jsx("div",{className:"w-codes",children:e.map((p,u)=>t.jsx("span",{role:"button",style:{cursor:"pointer"},onClick:()=>{navigator.clipboard.writeText(p)},title:"Click to copy",children:p},u))}),t.jsxs("div",{className:"w-banner w-banner--warn",children:[t.jsx("span",{style:{fontSize:13.5},children:"⚠️"}),t.jsx("span",{className:"w-banner-txt",children:"Keep these codes safe! They won't be shown again."})]})]})}):null},I6=({onClose:e,onAddPasskey:a,triggerRef:s})=>{const r=o.useRef(null),[i,l]=o.useState(!1),[m,c]=o.useState(""),[d,p]=o.useState(!1),[u,f]=o.useState(""),h=bt({contentRef:r,triggerRef:s??{current:null},isOpen:i,minWidth:320,defaultMaxHeight:260});o.useEffect(()=>{l(!0);const x=b=>{r.current&&!r.current.contains(b.target)&&e()},w=b=>{b.key==="Escape"&&e()};return document.addEventListener("mousedown",x),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",w)}},[e]);const g=async()=>{if(!d){p(!0),f("");try{await a(m.trim()),e()}catch(x){f(x.message||"Failed to register passkey"),p(!1)}}};return i?t.jsxs("div",{ref:r,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(h==null?void 0:h.top)!==void 0?`${h.top}px`:void 0,bottom:(h==null?void 0:h.bottom)!==void 0?`${h.bottom}px`:void 0,left:(h==null?void 0:h.left)!==void 0?`${h.left}px`:void 0,right:(h==null?void 0:h.right)!==void 0?`${h.right}px`:void 0,maxHeight:h!=null&&h.maxHeight?`${h.maxHeight}px`:void 0,visibility:h?"visible":"hidden"},onClick:x=>x.stopPropagation(),children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Add Passkey"}),t.jsx(ye,{type:"text",placeholder:"e.g., MacBook Pro, iPhone",value:m,onChange:x=>c(x.target.value),autoFocus:!0}),u&&t.jsx("span",{className:"w-input-err",children:u})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:g,disabled:d,children:d?"Registering...":"Continue"})]})]}):null},V6=({children:e})=>t.jsx("div",{className:"w-eyebrow",children:e}),z6=()=>{var na,ra,ia,oa,ie,ve,Ae;const{deployment:e}=Ce(),{user:a,updatePassword:s,removePassword:r,setupAuthenticator:i,verifyAuthenticator:l,deleteAuthenticator:m,generateBackupCodes:c,regenerateBackupCodes:d,updateProfile:p,getPasskeys:u,registerPasskey:f,deletePasskey:h}=ba(),{toast:g}=ta(),[x,w]=o.useState((a==null?void 0:a.second_factor_policy)||"none"),[b,j]=o.useState(!1),v=async J=>{try{await p({second_factor_policy:J}),w(J),g("2FA requirement updated successfully","info")}catch(be){g(be.message||"Failed to update 2FA requirement","error")}},[k,N]=o.useState(!1),[_,C]=o.useState(!1),[y,E]=o.useState(!1),[A,H]=o.useState(!1),M=o.useRef(null),T=o.useRef(null),P=o.useRef(null),S=o.useRef(null),[$,Z]=o.useState([]),[R,L]=o.useState(!1),[O,F]=o.useState(!1),[W,U]=o.useState(!1),[V,G]=o.useState(!1),[Y,de]=o.useState(null),fe=o.useRef(null),[ne,ae]=o.useState("table"),[re,Le]=o.useState(""),[K,at]=o.useState(""),[ze,We]=o.useState(""),[Re,ce]=o.useState(["",""]),[B,q]=o.useState([]),[X,oe]=o.useState(!1),[Ee,z]=o.useState(!1),[D]=o.useState(!1),[we,ge]=o.useState(!1),xe=(na=e==null?void 0:e.auth_settings)==null?void 0:na.auth_factors_enabled,lt=(ia=(ra=e==null?void 0:e.auth_settings)==null?void 0:ra.password)==null?void 0:ia.enabled;if(!(xe!=null&&xe.authenticator)&&!(xe!=null&&xe.backup_code)&&!lt)return null;const Qe=async(J,be)=>{await s(J,be),await a.refetch(),g("Password updated successfully","info")},Q=async J=>{await r(J),await a.refetch(),g("Password removed successfully","info")},le=()=>{var _t,Ke,wt,Bt,la,ca;if(!a)return!1;const J=(_t=a.user_email_addresses)==null?void 0:_t.some(da=>da.verified),be=(Ke=a.user_phone_numbers)==null?void 0:Ke.some(da=>da.verified),Je=a.social_connections&&a.social_connections.length>0,De=e==null?void 0:e.auth_settings;return(De==null?void 0:De.first_factor)==="email_otp"&&J||((wt=De==null?void 0:De.magic_link)==null?void 0:wt.enabled)&&J||((Bt=De==null?void 0:De.passkey)==null?void 0:Bt.enabled)||((la=De==null?void 0:De.auth_factors_enabled)==null?void 0:la.phone_otp)&&be||Je&&((ca=e==null?void 0:e.social_connections)==null?void 0:ca.some(da=>da.enabled))},me=async()=>{if(Re.some(J=>J.length!==6)){g("Please enter both 6-digit verification codes","error");return}try{if(z(!0),await l(ze,Re),await a.refetch(),xe!=null&&xe.backup_code){const J=await c();q(J),await a.refetch(),ae("backup")}else ae("success")}catch(J){g(J.message||"Invalid verification codes","error")}finally{z(!1)}},Te=()=>{ae("table"),Le(""),at(""),We(""),ce(["",""]),q([]),g("Two-factor authentication setup completed successfully!","info")},Pe=async()=>{var J;if((J=a==null?void 0:a.user_authenticator)!=null&&J.id)try{ge(!0),await m(a.user_authenticator.id),await a.refetch(),j(!1),g("Two-factor authentication removed successfully","info")}catch(be){g(be.message||"Failed to remove authenticator","error")}finally{ge(!1)}},qe=async()=>{if(!X)try{oe(!0);const J=await d();q(J),await a.refetch(),H(!0),g("New backup codes generated","info")}catch(J){g(J.message||"Failed to generate backup codes","error")}finally{oe(!1)}},pt=()=>{const J=B.join(`
117
- `);navigator.clipboard.writeText(J).then(()=>{g("Backup codes copied to clipboard","info")}).catch(()=>{g("Failed to copy backup codes","error")})},aa=()=>{const J=B.join(`
118
- `),be=new Blob([J],{type:"text/plain"}),Je=URL.createObjectURL(be),De=document.createElement("a");De.href=Je,De.download="wacht-backup-codes.txt",De.click(),URL.revokeObjectURL(Je),g("Backup codes downloaded","info")},Tt=async()=>{var J,be;if((be=(J=e==null?void 0:e.auth_settings)==null?void 0:J.passkey)!=null&&be.enabled)try{L(!0);const Je=await u();Z(Je.data||[])}catch{g("Failed to load passkeys","error")}finally{L(!1)}},sa=async J=>{try{F(!0),await f(J||void 0),await Tt(),g("Passkey registered successfully!","info")}catch(be){throw g(be.message||"Failed to register passkey","error"),be}finally{F(!1)}},Wt=async J=>{try{await h(J),await Tt(),g("Passkey removed","info")}catch(be){g(be.message||"Failed to remove passkey","error")}};o.useEffect(()=>{Tt()},[(ie=(oa=e==null?void 0:e.auth_settings)==null?void 0:oa.passkey)==null?void 0:ie.enabled]);const yt=[];return lt&&yt.push({id:"password",name:"Password",description:"Secure your account with a strong password",status:a!=null&&a.has_password?"Enabled":"Disabled",actions:a!=null&&a.has_password?["change"]:["setup"],group:"sign-in"}),(Ae=(ve=e==null?void 0:e.auth_settings)==null?void 0:ve.passkey)!=null&&Ae.enabled&&yt.push({id:"passkey",name:"Passkeys",description:"Sign in faster with fingerprint, face, or screen lock",status:$.length>0?`${$.length} registered`:"",actions:$.length>0?["manage","add"]:["add"],group:"sign-in"}),xe!=null&&xe.authenticator&&yt.push({id:"authenticator",name:"Authenticator App",description:"Use an authenticator app for extra security",status:a!=null&&a.user_authenticator?"Enabled":"Disabled",actions:a!=null&&a.user_authenticator?["remove"]:["setup"],group:"sign-in"}),a!=null&&a.user_authenticator&&yt.push({id:"backup_codes",name:"Backup Codes",description:"Recovery codes if you lose your authenticator",status:a!=null&&a.backup_codes_generated?"Generated":"Not Generated",actions:["generate"],group:"recovery"}),a!=null&&a.user_authenticator&&yt.push({id:"second_factor_policy",name:"Require 2FA",description:"Require a second factor for all sign-ins",status:x==="enforced"?"Enforced":"Optional",actions:["toggle"],group:"recovery"}),ne!=="table"?t.jsxs(t.Fragment,{children:[t.jsxs(w0,{children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[t.jsx(Xt,{size:16}),t.jsxs("span",{className:"w-sec",children:[ne==="qr"&&"Setup Two-Factor Authentication",ne==="verify"&&"Verify Your Authenticator",ne==="backup"&&"Save Your Backup Codes",ne==="success"&&"Setup Complete!"]})]}),t.jsx(se,{$outline:!0,$size:"sm",onClick:()=>ae("table"),children:"← Back"})]}),t.jsxs("div",{className:"w-narrow w-flex-col w-items-center w-gap-5",style:{textAlign:"center"},children:[ne==="qr"&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"w-secsub",children:"Scan this QR code with your authenticator app (Google Authenticator, Authy, etc.)"}),t.jsx("div",{className:"w-flex w-justify-center",children:D?t.jsxs("div",{className:"w-qr w-flex-col w-items-center w-gap-3",children:[t.jsx("span",{className:"w-spin"}),t.jsx("div",{className:"w-secsub",children:"Loading QR Code..."})]}):re?t.jsx("div",{className:"w-tile w-flex w-items-center w-justify-center",children:t.jsx(zr,{value:re,size:200,level:"M",marginSize:0})}):t.jsx("div",{className:"w-qr w-text-error",children:"QR Code Not Available"})}),t.jsxs("div",{className:"w-flex-col w-gap-2 w-full",children:[t.jsx("p",{className:"w-secsub",children:"Or enter this code manually:"}),t.jsx("div",{className:"w-token",children:t.jsx("code",{children:K||"Loading..."})})]}),t.jsx(se,{$fullWidth:!0,onClick:()=>ae("verify"),disabled:!re||!K,children:"I've Scanned the Code"})]}),ne==="verify"&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"w-secsub",children:"Enter two consecutive codes from your authenticator app to verify setup"}),t.jsxs("div",{className:"w-flex w-justify-center w-gap-3",children:[t.jsx(ye,{type:"text",placeholder:"000000",value:Re[0],onChange:J=>{const be=J.target.value.replace(/[^0-9]/g,"").substring(0,6);ce([be,Re[1]])},maxLength:6,style:{textAlign:"center",fontFamily:"monospace"}}),t.jsx(ye,{type:"text",placeholder:"000000",value:Re[1],onChange:J=>{const be=J.target.value.replace(/[^0-9]/g,"").substring(0,6);ce([Re[0],be])},maxLength:6,style:{textAlign:"center",fontFamily:"monospace"}})]}),t.jsxs("div",{className:"w-flex w-justify-center w-gap-3",children:[t.jsx(se,{$outline:!0,$size:"sm",onClick:()=>ae("qr"),children:"Back"}),t.jsx(se,{$size:"sm",onClick:me,disabled:Ee||Re.some(J=>J.length!==6),children:Ee?"Verifying...":"Verify & Continue"})]})]}),ne==="backup"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-banner w-banner--warn",style:{textAlign:"left"},children:[t.jsx(Fa,{size:16}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Important!"}),t.jsx("div",{className:"w-banner-txt",children:"Store these codes safely. Each code can only be used once if you lose access to your authenticator device."})]})]}),t.jsx("div",{className:"w-codes w-full",children:B.map((J,be)=>t.jsx("span",{onClick:()=>navigator.clipboard.writeText(J),style:{cursor:"pointer"},children:J},be))}),t.jsxs("div",{className:"w-flex w-justify-center w-gap-3",children:[t.jsx(se,{$outline:!0,$size:"sm",onClick:pt,children:"Copy All"}),t.jsxs(se,{$outline:!0,$size:"sm",onClick:aa,children:[t.jsx(ml,{size:16}),"DownloadSimple"]})]}),t.jsx(se,{$fullWidth:!0,onClick:Te,children:"Complete Setup"})]}),ne==="success"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ye,{size:26})})]}),t.jsxs("div",{className:"w-flex-col w-gap-1 w-items-center",children:[t.jsx("h3",{className:"w-title",children:"All Set!"}),t.jsx("p",{className:"w-secsub",children:"Your account is now protected with two-factor authentication."})]}),t.jsx(se,{$fullWidth:!0,onClick:Te,children:"Continue to Security"})]})]})]}):t.jsx(t.Fragment,{children:yt.length?t.jsx("div",{children:yt.map((J,be)=>{const Je=be>0?yt[be-1].group:null,De=J.group!==Je,jt=yt[be+1],_t=jt&&jt.group===J.group;return t.jsxs("div",{children:[De&&t.jsx(V6,{$first:be===0,children:J.group==="sign-in"?"Sign-in methods":"Recovery"}),t.jsxs(g0,{children:[t.jsxs(x0,{children:[t.jsx("div",{className:"w-flex w-items-center w-wrap w-gap-2 w-sec",children:t.jsx("span",{children:J.name})}),t.jsx("div",{className:"w-secsub",children:J.description})]}),t.jsx(v0,{children:t.jsxs("div",{className:"w-relative",children:[J.id==="password"&&t.jsx(t.Fragment,{children:a!=null&&a.has_password?t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:T,onClick:()=>C(!0),children:"Change"}),_&&t.jsx(Qi,{triggerRef:T,onClose:()=>C(!1),onChangePassword:Qe})]}),le()&&t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$destructive:!0,$size:"sm",ref:P,onClick:()=>E(!0),children:"Remove"}),y&&t.jsx(H6,{triggerRef:P,onClose:()=>E(!1),onRemovePassword:Q})]})]}):t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:T,onClick:()=>C(!0),children:"Setup"}),_&&t.jsx(Qi,{triggerRef:T,onClose:()=>C(!1),onChangePassword:Qe,isSetup:!0})]})}),J.id==="authenticator"&&!(a!=null&&a.user_authenticator)&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:M,onClick:()=>N(!0),disabled:D,children:D?"Setting up...":"Setup"}),k&&t.jsx(F6,{triggerRef:M,onClose:()=>N(!1),onSetupTOTP:async()=>{const Ke=await i();return We(Ke.id),Ke},onVerifyTOTP:async Ke=>{await l(ze,Ke),await a.refetch(),g("Two-factor authentication enabled successfully!","info")}})]})}),J.id==="authenticator"&&(a==null?void 0:a.user_authenticator)&&t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$destructive:!0,$size:"sm",onClick:()=>j(!0),disabled:we,children:we?"Removing...":"Remove"}),b&&t.jsx(Qa,{title:"Remove MFA and reset policy to default?",onConfirm:Pe,onCancel:()=>j(!1)})]}),J.id==="backup_codes"&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:S,onClick:qe,disabled:X,children:X?"Generating...":a!=null&&a.backup_codes_generated?"Regenerate":"Generate"}),A&&t.jsx(T6,{triggerRef:S,codes:B,onClose:()=>H(!1),onCopy:pt,onDownload:aa})]})}),J.id==="second_factor_policy"&&t.jsx(Za,{checked:x==="enforced",onChange:Ke=>{v(Ke?"enforced":"none")}}),J.id==="passkey"&&t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsxs(se,{$outline:!0,$size:"sm",onClick:()=>U(!W),children:[W?"Hide":"Manage"," ","(",$.length,")",t.jsx(Ut,{size:14,style:{transform:W?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})]}),t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:fe,onClick:()=>G(!0),disabled:O,children:O?"Adding...":"Add"}),V&&t.jsx(I6,{triggerRef:fe,onClose:()=>G(!1),onAddPasskey:sa})]})]})]})})]}),J.id==="passkey"&&W&&t.jsx("div",{className:"w-flex-col w-gap-2",children:R?t.jsx("div",{className:"w-loading",children:t.jsx(_e,{})}):$.length===0?t.jsx("div",{className:"w-empty",children:t.jsx("p",{children:"No passkeys registered yet"})}):t.jsx("div",{className:"w-flex-col w-gap-2",children:$.map(Ke=>t.jsxs("div",{className:"w-locked w-flex w-items-center w-justify-between",style:{height:"auto",padding:"10px 12px"},children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-sec",children:Ke.name||"Unnamed Passkey"}),t.jsxs("span",{className:"w-secsub",children:[Ke.device_type==="platform"?"This device":"Security key",Ke.last_used_at&&` • Last used ${new Date(Ke.last_used_at).toLocaleDateString()}`]})]}),t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$destructive:!0,$size:"sm",onClick:()=>de(Ke.id),children:"Remove"}),Y===Ke.id&&t.jsx(Qa,{title:`Remove "${Ke.name||"Unnamed Passkey"}"?`,onConfirm:()=>{Wt(Ke.id),de(null)},onCancel:()=>de(null)})]})]},Ke.id))})}),_t&&t.jsx("div",{className:"w-hr"})]},J.id)})}):t.jsx(Nt,{title:"No security features available",description:"Contact your administrator to enable security features."})})},D6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",...e,children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:"a",x1:3.217,x2:44.781,y1:15,y2:15,gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#d93025"}),t.jsx("stop",{offset:1,stopColor:"#ea4335"})]}),t.jsxs("linearGradient",{id:"b",x1:20.722,x2:41.504,y1:47.679,y2:11.684,gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#fcc934"}),t.jsx("stop",{offset:1,stopColor:"#fbbc04"})]}),t.jsxs("linearGradient",{id:"c",x1:26.598,x2:5.816,y1:46.502,y2:10.506,gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#1e8e3e"}),t.jsx("stop",{offset:1,stopColor:"#34a853"})]})]}),t.jsx("circle",{cx:24,cy:23.995,r:12,style:{fill:"#fff"}}),t.jsx("path",{d:"M3.215 36A24 24 0 1 0 12 3.215 24 24 0 0 0 3.215 36Zm31.177-18A12 12 0 1 1 18 13.608 12 12 0 0 1 34.392 18Z",style:{fill:"none"}}),t.jsx("path",{d:"M24 12h20.781a23.994 23.994 0 0 0-41.564.003L13.607 30l.01-.002A11.985 11.985 0 0 1 24 12Z",style:{fill:"url(#a)"}}),t.jsx("circle",{cx:24,cy:24,r:9.5,style:{fill:"#1a73e8"}}),t.jsx("path",{d:"M34.391 30.003 24.001 48A23.994 23.994 0 0 0 44.78 12.003H23.999l-.003.01a11.985 11.985 0 0 1 10.395 17.99Z",style:{fill:"url(#b)"}}),t.jsx("path",{d:"M13.609 30.003 3.218 12.006A23.994 23.994 0 0 0 24.003 48l10.39-17.997-.007-.007a11.985 11.985 0 0 1-20.777.007Z",style:{fill:"url(#c)"}})]}),U6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:512,height:512,viewBox:"0 0 512 512",...e,children:[t.jsxs("defs",{children:[t.jsxs("radialGradient",{id:"g",cx:"210%",cy:"-100%",r:"290%",children:[t.jsx("stop",{offset:.1,stopColor:"#ffe226"}),t.jsx("stop",{offset:.79,stopColor:"#ff7139"})]}),t.jsxs("radialGradient",{id:"c",cx:"49%",cy:"40%",r:"128%",gradientTransform:"matrix(.82 0 0 1 .088 0)",children:[t.jsx("stop",{offset:.3,stopColor:"#960e18"}),t.jsx("stop",{offset:.35,stopColor:"#b11927",stopOpacity:.74}),t.jsx("stop",{offset:.43,stopColor:"#db293d",stopOpacity:.34}),t.jsx("stop",{offset:.5,stopColor:"#f5334b",stopOpacity:.09}),t.jsx("stop",{offset:.53,stopColor:"#ff3750",stopOpacity:0})]}),t.jsxs("radialGradient",{id:"d",cx:"48%",cy:"-12%",r:"140%",children:[t.jsx("stop",{offset:.13,stopColor:"#fff44f"}),t.jsx("stop",{offset:.53,stopColor:"#ff980e"})]}),t.jsxs("radialGradient",{id:"e",cx:"22.76%",cy:"110.11%",r:"100%",children:[t.jsx("stop",{offset:.35,stopColor:"#3a8ee6"}),t.jsx("stop",{offset:.67,stopColor:"#9059ff"}),t.jsx("stop",{offset:1,stopColor:"#c139e6"})]}),t.jsxs("radialGradient",{id:"f",cx:"52%",cy:"33%",r:"59%",gradientTransform:"scale(.9 1)",children:[t.jsx("stop",{offset:.21,stopColor:"#9059ff",stopOpacity:0}),t.jsx("stop",{offset:.97,stopColor:"#6e008b",stopOpacity:.6})]}),t.jsxs("radialGradient",{id:"b",cx:"87.4%",cy:"-12.9%",r:"128%",gradientTransform:"matrix(.8 0 0 1 .178 .129)",children:[t.jsx("stop",{offset:.13,stopColor:"#ffbd4f"}),t.jsx("stop",{offset:.28,stopColor:"#ff980e"}),t.jsx("stop",{offset:.47,stopColor:"#ff3750"}),t.jsx("stop",{offset:.78,stopColor:"#eb0878"}),t.jsx("stop",{offset:.86,stopColor:"#e50080"})]}),t.jsxs("radialGradient",{id:"h",cx:"84%",cy:"-41%",r:"180%",children:[t.jsx("stop",{offset:.11,stopColor:"#fff44f"}),t.jsx("stop",{offset:.46,stopColor:"#ff980e"}),t.jsx("stop",{offset:.72,stopColor:"#ff3647"}),t.jsx("stop",{offset:.9,stopColor:"#e31587"})]}),t.jsxs("radialGradient",{id:"i",cx:"16.1%",cy:"-18.6%",r:"348.8%",gradientTransform:"scale(1 .47) rotate(84 .279 -.297)",children:[t.jsx("stop",{offset:0,stopColor:"#fff44f"}),t.jsx("stop",{offset:.3,stopColor:"#ff980e"}),t.jsx("stop",{offset:.57,stopColor:"#ff3647"}),t.jsx("stop",{offset:.74,stopColor:"#e31587"})]}),t.jsxs("radialGradient",{id:"j",cx:"18.9%",cy:"-42.5%",r:"238.4%",children:[t.jsx("stop",{offset:.14,stopColor:"#fff44f"}),t.jsx("stop",{offset:.48,stopColor:"#ff980e"}),t.jsx("stop",{offset:.66,stopColor:"#ff3647"}),t.jsx("stop",{offset:.9,stopColor:"#e31587"})]}),t.jsxs("radialGradient",{id:"k",cx:"159.3%",cy:"-44.72%",r:"313.1%",children:[t.jsx("stop",{offset:.09,stopColor:"#fff44f"}),t.jsx("stop",{offset:.63,stopColor:"#ff980e"})]}),t.jsxs("linearGradient",{id:"a",x1:"87.25%",x2:"9.4%",y1:"15.5%",y2:"93.1%",children:[t.jsx("stop",{offset:.05,stopColor:"#fff44f"}),t.jsx("stop",{offset:.37,stopColor:"#ff980e"}),t.jsx("stop",{offset:.53,stopColor:"#ff3647"}),t.jsx("stop",{offset:.7,stopColor:"#e31587"})]}),t.jsxs("linearGradient",{id:"l",x1:"80%",x2:"18%",y1:"14%",y2:"84%",children:[t.jsx("stop",{offset:.17,stopColor:"#fff44f",stopOpacity:.8}),t.jsx("stop",{offset:.6,stopColor:"#fff44f",stopOpacity:0})]})]}),t.jsx("path",{fill:"url(#a)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0 .039.015.136.047.4C427.706 111.135 381.627 83.823 344 24.355c-1.9-3.007-3.805-6.022-5.661-9.2a73.716 73.716 0 0 1-2.646-4.972A43.7 43.7 0 0 1 332.1.677a.626.626 0 0 0-.546-.644.818.818 0 0 0-.451 0c-.034.012-.084.051-.12.065-.053.021-.12.069-.176.1.027-.036.083-.117.1-.136-60.37 35.356-80.85 100.761-82.732 133.484a120.249 120.249 0 0 0-66.142 25.488 71.355 71.355 0 0 0-6.225-4.7 111.338 111.338 0 0 1-.674-58.732c-24.688 11.241-43.89 29.01-57.85 44.7h-.111c-9.527-12.067-8.855-51.873-8.312-60.184-.114-.515-7.107 3.63-8.023 4.255a175.073 175.073 0 0 0-23.486 20.12 210.478 210.478 0 0 0-22.442 26.913c0 .012-.007.026-.011.038 0-.013.007-.026.011-.038a202.838 202.838 0 0 0-32.247 72.805c-.115.521-.212 1.061-.324 1.586-.452 2.116-2.08 12.7-2.365 15-.022.177-.032.347-.053.524a229.066 229.066 0 0 0-3.9 33.157c0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746zM201.716 354.447c1.124.537 2.18 1.124 3.334 1.639.048.033.114.07.163.1a126.191 126.191 0 0 1-3.497-1.739zm55.053-144.93zm198.131-30.59-.032-.233c.012.085.027.174.04.259z"}),t.jsx("path",{fill:"url(#b)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0-.058.011.048.036.226.012.085.027.174.04.259 22.675 61.47 10.322 123.978-7.479 162.175-27.539 59.1-94.215 119.67-198.576 116.716C136.1 454.651 36.766 370.988 18.223 261.41c-3.379-17.28 0-26.054 1.7-40.084-2.071 10.816-2.86 13.94-3.9 33.157 0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746z"}),t.jsx("path",{fill:"url(#c)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0-.058.011.048.036.226.012.085.027.174.04.259 22.675 61.47 10.322 123.978-7.479 162.175-27.539 59.1-94.215 119.67-198.576 116.716C136.1 454.651 36.766 370.988 18.223 261.41c-3.379-17.28 0-26.054 1.7-40.084-2.071 10.816-2.86 13.94-3.9 33.157 0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746z"}),t.jsx("path",{fill:"url(#d)",d:"M361.922 194.6c.524.368 1 .734 1.493 1.1a130.706 130.706 0 0 0-22.31-29.112C266.4 91.892 321.516 4.626 330.811.194c.027-.036.083-.117.1-.136-60.37 35.356-80.85 100.761-82.732 133.484 2.8-.194 5.592-.429 8.442-.429 45.051 0 84.289 24.77 105.301 61.487z"}),t.jsx("path",{fill:"url(#e)",d:"M256.772 209.514c-.393 5.978-21.514 26.593-28.9 26.593-68.339 0-79.432 41.335-79.432 41.335 3.027 34.81 27.261 63.475 56.611 78.643 1.339.692 2.694 1.317 4.05 1.935a132.768 132.768 0 0 0 7.059 2.886 106.743 106.743 0 0 0 31.271 6.031c119.78 5.618 142.986-143.194 56.545-186.408 22.137-3.85 45.115 5.053 57.947 14.067-21.012-36.714-60.25-61.484-105.3-61.484-2.85 0-5.641.235-8.442.429a120.249 120.249 0 0 0-66.142 25.488c3.664 3.1 7.8 7.244 16.514 15.828 16.302 16.067 58.13 32.705 58.219 34.657z"}),t.jsx("path",{fill:"url(#f)",d:"M256.772 209.514c-.393 5.978-21.514 26.593-28.9 26.593-68.339 0-79.432 41.335-79.432 41.335 3.027 34.81 27.261 63.475 56.611 78.643 1.339.692 2.694 1.317 4.05 1.935a132.768 132.768 0 0 0 7.059 2.886 106.743 106.743 0 0 0 31.271 6.031c119.78 5.618 142.986-143.194 56.545-186.408 22.137-3.85 45.115 5.053 57.947 14.067-21.012-36.714-60.25-61.484-105.3-61.484-2.85 0-5.641.235-8.442.429a120.249 120.249 0 0 0-66.142 25.488c3.664 3.1 7.8 7.244 16.514 15.828 16.302 16.067 58.13 32.705 58.219 34.657z"}),t.jsx("path",{fill:"url(#g)",d:"M170.829 151.036a244.042 244.042 0 0 1 4.981 3.3 111.338 111.338 0 0 1-.674-58.732c-24.688 11.241-43.89 29.01-57.85 44.7 1.155-.033 36.014-.66 53.543 10.732z"}),t.jsx("path",{fill:"url(#h)",d:"M18.223 261.41C36.766 370.988 136.1 454.651 248.855 457.844c104.361 2.954 171.037-57.62 198.576-116.716 17.8-38.2 30.154-100.7 7.479-162.175l-.008-.026-.032-.233c-.025-.178-.04-.284-.036-.226 0 .039.015.136.047.4 8.524 55.661-19.79 109.584-64.051 146.044l-.133.313c-86.245 70.223-168.774 42.368-185.484 30.966a144.108 144.108 0 0 1-3.5-1.743c-50.282-24.029-71.054-69.838-66.6-109.124-42.457 0-56.934-35.809-56.934-35.809s38.119-27.179 88.358-3.541c46.53 21.893 90.228 3.543 90.233 3.541-.089-1.952-41.917-18.59-58.223-34.656-8.713-8.584-12.85-12.723-16.514-15.828a71.355 71.355 0 0 0-6.225-4.7 282.929 282.929 0 0 0-4.981-3.3c-17.528-11.392-52.388-10.765-53.543-10.735h-.111c-9.527-12.067-8.855-51.873-8.312-60.184-.114-.515-7.107 3.63-8.023 4.255a175.073 175.073 0 0 0-23.486 20.12 210.478 210.478 0 0 0-22.442 26.919c0 .012-.007.026-.011.038 0-.013.007-.026.011-.038a202.838 202.838 0 0 0-32.247 72.805c-.115.521-8.65 37.842-4.44 57.199z"}),t.jsx("path",{fill:"url(#i)",d:"M341.105 166.587a130.706 130.706 0 0 1 22.31 29.112c1.323.994 2.559 1.985 3.608 2.952 54.482 50.2 25.936 121.2 23.807 126.26 44.261-36.46 72.575-90.383 64.051-146.044C427.706 111.135 381.627 83.823 344 24.355c-1.9-3.007-3.805-6.022-5.661-9.2a73.716 73.716 0 0 1-2.646-4.972A43.7 43.7 0 0 1 332.1.677a.626.626 0 0 0-.546-.644.818.818 0 0 0-.451 0c-.034.012-.084.051-.12.065-.053.021-.12.069-.176.1-9.291 4.428-64.407 91.694 10.298 166.389z"}),t.jsx("path",{fill:"url(#j)",d:"M367.023 198.651c-1.049-.967-2.285-1.958-3.608-2.952-.489-.368-.969-.734-1.493-1.1-12.832-9.014-35.81-17.917-57.947-14.067 86.441 43.214 63.235 192.026-56.545 186.408a106.743 106.743 0 0 1-31.271-6.031 134.51 134.51 0 0 1-7.059-2.886c-1.356-.618-2.711-1.243-4.05-1.935.048.033.114.07.163.1 16.71 11.4 99.239 39.257 185.484-30.966l.133-.313c2.129-5.054 30.675-76.057-23.807-126.258z"}),t.jsx("path",{fill:"url(#k)",d:"M148.439 277.443s11.093-41.335 79.432-41.335c7.388 0 28.509-20.615 28.9-26.593s-43.7 18.352-90.233-3.541c-50.239-23.638-88.358 3.541-88.358 3.541s14.477 35.809 56.934 35.809c-4.453 39.286 16.319 85.1 66.6 109.124 1.124.537 2.18 1.124 3.334 1.639-29.348-15.169-53.582-43.834-56.609-78.644z"}),t.jsx("path",{fill:"url(#l)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0 .039.015.136.047.4C427.706 111.135 381.627 83.823 344 24.355c-1.9-3.007-3.805-6.022-5.661-9.2a73.716 73.716 0 0 1-2.646-4.972A43.7 43.7 0 0 1 332.1.677a.626.626 0 0 0-.546-.644.818.818 0 0 0-.451 0c-.034.012-.084.051-.12.065-.053.021-.12.069-.176.1.027-.036.083-.117.1-.136-60.37 35.356-80.85 100.761-82.732 133.484 2.8-.194 5.592-.429 8.442-.429 45.053 0 84.291 24.77 105.3 61.484-12.832-9.014-35.81-17.917-57.947-14.067 86.441 43.214 63.235 192.026-56.545 186.408a106.743 106.743 0 0 1-31.271-6.031 134.51 134.51 0 0 1-7.059-2.886c-1.356-.618-2.711-1.243-4.05-1.935.048.033.114.07.163.1a144.108 144.108 0 0 1-3.5-1.743c1.124.537 2.18 1.124 3.334 1.639-29.35-15.168-53.584-43.833-56.611-78.643 0 0 11.093-41.335 79.432-41.335 7.388 0 28.509-20.615 28.9-26.593-.089-1.952-41.917-18.59-58.223-34.656-8.713-8.584-12.85-12.723-16.514-15.828a71.355 71.355 0 0 0-6.225-4.7 111.338 111.338 0 0 1-.674-58.732c-24.688 11.241-43.89 29.01-57.85 44.7h-.111c-9.527-12.067-8.855-51.873-8.312-60.184-.114-.515-7.107 3.63-8.023 4.255a175.073 175.073 0 0 0-23.486 20.12 210.478 210.478 0 0 0-22.435 26.916c0 .012-.007.026-.011.038 0-.013.007-.026.011-.038a202.838 202.838 0 0 0-32.247 72.805c-.115.521-.212 1.061-.324 1.586-.452 2.116-2.486 12.853-2.77 15.156-.022.177.021-.176 0 0a279.565 279.565 0 0 0-3.544 33.53c0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746zm-23.841 12.341c.012.085.027.174.04.259l-.008-.026-.032-.233z"})]}),W6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:250.076,height:248.707,viewBox:"0 0 66.166 65.804",...e,children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:"b",children:[t.jsx("stop",{offset:0,stopColor:"#06c2e7"}),t.jsx("stop",{offset:.25,stopColor:"#0db8ec"}),t.jsx("stop",{offset:.5,stopColor:"#12aef1"}),t.jsx("stop",{offset:.75,stopColor:"#1f86f9"}),t.jsx("stop",{offset:1,stopColor:"#107ddd"})]}),t.jsxs("linearGradient",{id:"a",children:[t.jsx("stop",{offset:0,stopColor:"#bdbdbd"}),t.jsx("stop",{offset:1,stopColor:"#fff"})]}),t.jsx("linearGradient",{xlinkHref:"#a",id:"d",x1:412.975,x2:412.975,y1:237.608,y2:59.392,gradientTransform:"translate(206.79 159.773) scale(.35154)",gradientUnits:"userSpaceOnUse"}),t.jsx("filter",{id:"f",width:1.042,height:1.045,x:-.021,y:-.022,colorInterpolationFilters:"sRGB",children:t.jsx("feGaussianBlur",{stdDeviation:.958})}),t.jsx("filter",{id:"c",width:1.096,height:1.096,x:-.048,y:-.048,colorInterpolationFilters:"sRGB",children:t.jsx("feGaussianBlur",{stdDeviation:3.564})}),t.jsx("radialGradient",{xlinkHref:"#b",id:"e",cx:413.061,cy:136.818,r:82.125,fx:413.061,fy:136.818,gradientTransform:"translate(194.545 155.58) scale(.38143)",gradientUnits:"userSpaceOnUse"})]}),t.jsx("path",{d:"M502.083 148.5a89.108 89.108 0 0 1-89.108 89.108 89.108 89.108 0 0 1-89.108-89.108 89.108 89.108 0 0 1 89.108-89.108 89.108 89.108 0 0 1 89.108 89.108Z",filter:"url(#c)",opacity:.53,paintOrder:"markers stroke fill",transform:"matrix(.33865 0 0 .3261 -106.77 -14.478)"}),t.jsx("path",{fill:"url(#d)",stroke:"#cdcdcd",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:.093,d:"M383.294 211.977a31.325 31.325 0 0 1-31.325 31.325 31.325 31.325 0 0 1-31.326-31.325 31.325 31.325 0 0 1 31.326-31.325 31.325 31.325 0 0 1 31.325 31.325z",paintOrder:"markers stroke fill",transform:"translate(-318.886 -180.595)"}),t.jsx("path",{fill:"url(#e)",d:"M380.84 211.977a28.87 28.87 0 0 1-28.871 28.87 28.87 28.87 0 0 1-28.871-28.87 28.87 28.87 0 0 1 28.87-28.87 28.87 28.87 0 0 1 28.871 28.87z",paintOrder:"markers stroke fill",transform:"translate(-318.886 -180.595)"}),t.jsx("path",{fill:"#f4f2f3",d:"M33.083 4.017a.42.42 0 0 0-.421.42v4.856a.42.42 0 1 0 .842 0V4.438a.42.42 0 0 0-.421-.421zm-2.754.174a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.087l-.212-2.03a.42.42 0 0 0-.377-.376zm5.527.002a.42.42 0 0 0-.377.375l-.214 2.03a.42.42 0 1 0 .837.089l.214-2.031a.42.42 0 0 0-.46-.463zM27.5 4.6a.42.42 0 0 0-.41.508l1.005 4.75a.42.42 0 1 0 .824-.174l-1.005-4.75A.42.42 0 0 0 27.5 4.6zm11.183.004a.42.42 0 0 0-.414.333l-1.009 4.75a.42.42 0 1 0 .824.175l1.009-4.75a.42.42 0 0 0-.41-.508zm-13.883.757a.42.42 0 0 0-.437.55l.632 1.942a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.365-.29zm16.568.001a.42.42 0 0 0-.364.29l-.632 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.436-.55zM22.13 6.34a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.972-4.437a.42.42 0 0 0-.393-.25zm21.937.015a.42.42 0 0 0-.392.25l-1.978 4.434a.42.42 0 1 0 .769.343l1.978-4.434a.42.42 0 0 0-.377-.593zM19.654 7.65a.42.42 0 0 0-.394.63l1.02 1.77a.42.42 0 1 0 .73-.421L19.989 7.86a.42.42 0 0 0-.335-.21zm26.858 0a.419.419 0 0 0-.335.21l-1.021 1.769a.42.42 0 1 0 .73.42l1.02-1.768a.42.42 0 0 0-.394-.63zm-29.265 1.5a.422.422 0 0 0-.326.669l2.85 3.93a.42.42 0 1 0 .682-.494l-2.85-3.93a.42.42 0 0 0-.356-.174zm31.702.022a.42.42 0 0 0-.356.174l-2.856 3.926a.42.42 0 1 0 .681.495l2.856-3.926a.42.42 0 0 0-.325-.669zm-33.852 1.783a.42.42 0 0 0-.335.702l1.366 1.518a.42.42 0 1 0 .626-.563l-1.366-1.518a.42.42 0 0 0-.291-.14zm35.975.003a.421.421 0 0 0-.29.139l-1.367 1.517a.42.42 0 1 0 .625.564l1.367-1.518a.42.42 0 0 0-.335-.702zm-38.037 1.977a.42.42 0 0 0-.26.733l3.61 3.249a.42.42 0 1 0 .563-.626l-3.609-3.248a.42.42 0 0 0-.304-.108zm40.109.014a.419.419 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .562.626l3.61-3.245a.42.42 0 0 0-.258-.734zm-41.823 2.19a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm43.535.015a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .495.681l1.653-1.2a.42.42 0 0 0-.262-.76zM9.72 17.49a.42.42 0 0 0-.18.785l4.204 2.427a.42.42 0 1 0 .42-.729L9.96 17.546a.42.42 0 0 0-.24-.056zm46.728 0a.417.417 0 0 0-.24.056l-4.205 2.427a.42.42 0 1 0 .42.73l4.206-2.428a.42.42 0 0 0-.181-.785zM8.508 19.996a.42.42 0 0 0-.18.806l1.866.832a.42.42 0 1 0 .343-.77l-1.866-.831a.42.42 0 0 0-.163-.037zm49.158.017a.42.42 0 0 0-.164.037l-1.865.83a.42.42 0 1 0 .342.77l1.866-.831a.42.42 0 0 0-.179-.806zM7.429 22.615a.42.42 0 0 0-.094.82l4.615 1.504a.42.42 0 1 0 .261-.8l-4.616-1.504a.421.421 0 0 0-.166-.02zm51.314.018a.408.408 0 0 0-.166.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.617-1.5a.42.42 0 0 0-.094-.82zM6.756 25.365a.42.42 0 0 0-.09.833l1.998.424a.42.42 0 1 0 .175-.823l-1.998-.425a.413.413 0 0 0-.085-.009zm52.655.004a.518.518 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zM6.247 28.13a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.829-.51a.432.432 0 0 0-.085 0zm53.676.037a.386.386 0 0 0-.085 0l-4.83.504a.42.42 0 1 0 .088.837l4.83-.504a.42.42 0 0 0-.003-.837zM6.165 30.96a.42.42 0 1 0 0 .842h2.043a.42.42 0 1 0 0-.842zm51.793 0a.42.42 0 1 0 0 .842h2.043a.42.42 0 1 0 0-.842zm-46.803 2.295a.384.384 0 0 0-.085 0l-4.83.504a.42.42 0 1 0 .088.838l4.83-.504a.42.42 0 0 0-.003-.838zm43.853.03a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.828-.51a.434.434 0 0 0-.086-.001zM8.748 36.13a.43.43 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zm48.67.004a.42.42 0 0 0-.09.833l1.997.424a.42.42 0 1 0 .175-.824l-1.998-.424a.413.413 0 0 0-.085-.01zM12.111 37.79a.408.408 0 0 0-.166.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.617-1.5a.42.42 0 0 0-.094-.82zm41.937.015a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.615-1.504a.421.421 0 0 0-.167-.02zM10.35 41.08a.42.42 0 0 0-.163.036l-1.866.831a.42.42 0 1 0 .342.769l1.866-.83a.42.42 0 0 0-.179-.806zm45.459.016a.42.42 0 0 0-.18.805l1.865.832a.42.42 0 1 0 .343-.769l-1.865-.832a.42.42 0 0 0-.163-.036zm-41.826.912a.417.417 0 0 0-.24.056L9.538 44.49a.42.42 0 1 0 .421.73l4.205-2.428a.42.42 0 0 0-.181-.785zm38.2 0a.42.42 0 0 0-.181.785l4.205 2.427a.42.42 0 1 0 .42-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm-39.249 3.562a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .495.682l1.653-1.2a.42.42 0 0 0-.262-.762zm40.288.015a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm-36.544.145a.418.418 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .562.626l3.61-3.245a.42.42 0 0 0-.258-.734zm32.8.011a.421.421 0 0 0-.26.734l3.609 3.248a.42.42 0 1 0 .563-.625l-3.608-3.249a.42.42 0 0 0-.304-.107zm-29.375 3.084a.42.42 0 0 0-.355.173l-2.856 3.927a.42.42 0 1 0 .68.495l2.857-3.926a.42.42 0 0 0-.326-.669zm25.936.018a.421.421 0 0 0-.326.668l2.85 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm-29.623.606a.421.421 0 0 0-.29.14l-1.367 1.517a.42.42 0 1 0 .625.563l1.367-1.517a.42.42 0 0 0-.335-.703zm33.331.002a.42.42 0 0 0-.335.702l1.366 1.518a.42.42 0 1 0 .626-.563l-1.366-1.518a.42.42 0 0 0-.291-.139zm-25.655 1.684a.419.419 0 0 0-.393.25l-1.978 4.433a.42.42 0 1 0 .77.343l1.977-4.434a.42.42 0 0 0-.376-.592zm17.955.012a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.972-4.437a.42.42 0 0 0-.393-.25zm-21.431 1.359a.419.419 0 0 0-.335.21l-1.021 1.768a.42.42 0 1 0 .729.421l1.02-1.769a.42.42 0 0 0-.393-.63zm24.934 0a.42.42 0 0 0-.394.63l1.021 1.77a.42.42 0 1 0 .73-.422l-1.022-1.769a.42.42 0 0 0-.335-.21zm-17.054.063a.42.42 0 0 0-.415.334l-1.009 4.749a.42.42 0 1 0 .824.175l1.009-4.75a.42.42 0 0 0-.41-.508zm9.16.003a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .823-.175l-1.006-4.75a.42.42 0 0 0-.414-.333zm-4.573.48a.42.42 0 0 0-.421.42v4.855a.42.42 0 1 0 .842 0v-4.855a.42.42 0 0 0-.421-.42zm-7.727 1.568a.42.42 0 0 0-.364.29l-.631 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.437-.55zm15.45 0a.42.42 0 0 0-.437.55l.632 1.943a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.365-.29zm-10.365 1.083a.42.42 0 0 0-.378.375l-.213 2.03a.42.42 0 1 0 .837.088l.214-2.03a.42.42 0 0 0-.46-.463zm5.267.002a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.088l-.212-2.03a.42.42 0 0 0-.377-.375z",paintOrder:"markers stroke fill"}),t.jsx("path",{d:"m469.096 100.607-65.51 38.061-41.42 65.207 60.595-44.882z",filter:"url(#f)",opacity:.409,paintOrder:"markers stroke fill",transform:"translate(-112.095 -20.822) scale(.35154)"}),t.jsx("path",{fill:"#ff5150",d:"m36.383 34.838-6.6-6.913 23.416-15.752z",paintOrder:"markers stroke fill"}),t.jsx("path",{fill:"#f1f1f1",d:"m36.383 34.838-6.6-6.913L12.966 50.59z",paintOrder:"markers stroke fill"}),t.jsx("path",{d:"m12.967 50.59 23.416-15.752L53.2 12.173z",opacity:.243})]}),B6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",...e,children:[t.jsxs("defs",{children:[t.jsxs("radialGradient",{id:"b",cx:161.8,cy:68.9,r:95.4,gradientTransform:"matrix(1 0 0 -.95 0 248.8)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:.7,stopOpacity:0}),t.jsx("stop",{offset:.9,stopOpacity:.5}),t.jsx("stop",{offset:1})]}),t.jsxs("radialGradient",{id:"d",cx:-340.3,cy:63,r:143.2,gradientTransform:"matrix(.15 -.99 -.8 -.12 176.6 -125.4)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:.8,stopOpacity:0}),t.jsx("stop",{offset:.9,stopOpacity:.5}),t.jsx("stop",{offset:1})]}),t.jsxs("radialGradient",{id:"e",cx:113.4,cy:570.2,r:202.4,gradientTransform:"matrix(-.04 1 2.13 .08 -1179.5 -106.7)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#35c1f1"}),t.jsx("stop",{offset:.1,stopColor:"#34c1ed"}),t.jsx("stop",{offset:.2,stopColor:"#2fc2df"}),t.jsx("stop",{offset:.3,stopColor:"#2bc3d2"}),t.jsx("stop",{offset:.7,stopColor:"#36c752"})]}),t.jsxs("radialGradient",{id:"f",cx:376.5,cy:568,r:97.3,gradientTransform:"matrix(.28 .96 .78 -.23 -303.8 -148.5)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#66eb6e"}),t.jsx("stop",{offset:1,stopColor:"#66eb6e",stopOpacity:0})]}),t.jsxs("linearGradient",{id:"a",x1:63.3,x2:241.7,y1:84,y2:84,gradientTransform:"matrix(1 0 0 -1 0 266)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#0c59a4"}),t.jsx("stop",{offset:1,stopColor:"#114a8b"})]}),t.jsxs("linearGradient",{id:"c",x1:157.3,x2:46,y1:161.4,y2:40.1,gradientTransform:"matrix(1 0 0 -1 0 266)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#1b9de2"}),t.jsx("stop",{offset:.2,stopColor:"#1595df"}),t.jsx("stop",{offset:.7,stopColor:"#0680d7"}),t.jsx("stop",{offset:1,stopColor:"#0078d4"})]})]}),t.jsx("path",{d:"M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z",style:{fill:"url(#a)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z",style:{isolation:"isolate",opacity:.35,fill:"url(#b)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z",style:{fill:"url(#c)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z",style:{opacity:.41,fill:"url(#d)",isolation:"isolate"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z",style:{fill:"url(#e)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z",style:{fill:"url(#f)"},transform:"translate(-4.6 -5)"})]}),G6=e=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,role:"img","aria-label":"Opera",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"opera-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:"#FF1B2D"}),t.jsx("stop",{offset:"50%",stopColor:"#CC0000"}),t.jsx("stop",{offset:"100%",stopColor:"#A02128"})]})}),t.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"url(#opera-gradient)"}),t.jsx("ellipse",{cx:"12",cy:"12",rx:"6.5",ry:"8.5",fill:"none",stroke:"#fff",strokeWidth:"1.2",opacity:"0.9"}),t.jsx("ellipse",{cx:"12",cy:"12",rx:"3.5",ry:"5.5",fill:"#fff"}),t.jsx("path",{d:"M12 8.5c-1.4 0-2.5 1.6-2.5 3.5s1.1 3.5 2.5 3.5 2.5-1.6 2.5-3.5-1.1-3.5-2.5-3.5z",fill:"url(#opera-gradient)"})]}),q6=e=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,role:"img","aria-label":"Brave",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"brave-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:"#FB542B"}),t.jsx("stop",{offset:"50%",stopColor:"#FF6B35"}),t.jsx("stop",{offset:"100%",stopColor:"#FF4500"})]})}),t.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"url(#brave-gradient)"}),t.jsx("path",{d:"M12 3.5l1.5 2h2.5l-.8 3 1.3 2.5-2.5.8v2.7l-2-.7-2 .7v-2.7l-2.5-.8L8.8 8.5 8 5.5h2.5L12 3.5z",fill:"#fff"}),t.jsx("path",{d:"M12 6.5c-.8 0-1.5.7-1.5 1.5v3c0 .8.7 1.5 1.5 1.5s1.5-.7 1.5-1.5V8c0-.8-.7-1.5-1.5-1.5z",fill:"url(#brave-gradient)"}),t.jsx("circle",{cx:"12",cy:"16",r:"1",fill:"url(#brave-gradient)"})]}),K6=()=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"w-text-secondary",children:[t.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.5",opacity:"0.6"}),t.jsx("circle",{cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor",strokeWidth:"0.5",opacity:"0.3"}),t.jsx("path",{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z",fill:"currentColor",opacity:"0.5"}),t.jsx("circle",{cx:"12",cy:"12",r:"1",fill:"currentColor"}),t.jsx("text",{x:"12",y:"16.5",textAnchor:"middle",fill:"currentColor",fontSize:"6",opacity:"0.7",children:"?"})]}),Y6=({browser:e})=>{const a=(e==null?void 0:e.toLowerCase())||"",s={width:20,height:20};return a.includes("chrome")?t.jsx(D6,{...s}):a.includes("firefox")?t.jsx(U6,{...s}):a.includes("safari")?t.jsx(W6,{...s}):a.includes("edge")?t.jsx(B6,{...s}):a.includes("opera")?t.jsx(G6,{...s}):a.includes("brave")?t.jsx(q6,{...s}):t.jsx(K6,{})},Q6=()=>{const{signins:e,removeSignin:a,refetch:s,loading:r}=Eo(),{refetch:i}=ot(),{toast:l}=ta(),m=e,c=async p=>{try{await a(p),await Promise.all([s(),i()]),l("Session ended successfully","info")}catch(u){l(u.message||"Failed to end session. Please try again.","error")}},d=p=>{if(!p||p.trim()==="")return"Unknown";const u=new Date(p);if(isNaN(u.getTime()))return"Unknown";const h=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return h<1?"Just now":h<60?`${h}m ago`:h<1440?`${Math.floor(h/60)}h ago`:u.toLocaleDateString()};return r?t.jsx("div",{className:"w-loading",children:t.jsx(_e,{})}):t.jsx("div",{children:m&&m.length>0?t.jsx(t.Fragment,{children:t.jsx(hn,{children:t.jsxs(Ot,{children:[t.jsx(Zt,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Browser & Device"}),t.jsx(Fe,{children:"Location"}),t.jsx(Fe,{children:"Last Active"}),t.jsx(Fe,{})]})}),t.jsx(Ht,{children:m.map(p=>t.jsxs(it,{children:[t.jsx(Xe,{children:t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[t.jsx(Vr,{children:t.jsx(Y6,{browser:p.browser||"Unknown"})}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{children:p.browser||"Unknown Browser"}),p.device&&t.jsx("div",{className:"w-text-muted",children:p.device})]})]})}),t.jsx(Xe,{children:t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{children:p.city&&p.country?`${p.city}, ${p.country}`:"Unknown location"}),p.ip_address&&t.jsx("div",{className:"w-text-muted",children:p.ip_address})]})}),t.jsx(Xe,{children:d(p.last_active_at)}),t.jsx(Ft,{children:t.jsxs(se,{$size:"sm",$outline:!0,$destructive:!0,onClick:()=>c(p.id),children:[t.jsx(Aa,{size:12}),"Sign out"]})})]},p.id))})]})})}):t.jsx(Nt,{title:"No active sessions",description:"You don't have any active sessions at the moment."})})},J6=(e,a)=>`${(e==null?void 0:e[0])||""}${(a==null?void 0:a[0])||""}`.toUpperCase()||"U",Z0=()=>{var N,_,C,y,E,A,H,M;const{loading:e,user:a,updateProfilePicture:s}=ba(),{deployment:r}=Ce(),[i,l]=o.useState("profile"),[m,c]=o.useState(null),[d,p]=o.useState("info"),[u,f]=o.useState(!1),h=o.useRef(null),g=o.useCallback((T,P="info")=>{c(T),p(P),setTimeout(()=>c(null),3e3)},[c]),x=async T=>{var S;const P=(S=T.target.files)==null?void 0:S[0];if(P){if(P.size>2*1024*1024){g("File size cannot exceed 2MB","error");return}if(!P.type.startsWith("image/")){g("Please select a valid image file","error");return}try{f(!0),await s(P),await(a==null?void 0:a.refetch()),g("Profile picture updated","info")}catch($){g(($==null?void 0:$.message)||"Failed to update profile picture","error")}finally{f(!1),h.current&&(h.current.value="")}}};if(e)return t.jsx($e,{children:t.jsx(mr,{className:"w-flex w-items-center w-justify-center",children:t.jsx(_e,{})})});const w=r==null?void 0:r.auth_settings,b=(N=w==null?void 0:w.email_address)==null?void 0:N.enabled,j=(_=w==null?void 0:w.phone_number)==null?void 0:_.enabled,v=((C=r==null?void 0:r.social_connections)==null?void 0:C.some(T=>T.enabled))||!1,k=((y=w==null?void 0:w.password)==null?void 0:y.enabled)||((E=w==null?void 0:w.auth_factors_enabled)==null?void 0:E.authenticator)||((A=w==null?void 0:w.auth_factors_enabled)==null?void 0:A.phone_otp)||((H=w==null?void 0:w.auth_factors_enabled)==null?void 0:H.backup_code);return t.jsx($e,{children:t.jsx(m0,{children:t.jsx(u0.Provider,{value:{screen:null,setScreen:()=>{},toast:g},children:t.jsxs(mr,{className:"w-relative",children:[a&&t.jsxs(y0,{className:"mac-page-header",children:[t.jsxs("button",{type:"button",className:"w-avatar-edit","data-busy":u?"":void 0,onClick:()=>{var T;return(T=h.current)==null?void 0:T.click()},disabled:u,title:"Change profile picture","aria-label":"Change profile picture",children:[t.jsx("span",{className:"w-avatar w-avatar--lg",children:a.profile_picture_url?t.jsx("img",{src:a.profile_picture_url,alt:""}):J6(a.first_name,a.last_name)}),t.jsx("span",{className:"w-avatar-veil",children:u?t.jsx(_e,{size:14}):t.jsx(sn,{size:16})})]}),t.jsx("input",{ref:h,type:"file",accept:"image/*",style:{display:"none"},onChange:x}),t.jsxs(j0,{children:[t.jsx(_0,{children:`${a.first_name||""} ${a.last_name||""}`.trim()||a.username||"Account"}),((M=a.primary_email_address)==null?void 0:M.email)&&t.jsx(k0,{children:a.primary_email_address.email})]})]}),t.jsx(p0,{children:t.jsxs(h0,{children:[t.jsx(ka,{$isActive:i==="profile",onClick:()=>l("profile"),children:t.jsxs(Ca,{children:[t.jsx(hs,{size:16}),"Profile"]})}),b&&t.jsx(ka,{$isActive:i==="email",onClick:()=>l("email"),children:t.jsxs(Ca,{children:[t.jsx(hl,{size:16}),"Email"]})}),j&&t.jsx(ka,{$isActive:i==="phone",onClick:()=>l("phone"),children:t.jsxs(Ca,{children:[t.jsx(Vu,{size:16}),"Phone"]})}),v&&t.jsx(ka,{$isActive:i==="social",onClick:()=>l("social"),children:t.jsxs(Ca,{children:[t.jsx(Iu,{size:16}),"Connections"]})}),k&&t.jsx(ka,{$isActive:i==="security",onClick:()=>l("security"),children:t.jsxs(Ca,{children:[t.jsx(Xt,{size:16}),"Security"]})}),t.jsx(ka,{$isActive:i==="sessions",onClick:()=>l("sessions"),children:t.jsxs(Ca,{children:[t.jsx(zu,{size:16}),"Sessions"]})})]})}),t.jsxs(f0,{children:[i==="profile"&&t.jsx(j6,{}),i==="email"&&b&&t.jsx(_6,{}),i==="phone"&&j&&t.jsx(k6,{}),i==="social"&&v&&t.jsx(S6,{}),i==="security"&&k&&t.jsx(z6,{}),i==="sessions"&&t.jsx(Q6,{})]}),m&&t.jsxs("div",{className:`w-toast w-toast--contained ${d==="error"?"w-toast--error":"w-toast--success"}`,style:{minWidth:0},children:[t.jsx("span",{className:"w-toast-ic",children:d==="error"?t.jsx(Fa,{size:12}):t.jsx(Ye,{size:12})}),t.jsx("span",{className:"w-toast-msg",children:m})]})]})})})})},H0=({isOpen:e,onClose:a,title:s,showHeader:r,headerContent:i,footerContent:l,customContent:m,children:c,showCloseButton:d})=>t.jsx(Ue,{isOpen:e,onClose:a,children:t.jsx(Ue.Overlay,{children:t.jsxs(Ue.Content,{className:"w-dialog--panel",children:[r&&t.jsx(Ue.Header,{showCloseButton:d,children:i||s}),m||c||t.jsx(Z0,{}),l&&t.jsx(Ue.Footer,{children:l})]})})}),Oe=(...e)=>e.filter(Boolean).join(" "),X6=e=>t.jsx("div",{...e,className:Oe("w-relative",e.className)}),F0=o.forwardRef((e,a)=>t.jsx("button",{...e,ref:a,className:Oe("w-acct",e.className),style:{width:"auto",margin:0,padding:4,gap:8,...e.style}}));F0.displayName="AccountButton";const ep=({children:e,...a})=>t.jsx("div",{...a,className:Oe("w-avatar","w-avatar--md",a.className),style:{width:28,height:28,fontSize:11,...a.style},children:e}),tp=e=>t.jsx("div",{...e,className:Oe("w-sec","w-text-secondary",e.className)}),T0=o.forwardRef(({$position:e,$isOpen:a,$maxHeight:s,children:r,...i},l)=>t.jsx("div",{...i,ref:l,className:"w-menu",style:{position:"fixed",width:300,maxWidth:"calc(100vw - 24px)",maxHeight:s?`${s}px`:"calc(100vh - 48px)",overflowY:"auto",zIndex:99999,top:(e==null?void 0:e.top)!==void 0?`${e.top}px`:void 0,bottom:(e==null?void 0:e.bottom)!==void 0?`${e.bottom}px`:void 0,left:(e==null?void 0:e.left)!==void 0?`${e.left}px`:void 0,right:(e==null?void 0:e.right)!==void 0?`${e.right}px`:void 0,visibility:e&&a?"visible":"hidden",opacity:a&&e?1:0,transition:`opacity 0.15s ease, visibility 0s linear ${a?"0s":"0.15s"}`,padding:0},children:r}));T0.displayName="DropdownContainer";const I0=o.forwardRef(({$top:e,$left:a,$isOpen:s,$maxHeight:r,children:i,...l},m)=>t.jsx("div",{...l,ref:m,className:"w-menu",style:{position:"fixed",width:300,maxWidth:"calc(100vw - 24px)",maxHeight:`${r}px`,overflowY:"auto",zIndex:99999,display:"flex",flexDirection:"column",top:`${e}px`,left:`${a}px`,visibility:s?"visible":"hidden",opacity:s?1:0,transition:`opacity 0.15s ease, visibility 0s linear ${s?"0s":"0.15s"}`,padding:0},children:i}));I0.displayName="SidePanel";const Ji=e=>t.jsx("hr",{...e,className:Oe("w-hr",e.className)}),ap=e=>t.jsx("div",{...e,style:{padding:"16px 14px 8px",...e.style}}),sp=e=>t.jsx("div",{...e,className:Oe("w-flex","w-items-center","w-gap-3",e.className)}),np=({children:e,...a})=>t.jsx("div",{...a,className:Oe("w-avatar","w-avatar--lg",a.className),children:e}),rp=e=>t.jsx("div",{...e,className:Oe("w-flex-col","w-grow",e.className),style:{gap:2,...e.style}}),ip=e=>t.jsx("div",{...e,className:Oe("w-sec","w-truncate",e.className)}),op=e=>t.jsx("div",{...e,className:Oe("w-secsub","w-truncate",e.className)}),lp=({$active:e,...a})=>t.jsx("button",{...a,className:"w-menu-item",style:{border:"0.5px solid var(--wa-border)",background:e?"var(--wa-surface-subtle)":void 0,...a.style}}),cp=({children:e,...a})=>t.jsx("div",{...a,className:"w-avatar w-avatar--sm",children:e}),dp=e=>t.jsx("div",{...e,className:Oe("w-sec","w-grow","w-truncate",e.className)}),up=e=>t.jsx("div",{...e,className:Oe("w-secsub","w-none",e.className)}),mp=e=>t.jsx("div",{...e,style:{padding:"5px",...e.style}}),pp=e=>t.jsx("button",{...e,className:Oe("w-menu-item",e.className)}),hp=e=>t.jsx("span",{...e,className:Oe("w-grow",e.className)}),fp=e=>t.jsx("span",{...e,className:Oe("w-menu-trail",e.className)}),wp=e=>t.jsx("div",{...e,style:{padding:"5px",...e.style}}),gp=e=>t.jsx("div",{...e,className:Oe("w-menu-label",e.className)}),Hn=({$active:e,...a})=>t.jsx("button",{...a,className:"w-menu-item",style:{cursor:e?"default":"pointer",...a.style}}),Fn=({children:e,...a})=>t.jsx("div",{...a,className:Oe("w-flex","w-items-center","w-justify-center","w-none",a.className),style:{width:14,height:14,color:"var(--wa-primary)",...a.style},children:e}),xp=e=>t.jsx("div",{...e,className:"w-none",style:{width:14,...e.style}}),Tn=e=>t.jsx("div",{...e,className:Oe("w-sec","w-grow","w-truncate",e.className)}),Xi=e=>t.jsx("div",{...e,className:Oe("w-secsub","w-none",e.className)}),vp=e=>t.jsx("div",{...e,style:{padding:"5px",...e.style}}),bp=e=>t.jsx("button",{...e,className:Oe("w-menu-item","w-menu-item--danger",e.className)}),yp=e=>t.jsx("button",{...e,className:Oe("w-menu-item",e.className),style:{borderBottom:"0.5px solid var(--wa-border)",borderRadius:0,flex:"none",...e.style}}),jp=e=>t.jsx("div",{...e,style:{flex:"1 1 auto",overflowY:"auto",padding:5,...e.style}}),eo=({$active:e,...a})=>t.jsx("button",{...a,className:Oe("w-menu-item","sp-row",e&&"sp-row--active",a.className),style:{height:32,...a.style}}),to=({$active:e,...a})=>t.jsx("button",{...a,className:Oe("w-menu-item","sp-row","sp-ws-row",e&&"sp-row--active",a.className),style:{height:32,paddingLeft:30,position:"relative",...a.style},children:a.children}),ao=({$personal:e,children:a,...s})=>t.jsx("div",{...s,className:Oe("w-avatar","w-avatar--sm",!e&&"",s.className),children:a}),so=({children:e,...a})=>t.jsx("div",{...a,className:Oe("w-avatar","","w-avatar--sm",a.className),children:e}),no=e=>t.jsx("span",{...e,className:Oe("w-sec","w-grow","w-truncate",e.className)}),ro=e=>t.jsx("span",{...e,className:Oe("w-secsub","w-grow","w-truncate",e.className)}),In=e=>t.jsx("div",{...e,className:Oe("w-flex","w-items-center","w-none",e.className),style:{gap:4,...e.style}}),_p=({$open:e,...a})=>t.jsx(Ut,{...a,className:"w-text-muted",style:{flexShrink:0,transition:"transform 0.2s ease",transform:e?"rotate(0deg)":"rotate(-90deg)"}}),Vn=e=>t.jsx(Ye,{...e,className:"w-text-primary",style:{flexShrink:0}}),kp=e=>t.jsx("div",{...e,className:Oe("w-flex-col","w-gap-3","w-none",e.className),style:{padding:"12px 12px 16px",borderBottom:"0.5px solid var(--wa-border)",...e.style}}),Cp=e=>t.jsx("button",{...e,className:Oe("w-btn","w-btn--icon",e.className),style:{width:24,height:24,...e.style}}),io=e=>t.jsx("div",{...e,className:Oe("w-flex","w-items-center","w-gap-3",e.className),style:{padding:"4px 4px 0",minWidth:0,...e.style}}),oo=({children:e,...a})=>t.jsx("div",{...a,className:Oe("w-avatar","","w-avatar--md",a.className),children:e}),lo=e=>t.jsx("div",{...e,className:Oe("w-flex-col","w-grow",e.className),style:{gap:1,minWidth:0,...e.style}}),co=e=>t.jsx("div",{...e,className:Oe("w-sec","w-truncate",e.className)}),uo=e=>t.jsx("div",{...e,className:Oe("w-flex","w-items-center","w-none",e.className),style:{gap:2,...e.style}}),Fs=({$destructive:e,...a})=>t.jsx("button",{...a,className:Oe("w-btn","w-btn--icon",e&&"w-btn--danger",a.className),style:{width:24,height:24,...a.style}}),mo=e=>t.jsx("div",{...e,className:"w-none",style:{borderTop:"0.5px solid var(--wa-border)",padding:5,...e.style}}),po=e=>t.jsx("button",{...e,className:Oe("w-menu-item",e.className),style:{height:32,color:"var(--wa-text-muted)",...e.style}}),ho=e=>t.jsx("div",{...e,className:Oe("w-flex","w-items-center","w-justify-center","w-none",e.className),style:{width:20,height:20,...e.style}}),Dr=({showName:e=!0,onCreateOrg:a,showOrgSwitcher:s=!0,narrowBreakpoint:r=640})=>{var Pe,qe,pt,aa,Tt,sa,Wt,yt,na,ra,ia,oa;const i=ts(),[l,m]=o.useState(!1),[c,d]=o.useState(!1),[p,u]=o.useState(typeof window<"u"&&window.innerWidth<r),[f,h]=o.useState(!1),[g,x]=o.useState("org"),[w,b]=o.useState(null),[j,v]=o.useState({top:0,left:0,maxHeight:400}),[k,N]=o.useState(new Set),[_,C]=o.useState(null),y=o.useRef(null),E=o.useRef(null),A=o.useRef(null),H=bt({triggerRef:y,isOpen:l,minWidth:300}),M=Kt(!1),T=Kt(!1),P=Kt(!1),S=Kt(!1),$=Kt(!1),{session:Z,signOut:R,switchSignIn:L,switchOrganization:O,switchWorkspace:F,refetch:W}=ot(),{navigateToSignIn:U}=kt(),{deployment:V}=Ce(),{activeOrganization:G,activeMembership:Y,leave:de}=ga(),{organizationMemberships:fe}=xa(),{workspaces:ne}=va(),{activeWorkspace:ae,activeMembership:re,leave:Le}=Dt(),K=(Pe=Z==null?void 0:Z.active_signin)==null?void 0:Pe.user,at=((pt=(qe=V==null?void 0:V.auth_settings)==null?void 0:qe.multi_session_support)==null?void 0:pt.enabled)??!1,ze=((aa=V==null?void 0:V.b2b_settings)==null?void 0:aa.allow_users_to_create_orgs)??!1,We=((Tt=V==null?void 0:V.b2b_settings)==null?void 0:Tt.organizations_enabled)??!1,Re=We&&(((sa=V==null?void 0:V.b2b_settings)==null?void 0:sa.workspaces_enabled)??!1),ce=s&&We,B=!G,q=o.useMemo(()=>{var ve;const ie={};for(const Ae of ne||[]){const J=(ve=Ae.organization)==null?void 0:ve.id;J&&(ie[J]||(ie[J]=[]),ie[J].push(Ae))}return ie},[ne]),X=fe||[],oe=o.useCallback(()=>{if(!E.current)return;const ie=E.current.getBoundingClientRect(),ve=300,Ae=8,J=window.innerWidth<r;if(u(J),J){v({top:ie.top,left:ie.left,maxHeight:ie.height});return}const be=Math.min(Math.max(ie.height,520),window.innerHeight-ie.top-16),Je=ie.right+Ae+ve<=window.innerWidth-8;v({top:ie.top,left:Je?ie.right+Ae:ie.left-Ae-ve,maxHeight:be})},[r]),Ee=o.useCallback(()=>{oe(),d(!0)},[oe]),z=o.useCallback(ie=>{N(ve=>{const Ae=new Set(ve);return Ae.has(ie)?Ae.delete(ie):Ae.add(ie),Ae})},[]);o.useEffect(()=>{G&&Re&&N(ie=>{if(ie.has(G.id))return ie;const ve=new Set(ie);return ve.add(G.id),ve})},[G,Re]),o.useEffect(()=>{x(Re&&ae?"ws":"org")},[Re,ae==null?void 0:ae.id]),o.useEffect(()=>{const ie=()=>{u(window.innerWidth<r),c&&oe()};return window.addEventListener("resize",ie),()=>window.removeEventListener("resize",ie)},[r,c,oe]),o.useEffect(()=>{l||(d(!1),h(!1))},[l]),o.useEffect(()=>{if(!l)return;const ie=setTimeout(()=>{const ve=Ae=>{var be,Je,De;const J=Ae.target;(be=y.current)!=null&&be.contains(J)||(Je=E.current)!=null&&Je.contains(J)||(De=A.current)!=null&&De.contains(J)||m(!1)};return document.addEventListener("mousedown",ve),()=>document.removeEventListener("mousedown",ve)},50);return()=>clearTimeout(ie)},[l]);const D=ie=>ie.split(" ").filter(Boolean).map(ve=>ve[0]).join("").toUpperCase().slice(0,2),we=(ie,ve,Ae,J,be)=>t.jsx(be,{children:ie?t.jsx("img",{src:ve,alt:Ae}):D(`${Ae||""} ${J||""}`)}),ge=async ie=>{try{await R(ie),await W(),m(!1)}catch{}},xe=async ie=>{try{await L(ie),await W(),m(!1)}catch{}},lt=async ie=>{if(!f){h(!0);try{await O(ie),await W(),d(!1)}catch{}finally{h(!1)}}},Qe=async ie=>{if(!f){h(!0);try{await F(ie),await W(),d(!1)}catch{}finally{h(!1)}}},Q=()=>{M.open(),m(!1)},le=[...(Z==null?void 0:Z.signins)||[]].sort((ie,ve)=>{const Ae=ie.user.id===(K==null?void 0:K.id),J=ve.user.id===(K==null?void 0:K.id);return Ae===J?0:Ae?-1:1}),me=((Wt=le.find(ie=>ie.user.id===(K==null?void 0:K.id)))==null?void 0:Wt.id)||"",Te=((na=(yt=Y==null?void 0:Y.roles)==null?void 0:yt[0])==null?void 0:na.name)??null;return t.jsx($e,{children:t.jsxs(X6,{children:[t.jsxs(F0,{ref:y,onClick:()=>m(!l),children:[we(K==null?void 0:K.has_profile_picture,K==null?void 0:K.profile_picture_url,K==null?void 0:K.first_name,K==null?void 0:K.last_name,ep),e&&t.jsx(tp,{children:`${(K==null?void 0:K.first_name)||""} ${(K==null?void 0:K.last_name)||""}`.trim()})]}),typeof window<"u"&&en.createPortal(t.jsxs("div",{className:"wacht-root",style:i,children:[t.jsxs(T0,{ref:E,$position:H,$isOpen:l&&!(p&&c),$maxHeight:H==null?void 0:H.maxHeight,children:[t.jsx(ap,{children:t.jsxs(sp,{children:[we(K==null?void 0:K.has_profile_picture,K==null?void 0:K.profile_picture_url,K==null?void 0:K.first_name,K==null?void 0:K.last_name,np),t.jsxs(rp,{children:[t.jsx(ip,{children:`${(K==null?void 0:K.first_name)||""} ${(K==null?void 0:K.last_name)||""}`.trim()}),t.jsx(op,{children:(ra=K==null?void 0:K.primary_email_address)==null?void 0:ra.email})]})]})}),t.jsxs(mp,{children:[ce&&t.jsxs(lp,{$active:c,onClick:Ee,style:{marginBottom:8},children:[t.jsx(cp,{children:G?G.image_url?t.jsx("img",{src:G.image_url,alt:G.name}):(ia=G.name)==null?void 0:ia.charAt(0).toUpperCase():K!=null&&K.has_profile_picture?t.jsx("img",{src:K.profile_picture_url,alt:K.first_name}):D(`${(K==null?void 0:K.first_name)||""} ${(K==null?void 0:K.last_name)||""}`)}),t.jsx(dp,{children:(G==null?void 0:G.name)??"Personal account"}),Te&&t.jsx(up,{children:Te})]}),t.jsxs(pp,{onClick:Q,children:[t.jsx(Ea,{}),t.jsx(hp,{children:"Manage account"}),t.jsx(fp,{children:"⌘,"})]})]}),t.jsx(Ji,{}),t.jsxs(wp,{children:[t.jsx(gp,{children:"Accounts"}),at?le.map(({user:ie,id:ve})=>{var J;const Ae=ie.id===(K==null?void 0:K.id);return t.jsxs(Hn,{$active:Ae,onClick:Ae?void 0:()=>xe(ve),children:[Ae?t.jsx(Fn,{children:t.jsx(Ye,{})}):t.jsx(xp,{}),t.jsx(Tn,{children:(J=ie.primary_email_address)==null?void 0:J.email}),Ae&&t.jsx(Xi,{children:"Current"})]},ie.id)}):K&&t.jsxs(Hn,{$active:!0,children:[t.jsx(Fn,{children:t.jsx(Ye,{})}),t.jsx(Tn,{children:(oa=K.primary_email_address)==null?void 0:oa.email}),t.jsx(Xi,{children:"Current"})]}),at&&t.jsxs(Hn,{onClick:()=>{U(),m(!1)},children:[t.jsx(Fn,{style:{color:"var(--wa-text-muted)"},children:t.jsx(St,{})}),t.jsx(Tn,{style:{color:"var(--wa-text-muted)"},children:"Add account"})]})]}),t.jsx(Ji,{}),t.jsx(vp,{children:t.jsxs(bp,{onClick:()=>ge(me),children:[t.jsx(Aa,{}),"Sign out"]})})]}),t.jsxs(I0,{ref:A,$top:j.top,$left:j.left,$isOpen:l&&c,$maxHeight:j.maxHeight,children:[p&&t.jsxs(yp,{onClick:()=>d(!1),children:[t.jsx(nn,{size:13}),"Back"]}),(()=>{var _t;if(B)return null;const ie=Re&&!!ae,ve=!!((_t=Y==null?void 0:Y.eligibility_restriction)!=null&&_t.type)&&Y.eligibility_restriction.type!=="none",Ae=!!G&&!ve&&Hr(Y),J=ie&&!ve&&Tr(re),be=ie?g:"org",Je=async()=>{if(de){b("org");try{await de(),await W(),d(!1)}catch{}finally{b(null)}}},De=async()=>{if(Le){b("ws");try{await Le(),d(!1)}catch{}finally{b(null)}}},jt=()=>{if(!ie)return null;const Ke=be==="org"?"ws":"org",wt=Ke==="ws"?"Switch to workspace context":"Switch to organization context";return t.jsx(Cp,{type:"button",onClick:()=>x(Ke),title:wt,"aria-label":wt,children:t.jsx(Su,{size:12})})};return t.jsxs(kp,{children:[be==="org"&&G&&t.jsxs(io,{children:[jt(),t.jsx(oo,{children:G.image_url?t.jsx("img",{src:G.image_url,alt:G.name}):D(G.name)}),t.jsx(lo,{children:t.jsx(co,{children:G.name})}),t.jsxs(uo,{children:[Ae&&t.jsx(Fs,{onClick:()=>{P.open(),m(!1)},title:"Organization settings","aria-label":"Organization settings",children:t.jsx(Ea,{size:14})}),t.jsx(Fs,{$destructive:!0,onClick:Je,disabled:w==="org",title:"Leave organization","aria-label":"Leave organization",children:t.jsx(Aa,{size:14})})]})]}),be==="ws"&&ie&&t.jsxs(io,{children:[jt(),t.jsx(oo,{children:ae.image_url?t.jsx("img",{src:ae.image_url,alt:ae.name}):D(ae.name)}),t.jsx(lo,{children:t.jsx(co,{children:ae.name})}),t.jsxs(uo,{children:[J&&t.jsx(Fs,{onClick:()=>{$.open(),m(!1)},title:"Workspace settings","aria-label":"Workspace settings",children:t.jsx(Ea,{size:14})}),t.jsx(Fs,{$destructive:!0,onClick:De,disabled:w==="ws",title:"Leave workspace","aria-label":"Leave workspace",children:t.jsx(Aa,{size:14})})]})]})]})})(),t.jsxs(jp,{children:[t.jsxs(eo,{$active:B,onClick:()=>{B||lt(void 0)},disabled:f,style:B?{cursor:"default"}:void 0,children:[t.jsx(ao,{$personal:!0,children:K!=null&&K.has_profile_picture?t.jsx("img",{src:K.profile_picture_url,alt:K.first_name}):t.jsx(hs,{size:12})}),t.jsx(no,{children:"Personal account"}),B&&t.jsx(In,{children:t.jsx("span",{className:"sp-check",style:{display:"inline-flex"},children:t.jsx(Vn,{size:13})})})]}),X.map(ie=>{var De,jt;const ve=ie.organization,Ae=ve.id===(G==null?void 0:G.id),J=k.has(ve.id),be=Re?q[ve.id]||[]:[],Je=!!((De=ie.eligibility_restriction)!=null&&De.type)&&ie.eligibility_restriction.type!=="none";return t.jsxs(o.Fragment,{children:[t.jsxs(eo,{$active:Ae,onClick:()=>{Je||(Re?z(ve.id):Ae||lt(ve.id))},disabled:f,style:Je?{opacity:.55,cursor:"not-allowed"}:Ae&&!Re?{cursor:"default"}:void 0,title:(jt=ie.eligibility_restriction)==null?void 0:jt.message,children:[t.jsx(ao,{children:ve.image_url?t.jsx("img",{src:ve.image_url,alt:ve.name}):D(ve.name)}),t.jsx(no,{children:ve.name}),t.jsxs(In,{children:[Je&&t.jsx(Ma,{size:12,color:"var(--wa-error)"}),Ae&&!Re&&t.jsx(Vn,{size:13}),Re&&t.jsx(_p,{size:11,$open:J})]})]}),Re&&J&&t.jsxs(t.Fragment,{children:[be.map(_t=>{var la,ca;const Ke=Ae&&(ae==null?void 0:ae.id)===_t.id,wt=_t,Bt=((la=wt.eligibility_restriction)==null?void 0:la.type)&&wt.eligibility_restriction.type!=="none";return t.jsxs(to,{$active:Ke,onClick:()=>{!Ke&&!Bt&&Qe(_t.id)},disabled:f,style:Bt||Je?{opacity:.55,cursor:"not-allowed"}:Ke?{cursor:"default"}:void 0,title:(ca=wt.eligibility_restriction)==null?void 0:ca.message,children:[t.jsx(so,{children:wt.image_url?t.jsx("img",{src:wt.image_url,alt:wt.name}):D(wt.name).charAt(0)}),t.jsx(ro,{children:wt.name}),t.jsxs(In,{children:[Bt&&t.jsx(Ma,{size:12,color:"var(--wa-error)"}),Ke&&t.jsx(Vn,{size:12})]})]},_t.id)}),!Je&&t.jsxs(to,{onClick:()=>{C(ve.id),S.open()},disabled:f,children:[t.jsx(so,{style:{background:"transparent",border:"1px dashed var(--wa-border-strong)"},children:t.jsx(St,{size:10})}),t.jsx(ro,{children:"New workspace"})]})]})]},ve.id)})]}),(()=>{var Je,De,jt;const ie=((fe==null?void 0:fe.length)??0)>0,ve=()=>ze&&t.jsx(mo,{children:t.jsxs(po,{onClick:()=>{a?(a(),m(!1)):T.open()},disabled:f,children:[t.jsx(ho,{children:t.jsx(St,{size:12})}),"New organization"]})});if(!Re||!ie)return ve();const Ae=!!((Je=Y==null?void 0:Y.eligibility_restriction)!=null&&Je.type)&&Y.eligibility_restriction.type!=="none",J=((jt=(De=fe==null?void 0:fe[0])==null?void 0:De.organization)==null?void 0:jt.id)??null,be=G&&!Ae?G.id:J;return t.jsx(mo,{children:t.jsxs(po,{onClick:()=>{C(be),S.open()},disabled:f,children:[t.jsx(ho,{children:t.jsx(St,{size:12})}),"New workspace"]})})})()]})]}),document.body),t.jsx(H0,{isOpen:M.isOpen,onClose:M.close}),ce&&t.jsxs(t.Fragment,{children:[t.jsx(Jc,{isOpen:T.isOpen,onClose:T.close}),t.jsx(s0,{isOpen:P.isOpen,onClose:P.close}),Re&&t.jsxs(t.Fragment,{children:[t.jsx(Pr,{isOpen:S.isOpen,onClose:()=>{S.close(),C(null)},organizationId:_||void 0}),t.jsx(Or,{isOpen:$.isOpen,onClose:$.close})]})]})]})})};function V0({notification:e,onAction:a}){const[s,r]=o.useState(!1),i=c=>{c.target.closest("button")||(r(!s),e.is_read||a({type:"read",id:e.id}))},l=c=>{a({type:"custom",payload:c.payload})},m=c=>{const d=new Date(c),u=new Date().getTime()-d.getTime();if(u<6e4)return"Just now";const f=Math.floor(u/6e4);if(f<60)return`${f}m`;const h=Math.floor(f/60);if(h<24)return`${h}h`;const g=Math.floor(h/24);return g<7?`${g}d`:d.toLocaleDateString(void 0,{month:"short",day:"numeric"})};return t.jsxs("div",{className:"w-flex w-gap-3 w-notif-row",onClick:i,"data-unread":e.is_read?void 0:"",children:[t.jsxs("div",{className:"w-grow w-flex-col w-justify-center",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",style:{marginBottom:2},children:[!e.is_read&&t.jsx("span",{className:"w-notif-dot"}),t.jsx("h4",{className:"w-sec w-truncate",style:{margin:0},children:e.title})]}),t.jsx("p",{className:`w-secsub${s?"":" w-truncate"}`,style:{margin:0,wordWrap:s?"break-word":void 0},children:e.body}),e.ctas&&e.ctas.length>0&&t.jsx("div",{className:"w-flex w-wrap w-gap-2",style:{marginTop:10},children:e.ctas.map((c,d)=>t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:()=>l(c),children:c.label},d))})]}),t.jsxs("div",{className:"w-flex-col w-items-end w-gap-2 w-none",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-1 w-notif-actions",children:[e.is_read&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:c=>{c.stopPropagation(),a({type:"unread",id:e.id})},title:"Mark as unread",children:t.jsx(Ru,{size:14})}),t.jsx("button",{className:"w-btn w-btn--icon",onClick:c=>{c.stopPropagation(),a({type:"star",id:e.id})},title:e.is_starred?"Unstar":"Star","data-on":e.is_starred?"":void 0,children:t.jsx(Du,{size:14,fill:e.is_starred?"currentColor":"none"})}),t.jsx("button",{className:"w-btn w-btn--icon",onClick:c=>{c.stopPropagation(),a({type:"archive",id:e.id})},title:e.is_archived?"Unarchive":"Archive",children:e.is_archived?t.jsx(Wo,{size:14}):t.jsx(Do,{size:14})})]}),t.jsx("span",{className:"w-secsub",style:{whiteSpace:"nowrap"},children:m(e.created_at)})]})]})}const z0=o.forwardRef(({scope:e="all",onAction:a,fullWidth:s,maxHeight:r,className:i},l)=>{const[m,c]=o.useState("inbox"),[d,p]=o.useState(!1),[u,f]=o.useState(!1),h=o.useRef(null),g={scope:e,limit:20,is_archived:m==="archive",is_starred:m==="starred",is_read:d?!1:void 0},{notifications:x,loading:w,error:b,hasMore:j,loadMore:v,markAsRead:k,markAsUnread:N,markAllAsRead:_,archiveAllRead:C,archiveNotification:y,starNotification:E}=Oo(g);o.useEffect(()=>{if(!u)return;const T=P=>{h.current&&!h.current.contains(P.target)&&f(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[u]);const A=async T=>{switch(T.type){case"read":await k(T.id);break;case"unread":await N(T.id);break;case"archive":await y(T.id);break;case"star":await E(T.id);break;case"custom":a==null||a(T.payload);break}},H=()=>{_(),f(!1)},M=()=>{C(),f(!1)};return t.jsxs("div",{ref:l,className:`w-flex-col w-relative w-notif-panel${s?" w-notif-panel--fill":""}${i?` ${i}`:""}`,style:{maxHeight:r||"100%"},children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-2 w-none w-notif-head",children:[t.jsxs("div",{className:"w-tabs w-grow",children:[t.jsx("button",{className:`w-tab${m==="inbox"?" w-tab--active":""}`,onClick:()=>c("inbox"),children:"Inbox"}),t.jsx("button",{className:`w-tab${m==="archive"?" w-tab--active":""}`,onClick:()=>c("archive"),children:"Archive"}),t.jsx("button",{className:`w-tab${m==="starred"?" w-tab--active":""}`,onClick:()=>c("starred"),children:"Starred"})]}),t.jsxs("button",{className:"w-btn w-btn--icon w-none w-relative",onClick:()=>f(!u),title:"Options",children:[t.jsx($u,{size:16}),d&&t.jsx("span",{className:"w-notif-filter-dot"})]}),u&&t.jsxs("div",{ref:h,className:"w-menu w-notif-menu",children:[t.jsxs("button",{className:"w-menu-item",onClick:()=>{p(!d),f(!1)},children:[t.jsx(Ou,{})," Unread only",d&&t.jsx(Ye,{className:"w-menu-check"})]}),m==="inbox"&&t.jsxs("button",{className:"w-menu-item",onClick:H,children:[t.jsx(Mu,{})," Mark all as read"]}),t.jsxs("button",{className:"w-menu-item",onClick:M,children:[t.jsx(Do,{})," Archive all read"]})]})]}),t.jsx("div",{className:"w-grow w-notif-body",children:w?t.jsx("div",{className:"w-loading",children:t.jsx(_e,{})}):b?t.jsx(Nt,{icon:t.jsx(mi,{size:20,className:"w-text-error"}),title:"Failed to load notifications",description:b.message||"An unexpected error occurred."}):x.length===0?t.jsx(Nt,{icon:t.jsx(mi,{size:20}),title:"No notifications",description:"You're all caught up!"}):t.jsxs(t.Fragment,{children:[x.map(T=>t.jsx(V0,{notification:T,onAction:A},T.id)),j&&t.jsx("div",{className:"w-flex w-justify-center",style:{padding:12},children:t.jsx("button",{className:"w-btn w-btn--ghost w-btn--sm",onClick:v,children:"Load more"})})]})})]})}),D0=o.forwardRef(({position:e,scope:a,onAction:s,className:r},i)=>t.jsx("div",{ref:i,className:`w-card w-flex-col w-notif-pop${r?` ${r}`:""}`,style:{top:(e==null?void 0:e.top)!==void 0?e.top:void 0,bottom:(e==null?void 0:e.bottom)!==void 0?e.bottom:void 0,left:(e==null?void 0:e.left)!==void 0?e.left:void 0,right:(e==null?void 0:e.right)!==void 0?e.right:void 0,maxHeight:e!=null&&e.maxHeight?e.maxHeight:"90vh"},children:t.jsx(z0,{scope:a,onAction:s,fullWidth:!0,maxHeight:e!=null&&e.maxHeight?`${e.maxHeight}px`:"100%"})}));function U0({className:e,showBadge:a=!0,scope:s="all",onAction:r}){const[i,l]=o.useState(!1),m=ts(),c=o.useRef(null),d=o.useRef(null),p=o.useRef(null),{count:u,refetch:f}=Zo({scope:s}),h=async x=>{await f(),r==null||r(x.payload)},g=bt({triggerRef:p,isOpen:i,minWidth:Math.min(450,typeof window<"u"?window.innerWidth-32:300),defaultMaxHeight:550});return o.useEffect(()=>{if(!i)return;const x=setTimeout(()=>{const w=b=>{var v,k;const j=b.target;(v=c.current)!=null&&v.contains(j)||(k=d.current)!=null&&k.contains(j)||l(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w)}},50);return()=>{clearTimeout(x)}},[i]),t.jsx($e,{children:t.jsxs("div",{ref:c,className:`w-inline w-relative${e?` ${e}`:""}`,children:[t.jsxs("button",{ref:p,className:"w-btn w-btn--icon w-notif-bell",onClick:()=>l(!i),"aria-label":u>0?`${u} unread notifications`:"Notifications",children:[t.jsx(Eu,{strokeWidth:1}),a&&u>0&&t.jsx("span",{className:"w-notif-badge","data-dot":u<=9?"":void 0,children:u>9?"9+":""})]}),typeof window<"u"&&i&&en.createPortal(t.jsx("div",{className:"wacht-root",style:m,children:t.jsx(D0,{ref:d,position:g,scope:s,onAction:h,onClose:()=>l(!1)})}),document.body)]})})}const Np=({showName:e=!0,showNotifications:a=!0})=>t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[a&&t.jsx(U0,{}),t.jsx(Dr,{showName:e})]}),Sp=({children:e})=>{var r;const{session:a,loading:s}=ot();return s||!((r=a.signins)!=null&&r.length)||!a.active_signin?null:t.jsx(t.Fragment,{children:e})},Ep=({children:e})=>{var r;const{loading:a,session:s}=ot();return a||(r=s.signins)!=null&&r.length&&s.active_signin?null:t.jsx(t.Fragment,{children:e})},Ap=({onAccountSelect:e,showAddAccount:a=!0})=>{var _,C,y,E;const{session:s,loading:r,switchSignIn:i,signOut:l}=ot(),{deployment:m}=Ce(),{navigateToSignIn:c,navigate:d}=kt(),[p,u]=o.useState(null),[f,h]=o.useState(null),g=s==null?void 0:s.active_signin,x=(s==null?void 0:s.signins)||[],w=((C=(_=m==null?void 0:m.auth_settings)==null?void 0:_.multi_session_support)==null?void 0:C.enabled)??!1,b=(y=m==null?void 0:m.ui_settings)==null?void 0:y.app_name;o.useEffect(()=>{r||x.length||c()},[r,x,c]);const j=A=>A.split(" ").map(H=>H[0]).join("").toUpperCase().slice(0,2),v=async A=>{var H;h(A);try{if(await i(A),e)e(A),h(null);else{let M=gt(m,new URLSearchParams(window.location.search).get("redirect_uri"));if(M||(M=(H=m.ui_settings)==null?void 0:H.after_signin_redirect_url),M){let T;try{T=new URL(M)}catch{T=new URL(M,window.location.origin)}(m==null?void 0:m.mode)==="staging"&&T.searchParams.set("__dev_session__",xt(m.backend_host)??""),d(T.toString())}else h(null)}}catch{h(null)}},k=async(A,H)=>{A.stopPropagation(),u(H);try{await l(H)}catch{}finally{u(null)}},N=()=>{var H;let A=gt(m,new URLSearchParams(window.location.search).get("redirect_uri"));A||(A=(H=m.ui_settings)==null?void 0:H.after_signin_redirect_url),c(A)};return r?t.jsx(js,{}):x.length?t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-sub",style:{fontSize:12.5},children:["Don't have an account?"," ",t.jsx(Et,{to:`${(E=m.ui_settings)==null?void 0:E.sign_up_page_url}${window.location.search}`,className:"w-link",children:"Sign up"})]}),children:[t.jsx(rt,{title:"Choose an account",sub:`Select an account to continue${b?` to ${b}`:""}`}),t.jsx("div",{className:"w-flex-col",children:x.map(({user:A,id:H})=>{var R,L;if(!A)return null;const M=H===(g==null?void 0:g.id),T=f===H,P=p===H,S=`${A.first_name||""} ${A.last_name||""}`.trim(),$=S||((R=A.primary_email_address)==null?void 0:R.email)||A.username||"User",Z=((L=A.primary_email_address)==null?void 0:L.email)||A.username;return t.jsxs("button",{className:"w-acct","data-active":M?"":void 0,"data-busy":T?"":void 0,onClick:()=>v(H),children:[t.jsx("div",{className:"w-avatar",children:T?t.jsx(vt,{onAccent:!0}):A.has_profile_picture?t.jsx("img",{src:A.profile_picture_url,alt:S}):j($)}),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec w-truncate",children:$}),Z&&Z!==$&&t.jsx("div",{className:"w-secsub w-truncate",children:Z})]}),M&&t.jsxs("span",{className:"w-pill w-pill--current",children:[t.jsx(Ye,{size:11,weight:"bold"}),"current"]}),t.jsx("span",{className:"w-kebab w-acct-out",role:"button","aria-disabled":P,title:"Sign out",onClick:O=>k(O,H),children:P?t.jsx(vt,{}):t.jsx(Aa,{size:15})})]},H)})}),a&&w&&t.jsx("div",{className:"w-acct-foot",children:t.jsxs("button",{className:"w-acct-add",onClick:N,children:[t.jsx(St,{size:15}),"Add another account"]})})]})}):null},Mp=()=>{const{navigateToSignIn:e}=kt();return o.useEffect(()=>{e()},[e]),null},Rp=()=>{const{navigateToSignUp:e}=kt();return o.useEffect(()=>{e()},[e]),null},Lp=()=>{var M,T;const{organizationMemberships:e,refetch:a,loading:s}=xa(),{workspaces:r}=va(),{switchOrganization:i,switchWorkspace:l}=ot(),{deployment:m}=Ce(),[c,d]=o.useState(null),[p,u]=o.useState("orgList"),[f,h]=o.useState(null),g=((m==null?void 0:m.b2b_settings.organizations_enabled)??!1)&&((m==null?void 0:m.b2b_settings.workspaces_enabled)??!1),x=(m==null?void 0:m.b2b_settings.allow_users_to_create_orgs)??!1,w=o.useRef(!1);o.useEffect(()=>{if(!(w.current||!e)){if(w.current=!0,e.length===0){u("createOrg");return}if(!g){u("orgList");return}if(!r||r.length===0){const P=e.find(S=>{var $,Z;return!(($=S.eligibility_restriction)!=null&&$.type)||((Z=S.eligibility_restriction)==null?void 0:Z.type)==="none"});if(P){h(P.organization.id),u("createWorkspace");return}}u("orgList")}},[e,r,g]);const b=P=>P.split(" ").map(S=>S[0]).join("").toUpperCase().slice(0,2),j=async P=>{if(g){h(P.id),u("workspaceList");return}d(P.id);try{await i(P.id)}finally{d(null)}},v=async P=>{d(P.id);try{await l(P.id)}finally{d(null)}},k=async P=>{var $;await a();const S=(($=P==null?void 0:P.data)==null?void 0:$.organization)||(P==null?void 0:P.organization)||P;if(!g){u("orgList");return}S!=null&&S.id?(h(S.id),u("createWorkspace")):u("orgList")},N=async P=>{var $;const S=(P==null?void 0:P.id)??(($=P==null?void 0:P.workspace)==null?void 0:$.id);if(S){d(S);try{await l(S)}finally{d(null)}}},_=async()=>{h(null),u("orgList")},C=(M=e==null?void 0:e.find(P=>P.organization.id===f))==null?void 0:M.organization,y=f?r==null?void 0:r.filter(P=>P.organization.id===f):[];if(s)return null;if(p==="createOrg")return t.jsx(Ue.Body,{style:{padding:0},children:t.jsx(mn,{onSuccess:k,onCancel:()=>u("orgList")})});if(p==="createWorkspace"&&f)return t.jsx(Ue.Body,{style:{padding:0},children:t.jsx(Lr,{organizationId:f,onSuccess:N,onCancel:()=>u("workspaceList"),onCreateOrganization:()=>u("createOrg")})});const E=p==="workspaceList",A=E?"Select a workspace":"Select an organization",H=E?`Choose a workspace in ${(C==null?void 0:C.name)||""}`:`to continue to ${((T=m==null?void 0:m.ui_settings)==null?void 0:T.app_name)||"App"}`;return t.jsxs("div",{className:"w-split",children:[t.jsxs("div",{className:"w-split-aside w-flex-col w-justify-between w-gap-6",children:[t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsx(Sr,{placement:"left"}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-title",children:A}),t.jsx("p",{className:"w-sub",children:H})]})]}),t.jsx(Dr,{showName:!0})]}),t.jsxs("div",{className:"w-split-main",children:[t.jsxs("div",{className:"w-grow w-flex-col",style:{overflow:"hidden",marginBottom:24},children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",style:{marginBottom:8},children:[E&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:_,"aria-label":"Go back",title:"Go back",children:t.jsx(nn,{})}),t.jsx("h2",{className:"w-sec",children:E?"Workspaces":"Your organizations"})]}),t.jsx("div",{className:"w-grow w-flex-col",style:{overflowY:"auto"},children:E?t.jsx(t.Fragment,{children:y&&y.length>0?y.map(P=>{var $,Z,R;const S=(($=P.eligibility_restriction)==null?void 0:$.type)!=="none"&&((Z=P.eligibility_restriction)==null?void 0:Z.type)!==void 0;return t.jsxs("button",{className:"w-listrow",onClick:()=>!S&&v(P),disabled:c===P.id||S,title:S?(R=P.eligibility_restriction)==null?void 0:R.message:void 0,children:[t.jsx("div",{className:"w-avatar w-avatar--lg",children:P.image_url?t.jsx("img",{src:P.image_url,alt:P.name}):b(P.name).charAt(0)}),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec w-truncate",children:P.name}),t.jsxs("div",{className:"w-secsub w-inline w-gap-1",children:[t.jsx(cs,{}),"Workspace"]})]}),t.jsxs("div",{className:"w-inline w-gap-1 w-text-secondary",children:[S&&t.jsx(Ma,{size:16,className:"w-text-error"}),t.jsx(Qt,{})]})]},P.id)}):t.jsxs("div",{className:"w-empty",children:[t.jsx("div",{className:"w-empty-ic",children:t.jsx(cs,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:"No workspaces yet"}),t.jsxs("p",{children:["Create your first workspace for"," ",(C==null?void 0:C.name)||"this organization"]})]}),t.jsx("div",{className:"w-empty-action",children:t.jsxs(se,{$size:"sm",onClick:()=>u("createWorkspace"),children:[t.jsx(St,{}),"Create workspace"]})})]})}):e&&e.length>0?e.map(P=>{var U,V,G,Y,de;const S=P.organization,$=r==null?void 0:r.filter(fe=>fe.organization.id===S.id),Z=($==null?void 0:$.length)||0,R=S.member_count,L=((V=(U=P.roles)==null?void 0:U[0])==null?void 0:V.name)||"No role",O=P.roles.length-1,F=O>0?`${L.charAt(0).toUpperCase()+L.slice(1)} +${O}`:L.charAt(0).toUpperCase()+L.slice(1),W=((G=P.eligibility_restriction)==null?void 0:G.type)!=="none"&&((Y=P.eligibility_restriction)==null?void 0:Y.type)!==void 0;return t.jsxs("button",{className:"w-listrow",onClick:()=>!W&&j(S),disabled:c===S.id||W,title:W?(de=P.eligibility_restriction)==null?void 0:de.message:void 0,children:[t.jsx("div",{className:"w-avatar w-avatar--lg",children:S.image_url?t.jsx("img",{src:S.image_url,alt:S.name}):b(S.name)}),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec w-truncate",children:S.name}),t.jsx("div",{className:"w-secsub w-inline w-gap-1",children:g?t.jsxs(t.Fragment,{children:[t.jsx(cs,{}),Z," ","workspace",Z!==1?"s":""]}):t.jsxs(t.Fragment,{children:[t.jsx(ps,{}),F," •"," ",R," member",R!==1?"s":""]})})]}),t.jsxs("div",{className:"w-inline w-gap-1 w-text-secondary",children:[W&&t.jsx(Ma,{size:16,className:"w-text-error"}),t.jsx(Qt,{})]})]},S.id)}):t.jsxs("div",{className:"w-empty",children:[t.jsx("div",{className:"w-empty-ic",children:t.jsx(ps,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:"No organizations yet"}),t.jsx("p",{children:x?"Create your first organization to get started":"You don't have access to any organizations yet"})]}),x&&t.jsx("div",{className:"w-empty-action",children:t.jsxs(se,{$size:"sm",onClick:()=>u("createOrg"),children:[t.jsx(St,{}),"Create organization"]})})]})})]}),E&&f&&t.jsxs(se,{$outline:!0,onClick:()=>u("createWorkspace"),disabled:c!==null,children:[t.jsx(St,{size:12}),"Create workspace"]}),!E&&e&&e.length>0&&x&&t.jsxs(se,{$outline:!0,onClick:()=>u("createOrg"),disabled:c!==null,children:[t.jsx(St,{size:12}),"Create new organization"]})]})]})},Pp=({children:e})=>{var f,h,g,x;const{activeOrganization:a}=ga(),{activeWorkspace:s}=Dt(),{deployment:r}=Ce(),{loading:i,orgMembership:l,workspaceMembership:m}=Ao(),c=((r==null?void 0:r.b2b_settings.organizations_enabled)??!1)&&((r==null?void 0:r.b2b_settings.workspaces_enabled)??!1),d=((f=l==null?void 0:l.eligibility_restriction)==null?void 0:f.type)!=="none"&&((h=l==null?void 0:l.eligibility_restriction)==null?void 0:h.type)!==void 0,p=((g=m==null?void 0:m.eligibility_restriction)==null?void 0:g.type)!=="none"&&((x=m==null?void 0:m.eligibility_restriction)==null?void 0:x.type)!==void 0;return i?null:(d||p||!a?!1:c?s?(m==null?void 0:m.workspace.id)===s.id&&m.organization_id===a.id:!1:!0)?t.jsx(t.Fragment,{children:e}):t.jsx($e,{children:t.jsx(Ue,{isOpen:!0,children:t.jsx(Ue.Overlay,{children:t.jsx(Ue.Content,{className:"w-flex w-justify-center",style:{padding:0,width:900,maxWidth:"90vw"},children:t.jsx(Lp,{})})})})})},$p=e=>{const a=e.toLowerCase().trim();return["javascript:","data:","vbscript:"].some(i=>a.startsWith(i))?!0:["http://","https://","//","ftp://","ftps://","mailto:","tel:","sms:","file:","blob:"].some(i=>a.startsWith(i))},Op=e=>{const a=e.toLowerCase().trim();return!["javascript:","data:","vbscript:"].some(r=>a.startsWith(r))};exports.AcceptInvite=F4;exports.AuthFormImage=Sr;exports.CreateOrganizationForm=mn;exports.CreateWorkspaceDialog=Pr;exports.CreateWorkspaceForm=Lr;exports.DefaultStylesProvider=$e;exports.DeploymentInitialized=C2;exports.DeploymentInitializing=N2;exports.DeploymentProvider=Q0;exports.Dialog=Ue;exports.DialogTrigger=B4;exports.Dropdown=_s;exports.DropdownDivider=Wc;exports.DropdownItem=ea;exports.DropdownItems=ks;exports.DropdownTrigger=Cs;exports.Form=Bc;exports.FormGroup=Ge;exports.Input=ye;exports.Label=Ve;exports.MagicLinkVerification=O4;exports.ManageAccount=Z0;exports.ManageAccountDialog=H0;exports.ManageOrganization=a0;exports.ManageWorkspace=r0;exports.ManageWorkspaceDialog=Or;exports.NavigateToSignIn=Mp;exports.NavigateToSignUp=Rp;exports.NavigationLink=Et;exports.NotificationBell=U0;exports.NotificationItem=V0;exports.NotificationPanel=z0;exports.NotificationPopover=D0;exports.OAuthProvider=wo;exports.ORG_ADMIN_PERMISSIONS=i0;exports.ORG_MANAGEMENT_PERMISSIONS=o0;exports.OTPInput=ya;exports.OrganizationSwitcher=d0;exports.PhoneNumberInput=ys;exports.PhoneVerification=Hc;exports.ProfileCompletion=Tc;exports.RequireActiveTenancy=Pp;exports.SignInForm=R4;exports.SignUpForm=_4;exports.SignedIn=Sp;exports.SignedInAccounts=Ap;exports.SignedOut=Ep;exports.SimpleDialog=W4;exports.SocialCallback=$4;exports.Spinner=_e;exports.Switch=Za;exports.TwoFactorMethodSelector=Zc;exports.TwoFactorVerification=Fc;exports.UserButton=Dr;exports.UserControls=Np;exports.WORKSPACE_ADMIN_PERMISSIONS=l0;exports.WORKSPACE_MANAGEMENT_PERMISSIONS=c0;exports.WaitlistForm=P4;exports.canManageOrganization=Hr;exports.canManageWorkspace=Tr;exports.clearTokenCache=Pt;exports.hasIncompleteProfile=Z4;exports.hasOrgPermission=Zr;exports.hasWorkspacePermission=Fr;exports.isExternalUrl=$p;exports.isOrgAdmin=Tm;exports.isSafeUrl=Op;exports.isWorkspaceAdmin=Im;exports.redirectToProfileCompletion=H4;exports.useActiveOrganization=ga;exports.useActiveTenancy=Ao;exports.useActiveWorkspace=Dt;exports.useActorMcpServers=qd;exports.useActorProjectSearch=Zd;exports.useActorProjects=Od;exports.useActorThreadSearch=Td;exports.useAgentSession=Ad;exports.useAgentThread=Id;exports.useAgentThreadAssignments=zd;exports.useAgentThreadConversation=Ed;exports.useAgentThreadFilesystem=Vd;exports.useAgentThreadTaskGraphs=Bd;exports.useApiAuthAppSession=b2;exports.useApiAuthAuditAnalytics=_2;exports.useApiAuthAuditLogs=j2;exports.useApiAuthAuditTimeseries=k2;exports.useApiAuthKeys=y2;exports.useClient=je;exports.useCreateWebhookEndpoint=f2;exports.useDeployment=Ce;exports.useExternalAgentConnections=Kd;exports.useForgotPassword=Po;exports.useInvitation=Vo;exports.useMagicLinkVerification=Lo;exports.useNavigation=kt;exports.useNotificationStream=$o;exports.useNotificationUnreadCount=Zo;exports.useNotifications=Oo;exports.useOrganizationList=zt;exports.useOrganizationMemberships=xa;exports.useProjectTaskBoardItem=Wd;exports.useProjectTaskBoardItemComments=Gd;exports.useProjectTasks=Ud;exports.useProjectThreadFeed=Fd;exports.useProjectThreads=Hd;exports.useSession=ot;exports.useSignIn=go;exports.useSignUp=xo;exports.useSocialCallback=Ro;exports.useThemeOverrideVars=ts;exports.useUser=ba;exports.useUserSignins=Eo;exports.useWaitlist=Mo;exports.useWebhookAnalytics=x2;exports.useWebhookAppSession=m2;exports.useWebhookDeliveries=g2;exports.useWebhookEndpoints=h2;exports.useWebhookEvents=w2;exports.useWebhookStats=p2;exports.useWebhookTimeseries=v2;exports.useWorkspaceList=va;exports.useWorkspaceMemberships=tn;Object.keys(Gr).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>Gr[e]})});
116
+ */var P6={L:Ba.QrCode.Ecc.LOW,M:Ba.QrCode.Ecc.MEDIUM,Q:Ba.QrCode.Ecc.QUARTILE,H:Ba.QrCode.Ecc.HIGH},M0=128,R0="L",L0="#FFFFFF",P0="#000000",$0=!1,O0=1,$6=4,O6=0,Z6=.1;function Z0(e,a=0){const s=[];return e.forEach(function(r,i){let l=null;r.forEach(function(m,d){if(!m&&l!==null){s.push(`M${l+a} ${i+a}h${d-l}v1H${l+a}z`),l=null;return}if(d===r.length-1){if(!m)return;l===null?s.push(`M${d+a},${i+a} h1v1H${d+a}z`):s.push(`M${l+a},${i+a} h${d+1-l}v1H${l+a}z`);return}m&&l===null&&(l=d)})}),s.join("")}function H0(e,a){return e.slice().map((s,r)=>r<a.y||r>=a.y+a.h?s:s.map((i,l)=>l<a.x||l>=a.x+a.w?i:!1))}function H6(e,a,s,r){if(r==null)return null;const i=e.length+s*2,l=Math.floor(a*Z6),m=i/a,d=(r.width||l)*m,c=(r.height||l)*m,p=r.x==null?e.length/2-d/2:r.x*m,u=r.y==null?e.length/2-c/2:r.y*m,h=r.opacity==null?1:r.opacity;let f=null;if(r.excavate){let x=Math.floor(p),w=Math.floor(u),b=Math.ceil(d+p-x),j=Math.ceil(c+u-w);f={x,y:w,w:b,h:j}}const g=r.crossOrigin;return{x:p,y:u,h:c,w:d,excavation:f,opacity:h,crossOrigin:g}}function F6(e,a){return a!=null?Math.max(Math.floor(a),0):e?$6:O6}function F0({value:e,level:a,minVersion:s,includeMargin:r,marginSize:i,imageSettings:l,size:m,boostLevel:d}){let c=o.useMemo(()=>{const x=(Array.isArray(e)?e:[e]).reduce((w,b)=>(w.push(...Ba.QrSegment.makeSegments(b)),w),[]);return Ba.QrCode.encodeSegments(x,P6[a],s,void 0,void 0,d)},[e,a,s,d]);const{cells:p,margin:u,numCells:h,calculatedImageSettings:f}=o.useMemo(()=>{let g=c.getModules();const x=F6(r,i),w=g.length+x*2,b=H6(g,m,x,l);return{cells:g,margin:x,numCells:w,calculatedImageSettings:b}},[c,m,l,r,i]);return{qrcode:c,margin:u,cells:p,numCells:h,calculatedImageSettings:f}}var T6=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),I6=o.forwardRef(function(a,s){const r=a,{value:i,size:l=M0,level:m=R0,bgColor:d=L0,fgColor:c=P0,includeMargin:p=$0,minVersion:u=O0,boostLevel:h,marginSize:f,imageSettings:g}=r,w=wr(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:b}=w,j=wr(w,["style"]),v=g==null?void 0:g.src,k=o.useRef(null),N=o.useRef(null),_=o.useCallback(S=>{k.current=S,typeof s=="function"?s(S):s&&(s.current=S)},[s]),[C,y]=o.useState(!1),{margin:E,cells:A,numCells:H,calculatedImageSettings:M}=F0({value:i,level:m,minVersion:u,boostLevel:h,includeMargin:p,marginSize:f,imageSettings:g,size:l});o.useEffect(()=>{if(k.current!=null){const S=k.current,$=S.getContext("2d");if(!$)return;let Z=A;const R=N.current,L=M!=null&&R!==null&&R.complete&&R.naturalHeight!==0&&R.naturalWidth!==0;L&&M.excavation!=null&&(Z=H0(A,M.excavation));const O=window.devicePixelRatio||1;S.height=S.width=l*O;const F=l/H*O;$.scale(F,F),$.fillStyle=d,$.fillRect(0,0,H,H),$.fillStyle=c,T6?$.fill(new Path2D(Z0(Z,E))):A.forEach(function(W,U){W.forEach(function(V,G){V&&$.fillRect(G+E,U+E,1,1)})}),M&&($.globalAlpha=M.opacity),L&&$.drawImage(R,M.x+E,M.y+E,M.w,M.h)}}),o.useEffect(()=>{y(!1)},[v]);const T=fr({height:l,width:l},b);let P=null;return v!=null&&(P=o.createElement("img",{src:v,key:v,style:{display:"none"},onLoad:()=>{y(!0)},ref:N,crossOrigin:M==null?void 0:M.crossOrigin})),o.createElement(o.Fragment,null,o.createElement("canvas",fr({style:T,height:l,width:l,ref:_,role:"img"},j)),P)});I6.displayName="QRCodeCanvas";var Ur=o.forwardRef(function(a,s){const r=a,{value:i,size:l=M0,level:m=R0,bgColor:d=L0,fgColor:c=P0,includeMargin:p=$0,minVersion:u=O0,boostLevel:h,title:f,marginSize:g,imageSettings:x}=r,w=wr(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:b,cells:j,numCells:v,calculatedImageSettings:k}=F0({value:i,level:m,minVersion:u,boostLevel:h,includeMargin:p,marginSize:g,imageSettings:x,size:l});let N=j,_=null;x!=null&&k!=null&&(k.excavation!=null&&(N=H0(j,k.excavation)),_=o.createElement("image",{href:x.src,height:k.h,width:k.w,x:k.x+b,y:k.y+b,preserveAspectRatio:"none",opacity:k.opacity,crossOrigin:k.crossOrigin}));const C=Z0(N,b);return o.createElement("svg",fr({height:l,width:l,viewBox:`0 0 ${v} ${v}`,ref:s,role:"img"},w),!!f&&o.createElement("title",null,f),o.createElement("path",{fill:d,d:`M0,0 h${v}v${v}H0z`,shapeRendering:"crispEdges"}),o.createElement("path",{fill:c,d:C,shapeRendering:"crispEdges"}),_)});Ur.displayName="QRCodeSVG";const Xi=({onClose:e,onChangePassword:a,triggerRef:s,isSetup:r=!1})=>{const i=o.useRef(null),[l,m]=o.useState(!1),[d,c]=o.useState(""),[p,u]=o.useState(""),[h,f]=o.useState(""),[g,x]=o.useState(!1),[w,b]=o.useState(!1),[j,v]=o.useState(!1),[k,N]=o.useState(!1),[_,C]=o.useState({}),y=bt({contentRef:i,triggerRef:s??{current:null},isOpen:l,minWidth:380,defaultMaxHeight:420});o.useEffect(()=>{m(!0);const A=M=>{i.current&&!i.current.contains(M.target)&&e()},H=M=>{M.key==="Escape"&&e()};return document.addEventListener("mousedown",A),document.addEventListener("keydown",H),()=>{document.removeEventListener("mousedown",A),document.removeEventListener("keydown",H)}},[e]);const E=async()=>{if(k)return;const A={};if(!r&&!d&&(A.currentPassword="Current password is required"),p?p.length<8&&(A.newPassword="Password must be at least 8 characters"):A.newPassword="New password is required",p!==h&&(A.confirmPassword="Passwords do not match"),Object.keys(A).length>0){C(A);return}N(!0);try{await a(r?"":d,p),e()}catch(H){C({form:H.message||"Failed to update password"})}finally{N(!1)}};return l?t.jsxs("div",{ref:i,className:"w-pop",style:{position:"fixed",zIndex:1001,width:380,maxWidth:"calc(100vw - 24px)",top:(y==null?void 0:y.top)!==void 0?`${y.top}px`:void 0,bottom:(y==null?void 0:y.bottom)!==void 0?`${y.bottom}px`:void 0,left:(y==null?void 0:y.left)!==void 0?`${y.left}px`:void 0,right:(y==null?void 0:y.right)!==void 0?`${y.right}px`:void 0,maxHeight:y!=null&&y.maxHeight?`${y.maxHeight}px`:void 0,visibility:y?"visible":"hidden"},onClick:A=>A.stopPropagation(),children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:r?"Set Password":"Change Password"}),t.jsx("p",{className:"w-pop-sub",children:r?"Set a password for your account to enable password authentication.":"Update your account password to keep it secure."})]}),!r&&t.jsxs("div",{className:"w-field",children:[t.jsx(Ve,{children:"Current Password"}),t.jsxs("div",{className:"w-input-wrap",children:[t.jsx(ye,{type:g?"text":"password",placeholder:"Enter your current password",value:d,onChange:A=>c(A.target.value),style:{paddingRight:40}}),t.jsx("button",{type:"button",className:"w-input-eye",onClick:()=>x(!g),"aria-label":g?"Hide current password":"Show current password",children:g?t.jsx(En,{size:16}):t.jsx(Sn,{size:16})})]}),_.currentPassword&&t.jsx("span",{className:"w-input-err",children:_.currentPassword})]}),t.jsxs("div",{className:"w-field",children:[t.jsx(Ve,{children:r?"Password":"New Password"}),t.jsxs("div",{className:"w-input-wrap",children:[t.jsx(ye,{type:w?"text":"password",placeholder:r?"Enter your password":"Enter your new password",value:p,onChange:A=>u(A.target.value),style:{paddingRight:40}}),t.jsx("button",{type:"button",className:"w-input-eye",onClick:()=>b(!w),"aria-label":w?"Hide new password":"Show new password",children:w?t.jsx(En,{size:16}):t.jsx(Sn,{size:16})})]}),_.newPassword&&t.jsx("span",{className:"w-input-err",children:_.newPassword})]}),t.jsxs("div",{className:"w-field",children:[t.jsx(Ve,{children:"Confirm New Password"}),t.jsxs("div",{className:"w-input-wrap",children:[t.jsx(ye,{type:j?"text":"password",placeholder:"Confirm your new password",value:h,onChange:A=>f(A.target.value),style:{paddingRight:40}}),t.jsx("button",{type:"button",className:"w-input-eye",onClick:()=>v(!j),"aria-label":j?"Hide confirm password":"Show confirm password",children:j?t.jsx(En,{size:16}):t.jsx(Sn,{size:16})})]}),_.confirmPassword&&t.jsx("span",{className:"w-input-err",children:_.confirmPassword})]}),_.form&&t.jsx("span",{className:"w-input-err",children:_.form})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:E,disabled:k,children:k?r?"Setting...":"Updating...":r?"Set Password":"Update Password"})]})]}):null},V6=({onClose:e,onRemovePassword:a,triggerRef:s})=>{const r=o.useRef(null),[i,l]=o.useState(!1),[m,d]=o.useState(""),[c,p]=o.useState(!1),{toast:u}=aa(),h=bt({contentRef:r,triggerRef:s??{current:null},isOpen:i,minWidth:400,defaultMaxHeight:360});o.useEffect(()=>{l(!0);const g=w=>{r.current&&!r.current.contains(w.target)&&e()},x=w=>{w.key==="Escape"&&e()};return document.addEventListener("mousedown",g),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",x)}},[e]);const f=async()=>{if(!(!m||c)){p(!0);try{await a(m),e()}catch(g){const x=g.message||"Failed to remove password. Please try again.";u(x,"error")}finally{p(!1)}}};return i?t.jsxs("div",{ref:r,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(h==null?void 0:h.top)!==void 0?`${h.top}px`:void 0,bottom:(h==null?void 0:h.bottom)!==void 0?`${h.bottom}px`:void 0,left:(h==null?void 0:h.left)!==void 0?`${h.left}px`:void 0,right:(h==null?void 0:h.right)!==void 0?`${h.right}px`:void 0,maxHeight:h!=null&&h.maxHeight?`${h.maxHeight}px`:void 0,visibility:h?"visible":"hidden"},onClick:g=>g.stopPropagation(),children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Remove Password"}),t.jsxs("div",{className:"w-banner w-banner--warn",children:[t.jsx(Ta,{size:16}),t.jsx("span",{className:"w-banner-txt",children:"You're about to remove password authentication from your account. Make sure you have another way to sign in (email, phone, social login, or passkey) before continuing."})]}),t.jsxs(Ge,{children:[t.jsx(Ve,{htmlFor:"current-password",children:"Confirm your current password"}),t.jsx(ye,{id:"current-password",type:"password",placeholder:"Enter current password",value:m,onChange:g=>d(g.target.value),autoFocus:!0})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--danger-solid w-btn--sm",onClick:f,disabled:!m||c,children:c?"Removing...":"Remove Password"})]})]}):null},z6=({onClose:e,onSetupTOTP:a,onVerifyTOTP:s,triggerRef:r})=>{const i=o.useRef(null),[l,m]=o.useState("qr"),[d,c]=o.useState(""),[p,u]=o.useState(""),[h,f]=o.useState(["",""]),[g,x]=o.useState(!1),[w,b]=o.useState(!1),{toast:j}=aa(),v=bt({contentRef:i,triggerRef:r??{current:null},isOpen:w,minWidth:380,defaultMaxHeight:460});o.useEffect(()=>{b(!0);const N=C=>{i.current&&!i.current.contains(C.target)&&e()},_=C=>{C.key==="Escape"&&e()};return document.addEventListener("mousedown",N),document.addEventListener("keydown",_),()=>{document.removeEventListener("mousedown",N),document.removeEventListener("keydown",_)}},[e]),o.useEffect(()=>{(async()=>{x(!0);try{const _=await a();c(_.otp_url||""),u(_.totp_secret||"")}catch(_){const C=_.message||"Failed to setup two-factor authentication. Please try again.";j(C,"error")}finally{x(!1)}})()},[]);const k=async()=>{if(!h.some(N=>N.length!==6)){x(!0);try{await s(h),e()}catch(N){const _=N.message||"Failed to verify codes. Please check your authenticator app and try again.";j(_,"error")}finally{x(!1)}}};return w?t.jsx("div",{ref:i,className:"w-pop",style:{position:"fixed",zIndex:1001,width:340,maxWidth:"calc(100vw - 24px)",top:(v==null?void 0:v.top)!==void 0?`${v.top}px`:void 0,bottom:(v==null?void 0:v.bottom)!==void 0?`${v.bottom}px`:void 0,left:(v==null?void 0:v.left)!==void 0?`${v.left}px`:void 0,right:(v==null?void 0:v.right)!==void 0?`${v.right}px`:void 0,maxHeight:v!=null&&v.maxHeight?`${v.maxHeight}px`:void 0,visibility:v?"visible":"hidden"},onClick:N=>N.stopPropagation(),children:l==="qr"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Setup Two-Factor Authentication"}),t.jsx("p",{className:"w-pop-sub",children:"Scan this QR code with your authenticator app (Google Authenticator, Authy, etc.)"})]}),t.jsx("div",{className:"w-flex w-justify-center",children:g?t.jsx("div",{className:"w-qr w-text-muted",children:"Loading..."}):d?t.jsx("div",{className:"w-qr",style:{background:"#fff",padding:8},children:t.jsx(Ur,{value:d,size:130,title:"QR Code for Two-Factor Authentication Setup","aria-label":"Scan this QR code with your authenticator app to set up two-factor authentication"})}):t.jsx("div",{className:"w-qr w-text-error",children:"QR Code Not Available"})}),p&&t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-secsub",children:"Or enter manually:"}),t.jsx("div",{className:"w-token",children:t.jsx("code",{style:{wordBreak:"break-all"},children:p})})]})]}),t.jsx("div",{className:"w-pop-foot",children:t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:()=>m("verify"),disabled:g||!d,children:"I've Scanned the Code"})})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-pop-title",children:"Verify Your Authenticator"}),t.jsx("p",{className:"w-pop-sub",children:"Enter two consecutive codes from your authenticator app"})]}),t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsx(ye,{id:"totp-code-1",type:"text",placeholder:"000000",value:h[0],onChange:N=>{const _=N.target.value.replace(/[^0-9]/g,"").substring(0,6);f([_,h[1]])},maxLength:6,style:{textAlign:"center",fontFamily:"var(--wa-font-mono)"},"aria-label":"First verification code from authenticator app"}),t.jsx(ye,{id:"totp-code-2",type:"text",placeholder:"000000",value:h[1],onChange:N=>{const _=N.target.value.replace(/[^0-9]/g,"").substring(0,6);f([h[0],_])},maxLength:6,style:{textAlign:"center",fontFamily:"var(--wa-font-mono)"},"aria-label":"Second verification code from authenticator app"})]})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:()=>m("qr"),children:"Back"}),t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:k,disabled:g||h.some(N=>N.length!==6),children:g?"Verifying...":"Verify"})]})]})}):null},D6=({codes:e,onClose:a,onCopy:s,onDownload:r,triggerRef:i})=>{const l=o.useRef(null),[m,d]=o.useState(!1),c=bt({contentRef:l,triggerRef:i??{current:null},isOpen:m,minWidth:380,defaultMaxHeight:360});return o.useEffect(()=>{d(!0);const p=h=>{l.current&&!l.current.contains(h.target)&&a()},u=h=>{h.key==="Escape"&&a()};return document.addEventListener("mousedown",p),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",u)}},[a]),m?t.jsx("div",{ref:l,className:"w-pop",style:{position:"fixed",zIndex:1001,width:380,maxWidth:"calc(100vw - 24px)",top:(c==null?void 0:c.top)!==void 0?`${c.top}px`:void 0,bottom:(c==null?void 0:c.bottom)!==void 0?`${c.bottom}px`:void 0,left:(c==null?void 0:c.left)!==void 0?`${c.left}px`:void 0,right:(c==null?void 0:c.right)!==void 0?`${c.right}px`:void 0,maxHeight:c!=null&&c.maxHeight?`${c.maxHeight}px`:void 0,visibility:c?"visible":"hidden"},onClick:p=>p.stopPropagation(),children:t.jsxs("div",{className:"w-pop-body",children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-2",children:[t.jsx("div",{className:"w-pop-title",children:"Backup Codes"}),t.jsxs("div",{className:"w-flex w-gap-2 w-none",children:[t.jsxs(se,{$outline:!0,$size:"sm",onClick:s,children:[t.jsx(qa,{size:14}),"Copy"]}),t.jsxs(se,{$outline:!0,$size:"sm",onClick:r,children:[t.jsx(fl,{size:14}),"DownloadSimple"]})]})]}),t.jsx("p",{className:"w-pop-sub",children:"Save these backup codes in a secure location. Each code can only be used once."}),t.jsx("div",{className:"w-codes",children:e.map((p,u)=>t.jsx("span",{role:"button",style:{cursor:"pointer"},onClick:()=>{navigator.clipboard.writeText(p)},title:"Click to copy",children:p},u))}),t.jsxs("div",{className:"w-banner w-banner--warn",children:[t.jsx("span",{style:{fontSize:13.5},children:"⚠️"}),t.jsx("span",{className:"w-banner-txt",children:"Keep these codes safe! They won't be shown again."})]})]})}):null},U6=({onClose:e,onAddPasskey:a,triggerRef:s})=>{const r=o.useRef(null),[i,l]=o.useState(!1),[m,d]=o.useState(""),[c,p]=o.useState(!1),[u,h]=o.useState(""),f=bt({contentRef:r,triggerRef:s??{current:null},isOpen:i,minWidth:320,defaultMaxHeight:260});o.useEffect(()=>{l(!0);const x=b=>{r.current&&!r.current.contains(b.target)&&e()},w=b=>{b.key==="Escape"&&e()};return document.addEventListener("mousedown",x),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",w)}},[e]);const g=async()=>{if(!c){p(!0),h("");try{await a(m.trim()),e()}catch(x){h(x.message||"Failed to register passkey"),p(!1)}}};return i?t.jsxs("div",{ref:r,className:"w-pop",style:{position:"fixed",zIndex:1001,maxWidth:"calc(100vw - 24px)",top:(f==null?void 0:f.top)!==void 0?`${f.top}px`:void 0,bottom:(f==null?void 0:f.bottom)!==void 0?`${f.bottom}px`:void 0,left:(f==null?void 0:f.left)!==void 0?`${f.left}px`:void 0,right:(f==null?void 0:f.right)!==void 0?`${f.right}px`:void 0,maxHeight:f!=null&&f.maxHeight?`${f.maxHeight}px`:void 0,visibility:f?"visible":"hidden"},onClick:x=>x.stopPropagation(),children:[t.jsxs("div",{className:"w-pop-body",children:[t.jsx("div",{className:"w-pop-title",children:"Add Passkey"}),t.jsx(ye,{type:"text",placeholder:"e.g., MacBook Pro, iPhone",value:m,onChange:x=>d(x.target.value),autoFocus:!0}),u&&t.jsx("span",{className:"w-input-err",children:u})]}),t.jsxs("div",{className:"w-pop-foot",children:[t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:e,children:"Cancel"}),t.jsx("button",{className:"w-btn w-btn--primary w-btn--sm",style:{width:"auto"},onClick:g,disabled:c,children:c?"Registering...":"Continue"})]})]}):null},W6=({children:e})=>t.jsx("div",{className:"w-eyebrow",children:e}),B6=()=>{var ra,ia,oa,la,ie,ve,Ae;const{deployment:e}=_e(),{user:a,updatePassword:s,removePassword:r,setupAuthenticator:i,verifyAuthenticator:l,deleteAuthenticator:m,generateBackupCodes:d,regenerateBackupCodes:c,updateProfile:p,getPasskeys:u,registerPasskey:h,deletePasskey:f}=ya(),{toast:g}=aa(),[x,w]=o.useState((a==null?void 0:a.second_factor_policy)||"none"),[b,j]=o.useState(!1),v=async J=>{try{await p({second_factor_policy:J}),w(J),g("2FA requirement updated successfully","info")}catch(be){g(be.message||"Failed to update 2FA requirement","error")}},[k,N]=o.useState(!1),[_,C]=o.useState(!1),[y,E]=o.useState(!1),[A,H]=o.useState(!1),M=o.useRef(null),T=o.useRef(null),P=o.useRef(null),S=o.useRef(null),[$,Z]=o.useState([]),[R,L]=o.useState(!1),[O,F]=o.useState(!1),[W,U]=o.useState(!1),[V,G]=o.useState(!1),[Y,de]=o.useState(null),fe=o.useRef(null),[ne,ae]=o.useState("table"),[re,Le]=o.useState(""),[K,at]=o.useState(""),[ze,We]=o.useState(""),[Re,ce]=o.useState(["",""]),[B,q]=o.useState([]),[X,oe]=o.useState(!1),[Ee,z]=o.useState(!1),[D]=o.useState(!1),[we,ge]=o.useState(!1),xe=(ra=e==null?void 0:e.auth_settings)==null?void 0:ra.auth_factors_enabled,lt=(oa=(ia=e==null?void 0:e.auth_settings)==null?void 0:ia.password)==null?void 0:oa.enabled;if(!(xe!=null&&xe.authenticator)&&!(xe!=null&&xe.backup_code)&&!lt)return null;const Qe=async(J,be)=>{await s(J,be),await a.refetch(),g("Password updated successfully","info")},Q=async J=>{await r(J),await a.refetch(),g("Password removed successfully","info")},le=()=>{var _t,Ke,wt,Gt,ca,da;if(!a)return!1;const J=(_t=a.user_email_addresses)==null?void 0:_t.some(ua=>ua.verified),be=(Ke=a.user_phone_numbers)==null?void 0:Ke.some(ua=>ua.verified),Je=a.social_connections&&a.social_connections.length>0,De=e==null?void 0:e.auth_settings;return(De==null?void 0:De.first_factor)==="email_otp"&&J||((wt=De==null?void 0:De.magic_link)==null?void 0:wt.enabled)&&J||((Gt=De==null?void 0:De.passkey)==null?void 0:Gt.enabled)||((ca=De==null?void 0:De.auth_factors_enabled)==null?void 0:ca.phone_otp)&&be||Je&&((da=e==null?void 0:e.social_connections)==null?void 0:da.some(ua=>ua.enabled))},me=async()=>{if(Re.some(J=>J.length!==6)){g("Please enter both 6-digit verification codes","error");return}try{if(z(!0),await l(ze,Re),await a.refetch(),xe!=null&&xe.backup_code){const J=await d();q(J),await a.refetch(),ae("backup")}else ae("success")}catch(J){g(J.message||"Invalid verification codes","error")}finally{z(!1)}},Te=()=>{ae("table"),Le(""),at(""),We(""),ce(["",""]),q([]),g("Two-factor authentication setup completed successfully!","info")},Pe=async()=>{var J;if((J=a==null?void 0:a.user_authenticator)!=null&&J.id)try{ge(!0),await m(a.user_authenticator.id),await a.refetch(),j(!1),g("Two-factor authentication removed successfully","info")}catch(be){g(be.message||"Failed to remove authenticator","error")}finally{ge(!1)}},qe=async()=>{if(!X)try{oe(!0);const J=await c();q(J),await a.refetch(),H(!0),g("New backup codes generated","info")}catch(J){g(J.message||"Failed to generate backup codes","error")}finally{oe(!1)}},pt=()=>{const J=B.join(`
117
+ `);navigator.clipboard.writeText(J).then(()=>{g("Backup codes copied to clipboard","info")}).catch(()=>{g("Failed to copy backup codes","error")})},sa=()=>{const J=B.join(`
118
+ `),be=new Blob([J],{type:"text/plain"}),Je=URL.createObjectURL(be),De=document.createElement("a");De.href=Je,De.download="wacht-backup-codes.txt",De.click(),URL.revokeObjectURL(Je),g("Backup codes downloaded","info")},It=async()=>{var J,be;if((be=(J=e==null?void 0:e.auth_settings)==null?void 0:J.passkey)!=null&&be.enabled)try{L(!0);const Je=await u();Z(Je.data||[])}catch{g("Failed to load passkeys","error")}finally{L(!1)}},na=async J=>{try{F(!0),await h(J||void 0),await It(),g("Passkey registered successfully!","info")}catch(be){throw g(be.message||"Failed to register passkey","error"),be}finally{F(!1)}},Bt=async J=>{try{await f(J),await It(),g("Passkey removed","info")}catch(be){g(be.message||"Failed to remove passkey","error")}};o.useEffect(()=>{It()},[(ie=(la=e==null?void 0:e.auth_settings)==null?void 0:la.passkey)==null?void 0:ie.enabled]);const yt=[];return lt&&yt.push({id:"password",name:"Password",description:"Secure your account with a strong password",status:a!=null&&a.has_password?"Enabled":"Disabled",actions:a!=null&&a.has_password?["change"]:["setup"],group:"sign-in"}),(Ae=(ve=e==null?void 0:e.auth_settings)==null?void 0:ve.passkey)!=null&&Ae.enabled&&yt.push({id:"passkey",name:"Passkeys",description:"Sign in faster with fingerprint, face, or screen lock",status:$.length>0?`${$.length} registered`:"",actions:$.length>0?["manage","add"]:["add"],group:"sign-in"}),xe!=null&&xe.authenticator&&yt.push({id:"authenticator",name:"Authenticator App",description:"Use an authenticator app for extra security",status:a!=null&&a.user_authenticator?"Enabled":"Disabled",actions:a!=null&&a.user_authenticator?["remove"]:["setup"],group:"sign-in"}),a!=null&&a.user_authenticator&&yt.push({id:"backup_codes",name:"Backup Codes",description:"Recovery codes if you lose your authenticator",status:a!=null&&a.backup_codes_generated?"Generated":"Not Generated",actions:["generate"],group:"recovery"}),a!=null&&a.user_authenticator&&yt.push({id:"second_factor_policy",name:"Require 2FA",description:"Require a second factor for all sign-ins",status:x==="enforced"?"Enforced":"Optional",actions:["toggle"],group:"recovery"}),ne!=="table"?t.jsxs(t.Fragment,{children:[t.jsxs(v0,{children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[t.jsx(ea,{size:16}),t.jsxs("span",{className:"w-sec",children:[ne==="qr"&&"Setup Two-Factor Authentication",ne==="verify"&&"Verify Your Authenticator",ne==="backup"&&"Save Your Backup Codes",ne==="success"&&"Setup Complete!"]})]}),t.jsx(se,{$outline:!0,$size:"sm",onClick:()=>ae("table"),children:"← Back"})]}),t.jsxs("div",{className:"w-narrow w-flex-col w-items-center w-gap-5",style:{textAlign:"center"},children:[ne==="qr"&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"w-secsub",children:"Scan this QR code with your authenticator app (Google Authenticator, Authy, etc.)"}),t.jsx("div",{className:"w-flex w-justify-center",children:D?t.jsxs("div",{className:"w-qr w-flex-col w-items-center w-gap-3",children:[t.jsx("span",{className:"w-spin"}),t.jsx("div",{className:"w-secsub",children:"Loading QR Code..."})]}):re?t.jsx("div",{className:"w-tile w-flex w-items-center w-justify-center",children:t.jsx(Ur,{value:re,size:200,level:"M",marginSize:0})}):t.jsx("div",{className:"w-qr w-text-error",children:"QR Code Not Available"})}),t.jsxs("div",{className:"w-flex-col w-gap-2 w-full",children:[t.jsx("p",{className:"w-secsub",children:"Or enter this code manually:"}),t.jsx("div",{className:"w-token",children:t.jsx("code",{children:K||"Loading..."})})]}),t.jsx(se,{$fullWidth:!0,onClick:()=>ae("verify"),disabled:!re||!K,children:"I've Scanned the Code"})]}),ne==="verify"&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"w-secsub",children:"Enter two consecutive codes from your authenticator app to verify setup"}),t.jsxs("div",{className:"w-flex w-justify-center w-gap-3",children:[t.jsx(ye,{type:"text",placeholder:"000000",value:Re[0],onChange:J=>{const be=J.target.value.replace(/[^0-9]/g,"").substring(0,6);ce([be,Re[1]])},maxLength:6,style:{textAlign:"center",fontFamily:"monospace"}}),t.jsx(ye,{type:"text",placeholder:"000000",value:Re[1],onChange:J=>{const be=J.target.value.replace(/[^0-9]/g,"").substring(0,6);ce([Re[0],be])},maxLength:6,style:{textAlign:"center",fontFamily:"monospace"}})]}),t.jsxs("div",{className:"w-flex w-justify-center w-gap-3",children:[t.jsx(se,{$outline:!0,$size:"sm",onClick:()=>ae("qr"),children:"Back"}),t.jsx(se,{$size:"sm",onClick:me,disabled:Ee||Re.some(J=>J.length!==6),children:Ee?"Verifying...":"Verify & Continue"})]})]}),ne==="backup"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-banner w-banner--warn",style:{textAlign:"left"},children:[t.jsx(Ta,{size:16}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-sec",children:"Important!"}),t.jsx("div",{className:"w-banner-txt",children:"Store these codes safely. Each code can only be used once if you lose access to your authenticator device."})]})]}),t.jsx("div",{className:"w-codes w-full",children:B.map((J,be)=>t.jsx("span",{onClick:()=>navigator.clipboard.writeText(J),style:{cursor:"pointer"},children:J},be))}),t.jsxs("div",{className:"w-flex w-justify-center w-gap-3",children:[t.jsx(se,{$outline:!0,$size:"sm",onClick:pt,children:"Copy All"}),t.jsxs(se,{$outline:!0,$size:"sm",onClick:sa,children:[t.jsx(fl,{size:16}),"DownloadSimple"]})]}),t.jsx(se,{$fullWidth:!0,onClick:Te,children:"Complete Setup"})]}),ne==="success"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"w-success",children:[t.jsx("span",{className:"ring"}),t.jsx("span",{className:"disc",children:t.jsx(Ye,{size:26})})]}),t.jsxs("div",{className:"w-flex-col w-gap-1 w-items-center",children:[t.jsx("h3",{className:"w-title",children:"All Set!"}),t.jsx("p",{className:"w-secsub",children:"Your account is now protected with two-factor authentication."})]}),t.jsx(se,{$fullWidth:!0,onClick:Te,children:"Continue to Security"})]})]})]}):t.jsx(t.Fragment,{children:yt.length?t.jsx("div",{children:yt.map((J,be)=>{const Je=be>0?yt[be-1].group:null,De=J.group!==Je,jt=yt[be+1],_t=jt&&jt.group===J.group;return t.jsxs("div",{children:[De&&t.jsx(W6,{$first:be===0,children:J.group==="sign-in"?"Sign-in methods":"Recovery"}),t.jsxs(b0,{children:[t.jsxs(y0,{children:[t.jsx("div",{className:"w-flex w-items-center w-wrap w-gap-2 w-sec",children:t.jsx("span",{children:J.name})}),t.jsx("div",{className:"w-secsub",children:J.description})]}),t.jsx(j0,{children:t.jsxs("div",{className:"w-relative",children:[J.id==="password"&&t.jsx(t.Fragment,{children:a!=null&&a.has_password?t.jsxs("div",{className:"w-flex w-gap-2",children:[t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:T,onClick:()=>C(!0),children:"Change"}),_&&t.jsx(Xi,{triggerRef:T,onClose:()=>C(!1),onChangePassword:Qe})]}),le()&&t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$destructive:!0,$size:"sm",ref:P,onClick:()=>E(!0),children:"Remove"}),y&&t.jsx(V6,{triggerRef:P,onClose:()=>E(!1),onRemovePassword:Q})]})]}):t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:T,onClick:()=>C(!0),children:"Setup"}),_&&t.jsx(Xi,{triggerRef:T,onClose:()=>C(!1),onChangePassword:Qe,isSetup:!0})]})}),J.id==="authenticator"&&!(a!=null&&a.user_authenticator)&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:M,onClick:()=>N(!0),disabled:D,children:D?"Setting up...":"Setup"}),k&&t.jsx(z6,{triggerRef:M,onClose:()=>N(!1),onSetupTOTP:async()=>{const Ke=await i();return We(Ke.id),Ke},onVerifyTOTP:async Ke=>{await l(ze,Ke),await a.refetch(),g("Two-factor authentication enabled successfully!","info")}})]})}),J.id==="authenticator"&&(a==null?void 0:a.user_authenticator)&&t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$destructive:!0,$size:"sm",onClick:()=>j(!0),disabled:we,children:we?"Removing...":"Remove"}),b&&t.jsx(Ja,{title:"Remove MFA and reset policy to default?",onConfirm:Pe,onCancel:()=>j(!1)})]}),J.id==="backup_codes"&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:S,onClick:qe,disabled:X,children:X?"Generating...":a!=null&&a.backup_codes_generated?"Regenerate":"Generate"}),A&&t.jsx(D6,{triggerRef:S,codes:B,onClose:()=>H(!1),onCopy:pt,onDownload:sa})]})}),J.id==="second_factor_policy"&&t.jsx(Ha,{checked:x==="enforced",onChange:Ke=>{v(Ke?"enforced":"none")}}),J.id==="passkey"&&t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[t.jsxs(se,{$outline:!0,$size:"sm",onClick:()=>U(!W),children:[W?"Hide":"Manage"," ","(",$.length,")",t.jsx(Wt,{size:14,style:{transform:W?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}})]}),t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$size:"sm",ref:fe,onClick:()=>G(!0),disabled:O,children:O?"Adding...":"Add"}),V&&t.jsx(U6,{triggerRef:fe,onClose:()=>G(!1),onAddPasskey:na})]})]})]})})]}),J.id==="passkey"&&W&&t.jsx("div",{className:"w-flex-col w-gap-2",children:R?t.jsx("div",{className:"w-loading",children:t.jsx(ke,{})}):$.length===0?t.jsx("div",{className:"w-empty",children:t.jsx("p",{children:"No passkeys registered yet"})}):t.jsx("div",{className:"w-flex-col w-gap-2",children:$.map(Ke=>t.jsxs("div",{className:"w-locked w-flex w-items-center w-justify-between",style:{height:"auto",padding:"10px 12px"},children:[t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("span",{className:"w-sec",children:Ke.name||"Unnamed Passkey"}),t.jsxs("span",{className:"w-secsub",children:[Ke.device_type==="platform"?"This device":"Security key",Ke.last_used_at&&` • Last used ${new Date(Ke.last_used_at).toLocaleDateString()}`]})]}),t.jsxs("div",{className:"w-relative",children:[t.jsx(se,{$destructive:!0,$size:"sm",onClick:()=>de(Ke.id),children:"Remove"}),Y===Ke.id&&t.jsx(Ja,{title:`Remove "${Ke.name||"Unnamed Passkey"}"?`,onConfirm:()=>{Bt(Ke.id),de(null)},onCancel:()=>de(null)})]})]},Ke.id))})}),_t&&t.jsx("div",{className:"w-hr"})]},J.id)})}):t.jsx(Nt,{title:"No security features available",description:"Contact your administrator to enable security features."})})},G6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",...e,children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:"a",x1:3.217,x2:44.781,y1:15,y2:15,gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#d93025"}),t.jsx("stop",{offset:1,stopColor:"#ea4335"})]}),t.jsxs("linearGradient",{id:"b",x1:20.722,x2:41.504,y1:47.679,y2:11.684,gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#fcc934"}),t.jsx("stop",{offset:1,stopColor:"#fbbc04"})]}),t.jsxs("linearGradient",{id:"c",x1:26.598,x2:5.816,y1:46.502,y2:10.506,gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#1e8e3e"}),t.jsx("stop",{offset:1,stopColor:"#34a853"})]})]}),t.jsx("circle",{cx:24,cy:23.995,r:12,style:{fill:"#fff"}}),t.jsx("path",{d:"M3.215 36A24 24 0 1 0 12 3.215 24 24 0 0 0 3.215 36Zm31.177-18A12 12 0 1 1 18 13.608 12 12 0 0 1 34.392 18Z",style:{fill:"none"}}),t.jsx("path",{d:"M24 12h20.781a23.994 23.994 0 0 0-41.564.003L13.607 30l.01-.002A11.985 11.985 0 0 1 24 12Z",style:{fill:"url(#a)"}}),t.jsx("circle",{cx:24,cy:24,r:9.5,style:{fill:"#1a73e8"}}),t.jsx("path",{d:"M34.391 30.003 24.001 48A23.994 23.994 0 0 0 44.78 12.003H23.999l-.003.01a11.985 11.985 0 0 1 10.395 17.99Z",style:{fill:"url(#b)"}}),t.jsx("path",{d:"M13.609 30.003 3.218 12.006A23.994 23.994 0 0 0 24.003 48l10.39-17.997-.007-.007a11.985 11.985 0 0 1-20.777.007Z",style:{fill:"url(#c)"}})]}),q6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:512,height:512,viewBox:"0 0 512 512",...e,children:[t.jsxs("defs",{children:[t.jsxs("radialGradient",{id:"g",cx:"210%",cy:"-100%",r:"290%",children:[t.jsx("stop",{offset:.1,stopColor:"#ffe226"}),t.jsx("stop",{offset:.79,stopColor:"#ff7139"})]}),t.jsxs("radialGradient",{id:"c",cx:"49%",cy:"40%",r:"128%",gradientTransform:"matrix(.82 0 0 1 .088 0)",children:[t.jsx("stop",{offset:.3,stopColor:"#960e18"}),t.jsx("stop",{offset:.35,stopColor:"#b11927",stopOpacity:.74}),t.jsx("stop",{offset:.43,stopColor:"#db293d",stopOpacity:.34}),t.jsx("stop",{offset:.5,stopColor:"#f5334b",stopOpacity:.09}),t.jsx("stop",{offset:.53,stopColor:"#ff3750",stopOpacity:0})]}),t.jsxs("radialGradient",{id:"d",cx:"48%",cy:"-12%",r:"140%",children:[t.jsx("stop",{offset:.13,stopColor:"#fff44f"}),t.jsx("stop",{offset:.53,stopColor:"#ff980e"})]}),t.jsxs("radialGradient",{id:"e",cx:"22.76%",cy:"110.11%",r:"100%",children:[t.jsx("stop",{offset:.35,stopColor:"#3a8ee6"}),t.jsx("stop",{offset:.67,stopColor:"#9059ff"}),t.jsx("stop",{offset:1,stopColor:"#c139e6"})]}),t.jsxs("radialGradient",{id:"f",cx:"52%",cy:"33%",r:"59%",gradientTransform:"scale(.9 1)",children:[t.jsx("stop",{offset:.21,stopColor:"#9059ff",stopOpacity:0}),t.jsx("stop",{offset:.97,stopColor:"#6e008b",stopOpacity:.6})]}),t.jsxs("radialGradient",{id:"b",cx:"87.4%",cy:"-12.9%",r:"128%",gradientTransform:"matrix(.8 0 0 1 .178 .129)",children:[t.jsx("stop",{offset:.13,stopColor:"#ffbd4f"}),t.jsx("stop",{offset:.28,stopColor:"#ff980e"}),t.jsx("stop",{offset:.47,stopColor:"#ff3750"}),t.jsx("stop",{offset:.78,stopColor:"#eb0878"}),t.jsx("stop",{offset:.86,stopColor:"#e50080"})]}),t.jsxs("radialGradient",{id:"h",cx:"84%",cy:"-41%",r:"180%",children:[t.jsx("stop",{offset:.11,stopColor:"#fff44f"}),t.jsx("stop",{offset:.46,stopColor:"#ff980e"}),t.jsx("stop",{offset:.72,stopColor:"#ff3647"}),t.jsx("stop",{offset:.9,stopColor:"#e31587"})]}),t.jsxs("radialGradient",{id:"i",cx:"16.1%",cy:"-18.6%",r:"348.8%",gradientTransform:"scale(1 .47) rotate(84 .279 -.297)",children:[t.jsx("stop",{offset:0,stopColor:"#fff44f"}),t.jsx("stop",{offset:.3,stopColor:"#ff980e"}),t.jsx("stop",{offset:.57,stopColor:"#ff3647"}),t.jsx("stop",{offset:.74,stopColor:"#e31587"})]}),t.jsxs("radialGradient",{id:"j",cx:"18.9%",cy:"-42.5%",r:"238.4%",children:[t.jsx("stop",{offset:.14,stopColor:"#fff44f"}),t.jsx("stop",{offset:.48,stopColor:"#ff980e"}),t.jsx("stop",{offset:.66,stopColor:"#ff3647"}),t.jsx("stop",{offset:.9,stopColor:"#e31587"})]}),t.jsxs("radialGradient",{id:"k",cx:"159.3%",cy:"-44.72%",r:"313.1%",children:[t.jsx("stop",{offset:.09,stopColor:"#fff44f"}),t.jsx("stop",{offset:.63,stopColor:"#ff980e"})]}),t.jsxs("linearGradient",{id:"a",x1:"87.25%",x2:"9.4%",y1:"15.5%",y2:"93.1%",children:[t.jsx("stop",{offset:.05,stopColor:"#fff44f"}),t.jsx("stop",{offset:.37,stopColor:"#ff980e"}),t.jsx("stop",{offset:.53,stopColor:"#ff3647"}),t.jsx("stop",{offset:.7,stopColor:"#e31587"})]}),t.jsxs("linearGradient",{id:"l",x1:"80%",x2:"18%",y1:"14%",y2:"84%",children:[t.jsx("stop",{offset:.17,stopColor:"#fff44f",stopOpacity:.8}),t.jsx("stop",{offset:.6,stopColor:"#fff44f",stopOpacity:0})]})]}),t.jsx("path",{fill:"url(#a)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0 .039.015.136.047.4C427.706 111.135 381.627 83.823 344 24.355c-1.9-3.007-3.805-6.022-5.661-9.2a73.716 73.716 0 0 1-2.646-4.972A43.7 43.7 0 0 1 332.1.677a.626.626 0 0 0-.546-.644.818.818 0 0 0-.451 0c-.034.012-.084.051-.12.065-.053.021-.12.069-.176.1.027-.036.083-.117.1-.136-60.37 35.356-80.85 100.761-82.732 133.484a120.249 120.249 0 0 0-66.142 25.488 71.355 71.355 0 0 0-6.225-4.7 111.338 111.338 0 0 1-.674-58.732c-24.688 11.241-43.89 29.01-57.85 44.7h-.111c-9.527-12.067-8.855-51.873-8.312-60.184-.114-.515-7.107 3.63-8.023 4.255a175.073 175.073 0 0 0-23.486 20.12 210.478 210.478 0 0 0-22.442 26.913c0 .012-.007.026-.011.038 0-.013.007-.026.011-.038a202.838 202.838 0 0 0-32.247 72.805c-.115.521-.212 1.061-.324 1.586-.452 2.116-2.08 12.7-2.365 15-.022.177-.032.347-.053.524a229.066 229.066 0 0 0-3.9 33.157c0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746zM201.716 354.447c1.124.537 2.18 1.124 3.334 1.639.048.033.114.07.163.1a126.191 126.191 0 0 1-3.497-1.739zm55.053-144.93zm198.131-30.59-.032-.233c.012.085.027.174.04.259z"}),t.jsx("path",{fill:"url(#b)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0-.058.011.048.036.226.012.085.027.174.04.259 22.675 61.47 10.322 123.978-7.479 162.175-27.539 59.1-94.215 119.67-198.576 116.716C136.1 454.651 36.766 370.988 18.223 261.41c-3.379-17.28 0-26.054 1.7-40.084-2.071 10.816-2.86 13.94-3.9 33.157 0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746z"}),t.jsx("path",{fill:"url(#c)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0-.058.011.048.036.226.012.085.027.174.04.259 22.675 61.47 10.322 123.978-7.479 162.175-27.539 59.1-94.215 119.67-198.576 116.716C136.1 454.651 36.766 370.988 18.223 261.41c-3.379-17.28 0-26.054 1.7-40.084-2.071 10.816-2.86 13.94-3.9 33.157 0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746z"}),t.jsx("path",{fill:"url(#d)",d:"M361.922 194.6c.524.368 1 .734 1.493 1.1a130.706 130.706 0 0 0-22.31-29.112C266.4 91.892 321.516 4.626 330.811.194c.027-.036.083-.117.1-.136-60.37 35.356-80.85 100.761-82.732 133.484 2.8-.194 5.592-.429 8.442-.429 45.051 0 84.289 24.77 105.301 61.487z"}),t.jsx("path",{fill:"url(#e)",d:"M256.772 209.514c-.393 5.978-21.514 26.593-28.9 26.593-68.339 0-79.432 41.335-79.432 41.335 3.027 34.81 27.261 63.475 56.611 78.643 1.339.692 2.694 1.317 4.05 1.935a132.768 132.768 0 0 0 7.059 2.886 106.743 106.743 0 0 0 31.271 6.031c119.78 5.618 142.986-143.194 56.545-186.408 22.137-3.85 45.115 5.053 57.947 14.067-21.012-36.714-60.25-61.484-105.3-61.484-2.85 0-5.641.235-8.442.429a120.249 120.249 0 0 0-66.142 25.488c3.664 3.1 7.8 7.244 16.514 15.828 16.302 16.067 58.13 32.705 58.219 34.657z"}),t.jsx("path",{fill:"url(#f)",d:"M256.772 209.514c-.393 5.978-21.514 26.593-28.9 26.593-68.339 0-79.432 41.335-79.432 41.335 3.027 34.81 27.261 63.475 56.611 78.643 1.339.692 2.694 1.317 4.05 1.935a132.768 132.768 0 0 0 7.059 2.886 106.743 106.743 0 0 0 31.271 6.031c119.78 5.618 142.986-143.194 56.545-186.408 22.137-3.85 45.115 5.053 57.947 14.067-21.012-36.714-60.25-61.484-105.3-61.484-2.85 0-5.641.235-8.442.429a120.249 120.249 0 0 0-66.142 25.488c3.664 3.1 7.8 7.244 16.514 15.828 16.302 16.067 58.13 32.705 58.219 34.657z"}),t.jsx("path",{fill:"url(#g)",d:"M170.829 151.036a244.042 244.042 0 0 1 4.981 3.3 111.338 111.338 0 0 1-.674-58.732c-24.688 11.241-43.89 29.01-57.85 44.7 1.155-.033 36.014-.66 53.543 10.732z"}),t.jsx("path",{fill:"url(#h)",d:"M18.223 261.41C36.766 370.988 136.1 454.651 248.855 457.844c104.361 2.954 171.037-57.62 198.576-116.716 17.8-38.2 30.154-100.7 7.479-162.175l-.008-.026-.032-.233c-.025-.178-.04-.284-.036-.226 0 .039.015.136.047.4 8.524 55.661-19.79 109.584-64.051 146.044l-.133.313c-86.245 70.223-168.774 42.368-185.484 30.966a144.108 144.108 0 0 1-3.5-1.743c-50.282-24.029-71.054-69.838-66.6-109.124-42.457 0-56.934-35.809-56.934-35.809s38.119-27.179 88.358-3.541c46.53 21.893 90.228 3.543 90.233 3.541-.089-1.952-41.917-18.59-58.223-34.656-8.713-8.584-12.85-12.723-16.514-15.828a71.355 71.355 0 0 0-6.225-4.7 282.929 282.929 0 0 0-4.981-3.3c-17.528-11.392-52.388-10.765-53.543-10.735h-.111c-9.527-12.067-8.855-51.873-8.312-60.184-.114-.515-7.107 3.63-8.023 4.255a175.073 175.073 0 0 0-23.486 20.12 210.478 210.478 0 0 0-22.442 26.919c0 .012-.007.026-.011.038 0-.013.007-.026.011-.038a202.838 202.838 0 0 0-32.247 72.805c-.115.521-8.65 37.842-4.44 57.199z"}),t.jsx("path",{fill:"url(#i)",d:"M341.105 166.587a130.706 130.706 0 0 1 22.31 29.112c1.323.994 2.559 1.985 3.608 2.952 54.482 50.2 25.936 121.2 23.807 126.26 44.261-36.46 72.575-90.383 64.051-146.044C427.706 111.135 381.627 83.823 344 24.355c-1.9-3.007-3.805-6.022-5.661-9.2a73.716 73.716 0 0 1-2.646-4.972A43.7 43.7 0 0 1 332.1.677a.626.626 0 0 0-.546-.644.818.818 0 0 0-.451 0c-.034.012-.084.051-.12.065-.053.021-.12.069-.176.1-9.291 4.428-64.407 91.694 10.298 166.389z"}),t.jsx("path",{fill:"url(#j)",d:"M367.023 198.651c-1.049-.967-2.285-1.958-3.608-2.952-.489-.368-.969-.734-1.493-1.1-12.832-9.014-35.81-17.917-57.947-14.067 86.441 43.214 63.235 192.026-56.545 186.408a106.743 106.743 0 0 1-31.271-6.031 134.51 134.51 0 0 1-7.059-2.886c-1.356-.618-2.711-1.243-4.05-1.935.048.033.114.07.163.1 16.71 11.4 99.239 39.257 185.484-30.966l.133-.313c2.129-5.054 30.675-76.057-23.807-126.258z"}),t.jsx("path",{fill:"url(#k)",d:"M148.439 277.443s11.093-41.335 79.432-41.335c7.388 0 28.509-20.615 28.9-26.593s-43.7 18.352-90.233-3.541c-50.239-23.638-88.358 3.541-88.358 3.541s14.477 35.809 56.934 35.809c-4.453 39.286 16.319 85.1 66.6 109.124 1.124.537 2.18 1.124 3.334 1.639-29.348-15.169-53.582-43.834-56.609-78.644z"}),t.jsx("path",{fill:"url(#l)",d:"M478.711 166.353c-10.445-25.124-31.6-52.248-48.212-60.821 13.52 26.505 21.345 53.093 24.335 72.936 0 .039.015.136.047.4C427.706 111.135 381.627 83.823 344 24.355c-1.9-3.007-3.805-6.022-5.661-9.2a73.716 73.716 0 0 1-2.646-4.972A43.7 43.7 0 0 1 332.1.677a.626.626 0 0 0-.546-.644.818.818 0 0 0-.451 0c-.034.012-.084.051-.12.065-.053.021-.12.069-.176.1.027-.036.083-.117.1-.136-60.37 35.356-80.85 100.761-82.732 133.484 2.8-.194 5.592-.429 8.442-.429 45.053 0 84.291 24.77 105.3 61.484-12.832-9.014-35.81-17.917-57.947-14.067 86.441 43.214 63.235 192.026-56.545 186.408a106.743 106.743 0 0 1-31.271-6.031 134.51 134.51 0 0 1-7.059-2.886c-1.356-.618-2.711-1.243-4.05-1.935.048.033.114.07.163.1a144.108 144.108 0 0 1-3.5-1.743c1.124.537 2.18 1.124 3.334 1.639-29.35-15.168-53.584-43.833-56.611-78.643 0 0 11.093-41.335 79.432-41.335 7.388 0 28.509-20.615 28.9-26.593-.089-1.952-41.917-18.59-58.223-34.656-8.713-8.584-12.85-12.723-16.514-15.828a71.355 71.355 0 0 0-6.225-4.7 111.338 111.338 0 0 1-.674-58.732c-24.688 11.241-43.89 29.01-57.85 44.7h-.111c-9.527-12.067-8.855-51.873-8.312-60.184-.114-.515-7.107 3.63-8.023 4.255a175.073 175.073 0 0 0-23.486 20.12 210.478 210.478 0 0 0-22.435 26.916c0 .012-.007.026-.011.038 0-.013.007-.026.011-.038a202.838 202.838 0 0 0-32.247 72.805c-.115.521-.212 1.061-.324 1.586-.452 2.116-2.486 12.853-2.77 15.156-.022.177.021-.176 0 0a279.565 279.565 0 0 0-3.544 33.53c0 .41-.025.816-.025 1.227C16 388.418 123.6 496 256.324 496c118.865 0 217.56-86.288 236.882-199.63.407-3.076.733-6.168 1.092-9.271 4.777-41.21-.53-84.525-15.587-120.746zm-23.841 12.341c.012.085.027.174.04.259l-.008-.026-.032-.233z"})]}),K6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:250.076,height:248.707,viewBox:"0 0 66.166 65.804",...e,children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:"b",children:[t.jsx("stop",{offset:0,stopColor:"#06c2e7"}),t.jsx("stop",{offset:.25,stopColor:"#0db8ec"}),t.jsx("stop",{offset:.5,stopColor:"#12aef1"}),t.jsx("stop",{offset:.75,stopColor:"#1f86f9"}),t.jsx("stop",{offset:1,stopColor:"#107ddd"})]}),t.jsxs("linearGradient",{id:"a",children:[t.jsx("stop",{offset:0,stopColor:"#bdbdbd"}),t.jsx("stop",{offset:1,stopColor:"#fff"})]}),t.jsx("linearGradient",{xlinkHref:"#a",id:"d",x1:412.975,x2:412.975,y1:237.608,y2:59.392,gradientTransform:"translate(206.79 159.773) scale(.35154)",gradientUnits:"userSpaceOnUse"}),t.jsx("filter",{id:"f",width:1.042,height:1.045,x:-.021,y:-.022,colorInterpolationFilters:"sRGB",children:t.jsx("feGaussianBlur",{stdDeviation:.958})}),t.jsx("filter",{id:"c",width:1.096,height:1.096,x:-.048,y:-.048,colorInterpolationFilters:"sRGB",children:t.jsx("feGaussianBlur",{stdDeviation:3.564})}),t.jsx("radialGradient",{xlinkHref:"#b",id:"e",cx:413.061,cy:136.818,r:82.125,fx:413.061,fy:136.818,gradientTransform:"translate(194.545 155.58) scale(.38143)",gradientUnits:"userSpaceOnUse"})]}),t.jsx("path",{d:"M502.083 148.5a89.108 89.108 0 0 1-89.108 89.108 89.108 89.108 0 0 1-89.108-89.108 89.108 89.108 0 0 1 89.108-89.108 89.108 89.108 0 0 1 89.108 89.108Z",filter:"url(#c)",opacity:.53,paintOrder:"markers stroke fill",transform:"matrix(.33865 0 0 .3261 -106.77 -14.478)"}),t.jsx("path",{fill:"url(#d)",stroke:"#cdcdcd",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:.093,d:"M383.294 211.977a31.325 31.325 0 0 1-31.325 31.325 31.325 31.325 0 0 1-31.326-31.325 31.325 31.325 0 0 1 31.326-31.325 31.325 31.325 0 0 1 31.325 31.325z",paintOrder:"markers stroke fill",transform:"translate(-318.886 -180.595)"}),t.jsx("path",{fill:"url(#e)",d:"M380.84 211.977a28.87 28.87 0 0 1-28.871 28.87 28.87 28.87 0 0 1-28.871-28.87 28.87 28.87 0 0 1 28.87-28.87 28.87 28.87 0 0 1 28.871 28.87z",paintOrder:"markers stroke fill",transform:"translate(-318.886 -180.595)"}),t.jsx("path",{fill:"#f4f2f3",d:"M33.083 4.017a.42.42 0 0 0-.421.42v4.856a.42.42 0 1 0 .842 0V4.438a.42.42 0 0 0-.421-.421zm-2.754.174a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.087l-.212-2.03a.42.42 0 0 0-.377-.376zm5.527.002a.42.42 0 0 0-.377.375l-.214 2.03a.42.42 0 1 0 .837.089l.214-2.031a.42.42 0 0 0-.46-.463zM27.5 4.6a.42.42 0 0 0-.41.508l1.005 4.75a.42.42 0 1 0 .824-.174l-1.005-4.75A.42.42 0 0 0 27.5 4.6zm11.183.004a.42.42 0 0 0-.414.333l-1.009 4.75a.42.42 0 1 0 .824.175l1.009-4.75a.42.42 0 0 0-.41-.508zm-13.883.757a.42.42 0 0 0-.437.55l.632 1.942a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.365-.29zm16.568.001a.42.42 0 0 0-.364.29l-.632 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.436-.55zM22.13 6.34a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.972-4.437a.42.42 0 0 0-.393-.25zm21.937.015a.42.42 0 0 0-.392.25l-1.978 4.434a.42.42 0 1 0 .769.343l1.978-4.434a.42.42 0 0 0-.377-.593zM19.654 7.65a.42.42 0 0 0-.394.63l1.02 1.77a.42.42 0 1 0 .73-.421L19.989 7.86a.42.42 0 0 0-.335-.21zm26.858 0a.419.419 0 0 0-.335.21l-1.021 1.769a.42.42 0 1 0 .73.42l1.02-1.768a.42.42 0 0 0-.394-.63zm-29.265 1.5a.422.422 0 0 0-.326.669l2.85 3.93a.42.42 0 1 0 .682-.494l-2.85-3.93a.42.42 0 0 0-.356-.174zm31.702.022a.42.42 0 0 0-.356.174l-2.856 3.926a.42.42 0 1 0 .681.495l2.856-3.926a.42.42 0 0 0-.325-.669zm-33.852 1.783a.42.42 0 0 0-.335.702l1.366 1.518a.42.42 0 1 0 .626-.563l-1.366-1.518a.42.42 0 0 0-.291-.14zm35.975.003a.421.421 0 0 0-.29.139l-1.367 1.517a.42.42 0 1 0 .625.564l1.367-1.518a.42.42 0 0 0-.335-.702zm-38.037 1.977a.42.42 0 0 0-.26.733l3.61 3.249a.42.42 0 1 0 .563-.626l-3.609-3.248a.42.42 0 0 0-.304-.108zm40.109.014a.419.419 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .562.626l3.61-3.245a.42.42 0 0 0-.258-.734zm-41.823 2.19a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm43.535.015a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .495.681l1.653-1.2a.42.42 0 0 0-.262-.76zM9.72 17.49a.42.42 0 0 0-.18.785l4.204 2.427a.42.42 0 1 0 .42-.729L9.96 17.546a.42.42 0 0 0-.24-.056zm46.728 0a.417.417 0 0 0-.24.056l-4.205 2.427a.42.42 0 1 0 .42.73l4.206-2.428a.42.42 0 0 0-.181-.785zM8.508 19.996a.42.42 0 0 0-.18.806l1.866.832a.42.42 0 1 0 .343-.77l-1.866-.831a.42.42 0 0 0-.163-.037zm49.158.017a.42.42 0 0 0-.164.037l-1.865.83a.42.42 0 1 0 .342.77l1.866-.831a.42.42 0 0 0-.179-.806zM7.429 22.615a.42.42 0 0 0-.094.82l4.615 1.504a.42.42 0 1 0 .261-.8l-4.616-1.504a.421.421 0 0 0-.166-.02zm51.314.018a.408.408 0 0 0-.166.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.617-1.5a.42.42 0 0 0-.094-.82zM6.756 25.365a.42.42 0 0 0-.09.833l1.998.424a.42.42 0 1 0 .175-.823l-1.998-.425a.413.413 0 0 0-.085-.009zm52.655.004a.518.518 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zM6.247 28.13a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.829-.51a.432.432 0 0 0-.085 0zm53.676.037a.386.386 0 0 0-.085 0l-4.83.504a.42.42 0 1 0 .088.837l4.83-.504a.42.42 0 0 0-.003-.837zM6.165 30.96a.42.42 0 1 0 0 .842h2.043a.42.42 0 1 0 0-.842zm51.793 0a.42.42 0 1 0 0 .842h2.043a.42.42 0 1 0 0-.842zm-46.803 2.295a.384.384 0 0 0-.085 0l-4.83.504a.42.42 0 1 0 .088.838l4.83-.504a.42.42 0 0 0-.003-.838zm43.853.03a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.828-.51a.434.434 0 0 0-.086-.001zM8.748 36.13a.43.43 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zm48.67.004a.42.42 0 0 0-.09.833l1.997.424a.42.42 0 1 0 .175-.824l-1.998-.424a.413.413 0 0 0-.085-.01zM12.111 37.79a.408.408 0 0 0-.166.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.617-1.5a.42.42 0 0 0-.094-.82zm41.937.015a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.615-1.504a.421.421 0 0 0-.167-.02zM10.35 41.08a.42.42 0 0 0-.163.036l-1.866.831a.42.42 0 1 0 .342.769l1.866-.83a.42.42 0 0 0-.179-.806zm45.459.016a.42.42 0 0 0-.18.805l1.865.832a.42.42 0 1 0 .343-.769l-1.865-.832a.42.42 0 0 0-.163-.036zm-41.826.912a.417.417 0 0 0-.24.056L9.538 44.49a.42.42 0 1 0 .421.73l4.205-2.428a.42.42 0 0 0-.181-.785zm38.2 0a.42.42 0 0 0-.181.785l4.205 2.427a.42.42 0 1 0 .42-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm-39.249 3.562a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .495.682l1.653-1.2a.42.42 0 0 0-.262-.762zm40.288.015a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm-36.544.145a.418.418 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .562.626l3.61-3.245a.42.42 0 0 0-.258-.734zm32.8.011a.421.421 0 0 0-.26.734l3.609 3.248a.42.42 0 1 0 .563-.625l-3.608-3.249a.42.42 0 0 0-.304-.107zm-29.375 3.084a.42.42 0 0 0-.355.173l-2.856 3.927a.42.42 0 1 0 .68.495l2.857-3.926a.42.42 0 0 0-.326-.669zm25.936.018a.421.421 0 0 0-.326.668l2.85 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm-29.623.606a.421.421 0 0 0-.29.14l-1.367 1.517a.42.42 0 1 0 .625.563l1.367-1.517a.42.42 0 0 0-.335-.703zm33.331.002a.42.42 0 0 0-.335.702l1.366 1.518a.42.42 0 1 0 .626-.563l-1.366-1.518a.42.42 0 0 0-.291-.139zm-25.655 1.684a.419.419 0 0 0-.393.25l-1.978 4.433a.42.42 0 1 0 .77.343l1.977-4.434a.42.42 0 0 0-.376-.592zm17.955.012a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.972-4.437a.42.42 0 0 0-.393-.25zm-21.431 1.359a.419.419 0 0 0-.335.21l-1.021 1.768a.42.42 0 1 0 .729.421l1.02-1.769a.42.42 0 0 0-.393-.63zm24.934 0a.42.42 0 0 0-.394.63l1.021 1.77a.42.42 0 1 0 .73-.422l-1.022-1.769a.42.42 0 0 0-.335-.21zm-17.054.063a.42.42 0 0 0-.415.334l-1.009 4.749a.42.42 0 1 0 .824.175l1.009-4.75a.42.42 0 0 0-.41-.508zm9.16.003a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .823-.175l-1.006-4.75a.42.42 0 0 0-.414-.333zm-4.573.48a.42.42 0 0 0-.421.42v4.855a.42.42 0 1 0 .842 0v-4.855a.42.42 0 0 0-.421-.42zm-7.727 1.568a.42.42 0 0 0-.364.29l-.631 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.437-.55zm15.45 0a.42.42 0 0 0-.437.55l.632 1.943a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.365-.29zm-10.365 1.083a.42.42 0 0 0-.378.375l-.213 2.03a.42.42 0 1 0 .837.088l.214-2.03a.42.42 0 0 0-.46-.463zm5.267.002a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.088l-.212-2.03a.42.42 0 0 0-.377-.375z",paintOrder:"markers stroke fill"}),t.jsx("path",{d:"m469.096 100.607-65.51 38.061-41.42 65.207 60.595-44.882z",filter:"url(#f)",opacity:.409,paintOrder:"markers stroke fill",transform:"translate(-112.095 -20.822) scale(.35154)"}),t.jsx("path",{fill:"#ff5150",d:"m36.383 34.838-6.6-6.913 23.416-15.752z",paintOrder:"markers stroke fill"}),t.jsx("path",{fill:"#f1f1f1",d:"m36.383 34.838-6.6-6.913L12.966 50.59z",paintOrder:"markers stroke fill"}),t.jsx("path",{d:"m12.967 50.59 23.416-15.752L53.2 12.173z",opacity:.243})]}),Y6=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",...e,children:[t.jsxs("defs",{children:[t.jsxs("radialGradient",{id:"b",cx:161.8,cy:68.9,r:95.4,gradientTransform:"matrix(1 0 0 -.95 0 248.8)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:.7,stopOpacity:0}),t.jsx("stop",{offset:.9,stopOpacity:.5}),t.jsx("stop",{offset:1})]}),t.jsxs("radialGradient",{id:"d",cx:-340.3,cy:63,r:143.2,gradientTransform:"matrix(.15 -.99 -.8 -.12 176.6 -125.4)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:.8,stopOpacity:0}),t.jsx("stop",{offset:.9,stopOpacity:.5}),t.jsx("stop",{offset:1})]}),t.jsxs("radialGradient",{id:"e",cx:113.4,cy:570.2,r:202.4,gradientTransform:"matrix(-.04 1 2.13 .08 -1179.5 -106.7)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#35c1f1"}),t.jsx("stop",{offset:.1,stopColor:"#34c1ed"}),t.jsx("stop",{offset:.2,stopColor:"#2fc2df"}),t.jsx("stop",{offset:.3,stopColor:"#2bc3d2"}),t.jsx("stop",{offset:.7,stopColor:"#36c752"})]}),t.jsxs("radialGradient",{id:"f",cx:376.5,cy:568,r:97.3,gradientTransform:"matrix(.28 .96 .78 -.23 -303.8 -148.5)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#66eb6e"}),t.jsx("stop",{offset:1,stopColor:"#66eb6e",stopOpacity:0})]}),t.jsxs("linearGradient",{id:"a",x1:63.3,x2:241.7,y1:84,y2:84,gradientTransform:"matrix(1 0 0 -1 0 266)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#0c59a4"}),t.jsx("stop",{offset:1,stopColor:"#114a8b"})]}),t.jsxs("linearGradient",{id:"c",x1:157.3,x2:46,y1:161.4,y2:40.1,gradientTransform:"matrix(1 0 0 -1 0 266)",gradientUnits:"userSpaceOnUse",children:[t.jsx("stop",{offset:0,stopColor:"#1b9de2"}),t.jsx("stop",{offset:.2,stopColor:"#1595df"}),t.jsx("stop",{offset:.7,stopColor:"#0680d7"}),t.jsx("stop",{offset:1,stopColor:"#0078d4"})]})]}),t.jsx("path",{d:"M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z",style:{fill:"url(#a)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M235.7 195.5a93.7 93.7 0 0 1-10.6 4.7 101.9 101.9 0 0 1-35.9 6.4c-47.3 0-88.5-32.5-88.5-74.3a31.5 31.5 0 0 1 16.4-27.3c-42.8 1.8-53.8 46.4-53.8 72.5 0 74 68.1 81.4 82.8 81.4 7.9 0 19.8-2.3 27-4.6l1.3-.4a128.3 128.3 0 0 0 66.6-52.8 4 4 0 0 0-5.3-5.6Z",style:{isolation:"isolate",opacity:.35,fill:"url(#b)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z",style:{fill:"url(#c)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M110.3 246.3A79.2 79.2 0 0 1 87.6 225a80.7 80.7 0 0 1 29.5-120c3.2-1.5 8.5-4.1 15.6-4a32.4 32.4 0 0 1 25.7 13 31.9 31.9 0 0 1 6.3 18.7c0-.2 24.5-79.6-80-79.6-43.9 0-80 41.6-80 78.2a130.2 130.2 0 0 0 12.1 56 128 128 0 0 0 156.4 67 75.5 75.5 0 0 1-62.8-8Z",style:{opacity:.41,fill:"url(#d)",isolation:"isolate"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z",style:{fill:"url(#e)"},transform:"translate(-4.6 -5)"}),t.jsx("path",{d:"M157 153.8c-.9 1-3.4 2.5-3.4 5.6 0 2.6 1.7 5.2 4.8 7.3 14.3 10 41.4 8.6 41.5 8.6a59.6 59.6 0 0 0 30.3-8.3 61.4 61.4 0 0 0 30.4-52.9c.3-22.4-8-37.3-11.3-43.9C228 28.8 182.3 5 132.6 5a128 128 0 0 0-128 126.2c.5-36.5 36.8-66 80-66 3.5 0 23.5.3 42 10a72.6 72.6 0 0 1 30.9 29.3c6.1 10.6 7.2 24.1 7.2 29.5s-2.7 13.3-7.8 19.9Z",style:{fill:"url(#f)"},transform:"translate(-4.6 -5)"})]}),Q6=e=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,role:"img","aria-label":"Opera",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"opera-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:"#FF1B2D"}),t.jsx("stop",{offset:"50%",stopColor:"#CC0000"}),t.jsx("stop",{offset:"100%",stopColor:"#A02128"})]})}),t.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"url(#opera-gradient)"}),t.jsx("ellipse",{cx:"12",cy:"12",rx:"6.5",ry:"8.5",fill:"none",stroke:"#fff",strokeWidth:"1.2",opacity:"0.9"}),t.jsx("ellipse",{cx:"12",cy:"12",rx:"3.5",ry:"5.5",fill:"#fff"}),t.jsx("path",{d:"M12 8.5c-1.4 0-2.5 1.6-2.5 3.5s1.1 3.5 2.5 3.5 2.5-1.6 2.5-3.5-1.1-3.5-2.5-3.5z",fill:"url(#opera-gradient)"})]}),J6=e=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,role:"img","aria-label":"Brave",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"brave-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:"#FB542B"}),t.jsx("stop",{offset:"50%",stopColor:"#FF6B35"}),t.jsx("stop",{offset:"100%",stopColor:"#FF4500"})]})}),t.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"url(#brave-gradient)"}),t.jsx("path",{d:"M12 3.5l1.5 2h2.5l-.8 3 1.3 2.5-2.5.8v2.7l-2-.7-2 .7v-2.7l-2.5-.8L8.8 8.5 8 5.5h2.5L12 3.5z",fill:"#fff"}),t.jsx("path",{d:"M12 6.5c-.8 0-1.5.7-1.5 1.5v3c0 .8.7 1.5 1.5 1.5s1.5-.7 1.5-1.5V8c0-.8-.7-1.5-1.5-1.5z",fill:"url(#brave-gradient)"}),t.jsx("circle",{cx:"12",cy:"16",r:"1",fill:"url(#brave-gradient)"})]}),X6=()=>t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"w-text-secondary",children:[t.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.5",opacity:"0.6"}),t.jsx("circle",{cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor",strokeWidth:"0.5",opacity:"0.3"}),t.jsx("path",{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z",fill:"currentColor",opacity:"0.5"}),t.jsx("circle",{cx:"12",cy:"12",r:"1",fill:"currentColor"}),t.jsx("text",{x:"12",y:"16.5",textAnchor:"middle",fill:"currentColor",fontSize:"6",opacity:"0.7",children:"?"})]}),ep=({browser:e})=>{const a=(e==null?void 0:e.toLowerCase())||"",s={width:20,height:20};return a.includes("chrome")?t.jsx(G6,{...s}):a.includes("firefox")?t.jsx(q6,{...s}):a.includes("safari")?t.jsx(K6,{...s}):a.includes("edge")?t.jsx(Y6,{...s}):a.includes("opera")?t.jsx(Q6,{...s}):a.includes("brave")?t.jsx(J6,{...s}):t.jsx(X6,{})},tp=()=>{const{signins:e,removeSignin:a,refetch:s,loading:r}=Ro(),{refetch:i}=ot(),{toast:l}=aa(),m=e,d=async p=>{try{await a(p),await Promise.all([s(),i()]),l("Session ended successfully","info")}catch(u){l(u.message||"Failed to end session. Please try again.","error")}},c=p=>{if(!p||p.trim()==="")return"Unknown";const u=new Date(p);if(isNaN(u.getTime()))return"Unknown";const f=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return f<1?"Just now":f<60?`${f}m ago`:f<1440?`${Math.floor(f/60)}h ago`:u.toLocaleDateString()};return r?t.jsx("div",{className:"w-loading",children:t.jsx(ke,{})}):t.jsx("div",{children:m&&m.length>0?t.jsx(t.Fragment,{children:t.jsx(fn,{children:t.jsxs(Zt,{children:[t.jsx(Ht,{children:t.jsxs(it,{children:[t.jsx(Fe,{children:"Browser & Device"}),t.jsx(Fe,{children:"Location"}),t.jsx(Fe,{children:"Last Active"}),t.jsx(Fe,{})]})}),t.jsx(Ft,{children:m.map(p=>t.jsxs(it,{children:[t.jsx(Xe,{children:t.jsxs("div",{className:"w-flex w-items-center w-gap-3",children:[t.jsx(Dr,{children:t.jsx(ep,{browser:p.browser||"Unknown"})}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{children:p.browser||"Unknown Browser"}),p.device&&t.jsx("div",{className:"w-text-muted",children:p.device})]})]})}),t.jsx(Xe,{children:t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{children:p.city&&p.country?`${p.city}, ${p.country}`:"Unknown location"}),p.ip_address&&t.jsx("div",{className:"w-text-muted",children:p.ip_address})]})}),t.jsx(Xe,{children:c(p.last_active_at)}),t.jsx(Tt,{children:t.jsxs(se,{$size:"sm",$outline:!0,$destructive:!0,onClick:()=>d(p.id),children:[t.jsx(Ma,{size:12}),"Sign out"]})})]},p.id))})]})})}):t.jsx(Nt,{title:"No active sessions",description:"You don't have any active sessions at the moment."})})},ap=(e,a)=>`${(e==null?void 0:e[0])||""}${(a==null?void 0:a[0])||""}`.toUpperCase()||"U",T0=()=>{var N,_,C,y,E,A,H,M;const{loading:e,user:a,updateProfilePicture:s}=ya(),{deployment:r}=_e(),[i,l]=o.useState("profile"),[m,d]=o.useState(null),[c,p]=o.useState("info"),[u,h]=o.useState(!1),f=o.useRef(null),g=o.useCallback((T,P="info")=>{d(T),p(P),setTimeout(()=>d(null),3e3)},[d]),x=async T=>{var S;const P=(S=T.target.files)==null?void 0:S[0];if(P){if(P.size>2*1024*1024){g("File size cannot exceed 2MB","error");return}if(!P.type.startsWith("image/")){g("Please select a valid image file","error");return}try{h(!0),await s(P),await(a==null?void 0:a.refetch()),g("Profile picture updated","info")}catch($){g(($==null?void 0:$.message)||"Failed to update profile picture","error")}finally{h(!1),f.current&&(f.current.value="")}}};if(e)return t.jsx($e,{children:t.jsx(hr,{className:"w-flex w-items-center w-justify-center",children:t.jsx(ke,{})})});const w=r==null?void 0:r.auth_settings,b=(N=w==null?void 0:w.email_address)==null?void 0:N.enabled,j=(_=w==null?void 0:w.phone_number)==null?void 0:_.enabled,v=((C=r==null?void 0:r.social_connections)==null?void 0:C.some(T=>T.enabled))||!1,k=((y=w==null?void 0:w.password)==null?void 0:y.enabled)||((E=w==null?void 0:w.auth_factors_enabled)==null?void 0:E.authenticator)||((A=w==null?void 0:w.auth_factors_enabled)==null?void 0:A.phone_otp)||((H=w==null?void 0:w.auth_factors_enabled)==null?void 0:H.backup_code);return t.jsx($e,{children:t.jsx(f0,{children:t.jsx(h0.Provider,{value:{screen:null,setScreen:()=>{},toast:g},children:t.jsxs(hr,{className:"w-relative",children:[a&&t.jsxs(k0,{className:"mac-page-header",children:[t.jsxs("button",{type:"button",className:"w-avatar-edit","data-busy":u?"":void 0,onClick:()=>{var T;return(T=f.current)==null?void 0:T.click()},disabled:u,title:"Change profile picture","aria-label":"Change profile picture",children:[t.jsx("span",{className:"w-avatar w-avatar--lg",children:a.profile_picture_url?t.jsx("img",{src:a.profile_picture_url,alt:""}):ap(a.first_name,a.last_name)}),t.jsx("span",{className:"w-avatar-veil",children:u?t.jsx(ke,{size:14}):t.jsx(nn,{size:16})})]}),t.jsx("input",{ref:f,type:"file",accept:"image/*",style:{display:"none"},onChange:x}),t.jsxs(C0,{children:[t.jsx(N0,{children:`${a.first_name||""} ${a.last_name||""}`.trim()||a.username||"Account"}),((M=a.primary_email_address)==null?void 0:M.email)&&t.jsx(S0,{children:a.primary_email_address.email})]})]}),t.jsx(w0,{children:t.jsxs(g0,{children:[t.jsx(Ca,{$isActive:i==="profile",onClick:()=>l("profile"),children:t.jsxs(Na,{children:[t.jsx(fs,{size:16}),"Profile"]})}),b&&t.jsx(Ca,{$isActive:i==="email",onClick:()=>l("email"),children:t.jsxs(Na,{children:[t.jsx(gl,{size:16}),"Email"]})}),j&&t.jsx(Ca,{$isActive:i==="phone",onClick:()=>l("phone"),children:t.jsxs(Na,{children:[t.jsx(qu,{size:16}),"Phone"]})}),v&&t.jsx(Ca,{$isActive:i==="social",onClick:()=>l("social"),children:t.jsxs(Na,{children:[t.jsx(Gu,{size:16}),"Connections"]})}),k&&t.jsx(Ca,{$isActive:i==="security",onClick:()=>l("security"),children:t.jsxs(Na,{children:[t.jsx(ea,{size:16}),"Security"]})}),t.jsx(Ca,{$isActive:i==="sessions",onClick:()=>l("sessions"),children:t.jsxs(Na,{children:[t.jsx(Ku,{size:16}),"Sessions"]})})]})}),t.jsxs(x0,{children:[i==="profile"&&t.jsx(N6,{}),i==="email"&&b&&t.jsx(S6,{}),i==="phone"&&j&&t.jsx(E6,{}),i==="social"&&v&&t.jsx(R6,{}),i==="security"&&k&&t.jsx(B6,{}),i==="sessions"&&t.jsx(tp,{})]}),m&&t.jsxs("div",{className:`w-toast w-toast--contained ${c==="error"?"w-toast--error":"w-toast--success"}`,style:{minWidth:0},children:[t.jsx("span",{className:"w-toast-ic",children:c==="error"?t.jsx(Ta,{size:12}):t.jsx(Ye,{size:12})}),t.jsx("span",{className:"w-toast-msg",children:m})]})]})})})})},I0=({isOpen:e,onClose:a,title:s,showHeader:r,headerContent:i,footerContent:l,customContent:m,children:d,showCloseButton:c})=>t.jsx(Ue,{isOpen:e,onClose:a,children:t.jsx(Ue.Overlay,{children:t.jsxs(Ue.Content,{className:"w-dialog--panel",children:[r&&t.jsx(Ue.Header,{showCloseButton:c,children:i||s}),m||d||t.jsx(T0,{}),l&&t.jsx(Ue.Footer,{children:l})]})})}),Oe=(...e)=>e.filter(Boolean).join(" "),sp=e=>t.jsx("div",{...e,className:Oe("w-relative",e.className)}),V0=o.forwardRef((e,a)=>t.jsx("button",{...e,ref:a,className:Oe("w-acct",e.className),style:{width:"auto",margin:0,padding:4,gap:8,...e.style}}));V0.displayName="AccountButton";const np=({children:e,...a})=>t.jsx("div",{...a,className:Oe("w-avatar","w-avatar--md",a.className),style:{width:28,height:28,fontSize:11,...a.style},children:e}),rp=e=>t.jsx("div",{...e,className:Oe("w-sec","w-text-secondary",e.className)}),z0=o.forwardRef(({$position:e,$isOpen:a,$maxHeight:s,children:r,...i},l)=>t.jsx("div",{...i,ref:l,className:"w-menu",style:{position:"fixed",width:300,maxWidth:"calc(100vw - 24px)",maxHeight:s?`${s}px`:"calc(100vh - 48px)",overflowY:"auto",zIndex:99999,top:(e==null?void 0:e.top)!==void 0?`${e.top}px`:void 0,bottom:(e==null?void 0:e.bottom)!==void 0?`${e.bottom}px`:void 0,left:(e==null?void 0:e.left)!==void 0?`${e.left}px`:void 0,right:(e==null?void 0:e.right)!==void 0?`${e.right}px`:void 0,visibility:e&&a?"visible":"hidden",opacity:a&&e?1:0,transition:`opacity 0.15s ease, visibility 0s linear ${a?"0s":"0.15s"}`,padding:0},children:r}));z0.displayName="DropdownContainer";const D0=o.forwardRef(({$top:e,$left:a,$isOpen:s,$maxHeight:r,children:i,...l},m)=>t.jsx("div",{...l,ref:m,className:"w-menu",style:{position:"fixed",width:300,maxWidth:"calc(100vw - 24px)",maxHeight:`${r}px`,overflowY:"auto",zIndex:99999,display:"flex",flexDirection:"column",top:`${e}px`,left:`${a}px`,visibility:s?"visible":"hidden",opacity:s?1:0,transition:`opacity 0.15s ease, visibility 0s linear ${s?"0s":"0.15s"}`,padding:0},children:i}));D0.displayName="SidePanel";const eo=e=>t.jsx("hr",{...e,className:Oe("w-hr",e.className)}),ip=e=>t.jsx("div",{...e,style:{padding:"16px 14px 8px",...e.style}}),op=e=>t.jsx("div",{...e,className:Oe("w-flex","w-items-center","w-gap-3",e.className)}),lp=({children:e,...a})=>t.jsx("div",{...a,className:Oe("w-avatar","w-avatar--lg",a.className),children:e}),cp=e=>t.jsx("div",{...e,className:Oe("w-flex-col","w-grow",e.className),style:{gap:2,...e.style}}),dp=e=>t.jsx("div",{...e,className:Oe("w-sec","w-truncate",e.className)}),up=e=>t.jsx("div",{...e,className:Oe("w-secsub","w-truncate",e.className)}),mp=({$active:e,...a})=>t.jsx("button",{...a,className:"w-menu-item",style:{border:"0.5px solid var(--wa-border)",background:e?"var(--wa-surface-subtle)":void 0,...a.style}}),pp=({children:e,...a})=>t.jsx("div",{...a,className:"w-avatar w-avatar--sm",children:e}),hp=e=>t.jsx("div",{...e,className:Oe("w-sec","w-grow","w-truncate",e.className)}),fp=e=>t.jsx("div",{...e,className:Oe("w-secsub","w-none",e.className)}),wp=e=>t.jsx("div",{...e,style:{padding:"5px",...e.style}}),gp=e=>t.jsx("button",{...e,className:Oe("w-menu-item",e.className)}),xp=e=>t.jsx("span",{...e,className:Oe("w-grow",e.className)}),vp=e=>t.jsx("span",{...e,className:Oe("w-menu-trail",e.className)}),bp=e=>t.jsx("div",{...e,style:{padding:"5px",...e.style}}),yp=e=>t.jsx("div",{...e,className:Oe("w-menu-label",e.className)}),Fn=({$active:e,...a})=>t.jsx("button",{...a,className:"w-menu-item",style:{cursor:e?"default":"pointer",...a.style}}),Tn=({children:e,...a})=>t.jsx("div",{...a,className:Oe("w-flex","w-items-center","w-justify-center","w-none",a.className),style:{width:14,height:14,color:"var(--wa-primary)",...a.style},children:e}),jp=e=>t.jsx("div",{...e,className:"w-none",style:{width:14,...e.style}}),In=e=>t.jsx("div",{...e,className:Oe("w-sec","w-grow","w-truncate",e.className)}),to=e=>t.jsx("div",{...e,className:Oe("w-secsub","w-none",e.className)}),_p=e=>t.jsx("div",{...e,style:{padding:"5px",...e.style}}),kp=e=>t.jsx("button",{...e,className:Oe("w-menu-item","w-menu-item--danger",e.className)}),Cp=e=>t.jsx("button",{...e,className:Oe("w-menu-item",e.className),style:{borderBottom:"0.5px solid var(--wa-border)",borderRadius:0,flex:"none",...e.style}}),Np=e=>t.jsx("div",{...e,style:{flex:"1 1 auto",overflowY:"auto",padding:5,...e.style}}),ao=({$active:e,...a})=>t.jsx("button",{...a,className:Oe("w-menu-item","sp-row",e&&"sp-row--active",a.className),style:{height:32,...a.style}}),so=({$active:e,...a})=>t.jsx("button",{...a,className:Oe("w-menu-item","sp-row","sp-ws-row",e&&"sp-row--active",a.className),style:{height:32,paddingLeft:30,position:"relative",...a.style},children:a.children}),no=({$personal:e,children:a,...s})=>t.jsx("div",{...s,className:Oe("w-avatar","w-avatar--sm",!e&&"",s.className),children:a}),ro=({children:e,...a})=>t.jsx("div",{...a,className:Oe("w-avatar","","w-avatar--sm",a.className),children:e}),io=e=>t.jsx("span",{...e,className:Oe("w-sec","w-grow","w-truncate",e.className)}),oo=e=>t.jsx("span",{...e,className:Oe("w-secsub","w-grow","w-truncate",e.className)}),Vn=e=>t.jsx("div",{...e,className:Oe("w-flex","w-items-center","w-none",e.className),style:{gap:4,...e.style}}),Sp=({$open:e,...a})=>t.jsx(Wt,{...a,className:"w-text-muted",style:{flexShrink:0,transition:"transform 0.2s ease",transform:e?"rotate(0deg)":"rotate(-90deg)"}}),zn=e=>t.jsx(Ye,{...e,className:"w-text-primary",style:{flexShrink:0}}),Ep=e=>t.jsx("div",{...e,className:Oe("w-flex-col","w-gap-3","w-none",e.className),style:{padding:"12px 12px 16px",borderBottom:"0.5px solid var(--wa-border)",...e.style}}),Ap=e=>t.jsx("button",{...e,className:Oe("w-btn","w-btn--icon",e.className),style:{width:24,height:24,...e.style}}),lo=e=>t.jsx("div",{...e,className:Oe("w-flex","w-items-center","w-gap-3",e.className),style:{padding:"4px 4px 0",minWidth:0,...e.style}}),co=({children:e,...a})=>t.jsx("div",{...a,className:Oe("w-avatar","","w-avatar--md",a.className),children:e}),uo=e=>t.jsx("div",{...e,className:Oe("w-flex-col","w-grow",e.className),style:{gap:1,minWidth:0,...e.style}}),mo=e=>t.jsx("div",{...e,className:Oe("w-sec","w-truncate",e.className)}),po=e=>t.jsx("div",{...e,className:Oe("w-flex","w-items-center","w-none",e.className),style:{gap:2,...e.style}}),Ts=({$destructive:e,...a})=>t.jsx("button",{...a,className:Oe("w-btn","w-btn--icon",e&&"w-btn--danger",a.className),style:{width:24,height:24,...a.style}}),ho=e=>t.jsx("div",{...e,className:"w-none",style:{borderTop:"0.5px solid var(--wa-border)",padding:5,...e.style}}),fo=e=>t.jsx("button",{...e,className:Oe("w-menu-item",e.className),style:{height:32,color:"var(--wa-text-muted)",...e.style}}),wo=e=>t.jsx("div",{...e,className:Oe("w-flex","w-items-center","w-justify-center","w-none",e.className),style:{width:20,height:20,...e.style}}),Wr=({showName:e=!0,onCreateOrg:a,showOrgSwitcher:s=!0,narrowBreakpoint:r=640})=>{var Pe,qe,pt,sa,It,na,Bt,yt,ra,ia,oa,la;const i=as(),[l,m]=o.useState(!1),[d,c]=o.useState(!1),[p,u]=o.useState(typeof window<"u"&&window.innerWidth<r),[h,f]=o.useState(!1),[g,x]=o.useState("org"),[w,b]=o.useState(null),[j,v]=o.useState({top:0,left:0,maxHeight:400}),[k,N]=o.useState(new Set),[_,C]=o.useState(null),y=o.useRef(null),E=o.useRef(null),A=o.useRef(null),H=bt({triggerRef:y,isOpen:l,minWidth:300}),M=Yt(!1),T=Yt(!1),P=Yt(!1),S=Yt(!1),$=Yt(!1),{session:Z,signOut:R,switchSignIn:L,switchOrganization:O,switchWorkspace:F,refetch:W}=ot(),{navigateToSignIn:U}=kt(),{deployment:V}=_e(),{activeOrganization:G,activeMembership:Y,leave:de}=xa(),{organizationMemberships:fe}=va(),{workspaces:ne}=ba(),{activeWorkspace:ae,activeMembership:re,leave:Le}=Ut(),K=(Pe=Z==null?void 0:Z.active_signin)==null?void 0:Pe.user,at=((pt=(qe=V==null?void 0:V.auth_settings)==null?void 0:qe.multi_session_support)==null?void 0:pt.enabled)??!1,ze=((sa=V==null?void 0:V.b2b_settings)==null?void 0:sa.allow_users_to_create_orgs)??!1,We=((It=V==null?void 0:V.b2b_settings)==null?void 0:It.organizations_enabled)??!1,Re=We&&(((na=V==null?void 0:V.b2b_settings)==null?void 0:na.workspaces_enabled)??!1),ce=s&&We,B=!G,q=o.useMemo(()=>{var ve;const ie={};for(const Ae of ne||[]){const J=(ve=Ae.organization)==null?void 0:ve.id;J&&(ie[J]||(ie[J]=[]),ie[J].push(Ae))}return ie},[ne]),X=fe||[],oe=o.useCallback(()=>{if(!E.current)return;const ie=E.current.getBoundingClientRect(),ve=300,Ae=8,J=window.innerWidth<r;if(u(J),J){v({top:ie.top,left:ie.left,maxHeight:ie.height});return}const be=Math.min(Math.max(ie.height,520),window.innerHeight-ie.top-16),Je=ie.right+Ae+ve<=window.innerWidth-8;v({top:ie.top,left:Je?ie.right+Ae:ie.left-Ae-ve,maxHeight:be})},[r]),Ee=o.useCallback(()=>{oe(),c(!0)},[oe]),z=o.useCallback(ie=>{N(ve=>{const Ae=new Set(ve);return Ae.has(ie)?Ae.delete(ie):Ae.add(ie),Ae})},[]);o.useEffect(()=>{G&&Re&&N(ie=>{if(ie.has(G.id))return ie;const ve=new Set(ie);return ve.add(G.id),ve})},[G,Re]),o.useEffect(()=>{x(Re&&ae?"ws":"org")},[Re,ae==null?void 0:ae.id]),o.useEffect(()=>{const ie=()=>{u(window.innerWidth<r),d&&oe()};return window.addEventListener("resize",ie),()=>window.removeEventListener("resize",ie)},[r,d,oe]),o.useEffect(()=>{l||(c(!1),f(!1))},[l]),o.useEffect(()=>{if(!l)return;const ie=setTimeout(()=>{const ve=Ae=>{var be,Je,De;const J=Ae.target;(be=y.current)!=null&&be.contains(J)||(Je=E.current)!=null&&Je.contains(J)||(De=A.current)!=null&&De.contains(J)||m(!1)};return document.addEventListener("mousedown",ve),()=>document.removeEventListener("mousedown",ve)},50);return()=>clearTimeout(ie)},[l]);const D=ie=>ie.split(" ").filter(Boolean).map(ve=>ve[0]).join("").toUpperCase().slice(0,2),we=(ie,ve,Ae,J,be)=>t.jsx(be,{children:ie?t.jsx("img",{src:ve,alt:Ae}):D(`${Ae||""} ${J||""}`)}),ge=async ie=>{try{await R(ie),await W(),m(!1)}catch{}},xe=async ie=>{try{await L(ie),await W(),m(!1)}catch{}},lt=async ie=>{if(!h){f(!0);try{await O(ie),await W(),c(!1)}catch{}finally{f(!1)}}},Qe=async ie=>{if(!h){f(!0);try{await F(ie),await W(),c(!1)}catch{}finally{f(!1)}}},Q=()=>{M.open(),m(!1)},le=[...(Z==null?void 0:Z.signins)||[]].sort((ie,ve)=>{const Ae=ie.user.id===(K==null?void 0:K.id),J=ve.user.id===(K==null?void 0:K.id);return Ae===J?0:Ae?-1:1}),me=((Bt=le.find(ie=>ie.user.id===(K==null?void 0:K.id)))==null?void 0:Bt.id)||"",Te=((ra=(yt=Y==null?void 0:Y.roles)==null?void 0:yt[0])==null?void 0:ra.name)??null;return t.jsx($e,{children:t.jsxs(sp,{children:[t.jsxs(V0,{ref:y,onClick:()=>m(!l),children:[we(K==null?void 0:K.has_profile_picture,K==null?void 0:K.profile_picture_url,K==null?void 0:K.first_name,K==null?void 0:K.last_name,np),e&&t.jsx(rp,{children:`${(K==null?void 0:K.first_name)||""} ${(K==null?void 0:K.last_name)||""}`.trim()})]}),typeof window<"u"&&tn.createPortal(t.jsxs("div",{className:"wacht-root",style:i,children:[t.jsxs(z0,{ref:E,$position:H,$isOpen:l&&!(p&&d),$maxHeight:H==null?void 0:H.maxHeight,children:[t.jsx(ip,{children:t.jsxs(op,{children:[we(K==null?void 0:K.has_profile_picture,K==null?void 0:K.profile_picture_url,K==null?void 0:K.first_name,K==null?void 0:K.last_name,lp),t.jsxs(cp,{children:[t.jsx(dp,{children:`${(K==null?void 0:K.first_name)||""} ${(K==null?void 0:K.last_name)||""}`.trim()}),t.jsx(up,{children:(ia=K==null?void 0:K.primary_email_address)==null?void 0:ia.email})]})]})}),t.jsxs(wp,{children:[ce&&t.jsxs(mp,{$active:d,onClick:Ee,style:{marginBottom:8},children:[t.jsx(pp,{children:G?G.image_url?t.jsx("img",{src:G.image_url,alt:G.name}):(oa=G.name)==null?void 0:oa.charAt(0).toUpperCase():K!=null&&K.has_profile_picture?t.jsx("img",{src:K.profile_picture_url,alt:K.first_name}):D(`${(K==null?void 0:K.first_name)||""} ${(K==null?void 0:K.last_name)||""}`)}),t.jsx(hp,{children:(G==null?void 0:G.name)??"Personal account"}),Te&&t.jsx(fp,{children:Te})]}),t.jsxs(gp,{onClick:Q,children:[t.jsx(Aa,{}),t.jsx(xp,{children:"Manage account"}),t.jsx(vp,{children:"⌘,"})]})]}),t.jsx(eo,{}),t.jsxs(bp,{children:[t.jsx(yp,{children:"Accounts"}),at?le.map(({user:ie,id:ve})=>{var J;const Ae=ie.id===(K==null?void 0:K.id);return t.jsxs(Fn,{$active:Ae,onClick:Ae?void 0:()=>xe(ve),children:[Ae?t.jsx(Tn,{children:t.jsx(Ye,{})}):t.jsx(jp,{}),t.jsx(In,{children:(J=ie.primary_email_address)==null?void 0:J.email}),Ae&&t.jsx(to,{children:"Current"})]},ie.id)}):K&&t.jsxs(Fn,{$active:!0,children:[t.jsx(Tn,{children:t.jsx(Ye,{})}),t.jsx(In,{children:(la=K.primary_email_address)==null?void 0:la.email}),t.jsx(to,{children:"Current"})]}),at&&t.jsxs(Fn,{onClick:()=>{U(),m(!1)},children:[t.jsx(Tn,{style:{color:"var(--wa-text-muted)"},children:t.jsx(St,{})}),t.jsx(In,{style:{color:"var(--wa-text-muted)"},children:"Add account"})]})]}),t.jsx(eo,{}),t.jsx(_p,{children:t.jsxs(kp,{onClick:()=>ge(me),children:[t.jsx(Ma,{}),"Sign out"]})})]}),t.jsxs(D0,{ref:A,$top:j.top,$left:j.left,$isOpen:l&&d,$maxHeight:j.maxHeight,children:[p&&t.jsxs(Cp,{onClick:()=>c(!1),children:[t.jsx(rn,{size:13}),"Back"]}),(()=>{var _t;if(B)return null;const ie=Re&&!!ae,ve=!!((_t=Y==null?void 0:Y.eligibility_restriction)!=null&&_t.type)&&Y.eligibility_restriction.type!=="none",Ae=!!G&&!ve&&Tr(Y),J=ie&&!ve&&Vr(re),be=ie?g:"org",Je=async()=>{if(de){b("org");try{await de(),await W(),c(!1)}catch{}finally{b(null)}}},De=async()=>{if(Le){b("ws");try{await Le(),c(!1)}catch{}finally{b(null)}}},jt=()=>{if(!ie)return null;const Ke=be==="org"?"ws":"org",wt=Ke==="ws"?"Switch to workspace context":"Switch to organization context";return t.jsx(Ap,{type:"button",onClick:()=>x(Ke),title:wt,"aria-label":wt,children:t.jsx($u,{size:12})})};return t.jsxs(Ep,{children:[be==="org"&&G&&t.jsxs(lo,{children:[jt(),t.jsx(co,{children:G.image_url?t.jsx("img",{src:G.image_url,alt:G.name}):D(G.name)}),t.jsx(uo,{children:t.jsx(mo,{children:G.name})}),t.jsxs(po,{children:[Ae&&t.jsx(Ts,{onClick:()=>{P.open(),m(!1)},title:"Organization settings","aria-label":"Organization settings",children:t.jsx(Aa,{size:14})}),t.jsx(Ts,{$destructive:!0,onClick:Je,disabled:w==="org",title:"Leave organization","aria-label":"Leave organization",children:t.jsx(Ma,{size:14})})]})]}),be==="ws"&&ie&&t.jsxs(lo,{children:[jt(),t.jsx(co,{children:ae.image_url?t.jsx("img",{src:ae.image_url,alt:ae.name}):D(ae.name)}),t.jsx(uo,{children:t.jsx(mo,{children:ae.name})}),t.jsxs(po,{children:[J&&t.jsx(Ts,{onClick:()=>{$.open(),m(!1)},title:"Workspace settings","aria-label":"Workspace settings",children:t.jsx(Aa,{size:14})}),t.jsx(Ts,{$destructive:!0,onClick:De,disabled:w==="ws",title:"Leave workspace","aria-label":"Leave workspace",children:t.jsx(Ma,{size:14})})]})]})]})})(),t.jsxs(Np,{children:[t.jsxs(ao,{$active:B,onClick:()=>{B||lt(void 0)},disabled:h,style:B?{cursor:"default"}:void 0,children:[t.jsx(no,{$personal:!0,children:K!=null&&K.has_profile_picture?t.jsx("img",{src:K.profile_picture_url,alt:K.first_name}):t.jsx(fs,{size:12})}),t.jsx(io,{children:"Personal account"}),B&&t.jsx(Vn,{children:t.jsx("span",{className:"sp-check",style:{display:"inline-flex"},children:t.jsx(zn,{size:13})})})]}),X.map(ie=>{var De,jt;const ve=ie.organization,Ae=ve.id===(G==null?void 0:G.id),J=k.has(ve.id),be=Re?q[ve.id]||[]:[],Je=!!((De=ie.eligibility_restriction)!=null&&De.type)&&ie.eligibility_restriction.type!=="none";return t.jsxs(o.Fragment,{children:[t.jsxs(ao,{$active:Ae,onClick:()=>{Je||(Re?z(ve.id):Ae||lt(ve.id))},disabled:h,style:Je?{opacity:.55,cursor:"not-allowed"}:Ae&&!Re?{cursor:"default"}:void 0,title:(jt=ie.eligibility_restriction)==null?void 0:jt.message,children:[t.jsx(no,{children:ve.image_url?t.jsx("img",{src:ve.image_url,alt:ve.name}):D(ve.name)}),t.jsx(io,{children:ve.name}),t.jsxs(Vn,{children:[Je&&t.jsx(Ra,{size:12,color:"var(--wa-error)"}),Ae&&!Re&&t.jsx(zn,{size:13}),Re&&t.jsx(Sp,{size:11,$open:J})]})]}),Re&&J&&t.jsxs(t.Fragment,{children:[be.map(_t=>{var ca,da;const Ke=Ae&&(ae==null?void 0:ae.id)===_t.id,wt=_t,Gt=((ca=wt.eligibility_restriction)==null?void 0:ca.type)&&wt.eligibility_restriction.type!=="none";return t.jsxs(so,{$active:Ke,onClick:()=>{!Ke&&!Gt&&Qe(_t.id)},disabled:h,style:Gt||Je?{opacity:.55,cursor:"not-allowed"}:Ke?{cursor:"default"}:void 0,title:(da=wt.eligibility_restriction)==null?void 0:da.message,children:[t.jsx(ro,{children:wt.image_url?t.jsx("img",{src:wt.image_url,alt:wt.name}):D(wt.name).charAt(0)}),t.jsx(oo,{children:wt.name}),t.jsxs(Vn,{children:[Gt&&t.jsx(Ra,{size:12,color:"var(--wa-error)"}),Ke&&t.jsx(zn,{size:12})]})]},_t.id)}),!Je&&t.jsxs(so,{onClick:()=>{C(ve.id),S.open()},disabled:h,children:[t.jsx(ro,{style:{background:"transparent",border:"1px dashed var(--wa-border-strong)"},children:t.jsx(St,{size:10})}),t.jsx(oo,{children:"New workspace"})]})]})]},ve.id)})]}),(()=>{var Je,De,jt;const ie=((fe==null?void 0:fe.length)??0)>0,ve=()=>ze&&t.jsx(ho,{children:t.jsxs(fo,{onClick:()=>{a?(a(),m(!1)):T.open()},disabled:h,children:[t.jsx(wo,{children:t.jsx(St,{size:12})}),"New organization"]})});if(!Re||!ie)return ve();const Ae=!!((Je=Y==null?void 0:Y.eligibility_restriction)!=null&&Je.type)&&Y.eligibility_restriction.type!=="none",J=((jt=(De=fe==null?void 0:fe[0])==null?void 0:De.organization)==null?void 0:jt.id)??null,be=G&&!Ae?G.id:J;return t.jsx(ho,{children:t.jsxs(fo,{onClick:()=>{C(be),S.open()},disabled:h,children:[t.jsx(wo,{children:t.jsx(St,{size:12})}),"New workspace"]})})})()]})]}),document.body),t.jsx(I0,{isOpen:M.isOpen,onClose:M.close}),ce&&t.jsxs(t.Fragment,{children:[t.jsx(t0,{isOpen:T.isOpen,onClose:T.close}),t.jsx(i0,{isOpen:P.isOpen,onClose:P.close}),Re&&t.jsxs(t.Fragment,{children:[t.jsx(Or,{isOpen:S.isOpen,onClose:()=>{S.close(),C(null)},organizationId:_||void 0}),t.jsx(Hr,{isOpen:$.isOpen,onClose:$.close})]})]})]})})};function U0({notification:e,onAction:a}){const[s,r]=o.useState(!1),i=d=>{d.target.closest("button")||(r(!s),e.is_read||a({type:"read",id:e.id}))},l=d=>{a({type:"custom",payload:d.payload})},m=d=>{const c=new Date(d),u=new Date().getTime()-c.getTime();if(u<6e4)return"Just now";const h=Math.floor(u/6e4);if(h<60)return`${h}m`;const f=Math.floor(h/60);if(f<24)return`${f}h`;const g=Math.floor(f/24);return g<7?`${g}d`:c.toLocaleDateString(void 0,{month:"short",day:"numeric"})};return t.jsxs("div",{className:"w-flex w-gap-3 w-notif-row",onClick:i,"data-unread":e.is_read?void 0:"",children:[t.jsxs("div",{className:"w-grow w-flex-col w-justify-center",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",style:{marginBottom:2},children:[!e.is_read&&t.jsx("span",{className:"w-notif-dot"}),t.jsx("h4",{className:"w-sec w-truncate",style:{margin:0},children:e.title})]}),t.jsx("p",{className:`w-secsub${s?"":" w-truncate"}`,style:{margin:0,wordWrap:s?"break-word":void 0},children:e.body}),e.ctas&&e.ctas.length>0&&t.jsx("div",{className:"w-flex w-wrap w-gap-2",style:{marginTop:10},children:e.ctas.map((d,c)=>t.jsx("button",{className:"w-btn w-btn--secondary w-btn--sm",onClick:()=>l(d),children:d.label},c))})]}),t.jsxs("div",{className:"w-flex-col w-items-end w-gap-2 w-none",children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-1 w-notif-actions",children:[e.is_read&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:d=>{d.stopPropagation(),a({type:"unread",id:e.id})},title:"Mark as unread",children:t.jsx(Fu,{size:14})}),t.jsx("button",{className:"w-btn w-btn--icon",onClick:d=>{d.stopPropagation(),a({type:"star",id:e.id})},title:e.is_starred?"Unstar":"Star","data-on":e.is_starred?"":void 0,children:t.jsx(Yu,{size:14,fill:e.is_starred?"currentColor":"none"})}),t.jsx("button",{className:"w-btn w-btn--icon",onClick:d=>{d.stopPropagation(),a({type:"archive",id:e.id})},title:e.is_archived?"Unarchive":"Archive",children:e.is_archived?t.jsx(qo,{size:14}):t.jsx(Bo,{size:14})})]}),t.jsx("span",{className:"w-secsub",style:{whiteSpace:"nowrap"},children:m(e.created_at)})]})]})}const W0=o.forwardRef(({scope:e="all",onAction:a,fullWidth:s,maxHeight:r,className:i},l)=>{const[m,d]=o.useState("inbox"),[c,p]=o.useState(!1),[u,h]=o.useState(!1),f=o.useRef(null),g={scope:e,limit:20,is_archived:m==="archive",is_starred:m==="starred",is_read:c?!1:void 0},{notifications:x,loading:w,error:b,hasMore:j,loadMore:v,markAsRead:k,markAsUnread:N,markAllAsRead:_,archiveAllRead:C,archiveNotification:y,starNotification:E}=Fo(g);o.useEffect(()=>{if(!u)return;const T=P=>{f.current&&!f.current.contains(P.target)&&h(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[u]);const A=async T=>{switch(T.type){case"read":await k(T.id);break;case"unread":await N(T.id);break;case"archive":await y(T.id);break;case"star":await E(T.id);break;case"custom":a==null||a(T.payload);break}},H=()=>{_(),h(!1)},M=()=>{C(),h(!1)};return t.jsxs("div",{ref:l,className:`w-flex-col w-relative w-notif-panel${s?" w-notif-panel--fill":""}${i?` ${i}`:""}`,style:{maxHeight:r||"100%"},children:[t.jsxs("div",{className:"w-flex w-items-center w-justify-between w-gap-2 w-none w-notif-head",children:[t.jsxs("div",{className:"w-tabs w-grow",children:[t.jsx("button",{className:`w-tab${m==="inbox"?" w-tab--active":""}`,onClick:()=>d("inbox"),children:"Inbox"}),t.jsx("button",{className:`w-tab${m==="archive"?" w-tab--active":""}`,onClick:()=>d("archive"),children:"Archive"}),t.jsx("button",{className:`w-tab${m==="starred"?" w-tab--active":""}`,onClick:()=>d("starred"),children:"Starred"})]}),t.jsxs("button",{className:"w-btn w-btn--icon w-none w-relative",onClick:()=>h(!u),title:"Options",children:[t.jsx(Vu,{size:16}),c&&t.jsx("span",{className:"w-notif-filter-dot"})]}),u&&t.jsxs("div",{ref:f,className:"w-menu w-notif-menu",children:[t.jsxs("button",{className:"w-menu-item",onClick:()=>{p(!c),h(!1)},children:[t.jsx(zu,{})," Unread only",c&&t.jsx(Ye,{className:"w-menu-check"})]}),m==="inbox"&&t.jsxs("button",{className:"w-menu-item",onClick:H,children:[t.jsx(Hu,{})," Mark all as read"]}),t.jsxs("button",{className:"w-menu-item",onClick:M,children:[t.jsx(Bo,{})," Archive all read"]})]})]}),t.jsx("div",{className:"w-grow w-notif-body",children:w?t.jsx("div",{className:"w-loading",children:t.jsx(ke,{})}):b?t.jsx(Nt,{icon:t.jsx(fi,{size:20,className:"w-text-error"}),title:"Failed to load notifications",description:b.message||"An unexpected error occurred."}):x.length===0?t.jsx(Nt,{icon:t.jsx(fi,{size:20}),title:"No notifications",description:"You're all caught up!"}):t.jsxs(t.Fragment,{children:[x.map(T=>t.jsx(U0,{notification:T,onAction:A},T.id)),j&&t.jsx("div",{className:"w-flex w-justify-center",style:{padding:12},children:t.jsx("button",{className:"w-btn w-btn--ghost w-btn--sm",onClick:v,children:"Load more"})})]})})]})}),B0=o.forwardRef(({position:e,scope:a,onAction:s,className:r},i)=>t.jsx("div",{ref:i,className:`w-card w-flex-col w-notif-pop${r?` ${r}`:""}`,style:{top:(e==null?void 0:e.top)!==void 0?e.top:void 0,bottom:(e==null?void 0:e.bottom)!==void 0?e.bottom:void 0,left:(e==null?void 0:e.left)!==void 0?e.left:void 0,right:(e==null?void 0:e.right)!==void 0?e.right:void 0,maxHeight:e!=null&&e.maxHeight?e.maxHeight:"90vh"},children:t.jsx(W0,{scope:a,onAction:s,fullWidth:!0,maxHeight:e!=null&&e.maxHeight?`${e.maxHeight}px`:"100%"})}));function G0({className:e,showBadge:a=!0,scope:s="all",onAction:r}){const[i,l]=o.useState(!1),m=as(),d=o.useRef(null),c=o.useRef(null),p=o.useRef(null),{count:u,refetch:h}=To({scope:s}),f=async x=>{await h(),r==null||r(x.payload)},g=bt({triggerRef:p,isOpen:i,minWidth:Math.min(450,typeof window<"u"?window.innerWidth-32:300),defaultMaxHeight:550});return o.useEffect(()=>{if(!i)return;const x=setTimeout(()=>{const w=b=>{var v,k;const j=b.target;(v=d.current)!=null&&v.contains(j)||(k=c.current)!=null&&k.contains(j)||l(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w)}},50);return()=>{clearTimeout(x)}},[i]),t.jsx($e,{children:t.jsxs("div",{ref:d,className:`w-inline w-relative${e?` ${e}`:""}`,children:[t.jsxs("button",{ref:p,className:"w-btn w-btn--icon w-notif-bell",onClick:()=>l(!i),"aria-label":u>0?`${u} unread notifications`:"Notifications",children:[t.jsx(Ou,{strokeWidth:1}),a&&u>0&&t.jsx("span",{className:"w-notif-badge","data-dot":u<=9?"":void 0,children:u>9?"9+":""})]}),typeof window<"u"&&i&&tn.createPortal(t.jsx("div",{className:"wacht-root",style:m,children:t.jsx(B0,{ref:c,position:g,scope:s,onAction:f,onClose:()=>l(!1)})}),document.body)]})})}const Mp=({showName:e=!0,showNotifications:a=!0})=>t.jsxs("div",{className:"w-flex w-items-center w-gap-2",children:[a&&t.jsx(G0,{}),t.jsx(Wr,{showName:e})]}),Rp=({children:e})=>{var r;const{session:a,loading:s}=ot();return s||!((r=a.signins)!=null&&r.length)||!a.active_signin?null:t.jsx(t.Fragment,{children:e})},Lp=({children:e})=>{var r;const{loading:a,session:s}=ot();return a||(r=s.signins)!=null&&r.length&&s.active_signin?null:t.jsx(t.Fragment,{children:e})},Pp=({onAccountSelect:e,showAddAccount:a=!0})=>{var _,C,y,E;const{session:s,loading:r,switchSignIn:i,signOut:l}=ot(),{deployment:m}=_e(),{navigateToSignIn:d,navigate:c}=kt(),[p,u]=o.useState(null),[h,f]=o.useState(null),g=s==null?void 0:s.active_signin,x=(s==null?void 0:s.signins)||[],w=((C=(_=m==null?void 0:m.auth_settings)==null?void 0:_.multi_session_support)==null?void 0:C.enabled)??!1,b=(y=m==null?void 0:m.ui_settings)==null?void 0:y.app_name;o.useEffect(()=>{r||x.length||d()},[r,x,d]);const j=A=>A.split(" ").map(H=>H[0]).join("").toUpperCase().slice(0,2),v=async A=>{var H;f(A);try{if(await i(A),e)e(A),f(null);else{let M=gt(m,new URLSearchParams(window.location.search).get("redirect_uri"));if(M||(M=(H=m.ui_settings)==null?void 0:H.after_signin_redirect_url),M){let T;try{T=new URL(M)}catch{T=new URL(M,window.location.origin)}(m==null?void 0:m.mode)==="staging"&&T.searchParams.set("__dev_session__",xt(m.backend_host)??""),c(T.toString())}else f(null)}}catch{f(null)}},k=async(A,H)=>{A.stopPropagation(),u(H);try{await l(H)}catch{}finally{u(null)}},N=()=>{var H;let A=gt(m,new URLSearchParams(window.location.search).get("redirect_uri"));A||(A=(H=m.ui_settings)==null?void 0:H.after_signin_redirect_url),d(A)};return r?t.jsx(_s,{}):x.length?t.jsx($e,{children:t.jsxs(tt,{footer:t.jsxs("span",{className:"w-sub",style:{fontSize:12.5},children:["Don't have an account?"," ",t.jsx(Et,{to:`${(E=m.ui_settings)==null?void 0:E.sign_up_page_url}${window.location.search}`,className:"w-link",children:"Sign up"})]}),children:[t.jsx(rt,{title:"Choose an account",sub:`Select an account to continue${b?` to ${b}`:""}`}),t.jsx("div",{className:"w-flex-col",children:x.map(({user:A,id:H})=>{var R,L;if(!A)return null;const M=H===(g==null?void 0:g.id),T=h===H,P=p===H,S=`${A.first_name||""} ${A.last_name||""}`.trim(),$=S||((R=A.primary_email_address)==null?void 0:R.email)||A.username||"User",Z=((L=A.primary_email_address)==null?void 0:L.email)||A.username;return t.jsxs("button",{className:"w-acct","data-active":M?"":void 0,"data-busy":T?"":void 0,onClick:()=>v(H),children:[t.jsx("div",{className:"w-avatar",children:T?t.jsx(vt,{onAccent:!0}):A.has_profile_picture?t.jsx("img",{src:A.profile_picture_url,alt:S}):j($)}),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec w-truncate",children:$}),Z&&Z!==$&&t.jsx("div",{className:"w-secsub w-truncate",children:Z})]}),M&&t.jsxs("span",{className:"w-pill w-pill--current",children:[t.jsx(Ye,{size:11,weight:"bold"}),"current"]}),t.jsx("span",{className:"w-kebab w-acct-out",role:"button","aria-disabled":P,title:"Sign out",onClick:O=>k(O,H),children:P?t.jsx(vt,{}):t.jsx(Ma,{size:15})})]},H)})}),a&&w&&t.jsx("div",{className:"w-acct-foot",children:t.jsxs("button",{className:"w-acct-add",onClick:N,children:[t.jsx(St,{size:15}),"Add another account"]})})]})}):null},$p=()=>{const{navigateToSignIn:e}=kt();return o.useEffect(()=>{e()},[e]),null},Op=()=>{const{navigateToSignUp:e}=kt();return o.useEffect(()=>{e()},[e]),null},Zp=()=>{var M,T;const{organizationMemberships:e,refetch:a,loading:s}=va(),{workspaces:r}=ba(),{switchOrganization:i,switchWorkspace:l}=ot(),{deployment:m}=_e(),[d,c]=o.useState(null),[p,u]=o.useState("orgList"),[h,f]=o.useState(null),g=((m==null?void 0:m.b2b_settings.organizations_enabled)??!1)&&((m==null?void 0:m.b2b_settings.workspaces_enabled)??!1),x=(m==null?void 0:m.b2b_settings.allow_users_to_create_orgs)??!1,w=o.useRef(!1);o.useEffect(()=>{if(!(w.current||!e)){if(w.current=!0,e.length===0){u("createOrg");return}if(!g){u("orgList");return}if(!r||r.length===0){const P=e.find(S=>{var $,Z;return!(($=S.eligibility_restriction)!=null&&$.type)||((Z=S.eligibility_restriction)==null?void 0:Z.type)==="none"});if(P){f(P.organization.id),u("createWorkspace");return}}u("orgList")}},[e,r,g]);const b=P=>P.split(" ").map(S=>S[0]).join("").toUpperCase().slice(0,2),j=async P=>{if(g){f(P.id),u("workspaceList");return}c(P.id);try{await i(P.id)}finally{c(null)}},v=async P=>{c(P.id);try{await l(P.id)}finally{c(null)}},k=async P=>{var $;await a();const S=(($=P==null?void 0:P.data)==null?void 0:$.organization)||(P==null?void 0:P.organization)||P;if(!g){u("orgList");return}S!=null&&S.id?(f(S.id),u("createWorkspace")):u("orgList")},N=async P=>{var $;const S=(P==null?void 0:P.id)??(($=P==null?void 0:P.workspace)==null?void 0:$.id);if(S){c(S);try{await l(S)}finally{c(null)}}},_=async()=>{f(null),u("orgList")},C=(M=e==null?void 0:e.find(P=>P.organization.id===h))==null?void 0:M.organization,y=h?r==null?void 0:r.filter(P=>P.organization.id===h):[];if(s)return null;if(p==="createOrg")return t.jsx(Ue.Body,{style:{padding:0},children:t.jsx(pn,{onSuccess:k,onCancel:()=>u("orgList")})});if(p==="createWorkspace"&&h)return t.jsx(Ue.Body,{style:{padding:0},children:t.jsx($r,{organizationId:h,onSuccess:N,onCancel:()=>u("workspaceList"),onCreateOrganization:()=>u("createOrg")})});const E=p==="workspaceList",A=E?"Select a workspace":"Select an organization",H=E?`Choose a workspace in ${(C==null?void 0:C.name)||""}`:`to continue to ${((T=m==null?void 0:m.ui_settings)==null?void 0:T.app_name)||"App"}`;return t.jsxs("div",{className:"w-split",children:[t.jsxs("div",{className:"w-split-aside w-flex-col w-justify-between w-gap-6",children:[t.jsxs("div",{className:"w-flex-col w-gap-4",children:[t.jsx(Ar,{placement:"left"}),t.jsxs("div",{className:"w-flex-col w-gap-1",children:[t.jsx("div",{className:"w-title",children:A}),t.jsx("p",{className:"w-sub",children:H})]})]}),t.jsx(Wr,{showName:!0})]}),t.jsxs("div",{className:"w-split-main",children:[t.jsxs("div",{className:"w-grow w-flex-col",style:{overflow:"hidden",marginBottom:24},children:[t.jsxs("div",{className:"w-flex w-items-center w-gap-2",style:{marginBottom:8},children:[E&&t.jsx("button",{className:"w-btn w-btn--icon",onClick:_,"aria-label":"Go back",title:"Go back",children:t.jsx(rn,{})}),t.jsx("h2",{className:"w-sec",children:E?"Workspaces":"Your organizations"})]}),t.jsx("div",{className:"w-grow w-flex-col",style:{overflowY:"auto"},children:E?t.jsx(t.Fragment,{children:y&&y.length>0?y.map(P=>{var $,Z,R;const S=(($=P.eligibility_restriction)==null?void 0:$.type)!=="none"&&((Z=P.eligibility_restriction)==null?void 0:Z.type)!==void 0;return t.jsxs("button",{className:"w-listrow",onClick:()=>!S&&v(P),disabled:d===P.id||S,title:S?(R=P.eligibility_restriction)==null?void 0:R.message:void 0,children:[t.jsx("div",{className:"w-avatar w-avatar--lg",children:P.image_url?t.jsx("img",{src:P.image_url,alt:P.name}):b(P.name).charAt(0)}),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec w-truncate",children:P.name}),t.jsxs("div",{className:"w-secsub w-inline w-gap-1",children:[t.jsx(ds,{}),"Workspace"]})]}),t.jsxs("div",{className:"w-inline w-gap-1 w-text-secondary",children:[S&&t.jsx(Ra,{size:16,className:"w-text-error"}),t.jsx(Jt,{})]})]},P.id)}):t.jsxs("div",{className:"w-empty",children:[t.jsx("div",{className:"w-empty-ic",children:t.jsx(ds,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:"No workspaces yet"}),t.jsxs("p",{children:["Create your first workspace for"," ",(C==null?void 0:C.name)||"this organization"]})]}),t.jsx("div",{className:"w-empty-action",children:t.jsxs(se,{$size:"sm",onClick:()=>u("createWorkspace"),children:[t.jsx(St,{}),"Create workspace"]})})]})}):e&&e.length>0?e.map(P=>{var U,V,G,Y,de;const S=P.organization,$=r==null?void 0:r.filter(fe=>fe.organization.id===S.id),Z=($==null?void 0:$.length)||0,R=S.member_count,L=((V=(U=P.roles)==null?void 0:U[0])==null?void 0:V.name)||"No role",O=P.roles.length-1,F=O>0?`${L.charAt(0).toUpperCase()+L.slice(1)} +${O}`:L.charAt(0).toUpperCase()+L.slice(1),W=((G=P.eligibility_restriction)==null?void 0:G.type)!=="none"&&((Y=P.eligibility_restriction)==null?void 0:Y.type)!==void 0;return t.jsxs("button",{className:"w-listrow",onClick:()=>!W&&j(S),disabled:d===S.id||W,title:W?(de=P.eligibility_restriction)==null?void 0:de.message:void 0,children:[t.jsx("div",{className:"w-avatar w-avatar--lg",children:S.image_url?t.jsx("img",{src:S.image_url,alt:S.name}):b(S.name)}),t.jsxs("div",{className:"w-grow",children:[t.jsx("div",{className:"w-sec w-truncate",children:S.name}),t.jsx("div",{className:"w-secsub w-inline w-gap-1",children:g?t.jsxs(t.Fragment,{children:[t.jsx(ds,{}),Z," ","workspace",Z!==1?"s":""]}):t.jsxs(t.Fragment,{children:[t.jsx(hs,{}),F," •"," ",R," member",R!==1?"s":""]})})]}),t.jsxs("div",{className:"w-inline w-gap-1 w-text-secondary",children:[W&&t.jsx(Ra,{size:16,className:"w-text-error"}),t.jsx(Jt,{})]})]},S.id)}):t.jsxs("div",{className:"w-empty",children:[t.jsx("div",{className:"w-empty-ic",children:t.jsx(hs,{size:20})}),t.jsxs("div",{className:"w-empty-text",children:[t.jsx("h4",{children:"No organizations yet"}),t.jsx("p",{children:x?"Create your first organization to get started":"You don't have access to any organizations yet"})]}),x&&t.jsx("div",{className:"w-empty-action",children:t.jsxs(se,{$size:"sm",onClick:()=>u("createOrg"),children:[t.jsx(St,{}),"Create organization"]})})]})})]}),E&&h&&t.jsxs(se,{$outline:!0,onClick:()=>u("createWorkspace"),disabled:d!==null,children:[t.jsx(St,{size:12}),"Create workspace"]}),!E&&e&&e.length>0&&x&&t.jsxs(se,{$outline:!0,onClick:()=>u("createOrg"),disabled:d!==null,children:[t.jsx(St,{size:12}),"Create new organization"]})]})]})},Hp=({children:e})=>{var h,f,g,x;const{activeOrganization:a}=xa(),{activeWorkspace:s}=Ut(),{deployment:r}=_e(),{loading:i,orgMembership:l,workspaceMembership:m}=Lo(),d=((r==null?void 0:r.b2b_settings.organizations_enabled)??!1)&&((r==null?void 0:r.b2b_settings.workspaces_enabled)??!1),c=((h=l==null?void 0:l.eligibility_restriction)==null?void 0:h.type)!=="none"&&((f=l==null?void 0:l.eligibility_restriction)==null?void 0:f.type)!==void 0,p=((g=m==null?void 0:m.eligibility_restriction)==null?void 0:g.type)!=="none"&&((x=m==null?void 0:m.eligibility_restriction)==null?void 0:x.type)!==void 0;return i?null:(c||p||!a?!1:d?s?(m==null?void 0:m.workspace.id)===s.id&&m.organization_id===a.id:!1:!0)?t.jsx(t.Fragment,{children:e}):t.jsx($e,{children:t.jsx(Ue,{isOpen:!0,children:t.jsx(Ue.Overlay,{children:t.jsx(Ue.Content,{className:"w-flex w-justify-center",style:{padding:0,width:900,maxWidth:"90vw"},children:t.jsx(Zp,{})})})})})},Fp=e=>{const a=e.toLowerCase().trim();return["javascript:","data:","vbscript:"].some(i=>a.startsWith(i))?!0:["http://","https://","//","ftp://","ftps://","mailto:","tel:","sms:","file:","blob:"].some(i=>a.startsWith(i))},Tp=e=>{const a=e.toLowerCase().trim();return!["javascript:","data:","vbscript:"].some(r=>a.startsWith(r))};exports.AcceptInvite=z4;exports.AuthFormImage=Ar;exports.CreateOrganizationForm=pn;exports.CreateWorkspaceDialog=Or;exports.CreateWorkspaceForm=$r;exports.DefaultStylesProvider=$e;exports.DeploymentInitialized=L2;exports.DeploymentInitializing=P2;exports.DeploymentProvider=e1;exports.Dialog=Ue;exports.DialogTrigger=Y4;exports.Dropdown=ks;exports.DropdownDivider=qc;exports.DropdownItem=ta;exports.DropdownItems=Cs;exports.DropdownTrigger=Ns;exports.Form=Kc;exports.FormGroup=Ge;exports.Input=ye;exports.Label=Ve;exports.MagicLinkVerification=T4;exports.ManageAccount=T0;exports.ManageAccountDialog=I0;exports.ManageOrganization=r0;exports.ManageWorkspace=l0;exports.ManageWorkspaceDialog=Hr;exports.NavigateToSignIn=$p;exports.NavigateToSignUp=Op;exports.NavigationLink=Et;exports.NotificationBell=G0;exports.NotificationItem=U0;exports.NotificationPanel=W0;exports.NotificationPopover=B0;exports.OAuthProvider=vo;exports.ORG_ADMIN_PERMISSIONS=c0;exports.ORG_MANAGEMENT_PERMISSIONS=d0;exports.OTPInput=ja;exports.OrganizationSwitcher=p0;exports.PhoneNumberInput=js;exports.PhoneVerification=Ic;exports.ProfileCompletion=zc;exports.RequireActiveTenancy=Hp;exports.SignInForm=O4;exports.SignUpForm=S4;exports.SignedIn=Rp;exports.SignedInAccounts=Pp;exports.SignedOut=Lp;exports.SimpleDialog=K4;exports.SocialCallback=F4;exports.Spinner=ke;exports.Switch=Ha;exports.TwoFactorMethodSelector=Tc;exports.TwoFactorVerification=Vc;exports.UserButton=Wr;exports.UserControls=Mp;exports.WORKSPACE_ADMIN_PERMISSIONS=u0;exports.WORKSPACE_MANAGEMENT_PERMISSIONS=m0;exports.WaitlistForm=H4;exports.canManageOrganization=Tr;exports.canManageWorkspace=Vr;exports.clearTokenCache=Pt;exports.hasIncompleteProfile=I4;exports.hasOrgPermission=Fr;exports.hasWorkspacePermission=Ir;exports.isExternalUrl=Fp;exports.isOrgAdmin=Dm;exports.isSafeUrl=Tp;exports.isWorkspaceAdmin=Um;exports.redirectToProfileCompletion=V4;exports.useActiveOrganization=xa;exports.useActiveTenancy=Lo;exports.useActiveWorkspace=Ut;exports.useActorMcpServers=t2;exports.useActorProjectSearch=Dd;exports.useActorProjects=zd;exports.useActorThreadSearch=Bd;exports.useAgentSession=Zd;exports.useAgentThread=Gd;exports.useAgentThreadAssignments=Kd;exports.useAgentThreadConversation=Od;exports.useAgentThreadFilesystem=qd;exports.useAgentThreadTaskGraphs=Xd;exports.useApiAuthAppSession=S2;exports.useApiAuthAuditAnalytics=M2;exports.useApiAuthAuditLogs=A2;exports.useApiAuthAuditTimeseries=R2;exports.useApiAuthKeys=E2;exports.useClient=je;exports.useCreateWebhookEndpoint=j2;exports.useDeployment=_e;exports.useExternalAgentConnections=a2;exports.useForgotPassword=Zo;exports.useInvitation=Uo;exports.useMagicLinkVerification=Oo;exports.useNavigation=kt;exports.useNotificationStream=Ho;exports.useNotificationUnreadCount=To;exports.useNotifications=Fo;exports.useOrganizationList=Dt;exports.useOrganizationMemberships=va;exports.useProjectTaskBoardItem=Jd;exports.useProjectTaskBoardItemComments=e2;exports.useProjectTasks=Qd;exports.useProjectThreadFeed=Wd;exports.useProjectThreads=Ud;exports.useSession=ot;exports.useSignIn=bo;exports.useSignUp=yo;exports.useSocialCallback=$o;exports.useThemeOverrideVars=as;exports.useUser=ya;exports.useUserSignins=Ro;exports.useWaitlist=Po;exports.useWebhookAnalytics=C2;exports.useWebhookAppSession=v2;exports.useWebhookDeliveries=k2;exports.useWebhookEndpoints=y2;exports.useWebhookEvents=_2;exports.useWebhookStats=b2;exports.useWebhookTimeseries=N2;exports.useWorkspaceList=ba;exports.useWorkspaceMemberships=an;Object.keys(Kr).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>Kr[e]})});
119
119
  //# sourceMappingURL=index.cjs.js.map