@eliseubatista99/react-scaffold-core 0.1.79 → 0.1.81
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.
|
@@ -10,6 +10,7 @@ export interface InputFieldProps {
|
|
|
10
10
|
autoComplete?: HTMLInputAutoCompleteAttribute;
|
|
11
11
|
value?: string;
|
|
12
12
|
initialValue?: string;
|
|
13
|
+
maxLength?: number;
|
|
13
14
|
type?: HTMLInputTypeAttribute;
|
|
14
15
|
onChange?: (value: string) => void;
|
|
15
16
|
onFocus?: () => void;
|
|
@@ -18,4 +19,4 @@ export interface InputFieldProps {
|
|
|
18
19
|
containerStyles?: CSSProperties;
|
|
19
20
|
styles?: CSSProperties;
|
|
20
21
|
}
|
|
21
|
-
export declare const InputField: ({ name, label, leftIcon, rightIcon, bottomMessage, placeHolder, autoComplete, value, initialValue, type, onChange, onFocus, onBlur, inputStyles, containerStyles, styles, step, }: InputFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const InputField: ({ name, label, leftIcon, rightIcon, bottomMessage, placeHolder, autoComplete, value, initialValue, type, onChange, onFocus, onBlur, maxLength, inputStyles, containerStyles, styles, step, }: InputFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ name, label, leftIcon, rightIcon, bottomMessage, placeHolder, autoComplete, value, initialValue, type, onChange, onFocus, onBlur, inputStyles, containerStyles, styles, step, }: import('../inputField').InputFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ name, label, leftIcon, rightIcon, bottomMessage, placeHolder, autoComplete, value, initialValue, type, onChange, onFocus, onBlur, maxLength, inputStyles, containerStyles, styles, step, }: import('../inputField').InputFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
parameters: {
|
|
6
6
|
layout: string;
|
|
7
7
|
};
|
package/dist/index.cjs.js
CHANGED
|
@@ -123,7 +123,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
123
123
|
* @license MIT
|
|
124
124
|
*/var Er="popstate";function ma(e={}){function t(i,a){let{pathname:s,search:c,hash:l}=i.location;return Nt("",{pathname:s,search:c,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(i,a){return typeof a=="string"?a:Xe(a)}return ga(t,r,null,e)}function ae(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ve(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function va(){return Math.random().toString(36).substring(2,10)}function Rr(e,t){return{usr:e.state,key:e.key,idx:t}}function Nt(e,t,r=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Le(t):t,state:r,key:t&&t.key||i||va()}}function Xe({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Le(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function ga(e,t,r,i={}){let{window:a=document.defaultView,v5Compat:s=!1}=i,c=a.history,l="POP",u=null,h=g();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function g(){return(c.state||{idx:null}).idx}function k(){l="POP";let I=g(),x=I==null?null:I-h;h=I,u&&u({action:l,location:p.location,delta:x})}function j(I,x){l="PUSH";let F=Nt(p.location,I,x);h=g()+1;let U=Rr(F,h),B=p.createHref(F);try{c.pushState(U,"",B)}catch(v){if(v instanceof DOMException&&v.name==="DataCloneError")throw v;a.location.assign(B)}s&&u&&u({action:l,location:p.location,delta:1})}function M(I,x){l="REPLACE";let F=Nt(p.location,I,x);h=g();let U=Rr(F,h),B=p.createHref(F);c.replaceState(U,"",B),s&&u&&u({action:l,location:p.location,delta:0})}function P(I){return ya(I)}let p={get action(){return l},get location(){return e(a,c)},listen(I){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(Er,k),u=I,()=>{a.removeEventListener(Er,k),u=null}},createHref(I){return t(a,I)},createURL:P,encodeLocation(I){let x=P(I);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:j,replace:M,go(I){return c.go(I)}};return p}function ya(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),ae(r,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Xe(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function en(e,t,r="/"){return ba(e,t,r,!1)}function ba(e,t,r,i){let a=typeof t=="string"?Le(t):t,s=xe(a.pathname||"/",r);if(s==null)return null;let c=tn(e);wa(c);let l=null;for(let u=0;l==null&&u<c.length;++u){let h=ja(s);l=Ta(c[u],h,i)}return l}function tn(e,t=[],r=[],i=""){let a=(s,c,l)=>{let u={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:c,route:s};u.relativePath.startsWith("/")&&(ae(u.relativePath.startsWith(i),`Absolute route path "${u.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(i.length));let h=Se([i,u.relativePath]),g=r.concat(u);s.children&&s.children.length>0&&(ae(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),tn(s.children,t,g,h)),!(s.path==null&&!s.index)&&t.push({path:h,score:Ea(h,s.index),routesMeta:g})};return e.forEach((s,c)=>{if(s.path===""||!s.path?.includes("?"))a(s,c);else for(let l of rn(s.path))a(s,c,l)}),t}function rn(e){let t=e.split("/");if(t.length===0)return[];let[r,...i]=t,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(i.length===0)return a?[s,""]:[s];let c=rn(i.join("/")),l=[];return l.push(...c.map(u=>u===""?s:[s,u].join("/"))),a&&l.push(...c),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function wa(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ra(t.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var Sa=/^:[\w-]+$/,xa=3,ka=2,Oa=1,Ca=10,Pa=-2,Tr=e=>e==="*";function Ea(e,t){let r=e.split("/"),i=r.length;return r.some(Tr)&&(i+=Pa),t&&(i+=ka),r.filter(a=>!Tr(a)).reduce((a,s)=>a+(Sa.test(s)?xa:s===""?Oa:Ca),i)}function Ra(e,t){return e.length===t.length&&e.slice(0,-1).every((i,a)=>i===t[a])?e[e.length-1]-t[t.length-1]:0}function Ta(e,t,r=!1){let{routesMeta:i}=e,a={},s="/",c=[];for(let l=0;l<i.length;++l){let u=i[l],h=l===i.length-1,g=s==="/"?t:t.slice(s.length)||"/",k=gt({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},g),j=u.route;if(!k&&h&&r&&!i[i.length-1].route.index&&(k=gt({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},g)),!k)return null;Object.assign(a,k.params),c.push({params:a,pathname:Se([s,k.pathname]),pathnameBase:$a(Se([s,k.pathnameBase])),route:j}),k.pathnameBase!=="/"&&(s=Se([s,k.pathnameBase]))}return c}function gt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,i]=_a(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let s=a[0],c=s.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:i.reduce((h,{paramName:g,isOptional:k},j)=>{if(g==="*"){let P=l[j]||"";c=s.slice(0,s.length-P.length).replace(/(.)\/+$/,"$1")}const M=l[j];return k&&!M?h[g]=void 0:h[g]=(M||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:c,pattern:e}}function _a(e,t=!1,r=!0){ve(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,l,u)=>(i.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(i.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),i]}function ja(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ve(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function xe(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function Da(e,t="/"){let{pathname:r,search:i="",hash:a=""}=typeof e=="string"?Le(e):e;return{pathname:r?r.startsWith("/")?r:La(r,t):t,search:Ia(i),hash:Aa(a)}}function La(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Mt(e,t,r,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ma(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function nn(e){let t=Ma(e);return t.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase)}function an(e,t,r,i=!1){let a;typeof e=="string"?a=Le(e):(a={...e},ae(!a.pathname||!a.pathname.includes("?"),Mt("?","pathname","search",a)),ae(!a.pathname||!a.pathname.includes("#"),Mt("#","pathname","hash",a)),ae(!a.search||!a.search.includes("#"),Mt("#","search","hash",a)));let s=e===""||a.pathname==="",c=s?"/":a.pathname,l;if(c==null)l=r;else{let k=t.length-1;if(!i&&c.startsWith("..")){let j=c.split("/");for(;j[0]==="..";)j.shift(),k-=1;a.pathname=j.join("/")}l=k>=0?t[k]:"/"}let u=Da(a,l),h=c&&c!=="/"&&c.endsWith("/"),g=(s||c===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(h||g)&&(u.pathname+="/"),u}var Se=e=>e.join("/").replace(/\/\/+/g,"/"),$a=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ia=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Aa=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ha(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var on=["POST","PUT","PATCH","DELETE"];new Set(on);var za=["GET",...on];new Set(za);var Me=L.createContext(null);Me.displayName="DataRouter";var kt=L.createContext(null);kt.displayName="DataRouterState";var sn=L.createContext({isTransitioning:!1});sn.displayName="ViewTransition";var Na=L.createContext(new Map);Na.displayName="Fetchers";var Fa=L.createContext(null);Fa.displayName="Await";var we=L.createContext(null);we.displayName="Navigation";var Je=L.createContext(null);Je.displayName="Location";var ke=L.createContext({outlet:null,matches:[],isDataRoute:!1});ke.displayName="Route";var Vt=L.createContext(null);Vt.displayName="RouteError";function Wa(e,{relative:t}={}){ae(Ze(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=L.useContext(we),{hash:a,pathname:s,search:c}=Qe(e,{relative:t}),l=s;return r!=="/"&&(l=s==="/"?r:Se([r,s])),i.createHref({pathname:l,search:c,hash:a})}function Ze(){return L.useContext(Je)!=null}function Oe(){return ae(Ze(),"useLocation() may be used only in the context of a <Router> component."),L.useContext(Je).location}var ln="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function un(e){L.useContext(we).static||L.useLayoutEffect(e)}function Xt(){let{isDataRoute:e}=L.useContext(ke);return e?to():Ua()}function Ua(){ae(Ze(),"useNavigate() may be used only in the context of a <Router> component.");let e=L.useContext(Me),{basename:t,navigator:r}=L.useContext(we),{matches:i}=L.useContext(ke),{pathname:a}=Oe(),s=JSON.stringify(nn(i)),c=L.useRef(!1);return un(()=>{c.current=!0}),L.useCallback((u,h={})=>{if(ve(c.current,ln),!c.current)return;if(typeof u=="number"){r.go(u);return}let g=an(u,JSON.parse(s),a,h.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Se([t,g.pathname])),(h.replace?r.replace:r.push)(g,h.state,h)},[t,r,s,a,e])}L.createContext(null);function Qe(e,{relative:t}={}){let{matches:r}=L.useContext(ke),{pathname:i}=Oe(),a=JSON.stringify(nn(r));return L.useMemo(()=>an(e,JSON.parse(a),i,t==="path"),[e,a,i,t])}function Ya(e,t){return cn(e,t)}function cn(e,t,r,i){ae(Ze(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=L.useContext(we),{matches:s}=L.useContext(ke),c=s[s.length-1],l=c?c.params:{},u=c?c.pathname:"/",h=c?c.pathnameBase:"/",g=c&&c.route;{let x=g&&g.path||"";fn(u,!g||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
125
125
|
|
|
126
|
-
Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let k=Oe(),j;if(t){let x=typeof t=="string"?Le(t):t;ae(h==="/"||x.pathname?.startsWith(h),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${x.pathname}" was given in the \`location\` prop.`),j=x}else j=k;let M=j.pathname||"/",P=M;if(h!=="/"){let x=h.replace(/^\//,"").split("/");P="/"+M.replace(/^\//,"").split("/").slice(x.length).join("/")}let p=en(e,{pathname:P});ve(g||p!=null,`No routes matched location "${j.pathname}${j.search}${j.hash}" `),ve(p==null||p[p.length-1].route.element!==void 0||p[p.length-1].route.Component!==void 0||p[p.length-1].route.lazy!==void 0,`Matched leaf route at location "${j.pathname}${j.search}${j.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.`);let I=Ga(p&&p.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:Se([h,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?h:Se([h,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,r,i);return t&&I?L.createElement(Je.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...j},navigationType:"POP"}},I):I}function qa(){let e=eo(),t=Ha(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=L.createElement(L.Fragment,null,L.createElement("p",null,"💿 Hey developer 👋"),L.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",L.createElement("code",{style:s},"ErrorBoundary")," or"," ",L.createElement("code",{style:s},"errorElement")," prop on your route.")),L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},t),r?L.createElement("pre",{style:a},r):null,c)}var Ba=L.createElement(qa,null),Va=class extends L.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){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?L.createElement(ke.Provider,{value:this.props.routeContext},L.createElement(Vt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Xa({routeContext:e,match:t,children:r}){let i=L.useContext(Me);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(ke.Provider,{value:e},r)}function Ga(e,t=[],r=null,i=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,s=r?.errors;if(s!=null){let u=a.findIndex(h=>h.route.id&&s?.[h.route.id]!==void 0);ae(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,u+1))}let c=!1,l=-1;if(r)for(let u=0;u<a.length;u++){let h=a[u];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(l=u),h.route.id){let{loaderData:g,errors:k}=r,j=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!k||k[h.route.id]===void 0);if(h.route.lazy||j){c=!0,l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((u,h,g)=>{let k,j=!1,M=null,P=null;r&&(k=s&&h.route.id?s[h.route.id]:void 0,M=h.route.errorElement||Ba,c&&(l<0&&g===0?(fn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,P=null):l===g&&(j=!0,P=h.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,g+1)),I=()=>{let x;return k?x=M:j?x=P:h.route.Component?x=L.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=u,L.createElement(Xa,{match:h,routeContext:{outlet:u,matches:p,isDataRoute:r!=null},children:x})};return r&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?L.createElement(Va,{location:r.location,revalidation:r.revalidation,component:M,error:k,children:I(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):I()},null)}function Gt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ka(e){let t=L.useContext(Me);return ae(t,Gt(e)),t}function Ja(e){let t=L.useContext(kt);return ae(t,Gt(e)),t}function Za(e){let t=L.useContext(ke);return ae(t,Gt(e)),t}function Kt(e){let t=Za(e),r=t.matches[t.matches.length-1];return ae(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Qa(){return Kt("useRouteId")}function eo(){let e=L.useContext(Vt),t=Ja("useRouteError"),r=Kt("useRouteError");return e!==void 0?e:t.errors?.[r]}function to(){let{router:e}=Ka("useNavigate"),t=Kt("useNavigate"),r=L.useRef(!1);return un(()=>{r.current=!0}),L.useCallback(async(a,s={})=>{ve(r.current,ln),r.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var _r={};function fn(e,t,r){!t&&!_r[e]&&(_r[e]=!0,ve(!1,r))}L.memo(ro);function ro({routes:e,future:t,state:r}){return cn(e,void 0,r,t)}function dn(e){ae(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function no({basename:e="/",children:t=null,location:r,navigationType:i="POP",navigator:a,static:s=!1}){ae(!Ze(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),l=L.useMemo(()=>({basename:c,navigator:a,static:s,future:{}}),[c,a,s]);typeof r=="string"&&(r=Le(r));let{pathname:u="/",search:h="",hash:g="",state:k=null,key:j="default"}=r,M=L.useMemo(()=>{let P=xe(u,c);return P==null?null:{location:{pathname:P,search:h,hash:g,state:k,key:j},navigationType:i}},[c,u,h,g,k,j,i]);return ve(M!=null,`<Router basename="${c}"> is not able to match the URL "${u}${h}${g}" because it does not start with the basename, so the <Router> won't render anything.`),M==null?null:L.createElement(we.Provider,{value:l},L.createElement(Je.Provider,{children:t,value:M}))}function io({children:e,location:t}){return Ya(Ft(e),t)}function Ft(e,t=[]){let r=[];return L.Children.forEach(e,(i,a)=>{if(!L.isValidElement(i))return;let s=[...t,a];if(i.type===L.Fragment){r.push.apply(r,Ft(i.props.children,s));return}ae(i.type===dn,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ae(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=Ft(i.props.children,s)),r.push(c)}),r}var ut="get",ct="application/x-www-form-urlencoded";function Ot(e){return e!=null&&typeof e.tagName=="string"}function ao(e){return Ot(e)&&e.tagName.toLowerCase()==="button"}function oo(e){return Ot(e)&&e.tagName.toLowerCase()==="form"}function so(e){return Ot(e)&&e.tagName.toLowerCase()==="input"}function lo(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function uo(e,t){return e.button===0&&(!t||t==="_self")&&!lo(e)}function Wt(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let i=e[r];return t.concat(Array.isArray(i)?i.map(a=>[r,a]):[[r,i]])},[]))}function co(e,t){let r=Wt(e);return t&&t.forEach((i,a)=>{r.has(a)||t.getAll(a).forEach(s=>{r.append(a,s)})}),r}var at=null;function fo(){if(at===null)try{new FormData(document.createElement("form"),0),at=!1}catch{at=!0}return at}var ho=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $t(e){return e!=null&&!ho.has(e)?(ve(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ct}"`),null):e}function po(e,t){let r,i,a,s,c;if(oo(e)){let l=e.getAttribute("action");i=l?xe(l,t):null,r=e.getAttribute("method")||ut,a=$t(e.getAttribute("enctype"))||ct,s=new FormData(e)}else if(ao(e)||so(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||l.getAttribute("action");if(i=u?xe(u,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||ut,a=$t(e.getAttribute("formenctype"))||$t(l.getAttribute("enctype"))||ct,s=new FormData(l,e),!fo()){let{name:h,type:g,value:k}=e;if(g==="image"){let j=h?`${h}.`:"";s.append(`${j}x`,"0"),s.append(`${j}y`,"0")}else h&&s.append(h,k)}}else{if(Ot(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ut,i=null,a=ct,c=e}return s&&a==="text/plain"&&(c=s,s=void 0),{action:i,method:r.toLowerCase(),encType:a,formData:s,body:c}}function Jt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function mo(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function vo(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 go(e,t,r){let i=await Promise.all(e.map(async a=>{let s=t.routes[a.route.id];if(s){let c=await mo(s,r);return c.links?c.links():[]}return[]}));return So(i.flat(1).filter(vo).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function jr(e,t,r,i,a,s){let c=(u,h)=>r[h]?u.route.id!==r[h].route.id:!0,l=(u,h)=>r[h].pathname!==u.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==u.params["*"];return s==="assets"?t.filter((u,h)=>c(u,h)||l(u,h)):s==="data"?t.filter((u,h)=>{let g=i.routes[u.route.id];if(!g||!g.hasLoader)return!1;if(c(u,h)||l(u,h))return!0;if(u.route.shouldRevalidate){let k=u.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof k=="boolean")return k}return!0}):[]}function yo(e,t,{includeHydrateFallback:r}={}){return bo(e.map(i=>{let a=t.routes[i.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function bo(e){return[...new Set(e)]}function wo(e){let t={},r=Object.keys(e).sort();for(let i of r)t[i]=e[i];return t}function So(e,t){let r=new Set;return new Set(t),e.reduce((i,a)=>{let s=JSON.stringify(wo(a));return r.has(s)||(r.add(s),i.push({key:s,link:a})),i},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var xo=new Set([100,101,204,205]);function ko(e,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname="_root.data":t&&xe(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function hn(){let e=L.useContext(Me);return Jt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Oo(){let e=L.useContext(kt);return Jt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Zt=L.createContext(void 0);Zt.displayName="FrameworkContext";function pn(){let e=L.useContext(Zt);return Jt(e,"You must render this element inside a <HydratedRouter> element"),e}function Co(e,t){let r=L.useContext(Zt),[i,a]=L.useState(!1),[s,c]=L.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:h,onMouseLeave:g,onTouchStart:k}=t,j=L.useRef(null);L.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let p=x=>{x.forEach(F=>{c(F.isIntersecting)})},I=new IntersectionObserver(p,{threshold:.5});return j.current&&I.observe(j.current),()=>{I.disconnect()}}},[e]),L.useEffect(()=>{if(i){let p=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(p)}}},[i]);let M=()=>{a(!0)},P=()=>{a(!1),c(!1)};return r?e!=="intent"?[s,j,{}]:[s,j,{onFocus:Ye(l,M),onBlur:Ye(u,P),onMouseEnter:Ye(h,M),onMouseLeave:Ye(g,P),onTouchStart:Ye(k,M)}]:[!1,j,{}]}function Ye(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Po({page:e,...t}){let{router:r}=hn(),i=L.useMemo(()=>en(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?L.createElement(Ro,{page:e,matches:i,...t}):null}function Eo(e){let{manifest:t,routeModules:r}=pn(),[i,a]=L.useState([]);return L.useEffect(()=>{let s=!1;return go(e,t,r).then(c=>{s||a(c)}),()=>{s=!0}},[e,t,r]),i}function Ro({page:e,matches:t,...r}){let i=Oe(),{manifest:a,routeModules:s}=pn(),{basename:c}=hn(),{loaderData:l,matches:u}=Oo(),h=L.useMemo(()=>jr(e,t,u,a,i,"data"),[e,t,u,a,i]),g=L.useMemo(()=>jr(e,t,u,a,i,"assets"),[e,t,u,a,i]),k=L.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let P=new Set,p=!1;if(t.forEach(x=>{let F=a.routes[x.route.id];!F||!F.hasLoader||(!h.some(U=>U.route.id===x.route.id)&&x.route.id in l&&s[x.route.id]?.shouldRevalidate||F.hasClientLoader?p=!0:P.add(x.route.id))}),P.size===0)return[];let I=ko(e,c);return p&&P.size>0&&I.searchParams.set("_routes",t.filter(x=>P.has(x.route.id)).map(x=>x.route.id).join(",")),[I.pathname+I.search]},[c,l,i,a,h,t,e,s]),j=L.useMemo(()=>yo(g,a),[g,a]),M=Eo(g);return L.createElement(L.Fragment,null,k.map(P=>L.createElement("link",{key:P,rel:"prefetch",as:"fetch",href:P,...r})),j.map(P=>L.createElement("link",{key:P,rel:"modulepreload",href:P,...r})),M.map(({key:P,link:p})=>L.createElement("link",{key:P,...p})))}function To(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var mn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{mn&&(window.__reactRouterVersion="7.6.3")}catch{}function _o({basename:e,children:t,window:r}){let i=L.useRef();i.current==null&&(i.current=ma({window:r,v5Compat:!0}));let a=i.current,[s,c]=L.useState({action:a.action,location:a.location}),l=L.useCallback(u=>{L.startTransition(()=>c(u))},[c]);return L.useLayoutEffect(()=>a.listen(l),[a,l]),L.createElement(no,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:a})}var vn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=L.forwardRef(function({onClick:t,discover:r="render",prefetch:i="none",relative:a,reloadDocument:s,replace:c,state:l,target:u,to:h,preventScrollReset:g,viewTransition:k,...j},M){let{basename:P}=L.useContext(we),p=typeof h=="string"&&vn.test(h),I,x=!1;if(typeof h=="string"&&p&&(I=h,mn))try{let y=new URL(window.location.href),d=h.startsWith("//")?new URL(y.protocol+h):new URL(h),O=xe(d.pathname,P);d.origin===y.origin&&O!=null?h=O+d.search+d.hash:x=!0}catch{ve(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let F=Wa(h,{relative:a}),[U,B,v]=Co(i,j),b=Mo(h,{replace:c,state:l,target:u,preventScrollReset:g,relative:a,viewTransition:k});function w(y){t&&t(y),y.defaultPrevented||b(y)}let E=L.createElement("a",{...j,...v,href:I||F,onClick:x||s?t:w,ref:To(M,B),target:u,"data-discover":!p&&r==="render"?"true":void 0});return U&&!p?L.createElement(L.Fragment,null,E,L.createElement(Po,{page:F})):E});gn.displayName="Link";var jo=L.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:i="",end:a=!1,style:s,to:c,viewTransition:l,children:u,...h},g){let k=Qe(c,{relative:h.relative}),j=Oe(),M=L.useContext(kt),{navigator:P,basename:p}=L.useContext(we),I=M!=null&&No(k)&&l===!0,x=P.encodeLocation?P.encodeLocation(k).pathname:k.pathname,F=j.pathname,U=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;r||(F=F.toLowerCase(),U=U?U.toLowerCase():null,x=x.toLowerCase()),U&&p&&(U=xe(U,p)||U);const B=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let v=F===x||!a&&F.startsWith(x)&&F.charAt(B)==="/",b=U!=null&&(U===x||!a&&U.startsWith(x)&&U.charAt(x.length)==="/"),w={isActive:v,isPending:b,isTransitioning:I},E=v?t:void 0,y;typeof i=="function"?y=i(w):y=[i,v?"active":null,b?"pending":null,I?"transitioning":null].filter(Boolean).join(" ");let d=typeof s=="function"?s(w):s;return L.createElement(gn,{...h,"aria-current":E,className:y,ref:g,style:d,to:c,viewTransition:l},typeof u=="function"?u(w):u)});jo.displayName="NavLink";var Do=L.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:i,replace:a,state:s,method:c=ut,action:l,onSubmit:u,relative:h,preventScrollReset:g,viewTransition:k,...j},M)=>{let P=Ho(),p=zo(l,{relative:h}),I=c.toLowerCase()==="get"?"get":"post",x=typeof l=="string"&&vn.test(l),F=U=>{if(u&&u(U),U.defaultPrevented)return;U.preventDefault();let B=U.nativeEvent.submitter,v=B?.getAttribute("formmethod")||c;P(B||U.currentTarget,{fetcherKey:t,method:v,navigate:r,replace:a,state:s,relative:h,preventScrollReset:g,viewTransition:k})};return L.createElement("form",{ref:M,method:I,action:p,onSubmit:i?u:F,...j,"data-discover":!x&&e==="render"?"true":void 0})});Do.displayName="Form";function Lo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yn(e){let t=L.useContext(Me);return ae(t,Lo(e)),t}function Mo(e,{target:t,replace:r,state:i,preventScrollReset:a,relative:s,viewTransition:c}={}){let l=Xt(),u=Oe(),h=Qe(e,{relative:s});return L.useCallback(g=>{if(uo(g,t)){g.preventDefault();let k=r!==void 0?r:Xe(u)===Xe(h);l(e,{replace:k,state:i,preventScrollReset:a,relative:s,viewTransition:c})}},[u,l,h,r,i,t,e,a,s,c])}function $o(e){ve(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=L.useRef(Wt(e)),r=L.useRef(!1),i=Oe(),a=L.useMemo(()=>co(i.search,r.current?null:t.current),[i.search]),s=Xt(),c=L.useCallback((l,u)=>{const h=Wt(typeof l=="function"?l(a):l);r.current=!0,s("?"+h,u)},[s,a]);return[a,c]}var Io=0,Ao=()=>`__${String(++Io)}__`;function Ho(){let{router:e}=yn("useSubmit"),{basename:t}=L.useContext(we),r=Qa();return L.useCallback(async(i,a={})=>{let{action:s,method:c,encType:l,formData:u,body:h}=po(i,t);if(a.navigate===!1){let g=a.fetcherKey||Ao();await e.fetch(g,r,a.action||s,{preventScrollReset:a.preventScrollReset,formData:u,body:h,formMethod:a.method||c,formEncType:a.encType||l,flushSync:a.flushSync})}else await e.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:u,body:h,formMethod:a.method||c,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}function zo(e,{relative:t}={}){let{basename:r}=L.useContext(we),i=L.useContext(ke);ae(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),s={...Qe(e||".",{relative:t})},c=Oe();if(e==null){s.search=c.search;let l=new URLSearchParams(s.search),u=l.getAll("index");if(u.some(g=>g==="")){l.delete("index"),u.filter(k=>k).forEach(k=>l.append("index",k));let g=l.toString();s.search=g?`?${g}`:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Se([r,s.pathname])),Xe(s)}function No(e,t={}){let r=L.useContext(sn);ae(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=yn("useViewTransitionState"),a=Qe(e,{relative:t.relative});if(!r.isTransitioning)return!1;let s=xe(r.currentLocation.pathname,i)||r.currentLocation.pathname,c=xe(r.nextLocation.pathname,i)||r.nextLocation.pathname;return gt(a.pathname,c)!=null||gt(a.pathname,s)!=null}[...xo];const bn=Y.createContext({history:[],addToHistory:()=>{},popFromHistory:()=>"",replaceHistory:()=>{}}),Fo=()=>{const[e,t]=$o(),r=Y.useMemo(()=>Object.fromEntries(e.entries()),[e]),i=Y.useCallback(h=>{const g={};return h.forEach(k=>{g[k]=e.get(k)}),g},[e]),a=Y.useCallback(h=>{const g=e.get(h);return g==null||g==null,g},[e]),s=Y.useCallback((h,g)=>{const k=new URLSearchParams(e);k.set(h,String(g)),t(k)},[e,t]),c=Y.useCallback(h=>{const g=new URLSearchParams(e);Object.entries(h).forEach(([k,j])=>{j!=null&&g.set(k,String(j))}),t(g)},[e,t]),l=Y.useCallback(h=>{const g=new URLSearchParams(e);g.delete(h),t(g)},[e,t]),u=Y.useCallback(h=>{const g=new URLSearchParams(e);h.forEach(k=>{g.delete(String(k))}),t(g)},[e,t]);return{getAll:()=>r,get:a,getMany:i,set:s,setMany:c,remove:l,removeMany:u}},Wo=()=>{const e=Xt(),t=Oe(),r=Fo(),i=Y.useContext(bn),a=l=>{const u=new URL(l.path,"http://dummy-base");return l.params&&Object.entries(l.params).forEach(([h,g])=>{g!=null&&u.searchParams.set(h,String(g))}),u.pathname+u.search},s=Y.useCallback(l=>{const u=a(l);l.addToHistory!==!1?(e(u),i.addToHistory(u)):(e(u,{replace:!0}),i.popFromHistory(1),i.addToHistory(u))},[e]),c=Y.useCallback(l=>{const u=l||1;e(-u),i.popFromHistory(u)},[e]);return{currentPath:t.pathname,history:i.history,searchParams:r,goBack:c,goTo:s}},Uo=({isReady:e=!0,routes:t,children:r})=>{const i=Y.useRef([]),[a,s]=Y.useState([]),c=Y.useCallback(k=>{i.current=k,s(k)},[]),l=(k,j=!1)=>{let M=[...i.current];j&&(M=M.slice(0,M.length-1)),M=[...M,k],c(M)},u=k=>{let j="",M=[];return i.current.length===0?"/":(i.current.length<=k?(j=i.current[0],M=[j]):(M=i.current.slice(0,i.current.length-k),j=M[M.length-1]),c(M),j)},h=k=>{c(k)},g=t.map(k=>G.jsx(dn,{path:k.path,element:k.render}));return G.jsx(bn.Provider,{value:{history:a,addToHistory:l,popFromHistory:u,replaceHistory:h},children:G.jsx(_o,{children:e&&G.jsxs(G.Fragment,{children:[r,G.jsx(io,{children:g})]})})})},wn=Y.createContext({visibleItems:[],isItemVisible:()=>!1,showItem:()=>{},hideItem:()=>{}}),Yo=({children:e})=>{const t=Y.useRef([]),[r,i]=Y.useState([]),a=Y.useCallback(u=>{t.current=u,i(u)},[]),s=Y.useCallback(u=>t.current.some(h=>h===u),[]),c=Y.useCallback(u=>{s(u)||a([...t.current,u])},[s,a]),l=Y.useCallback(u=>{s(u)&&a(t.current.filter(g=>g!==u))},[s,a]);return G.jsx(wn.Provider,{value:{visibleItems:r,isItemVisible:s,showItem:c,hideItem:l},children:e})},et=()=>{const e=Y.useContext(wn),t=a=>e.visibleItems.some(s=>s===a),r=a=>{e.showItem(a)},i=a=>{e.hideItem(a)};return{visibleItems:e.visibleItems,isItemVisible:t,showItem:r,hideItem:i}},qo=({id:e,onCloseDrawer:t,drawerCloseOffset:r=15})=>{const{isItemVisible:i}=et(),[a,s]=Y.useState({isDragging:!1}),c=Y.useRef(null),l=Y.useRef(null),u=Y.useRef(null),[h,g]=Y.useState(0),k=P=>{s(P)},j=P=>{s(P),g(0)};return Zr({ref:u,onDrag:P=>{s(P);const p=l.current?.clientHeight||0;P.distanceY&&(g(P.distanceY<0?0:-P.distanceY),P.distanceY>=p-r&&(t?.(),j(P)))},onDragEnd:j,onDragStart:k}),{isVisible:i(e),drawerParentRef:c,drawerRef:l,drawerBottomDistance:h,handleRef:u}},Bo=e=>{const{children:t,backgroundStyles:r,contentStyles:i,handle:a}=e,{isVisible:s,drawerParentRef:c,drawerRef:l,handleRef:u,drawerBottomDistance:h}=qo(e);return G.jsx(G.Fragment,{children:s&&G.jsx("div",{ref:c,style:{width:"100%",height:"100%",minHeight:"100vh",left:0,top:0,background:"#00000068",position:"fixed",zIndex:1e3,display:"flex",flexDirection:"column",touchAction:"none",...r},children:G.jsxs("div",{ref:l,style:{width:"100%",height:"fit-content",minHeight:"80px",maxHeight:"90%",background:"#ffffff",borderTopLeftRadius:"16px",borderTopRightRadius:"16px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"24px",zIndex:1001,position:"absolute",bottom:`${h}px`,...i},onClick:g=>{g.stopPropagation()},children:[G.jsx("div",{ref:u,style:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0px",height:"24px",width:"100%",cursor:"pointer",...a?.styles},children:a?.render}),t]})})})},Vo=({onSubmit:e,fields:t})=>{const r=Y.useRef(null),i=Y.useCallback(c=>{const l=Array.from(c.currentTarget.elements).filter(h=>!!h.getAttribute("name"));console.debug("ZAU 1",{event:c,inputs:l});const u=[];for(const h of l){const g=h.name;u.push({name:g,value:h.value})}return u},[e]),a=Y.useCallback(c=>{c.preventDefault(),c.stopPropagation();const l=i(c);e?.(l)},[e]);return{ref:r,submitForm:c=>{r.current&&r.current.requestSubmit()},handleFormSubmission:a}},Xo=Pe.div`
|
|
126
|
+
Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let k=Oe(),j;if(t){let x=typeof t=="string"?Le(t):t;ae(h==="/"||x.pathname?.startsWith(h),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${x.pathname}" was given in the \`location\` prop.`),j=x}else j=k;let M=j.pathname||"/",P=M;if(h!=="/"){let x=h.replace(/^\//,"").split("/");P="/"+M.replace(/^\//,"").split("/").slice(x.length).join("/")}let p=en(e,{pathname:P});ve(g||p!=null,`No routes matched location "${j.pathname}${j.search}${j.hash}" `),ve(p==null||p[p.length-1].route.element!==void 0||p[p.length-1].route.Component!==void 0||p[p.length-1].route.lazy!==void 0,`Matched leaf route at location "${j.pathname}${j.search}${j.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.`);let I=Ga(p&&p.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:Se([h,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?h:Se([h,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,r,i);return t&&I?L.createElement(Je.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...j},navigationType:"POP"}},I):I}function qa(){let e=eo(),t=Ha(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=L.createElement(L.Fragment,null,L.createElement("p",null,"💿 Hey developer 👋"),L.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",L.createElement("code",{style:s},"ErrorBoundary")," or"," ",L.createElement("code",{style:s},"errorElement")," prop on your route.")),L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},t),r?L.createElement("pre",{style:a},r):null,c)}var Ba=L.createElement(qa,null),Va=class extends L.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){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?L.createElement(ke.Provider,{value:this.props.routeContext},L.createElement(Vt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Xa({routeContext:e,match:t,children:r}){let i=L.useContext(Me);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(ke.Provider,{value:e},r)}function Ga(e,t=[],r=null,i=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,s=r?.errors;if(s!=null){let u=a.findIndex(h=>h.route.id&&s?.[h.route.id]!==void 0);ae(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,u+1))}let c=!1,l=-1;if(r)for(let u=0;u<a.length;u++){let h=a[u];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(l=u),h.route.id){let{loaderData:g,errors:k}=r,j=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!k||k[h.route.id]===void 0);if(h.route.lazy||j){c=!0,l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((u,h,g)=>{let k,j=!1,M=null,P=null;r&&(k=s&&h.route.id?s[h.route.id]:void 0,M=h.route.errorElement||Ba,c&&(l<0&&g===0?(fn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,P=null):l===g&&(j=!0,P=h.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,g+1)),I=()=>{let x;return k?x=M:j?x=P:h.route.Component?x=L.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=u,L.createElement(Xa,{match:h,routeContext:{outlet:u,matches:p,isDataRoute:r!=null},children:x})};return r&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?L.createElement(Va,{location:r.location,revalidation:r.revalidation,component:M,error:k,children:I(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):I()},null)}function Gt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ka(e){let t=L.useContext(Me);return ae(t,Gt(e)),t}function Ja(e){let t=L.useContext(kt);return ae(t,Gt(e)),t}function Za(e){let t=L.useContext(ke);return ae(t,Gt(e)),t}function Kt(e){let t=Za(e),r=t.matches[t.matches.length-1];return ae(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Qa(){return Kt("useRouteId")}function eo(){let e=L.useContext(Vt),t=Ja("useRouteError"),r=Kt("useRouteError");return e!==void 0?e:t.errors?.[r]}function to(){let{router:e}=Ka("useNavigate"),t=Kt("useNavigate"),r=L.useRef(!1);return un(()=>{r.current=!0}),L.useCallback(async(a,s={})=>{ve(r.current,ln),r.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var _r={};function fn(e,t,r){!t&&!_r[e]&&(_r[e]=!0,ve(!1,r))}L.memo(ro);function ro({routes:e,future:t,state:r}){return cn(e,void 0,r,t)}function dn(e){ae(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function no({basename:e="/",children:t=null,location:r,navigationType:i="POP",navigator:a,static:s=!1}){ae(!Ze(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),l=L.useMemo(()=>({basename:c,navigator:a,static:s,future:{}}),[c,a,s]);typeof r=="string"&&(r=Le(r));let{pathname:u="/",search:h="",hash:g="",state:k=null,key:j="default"}=r,M=L.useMemo(()=>{let P=xe(u,c);return P==null?null:{location:{pathname:P,search:h,hash:g,state:k,key:j},navigationType:i}},[c,u,h,g,k,j,i]);return ve(M!=null,`<Router basename="${c}"> is not able to match the URL "${u}${h}${g}" because it does not start with the basename, so the <Router> won't render anything.`),M==null?null:L.createElement(we.Provider,{value:l},L.createElement(Je.Provider,{children:t,value:M}))}function io({children:e,location:t}){return Ya(Ft(e),t)}function Ft(e,t=[]){let r=[];return L.Children.forEach(e,(i,a)=>{if(!L.isValidElement(i))return;let s=[...t,a];if(i.type===L.Fragment){r.push.apply(r,Ft(i.props.children,s));return}ae(i.type===dn,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ae(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=Ft(i.props.children,s)),r.push(c)}),r}var ut="get",ct="application/x-www-form-urlencoded";function Ot(e){return e!=null&&typeof e.tagName=="string"}function ao(e){return Ot(e)&&e.tagName.toLowerCase()==="button"}function oo(e){return Ot(e)&&e.tagName.toLowerCase()==="form"}function so(e){return Ot(e)&&e.tagName.toLowerCase()==="input"}function lo(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function uo(e,t){return e.button===0&&(!t||t==="_self")&&!lo(e)}function Wt(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let i=e[r];return t.concat(Array.isArray(i)?i.map(a=>[r,a]):[[r,i]])},[]))}function co(e,t){let r=Wt(e);return t&&t.forEach((i,a)=>{r.has(a)||t.getAll(a).forEach(s=>{r.append(a,s)})}),r}var at=null;function fo(){if(at===null)try{new FormData(document.createElement("form"),0),at=!1}catch{at=!0}return at}var ho=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $t(e){return e!=null&&!ho.has(e)?(ve(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ct}"`),null):e}function po(e,t){let r,i,a,s,c;if(oo(e)){let l=e.getAttribute("action");i=l?xe(l,t):null,r=e.getAttribute("method")||ut,a=$t(e.getAttribute("enctype"))||ct,s=new FormData(e)}else if(ao(e)||so(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||l.getAttribute("action");if(i=u?xe(u,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||ut,a=$t(e.getAttribute("formenctype"))||$t(l.getAttribute("enctype"))||ct,s=new FormData(l,e),!fo()){let{name:h,type:g,value:k}=e;if(g==="image"){let j=h?`${h}.`:"";s.append(`${j}x`,"0"),s.append(`${j}y`,"0")}else h&&s.append(h,k)}}else{if(Ot(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ut,i=null,a=ct,c=e}return s&&a==="text/plain"&&(c=s,s=void 0),{action:i,method:r.toLowerCase(),encType:a,formData:s,body:c}}function Jt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function mo(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function vo(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 go(e,t,r){let i=await Promise.all(e.map(async a=>{let s=t.routes[a.route.id];if(s){let c=await mo(s,r);return c.links?c.links():[]}return[]}));return So(i.flat(1).filter(vo).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function jr(e,t,r,i,a,s){let c=(u,h)=>r[h]?u.route.id!==r[h].route.id:!0,l=(u,h)=>r[h].pathname!==u.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==u.params["*"];return s==="assets"?t.filter((u,h)=>c(u,h)||l(u,h)):s==="data"?t.filter((u,h)=>{let g=i.routes[u.route.id];if(!g||!g.hasLoader)return!1;if(c(u,h)||l(u,h))return!0;if(u.route.shouldRevalidate){let k=u.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof k=="boolean")return k}return!0}):[]}function yo(e,t,{includeHydrateFallback:r}={}){return bo(e.map(i=>{let a=t.routes[i.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function bo(e){return[...new Set(e)]}function wo(e){let t={},r=Object.keys(e).sort();for(let i of r)t[i]=e[i];return t}function So(e,t){let r=new Set;return new Set(t),e.reduce((i,a)=>{let s=JSON.stringify(wo(a));return r.has(s)||(r.add(s),i.push({key:s,link:a})),i},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var xo=new Set([100,101,204,205]);function ko(e,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname="_root.data":t&&xe(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function hn(){let e=L.useContext(Me);return Jt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Oo(){let e=L.useContext(kt);return Jt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Zt=L.createContext(void 0);Zt.displayName="FrameworkContext";function pn(){let e=L.useContext(Zt);return Jt(e,"You must render this element inside a <HydratedRouter> element"),e}function Co(e,t){let r=L.useContext(Zt),[i,a]=L.useState(!1),[s,c]=L.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:h,onMouseLeave:g,onTouchStart:k}=t,j=L.useRef(null);L.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let p=x=>{x.forEach(F=>{c(F.isIntersecting)})},I=new IntersectionObserver(p,{threshold:.5});return j.current&&I.observe(j.current),()=>{I.disconnect()}}},[e]),L.useEffect(()=>{if(i){let p=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(p)}}},[i]);let M=()=>{a(!0)},P=()=>{a(!1),c(!1)};return r?e!=="intent"?[s,j,{}]:[s,j,{onFocus:Ye(l,M),onBlur:Ye(u,P),onMouseEnter:Ye(h,M),onMouseLeave:Ye(g,P),onTouchStart:Ye(k,M)}]:[!1,j,{}]}function Ye(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Po({page:e,...t}){let{router:r}=hn(),i=L.useMemo(()=>en(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?L.createElement(Ro,{page:e,matches:i,...t}):null}function Eo(e){let{manifest:t,routeModules:r}=pn(),[i,a]=L.useState([]);return L.useEffect(()=>{let s=!1;return go(e,t,r).then(c=>{s||a(c)}),()=>{s=!0}},[e,t,r]),i}function Ro({page:e,matches:t,...r}){let i=Oe(),{manifest:a,routeModules:s}=pn(),{basename:c}=hn(),{loaderData:l,matches:u}=Oo(),h=L.useMemo(()=>jr(e,t,u,a,i,"data"),[e,t,u,a,i]),g=L.useMemo(()=>jr(e,t,u,a,i,"assets"),[e,t,u,a,i]),k=L.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let P=new Set,p=!1;if(t.forEach(x=>{let F=a.routes[x.route.id];!F||!F.hasLoader||(!h.some(U=>U.route.id===x.route.id)&&x.route.id in l&&s[x.route.id]?.shouldRevalidate||F.hasClientLoader?p=!0:P.add(x.route.id))}),P.size===0)return[];let I=ko(e,c);return p&&P.size>0&&I.searchParams.set("_routes",t.filter(x=>P.has(x.route.id)).map(x=>x.route.id).join(",")),[I.pathname+I.search]},[c,l,i,a,h,t,e,s]),j=L.useMemo(()=>yo(g,a),[g,a]),M=Eo(g);return L.createElement(L.Fragment,null,k.map(P=>L.createElement("link",{key:P,rel:"prefetch",as:"fetch",href:P,...r})),j.map(P=>L.createElement("link",{key:P,rel:"modulepreload",href:P,...r})),M.map(({key:P,link:p})=>L.createElement("link",{key:P,...p})))}function To(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var mn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{mn&&(window.__reactRouterVersion="7.6.3")}catch{}function _o({basename:e,children:t,window:r}){let i=L.useRef();i.current==null&&(i.current=ma({window:r,v5Compat:!0}));let a=i.current,[s,c]=L.useState({action:a.action,location:a.location}),l=L.useCallback(u=>{L.startTransition(()=>c(u))},[c]);return L.useLayoutEffect(()=>a.listen(l),[a,l]),L.createElement(no,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:a})}var vn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=L.forwardRef(function({onClick:t,discover:r="render",prefetch:i="none",relative:a,reloadDocument:s,replace:c,state:l,target:u,to:h,preventScrollReset:g,viewTransition:k,...j},M){let{basename:P}=L.useContext(we),p=typeof h=="string"&&vn.test(h),I,x=!1;if(typeof h=="string"&&p&&(I=h,mn))try{let y=new URL(window.location.href),d=h.startsWith("//")?new URL(y.protocol+h):new URL(h),O=xe(d.pathname,P);d.origin===y.origin&&O!=null?h=O+d.search+d.hash:x=!0}catch{ve(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let F=Wa(h,{relative:a}),[U,B,v]=Co(i,j),b=Mo(h,{replace:c,state:l,target:u,preventScrollReset:g,relative:a,viewTransition:k});function w(y){t&&t(y),y.defaultPrevented||b(y)}let E=L.createElement("a",{...j,...v,href:I||F,onClick:x||s?t:w,ref:To(M,B),target:u,"data-discover":!p&&r==="render"?"true":void 0});return U&&!p?L.createElement(L.Fragment,null,E,L.createElement(Po,{page:F})):E});gn.displayName="Link";var jo=L.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:i="",end:a=!1,style:s,to:c,viewTransition:l,children:u,...h},g){let k=Qe(c,{relative:h.relative}),j=Oe(),M=L.useContext(kt),{navigator:P,basename:p}=L.useContext(we),I=M!=null&&No(k)&&l===!0,x=P.encodeLocation?P.encodeLocation(k).pathname:k.pathname,F=j.pathname,U=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;r||(F=F.toLowerCase(),U=U?U.toLowerCase():null,x=x.toLowerCase()),U&&p&&(U=xe(U,p)||U);const B=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let v=F===x||!a&&F.startsWith(x)&&F.charAt(B)==="/",b=U!=null&&(U===x||!a&&U.startsWith(x)&&U.charAt(x.length)==="/"),w={isActive:v,isPending:b,isTransitioning:I},E=v?t:void 0,y;typeof i=="function"?y=i(w):y=[i,v?"active":null,b?"pending":null,I?"transitioning":null].filter(Boolean).join(" ");let d=typeof s=="function"?s(w):s;return L.createElement(gn,{...h,"aria-current":E,className:y,ref:g,style:d,to:c,viewTransition:l},typeof u=="function"?u(w):u)});jo.displayName="NavLink";var Do=L.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:i,replace:a,state:s,method:c=ut,action:l,onSubmit:u,relative:h,preventScrollReset:g,viewTransition:k,...j},M)=>{let P=Ho(),p=zo(l,{relative:h}),I=c.toLowerCase()==="get"?"get":"post",x=typeof l=="string"&&vn.test(l),F=U=>{if(u&&u(U),U.defaultPrevented)return;U.preventDefault();let B=U.nativeEvent.submitter,v=B?.getAttribute("formmethod")||c;P(B||U.currentTarget,{fetcherKey:t,method:v,navigate:r,replace:a,state:s,relative:h,preventScrollReset:g,viewTransition:k})};return L.createElement("form",{ref:M,method:I,action:p,onSubmit:i?u:F,...j,"data-discover":!x&&e==="render"?"true":void 0})});Do.displayName="Form";function Lo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yn(e){let t=L.useContext(Me);return ae(t,Lo(e)),t}function Mo(e,{target:t,replace:r,state:i,preventScrollReset:a,relative:s,viewTransition:c}={}){let l=Xt(),u=Oe(),h=Qe(e,{relative:s});return L.useCallback(g=>{if(uo(g,t)){g.preventDefault();let k=r!==void 0?r:Xe(u)===Xe(h);l(e,{replace:k,state:i,preventScrollReset:a,relative:s,viewTransition:c})}},[u,l,h,r,i,t,e,a,s,c])}function $o(e){ve(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=L.useRef(Wt(e)),r=L.useRef(!1),i=Oe(),a=L.useMemo(()=>co(i.search,r.current?null:t.current),[i.search]),s=Xt(),c=L.useCallback((l,u)=>{const h=Wt(typeof l=="function"?l(a):l);r.current=!0,s("?"+h,u)},[s,a]);return[a,c]}var Io=0,Ao=()=>`__${String(++Io)}__`;function Ho(){let{router:e}=yn("useSubmit"),{basename:t}=L.useContext(we),r=Qa();return L.useCallback(async(i,a={})=>{let{action:s,method:c,encType:l,formData:u,body:h}=po(i,t);if(a.navigate===!1){let g=a.fetcherKey||Ao();await e.fetch(g,r,a.action||s,{preventScrollReset:a.preventScrollReset,formData:u,body:h,formMethod:a.method||c,formEncType:a.encType||l,flushSync:a.flushSync})}else await e.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:u,body:h,formMethod:a.method||c,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}function zo(e,{relative:t}={}){let{basename:r}=L.useContext(we),i=L.useContext(ke);ae(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),s={...Qe(e||".",{relative:t})},c=Oe();if(e==null){s.search=c.search;let l=new URLSearchParams(s.search),u=l.getAll("index");if(u.some(g=>g==="")){l.delete("index"),u.filter(k=>k).forEach(k=>l.append("index",k));let g=l.toString();s.search=g?`?${g}`:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Se([r,s.pathname])),Xe(s)}function No(e,t={}){let r=L.useContext(sn);ae(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=yn("useViewTransitionState"),a=Qe(e,{relative:t.relative});if(!r.isTransitioning)return!1;let s=xe(r.currentLocation.pathname,i)||r.currentLocation.pathname,c=xe(r.nextLocation.pathname,i)||r.nextLocation.pathname;return gt(a.pathname,c)!=null||gt(a.pathname,s)!=null}[...xo];const bn=Y.createContext({history:[],addToHistory:()=>{},popFromHistory:()=>"",replaceHistory:()=>{}}),Fo=()=>{const[e,t]=$o(),r=Y.useMemo(()=>Object.fromEntries(e.entries()),[e]),i=Y.useCallback(h=>{const g={};return h.forEach(k=>{g[k]=e.get(k)}),g},[e]),a=Y.useCallback(h=>{const g=e.get(h);return g==null||g==null,g},[e]),s=Y.useCallback((h,g)=>{const k=new URLSearchParams(e);k.set(h,String(g)),t(k)},[e,t]),c=Y.useCallback(h=>{const g=new URLSearchParams(e);Object.entries(h).forEach(([k,j])=>{j!=null&&g.set(k,String(j))}),t(g)},[e,t]),l=Y.useCallback(h=>{const g=new URLSearchParams(e);g.delete(h),t(g)},[e,t]),u=Y.useCallback(h=>{const g=new URLSearchParams(e);h.forEach(k=>{g.delete(String(k))}),t(g)},[e,t]);return{getAll:()=>r,get:a,getMany:i,set:s,setMany:c,remove:l,removeMany:u}},Wo=()=>{const e=Xt(),t=Oe(),r=Fo(),i=Y.useContext(bn),a=l=>{const u=new URL(l.path,"http://dummy-base");return l.params&&Object.entries(l.params).forEach(([h,g])=>{g!=null&&u.searchParams.set(h,String(g))}),u.pathname+u.search},s=Y.useCallback(l=>{const u=a(l);l.addToHistory!==!1?(e(u),i.addToHistory(u)):(e(u,{replace:!0}),i.popFromHistory(1),i.addToHistory(u))},[e]),c=Y.useCallback(l=>{const u=l||1;e(-u),i.popFromHistory(u)},[e]);return{currentPath:t.pathname,history:i.history,searchParams:r,goBack:c,goTo:s}},Uo=({isReady:e=!0,routes:t,children:r})=>{const i=Y.useRef([]),[a,s]=Y.useState([]),c=Y.useCallback(k=>{i.current=k,s(k)},[]),l=(k,j=!1)=>{let M=[...i.current];j&&(M=M.slice(0,M.length-1)),M=[...M,k],c(M)},u=k=>{let j="",M=[];return i.current.length===0?"/":(i.current.length<=k?(j=i.current[0],M=[j]):(M=i.current.slice(0,i.current.length-k),j=M[M.length-1]),c(M),j)},h=k=>{c(k)},g=t.map(k=>G.jsx(dn,{path:k.path,element:k.render}));return G.jsx(bn.Provider,{value:{history:a,addToHistory:l,popFromHistory:u,replaceHistory:h},children:G.jsx(_o,{children:e&&G.jsxs(G.Fragment,{children:[r,G.jsx(io,{children:g})]})})})},wn=Y.createContext({visibleItems:[],isItemVisible:()=>!1,showItem:()=>{},hideItem:()=>{}}),Yo=({children:e})=>{const t=Y.useRef([]),[r,i]=Y.useState([]),a=Y.useCallback(u=>{t.current=u,i(u)},[]),s=Y.useCallback(u=>t.current.some(h=>h===u),[]),c=Y.useCallback(u=>{s(u)||a([...t.current,u])},[s,a]),l=Y.useCallback(u=>{s(u)&&a(t.current.filter(g=>g!==u))},[s,a]);return G.jsx(wn.Provider,{value:{visibleItems:r,isItemVisible:s,showItem:c,hideItem:l},children:e})},et=()=>{const e=Y.useContext(wn),t=a=>e.visibleItems.some(s=>s===a),r=a=>{e.showItem(a)},i=a=>{e.hideItem(a)};return{visibleItems:e.visibleItems,isItemVisible:t,showItem:r,hideItem:i}},qo=({id:e,onCloseDrawer:t,drawerCloseOffset:r=15})=>{const{isItemVisible:i}=et(),[a,s]=Y.useState({isDragging:!1}),c=Y.useRef(null),l=Y.useRef(null),u=Y.useRef(null),[h,g]=Y.useState(0),k=P=>{s(P)},j=P=>{s(P),g(0)};return Zr({ref:u,onDrag:P=>{s(P);const p=l.current?.clientHeight||0;P.distanceY&&(g(P.distanceY<0?0:-P.distanceY),P.distanceY>=p-r&&(t?.(),j(P)))},onDragEnd:j,onDragStart:k}),{isVisible:i(e),drawerParentRef:c,drawerRef:l,drawerBottomDistance:h,handleRef:u}},Bo=e=>{const{children:t,backgroundStyles:r,contentStyles:i,handle:a}=e,{isVisible:s,drawerParentRef:c,drawerRef:l,handleRef:u,drawerBottomDistance:h}=qo(e);return G.jsx(G.Fragment,{children:s&&G.jsx("div",{ref:c,style:{width:"100%",height:"100%",minHeight:"100vh",left:0,top:0,background:"#00000068",position:"fixed",zIndex:1e3,display:"flex",flexDirection:"column",touchAction:"none",...r},children:G.jsxs("div",{ref:l,style:{width:"100%",height:"fit-content",minHeight:"80px",maxHeight:"90%",background:"#ffffff",borderTopLeftRadius:"16px",borderTopRightRadius:"16px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"24px",zIndex:1001,position:"absolute",bottom:`${h}px`,...i},onClick:g=>{g.stopPropagation()},children:[G.jsx("div",{ref:u,style:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0px",height:"24px",width:"100%",cursor:"pointer",...a?.styles},children:a?.render}),t]})})})},Vo=({onSubmit:e,fields:t})=>{const r=Y.useRef(null),i=Y.useCallback(c=>{const l=Array.from(c.currentTarget.elements).filter(h=>!!h.getAttribute("name")),u=[];for(const h of l){const g=h.name;u.push({name:g,value:h.value})}return u},[e]),a=Y.useCallback(c=>{c.preventDefault(),c.stopPropagation();const l=i(c);e?.(l)},[e]);return{ref:r,submitForm:c=>{r.current&&r.current.requestSubmit()},handleFormSubmission:a}},Xo=Pe.div`
|
|
127
127
|
display: flex;
|
|
128
128
|
width: 100%;
|
|
129
129
|
align-items: center;
|
|
@@ -156,7 +156,7 @@ Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}
|
|
|
156
156
|
input:-webkit-autofill {
|
|
157
157
|
background-color: #00000000;
|
|
158
158
|
}
|
|
159
|
-
`,Zo=({name:e,label:t,leftIcon:r,rightIcon:i,bottomMessage:a,placeHolder:s,autoComplete:c="off",value:l,initialValue:u,type:h="text",onChange:g,onFocus:k,onBlur:j,
|
|
159
|
+
`,Zo=({name:e,label:t,leftIcon:r,rightIcon:i,bottomMessage:a,placeHolder:s,autoComplete:c="off",value:l,initialValue:u,type:h="text",onChange:g,onFocus:k,onBlur:j,maxLength:M,inputStyles:P,containerStyles:p,styles:I,step:x})=>{const F=v=>{g?.(v.currentTarget.value)},U=v=>{v.preventDefault(),v.stopPropagation(),k?.()},B=v=>{j?.()};return G.jsxs(Jo,{style:{width:"100%",maxWidth:"357px",gap:"8px",...I},children:[t,G.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",height:"47px",margin:"8px auto 0 auto",border:"2px solid #000000",borderRadius:"5px",padding:"5px 15px",color:"#000000",fontFamily:"inherit",fontStyle:"normal",fontWeight:400,fontSize:"16px",lineHeight:"24px",outline:"none",alignItems:"center",gap:"10px",...p},children:[r,G.jsx("input",{name:e,type:h,autoComplete:c,step:x,maxLength:M,style:{flex:1,border:"none",color:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",outline:"inherit",background:"none",...P},placeholder:s,value:l,defaultValue:u,onChange:F,onFocus:U,onBlur:B}),i]}),a]})},Qo=({id:e,styles:t,children:r})=>{const{isItemVisible:i}=et();return G.jsx(G.Fragment,{children:i(e)&&G.jsx("div",{style:{width:"100%",minHeight:"100%",left:0,top:0,position:"fixed",zIndex:1e3,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",...t},children:r})})},es=({id:e,children:t,backgroundStyles:r,contentStyles:i,onClickOutsideModal:a})=>{const{isItemVisible:s}=et();return G.jsx(G.Fragment,{children:s(e)&&G.jsx("div",{style:{width:"100%",height:"100%",minHeight:"100vh",background:"#00000068",position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:1e3,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",...r},onClick:()=>{a?.()},children:G.jsx("div",{style:{width:"90%",maxWidth:"375px",height:"fit-content",minHeight:"80px",maxHeight:"50%",background:"#ffffff",borderRadius:"16px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",zIndex:1001,position:"relative",padding:"24px",...i},onClick:c=>{c.stopPropagation()},children:t})})})},ts=e=>{const t=Y.useRef(null),r=Y.useRef(null),[i,a]=Y.useState(24),[s,c]=Y.useState(24),l=Y.useCallback(()=>{t.current&&a(t.current.clientHeight)},[t,t.current]),u=Y.useCallback(()=>{r.current&&c(r.current.clientHeight)},[r,r.current]),h=Y.useCallback(()=>{let g=0;return e.header?.visibility==="always"&&(g=g+(i||0)),e.footer?.visibility==="always"&&(g=g+(s||0)),g},[r,r.current]);return Y.useEffect(()=>{l()},[l,t,t.current]),Y.useEffect(()=>{u()},[u,r,r.current]),{header:{...e.header,visible:e.header!==void 0,height:e.header?.visibility==="fixed"?0:i,ref:t},footer:{...e.footer,visible:e.footer!==void 0,height:e.footer?.visibility==="fixed"?0:s,ref:r},page:{extraHeight:h()}}},rs=Pe.div`
|
|
160
160
|
min-height: 100%;
|
|
161
161
|
max-height: 100%;
|
|
162
162
|
width: 100%;
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as D from "react";
|
|
2
|
-
import
|
|
2
|
+
import q, { forwardRef as kn, useContext as Yt, useEffect as Ir, useState as Ar, useMemo as zr, useCallback as _e } from "react";
|
|
3
3
|
var rt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4
4
|
function qt(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -102,7 +102,7 @@ function En() {
|
|
|
102
102
|
return (n.displayName || "Context") + ".Provider";
|
|
103
103
|
case F:
|
|
104
104
|
return (n._context.displayName || "Context") + ".Consumer";
|
|
105
|
-
case
|
|
105
|
+
case B:
|
|
106
106
|
var f = n.render;
|
|
107
107
|
return n = n.displayName, n || (n = f.displayName || f.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
|
|
108
108
|
case w:
|
|
@@ -264,7 +264,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
264
264
|
function O(n) {
|
|
265
265
|
typeof n == "object" && n !== null && n.$$typeof === M && n._store && (n._store.validated = 1);
|
|
266
266
|
}
|
|
267
|
-
var j =
|
|
267
|
+
var j = q, M = Symbol.for("react.transitional.element"), P = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), F = Symbol.for("react.consumer"), U = Symbol.for("react.context"), B = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), y = Symbol.for("react.activity"), d = Symbol.for("react.client.reference"), k = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, R = Array.isArray, _ = console.createTask ? console.createTask : function() {
|
|
268
268
|
return null;
|
|
269
269
|
};
|
|
270
270
|
j = {
|
|
@@ -381,7 +381,7 @@ function Tn() {
|
|
|
381
381
|
var E, y, d, k, A, R, _ = 0, C = !1, T = !1, o = !0;
|
|
382
382
|
if (typeof v != "function")
|
|
383
383
|
throw new TypeError(e);
|
|
384
|
-
b =
|
|
384
|
+
b = B(b) || 0, x(w) && (C = !!w.leading, T = "maxWait" in w, d = T ? M(B(w.maxWait) || 0, b) : d, o = "trailing" in w ? !!w.trailing : o);
|
|
385
385
|
function z(W) {
|
|
386
386
|
var V = E, K = y;
|
|
387
387
|
return E = y = void 0, _ = W, k = v.apply(K, V), k;
|
|
@@ -434,7 +434,7 @@ function Tn() {
|
|
|
434
434
|
function U(v) {
|
|
435
435
|
return typeof v == "symbol" || F(v) && j.call(v) == r;
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function B(v) {
|
|
438
438
|
if (typeof v == "number")
|
|
439
439
|
return v;
|
|
440
440
|
if (U(v))
|
|
@@ -496,7 +496,7 @@ function Hr() {
|
|
|
496
496
|
Object.defineProperty(e, "__esModule", {
|
|
497
497
|
value: !0
|
|
498
498
|
}), e.default = void 0;
|
|
499
|
-
var t = r(
|
|
499
|
+
var t = r(q);
|
|
500
500
|
function r(a) {
|
|
501
501
|
return a && a.__esModule ? a : { default: a };
|
|
502
502
|
}
|
|
@@ -572,7 +572,7 @@ function Ke() {
|
|
|
572
572
|
ur = 1, Object.defineProperty(Y, "__esModule", {
|
|
573
573
|
value: !0
|
|
574
574
|
}), Y.checkSpecKeys = Y.checkNavigable = Y.changeSlide = Y.canUseDOM = Y.canGoNext = void 0, Y.clamp = h, Y.extractObject = void 0, Y.filterSettings = z, Y.validSettings = Y.swipeStart = Y.swipeMove = Y.swipeEnd = Y.slidesOnRight = Y.slidesOnLeft = Y.slideHandler = Y.siblingDirection = Y.safePreventDefault = Y.lazyStartIndex = Y.lazySlidesOnRight = Y.lazySlidesOnLeft = Y.lazyEndIndex = Y.keyHandler = Y.initializedState = Y.getWidth = Y.getTrackLeft = Y.getTrackCSS = Y.getTrackAnimateCSS = Y.getTotalSlides = Y.getSwipeDirection = Y.getSlideCount = Y.getRequiredLazySlides = Y.getPreClones = Y.getPostClones = Y.getOnDemandLazySlides = Y.getNavigableIndexes = Y.getHeight = void 0;
|
|
575
|
-
var e = r(
|
|
575
|
+
var e = r(q), t = r(Hr());
|
|
576
576
|
function r(m) {
|
|
577
577
|
return m && m.__esModule ? m : { default: m };
|
|
578
578
|
}
|
|
@@ -830,12 +830,12 @@ function Ke() {
|
|
|
830
830
|
}
|
|
831
831
|
return Q;
|
|
832
832
|
};
|
|
833
|
-
var
|
|
833
|
+
var B = Y.getNavigableIndexes = function(n) {
|
|
834
834
|
for (var f = n.infinite ? n.slideCount * 2 : n.slideCount, S = n.infinite ? n.slidesToShow * -1 : 0, $ = n.infinite ? n.slidesToShow * -1 : 0, L = []; S < f; )
|
|
835
835
|
L.push(S), S = $ + n.slidesToScroll, $ += Math.min(n.slidesToScroll, n.slidesToShow);
|
|
836
836
|
return L;
|
|
837
837
|
}, v = Y.checkNavigable = function(n, f) {
|
|
838
|
-
var S =
|
|
838
|
+
var S = B(n), $ = 0;
|
|
839
839
|
if (f > S[S.length - 1])
|
|
840
840
|
f = S[S.length - 1];
|
|
841
841
|
else
|
|
@@ -956,7 +956,7 @@ function jn() {
|
|
|
956
956
|
cr = 1, Object.defineProperty(Fe, "__esModule", {
|
|
957
957
|
value: !0
|
|
958
958
|
}), Fe.Track = void 0;
|
|
959
|
-
var e = i(
|
|
959
|
+
var e = i(q), t = i(yt()), r = Ke();
|
|
960
960
|
function i(y) {
|
|
961
961
|
return y && y.__esModule ? y : { default: y };
|
|
962
962
|
}
|
|
@@ -1059,10 +1059,10 @@ function jn() {
|
|
|
1059
1059
|
return (d = U(d)) in y ? Object.defineProperty(y, d, { value: k, enumerable: !0, configurable: !0, writable: !0 }) : y[d] = k, y;
|
|
1060
1060
|
}
|
|
1061
1061
|
function U(y) {
|
|
1062
|
-
var d =
|
|
1062
|
+
var d = B(y, "string");
|
|
1063
1063
|
return a(d) == "symbol" ? d : d + "";
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1065
|
+
function B(y, d) {
|
|
1066
1066
|
if (a(y) != "object" || !y) return y;
|
|
1067
1067
|
var k = y[Symbol.toPrimitive];
|
|
1068
1068
|
if (k !== void 0) {
|
|
@@ -1192,7 +1192,7 @@ function Ln() {
|
|
|
1192
1192
|
Object.defineProperty(We, "__esModule", {
|
|
1193
1193
|
value: !0
|
|
1194
1194
|
}), We.Dots = void 0;
|
|
1195
|
-
var t = a(
|
|
1195
|
+
var t = a(q), r = a(yt()), i = Ke();
|
|
1196
1196
|
function a(v) {
|
|
1197
1197
|
return v && v.__esModule ? v : { default: v };
|
|
1198
1198
|
}
|
|
@@ -1290,7 +1290,7 @@ function Ln() {
|
|
|
1290
1290
|
return b.__proto__ || Object.getPrototypeOf(b);
|
|
1291
1291
|
}, U(v);
|
|
1292
1292
|
}
|
|
1293
|
-
var
|
|
1293
|
+
var B = function(b) {
|
|
1294
1294
|
var w;
|
|
1295
1295
|
return b.infinite ? w = Math.ceil(b.slideCount / b.slidesToScroll) : w = Math.ceil((b.slideCount - b.slidesToShow) / b.slidesToScroll) + 1, w;
|
|
1296
1296
|
};
|
|
@@ -1308,7 +1308,7 @@ function Ln() {
|
|
|
1308
1308
|
}, {
|
|
1309
1309
|
key: "render",
|
|
1310
1310
|
value: function() {
|
|
1311
|
-
for (var y = this.props, d = y.onMouseEnter, k = y.onMouseOver, A = y.onMouseLeave, R = y.infinite, _ = y.slidesToScroll, C = y.slidesToShow, T = y.slideCount, o = y.currentSlide, z =
|
|
1311
|
+
for (var y = this.props, d = y.onMouseEnter, k = y.onMouseOver, A = y.onMouseLeave, R = y.infinite, _ = y.slidesToScroll, C = y.slidesToShow, T = y.slideCount, o = y.currentSlide, z = B({
|
|
1312
1312
|
slideCount: T,
|
|
1313
1313
|
slidesToScroll: _,
|
|
1314
1314
|
slidesToShow: C,
|
|
@@ -1355,7 +1355,7 @@ function Dn() {
|
|
|
1355
1355
|
Object.defineProperty(Re, "__esModule", {
|
|
1356
1356
|
value: !0
|
|
1357
1357
|
}), Re.PrevArrow = Re.NextArrow = void 0;
|
|
1358
|
-
var t = a(
|
|
1358
|
+
var t = a(q), r = a(yt()), i = Ke();
|
|
1359
1359
|
function a(v) {
|
|
1360
1360
|
return v && v.__esModule ? v : { default: v };
|
|
1361
1361
|
}
|
|
@@ -1431,9 +1431,9 @@ function Dn() {
|
|
|
1431
1431
|
function I(v) {
|
|
1432
1432
|
var b = U();
|
|
1433
1433
|
return function() {
|
|
1434
|
-
var w, E =
|
|
1434
|
+
var w, E = B(v);
|
|
1435
1435
|
if (b) {
|
|
1436
|
-
var y =
|
|
1436
|
+
var y = B(this).constructor;
|
|
1437
1437
|
w = Reflect.construct(E, arguments, y);
|
|
1438
1438
|
} else w = E.apply(this, arguments);
|
|
1439
1439
|
return x(this, w);
|
|
@@ -1458,10 +1458,10 @@ function Dn() {
|
|
|
1458
1458
|
return !!v;
|
|
1459
1459
|
})();
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1462
|
-
return
|
|
1461
|
+
function B(v) {
|
|
1462
|
+
return B = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(b) {
|
|
1463
1463
|
return b.__proto__ || Object.getPrototypeOf(b);
|
|
1464
|
-
},
|
|
1464
|
+
}, B(v);
|
|
1465
1465
|
}
|
|
1466
1466
|
return Re.PrevArrow = /* @__PURE__ */ function(v) {
|
|
1467
1467
|
P(w, v);
|
|
@@ -1840,7 +1840,7 @@ function ei() {
|
|
|
1840
1840
|
pr = 1, Object.defineProperty(Ne, "__esModule", {
|
|
1841
1841
|
value: !0
|
|
1842
1842
|
}), Ne.InnerSlider = void 0;
|
|
1843
|
-
var e = h(
|
|
1843
|
+
var e = h(q), t = h(_n()), r = h(Tn()), i = h(yt()), a = Ke(), s = jn(), c = Ln(), l = Dn(), u = h(Qn);
|
|
1844
1844
|
function h(R) {
|
|
1845
1845
|
return R && R.__esModule ? R : { default: R };
|
|
1846
1846
|
}
|
|
@@ -1917,12 +1917,12 @@ function ei() {
|
|
|
1917
1917
|
}
|
|
1918
1918
|
function U(R, _) {
|
|
1919
1919
|
if (typeof _ != "function" && _ !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1920
|
-
R.prototype = Object.create(_ && _.prototype, { constructor: { value: R, writable: !0, configurable: !0 } }), Object.defineProperty(R, "prototype", { writable: !1 }), _ &&
|
|
1920
|
+
R.prototype = Object.create(_ && _.prototype, { constructor: { value: R, writable: !0, configurable: !0 } }), Object.defineProperty(R, "prototype", { writable: !1 }), _ && B(R, _);
|
|
1921
1921
|
}
|
|
1922
|
-
function
|
|
1923
|
-
return
|
|
1922
|
+
function B(R, _) {
|
|
1923
|
+
return B = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(C, T) {
|
|
1924
1924
|
return C.__proto__ = T, C;
|
|
1925
|
-
},
|
|
1925
|
+
}, B(R, _);
|
|
1926
1926
|
}
|
|
1927
1927
|
function v(R) {
|
|
1928
1928
|
var _ = E();
|
|
@@ -2406,7 +2406,7 @@ function ni() {
|
|
|
2406
2406
|
Object.defineProperty(e, "__esModule", {
|
|
2407
2407
|
value: !0
|
|
2408
2408
|
}), e.default = void 0;
|
|
2409
|
-
var t = c(
|
|
2409
|
+
var t = c(q), r = ei(), i = c(ri()), a = c(Hr()), s = Ke();
|
|
2410
2410
|
function c(E) {
|
|
2411
2411
|
return E && E.__esModule ? E : { default: E };
|
|
2412
2412
|
}
|
|
@@ -2473,9 +2473,9 @@ function ni() {
|
|
|
2473
2473
|
function I(E) {
|
|
2474
2474
|
var y = U();
|
|
2475
2475
|
return function() {
|
|
2476
|
-
var d, k =
|
|
2476
|
+
var d, k = B(E);
|
|
2477
2477
|
if (y) {
|
|
2478
|
-
var A =
|
|
2478
|
+
var A = B(this).constructor;
|
|
2479
2479
|
d = Reflect.construct(k, arguments, A);
|
|
2480
2480
|
} else d = k.apply(this, arguments);
|
|
2481
2481
|
return x(this, d);
|
|
@@ -2500,10 +2500,10 @@ function ni() {
|
|
|
2500
2500
|
return !!E;
|
|
2501
2501
|
})();
|
|
2502
2502
|
}
|
|
2503
|
-
function
|
|
2504
|
-
return
|
|
2503
|
+
function B(E) {
|
|
2504
|
+
return B = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(y) {
|
|
2505
2505
|
return y.__proto__ || Object.getPrototypeOf(y);
|
|
2506
|
-
},
|
|
2506
|
+
}, B(E);
|
|
2507
2507
|
}
|
|
2508
2508
|
function v(E, y, d) {
|
|
2509
2509
|
return (y = b(y)) in E ? Object.defineProperty(E, y, { value: d, enumerable: !0, configurable: !0, writable: !0 }) : E[y] = d, E;
|
|
@@ -2866,7 +2866,7 @@ function Oi(e) {
|
|
|
2866
2866
|
return Kr(lt("", null, null, null, [""], e = Gr(e), 0, [0], e));
|
|
2867
2867
|
}
|
|
2868
2868
|
function lt(e, t, r, i, a, s, c, l, u) {
|
|
2869
|
-
for (var h = 0, g = 0, O = c, j = 0, M = 0, P = 0, p = 1, I = 1, x = 1, F = 0, U = "",
|
|
2869
|
+
for (var h = 0, g = 0, O = c, j = 0, M = 0, P = 0, p = 1, I = 1, x = 1, F = 0, U = "", B = a, v = s, b = i, w = U; I; )
|
|
2870
2870
|
switch (P = F, F = me()) {
|
|
2871
2871
|
// (
|
|
2872
2872
|
case 40:
|
|
@@ -2923,9 +2923,9 @@ function lt(e, t, r, i, a, s, c, l, u) {
|
|
|
2923
2923
|
w += ";";
|
|
2924
2924
|
// { rule/at-rule
|
|
2925
2925
|
default:
|
|
2926
|
-
if (it(b = br(w, t, r, h, g, a, l, U,
|
|
2926
|
+
if (it(b = br(w, t, r, h, g, a, l, U, B = [], v = [], O), s), F === 123)
|
|
2927
2927
|
if (g === 0)
|
|
2928
|
-
lt(w, t, b, b,
|
|
2928
|
+
lt(w, t, b, b, B, s, O, l, v);
|
|
2929
2929
|
else
|
|
2930
2930
|
switch (j === 99 && fe(w, 3) === 110 ? 100 : j) {
|
|
2931
2931
|
// d l m s
|
|
@@ -2933,7 +2933,7 @@ function lt(e, t, r, i, a, s, c, l, u) {
|
|
|
2933
2933
|
case 108:
|
|
2934
2934
|
case 109:
|
|
2935
2935
|
case 115:
|
|
2936
|
-
lt(e, b, b, i && it(br(e, b, b, 0, 0, a, l, U, a,
|
|
2936
|
+
lt(e, b, b, i && it(br(e, b, b, 0, 0, a, l, U, a, B = [], O), v), a, v, O, l, i ? B : v);
|
|
2937
2937
|
break;
|
|
2938
2938
|
default:
|
|
2939
2939
|
lt(w, b, b, b, [""], v, 0, l, v);
|
|
@@ -3572,20 +3572,20 @@ var Xi = function(t) {
|
|
|
3572
3572
|
O.push(g[P], j[P]);
|
|
3573
3573
|
}
|
|
3574
3574
|
var p = Xi(function(I, x, F) {
|
|
3575
|
-
var U = h && I.as || a,
|
|
3575
|
+
var U = h && I.as || a, B = "", v = [], b = I;
|
|
3576
3576
|
if (I.theme == null) {
|
|
3577
3577
|
b = {};
|
|
3578
3578
|
for (var w in I)
|
|
3579
3579
|
b[w] = I[w];
|
|
3580
3580
|
b.theme = D.useContext(Gi);
|
|
3581
3581
|
}
|
|
3582
|
-
typeof I.className == "string" ?
|
|
3582
|
+
typeof I.className == "string" ? B = Ai(x.registered, v, I.className) : I.className != null && (B = I.className + " ");
|
|
3583
3583
|
var E = Yi(O.concat(v), x.registered, b);
|
|
3584
|
-
|
|
3584
|
+
B += x.key + "-" + E.name, c !== void 0 && (B += " " + c);
|
|
3585
3585
|
var y = h && l === void 0 ? Cr(U) : u, d = {};
|
|
3586
3586
|
for (var k in I)
|
|
3587
3587
|
h && k === "as" || y(k) && (d[k] = I[k]);
|
|
3588
|
-
return d.className =
|
|
3588
|
+
return d.className = B, F && (d.ref = F), /* @__PURE__ */ D.createElement(D.Fragment, null, /* @__PURE__ */ D.createElement(ea, {
|
|
3589
3589
|
cache: x,
|
|
3590
3590
|
serialized: E,
|
|
3591
3591
|
isStringTag: typeof U == "string"
|
|
@@ -3837,7 +3837,7 @@ const na = Pe.div`
|
|
|
3837
3837
|
settings: r,
|
|
3838
3838
|
gap: i = 15
|
|
3839
3839
|
}) => {
|
|
3840
|
-
const [a, s] =
|
|
3840
|
+
const [a, s] = q.useState(1), c = q.useRef(null), l = q.useRef(null);
|
|
3841
3841
|
var u = {
|
|
3842
3842
|
dots: !1,
|
|
3843
3843
|
speed: 500,
|
|
@@ -3874,7 +3874,7 @@ const na = Pe.div`
|
|
|
3874
3874
|
res: M
|
|
3875
3875
|
}), s(M);
|
|
3876
3876
|
};
|
|
3877
|
-
return
|
|
3877
|
+
return q.useEffect(() => {
|
|
3878
3878
|
g();
|
|
3879
3879
|
}, [c, l]), /* @__PURE__ */ G.jsx(na, { ref: c, styles: { ...e }, children: h.length > 0 && /* @__PURE__ */ G.jsx(oi, { ...u, slidesToShow: a, children: h }) });
|
|
3880
3880
|
}, rs = ({
|
|
@@ -3912,10 +3912,10 @@ const na = Pe.div`
|
|
|
3912
3912
|
}
|
|
3913
3913
|
);
|
|
3914
3914
|
}, ns = (e) => Ir(e, []), aa = () => {
|
|
3915
|
-
const [e, t] =
|
|
3915
|
+
const [e, t] = q.useState(
|
|
3916
3916
|
{}
|
|
3917
|
-
), [r, i] =
|
|
3918
|
-
return
|
|
3917
|
+
), [r, i] = q.useState(!1);
|
|
3918
|
+
return q.useEffect(() => {
|
|
3919
3919
|
const a = (l) => {
|
|
3920
3920
|
t({ x: l.clientX, y: l.clientY });
|
|
3921
3921
|
}, s = (l) => {
|
|
@@ -3936,9 +3936,9 @@ const na = Pe.div`
|
|
|
3936
3936
|
onDragStart: r,
|
|
3937
3937
|
onDragEnd: i
|
|
3938
3938
|
}) => {
|
|
3939
|
-
const a =
|
|
3939
|
+
const a = q.useRef(!1), s = q.useRef(!1), { pointerPosition: c, isPointerDown: l } = aa(), u = q.useRef({
|
|
3940
3940
|
isDragging: !1
|
|
3941
|
-
}), h =
|
|
3941
|
+
}), h = q.useCallback(
|
|
3942
3942
|
(P) => {
|
|
3943
3943
|
if (!e || !e.current || !u.current)
|
|
3944
3944
|
return;
|
|
@@ -3946,21 +3946,21 @@ const na = Pe.div`
|
|
|
3946
3946
|
return p.posY = P.y, p.posX = P.x, u.current.startPosX && u.current.posX && (p.distanceX = u.current.startPosX - u.current.posX), u.current.startPosY && u.current.posY && (p.distanceY = -(u.current.startPosY - u.current.posY)), p;
|
|
3947
3947
|
},
|
|
3948
3948
|
[]
|
|
3949
|
-
), g =
|
|
3949
|
+
), g = q.useCallback(
|
|
3950
3950
|
(P) => {
|
|
3951
3951
|
P.preventDefault(), P.stopPropagation(), u.current.isDragging = !0, u.current.startPosY = P.clientY, u.current.startPosX = P.clientX;
|
|
3952
3952
|
const p = h({ x: P.clientX, y: P.clientY });
|
|
3953
3953
|
p && (u.current = p, r?.(p));
|
|
3954
3954
|
},
|
|
3955
3955
|
[h]
|
|
3956
|
-
), O =
|
|
3956
|
+
), O = q.useCallback(
|
|
3957
3957
|
(P) => {
|
|
3958
3958
|
u.current.isDragging = !1;
|
|
3959
3959
|
const p = h(c);
|
|
3960
3960
|
p && (i?.(p), p.startPosX = void 0, p.startPosY = void 0, u.current = p);
|
|
3961
3961
|
},
|
|
3962
3962
|
[h, c]
|
|
3963
|
-
), j =
|
|
3963
|
+
), j = q.useCallback(
|
|
3964
3964
|
(P) => {
|
|
3965
3965
|
if (console.debug(
|
|
3966
3966
|
"useDrag > onPointerMove > Is Dragging >",
|
|
@@ -3971,18 +3971,18 @@ const na = Pe.div`
|
|
|
3971
3971
|
console.debug("useDrag > onPointerMove > Drag Result >", p), p && (t?.(p), u.current = p);
|
|
3972
3972
|
},
|
|
3973
3973
|
[h, c]
|
|
3974
|
-
), M =
|
|
3974
|
+
), M = q.useCallback(async () => {
|
|
3975
3975
|
if (!a.current) {
|
|
3976
3976
|
for (; !e?.current; )
|
|
3977
3977
|
await new Promise((P) => setTimeout(P, 300));
|
|
3978
3978
|
a.current = !0, e.current.onpointerdown = g, e.current.style.touchAction = "none";
|
|
3979
3979
|
}
|
|
3980
3980
|
}, [e?.current, g]);
|
|
3981
|
-
|
|
3981
|
+
q.useEffect(() => {
|
|
3982
3982
|
M();
|
|
3983
|
-
}, [M]),
|
|
3983
|
+
}, [M]), q.useEffect(() => {
|
|
3984
3984
|
j();
|
|
3985
|
-
}, [c]),
|
|
3985
|
+
}, [c]), q.useEffect(() => {
|
|
3986
3986
|
l !== s.current && (s.current = l, l || O());
|
|
3987
3987
|
}, [l, s.current]);
|
|
3988
3988
|
}, is = () => {
|
|
@@ -4030,13 +4030,13 @@ const na = Pe.div`
|
|
|
4030
4030
|
};
|
|
4031
4031
|
};
|
|
4032
4032
|
function as(e) {
|
|
4033
|
-
const [t, r] = Ar(!1), i =
|
|
4033
|
+
const [t, r] = Ar(!1), i = q.useMemo(
|
|
4034
4034
|
() => new IntersectionObserver(
|
|
4035
4035
|
([a]) => r(a.isIntersecting)
|
|
4036
4036
|
),
|
|
4037
4037
|
[]
|
|
4038
4038
|
);
|
|
4039
|
-
return
|
|
4039
|
+
return q.useEffect(() => (e?.current && i.observe(e?.current), () => i.disconnect()), [e, i.disconnect, i.observe]), t;
|
|
4040
4040
|
}
|
|
4041
4041
|
const sa = {
|
|
4042
4042
|
xs: 0,
|
|
@@ -4101,18 +4101,18 @@ function ca() {
|
|
|
4101
4101
|
const F = j.indexOf("=", x);
|
|
4102
4102
|
if (F === -1)
|
|
4103
4103
|
break;
|
|
4104
|
-
const U = j.indexOf(";", x),
|
|
4105
|
-
if (F >
|
|
4104
|
+
const U = j.indexOf(";", x), B = U === -1 ? p : U;
|
|
4105
|
+
if (F > B) {
|
|
4106
4106
|
x = j.lastIndexOf(";", F - 1) + 1;
|
|
4107
4107
|
continue;
|
|
4108
4108
|
}
|
|
4109
4109
|
const v = l(j, x, F), b = u(j, F, v), w = j.slice(v, b);
|
|
4110
4110
|
if (P[w] === void 0) {
|
|
4111
|
-
let E = l(j, F + 1,
|
|
4111
|
+
let E = l(j, F + 1, B), y = u(j, B, E);
|
|
4112
4112
|
const d = I(j.slice(E, y));
|
|
4113
4113
|
P[w] = d;
|
|
4114
4114
|
}
|
|
4115
|
-
x =
|
|
4115
|
+
x = B + 1;
|
|
4116
4116
|
} while (x < p);
|
|
4117
4117
|
return P;
|
|
4118
4118
|
}
|
|
@@ -4309,13 +4309,13 @@ function ha(e, t, r, i = {}) {
|
|
|
4309
4309
|
l = "PUSH";
|
|
4310
4310
|
let F = Ft(p.location, I, x);
|
|
4311
4311
|
h = g() + 1;
|
|
4312
|
-
let U = Tr(F, h),
|
|
4312
|
+
let U = Tr(F, h), B = p.createHref(F);
|
|
4313
4313
|
try {
|
|
4314
|
-
c.pushState(U, "",
|
|
4314
|
+
c.pushState(U, "", B);
|
|
4315
4315
|
} catch (v) {
|
|
4316
4316
|
if (v instanceof DOMException && v.name === "DataCloneError")
|
|
4317
4317
|
throw v;
|
|
4318
|
-
a.location.assign(
|
|
4318
|
+
a.location.assign(B);
|
|
4319
4319
|
}
|
|
4320
4320
|
s && u && u({ action: l, location: p.location, delta: 1 });
|
|
4321
4321
|
}
|
|
@@ -4323,8 +4323,8 @@ function ha(e, t, r, i = {}) {
|
|
|
4323
4323
|
l = "REPLACE";
|
|
4324
4324
|
let F = Ft(p.location, I, x);
|
|
4325
4325
|
h = g();
|
|
4326
|
-
let U = Tr(F, h),
|
|
4327
|
-
c.replaceState(U, "",
|
|
4326
|
+
let U = Tr(F, h), B = p.createHref(F);
|
|
4327
|
+
c.replaceState(U, "", B), s && u && u({ action: l, location: p.location, delta: 0 });
|
|
4328
4328
|
}
|
|
4329
4329
|
function P(I) {
|
|
4330
4330
|
return pa(I);
|
|
@@ -5527,7 +5527,7 @@ var yn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, bn = D.forwardRef(
|
|
|
5527
5527
|
`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
5528
5528
|
);
|
|
5529
5529
|
}
|
|
5530
|
-
let F = za(h, { relative: a }), [U,
|
|
5530
|
+
let F = za(h, { relative: a }), [U, B, v] = So(
|
|
5531
5531
|
i,
|
|
5532
5532
|
j
|
|
5533
5533
|
), b = To(h, {
|
|
@@ -5550,7 +5550,7 @@ var yn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, bn = D.forwardRef(
|
|
|
5550
5550
|
...v,
|
|
5551
5551
|
href: I || F,
|
|
5552
5552
|
onClick: x || s ? t : w,
|
|
5553
|
-
ref: Co(M,
|
|
5553
|
+
ref: Co(M, B),
|
|
5554
5554
|
target: u,
|
|
5555
5555
|
"data-discover": !p && r === "render" ? "true" : void 0
|
|
5556
5556
|
}
|
|
@@ -5576,8 +5576,8 @@ var Eo = D.forwardRef(
|
|
|
5576
5576
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
5577
5577
|
Io(O) && l === !0, x = P.encodeLocation ? P.encodeLocation(O).pathname : O.pathname, F = j.pathname, U = M && M.navigation && M.navigation.location ? M.navigation.location.pathname : null;
|
|
5578
5578
|
r || (F = F.toLowerCase(), U = U ? U.toLowerCase() : null, x = x.toLowerCase()), U && p && (U = xe(U, p) || U);
|
|
5579
|
-
const
|
|
5580
|
-
let v = F === x || !a && F.startsWith(x) && F.charAt(
|
|
5579
|
+
const B = x !== "/" && x.endsWith("/") ? x.length - 1 : x.length;
|
|
5580
|
+
let v = F === x || !a && F.startsWith(x) && F.charAt(B) === "/", b = U != null && (U === x || !a && U.startsWith(x) && U.charAt(x.length) === "/"), w = {
|
|
5581
5581
|
isActive: v,
|
|
5582
5582
|
isPending: b,
|
|
5583
5583
|
isTransitioning: I
|
|
@@ -5624,8 +5624,8 @@ var Ro = D.forwardRef(
|
|
|
5624
5624
|
let P = Mo(), p = $o(l, { relative: h }), I = c.toLowerCase() === "get" ? "get" : "post", x = typeof l == "string" && yn.test(l), F = (U) => {
|
|
5625
5625
|
if (u && u(U), U.defaultPrevented) return;
|
|
5626
5626
|
U.preventDefault();
|
|
5627
|
-
let
|
|
5628
|
-
P(
|
|
5627
|
+
let B = U.nativeEvent.submitter, v = B?.getAttribute("formmethod") || c;
|
|
5628
|
+
P(B || U.currentTarget, {
|
|
5629
5629
|
fetcherKey: t,
|
|
5630
5630
|
method: v,
|
|
5631
5631
|
navigate: r,
|
|
@@ -5793,7 +5793,7 @@ function Io(e, t = {}) {
|
|
|
5793
5793
|
[
|
|
5794
5794
|
...yo
|
|
5795
5795
|
];
|
|
5796
|
-
const Sn =
|
|
5796
|
+
const Sn = q.createContext({
|
|
5797
5797
|
history: [],
|
|
5798
5798
|
addToHistory: () => {
|
|
5799
5799
|
},
|
|
@@ -5862,13 +5862,13 @@ const Sn = B.createContext({
|
|
|
5862
5862
|
return l.params && Object.entries(l.params).forEach(([h, g]) => {
|
|
5863
5863
|
g != null && u.searchParams.set(h, String(g));
|
|
5864
5864
|
}), u.pathname + u.search;
|
|
5865
|
-
}, s =
|
|
5865
|
+
}, s = q.useCallback(
|
|
5866
5866
|
(l) => {
|
|
5867
5867
|
const u = a(l);
|
|
5868
5868
|
l.addToHistory !== !1 ? (e(u), i.addToHistory(u)) : (e(u, { replace: !0 }), i.popFromHistory(1), i.addToHistory(u));
|
|
5869
5869
|
},
|
|
5870
5870
|
[e]
|
|
5871
|
-
), c =
|
|
5871
|
+
), c = q.useCallback(
|
|
5872
5872
|
(l) => {
|
|
5873
5873
|
const u = l || 1;
|
|
5874
5874
|
e(-u), i.popFromHistory(u);
|
|
@@ -5887,7 +5887,7 @@ const Sn = B.createContext({
|
|
|
5887
5887
|
routes: t,
|
|
5888
5888
|
children: r
|
|
5889
5889
|
}) => {
|
|
5890
|
-
const i =
|
|
5890
|
+
const i = q.useRef([]), [a, s] = q.useState([]), c = q.useCallback((O) => {
|
|
5891
5891
|
i.current = O, s(O);
|
|
5892
5892
|
}, []), l = (O, j = !1) => {
|
|
5893
5893
|
let M = [...i.current];
|
|
@@ -5916,7 +5916,7 @@ const Sn = B.createContext({
|
|
|
5916
5916
|
] }) })
|
|
5917
5917
|
}
|
|
5918
5918
|
);
|
|
5919
|
-
}, xn =
|
|
5919
|
+
}, xn = q.createContext(
|
|
5920
5920
|
{
|
|
5921
5921
|
visibleItems: [],
|
|
5922
5922
|
isItemVisible: () => !1,
|
|
@@ -5926,14 +5926,14 @@ const Sn = B.createContext({
|
|
|
5926
5926
|
}
|
|
5927
5927
|
}
|
|
5928
5928
|
), cs = ({ children: e }) => {
|
|
5929
|
-
const t =
|
|
5929
|
+
const t = q.useRef([]), [r, i] = q.useState([]), a = q.useCallback((u) => {
|
|
5930
5930
|
t.current = u, i(u);
|
|
5931
|
-
}, []), s =
|
|
5931
|
+
}, []), s = q.useCallback((u) => t.current.some((h) => h === u), []), c = q.useCallback(
|
|
5932
5932
|
(u) => {
|
|
5933
5933
|
s(u) || a([...t.current, u]);
|
|
5934
5934
|
},
|
|
5935
5935
|
[s, a]
|
|
5936
|
-
), l =
|
|
5936
|
+
), l = q.useCallback(
|
|
5937
5937
|
(u) => {
|
|
5938
5938
|
s(u) && a(
|
|
5939
5939
|
t.current.filter((g) => g !== u)
|
|
@@ -5970,9 +5970,9 @@ const Sn = B.createContext({
|
|
|
5970
5970
|
onCloseDrawer: t,
|
|
5971
5971
|
drawerCloseOffset: r = 15
|
|
5972
5972
|
}) => {
|
|
5973
|
-
const { isItemVisible: i } = Ct(), [a, s] =
|
|
5973
|
+
const { isItemVisible: i } = Ct(), [a, s] = q.useState({
|
|
5974
5974
|
isDragging: !1
|
|
5975
|
-
}), c =
|
|
5975
|
+
}), c = q.useRef(null), l = q.useRef(null), u = q.useRef(null), [h, g] = q.useState(0), O = (P) => {
|
|
5976
5976
|
s(P);
|
|
5977
5977
|
}, j = (P) => {
|
|
5978
5978
|
s(P), g(0);
|
|
@@ -6070,13 +6070,11 @@ const Sn = B.createContext({
|
|
|
6070
6070
|
}
|
|
6071
6071
|
) });
|
|
6072
6072
|
}, Ho = ({ onSubmit: e, fields: t }) => {
|
|
6073
|
-
const r =
|
|
6073
|
+
const r = q.useRef(null), i = q.useCallback(
|
|
6074
6074
|
(c) => {
|
|
6075
6075
|
const l = Array.from(c.currentTarget.elements).filter(
|
|
6076
6076
|
(h) => !!h.getAttribute("name")
|
|
6077
|
-
);
|
|
6078
|
-
console.debug("ZAU 1", { event: c, inputs: l });
|
|
6079
|
-
const u = [];
|
|
6077
|
+
), u = [];
|
|
6080
6078
|
for (const h of l) {
|
|
6081
6079
|
const g = h.name;
|
|
6082
6080
|
u.push({
|
|
@@ -6087,7 +6085,7 @@ const Sn = B.createContext({
|
|
|
6087
6085
|
return u;
|
|
6088
6086
|
},
|
|
6089
6087
|
[e]
|
|
6090
|
-
), a =
|
|
6088
|
+
), a = q.useCallback(
|
|
6091
6089
|
(c) => {
|
|
6092
6090
|
c.preventDefault(), c.stopPropagation();
|
|
6093
6091
|
const l = i(c);
|
|
@@ -6118,7 +6116,7 @@ const Sn = B.createContext({
|
|
|
6118
6116
|
pointer-events: none;
|
|
6119
6117
|
}
|
|
6120
6118
|
`, ds = (e) => {
|
|
6121
|
-
const { fields: t, styles: r, submitButton: i } = e, { ref: a, handleFormSubmission: s, submitForm: c } = Ho(e), l =
|
|
6119
|
+
const { fields: t, styles: r, submitButton: i } = e, { ref: a, handleFormSubmission: s, submitForm: c } = Ho(e), l = q.useCallback(() => t.list.map((u) => ({ ...u.content, key: u.name })), [t]);
|
|
6122
6120
|
return /* @__PURE__ */ G.jsxs(
|
|
6123
6121
|
"form",
|
|
6124
6122
|
{
|
|
@@ -6211,16 +6209,17 @@ const Sn = B.createContext({
|
|
|
6211
6209
|
onChange: g,
|
|
6212
6210
|
onFocus: O,
|
|
6213
6211
|
onBlur: j,
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6212
|
+
maxLength: M,
|
|
6213
|
+
inputStyles: P,
|
|
6214
|
+
containerStyles: p,
|
|
6215
|
+
styles: I,
|
|
6216
|
+
step: x
|
|
6218
6217
|
}) => {
|
|
6219
|
-
const
|
|
6220
|
-
g?.(
|
|
6221
|
-
},
|
|
6222
|
-
|
|
6223
|
-
},
|
|
6218
|
+
const F = (v) => {
|
|
6219
|
+
g?.(v.currentTarget.value);
|
|
6220
|
+
}, U = (v) => {
|
|
6221
|
+
v.preventDefault(), v.stopPropagation(), O?.();
|
|
6222
|
+
}, B = (v) => {
|
|
6224
6223
|
j?.();
|
|
6225
6224
|
};
|
|
6226
6225
|
return /* @__PURE__ */ G.jsxs(
|
|
@@ -6230,7 +6229,7 @@ const Sn = B.createContext({
|
|
|
6230
6229
|
width: "100%",
|
|
6231
6230
|
maxWidth: "357px",
|
|
6232
6231
|
gap: "8px",
|
|
6233
|
-
...
|
|
6232
|
+
...I
|
|
6234
6233
|
},
|
|
6235
6234
|
children: [
|
|
6236
6235
|
t,
|
|
@@ -6255,7 +6254,7 @@ const Sn = B.createContext({
|
|
|
6255
6254
|
outline: "none",
|
|
6256
6255
|
alignItems: "center",
|
|
6257
6256
|
gap: "10px",
|
|
6258
|
-
...
|
|
6257
|
+
...p
|
|
6259
6258
|
},
|
|
6260
6259
|
children: [
|
|
6261
6260
|
r,
|
|
@@ -6265,7 +6264,8 @@ const Sn = B.createContext({
|
|
|
6265
6264
|
name: e,
|
|
6266
6265
|
type: h,
|
|
6267
6266
|
autoComplete: c,
|
|
6268
|
-
step:
|
|
6267
|
+
step: x,
|
|
6268
|
+
maxLength: M,
|
|
6269
6269
|
style: {
|
|
6270
6270
|
flex: 1,
|
|
6271
6271
|
border: "none",
|
|
@@ -6277,14 +6277,14 @@ const Sn = B.createContext({
|
|
|
6277
6277
|
lineHeight: "inherit",
|
|
6278
6278
|
outline: "inherit",
|
|
6279
6279
|
background: "none",
|
|
6280
|
-
...
|
|
6280
|
+
...P
|
|
6281
6281
|
},
|
|
6282
6282
|
placeholder: s,
|
|
6283
6283
|
value: l,
|
|
6284
6284
|
defaultValue: u,
|
|
6285
|
-
onChange:
|
|
6286
|
-
onFocus:
|
|
6287
|
-
onBlur:
|
|
6285
|
+
onChange: F,
|
|
6286
|
+
onFocus: U,
|
|
6287
|
+
onBlur: B
|
|
6288
6288
|
}
|
|
6289
6289
|
),
|
|
6290
6290
|
i
|
|
@@ -6375,17 +6375,17 @@ const Sn = B.createContext({
|
|
|
6375
6375
|
}
|
|
6376
6376
|
) });
|
|
6377
6377
|
}, Wo = (e) => {
|
|
6378
|
-
const t =
|
|
6378
|
+
const t = q.useRef(null), r = q.useRef(null), [i, a] = q.useState(24), [s, c] = q.useState(24), l = q.useCallback(() => {
|
|
6379
6379
|
t.current && a(t.current.clientHeight);
|
|
6380
|
-
}, [t, t.current]), u =
|
|
6380
|
+
}, [t, t.current]), u = q.useCallback(() => {
|
|
6381
6381
|
r.current && c(r.current.clientHeight);
|
|
6382
|
-
}, [r, r.current]), h =
|
|
6382
|
+
}, [r, r.current]), h = q.useCallback(() => {
|
|
6383
6383
|
let g = 0;
|
|
6384
6384
|
return e.header?.visibility === "always" && (g = g + (i || 0)), e.footer?.visibility === "always" && (g = g + (s || 0)), g;
|
|
6385
6385
|
}, [r, r.current]);
|
|
6386
|
-
return
|
|
6386
|
+
return q.useEffect(() => {
|
|
6387
6387
|
l();
|
|
6388
|
-
}, [l, t, t.current]),
|
|
6388
|
+
}, [l, t, t.current]), q.useEffect(() => {
|
|
6389
6389
|
u();
|
|
6390
6390
|
}, [u, r, r.current]), {
|
|
6391
6391
|
header: {
|
|
@@ -6553,7 +6553,7 @@ function Bo() {
|
|
|
6553
6553
|
} }, U = function(_, C, T) {
|
|
6554
6554
|
var o = String(_);
|
|
6555
6555
|
return !o || o.length >= C ? _ : "" + Array(C + 1 - o.length).join(T) + _;
|
|
6556
|
-
},
|
|
6556
|
+
}, B = { s: U, z: function(_) {
|
|
6557
6557
|
var C = -_.utcOffset(), T = Math.abs(C), o = Math.floor(T / 60), z = T % 60;
|
|
6558
6558
|
return (C <= 0 ? "+" : "-") + U(o, 2, "0") + ":" + U(z, 2, "0");
|
|
6559
6559
|
}, m: function _(C, T) {
|
|
@@ -6587,7 +6587,7 @@ function Bo() {
|
|
|
6587
6587
|
if (E(_)) return _.clone();
|
|
6588
6588
|
var T = typeof C == "object" ? C : {};
|
|
6589
6589
|
return T.date = _, T.args = arguments, new A(T);
|
|
6590
|
-
}, k =
|
|
6590
|
+
}, k = B;
|
|
6591
6591
|
k.l = y, k.i = E, k.w = function(_, C) {
|
|
6592
6592
|
return d(_, { locale: C.$L, utc: C.$u, x: C.$x, $offset: C.$offset });
|
|
6593
6593
|
};
|
|
@@ -6865,8 +6865,8 @@ function Go() {
|
|
|
6865
6865
|
if (F === 0) return this.utc(I);
|
|
6866
6866
|
var U = this.clone();
|
|
6867
6867
|
if (I) return U.$offset = F, U.$u = !1, U;
|
|
6868
|
-
var
|
|
6869
|
-
return (U = this.local().add(F +
|
|
6868
|
+
var B = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
6869
|
+
return (U = this.local().add(F + B, r)).$offset = F, U.$x.$localOffset = B, U;
|
|
6870
6870
|
};
|
|
6871
6871
|
var j = u.format;
|
|
6872
6872
|
u.format = function(p) {
|
|
@@ -7172,8 +7172,8 @@ const Ss = ({
|
|
|
7172
7172
|
styles: r,
|
|
7173
7173
|
durationInSeconds: i = 3
|
|
7174
7174
|
}) => {
|
|
7175
|
-
const a =
|
|
7176
|
-
return
|
|
7175
|
+
const a = q.useRef(!1), { isItemVisible: s, hideItem: c } = Ct();
|
|
7176
|
+
return q.useEffect(() => {
|
|
7177
7177
|
const l = s(e);
|
|
7178
7178
|
a.current !== l && (a.current = l, l && setTimeout(() => c(e), i * 1e3));
|
|
7179
7179
|
}, [a, s, c]), /* @__PURE__ */ G.jsx(G.Fragment, { children: s(e) && /* @__PURE__ */ G.jsx(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eliseubatista99/react-scaffold-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.81",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A library which provides basic components, hooks, helpers and providers to easily build a React application and avoid repeating the usual code.",
|
|
6
6
|
"main": "dist/index.cjs.js",
|