UNPKG

hello-csv

Version:

A modern CSV importer written in Preact

7 lines 293 kB
"use strict";var da=Object.defineProperty;var fa=(e,t,n)=>t in e?da(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var _e=(e,t,n)=>fa(e,typeof t!="symbol"?t+"":t,n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _=require("preact");var tt,de,Qn,Oo,At=0,Di=[],ge=_.options,Mo=ge.__b,Po=ge.__r,Ao=ge.diffed,No=ge.__c,ko=ge.unmount,Do=ge.__;function xt(e,t){ge.__h&&ge.__h(de,e,At||t),At=0;var n=de.__H||(de.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function U(e){return At=1,nt(Li,e)}function nt(e,t,n){var r=xt(tt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Li(void 0,t),function(s){var a=r.__N?r.__N[0]:r.__[0],u=r.t(a,s);a!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=de,!de.u)){var o=function(s,a,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(g){return!!g.__c});if(c.every(function(g){return!g.__N}))return!i||i.call(this,s,a,u);var p=r.__c.props!==s;return c.forEach(function(g){if(g.__N){var d=g.__[0];g.__=g.__N,g.__N=void 0,d!==g.__[0]&&(p=!0)}}),i&&i.call(this,s,a,u)||p};de.u=!0;var i=de.shouldComponentUpdate,l=de.componentWillUpdate;de.componentWillUpdate=function(s,a,u){if(this.__e){var c=i;i=void 0,o(s,a,u),i=c}l&&l.call(this,s,a,u)},de.shouldComponentUpdate=o}return r.__N||r.__}function re(e,t){var n=xt(tt++,3);!ge.__s&&Yr(n.__H,t)&&(n.__=e,n.i=t,de.__H.__h.push(n))}function Ke(e,t){var n=xt(tt++,4);!ge.__s&&Yr(n.__H,t)&&(n.__=e,n.i=t,de.__h.push(n))}function k(e){return At=5,W(function(){return{current:e}},[])}function qr(e,t,n){At=6,Ke(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function W(e,t){var n=xt(tt++,7);return Yr(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function oe(e,t){return At=8,W(function(){return e},t)}function se(e){var t=de.context[e.__c],n=xt(tt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(de)),t.props.value):e.__}function Kr(e,t){ge.useDebugValue&&ge.useDebugValue(t?t(e):e)}function pa(e){var t=xt(tt++,10),n=U();return t.__=e,de.componentDidCatch||(de.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Te(){var e=xt(tt++,11);if(!e.__){for(var t=de.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ma(){for(var e;e=Di.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Cn),e.__H.__h.forEach(wr),e.__H.__h=[]}catch(t){e.__H.__h=[],ge.__e(t,e.__v)}}ge.__b=function(e){de=null,Mo&&Mo(e)},ge.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Do&&Do(e,t)},ge.__r=function(e){Po&&Po(e),tt=0;var t=(de=e.__c).__H;t&&(Qn===de?(t.__h=[],de.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(Cn),t.__h.forEach(wr),t.__h=[],tt=0)),Qn=de},ge.diffed=function(e){Ao&&Ao(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Di.push(t)!==1&&Oo===ge.requestAnimationFrame||((Oo=ge.requestAnimationFrame)||ga)(ma)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Qn=de=null},ge.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Cn),n.__h=n.__h.filter(function(r){return!r.__||wr(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],ge.__e(r,n.__v)}}),No&&No(e,t)},ge.unmount=function(e){ko&&ko(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Cn(r)}catch(o){t=o}}),n.__H=void 0,t&&ge.__e(t,n.__v))};var Lo=typeof requestAnimationFrame=="function";function ga(e){var t,n=function(){clearTimeout(r),Lo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Lo&&(t=requestAnimationFrame(n))}function Cn(e){var t=de,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),de=t}function wr(e){var t=de;e.__c=e.__(),de=t}function Yr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Li(e,t){return typeof t=="function"?t(e):t}function Vi(e,t){for(var n in t)e[n]=t[n];return e}function br(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Nn(e,t){var n=t(),r=U({t:{__:n,u:t}}),o=r[0].t,i=r[1];return Ke(function(){o.__=n,o.u=t,er(o)&&i({t:o})},[e,n,t]),re(function(){return er(o)&&i({t:o}),e(function(){er(o)&&i({t:o})})},[e]),n}function er(e){var t,n,r=e.u,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}function Xr(e){e()}function Zr(e){return e}function Jr(){return[!1,Xr]}var Qr=Ke;function $n(e,t){this.props=e,this.context=t}function Hi(e,t){function n(o){var i=this.props.ref,l=i==o.ref;return!l&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!l:br(this.props,o)}function r(o){return this.shouldComponentUpdate=n,_.createElement(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}($n.prototype=new _.Component).isPureReactComponent=!0,$n.prototype.shouldComponentUpdate=function(e,t){return br(this.props,e)||br(this.state,t)};var Vo=_.options.__b;_.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Vo&&Vo(e)};var ha=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ce(e){function t(n){var r=Vi({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=ha,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ho=function(e,t){return e==null?null:_.toChildArray(_.toChildArray(e).map(t))},zi={map:Ho,forEach:Ho,count:function(e){return e?_.toChildArray(e).length:0},only:function(e){var t=_.toChildArray(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:_.toChildArray},va=_.options.__e;_.options.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}va(e,t,n,r)};var zo=_.options.unmount;function Bi(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Vi({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Bi(r,t,n)})),e}function ji(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return ji(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Xt(){this.__u=0,this.o=null,this.__b=null}function Ui(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Wi(e){var t,n,r;function o(i){if(t||(t=e()).then(function(l){n=l.default||l},function(l){r=l}),r)throw r;if(!n)throw t;return _.createElement(n,i)}return o.displayName="Lazy",o.__f=!0,o}function It(){this.i=null,this.l=null}_.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),zo&&zo(e)},(Xt.prototype=new _.Component).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var o=Ui(r.__v),i=!1,l=function(){i||(i=!0,n.__R=null,o?o(s):s())};n.__R=l;var s=function(){if(!--r.__u){if(r.state.__a){var a=r.state.__a;r.__v.__k[0]=ji(a,a.__c.__P,a.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.o.pop();)u.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(l,l)},Xt.prototype.componentWillUnmount=function(){this.o=[]},Xt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Bi(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&_.createElement(_.Fragment,null,e.fallback);return o&&(o.__u&=-33),[_.createElement(_.Fragment,null,t.__a?null:e.children),o]};var Bo=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function wa(e){return this.getChildContext=function(){return e.context},e.children}function ba(e){var t=this,n=e.h;t.componentWillUnmount=function(){_.render(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),t.v||(t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),t.h.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.h.insertBefore(r,o)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.h.removeChild(r)}}),_.render(_.createElement(wa,{context:t.context},e.__v),t.v)}function sn(e,t){var n=_.createElement(ba,{__v:e,h:t});return n.containerInfo=t,n}(It.prototype=new _.Component).__a=function(e){var t=this,n=Ui(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Bo(t,e,r)):o()};n?n(i):i()}},It.prototype.render=function(e){this.i=null,this.l=new Map;var t=_.toChildArray(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},It.prototype.componentDidUpdate=It.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Bo(e,n,t)})};var Gi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,ya=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,xa=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,_a=/[A-Z0-9]/g,Ca=typeof document<"u",Sa=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function eo(e,t,n){return t.__k==null&&(t.textContent=""),_.render(e,t),typeof n=="function"&&n(),e?e.__c:null}function qi(e,t,n){return _.hydrate(e,t),typeof n=="function"&&n(),e?e.__c:null}_.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(_.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var jo=_.options.event;function Ea(){}function Ra(){return this.cancelBubble}function $a(){return this.defaultPrevented}_.options.event=function(e){return jo&&(e=jo(e)),e.persist=Ea,e.isPropagationStopped=Ra,e.isDefaultPrevented=$a,e.nativeEvent=e};var to,Ta={enumerable:!1,configurable:!0,get:function(){return this.class}},Uo=_.options.vnode;_.options.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={},i=r.indexOf("-")===-1;for(var l in n){var s=n[l];if(!(l==="value"&&"defaultValue"in n&&s==null||Ca&&l==="children"&&r==="noscript"||l==="class"||l==="className")){var a=l.toLowerCase();l==="defaultValue"&&"value"in n&&n.value==null?l="value":l==="download"&&s===!0?s="":a==="translate"&&s==="no"?s=!1:a[0]==="o"&&a[1]==="n"?a==="ondoubleclick"?l="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||Sa(n.type)?a==="onfocus"?l="onfocusin":a==="onblur"?l="onfocusout":xa.test(l)&&(l=a):a=l="oninput":i&&ya.test(l)?l=l.replace(_a,"-$&").toLowerCase():s===null&&(s=void 0),a==="oninput"&&o[l=a]&&(l="oninputCapture"),o[l]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=_.toChildArray(n.children).forEach(function(u){u.props.selected=o.value.indexOf(u.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=_.toChildArray(n.children).forEach(function(u){u.props.selected=o.multiple?o.defaultValue.indexOf(u.props.value)!=-1:o.defaultValue==u.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Ta)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=Gi,Uo&&Uo(e)};var Wo=_.options.__r;_.options.__r=function(e){Wo&&Wo(e),to=e.__c};var Go=_.options.diffed;_.options.diffed=function(e){Go&&Go(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),to=null};var Ki={ReactCurrentDispatcher:{current:{readContext:function(e){return to.__n[e.__c].props.value},useCallback:oe,useContext:se,useDebugValue:Kr,useDeferredValue:Zr,useEffect:re,useId:Te,useImperativeHandle:qr,useInsertionEffect:Qr,useLayoutEffect:Ke,useMemo:W,useReducer:nt,useRef:k,useState:U,useSyncExternalStore:Nn,useTransition:Jr}}},Ia="18.3.1";function Yi(e){return _.createElement.bind(null,e)}function Lt(e){return!!e&&e.$$typeof===Gi}function Xi(e){return Lt(e)&&e.type===_.Fragment}function Zi(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function no(e){return Lt(e)?_.cloneElement.apply(null,arguments):e}function ro(e){return!!e.__k&&(_.render(null,e),!0)}function Ji(e){return e&&(e.base||e.nodeType===1&&e)||null}var Qi=function(e,t){return e(t)},Ae=function(e,t){return e(t)},el=_.Fragment,tl=Lt,D={useState:U,useId:Te,useReducer:nt,useEffect:re,useLayoutEffect:Ke,useInsertionEffect:Qr,useTransition:Jr,useDeferredValue:Zr,useSyncExternalStore:Nn,startTransition:Xr,useRef:k,useImperativeHandle:qr,useMemo:W,useCallback:oe,useContext:se,useDebugValue:Kr,version:"18.3.1",Children:zi,render:eo,hydrate:qi,unmountComponentAtNode:ro,createPortal:sn,createElement:_.createElement,createContext:_.createContext,createFactory:Yi,cloneElement:no,createRef:_.createRef,Fragment:_.Fragment,isValidElement:Lt,isElement:tl,isFragment:Xi,isMemo:Zi,findDOMNode:Ji,Component:_.Component,PureComponent:$n,memo:Hi,forwardRef:ce,flushSync:Ae,unstable_batchedUpdates:Qi,StrictMode:el,Suspense:Xt,SuspenseList:It,lazy:Wi,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ki};const yr=Object.freeze(Object.defineProperty({__proto__:null,Children:zi,Component:_.Component,Fragment:_.Fragment,PureComponent:$n,StrictMode:el,Suspense:Xt,SuspenseList:It,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ki,cloneElement:no,createContext:_.createContext,createElement:_.createElement,createFactory:Yi,createPortal:sn,createRef:_.createRef,default:D,findDOMNode:Ji,flushSync:Ae,forwardRef:ce,hydrate:qi,isElement:tl,isFragment:Xi,isMemo:Zi,isValidElement:Lt,lazy:Wi,memo:Hi,render:eo,startTransition:Xr,unmountComponentAtNode:ro,unstable_batchedUpdates:Qi,useCallback:oe,useContext:se,useDebugValue:Kr,useDeferredValue:Zr,useEffect:re,useErrorBoundary:pa,useId:Te,useImperativeHandle:qr,useInsertionEffect:Qr,useLayoutEffect:Ke,useMemo:W,useReducer:nt,useRef:k,useState:U,useSyncExternalStore:Nn,useTransition:Jr,version:Ia},Symbol.toStringTag,{value:"Module"}));function Fa(e){return{render:function(t){eo(t,e)},unmount:function(){ro(e)}}}var Oa=0;function f(e,t,n,r,o,i){t||(t={});var l,s,a=t;if("ref"in a)for(s in a={},t)s=="ref"?l=t[s]:a[s]=t[s];var u={type:e,props:a,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Oa,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(l=e.defaultProps))for(s in l)a[s]===void 0&&(a[s]=l[s]);return _.options.vnode&&_.options.vnode(u),u}function nl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=nl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ma(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=nl(e))&&(r&&(r+=" "),r+=t);return r}const qo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ko=Ma,_t=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ko(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,l=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],p=i==null?void 0:i[u];if(c===null)return null;const g=qo(c)||qo(p);return o[u][g]}),s=n&&Object.entries(n).reduce((u,c)=>{let[p,g]=c;return g===void 0||(u[p]=g),u},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:p,className:g,...d}=c;return Object.entries(d).every(m=>{let[h,w]=m;return Array.isArray(w)?w.includes({...i,...s}[h]):{...i,...s}[h]===w})?[...u,p,g]:u},[]);return Ko(e,l,a,n==null?void 0:n.class,n==null?void 0:n.className)},Pa=_t("text-center inline-block font-semibold px-3 py-2 rounded-md text-sm",{variants:{variant:{primary:"shadow-xs bg-hello-csv-primary text-white",secondary:"bg-white text-hello-csv-primary ring-1 shadow-xs ring-bg-hello-csv-primary ring-inset",tertiary:"bg-white text-gray-900 ring-1 shadow-xs ring-hello-csv-tertiary ring-inset",success:"shadow-xs bg-hello-csv-success text-white",danger:"shadow-xs bg-hello-csv-danger text-white"},withFullWidth:{true:"w-full",false:""},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:"cursor-pointer"}},compoundVariants:[{variant:"primary",disabled:!1,className:"hover:bg-hello-csv-primary-light focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-hello-csv-primary"},{variant:"secondary",disabled:!1,className:"hover:opacity-80 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-hello-csv-secondary"},{variant:"tertiary",disabled:!1,className:"hover:bg-hello-csv-tertiary-light"},{variant:"success",disabled:!1,className:"hover:opacity-80 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-hello-csv-success"},{variant:"danger",disabled:!1,className:"hover:bg-hello-csv-danger-light focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-hello-csv-danger"}],defaultVariants:{withFullWidth:!1,variant:"primary",disabled:!1}});function De({children:e,variant:t,disabled:n,onClick:r,withFullWidth:o}){const i=Pa({variant:t,disabled:n,withFullWidth:o});return f("div",{role:"button",tabIndex:0,className:i,onClick:r,"aria-disabled":n,children:e})}const Aa=_t("overflow-hidden rounded-md border border-gray-200",{variants:{variant:{default:"bg-white",muted:"bg-hello-csv-muted"},withPadding:{true:"px-4 py-5 sm:p-6",false:""}},defaultVariants:{variant:"default",withPadding:!0}}),rl=ce(({children:e,className:t,variant:n,withPadding:r=!0},o)=>{const i=Aa({variant:n,withPadding:r});return f("div",{ref:o,className:`${i} ${t}`,children:e})});function ol({checked:e,setChecked:t,label:n}){const r=Te();return f("div",{className:"flex gap-3",children:[f("div",{className:"flex h-6 shrink-0 items-center",children:f("div",{className:"group grid size-4 grid-cols-1",children:[f("input",{checked:e,onChange:o=>t(o.target.checked),id:r,type:"checkbox",className:"checked:border-hello-csv-primary checked:bg-hello-csv-primary indeterminate:border-hello-csv-primary indeterminate:bg-hello-csv-primary focus-visible:outline-hello-csv-hello-csv-primary col-start-1 row-start-1 appearance-none rounded-sm border border-gray-300 bg-white focus-visible:outline-2 focus-visible:outline-offset-2 disabled:border-gray-300 disabled:bg-gray-100 disabled:checked:bg-gray-100 forced-colors:appearance-auto"}),f("svg",{fill:"none",viewBox:"0 0 14 14",className:"pointer-events-none col-start-1 row-start-1 size-3.5 self-center justify-self-center stroke-white group-has-disabled:stroke-gray-950/25",children:[f("path",{d:"M3 8L6 11L11 3.5",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-0 group-has-checked:opacity-100"}),f("path",{d:"M3 7H11",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-0 group-has-indeterminate:opacity-100"})]})]})}),n&&f("div",{className:"text-sm/6",children:f("label",{htmlFor:r,className:"font-medium text-gray-900",children:n})})]})}let Na=!1;function oo(){return Na}const il=typeof document<"u"?D.useLayoutEffect:()=>{};function ka(e){const t=k(null);return il(()=>{t.current=e},[e]),oe((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const dt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},gt=e=>e&&"window"in e&&e.window===e?e:dt(e).defaultView||window;function Da(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function La(e){return Da(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function ll(e,t){if(!oo())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:La(n)?n=n.host:n=n.parentNode}return!1}const xr=(e=document)=>{var t;if(!oo())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function sl(e){return oo()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Va(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function Ha(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function al(e){let t=null;return()=>(t==null&&(t=e()),t)}const za=al(function(){return Ha(/^Mac/i)}),Ba=al(function(){return Va(/Android/i)});function ul(){let e=k(new Map),t=oe((o,i,l,s)=>{let a=s!=null&&s.once?(...u)=>{e.current.delete(l),l(...u)}:l;e.current.set(l,{type:i,eventTarget:o,fn:a,options:s}),o.addEventListener(i,a,s)},[]),n=oe((o,i,l,s)=>{var a;let u=((a=e.current.get(l))===null||a===void 0?void 0:a.fn)||l;o.removeEventListener(i,u,s),e.current.delete(l)},[]),r=oe(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return re(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function ja(e){return e.mozInputSource===0&&e.isTrusted?!0:Ba()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function cl(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Ua(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function dl(e){let t=k({isFocused:!1,observer:null});il(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=ka(r=>{e==null||e(r)});return oe(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=l=>{if(t.current.isFocused=!1,o.disabled){let s=cl(l);n(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var l;(l=t.current.observer)===null||l===void 0||l.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let Wa=!1,an=null,_r=new Set,Zt=new Map,wt=!1,Cr=!1;const Ga={Tab:!0,Escape:!0};function io(e,t){for(let n of _r)n(e,t)}function qa(e){return!(e.metaKey||!za()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Tn(e){wt=!0,qa(e)&&(an="keyboard",io("keyboard",e))}function Ot(e){an="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(wt=!0,io("pointer",e))}function fl(e){ja(e)&&(wt=!0,an="virtual")}function pl(e){e.target===window||e.target===document||Wa||!e.isTrusted||(!wt&&!Cr&&(an="virtual",io("virtual",e)),wt=!1,Cr=!1)}function ml(){wt=!1,Cr=!0}function Sr(e){if(typeof window>"u"||Zt.get(gt(e)))return;const t=gt(e),n=dt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){wt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Tn,!0),n.addEventListener("keyup",Tn,!0),n.addEventListener("click",fl,!0),t.addEventListener("focus",pl,!0),t.addEventListener("blur",ml,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",Ot,!0),n.addEventListener("pointermove",Ot,!0),n.addEventListener("pointerup",Ot,!0)),t.addEventListener("beforeunload",()=>{gl(e)},{once:!0}),Zt.set(t,{focus:r})}const gl=(e,t)=>{const n=gt(e),r=dt(e);t&&r.removeEventListener("DOMContentLoaded",t),Zt.has(n)&&(n.HTMLElement.prototype.focus=Zt.get(n).focus,r.removeEventListener("keydown",Tn,!0),r.removeEventListener("keyup",Tn,!0),r.removeEventListener("click",fl,!0),n.removeEventListener("focus",pl,!0),n.removeEventListener("blur",ml,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",Ot,!0),r.removeEventListener("pointermove",Ot,!0),r.removeEventListener("pointerup",Ot,!0)),Zt.delete(n))};function Ka(e){const t=dt(e);let n;return t.readyState!=="loading"?Sr(e):(n=()=>{Sr(e)},t.addEventListener("DOMContentLoaded",n)),()=>gl(e,n)}typeof document<"u"&&Ka();function hl(){return an!=="pointer"}const Ya=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Xa(e,t,n){let r=dt(n==null?void 0:n.target);const o=typeof window<"u"?gt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?gt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?gt(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window<"u"?gt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!Ya.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof l&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof s&&!Ga[n.key])}function Za(e,t,n){Sr(),re(()=>{let r=(o,i)=>{Xa(!!(n!=null&&n.isTextInput),o,i)&&e(hl())};return _r.add(r),()=>{_r.delete(r)}},t)}function Ja(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=oe(a=>{if(a.target===a.currentTarget)return r&&r(a),o&&o(!1),!0},[r,o]),l=dl(i),s=oe(a=>{const u=dt(a.target),c=u?xr(u):xr();a.target===a.currentTarget&&c===sl(a.nativeEvent)&&(n&&n(a),o&&o(!0),l(a))},[o,n,l]);return{focusProps:{onFocus:!t&&(n||o||r)?s:void 0,onBlur:!t&&(r||o)?i:void 0}}}function Qa(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=k({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=ul(),a=oe(p=>{p.currentTarget.contains(p.target)&&i.current.isFocusWithin&&!p.currentTarget.contains(p.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(p),o&&o(!1))},[n,o,i,s]),u=dl(a),c=oe(p=>{if(!p.currentTarget.contains(p.target))return;const g=dt(p.target),d=xr(g);if(!i.current.isFocusWithin&&d===sl(p.nativeEvent)){r&&r(p),o&&o(!0),i.current.isFocusWithin=!0,u(p);let m=p.currentTarget;l(g,"focus",h=>{if(i.current.isFocusWithin&&!ll(m,h.target)){let w=new g.defaultView.FocusEvent("blur",{relatedTarget:h.target});Ua(w,m);let C=cl(w);a(C)}},{capture:!0})}},[r,o,u,l,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:a}}}let Er=!1,tr=0;function eu(){Er=!0,setTimeout(()=>{Er=!1},50)}function Yo(e){e.pointerType==="touch"&&eu()}function tu(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",Yo),tr++,()=>{tr--,!(tr>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",Yo)}}function vl(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,l]=U(!1),s=k({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;re(tu,[]);let{addGlobalListener:a,removeAllGlobalListeners:u}=ul(),{hoverProps:c,triggerHoverEnd:p}=W(()=>{let g=(h,w)=>{if(s.pointerType=w,o||w==="touch"||s.isHovered||!h.currentTarget.contains(h.target))return;s.isHovered=!0;let C=h.currentTarget;s.target=C,a(dt(h.target),"pointerover",S=>{s.isHovered&&s.target&&!ll(s.target,S.target)&&d(S,S.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:C,pointerType:w}),n&&n(!0),l(!0)},d=(h,w)=>{let C=s.target;s.pointerType="",s.target=null,!(w==="touch"||!s.isHovered||!C)&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:C,pointerType:w}),n&&n(!1),l(!1))},m={};return typeof PointerEvent<"u"&&(m.onPointerEnter=h=>{Er&&h.pointerType==="mouse"||g(h,h.pointerType)},m.onPointerLeave=h=>{!o&&h.currentTarget.contains(h.target)&&d(h,h.pointerType)}),{hoverProps:m,triggerHoverEnd:d}},[t,n,r,o,s,a,u]);return re(()=>{o&&p({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}function wl(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=k({isFocused:!1,isFocusVisible:t||hl()}),[i,l]=U(!1),[s,a]=U(()=>o.current.isFocused&&o.current.isFocusVisible),u=oe(()=>a(o.current.isFocused&&o.current.isFocusVisible),[]),c=oe(d=>{o.current.isFocused=d,l(d),u()},[u]);Za(d=>{o.current.isFocusVisible=d,u()},[],{isTextInput:n});let{focusProps:p}=Ja({isDisabled:r,onFocusChange:c}),{focusWithinProps:g}=Qa({isDisabled:!r,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:s,focusProps:r?g:p}}var nu=Object.defineProperty,ru=(e,t,n)=>t in e?nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nr=(e,t,n)=>(ru(e,typeof t!="symbol"?t+"":t,n),n);let ou=class{constructor(){nr(this,"current",this.detect()),nr(this,"handoffState","pending"),nr(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},vt=new ou;function Vt(e){return vt.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function kn(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Ge(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return kn(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Ge();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Ct(){let[e]=U(Ge);return re(()=>()=>e.dispose(),[e]),e}let ue=(e,t)=>{vt.isServer?re(e,t):Ke(e,t)};function ft(e){let t=k(e);return ue(()=>{t.current=e},[e]),t}let j=function(e){let t=ft(e);return D.useCallback((...n)=>t.current(...n),[t])};function iu(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function lu(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function su({disabled:e=!1}={}){let t=k(null),[n,r]=U(!1),o=Ct(),i=j(()=>{t.current=null,r(!1),o.dispose()}),l=j(s=>{if(o.dispose(),t.current===null){t.current=s.currentTarget,r(!0);{let a=Vt(s.currentTarget);o.addEventListener(a,"pointerup",i,!1),o.addEventListener(a,"pointermove",u=>{if(t.current){let c=iu(u);r(lu(c,t.current.getBoundingClientRect()))}},!1),o.addEventListener(a,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:l,onPointerUp:i,onClick:i}}}let au=_.createContext(void 0);function lo(){return se(au)}function Rr(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Pe(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Pe),r}var Nt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Nt||{}),it=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(it||{});function xe(){let e=cu();return oe(t=>uu({mergeRefs:e,...t}),[e])}function uu({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??du;let a=bl(t,e);if(i)return wn(a,n,r,l,s);let u=o??0;if(u&2){let{static:c=!1,...p}=a;if(c)return wn(p,n,r,l,s)}if(u&1){let{unmount:c=!0,...p}=a;return Pe(c?0:1,{0(){return null},1(){return wn({...p,hidden:!0,style:{display:"none"}},n,r,l,s)}})}return wn(a,n,r,l,s)}function wn(e,t={},n,r,o){let{as:i=n,children:l,refName:s="ref",...a}=rr(e,["unmount","static"]),u=e.ref!==void 0?{[s]:e.ref}:{},c=typeof l=="function"?l(t):l;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(t)),a["aria-labelledby"]&&a["aria-labelledby"]===a.id&&(a["aria-labelledby"]=void 0);let p={};if(t){let g=!1,d=[];for(let[m,h]of Object.entries(t))typeof h=="boolean"&&(g=!0),h===!0&&d.push(m.replace(/([A-Z])/g,w=>`-${w.toLowerCase()}`));if(g){p["data-headlessui-state"]=d.join(" ");for(let m of d)p[`data-${m}`]=""}}if(i===_.Fragment&&(Object.keys(ot(a)).length>0||Object.keys(ot(p)).length>0))if(!Lt(c)||Array.isArray(c)&&c.length>1){if(Object.keys(ot(a)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(ot(a)).concat(Object.keys(ot(p))).map(g=>` - ${g}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(` `)].join(` `))}else{let g=c.props,d=g==null?void 0:g.className,m=typeof d=="function"?(...C)=>Rr(d(...C),a.className):Rr(d,a.className),h=m?{className:m}:{},w=bl(c.props,ot(rr(a,["ref"])));for(let C in p)C in w&&delete p[C];return no(c,Object.assign({},w,p,u,{ref:o(fu(c),u.ref)},h))}return _.createElement(i,Object.assign({},rr(a,["ref"]),i!==_.Fragment&&u,i!==_.Fragment&&p),c)}function cu(){let e=k([]),t=oe(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function du(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function bl(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function so(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let l of i)l==null||l(...o)}});return t}function be(e){var t;return Object.assign(ce(e),{displayName:(t=e.displayName)!=null?t:e.name})}function ot(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function rr(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function fu(e){return D.version.split(".")[0]>="19"?e.props.ref:e.ref}function pu(e,t,n){let[r,o]=U(n),i=e!==void 0,l=k(i),s=k(!1),a=k(!1);return i&&!l.current&&!s.current?(s.current=!0,l.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&l.current&&!a.current&&(a.current=!0,l.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,j(u=>(i||o(u),t==null?void 0:t(u)))]}function mu(e){let[t]=U(e);return t}function yl(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))_l(n,xl(t,r),o);return n}function xl(e,t){return e?e+"["+t+"]":t}function _l(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())_l(e,xl(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):yl(n,t,e)}let gu="span";var kt=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(kt||{});function hu(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return xe()({ourProps:i,theirProps:o,slot:{},defaultTag:gu,name:"Hidden"})}let tn=be(hu),vu=_.createContext(null);function wu({children:e}){let t=se(vu);if(!t)return D.createElement(D.Fragment,null,e);let{target:n}=t;return n?sn(D.createElement(D.Fragment,null,e),n):null}function bu({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[i,l]=U(null),s=Ct();return re(()=>{if(r&&i)return s.addEventListener(i,"reset",r)},[i,t,r]),D.createElement(wu,null,D.createElement(yu,{setForm:l,formId:t}),yl(e).map(([a,u])=>D.createElement(tn,{features:kt.Hidden,...ot({key:a,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:a,value:u,...o})})))}function yu({setForm:e,formId:t}){return re(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:D.createElement(tn,{features:kt.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let xu=_.createContext(void 0);function Cl(){return se(xu)}function _u(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&Cu(n)?!1:r}function Cu(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Sl=Symbol();function Su(e,t=!0){return Object.assign(e,{[Sl]:t})}function Oe(...e){let t=k(e);re(()=>{t.current=e},[e]);let n=j(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Sl]))?void 0:n}let Dn=_.createContext(null);Dn.displayName="DescriptionContext";function El(){let e=se(Dn);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,El),t}return e}function Eu(){var e,t;return(t=(e=se(Dn))==null?void 0:e.value)!=null?t:void 0}function Ru(){let[e,t]=U([]);return[e.length>0?e.join(" "):void 0,W(()=>function(n){let r=j(i=>(t(l=>[...l,i]),()=>t(l=>{let s=l.slice(),a=s.indexOf(i);return a!==-1&&s.splice(a,1),s}))),o=W(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return D.createElement(Dn.Provider,{value:o},n.children)},[t])]}let $u="p";function Tu(e,t){let n=Te(),r=lo(),{id:o=`headlessui-description-${n}`,...i}=e,l=El(),s=Oe(t);ue(()=>l.register(o),[o,l.register]);let a=r||!1,u=W(()=>({...l.slot,disabled:a}),[l.slot,a]),c={ref:s,...l.props,id:o};return xe()({ourProps:c,theirProps:i,slot:u,defaultTag:$u,name:l.name||"Description"})}let Iu=be(Tu),Fu=Object.assign(Iu,{});var Re=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Re||{});let Ln=_.createContext(null);Ln.displayName="LabelContext";function Rl(){let e=se(Ln);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Rl),t}return e}function Vn(e){var t,n,r;let o=(n=(t=se(Ln))==null?void 0:t.value)!=null?n:void 0;return((r=e==null?void 0:e.length)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function Ou({inherit:e=!1}={}){let t=Vn(),[n,r]=U([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,W(()=>function(i){let l=j(a=>(r(u=>[...u,a]),()=>r(u=>{let c=u.slice(),p=c.indexOf(a);return p!==-1&&c.splice(p,1),c}))),s=W(()=>({register:l,slot:i.slot,name:i.name,props:i.props,value:i.value}),[l,i.slot,i.name,i.props,i.value]);return D.createElement(Ln.Provider,{value:s},i.children)},[r])]}let Mu="label";function Pu(e,t){var n;let r=Te(),o=Rl(),i=Cl(),l=lo(),{id:s=`headlessui-label-${r}`,htmlFor:a=i??((n=o.props)==null?void 0:n.htmlFor),passive:u=!1,...c}=e,p=Oe(t);ue(()=>o.register(s),[s,o.register]);let g=j(w=>{let C=w.currentTarget;if(C instanceof HTMLLabelElement&&w.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(w),C instanceof HTMLLabelElement){let S=document.getElementById(C.htmlFor);if(S){let x=S.getAttribute("disabled");if(x==="true"||x==="")return;let E=S.getAttribute("aria-disabled");if(E==="true"||E==="")return;(S instanceof HTMLInputElement&&(S.type==="radio"||S.type==="checkbox")||S.role==="radio"||S.role==="checkbox"||S.role==="switch")&&S.click(),S.focus({preventScroll:!0})}}}),d=l||!1,m=W(()=>({...o.slot,disabled:d}),[o.slot,d]),h={ref:p,...o.props,id:s,htmlFor:a,onClick:g};return u&&("onClick"in h&&(delete h.htmlFor,delete h.onClick),"onClick"in c&&delete c.onClick),xe()({ourProps:h,theirProps:c,slot:m,defaultTag:a?Mu:"div",name:o.name||"Label"})}let Au=be(Pu),Nu=Object.assign(Au,{}),ku=_.createContext(()=>{});function Du({value:e,children:t}){return D.createElement(ku.Provider,{value:e},t)}function Tt(e,t,n){let r=n.initialDeps??[],o;function i(){var l,s,a,u;let c;n.key&&((l=n.debug)!=null&&l.call(n))&&(c=Date.now());const p=e();if(!(p.length!==r.length||p.some((m,h)=>r[h]!==m)))return o;r=p;let d;if(n.key&&((s=n.debug)!=null&&s.call(n))&&(d=Date.now()),o=t(...p),n.key&&((a=n.debug)!=null&&a.call(n))){const m=Math.round((Date.now()-c)*100)/100,h=Math.round((Date.now()-d)*100)/100,w=h/16,C=(S,x)=>{for(S=String(S);S.length<x;)S=" "+S;return S};console.info(`%c⏱ ${C(h,5)} /${C(m,5)} ms`,` font-size: .6rem; font-weight: bold; color: hsl(${Math.max(0,Math.min(120-120*w,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(u=n==null?void 0:n.onChange)==null||u.call(n,o),o}return i.updateDeps=l=>{r=l},i}function Xo(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Lu=(e,t)=>Math.abs(e-t)<=1,Vu=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}};var Gt={NODE_ENV:"production"};const Zo=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Hu=e=>e,zu=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},Bu=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=l=>{const{width:s,height:a}=l;t({width:Math.round(s),height:Math.round(a)})};if(o(Zo(n)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(l=>{const s=()=>{const a=l[0];if(a!=null&&a.borderBoxSize){const u=a.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(Zo(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},Jo={passive:!0},Qo=typeof window>"u"?!0:"onscrollend"in window,ju=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const i=e.options.useScrollendEvent&&Qo?()=>{}:Vu(r,()=>{t(o,!1)},e.options.isScrollingResetDelay),l=c=>()=>{const{horizontal:p,isRtl:g}=e.options;o=p?n.scrollLeft*(g&&-1||1):n.scrollTop,i(),t(o,c)},s=l(!0),a=l(!1);a(),n.addEventListener("scroll",s,Jo);const u=e.options.useScrollendEvent&&Qo;return u&&n.addEventListener("scrollend",a,Jo),()=>{n.removeEventListener("scroll",s),u&&n.removeEventListener("scrollend",a)}},Uu=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Wu=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const l=e+t;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:l,behavior:n})};class Gu{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{const l=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var o;(o=r())==null||o.disconnect(),n=null},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,o])=>{typeof o>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Hu,rangeExtractor:zu,onChange:()=>{},measureElement:Uu,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,o;(o=(r=this.options).onChange)==null||o.call(r,this,n)},this.maybeNotify=Tt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:Gt.NODE_ENV!=="production",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const o=new Map,i=new Map;for(let l=r-1;l>=0;l--){const s=n[l];if(o.has(s.lane))continue;const a=i.get(s.lane);if(a==null||s.end>a.end?i.set(s.lane,s):s.end<a.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((l,s)=>l.end===s.end?l.index-s.index:l.end-s.end)[0]:void 0},this.getMeasurementOptions=Tt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,o,i,l)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l}),{key:!1}),this.getMeasurements=Tt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l},s)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const a=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,a);for(let c=a;c<n;c++){const p=i(c),g=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),d=g?g.end+this.options.gap:r+o,m=s.get(p),h=typeof m=="number"?m:this.options.estimateSize(c),w=d+h,C=g?g.lane:c%this.options.lanes;u[c]={index:c,start:d,size:h,end:w,key:p,lane:C}}return this.measurementsCache=u,u},{key:Gt.NODE_ENV!=="production",debug:()=>this.options.debug}),this.calculateRange=Tt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,o,i)=>this.range=n.length>0&&r>0?qu({measurements:n,outerSize:r,scrollOffset:o,lanes:i}):null,{key:Gt.