@toa.io/extensions.configuration 1.0.0-alpha.306 → 1.0.0-alpha.308

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/extensions.configuration",
3
- "version": "1.0.0-alpha.306",
3
+ "version": "1.0.0-alpha.308",
4
4
  "type": "module",
5
5
  "description": "Toa Configuration",
6
6
  "author": "temich <tema.gurtovoy@gmail.com>",
@@ -32,10 +32,10 @@
32
32
  "prepack": "npm run build:ui",
33
33
  "features": "TSX_TSCONFIG_PATH=features/steps/tsconfig.json NODE_OPTIONS=--import=tsx cucumber-js"
34
34
  },
35
- "gitHead": "0693d180a8053a7d07dca879dac2a3c4784d6d45",
35
+ "gitHead": "66eb0d54032f60e6ead9e13fd9e21fb60c611277",
36
36
  "dependencies": {
37
- "@toa.io/core": "1.0.0-alpha.306",
38
- "@toa.io/definitions": "1.0.0-alpha.306",
37
+ "@toa.io/core": "1.0.0-alpha.308",
38
+ "@toa.io/definitions": "1.0.0-alpha.308",
39
39
  "@toa.io/generic": "1.0.0-alpha.304",
40
40
  "@toa.io/schemas": "1.0.0-alpha.304",
41
41
  "openspan": "1.0.0-alpha.305"
@@ -1,6 +1,6 @@
1
- import{$ as e,A as t,B as n,Dt as r,Et as i,F as a,I as o,M as s,Ot as c,Q as l,S as u,_ as d,_t as f,a as p,bt as m,dt as h,ht as g,i as _,j as v,k as y,kt as b,mt as x,o as S,pt as C,st as w,tt as T,u as E,ut as D,w as O,x as ee,y as k,yt as te}from"./CcD_ISxM.js";import{s as ne}from"./DZt2sU7P.js";import"./xihTtKlq.js";var re=class{store;values;request;revalidate;stale;timestamp=0;constructor(e){this.store=g(null),this.values=e.values,this.request=e.get,this.revalidate=e.revalidate??ie.revalidate,this.stale=e.stale??ie.stale,e.persist!==void 0&&this.persist(e.persist),e.bind!==void 0&&this.bind(e.bind)}subscribe(e,t){return this.sync(),this.store.subscribe(e,t)}add(e){this.values?.set(e.id,e),this.store.update(t=>t===null||t instanceof Error?[e]:t.find(t=>t.id===e.id)===void 0?[e,...t]:t)}get(e,t){if(this.values===void 0)throw Error(`Collection: values is not defined`);return this.values.get(e,t)}extract(e){if(this.values===void 0)throw Error(`Collection: values is not defined`);return this.values.extract(e)}delete(e){this.values?.delete(e),this.store.update(t=>t===null||t instanceof Error?t:t.filter(t=>t.id!==e))}set(e,t){this.store.update(n=>{if(n===null||n instanceof Error)return[e];let r=n.findIndex(t=>t.id===e.id);return r===-1?t?.add===!0?[e,...n]:n:(n[r]=e,n)}),this.values?.set(e.id,e)}update(e,t,n){if(this.values===void 0)throw Error(`Collection: values is not defined`);let r=this.values.extract(e);if(r===null)return;let i=t(r)??r;this.set(i,n)}sync(){return(this.timestamp===0||this.timestamp+this.revalidate<Date.now())&&(this.stale||this.clear(),this.refresh()),this}async fetch(){return await this.refresh(),this}replace(e){let t=e;if(this.store.set(t),this.timestamp=Date.now(),this.values!==void 0)for(let e of t)this.values.set(e.id,e)}async refresh(){if(this.request===void 0)return;this.timestamp=Date.now();let e=await this.request();e instanceof Error?this.store.set(e):this.replace(e)}persist(e){if(typeof window>`u`)return;let t=this.load(e);if(t!==null&&(this.store.set(t),this.values?.persistent===!1))for(let e of t)this.values.set(e.id,e);this.store.subscribe(t=>{t instanceof Error||(t===null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t)))})}load(e){if(typeof window>`u`)return null;let t=localStorage.getItem(e);if(t===null)return null;try{let n=JSON.parse(t);return Array.isArray(n)?n:(console.error(`Storage value for ${e} is not an array:`,n),null)}catch(t){return console.error(`Invalid storage value for ${e}`,t),null}}bind(e){e.subscribe(e=>{e===null&&this.clear()})}clear(){this.store.set(null),this.values?.clear(),this.timestamp=0}};function A(e){return new re(e)}var ie={revalidate:3e5,stale:!1},ae=class{persistent;values={};fetch;revalidate;permanent;stale;persist;ready=!1;dumping=null;constructor(e){this.fetch=e.get,this.revalidate=e.revalidate??j.revalidate,this.permanent=e.permanent??j.permanent,this.stale=e.stale??j.stale,this.persist=e.persist,this.persistent=this.persist!==void 0,this.load(),e.bind!==void 0&&this.bind(e.bind)}set(e,t,n){let r=t,i=this.values[e]??(this.values[e]=this.create(r));return n?.stash===!0?this.stash(e):delete i.stash,i.store.set(r),!(r instanceof Error)&&this.ready&&n?.stash!==!0&&this.dump(),this.values[e].store}reset(e){let t=this.values[e]?.stash;return t===void 0?this.extract(e):(t===null?this.delete(e):this.set(e,t),t)}get(e,t){this.ready=!0;let n=this.values[e]??=this.create();return this.fetch===void 0||t?.fetch===!1||(n.timestamp===0||n.timestamp+this.revalidate<Date.now())&&(this.stale||n.store.set(null),n.timestamp=Date.now(),this.fetch(e).then(t=>this.set(e,t))),n.store}extract(e){if(this.values[e]===void 0)return null;let t=x(this.values[e].store);return t instanceof Error?null:t}delete(e){if(!(e in this.values))return;let t=this.values[e];t.store.set(null),t.timestamp=0,delete t.stash,this.dump()}clear(){for(let e of Object.keys(this.values))this.delete(e);this.ready=!1}create(e){return{store:g(e??null),timestamp:this.permanent&&e!==void 0?Date.now():0}}stash(e){let t=this.values[e];if(t.stash!==void 0){console.warn(`Stash overlap, skipping`);return}let n=this.get(e,{fetch:!1});t.stash??=x(n)}dump(e=!0){if(this.persist===void 0||typeof window>`u`)return;if(e){this.dumping??=setTimeout(()=>this.dump(!1),oe);return}this.dumping=null;let t={};for(let[e,n]of Object.entries(this.values)){let r=n.stash??x(n.store);r!==null&&!(r instanceof Error)&&(t[e]=r)}Object.keys(t).length===0?localStorage.removeItem(this.persist):localStorage.setItem(this.persist,JSON.stringify(t))}load(){if(this.persist===void 0||typeof window>`u`)return;let e=localStorage.getItem(this.persist);if(e!==null)try{let t=JSON.parse(e);if(typeof t!=`object`||!t){console.error(`Storage value for ${this.persist} is not an object:`,t);return}for(let[e,n]of Object.entries(t))this.set(e,n)}catch(e){console.error(`Invalid storage value for ${this.persist}`,e)}}bind(e){e.subscribe(e=>{e===null&&this.clear()})}},oe=100,j={revalidate:3e5,permanent:!1,stale:!1};function se(e={}){return new ae(e)}var ce=class{store;default;request;revalidate;timestamp=0;constructor(e){this.default=e.default??null,this.request=e.get,this.revalidate=e.revalidate??de.revalidate,this.store=e.persist===void 0||typeof window>`u`?g(this.default):le(e.persist,this.default,e.session),e.bind&&this.bind(e.bind)}set(e){this.store.set(e)}update(e){this.store.update(t=>e(t))}subscribe(e,t){return this.sync(),this.store.subscribe(e,t)}extract(){return x(this.store)}sync(){this.request!==void 0&&this.timestamp+this.revalidate<Date.now()&&this.refresh()}async refresh(){if(this.request===void 0)return;this.timestamp=Date.now();let e=await this.request();e instanceof Error||this.set(e)}bind(e){e.subscribe(e=>{e===null&&this.store.set(this.default)})}};function M(e={}){return new ce(e)}function le(e,t,n){let r=g(ue(e)??t),i=n?`sessionStorage`:`localStorage`;return r.subscribe(t=>{t===null?window[i].removeItem(e):window[i].setItem(e,JSON.stringify(t))}),r}function ue(e){let t=window.localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch(t){return console.error(`Invalid storage value for ${e}`,t),null}}var de={revalidate:3e5};function fe(e,t){return new Promise(n=>{let r=!1,i=null;i=e.subscribe(e=>{t(e)&&(i?.(),r=!0,n(e))}),r&&i?.()})}function pe(e){return fe(e,e=>e!==null&&!(e instanceof Error))}function me(e){let t=x(e);if(t===null||t instanceof Error)throw Error(`Store contains null or an error`);return t}var he={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},ge=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},_e=Symbol(`lucide-context`),ve=()=>f(_e),ye=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),be=s(`<svg><!><!></svg>`);function N(a,o){m(o,!0);let s=ve()??{},f=_(o,`color`,19,()=>s.color??`currentColor`),h=_(o,`size`,19,()=>s.size??24),g=_(o,`strokeWidth`,19,()=>s.strokeWidth??2),v=_(o,`absoluteStrokeWidth`,19,()=>s.absoluteStrokeWidth??!1),b=_(o,`iconNode`,19,()=>[]),x=p(o,ye),S=w(()=>v()?Number(g())*24/Number(h()):g());var C=be();E(C,e=>({...he,...e,...x,width:h(),height:h(),stroke:f(),"stroke-width":n(S),class:[`lucide-icon lucide`,s.class,o.name&&`lucide-${o.name}`,o.class]}),[()=>!o.children&&!ge(x)&&{"aria-hidden":`true`}]);var D=l(C);ee(D,17,b,u,(r,i)=>{var a=w(()=>c(n(i),2));let o=()=>n(a)[0],s=()=>n(a)[1];var l=t(),u=e(l);d(u,o,!0,(e,t)=>{E(e,()=>({...s()}))}),y(r,l)});var O=T(D);k(O,()=>o.children??r),i(C),y(a,C),te()}var xe=new Set([`$$slots`,`$$events`,`$$legacy`]);function Se(e,t){let n=p(t,xe),r=[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}]];N(e,S({name:`loader-circle`},()=>n,{get iconNode(){return r}}))}var Ce=new Set([`$$slots`,`$$events`,`$$legacy`]);function we(e,t){let n=p(t,Ce),r=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]];N(e,S({name:`rotate-ccw`},()=>n,{get iconNode(){return r}}))}var Te=v(`<div class="m-auto flex flex-col items-center gap-4"><span class="text-destructive">Something went terribly wrong</span> <button class="p-4 border border-muted-foreground hover:bg-muted cursor-pointer rounded-md flex items-center gap-2"><!></button></div>`);function Ee(n,r){let a=()=>h(r.store,`$store`,s),[s,c]=D(),u=_(r,`silent`,3,!1);var d=t(),f=e(d),p=n=>{var i=t(),a=e(i),o=n=>{var i=t(),a=e(i);k(a,()=>r.waiting),y(n,i)},s=e=>{Se(e,{class:`animate-spin m-auto text-muted-foreground`})};O(a,e=>{r.waiting?e(o):u()||e(s,1)}),y(n,i)},m=n=>{var s=t(),c=e(s),d=n=>{var i=t(),o=e(i);k(o,()=>r.error,a),y(n,i)},f=e=>{var t=Te(),n=T(l(t),2);we(l(n),{size:16}),i(n),i(t),o(`click`,n,()=>window.location.reload()),y(e,t)};O(c,e=>{r.error?e(d):u()||e(f,1)}),y(n,s)},g=n=>{var i=t(),o=e(i);k(o,()=>r.awaited,a),y(n,i)};O(f,e=>{a()===null?e(p):a()instanceof Error?e(m,1):e(g,-1)}),y(n,d),c()}a([`click`]);var P=M({persist:`auth:account`}),F=M({persist:`auth:challenge`,bind:P}),De=M({persist:`auth:method`}),Oe=g(!1),ke=g(!1),Ae=C([F,P,Oe],([e,t,n])=>e!==null&&t!==null&&n===!1);function je(e){P.extract()?.id!==e.id&&P.set(null),P.set(e)}function I(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get(`*`))&&r.slice().map(function(e){e(t,n)})}}}var L=b((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Err=void 0,e.Err=class extends Error{code;name=`Error`;message=``;cause;constructor(e,t){super(),this.code=e,delete this.stack,Object.defineProperty(this,"name",{enumerable:!1}),typeof t==`string`?(this.message=t,Object.defineProperty(this,"cause",{enumerable:!1})):(Object.defineProperty(this,"message",{enumerable:!1}),Object.defineProperty(this,"cause",{enumerable:t!==void 0,value:t}))}}}))();async function Me(e,t){if(!e.ok||!e.body||e.bodyUsed)return e;let n=e.headers.get(`content-type`);if(!n||!~n.indexOf(`multipart/`))return e;let r=n.indexOf(`boundary=`),i=`-`;if(~r){let e=r+9,t=n.indexOf(`;`,e);i=n.slice(e,t>-1?t:void 0).trim().replace(/"/g,``)}return async function*(e,t,n){let r,i,a,o=new TextDecoder(`utf8`),s=e.getReader(),c=!n||!n.multiple,l=t.length,u=``,d=[];try{let e;e:for(;!(e=await s.read()).done;){let n=o.decode(e.value,{stream:!0});r=u.length,u+=n;let s=n.indexOf(t);for(~s?r+=s:r=u.indexOf(t),d=[];~r;){let e=u.slice(0,r),n=u.slice(r+l);if(i){let t=e.indexOf(`\r
1
+ import{$ as e,A as t,B as n,Dt as r,Et as i,F as a,I as o,M as s,Ot as c,Q as l,S as u,_ as d,_t as f,a as p,bt as m,dt as h,ht as g,i as _,j as v,k as y,kt as b,mt as x,o as S,pt as C,st as w,tt as T,u as E,ut as D,w as O,x as ee,y as k,yt as te}from"./CcD_ISxM.js";import{s as ne}from"./C-D-YKVB.js";import"./xihTtKlq.js";var re=class{store;values;request;revalidate;stale;timestamp=0;constructor(e){this.store=g(null),this.values=e.values,this.request=e.get,this.revalidate=e.revalidate??ie.revalidate,this.stale=e.stale??ie.stale,e.persist!==void 0&&this.persist(e.persist),e.bind!==void 0&&this.bind(e.bind)}subscribe(e,t){return this.sync(),this.store.subscribe(e,t)}add(e){this.values?.set(e.id,e),this.store.update(t=>t===null||t instanceof Error?[e]:t.find(t=>t.id===e.id)===void 0?[e,...t]:t)}get(e,t){if(this.values===void 0)throw Error(`Collection: values is not defined`);return this.values.get(e,t)}extract(e){if(this.values===void 0)throw Error(`Collection: values is not defined`);return this.values.extract(e)}delete(e){this.values?.delete(e),this.store.update(t=>t===null||t instanceof Error?t:t.filter(t=>t.id!==e))}set(e,t){this.store.update(n=>{if(n===null||n instanceof Error)return[e];let r=n.findIndex(t=>t.id===e.id);return r===-1?t?.add===!0?[e,...n]:n:(n[r]=e,n)}),this.values?.set(e.id,e)}update(e,t,n){if(this.values===void 0)throw Error(`Collection: values is not defined`);let r=this.values.extract(e);if(r===null)return;let i=t(r)??r;this.set(i,n)}sync(){return(this.timestamp===0||this.timestamp+this.revalidate<Date.now())&&(this.stale||this.clear(),this.refresh()),this}async fetch(){return await this.refresh(),this}replace(e){let t=e;if(this.store.set(t),this.timestamp=Date.now(),this.values!==void 0)for(let e of t)this.values.set(e.id,e)}async refresh(){if(this.request===void 0)return;this.timestamp=Date.now();let e=await this.request();e instanceof Error?this.store.set(e):this.replace(e)}persist(e){if(typeof window>`u`)return;let t=this.load(e);if(t!==null&&(this.store.set(t),this.values?.persistent===!1))for(let e of t)this.values.set(e.id,e);this.store.subscribe(t=>{t instanceof Error||(t===null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t)))})}load(e){if(typeof window>`u`)return null;let t=localStorage.getItem(e);if(t===null)return null;try{let n=JSON.parse(t);return Array.isArray(n)?n:(console.error(`Storage value for ${e} is not an array:`,n),null)}catch(t){return console.error(`Invalid storage value for ${e}`,t),null}}bind(e){e.subscribe(e=>{e===null&&this.clear()})}clear(){this.store.set(null),this.values?.clear(),this.timestamp=0}};function A(e){return new re(e)}var ie={revalidate:3e5,stale:!1},ae=class{persistent;values={};fetch;revalidate;permanent;stale;persist;ready=!1;dumping=null;constructor(e){this.fetch=e.get,this.revalidate=e.revalidate??j.revalidate,this.permanent=e.permanent??j.permanent,this.stale=e.stale??j.stale,this.persist=e.persist,this.persistent=this.persist!==void 0,this.load(),e.bind!==void 0&&this.bind(e.bind)}set(e,t,n){let r=t,i=this.values[e]??(this.values[e]=this.create(r));return n?.stash===!0?this.stash(e):delete i.stash,i.store.set(r),!(r instanceof Error)&&this.ready&&n?.stash!==!0&&this.dump(),this.values[e].store}reset(e){let t=this.values[e]?.stash;return t===void 0?this.extract(e):(t===null?this.delete(e):this.set(e,t),t)}get(e,t){this.ready=!0;let n=this.values[e]??=this.create();return this.fetch===void 0||t?.fetch===!1||(n.timestamp===0||n.timestamp+this.revalidate<Date.now())&&(this.stale||n.store.set(null),n.timestamp=Date.now(),this.fetch(e).then(t=>this.set(e,t))),n.store}extract(e){if(this.values[e]===void 0)return null;let t=x(this.values[e].store);return t instanceof Error?null:t}delete(e){if(!(e in this.values))return;let t=this.values[e];t.store.set(null),t.timestamp=0,delete t.stash,this.dump()}clear(){for(let e of Object.keys(this.values))this.delete(e);this.ready=!1}create(e){return{store:g(e??null),timestamp:this.permanent&&e!==void 0?Date.now():0}}stash(e){let t=this.values[e];if(t.stash!==void 0){console.warn(`Stash overlap, skipping`);return}let n=this.get(e,{fetch:!1});t.stash??=x(n)}dump(e=!0){if(this.persist===void 0||typeof window>`u`)return;if(e){this.dumping??=setTimeout(()=>this.dump(!1),oe);return}this.dumping=null;let t={};for(let[e,n]of Object.entries(this.values)){let r=n.stash??x(n.store);r!==null&&!(r instanceof Error)&&(t[e]=r)}Object.keys(t).length===0?localStorage.removeItem(this.persist):localStorage.setItem(this.persist,JSON.stringify(t))}load(){if(this.persist===void 0||typeof window>`u`)return;let e=localStorage.getItem(this.persist);if(e!==null)try{let t=JSON.parse(e);if(typeof t!=`object`||!t){console.error(`Storage value for ${this.persist} is not an object:`,t);return}for(let[e,n]of Object.entries(t))this.set(e,n)}catch(e){console.error(`Invalid storage value for ${this.persist}`,e)}}bind(e){e.subscribe(e=>{e===null&&this.clear()})}},oe=100,j={revalidate:3e5,permanent:!1,stale:!1};function se(e={}){return new ae(e)}var ce=class{store;default;request;revalidate;timestamp=0;constructor(e){this.default=e.default??null,this.request=e.get,this.revalidate=e.revalidate??de.revalidate,this.store=e.persist===void 0||typeof window>`u`?g(this.default):le(e.persist,this.default,e.session),e.bind&&this.bind(e.bind)}set(e){this.store.set(e)}update(e){this.store.update(t=>e(t))}subscribe(e,t){return this.sync(),this.store.subscribe(e,t)}extract(){return x(this.store)}sync(){this.request!==void 0&&this.timestamp+this.revalidate<Date.now()&&this.refresh()}async refresh(){if(this.request===void 0)return;this.timestamp=Date.now();let e=await this.request();e instanceof Error||this.set(e)}bind(e){e.subscribe(e=>{e===null&&this.store.set(this.default)})}};function M(e={}){return new ce(e)}function le(e,t,n){let r=g(ue(e)??t),i=n?`sessionStorage`:`localStorage`;return r.subscribe(t=>{t===null?window[i].removeItem(e):window[i].setItem(e,JSON.stringify(t))}),r}function ue(e){let t=window.localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch(t){return console.error(`Invalid storage value for ${e}`,t),null}}var de={revalidate:3e5};function fe(e,t){return new Promise(n=>{let r=!1,i=null;i=e.subscribe(e=>{t(e)&&(i?.(),r=!0,n(e))}),r&&i?.()})}function pe(e){return fe(e,e=>e!==null&&!(e instanceof Error))}function me(e){let t=x(e);if(t===null||t instanceof Error)throw Error(`Store contains null or an error`);return t}var he={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},ge=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},_e=Symbol(`lucide-context`),ve=()=>f(_e),ye=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),be=s(`<svg><!><!></svg>`);function N(a,o){m(o,!0);let s=ve()??{},f=_(o,`color`,19,()=>s.color??`currentColor`),h=_(o,`size`,19,()=>s.size??24),g=_(o,`strokeWidth`,19,()=>s.strokeWidth??2),v=_(o,`absoluteStrokeWidth`,19,()=>s.absoluteStrokeWidth??!1),b=_(o,`iconNode`,19,()=>[]),x=p(o,ye),S=w(()=>v()?Number(g())*24/Number(h()):g());var C=be();E(C,e=>({...he,...e,...x,width:h(),height:h(),stroke:f(),"stroke-width":n(S),class:[`lucide-icon lucide`,s.class,o.name&&`lucide-${o.name}`,o.class]}),[()=>!o.children&&!ge(x)&&{"aria-hidden":`true`}]);var D=l(C);ee(D,17,b,u,(r,i)=>{var a=w(()=>c(n(i),2));let o=()=>n(a)[0],s=()=>n(a)[1];var l=t(),u=e(l);d(u,o,!0,(e,t)=>{E(e,()=>({...s()}))}),y(r,l)});var O=T(D);k(O,()=>o.children??r),i(C),y(a,C),te()}var xe=new Set([`$$slots`,`$$events`,`$$legacy`]);function Se(e,t){let n=p(t,xe),r=[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}]];N(e,S({name:`loader-circle`},()=>n,{get iconNode(){return r}}))}var Ce=new Set([`$$slots`,`$$events`,`$$legacy`]);function we(e,t){let n=p(t,Ce),r=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]];N(e,S({name:`rotate-ccw`},()=>n,{get iconNode(){return r}}))}var Te=v(`<div class="m-auto flex flex-col items-center gap-4"><span class="text-destructive">Something went terribly wrong</span> <button class="p-4 border border-muted-foreground hover:bg-muted cursor-pointer rounded-md flex items-center gap-2"><!></button></div>`);function Ee(n,r){let a=()=>h(r.store,`$store`,s),[s,c]=D(),u=_(r,`silent`,3,!1);var d=t(),f=e(d),p=n=>{var i=t(),a=e(i),o=n=>{var i=t(),a=e(i);k(a,()=>r.waiting),y(n,i)},s=e=>{Se(e,{class:`animate-spin m-auto text-muted-foreground`})};O(a,e=>{r.waiting?e(o):u()||e(s,1)}),y(n,i)},m=n=>{var s=t(),c=e(s),d=n=>{var i=t(),o=e(i);k(o,()=>r.error,a),y(n,i)},f=e=>{var t=Te(),n=T(l(t),2);we(l(n),{size:16}),i(n),i(t),o(`click`,n,()=>window.location.reload()),y(e,t)};O(c,e=>{r.error?e(d):u()||e(f,1)}),y(n,s)},g=n=>{var i=t(),o=e(i);k(o,()=>r.awaited,a),y(n,i)};O(f,e=>{a()===null?e(p):a()instanceof Error?e(m,1):e(g,-1)}),y(n,d),c()}a([`click`]);var P=M({persist:`auth:account`}),F=M({persist:`auth:challenge`,bind:P}),De=M({persist:`auth:method`}),Oe=g(!1),ke=g(!1),Ae=C([F,P,Oe],([e,t,n])=>e!==null&&t!==null&&n===!1);function je(e){P.extract()?.id!==e.id&&P.set(null),P.set(e)}function I(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get(`*`))&&r.slice().map(function(e){e(t,n)})}}}var L=b((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Err=void 0,e.Err=class extends Error{code;name=`Error`;message=``;cause;constructor(e,t){super(),this.code=e,delete this.stack,Object.defineProperty(this,"name",{enumerable:!1}),typeof t==`string`?(this.message=t,Object.defineProperty(this,"cause",{enumerable:!1})):(Object.defineProperty(this,"message",{enumerable:!1}),Object.defineProperty(this,"cause",{enumerable:t!==void 0,value:t}))}}}))();async function Me(e,t){if(!e.ok||!e.body||e.bodyUsed)return e;let n=e.headers.get(`content-type`);if(!n||!~n.indexOf(`multipart/`))return e;let r=n.indexOf(`boundary=`),i=`-`;if(~r){let e=r+9,t=n.indexOf(`;`,e);i=n.slice(e,t>-1?t:void 0).trim().replace(/"/g,``)}return async function*(e,t,n){let r,i,a,o=new TextDecoder(`utf8`),s=e.getReader(),c=!n||!n.multiple,l=t.length,u=``,d=[];try{let e;e:for(;!(e=await s.read()).done;){let n=o.decode(e.value,{stream:!0});r=u.length,u+=n;let s=n.indexOf(t);for(~s?r+=s:r=u.indexOf(t),d=[];~r;){let e=u.slice(0,r),n=u.slice(r+l);if(i){let t=e.indexOf(`\r
2
2
  \r
3
3
  `)+4,r=e.lastIndexOf(`\r
4
4
  `,t),i=!1,o=e.slice(t,r>-1?void 0:r),s=String(e.slice(0,t)).trim().split(`\r
5
5
  `),l={},u=s.length;for(;a=s[--u];a=a.split(`: `),l[a.shift().toLowerCase()]=a.join(`: `));if(a=l[`content-type`],a&&~a.indexOf(`application/json`))try{o=JSON.parse(o),i=!0}catch{}if(a={headers:l,body:o,json:i},c?yield a:d.push(a),n.slice(0,2)===`--`)break e}else t=`\r
6
- `+t,i=l+=2;u=n,r=u.indexOf(t)}d.length&&(yield d)}}finally{d.length&&(yield d),await s.cancel()}}(e.body,`--${i}`,t)}var Ne=Object.defineProperty,Pe=(e,t)=>{for(var n in t)Ne(e,n,{get:t[n],enumerable:!0})},Fe=Symbol(`meta`);function Ie(e){return e[Fe]??null}function Le(e,t){Object.defineProperty(e,Fe,{value:t,writable:!1,enumerable:!1,configurable:!1})}var Re=class{origin;events;sleep;fetch=fetch.bind(globalThis);challenge=null;constructor(e){this.origin=e.origin,this.events=e.events,e.sleep!==void 0&&(this.sleep=JSON.stringify(e.sleep))}async json(e,t){let n=this.setup(t),r=await this.request(e,n),i=r.headers.get(`content-type`)===`application/json`?await r.json():await r.text();return typeof i==`object`&&i&&Le(i,{status:r.status,headers:r.headers}),r.ok?(this.events.emit(`response`,{status:r.status,headers:r.headers}),i):(this.events.emit(`error`,{code:r.status,body:i}),new L.Err(r.status,i))}async multipart(e,t){let n=this.setup(t),r=await this.request(e,n);if(!r.ok)return new L.Err(r.status,{body:await r.text()});let i=await Me(r),a=await i.next();if(n.debug&&console.debug(`Multipart ACK`,{path:e,body:a.value.body}),JSON.parse(a.value.body)!==`ACK`)throw Error(`No ACK`);return(async function*(){for await(let t of i){n.debug&&console.debug(`Multipart chunk`,{path:e,body:t.body});let r=JSON.parse(t.body);if(r===`FIN`)return;yield r}})()}async octets(e,t){let n=await this.multipart(e,t);if(n instanceof Error)return n;let r=(await n.next()).value,i=I();return(async()=>{await new Promise(e=>setTimeout(e,0));for await(let r of n){let n=r.status===`completed`?r.error?new L.Err(r.error.code??`UNKNOWN`,r.error.message):r.output:new L.Err(`EXCEPTION`);t?.debug&&console.debug(`Emitting octets step`,{path:e,step:r.step,payload:n}),i.emit(r.step,n)}i.off(`*`)})(),[r,i]}authenticate(e){this.challenge=e}use(e){this.fetch=e}setup(e){if(e??={},e.headers??={},e.headers.accept??=`application/json`,this.sleep!==void 0&&(e.headers.sleep=this.sleep),e.credentials===`include`&&e.headers.authorization===void 0){if(this.challenge===null)throw Error(`Credentials must be set before sending authenticated request`);e.headers.authorization=this.challenge,delete e.credentials}return e.body!==void 0&&(e.method??=`POST`,e.body instanceof File||e.body instanceof ReadableStream?(e.duplex=`half`,e.headers[`content-type`]??=e.body.type??`application/octet-stream`):(e.body=JSON.stringify(e.body),e.headers[`content-type`]??=`application/json`)),e}async request(e,t){let n=new URL(e,this.origin),r=await this.fetch(n.href,t),i=r.headers.get(`authorization`);return i!==null&&(this.challenge=i,this.events.emit(`challenge`,i)),r}},ze=class{agent;path;init;constructor(e){this.agent=e.agent,this.path=e.path,this.init=e.init}async json(e,t){return await this.request(`json`,e,t)}async octets(e,t){return await this.request(`octets`,e,t)}async multipart(e,t){return await this.request(`multipart`,e,t)}async request(e,t,n){let r=typeof t==`string`?t:``;n=typeof t==`string`?n:t;let i=this.abs(r),a=Object.assign({},this.init,n);if(e===`json`)return await this.agent.json(i,a);if(e===`octets`)return await this.agent.octets(i,a);if(e===`multipart`)return await this.agent.multipart(i,a);throw Error(`Invalid method: ${e}`)}abs(e){let t=new URL(this.path,`https://void`),n=new URL(e,t);return n.pathname.endsWith(`/`)||(n.pathname+=`/`),n.pathname+n.search}},Be=class{events;agent;constructor(e){this.events=I(),this.agent=new Re({origin:e.origin,events:this.events,sleep:e.sleep})}resource(e,t){return new ze({agent:this.agent,path:e,init:t})}authenticate(e){this.agent.authenticate(e)}use(e){this.agent.use(e)}};function Ve(e){return typeof e==`string`&&(e={origin:e}),new Be(e)}Pe({},{format:()=>Ue,test:()=>He});function He(e){return/^[[(]\d+\.\.\d+[\])]{1}$/.test(e)}function Ue(e,t){let[n,r]=t.slice(1,-1).split(`..`);return[`${e}${t.startsWith(`(`)?`>`:`>=`}${n}`,`${e}${t.endsWith(`)`)?`<`:`<=`}${r}`]}var We={title:`Configuration`,description:`The configuration of a Toa application`},Ge=8e3,Ke=(()=>{if(typeof window>`u`)return``;let{protocol:e,hostname:t,origin:n}=window.location;return qe(t)?`${e}//${t}:${Ge}`:n})();function qe(e){return e===`localhost`||e===`127.0.0.1`||e===`[::1]`||e.startsWith(`192.168.`)||e.startsWith(`172.16.`)||e.startsWith(`10.`)}var Je=`1`;(()=>{let e=new Date(Number.parseInt(ne)),t=e.getFullYear(),n=new Date(t,0,1).getTime(),r=new Date(t+1,0,1).getTime();return`${Je}.${(t+(e.getTime()-n)/(r-n)).toFixed(4)}`})();var R=Ve({origin:Ke,sleep:void 0});console.info(`Origin connected`,Ke,`no sleep`);var Ye=R.resource(`/accounts/echo/`);async function z(e){let t={method:`GET`};return e!==void 0&&(t.headers={authorization:e},t.credentials=`include`),Ye.json(t)}var Xe=R.resource(`/identity/basic/`,{credentials:`include`});async function Ze(e,t){return await Xe.json(e,{method:`POST`,body:t})}var Qe=R.resource(`/accounts/otp/`);async function B(e,t){return typeof e==`string`?await Qe.json(e,{method:`POST`,body:t,credentials:`include`}):await Qe.json({method:`POST`,body:e})}var V=R.resource(`/accounts/passkeys/`);async function H(e,t){return typeof e==`string`?await V.json(e,{method:`POST`,body:t,credentials:`include`}):await V.json({method:`POST`,body:e})}var $e=R.resource(`/identity/federation/`,{credentials:`include`});async function et(e,t){return await $e.json(e,{method:`POST`,body:t})}async function U(){let e=F.extract();if(e===null)return;let t=await z(e);if(t instanceof Error)return t;je(t)}function W(e,t){return e instanceof Error?e:(je(e),De.set(t),e)}var tt=M({persist:`auth:oidc:nonce`});function nt(e,t){let{client:n,endpoint:r,type:i,scope:a}=e;if(n===void 0||n===``)throw Error(`Client ID is required`);let o=rt(),s=new URLSearchParams({client_id:n,redirect_uri:window.location.origin+`/`,response_type:i,response_mode:`fragment`,scope:a,state:btoa(JSON.stringify({idp:t})),nonce:o});tt.set(o),window.location.href=r+`?`+s}function rt(){return window.crypto?.randomUUID?.()??Math.random().toString(16).slice(2)}var G=globalThis.__sveltekit_156z33u.env,K={apple:{iss:`https://appleid.apple.com`,endpoint:`https://appleid.apple.com/auth/authorize`,type:`code`,scope:`openid`,client:G.PUBLIC_APPLE_CLIENT_ID},google:{iss:`https://accounts.google.com`,endpoint:`https://accounts.google.com/o/oauth2/v2/auth`,type:`id_token`,scope:`openid profile`,client:G.PUBLIC_GOOGLE_CLIENT_ID}};async function it(e){await at();let t=await new Promise(t=>{window.google.accounts.oauth2.initCodeClient({client_id:e.client,scope:e.scope,ux_mode:`popup`,state:btoa(JSON.stringify({idp:`google`})),redirect_uri:window.location.origin+`/`,callback:async e=>{t(e)}}).requestCode()});return t?.code===void 0?Error(`NO_RESPONSE`,{cause:t}):t.code}function at(){return new Promise((e,t)=>{if(window.google?.accounts?.oauth2!==void 0)return e(void 0);let n=document.createElement(`script`);n.src=`https://accounts.google.com/gsi/client`,n.async=!0,n.onload=()=>e(void 0),n.onerror=t,document.head.appendChild(n)})}var q=typeof window<`u`&&window;async function ot(e){await st(e);let t=await q.AppleID.auth.signIn().catch(e=>e);return t instanceof Error?t:t?.authorization===void 0?Error(`No authentication response received`,{cause:t}):t.authorization.code}function st(e){if(q.AppleID===void 0)return new Promise((t,n)=>{let r=document.createElement(`script`);r.src=`https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js`,r.async=!0,r.onload=()=>{q.AppleID.auth.init({clientId:e.client,scope:e.scope,redirectURI:window.location.origin,state:btoa(JSON.stringify({idp:`apple`})),usePopup:!0}),t(void 0)},r.onerror=n,document.head.appendChild(r)})}var ct={apple:ot,google:it};async function lt(e,t){let n=await ut(e);return n instanceof Error?n:t===void 0?ft(e,n):dt(t,n)}async function ut(e){let t=ct[e]??nt,n=K[e],r=await t(n,e);if(r instanceof Error)return console.error(`Authentication failed`,r),r;if(r===void 0)throw Error(`No authentication code received, redirect flow is not supported`);let i={code:r,iss:n.iss,for:window.location.origin};return btoa(JSON.stringify(i))}async function dt(e,t){let n=await et(e,{scheme:`code`,credentials:t});if(n instanceof Error)return n;U()}async function ft(e,t){return W(await z(`Code `+t),e)}function pt(){P.set(null)}async function mt(e,t){return W(await z(`Basic `+btoa(`${e}:${t}`)),`password`)}async function ht(e,t){return await Ze(e,t)}async function gt(e,t){let n=await ht(e,t);if(n instanceof Error)return n;U()}async function _t(e){return B({email:e})}async function vt(e,t){return await B(e,{email:t})}async function yt(e,t){return W(await z(`OTP `+btoa(`${e}:${t}`)),`password`)}var bt=R.resource(`/identity/passkeys/challenges/`);async function xt(e,t){let n={type:e};return t===void 0?await bt.json(`.`,{method:`POST`,body:n}):await bt.json(t,{method:`POST`,body:n})}var St=R.resource(`/identity/passkeys/`);async function Ct(e){return await St.json(e,{credentials:`include`})}async function wt(){return await Ct((await pe(P)).id)}A({get:wt,persist:`identity:passkeys`,bind:P,stale:!0});function J(e){let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r.buffer}function Tt(e){return new TextEncoder().encode(e).buffer}function Y(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function Et({id:e,transports:t}){return{id:J(e),type:`public-key`,transports:t}}async function Dt(e,t){let n={challenge:J(t.challenge),timeout:t.timeout,authenticatorSelection:t.authenticatorSelection,pubKeyCredParams:t.pubKeyCredParams,rp:{name:`app`},user:{id:Tt(e.id),name:e.name,displayName:e.name},excludeCredentials:t.excludeCredentials.map(Et)};return await navigator.credentials.create({publicKey:n}).catch(e=>e)}async function Ot(e){let t={timeout:e.timeout,challenge:J(e.challenge),allowCredentials:e.allowCredentials.map(Et),userVerification:e.userVerification};return await navigator.credentials.get({publicKey:t})}async function kt(e,t){let n=await xt(`creation`,t);if(n instanceof Error)return n;let r=await Dt({id:n.identity,name:e},n);if(r instanceof Error)return r;if(r===null)throw Error(`No credential is created`);return{key:At(r,e),identity:n.identity}}function At(e,t){let n=e.response,r=n.getAuthenticatorData(),i=n.getTransports(),a=n.getPublicKeyAlgorithm(),o=n.getPublicKey(),s=e.getClientExtensionResults();if(o===null)throw Error(`No public key is created`);return{id:e.id,type:e.type,response:{attestationObject:Y(n.attestationObject),clientDataJSON:Y(n.clientDataJSON),authenticatorData:Y(r),transports:i,publicKeyAlgorithm:a,publicKey:Y(o)},authenticatorAttachment:e.authenticatorAttachment,clientExtensionResults:s,label:t}}async function jt(e){let t=await xt(`request`,e);if(t instanceof Error)return t;let n=Date.now(),r=await Ot(t).catch(e=>e);return r instanceof Error?r.name===`NotAllowedError`&&Date.now()-n<50?new Nt:r:r===null?Error(`No credential given`):Mt(r)}function Mt(e){let t=e.response;return{id:e.id,type:e.type,response:{authenticatorData:Y(t.authenticatorData),clientDataJSON:Y(t.clientDataJSON),signature:Y(t.signature),userHandle:t.userHandle===null?null:Y(t.userHandle)},authenticatorAttachment:e.authenticatorAttachment,clientExtensionResults:e.getClientExtensionResults()}}var Nt=class extends Error{constructor(){super(),this.name=this.constructor.name}},Pt=typeof window>`u`||window.PublicKeyCredential!==void 0;async function Ft(e,t){let n=await kt(e,t);if(n instanceof Error)return console.error(`Credential creation failed`,n),n;let r=await H(n.identity,n.key);return r instanceof Error&&console.error(`Credential registration failed`,r),W(r,`passkey`)}async function It(e){let t=await jt(e);if(t instanceof Error)return console.error(`Credential request failed`,t),t;let n=await H(t);return n instanceof Error&&console.error(`Credential verification failed`,n),W(n,`passkey`)}function Lt(){}function Rt(e){if(!(e.type===`popstate`&&e.event.hasUAVisualTransition)&&document.startViewTransition!==void 0)return new Promise(t=>{let n=document.startViewTransition({types:[`route`],update:async()=>{zt(),t(),await e.complete}});n.finished.then(Bt,Bt),n.ready.catch(Lt)})}var X=null;function zt(){if(X===null)return;let e=X.el.style.viewTransitionName===X.name;X.el.style.viewTransitionName=e?``:X.name,X.el.style.viewTransitionClass=e?``:X.classes??``}function Bt(){X!==null&&X.el.style.viewTransitionName===X.name&&(Vt(X),X=null)}function Vt(e){e.el.style.viewTransitionName=``,e.el.style.viewTransitionClass=``}g(!1),navigator.userAgent.toLowerCase().includes(`windows`);var Ht=/mac ?os|ios|ipad ?os/i.test(navigator.userAgentData?.platform??``)||/(Mac|iPhone|iPad|iPod)/.test(navigator.userAgent);/android/i.test(navigator.userAgent),/(iPhone|iPad|iPod)/.test(navigator.userAgent),/^((?!chrome|android).)*safari/i.test(navigator.userAgent),`ontouchstart`in window,window.matchMedia(`(display-mode: standalone)`).matches,/PWAShell/i.test(navigator.userAgent),navigator.userAgent.match(/PWAShell\/(\S+)/)?.[1];var Ut=!(`ontouchstart`in window);[`en-US`,`en-LR`,`en-MM`].includes(navigator.language),[`en-US`,`en-GB`,`en-CA`,`en-AU`,`en-NZ`,`en-IE`,`en-IN`,`en-LR`,`en-MM`].includes(navigator.language);function Wt(e=navigator.userAgent){return[/FBAN|FBAV|FB_IAB/i,/Instagram/i,/Twitter/i,/Line/i,/LinkedIn/i,/Snapchat/i,/WhatsApp/i,/WeChat/i,/Messenger/i,/QQ/i,/Reddit/i,/Puffin/i,/TikTok/i,/musical.ly/i,/YouTube/i,/Pinterest/i,/Discord/i,/Telegram/i,/Viber/i,/Slack/i,/Signal/i,/KakaoTalk/i,/Baidu/i].some(t=>t.test(e))||(()=>{let t=RegExp(`(${[`WebView`,`(iPhone|iPod|iPad)(?!.*Safari/)`,`Android.*(wv)`,`(AppleWebKit)(?!.*Safari)`].join(`|`)})`,`ig`);return e.match(t)!==null})()||`TelegramWebviewProxy`in window||`TelegramWebviewProxyProto`in window||`TelegramWebview`in window}Wt(navigator.userAgent);var Gt=new URLSearchParams;new URLSearchParams;function Kt(e){return Gt.get(e)}var qt={"en-US":{native:`English`,locale:`en-US`,dir:`ltr`,nav:{signout:`Sign out`,filter:`Filter components`}}},Jt=[`en-US`];function Yt(e){return Jt.some(t=>t.startsWith(e))}function Z(e){return Jt.find(t=>t.startsWith(e))??`en-US`}var Q=b((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.format=o,e.parse=s;var t=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/[\\"]/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,a=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function o(e){let{type:t,parameters:r}=e;if(!t||!i.test(t))throw TypeError(`Invalid type: ${t}`);let a=t;if(r)for(let e of Object.keys(r)){if(!n.test(e))throw TypeError(`Invalid parameter name: ${e}`);a+=`; ${e}=${y(r[e])}`}return a}function s(e,t){let n=t?.comma===!0?m:65536,r=e.length,i=_(e,t?.start??0,r),o=i;i=g(e,i,r,n);let s=v(e,o,i),c=e.slice(o,s).toLowerCase();return t?.parameters===!1?{type:c,index:i,parameters:new a}:h(e,c,i,r,n)}var c=32,l=9,u=59,d=61,f=34,p=92,m=44;function h(e,t,n,r,i){let o=new a;parameter:for(;n<r&&e.charCodeAt(n)!==i;){n=_(e,n+1,r);let t=n;for(;n<r;){let a=e.charCodeAt(n);if(a===i)break parameter;if(a===u)continue parameter;if(a===d){let a=v(e,t,n),s=e.slice(t,a).toLowerCase();if(n=_(e,n+1,r),n<r&&e.charCodeAt(n)===f){n++;let t=``;for(;n<r;){let a=e.charCodeAt(n++);if(a===f){n=g(e,n,r,i),o[s]===void 0&&(o[s]=t);break}if(a===p&&n<r){t+=e[n++];continue}t+=String.fromCharCode(a)}continue parameter}let c=n;if(n=g(e,n,r,i),o[s]===void 0){let t=v(e,c,n);o[s]=e.slice(c,t)}continue parameter}n++}}return{type:t,index:n,parameters:o}}function g(e,t,n,r){for(;t<n;){let n=e.charCodeAt(t);if(n===u||n===r)break;t++}return t}function _(e,t,n){for(;t<n;){let n=e.charCodeAt(t);if(n!==c&&n!==l)break;t++}return t}function v(e,t,n){for(;n>t;){let t=e.charCodeAt(n-1);if(t!==c&&t!==l)break;n--}return n}function y(e){if(n.test(e))return e;if(t.test(e))return`"${e.replace(r,`\\$&`)}"`;throw TypeError(`Invalid parameter value: ${e}`)}})),$=b(((e,t)=>{var n=Q();t.exports=r;function r(e){for(var t=[],r=0;r<e.length;){var a=i(e,r),o=n.parse(e,{comma:!0,start:a});o.type=e.slice(a,a+o.type.length),t.push(o),r=o.index+1}return t}function i(e,t){for(var n=t;e.charCodeAt(n)===32||e.charCodeAt(n)===9;)n++;return n}})),Xt=b(((e,t)=>{var n=$();t.exports=s,t.exports.preferredCharsets=s;function r(e){for(var t=n(e),r=0,a=0;r<t.length;r++){var o=i(t[r],r);o&&(t[a++]=o)}return t.length=a,t}function i(e,t){return e.type?{charset:e.type,q:e.parameters.q?parseFloat(e.parameters.q):1,i:t}:null}function a(e,t,n){for(var r={o:-1,q:0,s:0},i=0;i<t.length;i++){var a=o(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function o(e,t,n){var r=0;if(t.charset.toLowerCase()===e.toLowerCase())r|=1;else if(t.charset!==`*`)return null;return{i:n,o:t.i,q:t.q,s:r}}function s(e,t){var n=r(e===void 0?`*`:e||``);if(!t)return n.filter(u).sort(c).map(l);var i=t.map(function(e,t){return a(e,n,t)});return i.filter(u).sort(c).map(function(e){return t[i.indexOf(e)]})}function c(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function l(e){return e.charset}function u(e){return e.q>0}})),Zt=b(((e,t)=>{var n=$();t.exports=s,t.exports.preferredEncodings=s;function r(e){for(var t=n(e),r=!1,a=1,s=0,c=0;s<t.length;s++){var l=i(t[s],s);l&&(t[c++]=l,r||=o(`identity`,l),a=Math.min(a,l.q||1))}return r||(t[c++]={encoding:`identity`,q:a,i:s}),t.length=c,t}function i(e,t){return e.type?{encoding:e.type,q:e.parameters.q?parseFloat(e.parameters.q):1,i:t}:null}function a(e,t,n){for(var r={encoding:e,o:-1,q:0,s:0},i=0;i<t.length;i++){var a=o(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function o(e,t,n){var r=0;if(t.encoding.toLowerCase()===e.toLowerCase())r|=1;else if(t.encoding!==`*`)return null;return{encoding:e,i:n,o:t.i,q:t.q,s:r}}function s(e,t,n){var i=r(e||``),o=n?function(e,t){if(e.q!==t.q)return t.q-e.q;var r=n.indexOf(e.encoding),i=n.indexOf(t.encoding);return r===-1&&i===-1?t.s-e.s||e.o-t.o||e.i-t.i:r!==-1&&i!==-1?r-i:r===-1?1:-1}:c;if(!t)return i.filter(u).sort(o).map(l);var s=t.map(function(e,t){return a(e,i,t)});return s.filter(u).sort(o).map(function(e){return t[s.indexOf(e)]})}function c(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i}function l(e){return e.encoding}function u(e){return e.q>0}})),Qt=b(((e,t)=>{var n=Q(),r=$();t.exports=c,t.exports.preferredLanguages=c;function i(e){for(var t=r(e),n=0,i=0;n<t.length;n++){var o=a(t[n],n);o&&(t[i++]=o)}return t.length=i,t}function a(e,t){if(!e.type)return null;var n=e.type.indexOf(`-`);return{prefix:n===-1?e.type:e.type.slice(0,n),suffix:n===-1?void 0:e.type.slice(n+1),q:e.parameters.q?parseFloat(e.parameters.q):1,i:t,full:e.type}}function o(e,t,n){for(var r={o:-1,q:0,s:0},i=0;i<t.length;i++){var a=s(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function s(e,t,r){var i=a(n.parse(e),0);if(!i)return null;var o=0;if(t.full.toLowerCase()===i.full.toLowerCase())o|=4;else if(t.prefix.toLowerCase()===i.full.toLowerCase())o|=2;else if(t.full.toLowerCase()===i.prefix.toLowerCase())o|=1;else if(t.full!==`*`)return null;return{i:r,o:t.i,q:t.q,s:o}}function c(e,t){var n=i(e===void 0?`*`:e||``);if(!t)return n.filter(d).sort(l).map(u);var r=t.map(function(e,t){return o(e,n,t)});return r.filter(d).sort(l).map(function(e){return t[r.indexOf(e)]})}function l(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function u(e){return e.full}function d(e){return e.q>0}})),$t=b(((e,t)=>{var n=Q(),r=$();t.exports=c,t.exports.preferredMediaTypes=c;function i(e){for(var t=r(e),n=0,i=0;n<t.length;n++){var o=a(t[n],n);o&&(t[i++]=o)}return t.length=i,t}function a(e,t){var n=e.type.indexOf(`/`);if(n===-1)return null;var r=e.parameters.q?parseFloat(e.parameters.q):1;return delete e.parameters.q,{type:e.type.slice(0,n),subtype:e.type.slice(n+1),params:e.parameters,q:r,i:t}}function o(e,t,n){for(var r={o:-1,q:0,s:0},i=0;i<t.length;i++){var a=s(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function s(e,t,r){var i=a(n.parse(e),0),o=0;if(!i)return null;if(t.type.toLowerCase()==i.type.toLowerCase())o|=4;else if(t.type!=`*`)return null;if(t.subtype.toLowerCase()==i.subtype.toLowerCase())o|=2;else if(t.subtype!=`*`)return null;var s=Object.keys(t.params);if(s.length>0){if(s.every(function(e){return t.params[e]==`*`||(t.params[e]||``).toLowerCase()==(i.params[e]||``).toLowerCase()}))o|=1;else return null}return{i:r,o:t.i,q:t.q,s:o}}function c(e,t){var n=i(e===void 0?`*/*`:e||``);if(!t)return n.filter(d).sort(l).map(u);var r=t.map(function(e,t){return o(e,n,t)});return r.filter(d).sort(l).map(function(e){return t[r.indexOf(e)]})}function l(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function u(e){return e.type+`/`+e.subtype}function d(e){return e.q>0}}));b(((e,t)=>{var n=Xt(),r=Zt(),i=Qt(),a=$t();t.exports=o,t.exports.Negotiator=o;function o(e){if(!(this instanceof o))return new o(e);this.request=e}o.prototype.charset=function(e){var t=this.charsets(e);return t&&t[0]},o.prototype.charsets=function(e){return n(this.request.headers[`accept-charset`],e)},o.prototype.encoding=function(e,t){var n=this.encodings(e,t);return n&&n[0]},o.prototype.encodings=function(e,t){var n=t||{};return r(this.request.headers[`accept-encoding`],e,n.preferred)},o.prototype.language=function(e){var t=this.languages(e);return t&&t[0]},o.prototype.languages=function(e){return i(this.request.headers[`accept-language`],e)},o.prototype.mediaType=function(e){var t=this.mediaTypes(e);return t&&t[0]},o.prototype.mediaTypes=function(e){return a(this.request.headers.accept,e)},o.prototype.preferredCharset=o.prototype.charset,o.prototype.preferredCharsets=o.prototype.charsets,o.prototype.preferredEncoding=o.prototype.encoding,o.prototype.preferredEncodings=o.prototype.encodings,o.prototype.preferredLanguage=o.prototype.language,o.prototype.preferredLanguages=o.prototype.languages,o.prototype.preferredMediaType=o.prototype.mediaType,o.prototype.preferredMediaTypes=o.prototype.mediaTypes}))();var en=`en-US`,tn=M({persist:`intl:selected`}),nn=C([P,tn],([e,t])=>t?Z(t):rn()||(e?.locale!==void 0&&Yt(e.locale)?Z(e.locale):en));C(P,e=>e?.grammar??`none`);function rn(){if(typeof navigator<`u`){for(let e of navigator.languages)if(Yt(e))return Z(e)}return null}var an=C(nn,e=>qt[e]);export{Se as A,P as C,De as D,ke as E,me as M,se as N,Oe as O,A as P,I as S,F as T,K as _,Ut as a,We as b,Ft as c,_t as d,yt as f,lt as g,pt as h,Ht as i,N as j,Ee as k,Pt as l,mt as m,nn as n,Rt as o,gt as p,Kt as r,It as s,an as t,vt as u,U as v,Ae as w,Ie as x,R as y};
6
+ `+t,i=l+=2;u=n,r=u.indexOf(t)}d.length&&(yield d)}}finally{d.length&&(yield d),await s.cancel()}}(e.body,`--${i}`,t)}var Ne=Object.defineProperty,Pe=(e,t)=>{for(var n in t)Ne(e,n,{get:t[n],enumerable:!0})},Fe=Symbol(`meta`);function Ie(e){return e[Fe]??null}function Le(e,t){Object.defineProperty(e,Fe,{value:t,writable:!1,enumerable:!1,configurable:!1})}var Re=class{origin;events;sleep;fetch=fetch.bind(globalThis);challenge=null;constructor(e){this.origin=e.origin,this.events=e.events,e.sleep!==void 0&&(this.sleep=JSON.stringify(e.sleep))}async json(e,t){let n=this.setup(t),r=await this.request(e,n),i=r.headers.get(`content-type`)===`application/json`?await r.json():await r.text();return typeof i==`object`&&i&&Le(i,{status:r.status,headers:r.headers}),r.ok?(this.events.emit(`response`,{status:r.status,headers:r.headers}),i):(this.events.emit(`error`,{code:r.status,body:i}),new L.Err(r.status,i))}async multipart(e,t){let n=this.setup(t),r=await this.request(e,n);if(!r.ok)return new L.Err(r.status,{body:await r.text()});let i=await Me(r),a=await i.next();if(n.debug&&console.debug(`Multipart ACK`,{path:e,body:a.value.body}),JSON.parse(a.value.body)!==`ACK`)throw Error(`No ACK`);return(async function*(){for await(let t of i){n.debug&&console.debug(`Multipart chunk`,{path:e,body:t.body});let r=JSON.parse(t.body);if(r===`FIN`)return;yield r}})()}async octets(e,t){let n=await this.multipart(e,t);if(n instanceof Error)return n;let r=(await n.next()).value,i=I();return(async()=>{await new Promise(e=>setTimeout(e,0));for await(let r of n){let n=r.status===`completed`?r.error?new L.Err(r.error.code??`UNKNOWN`,r.error.message):r.output:new L.Err(`EXCEPTION`);t?.debug&&console.debug(`Emitting octets step`,{path:e,step:r.step,payload:n}),i.emit(r.step,n)}i.off(`*`)})(),[r,i]}authenticate(e){this.challenge=e}use(e){this.fetch=e}setup(e){if(e??={},e.headers??={},e.headers.accept??=`application/json`,this.sleep!==void 0&&(e.headers.sleep=this.sleep),e.credentials===`include`&&e.headers.authorization===void 0){if(this.challenge===null)throw Error(`Credentials must be set before sending authenticated request`);e.headers.authorization=this.challenge,delete e.credentials}return e.body!==void 0&&(e.method??=`POST`,e.body instanceof File||e.body instanceof ReadableStream?(e.duplex=`half`,e.headers[`content-type`]??=e.body.type??`application/octet-stream`):(e.body=JSON.stringify(e.body),e.headers[`content-type`]??=`application/json`)),e}async request(e,t){let n=new URL(e,this.origin),r=await this.fetch(n.href,t),i=r.headers.get(`authorization`);return i!==null&&(this.challenge=i,this.events.emit(`challenge`,i)),r}},ze=class{agent;path;init;constructor(e){this.agent=e.agent,this.path=e.path,this.init=e.init}async json(e,t){return await this.request(`json`,e,t)}async octets(e,t){return await this.request(`octets`,e,t)}async multipart(e,t){return await this.request(`multipart`,e,t)}async request(e,t,n){let r=typeof t==`string`?t:``;n=typeof t==`string`?n:t;let i=this.abs(r),a=Object.assign({},this.init,n);if(e===`json`)return await this.agent.json(i,a);if(e===`octets`)return await this.agent.octets(i,a);if(e===`multipart`)return await this.agent.multipart(i,a);throw Error(`Invalid method: ${e}`)}abs(e){let t=new URL(this.path,`https://void`),n=new URL(e,t);return n.pathname.endsWith(`/`)||(n.pathname+=`/`),n.pathname+n.search}},Be=class{events;agent;constructor(e){this.events=I(),this.agent=new Re({origin:e.origin,events:this.events,sleep:e.sleep})}resource(e,t){return new ze({agent:this.agent,path:e,init:t})}authenticate(e){this.agent.authenticate(e)}use(e){this.agent.use(e)}};function Ve(e){return typeof e==`string`&&(e={origin:e}),new Be(e)}Pe({},{format:()=>Ue,test:()=>He});function He(e){return/^[[(]\d+\.\.\d+[\])]{1}$/.test(e)}function Ue(e,t){let[n,r]=t.slice(1,-1).split(`..`);return[`${e}${t.startsWith(`(`)?`>`:`>=`}${n}`,`${e}${t.endsWith(`)`)?`<`:`<=`}${r}`]}var We={title:`Configuration`,description:`The configuration of a Toa application`},Ge=8e3,Ke=(()=>{if(typeof window>`u`)return``;let{protocol:e,hostname:t,origin:n}=window.location;return qe(t)?`${e}//${t}:${Ge}`:n})();function qe(e){return e===`localhost`||e===`127.0.0.1`||e===`[::1]`||e.startsWith(`192.168.`)||e.startsWith(`172.16.`)||e.startsWith(`10.`)}var Je=`1`;(()=>{let e=new Date(Number.parseInt(ne)),t=e.getFullYear(),n=new Date(t,0,1).getTime(),r=new Date(t+1,0,1).getTime();return`${Je}.${(t+(e.getTime()-n)/(r-n)).toFixed(4)}`})();var R=Ve({origin:Ke,sleep:void 0});console.info(`Origin connected`,Ke,`no sleep`);var Ye=R.resource(`/accounts/echo/`);async function z(e){let t={method:`GET`};return e!==void 0&&(t.headers={authorization:e},t.credentials=`include`),Ye.json(t)}var Xe=R.resource(`/identity/basic/`,{credentials:`include`});async function Ze(e,t){return await Xe.json(e,{method:`POST`,body:t})}var Qe=R.resource(`/accounts/otp/`);async function B(e,t){return typeof e==`string`?await Qe.json(e,{method:`POST`,body:t,credentials:`include`}):await Qe.json({method:`POST`,body:e})}var V=R.resource(`/accounts/passkeys/`);async function H(e,t){return typeof e==`string`?await V.json(e,{method:`POST`,body:t,credentials:`include`}):await V.json({method:`POST`,body:e})}var $e=R.resource(`/identity/federation/`,{credentials:`include`});async function et(e,t){return await $e.json(e,{method:`POST`,body:t})}async function U(){let e=F.extract();if(e===null)return;let t=await z(e);if(t instanceof Error)return t;je(t)}function W(e,t){return e instanceof Error?e:(je(e),De.set(t),e)}var tt=M({persist:`auth:oidc:nonce`});function nt(e,t){let{client:n,endpoint:r,type:i,scope:a}=e;if(n===void 0||n===``)throw Error(`Client ID is required`);let o=rt(),s=new URLSearchParams({client_id:n,redirect_uri:window.location.origin+`/`,response_type:i,response_mode:`fragment`,scope:a,state:btoa(JSON.stringify({idp:t})),nonce:o});tt.set(o),window.location.href=r+`?`+s}function rt(){return window.crypto?.randomUUID?.()??Math.random().toString(16).slice(2)}var G=globalThis.__sveltekit_b1rgn3.env,K={apple:{iss:`https://appleid.apple.com`,endpoint:`https://appleid.apple.com/auth/authorize`,type:`code`,scope:`openid`,client:G.PUBLIC_APPLE_CLIENT_ID},google:{iss:`https://accounts.google.com`,endpoint:`https://accounts.google.com/o/oauth2/v2/auth`,type:`id_token`,scope:`openid profile`,client:G.PUBLIC_GOOGLE_CLIENT_ID}};async function it(e){await at();let t=await new Promise(t=>{window.google.accounts.oauth2.initCodeClient({client_id:e.client,scope:e.scope,ux_mode:`popup`,state:btoa(JSON.stringify({idp:`google`})),redirect_uri:window.location.origin+`/`,callback:async e=>{t(e)}}).requestCode()});return t?.code===void 0?Error(`NO_RESPONSE`,{cause:t}):t.code}function at(){return new Promise((e,t)=>{if(window.google?.accounts?.oauth2!==void 0)return e(void 0);let n=document.createElement(`script`);n.src=`https://accounts.google.com/gsi/client`,n.async=!0,n.onload=()=>e(void 0),n.onerror=t,document.head.appendChild(n)})}var q=typeof window<`u`&&window;async function ot(e){await st(e);let t=await q.AppleID.auth.signIn().catch(e=>e);return t instanceof Error?t:t?.authorization===void 0?Error(`No authentication response received`,{cause:t}):t.authorization.code}function st(e){if(q.AppleID===void 0)return new Promise((t,n)=>{let r=document.createElement(`script`);r.src=`https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js`,r.async=!0,r.onload=()=>{q.AppleID.auth.init({clientId:e.client,scope:e.scope,redirectURI:window.location.origin,state:btoa(JSON.stringify({idp:`apple`})),usePopup:!0}),t(void 0)},r.onerror=n,document.head.appendChild(r)})}var ct={apple:ot,google:it};async function lt(e,t){let n=await ut(e);return n instanceof Error?n:t===void 0?ft(e,n):dt(t,n)}async function ut(e){let t=ct[e]??nt,n=K[e],r=await t(n,e);if(r instanceof Error)return console.error(`Authentication failed`,r),r;if(r===void 0)throw Error(`No authentication code received, redirect flow is not supported`);let i={code:r,iss:n.iss,for:window.location.origin};return btoa(JSON.stringify(i))}async function dt(e,t){let n=await et(e,{scheme:`code`,credentials:t});if(n instanceof Error)return n;U()}async function ft(e,t){return W(await z(`Code `+t),e)}function pt(){P.set(null)}async function mt(e,t){return W(await z(`Basic `+btoa(`${e}:${t}`)),`password`)}async function ht(e,t){return await Ze(e,t)}async function gt(e,t){let n=await ht(e,t);if(n instanceof Error)return n;U()}async function _t(e){return B({email:e})}async function vt(e,t){return await B(e,{email:t})}async function yt(e,t){return W(await z(`OTP `+btoa(`${e}:${t}`)),`password`)}var bt=R.resource(`/identity/passkeys/challenges/`);async function xt(e,t){let n={type:e};return t===void 0?await bt.json(`.`,{method:`POST`,body:n}):await bt.json(t,{method:`POST`,body:n})}var St=R.resource(`/identity/passkeys/`);async function Ct(e){return await St.json(e,{credentials:`include`})}async function wt(){return await Ct((await pe(P)).id)}A({get:wt,persist:`identity:passkeys`,bind:P,stale:!0});function J(e){let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r.buffer}function Tt(e){return new TextEncoder().encode(e).buffer}function Y(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function Et({id:e,transports:t}){return{id:J(e),type:`public-key`,transports:t}}async function Dt(e,t){let n={challenge:J(t.challenge),timeout:t.timeout,authenticatorSelection:t.authenticatorSelection,pubKeyCredParams:t.pubKeyCredParams,rp:{name:`app`},user:{id:Tt(e.id),name:e.name,displayName:e.name},excludeCredentials:t.excludeCredentials.map(Et)};return await navigator.credentials.create({publicKey:n}).catch(e=>e)}async function Ot(e){let t={timeout:e.timeout,challenge:J(e.challenge),allowCredentials:e.allowCredentials.map(Et),userVerification:e.userVerification};return await navigator.credentials.get({publicKey:t})}async function kt(e,t){let n=await xt(`creation`,t);if(n instanceof Error)return n;let r=await Dt({id:n.identity,name:e},n);if(r instanceof Error)return r;if(r===null)throw Error(`No credential is created`);return{key:At(r,e),identity:n.identity}}function At(e,t){let n=e.response,r=n.getAuthenticatorData(),i=n.getTransports(),a=n.getPublicKeyAlgorithm(),o=n.getPublicKey(),s=e.getClientExtensionResults();if(o===null)throw Error(`No public key is created`);return{id:e.id,type:e.type,response:{attestationObject:Y(n.attestationObject),clientDataJSON:Y(n.clientDataJSON),authenticatorData:Y(r),transports:i,publicKeyAlgorithm:a,publicKey:Y(o)},authenticatorAttachment:e.authenticatorAttachment,clientExtensionResults:s,label:t}}async function jt(e){let t=await xt(`request`,e);if(t instanceof Error)return t;let n=Date.now(),r=await Ot(t).catch(e=>e);return r instanceof Error?r.name===`NotAllowedError`&&Date.now()-n<50?new Nt:r:r===null?Error(`No credential given`):Mt(r)}function Mt(e){let t=e.response;return{id:e.id,type:e.type,response:{authenticatorData:Y(t.authenticatorData),clientDataJSON:Y(t.clientDataJSON),signature:Y(t.signature),userHandle:t.userHandle===null?null:Y(t.userHandle)},authenticatorAttachment:e.authenticatorAttachment,clientExtensionResults:e.getClientExtensionResults()}}var Nt=class extends Error{constructor(){super(),this.name=this.constructor.name}},Pt=typeof window>`u`||window.PublicKeyCredential!==void 0;async function Ft(e,t){let n=await kt(e,t);if(n instanceof Error)return console.error(`Credential creation failed`,n),n;let r=await H(n.identity,n.key);return r instanceof Error&&console.error(`Credential registration failed`,r),W(r,`passkey`)}async function It(e){let t=await jt(e);if(t instanceof Error)return console.error(`Credential request failed`,t),t;let n=await H(t);return n instanceof Error&&console.error(`Credential verification failed`,n),W(n,`passkey`)}function Lt(){}function Rt(e){if(!(e.type===`popstate`&&e.event.hasUAVisualTransition)&&document.startViewTransition!==void 0)return new Promise(t=>{let n=document.startViewTransition({types:[`route`],update:async()=>{zt(),t(),await e.complete}});n.finished.then(Bt,Bt),n.ready.catch(Lt)})}var X=null;function zt(){if(X===null)return;let e=X.el.style.viewTransitionName===X.name;X.el.style.viewTransitionName=e?``:X.name,X.el.style.viewTransitionClass=e?``:X.classes??``}function Bt(){X!==null&&X.el.style.viewTransitionName===X.name&&(Vt(X),X=null)}function Vt(e){e.el.style.viewTransitionName=``,e.el.style.viewTransitionClass=``}g(!1),navigator.userAgent.toLowerCase().includes(`windows`);var Ht=/mac ?os|ios|ipad ?os/i.test(navigator.userAgentData?.platform??``)||/(Mac|iPhone|iPad|iPod)/.test(navigator.userAgent);/android/i.test(navigator.userAgent),/(iPhone|iPad|iPod)/.test(navigator.userAgent),/^((?!chrome|android).)*safari/i.test(navigator.userAgent),`ontouchstart`in window,window.matchMedia(`(display-mode: standalone)`).matches,/PWAShell/i.test(navigator.userAgent),navigator.userAgent.match(/PWAShell\/(\S+)/)?.[1];var Ut=!(`ontouchstart`in window);[`en-US`,`en-LR`,`en-MM`].includes(navigator.language),[`en-US`,`en-GB`,`en-CA`,`en-AU`,`en-NZ`,`en-IE`,`en-IN`,`en-LR`,`en-MM`].includes(navigator.language);function Wt(e=navigator.userAgent){return[/FBAN|FBAV|FB_IAB/i,/Instagram/i,/Twitter/i,/Line/i,/LinkedIn/i,/Snapchat/i,/WhatsApp/i,/WeChat/i,/Messenger/i,/QQ/i,/Reddit/i,/Puffin/i,/TikTok/i,/musical.ly/i,/YouTube/i,/Pinterest/i,/Discord/i,/Telegram/i,/Viber/i,/Slack/i,/Signal/i,/KakaoTalk/i,/Baidu/i].some(t=>t.test(e))||(()=>{let t=RegExp(`(${[`WebView`,`(iPhone|iPod|iPad)(?!.*Safari/)`,`Android.*(wv)`,`(AppleWebKit)(?!.*Safari)`].join(`|`)})`,`ig`);return e.match(t)!==null})()||`TelegramWebviewProxy`in window||`TelegramWebviewProxyProto`in window||`TelegramWebview`in window}Wt(navigator.userAgent);var Gt=new URLSearchParams;new URLSearchParams;function Kt(e){return Gt.get(e)}var qt={"en-US":{native:`English`,locale:`en-US`,dir:`ltr`,nav:{signout:`Sign out`,filter:`Filter components`}}},Jt=[`en-US`];function Yt(e){return Jt.some(t=>t.startsWith(e))}function Z(e){return Jt.find(t=>t.startsWith(e))??`en-US`}var Q=b((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.format=o,e.parse=s;var t=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/[\\"]/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,a=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function o(e){let{type:t,parameters:r}=e;if(!t||!i.test(t))throw TypeError(`Invalid type: ${t}`);let a=t;if(r)for(let e of Object.keys(r)){if(!n.test(e))throw TypeError(`Invalid parameter name: ${e}`);a+=`; ${e}=${y(r[e])}`}return a}function s(e,t){let n=t?.comma===!0?m:65536,r=e.length,i=_(e,t?.start??0,r),o=i;i=g(e,i,r,n);let s=v(e,o,i),c=e.slice(o,s).toLowerCase();return t?.parameters===!1?{type:c,index:i,parameters:new a}:h(e,c,i,r,n)}var c=32,l=9,u=59,d=61,f=34,p=92,m=44;function h(e,t,n,r,i){let o=new a;parameter:for(;n<r&&e.charCodeAt(n)!==i;){n=_(e,n+1,r);let t=n;for(;n<r;){let a=e.charCodeAt(n);if(a===i)break parameter;if(a===u)continue parameter;if(a===d){let a=v(e,t,n),s=e.slice(t,a).toLowerCase();if(n=_(e,n+1,r),n<r&&e.charCodeAt(n)===f){n++;let t=``;for(;n<r;){let a=e.charCodeAt(n++);if(a===f){n=g(e,n,r,i),o[s]===void 0&&(o[s]=t);break}if(a===p&&n<r){t+=e[n++];continue}t+=String.fromCharCode(a)}continue parameter}let c=n;if(n=g(e,n,r,i),o[s]===void 0){let t=v(e,c,n);o[s]=e.slice(c,t)}continue parameter}n++}}return{type:t,index:n,parameters:o}}function g(e,t,n,r){for(;t<n;){let n=e.charCodeAt(t);if(n===u||n===r)break;t++}return t}function _(e,t,n){for(;t<n;){let n=e.charCodeAt(t);if(n!==c&&n!==l)break;t++}return t}function v(e,t,n){for(;n>t;){let t=e.charCodeAt(n-1);if(t!==c&&t!==l)break;n--}return n}function y(e){if(n.test(e))return e;if(t.test(e))return`"${e.replace(r,`\\$&`)}"`;throw TypeError(`Invalid parameter value: ${e}`)}})),$=b(((e,t)=>{var n=Q();t.exports=r;function r(e){for(var t=[],r=0;r<e.length;){var a=i(e,r),o=n.parse(e,{comma:!0,start:a});o.type=e.slice(a,a+o.type.length),t.push(o),r=o.index+1}return t}function i(e,t){for(var n=t;e.charCodeAt(n)===32||e.charCodeAt(n)===9;)n++;return n}})),Xt=b(((e,t)=>{var n=$();t.exports=s,t.exports.preferredCharsets=s;function r(e){for(var t=n(e),r=0,a=0;r<t.length;r++){var o=i(t[r],r);o&&(t[a++]=o)}return t.length=a,t}function i(e,t){return e.type?{charset:e.type,q:e.parameters.q?parseFloat(e.parameters.q):1,i:t}:null}function a(e,t,n){for(var r={o:-1,q:0,s:0},i=0;i<t.length;i++){var a=o(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function o(e,t,n){var r=0;if(t.charset.toLowerCase()===e.toLowerCase())r|=1;else if(t.charset!==`*`)return null;return{i:n,o:t.i,q:t.q,s:r}}function s(e,t){var n=r(e===void 0?`*`:e||``);if(!t)return n.filter(u).sort(c).map(l);var i=t.map(function(e,t){return a(e,n,t)});return i.filter(u).sort(c).map(function(e){return t[i.indexOf(e)]})}function c(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function l(e){return e.charset}function u(e){return e.q>0}})),Zt=b(((e,t)=>{var n=$();t.exports=s,t.exports.preferredEncodings=s;function r(e){for(var t=n(e),r=!1,a=1,s=0,c=0;s<t.length;s++){var l=i(t[s],s);l&&(t[c++]=l,r||=o(`identity`,l),a=Math.min(a,l.q||1))}return r||(t[c++]={encoding:`identity`,q:a,i:s}),t.length=c,t}function i(e,t){return e.type?{encoding:e.type,q:e.parameters.q?parseFloat(e.parameters.q):1,i:t}:null}function a(e,t,n){for(var r={encoding:e,o:-1,q:0,s:0},i=0;i<t.length;i++){var a=o(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function o(e,t,n){var r=0;if(t.encoding.toLowerCase()===e.toLowerCase())r|=1;else if(t.encoding!==`*`)return null;return{encoding:e,i:n,o:t.i,q:t.q,s:r}}function s(e,t,n){var i=r(e||``),o=n?function(e,t){if(e.q!==t.q)return t.q-e.q;var r=n.indexOf(e.encoding),i=n.indexOf(t.encoding);return r===-1&&i===-1?t.s-e.s||e.o-t.o||e.i-t.i:r!==-1&&i!==-1?r-i:r===-1?1:-1}:c;if(!t)return i.filter(u).sort(o).map(l);var s=t.map(function(e,t){return a(e,i,t)});return s.filter(u).sort(o).map(function(e){return t[s.indexOf(e)]})}function c(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i}function l(e){return e.encoding}function u(e){return e.q>0}})),Qt=b(((e,t)=>{var n=Q(),r=$();t.exports=c,t.exports.preferredLanguages=c;function i(e){for(var t=r(e),n=0,i=0;n<t.length;n++){var o=a(t[n],n);o&&(t[i++]=o)}return t.length=i,t}function a(e,t){if(!e.type)return null;var n=e.type.indexOf(`-`);return{prefix:n===-1?e.type:e.type.slice(0,n),suffix:n===-1?void 0:e.type.slice(n+1),q:e.parameters.q?parseFloat(e.parameters.q):1,i:t,full:e.type}}function o(e,t,n){for(var r={o:-1,q:0,s:0},i=0;i<t.length;i++){var a=s(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function s(e,t,r){var i=a(n.parse(e),0);if(!i)return null;var o=0;if(t.full.toLowerCase()===i.full.toLowerCase())o|=4;else if(t.prefix.toLowerCase()===i.full.toLowerCase())o|=2;else if(t.full.toLowerCase()===i.prefix.toLowerCase())o|=1;else if(t.full!==`*`)return null;return{i:r,o:t.i,q:t.q,s:o}}function c(e,t){var n=i(e===void 0?`*`:e||``);if(!t)return n.filter(d).sort(l).map(u);var r=t.map(function(e,t){return o(e,n,t)});return r.filter(d).sort(l).map(function(e){return t[r.indexOf(e)]})}function l(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function u(e){return e.full}function d(e){return e.q>0}})),$t=b(((e,t)=>{var n=Q(),r=$();t.exports=c,t.exports.preferredMediaTypes=c;function i(e){for(var t=r(e),n=0,i=0;n<t.length;n++){var o=a(t[n],n);o&&(t[i++]=o)}return t.length=i,t}function a(e,t){var n=e.type.indexOf(`/`);if(n===-1)return null;var r=e.parameters.q?parseFloat(e.parameters.q):1;return delete e.parameters.q,{type:e.type.slice(0,n),subtype:e.type.slice(n+1),params:e.parameters,q:r,i:t}}function o(e,t,n){for(var r={o:-1,q:0,s:0},i=0;i<t.length;i++){var a=s(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function s(e,t,r){var i=a(n.parse(e),0),o=0;if(!i)return null;if(t.type.toLowerCase()==i.type.toLowerCase())o|=4;else if(t.type!=`*`)return null;if(t.subtype.toLowerCase()==i.subtype.toLowerCase())o|=2;else if(t.subtype!=`*`)return null;var s=Object.keys(t.params);if(s.length>0){if(s.every(function(e){return t.params[e]==`*`||(t.params[e]||``).toLowerCase()==(i.params[e]||``).toLowerCase()}))o|=1;else return null}return{i:r,o:t.i,q:t.q,s:o}}function c(e,t){var n=i(e===void 0?`*/*`:e||``);if(!t)return n.filter(d).sort(l).map(u);var r=t.map(function(e,t){return o(e,n,t)});return r.filter(d).sort(l).map(function(e){return t[r.indexOf(e)]})}function l(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function u(e){return e.type+`/`+e.subtype}function d(e){return e.q>0}}));b(((e,t)=>{var n=Xt(),r=Zt(),i=Qt(),a=$t();t.exports=o,t.exports.Negotiator=o;function o(e){if(!(this instanceof o))return new o(e);this.request=e}o.prototype.charset=function(e){var t=this.charsets(e);return t&&t[0]},o.prototype.charsets=function(e){return n(this.request.headers[`accept-charset`],e)},o.prototype.encoding=function(e,t){var n=this.encodings(e,t);return n&&n[0]},o.prototype.encodings=function(e,t){var n=t||{};return r(this.request.headers[`accept-encoding`],e,n.preferred)},o.prototype.language=function(e){var t=this.languages(e);return t&&t[0]},o.prototype.languages=function(e){return i(this.request.headers[`accept-language`],e)},o.prototype.mediaType=function(e){var t=this.mediaTypes(e);return t&&t[0]},o.prototype.mediaTypes=function(e){return a(this.request.headers.accept,e)},o.prototype.preferredCharset=o.prototype.charset,o.prototype.preferredCharsets=o.prototype.charsets,o.prototype.preferredEncoding=o.prototype.encoding,o.prototype.preferredEncodings=o.prototype.encodings,o.prototype.preferredLanguage=o.prototype.language,o.prototype.preferredLanguages=o.prototype.languages,o.prototype.preferredMediaType=o.prototype.mediaType,o.prototype.preferredMediaTypes=o.prototype.mediaTypes}))();var en=`en-US`,tn=M({persist:`intl:selected`}),nn=C([P,tn],([e,t])=>t?Z(t):rn()||(e?.locale!==void 0&&Yt(e.locale)?Z(e.locale):en));C(P,e=>e?.grammar??`none`);function rn(){if(typeof navigator<`u`){for(let e of navigator.languages)if(Yt(e))return Z(e)}return null}var an=C(nn,e=>qt[e]);export{Se as A,P as C,De as D,ke as E,me as M,se as N,Oe as O,A as P,I as S,F as T,K as _,Ut as a,We as b,Ft as c,_t as d,yt as f,lt as g,pt as h,Ht as i,N as j,Ee as k,Pt as l,mt as m,nn as n,Rt as o,gt as p,Kt as r,It as s,an as t,vt as u,U as v,Ae as w,Ie as x,R as y};
@@ -1,4 +1,4 @@
1
- import{$ as e,A as t,B as n,Dt as r,E as i,Et as a,J as o,L as s,M as c,N as l,P as u,Q as d,R as f,S as p,Tt as m,a as h,b as g,bt as _,c as v,d as y,dt as b,et as x,i as S,it as C,j as w,k as T,kt as E,l as D,m as O,n as ee,nt as te,o as k,ot as A,p as j,pt as ne,q as M,s as N,st as P,tt as F,u as I,ut as L,v as R,w as z,x as re,y as B,yt as V}from"./CcD_ISxM.js";import"./DZt2sU7P.js";import"./xihTtKlq.js";import{A as ie,C as ae,D as oe,E as se,O as ce,_ as le,a as ue,c as de,d as fe,f as pe,g as me,h as he,i as ge,j as H,l as _e,m as ve,n as ye,p as be,s as xe,u as Se,w as Ce,x as we}from"./D4sJySri.js";import{A as Te,B as Ee,C as De,D as Oe,E as ke,F as Ae,G as je,H as U,I as W,L as Me,M as G,N as Ne,O as Pe,P as Fe,R as Ie,S as Le,T as K,U as Re,V as ze,W as q,b as Be,d as Ve,f as He,g as Ue,h as We,j as Ge,k as Ke,m as qe,p as Je,u as J,v as Ye,w as Xe,x as Ze,y as Qe,z as $e}from"./_DOoyUXQ.js";var et=new Set([`$$slots`,`$$events`,`$$legacy`]);function tt(e,t){let n=h(t,et),r=[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]];H(e,k({name:`log-out`},()=>n,{get iconNode(){return r}}))}var nt=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`role`,`name`,`color`,`stroke`,`aria-label`]);function Y(e,t){_(t,!0);let r=S(t,`role`,3,`status`),i=S(t,`aria-label`,3,`Loading`),a=h(t,nt);{let o=P(()=>t.name===null?void 0:t.name),s=P(()=>t.color===null?void 0:t.color),c=P(()=>t.stroke===null?void 0:t.stroke),l=P(()=>q(`size-4 animate-spin`,t.class));ie(e,k({get role(){return r()},get name(){return n(o)},get color(){return n(s)},get stroke(){return n(c)},get"aria-label"(){return i()},get class(){return n(l)}},()=>a))}V()}var rt={"en-US":{auth:{signupTitle:`One-tap sign-up`,passwordTitle:`Hop in with password`,passwordDescription:`Create an account or sign in`,passkey:`Passkeys`,email:`Email`,alreadyHaveAccount:`Already have an account?`,betterSecurity:`Better security`,passkeysNotSupported:`Passkeys not supported`,passkeysWarning:`Your browser does not respect your privacy and security.`,learnMore:`Learn more`,passwordBlank:`Leave password blank <nobr>to receive</nobr> <nobr>a one-time</nobr> passcode.`,otpInstructions:`Enter the code sent to your email. It expires in 5 minutes.`,continueWith:e=>`Continue with ${e}`,passkeysDescription:`Passkeys are safer than passwords, easier to use, and can’t be stolen.`,yourName:`Your name`,password:`Password`,refresh:{description:e=>`${e?e+`, for`:`For`} security reasons, your credentials have expired. Please log in again to continue.`,title:`Welcome back`,continue:`Continue`},signout:`Sign out`,login:`Log In`,signin:`Sign In`,copyId:`Copy account ID`},credentials:{connect:`Connect`,email:{title:`Email`,description:`Connect your email address`},google:{title:`Google`,description:`Connect your Google account`},apple:{title:`Apple`,description:`Connect your Apple ID`},passkeys:{title:`Passkeys`,tagline:`Sign in faster with a passkey`,create:`Create`,manage:`Manage`,collapse:`Collapse`,add:`Enter passkey name`,delete:`Hold to delete`,unknown:`Unknown`,count:e=>{let t={one:`{n} passkey`,other:`{n} passkeys`},n=`en-US`,r=new Intl.PluralRules(n).select(e),i=t;return(i[r]??i.other).replace(/{n}/g,new Intl.NumberFormat(n).format(e))},meta:(e,t)=>`Added ${e} · Used ${t}`,duplicate:`This device already has a passkey for your account`,failed:`Could not create the passkey. Please try again.`},transfer:{action:`Sign in on another device`,title:`Scan to sign in`,description:`Use your other device to scan this code and sign in.`,done:`Done`}}}},X=ne(ye,e=>rt[e]),it=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),at=w(`<div><!></div>`);function ot(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,it);var o=at();I(o,e=>({"data-slot":`card-content`,class:e,...i}),[()=>q(`px-(--card-spacing)`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var st=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),ct=w(`<p><!></p>`);function lt(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,st);var o=ct();I(o,e=>({"data-slot":`card-description`,class:e,...i}),[()=>q(`text-sm text-muted-foreground`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var ut=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),dt=w(`<div><!></div>`);function ft(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,ut);var o=dt();I(o,e=>({"data-slot":`card-footer`,class:e,...i}),[()=>q(`rounded-b-xl border-t bg-muted/50 p-(--card-spacing) flex items-center`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var pt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),mt=w(`<div><!></div>`);function ht(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,pt);var o=mt();I(o,e=>({"data-slot":`card-header`,class:e,...i}),[()=>q(`gap-1 rounded-t-xl px-(--card-spacing) [.border-b]:pb-(--card-spacing) group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var gt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),_t=w(`<div><!></div>`);function vt(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,gt);var o=_t();I(o,e=>({"data-slot":`card-title`,class:e,...i}),[()=>q(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var yt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),bt=w(`<div><!></div>`);function xt(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=S(t,`size`,3,`default`),o=h(t,yt);var s=bt();I(s,e=>({"data-slot":`card`,"data-size":i(),class:e,...o}),[()=>q(`gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col`,t.class)]);var c=d(s);B(c,()=>t.children??r),a(s),N(s,e=>n(e),()=>n()),T(e,s),V()}var St=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ct(e,t){let n=h(t,St),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]];H(e,k({name:`arrow-right`},()=>n,{get iconNode(){return r}}))}var wt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`type`,`files`,`class`,`data-slot`]),Tt=w(`<input/>`);function Et(n,r){_(r,!0);let i=S(r,`ref`,15,null),a=S(r,`value`,15),o=S(r,`files`,15),s=S(r,`data-slot`,3,`input`),c=h(r,wt);var l=t(),u=e(l),d=e=>{var t=Tt();I(t,e=>({"data-slot":s(),class:e,type:`file`,...c}),[()=>q(`h-8 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,r.class)],void 0,void 0,void 0,!0),N(t,e=>i(e),()=>i()),v(t,o),D(t,a),T(e,t)},f=e=>{var t=Tt();I(t,e=>({"data-slot":s(),class:e,type:r.type,...c}),[()=>q(`h-8 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,r.class)],void 0,void 0,void 0,!0),N(t,e=>i(e),()=>i()),D(t,a),T(e,t)};z(u,e=>{r.type===`file`?e(d):e(f,-1)}),T(n,l),V()}var Dt=w(`<div><!></div>`);function Ot(e,t){_(t,!0);let r=A(!1);async function i(){C(r,!0),await new Promise(e=>setTimeout(e,500)),C(r,!1)}var o={shake:i},s=Dt(),c=d(s);return B(c,()=>t.children),a(s),M(()=>j(s,1,O([t.class,n(r)&&`shake`]),`svelte-alh7mr`)),T(e,s),V(o)}function Z(e){let t=A(te(e));return{[Ne]:!0,[$e]:!0,get current(){return n(t)},set current(e){C(t,e,!0)}}}Z.from=Ae,Z.with=W,Z.flatten=Fe,Z.readonly=ze,Z.isBox=Me,Z.isWritableBox=Ie;function kt(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var At=[Je,Be,Ye],jt=[Ue,Qe,`End`];[...At,...jt];function Mt(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?qe:We,vertical:Je}[t]}function Nt(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?We:qe,vertical:Ue}[t]}function Pt(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:Mt(e,t),prevKey:Nt(e,t)}}var Ft=class{#e;#t=Z(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=Pt(kt(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Ye]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?We:Je,t=s===`ArrowUp`?qe:Ue;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${e}`);t&&He(t)&&t.focus()}},It=18,Lt=40,Rt=`${Lt}px`,zt=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function Bt({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:i,domContext:a}){let s=A(!1),c=A(!1),l=A(!1);function u(){let e=r.current;return e!==`none`&&e===`increase-width`&&n(s)&&n(c)}function d(){let i=e.current,o=t.current;if(!i||!o||n(l)||r.current===`none`)return;let c=i,u=c.getBoundingClientRect().left+c.offsetWidth,d=c.getBoundingClientRect().top+c.offsetHeight/2,f=u-It,p=d;(a.querySelectorAll(zt).length!==0||a.getDocument().elementFromPoint(f,p)!==i)&&(C(s,!0),C(l,!0))}return o(()=>{let t=e.current;if(!t||r.current===`none`)return;function n(){let e=Oe(t).innerWidth-t.getBoundingClientRect().right;C(c,e>=Lt)}n();let i=setInterval(n,1e3);return()=>{clearInterval(i)}}),o(()=>{let e=i.current||a.getActiveElement()===t.current;if(r.current===`none`||!e)return;let n=setTimeout(d,0),o=setTimeout(d,2e3),s=setTimeout(d,5e3),c=setTimeout(()=>{C(l,!0)},6e3);return()=>{clearTimeout(n),clearTimeout(o),clearTimeout(s),clearTimeout(c)}}),{get hasPwmBadge(){return n(s)},get willPushPwmBadge(){return u()},PWM_BADGE_SPACE_WIDTH:Rt}}var Vt=`^\\d+$`,Ht=Xe({component:`pin-input`,parts:[`root`,`cell`]}),Ut=[`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`Escape`,`Enter`,`Tab`,`Shift`,`Control`,`Meta`],Wt=class e{static create(t){return new e(t)}opts;attachment;inputAttachment;#e=A(!1);#t=Ee(!1);#n=A(null);#r=A(null);#i=new Pe(()=>this.opts.value.current??``);#a=P(()=>typeof this.opts.pattern.current==`string`?new RegExp(this.opts.pattern.current):this.opts.pattern.current);#o=A(te({prev:[null,null,`none`],willSyntheticBlur:!1}));#s;#c;domContext;constructor(e){this.opts=e,this.attachment=K(this.opts.ref),this.inputAttachment=K(this.opts.inputRef),this.domContext=new ke(e.ref),this.#c={value:this.opts.value,isIOS:typeof window<`u`&&window?.CSS?.supports(`-webkit-touch-callout`,`none`)},this.#s=Bt({containerRef:this.opts.ref,inputRef:this.opts.inputRef,isFocused:this.#t,pushPasswordManagerStrategy:this.opts.pushPasswordManagerStrategy,domContext:this.domContext}),ee(()=>{let e=this.opts.inputRef.current,t=this.opts.ref.current;if(!e||!t)return;this.#c.value.current!==e.value&&(this.opts.value.current=e.value),n(this.#o).prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let r=f(this.domContext.getDocument(),`selectionchange`,this.#m,{capture:!0});this.#m(),this.domContext.getActiveElement()===e&&(this.#t.current=!0),this.domContext.getElementById(`pin-input-style`)||this.#p();let i=()=>{t&&t.style.setProperty(`--bits-pin-input-root-height`,`${e.clientHeight}px`)};i();let a=new ResizeObserver(i);return a.observe(e),()=>{r(),a.disconnect()}}),Ke([()=>this.opts.value.current,()=>this.opts.inputRef.current],()=>{Kt(()=>{let e=this.opts.inputRef.current;if(!e)return;e.dispatchEvent(new Event(`input`));let t=e.selectionStart,r=e.selectionEnd,i=e.selectionDirection??`none`;t!==null&&r!==null&&(C(this.#n,t,!0),C(this.#r,r,!0),n(this.#o).prev=[t,r,i])},this.domContext)}),o(()=>{let e=this.opts.value.current,t=this.#i.current,n=this.opts.maxLength.current,r=this.opts.onComplete.current;t!==void 0&&e!==t&&t.length<n&&e.length===n&&r(e)})}onkeydown=e=>{let t=e.key;Ut.includes(t)||e.ctrlKey||e.metaKey||t&&n(this.#a)&&!n(this.#a).test(t)&&e.preventDefault()};#l=P(()=>({position:`relative`,cursor:this.opts.disabled.current?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}));#u=P(()=>({id:this.opts.id.current,[Ht.root]:``,style:n(this.#l),...this.attachment}));get rootProps(){return n(this.#u)}set rootProps(e){C(this.#u,e)}#d=P(()=>({style:{position:`absolute`,inset:0,pointerEvents:`none`}}));get inputWrapperProps(){return n(this.#d)}set inputWrapperProps(e){C(this.#d,e)}#f=P(()=>({position:`absolute`,inset:0,width:this.#s.willPushPwmBadge?`calc(100% + ${this.#s.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:this.#s.willPushPwmBadge?`inset(0 ${this.#s.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:this.opts.textAlign.current,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--bits-pin-input-root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}));#p(){let e=this.domContext.getDocument(),t=e.createElement(`style`);if(t.id=`pin-input-style`,e.head.appendChild(t),t.sheet){let e=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;qt(t.sheet,`[data-pin-input-input]::selection { background: transparent !important; color: transparent !important; }`),qt(t.sheet,`[data-pin-input-input]:autofill { ${e} }`),qt(t.sheet,`[data-pin-input-input]:-webkit-autofill { ${e} }`),qt(t.sheet,`@supports (-webkit-touch-callout: none) { [data-pin-input-input] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),qt(t.sheet,`[data-pin-input-input] + * { pointer-events: all !important; }`)}}#m=()=>{let e=this.opts.inputRef.current,t=this.opts.ref.current;if(!e||!t)return;if(this.domContext.getActiveElement()!==e){C(this.#n,null),C(this.#r,null);return}let r=e.selectionStart,i=e.selectionEnd,a=e.selectionDirection??`none`,o=e.maxLength,s=e.value,c=n(this.#o).prev,l=-1,u=-1,d;if(s.length!==0&&r!==null&&i!==null){let e=r===i,t=r===s.length&&s.length<o;if(e&&!t){let e=r;if(e===0)l=0,u=1,d=`forward`;else if(e===o)l=e-1,u=e,d=`backward`;else if(o>1&&s.length>1){let t=0;if(c[0]!==null&&c[1]!==null){d=e<c[1]?`backward`:`forward`;let n=c[0]===c[1]&&c[0]<o;d===`backward`&&!n&&(t=-1)}l=t+e,u=t+e+1}}l!==-1&&u!==-1&&l!==u&&this.opts.inputRef.current?.setSelectionRange(l,u,d)}let f=l===-1?r:l,p=u===-1?i:u,m=d??a;C(this.#n,f,!0),C(this.#r,p,!0),n(this.#o).prev=[f,p,m]};oninput=e=>{let t=e.currentTarget.value.slice(0,this.opts.maxLength.current);if(t.length>0&&n(this.#a)&&!n(this.#a).test(t)){e.preventDefault();return}typeof this.#i.current==`string`&&t.length<this.#i.current.length&&this.domContext.getDocument().dispatchEvent(new Event(`selectionchange`)),this.opts.value.current=t};onfocus=e=>{let t=this.opts.inputRef.current;if(t){let e=Math.min(t.value.length,this.opts.maxLength.current-1),n=t.value.length;t.setSelectionRange(e,n),C(this.#n,e,!0),C(this.#r,n,!0)}this.#t.current=!0};onpaste=e=>{let t=this.opts.inputRef.current;if(!t)return;let r=e=>{let n=t.selectionStart===null?void 0:t.selectionStart,r=t.selectionEnd===null?void 0:t.selectionEnd,i=n!==r,a=this.opts.value.current;return(i?a.slice(0,n)+e+a.slice(r):a.slice(0,n)+e+a.slice(n)).slice(0,this.opts.maxLength.current)},i=e=>e.length>0&&n(this.#a)&&!n(this.#a).test(e);if(!this.opts.pasteTransformer?.current&&(!this.#c.isIOS||!e.clipboardData||!t)){i(r(e.clipboardData?.getData(`text/plain`)))&&e.preventDefault();return}let a=e.clipboardData?.getData(`text/plain`)??``,o=this.opts.pasteTransformer?.current?this.opts.pasteTransformer.current(a):a;e.preventDefault();let s=r(o);if(i(s))return;t.value=s,this.opts.value.current=s;let c=Math.min(s.length,this.opts.maxLength.current-1),l=s.length;t.setSelectionRange(c,l),C(this.#n,c,!0),C(this.#r,l,!0)};onmouseover=e=>{C(this.#e,!0)};onmouseleave=e=>{C(this.#e,!1)};onblur=e=>{if(n(this.#o).willSyntheticBlur){n(this.#o).willSyntheticBlur=!1;return}this.#t.current=!1};#h=P(()=>({id:this.opts.inputId.current,style:n(this.#f),autocomplete:this.opts.autocomplete.current||`one-time-code`,"data-pin-input-input":``,"data-pin-input-input-mss":n(this.#n),"data-pin-input-input-mse":n(this.#r),inputmode:this.opts.inputmode.current,pattern:n(this.#a)?.source,maxlength:this.opts.maxLength.current,value:this.opts.value.current,disabled:De(this.opts.disabled.current),onpaste:this.onpaste,oninput:this.oninput,onkeydown:this.onkeydown,onmouseover:this.onmouseover,onmouseleave:this.onmouseleave,onfocus:this.onfocus,onblur:this.onblur,...this.inputAttachment}));get inputProps(){return n(this.#h)}set inputProps(e){C(this.#h,e)}#g=P(()=>Array.from({length:this.opts.maxLength.current}).map((e,t)=>{let r=this.#t.current&&n(this.#n)!==null&&n(this.#r)!==null&&(n(this.#n)===n(this.#r)&&t===n(this.#n)||t>=n(this.#n)&&t<n(this.#r)),i=this.opts.value.current[t]===void 0?null:this.opts.value.current[t];return{char:i,isActive:r,hasFakeCaret:r&&i===null}}));#_=P(()=>({cells:n(this.#g),isFocused:this.#t.current,isHovering:n(this.#e)}));get snippetProps(){return n(this.#_)}set snippetProps(e){C(this.#_,e)}},Gt=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=K(this.opts.ref)}#e=P(()=>({id:this.opts.id.current,[Ht.cell]:``,"data-active":this.opts.cell.current.isActive?``:void 0,"data-inactive":this.opts.cell.current.isActive?void 0:``,...this.attachment}));get props(){return n(this.#e)}set props(e){C(this.#e,e)}};function Kt(e,t){return[t.setTimeout(e,0),t.setTimeout(e,10),t.setTimeout(e,50)]}function qt(e,t){try{e.insertRule(t)}catch{console.error(`pin input could not insert CSS rule:`,t)}}var Jt=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`inputId`,`ref`,`inputRef`,`maxlength`,`textalign`,`pattern`,`inputmode`,`onComplete`,`pushPasswordManagerStrategy`,`class`,`children`,`autocomplete`,`disabled`,`value`,`onValueChange`,`pasteTransformer`]),Yt=w(`<div><!> <div><input/></div></div>`);function Xt(e,t){let i=l();_(t,!0);let o=S(t,`id`,19,()=>J(i)),s=S(t,`inputId`,19,()=>`${J(i)}-input`),c=S(t,`ref`,15,null),u=S(t,`inputRef`,15,null),f=S(t,`maxlength`,3,6),p=S(t,`textalign`,3,`left`),m=S(t,`inputmode`,3,`numeric`),g=S(t,`onComplete`,3,Ve),v=S(t,`pushPasswordManagerStrategy`,3,`increase-width`),y=S(t,`class`,3,``),b=S(t,`autocomplete`,3,`one-time-code`),x=S(t,`disabled`,3,!1),C=S(t,`value`,15,``),w=S(t,`onValueChange`,3,Ve),E=h(t,Jt),D=Wt.create({id:W(()=>o()),ref:W(()=>c(),e=>c(e)),inputRef:W(()=>u(),e=>u(e)),inputId:W(()=>s()),autocomplete:W(()=>b()),maxLength:W(()=>f()),textAlign:W(()=>p()),disabled:W(()=>x()),inputmode:W(()=>m()),pattern:W(()=>t.pattern),onComplete:W(()=>g()),value:W(()=>C(),e=>{C(e),w()(e)}),pushPasswordManagerStrategy:W(()=>v()),pasteTransformer:W(()=>t.pasteTransformer)}),O=P(()=>G(E,D.inputProps)),ee=P(()=>G(D.rootProps,{class:y()})),te=P(()=>G(D.inputWrapperProps,{}));var k=Yt();I(k,()=>({...n(ee)}));var A=d(k);B(A,()=>t.children??r,()=>D.snippetProps);var j=F(A,2);I(j,()=>({...n(te)}));var ne=d(j);I(ne,()=>({...n(O)}),void 0,void 0,void 0,void 0,!0),a(j),a(k),T(e,k),V()}var Zt=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`cell`,`child`,`children`]),Qt=w(`<div><!></div>`);function $t(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=h(o,Zt),p=Gt.create({id:W(()=>c()),ref:W(()=>u(),e=>u(e)),cell:W(()=>o.cell)}),m=P(()=>G(f,p.props));var g=t(),v=e(g),y=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(m)})),T(r,i)},b=e=>{var t=Qt();I(t,()=>({...n(m)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(v,e=>{o.child?e(y):e(b,-1)}),T(i,g),V()}var en=Xe({component:`tabs`,parts:[`root`,`list`,`trigger`,`content`]}),tn=new Te(`Tabs.Root`),nn=class e{static create(t){return tn.set(new e(t))}opts;attachment;rovingFocusGroup;#e=A(te([]));get triggerIds(){return n(this.#e)}set triggerIds(e){C(this.#e,e,!0)}valueToTriggerId=new Ge;valueToContentId=new Ge;constructor(e){this.opts=e,this.attachment=K(e.ref),this.rovingFocusGroup=new Ft({candidateAttr:en.trigger,rootNode:this.opts.ref,loop:this.opts.loop,orientation:this.opts.orientation})}registerTrigger(e,t){return this.triggerIds.push(e),this.valueToTriggerId.set(t,e),()=>{this.triggerIds=this.triggerIds.filter(t=>t!==e),this.valueToTriggerId.delete(t)}}registerContent(e,t){return this.valueToContentId.set(t,e),()=>{this.valueToContentId.delete(t)}}setValue(e){this.opts.value.current=e}#t=P(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[en.root]:``,...this.attachment}));get props(){return n(this.#t)}set props(e){C(this.#t,e)}},rn=class e{static create(t){return new e(t,tn.get())}opts;root;attachment;#e=P(()=>this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref)}#t=P(()=>({id:this.opts.id.current,role:`tablist`,"aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[en.list]:``,"data-disabled":Ze(n(this.#e)),...this.attachment}));get props(){return n(this.#t)}set props(e){C(this.#t,e)}},an=class e{static create(t){return new e(t,tn.get())}opts;root;attachment;#e=A(0);#t=P(()=>this.root.opts.value.current===this.opts.value.current);#n=P(()=>this.opts.disabled.current||this.root.opts.disabled.current);#r=P(()=>this.root.valueToContentId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref),Ke([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerTrigger(e,t)),o(()=>{this.root.triggerIds.length,n(this.#t)||!this.root.opts.value.current?C(this.#e,0):C(this.#e,-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}#i(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)}onfocus(e){this.root.opts.activationMode.current!==`automatic`||n(this.#n)||this.#i()}onclick(e){n(this.#n)||this.#i()}onkeydown(e){if(!n(this.#n)){if(e.key===` `||e.key===`Enter`){e.preventDefault(),this.#i();return}this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e)}}#a=P(()=>({id:this.opts.id.current,role:`tab`,"data-state":sn(n(this.#t)),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Ze(n(this.#n)),"aria-selected":Le(n(this.#t)),"aria-controls":n(this.#r),[en.trigger]:``,disabled:De(n(this.#n)),tabindex:n(this.#e),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown,...this.attachment}));get props(){return n(this.#a)}set props(e){C(this.#a,e)}},on=class e{static create(t){return new e(t,tn.get())}opts;root;attachment;#e=P(()=>this.root.opts.value.current===this.opts.value.current);#t=P(()=>this.root.valueToTriggerId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref),Ke([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerContent(e,t))}#n=P(()=>({id:this.opts.id.current,role:`tabpanel`,hidden:De(!n(this.#e)),tabindex:0,"data-value":this.opts.value.current,"data-state":sn(n(this.#e)),"aria-labelledby":n(this.#t),"data-orientation":this.root.opts.orientation.current,[en.content]:``,...this.attachment}));get props(){return n(this.#n)}set props(e){C(this.#n,e)}};function sn(e){return e?`active`:`inactive`}var cn=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`onValueChange`,`orientation`,`loop`,`activationMode`,`disabled`,`children`,`child`]),ln=w(`<div><!></div>`);function un(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=S(o,`value`,15,``),p=S(o,`onValueChange`,3,Ve),m=S(o,`orientation`,3,`horizontal`),g=S(o,`loop`,3,!0),v=S(o,`activationMode`,3,`automatic`),y=S(o,`disabled`,3,!1),b=h(o,cn),x=nn.create({id:W(()=>c()),value:W(()=>f(),e=>{f(e),p()(e)}),orientation:W(()=>m()),loop:W(()=>g()),activationMode:W(()=>v()),disabled:W(()=>y()),ref:W(()=>u(),e=>u(e))}),C=P(()=>G(b,x.props));var w=t(),E=e(w),D=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(C)})),T(r,i)},O=e=>{var t=ln();I(t,()=>({...n(C)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(E,e=>{o.child?e(D):e(O,-1)}),T(i,w),V()}var dn=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`value`]),fn=w(`<div><!></div>`);function pn(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=h(o,dn),p=on.create({value:W(()=>o.value),id:W(()=>c()),ref:W(()=>u(),e=>u(e))}),m=P(()=>G(f,p.props));var g=t(),v=e(g),y=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(m)})),T(r,i)},b=e=>{var t=fn();I(t,()=>({...n(m)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(v,e=>{o.child?e(y):e(b,-1)}),T(i,g),V()}var mn=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`id`,`ref`]),hn=w(`<div><!></div>`);function gn(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=h(o,mn),p=rn.create({id:W(()=>c()),ref:W(()=>u(),e=>u(e))}),m=P(()=>G(f,p.props));var g=t(),v=e(g),y=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(m)})),T(r,i)},b=e=>{var t=hn();I(t,()=>({...n(m)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(v,e=>{o.child?e(y):e(b,-1)}),T(i,g),V()}var _n=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`disabled`,`id`,`type`,`value`,`ref`]),vn=w(`<button><!></button>`);function yn(i,o){let s=l();_(o,!0);let c=S(o,`disabled`,3,!1),u=S(o,`id`,19,()=>J(s)),f=S(o,`type`,3,`button`),p=S(o,`ref`,15,null),m=h(o,_n),g=an.create({id:W(()=>u()),disabled:W(()=>c()??!1),value:W(()=>o.value),ref:W(()=>p(),e=>p(e))}),v=P(()=>G(m,g.props,{type:f()}));var y=t(),b=e(y),x=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(v)})),T(r,i)},C=e=>{var t=vn();I(t,()=>({...n(v)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(b,e=>{o.child?e(x):e(C,-1)}),T(i,y),V()}var bn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),xn=w(`<div><!></div>`);function Sn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,bn);var o=xn();I(o,e=>({"data-slot":`input-otp-group`,class:e,...i}),[()=>q(`rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 flex items-center`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var Cn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`cell`,`class`]),wn=w(`<div class="cn-input-otp-caret pointer-events-none absolute inset-0 flex items-center justify-center"><div class="h-4 w-px animate-caret-blink bg-foreground duration-1000 h-4 w-px bg-foreground"></div></div>`),Tn=w(` <!>`,1);function En(r,a){_(a,!0);let o=S(a,`ref`,15,null),s=h(a,Cn);var c=t(),l=e(c);{let t=P(()=>q(`size-8 border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex items-center justify-center data-[active=true]:z-10`,a.class));R(l,()=>$t,(r,c)=>{c(r,k({get cell(){return a.cell},"data-slot":`input-otp-slot`,get class(){return n(t)}},()=>s,{get ref(){return o()},set ref(e){o(e)},children:(t,n)=>{m();var r=Tn(),o=e(r),s=F(o),c=e=>{var t=wn();T(e,t)};z(s,e=>{a.cell.hasFakeCaret&&e(c)}),M(()=>i(o,`${a.cell.char??``} `)),T(t,r)},$$slots:{default:!0}}))})}T(r,c),V()}var Dn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`]);function On(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=S(i,`value`,15,``),s=h(i,Dn);var c=t(),l=e(c);{let e=P(()=>q(`cn-input-otp-input gap-2 flex items-center disabled:cursor-not-allowed has-disabled:opacity-50`,i.class));R(l,()=>Xt,(t,r)=>{r(t,k({"data-slot":`input-otp`,spellcheck:!1,get class(){return n(e)}},()=>s,{get ref(){return a()},set ref(e){a(e)},get value(){return o()},set value(e){o(e)}}))})}T(r,c),V()}var kn=w(`<div class="w-full flex items-center"><!></div>`);function An(r,i){_(i,!0);let o=()=>b(X,`$dict`,s),[s,c]=L(),l=S(i,`ref`,15,null),u=S(i,`mode`,11,`password`),f=S(i,`password`,15,``),m=S(i,`otp`,15,``);var h=kn(),g=d(h),v=e=>{Et(e,{id:`iam-password-input`,name:`password`,type:`password`,minlength:6,autocomplete:`current-password`,get placeholder(){return o().auth.password},class:`placeholder:text-sm`,get value(){return f()},set value(e){f(e)}})},y=r=>{var i=t(),a=e(i);{let r=(r,i)=>{let a=()=>(i?.()).cells;var o=t(),s=e(o);R(s,()=>Sn,(r,i)=>{i(r,{children:(r,i)=>{var o=t(),s=e(o);re(s,17,()=>a().slice(0,6),p,(r,i)=>{var a=t(),o=e(a);R(o,()=>En,(e,t)=>{t(e,{get cell(){return n(i)},class:`size-[40px] bg-background`})}),T(r,a)}),T(r,o)},$$slots:{default:!0}})}),T(r,o)};R(a,()=>On,(e,t)=>{t(e,{maxlength:6,get pattern(){return Vt},required:!0,get value(){return m()},set value(e){m(e)},children:r,$$slots:{default:!0}})})}T(r,i)};z(g,e=>{u()===`password`?e(v):e(y,-1)}),a(h),N(h,e=>l(e),()=>l()),T(r,h),V(),c()}var jn=w(`<!> <span class="sr-only"> </span>`,1),Mn=w(`<form><fieldset class="space-y-2"><!> <div class="space-y-2"><div class="flex items-center gap-2"><!> <!></div> <div class="text-sm text-muted-foreground px-1"><!></div></div></fieldset></form>`);function Nn(r,o){_(o,!0);let c=()=>b(X,`$dict`,l),[l,f]=L(),p=A(!1),m=A(``),h=A(``),v=A(``),y=A(null),S=A(`password`),w=A(void 0);async function E(){n(h).length===0?n(S)===`password`?await ee():await te():await D()}async function D(){C(p,!0);let e=o.account===void 0?await O():await be(o.account.id,{username:n(m),password:n(h)});C(p,!1),e instanceof Error&&await k()}async function O(){let e=await ve(n(m),n(h));return e instanceof Error||we(e)?.status===201&&o.oncreate?.(e),e}async function ee(){C(p,!0);let e=o.account===void 0?await fe(n(m)):await Se(o.account.id,n(m));C(p,!1),!(e instanceof Error)&&(C(S,`otp`),requestAnimationFrame(()=>j()))}async function te(){if(n(m).length===0){console.error(`username is required`);return}if(n(v).length!==6){await k();return}C(p,!0);let e=await pe(n(m),n(v));if(C(p,!1),e instanceof Error){C(v,``),await k();return}return we(e)?.status===201&&o.oncreate?.(e),e}async function k(){await n(w)?.shake(),j()}function j(){ue&&n(y)?.querySelector(`input`)?.focus()}var ne=Mn(),I=P(()=>je(E)),R=d(ne),re=d(R);{let e=P(()=>n(S)===`otp`||void 0);Et(re,{id:`iam-username-input`,name:`username`,type:`email`,autocomplete:`username`,required:!0,get disabled(){return n(e)},get autofocus(){return ue},get placeholder(){return c().auth.email},get value(){return n(m)},set value(e){C(m,e,!0)}})}var B=F(re,2),ie=d(B),ae=d(ie);N(Ot(ae,{class:`w-full`,children:(e,t)=>{An(e,{get mode(){return n(S)},get ref(){return n(y)},set ref(e){C(y,e,!0)},get password(){return n(h)},set password(e){C(h,e,!0)},get otp(){return n(v)},set otp(e){C(v,e,!0)}})},$$slots:{default:!0}}),e=>C(w,e,!0),()=>n(w));var oe=F(ae,2);U(oe,{size:`icon-lg`,type:`submit`,children:(t,r)=>{var a=jn(),o=e(a),s=e=>{Y(e,{})},l=e=>{Ct(e,{})};z(o,e=>{n(p)?e(s):e(l,-1)});var u=F(o,2),d=x(u,!0);M(()=>i(d,c().auth.login)),T(t,a)},$$slots:{default:!0}}),a(ie);var se=F(ie,2),ce=d(se),le=n=>{var r=t(),i=e(r);g(i,()=>c().auth.passwordBlank),T(n,r)},de=e=>{var t=u();M(()=>i(t,c().auth.otpInstructions)),T(e,t)};z(ce,e=>{n(S)===`password`?e(le):e(de,-1)}),a(se),a(B),a(R),a(ne),s(`submit`,ne,function(...e){n(I)?.apply(this,e)}),T(r,ne),V(),f()}var Pn=w(`<h2> </h2>`),Fn=w(`<!> <!>`,1);function In(r,a){_(a,!0);let o=()=>b(X,`$dict`,s),[s,c]=L();var l=t(),d=e(l);{let t=P(()=>q(`pt-4 gap-4 bg-background/75`,a.class));R(d,()=>xt,(r,s)=>{s(r,{get class(){return n(t)},children:(t,n)=>{var r=Fn(),s=e(r);R(s,()=>ht,(t,n)=>{n(t,{class:`gap-0`,children:(t,n)=>{var r=Fn(),a=e(r);R(a,()=>vt,(e,t)=>{t(e,{children:(e,t)=>{var n=Pn(),r=x(n,!0);M(()=>i(r,o().auth.passwordTitle)),T(e,n)},$$slots:{default:!0}})});var s=F(a,2);R(s,()=>lt,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,o().auth.passwordDescription)),T(e,n)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})});var c=F(s,2);R(c,()=>ot,(e,t)=>{t(e,{children:(e,t)=>{Nn(e,{get account(){return a.account},get oncreate(){return a.oncreate}})},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})})}T(r,l),V(),c()}function Ln(e){Nn(e,{})}var Rn=new Set([`$$slots`,`$$events`,`$$legacy`]);function zn(e,t){let n=h(t,Rn),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`m9 12 2 2 4-4`}]];H(e,k({name:`shield-check`},()=>n,{get iconNode(){return r}}))}var Bn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vn(e,t){let n=h(t,Bn),r=[[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`}]];H(e,k({name:`shield-off`},()=>n,{get iconNode(){return r}}))}var Hn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Un=w(`<div><!></div>`);function Wn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,Hn);var o=Un();I(o,e=>({"data-slot":`alert-description`,class:e,...i}),[()=>q(`text-sm text-balance text-muted-foreground md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var Gn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Kn=w(`<div><!></div>`);function qn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,Gn);var o=Kn();I(o,e=>({"data-slot":`alert-title`,class:e,...i}),[()=>q(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var Jn=Re({base:`grid gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full`,variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}}),Yn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`variant`,`children`]),Xn=w(`<div><!></div>`);function Zn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=S(t,`variant`,3,`default`),o=h(t,Yn);var s=Xn();I(s,e=>({"data-slot":`alert`,role:`alert`,class:e,...o}),[()=>q(Jn({variant:i()}),t.class)]);var c=d(s);B(c,()=>t.children??r),a(s),N(s,e=>n(e),()=>n()),T(e,s),V()}var Qn=new Set([`$$slots`,`$$events`,`$$legacy`]);function $n(e,t){let n=h(t,Qn),r=[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`}],[`path`,{d:`M2 16h.01`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`}]];H(e,k({name:`fingerprint-pattern`},()=>n,{get iconNode(){return r}}))}var er=w(`<!> `,1),tr=w(`<div class="flex flex-col items-center justify-center gap-2"><p> </p> <!></div>`);function nr(t,r){_(r,!0);let o=()=>b(X,`$dict`,s),[s,c]=L(),l=A(!1);async function u(){C(l,!0),await xe(),C(l,!1)}var f=tr(),p=d(f),m=x(p,!0),h=F(p,2);U(h,{id:`iam-passkey-login-button`,variant:`secondary`,onclick:u,children:(t,r)=>{var a=er(),s=e(a),c=e=>{Y(e,{})},u=e=>{$n(e,{})};z(s,e=>{n(l)?e(c):e(u,-1)});var d=F(s);M(()=>i(d,` ${o().auth.signin??``}`)),T(t,a)},$$slots:{default:!0}}),a(f),M(()=>i(m,o().auth.alreadyHaveAccount)),T(t,f),V(),c()}var rr=w(`<form><fieldset class="space-y-1"><div class="flex items-center gap-2"><!> <!></div></fieldset></form>`);function ir(r,i){_(i,!0);let o=()=>b(X,`$dict`,c),[c,l]=L(),u=P(()=>i.account?.name??``),f=A(!1);async function p(){let e=n(u).trim();if(e.length===0)return;C(f,!0);let t=await de(e,i.account?.id);C(f,!1),!(t instanceof Error)&&i.oncreate?.(t)}var m=rr(),h=P(()=>je(p)),g=d(m),v=d(g),y=d(v);Et(y,{id:`name`,type:`text`,get placeholder(){return o().auth.yourName},autocomplete:`given-name`,required:!0,get autofocus(){return ue},get value(){return n(u)},set value(e){C(u,e)}});var x=F(y,2);U(x,{id:`iam-passkey-create-button`,size:`icon-lg`,type:`submit`,children:(r,i)=>{var a=t(),o=e(a),s=e=>{Y(e,{})},c=e=>{Ct(e,{})};z(o,e=>{n(f)?e(s):e(c,-1)}),T(r,a)},$$slots:{default:!0}}),a(v),a(g),a(m),M(()=>g.disabled=i.disabled),s(`submit`,m,function(...e){n(h)?.apply(this,e)}),T(r,m),V(),l()}var ar=w(`<p> <a target="_blank" class="text-nowrap"> </a></p>`),or=w(`<h2> </h2>`),sr=w(`<!> <!>`,1),cr=w(`<!> <!> <!>`,1),lr=w(`<p> </p> <!>`,1),ur=w(`<div class="space-y-4"><!> <!></div>`);function dr(r,o){_(o,!0);let s=()=>b(X,`$dict`,c),[c,l]=L(),f=e=>{var t=ar(),n=d(t),r=F(n),o=x(r,!0);a(t),M(()=>{i(n,`${s().auth.passkeysDescription??``} `),y(r,`href`,p),i(o,s().auth.learnMore)}),T(e,t)},p=ge?`https://support.apple.com/en-us/102195`:`https://support.google.com/accounts/answer/13548313`;var h=ur(),g=d(h);{let r=P(()=>q(`gap-4 bg-background/75`,_e&&`pt-4`,o.class));R(g,()=>xt,(a,c)=>{c(a,{get class(){return n(r)},children:(n,r)=>{var a=sr(),c=e(a),l=n=>{var r=sr(),a=e(r);R(a,()=>ht,(n,r)=>{r(n,{class:`gap-0`,children:(n,r)=>{var a=t(),o=e(a);R(o,()=>vt,(e,t)=>{t(e,{children:(e,t)=>{var n=or(),r=x(n,!0);M(()=>i(r,s().auth.signupTitle)),T(e,n)},$$slots:{default:!0}})}),T(n,a)},$$slots:{default:!0}})});var c=F(a,2);R(c,()=>ot,(e,t)=>{t(e,{children:(e,t)=>{ir(e,{get account(){return o.account},get oncreate(){return o.oncreate}})},$$slots:{default:!0}})}),T(n,r)};z(c,e=>{_e&&e(l)});var d=F(c,2);R(d,()=>ft,(n,r)=>{r(n,{children:(n,r)=>{var a=t(),o=e(a),c=n=>{var r=t(),a=e(r);R(a,()=>Zn,(t,n)=>{n(t,{children:(t,n)=>{var r=cr(),a=e(r);zn(a,{color:`green`});var o=F(a,2);R(o,()=>qn,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,s().auth.betterSecurity)),T(e,n)},$$slots:{default:!0}})});var c=F(o,2);R(c,()=>Wn,(e,t)=>{t(e,{children:(e,t)=>{f(e)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})}),T(n,r)},l=n=>{var r=t(),a=e(r);R(a,()=>Zn,(t,n)=>{n(t,{children:(t,n)=>{var r=cr(),a=e(r);Vn(a,{color:`red`,class:`animate-pulse`});var o=F(a,2);R(o,()=>qn,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,s().auth.passkeysNotSupported)),T(e,n)},$$slots:{default:!0}})});var c=F(o,2);R(c,()=>Wn,(t,n)=>{n(t,{children:(t,n)=>{var r=lr(),a=e(r),o=x(a,!0),c=F(a,2);f(c),M(()=>i(o,s().auth.passkeysWarning)),T(t,r)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})}),T(n,r)};z(o,e=>{_e?e(c):e(l,-1)}),T(n,a)},$$slots:{default:!0}})}),T(n,a)},$$slots:{default:!0}})})}var v=F(g,2),S=e=>{nr(e,{})};z(v,e=>{_e&&!o.account&&e(S)}),a(h),T(r,h),V(),l()}var fr=w(`<!> <!> `,1);function pr(t,n){_(n,!0);let r=()=>b(X,`$dict`,a),[a,o]=L();async function s(e){let t=e.currentTarget;t.disabled=!0,await xe(n.account.id),t.disabled=!1}U(t,{class:`w-full disabled:[&>.x-icon]:hidden [&>.x-spinner]:hidden disabled:[&>.x-spinner]:block`,onclick:s,children:(t,n)=>{var a=fr(),o=e(a);$n(o,{class:`size-5 x-icon`});var s=F(o,2);Y(s,{class:`x-spinner`});var c=F(s);M(()=>i(c,` ${r().auth.refresh.continue??``}`)),T(t,a)},$$slots:{default:!0}}),V(),o()}var mr=c(`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M19.84 10.2273C19.84 9.5182 19.7764 8.8364 19.6582 8.1818H10.24V12.05H15.6218C15.39 13.3 14.6855 14.3591 13.6264 15.0682V17.5773H16.8582C18.7491 15.8364 19.84 13.2727 19.84 10.2273Z" fill="#4285F4"></path><path d="M10.24 20C12.94 20 15.2036 19.1045 16.8581 17.5773L13.6263 15.0682C12.7309 15.6682 11.5854 16.0227 10.24 16.0227C7.6354 16.0227 5.4309 14.2636 4.6445 11.9H1.3036V14.4909C2.9491 17.7591 6.3309 20 10.24 20Z" fill="#34A853"></path><path d="M4.6445 11.9C4.4445 11.3 4.3309 10.6591 4.3309 10C4.3309 9.3409 4.4445 8.7 4.6445 8.1V5.5091H1.3036C0.6264 6.8591 0.24 8.3864 0.24 10C0.24 11.6136 0.6264 13.1409 1.3036 14.4909L4.6445 11.9Z" fill="#FBBC04"></path><path d="M10.24 3.9773C11.7081 3.9773 13.0263 4.4818 14.0627 5.4727L16.9309 2.6045C15.1991 0.9909 12.9354 0 10.24 0C6.3309 0 2.9491 2.2409 1.3036 5.5091L4.6445 8.1C5.4309 5.7364 7.6354 3.9773 10.24 3.9773Z" fill="#E94235"></path></svg>`);function hr(e,t){var n=mr();M(()=>j(n,0,O(t.class))),T(e,n)}var gr=c(`<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill="currentColor" viewBox="0 0 814 1000"><path d="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z"></path></svg>`);function _r(e,t){_(t,!0);var n=gr(),r=x(n);M(e=>{j(n,0,e),y(r,`fill`,t.fill)},[()=>O(q(`size-5 -mt-[3px]`,t.class))]),T(e,n),V()}var vr={google:hr,apple:_r},yr=w(`<!> <!> <!>`,1);function br(t,i){_(i,!0);let a=P(()=>vr[i.idp]);async function o(e){let t=e.currentTarget;t.disabled=!0,await me(i.idp,i.account?.id),t.disabled=!1}{let s=P(()=>i.children?`default`:`icon`),c=P(()=>q(`disabled:[&_.x-icon]:hidden [&_.x-spinner]:hidden disabled:[&_.x-spinner]:block`,i.class));U(t,{variant:`outline`,get size(){return n(s)},onclick:o,get class(){return n(c)},children:(t,o)=>{var s=yr(),c=e(s);R(c,()=>n(a),(e,t)=>{t(e,{class:`x-icon`})});var l=F(c,2);Y(l,{class:`x-spinner`});var u=F(l,2);B(u,()=>i.children??r),T(t,s)},$$slots:{default:!0}})}V()}var xr=w(`<div class="flex gap-2"><!> <!></div>`);function Sr(e,t){_(t,!0);var n=xr(),r=d(n),i=e=>{br(e,{idp:`google`,get account(){return t.account}})};z(r,e=>{le.google.client&&e(i)});var o=F(r,2),s=e=>{br(e,{idp:`apple`,get account(){return t.account}})};z(o,e=>{le.apple.client&&e(s)}),a(n),T(e,n),V()}function Cr(e,t){_(t,!0);let n=()=>b(X,`$dict`,r),[r,a]=L(),o={google:`Google`,apple:`Apple`};br(e,{get idp(){return t.idp},class:`w-full`,children:(e,r)=>{m();var a=u();M(e=>i(a,e),[()=>n().auth.continueWith(o[t.idp])]),T(e,a)},$$slots:{default:!0}}),V(),a()}var wr=w(`<!> <!>`,1);function Tr(n,r){var a=t(),o=e(a);R(o,()=>xt,(n,a)=>{a(n,{class:`w-full`,children:(n,a)=>{var o=wr(),s=e(o);R(s,()=>ht,(t,n)=>{n(t,{children:(t,n)=>{var a=wr(),o=e(a);R(o,()=>vt,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,r.title)),T(e,n)},$$slots:{default:!0}})});var s=F(o,2);R(s,()=>lt,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,r.description)),T(e,n)},$$slots:{default:!0}})}),T(t,a)},$$slots:{default:!0}})});var c=F(s,2);R(c,()=>ot,(n,i)=>{i(n,{class:`flex flex-col`,children:(n,i)=>{var a=t(),o=e(a);B(o,()=>r.action),T(n,a)},$$slots:{default:!0}})}),T(n,o)},$$slots:{default:!0}})}),T(n,a)}var Er=w(`<!> `,1),Dr=w(`<div class="flex flex-col items-center gap-4 w-full"><!> <!></div>`);function Or(r,o){_(o,!0);let s=()=>b(X,`$dict`,c),[c,l]=L();ee(()=>{o.method===null&&he()});var u=Dr(),f=d(u);{let r=n=>{var r=t(),i=e(r),a=e=>{pr(e,{get account(){return o.account}})},s=e=>{Ln(e,{})},c=e=>{Cr(e,{idp:`apple`})},l=e=>{Cr(e,{idp:`google`})};z(i,e=>{o.method===`passkey`?e(a):o.method===`password`?e(s,1):o.method===`apple`?e(c,2):o.method===`google`&&e(l,3)}),T(n,r)},i=P(()=>s().auth.refresh.description(o.account.name));Tr(f,{get title(){return s().auth.refresh.title},get description(){return n(i)},action:r,$$slots:{action:!0}})}var p=F(f,2);U(p,{variant:`outline`,get onclick(){return he},children:(t,n)=>{var r=Er(),a=e(r);tt(a,{});var o=F(a);M(()=>i(o,` ${s().auth.signout??``}`)),T(t,r)},$$slots:{default:!0}}),a(u),T(r,u),V(),l()}var kr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ar(e,t){let n=h(t,kr),r=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`}]];H(e,k({name:`at-sign`},()=>n,{get iconNode(){return r}}))}var jr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Mr(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=h(i,jr);var s=t(),c=e(s);{let e=P(()=>q(`text-sm flex-1 outline-none`,i.class));R(c,()=>pn,(t,r)=>{r(t,k({"data-slot":`tabs-content`,get class(){return n(e)}},()=>o,{get ref(){return a()},set ref(e){a(e)}}))})}T(r,s),V()}var Nr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Pr(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=h(i,Nr);var s=t(),c=e(s);{let e=P(()=>q(`gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,i.class));R(c,()=>yn,(t,r)=>{r(t,k({"data-slot":`tabs-trigger`,get class(){return n(e)}},()=>o,{get ref(){return a()},set ref(e){a(e)}}))})}T(r,s),V()}var Fr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`]);function Ir(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=S(i,`value`,15,``),s=h(i,Fr);var c=t(),l=e(c);{let e=P(()=>q(`gap-2 group/tabs flex data-[orientation=horizontal]:flex-col`,i.class));R(l,()=>un,(t,r)=>{r(t,k({"data-slot":`tabs`,get class(){return n(e)}},()=>s,{get ref(){return a()},set ref(e){a(e)},get value(){return o()},set value(e){o(e)}}))})}T(r,c),V()}var Lr=Re({base:`rounded-lg p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list inline-flex w-fit items-center justify-center text-muted-foreground group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col`,variants:{variant:{default:`cn-tabs-list-variant-default bg-muted`,line:`cn-tabs-list-variant-line gap-1 bg-transparent`}},defaultVariants:{variant:`default`}}),Rr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`variant`,`class`]);function zr(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=S(i,`variant`,3,`default`),s=h(i,Rr);var c=t(),l=e(c);{let e=P(()=>q(Lr({variant:o()}),i.class));R(l,()=>gn,(t,r)=>{r(t,k({"data-slot":`tabs-list`,get"data-variant"(){return o()},get class(){return n(e)}},()=>s,{get ref(){return a()},set ref(e){a(e)}}))})}T(r,c),V()}var Br=w(`<!> `,1),Vr=w(`<!> <!>`,1),Hr=w(`<div class="flex justify-between gap-2"><!> <!></div> <!> <!>`,1);function Ur(r,o){_(o,!0);let s=()=>b(X,`$dict`,c),[c,l]=L(),u=A(null);function f(e){requestAnimationFrame(()=>{n(u)?.querySelector(`[data-value="${e}"] input[autofocus]`)?.focus()})}let p=A(`passkey`);ee(()=>{C(p,_e?`passkey`:`password`,!0)});var m=t(),h=e(m);{let t=P(()=>q(`w-full`,o.class));R(h,()=>Ir,(r,c)=>{c(r,{get class(){return n(t)},onValueChange:f,get value(){return n(p)},set value(e){C(p,e,!0)},get ref(){return n(u)},set ref(e){C(u,e,!0)},children:(t,n)=>{var r=Hr(),c=e(r),l=d(c);R(l,()=>zr,(t,n)=>{n(t,{children:(t,n)=>{var r=Vr(),a=e(r);R(a,()=>Pr,(t,n)=>{n(t,{value:`passkey`,"data-marker":`passkey-tab`,children:(t,n)=>{var r=Br(),a=e(r);$n(a,{color:`var(--muted-foreground)`});var o=F(a);M(()=>i(o,` ${s().auth.passkey??``}`)),T(t,r)},$$slots:{default:!0}})});var o=F(a,2);R(o,()=>Pr,(t,n)=>{n(t,{value:`password`,id:`iam-email-tab`,children:(t,n)=>{var r=Br(),a=e(r);Ar(a,{color:`var(--muted-foreground)`});var o=F(a);M(()=>i(o,` ${s().auth.email??``}`)),T(t,r)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})}),Sr(F(l,2),{get account(){return o.account}}),a(c);var u=F(c,2);R(u,()=>Mr,(e,t)=>{t(e,{value:`passkey`,children:(e,t)=>{dr(e,{get account(){return o.account},oncreate:e=>o.oncreate?.(e,`passkey`)})},$$slots:{default:!0}})});var f=F(u,2);R(f,()=>Mr,(e,t)=>{t(e,{value:`password`,children:(e,t)=>{In(e,{get account(){return o.account},oncreate:e=>o.oncreate?.(e,`password`)})},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})})}T(r,m),V(),l()}var Wr=w(`<div class="flex items-center justify-center h-screen"><!></div>`),Gr=w(`<div class="flex w-full max-w-sm items-center justify-center pt-[14vh] px-4 mx-auto"><!></div>`);function Kr(r,i){_(i,!0);let o=()=>b(ae,`$iam`,f),s=()=>b(oe,`$method`,f),c=()=>b(Ce,`$authenticated`,f),l=()=>b(se,`$greeting`,f),u=()=>b(ce,`$processing`,f),[f,p]=L(),m=r=>{var a=t(),c=e(a),l=e=>{Or(e,{get account(){return o()},get method(){return s()}})},u=e=>{{let t=P(()=>q(`scale-0 transition-transform`,`scale-100`));Ur(e,{get class(){return n(t)},get account(){return i.account},get oncreate(){return i.oncreate}})}};z(c,e=>{o()?e(l):e(u,-1)}),T(r,a)};var h=t(),g=e(h),v=n=>{var r=t(),a=e(r);B(a,()=>i.children),T(n,r)},y=e=>{var t=Wr();Y(d(t),{}),a(t),T(e,t)},x=n=>{var r=t(),a=e(r);B(a,()=>i.screen,()=>({authentication:m})),T(n,r)},S=e=>{var t=Gr(),n=d(t);m(n),a(t),T(e,t)};z(g,e=>{c()?e(v):l()||u()?e(y,1):i.screen?e(x,2):e(S,-1)}),T(r,h),V(),p()}var qr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jr(e,t){let n=h(t,qr),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];H(e,k({name:`check`},()=>n,{get iconNode(){return r}}))}var Yr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xr(e,t){let n=h(t,Yr),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];H(e,k({name:`copy`},()=>n,{get iconNode(){return r}}))}var Zr=new Set([`$$slots`,`$$events`,`$$legacy`,`text`,`label`,`disabled`,`oncopy`,`icon`,`class`]),Qr=w(`<!> <!>`,1);function $r(r,a){_(a,!0);let o=h(a,Zr),s=A(!1),c=A(!1),l=!navigator.clipboard;async function d(){if(!n(s)){if(C(c,!0),typeof ClipboardItem>`u`){let e=typeof a.text==`function`?await a.text():a.text;if(e===null)return;await navigator.clipboard.writeText(e)}else{let e=f(a.text);await navigator.clipboard.write([e])}C(c,!1),C(s,!0),a.oncopy?.(),setTimeout(()=>C(s,!1),2e3)}}function f(e){return typeof e==`function`?p(e):new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`})})}function p(e){return new ClipboardItem({"text/plain":e().then(e=>new Blob([e??``],{type:`text/plain`}))})}{let f=P(()=>q(a.class)),p=P(()=>a.disabled||l||n(c));U(r,k({get class(){return n(f)},onclick:d,get disabled(){return n(p)}},()=>o,{children:(r,o)=>{var l=Qr(),d=e(l),f=e=>{Jr(e,{class:`text-constructive`,strokeWidth:3})},p=e=>{Y(e,{})},m=n=>{var r=t(),i=e(r);B(i,()=>a.icon),T(n,r)},h=e=>{Xr(e,{})};z(d,e=>{n(s)?e(f):n(c)?e(p,1):a.icon===void 0?e(h,-1):e(m,2)});var g=F(d,2),_=e=>{var t=u();M(()=>i(t,a.label)),T(e,t)};z(g,e=>{a.label!==null&&e(_)}),T(r,l)},$$slots:{default:!0}}))}V()}function ei(e,t){return!!(e.dev!==void 0&&e.dev===!1||e.beta!==void 0&&e.beta===ti()||e.debug!==void 0&&e.debug===ni()||e.role!==void 0&&t?.roles!==void 0&&ri(t.roles,e.role))}function ti(){return typeof window<`u`&&window.location.hostname.startsWith(`beta.`)}function ni(){return ti()}function ri(e,t){for(let n of e)if(n===t||t.startsWith(n+`:`))return!0;return!1}var ii=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`denied`]),ai=w(`<div class="flex justify-center pt-[14vh]"><!></div>`);function oi(r,i){_(i,!0);let o=()=>b(ae,`$account`,c),s=()=>b(X,`$dict`,c),[c,l]=L(),u=h(i,ii),f=P(()=>ei(u,o())),p=P(()=>o()?.id??``);var m=t(),g=e(m),v=n=>{var r=t(),a=e(r);B(a,()=>i.children),T(n,r)},y=n=>{var r=t(),a=e(r);B(a,()=>i.denied),T(n,r)},x=e=>{var t=ai(),r=d(t);{let e=P(()=>n(p).slice(0,8));$r(r,{get text(){return n(p)},get label(){return n(e)},get"aria-label"(){return s().auth.copyId},variant:`outline`,class:`font-mono`})}a(t),T(e,t)};z(g,e=>{n(f)?e(v):i.denied===void 0?n(p)!==``&&e(x,2):e(y,1)}),T(r,m),V(),l()}var si=E(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),Q=E((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),ci=E((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),li=E(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),ui=E(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),di=E((e=>{var t=Q().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),fi=E((e=>{var t=Q().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),pi=E((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),mi=E((e=>{var t=ci(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),hi=E((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),gi=E((e=>{var t=hi();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),_i=E(((e,t)=>{var n=gi();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),vi=E((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),yi=E((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
1
+ import{$ as e,A as t,B as n,Dt as r,E as i,Et as a,J as o,L as s,M as c,N as l,P as u,Q as d,R as f,S as p,Tt as m,a as h,b as g,bt as _,c as v,d as y,dt as b,et as x,i as S,it as C,j as w,k as T,kt as E,l as D,m as O,n as ee,nt as te,o as k,ot as A,p as j,pt as ne,q as M,s as N,st as P,tt as F,u as I,ut as L,v as R,w as z,x as re,y as B,yt as V}from"./CcD_ISxM.js";import"./C-D-YKVB.js";import"./xihTtKlq.js";import{A as ie,C as ae,D as oe,E as se,O as ce,_ as le,a as ue,c as de,d as fe,f as pe,g as me,h as he,i as ge,j as H,l as _e,m as ve,n as ye,p as be,s as xe,u as Se,w as Ce,x as we}from"./B-W3oIXL.js";import{A as Te,B as Ee,C as De,D as Oe,E as ke,F as Ae,G as je,H as U,I as W,L as Me,M as G,N as Ne,O as Pe,P as Fe,R as Ie,S as Le,T as K,U as Re,V as ze,W as q,b as Be,d as Ve,f as He,g as Ue,h as We,j as Ge,k as Ke,m as qe,p as Je,u as J,v as Ye,w as Xe,x as Ze,y as Qe,z as $e}from"./C_wOkV8g.js";var et=new Set([`$$slots`,`$$events`,`$$legacy`]);function tt(e,t){let n=h(t,et),r=[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]];H(e,k({name:`log-out`},()=>n,{get iconNode(){return r}}))}var nt=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`role`,`name`,`color`,`stroke`,`aria-label`]);function Y(e,t){_(t,!0);let r=S(t,`role`,3,`status`),i=S(t,`aria-label`,3,`Loading`),a=h(t,nt);{let o=P(()=>t.name===null?void 0:t.name),s=P(()=>t.color===null?void 0:t.color),c=P(()=>t.stroke===null?void 0:t.stroke),l=P(()=>q(`size-4 animate-spin`,t.class));ie(e,k({get role(){return r()},get name(){return n(o)},get color(){return n(s)},get stroke(){return n(c)},get"aria-label"(){return i()},get class(){return n(l)}},()=>a))}V()}var rt={"en-US":{auth:{signupTitle:`One-tap sign-up`,passwordTitle:`Hop in with password`,passwordDescription:`Create an account or sign in`,passkey:`Passkeys`,email:`Email`,alreadyHaveAccount:`Already have an account?`,betterSecurity:`Better security`,passkeysNotSupported:`Passkeys not supported`,passkeysWarning:`Your browser does not respect your privacy and security.`,learnMore:`Learn more`,passwordBlank:`Leave password blank <nobr>to receive</nobr> <nobr>a one-time</nobr> passcode.`,otpInstructions:`Enter the code sent to your email. It expires in 5 minutes.`,continueWith:e=>`Continue with ${e}`,passkeysDescription:`Passkeys are safer than passwords, easier to use, and can’t be stolen.`,yourName:`Your name`,password:`Password`,refresh:{description:e=>`${e?e+`, for`:`For`} security reasons, your credentials have expired. Please log in again to continue.`,title:`Welcome back`,continue:`Continue`},signout:`Sign out`,login:`Log In`,signin:`Sign In`,copyId:`Copy account ID`},credentials:{connect:`Connect`,email:{title:`Email`,description:`Connect your email address`},google:{title:`Google`,description:`Connect your Google account`},apple:{title:`Apple`,description:`Connect your Apple ID`},passkeys:{title:`Passkeys`,tagline:`Sign in faster with a passkey`,create:`Create`,manage:`Manage`,collapse:`Collapse`,add:`Enter passkey name`,delete:`Hold to delete`,unknown:`Unknown`,count:e=>{let t={one:`{n} passkey`,other:`{n} passkeys`},n=`en-US`,r=new Intl.PluralRules(n).select(e),i=t;return(i[r]??i.other).replace(/{n}/g,new Intl.NumberFormat(n).format(e))},meta:(e,t)=>`Added ${e} · Used ${t}`,duplicate:`This device already has a passkey for your account`,failed:`Could not create the passkey. Please try again.`},transfer:{action:`Sign in on another device`,title:`Scan to sign in`,description:`Use your other device to scan this code and sign in.`,done:`Done`}}}},X=ne(ye,e=>rt[e]),it=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),at=w(`<div><!></div>`);function ot(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,it);var o=at();I(o,e=>({"data-slot":`card-content`,class:e,...i}),[()=>q(`px-(--card-spacing)`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var st=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),ct=w(`<p><!></p>`);function lt(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,st);var o=ct();I(o,e=>({"data-slot":`card-description`,class:e,...i}),[()=>q(`text-sm text-muted-foreground`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var ut=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),dt=w(`<div><!></div>`);function ft(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,ut);var o=dt();I(o,e=>({"data-slot":`card-footer`,class:e,...i}),[()=>q(`rounded-b-xl border-t bg-muted/50 p-(--card-spacing) flex items-center`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var pt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),mt=w(`<div><!></div>`);function ht(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,pt);var o=mt();I(o,e=>({"data-slot":`card-header`,class:e,...i}),[()=>q(`gap-1 rounded-t-xl px-(--card-spacing) [.border-b]:pb-(--card-spacing) group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var gt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),_t=w(`<div><!></div>`);function vt(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,gt);var o=_t();I(o,e=>({"data-slot":`card-title`,class:e,...i}),[()=>q(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var yt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),bt=w(`<div><!></div>`);function xt(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=S(t,`size`,3,`default`),o=h(t,yt);var s=bt();I(s,e=>({"data-slot":`card`,"data-size":i(),class:e,...o}),[()=>q(`gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col`,t.class)]);var c=d(s);B(c,()=>t.children??r),a(s),N(s,e=>n(e),()=>n()),T(e,s),V()}var St=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ct(e,t){let n=h(t,St),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]];H(e,k({name:`arrow-right`},()=>n,{get iconNode(){return r}}))}var wt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`type`,`files`,`class`,`data-slot`]),Tt=w(`<input/>`);function Et(n,r){_(r,!0);let i=S(r,`ref`,15,null),a=S(r,`value`,15),o=S(r,`files`,15),s=S(r,`data-slot`,3,`input`),c=h(r,wt);var l=t(),u=e(l),d=e=>{var t=Tt();I(t,e=>({"data-slot":s(),class:e,type:`file`,...c}),[()=>q(`h-8 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,r.class)],void 0,void 0,void 0,!0),N(t,e=>i(e),()=>i()),v(t,o),D(t,a),T(e,t)},f=e=>{var t=Tt();I(t,e=>({"data-slot":s(),class:e,type:r.type,...c}),[()=>q(`h-8 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,r.class)],void 0,void 0,void 0,!0),N(t,e=>i(e),()=>i()),D(t,a),T(e,t)};z(u,e=>{r.type===`file`?e(d):e(f,-1)}),T(n,l),V()}var Dt=w(`<div><!></div>`);function Ot(e,t){_(t,!0);let r=A(!1);async function i(){C(r,!0),await new Promise(e=>setTimeout(e,500)),C(r,!1)}var o={shake:i},s=Dt(),c=d(s);return B(c,()=>t.children),a(s),M(()=>j(s,1,O([t.class,n(r)&&`shake`]),`svelte-alh7mr`)),T(e,s),V(o)}function Z(e){let t=A(te(e));return{[Ne]:!0,[$e]:!0,get current(){return n(t)},set current(e){C(t,e,!0)}}}Z.from=Ae,Z.with=W,Z.flatten=Fe,Z.readonly=ze,Z.isBox=Me,Z.isWritableBox=Ie;function kt(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var At=[Je,Be,Ye],jt=[Ue,Qe,`End`];[...At,...jt];function Mt(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?qe:We,vertical:Je}[t]}function Nt(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?We:qe,vertical:Ue}[t]}function Pt(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:Mt(e,t),prevKey:Nt(e,t)}}var Ft=class{#e;#t=Z(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=Pt(kt(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Ye]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?We:Je,t=s===`ArrowUp`?qe:Ue;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${e}`);t&&He(t)&&t.focus()}},It=18,Lt=40,Rt=`${Lt}px`,zt=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function Bt({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:i,domContext:a}){let s=A(!1),c=A(!1),l=A(!1);function u(){let e=r.current;return e!==`none`&&e===`increase-width`&&n(s)&&n(c)}function d(){let i=e.current,o=t.current;if(!i||!o||n(l)||r.current===`none`)return;let c=i,u=c.getBoundingClientRect().left+c.offsetWidth,d=c.getBoundingClientRect().top+c.offsetHeight/2,f=u-It,p=d;(a.querySelectorAll(zt).length!==0||a.getDocument().elementFromPoint(f,p)!==i)&&(C(s,!0),C(l,!0))}return o(()=>{let t=e.current;if(!t||r.current===`none`)return;function n(){let e=Oe(t).innerWidth-t.getBoundingClientRect().right;C(c,e>=Lt)}n();let i=setInterval(n,1e3);return()=>{clearInterval(i)}}),o(()=>{let e=i.current||a.getActiveElement()===t.current;if(r.current===`none`||!e)return;let n=setTimeout(d,0),o=setTimeout(d,2e3),s=setTimeout(d,5e3),c=setTimeout(()=>{C(l,!0)},6e3);return()=>{clearTimeout(n),clearTimeout(o),clearTimeout(s),clearTimeout(c)}}),{get hasPwmBadge(){return n(s)},get willPushPwmBadge(){return u()},PWM_BADGE_SPACE_WIDTH:Rt}}var Vt=`^\\d+$`,Ht=Xe({component:`pin-input`,parts:[`root`,`cell`]}),Ut=[`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`Escape`,`Enter`,`Tab`,`Shift`,`Control`,`Meta`],Wt=class e{static create(t){return new e(t)}opts;attachment;inputAttachment;#e=A(!1);#t=Ee(!1);#n=A(null);#r=A(null);#i=new Pe(()=>this.opts.value.current??``);#a=P(()=>typeof this.opts.pattern.current==`string`?new RegExp(this.opts.pattern.current):this.opts.pattern.current);#o=A(te({prev:[null,null,`none`],willSyntheticBlur:!1}));#s;#c;domContext;constructor(e){this.opts=e,this.attachment=K(this.opts.ref),this.inputAttachment=K(this.opts.inputRef),this.domContext=new ke(e.ref),this.#c={value:this.opts.value,isIOS:typeof window<`u`&&window?.CSS?.supports(`-webkit-touch-callout`,`none`)},this.#s=Bt({containerRef:this.opts.ref,inputRef:this.opts.inputRef,isFocused:this.#t,pushPasswordManagerStrategy:this.opts.pushPasswordManagerStrategy,domContext:this.domContext}),ee(()=>{let e=this.opts.inputRef.current,t=this.opts.ref.current;if(!e||!t)return;this.#c.value.current!==e.value&&(this.opts.value.current=e.value),n(this.#o).prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let r=f(this.domContext.getDocument(),`selectionchange`,this.#m,{capture:!0});this.#m(),this.domContext.getActiveElement()===e&&(this.#t.current=!0),this.domContext.getElementById(`pin-input-style`)||this.#p();let i=()=>{t&&t.style.setProperty(`--bits-pin-input-root-height`,`${e.clientHeight}px`)};i();let a=new ResizeObserver(i);return a.observe(e),()=>{r(),a.disconnect()}}),Ke([()=>this.opts.value.current,()=>this.opts.inputRef.current],()=>{Kt(()=>{let e=this.opts.inputRef.current;if(!e)return;e.dispatchEvent(new Event(`input`));let t=e.selectionStart,r=e.selectionEnd,i=e.selectionDirection??`none`;t!==null&&r!==null&&(C(this.#n,t,!0),C(this.#r,r,!0),n(this.#o).prev=[t,r,i])},this.domContext)}),o(()=>{let e=this.opts.value.current,t=this.#i.current,n=this.opts.maxLength.current,r=this.opts.onComplete.current;t!==void 0&&e!==t&&t.length<n&&e.length===n&&r(e)})}onkeydown=e=>{let t=e.key;Ut.includes(t)||e.ctrlKey||e.metaKey||t&&n(this.#a)&&!n(this.#a).test(t)&&e.preventDefault()};#l=P(()=>({position:`relative`,cursor:this.opts.disabled.current?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}));#u=P(()=>({id:this.opts.id.current,[Ht.root]:``,style:n(this.#l),...this.attachment}));get rootProps(){return n(this.#u)}set rootProps(e){C(this.#u,e)}#d=P(()=>({style:{position:`absolute`,inset:0,pointerEvents:`none`}}));get inputWrapperProps(){return n(this.#d)}set inputWrapperProps(e){C(this.#d,e)}#f=P(()=>({position:`absolute`,inset:0,width:this.#s.willPushPwmBadge?`calc(100% + ${this.#s.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:this.#s.willPushPwmBadge?`inset(0 ${this.#s.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:this.opts.textAlign.current,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--bits-pin-input-root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}));#p(){let e=this.domContext.getDocument(),t=e.createElement(`style`);if(t.id=`pin-input-style`,e.head.appendChild(t),t.sheet){let e=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;qt(t.sheet,`[data-pin-input-input]::selection { background: transparent !important; color: transparent !important; }`),qt(t.sheet,`[data-pin-input-input]:autofill { ${e} }`),qt(t.sheet,`[data-pin-input-input]:-webkit-autofill { ${e} }`),qt(t.sheet,`@supports (-webkit-touch-callout: none) { [data-pin-input-input] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),qt(t.sheet,`[data-pin-input-input] + * { pointer-events: all !important; }`)}}#m=()=>{let e=this.opts.inputRef.current,t=this.opts.ref.current;if(!e||!t)return;if(this.domContext.getActiveElement()!==e){C(this.#n,null),C(this.#r,null);return}let r=e.selectionStart,i=e.selectionEnd,a=e.selectionDirection??`none`,o=e.maxLength,s=e.value,c=n(this.#o).prev,l=-1,u=-1,d;if(s.length!==0&&r!==null&&i!==null){let e=r===i,t=r===s.length&&s.length<o;if(e&&!t){let e=r;if(e===0)l=0,u=1,d=`forward`;else if(e===o)l=e-1,u=e,d=`backward`;else if(o>1&&s.length>1){let t=0;if(c[0]!==null&&c[1]!==null){d=e<c[1]?`backward`:`forward`;let n=c[0]===c[1]&&c[0]<o;d===`backward`&&!n&&(t=-1)}l=t+e,u=t+e+1}}l!==-1&&u!==-1&&l!==u&&this.opts.inputRef.current?.setSelectionRange(l,u,d)}let f=l===-1?r:l,p=u===-1?i:u,m=d??a;C(this.#n,f,!0),C(this.#r,p,!0),n(this.#o).prev=[f,p,m]};oninput=e=>{let t=e.currentTarget.value.slice(0,this.opts.maxLength.current);if(t.length>0&&n(this.#a)&&!n(this.#a).test(t)){e.preventDefault();return}typeof this.#i.current==`string`&&t.length<this.#i.current.length&&this.domContext.getDocument().dispatchEvent(new Event(`selectionchange`)),this.opts.value.current=t};onfocus=e=>{let t=this.opts.inputRef.current;if(t){let e=Math.min(t.value.length,this.opts.maxLength.current-1),n=t.value.length;t.setSelectionRange(e,n),C(this.#n,e,!0),C(this.#r,n,!0)}this.#t.current=!0};onpaste=e=>{let t=this.opts.inputRef.current;if(!t)return;let r=e=>{let n=t.selectionStart===null?void 0:t.selectionStart,r=t.selectionEnd===null?void 0:t.selectionEnd,i=n!==r,a=this.opts.value.current;return(i?a.slice(0,n)+e+a.slice(r):a.slice(0,n)+e+a.slice(n)).slice(0,this.opts.maxLength.current)},i=e=>e.length>0&&n(this.#a)&&!n(this.#a).test(e);if(!this.opts.pasteTransformer?.current&&(!this.#c.isIOS||!e.clipboardData||!t)){i(r(e.clipboardData?.getData(`text/plain`)))&&e.preventDefault();return}let a=e.clipboardData?.getData(`text/plain`)??``,o=this.opts.pasteTransformer?.current?this.opts.pasteTransformer.current(a):a;e.preventDefault();let s=r(o);if(i(s))return;t.value=s,this.opts.value.current=s;let c=Math.min(s.length,this.opts.maxLength.current-1),l=s.length;t.setSelectionRange(c,l),C(this.#n,c,!0),C(this.#r,l,!0)};onmouseover=e=>{C(this.#e,!0)};onmouseleave=e=>{C(this.#e,!1)};onblur=e=>{if(n(this.#o).willSyntheticBlur){n(this.#o).willSyntheticBlur=!1;return}this.#t.current=!1};#h=P(()=>({id:this.opts.inputId.current,style:n(this.#f),autocomplete:this.opts.autocomplete.current||`one-time-code`,"data-pin-input-input":``,"data-pin-input-input-mss":n(this.#n),"data-pin-input-input-mse":n(this.#r),inputmode:this.opts.inputmode.current,pattern:n(this.#a)?.source,maxlength:this.opts.maxLength.current,value:this.opts.value.current,disabled:De(this.opts.disabled.current),onpaste:this.onpaste,oninput:this.oninput,onkeydown:this.onkeydown,onmouseover:this.onmouseover,onmouseleave:this.onmouseleave,onfocus:this.onfocus,onblur:this.onblur,...this.inputAttachment}));get inputProps(){return n(this.#h)}set inputProps(e){C(this.#h,e)}#g=P(()=>Array.from({length:this.opts.maxLength.current}).map((e,t)=>{let r=this.#t.current&&n(this.#n)!==null&&n(this.#r)!==null&&(n(this.#n)===n(this.#r)&&t===n(this.#n)||t>=n(this.#n)&&t<n(this.#r)),i=this.opts.value.current[t]===void 0?null:this.opts.value.current[t];return{char:i,isActive:r,hasFakeCaret:r&&i===null}}));#_=P(()=>({cells:n(this.#g),isFocused:this.#t.current,isHovering:n(this.#e)}));get snippetProps(){return n(this.#_)}set snippetProps(e){C(this.#_,e)}},Gt=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=K(this.opts.ref)}#e=P(()=>({id:this.opts.id.current,[Ht.cell]:``,"data-active":this.opts.cell.current.isActive?``:void 0,"data-inactive":this.opts.cell.current.isActive?void 0:``,...this.attachment}));get props(){return n(this.#e)}set props(e){C(this.#e,e)}};function Kt(e,t){return[t.setTimeout(e,0),t.setTimeout(e,10),t.setTimeout(e,50)]}function qt(e,t){try{e.insertRule(t)}catch{console.error(`pin input could not insert CSS rule:`,t)}}var Jt=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`inputId`,`ref`,`inputRef`,`maxlength`,`textalign`,`pattern`,`inputmode`,`onComplete`,`pushPasswordManagerStrategy`,`class`,`children`,`autocomplete`,`disabled`,`value`,`onValueChange`,`pasteTransformer`]),Yt=w(`<div><!> <div><input/></div></div>`);function Xt(e,t){let i=l();_(t,!0);let o=S(t,`id`,19,()=>J(i)),s=S(t,`inputId`,19,()=>`${J(i)}-input`),c=S(t,`ref`,15,null),u=S(t,`inputRef`,15,null),f=S(t,`maxlength`,3,6),p=S(t,`textalign`,3,`left`),m=S(t,`inputmode`,3,`numeric`),g=S(t,`onComplete`,3,Ve),v=S(t,`pushPasswordManagerStrategy`,3,`increase-width`),y=S(t,`class`,3,``),b=S(t,`autocomplete`,3,`one-time-code`),x=S(t,`disabled`,3,!1),C=S(t,`value`,15,``),w=S(t,`onValueChange`,3,Ve),E=h(t,Jt),D=Wt.create({id:W(()=>o()),ref:W(()=>c(),e=>c(e)),inputRef:W(()=>u(),e=>u(e)),inputId:W(()=>s()),autocomplete:W(()=>b()),maxLength:W(()=>f()),textAlign:W(()=>p()),disabled:W(()=>x()),inputmode:W(()=>m()),pattern:W(()=>t.pattern),onComplete:W(()=>g()),value:W(()=>C(),e=>{C(e),w()(e)}),pushPasswordManagerStrategy:W(()=>v()),pasteTransformer:W(()=>t.pasteTransformer)}),O=P(()=>G(E,D.inputProps)),ee=P(()=>G(D.rootProps,{class:y()})),te=P(()=>G(D.inputWrapperProps,{}));var k=Yt();I(k,()=>({...n(ee)}));var A=d(k);B(A,()=>t.children??r,()=>D.snippetProps);var j=F(A,2);I(j,()=>({...n(te)}));var ne=d(j);I(ne,()=>({...n(O)}),void 0,void 0,void 0,void 0,!0),a(j),a(k),T(e,k),V()}var Zt=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`cell`,`child`,`children`]),Qt=w(`<div><!></div>`);function $t(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=h(o,Zt),p=Gt.create({id:W(()=>c()),ref:W(()=>u(),e=>u(e)),cell:W(()=>o.cell)}),m=P(()=>G(f,p.props));var g=t(),v=e(g),y=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(m)})),T(r,i)},b=e=>{var t=Qt();I(t,()=>({...n(m)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(v,e=>{o.child?e(y):e(b,-1)}),T(i,g),V()}var en=Xe({component:`tabs`,parts:[`root`,`list`,`trigger`,`content`]}),tn=new Te(`Tabs.Root`),nn=class e{static create(t){return tn.set(new e(t))}opts;attachment;rovingFocusGroup;#e=A(te([]));get triggerIds(){return n(this.#e)}set triggerIds(e){C(this.#e,e,!0)}valueToTriggerId=new Ge;valueToContentId=new Ge;constructor(e){this.opts=e,this.attachment=K(e.ref),this.rovingFocusGroup=new Ft({candidateAttr:en.trigger,rootNode:this.opts.ref,loop:this.opts.loop,orientation:this.opts.orientation})}registerTrigger(e,t){return this.triggerIds.push(e),this.valueToTriggerId.set(t,e),()=>{this.triggerIds=this.triggerIds.filter(t=>t!==e),this.valueToTriggerId.delete(t)}}registerContent(e,t){return this.valueToContentId.set(t,e),()=>{this.valueToContentId.delete(t)}}setValue(e){this.opts.value.current=e}#t=P(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[en.root]:``,...this.attachment}));get props(){return n(this.#t)}set props(e){C(this.#t,e)}},rn=class e{static create(t){return new e(t,tn.get())}opts;root;attachment;#e=P(()=>this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref)}#t=P(()=>({id:this.opts.id.current,role:`tablist`,"aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[en.list]:``,"data-disabled":Ze(n(this.#e)),...this.attachment}));get props(){return n(this.#t)}set props(e){C(this.#t,e)}},an=class e{static create(t){return new e(t,tn.get())}opts;root;attachment;#e=A(0);#t=P(()=>this.root.opts.value.current===this.opts.value.current);#n=P(()=>this.opts.disabled.current||this.root.opts.disabled.current);#r=P(()=>this.root.valueToContentId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref),Ke([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerTrigger(e,t)),o(()=>{this.root.triggerIds.length,n(this.#t)||!this.root.opts.value.current?C(this.#e,0):C(this.#e,-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}#i(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)}onfocus(e){this.root.opts.activationMode.current!==`automatic`||n(this.#n)||this.#i()}onclick(e){n(this.#n)||this.#i()}onkeydown(e){if(!n(this.#n)){if(e.key===` `||e.key===`Enter`){e.preventDefault(),this.#i();return}this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e)}}#a=P(()=>({id:this.opts.id.current,role:`tab`,"data-state":sn(n(this.#t)),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Ze(n(this.#n)),"aria-selected":Le(n(this.#t)),"aria-controls":n(this.#r),[en.trigger]:``,disabled:De(n(this.#n)),tabindex:n(this.#e),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown,...this.attachment}));get props(){return n(this.#a)}set props(e){C(this.#a,e)}},on=class e{static create(t){return new e(t,tn.get())}opts;root;attachment;#e=P(()=>this.root.opts.value.current===this.opts.value.current);#t=P(()=>this.root.valueToTriggerId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref),Ke([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerContent(e,t))}#n=P(()=>({id:this.opts.id.current,role:`tabpanel`,hidden:De(!n(this.#e)),tabindex:0,"data-value":this.opts.value.current,"data-state":sn(n(this.#e)),"aria-labelledby":n(this.#t),"data-orientation":this.root.opts.orientation.current,[en.content]:``,...this.attachment}));get props(){return n(this.#n)}set props(e){C(this.#n,e)}};function sn(e){return e?`active`:`inactive`}var cn=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`onValueChange`,`orientation`,`loop`,`activationMode`,`disabled`,`children`,`child`]),ln=w(`<div><!></div>`);function un(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=S(o,`value`,15,``),p=S(o,`onValueChange`,3,Ve),m=S(o,`orientation`,3,`horizontal`),g=S(o,`loop`,3,!0),v=S(o,`activationMode`,3,`automatic`),y=S(o,`disabled`,3,!1),b=h(o,cn),x=nn.create({id:W(()=>c()),value:W(()=>f(),e=>{f(e),p()(e)}),orientation:W(()=>m()),loop:W(()=>g()),activationMode:W(()=>v()),disabled:W(()=>y()),ref:W(()=>u(),e=>u(e))}),C=P(()=>G(b,x.props));var w=t(),E=e(w),D=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(C)})),T(r,i)},O=e=>{var t=ln();I(t,()=>({...n(C)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(E,e=>{o.child?e(D):e(O,-1)}),T(i,w),V()}var dn=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`value`]),fn=w(`<div><!></div>`);function pn(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=h(o,dn),p=on.create({value:W(()=>o.value),id:W(()=>c()),ref:W(()=>u(),e=>u(e))}),m=P(()=>G(f,p.props));var g=t(),v=e(g),y=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(m)})),T(r,i)},b=e=>{var t=fn();I(t,()=>({...n(m)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(v,e=>{o.child?e(y):e(b,-1)}),T(i,g),V()}var mn=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`id`,`ref`]),hn=w(`<div><!></div>`);function gn(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=h(o,mn),p=rn.create({id:W(()=>c()),ref:W(()=>u(),e=>u(e))}),m=P(()=>G(f,p.props));var g=t(),v=e(g),y=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(m)})),T(r,i)},b=e=>{var t=hn();I(t,()=>({...n(m)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(v,e=>{o.child?e(y):e(b,-1)}),T(i,g),V()}var _n=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`disabled`,`id`,`type`,`value`,`ref`]),vn=w(`<button><!></button>`);function yn(i,o){let s=l();_(o,!0);let c=S(o,`disabled`,3,!1),u=S(o,`id`,19,()=>J(s)),f=S(o,`type`,3,`button`),p=S(o,`ref`,15,null),m=h(o,_n),g=an.create({id:W(()=>u()),disabled:W(()=>c()??!1),value:W(()=>o.value),ref:W(()=>p(),e=>p(e))}),v=P(()=>G(m,g.props,{type:f()}));var y=t(),b=e(y),x=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(v)})),T(r,i)},C=e=>{var t=vn();I(t,()=>({...n(v)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(b,e=>{o.child?e(x):e(C,-1)}),T(i,y),V()}var bn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),xn=w(`<div><!></div>`);function Sn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,bn);var o=xn();I(o,e=>({"data-slot":`input-otp-group`,class:e,...i}),[()=>q(`rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 flex items-center`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var Cn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`cell`,`class`]),wn=w(`<div class="cn-input-otp-caret pointer-events-none absolute inset-0 flex items-center justify-center"><div class="h-4 w-px animate-caret-blink bg-foreground duration-1000 h-4 w-px bg-foreground"></div></div>`),Tn=w(` <!>`,1);function En(r,a){_(a,!0);let o=S(a,`ref`,15,null),s=h(a,Cn);var c=t(),l=e(c);{let t=P(()=>q(`size-8 border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex items-center justify-center data-[active=true]:z-10`,a.class));R(l,()=>$t,(r,c)=>{c(r,k({get cell(){return a.cell},"data-slot":`input-otp-slot`,get class(){return n(t)}},()=>s,{get ref(){return o()},set ref(e){o(e)},children:(t,n)=>{m();var r=Tn(),o=e(r),s=F(o),c=e=>{var t=wn();T(e,t)};z(s,e=>{a.cell.hasFakeCaret&&e(c)}),M(()=>i(o,`${a.cell.char??``} `)),T(t,r)},$$slots:{default:!0}}))})}T(r,c),V()}var Dn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`]);function On(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=S(i,`value`,15,``),s=h(i,Dn);var c=t(),l=e(c);{let e=P(()=>q(`cn-input-otp-input gap-2 flex items-center disabled:cursor-not-allowed has-disabled:opacity-50`,i.class));R(l,()=>Xt,(t,r)=>{r(t,k({"data-slot":`input-otp`,spellcheck:!1,get class(){return n(e)}},()=>s,{get ref(){return a()},set ref(e){a(e)},get value(){return o()},set value(e){o(e)}}))})}T(r,c),V()}var kn=w(`<div class="w-full flex items-center"><!></div>`);function An(r,i){_(i,!0);let o=()=>b(X,`$dict`,s),[s,c]=L(),l=S(i,`ref`,15,null),u=S(i,`mode`,11,`password`),f=S(i,`password`,15,``),m=S(i,`otp`,15,``);var h=kn(),g=d(h),v=e=>{Et(e,{id:`iam-password-input`,name:`password`,type:`password`,minlength:6,autocomplete:`current-password`,get placeholder(){return o().auth.password},class:`placeholder:text-sm`,get value(){return f()},set value(e){f(e)}})},y=r=>{var i=t(),a=e(i);{let r=(r,i)=>{let a=()=>(i?.()).cells;var o=t(),s=e(o);R(s,()=>Sn,(r,i)=>{i(r,{children:(r,i)=>{var o=t(),s=e(o);re(s,17,()=>a().slice(0,6),p,(r,i)=>{var a=t(),o=e(a);R(o,()=>En,(e,t)=>{t(e,{get cell(){return n(i)},class:`size-[40px] bg-background`})}),T(r,a)}),T(r,o)},$$slots:{default:!0}})}),T(r,o)};R(a,()=>On,(e,t)=>{t(e,{maxlength:6,get pattern(){return Vt},required:!0,get value(){return m()},set value(e){m(e)},children:r,$$slots:{default:!0}})})}T(r,i)};z(g,e=>{u()===`password`?e(v):e(y,-1)}),a(h),N(h,e=>l(e),()=>l()),T(r,h),V(),c()}var jn=w(`<!> <span class="sr-only"> </span>`,1),Mn=w(`<form><fieldset class="space-y-2"><!> <div class="space-y-2"><div class="flex items-center gap-2"><!> <!></div> <div class="text-sm text-muted-foreground px-1"><!></div></div></fieldset></form>`);function Nn(r,o){_(o,!0);let c=()=>b(X,`$dict`,l),[l,f]=L(),p=A(!1),m=A(``),h=A(``),v=A(``),y=A(null),S=A(`password`),w=A(void 0);async function E(){n(h).length===0?n(S)===`password`?await ee():await te():await D()}async function D(){C(p,!0);let e=o.account===void 0?await O():await be(o.account.id,{username:n(m),password:n(h)});C(p,!1),e instanceof Error&&await k()}async function O(){let e=await ve(n(m),n(h));return e instanceof Error||we(e)?.status===201&&o.oncreate?.(e),e}async function ee(){C(p,!0);let e=o.account===void 0?await fe(n(m)):await Se(o.account.id,n(m));C(p,!1),!(e instanceof Error)&&(C(S,`otp`),requestAnimationFrame(()=>j()))}async function te(){if(n(m).length===0){console.error(`username is required`);return}if(n(v).length!==6){await k();return}C(p,!0);let e=await pe(n(m),n(v));if(C(p,!1),e instanceof Error){C(v,``),await k();return}return we(e)?.status===201&&o.oncreate?.(e),e}async function k(){await n(w)?.shake(),j()}function j(){ue&&n(y)?.querySelector(`input`)?.focus()}var ne=Mn(),I=P(()=>je(E)),R=d(ne),re=d(R);{let e=P(()=>n(S)===`otp`||void 0);Et(re,{id:`iam-username-input`,name:`username`,type:`email`,autocomplete:`username`,required:!0,get disabled(){return n(e)},get autofocus(){return ue},get placeholder(){return c().auth.email},get value(){return n(m)},set value(e){C(m,e,!0)}})}var B=F(re,2),ie=d(B),ae=d(ie);N(Ot(ae,{class:`w-full`,children:(e,t)=>{An(e,{get mode(){return n(S)},get ref(){return n(y)},set ref(e){C(y,e,!0)},get password(){return n(h)},set password(e){C(h,e,!0)},get otp(){return n(v)},set otp(e){C(v,e,!0)}})},$$slots:{default:!0}}),e=>C(w,e,!0),()=>n(w));var oe=F(ae,2);U(oe,{size:`icon-lg`,type:`submit`,children:(t,r)=>{var a=jn(),o=e(a),s=e=>{Y(e,{})},l=e=>{Ct(e,{})};z(o,e=>{n(p)?e(s):e(l,-1)});var u=F(o,2),d=x(u,!0);M(()=>i(d,c().auth.login)),T(t,a)},$$slots:{default:!0}}),a(ie);var se=F(ie,2),ce=d(se),le=n=>{var r=t(),i=e(r);g(i,()=>c().auth.passwordBlank),T(n,r)},de=e=>{var t=u();M(()=>i(t,c().auth.otpInstructions)),T(e,t)};z(ce,e=>{n(S)===`password`?e(le):e(de,-1)}),a(se),a(B),a(R),a(ne),s(`submit`,ne,function(...e){n(I)?.apply(this,e)}),T(r,ne),V(),f()}var Pn=w(`<h2> </h2>`),Fn=w(`<!> <!>`,1);function In(r,a){_(a,!0);let o=()=>b(X,`$dict`,s),[s,c]=L();var l=t(),d=e(l);{let t=P(()=>q(`pt-4 gap-4 bg-background/75`,a.class));R(d,()=>xt,(r,s)=>{s(r,{get class(){return n(t)},children:(t,n)=>{var r=Fn(),s=e(r);R(s,()=>ht,(t,n)=>{n(t,{class:`gap-0`,children:(t,n)=>{var r=Fn(),a=e(r);R(a,()=>vt,(e,t)=>{t(e,{children:(e,t)=>{var n=Pn(),r=x(n,!0);M(()=>i(r,o().auth.passwordTitle)),T(e,n)},$$slots:{default:!0}})});var s=F(a,2);R(s,()=>lt,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,o().auth.passwordDescription)),T(e,n)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})});var c=F(s,2);R(c,()=>ot,(e,t)=>{t(e,{children:(e,t)=>{Nn(e,{get account(){return a.account},get oncreate(){return a.oncreate}})},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})})}T(r,l),V(),c()}function Ln(e){Nn(e,{})}var Rn=new Set([`$$slots`,`$$events`,`$$legacy`]);function zn(e,t){let n=h(t,Rn),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`m9 12 2 2 4-4`}]];H(e,k({name:`shield-check`},()=>n,{get iconNode(){return r}}))}var Bn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vn(e,t){let n=h(t,Bn),r=[[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`}]];H(e,k({name:`shield-off`},()=>n,{get iconNode(){return r}}))}var Hn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Un=w(`<div><!></div>`);function Wn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,Hn);var o=Un();I(o,e=>({"data-slot":`alert-description`,class:e,...i}),[()=>q(`text-sm text-balance text-muted-foreground md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var Gn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Kn=w(`<div><!></div>`);function qn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,Gn);var o=Kn();I(o,e=>({"data-slot":`alert-title`,class:e,...i}),[()=>q(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var Jn=Re({base:`grid gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full`,variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}}),Yn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`variant`,`children`]),Xn=w(`<div><!></div>`);function Zn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=S(t,`variant`,3,`default`),o=h(t,Yn);var s=Xn();I(s,e=>({"data-slot":`alert`,role:`alert`,class:e,...o}),[()=>q(Jn({variant:i()}),t.class)]);var c=d(s);B(c,()=>t.children??r),a(s),N(s,e=>n(e),()=>n()),T(e,s),V()}var Qn=new Set([`$$slots`,`$$events`,`$$legacy`]);function $n(e,t){let n=h(t,Qn),r=[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`}],[`path`,{d:`M2 16h.01`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`}]];H(e,k({name:`fingerprint-pattern`},()=>n,{get iconNode(){return r}}))}var er=w(`<!> `,1),tr=w(`<div class="flex flex-col items-center justify-center gap-2"><p> </p> <!></div>`);function nr(t,r){_(r,!0);let o=()=>b(X,`$dict`,s),[s,c]=L(),l=A(!1);async function u(){C(l,!0),await xe(),C(l,!1)}var f=tr(),p=d(f),m=x(p,!0),h=F(p,2);U(h,{id:`iam-passkey-login-button`,variant:`secondary`,onclick:u,children:(t,r)=>{var a=er(),s=e(a),c=e=>{Y(e,{})},u=e=>{$n(e,{})};z(s,e=>{n(l)?e(c):e(u,-1)});var d=F(s);M(()=>i(d,` ${o().auth.signin??``}`)),T(t,a)},$$slots:{default:!0}}),a(f),M(()=>i(m,o().auth.alreadyHaveAccount)),T(t,f),V(),c()}var rr=w(`<form><fieldset class="space-y-1"><div class="flex items-center gap-2"><!> <!></div></fieldset></form>`);function ir(r,i){_(i,!0);let o=()=>b(X,`$dict`,c),[c,l]=L(),u=P(()=>i.account?.name??``),f=A(!1);async function p(){let e=n(u).trim();if(e.length===0)return;C(f,!0);let t=await de(e,i.account?.id);C(f,!1),!(t instanceof Error)&&i.oncreate?.(t)}var m=rr(),h=P(()=>je(p)),g=d(m),v=d(g),y=d(v);Et(y,{id:`name`,type:`text`,get placeholder(){return o().auth.yourName},autocomplete:`given-name`,required:!0,get autofocus(){return ue},get value(){return n(u)},set value(e){C(u,e)}});var x=F(y,2);U(x,{id:`iam-passkey-create-button`,size:`icon-lg`,type:`submit`,children:(r,i)=>{var a=t(),o=e(a),s=e=>{Y(e,{})},c=e=>{Ct(e,{})};z(o,e=>{n(f)?e(s):e(c,-1)}),T(r,a)},$$slots:{default:!0}}),a(v),a(g),a(m),M(()=>g.disabled=i.disabled),s(`submit`,m,function(...e){n(h)?.apply(this,e)}),T(r,m),V(),l()}var ar=w(`<p> <a target="_blank" class="text-nowrap"> </a></p>`),or=w(`<h2> </h2>`),sr=w(`<!> <!>`,1),cr=w(`<!> <!> <!>`,1),lr=w(`<p> </p> <!>`,1),ur=w(`<div class="space-y-4"><!> <!></div>`);function dr(r,o){_(o,!0);let s=()=>b(X,`$dict`,c),[c,l]=L(),f=e=>{var t=ar(),n=d(t),r=F(n),o=x(r,!0);a(t),M(()=>{i(n,`${s().auth.passkeysDescription??``} `),y(r,`href`,p),i(o,s().auth.learnMore)}),T(e,t)},p=ge?`https://support.apple.com/en-us/102195`:`https://support.google.com/accounts/answer/13548313`;var h=ur(),g=d(h);{let r=P(()=>q(`gap-4 bg-background/75`,_e&&`pt-4`,o.class));R(g,()=>xt,(a,c)=>{c(a,{get class(){return n(r)},children:(n,r)=>{var a=sr(),c=e(a),l=n=>{var r=sr(),a=e(r);R(a,()=>ht,(n,r)=>{r(n,{class:`gap-0`,children:(n,r)=>{var a=t(),o=e(a);R(o,()=>vt,(e,t)=>{t(e,{children:(e,t)=>{var n=or(),r=x(n,!0);M(()=>i(r,s().auth.signupTitle)),T(e,n)},$$slots:{default:!0}})}),T(n,a)},$$slots:{default:!0}})});var c=F(a,2);R(c,()=>ot,(e,t)=>{t(e,{children:(e,t)=>{ir(e,{get account(){return o.account},get oncreate(){return o.oncreate}})},$$slots:{default:!0}})}),T(n,r)};z(c,e=>{_e&&e(l)});var d=F(c,2);R(d,()=>ft,(n,r)=>{r(n,{children:(n,r)=>{var a=t(),o=e(a),c=n=>{var r=t(),a=e(r);R(a,()=>Zn,(t,n)=>{n(t,{children:(t,n)=>{var r=cr(),a=e(r);zn(a,{color:`green`});var o=F(a,2);R(o,()=>qn,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,s().auth.betterSecurity)),T(e,n)},$$slots:{default:!0}})});var c=F(o,2);R(c,()=>Wn,(e,t)=>{t(e,{children:(e,t)=>{f(e)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})}),T(n,r)},l=n=>{var r=t(),a=e(r);R(a,()=>Zn,(t,n)=>{n(t,{children:(t,n)=>{var r=cr(),a=e(r);Vn(a,{color:`red`,class:`animate-pulse`});var o=F(a,2);R(o,()=>qn,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,s().auth.passkeysNotSupported)),T(e,n)},$$slots:{default:!0}})});var c=F(o,2);R(c,()=>Wn,(t,n)=>{n(t,{children:(t,n)=>{var r=lr(),a=e(r),o=x(a,!0),c=F(a,2);f(c),M(()=>i(o,s().auth.passkeysWarning)),T(t,r)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})}),T(n,r)};z(o,e=>{_e?e(c):e(l,-1)}),T(n,a)},$$slots:{default:!0}})}),T(n,a)},$$slots:{default:!0}})})}var v=F(g,2),S=e=>{nr(e,{})};z(v,e=>{_e&&!o.account&&e(S)}),a(h),T(r,h),V(),l()}var fr=w(`<!> <!> `,1);function pr(t,n){_(n,!0);let r=()=>b(X,`$dict`,a),[a,o]=L();async function s(e){let t=e.currentTarget;t.disabled=!0,await xe(n.account.id),t.disabled=!1}U(t,{class:`w-full disabled:[&>.x-icon]:hidden [&>.x-spinner]:hidden disabled:[&>.x-spinner]:block`,onclick:s,children:(t,n)=>{var a=fr(),o=e(a);$n(o,{class:`size-5 x-icon`});var s=F(o,2);Y(s,{class:`x-spinner`});var c=F(s);M(()=>i(c,` ${r().auth.refresh.continue??``}`)),T(t,a)},$$slots:{default:!0}}),V(),o()}var mr=c(`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M19.84 10.2273C19.84 9.5182 19.7764 8.8364 19.6582 8.1818H10.24V12.05H15.6218C15.39 13.3 14.6855 14.3591 13.6264 15.0682V17.5773H16.8582C18.7491 15.8364 19.84 13.2727 19.84 10.2273Z" fill="#4285F4"></path><path d="M10.24 20C12.94 20 15.2036 19.1045 16.8581 17.5773L13.6263 15.0682C12.7309 15.6682 11.5854 16.0227 10.24 16.0227C7.6354 16.0227 5.4309 14.2636 4.6445 11.9H1.3036V14.4909C2.9491 17.7591 6.3309 20 10.24 20Z" fill="#34A853"></path><path d="M4.6445 11.9C4.4445 11.3 4.3309 10.6591 4.3309 10C4.3309 9.3409 4.4445 8.7 4.6445 8.1V5.5091H1.3036C0.6264 6.8591 0.24 8.3864 0.24 10C0.24 11.6136 0.6264 13.1409 1.3036 14.4909L4.6445 11.9Z" fill="#FBBC04"></path><path d="M10.24 3.9773C11.7081 3.9773 13.0263 4.4818 14.0627 5.4727L16.9309 2.6045C15.1991 0.9909 12.9354 0 10.24 0C6.3309 0 2.9491 2.2409 1.3036 5.5091L4.6445 8.1C5.4309 5.7364 7.6354 3.9773 10.24 3.9773Z" fill="#E94235"></path></svg>`);function hr(e,t){var n=mr();M(()=>j(n,0,O(t.class))),T(e,n)}var gr=c(`<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill="currentColor" viewBox="0 0 814 1000"><path d="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z"></path></svg>`);function _r(e,t){_(t,!0);var n=gr(),r=x(n);M(e=>{j(n,0,e),y(r,`fill`,t.fill)},[()=>O(q(`size-5 -mt-[3px]`,t.class))]),T(e,n),V()}var vr={google:hr,apple:_r},yr=w(`<!> <!> <!>`,1);function br(t,i){_(i,!0);let a=P(()=>vr[i.idp]);async function o(e){let t=e.currentTarget;t.disabled=!0,await me(i.idp,i.account?.id),t.disabled=!1}{let s=P(()=>i.children?`default`:`icon`),c=P(()=>q(`disabled:[&_.x-icon]:hidden [&_.x-spinner]:hidden disabled:[&_.x-spinner]:block`,i.class));U(t,{variant:`outline`,get size(){return n(s)},onclick:o,get class(){return n(c)},children:(t,o)=>{var s=yr(),c=e(s);R(c,()=>n(a),(e,t)=>{t(e,{class:`x-icon`})});var l=F(c,2);Y(l,{class:`x-spinner`});var u=F(l,2);B(u,()=>i.children??r),T(t,s)},$$slots:{default:!0}})}V()}var xr=w(`<div class="flex gap-2"><!> <!></div>`);function Sr(e,t){_(t,!0);var n=xr(),r=d(n),i=e=>{br(e,{idp:`google`,get account(){return t.account}})};z(r,e=>{le.google.client&&e(i)});var o=F(r,2),s=e=>{br(e,{idp:`apple`,get account(){return t.account}})};z(o,e=>{le.apple.client&&e(s)}),a(n),T(e,n),V()}function Cr(e,t){_(t,!0);let n=()=>b(X,`$dict`,r),[r,a]=L(),o={google:`Google`,apple:`Apple`};br(e,{get idp(){return t.idp},class:`w-full`,children:(e,r)=>{m();var a=u();M(e=>i(a,e),[()=>n().auth.continueWith(o[t.idp])]),T(e,a)},$$slots:{default:!0}}),V(),a()}var wr=w(`<!> <!>`,1);function Tr(n,r){var a=t(),o=e(a);R(o,()=>xt,(n,a)=>{a(n,{class:`w-full`,children:(n,a)=>{var o=wr(),s=e(o);R(s,()=>ht,(t,n)=>{n(t,{children:(t,n)=>{var a=wr(),o=e(a);R(o,()=>vt,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,r.title)),T(e,n)},$$slots:{default:!0}})});var s=F(o,2);R(s,()=>lt,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,r.description)),T(e,n)},$$slots:{default:!0}})}),T(t,a)},$$slots:{default:!0}})});var c=F(s,2);R(c,()=>ot,(n,i)=>{i(n,{class:`flex flex-col`,children:(n,i)=>{var a=t(),o=e(a);B(o,()=>r.action),T(n,a)},$$slots:{default:!0}})}),T(n,o)},$$slots:{default:!0}})}),T(n,a)}var Er=w(`<!> `,1),Dr=w(`<div class="flex flex-col items-center gap-4 w-full"><!> <!></div>`);function Or(r,o){_(o,!0);let s=()=>b(X,`$dict`,c),[c,l]=L();ee(()=>{o.method===null&&he()});var u=Dr(),f=d(u);{let r=n=>{var r=t(),i=e(r),a=e=>{pr(e,{get account(){return o.account}})},s=e=>{Ln(e,{})},c=e=>{Cr(e,{idp:`apple`})},l=e=>{Cr(e,{idp:`google`})};z(i,e=>{o.method===`passkey`?e(a):o.method===`password`?e(s,1):o.method===`apple`?e(c,2):o.method===`google`&&e(l,3)}),T(n,r)},i=P(()=>s().auth.refresh.description(o.account.name));Tr(f,{get title(){return s().auth.refresh.title},get description(){return n(i)},action:r,$$slots:{action:!0}})}var p=F(f,2);U(p,{variant:`outline`,get onclick(){return he},children:(t,n)=>{var r=Er(),a=e(r);tt(a,{});var o=F(a);M(()=>i(o,` ${s().auth.signout??``}`)),T(t,r)},$$slots:{default:!0}}),a(u),T(r,u),V(),l()}var kr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ar(e,t){let n=h(t,kr),r=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`}]];H(e,k({name:`at-sign`},()=>n,{get iconNode(){return r}}))}var jr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Mr(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=h(i,jr);var s=t(),c=e(s);{let e=P(()=>q(`text-sm flex-1 outline-none`,i.class));R(c,()=>pn,(t,r)=>{r(t,k({"data-slot":`tabs-content`,get class(){return n(e)}},()=>o,{get ref(){return a()},set ref(e){a(e)}}))})}T(r,s),V()}var Nr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Pr(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=h(i,Nr);var s=t(),c=e(s);{let e=P(()=>q(`gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,i.class));R(c,()=>yn,(t,r)=>{r(t,k({"data-slot":`tabs-trigger`,get class(){return n(e)}},()=>o,{get ref(){return a()},set ref(e){a(e)}}))})}T(r,s),V()}var Fr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`]);function Ir(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=S(i,`value`,15,``),s=h(i,Fr);var c=t(),l=e(c);{let e=P(()=>q(`gap-2 group/tabs flex data-[orientation=horizontal]:flex-col`,i.class));R(l,()=>un,(t,r)=>{r(t,k({"data-slot":`tabs`,get class(){return n(e)}},()=>s,{get ref(){return a()},set ref(e){a(e)},get value(){return o()},set value(e){o(e)}}))})}T(r,c),V()}var Lr=Re({base:`rounded-lg p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list inline-flex w-fit items-center justify-center text-muted-foreground group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col`,variants:{variant:{default:`cn-tabs-list-variant-default bg-muted`,line:`cn-tabs-list-variant-line gap-1 bg-transparent`}},defaultVariants:{variant:`default`}}),Rr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`variant`,`class`]);function zr(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=S(i,`variant`,3,`default`),s=h(i,Rr);var c=t(),l=e(c);{let e=P(()=>q(Lr({variant:o()}),i.class));R(l,()=>gn,(t,r)=>{r(t,k({"data-slot":`tabs-list`,get"data-variant"(){return o()},get class(){return n(e)}},()=>s,{get ref(){return a()},set ref(e){a(e)}}))})}T(r,c),V()}var Br=w(`<!> `,1),Vr=w(`<!> <!>`,1),Hr=w(`<div class="flex justify-between gap-2"><!> <!></div> <!> <!>`,1);function Ur(r,o){_(o,!0);let s=()=>b(X,`$dict`,c),[c,l]=L(),u=A(null);function f(e){requestAnimationFrame(()=>{n(u)?.querySelector(`[data-value="${e}"] input[autofocus]`)?.focus()})}let p=A(`passkey`);ee(()=>{C(p,_e?`passkey`:`password`,!0)});var m=t(),h=e(m);{let t=P(()=>q(`w-full`,o.class));R(h,()=>Ir,(r,c)=>{c(r,{get class(){return n(t)},onValueChange:f,get value(){return n(p)},set value(e){C(p,e,!0)},get ref(){return n(u)},set ref(e){C(u,e,!0)},children:(t,n)=>{var r=Hr(),c=e(r),l=d(c);R(l,()=>zr,(t,n)=>{n(t,{children:(t,n)=>{var r=Vr(),a=e(r);R(a,()=>Pr,(t,n)=>{n(t,{value:`passkey`,"data-marker":`passkey-tab`,children:(t,n)=>{var r=Br(),a=e(r);$n(a,{color:`var(--muted-foreground)`});var o=F(a);M(()=>i(o,` ${s().auth.passkey??``}`)),T(t,r)},$$slots:{default:!0}})});var o=F(a,2);R(o,()=>Pr,(t,n)=>{n(t,{value:`password`,id:`iam-email-tab`,children:(t,n)=>{var r=Br(),a=e(r);Ar(a,{color:`var(--muted-foreground)`});var o=F(a);M(()=>i(o,` ${s().auth.email??``}`)),T(t,r)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})}),Sr(F(l,2),{get account(){return o.account}}),a(c);var u=F(c,2);R(u,()=>Mr,(e,t)=>{t(e,{value:`passkey`,children:(e,t)=>{dr(e,{get account(){return o.account},oncreate:e=>o.oncreate?.(e,`passkey`)})},$$slots:{default:!0}})});var f=F(u,2);R(f,()=>Mr,(e,t)=>{t(e,{value:`password`,children:(e,t)=>{In(e,{get account(){return o.account},oncreate:e=>o.oncreate?.(e,`password`)})},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})})}T(r,m),V(),l()}var Wr=w(`<div class="flex items-center justify-center h-screen"><!></div>`),Gr=w(`<div class="flex w-full max-w-sm items-center justify-center pt-[14vh] px-4 mx-auto"><!></div>`);function Kr(r,i){_(i,!0);let o=()=>b(ae,`$iam`,f),s=()=>b(oe,`$method`,f),c=()=>b(Ce,`$authenticated`,f),l=()=>b(se,`$greeting`,f),u=()=>b(ce,`$processing`,f),[f,p]=L(),m=r=>{var a=t(),c=e(a),l=e=>{Or(e,{get account(){return o()},get method(){return s()}})},u=e=>{{let t=P(()=>q(`scale-0 transition-transform`,`scale-100`));Ur(e,{get class(){return n(t)},get account(){return i.account},get oncreate(){return i.oncreate}})}};z(c,e=>{o()?e(l):e(u,-1)}),T(r,a)};var h=t(),g=e(h),v=n=>{var r=t(),a=e(r);B(a,()=>i.children),T(n,r)},y=e=>{var t=Wr();Y(d(t),{}),a(t),T(e,t)},x=n=>{var r=t(),a=e(r);B(a,()=>i.screen,()=>({authentication:m})),T(n,r)},S=e=>{var t=Gr(),n=d(t);m(n),a(t),T(e,t)};z(g,e=>{c()?e(v):l()||u()?e(y,1):i.screen?e(x,2):e(S,-1)}),T(r,h),V(),p()}var qr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jr(e,t){let n=h(t,qr),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];H(e,k({name:`check`},()=>n,{get iconNode(){return r}}))}var Yr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xr(e,t){let n=h(t,Yr),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];H(e,k({name:`copy`},()=>n,{get iconNode(){return r}}))}var Zr=new Set([`$$slots`,`$$events`,`$$legacy`,`text`,`label`,`disabled`,`oncopy`,`icon`,`class`]),Qr=w(`<!> <!>`,1);function $r(r,a){_(a,!0);let o=h(a,Zr),s=A(!1),c=A(!1),l=!navigator.clipboard;async function d(){if(!n(s)){if(C(c,!0),typeof ClipboardItem>`u`){let e=typeof a.text==`function`?await a.text():a.text;if(e===null)return;await navigator.clipboard.writeText(e)}else{let e=f(a.text);await navigator.clipboard.write([e])}C(c,!1),C(s,!0),a.oncopy?.(),setTimeout(()=>C(s,!1),2e3)}}function f(e){return typeof e==`function`?p(e):new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`})})}function p(e){return new ClipboardItem({"text/plain":e().then(e=>new Blob([e??``],{type:`text/plain`}))})}{let f=P(()=>q(a.class)),p=P(()=>a.disabled||l||n(c));U(r,k({get class(){return n(f)},onclick:d,get disabled(){return n(p)}},()=>o,{children:(r,o)=>{var l=Qr(),d=e(l),f=e=>{Jr(e,{class:`text-constructive`,strokeWidth:3})},p=e=>{Y(e,{})},m=n=>{var r=t(),i=e(r);B(i,()=>a.icon),T(n,r)},h=e=>{Xr(e,{})};z(d,e=>{n(s)?e(f):n(c)?e(p,1):a.icon===void 0?e(h,-1):e(m,2)});var g=F(d,2),_=e=>{var t=u();M(()=>i(t,a.label)),T(e,t)};z(g,e=>{a.label!==null&&e(_)}),T(r,l)},$$slots:{default:!0}}))}V()}function ei(e,t){return!!(e.dev!==void 0&&e.dev===!1||e.beta!==void 0&&e.beta===ti()||e.debug!==void 0&&e.debug===ni()||e.role!==void 0&&t?.roles!==void 0&&ri(t.roles,e.role))}function ti(){return typeof window<`u`&&window.location.hostname.startsWith(`beta.`)}function ni(){return ti()}function ri(e,t){for(let n of e)if(n===t||t.startsWith(n+`:`))return!0;return!1}var ii=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`denied`]),ai=w(`<div class="flex justify-center pt-[14vh]"><!></div>`);function oi(r,i){_(i,!0);let o=()=>b(ae,`$account`,c),s=()=>b(X,`$dict`,c),[c,l]=L(),u=h(i,ii),f=P(()=>ei(u,o())),p=P(()=>o()?.id??``);var m=t(),g=e(m),v=n=>{var r=t(),a=e(r);B(a,()=>i.children),T(n,r)},y=n=>{var r=t(),a=e(r);B(a,()=>i.denied),T(n,r)},x=e=>{var t=ai(),r=d(t);{let e=P(()=>n(p).slice(0,8));$r(r,{get text(){return n(p)},get label(){return n(e)},get"aria-label"(){return s().auth.copyId},variant:`outline`,class:`font-mono`})}a(t),T(e,t)};z(g,e=>{n(f)?e(v):i.denied===void 0?n(p)!==``&&e(x,2):e(y,1)}),T(r,m),V(),l()}var si=E(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),Q=E((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),ci=E((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),li=E(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),ui=E(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),di=E((e=>{var t=Q().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),fi=E((e=>{var t=Q().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),pi=E((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),mi=E((e=>{var t=ci(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),hi=E((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),gi=E((e=>{var t=hi();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),_i=E(((e,t)=>{var n=gi();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),vi=E((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),yi=E((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
2
2
  ]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^[0-9]+$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),$=E((e=>{var t=vi(),n=yi();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),bi=E((e=>{var t=Q(),n=mi(),r=ci(),i=$(),a=vi(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),xi=E((e=>{var t=Q(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),Si=E(((e,t)=>{var n=$();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),Ci=E(((e,t)=>{var n=$(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t=0;for(;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),wi=E(((e,t)=>{var n=$();function r(e){this.mode=n.BYTE,this.data=typeof e==`string`?new TextEncoder().encode(e):new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),Ti=E(((e,t)=>{var n=$(),r=Q();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t=0;for(;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
3
3
  Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),Ei=E(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),Di=E((e=>{var t=$(),n=Si(),r=Ci(),i=wi(),a=Ti(),o=yi(),s=Q(),c=Ei();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
4
4
  Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),Oi=E((e=>{var t=Q(),n=ci(),r=li(),i=ui(),a=di(),o=fi(),s=pi(),c=mi(),l=_i(),u=bi(),d=xi(),f=$(),p=Di();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return x(a,e,n)}function x(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function S(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`