PageSourceSearch

https://edge.racemap.com/assets/useForm-BBnGxT8u.js

js racemap.com collected 2026-09-24 09:40:04 UTC 4,922 bytes, 2 lines download raw bytes

1import{fj as ce,r as Z,c2 as fe,e3 as ae}from"./ErrorPage-_Vd6n00G.js";const ee=e=>typeof e=="object"&&e!=null&&e.nodeType===1,te=(e,o)=>(!o||e!=="hidden")&&e!=="visible"&&e!=="clip",L=(e,o)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return te(r.overflowY,o)||te(r.overflowX,o)||(i=>{const n=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!n&&(n.clientHeight<i.scrollHeight||n.clientWidth<i.scrollWidth)})(e)}return!1},j=(e,o,r,i,n,t,s,c)=>t<e&&s>o||t>e&&s<o?0:t<=e&&c<=r||s>=o&&c>=r?t-e-i:s>o&&c<r||t<e&&c>r?s-o+n:0,de=e=>{const o=e.parentElement;return o??(e.getRootNode().host||null)},oe=(e,o)=>{var r,i,n,t;if(typeof document>"u")return[];const{scrollMode:s,block:c,inline:f,boundary:D,skipOverflowHiddenElements:ie}=o,se=typeof D=="function"?D:m=>m!==D;if(!ee(e))throw new TypeError("Invalid target");const O=document.scrollingElement||document.documentElement,I=[];let a=e;for(;ee(a)&&se(a);){if(a=de(a),a===O){I.push(a);break}a!=null&&a===document.body&&L(a)&&!L(document.documentElement)||a!=null&&L(a,ie)&&I.push(a)}const p=(i=(r=window.visualViewport)==null?void 0:r.width)!=null?i:innerWidth,b=(t=(n=window.visualViewport)==null?void 0:n.height)!=null?t:innerHeight,{scrollX:w,scrollY:F}=window,{height:y,width:M,top:v,right:V,bottom:A,left:W}=e.getBoundingClientRect(),{top:z,right:G,bottom:J,left:K}=(m=>{const l=window.getComputedStyle(m);return{top:parseFloat(l.scrollMarginTop)||0,right:parseFloat(l.scrollMarginRight)||0,bottom:parseFloat(l.scrollMarginBottom)||0,left:parseFloat(l.scrollMarginLeft)||0}})(e);let d=c==="start"||c==="nearest"?v-z:c==="end"?A+J:v+y/2-z+J,u=f==="center"?W+M/2-K+G:f==="end"?V+G:W-K;const P=[];for(let m=0;m<I.length;m++){const l=I[m],{height:N,width:H,top:R,right:X,bottom:Y,left:_}=l.getBoundingClientRect();if(s==="if-needed"&&v>=0&&W>=0&&A<=b&&V<=p&&(l===O&&!L(l)||v>=R&&A<=Y&&W>=_&&V<=X))return P;const E=getComputedStyle(l),T=parseInt(E.borderLeftWidth,10),k=parseInt(E.borderTopWidth,10),B=parseInt(E.borderRightWidth,10),C=parseInt(E.borderBottomWidth,10);let h=0,g=0;const S="offsetWidth"in l?l.offsetWidth-l.clientWidth-T-B:0,x="offsetHeight"in l?l.offsetHeight-l.clientHeight-k-C:0,$="offsetWidth"in l?l.offsetWidth===0?0:H/l.offsetWidth:0,q="offsetHeight"in l?l.offsetHeight===0?0:N/l.offsetHeight:0;if(O===l)h=c==="start"?d:c==="end"?d-b:c==="nearest"?j(F,F+b,b,k,C,F+d,F+d+y,y):d-b/2,g=f==="start"?u:f==="center"?u-p/2:f==="end"?u-p:j(w,w+p,p,T,B,w+u,w+u+M,M),h=Math.max(0,h+F),g=Math.max(0,g+w);else{h=c==="start"?d-R-k:c==="end"?d-Y+C+x:c==="nearest"?j(R,Y,N,k,C+x,d,d+y,y):d-(R+N/2)+x/2,g=f==="start"?u-_-T:f==="center"?u-(_+H/2)+S/2:f==="end"?u-X+B+S:j(_,X,H,T,B+S,u,u+M,M);const{scrollLeft:Q,scrollTop:U}=l;h=q===0?0:Math.max(0,Math.min(U+h/q,l.scrollHeight-N/q+x)),g=$===0?0:Math.max(0,Math.min(Q+g/$,l.scrollWidth-H/$+S)),d+=U-h,u+=Q-g}P.push({el:l,top:h,left:g})}return P},ue=e=>e===!1?{block:"end",inline:"nearest"}:(o=>o===Object(o)&&Object.keys(o).length!==0)(e)?e:{block:"start",inline:"nearest"};function he(e,o){if(!e.isConnected||!(n=>{let t=n;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const r=(n=>{const t=window.getComputedStyle(n);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((n=>typeof n=="object"&&typeof n.behavior=="function")(o))return o.behavior(oe(e,o));const i=typeof o=="boolean"||o==null?void 0:o.behavior;for(const{el:n,top:t,left:s}of oe(e,ue(o))){const c=t-r.top+r.bottom,f=s-r.left+r.right;n.scroll({top:c,left:f,behavior:i})}}const ge=["parentNode"],me="form_item";function le(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function pe(e,o){if(!e.length)return;const r=e.join("_");return o?`${o}_${r}`:ge.includes(r)?`${me}_${r}`:r}function we(e,o,r,i,n,t){let s=i;
1return t!==void 0?s=t:r.validating?s="validating":e.length?s="error":o.length?s="warning":(r.touched||n&&r.validated)&&(s="success"),s}function ne(e){return le(e).join("_")}function re(e,o){const r=o.getFieldInstance(e),i=ae(r);if(i)return i;const n=pe(le(e),o.__INTERNAL__.name);if(n)return document.getElementById(n)}function Fe(e){const[o]=ce(),r=Z.useRef({}),i=Z.useMemo(()=>e??{...o,__INTERNAL__:{itemRef:n=>t=>{const s=ne(n);t?r.current[s]=t:delete r.current[s]}},scrollToField:(n,t={})=>{const{focus:s,...c}=t,f=re(n,i);f&&(he(f,{scrollMode:"if-needed",block:"nearest",...c}),s&&i.focusField(n))},focusField:n=>{const t=i.getFieldInstance(n);fe(t?.focus)?t.focus():re(n,i)?.focus?.()},getFieldInstance:n=>{const t=ne(n);return r.current[t]}},[e,o]);return[i]}export{le as a,pe as b,we as g,ne as t,Fe as u};
2//# sourceMappingURL=useForm-BBnGxT8u.js.map

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.