@deslop/auth 0.1.1233 → 0.1.1237
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/(home)-CR9wOpHN.js +20 -0
- package/dist/client/assets/badge-CbTkmKPg.js +1 -0
- package/dist/client/assets/components-Gr1GoJzQ.js +1 -0
- package/dist/client/assets/effect-DksNtAHN.js +17 -0
- package/dist/client/assets/index-BDvvjADU.js +2 -0
- package/dist/client/assets/index-tRps0ChV.css +2 -0
- package/dist/client/assets/people-CTpDPbFl.js +1 -0
- package/dist/client/assets/route-BKEOZjfN.js +1 -0
- package/dist/client/assets/toast-D2hAfPD-.js +3 -0
- package/dist/client/index.html +4 -4
- package/dist/server.js +21865 -405
- package/package.json +2 -2
- package/dist/client/assets/(home)-DGkpAbto.js +0 -20
- package/dist/client/assets/badge-BZyO-IMU.js +0 -1
- package/dist/client/assets/client-sCUiygGT.js +0 -3
- package/dist/client/assets/components-DfiHr7mH.js +0 -1
- package/dist/client/assets/effect-BhsQyU3F.js +0 -17
- package/dist/client/assets/index-CSiVAR-F.js +0 -2
- package/dist/client/assets/index-JDesZTgz.css +0 -2
- package/dist/client/assets/people-CED21lpE.js +0 -1
- package/dist/client/assets/route-a1N8Et11.js +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{n as t,o as n,s as r}from"./react-BUjtWCUj.js";import{ar as i,rr as a,tr as o}from"./toast-D2hAfPD-.js";import{B as s,Da as c,H as l,Ia as u,Ja as d,Ki as f,Na as p,Pa as m,V as h,Zi as g,ha as _,ja as v,pa as y,x as b}from"./effect-DksNtAHN.js";import{E as x,at as S,c as C,ct as w,ft as T,it as E,k as D,lt as O,m as k,mt as A,n as j,nt as M,ot as N,rt as P,u as F}from"./components-Gr1GoJzQ.js";var I={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};I.node;var L=i(I),R=e(r(),1),z=e=>{let t=V(R.useMemo(()=>B(e.machine,e.path),[e.machine,e.path]));if(s(t))throw f(t.cause);return h(t)?e.pending??null:v(t.value)?e.children(t.value.value):e.inactive??null},B=(e,t)=>E(e)?S(e,t):N(e,t),V=e=>H(R.useContext(T),e),H=(e,t)=>{let n=R.useMemo(()=>{let n,r,i=e=>l(e)?(n=e,e):h(e)&&n!==void 0?n:e;return{subscribe:n=>e.subscribe(t,n),snapshot:()=>i(e.get(t)),serverSnapshot:()=>r??=i(b(t,e))}},[e,t]);return R.useSyncExternalStore(n.subscribe,n.snapshot,n.serverSnapshot)},U=z,W=t(),G=Object.defineProperty,K=Object.defineProperties,q=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,te=(e,t,n)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ne=(e,t)=>{for(var n in t||={})Y.call(t,n)&&te(e,n,t[n]);if(J)for(var n of J(t))ee.call(t,n)&&te(e,n,t[n]);return e},re=(e,t)=>K(e,q(t)),ie=(e,t)=>{var n={};for(var r in e)Y.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&J)for(var r of J(e))t.indexOf(r)<0&&ee.call(e,r)&&(n[r]=e[r]);return n};function ae(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function oe(e){let t=R.useRef();return R.useEffect(()=>{t.current=e}),t.current}var se=18,X=40,ce=`${X}px`;function le(e){let t=e.getBoundingClientRect().right,n=e;for(;n;){if(getComputedStyle(n).overflowX!==`visible`)return n.getBoundingClientRect().left+n.clientLeft+n.clientWidth-t;n=n.parentElement}return document.documentElement.clientWidth-t}var ue=`[data-lastpass-icon-root],com-1password-button,[data-dashlanecreated],[style$="2147483647 !important;"]`;function de({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=R.useState(!1),[o,s]=R.useState(!1),[c,l]=R.useState(!1),u=R.useMemo(()=>n!==`none`&&(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,[i,o,n]),d=R.useCallback(()=>{let r=e.current,i=t.current;if(!r||!i||c||n===`none`)return;let o=r,u=o.getBoundingClientRect().left+o.offsetWidth,d=o.getBoundingClientRect().top+o.offsetHeight/2,f=u-se,p=d;document.querySelectorAll(ue).length===0&&document.elementFromPoint(f,p)===r||(s(le(r)>=X),a(!0),l(!0))},[e,t,c,n]);return R.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){s(le(t)>=X)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),R.useEffect(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(d,0),a=setTimeout(d,2e3),o=setTimeout(d,5e3),s=setTimeout(()=>{l(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n,d]),{hasPWMBadge:i,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:ce}}var fe=R.createContext({}),pe=R.forwardRef((e,t)=>{var n=e,{value:r,onChange:i,maxLength:a,textAlign:o=`left`,pattern:s,placeholder:c,inputMode:l=`numeric`,onComplete:u,pushPasswordManagerStrategy:d=`increase-width`,pasteTransformer:f,containerClassName:p,noScriptCSSFallback:m=me,nonce:h,render:g,children:_}=n,v=ie(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`nonce`,`render`,`children`]),y;let[b,x]=R.useState(typeof v.defaultValue==`string`?v.defaultValue:``),S=r??b,C=oe(S),w=R.useCallback(e=>{i?.(e),x(e)},[i]),T=R.useMemo(()=>s?typeof s==`string`?new RegExp(s):s:null,[s]),E=R.useRef(null),D=R.useRef(null),O=R.useRef({value:S,onChange:w,isIOS:typeof window<`u`&&((y=window==null?void 0:window.CSS)?.supports)?.call(y,`-webkit-touch-callout`,`none`)}),k=R.useRef({prev:[E.current?.selectionStart,E.current?.selectionEnd,E.current?.selectionDirection]});R.useImperativeHandle(t,()=>E.current,[]),R.useEffect(()=>{let e=E.current,t=D.current;if(!e||!t)return;O.current.value!==e.value&&O.current.onChange(e.value),k.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection];function n(){if(document.activeElement!==e){F(null),L(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=k.current.prev,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let r=t===n,u=t===a.length&&a.length<i;if(r&&!u){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&e.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l??r;F(u),L(d),k.current.prev=[u,d,f]}if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&N(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,h&&e.setAttribute(`nonce`,h),document.head.appendChild(e),e.sheet){let t=`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;`;Z(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),Z(e.sheet,`[data-input-otp]:autofill { ${t} }`),Z(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),Z(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),Z(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=typeof ResizeObserver>`u`?null:new ResizeObserver(r);return i?.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i?.disconnect()}},[]);let[A,j]=R.useState(!1),[M,N]=R.useState(!1),[P,F]=R.useState(null),[I,L]=R.useState(null);R.useEffect(()=>{let e=ae(()=>{var e;(e=E.current)==null||e.dispatchEvent(new Event(`input`));let t=E.current?.selectionStart,n=E.current?.selectionEnd,r=E.current?.selectionDirection;t!==null&&n!==null&&(F(t),L(n),k.current.prev=[t,n,r])});return()=>{e.forEach(e=>clearTimeout(e))}},[S,M]),R.useEffect(()=>{C!==void 0&&S!==C&&C.length<a&&S.length===a&&u?.(S)},[a,u,C,S]);let z=de({containerRef:D,inputRef:E,pushPasswordManagerStrategy:d,isFocused:M}),B=R.useCallback(e=>{let t=e.currentTarget.value.slice(0,a);t.length>0&&T&&!T.test(t)?e.preventDefault():(typeof C==`string`&&t.length<C.length&&document.dispatchEvent(new Event(`selectionchange`)),w(t))},[a,w,C,T]),V=R.useCallback(()=>{var e;if(E.current){let t=Math.min(E.current.value.length,a-1),n=E.current.value.length;(e=E.current)==null||e.setSelectionRange(t,n),F(t),L(n)}N(!0)},[a]),H=R.useCallback(e=>{let t=E.current;if(!f&&(!O.current.isIOS||!e.clipboardData||!t))return;let n=e.clipboardData.getData(`text/plain`),r=f?f(n):n;e.preventDefault();let i=E.current?.selectionStart,o=E.current?.selectionEnd,s=(i===o?S.slice(0,i)+r+S.slice(i):S.slice(0,i)+r+S.slice(o)).slice(0,a);if(s.length>0&&T&&!T.test(s))return;t.value=s,w(s);let c=Math.min(s.length,a-1),l=s.length;t.setSelectionRange(c,l),F(c),L(l)},[a,w,f,T,S]),U=R.useMemo(()=>({position:`relative`,cursor:v.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[v.disabled]),W=R.useMemo(()=>({position:`absolute`,inset:0,width:z.willPushPWMBadge?`calc(100% + ${z.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:z.willPushPWMBadge?`inset(0 ${z.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:o,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(--root-height, 16px)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}),[z.PWM_BADGE_SPACE_WIDTH,z.willPushPWMBadge,o]),G=R.useMemo(()=>R.createElement(`input`,re(ne({autoComplete:v.autoComplete||`one-time-code`},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":S.length===0||void 0,"data-input-otp-mss":P,"data-input-otp-mse":I,inputMode:l,pattern:T?.source,"aria-placeholder":c,style:W,maxLength:a,value:S,ref:E,spellCheck:v.spellCheck??!1,onPaste:e=>{var t;H(e),(t=v.onPaste)==null||t.call(v,e)},onChange:B,onMouseOver:e=>{var t;j(!0),(t=v.onMouseOver)==null||t.call(v,e)},onMouseLeave:e=>{var t;j(!1),(t=v.onMouseLeave)==null||t.call(v,e)},onFocus:e=>{var t;V(),(t=v.onFocus)==null||t.call(v,e)},onBlur:e=>{var t;N(!1),(t=v.onBlur)==null||t.call(v,e)}})),[B,V,H,l,W,a,I,P,c,v,T?.source,S]),K=R.useMemo(()=>({slots:Array.from({length:a}).map((e,t)=>{let n=M&&P!==null&&I!==null&&(P===I&&t===P||t>=P&&t<I),r=S[t]===void 0?null:S[t];return{char:r,placeholderChar:S[0]===void 0?c?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:M,isHovering:!v.disabled&&A}),[M,A,a,I,P,c,v.disabled,S]),q=R.useMemo(()=>g?g(K):R.createElement(fe.Provider,{value:K},_),[_,K,g]);return R.createElement(R.Fragment,null,m!==null&&R.createElement(`noscript`,null,R.createElement(`style`,null,m)),R.createElement(`div`,{ref:D,"data-input-otp-container":!0,translate:`no`,style:U,className:p},q,R.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},G)))});pe.displayName=`Input`;function Z(e,t){try{e.insertRule(t)}catch{console.warn(`input-otp could not insert CSS rule:`,t)}}var me=`
|
|
2
|
+
[data-input-otp] {
|
|
3
|
+
--nojs-bg: white !important;
|
|
4
|
+
--nojs-fg: black !important;
|
|
5
|
+
|
|
6
|
+
background-color: var(--nojs-bg) !important;
|
|
7
|
+
color: var(--nojs-fg) !important;
|
|
8
|
+
caret-color: var(--nojs-fg) !important;
|
|
9
|
+
letter-spacing: .25em !important;
|
|
10
|
+
text-align: center !important;
|
|
11
|
+
border: 1px solid var(--nojs-fg) !important;
|
|
12
|
+
border-radius: 4px !important;
|
|
13
|
+
width: 100% !important;
|
|
14
|
+
}
|
|
15
|
+
@media (prefers-color-scheme: dark) {
|
|
16
|
+
[data-input-otp] {
|
|
17
|
+
--nojs-bg: black !important;
|
|
18
|
+
--nojs-fg: white !important;
|
|
19
|
+
}
|
|
20
|
+
}`,Q=n();function he(e){let t=(0,W.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,containerClassName:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=o(`cn-input-otp flex items-center has-disabled:opacity-50`,r),t[4]=r,t[5]=a);let s;t[6]===n?s=t[7]:(s=o(`disabled:cursor-not-allowed`,n),t[6]=n,t[7]=s);let c;return t[8]!==i||t[9]!==a||t[10]!==s?(c=(0,Q.jsx)(pe,{"data-slot":`input-otp`,containerClassName:a,spellCheck:!1,className:s,...i}),t[8]=i,t[9]=a,t[10]=s,t[11]=c):c=t[11],c}function ge(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex items-center rounded-md has-aria-invalid:border-destructive has-aria-invalid:ring-2 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(`div`,{"data-slot":`input-otp-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _e(e){let t=(0,W.c)(17),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({index:r,className:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=R.useContext(fe),s;t[4]!==r||t[5]!==a?(s=a?.slots[r]??{},t[4]=r,t[5]=a,t[6]=s):s=t[6];let{char:c,hasFakeCaret:l,isActive:u}=s,d;t[7]===n?d=t[8]:(d=o(`relative flex size-7 items-center justify-center border-y border-r border-input bg-input/20 text-xs/relaxed transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-2 data-[active=true]:ring-ring/30 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`,n),t[7]=n,t[8]=d);let f;t[9]===l?f=t[10]:(f=l&&(0,Q.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,Q.jsx)(`div`,{className:`h-4 w-px animate-caret-blink bg-foreground duration-1000`})}),t[9]=l,t[10]=f);let p;return t[11]!==c||t[12]!==u||t[13]!==i||t[14]!==d||t[15]!==f?(p=(0,Q.jsxs)(`div`,{"data-slot":`input-otp-slot`,"data-active":u,className:d,...i,children:[c,f]}),t[11]=c,t[12]=u,t[13]=i,t[14]=d,t[15]=f,t[16]=p):p=t[16],p}function ve(e){let t=(0,W.c)(5),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Q.jsx)(L,{}),t[2]=r):r=t[2];let i;return t[3]===n?i=t[4]:(i=(0,Q.jsx)(`div`,{"data-slot":`input-otp-separator`,className:`flex items-center [&_svg:not([class*='size-'])]:size-4`,role:`separator`,...n,children:r}),t[3]=n,t[4]=i),i}function ye(e){let t=(0,W.c)(34),n;t[0]===e.state?n=t[1]:(n=e.state===`Missing`||d(e.state),t[0]=e.state,t[1]=n);let r=n,i=e.typed,a;t[2]===e?a=t[3]:(a=t=>{e.onType(D(t))},t[2]=e,t[3]=a);let s=e.state===`Checking`,c=e.state===`Missing`&&`refuse`,l;t[4]===c?l=t[5]:(l=o(`gap-2`,c),t[4]=c,t[5]=l);let u;t[6]===r?u=t[7]:(u=y(_(0,3),e=>(0,Q.jsx)(_e,{index:e,"aria-invalid":r,className:`h-11 flex-1 font-mono text-lg`},e)),t[6]=r,t[7]=u);let f;t[8]===u?f=t[9]:(f=(0,Q.jsx)(ge,{className:`flex-1`,children:u}),t[8]=u,t[9]=f);let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Q.jsx)(ve,{}),t[10]=m):m=t[10];let h;t[11]===r?h=t[12]:(h=y(_(4,7),e=>(0,Q.jsx)(_e,{index:e,"aria-invalid":r,className:`h-11 flex-1 font-mono text-lg`},e)),t[11]=r,t[12]=h);let g;t[13]===h?g=t[14]:(g=(0,Q.jsx)(ge,{className:`flex-1`,children:h}),t[13]=h,t[14]=g);let v;t[15]!==r||t[16]!==e.typed||t[17]!==g||t[18]!==a||t[19]!==s||t[20]!==l||t[21]!==f?(v=(0,Q.jsxs)(he,{id:`code`,"aria-label":`Code of a sign-in to approve`,maxLength:8,value:i,onChange:a,pasteTransformer:D,pattern:`^[A-Za-z]+$`,inputMode:`text`,autoFocus:!0,autoComplete:`off`,autoCapitalize:`characters`,disabled:s,"aria-invalid":r,"aria-describedby":`code-error`,containerClassName:l,children:[f,m,g]}),t[15]=r,t[16]=e.typed,t[17]=g,t[18]=a,t[19]=s,t[20]=l,t[21]=f,t[22]=v):v=t[22];let b;t[23]===e.state?b=t[24]:(b=e.state===`Missing`&&(0,Q.jsx)(M,{id:`code-error`,children:`No waiting sign-in has this code.`}),t[23]=e.state,t[24]=b);let x;t[25]===e.state?x=t[26]:(x=d(e.state)&&(0,Q.jsx)(M,{id:`code-error`,children:e.state.failed}),t[25]=e.state,t[26]=x);let S;t[27]===e.answered?S=t[28]:(S=p(e.answered,{onNone:xe,onSome:be}),t[27]=e.answered,t[28]=S);let C;return t[29]!==v||t[30]!==b||t[31]!==x||t[32]!==S?(C=(0,Q.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[v,b,x,S]}),t[29]=v,t[30]=b,t[31]=x,t[32]=S,t[33]=C):C=t[33],C}function be(e){return(0,Q.jsx)(`p`,{className:`text-muted-foreground settle-in flex items-center gap-1.5 text-xs`,role:`status`,children:g(e.accept,{onFalse:()=>(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(a,{className:`size-3.5`}),x(e.request.clientName,e.request.device),` denied`]}),onTrue:()=>(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(A,{className:`text-primary size-3.5`}),x(e.request.clientName,e.request.device),` approved`]})})})}function xe(){return null}function $(e){let t=(0,W.c)(11),n;t[0]!==e.answered||t[1]!==e.onType||t[2]!==e.state||t[3]!==e.typed?(n=(0,Q.jsx)(ye,{answered:e.answered,onType:e.onType,state:e.state,typed:e.typed}),t[0]=e.answered,t[1]=e.onType,t[2]=e.state,t[3]=e.typed,t[4]=n):n=t[4];let r;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Q.jsx)(P,{label:`Apps`,media:!0,rows:9}),t[5]=r):r=t[5];let i;t[6]===e.pending?i=t[7]:(i=(0,Q.jsx)(R.Suspense,{fallback:r,children:(0,Q.jsx)(j,{pending:e.pending})}),t[6]=e.pending,t[7]=i);let a;return t[8]!==n||t[9]!==i?(a=(0,Q.jsxs)(Q.Fragment,{children:[n,i]}),t[8]=n,t[9]=i,t[10]=a):a=t[10],a}function Se(){let e=(0,W.c)(9);w(k),w(F);let t=O(C.send),n;e[0]===t?n=e[1]:(n=function(e){t({_tag:`Typed`,typed:e})},e[0]=t,e[1]=n);let r=n,i;e[2]===r?i=e[3]:(i=(0,Q.jsx)(U,{machine:C,path:`Typing`,children:e=>(0,Q.jsx)($,{answered:c(e.value.answered),onType:r,pending:m(),state:`Typing`,typed:e.value.typed})}),e[2]=r,e[3]=i);let a;e[4]===r?a=e[5]:(a=(0,Q.jsx)(U,{machine:C,path:`Code`,children:e=>(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(U,{machine:C,path:`Code.Looking`,children:()=>(0,Q.jsx)($,{answered:m(),onType:r,pending:m(),state:`Checking`,typed:e.value.code})}),(0,Q.jsx)(U,{machine:C,path:`Code.Found`,children:t=>(0,Q.jsx)($,{answered:m(),onType:r,pending:u(t.value.request),state:`Found`,typed:e.value.code})}),(0,Q.jsx)(U,{machine:C,path:`Code.Failed`,children:t=>(0,Q.jsx)($,{answered:m(),onType:r,pending:m(),state:{failed:t.value.message},typed:e.value.code})}),(0,Q.jsx)(U,{machine:C,path:`Code.Missing`,children:()=>(0,Q.jsx)($,{answered:m(),onType:r,pending:m(),state:`Missing`,typed:e.value.code})})]})}),e[4]=r,e[5]=a);let o;return e[6]!==i||e[7]!==a?(o=(0,Q.jsxs)(Q.Fragment,{children:[i,a]}),e[6]=i,e[7]=a,e[8]=o):o=e[8],o}export{Se as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./react-BUjtWCUj.js";import{Nn as t,nr as n,tr as r}from"./toast-D2hAfPD-.js";import{tt as i}from"./components-Gr1GoJzQ.js";var a=e(),o=n(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function s(e){let n=(0,a.c)(13),s,c,l,u,d;if(n[0]!==e){let{className:a,variant:f,render:p,...m}=e;s=p,d=f===void 0?`default`:f,u=i,c=`span`,l=t({className:r(o({variant:d}),a)},m),n[0]=e,n[1]=s,n[2]=c,n[3]=l,n[4]=u,n[5]=d}else s=n[1],c=n[2],l=n[3],u=n[4],d=n[5];let f;n[6]===d?f=n[7]:(f={slot:`badge`,variant:d},n[6]=d,n[7]=f);let p;return n[8]!==s||n[9]!==c||n[10]!==l||n[11]!==f?(p={defaultTagName:c,props:l,render:s,state:f},n[8]=s,n[9]=c,n[10]=l,n[11]=f,n[12]=p):p=n[12],u(p)}export{s as t};
|