cecomponent 2.0.28 → 2.0.29
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/ce-component-lib.js +1 -1
- package/dist/ce-component-lib.mjs +35 -80
- package/package.json +1 -1
package/dist/ce-component-lib.js
CHANGED
|
@@ -33,7 +33,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
33
33
|
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let _=useLocation(),E;E=_;let S=E.pathname||"/",b=S;if(d!=="/"){let R=d.replace(/^\//,"").split("/");b="/"+S.replace(/^\//,"").split("/").slice(R.length).join("/")}let T=matchRoutes(e,{pathname:b});return warning$1(g||T!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),warning$1(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${E.pathname}${E.search}${E.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),_renderMatches(T&&T.map(R=>Object.assign({},R,{params:Object.assign({},p,R.params),pathname:joinPaths([d,l.encodeLocation?l.encodeLocation(R.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?d:joinPaths([d,l.encodeLocation?l.encodeLocation(R.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),u,n,i,o)}function DefaultErrorComponent(){let e=useRouteError(),t=isRouteErrorResponse(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},l={padding:"2px 4px",backgroundColor:i},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("p",null,"💿 Hey developer 👋"),React__namespace.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",React__namespace.createElement("code",{style:l},"ErrorBoundary")," or"," ",React__namespace.createElement("code",{style:l},"errorElement")," prop on your route.")),React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("h2",null,"Unexpected Application Error!"),React__namespace.createElement("h3",{style:{fontStyle:"italic"}},t),n?React__namespace.createElement("pre",{style:o},n):null,u)}var defaultErrorElement=React__namespace.createElement(DefaultErrorComponent,null),RenderErrorBoundary=class extends React__namespace.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?React__namespace.createElement(RouteContext.Provider,{value:this.props.routeContext},React__namespace.createElement(RouteErrorContext.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function RenderedRoute({routeContext:e,match:t,children:n}){let i=React__namespace.useContext(DataRouterContext);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),React__namespace.createElement(RouteContext.Provider,{value:e},n)}function _renderMatches(e,t=[],n=null,i=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,u=n==null?void 0:n.errors;if(u!=null){let m=l.findIndex(d=>d.route.id&&(u==null?void 0:u[d.route.id])!==void 0);invariant$1(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),l=l.slice(0,Math.min(l.length,m+1))}let f=!1,p=-1;if(n)for(let m=0;m<l.length;m++){let d=l[m];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(p=m),d.route.id){let{loaderData:g,errors:_}=n,E=d.route.loader&&!g.hasOwnProperty(d.route.id)&&(!_||_[d.route.id]===void 0);if(d.route.lazy||E){f=!0,p>=0?l=l.slice(0,p+1):l=[l[0]];break}}}return l.reduceRight((m,d,g)=>{let _,E=!1,S=null,b=null;n&&(_=u&&d.route.id?u[d.route.id]:void 0,S=d.route.errorElement||defaultErrorElement,f&&(p<0&&g===0?(warningOnce("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,b=null):p===g&&(E=!0,b=d.route.hydrateFallbackElement||null)));let T=t.concat(l.slice(0,g+1)),C=()=>{let R;return _?R=S:E?R=b:d.route.Component?R=React__namespace.createElement(d.route.Component,null):d.route.element?R=d.route.element:R=m,React__namespace.createElement(RenderedRoute,{match:d,routeContext:{outlet:m,matches:T,isDataRoute:n!=null},children:R})};return n&&(d.route.ErrorBoundary||d.route.errorElement||g===0)?React__namespace.createElement(RenderErrorBoundary,{location:n.location,revalidation:n.revalidation,component:S,error:_,children:C(),routeContext:{outlet:null,matches:T,isDataRoute:!0},unstable_onError:i}):C()},null)}function getDataRouterConsoleError(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext(e){let t=React__namespace.useContext(DataRouterContext);return invariant$1(t,getDataRouterConsoleError(e)),t}function useDataRouterState(e){let t=React__namespace.useContext(DataRouterStateContext);return invariant$1(t,getDataRouterConsoleError(e)),t}function useRouteContext(e){let t=React__namespace.useContext(RouteContext);return invariant$1(t,getDataRouterConsoleError(e)),t}function useCurrentRouteId(e){let t=useRouteContext(e),n=t.matches[t.matches.length-1];return invariant$1(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function useRouteId(){return useCurrentRouteId("useRouteId")}function useRouteError(){var i;let e=React__namespace.useContext(RouteErrorContext),t=useDataRouterState("useRouteError"),n=useCurrentRouteId("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[n]}function useNavigateStable(){let{router:e}=useDataRouterContext("useNavigate"),t=useCurrentRouteId("useNavigate"),n=React__namespace.useRef(!1);return useIsomorphicLayoutEffect$1(()=>{n.current=!0}),React__namespace.useCallback(async(o,l={})=>{warning$1(n.current,navigateEffectWarning),n.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...l}))},[e,t])}var alreadyWarned={};function warningOnce(e,t,n){!t&&!alreadyWarned[e]&&(alreadyWarned[e]=!0,warning$1(!1,n))}React__namespace.memo(DataRoutes);function DataRoutes({routes:e,future:t,state:n,unstable_onError:i}){return useRoutesImpl(e,void 0,n,i,t)}var defaultMethod="get",defaultEncType="application/x-www-form-urlencoded";function isHtmlElement(e){return e!=null&&typeof e.tagName=="string"}function isButtonElement(e){return isHtmlElement(e)&&e.tagName.toLowerCase()==="button"}function isFormElement(e){return isHtmlElement(e)&&e.tagName.toLowerCase()==="form"}function isInputElement(e){return isHtmlElement(e)&&e.tagName.toLowerCase()==="input"}function isModifiedEvent(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function shouldProcessLinkClick(e,t){return e.button===0&&(!t||t==="_self")&&!isModifiedEvent(e)}var _formDataSupportsSubmitter=null;function isFormDataSubmitterSupported(){if(_formDataSupportsSubmitter===null)try{new FormData(document.createElement("form"),0),_formDataSupportsSubmitter=!1}catch{_formDataSupportsSubmitter=!0}return _formDataSupportsSubmitter}var supportedFormEncTypes=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function getFormEncType(e){return e!=null&&!supportedFormEncTypes.has(e)?(warning$1(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`),null):e}function getFormSubmissionInfo(e,t){let n,i,o,l,u;if(isFormElement(e)){let f=e.getAttribute("action");i=f?stripBasename(f,t):null,n=e.getAttribute("method")||defaultMethod,o=getFormEncType(e.getAttribute("enctype"))||defaultEncType,l=new FormData(e)}else if(isButtonElement(e)||isInputElement(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||f.getAttribute("action");if(i=p?stripBasename(p,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||defaultMethod,o=getFormEncType(e.getAttribute("formenctype"))||getFormEncType(f.getAttribute("enctype"))||defaultEncType,l=new FormData(f,e),!isFormDataSubmitterSupported()){let{name:m,type:d,value:g}=e;if(d==="image"){let _=m?`${m}.`:"";l.append(`${_}x`,"0"),l.append(`${_}y`,"0")}else m&&l.append(m,g)}}else{if(isHtmlElement(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=defaultMethod,i=null,o=defaultEncType,u=e}return l&&o==="text/plain"&&(u=l,l=void 0),{action:i,method:n.toLowerCase(),encType:o,formData:l,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function invariant2(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function singleFetchUrl(e,t,n){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i.pathname==="/"?i.pathname=`_root.${n}`:t&&stripBasename(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${n}`,i}async function loadRouteModule(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function isHtmlLinkDescriptor(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function getKeyedPrefetchLinks(e,t,n){let i=await Promise.all(e.map(async o=>{let l=t.routes[o.route.id];if(l){let u=await loadRouteModule(l,n);return u.links?u.links():[]}return[]}));return dedupeLinkDescriptors(i.flat(1).filter(isHtmlLinkDescriptor).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function getNewMatchesForLinks(e,t,n,i,o,l){let u=(p,m)=>n[m]?p.route.id!==n[m].route.id:!0,f=(p,m)=>{var d;return n[m].pathname!==p.pathname||((d=n[m].route.path)==null?void 0:d.endsWith("*"))&&n[m].params["*"]!==p.params["*"]};return l==="assets"?t.filter((p,m)=>u(p,m)||f(p,m)):l==="data"?t.filter((p,m)=>{var g;let d=i.routes[p.route.id];if(!d||!d.hasLoader)return!1;if(u(p,m)||f(p,m))return!0;if(p.route.shouldRevalidate){let _=p.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function getModuleLinkHrefs(e,t,{includeHydrateFallback:n}={}){return dedupeHrefs(e.map(i=>{let o=t.routes[i.route.id];if(!o)return[];let l=[o.module];return o.clientActionModule&&(l=l.concat(o.clientActionModule)),o.clientLoaderModule&&(l=l.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(l=l.concat(o.hydrateFallbackModule)),o.imports&&(l=l.concat(o.imports)),l}).flat(1))}function dedupeHrefs(e){return[...new Set(e)]}function sortKeys(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function dedupeLinkDescriptors(e,t){let n=new Set;return new Set(t),e.reduce((i,o)=>{let l=JSON.stringify(sortKeys(o));return n.has(l)||(n.add(l),i.push({key:l,link:o})),i},[])}function useDataRouterContext2(){let e=React__namespace.useContext(DataRouterContext);return invariant2(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function useDataRouterStateContext(){let e=React__namespace.useContext(DataRouterStateContext);return invariant2(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var FrameworkContext=React__namespace.createContext(void 0);FrameworkContext.displayName="FrameworkContext";function useFrameworkContext(){let e=React__namespace.useContext(FrameworkContext);return invariant2(e,"You must render this element inside a <HydratedRouter> element"),e}function usePrefetchBehavior(e,t){let n=React__namespace.useContext(FrameworkContext),[i,o]=React__namespace.useState(!1),[l,u]=React__namespace.useState(!1),{onFocus:f,onBlur:p,onMouseEnter:m,onMouseLeave:d,onTouchStart:g}=t,_=React__namespace.useRef(null);React__namespace.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let b=C=>{C.forEach(R=>{u(R.isIntersecting)})},T=new IntersectionObserver(b,{threshold:.5});return _.current&&T.observe(_.current),()=>{T.disconnect()}}},[e]),React__namespace.useEffect(()=>{if(i){let b=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(b)}}},[i]);let E=()=>{o(!0)},S=()=>{o(!1),u(!1)};return n?e!=="intent"?[l,_,{}]:[l,_,{onFocus:composeEventHandlers(f,E),onBlur:composeEventHandlers(p,S),onMouseEnter:composeEventHandlers(m,E),onMouseLeave:composeEventHandlers(d,S),onTouchStart:composeEventHandlers(g,E)}]:[!1,_,{}]}function composeEventHandlers(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function PrefetchPageLinks({page:e,...t}){let{router:n}=useDataRouterContext2(),i=React__namespace.useMemo(()=>matchRoutes(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?React__namespace.createElement(PrefetchPageLinksImpl,{page:e,matches:i,...t}):null}function useKeyedPrefetchLinks(e){let{manifest:t,routeModules:n}=useFrameworkContext(),[i,o]=React__namespace.useState([]);return React__namespace.useEffect(()=>{let l=!1;return getKeyedPrefetchLinks(e,t,n).then(u=>{l||o(u)}),()=>{l=!0}},[e,t,n]),i}function PrefetchPageLinksImpl({page:e,matches:t,...n}){let i=useLocation(),{manifest:o,routeModules:l}=useFrameworkContext(),{basename:u}=useDataRouterContext2(),{loaderData:f,matches:p}=useDataRouterStateContext(),m=React__namespace.useMemo(()=>getNewMatchesForLinks(e,t,p,o,i,"data"),[e,t,p,o,i]),d=React__namespace.useMemo(()=>getNewMatchesForLinks(e,t,p,o,i,"assets"),[e,t,p,o,i]),g=React__namespace.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let S=new Set,b=!1;if(t.forEach(C=>{var A;let R=o.routes[C.route.id];!R||!R.hasLoader||(!m.some(O=>O.route.id===C.route.id)&&C.route.id in f&&((A=l[C.route.id])!=null&&A.shouldRevalidate)||R.hasClientLoader?b=!0:S.add(C.route.id))}),S.size===0)return[];let T=singleFetchUrl(e,u,"data");return b&&S.size>0&&T.searchParams.set("_routes",t.filter(C=>S.has(C.route.id)).map(C=>C.route.id).join(",")),[T.pathname+T.search]},[u,f,i,o,m,t,e,l]),_=React__namespace.useMemo(()=>getModuleLinkHrefs(d,o),[d,o]),E=useKeyedPrefetchLinks(d);return React__namespace.createElement(React__namespace.Fragment,null,g.map(S=>React__namespace.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),_.map(S=>React__namespace.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),E.map(({key:S,link:b})=>React__namespace.createElement("link",{key:S,nonce:n.nonce,...b})))}function mergeRefs(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var isBrowser$1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{isBrowser$1&&(window.__reactRouterVersion="7.9.5")}catch{}var ABSOLUTE_URL_REGEX2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Link=React__namespace.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:o,reloadDocument:l,replace:u,state:f,target:p,to:m,preventScrollReset:d,viewTransition:g,..._},E){let{basename:S}=React__namespace.useContext(NavigationContext),b=typeof m=="string"&&ABSOLUTE_URL_REGEX2.test(m),T,C=!1;if(typeof m=="string"&&b&&(T=m,isBrowser$1))try{let B=new URL(window.location.href),X=m.startsWith("//")?new URL(B.protocol+m):new URL(m),U=stripBasename(X.pathname,S);X.origin===B.origin&&U!=null?m=U+X.search+X.hash:C=!0}catch{warning$1(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let R=useHref(m,{relative:o}),[A,O,I]=usePrefetchBehavior(i,_),j=useLinkClickHandler(m,{replace:u,state:f,target:p,preventScrollReset:d,relative:o,viewTransition:g});function D(B){t&&t(B),B.defaultPrevented||j(B)}let F=React__namespace.createElement("a",{..._,...I,href:T||R,onClick:C||l?t:D,ref:mergeRefs(E,O),target:p,"data-discover":!b&&n==="render"?"true":void 0});return A&&!b?React__namespace.createElement(React__namespace.Fragment,null,F,React__namespace.createElement(PrefetchPageLinks,{page:R})):F});Link.displayName="Link";var NavLink=React__namespace.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:o=!1,style:l,to:u,viewTransition:f,children:p,...m},d){let g=useResolvedPath(u,{relative:m.relative}),_=useLocation(),E=React__namespace.useContext(DataRouterStateContext),{navigator:S,basename:b}=React__namespace.useContext(NavigationContext),T=E!=null&&useViewTransitionState(g)&&f===!0,C=S.encodeLocation?S.encodeLocation(g).pathname:g.pathname,R=_.pathname,A=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;n||(R=R.toLowerCase(),A=A?A.toLowerCase():null,C=C.toLowerCase()),A&&b&&(A=stripBasename(A,b)||A);const O=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let I=R===C||!o&&R.startsWith(C)&&R.charAt(O)==="/",j=A!=null&&(A===C||!o&&A.startsWith(C)&&A.charAt(C.length)==="/"),D={isActive:I,isPending:j,isTransitioning:T},F=I?t:void 0,B;typeof i=="function"?B=i(D):B=[i,I?"active":null,j?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let X=typeof l=="function"?l(D):l;return React__namespace.createElement(Link,{...m,"aria-current":F,className:B,ref:d,style:X,to:u,viewTransition:f},typeof p=="function"?p(D):p)});NavLink.displayName="NavLink";var Form=React__namespace.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:o,state:l,method:u=defaultMethod,action:f,onSubmit:p,relative:m,preventScrollReset:d,viewTransition:g,..._},E)=>{let S=useSubmit(),b=useFormAction(f,{relative:m}),T=u.toLowerCase()==="get"?"get":"post",C=typeof f=="string"&&ABSOLUTE_URL_REGEX2.test(f),R=A=>{if(p&&p(A),A.defaultPrevented)return;A.preventDefault();let O=A.nativeEvent.submitter,I=(O==null?void 0:O.getAttribute("formmethod"))||u;S(O||A.currentTarget,{fetcherKey:t,method:I,navigate:n,replace:o,state:l,relative:m,preventScrollReset:d,viewTransition:g})};return React__namespace.createElement("form",{ref:E,method:T,action:b,onSubmit:i?p:R,..._,"data-discover":!C&&e==="render"?"true":void 0})});Form.displayName="Form";function getDataRouterConsoleError2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext3(e){let t=React__namespace.useContext(DataRouterContext);return invariant$1(t,getDataRouterConsoleError2(e)),t}function useLinkClickHandler(e,{target:t,replace:n,state:i,preventScrollReset:o,relative:l,viewTransition:u}={}){let f=useNavigate(),p=useLocation(),m=useResolvedPath(e,{relative:l});return React__namespace.useCallback(d=>{if(shouldProcessLinkClick(d,t)){d.preventDefault();let g=n!==void 0?n:createPath(p)===createPath(m);f(e,{replace:g,state:i,preventScrollReset:o,relative:l,viewTransition:u})}},[p,f,m,n,i,t,e,o,l,u])}var fetcherId=0,getUniqueFetcherId=()=>`__${String(++fetcherId)}__`;function useSubmit(){let{router:e}=useDataRouterContext3("useSubmit"),{basename:t}=React__namespace.useContext(NavigationContext),n=useRouteId();return React__namespace.useCallback(async(i,o={})=>{let{action:l,method:u,encType:f,formData:p,body:m}=getFormSubmissionInfo(i,t);if(o.navigate===!1){let d=o.fetcherKey||getUniqueFetcherId();await e.fetch(d,n,o.action||l,{preventScrollReset:o.preventScrollReset,formData:p,body:m,formMethod:o.method||u,formEncType:o.encType||f,flushSync:o.flushSync})}else await e.navigate(o.action||l,{preventScrollReset:o.preventScrollReset,formData:p,body:m,formMethod:o.method||u,formEncType:o.encType||f,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,n])}function useFormAction(e,{relative:t}={}){let{basename:n}=React__namespace.useContext(NavigationContext),i=React__namespace.useContext(RouteContext);invariant$1(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),l={...useResolvedPath(e||".",{relative:t})},u=useLocation();if(e==null){l.search=u.search;let f=new URLSearchParams(l.search),p=f.getAll("index");if(p.some(d=>d==="")){f.delete("index"),p.filter(g=>g).forEach(g=>f.append("index",g));let d=f.toString();l.search=d?`?${d}`:""}}return(!e||e===".")&&o.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:joinPaths([n,l.pathname])),createPath(l)}function useViewTransitionState(e,{relative:t}={}){let n=React__namespace.useContext(ViewTransitionContext);invariant$1(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=useDataRouterContext3("useViewTransitionState"),o=useResolvedPath(e,{relative:t});if(!n.isTransitioning)return!1;let l=stripBasename(n.currentLocation.pathname,i)||n.currentLocation.pathname,u=stripBasename(n.nextLocation.pathname,i)||n.nextLocation.pathname;return matchPath(o.pathname,u)!=null||matchPath(o.pathname,l)!=null}const Breadcrumbs=({items:e,maxVisible:t=4,onItemClick:n})=>{const[i,o]=React.useState(!1),l=()=>o(_=>!_),u=(_,E)=>{_&&_(),E!==void 0&&(n==null||n(E)),o(!1)},f=e.length>t,p=e[0],m=e[e.length-1],d=e.slice(1,e.length-1),g=f?[]:d;return jsxRuntimeExports.jsxs("nav",{className:"breadcrumbs",children:[p&&renderLink(p,!1,0,n),f&&jsxRuntimeExports.jsxs("div",{className:"breadcrumbs-menu",children:[jsxRuntimeExports.jsx("button",{onClick:l,className:"breadcrumbs-collapse-button",children:"..."}),i&&jsxRuntimeExports.jsx("ul",{className:"breadcrumbs-dropdown",children:d.map((_,E)=>jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(Link,{to:_.href||"#",onClick:()=>u(_.onClick,E+1),className:"breadcrumbs-item",children:_.label})},E))})]}),!f&&g.map((_,E)=>renderLink(_,!1,E+1,n)),m&&e.length>1&&renderLink(m,!0,e.length-1,n)]})},renderLink=(e,t,n,i)=>t?jsxRuntimeExports.jsx("span",{className:"breadcrumbs-item breadcrumbs-current",children:e.label}):jsxRuntimeExports.jsx(Link,{className:"breadcrumbs-item",to:e.href||"#",onClick:()=>i==null?void 0:i(n),children:e.label}),sizeTokens={small:{fontSize:"0.75rem",padding:"0.375rem 0.75rem"},medium:{fontSize:"1rem",padding:"0.625rem 1.25rem"},large:{fontSize:"1.125rem",padding:"0.875rem 1.75rem"}},getSizeStyle$1=e=>sizeTokens[e],getSizeStyle=e=>sizeTokens[e],getVariantClass=e=>{const t={primary:"ce-button--primary",secondary:"ce-button--secondary",text:"ce-button--text",neutral:"ce-button--neutral",outlined:"ce-button--outlined",outlinedGreen:"ce-button--outlinedGreen",disabled:"ce-button--disabled",underline:"ce-button--underline"};return t[e]||t.primary},CEButton=({variant:e="primary",size:t="medium",onClick:n,children:i,className:o="",sx:l={},color:u,label:f,icon:p,disabled:m=e==="disabled",id:d,name:g})=>{const _=getSizeStyle(t),E=getVariantClass(e);return jsxRuntimeExports.jsxs("button",{className:`ce-button ${E} ${o}`,id:d,name:g,onClick:n,style:{..._,...l,...u?{color:u}:{}},disabled:m,children:[p&&jsxRuntimeExports.jsx("span",{className:"ce-button__icon",children:p}),f??i]})},CeBox=React.forwardRef(function({component:t="div",sx:n={},style:i={},children:o,id:l,name:u,onClick:f,draggable:p=!1,dragHandlePosition:m="left",onDragHandleStart:d,onDragHandleEnd:g,..._},E){const[S,b]=React.useState(!1),T={...i,...n,...p&&{position:"relative"},...S&&{backgroundColor:"rgba(255, 193, 7, 0.15)",borderColor:"#787878"}},C={};l&&(C["data-ce-id"]=l),u&&(C["data-ce-name"]=u);const R=j=>{if(!f)return;const D=f;try{typeof D=="function"&&D.length>=2?D(j,{id:l,name:u}):typeof D=="function"&&D(j)}catch{try{D(j)}catch{}}},A=j=>{if(!p)return;j.dataTransfer.effectAllowed="move",j.dataTransfer.setData("text/plain",l||"");const D=document.createElement("div");D.style.position="absolute",D.style.left="-9999px",D.style.top="-9999px",D.style.pointerEvents="none",D.style.backgroundColor="#fcfcf8",D.style.border="2px solid #5c5c5c",D.style.borderRadius="8px",D.style.padding="20px",D.style.width="300px",D.style.boxShadow="0 12px 24px rgba(0,0,0,0.35)",D.style.opacity="0.95",D.innerHTML=`
|
|
34
34
|
<h3 style="margin: 0 0 5px 0; font-size: 16px; font-weight: 600;">${u||"Item"}</h3>
|
|
35
35
|
<p style="margin: 0; color: #666; font-size: 0.9rem;">Dragging...</p>
|
|
36
|
-
`,document.body.appendChild(D),j.dataTransfer.setDragImage(D,150,30),setTimeout(()=>{D.parentNode&&document.body.removeChild(D)},0),d==null||d(l)},O=()=>{g==null||g()},I=()=>jsxRuntimeExports.jsx("div",{draggable:!0,onDragStart:A,onDragEnd:O,style:{position:"absolute",...m==="right"?{right:"8px"}:{left:"8px"},top:"8px",cursor:"move",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",opacity:.6,transition:"opacity 0.2s ease-in-out",userSelect:"none",pointerEvents:"auto"},title:"Drag to swap boxes",children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",style:{color:"#666",pointerEvents:"none"},children:[jsxRuntimeExports.jsx("circle",{cx:"5",cy:"4",r:"1.5"}),jsxRuntimeExports.jsx("circle",{cx:"11",cy:"4",r:"1.5"}),jsxRuntimeExports.jsx("circle",{cx:"5",cy:"8",r:"1.5"}),jsxRuntimeExports.jsx("circle",{cx:"11",cy:"8",r:"1.5"}),jsxRuntimeExports.jsx("circle",{cx:"5",cy:"12",r:"1.5"}),jsxRuntimeExports.jsx("circle",{cx:"11",cy:"12",r:"1.5"})]})});return jsxRuntimeExports.jsxs(t,{ref:E,style:{...T},onClick:R,onDragEnter:j=>{const D=j.dataTransfer.getData("text/plain");p&&D&&D!==l&&(j.preventDefault(),j.stopPropagation(),b(!0))},onDragLeave:j=>{p&&j.currentTarget===j.target&&b(!1)},onDragOver:j=>{p&&(j.preventDefault(),j.stopPropagation(),j.dataTransfer.dropEffect="move")},onDrop:j=>{p&&(j.preventDefault(),j.stopPropagation(),b(!1))},...C,..._,children:[p&&jsxRuntimeExports.jsx(I,{}),o]})}),CEAdvancedAutoSuggest=({label:e,placeholder:t="",fetchSuggestions:n,value:i,onChange:o,onSelect:l,style:u={},size:f="medium",required:p=!1,showError:m=!1,errorMessage:d="This field is required"})=>{const[g,_]=React.useState([]),[E,S]=React.useState(!1),[b,T]=React.useState(!1),[C,R]=React.useState(!1),[A,O]=React.useState((i==null?void 0:i.label)||""),[I,j]=React.useState(!1),D=React.useRef(null),F=React.useRef(i||null),[B,X]=React.useState({top:0,left:0,width:0});React.useEffect(()=>{O((i==null?void 0:i.label)||""),F.current=i||null},[i]),React.useEffect(()=>()=>{var L;(L=D.current)!=null&&L.debounceTimeout&&clearTimeout(D.current.debounceTimeout)},[]);const U=getSizeStyle$1(f||"medium"),N={"--input-font-size":U.fontSize,"--label-font-size":U.fontSize,"--icon-size":`calc(${U.fontSize} + 0.25rem)`,"--suggestion-font-size":U.fontSize,"--input-padding":U.padding,"--input-padding-top":"1.25em","--icon-top":"1.2em",fontSize:U.fontSize,...u},G=L=>{var V;const K=L.target.value;if(O(K),!K.trim()){o(null),l==null||l(""),_([]),S(!1),T(!1);return}(V=D.current)!=null&&V.debounceTimeout&&clearTimeout(D.current.debounceTimeout),T(!0);const W=setTimeout(async()=>{var Y;if(K===((Y=D.current)==null?void 0:Y.value))try{const q=await n(K);_(q),S(!0)}catch(q){console.error("Error fetching suggestions:",q),_([])}finally{T(!1)}},300);D.current&&(D.current.debounceTimeout=W)},ee=L=>{O(L.label),o(L),l==null||l(L),S(!1),j(!1)},J=()=>{if(!D.current)return;const L=D.current.getBoundingClientRect();X({top:L.bottom+window.scrollY,left:L.left+window.scrollX,width:L.width}),(L.bottom<0||L.top>window.innerHeight)&&S(!1)};React.useEffect(()=>{if(E)return window.addEventListener("scroll",J,!0),window.addEventListener("resize",J),J(),()=>{window.removeEventListener("scroll",J,!0),window.removeEventListener("resize",J)}},[E]);const z=()=>{var V;const L=((V=D.current)==null?void 0:V.value.trim())||"",K=g.find(Y=>Y.label.toLowerCase()===L.toLowerCase()),W=setTimeout(()=>{j(L!==""&&!K),S(!1),R(!1)},150);return()=>clearTimeout(W)},H=A.trim().length>0,M=m&&p&&!H;return jsxRuntimeExports.jsxs("div",{className:"auto-suggest-input-advanced",style:N,children:[jsxRuntimeExports.jsxs("div",{className:`input-wrapper floating-label-wrapper${C||H?" focused":""} ${M?" error":""}`,style:N,children:[jsxRuntimeExports.jsx("input",{ref:D,type:"text",value:A,placeholder:t,onChange:G,onFocus:()=>{S(!0),R(!0)},onBlur:z,className:"input-field","aria-invalid":M,"aria-describedby":M?`${e}-error`:void 0}),jsxRuntimeExports.jsxs("label",{className:"floating-label",children:[e,p&&jsxRuntimeExports.jsx("span",{className:"required-asterisk",children:"*"})]}),E&&g.length>0&&ReactDOM.createPortal(jsxRuntimeExports.jsx("ul",{className:"suggestions-list",style:{position:"absolute",top:B.top,left:B.left,width:B.width,maxHeight:"200px",overflowY:"auto",background:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:0,padding:0,listStyle:"none",zIndex:9999,boxShadow:"0 4px 6px rgba(0,0,0,0.1)"},children:!b&&g.length===0&&A?jsxRuntimeExports.jsx("div",{className:"auto-sug-imput-empty-message",children:"No matches found"}):g.map((L,K)=>jsxRuntimeExports.jsx("li",{className:"suggestion-item",onMouseDown:()=>ee(L),style:{padding:"0.5rem",cursor:"pointer"},children:jsxRuntimeExports.jsxs("div",{className:"suggestion-content",children:[jsxRuntimeExports.jsx("span",{className:"suggestion-label",children:L.label}),L.subtitle&&jsxRuntimeExports.jsx("span",{className:"suggestion-subtitle",children:L.subtitle})]})},`${L.value}-${K}`))}),document.body)]}),M&&jsxRuntimeExports.jsx("div",{id:`${e}-error`,className:"error-text",children:d}),I&&jsxRuntimeExports.jsx("div",{className:"error-text",id:`${e}-warning`,children:"Please select a valid option"}),b&&jsxRuntimeExports.jsx("div",{className:"loading-overlay",children:jsxRuntimeExports.jsx("div",{className:"spinner"})})]})},CEAutoSuggestInput=({label:e,placeholder:t="",fetchSuggestions:n,value:i,onChange:o,width:l="100%",height:u="3.5rem",style:f={},size:p="medium",multipleSelection:m=!1,showSearchIcon:d=!1,showDropdownIcon:g=!1,required:_=!1,showError:E=!1,errorMessage:S="This field is required"})=>{const[b,T]=React.useState([]),[C,R]=React.useState(!1),[A,O]=React.useState(!1),[I,j]=React.useState(!1),[D,F]=React.useState(Array.isArray(i)?i:i?[i]:[]),B=React.useRef(null),X=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M15.5001 14.5H14.7101L14.4301 14.23C15.6301 12.83 16.2501 10.92 15.9101 8.89002C15.4401 6.11002 13.1201 3.89002 10.3201 3.55002C6.09014 3.03002 2.53014 6.59001 3.05014 10.82C3.39014 13.62 5.61014 15.94 8.39014 16.41C10.4201 16.75 12.3301 16.13 13.7301 14.93L14.0001 15.21V16L18.2501 20.25C18.6601 20.66 19.3301 20.66 19.7401 20.25C20.1501 19.84 20.1501 19.17 19.7401 18.76L15.5001 14.5ZM9.50014 14.5C7.01014 14.5 5.00014 12.49 5.00014 10C5.00014 7.51002 7.01014 5.50002 9.50014 5.50002C11.9901 5.50002 14.0001 7.51002 14.0001 10C14.0001 12.49 11.9901 14.5 9.50014 14.5Z",fill:"black",fillOpacity:"0.54"})}),U=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.12021 9.79006L12.0002 13.6701L15.8802 9.79006C16.2702 9.40006 16.9002 9.40006 17.2902 9.79006C17.6802 10.1801 17.6802 10.8101 17.2902 11.2001L12.7002 15.7901C12.3102 16.1801 11.6802 16.1801 11.2902 15.7901L6.70021 11.2001C6.31021 10.8101 6.31021 10.1801 6.70021 9.79006C7.09021 9.41006 7.73021 9.40006 8.12021 9.79006Z",fill:"black",fillOpacity:"0.54"})});React.useEffect(()=>{const L=Array.isArray(i)?"":i;if(L.trim()===""){T([]);return}O(!0),n(L).then(K=>T(K)).finally(()=>O(!1))},[i,n]);const N=getSizeStyle$1(p||"medium"),G={"--input-font-size":N.fontSize,"--label-font-size":N.fontSize,"--icon-size":`calc(${N.fontSize} + 0.25rem)`,"--suggestion-font-size":N.fontSize,"--input-padding":N.padding,"--input-padding-top":"1.25em","--icon-top":"1.2em",fontSize:N.fontSize,...f},ee=L=>{let K=[];D.includes(L)?K=D.filter(W=>W!==L):K=[...D,L],F(K),o(K)},J=()=>{D.length===b.length?(F([]),o([])):(F(b),o(b))},z=b.length>0&&D.length===b.length,H=Array.isArray(i)?i.length>0:i.trim().length>0,M=E&&_&&!H;return jsxRuntimeExports.jsxs("div",{className:"auto-suggest-input",style:G,children:[jsxRuntimeExports.jsxs("div",{className:`input-wrapper floating-label-wrapper${I||H?" focused":""} ${M?" error":""}`,style:G,children:[jsxRuntimeExports.jsx("input",{ref:B,type:"text",value:m?D.join(", "):Array.isArray(i)?"":i,placeholder:"",onChange:L=>{o(L.target.value),R(!0)},onFocus:()=>{R(!0),j(!0)},onBlur:()=>{setTimeout(()=>R(!1),150),j(!1)},className:M?"input-error":"","aria-invalid":M,"aria-describedby":M?`${e}-error`:void 0}),jsxRuntimeExports.jsxs("label",{className:"floating-label",children:[e,_&&jsxRuntimeExports.jsx("span",{className:"required-asterisk",children:"*"})]}),d&&jsxRuntimeExports.jsx("span",{className:"search-icon search-icon-img",children:jsxRuntimeExports.jsx(X,{})}),g&&jsxRuntimeExports.jsx("span",{className:"search-icon search-icon-img",children:jsxRuntimeExports.jsx(U,{})}),C&&b.length>0&&jsxRuntimeExports.jsxs("ul",{className:"suggestions-list",children:[m&&jsxRuntimeExports.jsx("li",{className:"suggestion-item select-all",children:jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:z,onChange:J}),"Select All"]})}),b.map((L,K)=>jsxRuntimeExports.jsx("li",{className:"suggestion-item",onMouseDown:()=>{m||(o(L),R(!1))},children:m?jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:D.includes(L),onChange:()=>ee(L)}),L]}):L},K))]})]}),M&&jsxRuntimeExports.jsx("div",{id:`${e}-error`,className:"error-text",children:S}),A&&jsxRuntimeExports.jsx("div",{className:"loading-text",children:"Loading..."})]})};function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString:toString$2}=Object.prototype,{getPrototypeOf:getPrototypeOf$1}=Object,{iterator,toStringTag}=Symbol,kindOf$1=(e=>t=>{const n=toString$2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf$1(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction$1(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction$1=typeOfTest("function"),isNumber$1=typeOfTest("number"),isObject$1=e=>e!==null&&typeof e=="object",isBoolean$1=e=>e===!0||e===!1,isPlainObject$6=e=>{if(kindOf$1(e)!=="object")return!1;const t=getPrototypeOf$1(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(toStringTag in e)&&!(iterator in e)},isEmptyObject=e=>{if(!isObject$1(e)||isBuffer(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},isDate$1=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject$1(e)&&isFunction$1(e.pipe),isFormData=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||isFunction$1(e.append)&&((t=kindOf$1(e))==="formdata"||t==="object"&&isFunction$1(e.toString)&&e.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim$1=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,o;if(typeof e!="object"&&(e=[e]),isArray(e))for(i=0,o=e.length;i<o;i++)t.call(null,e[i],i,e);else{if(isBuffer(e))return;const l=n?Object.getOwnPropertyNames(e):Object.keys(e),u=l.length;let f;for(i=0;i<u;i++)f=l[i],t.call(null,e[f],f,e)}}function findKey(e,t){if(isBuffer(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i=n.length,o;for(;i-- >0;)if(o=n[i],t===o.toLowerCase())return o;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge$1(){const{caseless:e,skipUndefined:t}=isContextDefined(this)&&this||{},n={},i=(o,l)=>{const u=e&&findKey(n,l)||l;isPlainObject$6(n[u])&&isPlainObject$6(o)?n[u]=merge$1(n[u],o):isPlainObject$6(o)?n[u]=merge$1({},o):isArray(o)?n[u]=o.slice():(!t||!isUndefined(o))&&(n[u]=o)};for(let o=0,l=arguments.length;o<l;o++)arguments[o]&&forEach(arguments[o],i);return n}const extend$1=(e,t,n,{allOwnKeys:i}={})=>(forEach(t,(o,l)=>{n&&isFunction$1(o)?e[l]=bind(o,n):e[l]=o},{allOwnKeys:i}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,i)=>{let o,l,u;const f={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),l=o.length;l-- >0;)u=o[l],(!i||i(u,e,t))&&!f[u]&&(t[u]=e[u],f[u]=!0);e=n!==!1&&getPrototypeOf$1(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},toArray$2=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber$1(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray$1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf$1(Uint8Array)),forEachEntry=(e,t)=>{const i=(e&&e[iterator]).call(e);let o;for(;(o=i.next())&&!o.done;){const l=o.value;t.call(e,l[0],l[1])}},matchAll=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,o){return i.toUpperCase()+o}),hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};forEach(n,(o,l)=>{let u;(u=t(o,l,e))!==!1&&(i[l]=u||o)}),Object.defineProperties(e,i)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction$1(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(isFunction$1(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet=(e,t)=>{const n={},i=o=>{o.forEach(l=>{n[l]=!0})};return isArray(e)?i(e):i(String(e).split(t)),n},noop$7=()=>{},toFiniteNumber=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction$1(e.append)&&e[toStringTag]==="FormData"&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),n=(i,o)=>{if(isObject$1(i)){if(t.indexOf(i)>=0)return;if(isBuffer(i))return i;if(!("toJSON"in i)){t[o]=i;const l=isArray(i)?[]:{};return forEach(i,(u,f)=>{const p=n(u,o+1);!isUndefined(p)&&(l[f]=p)}),t[o]=void 0,l}}return i};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject$1(e)||isFunction$1(e))&&isFunction$1(e.then)&&isFunction$1(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((n,i)=>(_global.addEventListener("message",({source:o,data:l})=>{o===_global&&l===n&&i.length&&i.shift()()},!1),o=>{i.push(o),_global.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",isFunction$1(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,isIterable=e=>e!=null&&isFunction$1(e[iterator]),utils$2={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber:isNumber$1,isBoolean:isBoolean$1,isObject:isObject$1,isPlainObject:isPlainObject$6,isEmptyObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate:isDate$1,isFile,isBlob,isRegExp,isFunction:isFunction$1,isStream,isURLSearchParams,isTypedArray:isTypedArray$1,isFileList,forEach,merge:merge$1,extend:extend$1,trim:trim$1,stripBOM,inherits,toFlatObject,kindOf:kindOf$1,kindOfTest,endsWith,toArray:toArray$2,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop:noop$7,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError$1(e,t,n,i,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o,this.status=o.status?o.status:null)}utils$2.inherits(AxiosError$1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$2.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}});Object.defineProperties(AxiosError$1,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError$1.from=(e,t,n,i,o,l)=>{const u=Object.create(prototype$1);utils$2.toFlatObject(e,u,function(d){return d!==Error.prototype},m=>m!=="isAxiosError");const f=e&&e.message?e.message:"Error",p=t==null&&e?e.code:t;return AxiosError$1.call(u,f,p,n,i,o),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",l&&Object.assign(u,l),u};const httpAdapter=null;function isVisitable(e){return utils$2.isPlainObject(e)||utils$2.isArray(e)}function removeBrackets(e){return utils$2.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(o,l){return o=removeBrackets(o),!n&&l?"["+o+"]":o}).join(n?".":""):t}function isFlatArray(e){return utils$2.isArray(e)&&!e.some(isVisitable)}const predicates=utils$2.toFlatObject(utils$2,{},null,function(t){return/^is[A-Z]/.test(t)});function toFormData$1(e,t,n){if(!utils$2.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=utils$2.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,T){return!utils$2.isUndefined(T[b])});const i=n.metaTokens,o=n.visitor||d,l=n.dots,u=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&utils$2.isSpecCompliantForm(t);if(!utils$2.isFunction(o))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(utils$2.isDate(S))return S.toISOString();if(utils$2.isBoolean(S))return S.toString();if(!p&&utils$2.isBlob(S))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$2.isArrayBuffer(S)||utils$2.isTypedArray(S)?p&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function d(S,b,T){let C=S;if(S&&!T&&typeof S=="object"){if(utils$2.endsWith(b,"{}"))b=i?b:b.slice(0,-2),S=JSON.stringify(S);else if(utils$2.isArray(S)&&isFlatArray(S)||(utils$2.isFileList(S)||utils$2.endsWith(b,"[]"))&&(C=utils$2.toArray(S)))return b=removeBrackets(b),C.forEach(function(A,O){!(utils$2.isUndefined(A)||A===null)&&t.append(u===!0?renderKey([b],O,l):u===null?b:b+"[]",m(A))}),!1}return isVisitable(S)?!0:(t.append(renderKey(T,b,l),m(S)),!1)}const g=[],_=Object.assign(predicates,{defaultVisitor:d,convertValue:m,isVisitable});function E(S,b){if(!utils$2.isUndefined(S)){if(g.indexOf(S)!==-1)throw Error("Circular reference detected in "+b.join("."));g.push(S),utils$2.forEach(S,function(C,R){(!(utils$2.isUndefined(C)||C===null)&&o.call(t,C,utils$2.isString(R)?R.trim():R,b,_))===!0&&E(C,b?b.concat(R):[R])}),g.pop()}}if(!utils$2.isObject(e))throw new TypeError("data must be an object");return E(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(t,n){this._pairs.push([t,n])};prototype.toString=function(t){const n=t?function(i){return t.call(this,i,encode$1)}:encode$1;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(e,t,n){if(!t)return e;const i=n&&n.encode||encode;utils$2.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let l;if(o?l=o(t,n):l=utils$2.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,n).toString(i),l){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){utils$2.forEach(this.handlers,function(i){i!==null&&t(i)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils$1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils$1,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,{visitor:function(n,i,o,l){return platform.isNode&&utils$2.isBuffer(n)?(this.append(i,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}function parsePropPath(e){return utils$2.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function arrayToObject(e){const t={},n=Object.keys(e);let i;const o=n.length;let l;for(i=0;i<o;i++)l=n[i],t[l]=e[l];return t}function formDataToJSON(e){function t(n,i,o,l){let u=n[l++];if(u==="__proto__")return!0;const f=Number.isFinite(+u),p=l>=n.length;return u=!u&&utils$2.isArray(o)?o.length:u,p?(utils$2.hasOwnProp(o,u)?o[u]=[o[u],i]:o[u]=i,!f):((!o[u]||!utils$2.isObject(o[u]))&&(o[u]=[]),t(n,i,o[u],l)&&utils$2.isArray(o[u])&&(o[u]=arrayToObject(o[u])),!f)}if(utils$2.isFormData(e)&&utils$2.isFunction(e.entries)){const n={};return utils$2.forEachEntry(e,(i,o)=>{t(parsePropPath(i),o,n,0)}),n}return null}function stringifySafely(e,t,n){if(utils$2.isString(e))try{return(t||JSON.parse)(e),utils$2.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const defaults$1={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const i=n.getContentType()||"",o=i.indexOf("application/json")>-1,l=utils$2.isObject(t);if(l&&utils$2.isHTMLForm(t)&&(t=new FormData(t)),utils$2.isFormData(t))return o?JSON.stringify(formDataToJSON(t)):t;if(utils$2.isArrayBuffer(t)||utils$2.isBuffer(t)||utils$2.isStream(t)||utils$2.isFile(t)||utils$2.isBlob(t)||utils$2.isReadableStream(t))return t;if(utils$2.isArrayBufferView(t))return t.buffer;if(utils$2.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(l){if(i.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((f=utils$2.isFileList(t))||i.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return toFormData$1(f?{"files[]":t}:t,p&&new p,this.formSerializer)}}return l||o?(n.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function(t){const n=this.transitional||defaults$1.transitional,i=n&&n.forcedJSONParsing,o=this.responseType==="json";if(utils$2.isResponse(t)||utils$2.isReadableStream(t))return t;if(t&&utils$2.isString(t)&&(i&&!this.responseType||o)){const u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(f){if(u)throw f.name==="SyntaxError"?AxiosError$1.from(f,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$2.forEach(["delete","get","head","post","put","patch"],e=>{defaults$1.headers[e]={}});const ignoreDuplicateOf=utils$2.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let n,i,o;return e&&e.split(`
|
|
36
|
+
`,document.body.appendChild(D),j.dataTransfer.setDragImage(D,150,30),setTimeout(()=>{D.parentNode&&document.body.removeChild(D)},0),d==null||d(l)},O=()=>{g==null||g()},I=()=>jsxRuntimeExports.jsx("div",{draggable:!0,onDragStart:A,onDragEnd:O,style:{position:"absolute",...m==="right"?{right:"8px"}:{left:"8px"},top:"8px",cursor:"move",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",opacity:.6,transition:"opacity 0.2s ease-in-out",userSelect:"none",pointerEvents:"auto"},title:"Drag to swap boxes",children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",style:{color:"#666",pointerEvents:"none"},children:[jsxRuntimeExports.jsx("circle",{cx:"5",cy:"4",r:"1.5"}),jsxRuntimeExports.jsx("circle",{cx:"11",cy:"4",r:"1.5"}),jsxRuntimeExports.jsx("circle",{cx:"5",cy:"8",r:"1.5"}),jsxRuntimeExports.jsx("circle",{cx:"11",cy:"8",r:"1.5"}),jsxRuntimeExports.jsx("circle",{cx:"5",cy:"12",r:"1.5"}),jsxRuntimeExports.jsx("circle",{cx:"11",cy:"12",r:"1.5"})]})});return jsxRuntimeExports.jsxs(t,{ref:E,style:{...T},onClick:R,onDragEnter:j=>{const D=j.dataTransfer.getData("text/plain");p&&D&&D!==l&&(j.preventDefault(),j.stopPropagation(),b(!0))},onDragLeave:j=>{p&&j.currentTarget===j.target&&b(!1)},onDragOver:j=>{p&&(j.preventDefault(),j.stopPropagation(),j.dataTransfer.dropEffect="move")},onDrop:j=>{p&&(j.preventDefault(),j.stopPropagation(),b(!1))},...C,..._,children:[p&&jsxRuntimeExports.jsx(I,{}),o]})}),CEAdvancedAutoSuggest=({label:e,placeholder:t="",fetchSuggestions:n,value:i,onChange:o,onSelect:l,style:u={},size:f="medium",required:p=!1,showError:m=!1,errorMessage:d="This field is required"})=>{const[g,_]=React.useState([]),[E,S]=React.useState(!1),[b,T]=React.useState(!1),[C,R]=React.useState(!1),[A,O]=React.useState((i==null?void 0:i.label)||""),[I,j]=React.useState(!1),D=React.useRef(null),F=React.useRef(i||null),[B,X]=React.useState({top:0,left:0,width:0});React.useEffect(()=>{O((i==null?void 0:i.label)||""),F.current=i||null},[i]),React.useEffect(()=>()=>{var L;(L=D.current)!=null&&L.debounceTimeout&&clearTimeout(D.current.debounceTimeout)},[]);const U=getSizeStyle$1(f||"medium"),N={"--input-font-size":U.fontSize,"--label-font-size":U.fontSize,"--icon-size":`calc(${U.fontSize} + 0.25rem)`,"--suggestion-font-size":U.fontSize,"--input-padding":U.padding,"--input-padding-top":"1.25em","--icon-top":"1.2em",fontSize:U.fontSize,...u},G=L=>{var V;const K=L.target.value;if(O(K),!K.trim()){o(null),l==null||l(""),_([]),S(!1),T(!1);return}(V=D.current)!=null&&V.debounceTimeout&&clearTimeout(D.current.debounceTimeout),T(!0);const W=setTimeout(async()=>{var Y;if(K===((Y=D.current)==null?void 0:Y.value))try{const q=await n(K);_(q),S(!0)}catch(q){console.error("Error fetching suggestions:",q),_([])}finally{T(!1)}},300);D.current&&(D.current.debounceTimeout=W)},ee=()=>{if(!D.current)return;const L=D.current.getBoundingClientRect();X({top:L.bottom+window.scrollY,left:L.left+window.scrollX,width:L.width}),(L.bottom<0||L.top>window.innerHeight)&&S(!1)};React.useEffect(()=>{if(E)return window.addEventListener("scroll",ee,!0),window.addEventListener("resize",ee),ee(),()=>{window.removeEventListener("scroll",ee,!0),window.removeEventListener("resize",ee)}},[E]);const J=()=>{var V;const L=((V=D.current)==null?void 0:V.value.trim())||"",K=g.find(Y=>Y.label.toLowerCase()===L.toLowerCase()),W=setTimeout(()=>{j(L!==""&&!K),S(!1),R(!1)},150);return()=>clearTimeout(W)},z=A.trim().length>0,H=m&&p&&!z,M=C||z||!!t;return jsxRuntimeExports.jsx("div",{className:"auto-suggest-input-advanced",style:N,children:jsxRuntimeExports.jsxs("div",{className:"input-wrapper floating-label-wrapper"+(M?" focused":"")+(H?" error":""),style:N,children:[jsxRuntimeExports.jsx("input",{ref:D,type:"text",value:A,placeholder:t,onChange:G,onFocus:()=>{S(!0),R(!0)},onBlur:J,className:"input-field","aria-invalid":H,"aria-describedby":H?`${e}-error`:void 0}),jsxRuntimeExports.jsxs("label",{className:"floating-label",children:[e,p&&jsxRuntimeExports.jsx("span",{className:"required-asterisk",children:"*"})]})]})})},CEAutoSuggestInput=({label:e,placeholder:t="",fetchSuggestions:n,value:i,onChange:o,width:l="100%",height:u="3.5rem",style:f={},size:p="medium",multipleSelection:m=!1,showSearchIcon:d=!1,showDropdownIcon:g=!1,required:_=!1,showError:E=!1,errorMessage:S="This field is required"})=>{const[b,T]=React.useState([]),[C,R]=React.useState(!1),[A,O]=React.useState(!1),[I,j]=React.useState(!1),[D,F]=React.useState(Array.isArray(i)?i:i?[i]:[]),B=React.useRef(null),X=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M15.5001 14.5H14.7101L14.4301 14.23C15.6301 12.83 16.2501 10.92 15.9101 8.89002C15.4401 6.11002 13.1201 3.89002 10.3201 3.55002C6.09014 3.03002 2.53014 6.59001 3.05014 10.82C3.39014 13.62 5.61014 15.94 8.39014 16.41C10.4201 16.75 12.3301 16.13 13.7301 14.93L14.0001 15.21V16L18.2501 20.25C18.6601 20.66 19.3301 20.66 19.7401 20.25C20.1501 19.84 20.1501 19.17 19.7401 18.76L15.5001 14.5ZM9.50014 14.5C7.01014 14.5 5.00014 12.49 5.00014 10C5.00014 7.51002 7.01014 5.50002 9.50014 5.50002C11.9901 5.50002 14.0001 7.51002 14.0001 10C14.0001 12.49 11.9901 14.5 9.50014 14.5Z",fill:"black",fillOpacity:"0.54"})}),U=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.12021 9.79006L12.0002 13.6701L15.8802 9.79006C16.2702 9.40006 16.9002 9.40006 17.2902 9.79006C17.6802 10.1801 17.6802 10.8101 17.2902 11.2001L12.7002 15.7901C12.3102 16.1801 11.6802 16.1801 11.2902 15.7901L6.70021 11.2001C6.31021 10.8101 6.31021 10.1801 6.70021 9.79006C7.09021 9.41006 7.73021 9.40006 8.12021 9.79006Z",fill:"black",fillOpacity:"0.54"})});React.useEffect(()=>{const L=Array.isArray(i)?"":i;if(L.trim()===""){T([]);return}O(!0),n(L).then(K=>T(K)).finally(()=>O(!1))},[i,n]);const N=getSizeStyle$1(p||"medium"),G={"--input-font-size":N.fontSize,"--label-font-size":N.fontSize,"--icon-size":`calc(${N.fontSize} + 0.25rem)`,"--suggestion-font-size":N.fontSize,"--input-padding":N.padding,"--input-padding-top":"1.25em","--icon-top":"1.2em",fontSize:N.fontSize,...f},ee=L=>{let K=[];D.includes(L)?K=D.filter(W=>W!==L):K=[...D,L],F(K),o(K)},J=()=>{D.length===b.length?(F([]),o([])):(F(b),o(b))},z=b.length>0&&D.length===b.length,H=Array.isArray(i)?i.length>0:i.trim().length>0,M=E&&_&&!H;return jsxRuntimeExports.jsxs("div",{className:"auto-suggest-input",style:G,children:[jsxRuntimeExports.jsxs("div",{className:`input-wrapper floating-label-wrapper${I||H?" focused":""} ${M?" error":""}`,style:G,children:[jsxRuntimeExports.jsx("input",{ref:B,type:"text",value:m?D.join(", "):Array.isArray(i)?"":i,placeholder:"",onChange:L=>{o(L.target.value),R(!0)},onFocus:()=>{R(!0),j(!0)},onBlur:()=>{setTimeout(()=>R(!1),150),j(!1)},className:M?"input-error":"","aria-invalid":M,"aria-describedby":M?`${e}-error`:void 0}),jsxRuntimeExports.jsxs("label",{className:"floating-label",children:[e,_&&jsxRuntimeExports.jsx("span",{className:"required-asterisk",children:"*"})]}),d&&jsxRuntimeExports.jsx("span",{className:"search-icon search-icon-img",children:jsxRuntimeExports.jsx(X,{})}),g&&jsxRuntimeExports.jsx("span",{className:"search-icon search-icon-img",children:jsxRuntimeExports.jsx(U,{})}),C&&b.length>0&&jsxRuntimeExports.jsxs("ul",{className:"suggestions-list",children:[m&&jsxRuntimeExports.jsx("li",{className:"suggestion-item select-all",children:jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:z,onChange:J}),"Select All"]})}),b.map((L,K)=>jsxRuntimeExports.jsx("li",{className:"suggestion-item",onMouseDown:()=>{m||(o(L),R(!1))},children:m?jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:D.includes(L),onChange:()=>ee(L)}),L]}):L},K))]})]}),M&&jsxRuntimeExports.jsx("div",{id:`${e}-error`,className:"error-text",children:S}),A&&jsxRuntimeExports.jsx("div",{className:"loading-text",children:"Loading..."})]})};function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString:toString$2}=Object.prototype,{getPrototypeOf:getPrototypeOf$1}=Object,{iterator,toStringTag}=Symbol,kindOf$1=(e=>t=>{const n=toString$2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf$1(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction$1(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction$1=typeOfTest("function"),isNumber$1=typeOfTest("number"),isObject$1=e=>e!==null&&typeof e=="object",isBoolean$1=e=>e===!0||e===!1,isPlainObject$6=e=>{if(kindOf$1(e)!=="object")return!1;const t=getPrototypeOf$1(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(toStringTag in e)&&!(iterator in e)},isEmptyObject=e=>{if(!isObject$1(e)||isBuffer(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},isDate$1=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject$1(e)&&isFunction$1(e.pipe),isFormData=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||isFunction$1(e.append)&&((t=kindOf$1(e))==="formdata"||t==="object"&&isFunction$1(e.toString)&&e.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim$1=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,o;if(typeof e!="object"&&(e=[e]),isArray(e))for(i=0,o=e.length;i<o;i++)t.call(null,e[i],i,e);else{if(isBuffer(e))return;const l=n?Object.getOwnPropertyNames(e):Object.keys(e),u=l.length;let f;for(i=0;i<u;i++)f=l[i],t.call(null,e[f],f,e)}}function findKey(e,t){if(isBuffer(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i=n.length,o;for(;i-- >0;)if(o=n[i],t===o.toLowerCase())return o;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge$1(){const{caseless:e,skipUndefined:t}=isContextDefined(this)&&this||{},n={},i=(o,l)=>{const u=e&&findKey(n,l)||l;isPlainObject$6(n[u])&&isPlainObject$6(o)?n[u]=merge$1(n[u],o):isPlainObject$6(o)?n[u]=merge$1({},o):isArray(o)?n[u]=o.slice():(!t||!isUndefined(o))&&(n[u]=o)};for(let o=0,l=arguments.length;o<l;o++)arguments[o]&&forEach(arguments[o],i);return n}const extend$1=(e,t,n,{allOwnKeys:i}={})=>(forEach(t,(o,l)=>{n&&isFunction$1(o)?e[l]=bind(o,n):e[l]=o},{allOwnKeys:i}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,i)=>{let o,l,u;const f={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),l=o.length;l-- >0;)u=o[l],(!i||i(u,e,t))&&!f[u]&&(t[u]=e[u],f[u]=!0);e=n!==!1&&getPrototypeOf$1(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},toArray$2=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber$1(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray$1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf$1(Uint8Array)),forEachEntry=(e,t)=>{const i=(e&&e[iterator]).call(e);let o;for(;(o=i.next())&&!o.done;){const l=o.value;t.call(e,l[0],l[1])}},matchAll=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,o){return i.toUpperCase()+o}),hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};forEach(n,(o,l)=>{let u;(u=t(o,l,e))!==!1&&(i[l]=u||o)}),Object.defineProperties(e,i)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction$1(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(isFunction$1(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet=(e,t)=>{const n={},i=o=>{o.forEach(l=>{n[l]=!0})};return isArray(e)?i(e):i(String(e).split(t)),n},noop$7=()=>{},toFiniteNumber=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction$1(e.append)&&e[toStringTag]==="FormData"&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),n=(i,o)=>{if(isObject$1(i)){if(t.indexOf(i)>=0)return;if(isBuffer(i))return i;if(!("toJSON"in i)){t[o]=i;const l=isArray(i)?[]:{};return forEach(i,(u,f)=>{const p=n(u,o+1);!isUndefined(p)&&(l[f]=p)}),t[o]=void 0,l}}return i};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject$1(e)||isFunction$1(e))&&isFunction$1(e.then)&&isFunction$1(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((n,i)=>(_global.addEventListener("message",({source:o,data:l})=>{o===_global&&l===n&&i.length&&i.shift()()},!1),o=>{i.push(o),_global.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",isFunction$1(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,isIterable=e=>e!=null&&isFunction$1(e[iterator]),utils$2={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber:isNumber$1,isBoolean:isBoolean$1,isObject:isObject$1,isPlainObject:isPlainObject$6,isEmptyObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate:isDate$1,isFile,isBlob,isRegExp,isFunction:isFunction$1,isStream,isURLSearchParams,isTypedArray:isTypedArray$1,isFileList,forEach,merge:merge$1,extend:extend$1,trim:trim$1,stripBOM,inherits,toFlatObject,kindOf:kindOf$1,kindOfTest,endsWith,toArray:toArray$2,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop:noop$7,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError$1(e,t,n,i,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o,this.status=o.status?o.status:null)}utils$2.inherits(AxiosError$1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$2.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}});Object.defineProperties(AxiosError$1,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError$1.from=(e,t,n,i,o,l)=>{const u=Object.create(prototype$1);utils$2.toFlatObject(e,u,function(d){return d!==Error.prototype},m=>m!=="isAxiosError");const f=e&&e.message?e.message:"Error",p=t==null&&e?e.code:t;return AxiosError$1.call(u,f,p,n,i,o),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",l&&Object.assign(u,l),u};const httpAdapter=null;function isVisitable(e){return utils$2.isPlainObject(e)||utils$2.isArray(e)}function removeBrackets(e){return utils$2.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(o,l){return o=removeBrackets(o),!n&&l?"["+o+"]":o}).join(n?".":""):t}function isFlatArray(e){return utils$2.isArray(e)&&!e.some(isVisitable)}const predicates=utils$2.toFlatObject(utils$2,{},null,function(t){return/^is[A-Z]/.test(t)});function toFormData$1(e,t,n){if(!utils$2.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=utils$2.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,T){return!utils$2.isUndefined(T[b])});const i=n.metaTokens,o=n.visitor||d,l=n.dots,u=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&utils$2.isSpecCompliantForm(t);if(!utils$2.isFunction(o))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(utils$2.isDate(S))return S.toISOString();if(utils$2.isBoolean(S))return S.toString();if(!p&&utils$2.isBlob(S))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$2.isArrayBuffer(S)||utils$2.isTypedArray(S)?p&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function d(S,b,T){let C=S;if(S&&!T&&typeof S=="object"){if(utils$2.endsWith(b,"{}"))b=i?b:b.slice(0,-2),S=JSON.stringify(S);else if(utils$2.isArray(S)&&isFlatArray(S)||(utils$2.isFileList(S)||utils$2.endsWith(b,"[]"))&&(C=utils$2.toArray(S)))return b=removeBrackets(b),C.forEach(function(A,O){!(utils$2.isUndefined(A)||A===null)&&t.append(u===!0?renderKey([b],O,l):u===null?b:b+"[]",m(A))}),!1}return isVisitable(S)?!0:(t.append(renderKey(T,b,l),m(S)),!1)}const g=[],_=Object.assign(predicates,{defaultVisitor:d,convertValue:m,isVisitable});function E(S,b){if(!utils$2.isUndefined(S)){if(g.indexOf(S)!==-1)throw Error("Circular reference detected in "+b.join("."));g.push(S),utils$2.forEach(S,function(C,R){(!(utils$2.isUndefined(C)||C===null)&&o.call(t,C,utils$2.isString(R)?R.trim():R,b,_))===!0&&E(C,b?b.concat(R):[R])}),g.pop()}}if(!utils$2.isObject(e))throw new TypeError("data must be an object");return E(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(t,n){this._pairs.push([t,n])};prototype.toString=function(t){const n=t?function(i){return t.call(this,i,encode$1)}:encode$1;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(e,t,n){if(!t)return e;const i=n&&n.encode||encode;utils$2.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let l;if(o?l=o(t,n):l=utils$2.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,n).toString(i),l){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){utils$2.forEach(this.handlers,function(i){i!==null&&t(i)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils$1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils$1,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,{visitor:function(n,i,o,l){return platform.isNode&&utils$2.isBuffer(n)?(this.append(i,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}function parsePropPath(e){return utils$2.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function arrayToObject(e){const t={},n=Object.keys(e);let i;const o=n.length;let l;for(i=0;i<o;i++)l=n[i],t[l]=e[l];return t}function formDataToJSON(e){function t(n,i,o,l){let u=n[l++];if(u==="__proto__")return!0;const f=Number.isFinite(+u),p=l>=n.length;return u=!u&&utils$2.isArray(o)?o.length:u,p?(utils$2.hasOwnProp(o,u)?o[u]=[o[u],i]:o[u]=i,!f):((!o[u]||!utils$2.isObject(o[u]))&&(o[u]=[]),t(n,i,o[u],l)&&utils$2.isArray(o[u])&&(o[u]=arrayToObject(o[u])),!f)}if(utils$2.isFormData(e)&&utils$2.isFunction(e.entries)){const n={};return utils$2.forEachEntry(e,(i,o)=>{t(parsePropPath(i),o,n,0)}),n}return null}function stringifySafely(e,t,n){if(utils$2.isString(e))try{return(t||JSON.parse)(e),utils$2.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const defaults$1={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const i=n.getContentType()||"",o=i.indexOf("application/json")>-1,l=utils$2.isObject(t);if(l&&utils$2.isHTMLForm(t)&&(t=new FormData(t)),utils$2.isFormData(t))return o?JSON.stringify(formDataToJSON(t)):t;if(utils$2.isArrayBuffer(t)||utils$2.isBuffer(t)||utils$2.isStream(t)||utils$2.isFile(t)||utils$2.isBlob(t)||utils$2.isReadableStream(t))return t;if(utils$2.isArrayBufferView(t))return t.buffer;if(utils$2.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(l){if(i.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((f=utils$2.isFileList(t))||i.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return toFormData$1(f?{"files[]":t}:t,p&&new p,this.formSerializer)}}return l||o?(n.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function(t){const n=this.transitional||defaults$1.transitional,i=n&&n.forcedJSONParsing,o=this.responseType==="json";if(utils$2.isResponse(t)||utils$2.isReadableStream(t))return t;if(t&&utils$2.isString(t)&&(i&&!this.responseType||o)){const u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(f){if(u)throw f.name==="SyntaxError"?AxiosError$1.from(f,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$2.forEach(["delete","get","head","post","put","patch"],e=>{defaults$1.headers[e]={}});const ignoreDuplicateOf=utils$2.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let n,i,o;return e&&e.split(`
|
|
37
37
|
`).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),i=u.substring(o+1).trim(),!(!n||t[n]&&ignoreDuplicateOf[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils$2.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,i,o){if(utils$2.isFunction(i))return i.call(this,t,n);if(o&&(t=n),!!utils$2.isString(t)){if(utils$2.isString(i))return t.indexOf(i)!==-1;if(utils$2.isRegExp(i))return i.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function buildAccessors(e,t){const n=utils$2.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(o,l,u){return this[i].call(this,t,o,l,u)},configurable:!0})})}let AxiosHeaders$1=class{constructor(t){t&&this.set(t)}set(t,n,i){const o=this;function l(f,p,m){const d=normalizeHeader(p);if(!d)throw new Error("header name must be a non-empty string");const g=utils$2.findKey(o,d);(!g||o[g]===void 0||m===!0||m===void 0&&o[g]!==!1)&&(o[g||p]=normalizeValue(f))}const u=(f,p)=>utils$2.forEach(f,(m,d)=>l(m,d,p));if(utils$2.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(utils$2.isString(t)&&(t=t.trim())&&!isValidHeaderName(t))u(parseHeaders(t),n);else if(utils$2.isObject(t)&&utils$2.isIterable(t)){let f={},p,m;for(const d of t){if(!utils$2.isArray(d))throw TypeError("Object iterator must return a key-value pair");f[m=d[0]]=(p=f[m])?utils$2.isArray(p)?[...p,d[1]]:[p,d[1]]:d[1]}u(f,n)}else t!=null&&l(n,t,i);return this}get(t,n){if(t=normalizeHeader(t),t){const i=utils$2.findKey(this,t);if(i){const o=this[i];if(!n)return o;if(n===!0)return parseTokens(o);if(utils$2.isFunction(n))return n.call(this,o,i);if(utils$2.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=normalizeHeader(t),t){const i=utils$2.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||matchHeaderValue(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let o=!1;function l(u){if(u=normalizeHeader(u),u){const f=utils$2.findKey(i,u);f&&(!n||matchHeaderValue(i,i[f],f,n))&&(delete i[f],o=!0)}}return utils$2.isArray(t)?t.forEach(l):l(t),o}clear(t){const n=Object.keys(this);let i=n.length,o=!1;for(;i--;){const l=n[i];(!t||matchHeaderValue(this,this[l],l,t,!0))&&(delete this[l],o=!0)}return o}normalize(t){const n=this,i={};return utils$2.forEach(this,(o,l)=>{const u=utils$2.findKey(i,l);if(u){n[u]=normalizeValue(o),delete n[l];return}const f=t?formatHeader(l):String(l).trim();f!==l&&delete n[l],n[f]=normalizeValue(o),i[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return utils$2.forEach(this,(i,o)=>{i!=null&&i!==!1&&(n[o]=t&&utils$2.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
38
38
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(o=>i.set(o)),i}static accessor(t){const i=(this[$internals]=this[$internals]={accessors:{}}).accessors,o=this.prototype;function l(u){const f=normalizeHeader(u);i[f]||(buildAccessors(o,u),i[f]=!0)}return utils$2.isArray(t)?t.forEach(l):l(t),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$2.reduceDescriptors(AxiosHeaders$1.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});utils$2.freezeMethods(AxiosHeaders$1);function transformData(e,t){const n=this||defaults$1,i=t||n,o=AxiosHeaders$1.from(i.headers);let l=i.data;return utils$2.forEach(e,function(f){l=f.call(n,l,o.normalize(),t?t.status:void 0)}),o.normalize(),l}function isCancel$1(e){return!!(e&&e.__CANCEL__)}function CanceledError$1(e,t,n){AxiosError$1.call(this,e??"canceled",AxiosError$1.ERR_CANCELED,t,n),this.name="CanceledError"}utils$2.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new AxiosError$1("Request failed with status code "+n.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const n=new Array(e),i=new Array(e);let o=0,l=0,u;return t=t!==void 0?t:1e3,function(p){const m=Date.now(),d=i[l];u||(u=m),n[o]=p,i[o]=m;let g=l,_=0;for(;g!==o;)_+=n[g++],g=g%e;if(o=(o+1)%e,o===l&&(l=(l+1)%e),m-u<t)return;const E=d&&m-d;return E?Math.round(_*1e3/E):void 0}}function throttle$3(e,t){let n=0,i=1e3/t,o,l;const u=(m,d=Date.now())=>{n=d,o=null,l&&(clearTimeout(l),l=null),e(...m)};return[(...m)=>{const d=Date.now(),g=d-n;g>=i?u(m,d):(o=m,l||(l=setTimeout(()=>{l=null,u(o)},i-g)))},()=>o&&u(o)]}const progressEventReducer=(e,t,n=3)=>{let i=0;const o=speedometer(50,250);return throttle$3(l=>{const u=l.loaded,f=l.lengthComputable?l.total:void 0,p=u-i,m=o(p),d=u<=f;i=u;const g={loaded:u,total:f,progress:f?u/f:void 0,bytes:p,rate:m||void 0,estimated:m&&f&&d?(f-u)/m:void 0,event:l,lengthComputable:f!=null,[t?"download":"upload"]:!0};e(g)},n)},progressEventDecorator=(e,t)=>{const n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},asyncDecorator=e=>(...t)=>utils$2.asap(()=>e(...t)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,platform.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,n,i,o,l,u){if(typeof document>"u")return;const f=[`${e}=${encodeURIComponent(t)}`];utils$2.isNumber(n)&&f.push(`expires=${new Date(n).toUTCString()}`),utils$2.isString(i)&&f.push(`path=${i}`),utils$2.isString(o)&&f.push(`domain=${o}`),l===!0&&f.push("secure"),utils$2.isString(u)&&f.push(`SameSite=${u}`),document.cookie=f.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,n){let i=!isAbsoluteURL(t);return e&&(i||n==!1)?combineURLs(e,t):t}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,t){t=t||{};const n={};function i(m,d,g,_){return utils$2.isPlainObject(m)&&utils$2.isPlainObject(d)?utils$2.merge.call({caseless:_},m,d):utils$2.isPlainObject(d)?utils$2.merge({},d):utils$2.isArray(d)?d.slice():d}function o(m,d,g,_){if(utils$2.isUndefined(d)){if(!utils$2.isUndefined(m))return i(void 0,m,g,_)}else return i(m,d,g,_)}function l(m,d){if(!utils$2.isUndefined(d))return i(void 0,d)}function u(m,d){if(utils$2.isUndefined(d)){if(!utils$2.isUndefined(m))return i(void 0,m)}else return i(void 0,d)}function f(m,d,g){if(g in t)return i(m,d);if(g in e)return i(void 0,m)}const p={url:l,method:l,data:l,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f,headers:(m,d,g)=>o(headersToObject(m),headersToObject(d),g,!0)};return utils$2.forEach(Object.keys({...e,...t}),function(d){const g=p[d]||o,_=g(e[d],t[d],d);utils$2.isUndefined(_)&&g!==f||(n[d]=_)}),n}const resolveConfig=e=>{const t=mergeConfig$1({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:l,headers:u,auth:f}=t;if(t.headers=u=AxiosHeaders$1.from(u),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),f&&u.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):""))),utils$2.isFormData(n)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(utils$2.isFunction(n.getHeaders)){const p=n.getHeaders(),m=["content-type","content-length"];Object.entries(p).forEach(([d,g])=>{m.includes(d.toLowerCase())&&u.set(d,g)})}}if(platform.hasStandardBrowserEnv&&(i&&utils$2.isFunction(i)&&(i=i(t)),i||i!==!1&&isURLSameOrigin(t.url))){const p=o&&l&&cookies.read(l);p&&u.set(o,p)}return t},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(n,i){const o=resolveConfig(e);let l=o.data;const u=AxiosHeaders$1.from(o.headers).normalize();let{responseType:f,onUploadProgress:p,onDownloadProgress:m}=o,d,g,_,E,S;function b(){E&&E(),S&&S(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let T=new XMLHttpRequest;T.open(o.method.toUpperCase(),o.url,!0),T.timeout=o.timeout;function C(){if(!T)return;const A=AxiosHeaders$1.from("getAllResponseHeaders"in T&&T.getAllResponseHeaders()),I={data:!f||f==="text"||f==="json"?T.responseText:T.response,status:T.status,statusText:T.statusText,headers:A,config:e,request:T};settle(function(D){n(D),b()},function(D){i(D),b()},I),T=null}"onloadend"in T?T.onloadend=C:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.indexOf("file:")===0)||setTimeout(C)},T.onabort=function(){T&&(i(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,T)),T=null)},T.onerror=function(O){const I=O&&O.message?O.message:"Network Error",j=new AxiosError$1(I,AxiosError$1.ERR_NETWORK,e,T);j.event=O||null,i(j),T=null},T.ontimeout=function(){let O=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const I=o.transitional||transitionalDefaults;o.timeoutErrorMessage&&(O=o.timeoutErrorMessage),i(new AxiosError$1(O,I.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,T)),T=null},l===void 0&&u.setContentType(null),"setRequestHeader"in T&&utils$2.forEach(u.toJSON(),function(O,I){T.setRequestHeader(I,O)}),utils$2.isUndefined(o.withCredentials)||(T.withCredentials=!!o.withCredentials),f&&f!=="json"&&(T.responseType=o.responseType),m&&([_,S]=progressEventReducer(m,!0),T.addEventListener("progress",_)),p&&T.upload&&([g,E]=progressEventReducer(p),T.upload.addEventListener("progress",g),T.upload.addEventListener("loadend",E)),(o.cancelToken||o.signal)&&(d=A=>{T&&(i(!A||A.type?new CanceledError$1(null,e,T):A),T.abort(),T=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const R=parseProtocol(o.url);if(R&&platform.protocols.indexOf(R)===-1){i(new AxiosError$1("Unsupported protocol "+R+":",AxiosError$1.ERR_BAD_REQUEST,e));return}T.send(l||null)})},composeSignals=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let i=new AbortController,o;const l=function(m){if(!o){o=!0,f();const d=m instanceof Error?m:this.reason;i.abort(d instanceof AxiosError$1?d:new CanceledError$1(d instanceof Error?d.message:d))}};let u=t&&setTimeout(()=>{u=null,l(new AxiosError$1(`timeout ${t} of ms exceeded`,AxiosError$1.ETIMEDOUT))},t);const f=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(m=>{m.unsubscribe?m.unsubscribe(l):m.removeEventListener("abort",l)}),e=null)};e.forEach(m=>m.addEventListener("abort",l));const{signal:p}=i;return p.unsubscribe=()=>utils$2.asap(f),p}},streamChunk=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let i=0,o;for(;i<n;)o=i+t,yield e.slice(i,o),i=o},readBytes=async function*(e,t){for await(const n of readStream(e))yield*streamChunk(n,t)},readStream=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:i}=await t.read();if(n)break;yield i}}finally{await t.cancel()}},trackStream=(e,t,n,i)=>{const o=readBytes(e,t);let l=0,u,f=p=>{u||(u=!0,i&&i(p))};return new ReadableStream({async pull(p){try{const{done:m,value:d}=await o.next();if(m){f(),p.close();return}let g=d.byteLength;if(n){let _=l+=g;n(_)}p.enqueue(new Uint8Array(d))}catch(m){throw f(m),m}},cancel(p){return f(p),o.return()}},{highWaterMark:2})},DEFAULT_CHUNK_SIZE=64*1024,{isFunction}=utils$2,globalFetchAPI=(({Request:e,Response:t})=>({Request:e,Response:t}))(utils$2.global),{ReadableStream:ReadableStream$1,TextEncoder:TextEncoder$1}=utils$2.global,test=(e,...t)=>{try{return!!e(...t)}catch{return!1}},factory=e=>{e=utils$2.merge.call({skipUndefined:!0},globalFetchAPI,e);const{fetch:t,Request:n,Response:i}=e,o=t?isFunction(t):typeof fetch=="function",l=isFunction(n),u=isFunction(i);if(!o)return!1;const f=o&&isFunction(ReadableStream$1),p=o&&(typeof TextEncoder$1=="function"?(S=>b=>S.encode(b))(new TextEncoder$1):async S=>new Uint8Array(await new n(S).arrayBuffer())),m=l&&f&&test(()=>{let S=!1;const b=new n(platform.origin,{body:new ReadableStream$1,method:"POST",get duplex(){return S=!0,"half"}}).headers.has("Content-Type");return S&&!b}),d=u&&f&&test(()=>utils$2.isReadableStream(new i("").body)),g={stream:d&&(S=>S.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!g[S]&&(g[S]=(b,T)=>{let C=b&&b[S];if(C)return C.call(b);throw new AxiosError$1(`Response type '${S}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,T)})});const _=async S=>{if(S==null)return 0;if(utils$2.isBlob(S))return S.size;if(utils$2.isSpecCompliantForm(S))return(await new n(platform.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(utils$2.isArrayBufferView(S)||utils$2.isArrayBuffer(S))return S.byteLength;if(utils$2.isURLSearchParams(S)&&(S=S+""),utils$2.isString(S))return(await p(S)).byteLength},E=async(S,b)=>{const T=utils$2.toFiniteNumber(S.getContentLength());return T??_(b)};return async S=>{let{url:b,method:T,data:C,signal:R,cancelToken:A,timeout:O,onDownloadProgress:I,onUploadProgress:j,responseType:D,headers:F,withCredentials:B="same-origin",fetchOptions:X}=resolveConfig(S),U=t||fetch;D=D?(D+"").toLowerCase():"text";let N=composeSignals([R,A&&A.toAbortSignal()],O),G=null;const ee=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let J;try{if(j&&m&&T!=="get"&&T!=="head"&&(J=await E(F,C))!==0){let W=new n(b,{method:"POST",body:C,duplex:"half"}),V;if(utils$2.isFormData(C)&&(V=W.headers.get("content-type"))&&F.setContentType(V),W.body){const[Y,q]=progressEventDecorator(J,progressEventReducer(asyncDecorator(j)));C=trackStream(W.body,DEFAULT_CHUNK_SIZE,Y,q)}}utils$2.isString(B)||(B=B?"include":"omit");const z=l&&"credentials"in n.prototype,H={...X,signal:N,method:T.toUpperCase(),headers:F.normalize().toJSON(),body:C,duplex:"half",credentials:z?B:void 0};G=l&&new n(b,H);let M=await(l?U(G,X):U(b,H));const L=d&&(D==="stream"||D==="response");if(d&&(I||L&&ee)){const W={};["status","statusText","headers"].forEach(Q=>{W[Q]=M[Q]});const V=utils$2.toFiniteNumber(M.headers.get("content-length")),[Y,q]=I&&progressEventDecorator(V,progressEventReducer(asyncDecorator(I),!0))||[];M=new i(trackStream(M.body,DEFAULT_CHUNK_SIZE,Y,()=>{q&&q(),ee&&ee()}),W)}D=D||"text";let K=await g[utils$2.findKey(g,D)||"text"](M,S);return!L&&ee&&ee(),await new Promise((W,V)=>{settle(W,V,{data:K,headers:AxiosHeaders$1.from(M.headers),status:M.status,statusText:M.statusText,config:S,request:G})})}catch(z){throw ee&&ee(),z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,S,G),{cause:z.cause||z}):AxiosError$1.from(z,z&&z.code,S,G)}}},seedCache=new Map,getFetch=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:o}=t,l=[i,o,n];let u=l.length,f=u,p,m,d=seedCache;for(;f--;)p=l[f],m=d.get(p),m===void 0&&d.set(p,m=f?new Map:factory(t)),d=m;return m};getFetch();const knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:{get:getFetch}};utils$2.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$2.isFunction(e)||e===null||e===!1;function getAdapter$1(e,t){e=utils$2.isArray(e)?e:[e];const{length:n}=e;let i,o;const l={};for(let u=0;u<n;u++){i=e[u];let f;if(o=i,!isResolvedHandle(i)&&(o=knownAdapters[(f=String(i)).toLowerCase()],o===void 0))throw new AxiosError$1(`Unknown adapter '${f}'`);if(o&&(utils$2.isFunction(o)||(o=o.get(t))))break;l[f||"#"+u]=o}if(!o){const u=Object.entries(l).map(([p,m])=>`adapter ${p} `+(m===!1?"is not supported by the environment":"is not available in the build"));let f=n?u.length>1?`since :
|
|
39
39
|
`+u.map(renderReason).join(`
|
|
@@ -1843,9 +1843,7 @@ const Breadcrumbs = ({ items: e, maxVisible: t = 4, onItemClick: n }) => {
|
|
|
1843
1843
|
}
|
|
1844
1844
|
}, 300);
|
|
1845
1845
|
D.current && (D.current.debounceTimeout = W);
|
|
1846
|
-
}, ee = (
|
|
1847
|
-
O(L.label), o(L), l == null || l(L), S(!1), j(!1);
|
|
1848
|
-
}, J = () => {
|
|
1846
|
+
}, ee = () => {
|
|
1849
1847
|
if (!D.current) return;
|
|
1850
1848
|
const L = D.current.getBoundingClientRect();
|
|
1851
1849
|
X({
|
|
@@ -1856,11 +1854,11 @@ const Breadcrumbs = ({ items: e, maxVisible: t = 4, onItemClick: n }) => {
|
|
|
1856
1854
|
};
|
|
1857
1855
|
useEffect(() => {
|
|
1858
1856
|
if (E)
|
|
1859
|
-
return window.addEventListener("scroll",
|
|
1860
|
-
window.removeEventListener("scroll",
|
|
1857
|
+
return window.addEventListener("scroll", ee, !0), window.addEventListener("resize", ee), ee(), () => {
|
|
1858
|
+
window.removeEventListener("scroll", ee, !0), window.removeEventListener("resize", ee);
|
|
1861
1859
|
};
|
|
1862
1860
|
}, [E]);
|
|
1863
|
-
const
|
|
1861
|
+
const J = () => {
|
|
1864
1862
|
var V;
|
|
1865
1863
|
const L = ((V = D.current) == null ? void 0 : V.value.trim()) || "", K = g.find(
|
|
1866
1864
|
(Y) => Y.label.toLowerCase() === L.toLowerCase()
|
|
@@ -1868,80 +1866,37 @@ const Breadcrumbs = ({ items: e, maxVisible: t = 4, onItemClick: n }) => {
|
|
|
1868
1866
|
j(L !== "" && !K), S(!1), A(!1);
|
|
1869
1867
|
}, 150);
|
|
1870
1868
|
return () => clearTimeout(W);
|
|
1871
|
-
},
|
|
1872
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
"ul",
|
|
1903
|
-
{
|
|
1904
|
-
className: "suggestions-list",
|
|
1905
|
-
style: {
|
|
1906
|
-
position: "absolute",
|
|
1907
|
-
top: B.top,
|
|
1908
|
-
left: B.left,
|
|
1909
|
-
width: B.width,
|
|
1910
|
-
maxHeight: "200px",
|
|
1911
|
-
overflowY: "auto",
|
|
1912
|
-
background: "white",
|
|
1913
|
-
border: "1px solid #ddd",
|
|
1914
|
-
borderRadius: "4px",
|
|
1915
|
-
marginTop: 0,
|
|
1916
|
-
padding: 0,
|
|
1917
|
-
listStyle: "none",
|
|
1918
|
-
zIndex: 9999,
|
|
1919
|
-
boxShadow: "0 4px 6px rgba(0,0,0,0.1)"
|
|
1920
|
-
},
|
|
1921
|
-
children: !b && g.length === 0 && R ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "auto-sug-imput-empty-message", children: "No matches found" }) : g.map((L, K) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1922
|
-
"li",
|
|
1923
|
-
{
|
|
1924
|
-
className: "suggestion-item",
|
|
1925
|
-
onMouseDown: () => ee(L),
|
|
1926
|
-
style: { padding: "0.5rem", cursor: "pointer" },
|
|
1927
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "suggestion-content", children: [
|
|
1928
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "suggestion-label", children: L.label }),
|
|
1929
|
-
L.subtitle && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "suggestion-subtitle", children: L.subtitle })
|
|
1930
|
-
] })
|
|
1931
|
-
},
|
|
1932
|
-
`${L.value}-${K}`
|
|
1933
|
-
))
|
|
1934
|
-
}
|
|
1935
|
-
),
|
|
1936
|
-
document.body
|
|
1937
|
-
)
|
|
1938
|
-
]
|
|
1939
|
-
}
|
|
1940
|
-
),
|
|
1941
|
-
M && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: `${e}-error`, className: "error-text", children: d }),
|
|
1942
|
-
I && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "error-text", id: `${e}-warning`, children: "Please select a valid option" }),
|
|
1943
|
-
b && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "loading-overlay", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "spinner" }) })
|
|
1944
|
-
] });
|
|
1869
|
+
}, z = R.trim().length > 0, H = m && p && !z, M = C || z || !!t;
|
|
1870
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "auto-suggest-input-advanced", style: N, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1871
|
+
"div",
|
|
1872
|
+
{
|
|
1873
|
+
className: "input-wrapper floating-label-wrapper" + (M ? " focused" : "") + (H ? " error" : ""),
|
|
1874
|
+
style: N,
|
|
1875
|
+
children: [
|
|
1876
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1877
|
+
"input",
|
|
1878
|
+
{
|
|
1879
|
+
ref: D,
|
|
1880
|
+
type: "text",
|
|
1881
|
+
value: R,
|
|
1882
|
+
placeholder: t,
|
|
1883
|
+
onChange: G,
|
|
1884
|
+
onFocus: () => {
|
|
1885
|
+
S(!0), A(!0);
|
|
1886
|
+
},
|
|
1887
|
+
onBlur: J,
|
|
1888
|
+
className: "input-field",
|
|
1889
|
+
"aria-invalid": H,
|
|
1890
|
+
"aria-describedby": H ? `${e}-error` : void 0
|
|
1891
|
+
}
|
|
1892
|
+
),
|
|
1893
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "floating-label", children: [
|
|
1894
|
+
e,
|
|
1895
|
+
p && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "required-asterisk", children: "*" })
|
|
1896
|
+
] })
|
|
1897
|
+
]
|
|
1898
|
+
}
|
|
1899
|
+
) });
|
|
1945
1900
|
}, CEAutoSuggestInput = ({
|
|
1946
1901
|
label: e,
|
|
1947
1902
|
placeholder: t = "",
|
package/package.json
CHANGED