@eliseubatista99/react-scaffold-core 0.1.43 → 0.1.45

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.
@@ -0,0 +1,10 @@
1
+ import { CSSProperties } from 'react';
2
+ export type CheckboxProps = {
3
+ checked: boolean;
4
+ customUncheckedRender?: React.ReactNode;
5
+ customCheckedRender?: React.ReactNode;
6
+ onToggle?: (checked: boolean) => void;
7
+ styles?: CSSProperties;
8
+ checkedStyles?: CSSProperties;
9
+ };
10
+ export declare const Checkbox: ({ checked, onToggle, styles, checkedStyles, customCheckedRender, customUncheckedRender, }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './checkbox';
@@ -0,0 +1,22 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ checked, onToggle, styles, checkedStyles, customCheckedRender, customUncheckedRender, }: import('../checkbox').CheckboxProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ args: {
10
+ checked: false;
11
+ customCheckedRender: import("react/jsx-runtime").JSX.Element;
12
+ customUncheckedRender: import("react/jsx-runtime").JSX.Element;
13
+ styles: {
14
+ width: string;
15
+ height: string;
16
+ };
17
+ };
18
+ };
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+ export declare const Default: Story;
22
+ export declare const Checked: Story;
@@ -1,5 +1,6 @@
1
1
  export * from './button';
2
2
  export * from './carousel';
3
+ export * from './checkbox';
3
4
  export * from './drawer';
4
5
  export * from './form';
5
6
  export * from './image';
package/dist/index.cjs.js CHANGED
@@ -112,7 +112,7 @@ React keys must be passed directly to JSX without using spread:
112
112
  box-sizing: border-box;
113
113
  display: flex;
114
114
  }
