PageSourceSearch

https://speednuvem.com.br/assets/input-otp-DIPGI3NS.js

js speednuvem.com.br collected 2026-09-30 06:40:21 UTC 11,432 bytes, 30 lines download raw bytes

vendor: 4,490 bytes, lines 1-11
1import{c as ve,h as e,o as D,t as J}from"./index-D-GBr4OT.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const je=ve("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const Je=ve("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);var Oe=Object.defineProperty,Ie=Object.defineProperties,De=Object.getOwnPropertyDescriptors,Q=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,me=(n,r,l)=>r in n?Oe(n,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[r]=l,Ae=(n,r)=>{for(var l in r||(r={}))he.call(r,l)&&me(n,l,r[l]);if(Q)for(var l of Q(r))ge.call(r,l)&&me(n,l,r[l]);return n},We=(n,r)=>Ie(n,De(r)),Be=(n,r)=>{var l={};for(var i in n)he.call(n,i)&&r.indexOf(i)<0&&(l[i]=n[i]);if(n!=null&&Q)for(var i of Q(n))r.indexOf(i)<0&&ge.call(n,i)&&(l[i]=n[i]);return l};function Ne(n){let r=setTimeout(n,0),l=setTimeout(n,10),i=setTimeout(n,50);return[r,l,i]}function _e(n){let r=e.useRef();return e.useEffect(()=>{r.current=n}),r.current}var Fe=18,be=40,He=`${be}px`,Le=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Ge({containerRef:n,inputRef:r,pushPasswordManagerStrategy:l,isFocused:i}){let[y,p]=e.useState(!1),[M,x]=e.useState(!1),[A,F]=e.useState(!1),H=e.useMemo(()=>l==="none"?!1:(l==="increase-width"||l==="experimental-no-flickering")&&y&&M,[y,M,l]),W=e.useCallback(()=>{let m=n.current,P=r.current;if(!m||!P||A||l==="none")return;let g=m,S=g.getBoundingClientRect().left+g.offsetWidth,B=g.getBoundingClientRect().top+g.offsetHeight/2,u=S-Fe,L=B;document.querySelectorAll(Le).length===0&&document.elementFromPoint(u,L)===m||(p(!0),F(!0))},[n,r,A,l]);return e.useEffect(()=>{let m=n.current;if(!m||l==="none")return;function P(){let S=window.innerWidth-m.getBoundingClientRect().right;x(S>=be)}P();let g=setInterval(P,1e3);return()=>{clearInterval(g)}},[n,l]),e.useEffect(()=>{let m=i||document.activeElement===r.current;if(l==="none"||!m)return;let P=setTimeout(W,0),g=setTimeout(W,2e3),S=setTimeout(W,5e3),B=setTimeout(()=>{F(!0)},6e3);return()=>{clearTimeout(P),clearTimeout(g),clearTimeout(S),clearTimeout(B)}},[r,i,l,W]),{hasPWMBadge:y,willPushPWMBadge:H,PWM_BADGE_SPACE_WIDTH:He}}var we=e.createContext({}),ye=e.forwardRef((n,r)=>{var l=n,{value:i,onChange:y,maxLength:p,textAlign:M="left",pattern:x,placeholder:A,inputMode:F="numeric",onComplete:H,pushPasswordManagerStrategy:W="increase-width",pasteTransformer:m,containerClassName:P,noScriptCSSFallback:g=$e,render:S,children:B}=l,u=Be(l,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),L,ne,re,ae,le;let[xe,Se]=e.useState(typeof u.defaultValue=="string"?u.defaultValue:""),s=i??xe,R=_e(s),G=e.useCallback(t=>{y==null||y(t),Se(t)},[y]),w=e.useMemo(()=>x?typeof x=="string"?new RegExp(x):x:null,[x]),c=e.useRef(null),U=e.useRef(null),X=e.useRef({value:s,onChange:G,isIOS:typeof window<"u"&&((ne=(L=window==null?void 0:window.CSS)==null?void 0:L.supports)==null?void 0:ne.call(L,"-webkit-touch-callout","none"))}),q=e.useRef({prev:[(re=c.current)==null?void 0:re.selectionStart,(ae=c.current)==null?void 0:ae.selectionEnd,(le=c.current)==null?void 0:le.selectionDirection]});e.useImperativeHandle(r,()=>c.current,[]),e.useEffect(()=>{let t=c.current,a=U.current;if(!t||!a)return;X.current.value!==t.value&&X.current.onChange(t.value),q.current.prev=[t.selectionStart,t.selectionEnd,t.selectionDirection];function d(){if(document.activeElement!==t){z(null),V(null);return}let o=t.selectionStart,f=t.selectionEnd,Z=t.selectionDirection,b=t.maxLength,j=t.value,E=q.current.prev,C=-1,k=-1,O;if(j.length!==0&&o!==null&&f!==null){let Me=o===f,Re=o===j.length&&j.length<b;if(Me&&!Re){let I=o;if(I===0)C=0,k=1,O="forward";else if(I===b)C=I-1,k=I,O="backward";else if(b>1&&j.length>1){let te=0;
11if(E[0]!==null&&E[1]!==null){O=I<E[1]?"backward":"forward";let Te=E[0]===E[1]&&E[0]<b;O==="backward"&&!Te&&(te=-1)}C=te+I,k=te+I+1}}C!==-1&&k!==-1&&C!==k&&c.current.setSelectionRange(C,k,O)}let de=C!==-1?C:o,fe=k!==-1?k:f,ke=O??Z;z(de),V(fe),q.current.prev=[de,fe,ke]}if(document.addEventListener("selectionchange",d,{capture:!0}),d(),document.activeElement===t&&Y(!0),!document.getElementById("input-otp-style")){let o=document.createElement("style");if(o.id="input-otp-style",document.head.appendChild(o),o.sheet){let f="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;";K(o.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),K(o.sheet,`[data-input-otp]:autofill { ${f} }`),K(o.sheet,`[data-input-otp]:-webkit-autofill { ${f} }`),K(o.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; } }"),K(o.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let v=()=>{a&&a.style.setProperty("--root-height",`${t.clientHeight}px`)};v();let h=new ResizeObserver(v);return h.observe(t),()=>{document.removeEventListener("selectionchange",d,{capture:!0}),h.disconnect()}},[]);let[oe,ie]=e.useState(!1),[$,Y]=e.useState(!1),[T,z]=e.useState(null),[N,V]=e.useState(null);e.useEffect(()=>{Ne(()=>{var t,a,d,v;(t=c.current)==null||t.dispatchEvent(new Event("input"));let h=(a=c.current)==null?void 0:a.selectionStart,o=(d=c.current)==null?void 0:d.selectionEnd,f=(v=c.current)==null?void 0:v.selectionDirection;h!==null&&o!==null&&(z(h),V(o),q.current.prev=[h,o,f])})},[s,$]),e.useEffect(()=>{R!==void 0&&s!==R&&R.length<p&&s.length===p&&(H==null||H(s))},[p,H,R,s]);let _=Ge({containerRef:U,inputRef:c,pushPasswordManagerStrategy:W,isFocused:$}),ue=e.useCallback(t=>{let a=t.currentTarget.value.slice(0,p);if(a.length>0&&w&&!w.test(a)){t.preventDefault();return}typeof R=="string"&&a.length<R.length&&document.dispatchEvent(new Event("selectionchange")),G(a)},[p,G,R,w]),se=e.useCallback(()=>{var t;if(c.current){let a=Math.min(c.current.value.length,p-1),d=c.current.value.length;(t=c.current)==null||t.setSelectionRange(a,d),z(a),V(d)}Y(!0)},[p]),ce=e.useCallback(t=>{var a,d;let v=c.current;if(!m&&(!X.current.isIOS||!t.clipboardData||!v))return;let h=t.clipboardData.getData("text/plain"),o=m?m(h):h;t.preventDefault();let f=(a=c.current)==null?void 0:a.selectionStart,Z=(d=c.current)==null?void 0:d.selectionEnd,b=(f!==Z?s.slice(0,f)+o+s.slice(Z):s.slice(0,f)+o+s.slice(f)).slice(0,p);if(b.length>0&&w&&!w.test(b))return;v.value=b,G(b);let j=Math.min(b.length,p-1),E=b.length;v.setSelectionRange(j,E),z(j),V(E)},[p,G,w,s]),Ee=e.useMemo(()=>({position:"relative",cursor:u.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[u.disabled]),pe=e.useMemo(()=>({position:"absolute",inset:0,width:_.willPushPWMBadge?`calc(100% + ${_.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:_.willPushPWMBadge?`inset(0 ${_.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:M,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)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[_.PWM_BADGE_SPACE_WIDTH,_.willPushPWMBadge,M]),Pe=e.useMemo(()=>e.createElement("input",We(Ae({autoComplete:u.autoComplete||"one-time-code"},u),{"data-input-otp":!0,"data-input-otp-placeholder-shown":s.length===0||void 0,"data-input-otp-mss":T,"data-input-otp-mse":N,inputMode:F,pattern:w==null?void 0:w.source,"aria-placeholder":A,style:pe,maxLength:p,value:s,ref:c,onPaste:t=>{var a;ce(t),(a=u.onPaste)==null||a.call(u,t)},onChange:ue,onMouseOver:t=>{var a;ie(!0),(a=u.onMouseOver)==null||a.call(u,t)},onMouseLeave:t=>{var a;ie(!1),(a=u.onMouseLeave)==null||a.call(u,t)},onFocus:t=>{var a;se(),(a=u.onFocus)==null||a.call(u,t)},onBlur:t=>{var a;Y(!1),(a=u.onBlur)==null||a.call(u,t)}})),[ue,se,ce,F,pe,p,N,T,u,w==null?void 0:w.source,s]),ee=e.useMemo(()=>({slots:Array.from({length:p}).map((t,a)=>{var d;let v=$&&T!==null&&N!==null&&(T===N&&a===T||a>=T&&a<N),h=s[a]!==void 0?s[a]:null,o=s[0]!==void 0?null:(d=A==null?void 0:A[a])!=null?d:null;return{char:h,placeholderChar:o,isActive:v,hasFakeCaret:v&&h===null}}),isFocused:$,isHovering:!u.disabled&&oe}),[$,oe,p,N,T,u.disabled,s]),Ce=e.useMemo(()=>S?S(ee):e.createElement(we.Provider,{value:ee},B),[B,ee,S]);return e.createElement(e.Fragment,null,g!==null&&e.createElement("noscript",null,e.createElement("style",null,g)),e.createElement("div",{ref:U,"data-input-otp-container":!0,style:Ee,className:P},Ce,e.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Pe)))});ye.displayName="Input";function K(n,r){try{n.insertRule(r)}catch{console.error("input-otp could not insert CSS rule:",r)}}var $e=`
12[data-input-otp] {
13  --nojs-bg: white !important;
14  --nojs-fg: black !important;
15
16  background-color: var(--nojs-bg) !important;
17  color: var(--nojs-fg) !important;
18  caret-color: var(--nojs-fg) !important;
19  letter-spacing: .25em !important;
20  text-align: center !important;
21  border: 1px solid var(--nojs-fg) !important;
22  border-radius: 4px !important;
23  width: 100% !important;
24}
25@media (prefers-color-scheme: dark) {
26  [data-input-otp] {
27    --nojs-bg: black !important;
28    --nojs-fg: white !important;
29  }
30}`;const ze=e.forwardRef(({className:n,containerClassName:r,...l},i)=>D.jsx(ye,{ref:i,containerClassName:J("flex items-center gap-2 has-[:disabled]:opacity-50",r),className:J("disabled:cursor-not-allowed",n),...l}));ze.displayName="InputOTP";const Ve=e.forwardRef(({className:n,...r},l)=>D.jsx("div",{ref:l,className:J("flex items-center",n),...r}));Ve.displayName="InputOTPGroup";const Ke=e.forwardRef(({index:n,className:r,...l},i)=>{const y=e.useContext(we),{char:p,hasFakeCaret:M,isActive:x}=y.slots[n];return D.jsxs("div",{ref:i,className:J("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",x&&"z-10 ring-2 ring-ring ring-offset-background",r),...l,children:[p,M&&D.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:D.jsx("div",{className:"animate-caret-blink h-4 w-px bg-foreground duration-1000"})})]})});Ke.displayName="InputOTPSlot";const qe=e.forwardRef(({...n},r)=>D.jsx("div",{ref:r,role:"separator",...n,children:D.jsx(je,{})}));qe.displayName="InputOTPSeparator";export{ze as I,Je as K,Ve as a,Ke as b};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.