1import{a as e,n as t}from"./jsx-runtime-C27Mmbu5.js";import{t as n}from"./react-dom-BGozS2fx.js";import{C as r,P as i,S as a,b as o,d as s,f as c,v as l}from"./button-Ca02OZ3c.js";import{E as u}from"./owner-DomJVQio.js";var d=e(t()),f=e(n()),p=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),m={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},h={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},g={disabled:!1,...h},_={valid(e){return e===null?null:e?{[p.valid]:``}:{[p.invalid]:``}}},v=d.createContext({invalid:void 0,name:void 0,validityData:{state:m,errors:[],error:``,value:``,initialValue:null},setValidityData:c,disabled:void 0,touched:h.touched,setTouched:c,dirty:h.dirty,setDirty:c,filled:h.filled,setFilled:c,focused:h.focused,setFocused:c,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:g,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=s)=>e,getInputValidationProps:(e=s)=>e,inputRef:{current:null},commit:async()=>{}}});function y(e=!0){let t=d.useContext(v);if(t.setValidityData===c&&!e)throw Error(l(28));return t}var b=d.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:c,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function x(){return d.useContext(b)}var S=d.createContext({controlId:void 0,registerControlId:c,labelId:void 0,setLabelId:c,messageIds:[],setMessageIds:c,getDescriptionProps:e=>e});function C(){return d.useContext(S)}function w(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function T({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=d.useRef(e!==void 0),[a,o]=d.useState(t);return[i?e:a,d.useCallback(e=>{i||o(e)},[])]}function E(e={}){let{id:t,implicit:n=!1,controlRef:s}=e,{controlId:l,registerControlId:f}=C(),p=u(t),m=n?l:void 0,h=r(()=>Symbol(`labelable-control`)),g=d.useRef(!1),_=d.useRef(t!=null),v=a(()=>{!g.current||f===c||(g.current=!1,f(h.current,void 0))});return o(()=>{if(f===c)return;let e;if(n){let n=s?.current;e=i(n)&&n.closest(`label`)!=null?t??null:m??p}else if(t!=null)_.current=!0,e=t;else if(_.current)e=p;else{v();return}if(e===void 0){v();return}g.current=!0,f(h.current,e)},[t,s,m,f,n,p,h,v]),d.useEffect(()=>v,[v]),l??p}function D(e){let{enabled:t=!0,value:n,id:r,name:i,controlRef:s,commit:c}=e,{formRef:l}=x(),{invalid:u,markedDirtyRef:d,validityData:p,setValidityData:m}=y(),h=a(e.getValue);o(()=>
1{if(!t)return;let e=n;e===void 0&&(e=h()),p.initialValue===null&&e!==null&&m(t=>({...t,initialValue:e}))},[t,m,n,p.initialValue,h]),o(()=>{!t||!r||l.current.fields.set(r,{getValue:h,name:i,controlRef:s,validityData:w(p,u),validate(e=!0){let t=n;t===void 0&&(t=h()),d.current=!0,e?f.flushSync(()=>c(t)):c(t)}})},[c,s,t,l,h,r,u,d,i,p,n]),o(()=>{let e=l.current.fields;return()=>{r&&e.delete(r)}},[l,r])}export{x as a,C as i,E as n,y as o,T as r,_ as s,D as t};
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.