115
- `,io=({styles:e,content:t,settings:r,gap:o=15})=>{const[i,s]=Y.useState(1),l=Y.useRef(null),f=Y.useRef(null);var d={dots:!1,speed:500,slidesToScroll:1,infinite:!1,variableWidth:!0,arrows:!1,rows:1,...r};const m=t.map((R,j)=>J.jsx(no,{ref:j===0?f:void 0,styles:{paddingRight:`${o}px`,overflow:"visible",...R.styles},"data-testid":"carousel-slide-item",children:R.content})),w=()=>{if(d.slidesToShow){s(d.slidesToShow);return}const R=(l.current?.offsetWidth||1)-o,j=f.current?.offsetWidth||1;let A=Math.floor(R/j);A<1?A=1:A>t.length&&(A=t.length),console.log("Slides to show > ",{container:R,slide:j,res:A}),s(A)};return Y.useEffect(()=>{w()},[l,f]),J.jsx(ro,{ref:l,styles:{...e},children:J.jsx(oi,{...d,slidesToShow:i,children:m})})},oo=e=>Y.useEffect(e,[]),Gr=()=>{const[e,t]=Y.useState({}),[r,o]=Y.useState(!1);return Y.useEffect(()=>{const i=f=>{t({x:f.clientX,y:f.clientY})},s=f=>{o(!0)},l=f=>{o(!1)};return window.addEventListener("pointermove",i),window.addEventListener("pointerdown",s),window.addEventListener("pointerup",l),()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerdown",s),window.removeEventListener("pointerup",l)}},[]),{pointerPosition:e,isPointerDown:r}},Kr=({ref:e,onDrag:t,onDragStart:r,onDragEnd:o})=>{const i=Y.useRef(!1),s=Y.useRef(!1),{pointerPosition:l,isPointerDown:f}=Gr(),d=Y.useRef({isDragging:!1}),m=Y.useCallback(P=>{if(!e||!e.current||!d.current)return;const h={...d.current};return h.posY=P.y,h.posX=P.x,d.current.startPosX&&d.current.posX&&(h.distanceX=d.current.startPosX-d.current.posX),d.current.startPosY&&d.current.posY&&(h.distanceY=-(d.current.startPosY-d.current.posY)),h},[]),w=Y.useCallback(P=>{P.preventDefault(),P.stopPropagation(),d.current.isDragging=!0,d.current.startPosY=P.clientY,d.current.startPosX=P.clientX;const h=m({x:P.clientX,y:P.clientY});h&&(d.current=h,r?.(h))},[m]),R=Y.useCallback(P=>{d.current.isDragging=!1;const h=m(l);h&&(o?.(h),h.startPosX=void 0,h.startPosY=void 0,d.current=h)},[m,l]),j=Y.useCallback(P=>{if(console.debug("useDrag > onPointerMove > Is Dragging >",d.current.isDragging),!d.current.isDragging)return;const h=m(l);console.debug("useDrag > onPointerMove > Drag Result >",h),h&&(t?.(h),d.current=h)},[m,l]),A=Y.useCallback(async()=>{if(!i.current){for(;!e?.current;)await new Promise(P=>setTimeout(P,300));i.current=!0,e.current.onpointerdown=w,e.current.style.touchAction="none"}},[e?.current,w]);Y.useEffect(()=>{A()},[A]),Y.useEffect(()=>{j()},[l]),Y.useEffect(()=>{f!==s.current&&(s.current=f,f||R())},[f,s.current])},ao=()=>{const e=(r,o)=>{let i=0,s=`${r}?`;for(const l in o){const f=o[l];i>0&&(s=`${s}&`),s=`${s}${l}=${f}`,i++}return s};return async(r,o)=>{const i=e(r,o);return await(await fetch(i)).json()}};var ut={exports:{}},so=ut.exports,kr;function lo(){return kr||(kr=1,function(e,t){(function(r,o){e.exports=o()})(so,function(){var r=1e3,o=6e4,i=36e5,s="millisecond",l="second",f="minute",d="hour",m="day",w="week",R="month",j="quarter",A="year",P="date",h="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var k=["th","st","nd","rd"],T=_%100;return"["+_+(k[(T-20)%10]||k[T]||k[0])+"]"}},U=function(_,k,T){var a=String(_);return!a||a.length>=k?_:""+Array(k+1-a.length).join(T)+_},V={s:U,z:function(_){var k=-_.utcOffset(),T=Math.abs(k),a=Math.floor(T/60),z=T%60;return(k<=0?"+":"-")+U(a,2,"0")+":"+U(z,2,"0")},m:function _(k,T){if(k.date()<T.date())return-_(T,k);var a=12*(T.year()-k.year())+(T.month()-k.month()),z=k.clone().add(a,R),p=T-z<0,n=k.clone().add(a+(p?-1:1),R);return+(-(a+(T-z)/(p?z-n:n-z))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:R,y:A,w,d:m,D:P,h:d,m:f,s:l,ms:s,Q:j}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},v="en",y={};y[v]=F;var b="$isDayjsObject",C=function(_){return _ instanceof I||!(!_||!_[b])},g=function _(k,T,a){var z;if(!k)return v;if(typeof k=="string"){var p=k.toLowerCase();y[p]&&(z=p),T&&(y[p]=T,z=p);var n=k.split("-");if(!z&&n.length>1)return _(n[0])}else{var u=k.name;y[u]=k,z=u}return!a&&z&&(v=z),z||!a&&v},c=function(_,k){if(C(_))return _.clone();var T=typeof k=="object"?k:{};return T.date=_,T.args=arguments,new I(T)},x=V;x.l=g,x.i=C,x.w=function(_,k){return c(_,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var I=function(){function _(T){this.$L=g(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[b]=!0}var k=_.prototype;return k.parse=function(T){this.$d=function(a){var z=a.date,p=a.utc;if(z===null)return new Date(NaN);if(x.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var n=z.match($);if(n){var u=n[2]-1||0,S=(n[7]||"0").substring(0,3);return p?new Date(Date.UTC(n[1],u,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)):new Date(n[1],u,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)}}return new Date(z)}(T),this.init()},k.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},k.$utils=function(){return x},k.isValid=function(){return this.$d.toString()!==h},k.isSame=function(T,a){var z=c(T);return this.startOf(a)<=z&&z<=this.endOf(a)},k.isAfter=function(T,a){return c(T)<this.startOf(a)},k.isBefore=function(T,a){return this.endOf(a)<c(T)},k.$g=function(T,a,z){return x.u(T)?this[a]:this.set(z,T)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(T,a){var z=this,p=!!x.u(a)||a,n=x.p(T),u=function(G,X){var K=x.w(z.$u?Date.UTC(z.$y,X,G):new Date(z.$y,X,G),z);return p?K:K.endOf(m)},S=function(G,X){return x.w(z.toDate()[G].apply(z.toDate("s"),(p?[0,0,0,0]:[23,59,59,999]).slice(X)),z)},M=this.$W,L=this.$M,H=this.$D,N="set"+(this.$u?"UTC":"");switch(n){case A:return p?u(1,0):u(31,11);case R:return p?u(1,L):u(0,L+1);case w:var W=this.$locale().weekStart||0,B=(M<W?M+7:M)-W;return u(p?H-B:H+(6-B),L);case m:case P:return S(N+"Hours",0);case d:return S(N+"Minutes",1);case f:return S(N+"Seconds",2);case l:return S(N+"Milliseconds",3);default:return this.clone()}},k.endOf=function(T){return this.startOf(T,!1)},k.$set=function(T,a){var z,p=x.p(T),n="set"+(this.$u?"UTC":""),u=(z={},z[m]=n+"Date",z[P]=n+"Date",z[R]=n+"Month",z[A]=n+"FullYear",z[d]=n+"Hours",z[f]=n+"Minutes",z[l]=n+"Seconds",z[s]=n+"Milliseconds",z)[p],S=p===m?this.$D+(a-this.$W):a;if(p===R||p===A){var M=this.clone().set(P,1);M.$d[u](S),M.init(),this.$d=M.set(P,Math.min(this.$D,M.daysInMonth())).$d}else u&&this.$d[u](S);return this.init(),this},k.set=function(T,a){return this.clone().$set(T,a)},k.get=function(T){return this[x.p(T)]()},k.add=function(T,a){var z,p=this;T=Number(T);var n=x.p(a),u=function(L){var H=c(p);return x.w(H.date(H.date()+Math.round(L*T)),p)};if(n===R)return this.set(R,this.$M+T);if(n===A)return this.set(A,this.$y+T);if(n===m)return u(1);if(n===w)return u(7);var S=(z={},z[f]=o,z[d]=i,z[l]=r,z)[n]||1,M=this.$d.getTime()+T*S;return x.w(M,this)},k.subtract=function(T,a){return this.add(-1*T,a)},k.format=function(T){var a=this,z=this.$locale();if(!this.isValid())return z.invalidDate||h;var p=T||"YYYY-MM-DDTHH:mm:ssZ",n=x.z(this),u=this.$H,S=this.$m,M=this.$M,L=z.weekdays,H=z.months,N=z.meridiem,W=function(X,K,te,Z){return X&&(X[K]||X(a,p))||te[K].slice(0,Z)},B=function(X){return x.s(u%12||12,X,"0")},G=N||function(X,K,te){var Z=X<12?"AM":"PM";return te?Z.toLowerCase():Z};return p.replace(O,function(X,K){return K||function(te){switch(te){case"YY":return String(a.$y).slice(-2);case"YYYY":return x.s(a.$y,4,"0");case"M":return M+1;case"MM":return x.s(M+1,2,"0");case"MMM":return W(z.monthsShort,M,H,3);case"MMMM":return W(H,M);case"D":return a.$D;case"DD":return x.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return W(z.weekdaysMin,a.$W,L,2);case"ddd":return W(z.weekdaysShort,a.$W,L,3);case"dddd":return L[a.$W];case"H":return String(u);case"HH":return x.s(u,2,"0");case"h":return B(1);case"hh":return B(2);case"a":return G(u,S,!0);case"A":return G(u,S,!1);case"m":return String(S);case"mm":return x.s(S,2,"0");case"s":return String(a.$s);case"ss":return x.s(a.$s,2,"0");case"SSS":return x.s(a.$ms,3,"0");case"Z":return n}return null}(X)||n.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(T,a,z){var p,n=this,u=x.p(a),S=c(T),M=(S.utcOffset()-this.utcOffset())*o,L=this-S,H=function(){return x.m(n,S)};switch(u){case A:p=H()/12;break;case R:p=H();break;case j:p=H()/3;break;case w:p=(L-M)/6048e5;break;case m:p=(L-M)/864e5;break;case d:p=L/i;break;case f:p=L/o;break;case l:p=L/r;break;default:p=L}return z?p:x.a(p)},k.daysInMonth=function(){return this.endOf(R).$D},k.$locale=function(){return y[this.$L]},k.locale=function(T,a){if(!T)return this.$L;var z=this.clone(),p=g(T,a,!0);return p&&(z.$L=p),z},k.clone=function(){return x.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},_}(),E=I.prototype;return c.prototype=E,[["$ms",s],["$s",l],["$m",f],["$H",d],["$W",m],["$M",R],["$y",A],["$D",P]].forEach(function(_){E[_[1]]=function(k){return this.$g(k,_[0],_[1])}}),c.extend=function(_,k){return _.$i||(_(k,I,c),_.$i=!0),c},c.locale=g,c.isDayjs=C,c.unix=function(_){return c(1e3*_)},c.en=y[v],c.Ls=y,c.p={},c})}(ut)),ut.exports}var uo=lo();const ct=Wt(uo);var ft={exports:{}},co=ft.exports,Or;function fo(){return Or||(Or=1,function(e,t){(function(r,o){e.exports=o()})(co,function(){var r="minute",o=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,l,f){var d=l.prototype;f.utc=function(h){var $={date:h,utc:!0,args:arguments};return new l($)},d.utc=function(h){var $=f(this.toDate(),{locale:this.$L,utc:!0});return h?$.add(this.utcOffset(),r):$},d.local=function(){return f(this.toDate(),{locale:this.$L,utc:!1})};var m=d.parse;d.parse=function(h){h.utc&&(this.$u=!0),this.$utils().u(h.$offset)||(this.$offset=h.$offset),m.call(this,h)};var w=d.init;d.init=function(){if(this.$u){var h=this.$d;this.$y=h.getUTCFullYear(),this.$M=h.getUTCMonth(),this.$D=h.getUTCDate(),this.$W=h.getUTCDay(),this.$H=h.getUTCHours(),this.$m=h.getUTCMinutes(),this.$s=h.getUTCSeconds(),this.$ms=h.getUTCMilliseconds()}else w.call(this)};var R=d.utcOffset;d.utcOffset=function(h,$){var O=this.$utils().u;if(O(h))return this.$u?0:O(this.$offset)?R.call(this):this.$offset;if(typeof h=="string"&&(h=function(v){v===void 0&&(v="");var y=v.match(o);if(!y)return null;var b=(""+y[0]).match(i)||["-",0,0],C=b[0],g=60*+b[1]+ +b[2];return g===0?0:C==="+"?g:-g}(h),h===null))return this;var F=Math.abs(h)<=16?60*h:h;if(F===0)return this.utc($);var U=this.clone();if($)return U.$offset=F,U.$u=!1,U;var V=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(U=this.local().add(F+V,r)).$offset=F,U.$x.$localOffset=V,U};var j=d.format;d.format=function(h){var $=h||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return j.call(this,$)},d.valueOf=function(){var h=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*h},d.isUTC=function(){return!!this.$u},d.toISOString=function(){return this.toDate().toISOString()},d.toString=function(){return this.toDate().toUTCString()};var A=d.toDate;d.toDate=function(h){return h==="s"&&this.$offset?f(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():A.call(this)};var P=d.diff;d.diff=function(h,$,O){if(h&&this.$u===h.$u)return P.call(this,h,$,O);var F=this.local(),U=f(h).local();return P.call(F,U,$,O)}}})}(ft)),ft.exports}var ho=fo();const po=Wt(ho);ct.extend(po);class Jr{static waitForMilliseconds=t=>new Promise(r=>setTimeout(r,t));static waitForCondition=t=>new Promise(r=>{const o=()=>{t()?r():setTimeout(o,100)};o()});static waitForAsyncCondition=t=>new Promise(r=>{const o=async()=>{await t()?r():setTimeout(o,100)};o()});static differenceInMonths=(t,r)=>{let o=0;return o=(r.getFullYear()-t.getFullYear())*12,o-=t.getMonth(),o+=r.getMonth(),o};static isDateOneAfterDateTwo=(t,r)=>t.getFullYear()>=r.getFullYear()&&t.getMonth()>=r.getMonth()?t.getDay()>r.getDay():!1;static getDateInUTC=t=>{try{const r=ct.utc(t),o=r.date(),i=r.month(),s=r.year(),l=r.hour(),f=r.minute(),d=r.day();return{day:o,month:i,year:s,hour:l,minute:f,weekday:d}}catch{return}};static formatDateLocalTime=(t,r)=>t?ct.utc(t).local().format(r||"DD/MM/YYYYㆍHH:mm"):"";static formatDateUTC=(t,r)=>t?ct.utc(t).format(r||"DD/MM/YYYYㆍHH:mm"):""}const mo=(e,t=0)=>{const r=Y.useRef(0),[o,i]=Y.useState(0),s=Y.useRef(null),[l,f]=Y.useState(!1),d=Y.useCallback(()=>{f(R=>!R)},[]),m=Y.useCallback(()=>r.current===0?!1:o>=r.current-t,[t,o]),w=Y.useCallback(()=>e.current!==null&&e.current!==void 0,[e]);return Y.useEffect(()=>{const R=()=>{if(!e.current)return;const A=e.current.scrollHeight-e.current.clientHeight;r.current=A,i(e.current.scrollTop)};return(async()=>{await Jr.waitForCondition(w),s.current=e.current,s.current?.addEventListener("scroll",R)})(),()=>{s.current?.removeEventListener("scroll",R)}},[e,r,i,o,w,l]),{isTouchingBottom:m(),refresh:d}},Zr={xs:0,sm:420,md:768,lg:991,xl:1200,xxl:1440},vo=e=>{const t={...Zr,...e?.breakpointConfiguration},[r,o]=Y.useState(Cr(t)),i=()=>{o(Cr(t))};return Y.useEffect(()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}),[]),Y.useMemo(()=>r,[r])},go=(e,t)=>e<t.sm?"xs":e<t.md?"sm":e<t.lg?"md":e<t.xl?"lg":e<t.xxl?"xl":"xxl",yo=(e,t)=>e<=t.sm?"mobile":e<=t.md?"tablet":"desktop",Cr=e=>{const t=window.innerWidth,r=window.innerHeight,o=go(t,e),i=yo(t,e);return{currentWidth:t,currentHeight:r,currentBreakpoint:o,currentSize:i}},bo=e=>{const t=e.translations,r=e.language,o=(s,l)=>{if(!s)return;let f=s[r];if(f)return l&&Object.keys(l).forEach(d=>{const m=l[d];f=f.replaceAll(`{{${d}}}`,`${m}`)}),f};return{t:(s,l)=>{if(t[s]){const f=o(t[s],l);return f??s}return s},getTranslation:o}};var Ue={},Pr;function wo(){if(Pr)return Ue;Pr=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.parse=l,Ue.serialize=m;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,o=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,s=(()=>{const j=function(){};return j.prototype=Object.create(null),j})();function l(j,A){const P=new s,h=j.length;if(h<2)return P;const $=A?.decode||w;let O=0;do{const F=j.indexOf("=",O);if(F===-1)break;const U=j.indexOf(";",O),V=U===-1?h:U;if(F>V){O=j.lastIndexOf(";",F-1)+1;continue}const v=f(j,O,F),y=d(j,F,v),b=j.slice(v,y);if(P[b]===void 0){let C=f(j,F+1,V),g=d(j,V,C);const c=$(j.slice(C,g));P[b]=c}O=V+1}while(O<h);return P}function f(j,A,P){do{const h=j.charCodeAt(A);if(h!==32&&h!==9)return A}while(++A<P);return P}function d(j,A,P){for(;A>P;){const h=j.charCodeAt(--A);if(h!==32&&h!==9)return A+1}return P}function m(j,A,P){const h=P?.encode||encodeURIComponent;if(!e.test(j))throw new TypeError(`argument name is invalid: ${j}`);const $=h(A);if(!t.test($))throw new TypeError(`argument val is invalid: ${A}`);let O=j+"="+$;if(!P)return O;if(P.maxAge!==void 0){if(!Number.isInteger(P.maxAge))throw new TypeError(`option maxAge is invalid: ${P.maxAge}`);O+="; Max-Age="+P.maxAge}if(P.domain){if(!r.test(P.domain))throw new TypeError(`option domain is invalid: ${P.domain}`);O+="; Domain="+P.domain}if(P.path){if(!o.test(P.path))throw new TypeError(`option path is invalid: ${P.path}`);O+="; Path="+P.path}if(P.expires){if(!R(P.expires)||!Number.isFinite(P.expires.valueOf()))throw new TypeError(`option expires is invalid: ${P.expires}`);O+="; Expires="+P.expires.toUTCString()}if(P.httpOnly&&(O+="; HttpOnly"),P.secure&&(O+="; Secure"),P.partitioned&&(O+="; Partitioned"),P.priority)switch(typeof P.priority=="string"?P.priority.toLowerCase():void 0){case"low":O+="; Priority=Low";break;case"medium":O+="; Priority=Medium";break;case"high":O+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${P.priority}`)}if(P.sameSite)switch(typeof P.sameSite=="string"?P.sameSite.toLowerCase():P.sameSite){case!0:case"strict":O+="; SameSite=Strict";break;case"lax":O+="; SameSite=Lax";break;case"none":O+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${P.sameSite}`)}return O}function w(j){if(j.indexOf("%")===-1)return j;try{return decodeURIComponent(j)}catch{return j}}function R(j){return i.call(j)==="[object Date]"}return Ue}wo();/**
115
+ `,io=({styles:e,content:t,settings:r,gap:o=15})=>{const[i,s]=Y.useState(1),l=Y.useRef(null),f=Y.useRef(null);var d={dots:!1,speed:500,slidesToScroll:1,infinite:!1,variableWidth:!0,arrows:!1,rows:1,...r};const m=t.map((R,j)=>J.jsx(no,{ref:j===0?f:void 0,styles:{paddingRight:`${o}px`,overflow:"visible",...R.styles},"data-testid":"carousel-slide-item",children:R.content})),w=()=>{if(d.slidesToShow){s(d.slidesToShow);return}const R=(l.current?.offsetWidth||1)-o,j=f.current?.offsetWidth||1;let A=Math.floor(R/j);A<1?A=1:A>t.length&&(A=t.length),console.log("Slides to show > ",{container:R,slide:j,res:A}),s(A)};return Y.useEffect(()=>{w()},[l,f]),J.jsx(ro,{ref:l,styles:{...e},children:J.jsx(oi,{...d,slidesToShow:i,children:m})})},oo=({checked:e,onToggle:t,styles:r,checkedStyles:o,customCheckedRender:i,customUncheckedRender:s})=>{const l=e?{...r,...o}:{...r};return J.jsxs("div",{onClick:()=>t?.(!e),style:{width:"25px",height:"25px",borderRadius:"4px",border:"1px solid #969696ff",background:e?"#000000":"#ffffff",overflow:"hidden",objectFit:"contain",alignItems:"center",justifyContent:"center",display:"flex",...l},children:[e&&i,!e&&s]})},ao=e=>Y.useEffect(e,[]),Gr=()=>{const[e,t]=Y.useState({}),[r,o]=Y.useState(!1);return Y.useEffect(()=>{const i=f=>{t({x:f.clientX,y:f.clientY})},s=f=>{o(!0)},l=f=>{o(!1)};return window.addEventListener("pointermove",i),window.addEventListener("pointerdown",s),window.addEventListener("pointerup",l),()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerdown",s),window.removeEventListener("pointerup",l)}},[]),{pointerPosition:e,isPointerDown:r}},Kr=({ref:e,onDrag:t,onDragStart:r,onDragEnd:o})=>{const i=Y.useRef(!1),s=Y.useRef(!1),{pointerPosition:l,isPointerDown:f}=Gr(),d=Y.useRef({isDragging:!1}),m=Y.useCallback(P=>{if(!e||!e.current||!d.current)return;const h={...d.current};return h.posY=P.y,h.posX=P.x,d.current.startPosX&&d.current.posX&&(h.distanceX=d.current.startPosX-d.current.posX),d.current.startPosY&&d.current.posY&&(h.distanceY=-(d.current.startPosY-d.current.posY)),h},[]),w=Y.useCallback(P=>{P.preventDefault(),P.stopPropagation(),d.current.isDragging=!0,d.current.startPosY=P.clientY,d.current.startPosX=P.clientX;const h=m({x:P.clientX,y:P.clientY});h&&(d.current=h,r?.(h))},[m]),R=Y.useCallback(P=>{d.current.isDragging=!1;const h=m(l);h&&(o?.(h),h.startPosX=void 0,h.startPosY=void 0,d.current=h)},[m,l]),j=Y.useCallback(P=>{if(console.debug("useDrag > onPointerMove > Is Dragging >",d.current.isDragging),!d.current.isDragging)return;const h=m(l);console.debug("useDrag > onPointerMove > Drag Result >",h),h&&(t?.(h),d.current=h)},[m,l]),A=Y.useCallback(async()=>{if(!i.current){for(;!e?.current;)await new Promise(P=>setTimeout(P,300));i.current=!0,e.current.onpointerdown=w,e.current.style.touchAction="none"}},[e?.current,w]);Y.useEffect(()=>{A()},[A]),Y.useEffect(()=>{j()},[l]),Y.useEffect(()=>{f!==s.current&&(s.current=f,f||R())},[f,s.current])},so=()=>{const e=(r,o)=>{let i=0,s=`${r}?`;for(const l in o){const f=o[l];i>0&&(s=`${s}&`),s=`${s}${l}=${f}`,i++}return s};return async(r,o)=>{const i=e(r,o);return await(await fetch(i)).json()}};var ut={exports:{}},lo=ut.exports,kr;function uo(){return kr||(kr=1,function(e,t){(function(r,o){e.exports=o()})(lo,function(){var r=1e3,o=6e4,i=36e5,s="millisecond",l="second",f="minute",d="hour",m="day",w="week",R="month",j="quarter",A="year",P="date",h="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var k=["th","st","nd","rd"],T=_%100;return"["+_+(k[(T-20)%10]||k[T]||k[0])+"]"}},U=function(_,k,T){var a=String(_);return!a||a.length>=k?_:""+Array(k+1-a.length).join(T)+_},V={s:U,z:function(_){var k=-_.utcOffset(),T=Math.abs(k),a=Math.floor(T/60),z=T%60;return(k<=0?"+":"-")+U(a,2,"0")+":"+U(z,2,"0")},m:function _(k,T){if(k.date()<T.date())return-_(T,k);var a=12*(T.year()-k.year())+(T.month()-k.month()),z=k.clone().add(a,R),p=T-z<0,n=k.clone().add(a+(p?-1:1),R);return+(-(a+(T-z)/(p?z-n:n-z))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:R,y:A,w,d:m,D:P,h:d,m:f,s:l,ms:s,Q:j}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},v="en",y={};y[v]=F;var b="$isDayjsObject",C=function(_){return _ instanceof I||!(!_||!_[b])},g=function _(k,T,a){var z;if(!k)return v;if(typeof k=="string"){var p=k.toLowerCase();y[p]&&(z=p),T&&(y[p]=T,z=p);var n=k.split("-");if(!z&&n.length>1)return _(n[0])}else{var u=k.name;y[u]=k,z=u}return!a&&z&&(v=z),z||!a&&v},c=function(_,k){if(C(_))return _.clone();var T=typeof k=="object"?k:{};return T.date=_,T.args=arguments,new I(T)},x=V;x.l=g,x.i=C,x.w=function(_,k){return c(_,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var I=function(){function _(T){this.$L=g(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[b]=!0}var k=_.prototype;return k.parse=function(T){this.$d=function(a){var z=a.date,p=a.utc;if(z===null)return new Date(NaN);if(x.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var n=z.match($);if(n){var u=n[2]-1||0,S=(n[7]||"0").substring(0,3);return p?new Date(Date.UTC(n[1],u,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)):new Date(n[1],u,n[3]||1,n[4]||0,n[5]||0,n[6]||0,S)}}return new Date(z)}(T),this.init()},k.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},k.$utils=function(){return x},k.isValid=function(){return this.$d.toString()!==h},k.isSame=function(T,a){var z=c(T);return this.startOf(a)<=z&&z<=this.endOf(a)},k.isAfter=function(T,a){return c(T)<this.startOf(a)},k.isBefore=function(T,a){return this.endOf(a)<c(T)},k.$g=function(T,a,z){return x.u(T)?this[a]:this.set(z,T)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(T,a){var z=this,p=!!x.u(a)||a,n=x.p(T),u=function(G,X){var K=x.w(z.$u?Date.UTC(z.$y,X,G):new Date(z.$y,X,G),z);return p?K:K.endOf(m)},S=function(G,X){return x.w(z.toDate()[G].apply(z.toDate("s"),(p?[0,0,0,0]:[23,59,59,999]).slice(X)),z)},M=this.$W,L=this.$M,H=this.$D,N="set"+(this.$u?"UTC":"");switch(n){case A:return p?u(1,0):u(31,11);case R:return p?u(1,L):u(0,L+1);case w:var W=this.$locale().weekStart||0,B=(M<W?M+7:M)-W;return u(p?H-B:H+(6-B),L);case m:case P:return S(N+"Hours",0);case d:return S(N+"Minutes",1);case f:return S(N+"Seconds",2);case l:return S(N+"Milliseconds",3);default:return this.clone()}},k.endOf=function(T){return this.startOf(T,!1)},k.$set=function(T,a){var z,p=x.p(T),n="set"+(this.$u?"UTC":""),u=(z={},z[m]=n+"Date",z[P]=n+"Date",z[R]=n+"Month",z[A]=n+"FullYear",z[d]=n+"Hours",z[f]=n+"Minutes",z[l]=n+"Seconds",z[s]=n+"Milliseconds",z)[p],S=p===m?this.$D+(a-this.$W):a;if(p===R||p===A){var M=this.clone().set(P,1);M.$d[u](S),M.init(),this.$d=M.set(P,Math.min(this.$D,M.daysInMonth())).$d}else u&&this.$d[u](S);return this.init(),this},k.set=function(T,a){return this.clone().$set(T,a)},k.get=function(T){return this[x.p(T)]()},k.add=function(T,a){var z,p=this;T=Number(T);var n=x.p(a),u=function(L){var H=c(p);return x.w(H.date(H.date()+Math.round(L*T)),p)};if(n===R)return this.set(R,this.$M+T);if(n===A)return this.set(A,this.$y+T);if(n===m)return u(1);if(n===w)return u(7);var S=(z={},z[f]=o,z[d]=i,z[l]=r,z)[n]||1,M=this.$d.getTime()+T*S;return x.w(M,this)},k.subtract=function(T,a){return this.add(-1*T,a)},k.format=function(T){var a=this,z=this.$locale();if(!this.isValid())return z.invalidDate||h;var p=T||"YYYY-MM-DDTHH:mm:ssZ",n=x.z(this),u=this.$H,S=this.$m,M=this.$M,L=z.weekdays,H=z.months,N=z.meridiem,W=function(X,K,te,Z){return X&&(X[K]||X(a,p))||te[K].slice(0,Z)},B=function(X){return x.s(u%12||12,X,"0")},G=N||function(X,K,te){var Z=X<12?"AM":"PM";return te?Z.toLowerCase():Z};return p.replace(O,function(X,K){return K||function(te){switch(te){case"YY":return String(a.$y).slice(-2);case"YYYY":return x.s(a.$y,4,"0");case"M":return M+1;case"MM":return x.s(M+1,2,"0");case"MMM":return W(z.monthsShort,M,H,3);case"MMMM":return W(H,M);case"D":return a.$D;case"DD":return x.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return W(z.weekdaysMin,a.$W,L,2);case"ddd":return W(z.weekdaysShort,a.$W,L,3);case"dddd":return L[a.$W];case"H":return String(u);case"HH":return x.s(u,2,"0");case"h":return B(1);case"hh":return B(2);case"a":return G(u,S,!0);case"A":return G(u,S,!1);case"m":return String(S);case"mm":return x.s(S,2,"0");case"s":return String(a.$s);case"ss":return x.s(a.$s,2,"0");case"SSS":return x.s(a.$ms,3,"0");case"Z":return n}return null}(X)||n.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(T,a,z){var p,n=this,u=x.p(a),S=c(T),M=(S.utcOffset()-this.utcOffset())*o,L=this-S,H=function(){return x.m(n,S)};switch(u){case A:p=H()/12;break;case R:p=H();break;case j:p=H()/3;break;case w:p=(L-M)/6048e5;break;case m:p=(L-M)/864e5;break;case d:p=L/i;break;case f:p=L/o;break;case l:p=L/r;break;default:p=L}return z?p:x.a(p)},k.daysInMonth=function(){return this.endOf(R).$D},k.$locale=function(){return y[this.$L]},k.locale=function(T,a){if(!T)return this.$L;var z=this.clone(),p=g(T,a,!0);return p&&(z.$L=p),z},k.clone=function(){return x.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},_}(),E=I.prototype;return c.prototype=E,[["$ms",s],["$s",l],["$m",f],["$H",d],["$W",m],["$M",R],["$y",A],["$D",P]].forEach(function(_){E[_[1]]=function(k){return this.$g(k,_[0],_[1])}}),c.extend=function(_,k){return _.$i||(_(k,I,c),_.$i=!0),c},c.locale=g,c.isDayjs=C,c.unix=function(_){return c(1e3*_)},c.en=y[v],c.Ls=y,c.p={},c})}(ut)),ut.exports}var co=uo();const ct=Wt(co);var ft={exports:{}},fo=ft.exports,Or;function ho(){return Or||(Or=1,function(e,t){(function(r,o){e.exports=o()})(fo,function(){var r="minute",o=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,l,f){var d=l.prototype;f.utc=function(h){var $={date:h,utc:!0,args:arguments};return new l($)},d.utc=function(h){var $=f(this.toDate(),{locale:this.$L,utc:!0});return h?$.add(this.utcOffset(),r):$},d.local=function(){return f(this.toDate(),{locale:this.$L,utc:!1})};var m=d.parse;d.parse=function(h){h.utc&&(this.$u=!0),this.$utils().u(h.$offset)||(this.$offset=h.$offset),m.call(this,h)};var w=d.init;d.init=function(){if(this.$u){var h=this.$d;this.$y=h.getUTCFullYear(),this.$M=h.getUTCMonth(),this.$D=h.getUTCDate(),this.$W=h.getUTCDay(),this.$H=h.getUTCHours(),this.$m=h.getUTCMinutes(),this.$s=h.getUTCSeconds(),this.$ms=h.getUTCMilliseconds()}else w.call(this)};var R=d.utcOffset;d.utcOffset=function(h,$){var O=this.$utils().u;if(O(h))return this.$u?0:O(this.$offset)?R.call(this):this.$offset;if(typeof h=="string"&&(h=function(v){v===void 0&&(v="");var y=v.match(o);if(!y)return null;var b=(""+y[0]).match(i)||["-",0,0],C=b[0],g=60*+b[1]+ +b[2];return g===0?0:C==="+"?g:-g}(h),h===null))return this;var F=Math.abs(h)<=16?60*h:h;if(F===0)return this.utc($);var U=this.clone();if($)return U.$offset=F,U.$u=!1,U;var V=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(U=this.local().add(F+V,r)).$offset=F,U.$x.$localOffset=V,U};var j=d.format;d.format=function(h){var $=h||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return j.call(this,$)},d.valueOf=function(){var h=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*h},d.isUTC=function(){return!!this.$u},d.toISOString=function(){return this.toDate().toISOString()},d.toString=function(){return this.toDate().toUTCString()};var A=d.toDate;d.toDate=function(h){return h==="s"&&this.$offset?f(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():A.call(this)};var P=d.diff;d.diff=function(h,$,O){if(h&&this.$u===h.$u)return P.call(this,h,$,O);var F=this.local(),U=f(h).local();return P.call(F,U,$,O)}}})}(ft)),ft.exports}var po=ho();const mo=Wt(po);ct.extend(mo);class Jr{static waitForMilliseconds=t=>new Promise(r=>setTimeout(r,t));static waitForCondition=t=>new Promise(r=>{const o=()=>{t()?r():setTimeout(o,100)};o()});static waitForAsyncCondition=t=>new Promise(r=>{const o=async()=>{await t()?r():setTimeout(o,100)};o()});static differenceInMonths=(t,r)=>{let o=0;return o=(r.getFullYear()-t.getFullYear())*12,o-=t.getMonth(),o+=r.getMonth(),o};static isDateOneAfterDateTwo=(t,r)=>t.getFullYear()>=r.getFullYear()&&t.getMonth()>=r.getMonth()?t.getDay()>r.getDay():!1;static getDateInUTC=t=>{try{const r=ct.utc(t),o=r.date(),i=r.month(),s=r.year(),l=r.hour(),f=r.minute(),d=r.day();return{day:o,month:i,year:s,hour:l,minute:f,weekday:d}}catch{return}};static formatDateLocalTime=(t,r)=>t?ct.utc(t).local().format(r||"DD/MM/YYYYㆍHH:mm"):"";static formatDateUTC=(t,r)=>t?ct.utc(t).format(r||"DD/MM/YYYYㆍHH:mm"):""}const vo=(e,t=0)=>{const r=Y.useRef(0),[o,i]=Y.useState(0),s=Y.useRef(null),[l,f]=Y.useState(!1),d=Y.useCallback(()=>{f(R=>!R)},[]),m=Y.useCallback(()=>r.current===0?!1:o>=r.current-t,[t,o]),w=Y.useCallback(()=>e.current!==null&&e.current!==void 0,[e]);return Y.useEffect(()=>{const R=()=>{if(!e.current)return;const A=e.current.scrollHeight-e.current.clientHeight;r.current=A,i(e.current.scrollTop)};return(async()=>{await Jr.waitForCondition(w),s.current=e.current,s.current?.addEventListener("scroll",R)})(),()=>{s.current?.removeEventListener("scroll",R)}},[e,r,i,o,w,l]),{isTouchingBottom:m(),refresh:d}},Zr={xs:0,sm:420,md:768,lg:991,xl:1200,xxl:1440},go=e=>{const t={...Zr,...e?.breakpointConfiguration},[r,o]=Y.useState(Cr(t)),i=()=>{o(Cr(t))};return Y.useEffect(()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}),[]),Y.useMemo(()=>r,[r])},yo=(e,t)=>e<t.sm?"xs":e<t.md?"sm":e<t.lg?"md":e<t.xl?"lg":e<t.xxl?"xl":"xxl",bo=(e,t)=>e<=t.sm?"mobile":e<=t.md?"tablet":"desktop",Cr=e=>{const t=window.innerWidth,r=window.innerHeight,o=yo(t,e),i=bo(t,e);return{currentWidth:t,currentHeight:r,currentBreakpoint:o,currentSize:i}},wo=e=>{const t=e.translations,r=e.language,o=(s,l)=>{if(!s)return;let f=s[r];if(f)return l&&Object.keys(l).forEach(d=>{const m=l[d];f=f.replaceAll(`{{${d}}}`,`${m}`)}),f};return{t:(s,l)=>{if(t[s]){const f=o(t[s],l);return f??s}return s},getTranslation:o}};var Ue={},Pr;function So(){if(Pr)return Ue;Pr=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.parse=l,Ue.serialize=m;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,o=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,s=(()=>{const j=function(){};return j.prototype=Object.create(null),j})();function l(j,A){const P=new s,h=j.length;if(h<2)return P;const $=A?.decode||w;let O=0;do{const F=j.indexOf("=",O);if(F===-1)break;const U=j.indexOf(";",O),V=U===-1?h:U;if(F>V){O=j.lastIndexOf(";",F-1)+1;continue}const v=f(j,O,F),y=d(j,F,v),b=j.slice(v,y);if(P[b]===void 0){let C=f(j,F+1,V),g=d(j,V,C);const c=$(j.slice(C,g));P[b]=c}O=V+1}while(O<h);return P}function f(j,A,P){do{const h=j.charCodeAt(A);if(h!==32&&h!==9)return A}while(++A<P);return P}function d(j,A,P){for(;A>P;){const h=j.charCodeAt(--A);if(h!==32&&h!==9)return A+1}return P}function m(j,A,P){const h=P?.encode||encodeURIComponent;if(!e.test(j))throw new TypeError(`argument name is invalid: ${j}`);const $=h(A);if(!t.test($))throw new TypeError(`argument val is invalid: ${A}`);let O=j+"="+$;if(!P)return O;if(P.maxAge!==void 0){if(!Number.isInteger(P.maxAge))throw new TypeError(`option maxAge is invalid: ${P.maxAge}`);O+="; Max-Age="+P.maxAge}if(P.domain){if(!r.test(P.domain))throw new TypeError(`option domain is invalid: ${P.domain}`);O+="; Domain="+P.domain}if(P.path){if(!o.test(P.path))throw new TypeError(`option path is invalid: ${P.path}`);O+="; Path="+P.path}if(P.expires){if(!R(P.expires)||!Number.isFinite(P.expires.valueOf()))throw new TypeError(`option expires is invalid: ${P.expires}`);O+="; Expires="+P.expires.toUTCString()}if(P.httpOnly&&(O+="; HttpOnly"),P.secure&&(O+="; Secure"),P.partitioned&&(O+="; Partitioned"),P.priority)switch(typeof P.priority=="string"?P.priority.toLowerCase():void 0){case"low":O+="; Priority=Low";break;case"medium":O+="; Priority=Medium";break;case"high":O+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${P.priority}`)}if(P.sameSite)switch(typeof P.sameSite=="string"?P.sameSite.toLowerCase():P.sameSite){case!0:case"strict":O+="; SameSite=Strict";break;case"lax":O+="; SameSite=Lax";break;case"none":O+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${P.sameSite}`)}return O}function w(j){if(j.indexOf("%")===-1)return j;try{return decodeURIComponent(j)}catch{return j}}function R(j){return i.call(j)==="[object Date]"}return Ue}So();/**
116
116
  * react-router v7.6.3
117
117
  *
118
118
  * Copyright (c) Remix Software Inc.
@@ -121,9 +121,9 @@ React keys must be passed directly to JSX without using spread:
121
121
  * LICENSE.md file in the root directory of this source tree.
122
122
  *
123
123
  * @license MIT
124
- */var Er="popstate";function So(e={}){function t(o,i){let{pathname:s,search:l,hash:f}=o.location;return Nt("",{pathname:s,search:l,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(o,i){return typeof i=="string"?i:Xe(i)}return ko(t,r,null,e)}function oe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function be(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xo(){return Math.random().toString(36).substring(2,10)}function _r(e,t){return{usr:e.state,key:e.key,idx:t}}function Nt(e,t,r=null,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?De(t):t,state:r,key:t&&t.key||o||xo()}}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 De(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let o=e.indexOf("?");o>=0&&(t.search=e.substring(o),e=e.substring(0,o)),e&&(t.pathname=e)}return t}function ko(e,t,r,o={}){let{window:i=document.defaultView,v5Compat:s=!1}=o,l=i.history,f="POP",d=null,m=w();m==null&&(m=0,l.replaceState({...l.state,idx:m},""));function w(){return(l.state||{idx:null}).idx}function R(){f="POP";let $=w(),O=$==null?null:$-m;m=$,d&&d({action:f,location:h.location,delta:O})}function j($,O){f="PUSH";let F=Nt(h.location,$,O);m=w()+1;let U=_r(F,m),V=h.createHref(F);try{l.pushState(U,"",V)}catch(v){if(v instanceof DOMException&&v.name==="DataCloneError")throw v;i.location.assign(V)}s&&d&&d({action:f,location:h.location,delta:1})}function A($,O){f="REPLACE";let F=Nt(h.location,$,O);m=w();let U=_r(F,m),V=h.createHref(F);l.replaceState(U,"",V),s&&d&&d({action:f,location:h.location,delta:0})}function P($){return Oo($)}let h={get action(){return f},get location(){return e(i,l)},listen($){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(Er,R),d=$,()=>{i.removeEventListener(Er,R),d=null}},createHref($){return t(i,$)},createURL:P,encodeLocation($){let O=P($);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:j,replace:A,go($){return l.go($)}};return h}function Oo(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),oe(r,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:Xe(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=r+o),new URL(o,r)}function Qr(e,t,r="/"){return Co(e,t,r,!1)}function Co(e,t,r,o){let i=typeof t=="string"?De(t):t,s=xe(i.pathname||"/",r);if(s==null)return null;let l=en(e);Po(l);let f=null;for(let d=0;f==null&&d<l.length;++d){let m=Ao(s);f=$o(l[d],m,o)}return f}function en(e,t=[],r=[],o=""){let i=(s,l,f)=>{let d={relativePath:f===void 0?s.path||"":f,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};d.relativePath.startsWith("/")&&(oe(d.relativePath.startsWith(o),`Absolute route path "${d.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(o.length));let m=Se([o,d.relativePath]),w=r.concat(d);s.children&&s.children.length>0&&(oe(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),en(s.children,t,w,m)),!(s.path==null&&!s.index)&&t.push({path:m,score:Do(m,s.index),routesMeta:w})};return e.forEach((s,l)=>{if(s.path===""||!s.path?.includes("?"))i(s,l);else for(let f of tn(s.path))i(s,l,f)}),t}function tn(e){let t=e.split("/");if(t.length===0)return[];let[r,...o]=t,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(o.length===0)return i?[s,""]:[s];let l=tn(o.join("/")),f=[];return f.push(...l.map(d=>d===""?s:[s,d].join("/"))),i&&f.push(...l),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function Po(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Mo(t.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var Eo=/^:[\w-]+$/,_o=3,To=2,Ro=1,jo=10,Lo=-2,Tr=e=>e==="*";function Do(e,t){let r=e.split("/"),o=r.length;return r.some(Tr)&&(o+=Lo),t&&(o+=To),r.filter(i=>!Tr(i)).reduce((i,s)=>i+(Eo.test(s)?_o:s===""?Ro:jo),o)}function Mo(e,t){return e.length===t.length&&e.slice(0,-1).every((o,i)=>o===t[i])?e[e.length-1]-t[t.length-1]:0}function $o(e,t,r=!1){let{routesMeta:o}=e,i={},s="/",l=[];for(let f=0;f<o.length;++f){let d=o[f],m=f===o.length-1,w=s==="/"?t:t.slice(s.length)||"/",R=gt({path:d.relativePath,caseSensitive:d.caseSensitive,end:m},w),j=d.route;if(!R&&m&&r&&!o[o.length-1].route.index&&(R=gt({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},w)),!R)return null;Object.assign(i,R.params),l.push({params:i,pathname:Se([s,R.pathname]),pathnameBase:Fo(Se([s,R.pathnameBase])),route:j}),R.pathnameBase!=="/"&&(s=Se([s,R.pathnameBase]))}return l}function gt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=Io(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let s=i[0],l=s.replace(/(.)\/+$/,"$1"),f=i.slice(1);return{params:o.reduce((m,{paramName:w,isOptional:R},j)=>{if(w==="*"){let P=f[j]||"";l=s.slice(0,s.length-P.length).replace(/(.)\/+$/,"$1")}const A=f[j];return R&&!A?m[w]=void 0:m[w]=(A||"").replace(/%2F/g,"/"),m},{}),pathname:s,pathnameBase:l,pattern:e}}function Io(e,t=!1,r=!0){be(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 o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,f,d)=>(o.push({paramName:f,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),o]}function Ao(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return be(!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,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}function zo(e,t="/"){let{pathname:r,search:o="",hash:i=""}=typeof e=="string"?De(e):e;return{pathname:r?r.startsWith("/")?r:Ho(r,t):t,search:Wo(o),hash:Uo(i)}}function Ho(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Mt(e,t,r,o){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(o)}]. 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 No(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function rn(e){let t=No(e);return t.map((r,o)=>o===t.length-1?r.pathname:r.pathnameBase)}function nn(e,t,r,o=!1){let i;typeof e=="string"?i=De(e):(i={...e},oe(!i.pathname||!i.pathname.includes("?"),Mt("?","pathname","search",i)),oe(!i.pathname||!i.pathname.includes("#"),Mt("#","pathname","hash",i)),oe(!i.search||!i.search.includes("#"),Mt("#","search","hash",i)));let s=e===""||i.pathname==="",l=s?"/":i.pathname,f;if(l==null)f=r;else{let R=t.length-1;if(!o&&l.startsWith("..")){let j=l.split("/");for(;j[0]==="..";)j.shift(),R-=1;i.pathname=j.join("/")}f=R>=0?t[R]:"/"}let d=zo(i,f),m=l&&l!=="/"&&l.endsWith("/"),w=(s||l===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(m||w)&&(d.pathname+="/"),d}var Se=e=>e.join("/").replace(/\/\/+/g,"/"),Fo=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Wo=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Uo=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Yo(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 qo=["GET",...on];new Set(qo);var Me=D.createContext(null);Me.displayName="DataRouter";var kt=D.createContext(null);kt.displayName="DataRouterState";var an=D.createContext({isTransitioning:!1});an.displayName="ViewTransition";var Bo=D.createContext(new Map);Bo.displayName="Fetchers";var Vo=D.createContext(null);Vo.displayName="Await";var we=D.createContext(null);we.displayName="Navigation";var Je=D.createContext(null);Je.displayName="Location";var ke=D.createContext({outlet:null,matches:[],isDataRoute:!1});ke.displayName="Route";var Bt=D.createContext(null);Bt.displayName="RouteError";function Xo(e,{relative:t}={}){oe(Ze(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=D.useContext(we),{hash:i,pathname:s,search:l}=Qe(e,{relative:t}),f=s;return r!=="/"&&(f=s==="/"?r:Se([r,s])),o.createHref({pathname:f,search:l,hash:i})}function Ze(){return D.useContext(Je)!=null}function Ce(){return oe(Ze(),"useLocation() may be used only in the context of a <Router> component."),D.useContext(Je).location}var sn="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ln(e){D.useContext(we).static||D.useLayoutEffect(e)}function un(){let{isDataRoute:e}=D.useContext(ke);return e?sa():Go()}function Go(){oe(Ze(),"useNavigate() may be used only in the context of a <Router> component.");let e=D.useContext(Me),{basename:t,navigator:r}=D.useContext(we),{matches:o}=D.useContext(ke),{pathname:i}=Ce(),s=JSON.stringify(rn(o)),l=D.useRef(!1);return ln(()=>{l.current=!0}),D.useCallback((d,m={})=>{if(be(l.current,sn),!l.current)return;if(typeof d=="number"){r.go(d);return}let w=nn(d,JSON.parse(s),i,m.relative==="path");e==null&&t!=="/"&&(w.pathname=w.pathname==="/"?t:Se([t,w.pathname])),(m.replace?r.replace:r.push)(w,m.state,m)},[t,r,s,i,e])}D.createContext(null);function Qe(e,{relative:t}={}){let{matches:r}=D.useContext(ke),{pathname:o}=Ce(),i=JSON.stringify(rn(r));return D.useMemo(()=>nn(e,JSON.parse(i),o,t==="path"),[e,i,o,t])}function Ko(e,t){return cn(e,t)}function cn(e,t,r,o){oe(Ze(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=D.useContext(we),{matches:s}=D.useContext(ke),l=s[s.length-1],f=l?l.params:{},d=l?l.pathname:"/",m=l?l.pathnameBase:"/",w=l&&l.route;{let O=w&&w.path||"";fn(d,!w||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${O}">) 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.
124
+ */var Er="popstate";function xo(e={}){function t(o,i){let{pathname:s,search:l,hash:f}=o.location;return Nt("",{pathname:s,search:l,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(o,i){return typeof i=="string"?i:Xe(i)}return Oo(t,r,null,e)}function oe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function be(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ko(){return Math.random().toString(36).substring(2,10)}function _r(e,t){return{usr:e.state,key:e.key,idx:t}}function Nt(e,t,r=null,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?De(t):t,state:r,key:t&&t.key||o||ko()}}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 De(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let o=e.indexOf("?");o>=0&&(t.search=e.substring(o),e=e.substring(0,o)),e&&(t.pathname=e)}return t}function Oo(e,t,r,o={}){let{window:i=document.defaultView,v5Compat:s=!1}=o,l=i.history,f="POP",d=null,m=w();m==null&&(m=0,l.replaceState({...l.state,idx:m},""));function w(){return(l.state||{idx:null}).idx}function R(){f="POP";let $=w(),O=$==null?null:$-m;m=$,d&&d({action:f,location:h.location,delta:O})}function j($,O){f="PUSH";let F=Nt(h.location,$,O);m=w()+1;let U=_r(F,m),V=h.createHref(F);try{l.pushState(U,"",V)}catch(v){if(v instanceof DOMException&&v.name==="DataCloneError")throw v;i.location.assign(V)}s&&d&&d({action:f,location:h.location,delta:1})}function A($,O){f="REPLACE";let F=Nt(h.location,$,O);m=w();let U=_r(F,m),V=h.createHref(F);l.replaceState(U,"",V),s&&d&&d({action:f,location:h.location,delta:0})}function P($){return Co($)}let h={get action(){return f},get location(){return e(i,l)},listen($){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(Er,R),d=$,()=>{i.removeEventListener(Er,R),d=null}},createHref($){return t(i,$)},createURL:P,encodeLocation($){let O=P($);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:j,replace:A,go($){return l.go($)}};return h}function Co(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),oe(r,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:Xe(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=r+o),new URL(o,r)}function Qr(e,t,r="/"){return Po(e,t,r,!1)}function Po(e,t,r,o){let i=typeof t=="string"?De(t):t,s=xe(i.pathname||"/",r);if(s==null)return null;let l=en(e);Eo(l);let f=null;for(let d=0;f==null&&d<l.length;++d){let m=zo(s);f=Io(l[d],m,o)}return f}function en(e,t=[],r=[],o=""){let i=(s,l,f)=>{let d={relativePath:f===void 0?s.path||"":f,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};d.relativePath.startsWith("/")&&(oe(d.relativePath.startsWith(o),`Absolute route path "${d.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(o.length));let m=Se([o,d.relativePath]),w=r.concat(d);s.children&&s.children.length>0&&(oe(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),en(s.children,t,w,m)),!(s.path==null&&!s.index)&&t.push({path:m,score:Mo(m,s.index),routesMeta:w})};return e.forEach((s,l)=>{if(s.path===""||!s.path?.includes("?"))i(s,l);else for(let f of tn(s.path))i(s,l,f)}),t}function tn(e){let t=e.split("/");if(t.length===0)return[];let[r,...o]=t,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(o.length===0)return i?[s,""]:[s];let l=tn(o.join("/")),f=[];return f.push(...l.map(d=>d===""?s:[s,d].join("/"))),i&&f.push(...l),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function Eo(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:$o(t.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var _o=/^:[\w-]+$/,To=3,Ro=2,jo=1,Lo=10,Do=-2,Tr=e=>e==="*";function Mo(e,t){let r=e.split("/"),o=r.length;return r.some(Tr)&&(o+=Do),t&&(o+=Ro),r.filter(i=>!Tr(i)).reduce((i,s)=>i+(_o.test(s)?To:s===""?jo:Lo),o)}function $o(e,t){return e.length===t.length&&e.slice(0,-1).every((o,i)=>o===t[i])?e[e.length-1]-t[t.length-1]:0}function Io(e,t,r=!1){let{routesMeta:o}=e,i={},s="/",l=[];for(let f=0;f<o.length;++f){let d=o[f],m=f===o.length-1,w=s==="/"?t:t.slice(s.length)||"/",R=gt({path:d.relativePath,caseSensitive:d.caseSensitive,end:m},w),j=d.route;if(!R&&m&&r&&!o[o.length-1].route.index&&(R=gt({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},w)),!R)return null;Object.assign(i,R.params),l.push({params:i,pathname:Se([s,R.pathname]),pathnameBase:Wo(Se([s,R.pathnameBase])),route:j}),R.pathnameBase!=="/"&&(s=Se([s,R.pathnameBase]))}return l}function gt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=Ao(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let s=i[0],l=s.replace(/(.)\/+$/,"$1"),f=i.slice(1);return{params:o.reduce((m,{paramName:w,isOptional:R},j)=>{if(w==="*"){let P=f[j]||"";l=s.slice(0,s.length-P.length).replace(/(.)\/+$/,"$1")}const A=f[j];return R&&!A?m[w]=void 0:m[w]=(A||"").replace(/%2F/g,"/"),m},{}),pathname:s,pathnameBase:l,pattern:e}}function Ao(e,t=!1,r=!0){be(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 o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,f,d)=>(o.push({paramName:f,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),o]}function zo(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return be(!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,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}function Ho(e,t="/"){let{pathname:r,search:o="",hash:i=""}=typeof e=="string"?De(e):e;return{pathname:r?r.startsWith("/")?r:No(r,t):t,search:Uo(o),hash:Yo(i)}}function No(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Mt(e,t,r,o){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(o)}]. 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 Fo(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function rn(e){let t=Fo(e);return t.map((r,o)=>o===t.length-1?r.pathname:r.pathnameBase)}function nn(e,t,r,o=!1){let i;typeof e=="string"?i=De(e):(i={...e},oe(!i.pathname||!i.pathname.includes("?"),Mt("?","pathname","search",i)),oe(!i.pathname||!i.pathname.includes("#"),Mt("#","pathname","hash",i)),oe(!i.search||!i.search.includes("#"),Mt("#","search","hash",i)));let s=e===""||i.pathname==="",l=s?"/":i.pathname,f;if(l==null)f=r;else{let R=t.length-1;if(!o&&l.startsWith("..")){let j=l.split("/");for(;j[0]==="..";)j.shift(),R-=1;i.pathname=j.join("/")}f=R>=0?t[R]:"/"}let d=Ho(i,f),m=l&&l!=="/"&&l.endsWith("/"),w=(s||l===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(m||w)&&(d.pathname+="/"),d}var Se=e=>e.join("/").replace(/\/\/+/g,"/"),Wo=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Uo=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Yo=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function qo(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 Bo=["GET",...on];new Set(Bo);var Me=D.createContext(null);Me.displayName="DataRouter";var kt=D.createContext(null);kt.displayName="DataRouterState";var an=D.createContext({isTransitioning:!1});an.displayName="ViewTransition";var Vo=D.createContext(new Map);Vo.displayName="Fetchers";var Xo=D.createContext(null);Xo.displayName="Await";var we=D.createContext(null);we.displayName="Navigation";var Je=D.createContext(null);Je.displayName="Location";var ke=D.createContext({outlet:null,matches:[],isDataRoute:!1});ke.displayName="Route";var Bt=D.createContext(null);Bt.displayName="RouteError";function Go(e,{relative:t}={}){oe(Ze(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=D.useContext(we),{hash:i,pathname:s,search:l}=Qe(e,{relative:t}),f=s;return r!=="/"&&(f=s==="/"?r:Se([r,s])),o.createHref({pathname:f,search:l,hash:i})}function Ze(){return D.useContext(Je)!=null}function Ce(){return oe(Ze(),"useLocation() may be used only in the context of a <Router> component."),D.useContext(Je).location}var sn="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ln(e){D.useContext(we).static||D.useLayoutEffect(e)}function un(){let{isDataRoute:e}=D.useContext(ke);return e?la():Ko()}function Ko(){oe(Ze(),"useNavigate() may be used only in the context of a <Router> component.");let e=D.useContext(Me),{basename:t,navigator:r}=D.useContext(we),{matches:o}=D.useContext(ke),{pathname:i}=Ce(),s=JSON.stringify(rn(o)),l=D.useRef(!1);return ln(()=>{l.current=!0}),D.useCallback((d,m={})=>{if(be(l.current,sn),!l.current)return;if(typeof d=="number"){r.go(d);return}let w=nn(d,JSON.parse(s),i,m.relative==="path");e==null&&t!=="/"&&(w.pathname=w.pathname==="/"?t:Se([t,w.pathname])),(m.replace?r.replace:r.push)(w,m.state,m)},[t,r,s,i,e])}D.createContext(null);function Qe(e,{relative:t}={}){let{matches:r}=D.useContext(ke),{pathname:o}=Ce(),i=JSON.stringify(rn(r));return D.useMemo(()=>nn(e,JSON.parse(i),o,t==="path"),[e,i,o,t])}function Jo(e,t){return cn(e,t)}function cn(e,t,r,o){oe(Ze(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=D.useContext(we),{matches:s}=D.useContext(ke),l=s[s.length-1],f=l?l.params:{},d=l?l.pathname:"/",m=l?l.pathnameBase:"/",w=l&&l.route;{let O=w&&w.path||"";fn(d,!w||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${O}">) 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="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let R=Ce(),j;if(t){let O=typeof t=="string"?De(t):t;oe(m==="/"||O.pathname?.startsWith(m),`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 "${m}" but pathname "${O.pathname}" was given in the \`location\` prop.`),j=O}else j=R;let A=j.pathname||"/",P=A;if(m!=="/"){let O=m.replace(/^\//,"").split("/");P="/"+A.replace(/^\//,"").split("/").slice(O.length).join("/")}let h=Qr(e,{pathname:P});be(w||h!=null,`No routes matched location "${j.pathname}${j.search}${j.hash}" `),be(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.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 $=ta(h&&h.map(O=>Object.assign({},O,{params:Object.assign({},f,O.params),pathname:Se([m,i.encodeLocation?i.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?m:Se([m,i.encodeLocation?i.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),s,r,o);return t&&$?D.createElement(Je.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...j},navigationType:"POP"}},$):$}function Jo(){let e=aa(),t=Yo(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},s={padding:"2px 4px",backgroundColor:o},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:s},"ErrorBoundary")," or"," ",D.createElement("code",{style:s},"errorElement")," prop on your route.")),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},t),r?D.createElement("pre",{style:i},r):null,l)}var Zo=D.createElement(Jo,null),Qo=class extends D.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?D.createElement(ke.Provider,{value:this.props.routeContext},D.createElement(Bt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ea({routeContext:e,match:t,children:r}){let o=D.useContext(Me);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),D.createElement(ke.Provider,{value:e},r)}function ta(e,t=[],r=null,o=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 i=e,s=r?.errors;if(s!=null){let d=i.findIndex(m=>m.route.id&&s?.[m.route.id]!==void 0);oe(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,f=-1;if(r)for(let d=0;d<i.length;d++){let m=i[d];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(f=d),m.route.id){let{loaderData:w,errors:R}=r,j=m.route.loader&&!w.hasOwnProperty(m.route.id)&&(!R||R[m.route.id]===void 0);if(m.route.lazy||j){l=!0,f>=0?i=i.slice(0,f+1):i=[i[0]];break}}}return i.reduceRight((d,m,w)=>{let R,j=!1,A=null,P=null;r&&(R=s&&m.route.id?s[m.route.id]:void 0,A=m.route.errorElement||Zo,l&&(f<0&&w===0?(fn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,P=null):f===w&&(j=!0,P=m.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,w+1)),$=()=>{let O;return R?O=A:j?O=P:m.route.Component?O=D.createElement(m.route.Component,null):m.route.element?O=m.route.element:O=d,D.createElement(ea,{match:m,routeContext:{outlet:d,matches:h,isDataRoute:r!=null},children:O})};return r&&(m.route.ErrorBoundary||m.route.errorElement||w===0)?D.createElement(Qo,{location:r.location,revalidation:r.revalidation,component:A,error:R,children:$(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):$()},null)}function Vt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ra(e){let t=D.useContext(Me);return oe(t,Vt(e)),t}function na(e){let t=D.useContext(kt);return oe(t,Vt(e)),t}function ia(e){let t=D.useContext(ke);return oe(t,Vt(e)),t}function Xt(e){let t=ia(e),r=t.matches[t.matches.length-1];return oe(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function oa(){return Xt("useRouteId")}function aa(){let e=D.useContext(Bt),t=na("useRouteError"),r=Xt("useRouteError");return e!==void 0?e:t.errors?.[r]}function sa(){let{router:e}=ra("useNavigate"),t=Xt("useNavigate"),r=D.useRef(!1);return ln(()=>{r.current=!0}),D.useCallback(async(i,s={})=>{be(r.current,sn),r.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var Rr={};function fn(e,t,r){!t&&!Rr[e]&&(Rr[e]=!0,be(!1,r))}D.memo(la);function la({routes:e,future:t,state:r}){return cn(e,void 0,r,t)}function dn(e){oe(!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 ua({basename:e="/",children:t=null,location:r,navigationType:o="POP",navigator:i,static:s=!1}){oe(!Ze(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),f=D.useMemo(()=>({basename:l,navigator:i,static:s,future:{}}),[l,i,s]);typeof r=="string"&&(r=De(r));let{pathname:d="/",search:m="",hash:w="",state:R=null,key:j="default"}=r,A=D.useMemo(()=>{let P=xe(d,l);return P==null?null:{location:{pathname:P,search:m,hash:w,state:R,key:j},navigationType:o}},[l,d,m,w,R,j,o]);return be(A!=null,`<Router basename="${l}"> is not able to match the URL "${d}${m}${w}" because it does not start with the basename, so the <Router> won't render anything.`),A==null?null:D.createElement(we.Provider,{value:f},D.createElement(Je.Provider,{children:t,value:A}))}function ca({children:e,location:t}){return Ko(Ft(e),t)}function Ft(e,t=[]){let r=[];return D.Children.forEach(e,(o,i)=>{if(!D.isValidElement(o))return;let s=[...t,i];if(o.type===D.Fragment){r.push.apply(r,Ft(o.props.children,s));return}oe(o.type===dn,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),oe(!o.props.index||!o.props.children,"An index route cannot have child routes.");let l={id:o.props.id||s.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(l.children=Ft(o.props.children,s)),r.push(l)}),r}var dt="get",ht="application/x-www-form-urlencoded";function Ot(e){return e!=null&&typeof e.tagName=="string"}function fa(e){return Ot(e)&&e.tagName.toLowerCase()==="button"}function da(e){return Ot(e)&&e.tagName.toLowerCase()==="form"}function ha(e){return Ot(e)&&e.tagName.toLowerCase()==="input"}function pa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ma(e,t){return e.button===0&&(!t||t==="_self")&&!pa(e)}var ot=null;function va(){if(ot===null)try{new FormData(document.createElement("form"),0),ot=!1}catch{ot=!0}return ot}var ga=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $t(e){return e!=null&&!ga.has(e)?(be(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ht}"`),null):e}function ya(e,t){let r,o,i,s,l;if(da(e)){let f=e.getAttribute("action");o=f?xe(f,t):null,r=e.getAttribute("method")||dt,i=$t(e.getAttribute("enctype"))||ht,s=new FormData(e)}else if(fa(e)||ha(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(o=d?xe(d,t):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||dt,i=$t(e.getAttribute("formenctype"))||$t(f.getAttribute("enctype"))||ht,s=new FormData(f,e),!va()){let{name:m,type:w,value:R}=e;if(w==="image"){let j=m?`${m}.`:"";s.append(`${j}x`,"0"),s.append(`${j}y`,"0")}else m&&s.append(m,R)}}else{if(Ot(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=dt,o=null,i=ht,l=e}return s&&i==="text/plain"&&(l=s,s=void 0),{action:o,method:r.toLowerCase(),encType:i,formData:s,body:l}}function Gt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function ba(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 wa(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 Sa(e,t,r){let o=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let l=await ba(s,r);return l.links?l.links():[]}return[]}));return Ca(o.flat(1).filter(wa).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function jr(e,t,r,o,i,s){let l=(d,m)=>r[m]?d.route.id!==r[m].route.id:!0,f=(d,m)=>r[m].pathname!==d.pathname||r[m].route.path?.endsWith("*")&&r[m].params["*"]!==d.params["*"];return s==="assets"?t.filter((d,m)=>l(d,m)||f(d,m)):s==="data"?t.filter((d,m)=>{let w=o.routes[d.route.id];if(!w||!w.hasLoader)return!1;if(l(d,m)||f(d,m))return!0;if(d.route.shouldRevalidate){let R=d.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof R=="boolean")return R}return!0}):[]}function xa(e,t,{includeHydrateFallback:r}={}){return ka(e.map(o=>{let i=t.routes[o.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function ka(e){return[...new Set(e)]}function Oa(e){let t={},r=Object.keys(e).sort();for(let o of r)t[o]=e[o];return t}function Ca(e,t){let r=new Set;return new Set(t),e.reduce((o,i)=>{let s=JSON.stringify(Oa(i));return r.has(s)||(r.add(s),o.push({key:s,link:i})),o},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Pa=new Set([100,101,204,205]);function Ea(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=D.useContext(Me);return Gt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function _a(){let e=D.useContext(kt);return Gt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Kt=D.createContext(void 0);Kt.displayName="FrameworkContext";function pn(){let e=D.useContext(Kt);return Gt(e,"You must render this element inside a <HydratedRouter> element"),e}function Ta(e,t){let r=D.useContext(Kt),[o,i]=D.useState(!1),[s,l]=D.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:m,onMouseLeave:w,onTouchStart:R}=t,j=D.useRef(null);D.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let h=O=>{O.forEach(F=>{l(F.isIntersecting)})},$=new IntersectionObserver(h,{threshold:.5});return j.current&&$.observe(j.current),()=>{$.disconnect()}}},[e]),D.useEffect(()=>{if(o){let h=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(h)}}},[o]);let A=()=>{i(!0)},P=()=>{i(!1),l(!1)};return r?e!=="intent"?[s,j,{}]:[s,j,{onFocus:Ye(f,A),onBlur:Ye(d,P),onMouseEnter:Ye(m,A),onMouseLeave:Ye(w,P),onTouchStart:Ye(R,A)}]:[!1,j,{}]}function Ye(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Ra({page:e,...t}){let{router:r}=hn(),o=D.useMemo(()=>Qr(r.routes,e,r.basename),[r.routes,e,r.basename]);return o?D.createElement(La,{page:e,matches:o,...t}):null}function ja(e){let{manifest:t,routeModules:r}=pn(),[o,i]=D.useState([]);return D.useEffect(()=>{let s=!1;return Sa(e,t,r).then(l=>{s||i(l)}),()=>{s=!0}},[e,t,r]),o}function La({page:e,matches:t,...r}){let o=Ce(),{manifest:i,routeModules:s}=pn(),{basename:l}=hn(),{loaderData:f,matches:d}=_a(),m=D.useMemo(()=>jr(e,t,d,i,o,"data"),[e,t,d,i,o]),w=D.useMemo(()=>jr(e,t,d,i,o,"assets"),[e,t,d,i,o]),R=D.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let P=new Set,h=!1;if(t.forEach(O=>{let F=i.routes[O.route.id];!F||!F.hasLoader||(!m.some(U=>U.route.id===O.route.id)&&O.route.id in f&&s[O.route.id]?.shouldRevalidate||F.hasClientLoader?h=!0:P.add(O.route.id))}),P.size===0)return[];let $=Ea(e,l);return h&&P.size>0&&$.searchParams.set("_routes",t.filter(O=>P.has(O.route.id)).map(O=>O.route.id).join(",")),[$.pathname+$.search]},[l,f,o,i,m,t,e,s]),j=D.useMemo(()=>xa(w,i),[w,i]),A=ja(w);return D.createElement(D.Fragment,null,R.map(P=>D.createElement("link",{key:P,rel:"prefetch",as:"fetch",href:P,...r})),j.map(P=>D.createElement("link",{key:P,rel:"modulepreload",href:P,...r})),A.map(({key:P,link:h})=>D.createElement("link",{key:P,...h})))}function Da(...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 Ma({basename:e,children:t,window:r}){let o=D.useRef();o.current==null&&(o.current=So({window:r,v5Compat:!0}));let i=o.current,[s,l]=D.useState({action:i.action,location:i.location}),f=D.useCallback(d=>{D.startTransition(()=>l(d))},[l]);return D.useLayoutEffect(()=>i.listen(f),[i,f]),D.createElement(ua,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i})}var vn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=D.forwardRef(function({onClick:t,discover:r="render",prefetch:o="none",relative:i,reloadDocument:s,replace:l,state:f,target:d,to:m,preventScrollReset:w,viewTransition:R,...j},A){let{basename:P}=D.useContext(we),h=typeof m=="string"&&vn.test(m),$,O=!1;if(typeof m=="string"&&h&&($=m,mn))try{let g=new URL(window.location.href),c=m.startsWith("//")?new URL(g.protocol+m):new URL(m),x=xe(c.pathname,P);c.origin===g.origin&&x!=null?m=x+c.search+c.hash:O=!0}catch{be(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let F=Xo(m,{relative:i}),[U,V,v]=Ta(o,j),y=za(m,{replace:l,state:f,target:d,preventScrollReset:w,relative:i,viewTransition:R});function b(g){t&&t(g),g.defaultPrevented||y(g)}let C=D.createElement("a",{...j,...v,href:$||F,onClick:O||s?t:b,ref:Da(A,V),target:d,"data-discover":!h&&r==="render"?"true":void 0});return U&&!h?D.createElement(D.Fragment,null,C,D.createElement(Ra,{page:F})):C});gn.displayName="Link";var $a=D.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:o="",end:i=!1,style:s,to:l,viewTransition:f,children:d,...m},w){let R=Qe(l,{relative:m.relative}),j=Ce(),A=D.useContext(kt),{navigator:P,basename:h}=D.useContext(we),$=A!=null&&Ua(R)&&f===!0,O=P.encodeLocation?P.encodeLocation(R).pathname:R.pathname,F=j.pathname,U=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;r||(F=F.toLowerCase(),U=U?U.toLowerCase():null,O=O.toLowerCase()),U&&h&&(U=xe(U,h)||U);const V=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let v=F===O||!i&&F.startsWith(O)&&F.charAt(V)==="/",y=U!=null&&(U===O||!i&&U.startsWith(O)&&U.charAt(O.length)==="/"),b={isActive:v,isPending:y,isTransitioning:$},C=v?t:void 0,g;typeof o=="function"?g=o(b):g=[o,v?"active":null,y?"pending":null,$?"transitioning":null].filter(Boolean).join(" ");let c=typeof s=="function"?s(b):s;return D.createElement(gn,{...m,"aria-current":C,className:g,ref:w,style:c,to:l,viewTransition:f},typeof d=="function"?d(b):d)});$a.displayName="NavLink";var Ia=D.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:o,replace:i,state:s,method:l=dt,action:f,onSubmit:d,relative:m,preventScrollReset:w,viewTransition:R,...j},A)=>{let P=Fa(),h=Wa(f,{relative:m}),$=l.toLowerCase()==="get"?"get":"post",O=typeof f=="string"&&vn.test(f),F=U=>{if(d&&d(U),U.defaultPrevented)return;U.preventDefault();let V=U.nativeEvent.submitter,v=V?.getAttribute("formmethod")||l;P(V||U.currentTarget,{fetcherKey:t,method:v,navigate:r,replace:i,state:s,relative:m,preventScrollReset:w,viewTransition:R})};return D.createElement("form",{ref:A,method:$,action:h,onSubmit:o?d:F,...j,"data-discover":!O&&e==="render"?"true":void 0})});Ia.displayName="Form";function Aa(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=D.useContext(Me);return oe(t,Aa(e)),t}function za(e,{target:t,replace:r,state:o,preventScrollReset:i,relative:s,viewTransition:l}={}){let f=un(),d=Ce(),m=Qe(e,{relative:s});return D.useCallback(w=>{if(ma(w,t)){w.preventDefault();let R=r!==void 0?r:Xe(d)===Xe(m);f(e,{replace:R,state:o,preventScrollReset:i,relative:s,viewTransition:l})}},[d,f,m,r,o,t,e,i,s,l])}var Ha=0,Na=()=>`__${String(++Ha)}__`;function Fa(){let{router:e}=yn("useSubmit"),{basename:t}=D.useContext(we),r=oa();return D.useCallback(async(o,i={})=>{let{action:s,method:l,encType:f,formData:d,body:m}=ya(o,t);if(i.navigate===!1){let w=i.fetcherKey||Na();await e.fetch(w,r,i.action||s,{preventScrollReset:i.preventScrollReset,formData:d,body:m,formMethod:i.method||l,formEncType:i.encType||f,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:d,body:m,formMethod:i.method||l,formEncType:i.encType||f,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,r])}function Wa(e,{relative:t}={}){let{basename:r}=D.useContext(we),o=D.useContext(ke);oe(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),s={...Qe(e||".",{relative:t})},l=Ce();if(e==null){s.search=l.search;let f=new URLSearchParams(s.search),d=f.getAll("index");if(d.some(w=>w==="")){f.delete("index"),d.filter(R=>R).forEach(R=>f.append("index",R));let w=f.toString();s.search=w?`?${w}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Se([r,s.pathname])),Xe(s)}function Ua(e,t={}){let r=D.useContext(an);oe(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=yn("useViewTransitionState"),i=Qe(e,{relative:t.relative});if(!r.isTransitioning)return!1;let s=xe(r.currentLocation.pathname,o)||r.currentLocation.pathname,l=xe(r.nextLocation.pathname,o)||r.nextLocation.pathname;return gt(i.pathname,l)!=null||gt(i.pathname,s)!=null}[...Pa];const bn=Y.createContext({history:[],addToHistory:()=>{},popFromHistory:()=>"",replaceHistory:()=>{}}),Ya=({routes:e,children:t})=>{const r=Y.useRef(["/"]),[o,i]=Y.useState(["/"]),s=Y.useCallback(w=>{r.current=w,i(w)},[]),l=w=>{s([...r.current,w])},f=w=>{let R="",j=[];return r.current.length===0?"/":(r.current.length<=w?(R=r.current[0],j=[R]):(j=r.current.slice(0,r.current.length-w),R=j[j.length-1]),s(j),R)},d=w=>{s(w)},m=e.map(w=>J.jsx(dn,{path:w.path,element:w.render}));return J.jsx(bn.Provider,{value:{history:o,addToHistory:l,popFromHistory:f,replaceHistory:d},children:J.jsxs(Ma,{children:[t,J.jsx(ca,{children:m})]})})},qa=()=>{const e=un(),t=Ce(),r=Y.useContext(bn),o=Y.useCallback((l,f=!0)=>{l!==t.pathname&&e(l,{replace:!0}),f&&r.addToHistory(l)},[t.pathname,e,r]),i=Y.useCallback(l=>{const f=l||1,d=r.popFromHistory(f);o(d,!1)},[o,r]),s=Y.useCallback(l=>{r.replaceHistory(l)},[r]);return{currentPath:t.pathname,history:r.history,goBack:i,goTo:o,replaceHistory:s}},wn=Y.createContext({visibleItems:[],isItemVisible:()=>!1,showItem:()=>{},hideItem:()=>{}}),Ba=({children:e})=>{const t=Y.useRef([]),[r,o]=Y.useState([]),i=Y.useCallback(d=>{t.current=d,o(d)},[]),s=Y.useCallback(d=>t.current.some(m=>m===d),[]),l=Y.useCallback(d=>{s(d)||i([...t.current,d])},[s,i]),f=Y.useCallback(d=>{s(d)&&i(t.current.filter(w=>w!==d))},[s,i]);return J.jsx(wn.Provider,{value:{visibleItems:r,isItemVisible:s,showItem:l,hideItem:f},children:e})},et=()=>{const e=Y.useContext(wn),t=i=>e.visibleItems.some(s=>s===i),r=i=>{e.showItem(i)},o=i=>{e.hideItem(i)};return{visibleItems:e.visibleItems,isItemVisible:t,showItem:r,hideItem:o}},Va=({id:e,onCloseDrawer:t,drawerCloseOffset:r=15})=>{const{isItemVisible:o}=et(),[i,s]=Y.useState({isDragging:!1}),l=Y.useRef(null),f=Y.useRef(null),d=Y.useRef(null),[m,w]=Y.useState(0),R=P=>{s(P)},j=P=>{s(P),w(0)};return Kr({ref:d,onDrag:P=>{s(P);const h=f.current?.clientHeight||0;P.distanceY&&(w(P.distanceY<0?0:-P.distanceY),P.distanceY>=h-r&&(t?.(),j(P)))},onDragEnd:j,onDragStart:R}),{isVisible:o(e),drawerParentRef:l,drawerRef:f,drawerBottomDistance:m,handleRef:d}},Xa=e=>{const{children:t,backgroundStyles:r,contentStyles:o,handle:i}=e,{isVisible:s,drawerParentRef:l,drawerRef:f,handleRef:d,drawerBottomDistance:m}=Va(e);return J.jsx(J.Fragment,{children:s&&J.jsx("div",{ref:l,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:J.jsxs("div",{ref:f,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:`${m}px`,...o},onClick:w=>{w.stopPropagation()},children:[J.jsx("div",{ref:d,style:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0px",height:"24px",width:"100%",cursor:"pointer",...i?.styles},children:i?.render}),t]})})})},Ga=({onSubmit:e,fields:t})=>{const r=Y.useRef(null),o=Y.useCallback(l=>{var f=Object.keys(l.currentTarget.elements),d=Object.values(l.currentTarget.elements),m=[];for(let w=0;w<f.length;w++){const R=f[w];if(t.findIndex(A=>A.name===R)===-1)continue;const j=d[w].value;m.push({name:R,value:j})}return m},[e]),i=Y.useCallback(l=>{l.preventDefault();const f=o(l);e?.(f)},[e]);return{ref:r,submitForm:l=>{l.preventDefault(),l.stopPropagation(),r.current&&r.current.requestSubmit()},handleFormSubmission:i}},Ka=e=>{const{fields:t,styles:r,submitButton:o}=e,{ref:i,handleFormSubmission:s,submitForm:l}=Ga(e),f=Y.useCallback(()=>t.map(d=>({...d.content,key:d.name})),[t]);return J.jsxs("form",{ref:i,onSubmit:s,style:{width:"100%",display:"flex",flexDirection:"column",gap:"8px",flex:1,...r},children:[f(),J.jsx("div",{onClick:l,style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center",...o.styles},children:o.content})]})},Ja=({src:e,alt:t="",onClick:r,styles:o})=>J.jsx("img",{src:e,alt:t,style:{overflow:"hidden",position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",objectFit:"cover",...o},onClick:()=>r?.()}),Za=je.div`
126
+ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let R=Ce(),j;if(t){let O=typeof t=="string"?De(t):t;oe(m==="/"||O.pathname?.startsWith(m),`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 "${m}" but pathname "${O.pathname}" was given in the \`location\` prop.`),j=O}else j=R;let A=j.pathname||"/",P=A;if(m!=="/"){let O=m.replace(/^\//,"").split("/");P="/"+A.replace(/^\//,"").split("/").slice(O.length).join("/")}let h=Qr(e,{pathname:P});be(w||h!=null,`No routes matched location "${j.pathname}${j.search}${j.hash}" `),be(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.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 $=ra(h&&h.map(O=>Object.assign({},O,{params:Object.assign({},f,O.params),pathname:Se([m,i.encodeLocation?i.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?m:Se([m,i.encodeLocation?i.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),s,r,o);return t&&$?D.createElement(Je.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...j},navigationType:"POP"}},$):$}function Zo(){let e=sa(),t=qo(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},s={padding:"2px 4px",backgroundColor:o},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:s},"ErrorBoundary")," or"," ",D.createElement("code",{style:s},"errorElement")," prop on your route.")),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},t),r?D.createElement("pre",{style:i},r):null,l)}var Qo=D.createElement(Zo,null),ea=class extends D.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?D.createElement(ke.Provider,{value:this.props.routeContext},D.createElement(Bt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ta({routeContext:e,match:t,children:r}){let o=D.useContext(Me);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),D.createElement(ke.Provider,{value:e},r)}function ra(e,t=[],r=null,o=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 i=e,s=r?.errors;if(s!=null){let d=i.findIndex(m=>m.route.id&&s?.[m.route.id]!==void 0);oe(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,f=-1;if(r)for(let d=0;d<i.length;d++){let m=i[d];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(f=d),m.route.id){let{loaderData:w,errors:R}=r,j=m.route.loader&&!w.hasOwnProperty(m.route.id)&&(!R||R[m.route.id]===void 0);if(m.route.lazy||j){l=!0,f>=0?i=i.slice(0,f+1):i=[i[0]];break}}}return i.reduceRight((d,m,w)=>{let R,j=!1,A=null,P=null;r&&(R=s&&m.route.id?s[m.route.id]:void 0,A=m.route.errorElement||Qo,l&&(f<0&&w===0?(fn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,P=null):f===w&&(j=!0,P=m.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,w+1)),$=()=>{let O;return R?O=A:j?O=P:m.route.Component?O=D.createElement(m.route.Component,null):m.route.element?O=m.route.element:O=d,D.createElement(ta,{match:m,routeContext:{outlet:d,matches:h,isDataRoute:r!=null},children:O})};return r&&(m.route.ErrorBoundary||m.route.errorElement||w===0)?D.createElement(ea,{location:r.location,revalidation:r.revalidation,component:A,error:R,children:$(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):$()},null)}function Vt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function na(e){let t=D.useContext(Me);return oe(t,Vt(e)),t}function ia(e){let t=D.useContext(kt);return oe(t,Vt(e)),t}function oa(e){let t=D.useContext(ke);return oe(t,Vt(e)),t}function Xt(e){let t=oa(e),r=t.matches[t.matches.length-1];return oe(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function aa(){return Xt("useRouteId")}function sa(){let e=D.useContext(Bt),t=ia("useRouteError"),r=Xt("useRouteError");return e!==void 0?e:t.errors?.[r]}function la(){let{router:e}=na("useNavigate"),t=Xt("useNavigate"),r=D.useRef(!1);return ln(()=>{r.current=!0}),D.useCallback(async(i,s={})=>{be(r.current,sn),r.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var Rr={};function fn(e,t,r){!t&&!Rr[e]&&(Rr[e]=!0,be(!1,r))}D.memo(ua);function ua({routes:e,future:t,state:r}){return cn(e,void 0,r,t)}function dn(e){oe(!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 ca({basename:e="/",children:t=null,location:r,navigationType:o="POP",navigator:i,static:s=!1}){oe(!Ze(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),f=D.useMemo(()=>({basename:l,navigator:i,static:s,future:{}}),[l,i,s]);typeof r=="string"&&(r=De(r));let{pathname:d="/",search:m="",hash:w="",state:R=null,key:j="default"}=r,A=D.useMemo(()=>{let P=xe(d,l);return P==null?null:{location:{pathname:P,search:m,hash:w,state:R,key:j},navigationType:o}},[l,d,m,w,R,j,o]);return be(A!=null,`<Router basename="${l}"> is not able to match the URL "${d}${m}${w}" because it does not start with the basename, so the <Router> won't render anything.`),A==null?null:D.createElement(we.Provider,{value:f},D.createElement(Je.Provider,{children:t,value:A}))}function fa({children:e,location:t}){return Jo(Ft(e),t)}function Ft(e,t=[]){let r=[];return D.Children.forEach(e,(o,i)=>{if(!D.isValidElement(o))return;let s=[...t,i];if(o.type===D.Fragment){r.push.apply(r,Ft(o.props.children,s));return}oe(o.type===dn,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),oe(!o.props.index||!o.props.children,"An index route cannot have child routes.");let l={id:o.props.id||s.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(l.children=Ft(o.props.children,s)),r.push(l)}),r}var dt="get",ht="application/x-www-form-urlencoded";function Ot(e){return e!=null&&typeof e.tagName=="string"}function da(e){return Ot(e)&&e.tagName.toLowerCase()==="button"}function ha(e){return Ot(e)&&e.tagName.toLowerCase()==="form"}function pa(e){return Ot(e)&&e.tagName.toLowerCase()==="input"}function ma(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function va(e,t){return e.button===0&&(!t||t==="_self")&&!ma(e)}var ot=null;function ga(){if(ot===null)try{new FormData(document.createElement("form"),0),ot=!1}catch{ot=!0}return ot}var ya=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $t(e){return e!=null&&!ya.has(e)?(be(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ht}"`),null):e}function ba(e,t){let r,o,i,s,l;if(ha(e)){let f=e.getAttribute("action");o=f?xe(f,t):null,r=e.getAttribute("method")||dt,i=$t(e.getAttribute("enctype"))||ht,s=new FormData(e)}else if(da(e)||pa(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(o=d?xe(d,t):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||dt,i=$t(e.getAttribute("formenctype"))||$t(f.getAttribute("enctype"))||ht,s=new FormData(f,e),!ga()){let{name:m,type:w,value:R}=e;if(w==="image"){let j=m?`${m}.`:"";s.append(`${j}x`,"0"),s.append(`${j}y`,"0")}else m&&s.append(m,R)}}else{if(Ot(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=dt,o=null,i=ht,l=e}return s&&i==="text/plain"&&(l=s,s=void 0),{action:o,method:r.toLowerCase(),encType:i,formData:s,body:l}}function Gt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function wa(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 Sa(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 xa(e,t,r){let o=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let l=await wa(s,r);return l.links?l.links():[]}return[]}));return Pa(o.flat(1).filter(Sa).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function jr(e,t,r,o,i,s){let l=(d,m)=>r[m]?d.route.id!==r[m].route.id:!0,f=(d,m)=>r[m].pathname!==d.pathname||r[m].route.path?.endsWith("*")&&r[m].params["*"]!==d.params["*"];return s==="assets"?t.filter((d,m)=>l(d,m)||f(d,m)):s==="data"?t.filter((d,m)=>{let w=o.routes[d.route.id];if(!w||!w.hasLoader)return!1;if(l(d,m)||f(d,m))return!0;if(d.route.shouldRevalidate){let R=d.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof R=="boolean")return R}return!0}):[]}function ka(e,t,{includeHydrateFallback:r}={}){return Oa(e.map(o=>{let i=t.routes[o.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function Oa(e){return[...new Set(e)]}function Ca(e){let t={},r=Object.keys(e).sort();for(let o of r)t[o]=e[o];return t}function Pa(e,t){let r=new Set;return new Set(t),e.reduce((o,i)=>{let s=JSON.stringify(Ca(i));return r.has(s)||(r.add(s),o.push({key:s,link:i})),o},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ea=new Set([100,101,204,205]);function _a(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=D.useContext(Me);return Gt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Ta(){let e=D.useContext(kt);return Gt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Kt=D.createContext(void 0);Kt.displayName="FrameworkContext";function pn(){let e=D.useContext(Kt);return Gt(e,"You must render this element inside a <HydratedRouter> element"),e}function Ra(e,t){let r=D.useContext(Kt),[o,i]=D.useState(!1),[s,l]=D.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:m,onMouseLeave:w,onTouchStart:R}=t,j=D.useRef(null);D.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let h=O=>{O.forEach(F=>{l(F.isIntersecting)})},$=new IntersectionObserver(h,{threshold:.5});return j.current&&$.observe(j.current),()=>{$.disconnect()}}},[e]),D.useEffect(()=>{if(o){let h=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(h)}}},[o]);let A=()=>{i(!0)},P=()=>{i(!1),l(!1)};return r?e!=="intent"?[s,j,{}]:[s,j,{onFocus:Ye(f,A),onBlur:Ye(d,P),onMouseEnter:Ye(m,A),onMouseLeave:Ye(w,P),onTouchStart:Ye(R,A)}]:[!1,j,{}]}function Ye(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function ja({page:e,...t}){let{router:r}=hn(),o=D.useMemo(()=>Qr(r.routes,e,r.basename),[r.routes,e,r.basename]);return o?D.createElement(Da,{page:e,matches:o,...t}):null}function La(e){let{manifest:t,routeModules:r}=pn(),[o,i]=D.useState([]);return D.useEffect(()=>{let s=!1;return xa(e,t,r).then(l=>{s||i(l)}),()=>{s=!0}},[e,t,r]),o}function Da({page:e,matches:t,...r}){let o=Ce(),{manifest:i,routeModules:s}=pn(),{basename:l}=hn(),{loaderData:f,matches:d}=Ta(),m=D.useMemo(()=>jr(e,t,d,i,o,"data"),[e,t,d,i,o]),w=D.useMemo(()=>jr(e,t,d,i,o,"assets"),[e,t,d,i,o]),R=D.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let P=new Set,h=!1;if(t.forEach(O=>{let F=i.routes[O.route.id];!F||!F.hasLoader||(!m.some(U=>U.route.id===O.route.id)&&O.route.id in f&&s[O.route.id]?.shouldRevalidate||F.hasClientLoader?h=!0:P.add(O.route.id))}),P.size===0)return[];let $=_a(e,l);return h&&P.size>0&&$.searchParams.set("_routes",t.filter(O=>P.has(O.route.id)).map(O=>O.route.id).join(",")),[$.pathname+$.search]},[l,f,o,i,m,t,e,s]),j=D.useMemo(()=>ka(w,i),[w,i]),A=La(w);return D.createElement(D.Fragment,null,R.map(P=>D.createElement("link",{key:P,rel:"prefetch",as:"fetch",href:P,...r})),j.map(P=>D.createElement("link",{key:P,rel:"modulepreload",href:P,...r})),A.map(({key:P,link:h})=>D.createElement("link",{key:P,...h})))}function Ma(...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 $a({basename:e,children:t,window:r}){let o=D.useRef();o.current==null&&(o.current=xo({window:r,v5Compat:!0}));let i=o.current,[s,l]=D.useState({action:i.action,location:i.location}),f=D.useCallback(d=>{D.startTransition(()=>l(d))},[l]);return D.useLayoutEffect(()=>i.listen(f),[i,f]),D.createElement(ca,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i})}var vn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=D.forwardRef(function({onClick:t,discover:r="render",prefetch:o="none",relative:i,reloadDocument:s,replace:l,state:f,target:d,to:m,preventScrollReset:w,viewTransition:R,...j},A){let{basename:P}=D.useContext(we),h=typeof m=="string"&&vn.test(m),$,O=!1;if(typeof m=="string"&&h&&($=m,mn))try{let g=new URL(window.location.href),c=m.startsWith("//")?new URL(g.protocol+m):new URL(m),x=xe(c.pathname,P);c.origin===g.origin&&x!=null?m=x+c.search+c.hash:O=!0}catch{be(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let F=Go(m,{relative:i}),[U,V,v]=Ra(o,j),y=Ha(m,{replace:l,state:f,target:d,preventScrollReset:w,relative:i,viewTransition:R});function b(g){t&&t(g),g.defaultPrevented||y(g)}let C=D.createElement("a",{...j,...v,href:$||F,onClick:O||s?t:b,ref:Ma(A,V),target:d,"data-discover":!h&&r==="render"?"true":void 0});return U&&!h?D.createElement(D.Fragment,null,C,D.createElement(ja,{page:F})):C});gn.displayName="Link";var Ia=D.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:o="",end:i=!1,style:s,to:l,viewTransition:f,children:d,...m},w){let R=Qe(l,{relative:m.relative}),j=Ce(),A=D.useContext(kt),{navigator:P,basename:h}=D.useContext(we),$=A!=null&&Ya(R)&&f===!0,O=P.encodeLocation?P.encodeLocation(R).pathname:R.pathname,F=j.pathname,U=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;r||(F=F.toLowerCase(),U=U?U.toLowerCase():null,O=O.toLowerCase()),U&&h&&(U=xe(U,h)||U);const V=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let v=F===O||!i&&F.startsWith(O)&&F.charAt(V)==="/",y=U!=null&&(U===O||!i&&U.startsWith(O)&&U.charAt(O.length)==="/"),b={isActive:v,isPending:y,isTransitioning:$},C=v?t:void 0,g;typeof o=="function"?g=o(b):g=[o,v?"active":null,y?"pending":null,$?"transitioning":null].filter(Boolean).join(" ");let c=typeof s=="function"?s(b):s;return D.createElement(gn,{...m,"aria-current":C,className:g,ref:w,style:c,to:l,viewTransition:f},typeof d=="function"?d(b):d)});Ia.displayName="NavLink";var Aa=D.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:o,replace:i,state:s,method:l=dt,action:f,onSubmit:d,relative:m,preventScrollReset:w,viewTransition:R,...j},A)=>{let P=Wa(),h=Ua(f,{relative:m}),$=l.toLowerCase()==="get"?"get":"post",O=typeof f=="string"&&vn.test(f),F=U=>{if(d&&d(U),U.defaultPrevented)return;U.preventDefault();let V=U.nativeEvent.submitter,v=V?.getAttribute("formmethod")||l;P(V||U.currentTarget,{fetcherKey:t,method:v,navigate:r,replace:i,state:s,relative:m,preventScrollReset:w,viewTransition:R})};return D.createElement("form",{ref:A,method:$,action:h,onSubmit:o?d:F,...j,"data-discover":!O&&e==="render"?"true":void 0})});Aa.displayName="Form";function za(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=D.useContext(Me);return oe(t,za(e)),t}function Ha(e,{target:t,replace:r,state:o,preventScrollReset:i,relative:s,viewTransition:l}={}){let f=un(),d=Ce(),m=Qe(e,{relative:s});return D.useCallback(w=>{if(va(w,t)){w.preventDefault();let R=r!==void 0?r:Xe(d)===Xe(m);f(e,{replace:R,state:o,preventScrollReset:i,relative:s,viewTransition:l})}},[d,f,m,r,o,t,e,i,s,l])}var Na=0,Fa=()=>`__${String(++Na)}__`;function Wa(){let{router:e}=yn("useSubmit"),{basename:t}=D.useContext(we),r=aa();return D.useCallback(async(o,i={})=>{let{action:s,method:l,encType:f,formData:d,body:m}=ba(o,t);if(i.navigate===!1){let w=i.fetcherKey||Fa();await e.fetch(w,r,i.action||s,{preventScrollReset:i.preventScrollReset,formData:d,body:m,formMethod:i.method||l,formEncType:i.encType||f,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:d,body:m,formMethod:i.method||l,formEncType:i.encType||f,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,r])}function Ua(e,{relative:t}={}){let{basename:r}=D.useContext(we),o=D.useContext(ke);oe(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),s={...Qe(e||".",{relative:t})},l=Ce();if(e==null){s.search=l.search;let f=new URLSearchParams(s.search),d=f.getAll("index");if(d.some(w=>w==="")){f.delete("index"),d.filter(R=>R).forEach(R=>f.append("index",R));let w=f.toString();s.search=w?`?${w}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Se([r,s.pathname])),Xe(s)}function Ya(e,t={}){let r=D.useContext(an);oe(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=yn("useViewTransitionState"),i=Qe(e,{relative:t.relative});if(!r.isTransitioning)return!1;let s=xe(r.currentLocation.pathname,o)||r.currentLocation.pathname,l=xe(r.nextLocation.pathname,o)||r.nextLocation.pathname;return gt(i.pathname,l)!=null||gt(i.pathname,s)!=null}[...Ea];const bn=Y.createContext({history:[],addToHistory:()=>{},popFromHistory:()=>"",replaceHistory:()=>{}}),qa=({routes:e,children:t})=>{const r=Y.useRef(["/"]),[o,i]=Y.useState(["/"]),s=Y.useCallback(w=>{r.current=w,i(w)},[]),l=w=>{s([...r.current,w])},f=w=>{let R="",j=[];return r.current.length===0?"/":(r.current.length<=w?(R=r.current[0],j=[R]):(j=r.current.slice(0,r.current.length-w),R=j[j.length-1]),s(j),R)},d=w=>{s(w)},m=e.map(w=>J.jsx(dn,{path:w.path,element:w.render}));return J.jsx(bn.Provider,{value:{history:o,addToHistory:l,popFromHistory:f,replaceHistory:d},children:J.jsxs($a,{children:[t,J.jsx(fa,{children:m})]})})},Ba=()=>{const e=un(),t=Ce(),r=Y.useContext(bn),o=Y.useCallback((l,f=!0)=>{l!==t.pathname&&e(l,{replace:!0}),f&&r.addToHistory(l)},[t.pathname,e,r]),i=Y.useCallback(l=>{const f=l||1,d=r.popFromHistory(f);o(d,!1)},[o,r]),s=Y.useCallback(l=>{r.replaceHistory(l)},[r]);return{currentPath:t.pathname,history:r.history,goBack:i,goTo:o,replaceHistory:s}},wn=Y.createContext({visibleItems:[],isItemVisible:()=>!1,showItem:()=>{},hideItem:()=>{}}),Va=({children:e})=>{const t=Y.useRef([]),[r,o]=Y.useState([]),i=Y.useCallback(d=>{t.current=d,o(d)},[]),s=Y.useCallback(d=>t.current.some(m=>m===d),[]),l=Y.useCallback(d=>{s(d)||i([...t.current,d])},[s,i]),f=Y.useCallback(d=>{s(d)&&i(t.current.filter(w=>w!==d))},[s,i]);return J.jsx(wn.Provider,{value:{visibleItems:r,isItemVisible:s,showItem:l,hideItem:f},children:e})},et=()=>{const e=Y.useContext(wn),t=i=>e.visibleItems.some(s=>s===i),r=i=>{e.showItem(i)},o=i=>{e.hideItem(i)};return{visibleItems:e.visibleItems,isItemVisible:t,showItem:r,hideItem:o}},Xa=({id:e,onCloseDrawer:t,drawerCloseOffset:r=15})=>{const{isItemVisible:o}=et(),[i,s]=Y.useState({isDragging:!1}),l=Y.useRef(null),f=Y.useRef(null),d=Y.useRef(null),[m,w]=Y.useState(0),R=P=>{s(P)},j=P=>{s(P),w(0)};return Kr({ref:d,onDrag:P=>{s(P);const h=f.current?.clientHeight||0;P.distanceY&&(w(P.distanceY<0?0:-P.distanceY),P.distanceY>=h-r&&(t?.(),j(P)))},onDragEnd:j,onDragStart:R}),{isVisible:o(e),drawerParentRef:l,drawerRef:f,drawerBottomDistance:m,handleRef:d}},Ga=e=>{const{children:t,backgroundStyles:r,contentStyles:o,handle:i}=e,{isVisible:s,drawerParentRef:l,drawerRef:f,handleRef:d,drawerBottomDistance:m}=Xa(e);return J.jsx(J.Fragment,{children:s&&J.jsx("div",{ref:l,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:J.jsxs("div",{ref:f,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:`${m}px`,...o},onClick:w=>{w.stopPropagation()},children:[J.jsx("div",{ref:d,style:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0px",height:"24px",width:"100%",cursor:"pointer",...i?.styles},children:i?.render}),t]})})})},Ka=({onSubmit:e,fields:t})=>{const r=Y.useRef(null),o=Y.useCallback(l=>{var f=Object.keys(l.currentTarget.elements),d=Object.values(l.currentTarget.elements),m=[];for(let w=0;w<f.length;w++){const R=f[w];if(t.findIndex(A=>A.name===R)===-1)continue;const j=d[w].value;m.push({name:R,value:j})}return m},[e]),i=Y.useCallback(l=>{l.preventDefault();const f=o(l);e?.(f)},[e]);return{ref:r,submitForm:l=>{l.preventDefault(),l.stopPropagation(),r.current&&r.current.requestSubmit()},handleFormSubmission:i}},Ja=e=>{const{fields:t,styles:r,submitButton:o}=e,{ref:i,handleFormSubmission:s,submitForm:l}=Ka(e),f=Y.useCallback(()=>t.map(d=>({...d.content,key:d.name})),[t]);return J.jsxs("form",{ref:i,onSubmit:s,style:{width:"100%",display:"flex",flexDirection:"column",gap:"8px",flex:1,...r},children:[f(),J.jsx("div",{onClick:l,style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center",...o.styles},children:o.content})]})},Za=({src:e,alt:t="",onClick:r,styles:o})=>J.jsx("img",{src:e,alt:t,style:{overflow:"hidden",position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",objectFit:"cover",...o},onClick:()=>r?.()}),Qa=je.div`
127
127
  display: flex;
128
128
  flex-direction: column;
129
129
  font-family: inherit;
@@ -141,7 +141,7 @@ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}
141
141
  input:-webkit-autofill {
142
142
  background-color: #00000000;
143
143
  }
144
- `,Qa=({name:e,label:t,leftIcon:r,rightIcon:o,bottomMessage:i,placeHolder:s,autoComplete:l="off",value:f,initialValue:d,type:m="text",onChange:w,onFocus:R,inputStyles:j,containerProps:A,step:P})=>{const h=O=>{w?.(O.currentTarget.value)},$=O=>{R?.()};return J.jsxs(Za,{style:{width:"100%",maxWidth:"357px",gap:"8px",...A},children:[t,J.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:"Poppins",fontStyle:"normal",fontWeight:400,fontSize:"16px",lineHeight:"24px",outline:"none",alignItems:"center",gap:"10px",...j},children:[r,J.jsx("input",{name:e,type:m,autoComplete:l,step:P,style:{flex:1,border:"none",color:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",outline:"inherit",background:"none"},placeholder:s,value:f,defaultValue:d,onChange:h,onFocus:$}),o]}),i]})},es=({id:e,styles:t,children:r})=>{const{isItemVisible:o}=et();return J.jsx(J.Fragment,{children:o(e)&&J.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})})},ts=({id:e,children:t,backgroundStyles:r,contentStyles:o,onClickOutsideModal:i})=>{const{isItemVisible:s}=et();return J.jsx(J.Fragment,{children:s(e)&&J.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:()=>{i?.()},children:J.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",...o},onClick:l=>{l.stopPropagation()},children:t})})})},rs=e=>{const t=Y.useRef(null),r=Y.useRef(null),[o,i]=Y.useState(24),[s,l]=Y.useState(24),f=Y.useCallback(()=>{t.current&&i(t.current.clientHeight)},[t,t.current]),d=Y.useCallback(()=>{r.current&&l(r.current.clientHeight)},[r,r.current]),m=Y.useCallback(()=>{let w=0;return e.header?.visibility==="always"&&(w=w+(o||0)),e.footer?.visibility==="always"&&(w=w+(s||0)),w},[r,r.current]);return Y.useEffect(()=>{f()},[f,t,t.current]),Y.useEffect(()=>{d()},[d,r,r.current]),{header:{...e.header,visible:e.header!==void 0,height:e.header?.visibility==="fixed"?0:o,ref:t},footer:{...e.footer,visible:e.footer!==void 0,height:e.footer?.visibility==="fixed"?0:s,ref:r},page:{extraHeight:m()}}},ns=je.div`
144
+ `,es=({name:e,label:t,leftIcon:r,rightIcon:o,bottomMessage:i,placeHolder:s,autoComplete:l="off",value:f,initialValue:d,type:m="text",onChange:w,onFocus:R,inputStyles:j,containerProps:A,step:P})=>{const h=O=>{w?.(O.currentTarget.value)},$=O=>{R?.()};return J.jsxs(Qa,{style:{width:"100%",maxWidth:"357px",gap:"8px",...A},children:[t,J.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:"Poppins",fontStyle:"normal",fontWeight:400,fontSize:"16px",lineHeight:"24px",outline:"none",alignItems:"center",gap:"10px",...j},children:[r,J.jsx("input",{name:e,type:m,autoComplete:l,step:P,style:{flex:1,border:"none",color:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",outline:"inherit",background:"none"},placeholder:s,value:f,defaultValue:d,onChange:h,onFocus:$}),o]}),i]})},ts=({id:e,styles:t,children:r})=>{const{isItemVisible:o}=et();return J.jsx(J.Fragment,{children:o(e)&&J.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})})},rs=({id:e,children:t,backgroundStyles:r,contentStyles:o,onClickOutsideModal:i})=>{const{isItemVisible:s}=et();return J.jsx(J.Fragment,{children:s(e)&&J.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:()=>{i?.()},children:J.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",...o},onClick:l=>{l.stopPropagation()},children:t})})})},ns=e=>{const t=Y.useRef(null),r=Y.useRef(null),[o,i]=Y.useState(24),[s,l]=Y.useState(24),f=Y.useCallback(()=>{t.current&&i(t.current.clientHeight)},[t,t.current]),d=Y.useCallback(()=>{r.current&&l(r.current.clientHeight)},[r,r.current]),m=Y.useCallback(()=>{let w=0;return e.header?.visibility==="always"&&(w=w+(o||0)),e.footer?.visibility==="always"&&(w=w+(s||0)),w},[r,r.current]);return Y.useEffect(()=>{f()},[f,t,t.current]),Y.useEffect(()=>{d()},[d,r,r.current]),{header:{...e.header,visible:e.header!==void 0,height:e.header?.visibility==="fixed"?0:o,ref:t},footer:{...e.footer,visible:e.footer!==void 0,height:e.footer?.visibility==="fixed"?0:s,ref:r},page:{extraHeight:m()}}},is=je.div`
145
145
  min-height: 100%;
146
146
  max-height: 100%;
147
147
  width: 100%;
@@ -161,4 +161,4 @@ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}
161
161
  box-sizing: border-box;
162
162
  position: relative;
163
163
  }
164
- `,is=e=>{const{containerStyles:t,pageStyles:r,children:o,allowScroll:i=!0,floatingContent:s,reserveSpaceForScrollbar:l}=e,{footer:f,header:d}=rs(e);return J.jsxs(ns,{id:"page-container",styles:{...t},children:[d.visible&&J.jsx("div",{ref:d.ref,id:"page-header",style:{width:"100%",zIndex:99,position:d.visibility==="fixed"?"relative":"sticky",top:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...d.styles},children:d.content}),J.jsx("div",{id:"page-body",style:{width:"100%",overflow:"hidden",display:"flex",flex:1,marginTop:`-${d.height}px`,marginBottom:`-${f.height}px`},children:J.jsx("div",{id:"page-content",style:{width:"100%",overflowX:"hidden",overflowY:i?"auto":"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:"100%",scrollbarGutter:l?"stable":void 0,paddingLeft:"0px",paddingRight:"0px",paddingTop:`${d.height}px`,paddingBottom:`${f.height}px`,...r},children:o})}),f.visible&&J.jsx("div",{ref:f.ref,id:"page-footer",style:{width:"100%",zIndex:99,position:f.visibility==="fixed"?"relative":"sticky",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...f.styles},children:f.content})]})},os=({src:e,width:t="22",height:r="28",stroke:o,viewBox:i="0 0 22 28",fill:s="#000000",alt:l="",onClick:f,styles:d})=>J.jsx("div",{style:{width:"fit-content",height:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",...d},onClick:()=>f?.(),children:J.jsx("svg",{width:t,height:r,viewBox:i,fill:s,stroke:o,xmlns:"http://www.w3.org/2000/svg",style:{display:"flex"},children:e})}),as=({id:e,children:t,styles:r,durationInSeconds:o=3})=>{const i=Y.useRef(!1),{isItemVisible:s,hideItem:l}=et();return Y.useEffect(()=>{const f=s(e);i.current!==f&&(i.current=f,f&&setTimeout(()=>l(e),o*1e3))},[i,s,l]),J.jsx(J.Fragment,{children:s(e)&&J.jsx("div",{style:{width:"100px",height:"40px",background:"#534a4aff",color:"#ffffff",position:"fixed",top:"10px",left:"50%",transform:"translateX(-50%)",zIndex:1e3,borderRadius:"20px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",border:"solid 3px #000000ff",...r},onClick:f=>{f.stopPropagation()},children:t})})},ss=({overflowEllipsis:e,children:t,styles:r})=>J.jsx("p",{style:{fontFamily:"inherit",maxWidth:"100%",overflow:"hidden",whiteSpace:e?"nowrap":"normal",textOverflow:"ellipsis",fontSize:"16px",fontStyle:"normal",lineHeight:"normal",color:"inherit",...r},children:t});class ls{static isScrollEnabled=()=>document.body.style.overflow==="unset"||document.body.style.overflow==="auto";static disableScroll=()=>{document.body.style.overflow="hidden"};static enableScroll=()=>{document.body.style.overflow="unset"}}class us{static getPascalCase=t=>t.replace(/\w+/g,function(r){return r[0].toUpperCase()+r.slice(1).toLowerCase()});static isEqual=(t,r,o=!0)=>o?t===r:t.toUpperCase()===r.toUpperCase()}exports.Button=En;exports.Carousel=io;exports.Drawer=Xa;exports.FeedbackProvider=Ba;exports.Form=Ka;exports.Image=Ja;exports.InputField=Qa;exports.Loader=es;exports.Modal=ts;exports.NavigationProvider=Ya;exports.PageLayout=is;exports.ScrollHelper=ls;exports.SvgImage=os;exports.TextHelper=us;exports.TimeHelper=Jr;exports.Toast=as;exports.Typography=ss;exports.defaultBreakpoints=Zr;exports.useDidMount=oo;exports.useDrag=Kr;exports.useFeedback=et;exports.useFetch=ao;exports.useIsTouchingParentElement=mo;exports.useNavigation=qa;exports.usePointer=Gr;exports.useResponsive=vo;exports.useTranslations=bo;
164
+ `,os=e=>{const{containerStyles:t,pageStyles:r,children:o,allowScroll:i=!0,floatingContent:s,reserveSpaceForScrollbar:l}=e,{footer:f,header:d}=ns(e);return J.jsxs(is,{id:"page-container",styles:{...t},children:[d.visible&&J.jsx("div",{ref:d.ref,id:"page-header",style:{width:"100%",zIndex:99,position:d.visibility==="fixed"?"relative":"sticky",top:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...d.styles},children:d.content}),J.jsx("div",{id:"page-body",style:{width:"100%",overflow:"hidden",display:"flex",flex:1,marginTop:`-${d.height}px`,marginBottom:`-${f.height}px`},children:J.jsx("div",{id:"page-content",style:{width:"100%",overflowX:"hidden",overflowY:i?"auto":"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:"100%",scrollbarGutter:l?"stable":void 0,paddingLeft:"0px",paddingRight:"0px",paddingTop:`${d.height}px`,paddingBottom:`${f.height}px`,...r},children:o})}),f.visible&&J.jsx("div",{ref:f.ref,id:"page-footer",style:{width:"100%",zIndex:99,position:f.visibility==="fixed"?"relative":"sticky",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...f.styles},children:f.content})]})},as=({src:e,width:t="22",height:r="28",stroke:o,viewBox:i="0 0 22 28",fill:s="#000000",alt:l="",onClick:f,styles:d})=>J.jsx("div",{style:{width:"fit-content",height:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",...d},onClick:()=>f?.(),children:J.jsx("svg",{width:t,height:r,viewBox:i,fill:s,stroke:o,xmlns:"http://www.w3.org/2000/svg",style:{display:"flex"},children:e})}),ss=({id:e,children:t,styles:r,durationInSeconds:o=3})=>{const i=Y.useRef(!1),{isItemVisible:s,hideItem:l}=et();return Y.useEffect(()=>{const f=s(e);i.current!==f&&(i.current=f,f&&setTimeout(()=>l(e),o*1e3))},[i,s,l]),J.jsx(J.Fragment,{children:s(e)&&J.jsx("div",{style:{width:"100px",height:"40px",background:"#534a4aff",color:"#ffffff",position:"fixed",top:"10px",left:"50%",transform:"translateX(-50%)",zIndex:1e3,borderRadius:"20px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",border:"solid 3px #000000ff",...r},onClick:f=>{f.stopPropagation()},children:t})})},ls=({overflowEllipsis:e,children:t,styles:r})=>J.jsx("p",{style:{fontFamily:"inherit",maxWidth:"100%",overflow:"hidden",whiteSpace:e?"nowrap":"normal",textOverflow:"ellipsis",fontSize:"16px",fontStyle:"normal",lineHeight:"normal",color:"inherit",...r},children:t});class us{static isScrollEnabled=()=>document.body.style.overflow==="unset"||document.body.style.overflow==="auto";static disableScroll=()=>{document.body.style.overflow="hidden"};static enableScroll=()=>{document.body.style.overflow="unset"}}class cs{static getPascalCase=t=>t.replace(/\w+/g,function(r){return r[0].toUpperCase()+r.slice(1).toLowerCase()});static isEqual=(t,r,o=!0)=>o?t===r:t.toUpperCase()===r.toUpperCase()}exports.Button=En;exports.Carousel=io;exports.Checkbox=oo;exports.Drawer=Ga;exports.FeedbackProvider=Va;exports.Form=Ja;exports.Image=Za;exports.InputField=es;exports.Loader=ts;exports.Modal=rs;exports.NavigationProvider=qa;exports.PageLayout=os;exports.ScrollHelper=us;exports.SvgImage=as;exports.TextHelper=cs;exports.TimeHelper=Jr;exports.Toast=ss;exports.Typography=ls;exports.defaultBreakpoints=Zr;exports.useDidMount=ao;exports.useDrag=Kr;exports.useFeedback=et;exports.useFetch=so;exports.useIsTouchingParentElement=vo;exports.useNavigation=Ba;exports.usePointer=Gr;exports.useResponsive=go;exports.useTranslations=wo;
package/dist/index.es.js CHANGED
@@ -3875,7 +3875,39 @@ const to = je.div`
3875
3875
  return q.useEffect(() => {
3876
3876
  w();
3877
3877
  }, [l, f]), /* @__PURE__ */ J.jsx(to, { ref: l, styles: { ...e }, children: /* @__PURE__ */ J.jsx(ii, { ...d, slidesToShow: i, children: m }) });
3878
- }, Ga = (e) => Dr(e, []), no = () => {
3878
+ }, Ga = ({
3879
+ checked: e,
3880
+ onToggle: t,
3881
+ styles: r,
3882
+ checkedStyles: o,
3883
+ customCheckedRender: i,
3884
+ customUncheckedRender: s
3885
+ }) => {
3886
+ const l = e ? { ...r, ...o } : { ...r };
3887
+ return /* @__PURE__ */ J.jsxs(
3888
+ "div",
3889
+ {
3890
+ onClick: () => t?.(!e),
3891
+ style: {
3892
+ width: "25px",
3893
+ height: "25px",
3894
+ borderRadius: "4px",
3895
+ border: "1px solid #969696ff",
3896
+ background: e ? "#000000" : "#ffffff",
3897
+ overflow: "hidden",
3898
+ objectFit: "contain",
3899
+ alignItems: "center",
3900
+ justifyContent: "center",
3901
+ display: "flex",
3902
+ ...l
3903
+ },
3904
+ children: [
3905
+ e && i,
3906
+ !e && s
3907
+ ]
3908
+ }
3909
+ );
3910
+ }, Ka = (e) => Dr(e, []), no = () => {
3879
3911
  const [e, t] = q.useState(
3880
3912
  {}
3881
3913
  ), [r, o] = q.useState(!1);
@@ -3949,7 +3981,7 @@ const to = je.div`
3949
3981
  }, [l]), q.useEffect(() => {
3950
3982
  f !== s.current && (s.current = f, f || R());
3951
3983
  }, [f, s.current]);
3952
- }, Ka = () => {
3984
+ }, Ja = () => {
3953
3985
  const e = (r, o) => {
3954
3986
  let i = 0, s = `${r}?`;
3955
3987
  for (const l in o) {
@@ -4358,7 +4390,7 @@ class ho {
4358
4390
  static formatDateLocalTime = (t, r) => t ? ut.utc(t).local().format(r || "DD/MM/YYYYㆍHH:mm") : "";
4359
4391
  static formatDateUTC = (t, r) => t ? ut.utc(t).format(r || "DD/MM/YYYYㆍHH:mm") : "";
4360
4392
  }
4361
- const Ja = (e, t = 0) => {
4393
+ const Za = (e, t = 0) => {
4362
4394
  const r = q.useRef(0), [o, i] = q.useState(0), s = q.useRef(null), [l, f] = q.useState(!1), d = q.useCallback(() => {
4363
4395
  f((R) => !R);
4364
4396
  }, []), m = q.useCallback(() => r.current === 0 ? !1 : o >= r.current - t, [t, o]), w = q.useCallback(() => e.current !== null && e.current !== void 0, [e]);
@@ -4391,7 +4423,7 @@ const Ja = (e, t = 0) => {
4391
4423
  lg: 991,
4392
4424
  xl: 1200,
4393
4425
  xxl: 1440
4394
- }, Za = (e) => {
4426
+ }, Qa = (e) => {
4395
4427
  const t = {
4396
4428
  ...po,
4397
4429
  ...e?.breakpointConfiguration
@@ -4406,7 +4438,7 @@ const Ja = (e, t = 0) => {
4406
4438
  }, mo = (e, t) => e < t.sm ? "xs" : e < t.md ? "sm" : e < t.lg ? "md" : e < t.xl ? "lg" : e < t.xxl ? "xl" : "xxl", vo = (e, t) => e <= t.sm ? "mobile" : e <= t.md ? "tablet" : "desktop", Pr = (e) => {
4407
4439
  const t = window.innerWidth, r = window.innerHeight, o = mo(t, e), i = vo(t, e);
4408
4440
  return { currentWidth: t, currentHeight: r, currentBreakpoint: o, currentSize: i };
4409
- }, Qa = (e) => {
4441
+ }, es = (e) => {
4410
4442
  const t = e.translations, r = e.language, o = (s, l) => {
4411
4443
  if (!s)
4412
4444
  return;
@@ -6101,7 +6133,7 @@ const gn = q.createContext({
6101
6133
  popFromHistory: () => "",
6102
6134
  replaceHistory: () => {
6103
6135
  }
6104
- }), es = ({
6136
+ }), ts = ({
6105
6137
  routes: e,
6106
6138
  children: t
6107
6139
  }) => {
@@ -6133,7 +6165,7 @@ const gn = q.createContext({
6133
6165
  ] })
6134
6166
  }
6135
6167
  );
6136
- }, ts = () => {
6168
+ }, rs = () => {
6137
6169
  const e = sn(), t = Ce(), r = Wt(gn), o = q.useCallback(
6138
6170
  (l, f = !0) => {
6139
6171
  l !== t.pathname && e(l, { replace: !0 }), f && r.addToHistory(l);
@@ -6167,7 +6199,7 @@ const gn = q.createContext({
6167
6199
  hideItem: () => {
6168
6200
  }
6169
6201
  }
6170
- ), rs = ({ children: e }) => {
6202
+ ), ns = ({ children: e }) => {
6171
6203
  const t = q.useRef([]), [r, o] = q.useState([]), i = q.useCallback((d) => {
6172
6204
  t.current = d, o(d);
6173
6205
  }, []), s = q.useCallback((d) => t.current.some((m) => m === d), []), l = q.useCallback(
@@ -6235,7 +6267,7 @@ const gn = q.createContext({
6235
6267
  drawerBottomDistance: m,
6236
6268
  handleRef: d
6237
6269
  };
6238
- }, ns = (e) => {
6270
+ }, is = (e) => {
6239
6271
  const { children: t, backgroundStyles: r, contentStyles: o, handle: i } = e, {
6240
6272
  isVisible: s,
6241
6273
  drawerParentRef: l,
@@ -6343,7 +6375,7 @@ const gn = q.createContext({
6343
6375
  },
6344
6376
  handleFormSubmission: i
6345
6377
  };
6346
- }, is = (e) => {
6378
+ }, os = (e) => {
6347
6379
  const { fields: t, styles: r, submitButton: o } = e, { ref: i, handleFormSubmission: s, submitForm: l } = Wa(e), f = q.useCallback(() => t.map((d) => ({ ...d.content, key: d.name })), [t]);
6348
6380
  return /* @__PURE__ */ J.jsxs(
6349
6381
  "form",
@@ -6377,7 +6409,7 @@ const gn = q.createContext({
6377
6409
  ]
6378
6410
  }
6379
6411
  );
6380
- }, os = ({ src: e, alt: t = "", onClick: r, styles: o }) => /* @__PURE__ */ J.jsx(
6412
+ }, as = ({ src: e, alt: t = "", onClick: r, styles: o }) => /* @__PURE__ */ J.jsx(
6381
6413
  "img",
6382
6414
  {
6383
6415
  src: e,
@@ -6412,7 +6444,7 @@ const gn = q.createContext({
6412
6444
  input:-webkit-autofill {
6413
6445
  background-color: #00000000;
6414
6446
  }
6415
- `, as = ({
6447
+ `, ss = ({
6416
6448
  name: e,
6417
6449
  label: t,
6418
6450
  leftIcon: r,
@@ -6504,7 +6536,7 @@ const gn = q.createContext({
6504
6536
  ]
6505
6537
  }
6506
6538
  );
6507
- }, ss = ({ id: e, styles: t, children: r }) => {
6539
+ }, ls = ({ id: e, styles: t, children: r }) => {
6508
6540
  const { isItemVisible: o } = Ot();
6509
6541
  return /* @__PURE__ */ J.jsx(J.Fragment, { children: o(e) && /* @__PURE__ */ J.jsx(
6510
6542
  "div",
@@ -6525,7 +6557,7 @@ const gn = q.createContext({
6525
6557
  children: r
6526
6558
  }
6527
6559
  ) });
6528
- }, ls = ({
6560
+ }, us = ({
6529
6561
  id: e,
6530
6562
  children: t,
6531
6563
  backgroundStyles: r,
@@ -6633,7 +6665,7 @@ const gn = q.createContext({
6633
6665
  box-sizing: border-box;
6634
6666
  position: relative;
6635
6667
  }
6636
- `, us = (e) => {
6668
+ `, cs = (e) => {
6637
6669
  const {
6638
6670
  containerStyles: t,
6639
6671
  pageStyles: r,
@@ -6731,7 +6763,7 @@ const gn = q.createContext({
6731
6763
  ]
6732
6764
  }
6733
6765
  );
6734
- }, cs = ({
6766
+ }, fs = ({
6735
6767
  src: e,
6736
6768
  width: t = "22",
6737
6769
  height: r = "28",
@@ -6769,7 +6801,7 @@ const gn = q.createContext({
6769
6801
  }
6770
6802
  )
6771
6803
  }
6772
- ), fs = ({
6804
+ ), ds = ({
6773
6805
  id: e,
6774
6806
  children: t,
6775
6807
  styles: r,
@@ -6806,7 +6838,7 @@ const gn = q.createContext({
6806
6838
  children: t
6807
6839
  }
6808
6840
  ) });
6809
- }, ds = ({
6841
+ }, hs = ({
6810
6842
  overflowEllipsis: e,
6811
6843
  children: t,
6812
6844
  styles: r
@@ -6828,7 +6860,7 @@ const gn = q.createContext({
6828
6860
  children: t
6829
6861
  }
6830
6862
  );
6831
- class hs {
6863
+ class ps {
6832
6864
  static isScrollEnabled = () => document.body.style.overflow === "unset" || document.body.style.overflow === "auto";
6833
6865
  static disableScroll = () => {
6834
6866
  document.body.style.overflow = "hidden";
@@ -6837,7 +6869,7 @@ class hs {
6837
6869
  document.body.style.overflow = "unset";
6838
6870
  };
6839
6871
  }
6840
- class ps {
6872
+ class ms {
6841
6873
  static getPascalCase = (t) => t.replace(/\w+/g, function(r) {
6842
6874
  return r[0].toUpperCase() + r.slice(1).toLowerCase();
6843
6875
  });
@@ -6846,29 +6878,30 @@ class ps {
6846
6878
  export {
6847
6879
  Va as Button,
6848
6880
  Xa as Carousel,
6849
- ns as Drawer,
6850
- rs as FeedbackProvider,
6851
- is as Form,
6852
- os as Image,
6853
- as as InputField,
6854
- ss as Loader,
6855
- ls as Modal,
6856
- es as NavigationProvider,
6857
- us as PageLayout,
6858
- hs as ScrollHelper,
6859
- cs as SvgImage,
6860
- ps as TextHelper,
6881
+ Ga as Checkbox,
6882
+ is as Drawer,
6883
+ ns as FeedbackProvider,
6884
+ os as Form,
6885
+ as as Image,
6886
+ ss as InputField,
6887
+ ls as Loader,
6888
+ us as Modal,
6889
+ ts as NavigationProvider,
6890
+ cs as PageLayout,
6891
+ ps as ScrollHelper,
6892
+ fs as SvgImage,
6893
+ ms as TextHelper,
6861
6894
  ho as TimeHelper,
6862
- fs as Toast,
6863
- ds as Typography,
6895
+ ds as Toast,
6896
+ hs as Typography,
6864
6897
  po as defaultBreakpoints,
6865
- Ga as useDidMount,
6898
+ Ka as useDidMount,
6866
6899
  io as useDrag,
6867
6900
  Ot as useFeedback,
6868
- Ka as useFetch,
6869
- Ja as useIsTouchingParentElement,
6870
- ts as useNavigation,
6901
+ Ja as useFetch,
6902
+ Za as useIsTouchingParentElement,
6903
+ rs as useNavigation,
6871
6904
  no as usePointer,
6872
- Za as useResponsive,
6873
- Qa as useTranslations
6905
+ Qa as useResponsive,
6906
+ es as useTranslations
6874
6907
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eliseubatista99/react-scaffold-core",
3
- "version": "0.1.43",
3
+ "version": "0.1.45",
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",