@atlasauth/embed 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,7 @@
11
11
  * that is not safe to hand a third-party origin (see the endpoint).
12
12
  * - an inline `appearance` option the embedding page passes, which wins.
13
13
  */
14
+ import type { AtlasDesign, InstanceDesign, PresetId } from '@atlasauth/design/runtime';
14
15
  /** Design tokens a tenant (or the inline override) can set. */
15
16
  export interface DesignTokens {
16
17
  colorPrimary?: string;
@@ -146,6 +147,16 @@ export interface ResolvedSocialButtons {
146
147
  export declare function resolveSocialButtons(server: SocialButtonsConfig | undefined, inline: SocialButtonsConfig | undefined): ResolvedSocialButtons;
147
148
  /** The inline override an embedding page may pass as `appearance`. */
148
149
  export interface WidgetAppearance {
150
+ /**
151
+ * A design preset (`minimal`, `atlas`, `glass`, `midnight`, `editorial`,
152
+ * `terminal`, `sunrise`, `forest`, `grape`, `slate`, `split-photo`, `bold`).
153
+ * Replaces the dashboard design as the starting point.
154
+ */
155
+ preset?: PresetId;
156
+ /** Structured design overrides — the dashboard design editor's settings. Highest precedence. */
157
+ design?: AtlasDesign;
158
+ /** Apply the design configured in the dashboard (default true). */
159
+ instanceDesign?: boolean;
149
160
  variables?: DesignTokens;
150
161
  elements?: Partial<Record<ElementKey, string>>;
151
162
  /** How the social buttons look — variant, size, layout, per-provider labels. */
@@ -216,6 +227,8 @@ export interface PublicSignUpField {
216
227
  export interface AppearanceResponse {
217
228
  object: 'appearance';
218
229
  appearance: PublicAppearance;
230
+ /** The design configured in the dashboard (structured design system), when any. */
231
+ design?: InstanceDesign | null;
219
232
  /** ENABLED social provider ids (keys only), e.g. `['google','github']`. */
220
233
  providers: string[];
221
234
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"appearance.js","sourceRoot":"","sources":["../src/appearance.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AA6DH,4CAMC;AA2FD,gDAuBC;AAq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AI,CAAC,CAAC;SACrE,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
package/dist/config.js CHANGED
@@ -42,6 +42,11 @@ function optionsFromElement(el, mode) {
42
42
  const options = { publishableKey, frontendApi, mode };
43
43
  if (redirect)
44
44
  options.redirect = redirect;
45
+ // `data-atlas-preset="midnight"` — a design preset straight from markup. Any
46
+ // value is passed through; the design system ignores (and warns on) unknown ids.
47
+ const preset = dataset.atlasPreset ?? attr('preset');
48
+ if (preset)
49
+ options.appearance = { preset: preset };
45
50
  return options;
46
51
  }
47
52
  /** Merge imperative options over the script-tag defaults. */
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;AAmBA,8CAEC;AAED,8CAEC;AAGD,sCAQC;AAOD,gDAgBC;AAGD,wCAeC;AA5DD,IAAI,cAAc,GAAmB,EAAE,CAAC;AAExC,SAAgB,iBAAiB,CAAC,QAAwB;IACxD,cAAc,GAAG,QAAQ,CAAC;AAC5B,CAAC;AAED,SAAgB,iBAAiB;IAC/B,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,qEAAqE;AACrE,SAAgB,aAAa,CAAC,MAA4C;IACxE,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IACvB,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;IACzB,MAAM,GAAG,GAAmB,EAAE,CAAC;IAC/B,IAAI,CAAC,CAAC,QAAQ;QAAE,GAAG,CAAC,cAAc,GAAG,CAAC,CAAC,QAAQ,CAAC;IAChD,IAAI,CAAC,CAAC,SAAS;QAAE,GAAG,CAAC,WAAW,GAAG,CAAC,CAAC,SAAS,CAAC;IAC/C,IAAI,CAAC,CAAC,aAAa;QAAE,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,aAAa,CAAC;IACpD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAChC,EAAW,EACX,IAA2B;IA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AEtF,IAAI,CAAC,cAAc,IAAI,CAAC,WAAW;QAAE,OAAO,IAAI,CAAC;IAEjD,MAAM,OAAO,GAAkB,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;IACrE,IAAI,QAAQ;QAAE,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC1C,6EAA6E;IAC7E,iFAAiF;IACjF,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrD,IAAI,MAAM;QAAE,OAAO,CAAC,UAAU,GAAG,EAAE,MAAM,EAAE,MAAe,EAAE,CAAC;IAC7D,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,6DAA6D;AAC7D,SAAgB,cAAc,CAC5B,IAA2B,EAC3B,YAAoC,EAAE;IAEtC,MAAM,cAAc,GAAG,SAAS,CAAC,cAAc,IAAI,cAAc,CAAC,cAAc,CAAC;IACjF,MAAM,WAAW,GAAG,SAAS,CAAC,WAAW,IAAI,cAAc,CAAC,WAAW,CAAC;IACxE,IAAI,CAAC,cAAc,IAAI,CAAC,WAAW;QAAE,OAAO,IAAI,CAAC;IAEjD,OAAO;QACL,GAAG,SAAS;QACZ,cAAc;QACd,WAAW;QACX,QAAQ,EAAE,SAAS,CAAC,QAAQ,IAAI,cAAc,CAAC,QAAQ;QACvD,IAAI;KACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { type AppearanceRender, type InstanceDesign, type ResolvedDesign } from '@atlasauth/design/runtime';
2
+ import type { DesignTokens, InteractionConfig, SocialButtonsConfig, WidgetAppearance } from './appearance';
3
+ /**
4
+ * The design system for the widget (`<atlas-sign-in>` / `<atlas-sign-up>` and
5
+ * `mount()`), with the same semantics as `@atlasauth/react`:
6
+ *
7
+ * tenant branding < dashboard design < appearance.preset < appearance.variables < appearance.design
8
+ *
9
+ * The widget keeps its own stylesheet (the `--atlas-embed-*` tokens and the
10
+ * interaction data-attributes), so a resolved design is TRANSLATED into those:
11
+ * palette → colour tokens, shape → radius, typography → font stack, buttons /
12
+ * inputs / elevation / density → the interaction config, social layout → the
13
+ * social-button config. The root additionally carries the design's
14
+ * `data-atlas-*` attributes as stable hooks for the host page.
15
+ *
16
+ * Size: the widget ships as one script, so it uses the zod-free runtime entry
17
+ * and never compiles the `--atlas-*` design stylesheet (its own stylesheet
18
+ * reads the `--atlas-embed-*` tokens instead) — the CSS compiler stays out of
19
+ * `embed.js`.
20
+ */
21
+ export interface WidgetDesign {
22
+ /** Root attributes + font links (no stylesheet, no inline `style`). */
23
+ render: AppearanceRender;
24
+ /** Colour/shape/font tokens for the widget stylesheet. */
25
+ tokens: Required<DesignTokens>;
26
+ /** Interaction defaults implied by the design (the inline override still wins). */
27
+ interaction: InteractionConfig;
28
+ /** Social-button defaults implied by the design (the inline override still wins). */
29
+ socialButtons: SocialButtonsConfig;
30
+ resolved: ResolvedDesign;
31
+ }
32
+ /**
33
+ * The design the widget renders, or null when there is none (no dashboard
34
+ * design, no inline `preset`/`design`) — the widget then themes exactly as
35
+ * before from the tenant branding and inline tokens.
36
+ */
37
+ export declare function widgetDesign(instance: InstanceDesign | null | undefined, inline: WidgetAppearance | undefined, opts?: {
38
+ frontendApi?: string;
39
+ prefersDark?: boolean;
40
+ }): WidgetDesign | null;
package/dist/design.js ADDED
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.widgetDesign = widgetDesign;
4
+ const runtime_1 = require("@atlasauth/design/runtime");
5
+ /**
6
+ * The design the widget renders, or null when there is none (no dashboard
7
+ * design, no inline `preset`/`design`) — the widget then themes exactly as
8
+ * before from the tenant branding and inline tokens.
9
+ */
10
+ function widgetDesign(instance, inline, opts = {}) {
11
+ const r = (0, runtime_1.resolveComposedDesign)({
12
+ instance: inline?.instanceDesign === false ? null : instance,
13
+ preset: inline?.preset,
14
+ design: inline?.design,
15
+ warn: runtime_1.warnOnce,
16
+ });
17
+ if (!r)
18
+ return null;
19
+ const dark = r.colorScheme === 'dark' || (r.colorScheme === 'auto' && !!opts.prefersDark);
20
+ const p = dark ? r.paletteDark : r.palette;
21
+ const tokens = {
22
+ colorPrimary: p.primary,
23
+ colorText: p.text,
24
+ colorBackground: p.background,
25
+ colorAccent: p.accent,
26
+ colorCard: p.surface,
27
+ colorBorder: p.border,
28
+ // The widget derives its card radius from the control radius (+4px); cap a
29
+ // pill control radius so the card stays a card.
30
+ borderRadius: `${Math.min(r.shape.controlRadius, 24)}px`,
31
+ fontFamily: (0, runtime_1.fontStack)(r.typography.font),
32
+ };
33
+ // Inline variables win over the design, exactly as they win over the tenant's.
34
+ for (const [key, value] of Object.entries(inline?.variables ?? {})) {
35
+ if (value !== undefined)
36
+ tokens[key] = value;
37
+ }
38
+ const shadow = r.elevation.cardShadow === 'xl' ? 'lg' : r.elevation.cardShadow;
39
+ const interaction = {
40
+ buttonStyle: r.buttons.style === 'gradient' ? 'solid' : r.buttons.style,
41
+ shadow: r.card.style === 'outline' || r.card.style === 'none' ? 'none' : shadow,
42
+ density: r.spacing.density === 'compact' ? 'compact' : 'comfortable',
43
+ inputStyle: r.inputs.style,
44
+ };
45
+ const socialButtons = r.buttons.socialLayout === 'icons'
46
+ ? { variant: 'icon', layout: 'grid' }
47
+ : { layout: r.buttons.socialLayout === 'grid' ? 'grid' : 'list' };
48
+ const key = (0, runtime_1.designKey)(JSON.stringify(r));
49
+ return {
50
+ render: {
51
+ style: {},
52
+ attributes: { ...(0, runtime_1.designDataAttributes)(r), 'data-atlas-design': key },
53
+ css: '',
54
+ key,
55
+ fontStylesheets: (0, runtime_1.designFontUrls)(r, opts.frontendApi),
56
+ },
57
+ tokens,
58
+ interaction,
59
+ socialButtons,
60
+ resolved: r,
61
+ };
62
+ }
63
+ //# sourceMappingURL=design.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"design.js","sourceRoot":"","sources":["../src/design.ts"],"names":[],"mappings":";;AAsDA,oCA0DC;AAhHD,uDAUm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AmB,EAAE,GAAG,EAAE;YACpE,GAAG,EAAE,EAAE;YACP,GAAG;YACH,eAAe,EAAE,IAAA,wBAAc,EAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC;SACrD;QACD,MAAM;QACN,WAAW;QACX,aAAa;QACb,QAAQ,EAAE,CAAC;KACZ,CAAC;AACJ,CAAC"}
package/dist/embed.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var Ft=Object.create;var me=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var Ot=Object.getPrototypeOf,Dt=Object.prototype.hasOwnProperty;var zt=(e,t,n)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Wt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Ht(t))!Dt.call(e,r)&&r!==n&&me(e,r,{get:()=>t[r],enumerable:!(o=Bt(t,r))||o.enumerable});return e};var Nt=(e,t,n)=>(n=e!=null?Ft(Ot(e)):{},Wt(t||!e||!e.__esModule?me(n,"default",{value:e,enumerable:!0}):n,e));var f=(e,t,n)=>zt(e,typeof t!="symbol"?t+"":t,n);var Ue=fe(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.ForbiddenError=void 0;D.evaluate=xe;D.hasFromClaims=Qt;D.protectFromClaims=en;function Jt(e){return e.permission!==void 0||e.role!==void 0||e.anyPermission!==void 0||e.allPermissions!==void 0}function xe(e,t={}){var o,r;if(!e)return{allowed:!1,reason:"signed_out"};if(t.plan!==void 0&&e.pla!==t.plan)return{allowed:!1,reason:"missing_entitlement"};if(t.feature!==void 0&&!((o=e.fea)!=null?o:[]).includes(t.feature))return{allowed:!1,reason:"missing_entitlement"};if(!Jt(t))return{allowed:!0};if(!e.org_id)return{allowed:!1,reason:"no_organization"};let n=new Set((r=e.org_permissions)!=null?r:[]);return t.role!==void 0&&e.org_role!==t.role?{allowed:!1,reason:"missing_permission"}:t.permission!==void 0&&!n.has(t.permission)?{allowed:!1,reason:"missing_permission"}:t.anyPermission&&!t.anyPermission.some(a=>n.has(a))?{allowed:!1,reason:"missing_permission"}:t.allPermissions&&!t.allPermissions.every(a=>n.has(a))?{allowed:!1,reason:"missing_permission"}:{allowed:!0}}function Qt(e,t={}){return xe(e,t).allowed}var oe=class extends Error{constructor(n,o){super(n==="signed_out"?"Not signed in.":n==="no_organization"?"No active organization for this authorization check.":n==="missing_entitlement"?"Missing the required plan or feature.":"Missing the required permission or role.");f(this,"reason");f(this,"condition");this.name="ForbiddenError",this.reason=n,this.condition=o}};D.ForbiddenError=oe;function en(e,t={}){let n=xe(e,t);if(!n.allowed)throw new oe(n.reason,t)}});var Ke=fe(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.PERMISSION_KEY_PATTERN=L.ROLE_KEY_PATTERN=void 0;L.isRoleKey=tn;L.isPermissionKey=nn;L.ROLE_KEY_PATTERN=/^org:[a-z][a-z0-9_]{1,31}$/;L.PERMISSION_KEY_PATTERN=/^org:[a-z][a-z0-9_]{1,31}:[a-z][a-z0-9_]{1,31}$/;function tn(e){return L.ROLE_KEY_PATTERN.test(e)}function nn(e){return L.PERMISSION_KEY_PATTERN.test(e)}});var je=fe(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.isPermissionKey=C.isRoleKey=C.PERMISSION_KEY_PATTERN=C.ROLE_KEY_PATTERN=C.ForbiddenError=C.protectFromClaims=C.hasFromClaims=C.evaluate=void 0;var ae=Ue();Object.defineProperty(C,"evaluate",{enumerable:!0,get:function(){return ae.evaluate}});Object.defineProperty(C,"hasFromClaims",{enumerable:!0,get:function(){return ae.hasFromClaims}});Object.defineProperty(C,"protectFromClaims",{enumerable:!0,get:function(){return ae.protectFromClaims}});Object.defineProperty(C,"ForbiddenError",{enumerable:!0,get:function(){return ae.ForbiddenError}});var re=Ke();Object.defineProperty(C,"ROLE_KEY_PATTERN",{enumerable:!0,get:function(){return re.ROLE_KEY_PATTERN}});Object.defineProperty(C,"PERMISSION_KEY_PATTERN",{enumerable:!0,get:function(){return re.PERMISSION_KEY_PATTERN}});Object.defineProperty(C,"isRoleKey",{enumerable:!0,get:function(){return re.isRoleKey}});Object.defineProperty(C,"isPermissionKey",{enumerable:!0,get:function(){return re.isPermissionKey}})});function H(e){var t,n;switch(e.status){case"needs_identifier":return{kind:"collect_identifier"};case"needs_first_factor":return{kind:"collect_first_factor",strategies:(t=e.supported_first_factors)!=null?t:[]};case"needs_second_factor":return{kind:"collect_second_factor"};case"needs_mfa_enrollment":return{kind:"enroll_second_factor"};case"needs_email_verification":return{kind:"collect_email_code"};case"needs_captcha":return{kind:"collect_captcha"};case"needs_oauth_callback":return{kind:"await_oauth"};case"needs_new_password":return{kind:"collect_new_password"};case"complete":return{kind:"done",sessionId:(n=e.created_session_id)!=null?n:null};case"abandoned":return{kind:"restart",reason:"abandoned"};default:return{kind:"unknown",status:e.status}}}function Re(e){if(!e||typeof e!="object")return[];let t=e.errors;return Array.isArray(t)?t.filter(n=>!!n&&typeof n.message=="string").map(n=>({code:n.code,message:n.message,param:n.param})):[]}var Ut=["__atlas_attempt","__atlas_ticket","__atlas_status"];function Pe(e){let t=new URLSearchParams(e),n=t.get("__atlas_attempt");if(!n)return null;let o=t.get("__atlas_ticket"),r=t.get("__atlas_status");return!o&&!r?null:{attemptId:n,...o?{ticket:o}:{},...r?{status:r}:{}}}function G(e){let t=new URL(e);for(let n of Ut)t.searchParams.delete(n);return t.toString()}var Y=class{constructor(t){this.options=t}async request(t,n={}){var i,l;let o=(i=this.options.fetchImpl)!=null?i:fetch,r;try{r=await o(`${(l=this.options.baseUrl)!=null?l:""}${t}`,{...n,credentials:"include",headers:{"x-publishable-key":this.options.publishableKey,...n.body?{"content-type":"application/json"}:{},...n.headers}})}catch{return{ok:!1,status:0,data:null,errors:[{code:"NETWORK",message:"We could not reach the server."}]}}let a=null;try{a=await r.json()}catch{}return{ok:r.ok,status:r.status,data:r.ok?a:null,errors:r.ok?[]:Re(a)}}post(t,n){return this.request(t,{method:"POST",body:n===void 0?void 0:JSON.stringify(n)})}get(t){return this.request(t,{method:"GET"})}};var M={attempt:null,errors:[],busy:!1,pollSecret:null,ticket:null};function Kt(e,t){var r,a,i,l,s,d,c,p,m,b,h;if(!e)return{path:"/v1/client/sign_ins",body:{identifier:(r=t.identifier)!=null?r:"",...t.captcha_token?{captcha_token:t.captcha_token}:{}}};let n=H(e),o=(a=e.id)!=null?a:"";switch(n.kind){case"collect_identifier":return{path:"/v1/client/sign_ins",body:{identifier:(i=t.identifier)!=null?i:"",...t.captcha_token?{captcha_token:t.captcha_token}:{}}};case"collect_first_factor":return t.code?{path:`/v1/client/sign_ins/${o}/attempt_first_factor`,body:{strategy:"email_code",code:t.code}}:{path:`/v1/client/sign_ins/${o}/attempt_first_factor`,body:{strategy:"password",password:(l=t.password)!=null?l:""}};case"collect_second_factor":return{path:`/v1/client/sign_ins/${o}/attempt_second_factor`,body:{code:(s=t.code)!=null?s:"",...t.remember_device==="true"?{remember_device:!0}:{}}};case"enroll_second_factor":return{path:`/v1/client/sign_ins/${o}/attempt_mfa_enrollment`,body:{factor_id:(d=t.factorId)!=null?d:"",codes:[(c=t.code)!=null?c:"",(p=t.secondCode)!=null?p:""]}};case"collect_email_code":return{path:`/v1/client/sign_ups/${o}/attempt_verification`,body:{code:(m=t.code)!=null?m:""}};case"collect_captcha":return t.captcha_token?{path:"/v1/client/sign_ins",body:{identifier:(b=t.identifier)!=null?b:"",captcha_token:t.captcha_token}}:null;case"collect_new_password":return{path:`/v1/client/password_resets/${o}/set_new_password`,body:{password:(h=t.password)!=null?h:""}};case"await_oauth":case"done":case"restart":case"unknown":return null}}function X(e){return e?{...M,attempt:{id:e.id,status:e.status}}:M}async function Z(e,t,n){var a;let o=Kt(t.attempt,n);if(!o)return t;let r=await e.post(o.path,o.body);return!r.ok||!r.data?{...t,busy:!1,errors:r.errors}:{attempt:r.data,errors:[],busy:!1,pollSecret:t.pollSecret,ticket:(a=r.data.ticket)!=null?a:null}}async function Me(e,t){var r;let n=t.fields&&Object.keys(t.fields).length>0,o=await e.post("/v1/client/sign_ups",{email:t.email,password:t.password,...n?{fields:t.fields}:{},...t.consent?{consent:!0}:{},...t.captchaToken?{captcha_token:t.captchaToken}:{}});return!o.ok||!o.data?{...M,busy:!1,errors:o.errors}:{attempt:o.data,errors:[],busy:!1,pollSecret:M.pollSecret,ticket:(r=o.data.ticket)!=null?r:null}}function Ie(e){return{provider:e.provider,id_token:e.idToken,...e.nonce?{nonce:e.nonce}:{}}}function Fe(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.id!="string"||typeof t.status!="string"?null:{attemptId:t.id,status:t.status,...typeof t.ticket=="string"?{ticket:t.ticket}:{}}}var Le="https://accounts.google.com/gsi/client",J=null;function jt(e){return J||(J=new Promise((t,n)=>{if(e.querySelector(`script[src="${Le}"]`)){t();return}let o=e.createElement("script");o.src=Le,o.async=!0,o.defer=!0,o.addEventListener("load",()=>t()),o.addEventListener("error",()=>n(new Error("Failed to load Google Identity Services."))),e.head.appendChild(o)}),J)}async function Be(e){var d,c,p,m;let t=(d=e.host)!=null?d:window,n=t.document;await jt(n);let o=(p=(c=t.google)==null?void 0:c.accounts)==null?void 0:p.id;if(!o)throw new Error("Google Identity Services unavailable.");o.initialize({client_id:e.clientId,nonce:e.nonce,callback:b=>{var h;b.credential?e.onCredential(b.credential):(h=e.onError)==null||h.call(e,new Error("Google returned no credential."))}});let r=e.wrapper.style.position!=="";r||(e.wrapper.style.position="relative");let a=n.createElement("div");a.setAttribute("aria-hidden","true"),a.style.cssText="position:absolute;inset:0;z-index:2;opacity:0;overflow:hidden;display:flex;align-items:center;justify-content:center;",e.wrapper.appendChild(a);let i=()=>{var y;let b=Math.round(e.wrapper.getBoundingClientRect().width)||320,h=Math.max(200,Math.min(400,b));a.replaceChildren(),o.renderButton(a,{type:"standard",theme:"outline",size:(y=e.size)!=null?y:"large",text:"continue_with",width:h})};i();let l,s=(m=t.ResizeObserver)!=null?m:typeof ResizeObserver!="undefined"?ResizeObserver:void 0;return s&&(l=new s(()=>i()),l.observe(e.wrapper)),{destroy:()=>{l==null||l.disconnect(),a.remove(),r||(e.wrapper.style.position="")}}}var Vt=()=>{let e=globalThis.navigator;if(!e||!e.credentials)throw new Error("WebAuthn is not available in this environment.");return e};function Q(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),n="";for(let o=0;o<t.length;o+=1)n+=String.fromCharCode(t[o]);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function He(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.length%4===0?"":"=".repeat(4-t.length%4),o=atob(t+n),r=new Uint8Array(o.length);for(let a=0;a<o.length;a+=1)r[a]=o.charCodeAt(a);return r.buffer}function N(e){return typeof(e!=null?e:globalThis.PublicKeyCredential)!="undefined"}async function Oe(){var t;let e=globalThis.PublicKeyCredential;try{return await((t=e==null?void 0:e.isConditionalMediationAvailable)==null?void 0:t.call(e))===!0}catch{return!1}}async function be(e,t={}){var l,s;let n=(l=t.host)!=null?l:Vt(),o=(s=e.allowCredentials)!=null?s:[],r={challenge:He(e.challenge),rpId:e.rpId,allowCredentials:o.map(d=>({type:d.type,id:He(d.id)})),userVerification:e.userVerification,timeout:e.timeout},a=await n.credentials.get({publicKey:r,...t.mediation?{mediation:t.mediation}:{},...t.signal?{signal:t.signal}:{}});if(!a)throw new Error("Passkey sign-in was cancelled.");let i=a.response;return{handle:e.handle,challenge:e.challenge,credential_id:Q(a.rawId),authenticator_data:Q(i.authenticatorData),client_data_json:Q(i.clientDataJSON),signature:Q(i.signature)}}var De=typeof window!="undefined",ne=()=>typeof navigator!="undefined"?navigator:void 0;function k(e,t){try{return e()}catch{return t}}function $t(){return k(()=>{if(!De||typeof document=="undefined")return{vendor:null,renderer:null};let e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(!t)return{vendor:null,renderer:null};let n=t.getExtension("WEBGL_debug_renderer_info"),o=n?t.getParameter(n.UNMASKED_VENDOR_WEBGL):null,r=n?t.getParameter(n.UNMASKED_RENDERER_WEBGL):null;return{vendor:o!=null?o:null,renderer:r!=null?r:null}},{vendor:null,renderer:null})}function qt(){return k(()=>{if(typeof document=="undefined")return null;let e=document.createElement("canvas");e.width=220,e.height=40;let t=e.getContext("2d");return t?(t.textBaseline="top",t.font="14px 'Arial'",t.fillStyle="#f60",t.fillRect(0,0,60,20),t.fillStyle="#069",t.fillText("Atlas anti-bot \u2708 1.0",2,15),he(e.toDataURL())):null},null)}function Gt(){var l;let e=ne(),t=De?window:{},n=(l=e==null?void 0:e.userAgent)!=null?l:"",o=k(()=>(e==null?void 0:e.webdriver)===!0,!1),r=k(()=>"chrome"in t&&!!t.chrome,!1),a=/headless/i.test(n)||/chrome/i.test(n)&&!r&&k(()=>{var s,d;return((d=(s=e==null?void 0:e.plugins)==null?void 0:s.length)!=null?d:0)===0},!1),i=k(()=>o||"_phantom"in t||"callPhantom"in t||"__nightmare"in t||"domAutomation"in t||"domAutomationController"in t||typeof document!="undefined"&&Object.keys(document).some(s=>s.startsWith("cdc_")||s.startsWith("$cdc_"))||/electron|phantomjs|slimerjs/i.test(n),o);return{webdriver:o,headless:a,hasChrome:r,automationHint:i}}function Yt(){let e=ne(),t=$t(),n=Gt(),o=k(()=>{var a;return Array.from((a=e==null?void 0:e.languages)!=null?a:[])},[]),r=t.renderer;return{screenWidth:k(()=>{var a,i;return(i=(a=window.screen)==null?void 0:a.width)!=null?i:null},null),screenHeight:k(()=>{var a,i;return(i=(a=window.screen)==null?void 0:a.height)!=null?i:null},null),colorDepth:k(()=>{var a,i;return(i=(a=window.screen)==null?void 0:a.colorDepth)!=null?i:null},null),pixelRatio:k(()=>{var a;return(a=window.devicePixelRatio)!=null?a:null},null),timezone:k(()=>{var a;return(a=Intl.DateTimeFormat().resolvedOptions().timeZone)!=null?a:null},null),timezoneOffset:k(()=>new Date().getTimezoneOffset(),null),language:k(()=>{var a;return(a=e==null?void 0:e.language)!=null?a:null},null),languages:o,platform:k(()=>{var a;return(a=e==null?void 0:e.platform)!=null?a:null},null),hardwareConcurrency:k(()=>{var a;return(a=e==null?void 0:e.hardwareConcurrency)!=null?a:null},null),deviceMemory:k(()=>{var a;return(a=e==null?void 0:e.deviceMemory)!=null?a:null},null),maxTouchPoints:k(()=>{var a;return(a=e==null?void 0:e.maxTouchPoints)!=null?a:null},null),touchSupport:k(()=>{var a;return((a=e==null?void 0:e.maxTouchPoints)!=null?a:0)>0||"ontouchstart"in window},!1),cookieEnabled:k(()=>{var a;return(a=e==null?void 0:e.cookieEnabled)!=null?a:null},null),doNotTrack:k(()=>(e==null?void 0:e.doNotTrack)==="1"||(e==null?void 0:e.doNotTrack)==="yes",null),webglVendor:t.vendor,webglRenderer:r,pluginCount:k(()=>{var a,i;return(i=(a=e==null?void 0:e.plugins)==null?void 0:a.length)!=null?i:null},null),pointerType:k(()=>{var a,i;return(i=(a=window.matchMedia)==null?void 0:a.call(window,"(pointer: fine)"))!=null&&i.matches?"fine":"coarse"},null),webdriver:n.webdriver,headless:n.headless,hasChrome:n.hasChrome,webglSoftware:r?/swiftshader|llvmpipe|software|basic render/i.test(r):!1,automationHint:n.automationHint}}function Xt(){return k(()=>{var n,o;if(typeof localStorage=="undefined")return null;let e="__atlas_did",t=localStorage.getItem(e);return t||(t="d_"+he(String(Math.random())+String(Date.now())+((o=(n=ne())==null?void 0:n.userAgent)!=null?o:"")),localStorage.setItem(e,t)),t},null)}function Zt(e){let t=[e.timezone,e.platform,e.languages.join(","),e.webglVendor,e.webglRenderer,e.screenWidth,e.screenHeight,e.colorDepth,e.hardwareConcurrency,qt()];return he(t.map(n=>n==null?"":String(n)).join("|"))}function he(e){let t=5381;for(let n=0;n<e.length;n+=1)t=(t<<5)+t+e.charCodeAt(n)>>>0;return t.toString(16).padStart(8,"0")}var ee=e=>e.length?e.reduce((t,n)=>t+n,0)/e.length:null,ge=e=>{let t=ee(e);return t===null?null:e.reduce((n,o)=>n+(o-t)**2,0)/e.length},te=class{constructor(t){f(this,"start",Date.now());f(this,"firstInteraction",null);f(this,"moves",0);f(this,"distance",0);f(this,"maxSpeed",0);f(this,"speeds",[]);f(this,"lastX",null);f(this,"lastY",null);f(this,"lastMoveT",0);f(this,"netDx",0);f(this,"netDy",0);f(this,"keyCount",0);f(this,"downAt",new Map);f(this,"dwell",[]);f(this,"flight",[]);f(this,"lastUpAt",null);f(this,"pastes",0);f(this,"backspaces",0);f(this,"focusChanges",0);f(this,"scrolls",0);f(this,"target");f(this,"bound",[]);this.target=t!=null?t:typeof document!="undefined"?document:void 0,this.attach()}mark(){this.firstInteraction===null&&(this.firstInteraction=Date.now()-this.start)}attach(){let t=this.target;if(!t)return;let n=(o,r)=>{k(()=>t.addEventListener(o,r,{passive:!0}),void 0),this.bound.push([o,r])};n("pointermove",o=>this.onMove(o)),n("mousemove",o=>this.onMove(o)),n("keydown",o=>this.onKeyDown(o)),n("keyup",o=>this.onKeyUp(o)),n("paste",()=>{this.mark(),this.pastes+=1}),n("focusin",()=>{this.mark(),this.focusChanges+=1}),n("scroll",()=>{this.mark(),this.scrolls+=1})}onMove(t){var a,i;this.mark();let n=(a=t.clientX)!=null?a:0,o=(i=t.clientY)!=null?i:0,r=Date.now();if(this.lastX!==null&&this.lastY!==null){let l=n-this.lastX,s=o-this.lastY,d=Math.hypot(l,s);this.distance+=d,this.netDx+=l,this.netDy+=s;let c=r-this.lastMoveT;if(c>0){let p=d/c;this.speeds.push(p),p>this.maxSpeed&&(this.maxSpeed=p)}}this.moves+=1,this.lastX=n,this.lastY=o,this.lastMoveT=r}onKeyDown(t){this.mark(),this.keyCount+=1,t.key==="Backspace"&&(this.backspaces+=1),this.downAt.set(t.code||t.key||String(this.keyCount),Date.now()),this.lastUpAt!==null&&this.flight.push(Date.now()-this.lastUpAt)}onKeyUp(t){let n=t.code||t.key||"",o=this.downAt.get(n),r=Date.now();o!==void 0&&(this.dwell.push(r-o),this.downAt.delete(n)),this.lastUpAt=r}snapshot(){let t=Math.hypot(this.netDx,this.netDy);return{mouseMoves:this.moves,mouseDistance:Math.round(this.distance),mouseAvgSpeed:ee(this.speeds),mouseMaxSpeed:Math.round(this.maxSpeed*1e3)/1e3,mouseSpeedVariance:ge(this.speeds),mouseStraightLineRatio:this.distance>0?Math.min(1,t/this.distance):null,keyCount:this.keyCount,keyAvgDwellMs:ee(this.dwell),keyAvgFlightMs:ee(this.flight),keyDwellVariance:ge(this.dwell),keyFlightVariance:ge(this.flight),pasteCount:this.pastes,backspaceCount:this.backspaces,timeToFirstInteractionMs:this.firstInteraction,timeToSubmitMs:Date.now()-this.start,focusChanges:this.focusChanges,scrollCount:this.scrolls,hadPointerMove:this.moves>0,hadKeydown:this.keyCount>0,interactionCount:this.moves+this.keyCount+this.scrolls+this.focusChanges}}stop(){let t=this.target;if(t){for(let[n,o]of this.bound)k(()=>t.removeEventListener(n,o),void 0);this.bound=[]}}};async function ze(e){return k(async()=>{var s,d,c;let t=Yt(),n={attempt_id:e.attemptId,kind:(s=e.kind)!=null?s:"telemetry",device_id:Xt(),device_fingerprint:Zt(t),device:t,behavior:(d=e.recorder)==null?void 0:d.snapshot()},o=`${e.api}/v1/client/telemetry?publishable_key=${encodeURIComponent(e.publishableKey)}`,r=JSON.stringify(n),a=ne();if(!e.fetchImpl&&a&&typeof a.sendBeacon=="function"&&typeof Blob!="undefined"&&a.sendBeacon(o,new Blob([r],{type:"application/json"})))return!0;let i=(c=e.fetchImpl)!=null?c:typeof fetch!="undefined"?fetch:void 0;return i?(await i(o,{method:"POST",headers:{"content-type":"application/json","x-publishable-key":e.publishableKey},body:r,keepalive:!0,credentials:"include"})).ok:!1},Promise.resolve(!1))}var ye={attempt:null,errors:[],busy:!1,ticket:null};async function We(e,t,n){let o=await e.post("/v1/client/password_resets",{email_address:t,captcha_token:n});return!o.ok||!o.data?{...ye,errors:o.errors}:{attempt:o.data,errors:[],busy:!1,ticket:null}}async function Ne(e,t,n){var l,s,d,c;let o=t.attempt;if(!o)return t;let r=null,a={};switch(o.status){case"needs_email_verification":r=`/v1/client/password_resets/${o.id}/attempt_verification`,a={code:(l=n.code)!=null?l:""};break;case"needs_second_factor":r=`/v1/client/password_resets/${o.id}/attempt_second_factor`,a={code:(s=n.code)!=null?s:""};break;case"needs_new_password":r=`/v1/client/password_resets/${o.id}/set_new_password`,a={password:(d=n.password)!=null?d:""};break;default:return t}let i=await e.post(r,a);return!i.ok||!i.data?{...t,busy:!1,errors:i.errors}:{attempt:{id:i.data.id,status:i.data.status},errors:[],busy:!1,ticket:(c=i.data.ticket)!=null?c:null}}function U(e){var n;let t=(n=e.attempt)==null?void 0:n.status;if(!t)return"request";switch(t){case"needs_email_verification":return"collect_email_code";case"needs_second_factor":return"collect_second_factor";case"needs_new_password":return"collect_new_password";case"complete":return"done";default:return"unknown"}}var O=Nt(je());var on=["boxes","single"];function $e(e,t){for(let n of[t,e])if(n&&on.includes(n))return n;return"boxes"}var qe=8,an=["solid","outline","soft","ghost"],rn=["none","scale","lift","glow","ripple"],sn=["none","sm","md","lg"],ln=["comfortable","compact"],dn=["outline","filled","underline"],cn=["slow","normal","fast"],pn=["spinner","skeleton","dots","bar"],Ge={slow:280,normal:160,fast:80};function ie(e,t){let n=(o,r,...a)=>{for(let i of a)if(i!==void 0&&o.includes(i))return i;return r};return{buttonStyle:n(an,"solid",t==null?void 0:t.buttonStyle,e==null?void 0:e.buttonStyle),buttonEffect:n(rn,"scale",t==null?void 0:t.buttonEffect,e==null?void 0:e.buttonEffect),shadow:n(sn,"md",t==null?void 0:t.shadow,e==null?void 0:e.shadow),density:n(ln,"comfortable",t==null?void 0:t.density,e==null?void 0:e.density),inputStyle:n(dn,"outline",t==null?void 0:t.inputStyle,e==null?void 0:e.inputStyle),animations:typeof(t==null?void 0:t.animations)=="boolean"?t.animations:typeof(e==null?void 0:e.animations)=="boolean"?e.animations:!0,motionSpeed:n(cn,"normal",t==null?void 0:t.motionSpeed,e==null?void 0:e.motionSpeed),loading:n(pn,"spinner",t==null?void 0:t.loading,e==null?void 0:e.loading)}}var un=["block","compact","icon"],mn=["sm","md","lg"],fn=["list","grid","carousel"],bn=["auto","always","never"];function ve(e,t){var o,r,a;let n=(i,...l)=>{for(let s of l)if(s!==void 0&&i.includes(s))return s;return i[0]};return{variant:n(un,t==null?void 0:t.variant,e==null?void 0:e.variant),size:n(mn,(o=t==null?void 0:t.size)!=null?o:"md",e==null?void 0:e.size,"md"),layout:n(fn,t==null?void 0:t.layout,e==null?void 0:e.layout),labels:{...(r=e==null?void 0:e.labels)!=null?r:{},...(a=t==null?void 0:t.labels)!=null?a:{}},search:n(bn,t==null?void 0:t.search,e==null?void 0:e.search)}}var I={colorPrimary:"#5b5bd6",colorText:"#1c1c1f",colorBackground:"#ffffff",colorAccent:"#5b5bd6",colorCard:"#ffffff",colorBorder:"#e4e4e9",borderRadius:"10px",fontFamily:'ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'};function gn(e){return e?{colorPrimary:e.colorPrimary||I.colorPrimary,colorText:e.colorText||I.colorText,colorBackground:e.colorBackground||I.colorBackground,colorAccent:e.colorAccent||e.colorPrimary||I.colorAccent,colorCard:e.colorCard||e.colorBackground||I.colorCard,colorBorder:e.colorBorder||I.colorBorder,borderRadius:e.borderRadius||I.borderRadius,fontFamily:e.fontStack||I.fontFamily}:I}function Ye(e,t){var r;let n={...gn(e)},o=(r=t==null?void 0:t.variables)!=null?r:{};for(let[a,i]of Object.entries(o))i!==void 0&&(n[a]=i);return n}function Xe(e){let t={};for(let[n,o]of Object.entries(e))t[`--atlas-embed-${n.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`)}`]=o;return t}function Ze(e,t,n){var r;let o=(r=n==null?void 0:n.elements)==null?void 0:r[e];return o?`${t} ${o}`:t}function Je(e,t){var i,l;let n=(i=t==null?void 0:t.providerOrder)!=null?i:[],o=new Set((l=t==null?void 0:t.providerHidden)!=null?l:[]),r=new Set(e.filter(s=>!o.has(s))),a=[];for(let s of n)r.has(s)&&!a.includes(s)&&a.push(s);for(let s of e)r.has(s)&&!a.includes(s)&&a.push(s);return a}var Ve={google:"Google",github:"GitHub",gitlab:"GitLab",facebook:"Facebook",apple:"Apple",microsoft:"Microsoft",discord:"Discord",linkedin:"LinkedIn",twitter:"X",twitter_v1:"X",x:"X",slack:"Slack",spotify:"Spotify",twitch:"Twitch",notion:"Notion",linear:"Linear",steam:"Steam"};function se(e){return Ve[e]?Ve[e]:e.split(/[_-]/).map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function hn(e,t){return(n,o)=>{let r=typeof n=="string"?n:n.toString(),a;try{a=new URL(r)}catch{return t(n,o)}return a.searchParams.has("publishable_key")||a.searchParams.set("publishable_key",e),t(a.toString(),o)}}function Qe(e){var n;let t=(n=e.fetchImpl)!=null?n:fetch;return new Y({publishableKey:e.publishableKey,baseUrl:e.frontendApi.replace(/\/$/,""),fetchImpl:hn(e.publishableKey,t)})}async function et(e){let t=await e.get("/v1/appearance");return t.ok?t.data:null}var tt="atlas-embed-styles",yn=`
1
+ "use strict";(()=>{var lo=Object.create;var Ke=Object.defineProperty;var co=Object.getOwnPropertyDescriptor;var po=Object.getOwnPropertyNames;var uo=Object.getPrototypeOf,fo=Object.prototype.hasOwnProperty;var go=(e,t,n)=>t in e?Ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ve=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var mo=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of po(t))!fo.call(e,a)&&a!==n&&Ke(e,a,{get:()=>t[a],enumerable:!(o=co(t,a))||o.enumerable});return e};var bo=(e,t,n)=>(n=e!=null?lo(uo(e)):{},mo(t||!e||!e.__esModule?Ke(n,"default",{value:e,enumerable:!0}):n,e));var g=(e,t,n)=>go(e,typeof t!="symbol"?t+"":t,n);var Bt=Ve(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.ForbiddenError=void 0;Z.evaluate=Je;Z.hasFromClaims=Io;Z.protectFromClaims=Do;function Po(e){return e.permission!==void 0||e.role!==void 0||e.anyPermission!==void 0||e.allPermissions!==void 0}function Je(e,t={}){var o,a;if(!e)return{allowed:!1,reason:"signed_out"};if(t.plan!==void 0&&e.pla!==t.plan)return{allowed:!1,reason:"missing_entitlement"};if(t.feature!==void 0&&!((o=e.fea)!=null?o:[]).includes(t.feature))return{allowed:!1,reason:"missing_entitlement"};if(!Po(t))return{allowed:!0};if(!e.org_id)return{allowed:!1,reason:"no_organization"};let n=new Set((a=e.org_permissions)!=null?a:[]);return t.role!==void 0&&e.org_role!==t.role?{allowed:!1,reason:"missing_permission"}:t.permission!==void 0&&!n.has(t.permission)?{allowed:!1,reason:"missing_permission"}:t.anyPermission&&!t.anyPermission.some(r=>n.has(r))?{allowed:!1,reason:"missing_permission"}:t.allPermissions&&!t.allPermissions.every(r=>n.has(r))?{allowed:!1,reason:"missing_permission"}:{allowed:!0}}function Io(e,t={}){return Je(e,t).allowed}var Se=class extends Error{constructor(n,o){super(n==="signed_out"?"Not signed in.":n==="no_organization"?"No active organization for this authorization check.":n==="missing_entitlement"?"Missing the required plan or feature.":"Missing the required permission or role.");g(this,"reason");g(this,"condition");this.name="ForbiddenError",this.reason=n,this.condition=o}};Z.ForbiddenError=Se;function Do(e,t={}){let n=Je(e,t);if(!n.allowed)throw new Se(n.reason,t)}});var Wt=Ve(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.PERMISSION_KEY_PATTERN=B.ROLE_KEY_PATTERN=void 0;B.isRoleKey=Lo;B.isPermissionKey=Oo;B.ROLE_KEY_PATTERN=/^org:[a-z][a-z0-9_]{1,31}$/;B.PERMISSION_KEY_PATTERN=/^org:[a-z][a-z0-9_]{1,31}:[a-z][a-z0-9_]{1,31}$/;function Lo(e){return B.ROLE_KEY_PATTERN.test(e)}function Oo(e){return B.PERMISSION_KEY_PATTERN.test(e)}});var Ht=Ve(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.isPermissionKey=I.isRoleKey=I.PERMISSION_KEY_PATTERN=I.ROLE_KEY_PATTERN=I.ForbiddenError=I.protectFromClaims=I.hasFromClaims=I.evaluate=void 0;var we=Bt();Object.defineProperty(I,"evaluate",{enumerable:!0,get:function(){return we.evaluate}});Object.defineProperty(I,"hasFromClaims",{enumerable:!0,get:function(){return we.hasFromClaims}});Object.defineProperty(I,"protectFromClaims",{enumerable:!0,get:function(){return we.protectFromClaims}});Object.defineProperty(I,"ForbiddenError",{enumerable:!0,get:function(){return we.ForbiddenError}});var _e=Wt();Object.defineProperty(I,"ROLE_KEY_PATTERN",{enumerable:!0,get:function(){return _e.ROLE_KEY_PATTERN}});Object.defineProperty(I,"PERMISSION_KEY_PATTERN",{enumerable:!0,get:function(){return _e.PERMISSION_KEY_PATTERN}});Object.defineProperty(I,"isRoleKey",{enumerable:!0,get:function(){return _e.isRoleKey}});Object.defineProperty(I,"isPermissionKey",{enumerable:!0,get:function(){return _e.isPermissionKey}})});function j(e){var t,n;switch(e.status){case"needs_identifier":return{kind:"collect_identifier"};case"needs_first_factor":return{kind:"collect_first_factor",strategies:(t=e.supported_first_factors)!=null?t:[]};case"needs_second_factor":return{kind:"collect_second_factor"};case"needs_mfa_enrollment":return{kind:"enroll_second_factor"};case"needs_email_verification":return{kind:"collect_email_code"};case"needs_captcha":return{kind:"collect_captcha"};case"needs_oauth_callback":return{kind:"await_oauth"};case"needs_new_password":return{kind:"collect_new_password"};case"complete":return{kind:"done",sessionId:(n=e.created_session_id)!=null?n:null};case"abandoned":return{kind:"restart",reason:"abandoned"};default:return{kind:"unknown",status:e.status}}}function _t(e){if(!e||typeof e!="object")return[];let t=e.errors;return Array.isArray(t)?t.filter(n=>!!n&&typeof n.message=="string").map(n=>({code:n.code,message:n.message,param:n.param})):[]}var ho=["__atlas_attempt","__atlas_ticket","__atlas_status"];function Et(e){let t=new URLSearchParams(e),n=t.get("__atlas_attempt");if(!n)return null;let o=t.get("__atlas_ticket"),a=t.get("__atlas_status");return!o&&!a?null:{attemptId:n,...o?{ticket:o}:{},...a?{status:a}:{}}}function ge(e){let t=new URL(e);for(let n of ho)t.searchParams.delete(n);return t.toString()}var me=class{constructor(t){this.options=t}get frontendApiOrigin(){let t=this.options.baseUrl;if(!t)return"";try{return new URL(t).origin}catch{return""}}async request(t,n={}){var s,l;let o=(s=this.options.fetchImpl)!=null?s:fetch,a;try{a=await o(`${(l=this.options.baseUrl)!=null?l:""}${t}`,{...n,credentials:"include",headers:{"x-publishable-key":this.options.publishableKey,...n.body?{"content-type":"application/json"}:{},...n.headers}})}catch{return{ok:!1,status:0,data:null,errors:[{code:"NETWORK",message:"We could not reach the server."}]}}let r=null;try{r=await a.json()}catch{}return{ok:a.ok,status:a.status,data:a.ok?r:null,errors:a.ok?[]:_t(r)}}post(t,n){return this.request(t,{method:"POST",body:n===void 0?void 0:JSON.stringify(n)})}get(t){return this.request(t,{method:"GET"})}};var M={attempt:null,errors:[],busy:!1,pollSecret:null,ticket:null};function yo(e,t){var a,r,s,l,i,c,d,p,u,m,h;if(!e)return{path:"/v1/client/sign_ins",body:{identifier:(a=t.identifier)!=null?a:"",...t.captcha_token?{captcha_token:t.captcha_token}:{}}};let n=j(e),o=(r=e.id)!=null?r:"";switch(n.kind){case"collect_identifier":return{path:"/v1/client/sign_ins",body:{identifier:(s=t.identifier)!=null?s:"",...t.captcha_token?{captcha_token:t.captcha_token}:{}}};case"collect_first_factor":return t.code?{path:`/v1/client/sign_ins/${o}/attempt_first_factor`,body:{strategy:"email_code",code:t.code}}:{path:`/v1/client/sign_ins/${o}/attempt_first_factor`,body:{strategy:"password",password:(l=t.password)!=null?l:""}};case"collect_second_factor":return{path:`/v1/client/sign_ins/${o}/attempt_second_factor`,body:{code:(i=t.code)!=null?i:"",...t.remember_device==="true"?{remember_device:!0}:{}}};case"enroll_second_factor":return{path:`/v1/client/sign_ins/${o}/attempt_mfa_enrollment`,body:{factor_id:(c=t.factorId)!=null?c:"",codes:[(d=t.code)!=null?d:"",(p=t.secondCode)!=null?p:""]}};case"collect_email_code":return{path:`/v1/client/sign_ups/${o}/attempt_verification`,body:{code:(u=t.code)!=null?u:""}};case"collect_captcha":return t.captcha_token?{path:"/v1/client/sign_ins",body:{identifier:(m=t.identifier)!=null?m:"",captcha_token:t.captcha_token}}:null;case"collect_new_password":return{path:`/v1/client/password_resets/${o}/set_new_password`,body:{password:(h=t.password)!=null?h:""}};case"await_oauth":case"done":case"restart":case"unknown":return null}}function be(e){return e?{...M,attempt:{id:e.id,status:e.status}}:M}async function he(e,t,n){var r;let o=yo(t.attempt,n);if(!o)return t;let a=await e.post(o.path,o.body);return!a.ok||!a.data?{...t,busy:!1,errors:a.errors}:{attempt:a.data,errors:[],busy:!1,pollSecret:t.pollSecret,ticket:(r=a.data.ticket)!=null?r:null}}async function Ct(e,t){var a;let n=t.fields&&Object.keys(t.fields).length>0,o=await e.post("/v1/client/sign_ups",{email:t.email,password:t.password,...n?{fields:t.fields}:{},...t.consent?{consent:!0}:{},...t.captchaToken?{captcha_token:t.captchaToken}:{}});return!o.ok||!o.data?{...M,busy:!1,errors:o.errors}:{attempt:o.data,errors:[],busy:!1,pollSecret:M.pollSecret,ticket:(a=o.data.ticket)!=null?a:null}}function Rt(e){return{provider:e.provider,id_token:e.idToken,...e.nonce?{nonce:e.nonce}:{}}}function Pt(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.id!="string"||typeof t.status!="string"?null:{attemptId:t.id,status:t.status,...typeof t.ticket=="string"?{ticket:t.ticket}:{}}}var At="https://accounts.google.com/gsi/client",ye=null;function ko(){return typeof process!="undefined"&&!1}var Tt=new Set,vo=!1;function xo(e){return ye||(ye=new Promise((t,n)=>{if(e.querySelector(`script[src="${At}"]`)){t();return}let o=e.createElement("script");o.src=At,o.async=!0,o.defer=!0,o.addEventListener("load",()=>t()),o.addEventListener("error",()=>n(new Error("Failed to load Google Identity Services."))),e.head.appendChild(o)}),ye)}async function It(e){var O,b,_,D,A,L;let t=(O=e.host)!=null?O:window,n=t.document;await xo(n);let o=(_=(b=t.google)==null?void 0:b.accounts)==null?void 0:_.id;if(!o)throw new Error("Google Identity Services unavailable.");o.initialize({client_id:e.clientId,nonce:e.nonce,callback:E=>{var P;E.credential?(vo=!0,e.onCredential(E.credential)):(P=e.onError)==null||P.call(e,new Error("Google returned no credential."))}});let a=e.wrapper.style.position!=="";a||(e.wrapper.style.position="relative");let r=(D=e.visible)!=null?D:!1,s=n.createElement("div");r||s.setAttribute("aria-hidden","true");let l=.004;s.style.cssText=`position:absolute;inset:0;z-index:2;opacity:${r?1:l};overflow:hidden;`,e.wrapper.appendChild(s);let i={provider:"google",wrapper:e.wrapper,overlay:s};Tt.add(i);let c=E=>{let P=E==null?void 0:E.style;P&&(P.width!=="100%"&&(P.width="100%"),P.height!=="100%"&&(P.height="100%"))},d=()=>{c(s.firstElementChild),c(s.querySelector("iframe"))},p=()=>{var W;let E=Math.round(e.wrapper.getBoundingClientRect().width)||320,P=Math.max(200,Math.min(400,E));s.replaceChildren(),o.renderButton(s,{type:"standard",theme:"outline",size:(W=e.size)!=null?W:"large",text:"continue_with",width:P}),d(),m()},u=E=>({width:E.width,height:E.height,top:E.top,left:E.left,right:E.right,bottom:E.bottom}),m=()=>{if(ko()&&typeof window!="undefined")try{let E=e.wrapper.getBoundingClientRect(),P=s.getBoundingClientRect(),W=P.left<=E.left+1&&P.top<=E.top+1&&P.right>=E.right-1&&P.bottom>=E.bottom-1,q=s.querySelector("iframe"),te=q==null?void 0:q.getBoundingClientRect(),wt=!!te&&te.width>=8&&te.height>=8;(!W||!wt)&&console.warn("[atlas] Google overlay misaligned/undersized \u2014 clicks may miss the invisible GSI button",{covers:W,iframeOk:wt,wrapper:u(E),overlay:u(P),iframe:te?{width:te.width,height:te.height}:null})}catch{}};p();let h,y=(A=t.ResizeObserver)!=null?A:typeof ResizeObserver!="undefined"?ResizeObserver:void 0;y&&(h=new y(()=>p()),h.observe(e.wrapper));let k,C=(L=t.MutationObserver)!=null?L:typeof MutationObserver!="undefined"?MutationObserver:void 0;return C&&(k=new C(()=>d()),k.observe(s,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","width","height"]})),e.oneTap&&o.prompt(),{destroy:()=>{h==null||h.disconnect(),k==null||k.disconnect(),Tt.delete(i),s.remove(),a||(e.wrapper.style.position="")}}}var So=()=>{let e=globalThis.navigator;if(!e||!e.credentials)throw new Error("WebAuthn is not available in this environment.");return e};function ke(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),n="";for(let o=0;o<t.length;o+=1)n+=String.fromCharCode(t[o]);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Dt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.length%4===0?"":"=".repeat(4-t.length%4),o=atob(t+n),a=new Uint8Array(o.length);for(let r=0;r<o.length;r+=1)a[r]=o.charCodeAt(r);return a.buffer}function ne(e){return typeof(e!=null?e:globalThis.PublicKeyCredential)!="undefined"}async function Lt(){var t;let e=globalThis.PublicKeyCredential;try{return await((t=e==null?void 0:e.isConditionalMediationAvailable)==null?void 0:t.call(e))===!0}catch{return!1}}async function Ge(e,t={}){var l,i;let n=(l=t.host)!=null?l:So(),o=(i=e.allowCredentials)!=null?i:[],a={challenge:Dt(e.challenge),rpId:e.rpId,allowCredentials:o.map(c=>({type:c.type,id:Dt(c.id)})),userVerification:e.userVerification,timeout:e.timeout},r=await n.credentials.get({publicKey:a,...t.mediation?{mediation:t.mediation}:{},...t.signal?{signal:t.signal}:{}});if(!r)throw new Error("Passkey sign-in was cancelled.");let s=r.response;return{handle:e.handle,challenge:e.challenge,credential_id:ke(r.rawId),authenticator_data:ke(s.authenticatorData),client_data_json:ke(s.clientDataJSON),signature:ke(s.signature)}}var Ot=typeof window!="undefined",ie=()=>typeof navigator!="undefined"?navigator:void 0;function x(e,t){try{return e()}catch{return t}}function wo(){return x(()=>{if(!Ot||typeof document=="undefined")return{vendor:null,renderer:null};let e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(!t)return{vendor:null,renderer:null};let n=t.getExtension("WEBGL_debug_renderer_info"),o=n?t.getParameter(n.UNMASKED_VENDOR_WEBGL):null,a=n?t.getParameter(n.UNMASKED_RENDERER_WEBGL):null;return{vendor:o!=null?o:null,renderer:a!=null?a:null}},{vendor:null,renderer:null})}function _o(){return x(()=>{if(typeof document=="undefined")return null;let e=document.createElement("canvas");e.width=220,e.height=40;let t=e.getContext("2d");return t?(t.textBaseline="top",t.font="14px 'Arial'",t.fillStyle="#f60",t.fillRect(0,0,60,20),t.fillStyle="#069",t.fillText("Atlas anti-bot \u2708 1.0",2,15),qe(e.toDataURL())):null},null)}function Eo(){var l;let e=ie(),t=Ot?window:{},n=(l=e==null?void 0:e.userAgent)!=null?l:"",o=x(()=>(e==null?void 0:e.webdriver)===!0,!1),a=x(()=>"chrome"in t&&!!t.chrome,!1),r=/headless/i.test(n)||/chrome/i.test(n)&&!a&&x(()=>{var i,c;return((c=(i=e==null?void 0:e.plugins)==null?void 0:i.length)!=null?c:0)===0},!1),s=x(()=>o||"_phantom"in t||"callPhantom"in t||"__nightmare"in t||"domAutomation"in t||"domAutomationController"in t||typeof document!="undefined"&&Object.keys(document).some(i=>i.startsWith("cdc_")||i.startsWith("$cdc_"))||/electron|phantomjs|slimerjs/i.test(n),o);return{webdriver:o,headless:r,hasChrome:a,automationHint:s}}function Co(){let e=ie(),t=wo(),n=Eo(),o=x(()=>{var r;return Array.from((r=e==null?void 0:e.languages)!=null?r:[])},[]),a=t.renderer;return{screenWidth:x(()=>{var r,s;return(s=(r=window.screen)==null?void 0:r.width)!=null?s:null},null),screenHeight:x(()=>{var r,s;return(s=(r=window.screen)==null?void 0:r.height)!=null?s:null},null),colorDepth:x(()=>{var r,s;return(s=(r=window.screen)==null?void 0:r.colorDepth)!=null?s:null},null),pixelRatio:x(()=>{var r;return(r=window.devicePixelRatio)!=null?r:null},null),timezone:x(()=>{var r;return(r=Intl.DateTimeFormat().resolvedOptions().timeZone)!=null?r:null},null),timezoneOffset:x(()=>new Date().getTimezoneOffset(),null),language:x(()=>{var r;return(r=e==null?void 0:e.language)!=null?r:null},null),languages:o,platform:x(()=>{var r;return(r=e==null?void 0:e.platform)!=null?r:null},null),hardwareConcurrency:x(()=>{var r;return(r=e==null?void 0:e.hardwareConcurrency)!=null?r:null},null),deviceMemory:x(()=>{var r;return(r=e==null?void 0:e.deviceMemory)!=null?r:null},null),maxTouchPoints:x(()=>{var r;return(r=e==null?void 0:e.maxTouchPoints)!=null?r:null},null),touchSupport:x(()=>{var r;return((r=e==null?void 0:e.maxTouchPoints)!=null?r:0)>0||"ontouchstart"in window},!1),cookieEnabled:x(()=>{var r;return(r=e==null?void 0:e.cookieEnabled)!=null?r:null},null),doNotTrack:x(()=>(e==null?void 0:e.doNotTrack)==="1"||(e==null?void 0:e.doNotTrack)==="yes",null),webglVendor:t.vendor,webglRenderer:a,pluginCount:x(()=>{var r,s;return(s=(r=e==null?void 0:e.plugins)==null?void 0:r.length)!=null?s:null},null),pointerType:x(()=>{var r,s;return(s=(r=window.matchMedia)==null?void 0:r.call(window,"(pointer: fine)"))!=null&&s.matches?"fine":"coarse"},null),webdriver:n.webdriver,headless:n.headless,hasChrome:n.hasChrome,webglSoftware:a?/swiftshader|llvmpipe|software|basic render/i.test(a):!1,automationHint:n.automationHint}}function Ao(){var e;return(e=x(()=>{var a,r;let t=ie(),n=typeof window!="undefined"?window:void 0,o=(r=(a=t==null?void 0:t.doNotTrack)!=null?a:t==null?void 0:t.msDoNotTrack)!=null?r:n==null?void 0:n.doNotTrack;return o==="1"||o==="yes"},!1))!=null?e:!1}function To(){return x(()=>{let e=()=>{var o,a;return"d_"+qe(String(Math.random())+String(Date.now())+((a=(o=ie())==null?void 0:o.userAgent)!=null?a:""))};if(Ao())return e();if(typeof localStorage=="undefined")return null;let t="__atlas_did",n=localStorage.getItem(t);return n||(n=e(),localStorage.setItem(t,n)),n},null)}function Ro(e){let t=[e.timezone,e.platform,e.languages.join(","),e.webglVendor,e.webglRenderer,e.screenWidth,e.screenHeight,e.colorDepth,e.hardwareConcurrency,_o()];return qe(t.map(n=>n==null?"":String(n)).join("|"))}function qe(e){let t=5381;for(let n=0;n<e.length;n+=1)t=(t<<5)+t+e.charCodeAt(n)>>>0;return t.toString(16).padStart(8,"0")}var ve=e=>e.length?e.reduce((t,n)=>t+n,0)/e.length:null,Ye=e=>{let t=ve(e);return t===null?null:e.reduce((n,o)=>n+(o-t)**2,0)/e.length},xe=class{constructor(t){g(this,"start",Date.now());g(this,"firstInteraction",null);g(this,"moves",0);g(this,"distance",0);g(this,"maxSpeed",0);g(this,"speeds",[]);g(this,"lastX",null);g(this,"lastY",null);g(this,"lastMoveT",0);g(this,"netDx",0);g(this,"netDy",0);g(this,"keyCount",0);g(this,"downAt",new Map);g(this,"dwell",[]);g(this,"flight",[]);g(this,"lastUpAt",null);g(this,"pastes",0);g(this,"backspaces",0);g(this,"focusChanges",0);g(this,"scrolls",0);g(this,"target");g(this,"bound",[]);this.target=t!=null?t:typeof document!="undefined"?document:void 0,this.attach()}mark(){this.firstInteraction===null&&(this.firstInteraction=Date.now()-this.start)}attach(){let t=this.target;if(!t)return;let n=(o,a)=>{x(()=>t.addEventListener(o,a,{passive:!0}),void 0),this.bound.push([o,a])};n("pointermove",o=>this.onMove(o)),n("mousemove",o=>this.onMove(o)),n("keydown",o=>this.onKeyDown(o)),n("keyup",o=>this.onKeyUp(o)),n("paste",()=>{this.mark(),this.pastes+=1}),n("focusin",()=>{this.mark(),this.focusChanges+=1}),n("scroll",()=>{this.mark(),this.scrolls+=1})}onMove(t){var r,s;this.mark();let n=(r=t.clientX)!=null?r:0,o=(s=t.clientY)!=null?s:0,a=Date.now();if(this.lastX!==null&&this.lastY!==null){let l=n-this.lastX,i=o-this.lastY,c=Math.hypot(l,i);this.distance+=c,this.netDx+=l,this.netDy+=i;let d=a-this.lastMoveT;if(d>0){let p=c/d;this.speeds.push(p),p>this.maxSpeed&&(this.maxSpeed=p)}}this.moves+=1,this.lastX=n,this.lastY=o,this.lastMoveT=a}onKeyDown(t){this.mark(),this.keyCount+=1,t.key==="Backspace"&&(this.backspaces+=1),this.downAt.set(t.code||t.key||String(this.keyCount),Date.now()),this.lastUpAt!==null&&this.flight.push(Date.now()-this.lastUpAt)}onKeyUp(t){let n=t.code||t.key||"",o=this.downAt.get(n),a=Date.now();o!==void 0&&(this.dwell.push(a-o),this.downAt.delete(n)),this.lastUpAt=a}snapshot(){let t=Math.hypot(this.netDx,this.netDy);return{mouseMoves:this.moves,mouseDistance:Math.round(this.distance),mouseAvgSpeed:ve(this.speeds),mouseMaxSpeed:Math.round(this.maxSpeed*1e3)/1e3,mouseSpeedVariance:Ye(this.speeds),mouseStraightLineRatio:this.distance>0?Math.min(1,t/this.distance):null,keyCount:this.keyCount,keyAvgDwellMs:ve(this.dwell),keyAvgFlightMs:ve(this.flight),keyDwellVariance:Ye(this.dwell),keyFlightVariance:Ye(this.flight),pasteCount:this.pastes,backspaceCount:this.backspaces,timeToFirstInteractionMs:this.firstInteraction,timeToSubmitMs:Date.now()-this.start,focusChanges:this.focusChanges,scrollCount:this.scrolls,hadPointerMove:this.moves>0,hadKeydown:this.keyCount>0,interactionCount:this.moves+this.keyCount+this.scrolls+this.focusChanges}}stop(){let t=this.target;if(t){for(let[n,o]of this.bound)x(()=>t.removeEventListener(n,o),void 0);this.bound=[]}}};async function Mt(e){return x(async()=>{var i,c,d;let t=Co(),n={attempt_id:e.attemptId,kind:(i=e.kind)!=null?i:"telemetry",device_id:To(),device_fingerprint:Ro(t),device:t,behavior:(c=e.recorder)==null?void 0:c.snapshot()},o=`${e.api}/v1/client/telemetry?publishable_key=${encodeURIComponent(e.publishableKey)}`,a=JSON.stringify(n),r=ie();if(!e.fetchImpl&&r&&typeof r.sendBeacon=="function"&&typeof Blob!="undefined"&&r.sendBeacon(o,new Blob([a],{type:"application/json"})))return!0;let s=(d=e.fetchImpl)!=null?d:typeof fetch!="undefined"?fetch:void 0;return s?(await s(o,{method:"POST",headers:{"content-type":"application/json","x-publishable-key":e.publishableKey},body:a,keepalive:!0,credentials:"include"})).ok:!1},Promise.resolve(!1))}var Ze={attempt:null,errors:[],busy:!1,ticket:null};async function Ft(e,t,n){let o=await e.post("/v1/client/password_resets",{email_address:t,captcha_token:n});return!o.ok||!o.data?{...Ze,errors:o.errors}:{attempt:o.data,errors:[],busy:!1,ticket:null}}async function Nt(e,t,n){var l,i,c,d;let o=t.attempt;if(!o)return t;let a=null,r={};switch(o.status){case"needs_email_verification":a=`/v1/client/password_resets/${o.id}/attempt_verification`,r={code:(l=n.code)!=null?l:""};break;case"needs_second_factor":a=`/v1/client/password_resets/${o.id}/attempt_second_factor`,r={code:(i=n.code)!=null?i:""};break;case"needs_new_password":a=`/v1/client/password_resets/${o.id}/set_new_password`,r={password:(c=n.password)!=null?c:""};break;default:return t}let s=await e.post(a,r);return!s.ok||!s.data?{...t,busy:!1,errors:s.errors}:{attempt:{id:s.data.id,status:s.data.status},errors:[],busy:!1,ticket:(d=s.data.ticket)!=null?d:null}}function oe(e){var n;let t=(n=e.attempt)==null?void 0:n.status;if(!t)return"request";switch(t){case"needs_email_verification":return"collect_email_code";case"needs_second_factor":return"collect_second_factor";case"needs_new_password":return"collect_new_password";case"complete":return"done";default:return"unknown"}}var K=bo(Ht());var Mo=["boxes","single"];function Ut(e,t){for(let n of[t,e])if(n&&Mo.includes(n))return n;return"boxes"}var $t=8,Fo=["solid","outline","soft","ghost"],No=["none","scale","lift","glow","ripple"],Bo=["none","sm","md","lg"],Wo=["comfortable","compact"],Ho=["outline","filled","underline"],zo=["slow","normal","fast"],Uo=["spinner","skeleton","dots","bar"],jt={slow:280,normal:160,fast:80};function Ee(e,t){let n=(o,a,...r)=>{for(let s of r)if(s!==void 0&&o.includes(s))return s;return a};return{buttonStyle:n(Fo,"solid",t==null?void 0:t.buttonStyle,e==null?void 0:e.buttonStyle),buttonEffect:n(No,"scale",t==null?void 0:t.buttonEffect,e==null?void 0:e.buttonEffect),shadow:n(Bo,"md",t==null?void 0:t.shadow,e==null?void 0:e.shadow),density:n(Wo,"comfortable",t==null?void 0:t.density,e==null?void 0:e.density),inputStyle:n(Ho,"outline",t==null?void 0:t.inputStyle,e==null?void 0:e.inputStyle),animations:typeof(t==null?void 0:t.animations)=="boolean"?t.animations:typeof(e==null?void 0:e.animations)=="boolean"?e.animations:!0,motionSpeed:n(zo,"normal",t==null?void 0:t.motionSpeed,e==null?void 0:e.motionSpeed),loading:n(Uo,"spinner",t==null?void 0:t.loading,e==null?void 0:e.loading)}}var $o=["block","compact","icon"],jo=["sm","md","lg"],Ko=["list","grid","carousel"],Vo=["auto","always","never"];function Xe(e,t){var o,a,r;let n=(s,...l)=>{for(let i of l)if(i!==void 0&&s.includes(i))return i;return s[0]};return{variant:n($o,t==null?void 0:t.variant,e==null?void 0:e.variant),size:n(jo,(o=t==null?void 0:t.size)!=null?o:"md",e==null?void 0:e.size,"md"),layout:n(Ko,t==null?void 0:t.layout,e==null?void 0:e.layout),labels:{...(a=e==null?void 0:e.labels)!=null?a:{},...(r=t==null?void 0:t.labels)!=null?r:{}},search:n(Vo,t==null?void 0:t.search,e==null?void 0:e.search)}}var H={colorPrimary:"#5b5bd6",colorText:"#1c1c1f",colorBackground:"#ffffff",colorAccent:"#5b5bd6",colorCard:"#ffffff",colorBorder:"#e4e4e9",borderRadius:"10px",fontFamily:'ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'};function Go(e){return e?{colorPrimary:e.colorPrimary||H.colorPrimary,colorText:e.colorText||H.colorText,colorBackground:e.colorBackground||H.colorBackground,colorAccent:e.colorAccent||e.colorPrimary||H.colorAccent,colorCard:e.colorCard||e.colorBackground||H.colorCard,colorBorder:e.colorBorder||H.colorBorder,borderRadius:e.borderRadius||H.borderRadius,fontFamily:e.fontStack||H.fontFamily}:H}function Kt(e,t){var a;let n={...Go(e)},o=(a=t==null?void 0:t.variables)!=null?a:{};for(let[r,s]of Object.entries(o))s!==void 0&&(n[r]=s);return n}function Vt(e){let t={};for(let[n,o]of Object.entries(e))t[`--atlas-embed-${n.replace(/[A-Z]/g,a=>`-${a.toLowerCase()}`)}`]=o;return t}function Gt(e,t,n){var a;let o=(a=n==null?void 0:n.elements)==null?void 0:a[e];return o?`${t} ${o}`:t}function Yt(e,t){var s,l;let n=(s=t==null?void 0:t.providerOrder)!=null?s:[],o=new Set((l=t==null?void 0:t.providerHidden)!=null?l:[]),a=new Set(e.filter(i=>!o.has(i))),r=[];for(let i of n)a.has(i)&&!r.includes(i)&&r.push(i);for(let i of e)a.has(i)&&!r.includes(i)&&r.push(i);return r}var zt={google:"Google",github:"GitHub",gitlab:"GitLab",facebook:"Facebook",apple:"Apple",microsoft:"Microsoft",discord:"Discord",linkedin:"LinkedIn",twitter:"X",twitter_v1:"X",x:"X",slack:"Slack",spotify:"Spotify",twitch:"Twitch",notion:"Notion",linear:"Linear",steam:"Steam"};function Ce(e){return zt[e]?zt[e]:e.split(/[_-]/).map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function Yo(e,t){return(n,o)=>{let a=typeof n=="string"?n:n.toString(),r;try{r=new URL(a)}catch{return t(n,o)}return r.searchParams.has("publishable_key")||r.searchParams.set("publishable_key",e),t(r.toString(),o)}}function qt(e){var n;let t=(n=e.fetchImpl)!=null?n:fetch;return new me({publishableKey:e.publishableKey,baseUrl:e.frontendApi.replace(/\/$/,""),fetchImpl:Yo(e.publishableKey,t)})}async function Zt(e){let t=await e.get("/v1/appearance");return t.ok?t.data:null}var Jt="atlas-embed-styles",qo=`
2
2
  .atlas-embed-root {
3
3
  --_bg: var(--atlas-embed-color-background, #ffffff);
4
4
  --_card: var(--atlas-embed-color-card, #ffffff);
@@ -358,4 +358,4 @@ form > .atlas-embed-step-back { display: block; width: 100%; text-align: center;
358
358
  .atlas-embed-loadbar::before { position: static; width: 100%; }
359
359
  }
360
360
  @keyframes atlas-embed-pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
361
- `;function nt(e=document){var n;if(e.querySelector(`style[data-${tt}]`))return;let t=e.createElement("style");t.setAttribute(`data-${tt}`,""),t.textContent=yn,((n=e.head)!=null?n:e.documentElement).appendChild(t)}var ot=new Set(["bluesky"]),at='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg>',rt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 18l6-6-6-6"/></svg>',z={"sign-in":{title:"Sign in",submit:"Continue"},"sign-up":{title:"Create your account",submit:"Continue"}};function w(e){var t;return(t=e.root.ownerDocument)!=null?t:document}function u(e,t,n,o){let r=w(e).createElement(t);return n&&(r.className=n),o!=null&&(r.textContent=o),(r.classList.contains("atlas-embed-button")||r.classList.contains("atlas-embed-social-button"))&&xn(e,r),r}function x(e,t,n){return Ze(t,n,e.options.appearance)}function xn(e,t){e.interaction.buttonEffect!=="ripple"||!e.interaction.animations||t.addEventListener("pointerdown",n=>{let o=t.getBoundingClientRect(),r=Math.max(o.width,o.height),a=w(e).createElement("span");a.className="atlas-embed-ripple",a.style.width=a.style.height=`${r}px`,a.style.left=`${n.clientX-o.left-r/2}px`,a.style.top=`${n.clientY-o.top-r/2}px`,a.addEventListener("animationend",()=>a.remove()),t.appendChild(a)})}function K(e,t){let n=u(e,"button",x(e,"buttonPrimary","atlas-embed-button"));if(n.type="submit",n.disabled=e.busy,e.busy){n.setAttribute("data-busy",""),n.setAttribute("aria-label",t);let o=u(e,"span","atlas-embed-btn-spinner");o.setAttribute("aria-hidden","true"),n.appendChild(o)}else n.textContent=t;return n}function it(e,t=typeof window!="undefined"?window.location.origin:""){if(!e||typeof e!="string")return null;if(e.startsWith("/")&&!e.startsWith("//"))try{return t?new URL(e,t).toString():e}catch{return null}let n;try{n=new URL(e)}catch{return null}return t&&n.origin===t||n.protocol==="https:"?n.toString():null}var vn=new Set(["turnstile","hcaptcha","recaptcha","recaptcha_v3","recaptcha_enterprise"]);function ke(e){return!!e&&vn.has(e)}function st(e){return!!e&&e.enabled===!0&&ke(e.provider)}var kn={turnstile:{src:()=>"https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",global:"turnstile"},hcaptcha:{src:()=>"https://js.hcaptcha.com/1/api.js?render=explicit",global:"hcaptcha"},recaptcha:{src:()=>"https://www.google.com/recaptcha/api.js?render=explicit",global:"grecaptcha"},recaptcha_v3:{src:e=>`https://www.google.com/recaptcha/api.js?render=${encodeURIComponent(e)}`,global:"grecaptcha"},recaptcha_enterprise:{src:e=>`https://www.google.com/recaptcha/enterprise.js?render=${encodeURIComponent(e)}`,global:"grecaptcha"}};function _n(e,t,n){let o=kn[e];if(!o)return Promise.reject(new Error(`captcha: ${e} is not renderable`));if(n[o.global])return Promise.resolve(n[o.global]);let r=n.document,a=`__atlasCaptchaLoad_${e}`,i=n[a];if(i)return i;let l=new Promise((s,d)=>{var b,h;let c=()=>{n[o.global]?s(n[o.global]):d(new Error(`captcha: ${e} script loaded but global missing`))},p=o.src(t),m=r.querySelector(`script[src="${p}"]`);if(m){if(n[o.global])return s(n[o.global]);m.addEventListener("load",c,{once:!0}),m.addEventListener("error",()=>d(new Error(`captcha: ${e} script failed`)),{once:!0});return}m=r.createElement("script"),m.src=p,m.async=!0,m.defer=!0,m.addEventListener("load",c,{once:!0}),m.addEventListener("error",()=>d(new Error(`captcha: ${e} script failed`)),{once:!0}),((h=(b=r.head)!=null?b:r.body)!=null?h:r.documentElement).appendChild(m)});return n[a]=l,l}function wn(e,t,n,o){return new Promise((r,a)=>{let i=e.render(t,{sitekey:n,appearance:o==="invisible"?"interaction-only":"always",callback:l=>r(l),"error-callback":()=>a(new Error("captcha: turnstile error")),"timeout-callback":()=>a(new Error("captcha: turnstile timeout"))});o==="invisible"&&e.execute&&e.execute(i)})}function En(e,t,n,o){return new Promise((r,a)=>{let i=e.render(t,{sitekey:n,size:o==="invisible"?"invisible":"normal",callback:l=>r(l),"error-callback":()=>a(new Error("captcha: hcaptcha error"))});if(o==="invisible"){let l=e.execute(i,{async:!0});l&&typeof l.then=="function"&&l.then(s=>r(s.response),a)}})}function Sn(e,t,n,o){return new Promise((r,a)=>{let i=e.render(t,{sitekey:n,size:o==="invisible"?"invisible":"normal",callback:l=>r(l),"error-callback":()=>a(new Error("captcha: recaptcha error"))});if(o==="invisible"&&e.execute){let l=e.execute(void 0,{widgetId:i});l&&typeof l.then=="function"&&l.then(r,a)}})}function Cn(e,t){let n=()=>{let o=e.execute(t,{action:"submit"});return o&&typeof o.then=="function"?o:Promise.reject(new Error("captcha: recaptcha v3 execute returned no promise"))};return new Promise((o,r)=>{e.ready?e.ready(()=>n().then(o,r)):n().then(o,r)})}async function lt(e,t){var l,s,d,c,p;let n=(l=e.provider)!=null?l:"",o=(s=e.siteKey)!=null?s:"",r=(d=e.widget)!=null?d:"managed",a=(p=(c=t.ownerDocument)==null?void 0:c.defaultView)!=null?p:globalThis,i=await _n(n,o,a);switch(n){case"turnstile":return wn(i,t,o,r);case"hcaptcha":return En(i,t,o,r);case"recaptcha":return Sn(i,t,o,r);case"recaptcha_v3":case"recaptcha_enterprise":return Cn(i,o);default:throw new Error(`captcha: ${n} is not renderable`)}}async function _e(e,t,n=!1){var l,s,d;let o=e.captchaFlows[t];if(!(n?!!o&&ke(o.provider):st(o))||!o)return null;let a=(l=e.root.ownerDocument)!=null?l:document,i=a.createElement("div");i.className="atlas-embed-captcha",((d=(s=e.root.parentElement)!=null?s:a.body)!=null?d:a.documentElement).appendChild(i);try{return await lt(o,i)}catch{return null}finally{i.remove()}}async function ct(e){var o,r;let t=(r=(o=e.root.ownerDocument)==null?void 0:o.defaultView)!=null?r:typeof window!="undefined"?window:null;if(!t)return!1;let n=Pe(t.location.search);return n?n.ticket?(await j(e,n.attemptId,n.ticket),dt(e,t),await B(e,n.attemptId),!0):(n.status&&(e.state=X({id:n.attemptId,status:n.status}),dt(e,t)),!1):!1}function dt(e,t){try{t.history.replaceState({},t.document.title,G(t.location.href))}catch{}}async function j(e,t,n){e.options.preview||await e.client.post("/v1/client/tickets/exchange",{attempt_id:t,ticket:n,remember:e.remember})}async function B(e,t){var r,a;let n=(a=(r=e.root.ownerDocument)==null?void 0:r.defaultView)!=null?a:typeof window!="undefined"?window:null,o=it(e.options.redirect,n?n.location.origin:void 0);if(e.root.dispatchEvent(new CustomEvent("atlas:complete",{bubbles:!0,detail:{attemptId:t,redirected:!!o}})),e.options.preview){$(e,"Sign-in works \u2014 this is a preview, so no session was created.");return}if(o&&n){n.location.assign(o);return}$(e,"You are signed in.")}function q(e,t){ze({api:e.options.frontendApi,publishableKey:e.options.publishableKey,attemptId:t!=null?t:void 0,kind:e.mode==="sign-up"?"sign_up":"sign_in",recorder:e.recorder,fetchImpl:e.options.fetchImpl})}async function pt(e,t){var a,i,l,s,d;if(e.busy)return;if((a=e.conditionalAbort)==null||a.abort(),e.flash=null,typeof t.identifier=="string"&&t.identifier.trim()&&(e.enteredIdentifier=t.identifier.trim()),e.busy=!0,q(e,(i=e.state.attempt)==null?void 0:i.id),_(e),e.state=await Z(e.client,e.state,t),e.state.attempt&&H(e.state.attempt).kind==="collect_captcha"){let c=await _e(e,"signIn",!0);c&&(e.state=await Z(e.client,e.state,{identifier:(s=(l=e.enteredIdentifier)!=null?l:t.identifier)!=null?s:"",captcha_token:c}))}let n=e.state.attempt?H(e.state.attempt):null;(n==null?void 0:n.kind)==="collect_first_factor"&&t.password&&e.state.errors.length===0&&(e.state=await Z(e.client,e.state,{password:t.password})),e.busy=!1;let o=e.state.attempt?H(e.state.attempt):null;e.mode==="sign-in"&&e.passwordEnabled&&(o==null?void 0:o.kind)==="collect_first_factor"&&(e.state={...M,errors:e.state.errors});let r=e.state.attempt;if((r==null?void 0:r.status)==="complete"){let c=(d=r.id)!=null?d:null;e.state.ticket&&c&&await j(e,c,e.state.ticket),await B(e,c);return}_(e)}async function le(e,t,n){var l,s,d;q(e);let o=(s=(l=e.root.ownerDocument)==null?void 0:l.defaultView)!=null?s:typeof window!="undefined"?window:null,r=o?G(o.location.href):e.options.frontendApi,a=await e.client.post("/v1/client/sign_ins/oauth",{provider:t,redirect_url:r,...n?{identifier:n}:{}}),i=(d=a.data)==null?void 0:d.authorization_url;i&&o?o.location.assign(i):(e.handlePrompt=null,F(e,a.errors))}async function we(e,t,n={}){var l,s,d;q(e);let o=(s=(l=e.root.ownerDocument)==null?void 0:l.defaultView)!=null?s:typeof window!="undefined"?window:null,r=o?G(o.location.href):e.options.frontendApi;if(n.popup&&o){await Tn(e,t,o,r);return}let a=await e.client.post("/v1/client/sign_ins/sso",{connection_id:t,redirect_url:r}),i=(d=a.data)==null?void 0:d.authorization_url;i&&o?o.location.assign(i):F(e,a.errors)}function An(e){let t=e.options.frontendApi;try{return new URL(/^https?:\/\//.test(t)?t:`https://${t}`).origin}catch{return t}}async function Tn(e,t,n,o){var p;let r=n.open("about:blank","atlas-sso","width=480,height=640,menubar=no,toolbar=no,location=no,status=no");if(!r){await we(e,t);return}let a=o.includes("?")?"&":"?",i=`${o}${a}__atlas_display=popup`,l=An(e),s=m=>{if(m.origin!==l)return;let b=m.data;if(!(!b||b.type!=="atlas-sso")){n.removeEventListener("message",s);try{r.close()}catch{}if(b.error){F(e,[{code:"sso_popup_cancelled",message:"Sign-in was cancelled."}]);return}if(b.status==="complete"&&b.ticket&&b.attempt_id){let h=b.attempt_id,y=b.ticket;(async()=>(await j(e,h,y),await B(e,h)))();return}b.attempt_id&&b.status&&(e.state=X({id:b.attempt_id,status:b.status}),_(e))}};n.addEventListener("message",s);let d=await e.client.post("/v1/client/sign_ins/sso",{connection_id:t,redirect_url:i}),c=(p=d.data)==null?void 0:p.authorization_url;if(c)try{r.location.assign(c)}catch{try{r.close()}catch{}n.removeEventListener("message",s),n.location.assign(c)}else{n.removeEventListener("message",s);try{r.close()}catch{}F(e,d.errors)}}async function ut(e,t,n){let o=await e.client.post("/v1/client/sign_ins/id_token",Ie({provider:t,idToken:n})),r=Fe(o.data);if(!r){F(e,o.errors);return}if(r.status==="complete"&&r.ticket){await j(e,r.attemptId,r.ticket),await B(e,r.attemptId);return}e.state=X({id:r.attemptId,status:r.status}),_(e)}function mt(e){e.resetFlow={...ye},_(e)}async function ft(e,t){var o,r;if(e.busy||!e.resetFlow)return;if(e.busy=!0,q(e),_(e),U(e.resetFlow)==="request"){typeof t.email=="string"&&t.email.trim()&&(e.enteredIdentifier=t.email.trim());let a=await _e(e,"passwordReset");e.resetFlow=await We(e.client,(o=t.email)!=null?o:"",a!=null?a:void 0)}else e.resetFlow=await Ne(e.client,e.resetFlow,{code:t.code,password:t.password});e.busy=!1;let n=e.resetFlow;if(((r=n==null?void 0:n.attempt)==null?void 0:r.status)==="complete"){let a=n.attempt.id;e.resetFlow=null,n.ticket?(await j(e,a,n.ticket),await B(e,a)):(e.flash="Password updated. Sign in with your new password.",e.state=M,_(e));return}_(e)}async function bt(e,t,n=!0){var d;if(e.busy)return;e.busy=!0,q(e),_(e);let{identifier:o,password:r,...a}=t,i={};for(let[c,p]of Object.entries(a))p&&(i[c]=p);let l=await _e(e,"signUp");e.state=await Me(e.client,{email:o!=null?o:"",password:r!=null?r:"",fields:i,consent:n,captchaToken:l!=null?l:void 0}),e.busy=!1;let s=e.state.attempt;if((s==null?void 0:s.status)==="complete"){let c=(d=s.id)!=null?d:null;e.state.ticket&&c&&await j(e,c,e.state.ticket),await B(e,c);return}_(e)}function gt(e){var m;let t=e.resetFlow,n=U(t),o=u(e,"div","atlas-embed-reset");o.appendChild(u(e,"h1",x(e,"title","atlas-embed-title"),"Reset your password"));let r=w(e).createElement("form"),a=t.errors,i=new Map,l=a.find(b=>!b.param);l&&r.appendChild(u(e,"div","atlas-embed-form-error",l.message));let s=null,d="Continue",c=!0;switch(n){case"request":s="Enter your email and we\u2019ll send you a reset code.",d="Send reset code",de(e,r,i,a,"email","Email address","email","username");{let b=i.get("email");b&&(e.enteredIdentifier&&(b.value=e.enteredIdentifier),b.setAttribute("data-atlas-autofocus",""))}break;case"collect_email_code":s=e.enteredIdentifier?`Enter the code we sent to ${e.enteredIdentifier}`:"Enter the code we sent to your email",Ee(e,r,i,a,"code","Reset code",!0);break;case"collect_second_factor":s="Enter the code from your authenticator app",Ee(e,r,i,a,"code","Two-factor code",!0);break;case"collect_new_password":s="Choose a new password",d="Set new password",de(e,r,i,a,"password","New password","password","new-password"),(m=i.get("password"))==null||m.setAttribute("data-atlas-autofocus","");break;default:c=!1,r.appendChild(u(e,"p","atlas-embed-note","You\u2019re all set."))}s&&o.appendChild(u(e,"p",x(e,"subtitle","atlas-embed-subtitle"),s)),o.appendChild(r),c&&r.appendChild(K(e,d));let p=u(e,"button","atlas-embed-step-back","Back to sign in");return p.type="button",p.addEventListener("click",()=>{e.resetFlow=null,_(e)}),r.appendChild(p),r.addEventListener("submit",b=>{b.preventDefault();let h={};for(let[y,v]of i)h[y]=v.value;ft(e,h)}),o}function de(e,t,n,o,r,a,i,l){let s=u(e,"label",x(e,"field","atlas-embed-field"));s.appendChild(u(e,"span",x(e,"label","atlas-embed-label"),a));let d=w(e).createElement("input");if(d.className=x(e,"input","atlas-embed-input"),d.type=i,d.name=r,d.setAttribute("autocomplete",l),i==="password"){let c=u(e,"div","atlas-embed-password");c.appendChild(d);let p=u(e,"button","atlas-embed-password-toggle","Show");p.type="button",p.setAttribute("aria-label","Show password"),p.addEventListener("click",m=>{m.preventDefault();let b=d.type==="password";d.type=b?"text":"password",p.textContent=b?"Hide":"Show",p.setAttribute("aria-label",b?"Hide password":"Show password")}),c.appendChild(p),s.appendChild(c)}else s.appendChild(d);for(let c of o.filter(p=>p.param===r))s.appendChild(u(e,"span",x(e,"error","atlas-embed-error"),c.message));n.set(r,d),t.appendChild(s)}function Ee(e,t,n,o,r,a,i){var h;if(e.codeInputStyle==="single"){de(e,t,n,o,r,a,"text","one-time-code"),i&&((h=n.get(r))==null||h.setAttribute("data-atlas-autofocus",""));return}let s=u(e,"div",x(e,"field","atlas-embed-field"));s.appendChild(u(e,"span",x(e,"label","atlas-embed-label"),a));let d=u(e,"div","atlas-embed-code");d.setAttribute("role","group"),d.setAttribute("aria-label",a);let c=w(e).createElement("input");c.type="hidden",c.name=r,n.set(r,c);let p=[],m=()=>{c.value=p.map(y=>y.value).join("")},b=()=>{c.value.length!==6||e.busy||t.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))};for(let y=0;y<6;y++){let v=w(e).createElement("input");v.className="atlas-embed-code-box",v.type="text",v.setAttribute("inputmode","numeric"),v.setAttribute("autocomplete",y===0?"one-time-code":"off"),v.setAttribute("aria-label",`${a} digit ${y+1}`),v.maxLength=1,i&&y===0&&v.setAttribute("data-atlas-autofocus",""),v.addEventListener("input",()=>{v.value=v.value.replace(/\D/g,"").slice(0,1),m(),v.value&&y<5&&p[y+1].focus(),b()}),v.addEventListener("keydown",R=>{R.key==="Backspace"&&!v.value&&y>0&&p[y-1].focus()}),v.addEventListener("paste",R=>{var g,E,A;R.preventDefault();let P=((E=(g=R.clipboardData)==null?void 0:g.getData("text"))!=null?E:"").replace(/\D/g,"").slice(0,6);for(let S=0;S<6;S++)p[S].value=(A=P[S])!=null?A:"";m(),p[Math.min(P.length,5)].focus(),b()}),p.push(v),d.appendChild(v)}s.appendChild(d),s.appendChild(c);for(let y of o.filter(v=>v.param===r))s.appendChild(u(e,"span",x(e,"error","atlas-embed-error"),y.message));t.appendChild(s)}function ht(e,t){let n=w(e).createElement("form"),o=e.state.errors.find(c=>!c.param);o&&n.appendChild(u(e,"div","atlas-embed-form-error",o.message));let r=new Map,a=e.state.errors,i=(c,p,m,b)=>de(e,n,r,a,c,p,m,b),l=(c,p,m)=>Ee(e,n,r,a,c,p,m),s=!0;switch(t){case"collect_identifier":if(i("identifier","Email address","email",e.passkeyEnabled&&N()?"username webauthn":"username"),e.enteredIdentifier&&(r.get("identifier").value=e.enteredIdentifier),e.mode==="sign-in"&&e.passwordEnabled&&i("password","Password","password","current-password"),e.mode==="sign-in"&&e.rememberMeEnabled){let c=u(e,"label","atlas-embed-remember"),p=w(e).createElement("input");p.type="checkbox",p.className="atlas-embed-remember-check",p.checked=e.remember,p.addEventListener("change",()=>{e.remember=p.checked}),c.appendChild(p),c.appendChild(u(e,"span","atlas-embed-remember-text","Remember me")),n.appendChild(c)}break;case"collect_first_factor":i("password","Password","password","current-password");break;case"collect_second_factor":if(e.backupCodeMode?i("code","Backup code","text","one-time-code"):l("code","Two-factor code",!0),e.trustedDeviceEnabled){let c=u(e,"label","atlas-embed-remember"),p=w(e).createElement("input");p.type="checkbox",p.className="atlas-embed-remember-check",p.checked=e.rememberDevice,p.addEventListener("change",()=>{e.rememberDevice=p.checked}),c.appendChild(p),c.appendChild(u(e,"span","atlas-embed-remember-text","Remember this device")),n.appendChild(c)}break;case"collect_email_code":l("code","Verification code",!0);break;case"collect_new_password":i("password","New password","password","new-password");break;case"enroll_second_factor":l("code","Authenticator code",!0),l("secondCode","Next code",!1);break;default:s=!1,n.appendChild(u(e,"p","atlas-embed-note","Please continue in your application."))}if(s&&n.appendChild(K(e,z[e.mode].submit)),t==="collect_second_factor"){let c=u(e,"button","atlas-embed-step-back",e.backupCodeMode?"Use your authenticator app":"Use a backup code instead");c.type="button",c.addEventListener("click",()=>{e.backupCodeMode=!e.backupCodeMode,_(e)}),n.appendChild(c)}if(t==="collect_identifier"&&e.mode==="sign-in"&&e.passwordEnabled||t==="collect_first_factor"){let c=u(e,"button","atlas-embed-step-back","Forgot password?");c.type="button",c.addEventListener("click",()=>mt(e)),n.appendChild(c)}return n.addEventListener("submit",c=>{c.preventDefault();let p={};for(let[m,b]of r)p[m]=b.value;t==="collect_second_factor"&&e.trustedDeviceEnabled&&e.rememberDevice&&(p.remember_device="true"),pt(e,p)}),n}function Rn(e){var s;let t=(s=e.appearance)==null?void 0:s.legal;if(!t||!t.termsUrl&&!t.privacyUrl)return null;let n=w(e),o=u(e,"div","atlas-embed-consent"),r=null;t.required&&(r=n.createElement("input"),r.type="checkbox",r.className="atlas-embed-consent-check",r.setAttribute("aria-label","Agree to the terms and privacy policy"),o.appendChild(r));let a=u(e,"span","atlas-embed-consent-text"),i=(d,c)=>{let p=n.createElement("a");return p.href=d,p.textContent=c,p.target="_blank",p.rel="noopener noreferrer",p.className="atlas-embed-consent-link",p};a.appendChild(n.createTextNode(t.required?"I agree to the ":"By continuing you agree to the "));let l=[];return t.termsUrl&&l.push(i(t.termsUrl,"Terms of Service")),t.privacyUrl&&l.push(i(t.privacyUrl,"Privacy Policy")),l.forEach((d,c)=>{c>0&&a.appendChild(n.createTextNode(" and ")),a.appendChild(d)}),a.appendChild(n.createTextNode(".")),o.appendChild(a),{row:o,checkbox:r}}function yt(e){var s;let t=w(e).createElement("form"),n=e.state.errors.find(d=>!d.param);n&&t.appendChild(u(e,"div","atlas-embed-form-error",n.message));let o=new Map,r=(d,c,p)=>{var v,R,P;let m=(v=p.type)!=null?v:"text",b=m==="radio"||m==="multiselect",h=u(e,b?"fieldset":"label",x(e,"field","atlas-embed-field"));h.appendChild(u(e,b?"legend":"span",x(e,"label","atlas-embed-label"),p.required?c:`${c} (optional)`));let y=w(e);if(m==="select"){let g=y.createElement("select");g.className=x(e,"input","atlas-embed-input"),g.name=d;let E=y.createElement("option");E.value="",E.textContent=p.placeholder||"Select\u2026",g.appendChild(E);for(let A of(R=p.options)!=null?R:[]){let S=y.createElement("option");S.value=A,S.textContent=A,g.appendChild(S)}h.appendChild(g),o.set(d,()=>g.value)}else if(m==="textarea"){let g=y.createElement("textarea");g.className=x(e,"input","atlas-embed-input"),g.name=d,g.rows=3,p.placeholder&&g.setAttribute("placeholder",p.placeholder),h.appendChild(g),o.set(d,()=>g.value)}else if(m==="checkbox"){let g=y.createElement("input");g.type="checkbox",g.name=d,g.className="atlas-embed-checkbox",h.classList.add("atlas-embed-field-checkbox"),h.appendChild(g),o.set(d,()=>g.checked?"true":"")}else if(m==="radio"||m==="multiselect"){let g=y.createElement("div");g.className="atlas-embed-choices";let E=[];for(let A of(P=p.options)!=null?P:[]){let S=y.createElement("label");S.className="atlas-embed-choice";let T=y.createElement("input");T.type=m==="radio"?"radio":"checkbox",T.name=d,T.value=A,E.push(T),S.appendChild(T),S.appendChild(u(e,"span",void 0,A)),g.appendChild(S)}h.appendChild(g),o.set(d,()=>{var A,S;return m==="radio"?(S=(A=E.find(T=>T.checked))==null?void 0:A.value)!=null?S:"":E.filter(T=>T.checked).map(T=>T.value).join(", ")})}else{let g=y.createElement("input");g.className=x(e,"input","atlas-embed-input"),g.type=m,g.name=d,p.autocomplete&&g.setAttribute("autocomplete",p.autocomplete),p.placeholder&&g.setAttribute("placeholder",p.placeholder),h.appendChild(g),o.set(d,()=>g.value)}for(let g of e.state.errors.filter(E=>E.param===d))h.appendChild(u(e,"span",x(e,"error","atlas-embed-error"),g.message));t.appendChild(h)};for(let d of e.signUpFields)r(d.key,d.label,{type:d.type,required:d.required,placeholder:d.placeholder,options:d.options});r("identifier","Email address",{type:"email",required:!0,autocomplete:"email"}),r("password","Password",{type:"password",required:!0,autocomplete:"new-password"});let a=Rn(e);a&&t.appendChild(a.row);let i=K(e,z[e.mode].submit),l=()=>!(a!=null&&a.checkbox)||a.checkbox.checked;return i.disabled=e.busy||!l(),(s=a==null?void 0:a.checkbox)==null||s.addEventListener("change",()=>{i.disabled=e.busy||!l()}),t.appendChild(i),t.addEventListener("submit",d=>{d.preventDefault();let c={};for(let[p,m]of o)c[p]=m();bt(e,c,l())}),t}var Pn={google:'<path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/><path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/><path fill="#FBBC05" d="M5.84 14.1c-.22-.66-.35-1.36-.35-2.1s.13-1.44.35-2.1V7.06H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.94l3.66-2.84z"/><path fill="#EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84C6.71 7.31 9.14 5.38 12 5.38z"/>',microsoft:'<path fill="#F25022" d="M2 2h9.3v9.3H2z"/><path fill="#7FBA00" d="M12.7 2H22v9.3h-9.3z"/><path fill="#00A4EF" d="M2 12.7h9.3V22H2z"/><path fill="#FFB900" d="M12.7 12.7H22V22h-9.3z"/>'},Mn={github:{fill:"currentColor",path:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"},apple:{fill:"currentColor",path:"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"},x:{fill:"currentColor",path:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"},notion:{fill:"currentColor",path:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"},facebook:{fill:"#0866FF",path:"M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z"},discord:{fill:"#5865F2",path:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"},gitlab:{fill:"#FC6D26",path:"m23.6004 9.5927-.0337-.0862L20.3.9814a.851.851 0 0 0-.3362-.405.8748.8748 0 0 0-.9997.0539.8748.8748 0 0 0-.29.4399l-2.2055 6.748H7.5375l-2.2057-6.748a.8573.8573 0 0 0-.29-.4412.8748.8748 0 0 0-.9997-.0537.8585.8585 0 0 0-.3362.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 0 0 2.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 0 0 1.2197 0l1.4995-1.1321 2.4619-1.8633 5.006-3.7489.0125-.01a6.0682 6.0682 0 0 0 2.0094-7.003z"},spotify:{fill:"#1ED760",path:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"},twitch:{fill:"#9146FF",path:"M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"},reddit:{fill:"#FF4500",path:"M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z"},figma:{fill:"#F24E1E",path:"M15.852 8.981h-4.588V0h4.588c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.491-4.49 4.491zM12.735 7.51h3.117c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-3.117V7.51zm0 1.471H8.148c-2.476 0-4.49-2.014-4.49-4.49S5.672 0 8.148 0h4.588v8.981zm-4.587-7.51c-1.665 0-3.019 1.355-3.019 3.019s1.354 3.02 3.019 3.02h3.117V1.471H8.148zm4.587 15.019H8.148c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h4.588v8.98zM8.148 8.981c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h3.117V8.981H8.148zM8.172 24c-2.489 0-4.515-2.014-4.515-4.49s2.014-4.49 4.49-4.49h4.588v4.441c0 2.503-2.047 4.539-4.563 4.539zm-.024-7.51a3.023 3.023 0 0 0-3.019 3.019c0 1.665 1.365 3.019 3.044 3.019 1.705 0 3.093-1.376 3.093-3.068v-2.97H8.148zm7.704 0h-.098c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h.098c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.49-4.49 4.49zm-.097-7.509c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h.098c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-.098z"},dropbox:{fill:"#0061FF",path:"M6 1.807L0 5.629l6 3.822 6.001-3.822L6 1.807zM18 1.807l-6 3.822 6 3.822 6-3.822-6-3.822zM0 13.274l6 3.822 6.001-3.822L6 9.452l-6 3.822zM18 9.452l-6 3.822 6 3.822 6-3.822-6-3.822zM6 18.371l6.001 3.822 6-3.822-6-3.822L6 18.371z"},gitee:{fill:"#C71D23",path:"M11.984 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.016 0zm6.09 5.333c.328 0 .593.266.592.593v1.482a.594.594 0 0 1-.593.592H9.777c-.982 0-1.778.796-1.778 1.778v5.63c0 .327.266.592.593.592h5.63c.982 0 1.778-.796 1.778-1.778v-.296a.593.593 0 0 0-.592-.593h-4.15a.592.592 0 0 1-.592-.592v-1.482a.593.593 0 0 1 .593-.592h6.815c.327 0 .593.265.593.592v3.408a4 4 0 0 1-4 4H5.926a.593.593 0 0 1-.593-.593V9.778a4.444 4.444 0 0 1 4.445-4.444h8.296Z"}};function xt(e){let t=Pn[e];if(t)return`<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">${t}</svg>`;let n=Mn[e];return n?`<svg viewBox="0 0 24 24" fill="${n.fill}" aria-hidden="true" focusable="false"><path d="${n.path}"/></svg>`:null}async function vt(e){var r,a,i;if(e.busy)return;(r=e.conditionalAbort)==null||r.abort(),e.busy=!0,_(e);let t=await e.client.post("/v1/client/sign_ins/passkey/begin",{});if(!t.ok||!t.data){e.busy=!1,F(e,t.errors);return}let n;try{n=await be(t.data)}catch{e.busy=!1,_(e);return}let o=await e.client.post("/v1/client/sign_ins/passkey/finish",n);if(e.busy=!1,o.ok&&((a=o.data)==null?void 0:a.status)==="complete"){await B(e,(i=o.data.created_session_id)!=null?i:null);return}F(e,o.errors)}async function kt(e){var o,r,a;if(e.mode!=="sign-in"||!e.passkeyEnabled||!N())return;let t=!1;try{t=await Oe()}catch{t=!1}if(!t)return;(o=e.conditionalAbort)==null||o.abort();let n=new AbortController;e.conditionalAbort=n;try{let i=await e.client.post("/v1/client/sign_ins/passkey/begin",{});if(!i.ok||!i.data||n.signal.aborted)return;let l=await be(i.data,{mediation:"conditional",signal:n.signal});if(n.signal.aborted)return;let s=await e.client.post("/v1/client/sign_ins/passkey/finish",l);s.ok&&((r=s.data)==null?void 0:r.status)==="complete"&&await B(e,(a=s.data.created_session_id)!=null?a:null)}catch{}}function _t(e){let t=u(e,"button",x(e,"socialButton","atlas-embed-social-button"),"Sign in with a passkey");return t.type="button",t.setAttribute("data-atlas-passkey",""),t.disabled=e.busy,t.addEventListener("click",()=>{vt(e)}),t}function Se(e){let t=[...e.providers];for(let n of e.nativeProviders)t.includes(n.provider)||t.push(n.provider);return t}var Ln='<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true" fill="none"><path d="M12 2 3 21h4l5-11 5 11h4L12 2z" fill="currentColor"/></svg>';function In(e,t){var l;let{variant:n,labels:o}=e.social,r=(l=o.atlas)!=null?l:n==="block"?"Continue with Atlas":"Atlas",a=u(e,"button",x(e,"socialButton","atlas-embed-social-button"));a.type="button",a.setAttribute("data-atlas-provider","atlas"),a.setAttribute("data-variant",n);let i=w(e).createElement("span");if(i.className="atlas-embed-social-icon",i.innerHTML=Ln,a.appendChild(i),n==="icon")a.setAttribute("aria-label","Continue with Atlas"),a.setAttribute("title","Atlas");else{let s=w(e).createElement("span");s.className="atlas-embed-social-label",s.textContent=r,a.appendChild(s)}return a.addEventListener("click",()=>{we(e,t,{popup:!0})}),a}function wt(e){let t=Se(e),n=u(e,"div","atlas-embed-social");n.setAttribute("data-layout",e.social.layout),n.setAttribute("data-size",e.social.size),n.setAttribute("data-variant",e.social.variant),e.signInWithAtlas.enabled&&e.signInWithAtlas.connection_id&&n.appendChild(In(e,e.signInWithAtlas.connection_id));for(let d of t){let c=e.nativeProviders.find(m=>m.provider===d),p=d==="google"&&(c!=null&&c.client_id)?Hn(e,c.client_id):Bn(e,d);p.getAttribute("data-atlas-provider")||p.setAttribute("data-atlas-provider",d),n.appendChild(p)}let o=e.social.layout==="carousel"?Fn(e,n):n;if(!(e.social.search==="always"||e.social.search==="auto"&&t.length>qe))return o;let a=u(e,"div","atlas-embed-social-field"),i=w(e).createElement("input");i.type="search",i.className="atlas-embed-social-search",i.setAttribute("placeholder","Search sign-in options\u2026"),i.setAttribute("aria-label","Search sign-in options"),i.autocomplete="off";let l=u(e,"div","atlas-embed-social-empty");l.textContent="No matching sign-in options.",l.setAttribute("hidden","");let s=Array.from(n.children);return i.addEventListener("input",()=>{var p;let d=i.value.trim().toLowerCase(),c=0;for(let m of s){let b=(p=m.getAttribute("data-atlas-provider"))!=null?p:"",h=d===""||se(b).toLowerCase().includes(d)||b.toLowerCase().includes(d);m.toggleAttribute("hidden",!h),h&&(c+=1)}l.toggleAttribute("hidden",c!==0),n.dispatchEvent(new Event("scroll"))}),a.appendChild(i),a.appendChild(o),a.appendChild(l),a}function Fn(e,t){var d;let n=(d=w(e).defaultView)!=null?d:typeof window!="undefined"?window:null,o=u(e,"div","atlas-embed-carousel"),r=c=>{let p=u(e,"button","atlas-embed-carousel-nav");return p.type="button",p.setAttribute("data-dir",c),p.setAttribute("aria-label",c==="prev"?"Scroll to previous sign-in options":"Scroll to more sign-in options"),p.innerHTML=c==="prev"?at:rt,p.addEventListener("click",()=>{let m=Math.max(t.clientWidth*.8,140);typeof t.scrollBy=="function"&&t.scrollBy({left:(c==="prev"?-1:1)*m,behavior:"smooth"})}),p},a=r("prev"),i=r("next"),l=()=>{let c=t.scrollWidth-t.clientWidth,p=c>2;o.setAttribute("data-overflow",p?"true":"false"),a.disabled=!p||t.scrollLeft<=1,i.disabled=!p||t.scrollLeft>=c-1};t.addEventListener("scroll",l,{passive:!0});let s=n&&n.ResizeObserver;return s?new s(l).observe(t):n&&n.addEventListener("resize",l),n!=null&&n.requestAnimationFrame&&n.requestAnimationFrame(l),l(),o.appendChild(a),o.appendChild(t),o.appendChild(i),o}function Et(e,t,n="button"){var d;let{variant:o,labels:r}=e.social,a=se(t),i=(d=r[t])!=null?d:o==="block"?`Continue with ${a}`:a,l=u(e,n,x(e,"socialButton","atlas-embed-social-button"));n==="button"&&(l.type="button"),l.setAttribute("data-atlas-provider",t),l.setAttribute("data-variant",o);let s=xt(t);if(s){let c=w(e).createElement("span");c.className="atlas-embed-social-icon",c.innerHTML=s,l.appendChild(c)}if(o==="icon")l.setAttribute("aria-label",`Continue with ${a}`),l.setAttribute("title",a);else{let c=w(e).createElement("span");c.className="atlas-embed-social-label",c.textContent=i,l.appendChild(c)}return l}function Bn(e,t){let n=Et(e,t);return n.addEventListener("click",()=>{ot.has(t)?(e.handlePrompt=t,_(e)):le(e,t)}),n}function St(e,t){let n=se(t),o=w(e).createElement("form");o.className="atlas-embed-form",o.setAttribute("novalidate","true");for(let s of e.state.errors.filter(d=>!d.param))o.appendChild(u(e,"div","atlas-embed-form-error",s.message));let r=u(e,"label",x(e,"field","atlas-embed-field"));r.appendChild(u(e,"span",x(e,"label","atlas-embed-label"),`${n} handle`));let a=w(e).createElement("input");a.className=x(e,"input","atlas-embed-input"),a.type="text",a.name="identifier",a.placeholder="you.bsky.social",a.setAttribute("autocomplete","username"),a.setAttribute("autocapitalize","none"),a.setAttribute("spellcheck","false"),r.appendChild(a),o.appendChild(r);let i=K(e,z[e.mode].submit);o.appendChild(i);let l=u(e,"button","atlas-embed-handle-back","Back");return l.type="button",l.addEventListener("click",()=>{e.handlePrompt=null,e.state={...e.state,errors:[]},_(e)}),o.appendChild(l),o.addEventListener("submit",s=>{s.preventDefault();let d=a.value.trim();if(!d){e.state={...e.state,errors:[{code:"validation_error",message:`Enter your ${n} handle.`}]},_(e);return}le(e,t,d)}),o}function Hn(e,t){let n=Et(e,"google","div");return n.setAttribute("role","button"),n.setAttribute("tabindex","0"),Be({wrapper:n,clientId:t,onCredential:o=>void ut(e,"google",o),onError:()=>$(e,"Google sign-in could not start.")}).catch(()=>{n.addEventListener("click",()=>void le(e,"google"))}),n}function $(e,t){e.root.textContent="";let n=u(e,"div",x(e,"card","atlas-embed-card"));n.appendChild(u(e,"p","atlas-embed-note",t)),e.root.appendChild(n)}function Ct(e){e.root.textContent="";let t=u(e,"div",x(e,"card","atlas-embed-card")),n=e.interaction.loading,o=u(e,"div","atlas-embed-loading");if(o.setAttribute("data-loading",n),o.setAttribute("role","status"),o.setAttribute("aria-label","Loading"),n==="skeleton")for(let a of["title","sub","input","input","button"])o.appendChild(u(e,"div",`atlas-embed-skel atlas-embed-skel-${a}`));else if(n==="dots")for(let a=0;a<3;a+=1)o.appendChild(u(e,"span","atlas-embed-dot"));else n==="bar"?o.appendChild(u(e,"span","atlas-embed-loadbar")):o.appendChild(u(e,"span","atlas-embed-spinner"));let r=u(e,"span","atlas-embed-sr","Loading\u2026");o.appendChild(r),t.appendChild(o),e.root.appendChild(t)}function F(e,t){e.state={...e.state,errors:[...t]},_(e)}function _(e){var d,c,p,m,b,h,y,v,R,P;e.root.textContent="";let t=u(e,"div",x(e,"card","atlas-embed-card")),n=(c=(d=e.appearance)==null?void 0:d.logoUrl)!=null?c:null;if(n){let g=w(e).createElement("img");g.className="atlas-embed-logo",g.src=n,g.alt=(m=(p=e.appearance)==null?void 0:p.applicationName)!=null?m:"",t.appendChild(g)}if(e.resetFlow){let g=`reset_${U(e.resetFlow)}`;if(t.setAttribute("data-step",g),g!==e.lastStepKind&&t.setAttribute("data-enter",""),e.lastStepKind=g,t.appendChild(gt(e)),(b=e.appearance)!=null&&b.footer&&t.appendChild(u(e,"p",x(e,"footer","atlas-embed-footer"),e.appearance.footer)),e.root.appendChild(t),t.hasAttribute("data-enter")){let E=t.querySelector("[data-atlas-autofocus]");E instanceof HTMLElement&&E.focus()}return}let o=e.state.attempt?H(e.state.attempt):{kind:"collect_identifier"},r=e.mode==="sign-up"&&!e.state.attempt,a=r||o.kind==="collect_identifier",i=e.handlePrompt?"handle":o.kind;t.setAttribute("data-step",i),i!==e.lastStepKind&&t.setAttribute("data-enter",""),e.lastStepKind=i;let l=(y=(h=e.appearance)==null?void 0:h.headline)!=null?y:z[e.mode].title;t.appendChild(u(e,"h1",x(e,"title","atlas-embed-title"),l));let s=a?null:On(e,o.kind);if(s?t.appendChild(s):(v=e.appearance)!=null&&v.subheadline&&t.appendChild(u(e,"p",x(e,"subtitle","atlas-embed-subtitle"),e.appearance.subheadline)),e.flash&&t.appendChild(u(e,"div","atlas-embed-flash",e.flash)),e.handlePrompt){t.appendChild(St(e,e.handlePrompt)),(R=e.appearance)!=null&&R.footer&&t.appendChild(u(e,"p",x(e,"footer","atlas-embed-footer"),e.appearance.footer)),e.root.appendChild(t);return}if(a&&(Se(e).length>0||e.signInWithAtlas.enabled)&&(t.appendChild(wt(e)),t.appendChild(u(e,"div",x(e,"divider","atlas-embed-divider"),"or"))),t.appendChild(r?yt(e):ht(e,o.kind)),a&&e.mode==="sign-in"&&e.passkeyEnabled&&N()&&t.appendChild(_t(e)),(P=e.appearance)!=null&&P.footer&&t.appendChild(u(e,"p",x(e,"footer","atlas-embed-footer"),e.appearance.footer)),e.root.appendChild(t),t.hasAttribute("data-enter")){let g=t.querySelector("[data-atlas-autofocus]");g instanceof HTMLElement&&g.focus()}}function On(e,t){let n=e.enteredIdentifier,o=null,r=!1;switch(t){case"collect_email_code":o=n?`Enter the code we sent to ${n}`:"Enter the code we sent to your email",r=!0;break;case"collect_first_factor":o=n?`Enter the password for ${n}`:"Enter your password",r=!0;break;case"collect_second_factor":o=e.backupCodeMode?"Enter one of your backup codes":"Enter the code from your authenticator app";break;case"collect_new_password":o="Choose a new password";break;case"enroll_second_factor":o="Enter two codes from your authenticator app to finish setup";break;default:return null}let a=u(e,"div","atlas-embed-step-context");if(a.appendChild(u(e,"p",x(e,"subtitle","atlas-embed-subtitle"),o)),r){let i=u(e,"button","atlas-embed-step-back","Use a different email");i.type="button",i.addEventListener("click",()=>Dn(e)),a.appendChild(i)}return a}function Dn(e){e.state=M,e.backupCodeMode=!1,e.handlePrompt=null,e.enteredIdentifier=null,_(e)}var V=class{constructor(t,n){this.root=t;this.options=n;f(this,"client");f(this,"mode");f(this,"appearance",null);f(this,"providers",[]);f(this,"nativeProviders",[]);f(this,"signInWithAtlas",{enabled:!1});f(this,"social",ve(void 0,void 0));f(this,"codeInputStyle","boxes");f(this,"interaction",ie(void 0,void 0));f(this,"backupCodeMode",!1);f(this,"enteredIdentifier",null);f(this,"lastStepKind",null);f(this,"signUpFields",[]);f(this,"passwordEnabled",!0);f(this,"passkeyEnabled",!1);f(this,"conditionalAbort");f(this,"rememberMeEnabled",!1);f(this,"remember",!0);f(this,"trustedDeviceEnabled",!1);f(this,"rememberDevice",!1);f(this,"captchaFlows",{});f(this,"captchaHost");f(this,"state",M);f(this,"resetFlow",null);f(this,"flash",null);f(this,"handlePrompt",null);f(this,"busy",!1);f(this,"recorder");var o,r;this.mode=(o=n.mode)!=null?o:"sign-in",this.interaction=ie(void 0,(r=n.appearance)==null?void 0:r.interaction),this.client=Qe({publishableKey:n.publishableKey,frontendApi:n.frontendApi,fetchImpl:n.fetchImpl})}async mount(){var o,r,a,i,l,s,d,c,p,m,b,h,y,v,R,P,g,E,A;if(nt((o=this.root.ownerDocument)!=null?o:document),this.root.classList.add("atlas-embed-root"),this.applyTheme(),this.applyInteraction(),Ct(this),await ct(this))return;let n=await et(this.client);if(n){this.appearance=n.appearance;let S=(r=n.provider_scopes)!=null?r:{},T=pe=>{let ue=S[pe];return ue?this.mode==="sign-up"?ue.sign_up:ue.sign_in:!0};this.providers=Je((a=n.providers)!=null?a:[],n.appearance).filter(T),this.nativeProviders=((i=n.native_providers)!=null?i:[]).filter(pe=>T(pe.provider)),this.passwordEnabled=(s=(l=n.strategies)==null?void 0:l.password)!=null?s:!0,this.passkeyEnabled=(c=(d=n.strategies)==null?void 0:d.passkey)!=null?c:!1,this.signInWithAtlas=(p=n.sign_in_with_atlas)!=null?p:{enabled:!1},this.rememberMeEnabled=n.rememberMe===!0,this.trustedDeviceEnabled=n.rememberDevice===!0,this.captchaFlows=(m=n.captchaFlows)!=null?m:{},this.applyTheme()}this.social=ve((b=this.appearance)==null?void 0:b.socialButtons,(h=this.options.appearance)==null?void 0:h.socialButtons),this.codeInputStyle=$e((y=this.appearance)==null?void 0:y.codeInput,(v=this.options.appearance)==null?void 0:v.codeInput),this.interaction=ie((R=this.appearance)==null?void 0:R.interaction,(P=this.options.appearance)==null?void 0:P.interaction),this.applyInteraction(),this.signUpFields=(E=(g=this.appearance)==null?void 0:g.signUpFields)!=null?E:[];try{this.recorder=new te((A=this.root.ownerDocument)!=null?A:document)}catch{}_(this),kt(this)}applyTheme(){let t=Ye(this.appearance,this.options.appearance),n=Xe(t);for(let[o,r]of Object.entries(n))this.root.style.setProperty(o,r)}applyInteraction(){let t=this.interaction;this.root.setAttribute("data-button-style",t.buttonStyle),this.root.setAttribute("data-button-effect",t.buttonEffect),this.root.setAttribute("data-shadow",t.shadow),this.root.setAttribute("data-density",t.density),this.root.setAttribute("data-input-style",t.inputStyle);let n=t.animations?Ge[t.motionSpeed]:0;this.root.style.setProperty("--atlas-embed-motion",`${n}ms`)}};var W={};function At(e){W=e}function Tt(e){if(!e)return{};let t=e.dataset,n={};return t.atlasKey&&(n.publishableKey=t.atlasKey),t.atlasFapi&&(n.frontendApi=t.atlasFapi),t.atlasRedirect&&(n.redirect=t.atlasRedirect),n}function Rt(e,t){var s,d,c,p,m,b;let n=e.dataset,o=h=>{var y;return(y=e.getAttribute(h))!=null?y:void 0},r=(d=(s=n.atlasKey)!=null?s:o("publishable-key"))!=null?d:W.publishableKey,a=(p=(c=n.atlasFapi)!=null?c:o("frontend-api"))!=null?p:W.frontendApi,i=(b=(m=n.atlasRedirect)!=null?m:o("redirect"))!=null?b:W.redirect;if(!r||!a)return null;let l={publishableKey:r,frontendApi:a,mode:t};return i&&(l.redirect=i),l}function Pt(e,t={}){var r,a,i;let n=(r=t.publishableKey)!=null?r:W.publishableKey,o=(a=t.frontendApi)!=null?a:W.frontendApi;return!n||!o?null:{...t,publishableKey:n,frontendApi:o,redirect:(i=t.redirect)!=null?i:W.redirect,mode:e}}var ce=class extends HTMLElement{constructor(){super(...arguments);f(this,"widget",null)}connectedCallback(){if(this.widget)return;let n=Rt(this,this.mode);if(!n){this.textContent="Atlas: set data-atlas-key (publishable key) and data-atlas-fapi (frontend API origin).";return}this.widget=new V(this,n),this.widget.mount()}},Ce=class extends ce{constructor(){super(...arguments);f(this,"mode","sign-in")}},Ae=class extends ce{constructor(){super(...arguments);f(this,"mode","sign-up")}};function Te(){typeof customElements!="undefined"&&(customElements.get("atlas-sign-in")||customElements.define("atlas-sign-in",Ce),customElements.get("atlas-sign-up")||customElements.define("atlas-sign-up",Ae))}function zn(e){let t=typeof e=="string"?document.querySelector(e):e;return t instanceof HTMLElement?t:null}function Mt(e,t,n){let o=zn(t);if(!o)return null;let r=Pt(e,n);if(!r)return o.textContent="Atlas: a publishable key and a frontend API origin are required to mount the widget.",null;let a=new V(o,r);return a.mount(),a}function Lt(e,t={}){return Mt("sign-in",e,t)}function It(e,t={}){return Mt("sign-up",e,t)}function Wn(){var t;let e=document.currentScript;return e instanceof HTMLScriptElement?e:(t=document.querySelector("script[data-atlas-key]"))!=null?t:document.querySelector('script[src*="embed.js"]')}function Nn(){At(Tt(Wn())),Te(),window.Atlas={mountSignIn:Lt,mountSignUp:It,defineElements:Te}}Nn();})();
361
+ `;function Xt(e=document){var n;if(e.querySelector(`style[data-${Jt}]`))return;let t=e.createElement("style");t.setAttribute(`data-${Jt}`,""),t.textContent=qo,((n=e.head)!=null?n:e.documentElement).appendChild(t)}var Qt=["auto","light","dark"],J=["primary","primaryInk","accent","background","surface","text","muted","border","danger","success","inputBackground","inputText"],Ae=["none","uppercase"],en={"minor-second":1.067,"major-second":1.125,"minor-third":1.2,"major-third":1.25,"perfect-fourth":1.333,"augmented-fourth":1.414,"perfect-fifth":1.5,golden:1.618,"minor-seventh":1.778,octave:2},tn=Object.keys(en),Te=["none","sm","md","lg","xl"],Re=["compact","comfortable","spacious"],Pe=["solid","glass","outline","none"],Ie=["narrow","normal","wide"],De=["center","left","right","split"],Le=["left","right"],Oe=["card","page","hidden"],Me=["sm","md","lg"],Fe=["solid","outline","soft","gradient"],Ne=["list","grid","icons"],Be=["outline","filled","underline"],nn=["linear","radial"],Qe=["cover","contain"],et=["top-left","top","top-right","left","center","right","bottom-left","bottom","bottom-right"],le=["none","dots","grid","noise"],We=["minimal","atlas","glass","midnight","editorial","terminal","sunrise","forest","grape","slate","split-photo","bold"],tt=/^#[0-9a-fA-F]{6}$/,nt=/^dasset_[0-9A-HJKMNP-TV-Z]{26}$/;var F="system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",He="Georgia, Cambria, 'Times New Roman', Times, serif",ot="ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace",N="wght@400;500;600;700;800",on=[{id:"system",label:"System UI",family:null,category:"sans-serif",fallback:`-apple-system, BlinkMacSystemFont, ${F}`,google:null},{id:"system-serif",label:"System serif (Georgia)",family:null,category:"serif",fallback:He,google:null},{id:"system-mono",label:"System monospace",family:null,category:"monospace",fallback:ot,google:null},{id:"inter",label:"Inter",family:"Inter",category:"sans-serif",fallback:F,google:`Inter:${N}`},{id:"roboto",label:"Roboto",family:"Roboto",category:"sans-serif",fallback:F,google:"Roboto:wght@400;500;700;800"},{id:"open-sans",label:"Open Sans",family:"Open Sans",category:"sans-serif",fallback:F,google:`Open+Sans:${N}`},{id:"lato",label:"Lato",family:"Lato",category:"sans-serif",fallback:F,google:"Lato:wght@400;700;900"},{id:"montserrat",label:"Montserrat",family:"Montserrat",category:"sans-serif",fallback:F,google:`Montserrat:${N}`},{id:"poppins",label:"Poppins",family:"Poppins",category:"sans-serif",fallback:F,google:`Poppins:${N}`},{id:"nunito",label:"Nunito",family:"Nunito",category:"sans-serif",fallback:F,google:`Nunito:${N}`},{id:"work-sans",label:"Work Sans",family:"Work Sans",category:"sans-serif",fallback:F,google:`Work+Sans:${N}`},{id:"dm-sans",label:"DM Sans",family:"DM Sans",category:"sans-serif",fallback:F,google:`DM+Sans:${N}`},{id:"manrope",label:"Manrope",family:"Manrope",category:"sans-serif",fallback:F,google:`Manrope:${N}`},{id:"source-serif",label:"Source Serif",family:"Source Serif 4",category:"serif",fallback:He,google:`Source+Serif+4:${N}`},{id:"merriweather",label:"Merriweather",family:"Merriweather",category:"serif",fallback:He,google:"Merriweather:wght@400;700;900"},{id:"playfair-display",label:"Playfair Display",family:"Playfair Display",category:"serif",fallback:He,google:`Playfair+Display:${N}`},{id:"jetbrains-mono",label:"JetBrains Mono",family:"JetBrains Mono",category:"monospace",fallback:ot,google:`JetBrains+Mono:${N}`},{id:"ibm-plex-mono",label:"IBM Plex Mono",family:"IBM Plex Mono",category:"monospace",fallback:ot,google:"IBM+Plex+Mono:wght@400;500;600;700"}],rn=on.map(e=>e.id),an=new Map(on.map(e=>[e.id,e]));function rt(e){return typeof e=="string"?an.get(e):void 0}function at(e){var n;let t=(n=rt(e))!=null?n:an.get("system");return t.family?`'${t.family}', ${t.fallback}`:t.fallback}function sn(e){let t=rt(e);return t!=null&&t.google?`/v1/design/fonts/${t.id}.css`:null}var st=e=>{if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},X=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),R=e=>t=>typeof t=="string"&&e.includes(t),z=(e,t,n=1)=>o=>typeof o=="number"&&Number.isInteger(o)&&o>=e&&o<=t&&o%n===0,cn=(e,t)=>n=>typeof n=="number"&&!Number.isNaN(n)&&n>=e&&n<=t,ce=e=>typeof e=="string"&&tt.test(e),it=e=>typeof e=="string"&&nt.test(e);function V(e,t=[]){return n=>{if(!st(n))return!1;for(let o of Object.keys(n)){if(!X(e,o))return!1;let a=n[o];if(a===void 0){if(t.includes(o))return!1;continue}if(!e[o](a))return!1}return t.every(o=>X(n,o)&&n[o]!==void 0)}}var ln=R(rn),lt={palette:Object.fromEntries(J.map(e=>[e,ce])),paletteDark:Object.fromEntries(J.map(e=>[e,ce])),typography:{font:ln,headingFont:ln,baseSize:z(12,20),headingWeight:z(400,800,100),bodyWeight:z(300,600,100),letterCase:R(Ae),scale:R(tn)},shape:{radius:z(0,32),controlRadius:z(0,999),borderWidth:z(0,3)},elevation:{cardShadow:R(Te)},spacing:{density:R(Re)},card:{style:R(Pe),blur:z(0,40),width:R(Ie)},layout:{position:R(De),splitImageSide:R(Le),logoPlacement:R(Oe),logoSize:R(Me)},buttons:{style:R(Fe),socialLayout:R(Ne)},inputs:{style:R(Be)},logo:{assetId:it,darkAssetId:it}},Zo=e=>{if(!V({type:R(nn),angle:z(0,360),stops:()=>!0},["type","stops"])(e))return!1;let t=e.stops;return Array.isArray(t)&&t.length>=2&&t.length<=4&&t.every(V({color:ce,at:cn(0,100)},["color","at"]))},Jo=V({assetId:it,fit:R(Qe),position:R(et),overlay:V({color:ce,opacity:cn(0,1)},["color","opacity"]),blur:z(0,20)},["assetId"]),ct={color:ce,gradient:Zo,image:Jo,pattern:R(le)},de={version:e=>e===1,preset:R(We),colorScheme:R(Qt),background:V(ct),backgroundDark:V(ct),...Object.fromEntries(Object.entries(lt).map(([e,t])=>[e,V(t)]))};function dn(e,t){return X(de,e)&&de[e](t)}var pn=V(de);function un(e,t=()=>{},n=""){let o=(...r)=>[n,...r].filter(Boolean).join(".");if(e==null)return{};if(!st(e))return t({path:n||"(root)",message:"must be an object"}),{};let a={};for(let[r,s]of Object.entries(e)){if(s===void 0)continue;if(!X(de,r)){t({path:o(r),message:"Unknown setting."});continue}if(de[r](s)){a[r]=s;continue}let l=X(lt,r)?lt[r]:r==="background"||r==="backgroundDark"?ct:null;if(!l||!st(s)){t({path:o(r),message:"Invalid value."});continue}let i={};for(let[c,d]of Object.entries(s))d!==void 0&&(X(l,c)&&l[c](d)?i[c]=d:t({path:o(r,c),message:X(l,c)?"Invalid value.":"Unknown setting."}));Object.keys(i).length&&(a[r]=i)}return a}var Xo=new Set(["__proto__","constructor","prototype"]),fn=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function dt(e,t){let n={...e};for(let[o,a]of Object.entries(t)){if(Xo.has(o)||a===void 0)continue;if(a===null){delete n[o];continue}let r=n[o];n[o]=fn(r)&&fn(a)?dt(r,a):a}return n}function T(e){let t=e.split(" ");if(t.length!==J.length)throw new Error(`palette spec needs ${J.length} slots: ${e}`);let n={};return t.forEach((o,a)=>{o!=="-"&&(n[J[a]]=o)}),n}var gn={version:1,preset:"minimal",colorScheme:"auto",palette:T("#18181b #ffffff #4f46e5 #fafafa #ffffff #18181b #71717a #e4e4e7 #dc2626 #15803d #ffffff #18181b"),paletteDark:T("#fafafa #18181b #818cf8 #09090b #18181b #fafafa #a1a1aa #3f3f46 #f87171 #4ade80 #09090b #fafafa"),typography:{font:"inter",headingFont:"inter",baseSize:15,headingWeight:600,bodyWeight:400,letterCase:"none",scale:"perfect-fourth"},shape:{radius:12,controlRadius:8,borderWidth:1},elevation:{cardShadow:"md"},spacing:{density:"comfortable"},card:{style:"solid",blur:16,width:"normal"},layout:{position:"center",splitImageSide:"left",logoPlacement:"card",logoSize:"md"},buttons:{style:"solid",socialLayout:"list"},inputs:{style:"outline"},background:{},backgroundDark:{},logo:{}},mn={minimal:{design:{}},atlas:{design:{palette:T("#6d4aff #ffffff #0e8fc7 #f6f5ff #ffffff #0b0d17 #5b6078 #e2def5 #d92d3a #0f7a52 #ffffff #0b0d17"),paletteDark:T("#7455fa #ffffff #46c7ff #070811 #0f1120 #eef0f6 #959bb0 #262a40 #ff6b6b #43d9a0 #0b0d17 #eef0f6"),typography:{font:"system",headingFont:"system",headingWeight:600},shape:{radius:14,controlRadius:9,borderWidth:1},elevation:{cardShadow:"lg"},buttons:{style:"gradient"},background:{gradient:{type:"linear",angle:160,stops:[{color:"#f6f5ff",at:0},{color:"#eef6ff",at:100}]}},backgroundDark:{gradient:{type:"radial",stops:[{color:"#1a1440",at:0},{color:"#070811",at:70}]},pattern:"grid"}}},glass:{design:{palette:T("#4338ca - #db2777 #eef2ff #ffffff #111827 #4b5563 #ffffff - - #ffffff #111827"),paletteDark:T("#a5b4fc - #f472b6 #1e1b4b #111827 #f9fafb #cbd5e1 #374151 - - #0b1120 #f9fafb"),shape:{radius:20,controlRadius:12},elevation:{cardShadow:"xl"},card:{style:"glass",blur:20},background:{gradient:{type:"linear",angle:135,stops:[{color:"#6366f1",at:0},{color:"#ec4899",at:55},{color:"#f59e0b",at:100}]}},backgroundDark:{gradient:{type:"linear",angle:135,stops:[{color:"#1e1b4b",at:0},{color:"#4c1d95",at:55},{color:"#831843",at:100}]}}}},midnight:{design:{colorScheme:"dark",palette:T("#1d4ed8 - #7c3aed #eef2f9 #ffffff #0b1020 #475569 #d5dceb - - #ffffff #0b1020"),paletteDark:T("#60a5fa - #a78bfa #0b1020 #121a2f #e6eaf5 #94a3b8 #24314f #f87171 #34d399 #0e1528 #e6eaf5"),typography:{font:"manrope",headingFont:"manrope"},shape:{radius:16,controlRadius:10},elevation:{cardShadow:"lg"},backgroundDark:{pattern:"dots"}}},editorial:{design:{palette:T("#8b2e1f - #8a6410 #f7f3ec #fffdf8 #1f1a14 #6b6157 #e3dacb - - #fffdf8 #1f1a14"),paletteDark:T("#e07a5f - #d4a64a #16130f #1f1b16 #f2ebe0 #a89f92 #3a332a - - #16130f #f2ebe0"),typography:{font:"source-serif",headingFont:"playfair-display",baseSize:16,headingWeight:700,scale:"golden"},shape:{radius:4,controlRadius:2},elevation:{cardShadow:"sm"},inputs:{style:"underline"}}},terminal:{design:{colorScheme:"dark",palette:T("#166534 - #0e7490 #f4fbf3 #ffffff #0b2a0b #3f6b3c #b7d8b4 - - #ffffff #0b2a0b"),paletteDark:T("#39ff14 #031003 #00e5ff #0a0f0a #0d140d #c8f7c5 #7fb57b #2c5a2c #ff5555 #39ff14 #050805 #c8f7c5"),typography:{font:"jetbrains-mono",headingFont:"jetbrains-mono",baseSize:14,letterCase:"uppercase",scale:"major-second"},shape:{radius:0,controlRadius:0,borderWidth:1},elevation:{cardShadow:"none"},card:{style:"outline"},buttons:{style:"outline"},backgroundDark:{pattern:"grid"}}},sunrise:{design:{palette:T("#c2410c - #be185d #fff1e6 #ffffff #2a1a12 #7c5e52 #f4d9cb - - #ffffff #2a1a12"),paletteDark:T("#fb923c - #f472b6 #1a0f0a #24150f #fdebe1 #c4a092 #4a2e22 - - #1a0f0a #fdebe1"),typography:{font:"poppins",headingFont:"poppins"},shape:{radius:20,controlRadius:999},elevation:{cardShadow:"lg"},background:{gradient:{type:"linear",angle:160,stops:[{color:"#fff1e6",at:0},{color:"#ffe4ec",at:100}]}},backgroundDark:{gradient:{type:"linear",angle:160,stops:[{color:"#2a1209",at:0},{color:"#2a0f1c",at:100}]}}}},forest:{design:{palette:T("#166534 - #a16207 #f3f7f2 #ffffff #14261a #53685a #d6e3d8 - - #f3f7f2 #14261a"),paletteDark:T("#4ade80 - #facc15 #0c1510 #13201a #e3efe6 #9db5a4 #2a3d31 - - #0c1510 #e3efe6"),typography:{font:"dm-sans",headingFont:"dm-sans"},shape:{radius:10,controlRadius:8},inputs:{style:"filled"}}},grape:{design:{palette:T("#7e22ce - #be185d #faf5ff #ffffff #2e1065 #6b5b8a #e9d5ff - - #ffffff #2e1065"),paletteDark:T("#c084fc - #f472b6 #12081f #1c1030 #f3e8ff #b4a3cf #3b2559 - - #12081f #f3e8ff"),typography:{font:"nunito",headingFont:"nunito",headingWeight:800},shape:{radius:24,controlRadius:14},buttons:{socialLayout:"grid"},background:{pattern:"dots"},backgroundDark:{pattern:"dots"}}},slate:{design:{palette:T("#334155 - #0369a1 #f1f5f9 #ffffff #0f172a #64748b #cbd5e1 - - #f8fafc #0f172a"),paletteDark:T("#cbd5e1 - #38bdf8 #0f172a #1e293b #f1f5f9 #94a3b8 #334155 - - #0f172a #f1f5f9"),typography:{font:"work-sans",headingFont:"work-sans"},shape:{radius:8,controlRadius:6},elevation:{cardShadow:"sm"},spacing:{density:"compact"},inputs:{style:"filled"}}},"split-photo":{design:{layout:{position:"split",splitImageSide:"left",logoPlacement:"page"},card:{style:"none",width:"normal"},elevation:{cardShadow:"none"},shape:{radius:0,controlRadius:8},background:{gradient:{type:"linear",angle:135,stops:[{color:"#0f172a",at:0},{color:"#334155",at:100}]}},backgroundDark:{gradient:{type:"linear",angle:135,stops:[{color:"#020617",at:0},{color:"#1e293b",at:100}]}}}},bold:{design:{palette:T("#4338ca - #ca8a04 #4338ca #ffffff #111827 #4b5563 #e5e7eb - - #ffffff #111827"),paletteDark:T("#a5b4fc - #facc15 #1e1b4b #111827 #f9fafb #cbd5e1 #374151 - - #0b1120 #f9fafb"),typography:{font:"montserrat",headingFont:"montserrat",baseSize:17,headingWeight:800,letterCase:"uppercase",scale:"octave"},shape:{radius:24,controlRadius:999,borderWidth:0},elevation:{cardShadow:"xl"},spacing:{density:"spacious"},card:{width:"wide"}}}};var ze=(e,t,n)=>Math.min(n,Math.max(t,e));function Qo(e){if(!e||typeof e!="string")return null;let t=e.trim().toLowerCase();if(t==="transparent")return{r:0,g:0,b:0,a:0};let n=/^#([0-9a-f]{3,8})$/.exec(t);if(n){let i=n[1];if((i.length===3||i.length===4)&&(i=[...i].map(d=>d+d).join("")),i.length!==6&&i.length!==8)return null;let c=d=>parseInt(i.slice(d,d+2),16);return{r:c(0),g:c(2),b:c(4),a:i.length===8?c(6)/255:1}}let o=/^rgba?\(([^)]+)\)$/.exec(t);if(!o)return null;let a=o[1].replace("/"," ").split(/[\s,]+/).filter(Boolean);if(a.length<3)return null;let r=i=>i.endsWith("%")?parseFloat(i)/100*255:parseFloat(i),s=i=>i===void 0?1:i.endsWith("%")?parseFloat(i)/100:parseFloat(i),l={r:ze(r(a[0]),0,255),g:ze(r(a[1]),0,255),b:ze(r(a[2]),0,255),a:ze(s(a[3]),0,1)};return[l.r,l.g,l.b,l.a].some(Number.isNaN)?null:l}function er(e){let t=n=>{let o=n/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4};return .2126*t(e.r)+.7152*t(e.g)+.0722*t(e.b)}function tr(e){let t=Qo(e);return t?er(t):null}function bn(e){var t;return((t=tr(e))!=null?t:0)>.179?"#111827":"#ffffff"}var nr=["primary","accent","danger","success"],Y=e=>JSON.parse(JSON.stringify(e));function yn(e){if(!e||typeof e!="object"||Array.isArray(e))return{};if(pn(e))return Y(e);let t={};for(let[n,o]of Object.entries(e))o!==void 0&&dn(n,o)&&(t[n]=Y(o));return t}function hn(e,t){if(!t)return e;let n={...e};for(let[o,a]of Object.entries(t))a!==void 0&&(n[o]=a);return t.primary&&!t.primaryInk&&(n.primaryInk=bn(t.primary)),n}function pt(e,t,n){var r,s,l;t.colorScheme&&(e.colorScheme=t.colorScheme);let o=e.palette;e.palette=hn(e.palette,t.palette);let a=t.paletteDark?{...t.paletteDark}:void 0;if(n.carryBrand&&t.palette){for(let i of nr){let c=t.palette[i];c&&c!==o[i]&&!((r=t.paletteDark)!=null&&r[i])&&(a={...a!=null?a:{},[i]:c})}t.palette.primaryInk&&!((s=t.paletteDark)!=null&&s.primaryInk)&&(a!=null&&a.primary)&&(a.primaryInk=t.palette.primaryInk)}if(e.paletteDark=hn(e.paletteDark,a),t.typography){let i=t.typography;e.typography={...e.typography,...G(i),headingFont:(l=i.headingFont)!=null?l:i.font?i.font:e.typography.headingFont}}if(t.shape&&(e.shape={...e.shape,...G(t.shape)}),t.elevation&&(e.elevation={...e.elevation,...G(t.elevation)}),t.spacing&&(e.spacing={...e.spacing,...G(t.spacing)}),t.card&&(e.card={...e.card,...G(t.card)}),t.layout&&(e.layout={...e.layout,...G(t.layout)}),t.buttons&&(e.buttons={...e.buttons,...G(t.buttons)}),t.inputs&&(e.inputs={...e.inputs,...G(t.inputs)}),t.background&&(e.background=Y(t.background)),t.backgroundDark)e.backgroundDark=Y(t.backgroundDark);else if(t.background&&n.carryBrand){let i={};t.background.gradient&&(i.gradient=Y(t.background.gradient)),t.background.image&&(i.image=Y(t.background.image)),t.background.pattern&&(i.pattern=t.background.pattern),e.backgroundDark=i}t.logo&&(e.logo=Y(t.logo))}function G(e){let t={};for(let[n,o]of Object.entries(e))o!==void 0&&(t[n]=o);return t}function ut(e){return typeof e=="string"&&We.includes(e)}function pe(e){let t=yn(e),n=ut(t.preset)?t.preset:"minimal",o=Y(gn);return o.preset=n,pt(o,mn[n].design,{carryBrand:!1}),pt(o,t,{carryBrand:!0}),o}function kn(e,t){let n=pe(e),o=yn(t);return delete o.preset,pt(n,o,{carryBrand:!0}),n}function ft(e){var a,r,s,l,i,c,d,p,u,m,h,y,k,C;let t=(O,b,_)=>typeof b=="string"&&O.includes(b)?b:_,n=(a=e==null?void 0:e.background)!=null?a:{},o={"data-atlas-layout":t(De,(r=e==null?void 0:e.layout)==null?void 0:r.position,"center"),"data-atlas-split-side":t(Le,(s=e==null?void 0:e.layout)==null?void 0:s.splitImageSide,"left"),"data-atlas-logo":t(Oe,(l=e==null?void 0:e.layout)==null?void 0:l.logoPlacement,"card"),"data-atlas-logo-size":t(Me,(i=e==null?void 0:e.layout)==null?void 0:i.logoSize,"md"),"data-atlas-card":t(Pe,(c=e==null?void 0:e.card)==null?void 0:c.style,"solid"),"data-atlas-card-width":t(Ie,(d=e==null?void 0:e.card)==null?void 0:d.width,"normal"),"data-atlas-shadow":t(Te,(p=e==null?void 0:e.elevation)==null?void 0:p.cardShadow,"md"),"data-atlas-density":t(Re,(u=e==null?void 0:e.spacing)==null?void 0:u.density,"comfortable"),"data-atlas-button":t(Fe,(m=e==null?void 0:e.buttons)==null?void 0:m.style,"solid"),"data-atlas-social":t(Ne,(h=e==null?void 0:e.buttons)==null?void 0:h.socialLayout,"list"),"data-atlas-input":t(Be,(y=e==null?void 0:e.inputs)==null?void 0:y.style,"outline"),"data-atlas-pattern":t(le,n.pattern,"none"),"data-atlas-pattern-dark":t(le,(k=e==null?void 0:e.backgroundDark)==null?void 0:k.pattern,"none"),"data-atlas-letter-case":t(Ae,(C=e==null?void 0:e.typography)==null?void 0:C.letterCase,"none")};return((e==null?void 0:e.colorScheme)==="dark"||(e==null?void 0:e.colorScheme)==="light")&&(o["data-atlas-theme"]=e.colorScheme),o}function vn(e){var n,o;let t=new Set;for(let a of[(n=e==null?void 0:e.typography)==null?void 0:n.font,(o=e==null?void 0:e.typography)==null?void 0:o.headingFont]){let r=sn(a);r&&t.add(r)}return[...t]}function gt(){try{return typeof process!="undefined"&&!1}catch{return!1}}var Sn=e=>{gt()&&console.warn(`[atlas] ${e}`)},xn=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function or(e,t=Sn,n="design"){return e!=null&&(typeof e!="object"||Array.isArray(e))?(t(`${n} must be an object; ignored.`),{}):un(e,o=>t(o.message==="Unknown setting."&&o.path.split(".").length===n.split(".").length+1?`${o.path} is not a design setting; ignored.`:`${o.path} is invalid; ignored.`),n)}function wn(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return t.toString(36)}var rr=/^(?:https:\/\/[A-Za-z0-9.-]+(?::\d{1,5})?|http:\/\/(?:localhost|127\.0\.0\.1)(?::\d{1,5})?)$/;function ar(e,t){let n=(t!=null?t:"").replace(/\/+$/,"");return n&&!rr.test(n)?[]:vn(e).map(o=>`${n}${o}`)}function sr(e){if(!(!xn(e)||!xn(e.resolved)))return e.resolved}function _n(e){var c,d,p;let t=(c=e.warn)!=null?c:Sn,n=sr(e.instance),o=or(e.design,t,"appearance.design"),a,r=(d=e.preset)!=null?d:o.preset;r!==void 0&&(ut(r)?a=r:t(`appearance.preset "${String(r)}" is not a preset; ignored.`));let s=a!==void 0||Object.keys(o).some(u=>u!=="preset");if(!n&&!s)return null;let l=a?pe({preset:a}):n?pe(n):pe({}),i=dt((p=e.tokensDesign)!=null?p:{},o);return kn(l,i)}function En(e,t){return ar(e,t)}var Cn=new Set,An=e=>{var t;!gt()||Cn.has(e)||(Cn.add(e),(t=globalThis.console)==null||t.warn(`[atlas] ${e}`))};function Tn(e){var o,a;if(!e||typeof e!="object")return null;let t=e,n=(a=t.design)!=null?a:(o=t.appearance)==null?void 0:o.design;return n&&typeof n=="object"&&n.resolved?n:null}function Rn(e,t,n,o){var a,r;for(let s of(a=o==null?void 0:o.attributes)!=null?a:[])s in n.attributes||t.removeAttribute(s);for(let s of(r=o==null?void 0:o.style)!=null?r:[])s in n.style||t.style.removeProperty(s);for(let[s,l]of Object.entries(n.style))t.style.setProperty(s,l);for(let[s,l]of Object.entries(n.attributes))t.setAttribute(s,l);if(n.css&&!Array.from(e.head.querySelectorAll("style[data-atlas-design]")).some(l=>l.getAttribute("data-atlas-design")===n.key)){let l=e.createElement("style");l.setAttribute("data-atlas-design",n.key),l.textContent=n.css,e.head.appendChild(l)}if(n.fontStylesheets.length){let s=new Set(Array.from(e.head.querySelectorAll("link[data-atlas-font]")).map(l=>l.getAttribute("href")));for(let l of n.fontStylesheets){if(s.has(l))continue;let i=e.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",l),i.setAttribute("data-atlas-font",""),e.head.appendChild(i)}}return{attributes:Object.keys(n.attributes),style:Object.keys(n.style)}}function Pn(e,t,n={}){var p;let o=_n({instance:(t==null?void 0:t.instanceDesign)===!1?null:e,preset:t==null?void 0:t.preset,design:t==null?void 0:t.design,warn:An});if(!o)return null;let r=o.colorScheme==="dark"||o.colorScheme==="auto"&&!!n.prefersDark?o.paletteDark:o.palette,s={colorPrimary:r.primary,colorText:r.text,colorBackground:r.background,colorAccent:r.accent,colorCard:r.surface,colorBorder:r.border,borderRadius:`${Math.min(o.shape.controlRadius,24)}px`,fontFamily:at(o.typography.font)};for(let[u,m]of Object.entries((p=t==null?void 0:t.variables)!=null?p:{}))m!==void 0&&(s[u]=m);let l=o.elevation.cardShadow==="xl"?"lg":o.elevation.cardShadow,i={buttonStyle:o.buttons.style==="gradient"?"solid":o.buttons.style,shadow:o.card.style==="outline"||o.card.style==="none"?"none":l,density:o.spacing.density==="compact"?"compact":"comfortable",inputStyle:o.inputs.style},c=o.buttons.socialLayout==="icons"?{variant:"icon",layout:"grid"}:{layout:o.buttons.socialLayout==="grid"?"grid":"list"},d=wn(JSON.stringify(o));return{render:{style:{},attributes:{...ft(o),"data-atlas-design":d},css:"",key:d,fontStylesheets:En(o,n.frontendApi)},tokens:s,interaction:i,socialButtons:c,resolved:o}}var In=new Set(["bluesky"]),Dn='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg>',Ln='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 18l6-6-6-6"/></svg>',Q={"sign-in":{title:"Sign in",submit:"Continue"},"sign-up":{title:"Create your account",submit:"Continue"}};function w(e){var t;return(t=e.root.ownerDocument)!=null?t:document}function f(e,t,n,o){let a=w(e).createElement(t);return n&&(a.className=n),o!=null&&(a.textContent=o),(a.classList.contains("atlas-embed-button")||a.classList.contains("atlas-embed-social-button"))&&ir(e,a),a}function v(e,t,n){return Gt(t,n,e.options.appearance)}function ir(e,t){e.interaction.buttonEffect!=="ripple"||!e.interaction.animations||t.addEventListener("pointerdown",n=>{let o=t.getBoundingClientRect(),a=Math.max(o.width,o.height),r=w(e).createElement("span");r.className="atlas-embed-ripple",r.style.width=r.style.height=`${a}px`,r.style.left=`${n.clientX-o.left-a/2}px`,r.style.top=`${n.clientY-o.top-a/2}px`,r.addEventListener("animationend",()=>r.remove()),t.appendChild(r)})}function re(e,t){let n=f(e,"button",v(e,"buttonPrimary","atlas-embed-button"));if(n.type="submit",n.disabled=e.busy,e.busy){n.setAttribute("data-busy",""),n.setAttribute("aria-label",t);let o=f(e,"span","atlas-embed-btn-spinner");o.setAttribute("aria-hidden","true"),n.appendChild(o)}else n.textContent=t;return n}function On(e,t=typeof window!="undefined"?window.location.origin:""){if(!e||typeof e!="string")return null;if(e.startsWith("/")&&!e.startsWith("//"))try{return t?new URL(e,t).toString():e}catch{return null}let n;try{n=new URL(e)}catch{return null}return t&&n.origin===t||n.protocol==="https:"?n.toString():null}var lr=new Set(["turnstile","hcaptcha","recaptcha","recaptcha_v3","recaptcha_enterprise"]);function mt(e){return!!e&&lr.has(e)}function Mn(e){return!!e&&e.enabled===!0&&mt(e.provider)}var cr={turnstile:{src:()=>"https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",global:"turnstile"},hcaptcha:{src:()=>"https://js.hcaptcha.com/1/api.js?render=explicit",global:"hcaptcha"},recaptcha:{src:()=>"https://www.google.com/recaptcha/api.js?render=explicit",global:"grecaptcha"},recaptcha_v3:{src:e=>`https://www.google.com/recaptcha/api.js?render=${encodeURIComponent(e)}`,global:"grecaptcha"},recaptcha_enterprise:{src:e=>`https://www.google.com/recaptcha/enterprise.js?render=${encodeURIComponent(e)}`,global:"grecaptcha"}};function dr(e,t,n){let o=cr[e];if(!o)return Promise.reject(new Error(`captcha: ${e} is not renderable`));if(n[o.global])return Promise.resolve(n[o.global]);let a=n.document,r=`__atlasCaptchaLoad_${e}`,s=n[r];if(s)return s;let l=new Promise((i,c)=>{var m,h;let d=()=>{n[o.global]?i(n[o.global]):c(new Error(`captcha: ${e} script loaded but global missing`))},p=o.src(t),u=a.querySelector(`script[src="${p}"]`);if(u){if(n[o.global])return i(n[o.global]);u.addEventListener("load",d,{once:!0}),u.addEventListener("error",()=>c(new Error(`captcha: ${e} script failed`)),{once:!0});return}u=a.createElement("script"),u.src=p,u.async=!0,u.defer=!0,u.addEventListener("load",d,{once:!0}),u.addEventListener("error",()=>c(new Error(`captcha: ${e} script failed`)),{once:!0}),((h=(m=a.head)!=null?m:a.body)!=null?h:a.documentElement).appendChild(u)});return n[r]=l,l}function pr(e,t,n,o){return new Promise((a,r)=>{let s=e.render(t,{sitekey:n,appearance:o==="invisible"?"interaction-only":"always",callback:l=>a(l),"error-callback":()=>r(new Error("captcha: turnstile error")),"timeout-callback":()=>r(new Error("captcha: turnstile timeout"))});o==="invisible"&&e.execute&&e.execute(s)})}function ur(e,t,n,o){return new Promise((a,r)=>{let s=e.render(t,{sitekey:n,size:o==="invisible"?"invisible":"normal",callback:l=>a(l),"error-callback":()=>r(new Error("captcha: hcaptcha error"))});if(o==="invisible"){let l=e.execute(s,{async:!0});l&&typeof l.then=="function"&&l.then(i=>a(i.response),r)}})}function fr(e,t,n,o){return new Promise((a,r)=>{let s=e.render(t,{sitekey:n,size:o==="invisible"?"invisible":"normal",callback:l=>a(l),"error-callback":()=>r(new Error("captcha: recaptcha error"))});if(o==="invisible"&&e.execute){let l=e.execute(void 0,{widgetId:s});l&&typeof l.then=="function"&&l.then(a,r)}})}function gr(e,t){let n=()=>{let o=e.execute(t,{action:"submit"});return o&&typeof o.then=="function"?o:Promise.reject(new Error("captcha: recaptcha v3 execute returned no promise"))};return new Promise((o,a)=>{e.ready?e.ready(()=>n().then(o,a)):n().then(o,a)})}async function Fn(e,t){var l,i,c,d,p;let n=(l=e.provider)!=null?l:"",o=(i=e.siteKey)!=null?i:"",a=(c=e.widget)!=null?c:"managed",r=(p=(d=t.ownerDocument)==null?void 0:d.defaultView)!=null?p:globalThis,s=await dr(n,o,r);switch(n){case"turnstile":return pr(s,t,o,a);case"hcaptcha":return ur(s,t,o,a);case"recaptcha":return fr(s,t,o,a);case"recaptcha_v3":case"recaptcha_enterprise":return gr(s,o);default:throw new Error(`captcha: ${n} is not renderable`)}}async function bt(e,t,n=!1){var l,i,c;let o=e.captchaFlows[t];if(!(n?!!o&&mt(o.provider):Mn(o))||!o)return null;let r=(l=e.root.ownerDocument)!=null?l:document,s=r.createElement("div");s.className="atlas-embed-captcha",((c=(i=e.root.parentElement)!=null?i:r.body)!=null?c:r.documentElement).appendChild(s);try{return await Fn(o,s)}catch{return null}finally{s.remove()}}async function Bn(e){var o,a;let t=(a=(o=e.root.ownerDocument)==null?void 0:o.defaultView)!=null?a:typeof window!="undefined"?window:null;if(!t)return!1;let n=Et(t.location.search);return n?n.ticket?(await ae(e,n.attemptId,n.ticket),Nn(e,t),await $(e,n.attemptId),!0):(n.status&&(e.state=be({id:n.attemptId,status:n.status}),Nn(e,t)),!1):!1}function Nn(e,t){try{t.history.replaceState({},t.document.title,ge(t.location.href))}catch{}}async function ae(e,t,n){e.options.preview||await e.client.post("/v1/client/tickets/exchange",{attempt_id:t,ticket:n,remember:e.remember})}async function $(e,t){var a,r;let n=(r=(a=e.root.ownerDocument)==null?void 0:a.defaultView)!=null?r:typeof window!="undefined"?window:null,o=On(e.options.redirect,n?n.location.origin:void 0);if(e.root.dispatchEvent(new CustomEvent("atlas:complete",{bubbles:!0,detail:{attemptId:t,redirected:!!o}})),e.options.preview){ue(e,"Sign-in works \u2014 this is a preview, so no session was created.");return}if(o&&n){n.location.assign(o);return}ue(e,"You are signed in.")}function fe(e,t){Mt({api:e.options.frontendApi,publishableKey:e.options.publishableKey,attemptId:t!=null?t:void 0,kind:e.mode==="sign-up"?"sign_up":"sign_in",recorder:e.recorder,fetchImpl:e.options.fetchImpl})}async function Wn(e,t){var r,s,l,i,c;if(e.busy)return;if((r=e.conditionalAbort)==null||r.abort(),e.flash=null,typeof t.identifier=="string"&&t.identifier.trim()&&(e.enteredIdentifier=t.identifier.trim()),e.busy=!0,fe(e,(s=e.state.attempt)==null?void 0:s.id),S(e),e.state=await he(e.client,e.state,t),e.state.attempt&&j(e.state.attempt).kind==="collect_captcha"){let d=await bt(e,"signIn",!0);d&&(e.state=await he(e.client,e.state,{identifier:(i=(l=e.enteredIdentifier)!=null?l:t.identifier)!=null?i:"",captcha_token:d}))}let n=e.state.attempt?j(e.state.attempt):null;(n==null?void 0:n.kind)==="collect_first_factor"&&t.password&&e.state.errors.length===0&&(e.state=await he(e.client,e.state,{password:t.password})),e.busy=!1;let o=e.state.attempt?j(e.state.attempt):null;e.mode==="sign-in"&&e.passwordEnabled&&(o==null?void 0:o.kind)==="collect_first_factor"&&(e.state={...M,errors:e.state.errors});let a=e.state.attempt;if((a==null?void 0:a.status)==="complete"){let d=(c=a.id)!=null?c:null;e.state.ticket&&d&&await ae(e,d,e.state.ticket),await $(e,d);return}S(e)}async function Ue(e,t,n){var l,i,c;fe(e);let o=(i=(l=e.root.ownerDocument)==null?void 0:l.defaultView)!=null?i:typeof window!="undefined"?window:null,a=o?ge(o.location.href):e.options.frontendApi,r=await e.client.post("/v1/client/sign_ins/oauth",{provider:t,redirect_url:a,...n?{identifier:n}:{}}),s=(c=r.data)==null?void 0:c.authorization_url;s&&o?o.location.assign(s):(e.handlePrompt=null,U(e,r.errors))}async function ht(e,t,n={}){var l,i,c;fe(e);let o=(i=(l=e.root.ownerDocument)==null?void 0:l.defaultView)!=null?i:typeof window!="undefined"?window:null,a=o?ge(o.location.href):e.options.frontendApi;if(n.popup&&o){await br(e,t,o,a);return}let r=await e.client.post("/v1/client/sign_ins/sso",{connection_id:t,redirect_url:a}),s=(c=r.data)==null?void 0:c.authorization_url;s&&o?o.location.assign(s):U(e,r.errors)}function mr(e){let t=e.options.frontendApi;try{return new URL(/^https?:\/\//.test(t)?t:`https://${t}`).origin}catch{return t}}async function br(e,t,n,o){var p;let a=n.open("about:blank","atlas-sso","width=480,height=640,menubar=no,toolbar=no,location=no,status=no");if(!a){await ht(e,t);return}let r=o.includes("?")?"&":"?",s=`${o}${r}__atlas_display=popup`,l=mr(e),i=u=>{if(u.origin!==l)return;let m=u.data;if(!(!m||m.type!=="atlas-sso")){n.removeEventListener("message",i);try{a.close()}catch{}if(m.error){U(e,[{code:"sso_popup_cancelled",message:"Sign-in was cancelled."}]);return}if(m.status==="complete"&&m.ticket&&m.attempt_id){let h=m.attempt_id,y=m.ticket;(async()=>(await ae(e,h,y),await $(e,h)))();return}m.attempt_id&&m.status&&(e.state=be({id:m.attempt_id,status:m.status}),S(e))}};n.addEventListener("message",i);let c=await e.client.post("/v1/client/sign_ins/sso",{connection_id:t,redirect_url:s}),d=(p=c.data)==null?void 0:p.authorization_url;if(d)try{a.location.assign(d)}catch{try{a.close()}catch{}n.removeEventListener("message",i),n.location.assign(d)}else{n.removeEventListener("message",i);try{a.close()}catch{}U(e,c.errors)}}async function Hn(e,t,n){let o=await e.client.post("/v1/client/sign_ins/id_token",Rt({provider:t,idToken:n})),a=Pt(o.data);if(!a){U(e,o.errors);return}if(a.status==="complete"&&a.ticket){await ae(e,a.attemptId,a.ticket),await $(e,a.attemptId);return}e.state=be({id:a.attemptId,status:a.status}),S(e)}function zn(e){e.resetFlow={...Ze},S(e)}async function Un(e,t){var o,a;if(e.busy||!e.resetFlow)return;if(e.busy=!0,fe(e),S(e),oe(e.resetFlow)==="request"){typeof t.email=="string"&&t.email.trim()&&(e.enteredIdentifier=t.email.trim());let r=await bt(e,"passwordReset");e.resetFlow=await Ft(e.client,(o=t.email)!=null?o:"",r!=null?r:void 0)}else e.resetFlow=await Nt(e.client,e.resetFlow,{code:t.code,password:t.password});e.busy=!1;let n=e.resetFlow;if(((a=n==null?void 0:n.attempt)==null?void 0:a.status)==="complete"){let r=n.attempt.id;e.resetFlow=null,n.ticket?(await ae(e,r,n.ticket),await $(e,r)):(e.flash="Password updated. Sign in with your new password.",e.state=M,S(e));return}S(e)}async function $n(e,t,n=!0){var c;if(e.busy)return;e.busy=!0,fe(e),S(e);let{identifier:o,password:a,...r}=t,s={};for(let[d,p]of Object.entries(r))p&&(s[d]=p);let l=await bt(e,"signUp");e.state=await Ct(e.client,{email:o!=null?o:"",password:a!=null?a:"",fields:s,consent:n,captchaToken:l!=null?l:void 0}),e.busy=!1;let i=e.state.attempt;if((i==null?void 0:i.status)==="complete"){let d=(c=i.id)!=null?c:null;e.state.ticket&&d&&await ae(e,d,e.state.ticket),await $(e,d);return}S(e)}function jn(e){var u;let t=e.resetFlow,n=oe(t),o=f(e,"div","atlas-embed-reset");o.appendChild(f(e,"h1",v(e,"title","atlas-embed-title"),"Reset your password"));let a=w(e).createElement("form"),r=t.errors,s=new Map,l=r.find(m=>!m.param);l&&a.appendChild(f(e,"div","atlas-embed-form-error",l.message));let i=null,c="Continue",d=!0;switch(n){case"request":i="Enter your email and we\u2019ll send you a reset code.",c="Send reset code",$e(e,a,s,r,"email","Email address","email","username");{let m=s.get("email");m&&(e.enteredIdentifier&&(m.value=e.enteredIdentifier),m.setAttribute("data-atlas-autofocus",""))}break;case"collect_email_code":i=e.enteredIdentifier?`Enter the code we sent to ${e.enteredIdentifier}`:"Enter the code we sent to your email",yt(e,a,s,r,"code","Reset code",!0);break;case"collect_second_factor":i="Enter the code from your authenticator app",yt(e,a,s,r,"code","Two-factor code",!0);break;case"collect_new_password":i="Choose a new password",c="Set new password",$e(e,a,s,r,"password","New password","password","new-password"),(u=s.get("password"))==null||u.setAttribute("data-atlas-autofocus","");break;default:d=!1,a.appendChild(f(e,"p","atlas-embed-note","You\u2019re all set."))}i&&o.appendChild(f(e,"p",v(e,"subtitle","atlas-embed-subtitle"),i)),o.appendChild(a),d&&a.appendChild(re(e,c));let p=f(e,"button","atlas-embed-step-back","Back to sign in");return p.type="button",p.addEventListener("click",()=>{e.resetFlow=null,S(e)}),a.appendChild(p),a.addEventListener("submit",m=>{m.preventDefault();let h={};for(let[y,k]of s)h[y]=k.value;Un(e,h)}),o}function $e(e,t,n,o,a,r,s,l){let i=f(e,"label",v(e,"field","atlas-embed-field"));i.appendChild(f(e,"span",v(e,"label","atlas-embed-label"),r));let c=w(e).createElement("input");if(c.className=v(e,"input","atlas-embed-input"),c.type=s,c.name=a,c.setAttribute("autocomplete",l),s==="password"){let d=f(e,"div","atlas-embed-password");d.appendChild(c);let p=f(e,"button","atlas-embed-password-toggle","Show");p.type="button",p.setAttribute("aria-label","Show password"),p.addEventListener("click",u=>{u.preventDefault();let m=c.type==="password";c.type=m?"text":"password",p.textContent=m?"Hide":"Show",p.setAttribute("aria-label",m?"Hide password":"Show password")}),d.appendChild(p),i.appendChild(d)}else i.appendChild(c);for(let d of o.filter(p=>p.param===a))i.appendChild(f(e,"span",v(e,"error","atlas-embed-error"),d.message));n.set(a,c),t.appendChild(i)}function yt(e,t,n,o,a,r,s){var h;if(e.codeInputStyle==="single"){$e(e,t,n,o,a,r,"text","one-time-code"),s&&((h=n.get(a))==null||h.setAttribute("data-atlas-autofocus",""));return}let i=f(e,"div",v(e,"field","atlas-embed-field"));i.appendChild(f(e,"span",v(e,"label","atlas-embed-label"),r));let c=f(e,"div","atlas-embed-code");c.setAttribute("role","group"),c.setAttribute("aria-label",r);let d=w(e).createElement("input");d.type="hidden",d.name=a,n.set(a,d);let p=[],u=()=>{d.value=p.map(y=>y.value).join("")},m=()=>{d.value.length!==6||e.busy||t.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))};for(let y=0;y<6;y++){let k=w(e).createElement("input");k.className="atlas-embed-code-box",k.type="text",k.setAttribute("inputmode","numeric"),k.setAttribute("autocomplete",y===0?"one-time-code":"off"),k.setAttribute("aria-label",`${r} digit ${y+1}`),k.maxLength=1,s&&y===0&&k.setAttribute("data-atlas-autofocus",""),k.addEventListener("input",()=>{k.value=k.value.replace(/\D/g,"").slice(0,1),u(),k.value&&y<5&&p[y+1].focus(),m()}),k.addEventListener("keydown",C=>{C.key==="Backspace"&&!k.value&&y>0&&p[y-1].focus()}),k.addEventListener("paste",C=>{var b,_,D;C.preventDefault();let O=((_=(b=C.clipboardData)==null?void 0:b.getData("text"))!=null?_:"").replace(/\D/g,"").slice(0,6);for(let A=0;A<6;A++)p[A].value=(D=O[A])!=null?D:"";u(),p[Math.min(O.length,5)].focus(),m()}),p.push(k),c.appendChild(k)}i.appendChild(c),i.appendChild(d);for(let y of o.filter(k=>k.param===a))i.appendChild(f(e,"span",v(e,"error","atlas-embed-error"),y.message));t.appendChild(i)}function Kn(e,t){let n=w(e).createElement("form"),o=e.state.errors.find(d=>!d.param);o&&n.appendChild(f(e,"div","atlas-embed-form-error",o.message));let a=new Map,r=e.state.errors,s=(d,p,u,m)=>$e(e,n,a,r,d,p,u,m),l=(d,p,u)=>yt(e,n,a,r,d,p,u),i=!0;switch(t){case"collect_identifier":if(s("identifier","Email address","email",e.passkeyEnabled&&ne()?"username webauthn":"username"),e.enteredIdentifier&&(a.get("identifier").value=e.enteredIdentifier),e.mode==="sign-in"&&e.passwordEnabled&&s("password","Password","password","current-password"),e.mode==="sign-in"&&e.rememberMeEnabled){let d=f(e,"label","atlas-embed-remember"),p=w(e).createElement("input");p.type="checkbox",p.className="atlas-embed-remember-check",p.checked=e.remember,p.addEventListener("change",()=>{e.remember=p.checked}),d.appendChild(p),d.appendChild(f(e,"span","atlas-embed-remember-text","Remember me")),n.appendChild(d)}break;case"collect_first_factor":s("password","Password","password","current-password");break;case"collect_second_factor":if(e.backupCodeMode?s("code","Backup code","text","one-time-code"):l("code","Two-factor code",!0),e.trustedDeviceEnabled){let d=f(e,"label","atlas-embed-remember"),p=w(e).createElement("input");p.type="checkbox",p.className="atlas-embed-remember-check",p.checked=e.rememberDevice,p.addEventListener("change",()=>{e.rememberDevice=p.checked}),d.appendChild(p),d.appendChild(f(e,"span","atlas-embed-remember-text","Remember this device")),n.appendChild(d)}break;case"collect_email_code":l("code","Verification code",!0);break;case"collect_new_password":s("password","New password","password","new-password");break;case"enroll_second_factor":l("code","Authenticator code",!0),l("secondCode","Next code",!1);break;default:i=!1,n.appendChild(f(e,"p","atlas-embed-note","Please continue in your application."))}if(i&&n.appendChild(re(e,Q[e.mode].submit)),t==="collect_second_factor"){let d=f(e,"button","atlas-embed-step-back",e.backupCodeMode?"Use your authenticator app":"Use a backup code instead");d.type="button",d.addEventListener("click",()=>{e.backupCodeMode=!e.backupCodeMode,S(e)}),n.appendChild(d)}if(t==="collect_identifier"&&e.mode==="sign-in"&&e.passwordEnabled||t==="collect_first_factor"){let d=f(e,"button","atlas-embed-step-back","Forgot password?");d.type="button",d.addEventListener("click",()=>zn(e)),n.appendChild(d)}return n.addEventListener("submit",d=>{d.preventDefault();let p={};for(let[u,m]of a)p[u]=m.value;t==="collect_second_factor"&&e.trustedDeviceEnabled&&e.rememberDevice&&(p.remember_device="true"),Wn(e,p)}),n}function hr(e){var i;let t=(i=e.appearance)==null?void 0:i.legal;if(!t||!t.termsUrl&&!t.privacyUrl)return null;let n=w(e),o=f(e,"div","atlas-embed-consent"),a=null;t.required&&(a=n.createElement("input"),a.type="checkbox",a.className="atlas-embed-consent-check",a.setAttribute("aria-label","Agree to the terms and privacy policy"),o.appendChild(a));let r=f(e,"span","atlas-embed-consent-text"),s=(c,d)=>{let p=n.createElement("a");return p.href=c,p.textContent=d,p.target="_blank",p.rel="noopener noreferrer",p.className="atlas-embed-consent-link",p};r.appendChild(n.createTextNode(t.required?"I agree to the ":"By continuing you agree to the "));let l=[];return t.termsUrl&&l.push(s(t.termsUrl,"Terms of Service")),t.privacyUrl&&l.push(s(t.privacyUrl,"Privacy Policy")),l.forEach((c,d)=>{d>0&&r.appendChild(n.createTextNode(" and ")),r.appendChild(c)}),r.appendChild(n.createTextNode(".")),o.appendChild(r),{row:o,checkbox:a}}function Vn(e){var i;let t=w(e).createElement("form"),n=e.state.errors.find(c=>!c.param);n&&t.appendChild(f(e,"div","atlas-embed-form-error",n.message));let o=new Map,a=(c,d,p)=>{var k,C,O;let u=(k=p.type)!=null?k:"text",m=u==="radio"||u==="multiselect",h=f(e,m?"fieldset":"label",v(e,"field","atlas-embed-field"));h.appendChild(f(e,m?"legend":"span",v(e,"label","atlas-embed-label"),p.required?d:`${d} (optional)`));let y=w(e);if(u==="select"){let b=y.createElement("select");b.className=v(e,"input","atlas-embed-input"),b.name=c;let _=y.createElement("option");_.value="",_.textContent=p.placeholder||"Select\u2026",b.appendChild(_);for(let D of(C=p.options)!=null?C:[]){let A=y.createElement("option");A.value=D,A.textContent=D,b.appendChild(A)}h.appendChild(b),o.set(c,()=>b.value)}else if(u==="textarea"){let b=y.createElement("textarea");b.className=v(e,"input","atlas-embed-input"),b.name=c,b.rows=3,p.placeholder&&b.setAttribute("placeholder",p.placeholder),h.appendChild(b),o.set(c,()=>b.value)}else if(u==="checkbox"){let b=y.createElement("input");b.type="checkbox",b.name=c,b.className="atlas-embed-checkbox",h.classList.add("atlas-embed-field-checkbox"),h.appendChild(b),o.set(c,()=>b.checked?"true":"")}else if(u==="radio"||u==="multiselect"){let b=y.createElement("div");b.className="atlas-embed-choices";let _=[];for(let D of(O=p.options)!=null?O:[]){let A=y.createElement("label");A.className="atlas-embed-choice";let L=y.createElement("input");L.type=u==="radio"?"radio":"checkbox",L.name=c,L.value=D,_.push(L),A.appendChild(L),A.appendChild(f(e,"span",void 0,D)),b.appendChild(A)}h.appendChild(b),o.set(c,()=>{var D,A;return u==="radio"?(A=(D=_.find(L=>L.checked))==null?void 0:D.value)!=null?A:"":_.filter(L=>L.checked).map(L=>L.value).join(", ")})}else{let b=y.createElement("input");b.className=v(e,"input","atlas-embed-input"),b.type=u,b.name=c,p.autocomplete&&b.setAttribute("autocomplete",p.autocomplete),p.placeholder&&b.setAttribute("placeholder",p.placeholder),h.appendChild(b),o.set(c,()=>b.value)}for(let b of e.state.errors.filter(_=>_.param===c))h.appendChild(f(e,"span",v(e,"error","atlas-embed-error"),b.message));t.appendChild(h)};for(let c of e.signUpFields)a(c.key,c.label,{type:c.type,required:c.required,placeholder:c.placeholder,options:c.options});a("identifier","Email address",{type:"email",required:!0,autocomplete:"email"}),a("password","Password",{type:"password",required:!0,autocomplete:"new-password"});let r=hr(e);r&&t.appendChild(r.row);let s=re(e,Q[e.mode].submit),l=()=>!(r!=null&&r.checkbox)||r.checkbox.checked;return s.disabled=e.busy||!l(),(i=r==null?void 0:r.checkbox)==null||i.addEventListener("change",()=>{s.disabled=e.busy||!l()}),t.appendChild(s),t.addEventListener("submit",c=>{c.preventDefault();let d={};for(let[p,u]of o)d[p]=u();$n(e,d,l())}),t}var yr={google:'<path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/><path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/><path fill="#FBBC05" d="M5.84 14.1c-.22-.66-.35-1.36-.35-2.1s.13-1.44.35-2.1V7.06H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.94l3.66-2.84z"/><path fill="#EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84C6.71 7.31 9.14 5.38 12 5.38z"/>',microsoft:'<path fill="#F25022" d="M2 2h9.3v9.3H2z"/><path fill="#7FBA00" d="M12.7 2H22v9.3h-9.3z"/><path fill="#00A4EF" d="M2 12.7h9.3V22H2z"/><path fill="#FFB900" d="M12.7 12.7H22V22h-9.3z"/>'},kr={github:{fill:"currentColor",path:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"},apple:{fill:"currentColor",path:"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"},x:{fill:"currentColor",path:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"},notion:{fill:"currentColor",path:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"},facebook:{fill:"#0866FF",path:"M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z"},discord:{fill:"#5865F2",path:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"},gitlab:{fill:"#FC6D26",path:"m23.6004 9.5927-.0337-.0862L20.3.9814a.851.851 0 0 0-.3362-.405.8748.8748 0 0 0-.9997.0539.8748.8748 0 0 0-.29.4399l-2.2055 6.748H7.5375l-2.2057-6.748a.8573.8573 0 0 0-.29-.4412.8748.8748 0 0 0-.9997-.0537.8585.8585 0 0 0-.3362.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 0 0 2.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 0 0 1.2197 0l1.4995-1.1321 2.4619-1.8633 5.006-3.7489.0125-.01a6.0682 6.0682 0 0 0 2.0094-7.003z"},spotify:{fill:"#1ED760",path:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"},twitch:{fill:"#9146FF",path:"M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"},reddit:{fill:"#FF4500",path:"M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z"},figma:{fill:"#F24E1E",path:"M15.852 8.981h-4.588V0h4.588c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.491-4.49 4.491zM12.735 7.51h3.117c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-3.117V7.51zm0 1.471H8.148c-2.476 0-4.49-2.014-4.49-4.49S5.672 0 8.148 0h4.588v8.981zm-4.587-7.51c-1.665 0-3.019 1.355-3.019 3.019s1.354 3.02 3.019 3.02h3.117V1.471H8.148zm4.587 15.019H8.148c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h4.588v8.98zM8.148 8.981c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h3.117V8.981H8.148zM8.172 24c-2.489 0-4.515-2.014-4.515-4.49s2.014-4.49 4.49-4.49h4.588v4.441c0 2.503-2.047 4.539-4.563 4.539zm-.024-7.51a3.023 3.023 0 0 0-3.019 3.019c0 1.665 1.365 3.019 3.044 3.019 1.705 0 3.093-1.376 3.093-3.068v-2.97H8.148zm7.704 0h-.098c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h.098c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.49-4.49 4.49zm-.097-7.509c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h.098c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-.098z"},dropbox:{fill:"#0061FF",path:"M6 1.807L0 5.629l6 3.822 6.001-3.822L6 1.807zM18 1.807l-6 3.822 6 3.822 6-3.822-6-3.822zM0 13.274l6 3.822 6.001-3.822L6 9.452l-6 3.822zM18 9.452l-6 3.822 6 3.822 6-3.822-6-3.822zM6 18.371l6.001 3.822 6-3.822-6-3.822L6 18.371z"},gitee:{fill:"#C71D23",path:"M11.984 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.016 0zm6.09 5.333c.328 0 .593.266.592.593v1.482a.594.594 0 0 1-.593.592H9.777c-.982 0-1.778.796-1.778 1.778v5.63c0 .327.266.592.593.592h5.63c.982 0 1.778-.796 1.778-1.778v-.296a.593.593 0 0 0-.592-.593h-4.15a.592.592 0 0 1-.592-.592v-1.482a.593.593 0 0 1 .593-.592h6.815c.327 0 .593.265.593.592v3.408a4 4 0 0 1-4 4H5.926a.593.593 0 0 1-.593-.593V9.778a4.444 4.444 0 0 1 4.445-4.444h8.296Z"}};function Gn(e){let t=yr[e];if(t)return`<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true" focusable="false">${t}</svg>`;let n=kr[e];return n?`<svg viewBox="0 0 24 24" width="18" height="18" fill="${n.fill}" aria-hidden="true" focusable="false"><path d="${n.path}"/></svg>`:null}async function Yn(e){var a,r,s;if(e.busy)return;(a=e.conditionalAbort)==null||a.abort(),e.busy=!0,S(e);let t=await e.client.post("/v1/client/sign_ins/passkey/begin",{});if(!t.ok||!t.data){e.busy=!1,U(e,t.errors);return}let n;try{n=await Ge(t.data)}catch{e.busy=!1,S(e);return}let o=await e.client.post("/v1/client/sign_ins/passkey/finish",n);if(e.busy=!1,o.ok&&((r=o.data)==null?void 0:r.status)==="complete"){await $(e,(s=o.data.created_session_id)!=null?s:null);return}U(e,o.errors)}async function qn(e){var o,a,r;if(e.mode!=="sign-in"||!e.passkeyEnabled||!ne())return;let t=!1;try{t=await Lt()}catch{t=!1}if(!t)return;(o=e.conditionalAbort)==null||o.abort();let n=new AbortController;e.conditionalAbort=n;try{let s=await e.client.post("/v1/client/sign_ins/passkey/begin",{});if(!s.ok||!s.data||n.signal.aborted)return;let l=await Ge(s.data,{mediation:"conditional",signal:n.signal});if(n.signal.aborted)return;let i=await e.client.post("/v1/client/sign_ins/passkey/finish",l);i.ok&&((a=i.data)==null?void 0:a.status)==="complete"&&await $(e,(r=i.data.created_session_id)!=null?r:null)}catch{}}function Zn(e){let t=f(e,"button",v(e,"socialButton","atlas-embed-social-button"),"Sign in with a passkey");return t.type="button",t.setAttribute("data-atlas-passkey",""),t.disabled=e.busy,t.addEventListener("click",()=>{Yn(e)}),t}function kt(e){let t=[...e.providers];for(let n of e.nativeProviders)t.includes(n.provider)||t.push(n.provider);return t}var vr='<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true" fill="none"><path d="M12 2 3 21h4l5-11 5 11h4L12 2z" fill="currentColor"/></svg>';function xr(e,t){var l;let{variant:n,labels:o}=e.social,a=(l=o.atlas)!=null?l:n==="block"?"Continue with Atlas":"Atlas",r=f(e,"button",v(e,"socialButton","atlas-embed-social-button"));r.type="button",r.setAttribute("data-atlas-provider","atlas"),r.setAttribute("data-variant",n);let s=w(e).createElement("span");if(s.className="atlas-embed-social-icon",s.innerHTML=vr,r.appendChild(s),n==="icon")r.setAttribute("aria-label","Continue with Atlas"),r.setAttribute("title","Atlas");else{let i=w(e).createElement("span");i.className="atlas-embed-social-label",i.textContent=a,r.appendChild(i)}return r.addEventListener("click",()=>{ht(e,t,{popup:!0})}),r}function Jn(e){let t=kt(e),n=f(e,"div","atlas-embed-social");n.setAttribute("data-layout",e.social.layout),n.setAttribute("data-size",e.social.size),n.setAttribute("data-variant",e.social.variant),e.signInWithAtlas.enabled&&e.signInWithAtlas.connection_id&&n.appendChild(xr(e,e.signInWithAtlas.connection_id));for(let c of t){let d=e.nativeProviders.find(u=>u.provider===c),p=c==="google"&&(d!=null&&d.client_id)?_r(e,d.client_id):wr(e,c);p.getAttribute("data-atlas-provider")||p.setAttribute("data-atlas-provider",c),n.appendChild(p)}let o=e.social.layout==="carousel"?Sr(e,n):n;if(!(e.social.search==="always"||e.social.search==="auto"&&t.length>$t))return o;let r=f(e,"div","atlas-embed-social-field"),s=w(e).createElement("input");s.type="search",s.className="atlas-embed-social-search",s.setAttribute("placeholder","Search sign-in options\u2026"),s.setAttribute("aria-label","Search sign-in options"),s.autocomplete="off";let l=f(e,"div","atlas-embed-social-empty");l.textContent="No matching sign-in options.",l.setAttribute("hidden","");let i=Array.from(n.children);return s.addEventListener("input",()=>{var p;let c=s.value.trim().toLowerCase(),d=0;for(let u of i){let m=(p=u.getAttribute("data-atlas-provider"))!=null?p:"",h=c===""||Ce(m).toLowerCase().includes(c)||m.toLowerCase().includes(c);u.toggleAttribute("hidden",!h),h&&(d+=1)}l.toggleAttribute("hidden",d!==0),n.dispatchEvent(new Event("scroll"))}),r.appendChild(s),r.appendChild(o),r.appendChild(l),r}function Sr(e,t){var c;let n=(c=w(e).defaultView)!=null?c:typeof window!="undefined"?window:null,o=f(e,"div","atlas-embed-carousel"),a=d=>{let p=f(e,"button","atlas-embed-carousel-nav");return p.type="button",p.setAttribute("data-dir",d),p.setAttribute("aria-label",d==="prev"?"Scroll to previous sign-in options":"Scroll to more sign-in options"),p.innerHTML=d==="prev"?Dn:Ln,p.addEventListener("click",()=>{let u=Math.max(t.clientWidth*.8,140);typeof t.scrollBy=="function"&&t.scrollBy({left:(d==="prev"?-1:1)*u,behavior:"smooth"})}),p},r=a("prev"),s=a("next"),l=()=>{let d=t.scrollWidth-t.clientWidth,p=d>2;o.setAttribute("data-overflow",p?"true":"false"),r.disabled=!p||t.scrollLeft<=1,s.disabled=!p||t.scrollLeft>=d-1};t.addEventListener("scroll",l,{passive:!0});let i=n&&n.ResizeObserver;return i?new i(l).observe(t):n&&n.addEventListener("resize",l),n!=null&&n.requestAnimationFrame&&n.requestAnimationFrame(l),l(),o.appendChild(r),o.appendChild(t),o.appendChild(s),o}function Xn(e,t,n="button"){var c;let{variant:o,labels:a}=e.social,r=Ce(t),s=(c=a[t])!=null?c:o==="block"?`Continue with ${r}`:r,l=f(e,n,v(e,"socialButton","atlas-embed-social-button"));n==="button"&&(l.type="button"),l.setAttribute("data-atlas-provider",t),l.setAttribute("data-variant",o);let i=Gn(t);if(i){let d=w(e).createElement("span");d.className="atlas-embed-social-icon",d.innerHTML=i,l.appendChild(d)}if(o==="icon")l.setAttribute("aria-label",`Continue with ${r}`),l.setAttribute("title",r);else{let d=w(e).createElement("span");d.className="atlas-embed-social-label",d.textContent=s,l.appendChild(d)}return l}function wr(e,t){let n=Xn(e,t);return n.addEventListener("click",()=>{In.has(t)?(e.handlePrompt=t,S(e)):Ue(e,t)}),n}function Qn(e,t){let n=Ce(t),o=w(e).createElement("form");o.className="atlas-embed-form",o.setAttribute("novalidate","true");for(let i of e.state.errors.filter(c=>!c.param))o.appendChild(f(e,"div","atlas-embed-form-error",i.message));let a=f(e,"label",v(e,"field","atlas-embed-field"));a.appendChild(f(e,"span",v(e,"label","atlas-embed-label"),`${n} handle`));let r=w(e).createElement("input");r.className=v(e,"input","atlas-embed-input"),r.type="text",r.name="identifier",r.placeholder="you.bsky.social",r.setAttribute("autocomplete","username"),r.setAttribute("autocapitalize","none"),r.setAttribute("spellcheck","false"),a.appendChild(r),o.appendChild(a);let s=re(e,Q[e.mode].submit);o.appendChild(s);let l=f(e,"button","atlas-embed-handle-back","Back");return l.type="button",l.addEventListener("click",()=>{e.handlePrompt=null,e.state={...e.state,errors:[]},S(e)}),o.appendChild(l),o.addEventListener("submit",i=>{i.preventDefault();let c=r.value.trim();if(!c){e.state={...e.state,errors:[{code:"validation_error",message:`Enter your ${n} handle.`}]},S(e);return}Ue(e,t,c)}),o}function _r(e,t){let n=Xn(e,"google","div");return n.setAttribute("role","button"),n.setAttribute("tabindex","0"),It({wrapper:n,clientId:t,onCredential:o=>void Hn(e,"google",o),onError:()=>ue(e,"Google sign-in could not start.")}).catch(()=>{n.addEventListener("click",()=>void Ue(e,"google"))}),n}function ue(e,t){e.root.textContent="";let n=f(e,"div",v(e,"card","atlas-embed-card"));n.appendChild(f(e,"p","atlas-embed-note",t)),e.root.appendChild(n)}function eo(e){e.root.textContent="";let t=f(e,"div",v(e,"card","atlas-embed-card")),n=e.interaction.loading,o=f(e,"div","atlas-embed-loading");if(o.setAttribute("data-loading",n),o.setAttribute("role","status"),o.setAttribute("aria-label","Loading"),n==="skeleton")for(let r of["title","sub","input","input","button"])o.appendChild(f(e,"div",`atlas-embed-skel atlas-embed-skel-${r}`));else if(n==="dots")for(let r=0;r<3;r+=1)o.appendChild(f(e,"span","atlas-embed-dot"));else n==="bar"?o.appendChild(f(e,"span","atlas-embed-loadbar")):o.appendChild(f(e,"span","atlas-embed-spinner"));let a=f(e,"span","atlas-embed-sr","Loading\u2026");o.appendChild(a),t.appendChild(o),e.root.appendChild(t)}function U(e,t){e.state={...e.state,errors:[...t]},S(e)}function S(e){var c,d,p,u,m,h,y,k,C,O;e.root.textContent="";let t=f(e,"div",v(e,"card","atlas-embed-card")),n=(d=(c=e.appearance)==null?void 0:c.logoUrl)!=null?d:null;if(n){let b=w(e).createElement("img");b.className="atlas-embed-logo",b.src=n,b.alt=(u=(p=e.appearance)==null?void 0:p.applicationName)!=null?u:"",t.appendChild(b)}if(e.resetFlow){let b=`reset_${oe(e.resetFlow)}`;if(t.setAttribute("data-step",b),b!==e.lastStepKind&&t.setAttribute("data-enter",""),e.lastStepKind=b,t.appendChild(jn(e)),(m=e.appearance)!=null&&m.footer&&t.appendChild(f(e,"p",v(e,"footer","atlas-embed-footer"),e.appearance.footer)),e.root.appendChild(t),t.hasAttribute("data-enter")){let _=t.querySelector("[data-atlas-autofocus]");_ instanceof HTMLElement&&_.focus()}return}let o=e.state.attempt?j(e.state.attempt):{kind:"collect_identifier"},a=e.mode==="sign-up"&&!e.state.attempt,r=a||o.kind==="collect_identifier",s=e.handlePrompt?"handle":o.kind;t.setAttribute("data-step",s),s!==e.lastStepKind&&t.setAttribute("data-enter",""),e.lastStepKind=s;let l=(y=(h=e.appearance)==null?void 0:h.headline)!=null?y:Q[e.mode].title;t.appendChild(f(e,"h1",v(e,"title","atlas-embed-title"),l));let i=r?null:Er(e,o.kind);if(i?t.appendChild(i):(k=e.appearance)!=null&&k.subheadline&&t.appendChild(f(e,"p",v(e,"subtitle","atlas-embed-subtitle"),e.appearance.subheadline)),e.flash&&t.appendChild(f(e,"div","atlas-embed-flash",e.flash)),e.handlePrompt){t.appendChild(Qn(e,e.handlePrompt)),(C=e.appearance)!=null&&C.footer&&t.appendChild(f(e,"p",v(e,"footer","atlas-embed-footer"),e.appearance.footer)),e.root.appendChild(t);return}if(r&&(kt(e).length>0||e.signInWithAtlas.enabled)&&(t.appendChild(Jn(e)),t.appendChild(f(e,"div",v(e,"divider","atlas-embed-divider"),"or"))),t.appendChild(a?Vn(e):Kn(e,o.kind)),r&&e.mode==="sign-in"&&e.passkeyEnabled&&ne()&&t.appendChild(Zn(e)),(O=e.appearance)!=null&&O.footer&&t.appendChild(f(e,"p",v(e,"footer","atlas-embed-footer"),e.appearance.footer)),e.root.appendChild(t),t.hasAttribute("data-enter")){let b=t.querySelector("[data-atlas-autofocus]");b instanceof HTMLElement&&b.focus()}}function Er(e,t){let n=e.enteredIdentifier,o=null,a=!1;switch(t){case"collect_email_code":o=n?`Enter the code we sent to ${n}`:"Enter the code we sent to your email",a=!0;break;case"collect_first_factor":o=n?`Enter the password for ${n}`:"Enter your password",a=!0;break;case"collect_second_factor":o=e.backupCodeMode?"Enter one of your backup codes":"Enter the code from your authenticator app";break;case"collect_new_password":o="Choose a new password";break;case"enroll_second_factor":o="Enter two codes from your authenticator app to finish setup";break;default:return null}let r=f(e,"div","atlas-embed-step-context");if(r.appendChild(f(e,"p",v(e,"subtitle","atlas-embed-subtitle"),o)),a){let s=f(e,"button","atlas-embed-step-back","Use a different email");s.type="button",s.addEventListener("click",()=>Cr(e)),r.appendChild(s)}return r}function Cr(e){e.state=M,e.backupCodeMode=!1,e.handlePrompt=null,e.enteredIdentifier=null,S(e)}var se=class{constructor(t,n){this.root=t;this.options=n;g(this,"client");g(this,"mode");g(this,"appearance",null);g(this,"design",null);g(this,"appliedDesign");g(this,"providers",[]);g(this,"nativeProviders",[]);g(this,"signInWithAtlas",{enabled:!1});g(this,"social",Xe(void 0,void 0));g(this,"codeInputStyle","boxes");g(this,"interaction",Ee(void 0,void 0));g(this,"backupCodeMode",!1);g(this,"enteredIdentifier",null);g(this,"lastStepKind",null);g(this,"signUpFields",[]);g(this,"passwordEnabled",!0);g(this,"passkeyEnabled",!1);g(this,"conditionalAbort");g(this,"rememberMeEnabled",!1);g(this,"remember",!0);g(this,"trustedDeviceEnabled",!1);g(this,"rememberDevice",!1);g(this,"captchaFlows",{});g(this,"captchaHost");g(this,"state",M);g(this,"resetFlow",null);g(this,"flash",null);g(this,"handlePrompt",null);g(this,"busy",!1);g(this,"recorder");var o,a;this.mode=(o=n.mode)!=null?o:"sign-in",this.interaction=Ee(void 0,(a=n.appearance)==null?void 0:a.interaction),this.client=qt({publishableKey:n.publishableKey,frontendApi:n.frontendApi,fetchImpl:n.fetchImpl})}async mount(){var o,a,r,s,l,i,c,d,p,u,m,h,y,k,C,O,b,_,D,A,L;if(Xt((o=this.root.ownerDocument)!=null?o:document),this.root.classList.add("atlas-embed-root"),this.resolveDesign(null),this.applyTheme(),this.applyInteraction(),eo(this),await Bn(this))return;let n=await Zt(this.client);if(n){this.appearance=n.appearance;let E=(a=n.provider_scopes)!=null?a:{},P=W=>{let q=E[W];return q?this.mode==="sign-up"?q.sign_up:q.sign_in:!0};this.providers=Yt((r=n.providers)!=null?r:[],n.appearance).filter(P),this.nativeProviders=((s=n.native_providers)!=null?s:[]).filter(W=>P(W.provider)),this.passwordEnabled=(i=(l=n.strategies)==null?void 0:l.password)!=null?i:!0,this.passkeyEnabled=(d=(c=n.strategies)==null?void 0:c.passkey)!=null?d:!1,this.signInWithAtlas=(p=n.sign_in_with_atlas)!=null?p:{enabled:!1},this.rememberMeEnabled=n.rememberMe===!0,this.trustedDeviceEnabled=n.rememberDevice===!0,this.captchaFlows=(u=n.captchaFlows)!=null?u:{},this.resolveDesign(Tn(n)),this.applyTheme()}this.social=Xe(this.design?{...(m=this.appearance)==null?void 0:m.socialButtons,...this.design.socialButtons}:(h=this.appearance)==null?void 0:h.socialButtons,(y=this.options.appearance)==null?void 0:y.socialButtons),this.codeInputStyle=Ut((k=this.appearance)==null?void 0:k.codeInput,(C=this.options.appearance)==null?void 0:C.codeInput),this.interaction=Ee(this.design?{...(O=this.appearance)==null?void 0:O.interaction,...this.design.interaction}:(b=this.appearance)==null?void 0:b.interaction,(_=this.options.appearance)==null?void 0:_.interaction),this.applyInteraction(),this.signUpFields=(A=(D=this.appearance)==null?void 0:D.signUpFields)!=null?A:[];try{this.recorder=new xe((L=this.root.ownerDocument)!=null?L:document)}catch{}S(this),qn(this)}applyTheme(){var o,a,r;let t=(a=(o=this.design)==null?void 0:o.tokens)!=null?a:Kt(this.appearance,this.options.appearance),n=Vt(t);for(let[s,l]of Object.entries(n))this.root.style.setProperty(s,l);this.design&&(this.appliedDesign=Rn((r=this.root.ownerDocument)!=null?r:document,this.root,this.design.render,this.appliedDesign))}resolveDesign(t){var a,r,s;let n=(r=(a=this.root.ownerDocument)==null?void 0:a.defaultView)!=null?r:typeof window!="undefined"?window:null,o=!1;try{o=!!((s=n==null?void 0:n.matchMedia)!=null&&s.call(n,"(prefers-color-scheme: dark)").matches)}catch{}this.design=Pn(t,this.options.appearance,{frontendApi:this.options.frontendApi,prefersDark:o})}applyInteraction(){let t=this.interaction;this.root.setAttribute("data-button-style",t.buttonStyle),this.root.setAttribute("data-button-effect",t.buttonEffect),this.root.setAttribute("data-shadow",t.shadow),this.root.setAttribute("data-density",t.density),this.root.setAttribute("data-input-style",t.inputStyle);let n=t.animations?jt[t.motionSpeed]:0;this.root.style.setProperty("--atlas-embed-motion",`${n}ms`)}};var ee={};function to(e){ee=e}function no(e){if(!e)return{};let t=e.dataset,n={};return t.atlasKey&&(n.publishableKey=t.atlasKey),t.atlasFapi&&(n.frontendApi=t.atlasFapi),t.atlasRedirect&&(n.redirect=t.atlasRedirect),n}function oo(e,t){var c,d,p,u,m,h,y;let n=e.dataset,o=k=>{var C;return(C=e.getAttribute(k))!=null?C:void 0},a=(d=(c=n.atlasKey)!=null?c:o("publishable-key"))!=null?d:ee.publishableKey,r=(u=(p=n.atlasFapi)!=null?p:o("frontend-api"))!=null?u:ee.frontendApi,s=(h=(m=n.atlasRedirect)!=null?m:o("redirect"))!=null?h:ee.redirect;if(!a||!r)return null;let l={publishableKey:a,frontendApi:r,mode:t};s&&(l.redirect=s);let i=(y=n.atlasPreset)!=null?y:o("preset");return i&&(l.appearance={preset:i}),l}function ro(e,t={}){var a,r,s;let n=(a=t.publishableKey)!=null?a:ee.publishableKey,o=(r=t.frontendApi)!=null?r:ee.frontendApi;return!n||!o?null:{...t,publishableKey:n,frontendApi:o,redirect:(s=t.redirect)!=null?s:ee.redirect,mode:e}}var je=class extends HTMLElement{constructor(){super(...arguments);g(this,"widget",null)}connectedCallback(){if(this.widget)return;let n=oo(this,this.mode);if(!n){this.textContent="Atlas: set data-atlas-key (publishable key) and data-atlas-fapi (frontend API origin).";return}this.widget=new se(this,n),this.widget.mount()}},vt=class extends je{constructor(){super(...arguments);g(this,"mode","sign-in")}},xt=class extends je{constructor(){super(...arguments);g(this,"mode","sign-up")}};function St(){typeof customElements!="undefined"&&(customElements.get("atlas-sign-in")||customElements.define("atlas-sign-in",vt),customElements.get("atlas-sign-up")||customElements.define("atlas-sign-up",xt))}function Ar(e){let t=typeof e=="string"?document.querySelector(e):e;return t instanceof HTMLElement?t:null}function ao(e,t,n){let o=Ar(t);if(!o)return null;let a=ro(e,n);if(!a)return o.textContent="Atlas: a publishable key and a frontend API origin are required to mount the widget.",null;let r=new se(o,a);return r.mount(),r}function so(e,t={}){return ao("sign-in",e,t)}function io(e,t={}){return ao("sign-up",e,t)}function Tr(){var t;let e=document.currentScript;return e instanceof HTMLScriptElement?e:(t=document.querySelector("script[data-atlas-key]"))!=null?t:document.querySelector('script[src*="embed.js"]')}function Rr(){to(no(Tr())),St(),window.Atlas={mountSignIn:so,mountSignUp:io,defineElements:St}}Rr();})();
package/dist/icons.d.ts CHANGED
@@ -11,7 +11,9 @@
11
11
  */
12
12
  /**
13
13
  * An inline SVG string for a provider's brand mark, or null when we have none.
14
- * The SVG carries no width/height — the button CSS sizes it — so one mark works
15
- * at every button size.
14
+ * Every mark carries an intrinsic 18px `width`/`height` so it never renders 0px
15
+ * where no CSS sizes it; the widget's `.atlas-embed-social-icon svg` rule still
16
+ * overrides it, so one mark works at every button size. Kept in lockstep with
17
+ * `packages/core/src/branding/provider-icons.ts`.
16
18
  */
17
19
  export declare function providerIcon(id: string): string | null;
package/dist/icons.js CHANGED
@@ -36,17 +36,19 @@ const MONO = {
36
36
  };
37
37
  /**
38
38
  * An inline SVG string for a provider's brand mark, or null when we have none.
39
- * The SVG carries no width/height — the button CSS sizes it — so one mark works
40
- * at every button size.
39
+ * Every mark carries an intrinsic 18px `width`/`height` so it never renders 0px
40
+ * where no CSS sizes it; the widget's `.atlas-embed-social-icon svg` rule still
41
+ * overrides it, so one mark works at every button size. Kept in lockstep with
42
+ * `packages/core/src/branding/provider-icons.ts`.
41
43
  */
42
44
  function providerIcon(id) {
43
45
  const multi = MULTICOLOR[id];
44
46
  if (multi) {
45
- return `<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">${multi}</svg>`;
47
+ return `<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true" focusable="false">${multi}</svg>`;
46
48
  }
47
49
  const mono = MONO[id];
48
50
  if (mono) {
49
- return `<svg viewBox="0 0 24 24" fill="${mono.fill}" aria-hidden="true" focusable="false"><path d="${mono.path}"/></svg>`;
51
+ return `<svg viewBox="0 0 24 24" width="18" height="18" fill="${mono.fill}" aria-hidden="true" focusable="false"><path d="${mono.path}"/></svg>`;
50
52
  }
51
53
  return null;
52
54
  }
package/dist/icons.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"icons.js","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAiCH,oCAUC;AAzCD,6EAA6E;AAC7E,MAAM,UAAU,GAA2B;IACzC,MAAM,EACJ,imBAAimB;IACnmB,SAAS,EACP,wLAAwL;CAC3L,CAAC;AAEF,+EAA+E;AAC/E,iDAAiD;AACjD,MAAM,IAAI,GAAmD;IAC3D,MAAM,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,0sBAA0sB,EAAE;IAClvB,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,+hBAA+hB,EAAE;IACtkB,CAAC,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,oMAAoM,EAAE;IACvO,MAAM,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,s2BAAs2B,EAAE;IAC94B,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,gbAAgb,EAAE;IACrd,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,ivCAAivC,EAAE;IACrxC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,idAAid,EAAE;IACpf,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,4kBAA4kB,EAAE;IAChnB,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,wLAAwL,EAAE;IAC3N,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,qmCAAqmC,EAAE;IACxoC,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,09BAA09B,EAAE;IAC5/B,OAAO,EAAE,EAAE,I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EAAE,ivCAAivC,EAAE;IACrxC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,idAAid,EAAE;IACpf,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,4kBAA4kB,EAAE;IAChnB,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,wLAAwL,EAAE;IAC3N,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,qmCAAqmC,EAAE;IACxoC,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,09BAA09B,EAAE;IAC5/B,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,mOAAmO,EAAE;IACvQ,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,meAAme,EAAE;CACtgB,CAAC;AAEF;;;;;;GAMG;AACH,SAAgB,YAAY,CAAC,EAAU;IACrC,MAAM,KAAK,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC;IAC7B,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,wFAAwF,KAAK,QAAQ,CAAC;IAC/G,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;IACtB,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,yDAAyD,IAAI,CAAC,IAAI,mDAAmD,IAAI,CAAC,IAAI,WAAW,CAAC;IACnJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
package/dist/index.d.ts CHANGED
@@ -17,3 +17,4 @@ export { setScriptDefaults, readScriptTag, type ScriptDefaults } from './config'
17
17
  export { validateRedirect } from './redirect';
18
18
  export { resolveTokens, cssVariables, orderedProviders, providerLabel, classFor, resolveSocialButtons, type DesignTokens, type ElementKey, type WidgetAppearance, type PublicAppearance, type PublicStrategies, type AppearanceResponse, type SocialButtonsConfig, type SocialButtonVariant, type SocialButtonSize, type SocialButtonLayout, type ResolvedSocialButtons, } from './appearance';
19
19
  export { providerIcon } from './icons';
20
+ export { widgetDesign, type WidgetDesign } from './design';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.providerIcon = exports.resolveSocialButtons = exports.classFor = exports.providerLabel = exports.orderedProviders = exports.cssVariables = exports.resolveTokens = exports.validateRedirect = exports.readScriptTag = exports.setScriptDefaults = exports.mountSignUp = exports.mountSignIn = exports.AtlasSignUpElement = exports.AtlasSignInElement = exports.defineElements = exports.AtlasWidget = void 0;
3
+ exports.widgetDesign = exports.providerIcon = exports.resolveSocialButtons = exports.classFor = exports.providerLabel = exports.orderedProviders = exports.cssVariables = exports.resolveTokens = exports.validateRedirect = exports.readScriptTag = exports.setScriptDefaults = exports.mountSignUp = exports.mountSignIn = exports.AtlasSignUpElement = exports.AtlasSignInElement = exports.defineElements = exports.AtlasWidget = void 0;
4
4
  /**
5
5
  * `@atlasauth/embed` — the universal, framework-agnostic sign-in widget.
6
6
  *
@@ -36,4 +36,6 @@ Object.defineProperty(exports, "classFor", { enumerable: true, get: function ()
36
36
  Object.defineProperty(exports, "resolveSocialButtons", { enumerable: true, get: function () { return appearance_1.resolveSocialButtons; } });
37
37
  var icons_1 = require("./icons");
38
38
  Object.defineProperty(exports, "providerIcon", { enumerable: true, get: function () { return icons_1.providerIcon; } });
39
+ var design_1 = require("./design");
40
+ Object.defineProperty(exports, "widgetDesign", { enumerable: true, get: function () { return design_1.widgetDesign; } });
39
41
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;GAWG;AACH,mCAA2D;AAAlD,qGAAA,WAAW,OAAA;AACpB,qCAAmF;AAA1E,yGAAA,cAAc,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAC/D,iCAAqE;AAA5D,oGAAA,WAAW,OAAA;AAAE,oGAAA,WAAW,OAAA;AACjC,mCAAiF;AAAxE,2GAAA,iBAAiB,OAAA;AAAE,uGAAA,aAAa,OAAA;AACzC,uCAA8C;AAArC,4GAAA,gBAAgB,OAAA;AACzB,2CAkBsB;AAjBpB,2GAAA,aAAa,OAAA;AACb,0GAAA,YAAY,OAAA;AACZ,8GAAA,gBAAgB,OAAA;AAChB,2GAAA,aAAa,OAAA;AACb,sGAAA,QAAQ,OAAA;AACR,kHAAA,oBAAoB,OAAA;AAatB,iCAAuC;AAA9B,qGAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;GAWG;AACH,mCAA2D;AAAlD,qGAAA,WAAW,OAAA;AACpB,qCAAmF;AAA1E,yGAAA,cAAc,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAC/D,iCAAqE;AAA5D,oGAAA,WAAW,OAAA;AAAE,oGAAA,WAAW,OAAA;AACjC,mCAAiF;AAAxE,2GAAA,iBAAiB,OAAA;AAAE,uGAAA,aAAa,OAAA;AACzC,uCAA8C;AAArC,4GAAA,gBAAgB,OAAA;AACzB,2CAkBsB;AAjBpB,2GAAA,aAAa,OAAA;AACb,0GAAA,YAAY,OAAA;AACZ,8GAAA,gBAAgB,OAAA;AAChB,2GAAA,aAAa,OAAA;AACb,sGAAA,QAAQ,OAAA;AACR,kHAAA,oBAAoB,OAAA;AAatB,iCAAuC;AAA9B,qGAAA,YAAY,OAAA;AACrB,mCAA2D;AAAlD,sGAAA,YAAY,OAAA"}
package/dist/widget.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { BehaviorRecorder, type FapiClient, type FlowState, type ResetFlowState } from '@atlasauth/js';
2
2
  import { type CodeInputStyle, type CaptchaFlowKey, type FlowCaptcha, type PublicAppearance, type PublicSignUpField, type ResolvedSocialButtons, type ResolvedInteraction, type WidgetAppearance } from './appearance';
3
+ import { type WidgetDesign } from './design';
3
4
  /**
4
5
  * The framework-agnostic sign-in panel.
5
6
  *
@@ -35,6 +36,9 @@ export declare class AtlasWidget {
35
36
  readonly client: FapiClient;
36
37
  readonly mode: 'sign-in' | 'sign-up';
37
38
  appearance: PublicAppearance | null;
39
+ /** The design-system layer (dashboard design + inline preset/design), when any. */
40
+ design: WidgetDesign | null;
41
+ private appliedDesign?;
38
42
  providers: string[];
39
43
  /** Providers that render the official native button (Google GSI), by client_id. */
40
44
  nativeProviders: {
@@ -114,6 +118,8 @@ export declare class AtlasWidget {
114
118
  /** Boot: handle any redirect landing, fetch appearance, then render. */
115
119
  mount(): Promise<void>;
116
120
  private applyTheme;
121
+ /** Resolve the design layer (null when there is none). */
122
+ private resolveDesign;
117
123
  /**
118
124
  * Reflect the resolved interaction config onto the root as data-attributes (the
119
125
  * stylesheet keys off them) plus the motion-tempo variable. Turning animations
package/dist/widget.js CHANGED
@@ -5,6 +5,8 @@ const js_1 = require("@atlasauth/js");
5
5
  const appearance_1 = require("./appearance");
6
6
  const client_1 = require("./client");
7
7
  const styles_1 = require("./styles");
8
+ const runtime_1 = require("@atlasauth/design/runtime");
9
+ const design_1 = require("./design");
8
10
  const render_1 = require("./widget/render");
9
11
  const flow_1 = require("./widget/flow");
10
12
  const passkey_1 = require("./widget/passkey");
@@ -14,6 +16,9 @@ class AtlasWidget {
14
16
  client;
15
17
  mode;
16
18
  appearance = null;
19
+ /** The design-system layer (dashboard design + inline preset/design), when any. */
20
+ design = null;
21
+ appliedDesign;
17
22
  providers = [];
18
23
  /** Providers that render the official native button (Google GSI), by client_id. */
19
24
  nativeProviders = [];
@@ -101,6 +106,8 @@ class AtlasWidget {
101
106
  async mount() {
102
107
  (0, styles_1.injectStyles)(this.root.ownerDocument ?? document);
103
108
  this.root.classList.add('atlas-embed-root');
109
+ // An inline preset/design themes the very first (loading) paint.
110
+ this.resolveDesign(null);
104
111
  this.applyTheme();
105
112
  this.applyInteraction();
106
113
  (0, render_1.renderLoading)(this);
@@ -132,13 +139,19 @@ class AtlasWidget {
132
139
  this.rememberMeEnabled = data.rememberMe === true;
133
140
  this.trustedDeviceEnabled = data.rememberDevice === true;
134
141
  this.captchaFlows = data.captchaFlows ?? {};
142
+ this.resolveDesign((0, runtime_1.instanceDesignFrom)(data));
135
143
  this.applyTheme();
136
144
  }
137
145
  // Social-button look: tenant server default (if any) overlaid by the inline
138
146
  // appearance override the embedding page passed.
139
- this.social = (0, appearance_1.resolveSocialButtons)(this.appearance?.socialButtons, this.options.appearance?.socialButtons);
147
+ // A design's social layout sits over the tenant's default (inline still wins).
148
+ this.social = (0, appearance_1.resolveSocialButtons)(this.design
149
+ ? { ...this.appearance?.socialButtons, ...this.design.socialButtons }
150
+ : this.appearance?.socialButtons, this.options.appearance?.socialButtons);
140
151
  this.codeInputStyle = (0, appearance_1.resolveCodeInput)(this.appearance?.codeInput, this.options.appearance?.codeInput);
141
- this.interaction = (0, appearance_1.resolveInteraction)(this.appearance?.interaction, this.options.appearance?.interaction);
152
+ this.interaction = (0, appearance_1.resolveInteraction)(this.design
153
+ ? { ...this.appearance?.interaction, ...this.design.interaction }
154
+ : this.appearance?.interaction, this.options.appearance?.interaction);
142
155
  this.applyInteraction();
143
156
  this.signUpFields = this.appearance?.signUpFields ?? [];
144
157
  // §bot — begin passive behavioural collection once the form is up. Never
@@ -156,10 +169,30 @@ class AtlasWidget {
156
169
  void (0, passkey_1.startConditionalPasskey)(this);
157
170
  }
158
171
  applyTheme() {
159
- const tokens = (0, appearance_1.resolveTokens)(this.appearance, this.options.appearance);
172
+ // With a design (dashboard or inline preset/design) the tokens come from it;
173
+ // otherwise exactly as before: tenant branding, then the inline variables.
174
+ const tokens = this.design?.tokens ?? (0, appearance_1.resolveTokens)(this.appearance, this.options.appearance);
160
175
  const vars = (0, appearance_1.cssVariables)(tokens);
161
176
  for (const [key, value] of Object.entries(vars))
162
177
  this.root.style.setProperty(key, value);
178
+ if (this.design) {
179
+ this.appliedDesign = (0, runtime_1.applyAppearanceToDom)(this.root.ownerDocument ?? document, this.root, this.design.render, this.appliedDesign);
180
+ }
181
+ }
182
+ /** Resolve the design layer (null when there is none). */
183
+ resolveDesign(instance) {
184
+ const win = this.root.ownerDocument?.defaultView ?? (typeof window !== 'undefined' ? window : null);
185
+ let prefersDark = false;
186
+ try {
187
+ prefersDark = !!win?.matchMedia?.('(prefers-color-scheme: dark)').matches;
188
+ }
189
+ catch {
190
+ /* no media queries: light */
191
+ }
192
+ this.design = (0, design_1.widgetDesign)(instance, this.options.appearance, {
193
+ frontendApi: this.options.frontendApi,
194
+ prefersDark,
195
+ });
163
196
  }
164
197
  /**
165
198
  * Reflect the resolved interaction config onto the root as data-attributes (the
@@ -1 +1 @@
1
- {"version":3,"file":"widget.js","sourceRoot":"","sources":["../src/widget.ts"],"names":[],"mappings":";;;AAAA,sCAMuB;AACvB,6CAiBsB;AACtB,qCAAyD;AACzD,qCAAwC;AACxC,4CAAwD;AACxD,wCAAsD;AACtD,8CAA2D;AAgC3D,MAAa,WAAW;IA2EX;IACA;IA3EF,MAAM,CAAa;IACnB,IAAI,CAAwB;IACrC,UAAU,GAA4B,IAAI,CAAC;IAC3C,SAAS,GAAa,EAAE,CAAC;IACzB,mFAAmF;IACnF,eAAe,GAA8C,EAAE,CAAC;IAChE,6EAA6E;IAC7E,eAAe,GAAiD,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACnF,yFAAyF;IACzF,MAAM,GAA0B,IAAA,iCAAoB,EAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC3E,oFAAoF;IACpF,cAAc,GAAmB,OAAO,CAAC;IACzC,qFAAqF;IACrF,WAAW,GAAwB,IAAA,+BAAkB,EAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC5E;;;;;OAKG;IACH,cAAc,GAAG,KAAK,CAAC;IACvB;;;;OAIG;IACH,iBAAiB,GAAkB,IAAI,CA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,CAAC,CAAC;QACvD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,sBAAsB,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;CACF;AAzND,kCAyNC"}
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@atlasauth/embed",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {
7
- "@atlasauth/js": "0.1.1"
7
+ "@atlasauth/design": "0.1.0",
8
+ "@atlasauth/js": "0.4.0"
8
9
  },
9
10
  "devDependencies": {
10
11
  "esbuild": "^0.21.5",