@deslop/auth 0.1.1248 → 0.1.1249
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/README.md +1 -1
- package/dist/client/apple-touch-icon.png +0 -0
- package/dist/client/assets/(home)-7LcIsBQ-.js +20 -0
- package/dist/client/assets/Check.es-CQarv9s5.js +1 -0
- package/dist/client/assets/components-BY_sC06M.js +1 -0
- package/dist/client/assets/dialog-C7fAOB6e.js +1 -0
- package/dist/client/assets/effect-CKR-Y9J0.js +17 -0
- package/dist/client/assets/icon-CPvsBESP.svg +1 -0
- package/dist/client/assets/index-3r_PkLDE.css +2 -0
- package/dist/client/assets/index-DzL4Am0X.js +2 -0
- package/dist/client/assets/people-BRho5o7I.js +1 -0
- package/dist/client/assets/{react-BUjtWCUj.js → react-COyt-gOi.js} +1 -1
- package/dist/client/assets/route-CHxFp7zX.js +41 -0
- package/dist/client/assets/toast-BKQ798Jo.js +2 -0
- package/dist/client/index.html +6 -6
- package/dist/server.js +16873 -16322
- package/package.json +2 -2
- package/dist/client/assets/(home)-DHUWljGI.js +0 -20
- package/dist/client/assets/check-BOBAceOT.js +0 -1
- package/dist/client/assets/components-ChAYWt2_.js +0 -1
- package/dist/client/assets/dialog-DP3mNUWu.js +0 -1
- package/dist/client/assets/effect-BHGTxpcr.js +0 -17
- package/dist/client/assets/icon-3Ql0zGr9.svg +0 -1
- package/dist/client/assets/index-Bj3hDmy3.js +0 -2
- package/dist/client/assets/index-Bl4kPiWk.css +0 -2
- package/dist/client/assets/people-BjDSIbpy.js +0 -1
- package/dist/client/assets/route-MBpVwG3h.js +0 -41
- package/dist/client/assets/toast-nSmXyoKy.js +0 -3
package/README.md
CHANGED
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{a as t,n,o as r}from"./react-COyt-gOi.js";import{A as i,N as a,_t as o,bt as s,d as c,dt as l,ft as u,gt as d,lt as f,m as p,mt as m,pt as h,r as g,ut as _,v,vt as y,wt as b,xt as x}from"./components-BY_sC06M.js";import{Ca as S,Ka as C,L as w,R as T,Ta as E,Ua as D,Ya as O,_ as k,ao as A,ea as j,oa as M,qa as N,z as P,za as F}from"./effect-CKR-Y9J0.js";import{t as I}from"./Check.es-CQarv9s5.js";import{Nn as L,Xt as R,jn as z}from"./toast-BKQ798Jo.js";var B=e(r(),1),V=new Map([[`bold`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z`}))],[`duotone`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),B.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`fill`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z`}))],[`light`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z`}))],[`regular`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`thin`,B.createElement(B.Fragment,null,B.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z`}))]]),H=B.forwardRef((e,t)=>B.createElement(L,{ref:t,...e,weights:V}));H.displayName=`MinusIcon`;var U=e=>{let t=ee(B.useMemo(()=>W(e.machine,e.path),[e.machine,e.path]));if(w(t))throw j(t.cause);return T(t)?e.pending??null:D(t.value)?e.children(t.value.value):e.inactive??null},W=(e,t)=>d(e)?o(e,t):y(e,t),ee=e=>G(B.useContext(b),e),G=(e,t)=>{let n=B.useMemo(()=>{let n,r,i=e=>P(e)?(n=e,e):T(e)&&n!==void 0?n:e;return{subscribe:n=>e.subscribe(t,n),snapshot:()=>i(e.get(t)),serverSnapshot:()=>r??=i(k(t,e))}},[e,t]);return B.useSyncExternalStore(n.subscribe,n.snapshot,n.serverSnapshot)},K=U,q=n(),te=Object.defineProperty,ne=Object.defineProperties,re=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,ae=(e,t,n)=>t in e?te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t)=>{for(var n in t||={})Y.call(t,n)&&ae(e,n,t[n]);if(J)for(var n of J(t))ie.call(t,n)&&ae(e,n,t[n]);return e},se=(e,t)=>ne(e,re(t)),ce=(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&&ie.call(e,r)&&(n[r]=e[r]);return n};function le(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function ue(e){let t=B.useRef();return B.useEffect(()=>{t.current=e}),t.current}var de=18,X=40,fe=`${X}px`;function pe(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 me=`[data-lastpass-icon-root],com-1password-button,[data-dashlanecreated],[style$="2147483647 !important;"]`;function he({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=B.useState(!1),[o,s]=B.useState(!1),[c,l]=B.useState(!1),u=B.useMemo(()=>n!==`none`&&(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,[i,o,n]),d=B.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-de,p=d;document.querySelectorAll(me).length===0&&document.elementFromPoint(f,p)===r||(s(pe(r)>=X),a(!0),l(!0))},[e,t,c,n]);return B.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){s(pe(t)>=X)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),B.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:fe}}var ge=B.createContext({}),_e=B.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=ve,nonce:h,render:g,children:_}=n,v=ce(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`nonce`,`render`,`children`]),y;let[b,x]=B.useState(typeof v.defaultValue==`string`?v.defaultValue:``),S=r??b,C=ue(S),w=B.useCallback(e=>{i?.(e),x(e)},[i]),T=B.useMemo(()=>s?typeof s==`string`?new RegExp(s):s:null,[s]),E=B.useRef(null),D=B.useRef(null),O=B.useRef({value:S,onChange:w,isIOS:typeof window<`u`&&((y=window==null?void 0:window.CSS)?.supports)?.call(y,`-webkit-touch-callout`,`none`)}),k=B.useRef({prev:[E.current?.selectionStart,E.current?.selectionEnd,E.current?.selectionDirection]});B.useImperativeHandle(t,()=>E.current,[]),B.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]=B.useState(!1),[M,N]=B.useState(!1),[P,F]=B.useState(null),[I,L]=B.useState(null);B.useEffect(()=>{let e=le(()=>{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]),B.useEffect(()=>{C!==void 0&&S!==C&&C.length<a&&S.length===a&&u?.(S)},[a,u,C,S]);let R=he({containerRef:D,inputRef:E,pushPasswordManagerStrategy:d,isFocused:M}),z=B.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=B.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=B.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=B.useMemo(()=>({position:`relative`,cursor:v.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[v.disabled]),W=B.useMemo(()=>({position:`absolute`,inset:0,width:R.willPushPWMBadge?`calc(100% + ${R.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:R.willPushPWMBadge?`inset(0 ${R.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`}),[R.PWM_BADGE_SPACE_WIDTH,R.willPushPWMBadge,o]),ee=B.useMemo(()=>B.createElement(`input`,se(oe({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:z,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)}})),[z,V,H,l,W,a,I,P,c,v,T?.source,S]),G=B.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]),K=B.useMemo(()=>g?g(G):B.createElement(ge.Provider,{value:G},_),[_,G,g]);return B.createElement(B.Fragment,null,m!==null&&B.createElement(`noscript`,null,B.createElement(`style`,null,m)),B.createElement(`div`,{ref:D,"data-input-otp-container":!0,translate:`no`,style:U,className:p},K,B.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},ee)))});_e.displayName=`Input`;function Z(e,t){try{e.insertRule(t)}catch{console.warn(`input-otp could not insert CSS rule:`,t)}}var ve=`
|
|
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=t();function ye(e){let t=(0,q.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=R(`cn-input-otp flex items-center has-disabled:opacity-50`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=R(`disabled:cursor-not-allowed`,n),t[6]=n,t[7]=o);let s;return t[8]!==i||t[9]!==a||t[10]!==o?(s=(0,Q.jsx)(_e,{"data-slot":`input-otp`,containerClassName:a,spellCheck:!1,className:o,...i}),t[8]=i,t[9]=a,t[10]=o,t[11]=s):s=t[11],s}function be(e){let t=(0,q.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=R(`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 xe(e){let t=(0,q.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=B.useContext(ge),o;t[4]!==r||t[5]!==a?(o=a?.slots[r]??{},t[4]=r,t[5]=a,t[6]=o):o=t[6];let{char:s,hasFakeCaret:c,isActive:l}=o,u;t[7]===n?u=t[8]:(u=R(`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]=u);let d;t[9]===c?d=t[10]:(d=c&&(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]=c,t[10]=d);let f;return t[11]!==s||t[12]!==l||t[13]!==i||t[14]!==u||t[15]!==d?(f=(0,Q.jsxs)(`div`,{"data-slot":`input-otp-slot`,"data-active":l,className:u,...i,children:[s,d]}),t[11]=s,t[12]=l,t[13]=i,t[14]=u,t[15]=d,t[16]=f):f=t[16],f}function Se(e){let t=(0,q.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)(H,{}),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 Ce(e){let t=(0,q.c)(43),n;t[0]===e.state?n=t[1]:(n=e.state===`Missing`||A(e.state),t[0]=e.state,t[1]=n);let r=n,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(h,{children:`Sign-in code`}),t[2]=i):i=t[2];let o=e.typed,s;t[3]===e?s=t[4]:(s=t=>{e.onType(a(t))},t[3]=e,t[4]=s);let c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=new URLSearchParams(location.search).has(`code`),t[5]=c):c=t[5];let d=e.state===`Checking`,p=e.state===`Missing`&&`animate-refuse motion-reduce:animate-none`,m;t[6]===p?m=t[7]:(m=R(`gap-2`,p),t[6]=p,t[7]=m);let g;t[8]===r?g=t[9]:(g=S(E(0,3),e=>(0,Q.jsx)(xe,{index:e,"aria-invalid":r,className:`h-11 flex-1 font-mono text-lg`},e)),t[8]=r,t[9]=g);let v;t[10]===g?v=t[11]:(v=(0,Q.jsx)(be,{className:`flex-1`,children:g}),t[10]=g,t[11]=v);let y;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Q.jsx)(Se,{}),t[12]=y):y=t[12];let b;t[13]===r?b=t[14]:(b=S(E(4,7),e=>(0,Q.jsx)(xe,{index:e,"aria-invalid":r,className:`h-11 flex-1 font-mono text-lg`},e)),t[13]=r,t[14]=b);let x;t[15]===b?x=t[16]:(x=(0,Q.jsx)(be,{className:`flex-1`,children:b}),t[15]=b,t[16]=x);let w;t[17]!==r||t[18]!==e.typed||t[19]!==x||t[20]!==s||t[21]!==d||t[22]!==m||t[23]!==v?(w=(0,Q.jsxs)(ye,{id:`code`,"aria-label":`Code of a sign-in to approve`,maxLength:8,value:o,onChange:s,pasteTransformer:a,pattern:`^[A-Za-z]+$`,inputMode:`text`,autoFocus:c,autoComplete:`off`,autoCapitalize:`characters`,disabled:d,"aria-invalid":r,"aria-describedby":`code-description code-error`,containerClassName:m,children:[v,y,x]}),t[17]=r,t[18]=e.typed,t[19]=x,t[20]=s,t[21]=d,t[22]=m,t[23]=v,t[24]=w):w=t[24];let T;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Q.jsx)(l,{id:`code-description`,children:`From the app or device you are approving.`}),t[25]=T):T=t[25];let D;t[26]===e.state?D=t[27]:(D=e.state===`Checking`&&(0,Q.jsxs)(`p`,{role:`status`,className:`text-muted-foreground flex items-center gap-1.5 text-xs`,children:[(0,Q.jsx)(f,{}),`Checking…`]}),t[26]=e.state,t[27]=D);let O;t[28]===e.state?O=t[29]:(O=e.state===`Missing`&&(0,Q.jsx)(u,{id:`code-error`,children:`No waiting sign-in has this code.`}),t[28]=e.state,t[29]=O);let k;t[30]===e.state?k=t[31]:(k=A(e.state)&&(0,Q.jsx)(u,{id:`code-error`,children:e.state.failed}),t[30]=e.state,t[31]=k);let j;t[32]!==r||t[33]!==w||t[34]!==D||t[35]!==O||t[36]!==k?(j=(0,Q.jsxs)(_,{"data-invalid":r,children:[i,w,T,D,O,k]}),t[32]=r,t[33]=w,t[34]=D,t[35]=O,t[36]=k,t[37]=j):j=t[37];let M;t[38]===e.answered?M=t[39]:(M=C(e.answered,{onNone:Te,onSome:we}),t[38]=e.answered,t[39]=M);let N;return t[40]!==j||t[41]!==M?(N=(0,Q.jsxs)(`section`,{className:`flex max-w-sm flex-col gap-4`,children:[j,M]}),t[40]=j,t[41]=M,t[42]=N):N=t[42],N}function we(e){return(0,Q.jsx)(`p`,{className:`text-muted-foreground animate-settle-in flex items-center gap-1.5 text-xs motion-reduce:animate-none`,role:`status`,children:M(e.accept,{onFalse:()=>(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(z,{className:`size-3.5`}),i(e.request.clientName,e.request.device),` denied`]}),onTrue:()=>(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(I,{className:`text-primary size-3.5`}),i(e.request.clientName,e.request.device),` approved`]})})})}function Te(){return null}function $(e){let t=(0,q.c)(11),n;t[0]!==e.answered||t[1]!==e.onType||t[2]!==e.state||t[3]!==e.typed?(n=(0,Q.jsx)(Ce,{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)(m,{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)(B.Suspense,{fallback:r,children:(0,Q.jsx)(g,{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 Ee(){let e=(0,q.c)(9);s(v),s(p);let t=x(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)(K,{machine:c,path:`Typing`,children:e=>(0,Q.jsx)($,{answered:F(e.value.answered),onType:r,pending:N(),state:`Typing`,typed:e.value.typed})}),e[2]=r,e[3]=i);let a;e[4]===r?a=e[5]:(a=(0,Q.jsx)(K,{machine:c,path:`Code`,children:e=>(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(K,{machine:c,path:`Code.Looking`,children:()=>(0,Q.jsx)($,{answered:N(),onType:r,pending:N(),state:`Checking`,typed:e.value.code})}),(0,Q.jsx)(K,{machine:c,path:`Code.Found`,children:t=>(0,Q.jsx)($,{answered:N(),onType:r,pending:O(t.value.request),state:`Found`,typed:e.value.code})}),(0,Q.jsx)(K,{machine:c,path:`Code.Failed`,children:t=>(0,Q.jsx)($,{answered:N(),onType:r,pending:N(),state:{failed:t.value.message},typed:e.value.code})}),(0,Q.jsx)(K,{machine:c,path:`Code.Missing`,children:()=>(0,Q.jsx)($,{answered:N(),onType:r,pending:N(),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{Ee as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{o as t}from"./react-COyt-gOi.js";import{Nn as n}from"./toast-BKQ798Jo.js";var r=e(t(),1),i=new Map([[`bold`,r.createElement(r.Fragment,null,r.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,r.createElement(r.Fragment,null,r.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),r.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,r.createElement(r.Fragment,null,r.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,r.createElement(r.Fragment,null,r.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,r.createElement(r.Fragment,null,r.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,r.createElement(r.Fragment,null,r.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),a=r.forwardRef((e,t)=>r.createElement(n,{ref:t,...e,weights:i}));a.displayName=`CheckIcon`;export{a as t};
|