@necto-react/hooks 2.14.10 → 2.14.11
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/index.global.js +1 -1
- package/package.json +6 -6
package/dist/index.global.js
CHANGED
|
@@ -14,7 +14,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
14
14
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
15
15
|
2. You might be breaking the Rules of Hooks
|
|
16
16
|
3. You might have more than one copy of React in the same app
|
|
17
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var d=F(),f={d:{f:e,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},p=Symbol.for("react.portal"),b=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),ee.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f,ee.createPortal=function(c,a){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)throw Error("Target container is not a DOM element.");return r(c,a,null,g)},ee.flushSync=function(c){var a=b.T,g=f.p;try{if(b.T=null,f.p=2,c)return c()}finally{b.T=a,f.p=g,f.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},ee.preconnect=function(c,a){typeof c=="string"&&c?a!=null&&typeof a!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",i(a)):a!=null&&typeof a.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",s(a.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",s(c)),typeof c=="string"&&(a?(a=a.crossOrigin,a=typeof a=="string"?a==="use-credentials"?a:"":void 0):a=null,f.d.C(c,a))},ee.prefetchDNS=function(c){if(typeof c!="string"||!c)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",s(c));else if(1<arguments.length){var a=arguments[1];typeof a=="object"&&a.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",i(a)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",i(a))}typeof c=="string"&&f.d.D(c)},ee.preinit=function(c,a){if(typeof c=="string"&&c?a==null||typeof a!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",i(a)):a.as!=="style"&&a.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',i(a.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",s(c)),typeof c=="string"&&a&&typeof a.as=="string"){var g=a.as,S=o(g,a.crossOrigin),T=typeof a.integrity=="string"?a.integrity:void 0,v=typeof a.fetchPriority=="string"?a.fetchPriority:void 0;g==="style"?f.d.S(c,typeof a.precedence=="string"?a.precedence:void 0,{crossOrigin:S,integrity:T,fetchPriority:v}):g==="script"&&f.d.X(c,{crossOrigin:S,integrity:T,fetchPriority:v,nonce:typeof a.nonce=="string"?a.nonce:void 0})}},ee.preinitModule=function(c,a){var g="";if(typeof c=="string"&&c||(g+=" The `href` argument encountered was "+s(c)+"."),a!==void 0&&typeof a!="object"?g+=" The `options` argument encountered was "+s(a)+".":a&&"as"in a&&a.as!=="script"&&(g+=" The `as` option encountered was "+i(a.as)+"."),g)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",g);else switch(g=a&&typeof a.as=="string"?a.as:"script",g){case"script":break;default:g=i(g),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',g,c)}typeof c=="string"&&(typeof a=="object"&&a!==null?(a.as==null||a.as==="script")&&(g=o(a.as,a.crossOrigin),f.d.M(c,{crossOrigin:g,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0})):a==null&&f.d.M(c))},ee.preload=function(c,a){var g="";if(typeof c=="string"&&c||(g+=" The `href` argument encountered was "+s(c)+"."),a==null||typeof a!="object"?g+=" The `options` argument encountered was "+s(a)+".":typeof a.as=="string"&&a.as||(g+=" The `as` option encountered was "+s(a.as)+"."),g&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',g),typeof c=="string"&&typeof a=="object"&&a!==null&&typeof a.as=="string"){g=a.as;var S=o(g,a.crossOrigin);f.d.L(c,g,{crossOrigin:S,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,type:typeof a.type=="string"?a.type:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0,referrerPolicy:typeof a.referrerPolicy=="string"?a.referrerPolicy:void 0,imageSrcSet:typeof a.imageSrcSet=="string"?a.imageSrcSet:void 0,imageSizes:typeof a.imageSizes=="string"?a.imageSizes:void 0,media:typeof a.media=="string"?a.media:void 0})}},ee.preloadModule=function(c,a){var g="";typeof c=="string"&&c||(g+=" The `href` argument encountered was "+s(c)+"."),a!==void 0&&typeof a!="object"?g+=" The `options` argument encountered was "+s(a)+".":a&&"as"in a&&typeof a.as!="string"&&(g+=" The `as` option encountered was "+s(a.as)+"."),g&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',g),typeof c=="string"&&(a?(g=o(a.as,a.crossOrigin),f.d.m(c,{as:typeof a.as=="string"&&a.as!=="script"?a.as:void 0,crossOrigin:g,integrity:typeof a.integrity=="string"?a.integrity:void 0})):f.d.m(c))},ee.requestFormReset=function(c){f.d.r(c)},ee.unstable_batchedUpdates=function(c,a){return c(a)},ee.useFormState=function(c,a,g){return l().useFormState(c,a,g)},ee.useFormStatus=function(){return l().useHostTransitionStatus()},ee.version="19.2.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var Zr=Ce((ba,on)=>{"use strict";function Xr(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xr)}catch(e){console.error(e)}}}process.env.NODE_ENV==="production"?(Xr(),on.exports=qr()):on.exports=Qr()});var it=K(F(),1);function Ie(...e){if(e.length===0)return{};if(e.length===1)return typeof e[0]=="object"&&e[0]!==null?e[0]:{};let t={},r={};for(let o of e)if(!(typeof o!="object"||o===null)){for(let s in o)if(Object.hasOwn(o,s)){if(s==="children")continue;let i=o[s];s.startsWith("on")&&typeof i=="function"?(r[s]??=[],r[s].push(i)):t[s]=i}}for(let o in r)Object.hasOwn(r,o)&&r[o].length>0&&(t[o]=(...s)=>{for(let i of r[o])i?.(...s)});for(let o=e.length-1;o>=0;o--){let s=e[o];if(typeof s=="object"&&s!==null&&"children"in s){t.children=s.children;break}}return t}function Do({props:e,ref:t,context:r}){let o=Nt({context:r,slot:e.slot})||{},{ref:s=null,...i}=o,l=(0,it.useRef)(null),d=(0,it.useCallback)(p=>{l.current=p,typeof t=="function"?t(p):t&&(t.current=p),typeof s=="function"?s(p):s&&typeof s=="object"&&(s.current=p)},[t,s]),f=Ie(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&(typeof i.style=="function"||typeof e.style=="function"?f.style=p=>{let b=typeof i.style=="function"?i.style(p):i.style,c={...p.defaultStyle,...b},a=typeof e.style=="function"?e.style({...p,defaultStyle:c}):e.style;return{...c,...a}}:f.style={...i.style,...e.style}),[f,d]}var se=K(F(),1);function Uo(e={}){let{partialVisibility:t=!1,threshold:r=0,rootMargin:o="0px",root:s=null,active:i=!0,once:l=!1,onChange:d}=e,[f,p]=(0,se.useState)(null),[b,c]=(0,se.useState)(!1),[a,g]=(0,se.useState)(null),S=(0,se.useRef)(!1),T=(0,se.useRef)(null),v=Oe(x=>{let C=x[0],B=C.isIntersecting,U={isIntersecting:C.isIntersecting,intersectionRatio:C.intersectionRatio,intersectionRect:C.intersectionRect,boundingClientRect:C.boundingClientRect,rootBounds:C.rootBounds,time:C.time};g(U),c(Y=>l&&S.current?!0:B&&l?(S.current=!0,Y!==!0&&d&&d(!0),!0):Y!==B?(d&&d(B),B):Y)}),k=(0,se.useCallback)(x=>{p(x)},[]);return(0,se.useEffect)(()=>{if(!i||!f)return;let x;return t===!0?x=[0,.1,.25,.5,.75,1]:typeof t=="string"?x=.01:x=r,T.current=new IntersectionObserver(v,{root:s,rootMargin:o,threshold:x}),T.current.observe(f),()=>{T.current&&T.current.disconnect()}},[i,f,s,o,r,t]),[k,b,a]}var yt=K(F(),1);var Fo=Object.defineProperty,ut=(e,t)=>{for(var r in t)Fo(e,r,{get:t[r],enumerable:!0})},xe={};ut(xe,{ARIA_ATTRIBUTES:()=>jn,HTML_TAGS:()=>Wn,PRIMITIVE_TAGS:()=>Bn,default:()=>ko});var jn=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],Bn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wn=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],ko={ARIA_ATTRIBUTES:jn,PRIMITIVE_TAGS:Bn,HTML_TAGS:Wn},No={};ut(No,{NUMERIC_DIGITS:()=>Gn,default:()=>Ko});var Gn=["1","2","3","4","5","6","7","8","9","0"],Ko={NUMERIC_DIGITS:Gn},Ho={};ut(Ho,{AMPERSAND:()=>tr,ASTERISK:()=>rr,BACKSLASH:()=>yr,BOM:()=>Yn,CARRIAGE_RETURN:()=>qn,COLON:()=>ar,COMMA:()=>sr,COMMERCIAL_AT:()=>dr,DOT:()=>ur,DOUBLE_QUOTE:()=>Zn,EXCLAMATION:()=>Xn,GRAVE_ACCENT:()=>gr,GREATER_THAN:()=>lr,LEFT_CURLY_BRACKET:()=>Er,LEFT_SQUARE_BRACKET:()=>pr,LINE_FEED:()=>zn,MINUS:()=>ir,PERCENT:()=>er,PLUS:()=>or,QUESTION:()=>fr,RIGHT_CURLY_BRACKET:()=>hr,RIGHT_SQUARE_BRACKET:()=>mr,SHARP:()=>Jn,SINGLE_QUOTE:()=>nr,SMALLER_THAN:()=>cr,SPACE:()=>Qn,TAB:()=>$n,VERTICAL_LINE:()=>vr,default:()=>Vo});var Yn=65279,$n=9,zn=10,qn=13,Qn=32,Xn=33,Zn=34,Jn=35,er=37,tr=38,nr=39,rr=42,or=43,sr=44,ir=45,ur=46,ar=58,cr=60,lr=62,fr=63,dr=64,pr=91,yr=92,mr=93,gr=96,Er=123,vr=124,hr=125,Vo={BOM:Yn,TAB:$n,LINE_FEED:zn,CARRIAGE_RETURN:qn,SPACE:Qn,EXCLAMATION:Xn,DOUBLE_QUOTE:Zn,SHARP:Jn,PERCENT:er,AMPERSAND:tr,SINGLE_QUOTE:nr,ASTERISK:rr,PLUS:or,COMMA:sr,MINUS:ir,DOT:ur,COLON:ar,SMALLER_THAN:cr,GREATER_THAN:lr,QUESTION:fr,COMMERCIAL_AT:dr,LEFT_SQUARE_BRACKET:pr,BACKSLASH:yr,RIGHT_SQUARE_BRACKET:mr,GRAVE_ACCENT:gr,LEFT_CURLY_BRACKET:Er,VERTICAL_LINE:vr,RIGHT_CURLY_BRACKET:hr},jo={};ut(jo,{CAPITALIZED:()=>Tr,LOWERCASE:()=>br,VOWELS:()=>Rr,default:()=>Bo});var Tr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],br=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],Rr=["A","E","I","O","U","a","e","i","o","u"],Bo={CAPITALIZED:Tr,LOWERCASE:br,VOWELS:Rr};function Wo(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):!1}var at=()=>Wo(/^Mac/i);function Sr(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):!1}var Go=()=>Sr(/^iPhone/i),Yo=()=>Sr(/^iPad/i)||at()&&navigator.maxTouchPoints>1,Kt=()=>Go()||Yo();function ct(e){return at()?e.metaKey??!1:e.ctrlKey??!1}function q(e){return e?.ownerDocument??document}function ye(e){return e&&"window"in e&&e.window===e?e:q(e).defaultView||window}var lt=null;function $o(){if(lt==null){lt=!1;try{document.createElement("div").focus({get preventScroll(){return lt=!0,!0}})}catch{}}return lt}function _r(e,t,r){let{block:o="nearest",inline:s="nearest"}=r??{},i=e.getBoundingClientRect(),l=t.getBoundingClientRect(),d=l.top<i.top,f=l.bottom>i.bottom,p=l.left<i.left,b=l.right>i.right;if(d||f){let c=e.scrollTop;if(o==="start"||o==="nearest"&&d)c=e.scrollTop+(l.top-i.top);else if(o==="end"||o==="nearest"&&f)c=e.scrollTop+(l.bottom-i.bottom);else if(o==="center"){let a=i.top+i.height/2,g=l.top+l.height/2;c=e.scrollTop+(g-a)}e.scrollTop=c}if(p||b){let c=e.scrollLeft;if(s==="start"||s==="nearest"&&p)c=e.scrollLeft+(l.left-i.left);else if(s==="end"||s==="nearest"&&b)c=e.scrollLeft+(l.right-i.right);else if(s==="center"){let a=i.left+i.width/2,g=l.left+l.width/2;c=e.scrollLeft+(g-a)}e.scrollLeft=c}}function zo(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function ft(e,t,r=!0){if(!e||!t)return!1;if(!r)return e.contains(t);let o=t;for(;o;){if(o===e)return!0;o=o instanceof Element&&o.tagName==="SLOT"&&o.assignedSlot?o.assignedSlot.parentNode:zo(o)?o.host:o.parentNode}return!1}var me=(e,t=!0)=>{if(e||(e=typeof document<"u"?document:void 0),!e)return null;if(!t)return e.activeElement;let r=e.activeElement;for(;r&&"shadowRoot"in r&&r.shadowRoot?.activeElement;)r=r.shadowRoot.activeElement;return r};function dt(e,t=!0){return t&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Be(e){if($o())e.focus({preventScroll:!0});else{let t=qo(e);e.focus();for(let{element:r,scrollTop:o,scrollLeft:s}of t)r.scrollTop=o,r.scrollLeft=s}}function qo(e){let t=e.parentNode,r=Array.from({length:0}),o=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==o;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return o instanceof HTMLElement&&r.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),r}var wr="necto-style",Or=new WeakMap;function Qo(e){let t=Or.get(e);return t||(t=new Map,Or.set(e,t)),t}function Xo(e,t={}){let{id:r=wr,insertionPoint:o}=t,s=o?q(o):document,i=s.createElement("style");return i.setAttribute("type","text/css"),i.setAttribute("necto-style-id",r),i.textContent=e,o?s.head.insertBefore(i,o):s.head.appendChild(i),i}function Ar(e,t={}){let{id:r=wr,window:o=typeof window<"u"?window:null,insertionPoint:s}=t;if(!o||!e)return()=>{};let i=Qo(o),l=`${r}:${e}`,d=i.get(l);return d?d.element&&(d.element.textContent=e,d.count++):(d={element:Xo(e,{id:r,insertionPoint:s}),count:1},i.set(l,d)),()=>{let f=i.get(l);f?.element&&(f.count--,f.count<1&&(f.element.remove(),f.element=null,i.delete(l)))}}var pe=new Map,Vt=new Set;function Zo(e){if(!("propertyName"in e)||!e.target)return;let t=pe.get(e.target);t||(t=new Set,pe.set(e.target,t),e.target.addEventListener("transitioncancel",Wt,{once:!0})),t.add(e.propertyName)}function Wt(e){if(!("propertyName"in e)||!e.target)return;let t=pe.get(e.target);if(t&&(t.delete(e.propertyName),t.size===0&&(e.target.removeEventListener("transitioncancel",Wt),pe.delete(e.target)),pe.size===0)){for(let r of Vt)r();Vt.clear()}}if(typeof window<"u"&&typeof document<"u"){let e=()=>{let t=document.body;t&&(t.addEventListener("transitionrun",Zo),t.addEventListener("transitionend",Wt))};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e,{once:!0})}function Gt(e){requestAnimationFrame(()=>{for(let[t]of pe)"isConnected"in t&&!t.isConnected&&pe.delete(t);pe.size===0?e():Vt.add(e)})}var le,Ht=()=>xe.HTML_TAGS.reduce((e,t)=>{var r;return e[r=t,r.charAt(0).toUpperCase()+r.slice(1)]=t,e},{}),si=new Proxy({},{get:(e,t,r)=>(le||(le=Ht()),Reflect.get(le,t,r)),ownKeys:()=>(le||(le=Ht()),Reflect.ownKeys(le)),getOwnPropertyDescriptor:(e,t)=>(le||(le=Ht()),Object.getOwnPropertyDescriptor(le,t))}),jt="",De="default",He=new WeakMap;function pt(e){if(Kt()){if(De==="default"){let t=q(e);t?.documentElement?.style.webkitUserSelect!==void 0&&(jt=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none",De="disabled")}}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=e.style,r="userSelect"in t?"userSelect":"webkitUserSelect";He.has(e)||(He.set(e,t[r]??""),t[r]="none")}}function ge(e){if(Kt()){if(De!=="disabled")return;De="restoring",setTimeout(()=>{Gt(()=>{if(De==="restoring"){let t=q(e);t?.documentElement?.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=jt||""),jt="",De="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&He.has(e)){let t=He.get(e)??"",r=e.style,o="userSelect"in r?"userSelect":"webkitUserSelect";r[o]==="none"&&(r[o]=t),e.getAttribute("style")?.trim()===""&&e.removeAttribute("style"),He.delete(e)}}var Ve,Bt,Lr,je=()=>{Ve||(Ve=xe.ARIA_ATTRIBUTES.reduce((e,t)=>(e[(r=>{let o=r.replace("aria-","");return o.charAt(0).toUpperCase()+o.slice(1)})(t)]=t,e),{}),Bt=xe.ARIA_ATTRIBUTES,Lr=new Set(Bt))},W=new Proxy({},{get:(e,t,r)=>(je(),Reflect.get(Ve,t,r)),ownKeys:()=>(je(),Reflect.ownKeys(Ve)),getOwnPropertyDescriptor:(e,t)=>(je(),Object.getOwnPropertyDescriptor(Ve,t))}),ai=new Proxy([],{get:(e,t,r)=>(je(),Reflect.get(Bt,t,r))}),ci=new Proxy(new Set,{get:(e,t,r)=>(je(),Reflect.get(Lr,t,r))});function We(e={}){let{isDisabled:t,onFocus:r,onBlur:o,onFocusChange:s}=e,i=(0,yt.useCallback)((p,b)=>{p?(r?.(b),s?.(!0)):(o?.(b),s?.(!1))},[r,o,s]),l=(0,yt.useCallback)(p=>{p.target===p.currentTarget&&i(!1,p)},[i]),d=Ge({onBlur:l}),f=(0,yt.useCallback)(p=>{let b=q(p.target),c=b?me(b):me();p.target===p.currentTarget&&c===dt(p.nativeEvent)&&(i(!0,p),d(p))},[i,d]);return{focusProps:{...t?{}:{onFocus:f,onBlur:l}}}}var mt=K(F(),1);function Jo(e,t){let{autoFocus:r,isDisabled:o,excludeFromTabOrder:s}=e,{focusProps:i}=We(e),{keyboardProps:l}=Yt(e),d=(0,mt.useRef)(r),f=q(t.current),p=me(f);(0,mt.useEffect)(()=>{if(d.current&&t.current)if(Ye()==="virtual"){let c=p;Gt(()=>{me(f)===c&&t.current?.isConnected&&Be(t.current)})}else Be(t.current);d.current=!1},[t]);let b=s?-1:0;return o&&(b=void 0),{focusableProps:Ie(i??{},l,{tabIndex:b})}}var Ee=K(F(),1);var es=null;function ts(e={}){let{within:t=!1,isTextInput:r=!1,autoFocus:o=!1}=e,s=(0,Ee.useRef)({isFocused:o,isFocusVisible:o||es!=="pointer"}),[i,l]=(0,Ee.useState)(o),[d,f]=(0,Ee.useState)(()=>s.current.isFocused&&s.current.isFocusVisible),p=(0,Ee.useCallback)(()=>{f(s.current.isFocused&&s.current.isFocusVisible)},[]),b=(0,Ee.useCallback)(g=>{s.current.isFocused=g,l(g),p()},[p]);$e({fn:g=>{s.current.isFocusVisible=g,p()},deps:[],opts:{isTextInput:r}});let{focusProps:c={}}=We({isDisabled:t,onFocusChange:b})||{},{focusWithinProps:a={}}=$t({isDisabled:!t,onFocusWithinChange:b})||{};return{isFocused:i,isFocusVisible:d,focusProps:t?a:c}}var Cr=K(F(),1);function ns(e={}){let{isTextInput:t,autoFocus:r}=e,[o,s]=(0,Cr.useState)(r||Ye()!=="pointer");return $e({fn:i=>s(i),deps:[t],opts:{isTextInput:t}}),{isFocusVisible:o}}var Ue=new Map,gt=new Set,Pr=!1,zt=null,Mr=!1,Q={get hasEventBeforeFocus(){return Pr},set hasEventBeforeFocus(e){Pr=e},get hasBlurredWindowRecently(){return Mr},set hasBlurredWindowRecently(e){Mr=e},get currentModality(){return zt},set currentModality(e){zt=e}};function Ye(){return zt}var vs={},Et=Object.create(null),ze=e=>globalThis.process?.env||vs.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Et:globalThis),ve=new Proxy(Et,{get(e,t){return ze()[t]??Et[t]},has(e,t){let r=ze();return t in r||t in Et},set(e,t,r){let o=ze(!0);return o[t]=r,!0},deleteProperty(e,t){if(!t)return!1;let r=ze(!0);return delete r[t],!0},ownKeys(){let e=ze(!0);return Object.keys(e)}}),xr=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",rs=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function os(){if(globalThis.process?.env)for(let e of rs){let t=e[1]||e[0];if(globalThis.process?.env[t])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var Dr=os(),xi=Dr.name;function _e(e){return e?e!=="false":!1}var qt=globalThis.process?.platform||"",Ur=_e(ve.CI)||Dr.ci!==!1,Fr=_e(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);var Di=_e(ve.DEBUG),we=xr==="test"||_e(ve.TEST),kr=xr==="production";var Ui=_e(ve.MINIMAL)||Ur||we||!Fr,ss=/^win/i.test(qt),Fi=/^linux/i.test(qt),Nr=/^darwin/i.test(qt),ki=!_e(ve.NO_COLOR)&&(_e(ve.FORCE_COLOR)||(Fr||ss)&&ve.TERM!=="dumb"||Ur),is=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null,Ni=Number(is?.split(".")[0])||null,us=globalThis.process||Object.create(null),Ir={versions:{}},Ki=new Proxy(us,{get(e,t){if(t==="env")return ve;if(t in e)return e[t];if(t in Ir)return Ir[t]}}),as=globalThis.process?.release?.name==="node",cs=!!globalThis.Bun||!!globalThis.process?.versions?.bun,ls=!!globalThis.Deno,fs=!!globalThis.fastly,ds=!!globalThis.Netlify,ps=!!globalThis.EdgeRuntime,ys=globalThis.navigator?.userAgent==="Cloudflare-Workers",ms=[[ds,"netlify"],[ps,"edge-light"],[ys,"workerd"],[fs,"fastly"],[ls,"deno"],[cs,"bun"],[as,"node"]];function gs(){let e=ms.find(t=>t[0]);if(e)return{name:e[1]}}var Es=gs(),Hi=Es?.name||"";var Hr=K(F(),1);function Qt(e){if(!e)return;let t=!0;return r=>{let o={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t&&kr?console.error("stopPropagation is now the default behavior for events in Necto. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(o),t&&r.stopPropagation()}}function vt(e){let t=e;return Object.assign(t,{nativeEvent:e,isDefaultPrevented:()=>t.defaultPrevented,isPropagationStopped:()=>t.cancelBubble,persist:()=>{}}),t}var hs=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),Ts={Tab:!0,Escape:!0};function Kr(e,t,r){if(!r||!("target"in r)||!r.target)return!1;let o=q(r.target),s=ye(r.target),i=typeof window<"u"?s.HTMLInputElement:HTMLInputElement,l=typeof window<"u"?s.HTMLTextAreaElement:HTMLTextAreaElement,d=typeof window<"u"?s.HTMLElement:HTMLElement,f=typeof window<"u"?s.KeyboardEvent:KeyboardEvent,p=o.activeElement;return e=e||p instanceof i&&!hs.has(p.type)||p instanceof l||p instanceof d&&p.isContentEditable,!(e&&t==="keyboard"&&r instanceof f&&!Ts[r.key])}function Zt(e,t){gt.forEach(r=>r(e,t))}function bs(e){return!(e.metaKey||Nr&&e.altKey||e.ctrlKey||["Control","Shift","Meta"].includes(e.key))}function Vr(e){bs(e)&&(Q.hasEventBeforeFocus=!0,Q.currentModality="keyboard",Zt("keyboard",e))}function Xt(e){["mousedown","pointerdown"].includes(e.type)&&(Q.hasEventBeforeFocus=!0,Q.currentModality="pointer",Zt("pointer",e))}function jr(e){[window,document].includes(e.target)||!e.isTrusted||!Q.hasEventBeforeFocus&&!Q.hasBlurredWindowRecently||(!Q.hasEventBeforeFocus&&!Q.hasBlurredWindowRecently&&(Q.currentModality="virtual",Zt("virtual",e)),Q.hasEventBeforeFocus=!1,Q.hasBlurredWindowRecently=!1)}function Br(){Q.hasEventBeforeFocus=!1,Q.hasBlurredWindowRecently=!0}function Rs(e){let t=ye(e),r=q(e);if(typeof window>"u"||typeof document>"u"||Ue.has(t))return;let o=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(...s){Q.hasEventBeforeFocus=!0,o.apply(this,s)},r.addEventListener("keydown",Vr,!0),r.addEventListener("click",Xt,!0),t.addEventListener("focus",jr,!0),t.addEventListener("blur",Br,!1),typeof PointerEvent<"u"&&r.addEventListener("pointerdown",Xt,!0),Ue.set(t,{focus:o})}function Ss(e){let t=ye(e),r=q(e);if(!Ue.has(t))return;let{focus:o}=Ue.get(t);t.HTMLElement.prototype.focus=o,r.removeEventListener("keydown",Vr,!0),r.removeEventListener("click",Xt,!0),t.removeEventListener("focus",jr,!0),t.removeEventListener("blur",Br,!1),Ue.delete(t)}function $e(e){let{fn:t,deps:r,opts:o}=e;typeof window>"u"||typeof document>"u"||(Rs(),(0,Hr.useEffect)(()=>{let s=(i,l)=>{Kr(!!o?.isTextInput,i,l)&&t(Q.currentModality!=="pointer")};return gt.add(s),()=>{gt.delete(s),Ss()}},r))}var qe=K(F(),1);function $t(e){let{isDisabled:t,onFocusWithin:r,onBlurWithin:o,onFocusWithinChange:s}=e,i=(0,qe.useRef)({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:d}=Qe(),f=(0,qe.useCallback)(c=>{c.currentTarget.contains(c.target)&&i.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(i.current.isFocusWithin=!1,d(),o&&o(c),s&&s(!1))},[o,s,d]),p=Ge({onBlur:f}),b=(0,qe.useCallback)(c=>{if(!c.currentTarget.contains(c.target))return;let a=q(c.target),g=me(a);if(!i.current.isFocusWithin&&g===dt(c.nativeEvent)){r&&r(c),s&&s(!0),i.current.isFocusWithin=!0,p(c);let S=c.currentTarget;l(a,"focus",T=>{if(i.current.isFocusWithin&&!ft(S,T.target)&&a.defaultView&&typeof a.defaultView.FocusEvent=="function"){let v=new a.defaultView.FocusEvent("blur",{relatedTarget:T.target});Object.defineProperty(v,"target",{value:S}),Object.defineProperty(v,"currentTarget",{value:S});let k=vt(v);f(k)}},{capture:!0})}},[r,s,p,l,f]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:b,onBlur:f}}}var he=K(F(),1);function Qe(){let e=(0,he.useRef)(new Map),t=(0,he.useCallback)((s,i,l,d)=>{let f=typeof d=="object"&&d?.once?(...p)=>{e.current.delete(l),l(...p)}:l;e.current.set(l,{type:i,eventTarget:s,options:d}),s.addEventListener(i,f,d)},[]),r=(0,he.useCallback)((s,i,l,d)=>{let f=e.current.get(l),p=f?.options?.once?f.fn:l;s.removeEventListener(i,p,d),e.current.delete(l)},[]),o=(0,he.useCallback)(()=>{e.current.forEach((s,i)=>{s.eventTarget.removeEventListener(s.type,i,s.options)}),e.current.clear()},[]);return(0,he.useEffect)(()=>()=>o(),[o]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:o}}var te=K(F(),1);function Os(e={}){let{onHoverStart:t,onHoverChange:r,onHoverEnd:o,isDisabled:s}=e,[i,l]=(0,te.useState)(!1),d=(0,te.useRef)({hoverCount:0,ignoreEmulated:!1}),f=(0,te.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current,{addGlobalListener:p,removeAllGlobalListeners:b}=Qe(),c=(0,te.useCallback)(()=>{d.current.ignoreEmulated=!0,setTimeout(()=>{d.current.ignoreEmulated=!1},50)},[]);(0,te.useEffect)(()=>{let T=k=>{k.pointerType==="touch"&&c()};if(typeof document>"u")return;let v=d.current;return v.hoverCount++,typeof PointerEvent<"u"?document.addEventListener("pointerup",T):we&&document.addEventListener("touchend",c),()=>{v.hoverCount--,v.hoverCount===0&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",T):we&&document.removeEventListener("touchend",c))}},[c]);let a=(0,te.useCallback)((T,v)=>{s||v==="touch"||f.isHovered||!(T.currentTarget&&T.currentTarget.contains(T.target))||(f.isHovered=!0,f.pointerType=v,f.target=T.currentTarget,p(q(T.target instanceof Element?T.target:null),"pointerover",k=>{f.isHovered&&f.target&&!ft(f.target,k.target)&&g(k,k.pointerType)},{capture:!0}),t?.({type:"hoverstart",target:T.currentTarget,pointerType:v}),r?.(!0),l(!0))},[s,t,r,p,f]),g=(0,te.useCallback)((T,v)=>{v==="touch"||!f.isHovered||!f.target||(f.isHovered=!1,f.pointerType="",f.target=null,b(),o?.({type:"hoverend",target:T.currentTarget,pointerType:v}),r?.(!1),l(!1))},[o,r,b,f.target,f]),S=(0,te.useMemo)(()=>{let T={};return typeof PointerEvent<"u"?(T.onPointerEnter=v=>{d.current.ignoreEmulated&&v.pointerType==="mouse"||a(v,v.pointerType)},T.onPointerLeave=v=>{!s&&v.currentTarget instanceof Element&&v.currentTarget.contains(v.target)&&g(v,v.pointerType)}):we&&(T.onTouchStart=()=>{f.ignoreEmulatedMouseEvents=!0},T.onMouseEnter=v=>{!f.ignoreEmulatedMouseEvents&&!d.current.ignoreEmulated&&a(v.nativeEvent,"mouse"),f.ignoreEmulatedMouseEvents=!1},T.onMouseLeave=v=>{!s&&v.currentTarget.contains(v.target)&&g(v.nativeEvent,"mouse")}),T},[s,a,g,f]);return(0,te.useEffect)(()=>{s&&f.isHovered&&g({currentTarget:f.target},f.pointerType)},[s,g,f.isHovered,f.pointerType,f.target]),{hoverProps:S,isHovered:i}}var Jt={prefix:String(Math.round(Math.random()*1e10)),current:0},Xe=new Map,Ze=typeof FinalizationRegistry<"u"?new FinalizationRegistry(e=>{Xe.delete(e)}):null;var oe=K(F(),1);function _s(e={}){let{prefix:t="necto",defaultId:r}=e,[o,s]=(0,oe.useState)(()=>r),i=(0,oe.useRef)(null),l=(0,oe.useRef)({}),d=(()=>{if(r)return r;let f=typeof oe.default.useId=="function"?(0,oe.useId)():String(++Jt.current);return`${we?t:`${t}${Jt.prefix}`}-${f}`})();return(0,oe.useEffect)(()=>{if(typeof window<"u"&&window.document?.createElement){let f=Xe.get(d)||[],p={current:i.current};f.some(b=>b===p)||Xe.set(d,[...f,p])}return Ze&&Ze.register(l.current,d),()=>{Ze&&Ze.unregister(l.current),Xe.delete(d)}},[d]),(0,oe.useEffect)(()=>{let f=i.current;f&&(s(f),i.current=null)},[]),d}function Yt(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:e.onKeyDown?Qt(t=>e.onKeyDown?.(t.nativeEvent)):void 0,onKeyUp:e.onKeyUp?Qt(t=>e.onKeyUp?.(t.nativeEvent)):void 0}}}var Te=K(F(),1);function en(e={}){let{type:t="function"}=e,r=(0,Te.useRef)(!1),[o,s]=(0,Te.useState)(!1),i=(0,Te.useCallback)(()=>r.current,[]);return(0,Te.useEffect)(()=>(r.current=!0,s(!0),()=>{r.current=!1,s(!1)}),[]),t==="ref"?r:t==="boolean"?o:i}var V=K(F(),1);function X(e,t,r){return{type:e,pointerType:t,target:r.currentTarget??r.target,shiftKey:r.shiftKey,ctrlKey:r.ctrlKey,metaKey:r.metaKey,altKey:r.altKey}}function ws(e={}){let{isDisabled:t,preventFocusOnPress:r,allowTextSelectionOnPress:o,ref:s,onPress:i,onPressStart:l,onPressEnd:d,onPressChange:f,onPressUp:p,onClick:b}=e,[c,a]=(0,V.useState)(!1),g=(0,V.useRef)(!1),S=(0,V.useRef)(null),T=(0,V.useRef)(!1),v=(0,V.useCallback)(E=>{c!==E&&(a(E),f?.(E))},[c,f]),k=(0,V.useCallback)(E=>{if(!T.current)return;let m=S.current&&S.current instanceof Node&&E.target instanceof Node&&S.current.contains(E.target);if(T.current=!1,v(!1),!o&&S.current instanceof HTMLElement&&ge(S.current),E.target){let D={...X("pressend","mouse",E),target:E.target};d?.(D),p?.(D),m&&i?.(D)}},[d,p,i,v,o]),x=(0,V.useCallback)(E=>{if(t||E.button!==0||g.current)return;r&&E.preventDefault(),o||pt(E.currentTarget),T.current=!0,S.current=E.currentTarget,v(!0);let m=X("pressstart","mouse",E);l?.(m),window.addEventListener("mouseup",k,{once:!0})},[t,r,o,l,v,k]),C=(0,V.useCallback)(E=>{if(t||E.button!==0||!T.current)return;T.current=!1,v(!1),!o&&E.currentTarget instanceof HTMLElement&&ge(E.currentTarget);let m=X("pressend","mouse",E);d?.(m),p?.(m),E.currentTarget instanceof Node&&E.currentTarget.contains(E.target)&&i?.(X("press","mouse",E))},[t,i,d,p,v,o]),B=(0,V.useCallback)(E=>{c&&(v(!1),d?.(X("pressend","mouse",E)),!o&&E.currentTarget instanceof HTMLElement&&ge(E.currentTarget))},[c,v,d,o]),U=(0,V.useCallback)(E=>{T.current&&!c&&(v(!0),l?.(X("pressstart","mouse",E)))},[c,l,v]),Y=(0,V.useCallback)(E=>{if(!T.current)return;T.current=!1,v(!1),!o&&S.current instanceof HTMLElement&&ge(S.current);let m={...X("pressend","touch",E),target:E.target};d?.(m),p?.(m)},[d,p,v,o]),j=(0,V.useCallback)(E=>{if(!T.current)return;T.current=!1,v(!1),!o&&S.current instanceof HTMLElement&&ge(S.current);let m={...X("pressend","touch",E),target:E.target};d?.(m)},[d,v,o]),G=(0,V.useCallback)(E=>{t||(o||pt(E.currentTarget),g.current=!0,setTimeout(()=>{g.current=!1},100),T.current=!0,S.current=E.currentTarget,v(!0),l?.(X("pressstart","touch",E)),window.addEventListener("touchend",Y,{once:!0}),window.addEventListener("touchcancel",j,{once:!0}))},[t,l,v,o,Y,j]),fe=(0,V.useCallback)(E=>{if(t||!T.current)return;T.current=!1,v(!1),!o&&E.currentTarget instanceof HTMLElement&&ge(E.currentTarget);let m=X("pressend","touch",E);d?.(m),p?.(m),E.currentTarget instanceof Node&&E.currentTarget.contains(E.target)&&i?.(X("press","touch",E))},[t,i,d,p,v,o]),A=(0,V.useCallback)(E=>{if(t)return;(E.key==="Enter"||E.key===" ")&&!c&&(E.key===" "&&E.preventDefault(),o||pt(),v(!0),T.current=!0,l?.(X("pressstart","keyboard",E)))},[t,c,l,v,o]),Se=(0,V.useCallback)(E=>{if(t)return;if((E.key==="Enter"||E.key===" ")&&c){v(!1),T.current=!1,o||ge();let D=X("pressend","keyboard",E);d?.(D),p?.(X("pressup","keyboard",E)),i?.(X("press","keyboard",E))}},[t,c,i,d,p,v,o]),ue=(0,V.useCallback)(E=>{if(t){E.preventDefault();return}g.current||b?.(E)},[t,b]);(0,V.useEffect)(()=>()=>{window.removeEventListener("mouseup",k),window.removeEventListener("touchend",Y),window.removeEventListener("touchcancel",j)},[k,Y,j]);let ae=(0,V.useMemo)(()=>({onMouseDown:x,onMouseUp:C,onMouseLeave:B,onMouseEnter:U,onTouchStart:G,onTouchEnd:fe,onKeyDown:A,onKeyUp:Se,onClick:ue}),[x,C,B,U,G,fe,A,Se,ue]);return(0,V.useEffect)(()=>{let E=s?.current;E&&E instanceof ye(E).Element&&ye(E).getComputedStyle(E).touchAction==="auto"&&(E.style.touchAction="pan-x pan-y pinch-zoom")},[s]),{pressProps:ae,isPressed:c}}var Wr=K(F(),1);function As(e){let{style:t,values:r,children:o,className:s,defaultStyle:i,defaultChildren:l,defaultClassName:d="necto"}=e;return(0,Wr.useMemo)(()=>{let f=typeof s=="function"?s({...r,defaultClassName:d}):s?`${d} ${s}`:d,p=typeof t=="function"?t({...r,defaultStyle:i||{}}):{...i,...t},b=typeof o=="function"?o({...r,defaultChildren:l}):o??l;return{className:f,style:p,children:b}},[s,t,o,d,l,i,r])}var Gr=K(F(),1);function Nt(e){let{context:t,slot:r}=e,o=(0,Gr.useContext)(t);if(r===null)return null;if(o&&typeof o=="object"&&"slots"in o&&o.slots){let s=r||Symbol("default");if(!o.slots[s]){let i=new Intl.ListFormat().format(Object.keys(o.slots).map(d=>`"${d}"`)),l=r?`Invalid slot name: "${r}". This slot is not recognized. Please refer to the component's documentation for valid slot names.`:"A slot prop is required. You must provide a valid slot name to render content in this area.";throw new Error(`${l} Valid slot names are ${i}.`)}return o.slots[s]}return o}var Fe=K(F(),1);function Ge(e){let{onBlur:t}=e,r=(0,Fe.useRef)({isFocused:!1,observer:null});(0,Fe.useLayoutEffect)(()=>{let s=r.current;return()=>{s.observer&&(s.observer.disconnect(),s.observer=null)}},[]);let o=Oe(s=>{t?.(s)});return(0,Fe.useCallback)(s=>{if(s.target instanceof HTMLButtonElement||s.target instanceof HTMLInputElement||s.target instanceof HTMLTextAreaElement||s.target instanceof HTMLSelectElement){r.current.isFocused=!0;let i=s.target,l=d=>{if(r.current.isFocused=!1,i.disabled){let f=vt(d);o(f)}r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};i.addEventListener("focusout",l,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&i.disabled){r.current.observer?.disconnect();let d=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:d})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:d}))}}),r.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[o])}var be=K(F(),1);function Oe(e){let t=(0,be.useRef)(e);return(typeof window<"u"?be.useLayoutEffect:be.useEffect)(()=>{t.current=e},[e]),(0,be.useCallback)(((...r)=>t.current(...r)),[])}var ht=K(F(),1);function Yu(e){let t=en(),[r,o]=(0,ht.useState)(!1);return(0,ht.useEffect)(()=>{t()&&o(!!e())},[e,t]),r}var Ae=K(F(),1);function Ls(e={}){let{autoLock:t=!1,target:r,widthReflow:o=!0}=e,[s,i]=(0,Ae.useState)(!1),l=(0,Ae.useRef)(null),d=(0,Ae.useRef)(null),f=Oe(()=>{if(typeof window>"u"||!l.current)return;let{overflow:b,paddingRight:c}=l.current.style;if(d.current={overflow:b,paddingRight:c},o){let a=l.current===document.body?window.innerWidth:l.current.offsetWidth,g=parseInt(window.getComputedStyle(l.current).paddingRight,10)||0,S=a-l.current.scrollWidth;l.current.style.paddingRight=`${S+g}px`}l.current.style.overflow="hidden",i(!0)}),p=Oe(()=>{l.current&&d.current&&(l.current.style.overflow=d.current.overflow,o&&(l.current.style.paddingRight=d.current.paddingRight)),i(!1)});return(0,Ae.useEffect)(()=>{if(!(typeof window>"u"||typeof document>"u"))return r&&(l.current=typeof r=="string"?document.querySelector(r):r),l.current||(l.current=document.body),t&&f(),()=>{p()}},[t,r,o,f,p]),{isLocked:s,lock:f,unlock:p}}var Yr=K(F(),1);function Cs(e={}){let{isInvalid:t,isDisabled:r,isReadOnly:o,isRequired:s,isBusy:i,isPressed:l,isExpanded:d,isSelected:f,isChecked:p,isHidden:b,hasPopup:c,valueCurrent:a,valueMin:g,valueMax:S,valueText:T,label:v,labelledBy:k,describedBy:x,controls:C,owns:B}=e;return(0,Yr.useMemo)(()=>{let U={},Y=[{value:t,attr:W.Invalid},{value:r,attr:W.Disabled},{value:o,attr:W.Readonly},{value:s,attr:W.Required},{value:i,attr:W.Busy},{value:d,attr:W.Expanded},{value:f,attr:W.Selected},{value:b,attr:W.Hidden}];for(let{value:j,attr:G}of Y)j!==void 0&&(U[G]=j||void 0);return l!==void 0&&(U[W.Pressed]=l===!1?void 0:l),p!==void 0&&(U[W.Checked]=p===!1?void 0:p),c!==void 0&&(U[W.Haspopup]=c===!1?void 0:c),a!==void 0&&(U[W.Valuenow]=a),g!==void 0&&(U[W.Valuemin]=g),S!==void 0&&(U[W.Valuemax]=S),T!==void 0&&(U[W.Valuetext]=T),v!==void 0&&(U[W.Label]=v),k!==void 0&&(U[W.Labelledby]=k),x!==void 0&&(U[W.Describedby]=x),C!==void 0&&(U[W.Controls]=C),B!==void 0&&(U[W.Owns]=B),U},[t,r,o,s,i,l,d,f,p,b,c,a,g,S,T,v,k,x,C,B])}function Ps({id:e,css:t,insertionPoint:r,enabled:o=!0,window:s=typeof window<"u"?window:null}){let i=Array.isArray(t)?t.join(`
|
|
17
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var d=F(),f={d:{f:e,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},p=Symbol.for("react.portal"),b=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),ee.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f,ee.createPortal=function(c,a){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)throw Error("Target container is not a DOM element.");return r(c,a,null,g)},ee.flushSync=function(c){var a=b.T,g=f.p;try{if(b.T=null,f.p=2,c)return c()}finally{b.T=a,f.p=g,f.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},ee.preconnect=function(c,a){typeof c=="string"&&c?a!=null&&typeof a!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",i(a)):a!=null&&typeof a.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",s(a.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",s(c)),typeof c=="string"&&(a?(a=a.crossOrigin,a=typeof a=="string"?a==="use-credentials"?a:"":void 0):a=null,f.d.C(c,a))},ee.prefetchDNS=function(c){if(typeof c!="string"||!c)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",s(c));else if(1<arguments.length){var a=arguments[1];typeof a=="object"&&a.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",i(a)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",i(a))}typeof c=="string"&&f.d.D(c)},ee.preinit=function(c,a){if(typeof c=="string"&&c?a==null||typeof a!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",i(a)):a.as!=="style"&&a.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',i(a.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",s(c)),typeof c=="string"&&a&&typeof a.as=="string"){var g=a.as,S=o(g,a.crossOrigin),T=typeof a.integrity=="string"?a.integrity:void 0,v=typeof a.fetchPriority=="string"?a.fetchPriority:void 0;g==="style"?f.d.S(c,typeof a.precedence=="string"?a.precedence:void 0,{crossOrigin:S,integrity:T,fetchPriority:v}):g==="script"&&f.d.X(c,{crossOrigin:S,integrity:T,fetchPriority:v,nonce:typeof a.nonce=="string"?a.nonce:void 0})}},ee.preinitModule=function(c,a){var g="";if(typeof c=="string"&&c||(g+=" The `href` argument encountered was "+s(c)+"."),a!==void 0&&typeof a!="object"?g+=" The `options` argument encountered was "+s(a)+".":a&&"as"in a&&a.as!=="script"&&(g+=" The `as` option encountered was "+i(a.as)+"."),g)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",g);else switch(g=a&&typeof a.as=="string"?a.as:"script",g){case"script":break;default:g=i(g),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',g,c)}typeof c=="string"&&(typeof a=="object"&&a!==null?(a.as==null||a.as==="script")&&(g=o(a.as,a.crossOrigin),f.d.M(c,{crossOrigin:g,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0})):a==null&&f.d.M(c))},ee.preload=function(c,a){var g="";if(typeof c=="string"&&c||(g+=" The `href` argument encountered was "+s(c)+"."),a==null||typeof a!="object"?g+=" The `options` argument encountered was "+s(a)+".":typeof a.as=="string"&&a.as||(g+=" The `as` option encountered was "+s(a.as)+"."),g&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',g),typeof c=="string"&&typeof a=="object"&&a!==null&&typeof a.as=="string"){g=a.as;var S=o(g,a.crossOrigin);f.d.L(c,g,{crossOrigin:S,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,type:typeof a.type=="string"?a.type:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0,referrerPolicy:typeof a.referrerPolicy=="string"?a.referrerPolicy:void 0,imageSrcSet:typeof a.imageSrcSet=="string"?a.imageSrcSet:void 0,imageSizes:typeof a.imageSizes=="string"?a.imageSizes:void 0,media:typeof a.media=="string"?a.media:void 0})}},ee.preloadModule=function(c,a){var g="";typeof c=="string"&&c||(g+=" The `href` argument encountered was "+s(c)+"."),a!==void 0&&typeof a!="object"?g+=" The `options` argument encountered was "+s(a)+".":a&&"as"in a&&typeof a.as!="string"&&(g+=" The `as` option encountered was "+s(a.as)+"."),g&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',g),typeof c=="string"&&(a?(g=o(a.as,a.crossOrigin),f.d.m(c,{as:typeof a.as=="string"&&a.as!=="script"?a.as:void 0,crossOrigin:g,integrity:typeof a.integrity=="string"?a.integrity:void 0})):f.d.m(c))},ee.requestFormReset=function(c){f.d.r(c)},ee.unstable_batchedUpdates=function(c,a){return c(a)},ee.useFormState=function(c,a,g){return l().useFormState(c,a,g)},ee.useFormStatus=function(){return l().useHostTransitionStatus()},ee.version="19.2.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var Zr=Ce((ba,on)=>{"use strict";function Xr(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xr)}catch(e){console.error(e)}}}process.env.NODE_ENV==="production"?(Xr(),on.exports=qr()):on.exports=Qr()});var it=K(F(),1);function Ie(...e){if(e.length===0)return{};if(e.length===1)return typeof e[0]=="object"&&e[0]!==null?e[0]:{};let t={},r={};for(let o of e)if(!(typeof o!="object"||o===null)){for(let s in o)if(Object.hasOwn(o,s)){if(s==="children")continue;let i=o[s];s.startsWith("on")&&typeof i=="function"?(r[s]??=[],r[s].push(i)):t[s]=i}}for(let o in r)Object.hasOwn(r,o)&&r[o].length>0&&(t[o]=(...s)=>{for(let i of r[o])i?.(...s)});for(let o=e.length-1;o>=0;o--){let s=e[o];if(typeof s=="object"&&s!==null&&"children"in s){t.children=s.children;break}}return t}function Do({props:e,ref:t,context:r}){let o=Nt({context:r,slot:e.slot})||{},{ref:s=null,...i}=o,l=(0,it.useRef)(null),d=(0,it.useCallback)(p=>{l.current=p,typeof t=="function"?t(p):t&&(t.current=p),typeof s=="function"?s(p):s&&typeof s=="object"&&(s.current=p)},[t,s]),f=Ie(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&(typeof i.style=="function"||typeof e.style=="function"?f.style=p=>{let b=typeof i.style=="function"?i.style(p):i.style,c={...p.defaultStyle,...b},a=typeof e.style=="function"?e.style({...p,defaultStyle:c}):e.style;return{...c,...a}}:f.style={...i.style,...e.style}),[f,d]}var se=K(F(),1);function Uo(e={}){let{partialVisibility:t=!1,threshold:r=0,rootMargin:o="0px",root:s=null,active:i=!0,once:l=!1,onChange:d}=e,[f,p]=(0,se.useState)(null),[b,c]=(0,se.useState)(!1),[a,g]=(0,se.useState)(null),S=(0,se.useRef)(!1),T=(0,se.useRef)(null),v=Oe(x=>{let C=x[0],B=C.isIntersecting,U={isIntersecting:C.isIntersecting,intersectionRatio:C.intersectionRatio,intersectionRect:C.intersectionRect,boundingClientRect:C.boundingClientRect,rootBounds:C.rootBounds,time:C.time};g(U),c(Y=>l&&S.current?!0:B&&l?(S.current=!0,Y!==!0&&d&&d(!0),!0):Y!==B?(d&&d(B),B):Y)}),k=(0,se.useCallback)(x=>{p(x)},[]);return(0,se.useEffect)(()=>{if(!i||!f)return;let x;return t===!0?x=[0,.1,.25,.5,.75,1]:typeof t=="string"?x=.01:x=r,T.current=new IntersectionObserver(v,{root:s,rootMargin:o,threshold:x}),T.current.observe(f),()=>{T.current&&T.current.disconnect()}},[i,f,s,o,r,t]),[k,b,a]}var yt=K(F(),1);var Fo=Object.defineProperty,ut=(e,t)=>{for(var r in t)Fo(e,r,{get:t[r],enumerable:!0})},xe={};ut(xe,{ARIA_ATTRIBUTES:()=>jn,HTML_TAGS:()=>Wn,PRIMITIVE_TAGS:()=>Bn,default:()=>ko});var jn=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],Bn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wn=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],ko={ARIA_ATTRIBUTES:jn,PRIMITIVE_TAGS:Bn,HTML_TAGS:Wn},No={};ut(No,{NUMERIC_DIGITS:()=>Gn,default:()=>Ko});var Gn=["1","2","3","4","5","6","7","8","9","0"],Ko={NUMERIC_DIGITS:Gn},Ho={};ut(Ho,{AMPERSAND:()=>tr,ASTERISK:()=>rr,BACKSLASH:()=>yr,BOM:()=>Yn,CARRIAGE_RETURN:()=>qn,COLON:()=>ar,COMMA:()=>sr,COMMERCIAL_AT:()=>dr,DOT:()=>ur,DOUBLE_QUOTE:()=>Zn,EXCLAMATION:()=>Xn,GRAVE_ACCENT:()=>gr,GREATER_THAN:()=>lr,LEFT_CURLY_BRACKET:()=>Er,LEFT_SQUARE_BRACKET:()=>pr,LINE_FEED:()=>zn,MINUS:()=>ir,PERCENT:()=>er,PLUS:()=>or,QUESTION:()=>fr,RIGHT_CURLY_BRACKET:()=>hr,RIGHT_SQUARE_BRACKET:()=>mr,SHARP:()=>Jn,SINGLE_QUOTE:()=>nr,SMALLER_THAN:()=>cr,SPACE:()=>Qn,TAB:()=>$n,VERTICAL_LINE:()=>vr,default:()=>Vo});var Yn=65279,$n=9,zn=10,qn=13,Qn=32,Xn=33,Zn=34,Jn=35,er=37,tr=38,nr=39,rr=42,or=43,sr=44,ir=45,ur=46,ar=58,cr=60,lr=62,fr=63,dr=64,pr=91,yr=92,mr=93,gr=96,Er=123,vr=124,hr=125,Vo={BOM:Yn,TAB:$n,LINE_FEED:zn,CARRIAGE_RETURN:qn,SPACE:Qn,EXCLAMATION:Xn,DOUBLE_QUOTE:Zn,SHARP:Jn,PERCENT:er,AMPERSAND:tr,SINGLE_QUOTE:nr,ASTERISK:rr,PLUS:or,COMMA:sr,MINUS:ir,DOT:ur,COLON:ar,SMALLER_THAN:cr,GREATER_THAN:lr,QUESTION:fr,COMMERCIAL_AT:dr,LEFT_SQUARE_BRACKET:pr,BACKSLASH:yr,RIGHT_SQUARE_BRACKET:mr,GRAVE_ACCENT:gr,LEFT_CURLY_BRACKET:Er,VERTICAL_LINE:vr,RIGHT_CURLY_BRACKET:hr},jo={};ut(jo,{CAPITALIZED:()=>Tr,LOWERCASE:()=>br,VOWELS:()=>Rr,default:()=>Bo});var Tr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],br=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],Rr=["A","E","I","O","U","a","e","i","o","u"],Bo={CAPITALIZED:Tr,LOWERCASE:br,VOWELS:Rr};function Wo(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):!1}var at=()=>Wo(/^Mac/i);function Sr(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):!1}var Go=()=>Sr(/^iPhone/i),Yo=()=>Sr(/^iPad/i)||at()&&navigator.maxTouchPoints>1,Kt=()=>Go()||Yo();function ct(e){return at()?e.metaKey??!1:e.ctrlKey??!1}function q(e){if(e?.ownerDocument)return e.ownerDocument;if(typeof document<"u")return document;throw new Error("getOwnerDocument called in an environment without document")}function ye(e){return e&&"window"in e&&e.window===e?e:q(e).defaultView||(typeof window<"u"?window:void 0)}var lt=null;function $o(){if(lt==null){lt=!1;try{if(typeof document>"u")return!1;document.createElement("div").focus({get preventScroll(){return lt=!0,!0}})}catch{}}return lt}function _r(e,t,r){let{block:o="nearest",inline:s="nearest"}=r??{},i=e.getBoundingClientRect(),l=t.getBoundingClientRect(),d=l.top<i.top,f=l.bottom>i.bottom,p=l.left<i.left,b=l.right>i.right;if(d||f){let c=e.scrollTop;if(o==="start"||o==="nearest"&&d)c=e.scrollTop+(l.top-i.top);else if(o==="end"||o==="nearest"&&f)c=e.scrollTop+(l.bottom-i.bottom);else if(o==="center"){let a=i.top+i.height/2,g=l.top+l.height/2;c=e.scrollTop+(g-a)}e.scrollTop=c}if(p||b){let c=e.scrollLeft;if(s==="start"||s==="nearest"&&p)c=e.scrollLeft+(l.left-i.left);else if(s==="end"||s==="nearest"&&b)c=e.scrollLeft+(l.right-i.right);else if(s==="center"){let a=i.left+i.width/2,g=l.left+l.width/2;c=e.scrollLeft+(g-a)}e.scrollLeft=c}}function zo(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function ft(e,t,r=!0){if(!e||!t)return!1;if(!r)return e.contains(t);let o=t;for(;o;){if(o===e)return!0;o=o instanceof Element&&o.tagName==="SLOT"&&o.assignedSlot?o.assignedSlot.parentNode:zo(o)?o.host:o.parentNode}return!1}var me=(e,t=!0)=>{if(e||(e=typeof document<"u"?document:void 0),!e)return null;if(!t)return e.activeElement;let r=e.activeElement;for(;r&&"shadowRoot"in r&&r.shadowRoot?.activeElement;)r=r.shadowRoot.activeElement;return r};function dt(e,t=!0){return t&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Be(e){if($o())e.focus({preventScroll:!0});else{let t=qo(e);e.focus();for(let{element:r,scrollTop:o,scrollLeft:s}of t)r.scrollTop=o,r.scrollLeft=s}}function qo(e){let t=e.parentNode,r=Array.from({length:0}),o=typeof document<"u"?document.scrollingElement||document.documentElement:null;for(;t instanceof HTMLElement&&t!==o;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return o instanceof HTMLElement&&r.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),r}var wr="necto-style",Or=new WeakMap;function Qo(e){let t=Or.get(e);return t||(t=new Map,Or.set(e,t)),t}function Xo(e,t={}){let{id:r=wr,insertionPoint:o}=t,s=o?q(o):typeof document<"u"?document:void 0;if(!s)throw new Error("createStyleElement called without document");let i=s.createElement("style");return i.setAttribute("type","text/css"),i.setAttribute("necto-style-id",r),i.textContent=e,o?s.head.insertBefore(i,o):s.head.appendChild(i),i}function Ar(e,t={}){let{id:r=wr,window:o=typeof window<"u"?window:null,insertionPoint:s}=t;if(!o||!e)return()=>{};let i=Qo(o),l=`${r}:${e}`,d=i.get(l);return d?d.element&&(d.element.textContent=e,d.count++):(d={element:Xo(e,{id:r,insertionPoint:s}),count:1},i.set(l,d)),()=>{let f=i.get(l);f?.element&&(f.count--,f.count<1&&(f.element.remove(),f.element=null,i.delete(l)))}}var pe=new Map,Vt=new Set;function Zo(e){if(!("propertyName"in e)||!e.target)return;let t=pe.get(e.target);t||(t=new Set,pe.set(e.target,t),e.target.addEventListener("transitioncancel",Wt,{once:!0})),t.add(e.propertyName)}function Wt(e){if(!("propertyName"in e)||!e.target)return;let t=pe.get(e.target);if(t&&(t.delete(e.propertyName),t.size===0&&(e.target.removeEventListener("transitioncancel",Wt),pe.delete(e.target)),pe.size===0)){for(let r of Vt)r();Vt.clear()}}if(typeof window<"u"&&typeof document<"u"){let e=()=>{let t=document.body;t&&(t.addEventListener("transitionrun",Zo),t.addEventListener("transitionend",Wt))};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e,{once:!0})}function Gt(e){requestAnimationFrame(()=>{for(let[t]of pe)"isConnected"in t&&!t.isConnected&&pe.delete(t);pe.size===0?e():Vt.add(e)})}var le,Ht=()=>xe.HTML_TAGS.reduce((e,t)=>{var r;return e[r=t,r.charAt(0).toUpperCase()+r.slice(1)]=t,e},{}),si=new Proxy({},{get:(e,t,r)=>(le||(le=Ht()),Reflect.get(le,t,r)),ownKeys:()=>(le||(le=Ht()),Reflect.ownKeys(le)),getOwnPropertyDescriptor:(e,t)=>(le||(le=Ht()),Object.getOwnPropertyDescriptor(le,t))}),jt="",De="default",He=new WeakMap;function pt(e){if(Kt()){if(De==="default"){let t=q(e);t?.documentElement?.style.webkitUserSelect!==void 0&&(jt=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none",De="disabled")}}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=e.style,r="userSelect"in t?"userSelect":"webkitUserSelect";He.has(e)||(He.set(e,t[r]??""),t[r]="none")}}function ge(e){if(Kt()){if(De!=="disabled")return;De="restoring",setTimeout(()=>{Gt(()=>{if(De==="restoring"){let t=q(e);t?.documentElement?.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=jt||""),jt="",De="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&He.has(e)){let t=He.get(e)??"",r=e.style,o="userSelect"in r?"userSelect":"webkitUserSelect";r[o]==="none"&&(r[o]=t),e.getAttribute("style")?.trim()===""&&e.removeAttribute("style"),He.delete(e)}}var Ve,Bt,Lr,je=()=>{Ve||(Ve=xe.ARIA_ATTRIBUTES.reduce((e,t)=>(e[(r=>{let o=r.replace("aria-","");return o.charAt(0).toUpperCase()+o.slice(1)})(t)]=t,e),{}),Bt=xe.ARIA_ATTRIBUTES,Lr=new Set(Bt))},W=new Proxy({},{get:(e,t,r)=>(je(),Reflect.get(Ve,t,r)),ownKeys:()=>(je(),Reflect.ownKeys(Ve)),getOwnPropertyDescriptor:(e,t)=>(je(),Object.getOwnPropertyDescriptor(Ve,t))}),ai=new Proxy([],{get:(e,t,r)=>(je(),Reflect.get(Bt,t,r))}),ci=new Proxy(new Set,{get:(e,t,r)=>(je(),Reflect.get(Lr,t,r))});function We(e={}){let{isDisabled:t,onFocus:r,onBlur:o,onFocusChange:s}=e,i=(0,yt.useCallback)((p,b)=>{p?(r?.(b),s?.(!0)):(o?.(b),s?.(!1))},[r,o,s]),l=(0,yt.useCallback)(p=>{p.target===p.currentTarget&&i(!1,p)},[i]),d=Ge({onBlur:l}),f=(0,yt.useCallback)(p=>{let b=q(p.target),c=b?me(b):me();p.target===p.currentTarget&&c===dt(p.nativeEvent)&&(i(!0,p),d(p))},[i,d]);return{focusProps:{...t?{}:{onFocus:f,onBlur:l}}}}var mt=K(F(),1);function Jo(e,t){let{autoFocus:r,isDisabled:o,excludeFromTabOrder:s}=e,{focusProps:i}=We(e),{keyboardProps:l}=Yt(e),d=(0,mt.useRef)(r),f=q(t.current),p=me(f);(0,mt.useEffect)(()=>{if(d.current&&t.current)if(Ye()==="virtual"){let c=p;Gt(()=>{me(f)===c&&t.current?.isConnected&&Be(t.current)})}else Be(t.current);d.current=!1},[t]);let b=s?-1:0;return o&&(b=void 0),{focusableProps:Ie(i??{},l,{tabIndex:b})}}var Ee=K(F(),1);var es=null;function ts(e={}){let{within:t=!1,isTextInput:r=!1,autoFocus:o=!1}=e,s=(0,Ee.useRef)({isFocused:o,isFocusVisible:o||es!=="pointer"}),[i,l]=(0,Ee.useState)(o),[d,f]=(0,Ee.useState)(()=>s.current.isFocused&&s.current.isFocusVisible),p=(0,Ee.useCallback)(()=>{f(s.current.isFocused&&s.current.isFocusVisible)},[]),b=(0,Ee.useCallback)(g=>{s.current.isFocused=g,l(g),p()},[p]);$e({fn:g=>{s.current.isFocusVisible=g,p()},deps:[],opts:{isTextInput:r}});let{focusProps:c={}}=We({isDisabled:t,onFocusChange:b})||{},{focusWithinProps:a={}}=$t({isDisabled:!t,onFocusWithinChange:b})||{};return{isFocused:i,isFocusVisible:d,focusProps:t?a:c}}var Cr=K(F(),1);function ns(e={}){let{isTextInput:t,autoFocus:r}=e,[o,s]=(0,Cr.useState)(r||Ye()!=="pointer");return $e({fn:i=>s(i),deps:[t],opts:{isTextInput:t}}),{isFocusVisible:o}}var Ue=new Map,gt=new Set,Pr=!1,zt=null,Mr=!1,Q={get hasEventBeforeFocus(){return Pr},set hasEventBeforeFocus(e){Pr=e},get hasBlurredWindowRecently(){return Mr},set hasBlurredWindowRecently(e){Mr=e},get currentModality(){return zt},set currentModality(e){zt=e}};function Ye(){return zt}var vs={},Et=Object.create(null),ze=e=>globalThis.process?.env||vs.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Et:globalThis),ve=new Proxy(Et,{get(e,t){return ze()[t]??Et[t]},has(e,t){let r=ze();return t in r||t in Et},set(e,t,r){let o=ze(!0);return o[t]=r,!0},deleteProperty(e,t){if(!t)return!1;let r=ze(!0);return delete r[t],!0},ownKeys(){let e=ze(!0);return Object.keys(e)}}),xr=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",rs=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function os(){if(globalThis.process?.env)for(let e of rs){let t=e[1]||e[0];if(globalThis.process?.env[t])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var Dr=os(),xi=Dr.name;function _e(e){return e?e!=="false":!1}var qt=globalThis.process?.platform||"",Ur=_e(ve.CI)||Dr.ci!==!1,Fr=_e(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);var Di=_e(ve.DEBUG),we=xr==="test"||_e(ve.TEST),kr=xr==="production";var Ui=_e(ve.MINIMAL)||Ur||we||!Fr,ss=/^win/i.test(qt),Fi=/^linux/i.test(qt),Nr=/^darwin/i.test(qt),ki=!_e(ve.NO_COLOR)&&(_e(ve.FORCE_COLOR)||(Fr||ss)&&ve.TERM!=="dumb"||Ur),is=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null,Ni=Number(is?.split(".")[0])||null,us=globalThis.process||Object.create(null),Ir={versions:{}},Ki=new Proxy(us,{get(e,t){if(t==="env")return ve;if(t in e)return e[t];if(t in Ir)return Ir[t]}}),as=globalThis.process?.release?.name==="node",cs=!!globalThis.Bun||!!globalThis.process?.versions?.bun,ls=!!globalThis.Deno,fs=!!globalThis.fastly,ds=!!globalThis.Netlify,ps=!!globalThis.EdgeRuntime,ys=globalThis.navigator?.userAgent==="Cloudflare-Workers",ms=[[ds,"netlify"],[ps,"edge-light"],[ys,"workerd"],[fs,"fastly"],[ls,"deno"],[cs,"bun"],[as,"node"]];function gs(){let e=ms.find(t=>t[0]);if(e)return{name:e[1]}}var Es=gs(),Hi=Es?.name||"";var Hr=K(F(),1);function Qt(e){if(!e)return;let t=!0;return r=>{let o={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t&&kr?console.error("stopPropagation is now the default behavior for events in Necto. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(o),t&&r.stopPropagation()}}function vt(e){let t=e;return Object.assign(t,{nativeEvent:e,isDefaultPrevented:()=>t.defaultPrevented,isPropagationStopped:()=>t.cancelBubble,persist:()=>{}}),t}var hs=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),Ts={Tab:!0,Escape:!0};function Kr(e,t,r){if(!r||!("target"in r)||!r.target)return!1;let o=q(r.target),s=ye(r.target),i=typeof window<"u"?s.HTMLInputElement:HTMLInputElement,l=typeof window<"u"?s.HTMLTextAreaElement:HTMLTextAreaElement,d=typeof window<"u"?s.HTMLElement:HTMLElement,f=typeof window<"u"?s.KeyboardEvent:KeyboardEvent,p=o.activeElement;return e=e||p instanceof i&&!hs.has(p.type)||p instanceof l||p instanceof d&&p.isContentEditable,!(e&&t==="keyboard"&&r instanceof f&&!Ts[r.key])}function Zt(e,t){gt.forEach(r=>r(e,t))}function bs(e){return!(e.metaKey||Nr&&e.altKey||e.ctrlKey||["Control","Shift","Meta"].includes(e.key))}function Vr(e){bs(e)&&(Q.hasEventBeforeFocus=!0,Q.currentModality="keyboard",Zt("keyboard",e))}function Xt(e){["mousedown","pointerdown"].includes(e.type)&&(Q.hasEventBeforeFocus=!0,Q.currentModality="pointer",Zt("pointer",e))}function jr(e){[window,document].includes(e.target)||!e.isTrusted||!Q.hasEventBeforeFocus&&!Q.hasBlurredWindowRecently||(!Q.hasEventBeforeFocus&&!Q.hasBlurredWindowRecently&&(Q.currentModality="virtual",Zt("virtual",e)),Q.hasEventBeforeFocus=!1,Q.hasBlurredWindowRecently=!1)}function Br(){Q.hasEventBeforeFocus=!1,Q.hasBlurredWindowRecently=!0}function Rs(e){let t=ye(e),r=q(e);if(typeof window>"u"||typeof document>"u"||Ue.has(t))return;let o=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(...s){Q.hasEventBeforeFocus=!0,o.apply(this,s)},r.addEventListener("keydown",Vr,!0),r.addEventListener("click",Xt,!0),t.addEventListener("focus",jr,!0),t.addEventListener("blur",Br,!1),typeof PointerEvent<"u"&&r.addEventListener("pointerdown",Xt,!0),Ue.set(t,{focus:o})}function Ss(e){let t=ye(e),r=q(e);if(!Ue.has(t))return;let{focus:o}=Ue.get(t);t.HTMLElement.prototype.focus=o,r.removeEventListener("keydown",Vr,!0),r.removeEventListener("click",Xt,!0),t.removeEventListener("focus",jr,!0),t.removeEventListener("blur",Br,!1),Ue.delete(t)}function $e(e){let{fn:t,deps:r,opts:o}=e;typeof window>"u"||typeof document>"u"||(Rs(),(0,Hr.useEffect)(()=>{let s=(i,l)=>{Kr(!!o?.isTextInput,i,l)&&t(Q.currentModality!=="pointer")};return gt.add(s),()=>{gt.delete(s),Ss()}},r))}var qe=K(F(),1);function $t(e){let{isDisabled:t,onFocusWithin:r,onBlurWithin:o,onFocusWithinChange:s}=e,i=(0,qe.useRef)({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:d}=Qe(),f=(0,qe.useCallback)(c=>{c.currentTarget.contains(c.target)&&i.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(i.current.isFocusWithin=!1,d(),o&&o(c),s&&s(!1))},[o,s,d]),p=Ge({onBlur:f}),b=(0,qe.useCallback)(c=>{if(!c.currentTarget.contains(c.target))return;let a=q(c.target),g=me(a);if(!i.current.isFocusWithin&&g===dt(c.nativeEvent)){r&&r(c),s&&s(!0),i.current.isFocusWithin=!0,p(c);let S=c.currentTarget;l(a,"focus",T=>{if(i.current.isFocusWithin&&!ft(S,T.target)&&a.defaultView&&typeof a.defaultView.FocusEvent=="function"){let v=new a.defaultView.FocusEvent("blur",{relatedTarget:T.target});Object.defineProperty(v,"target",{value:S}),Object.defineProperty(v,"currentTarget",{value:S});let k=vt(v);f(k)}},{capture:!0})}},[r,s,p,l,f]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:b,onBlur:f}}}var he=K(F(),1);function Qe(){let e=(0,he.useRef)(new Map),t=(0,he.useCallback)((s,i,l,d)=>{let f=typeof d=="object"&&d?.once?(...p)=>{e.current.delete(l),l(...p)}:l;e.current.set(l,{type:i,eventTarget:s,options:d}),s.addEventListener(i,f,d)},[]),r=(0,he.useCallback)((s,i,l,d)=>{let f=e.current.get(l),p=f?.options?.once?f.fn:l;s.removeEventListener(i,p,d),e.current.delete(l)},[]),o=(0,he.useCallback)(()=>{e.current.forEach((s,i)=>{s.eventTarget.removeEventListener(s.type,i,s.options)}),e.current.clear()},[]);return(0,he.useEffect)(()=>()=>o(),[o]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:o}}var te=K(F(),1);function Os(e={}){let{onHoverStart:t,onHoverChange:r,onHoverEnd:o,isDisabled:s}=e,[i,l]=(0,te.useState)(!1),d=(0,te.useRef)({hoverCount:0,ignoreEmulated:!1}),f=(0,te.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current,{addGlobalListener:p,removeAllGlobalListeners:b}=Qe(),c=(0,te.useCallback)(()=>{d.current.ignoreEmulated=!0,setTimeout(()=>{d.current.ignoreEmulated=!1},50)},[]);(0,te.useEffect)(()=>{let T=k=>{k.pointerType==="touch"&&c()};if(typeof document>"u")return;let v=d.current;return v.hoverCount++,typeof PointerEvent<"u"?document.addEventListener("pointerup",T):we&&document.addEventListener("touchend",c),()=>{v.hoverCount--,v.hoverCount===0&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",T):we&&document.removeEventListener("touchend",c))}},[c]);let a=(0,te.useCallback)((T,v)=>{s||v==="touch"||f.isHovered||!(T.currentTarget&&T.currentTarget.contains(T.target))||(f.isHovered=!0,f.pointerType=v,f.target=T.currentTarget,p(q(T.target instanceof Element?T.target:null),"pointerover",k=>{f.isHovered&&f.target&&!ft(f.target,k.target)&&g(k,k.pointerType)},{capture:!0}),t?.({type:"hoverstart",target:T.currentTarget,pointerType:v}),r?.(!0),l(!0))},[s,t,r,p,f]),g=(0,te.useCallback)((T,v)=>{v==="touch"||!f.isHovered||!f.target||(f.isHovered=!1,f.pointerType="",f.target=null,b(),o?.({type:"hoverend",target:T.currentTarget,pointerType:v}),r?.(!1),l(!1))},[o,r,b,f.target,f]),S=(0,te.useMemo)(()=>{let T={};return typeof PointerEvent<"u"?(T.onPointerEnter=v=>{d.current.ignoreEmulated&&v.pointerType==="mouse"||a(v,v.pointerType)},T.onPointerLeave=v=>{!s&&v.currentTarget instanceof Element&&v.currentTarget.contains(v.target)&&g(v,v.pointerType)}):we&&(T.onTouchStart=()=>{f.ignoreEmulatedMouseEvents=!0},T.onMouseEnter=v=>{!f.ignoreEmulatedMouseEvents&&!d.current.ignoreEmulated&&a(v.nativeEvent,"mouse"),f.ignoreEmulatedMouseEvents=!1},T.onMouseLeave=v=>{!s&&v.currentTarget.contains(v.target)&&g(v.nativeEvent,"mouse")}),T},[s,a,g,f]);return(0,te.useEffect)(()=>{s&&f.isHovered&&g({currentTarget:f.target},f.pointerType)},[s,g,f.isHovered,f.pointerType,f.target]),{hoverProps:S,isHovered:i}}var Jt={prefix:String(Math.round(Math.random()*1e10)),current:0},Xe=new Map,Ze=typeof FinalizationRegistry<"u"?new FinalizationRegistry(e=>{Xe.delete(e)}):null;var oe=K(F(),1);function _s(e={}){let{prefix:t="necto",defaultId:r}=e,[o,s]=(0,oe.useState)(()=>r),i=(0,oe.useRef)(null),l=(0,oe.useRef)({}),d=(()=>{if(r)return r;let f=typeof oe.default.useId=="function"?(0,oe.useId)():String(++Jt.current);return`${we?t:`${t}${Jt.prefix}`}-${f}`})();return(0,oe.useEffect)(()=>{if(typeof window<"u"&&window.document?.createElement){let f=Xe.get(d)||[],p={current:i.current};f.some(b=>b===p)||Xe.set(d,[...f,p])}return Ze&&Ze.register(l.current,d),()=>{Ze&&Ze.unregister(l.current),Xe.delete(d)}},[d]),(0,oe.useEffect)(()=>{let f=i.current;f&&(s(f),i.current=null)},[]),d}function Yt(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:e.onKeyDown?Qt(t=>e.onKeyDown?.(t.nativeEvent)):void 0,onKeyUp:e.onKeyUp?Qt(t=>e.onKeyUp?.(t.nativeEvent)):void 0}}}var Te=K(F(),1);function en(e={}){let{type:t="function"}=e,r=(0,Te.useRef)(!1),[o,s]=(0,Te.useState)(!1),i=(0,Te.useCallback)(()=>r.current,[]);return(0,Te.useEffect)(()=>(r.current=!0,s(!0),()=>{r.current=!1,s(!1)}),[]),t==="ref"?r:t==="boolean"?o:i}var V=K(F(),1);function X(e,t,r){return{type:e,pointerType:t,target:r.currentTarget??r.target,shiftKey:r.shiftKey,ctrlKey:r.ctrlKey,metaKey:r.metaKey,altKey:r.altKey}}function ws(e={}){let{isDisabled:t,preventFocusOnPress:r,allowTextSelectionOnPress:o,ref:s,onPress:i,onPressStart:l,onPressEnd:d,onPressChange:f,onPressUp:p,onClick:b}=e,[c,a]=(0,V.useState)(!1),g=(0,V.useRef)(!1),S=(0,V.useRef)(null),T=(0,V.useRef)(!1),v=(0,V.useCallback)(E=>{c!==E&&(a(E),f?.(E))},[c,f]),k=(0,V.useCallback)(E=>{if(!T.current)return;let m=S.current&&S.current instanceof Node&&E.target instanceof Node&&S.current.contains(E.target);if(T.current=!1,v(!1),!o&&S.current instanceof HTMLElement&&ge(S.current),E.target){let D={...X("pressend","mouse",E),target:E.target};d?.(D),p?.(D),m&&i?.(D)}},[d,p,i,v,o]),x=(0,V.useCallback)(E=>{if(t||E.button!==0||g.current)return;r&&E.preventDefault(),o||pt(E.currentTarget),T.current=!0,S.current=E.currentTarget,v(!0);let m=X("pressstart","mouse",E);l?.(m),window.addEventListener("mouseup",k,{once:!0})},[t,r,o,l,v,k]),C=(0,V.useCallback)(E=>{if(t||E.button!==0||!T.current)return;T.current=!1,v(!1),!o&&E.currentTarget instanceof HTMLElement&&ge(E.currentTarget);let m=X("pressend","mouse",E);d?.(m),p?.(m),E.currentTarget instanceof Node&&E.currentTarget.contains(E.target)&&i?.(X("press","mouse",E))},[t,i,d,p,v,o]),B=(0,V.useCallback)(E=>{c&&(v(!1),d?.(X("pressend","mouse",E)),!o&&E.currentTarget instanceof HTMLElement&&ge(E.currentTarget))},[c,v,d,o]),U=(0,V.useCallback)(E=>{T.current&&!c&&(v(!0),l?.(X("pressstart","mouse",E)))},[c,l,v]),Y=(0,V.useCallback)(E=>{if(!T.current)return;T.current=!1,v(!1),!o&&S.current instanceof HTMLElement&&ge(S.current);let m={...X("pressend","touch",E),target:E.target};d?.(m),p?.(m)},[d,p,v,o]),j=(0,V.useCallback)(E=>{if(!T.current)return;T.current=!1,v(!1),!o&&S.current instanceof HTMLElement&&ge(S.current);let m={...X("pressend","touch",E),target:E.target};d?.(m)},[d,v,o]),G=(0,V.useCallback)(E=>{t||(o||pt(E.currentTarget),g.current=!0,setTimeout(()=>{g.current=!1},100),T.current=!0,S.current=E.currentTarget,v(!0),l?.(X("pressstart","touch",E)),window.addEventListener("touchend",Y,{once:!0}),window.addEventListener("touchcancel",j,{once:!0}))},[t,l,v,o,Y,j]),fe=(0,V.useCallback)(E=>{if(t||!T.current)return;T.current=!1,v(!1),!o&&E.currentTarget instanceof HTMLElement&&ge(E.currentTarget);let m=X("pressend","touch",E);d?.(m),p?.(m),E.currentTarget instanceof Node&&E.currentTarget.contains(E.target)&&i?.(X("press","touch",E))},[t,i,d,p,v,o]),A=(0,V.useCallback)(E=>{if(t)return;(E.key==="Enter"||E.key===" ")&&!c&&(E.key===" "&&E.preventDefault(),o||pt(),v(!0),T.current=!0,l?.(X("pressstart","keyboard",E)))},[t,c,l,v,o]),Se=(0,V.useCallback)(E=>{if(t)return;if((E.key==="Enter"||E.key===" ")&&c){v(!1),T.current=!1,o||ge();let D=X("pressend","keyboard",E);d?.(D),p?.(X("pressup","keyboard",E)),i?.(X("press","keyboard",E))}},[t,c,i,d,p,v,o]),ue=(0,V.useCallback)(E=>{if(t){E.preventDefault();return}g.current||b?.(E)},[t,b]);(0,V.useEffect)(()=>()=>{window.removeEventListener("mouseup",k),window.removeEventListener("touchend",Y),window.removeEventListener("touchcancel",j)},[k,Y,j]);let ae=(0,V.useMemo)(()=>({onMouseDown:x,onMouseUp:C,onMouseLeave:B,onMouseEnter:U,onTouchStart:G,onTouchEnd:fe,onKeyDown:A,onKeyUp:Se,onClick:ue}),[x,C,B,U,G,fe,A,Se,ue]);return(0,V.useEffect)(()=>{let E=s?.current;E&&E instanceof ye(E).Element&&ye(E).getComputedStyle(E).touchAction==="auto"&&(E.style.touchAction="pan-x pan-y pinch-zoom")},[s]),{pressProps:ae,isPressed:c}}var Wr=K(F(),1);function As(e){let{style:t,values:r,children:o,className:s,defaultStyle:i,defaultChildren:l,defaultClassName:d="necto"}=e;return(0,Wr.useMemo)(()=>{let f=typeof s=="function"?s({...r,defaultClassName:d}):s?`${d} ${s}`:d,p=typeof t=="function"?t({...r,defaultStyle:i||{}}):{...i,...t},b=typeof o=="function"?o({...r,defaultChildren:l}):o??l;return{className:f,style:p,children:b}},[s,t,o,d,l,i,r])}var Gr=K(F(),1);function Nt(e){let{context:t,slot:r}=e,o=(0,Gr.useContext)(t);if(r===null)return null;if(o&&typeof o=="object"&&"slots"in o&&o.slots){let s=r||Symbol("default");if(!o.slots[s]){let i=new Intl.ListFormat().format(Object.keys(o.slots).map(d=>`"${d}"`)),l=r?`Invalid slot name: "${r}". This slot is not recognized. Please refer to the component's documentation for valid slot names.`:"A slot prop is required. You must provide a valid slot name to render content in this area.";throw new Error(`${l} Valid slot names are ${i}.`)}return o.slots[s]}return o}var Fe=K(F(),1);function Ge(e){let{onBlur:t}=e,r=(0,Fe.useRef)({isFocused:!1,observer:null});(0,Fe.useLayoutEffect)(()=>{let s=r.current;return()=>{s.observer&&(s.observer.disconnect(),s.observer=null)}},[]);let o=Oe(s=>{t?.(s)});return(0,Fe.useCallback)(s=>{if(s.target instanceof HTMLButtonElement||s.target instanceof HTMLInputElement||s.target instanceof HTMLTextAreaElement||s.target instanceof HTMLSelectElement){r.current.isFocused=!0;let i=s.target,l=d=>{if(r.current.isFocused=!1,i.disabled){let f=vt(d);o(f)}r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};i.addEventListener("focusout",l,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&i.disabled){r.current.observer?.disconnect();let d=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:d})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:d}))}}),r.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[o])}var be=K(F(),1);function Oe(e){let t=(0,be.useRef)(e);return(typeof window<"u"?be.useLayoutEffect:be.useEffect)(()=>{t.current=e},[e]),(0,be.useCallback)(((...r)=>t.current(...r)),[])}var ht=K(F(),1);function Yu(e){let t=en(),[r,o]=(0,ht.useState)(!1);return(0,ht.useEffect)(()=>{t()&&o(!!e())},[e,t]),r}var Ae=K(F(),1);function Ls(e={}){let{autoLock:t=!1,target:r,widthReflow:o=!0}=e,[s,i]=(0,Ae.useState)(!1),l=(0,Ae.useRef)(null),d=(0,Ae.useRef)(null),f=Oe(()=>{if(typeof window>"u"||!l.current)return;let{overflow:b,paddingRight:c}=l.current.style;if(d.current={overflow:b,paddingRight:c},o){let a=l.current===document.body?window.innerWidth:l.current.offsetWidth,g=parseInt(window.getComputedStyle(l.current).paddingRight,10)||0,S=a-l.current.scrollWidth;l.current.style.paddingRight=`${S+g}px`}l.current.style.overflow="hidden",i(!0)}),p=Oe(()=>{l.current&&d.current&&(l.current.style.overflow=d.current.overflow,o&&(l.current.style.paddingRight=d.current.paddingRight)),i(!1)});return(0,Ae.useEffect)(()=>{if(!(typeof window>"u"||typeof document>"u"))return r&&(l.current=typeof r=="string"?document.querySelector(r):r),l.current||(l.current=document.body),t&&f(),()=>{p()}},[t,r,o,f,p]),{isLocked:s,lock:f,unlock:p}}var Yr=K(F(),1);function Cs(e={}){let{isInvalid:t,isDisabled:r,isReadOnly:o,isRequired:s,isBusy:i,isPressed:l,isExpanded:d,isSelected:f,isChecked:p,isHidden:b,hasPopup:c,valueCurrent:a,valueMin:g,valueMax:S,valueText:T,label:v,labelledBy:k,describedBy:x,controls:C,owns:B}=e;return(0,Yr.useMemo)(()=>{let U={},Y=[{value:t,attr:W.Invalid},{value:r,attr:W.Disabled},{value:o,attr:W.Readonly},{value:s,attr:W.Required},{value:i,attr:W.Busy},{value:d,attr:W.Expanded},{value:f,attr:W.Selected},{value:b,attr:W.Hidden}];for(let{value:j,attr:G}of Y)j!==void 0&&(U[G]=j||void 0);return l!==void 0&&(U[W.Pressed]=l===!1?void 0:l),p!==void 0&&(U[W.Checked]=p===!1?void 0:p),c!==void 0&&(U[W.Haspopup]=c===!1?void 0:c),a!==void 0&&(U[W.Valuenow]=a),g!==void 0&&(U[W.Valuemin]=g),S!==void 0&&(U[W.Valuemax]=S),T!==void 0&&(U[W.Valuetext]=T),v!==void 0&&(U[W.Label]=v),k!==void 0&&(U[W.Labelledby]=k),x!==void 0&&(U[W.Describedby]=x),C!==void 0&&(U[W.Controls]=C),B!==void 0&&(U[W.Owns]=B),U},[t,r,o,s,i,l,d,f,p,b,c,a,g,S,T,v,k,x,C,B])}function Ps({id:e,css:t,insertionPoint:r,enabled:o=!0,window:s=typeof window<"u"?window:null}){let i=Array.isArray(t)?t.join(`
|
|
18
18
|
`):t;$r(()=>{if(!(!o||!i))return Ar(i,{id:e,window:s,insertionPoint:r})},[e,i,s,r,o])}var Tt=K(F(),1);function ua(e){let t=(0,Tt.useRef)(e);return(0,Tt.useLayoutEffect)(()=>{t.current=e}),t}var bt=K(F(),1),$r=bt.default.useInsertionEffect??bt.useLayoutEffect;function tn(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function nn(e,t,r=".",o){if(!tn(t))return nn(e,{},r,o);let s=Object.assign({},t);for(let i in e){if(i==="__proto__"||i==="constructor")continue;let l=e[i];l!=null&&(o&&o(s,i,l,r)||(Array.isArray(l)&&Array.isArray(s[i])?s[i]=[...l,...s[i]]:tn(l)&&tn(s[i])?s[i]=nn(l,s[i],(r?`${r}.`:"")+i.toString(),o):s[i]=l))}return s}function rn(e){return(...t)=>t.reduce((r,o)=>nn(r,o,"",e),{})}var Rt=rn(),la=rn((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),fa=rn((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0});var ne=K(F(),1);function Is(e={}){let{isDisabled:t,onLongPressStart:r,onLongPressEnd:o,onLongPress:s,accessibilityDescription:i,threshold:l}=Rt(e,{threshold:500}),d=(0,ne.useRef)(null),f=(0,ne.useRef)(null),p=(0,ne.useRef)(null),b=(0,ne.useRef)(!1),c=(0,ne.useCallback)(()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]);(0,ne.useEffect)(()=>c,[c]);let a=(0,ne.useCallback)(C=>({type:C,pointerType:f.current??"mouse",target:p.current}),[]),g=(0,ne.useCallback)(C=>{t||C.button!==0||C.pointerType!=="mouse"&&(f.current=C.pointerType,p.current=C.currentTarget,b.current=!1,r?.(a("longpressstart")),d.current=setTimeout(()=>{b.current=!0,C.currentTarget?.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),s?.(a("longpress")),d.current=null},l))},[t,l,r,s,a]),S=(0,ne.useCallback)(()=>{f.current!==null&&(c(),!b.current&&o&&o(a("longpressend")),f.current=null,p.current=null)},[c,o,a]),T=(0,ne.useCallback)(()=>{c(),f.current!==null&&o&&o(a("longpressend")),f.current=null,p.current=null},[c,o,a]),v=(0,ne.useCallback)(C=>{b.current&&C.preventDefault()},[]);return{longPressProps:t?{}:{onPointerDown:g,onPointerUp:S,onPointerCancel:T,onContextMenu:v,...!t&&!!s&&!!i&&{"aria-description":i}}}}var eo=K(Zr(),1),ie=K(F(),1);function Fs(e){let{ref:t,isOpen:r,isReady:o=!0}=e,[s,i]=(0,ie.useState)(r),l=s&&o;(0,ie.useLayoutEffect)(()=>{if(l&&t.current&&"getAnimations"in t.current)for(let a of t.current.getAnimations())a instanceof CSSTransition&&a.cancel()},[t,l]),Jr(t,l,(0,ie.useCallback)(()=>i(!1),[]));let[d,f]=(0,ie.useState)(r);r&&!d?(i(!0),f(!0)):!r&&d&&f(!1);let[p,b]=(0,ie.useState)(r?"open":"closed");switch(p){case"open":r||b("exiting");break;case"closed":case"exiting":r&&b("open");break}let c=p==="exiting";return Jr(t,c,(0,ie.useCallback)(()=>{b(a=>a==="exiting"?"closed":a)},[])),{isEntering:l,isExiting:c,isRendered:r||c}}function Jr(e,t,r){(0,ie.useLayoutEffect)(()=>{if(t&&e.current){if(!("getAnimations"in e.current)){r();return}let o=e.current.getAnimations();if(o.length===0){r();return}let s=!1;return Promise.all(o.map(i=>i.finished)).then(()=>{s||(0,eo.flushSync)(()=>{r()})}).catch(()=>{}),()=>{s=!0}}},[e,t,r])}var $=K(F(),1);function ks(e){return at()?e.metaKey:e.ctrlKey}function to(e,t){return e.current?.querySelector(`[data-key="${t}"]`)??null}function Ns(e){let{selectionManager:t,keyboardDelegate:r,ref:o,autoFocus:s,shouldFocusWrap:i,disallowEmptySelection:l,disallowSelectAll:d,escapeBehavior:f,selectOnFocus:p,disallowTypeAhead:b,shouldUseVirtualFocus:c,allowsTabNavigation:a,scrollRef:g,direction:S,orientation:T,onNavigate:v,onFocusItem:k}=Rt(e,{autoFocus:!1,shouldFocusWrap:!1,disallowEmptySelection:!1,disallowSelectAll:!1,escapeBehavior:"clearSelection",selectOnFocus:!1,disallowTypeAhead:!1,shouldUseVirtualFocus:!1,allowsTabNavigation:!1,isVirtualized:!1,direction:"ltr",orientation:"vertical"}),x=g??o,C=(0,$.useRef)({top:0,left:0}),B=(0,$.useRef)(t.focusedKey),U=(0,$.useRef)(s),Y=(0,$.useRef)(""),j=(0,$.useRef)(null),G=(0,$.useCallback)((m,D,O)=>{m!=null&&(t.setFocusedKey(m,O),v?.(m),D?.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(m):p&&!ks(D)&&t.replaceSelection(m))},[t,p,v]),fe=(0,$.useCallback)(m=>{if(k){k(m);return}let D=to(o,m);D&&!c&&Be(D)},[o,c,k]),A=(0,$.useCallback)(m=>{if(!b&&m.key.length===1&&!m.ctrlKey&&!m.metaKey&&!m.altKey){j.current&&clearTimeout(j.current),Y.current+=m.key;let O=r.getKeyForSearch?.(Y.current,t.focusedKey)??null;O!=null&&(m.preventDefault(),G(O,m)),j.current=setTimeout(()=>{Y.current=""},500);return}let D=S==="rtl";switch(m.key){case"ArrowDown":{if(r.getKeyBelow){let O=t.focusedKey!=null?r.getKeyBelow(t.focusedKey):r.getFirstKey?.()??null;O==null&&i&&(O=r.getFirstKey?.()??null),O!=null&&(m.preventDefault(),G(O,m))}break}case"ArrowUp":{if(r.getKeyAbove){let O=t.focusedKey!=null?r.getKeyAbove(t.focusedKey):r.getLastKey?.()??null;O==null&&i&&(O=r.getLastKey?.()??null),O!=null&&(m.preventDefault(),G(O,m))}break}case"ArrowLeft":{if(r.getKeyLeftOf){let O=t.focusedKey!=null?r.getKeyLeftOf(t.focusedKey):null;O==null&&i&&(O=D?r.getFirstKey?.()??null:r.getLastKey?.()??null),O!=null&&(m.preventDefault(),G(O,m,D?"first":"last"))}break}case"ArrowRight":{if(r.getKeyRightOf){let O=t.focusedKey!=null?r.getKeyRightOf(t.focusedKey):null;O==null&&i&&(O=D?r.getLastKey?.()??null:r.getFirstKey?.()??null),O!=null&&(m.preventDefault(),G(O,m,D?"last":"first"))}break}case"Home":{if(r.getFirstKey){m.preventDefault();let O=r.getFirstKey();t.setFocusedKey(O),O!=null&&(ct(m)&&m.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(O):p&&t.replaceSelection(O))}break}case"End":{if(r.getLastKey){m.preventDefault();let O=r.getLastKey();t.setFocusedKey(O),O!=null&&(ct(m)&&m.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(O):p&&t.replaceSelection(O))}break}case"PageDown":{if(r.getKeyPageBelow&&t.focusedKey!=null){let O=r.getKeyPageBelow(t.focusedKey);O!=null&&(m.preventDefault(),G(O,m))}break}case"PageUp":{if(r.getKeyPageAbove&&t.focusedKey!=null){let O=r.getKeyPageAbove(t.focusedKey);O!=null&&(m.preventDefault(),G(O,m))}break}case"a":{ct(m)&&t.selectionMode==="multiple"&&!d&&(m.preventDefault(),t.selectAll());break}case"Escape":{f==="clearSelection"&&!l&&t.selectedKeys.size>0&&(m.stopPropagation(),m.preventDefault(),t.clearSelection());break}case"Tab":{!a&&o.current&&m.shiftKey&&o.current.focus();break}}},[r,t,o,S,i,p,b,d,l,f,a,G]),Se=(0,$.useCallback)(m=>{if(!t.isFocused){if(t.setFocused(!0),t.focusedKey==null){let D=m.relatedTarget,O=D!=null&&!!(m.currentTarget.compareDocumentPosition(D)&Node.DOCUMENT_POSITION_FOLLOWING),ce=null;O?ce=t.lastSelectedKey??r.getLastKey?.()??null:ce=t.firstSelectedKey??r.getFirstKey?.()??null,ce!=null&&(t.setFocusedKey(ce),p&&!t.isSelected(ce)&&t.replaceSelection(ce))}else x.current&&(x.current.scrollTop=C.current.top,x.current.scrollLeft=C.current.left);t.focusedKey!=null&&fe(t.focusedKey)}},[t,r,p,x,fe]),ue=(0,$.useCallback)(m=>{let D=m.relatedTarget;m.currentTarget.contains(D)||t.setFocused(!1)},[t]),ae=(0,$.useCallback)(m=>{x.current===m.target&&m.preventDefault()},[x]);(0,$.useEffect)(()=>{let m=x.current;if(!m)return()=>{};let D=()=>{C.current={top:m.scrollTop,left:m.scrollLeft}};return m.addEventListener("scroll",D,{passive:!0}),()=>{m.removeEventListener("scroll",D)}},[x]),(0,$.useEffect)(()=>{if(!U.current)return;let m=null;if(U.current==="first"?m=r.getFirstKey?.()??null:U.current==="last"&&(m=r.getLastKey?.()??null),t.selectedKeys.size>0){for(let D of t.selectedKeys)if(t.canSelectItem?.(D)!==!1){m=D;break}}t.setFocused(!0),t.setFocusedKey(m),m==null&&!c&&o.current&&o.current.focus(),U.current=!1},[r,t,o,c]),(0,$.useEffect)(()=>{if(!t.isFocused||t.focusedKey==null||t.focusedKey===B.current)return;let m=to(o,t.focusedKey);m&&x.current&&_r(x.current,m),B.current=t.focusedKey},[t.isFocused,t.focusedKey,o,x]),(0,$.useEffect)(()=>()=>{j.current&&clearTimeout(j.current)},[]);let E=c?void 0:t.focusedKey==null?0:-1;return{collectionProps:Ie({onKeyDown:A,onFocus:Se,onBlur:ue,onMouseDown:ae,tabIndex:E,"data-orientation":T})}}var z=K(F(),1),Ot={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},ro={...Ot,customError:!0,valid:!1},ke={isInvalid:!1,validationErrors:[],validationDetails:Ot},oo=(0,z.createContext)({}),un="__formValidationState"+Date.now();function Ks(e){if(e[un]){let{realtimeValidation:t,displayValidation:r,updateValidation:o,resetValidation:s,commitValidation:i}=e[un];return{realtimeValidation:t,displayValidation:r,updateValidation:o,resetValidation:s,commitValidation:i}}return Hs(e)}function Hs(e){let{isInvalid:t,validationState:r,name:o,value:s,builtinValidation:i,validate:l,validationBehavior:d="aria"}=e;r&&(t||=r==="invalid");let f=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:ro}:null,p=(0,z.useMemo)(()=>{if(!l||s==null)return null;let A=Vs(l,s);return no(A)},[l,s]);i?.validationDetails.valid&&(i=void 0);let b=(0,z.useContext)(oo),c=(0,z.useMemo)(()=>o?Array.isArray(o)?o.flatMap(A=>an(b[A])):an(b[o]):[],[b,o]),[a,g]=(0,z.useState)(b),[S,T]=(0,z.useState)(!1);b!==a&&(g(b),T(!1));let v=(0,z.useMemo)(()=>no(S?[]:c),[S,c]),k=(0,z.useRef)(ke),[x,C]=(0,z.useState)(ke),B=(0,z.useRef)(ke),U=()=>{if(!Y)return;j(!1);let A=p||i||k.current;sn(A,B.current)||(B.current=A,C(A))},[Y,j]=(0,z.useState)(!1);return(0,z.useEffect)(U),{realtimeValidation:f||v||p||i||ke,displayValidation:d==="native"?f||v||x:f||v||p||i||x,updateValidation(A){d==="aria"&&!sn(x,A)?C(A):k.current=A},resetValidation(){let A=ke;sn(A,B.current)||(B.current=A,C(A)),d==="native"&&j(!1),T(!0)},commitValidation(){d==="native"&&j(!0),T(!0)}}}function an(e){return e?Array.isArray(e)?e:[e]:[]}function Vs(e,t){if(typeof e=="function"){let r=e(t);if(r&&typeof r!="boolean")return an(r)}return[]}function no(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:ro}:null}function sn(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((r,o)=>r===t.validationErrors[o])&&Object.entries(e.validationDetails).every(([r,o])=>t.validationDetails[r]===o)}function js(...e){let t=new Set,r=!1,o={...Ot};for(let s of e){for(let i of s.validationErrors)t.add(i);r||=s.isInvalid;for(let i in o)o[i]||=s.validationDetails[i]}return o.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:o}}})();
|
|
19
19
|
/*! Bundled license information:
|
|
20
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@necto-react/hooks",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Necto's standard library for providing utility hooks for React applications.",
|
|
6
6
|
"files": [
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"defu": "^6.1.4",
|
|
42
42
|
"react-aria": "^3.39.0",
|
|
43
43
|
"std-env": "^3.9.0",
|
|
44
|
-
"@necto-react/helpers": "2.6.
|
|
45
|
-
"@necto/dom": "1.6.8",
|
|
44
|
+
"@necto-react/helpers": "2.6.9",
|
|
46
45
|
"@necto-react/types": "2.4.1",
|
|
47
|
-
"@necto/
|
|
46
|
+
"@necto/id": "1.6.5",
|
|
48
47
|
"@necto/strings": "1.6.1",
|
|
48
|
+
"@necto/mergers": "1.5.1",
|
|
49
49
|
"@necto/platform": "1.5.1",
|
|
50
|
-
"@necto/
|
|
51
|
-
"@necto/
|
|
50
|
+
"@necto/types": "1.3.1",
|
|
51
|
+
"@necto/dom": "1.6.9"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"test": "vitest",
|