From 7df0c18c43ba3f24e0a70dc343e54eb36dd5b199 Mon Sep 17 00:00:00 2001 From: mychidarko Date: Wed, 4 Oct 2023 09:43:44 +0000 Subject: [PATCH] fix: patch up directory check --- composer.json | 2 +- src/ui/dist/assets/index-74a315c9.js | 2 +- src/ui/dist/server.php | 2 +- src/ui/src/pages/HomeScreen.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 0f18601..c883478 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "leafs/cli", "description": "A simple command line tool for installing and interacting with your leaf apps", "homepage": "https://cli.leafphp.dev", - "version": "v2.10.2", + "version": "v2.10.3", "keywords": [ "leaf", "php", diff --git a/src/ui/dist/assets/index-74a315c9.js b/src/ui/dist/assets/index-74a315c9.js index 1a766ce..4ffe75a 100644 --- a/src/ui/dist/assets/index-74a315c9.js +++ b/src/ui/dist/assets/index-74a315c9.js @@ -45,7 +45,7 @@ Error generating stack: `+a.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var lo=ne;function Py(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ry=typeof Object.is=="function"?Object.is:Py,Ly=lo.useState,My=lo.useEffect,Ty=lo.useLayoutEffect,zy=lo.useDebugValue;function Iy(e,t){var n=t(),r=Ly({inst:{value:n,getSnapshot:t}}),o=r[0].inst,a=r[1];return Ty(function(){o.value=n,o.getSnapshot=t,Tl(o)&&a({inst:o})},[e,n,t]),My(function(){return Tl(o)&&a({inst:o}),e(function(){Tl(o)&&a({inst:o})})},[e]),zy(n),n}function Tl(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ry(e,n)}catch{return!0}}function Ay(e,t){return t()}var Fy=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ay:Iy;T0.useSyncExternalStore=lo.useSyncExternalStore!==void 0?lo.useSyncExternalStore:Fy;M0.exports=T0;var Dy=M0.exports;const Sn=new WeakMap,zl={},Da={},Gn=()=>{},qt=Gn(),ei=Object,Ne=e=>e===qt,gn=e=>typeof e=="function",Mn=(e,t)=>({...e,...t}),cc="undefined",Zi=typeof window!=cc,Ls=typeof document!=cc,$y=()=>Zi&&typeof window.requestAnimationFrame!=cc,z0=(e,t)=>{const n=Sn.get(e);return[()=>!Ne(t)&&e.get(t)||zl,r=>{if(!Ne(t)){const o=e.get(t);t in Da||(Da[t]=o),n[5](t,Mn(o,r),o||zl)}},n[6],()=>!Ne(t)&&t in Da?Da[t]:!Ne(t)&&e.get(t)||zl]},$a=new WeakMap;let Wy=0;const ia=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,a;if(ei(e)===e&&!r&&n!=RegExp){if(o=$a.get(e),o)return o;if(o=++Wy+"~",$a.set(e,o),n==Array){for(o="@",a=0;aMs,[Ts,zs]=Zi&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Gn,Gn],By=()=>{const e=Ls&&document.visibilityState;return Ne(e)||e!=="hidden"},Uy=e=>(Ls&&document.addEventListener("visibilitychange",e),Ts("focus",e),()=>{Ls&&document.removeEventListener("visibilitychange",e),zs("focus",e)}),Hy=e=>{const t=()=>{Ms=!0,e()},n=()=>{Ms=!1};return Ts("online",t),Ts("offline",n),()=>{zs("online",t),zs("offline",n)}},Gy={isOnline:Vy,isVisible:By},Ky={initFocus:Uy,initReconnect:Hy},od=!se.useId,la=!Zi||"Deno"in window,qy=e=>$y()?window.requestAnimationFrame(e):setTimeout(e,1),ti=la?ne.useEffect:ne.useLayoutEffect,Il=typeof navigator<"u"&&navigator.connection,ad=!la&&Il&&(["slow-2g","2g"].includes(Il.effectiveType)||Il.saveData),fc=e=>{if(gn(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?ia(e):"",[e,t]};let Qy=0;const Is=()=>++Qy,I0=0,A0=1,F0=2,Yy=3;var Co={__proto__:null,ERROR_REVALIDATE_EVENT:Yy,FOCUS_EVENT:I0,MUTATE_EVENT:F0,RECONNECT_EVENT:A0};async function D0(...e){const[t,n,r,o]=e,a=Mn({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let i=a.populateCache;const l=a.rollbackOnError;let s=a.optimisticData;const u=a.revalidate!==!1,f=y=>typeof l=="function"?l(y):l!==!1,d=a.throwOnError;if(gn(n)){const y=n,j=[],S=t.keys();for(let O=S.next();!O.done;O=S.next()){const w=O.value;!/^\$(inf|sub)\$/.test(w)&&y(t.get(w)._k)&&j.push(w)}return Promise.all(j.map(p))}return p(n);async function p(y){const[j]=fc(y);if(!j)return;const[S,O]=z0(t,j),[w,v,_]=Sn.get(t),c=w[j],M=()=>u&&(delete _[j],c&&c[0])?c[0](F0).then(()=>S().data):S().data;if(e.length<3)return M();let z=r,A;const V=Is();v[j]=[V,0];const C=!Ne(s),N=S(),U=N.data,Q=N._c,L=Ne(Q)?U:Q;if(C&&(s=gn(s)?s(L):s,O({data:s,_c:L})),gn(z))try{z=z(L)}catch(Z){A=Z}if(z&&gn(z.then))if(z=await z.catch(Z=>{A=Z}),V!==v[j][0]){if(A)throw A;return z}else A&&C&&f(A)&&(i=!0,z=L,O({data:z,_c:qt}));i&&(A||(gn(i)&&(z=i(z,L)),O({data:z,_c:qt}))),v[j][1]=Is();const oe=await M();if(O({_c:qt}),A){if(d)throw A;return}return i?oe:z}}const id=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},$0=(e,t)=>{if(!Sn.has(e)){const n=Mn(Ky,t),r={},o=D0.bind(qt,e);let a=Gn;const i={},l=(f,d)=>{const p=i[f]||[];return i[f]=p,p.push(d),()=>p.splice(p.indexOf(d),1)},s=(f,d,p)=>{e.set(f,d);const y=i[f];if(y)for(const j of y)j(d,p)},u=()=>{if(!Sn.has(e)&&(Sn.set(e,[r,{},{},{},o,s,l]),!la)){const f=n.initFocus(setTimeout.bind(qt,id.bind(qt,r,I0))),d=n.initReconnect(setTimeout.bind(qt,id.bind(qt,r,A0)));a=()=>{f&&f(),d&&d(),Sn.delete(e)}}};return u(),[e,o,u,a]}return[e,Sn.get(e)[4]]},Xy=(e,t,n,r,o)=>{const a=n.errorRetryCount,i=o.retryCount,l=~~((Math.random()+.5)*(1<<(i<8?i:8)))*n.errorRetryInterval;!Ne(a)&&i>a||setTimeout(r,l,o)},Jy=(e,t)=>ia(e)==ia(t),[dc,Zy]=$0(new Map),W0=Mn({onLoadingSlow:Gn,onSuccess:Gn,onError:Gn,onErrorRetry:Xy,onDiscarded:Gn,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ad?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:ad?5e3:3e3,compare:Jy,isPaused:()=>!1,cache:dc,mutate:Zy,fallback:{}},Gy),V0=(e,t)=>{const n=Mn(e,t);if(t){const{use:r,fallback:o}=e,{use:a,fallback:i}=t;r&&a&&(n.use=r.concat(a)),o&&i&&(n.fallback=Mn(o,i))}return n},As=ne.createContext({}),e1=e=>{const{value:t}=e,n=ne.useContext(As),r=gn(t),o=ne.useMemo(()=>r?t(n):t,[r,n,t]),a=ne.useMemo(()=>r?o:V0(n,o),[r,n,o]),i=o&&o.provider,l=ne.useRef(qt);i&&!l.current&&(l.current=$0(i(a.cache||dc),o));const s=l.current;return s&&(a.cache=s[0],a.mutate=s[1]),ti(()=>{if(s)return s[2]&&s[2](),s[3]},[]),ne.createElement(As.Provider,Mn(e,{value:a}))},B0=Zi&&window.__SWR_DEVTOOLS_USE__,t1=B0?window.__SWR_DEVTOOLS_USE__:[],n1=()=>{B0&&(window.__SWR_DEVTOOLS_REACT__=se)},r1=e=>gn(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],o1=()=>Mn(W0,ne.useContext(As)),a1=e=>(t,n,r)=>e(t,n&&((...a)=>{const[i]=fc(t),[,,,l]=Sn.get(dc),s=l[i];return s?(delete l[i],s):n(...a)}),r),i1=t1.concat(a1),l1=e=>function(...n){const r=o1(),[o,a,i]=r1(n),l=V0(r,i);let s=e;const{use:u}=l,f=(u||[]).concat(i1);for(let d=f.length;d--;)s=f[d](s);return s(o,a||l.fetcher||null,l)},s1=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}};n1();const Al={dedupe:!0},u1=(e,t,n)=>{const{cache:r,compare:o,suspense:a,fallbackData:i,revalidateOnMount:l,revalidateIfStale:s,refreshInterval:u,refreshWhenHidden:f,refreshWhenOffline:d,keepPreviousData:p}=n,[y,j,S]=Sn.get(r),[O,w]=fc(e),v=ne.useRef(!1),_=ne.useRef(!1),c=ne.useRef(O),M=ne.useRef(t),z=ne.useRef(n),A=()=>z.current,V=()=>A().isVisible()&&A().isOnline(),[C,N,U,Q]=z0(r,O),L=ne.useRef({}).current,oe=Ne(i)?n.fallback[O]:i,Z=(Se,Re)=>{for(const Ie in L){const Ce=Ie;if(Ce==="data"){if(!o(Se[Ce],Re[Ce])&&(!Ne(Se[Ce])||!o(ce,Re[Ce])))return!1}else if(Re[Ce]!==Se[Ce])return!1}return!0},$=ne.useMemo(()=>{const Se=(()=>!O||!t?!1:Ne(l)?A().isPaused()||a?!1:Ne(s)?!0:s:l)(),Re=qe=>{const at=Mn(qe);return delete at._k,Se?{isValidating:!0,isLoading:!0,...at}:at},Ie=C(),Ce=Q(),et=Re(Ie),mt=Ie===Ce?et:Re(Ce);let $e=et;return[()=>{const qe=Re(C());return Z(qe,$e)?($e.data=qe.data,$e.isLoading=qe.isLoading,$e.isValidating=qe.isValidating,$e.error=qe.error,$e):($e=qe,qe)},()=>mt]},[r,O]),ee=Dy.useSyncExternalStore(ne.useCallback(Se=>U(O,(Re,Ie)=>{Z(Ie,Re)||Se()}),[r,O]),$[0],$[1]),E=!v.current,P=y[O]&&y[O].length>0,T=ee.data,q=Ne(T)?oe:T,H=ee.error,re=ne.useRef(q),ce=p?Ne(T)?re.current:T:q,ye=(()=>P&&!Ne(H)?!1:E&&!Ne(l)?l:A().isPaused()?!1:a?Ne(q)?!1:s:Ne(q)||s)(),fe=!!(O&&t&&E&&ye),pe=Ne(ee.isValidating)?fe:ee.isValidating,ke=Ne(ee.isLoading)?fe:ee.isLoading,_e=ne.useCallback(async Se=>{const Re=M.current;if(!O||!Re||_.current||A().isPaused())return!1;let Ie,Ce,et=!0;const mt=Se||{},$e=!S[O]||!mt.dedupe,qe=()=>od?!_.current&&O===c.current&&v.current:O===c.current,at={isValidating:!1,isLoading:!1},xn=()=>{N(at)},Ut=()=>{const Oe=S[O];Oe&&Oe[1]===Ce&&delete S[O]},kt={isValidating:!0};Ne(C().data)&&(kt.isLoading=!0);try{if($e&&(N(kt),n.loadingTimeout&&Ne(C().data)&&setTimeout(()=>{et&&qe()&&A().onLoadingSlow(O,n)},n.loadingTimeout),S[O]=[Re(w),Is()]),[Ie,Ce]=S[O],Ie=await Ie,$e&&setTimeout(Ut,n.dedupingInterval),!S[O]||S[O][1]!==Ce)return $e&&qe()&&A().onDiscarded(O),!1;at.error=qt;const Oe=j[O];if(!Ne(Oe)&&(Ce<=Oe[0]||Ce<=Oe[1]||Oe[1]===0))return xn(),$e&&qe()&&A().onDiscarded(O),!1;const it=C().data;at.data=o(it,Ie)?it:Ie,$e&&qe()&&A().onSuccess(Ie,O,n)}catch(Oe){Ut();const it=A(),{shouldRetryOnError:G}=it;it.isPaused()||(at.error=Oe,$e&&qe()&&(it.onError(Oe,O,it),(G===!0||gn(G)&&G(Oe))&&V()&&it.onErrorRetry(Oe,O,it,D=>{const F=y[O];F&&F[0]&&F[0](Co.ERROR_REVALIDATE_EVENT,D)},{retryCount:(mt.retryCount||0)+1,dedupe:!0})))}return et=!1,xn(),!0},[O,r]),Ve=ne.useCallback((...Se)=>D0(r,c.current,...Se),[]);if(ti(()=>{M.current=t,z.current=n,Ne(T)||(re.current=T)}),ti(()=>{if(!O)return;const Se=_e.bind(qt,Al);let Re=0;const Ce=s1(O,y,(et,mt={})=>{if(et==Co.FOCUS_EVENT){const $e=Date.now();A().revalidateOnFocus&&$e>Re&&V()&&(Re=$e+A().focusThrottleInterval,Se())}else if(et==Co.RECONNECT_EVENT)A().revalidateOnReconnect&&V()&&Se();else{if(et==Co.MUTATE_EVENT)return _e();if(et==Co.ERROR_REVALIDATE_EVENT)return _e(mt)}});return _.current=!1,c.current=O,v.current=!0,N({_k:w}),ye&&(Ne(q)||la?Se():qy(Se)),()=>{_.current=!0,Ce()}},[O]),ti(()=>{let Se;function Re(){const Ce=gn(u)?u(C().data):u;Ce&&Se!==-1&&(Se=setTimeout(Ie,Ce))}function Ie(){!C().error&&(f||A().isVisible())&&(d||A().isOnline())?_e(Al).then(Re):Re()}return Re(),()=>{Se&&(clearTimeout(Se),Se=-1)}},[u,f,d,O]),ne.useDebugValue(ce),a&&Ne(q)&&O)throw!od&&la?new Error("Fallback data is required when using suspense in SSR."):(M.current=t,z.current=n,_.current=!1,Ne(H)?_e(Al):H);return{mutate:Ve,get data(){return L.data=!0,ce},get error(){return L.error=!0,H},get isValidating(){return L.isValidating=!0,pe},get isLoading(){return L.isLoading=!0,ke}}},c1=ei.defineProperty(e1,"defaultValue",{value:W0}),Oi=l1(u1);var U0={},pc={},f1=ue&&ue.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),d1=ue&&ue.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),p1=ue&&ue.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&f1(t,e,n);return d1(t,e),t};Object.defineProperty(pc,"__esModule",{value:!0});var sr=p1(ne);function h1(e){var t=sr.useState(0),n=t[0],r=t[1],o=e.transitionDuration||400,a=e.delay||50,i=e.wrapperTag||"div",l=e.childTag||"div",s=typeof e.visible>"u"?!0:e.visible;return sr.useEffect(function(){var u=sr.default.Children.count(e.children);if(s||(u=0),u==n){var f=setTimeout(function(){e.onComplete&&e.onComplete()},o);return function(){return clearTimeout(f)}}var d=u>n?1:-1,p=setTimeout(function(){r(n+d)},a);return function(){return clearTimeout(p)}},[sr.default.Children.count(e.children),a,n,s,o]),sr.default.createElement(i,{className:e.className},sr.default.Children.map(e.children,function(u,f){return sr.default.createElement(l,{className:e.childClassName,style:{transition:"opacity "+o+"ms, transform "+o+"ms",transform:n>f?"none":"translateY(20px)",opacity:n>f?1:0}},u)}))}pc.default=h1;(function(e){var t=ue&&ue.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=pc;Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t(n).default}})})(U0);const H0=Ni(U0);var G0={exports:{}},m1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",v1=m1,g1=v1;function K0(){}function q0(){}q0.resetWarningCache=K0;var y1=function(){function e(r,o,a,i,l,s){if(s!==g1){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:q0,resetWarningCache:K0};return n.PropTypes=n,n};G0.exports=y1();var b1=G0.exports;const le=Ni(b1);function Fs(){return Fs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function w1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var hc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=x1(e,["color","size"]);return se.createElement("svg",Fs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"}),se.createElement("path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"}))});hc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};hc.displayName="BookOpen";const k1=hc;function Ds(){return Ds=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function j1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var mc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=_1(e,["color","size"]);return se.createElement("svg",Ds({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("polyline",{points:"20 6 9 17 4 12"}))});mc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};mc.displayName="Check";const Q0=mc;function $s(){return $s=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function E1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var vc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=S1(e,["color","size"]);return se.createElement("svg",$s({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("polyline",{points:"8 17 12 21 16 17"}),se.createElement("line",{x1:"12",y1:"12",x2:"12",y2:"21"}),se.createElement("path",{d:"M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"}))});vc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};vc.displayName="DownloadCloud";const C1=vc;function Ws(){return Ws=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function N1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var gc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=O1(e,["color","size"]);return se.createElement("svg",Ws({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),se.createElement("polyline",{points:"14 2 14 8 20 8"}),se.createElement("line",{x1:"9",y1:"15",x2:"15",y2:"15"}))});gc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};gc.displayName="FileMinus";const P1=gc;function Vs(){return Vs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function L1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var yc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=R1(e,["color","size"]);return se.createElement("svg",Vs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"}),se.createElement("line",{x1:"12",y1:"11",x2:"12",y2:"17"}),se.createElement("line",{x1:"9",y1:"14",x2:"15",y2:"14"}))});yc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};yc.displayName="FolderPlus";const M1=yc;function Bs(){return Bs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function z1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var bc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=T1(e,["color","size"]);return se.createElement("svg",Bs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"}))});bc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};bc.displayName="Folder";const I1=bc;function Us(){return Us=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function F1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var xc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=A1(e,["color","size"]);return se.createElement("svg",Us({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"}))});xc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};xc.displayName="GitHub";const D1=xc;function Hs(){return Hs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function W1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var wc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=$1(e,["color","size"]);return se.createElement("svg",Hs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("circle",{cx:"12",cy:"12",r:"10"}),se.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),se.createElement("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))});wc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};wc.displayName="Info";const kc=wc;function Gs(){return Gs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function B1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var _c=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=V1(e,["color","size"]);return se.createElement("svg",Gs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("polygon",{points:"12 2 2 7 12 12 22 7 12 2"}),se.createElement("polyline",{points:"2 17 12 22 22 17"}),se.createElement("polyline",{points:"2 12 12 17 22 12"}))});_c.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};_c.displayName="Layers";const Y0=_c;function Ks(){return Ks=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function H1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var jc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=U1(e,["color","size"]);return se.createElement("svg",Ks({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("line",{x1:"12",y1:"2",x2:"12",y2:"6"}),se.createElement("line",{x1:"12",y1:"18",x2:"12",y2:"22"}),se.createElement("line",{x1:"4.93",y1:"4.93",x2:"7.76",y2:"7.76"}),se.createElement("line",{x1:"16.24",y1:"16.24",x2:"19.07",y2:"19.07"}),se.createElement("line",{x1:"2",y1:"12",x2:"6",y2:"12"}),se.createElement("line",{x1:"18",y1:"12",x2:"22",y2:"12"}),se.createElement("line",{x1:"4.93",y1:"19.07",x2:"7.76",y2:"16.24"}),se.createElement("line",{x1:"16.24",y1:"7.76",x2:"19.07",y2:"4.93"}))});jc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};jc.displayName="Loader";const G1=jc;function qs(){return qs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function q1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var Sc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=K1(e,["color","size"]);return se.createElement("svg",qs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("line",{x1:"16.5",y1:"9.4",x2:"7.5",y2:"4.21"}),se.createElement("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),se.createElement("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),se.createElement("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"}))});Sc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};Sc.displayName="Package";const Q1=Sc;function Qs(){return Qs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function X1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var Ec=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=Y1(e,["color","size"]);return se.createElement("svg",Qs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"}))});Ec.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};Ec.displayName="Star";const J1=Ec;function Ys(){return Ys=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eb(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var Cc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=Z1(e,["color","size"]);return se.createElement("svg",Ys({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("polyline",{points:"4 17 10 11 4 5"}),se.createElement("line",{x1:"12",y1:"19",x2:"20",y2:"19"}))});Cc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};Cc.displayName="Terminal";const X0=Cc;function Xs(){return Xs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nb(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var Oc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=tb(e,["color","size"]);return se.createElement("svg",Xs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("circle",{cx:"12",cy:"12",r:"10"}),se.createElement("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),se.createElement("line",{x1:"9",y1:"9",x2:"15",y2:"15"}))});Oc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};Oc.displayName="XCircle";const rb=Oc;function Js(){return Js=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ab(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var Nc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=ob(e,["color","size"]);return se.createElement("svg",Js({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),se.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});Nc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};Nc.displayName="X";const J0=Nc;function ib(){for(var e=0,t,n,r="";ee&&(t=0,r=n,n=new Map)}return{get:function(i){var l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set:function(i,l){n.has(i)?n.set(i,l):o(i,l)}}}var th="!";function pb(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(i){for(var l=[],s=0,u=0,f,d=0;du?f-u:void 0;return{modifiers:l,hasImportantModifier:j,baseClassName:S,maybePostfixModifierPosition:O}}}function hb(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var o=r[0]==="[";o?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function mb(e){return{cache:db(e.cacheSize),splitModifiers:pb(e),...lb(e)}}var vb=/\s+/;function gb(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,a=new Set;return e.trim().split(vb).map(function(i){var l=n(i),s=l.modifiers,u=l.hasImportantModifier,f=l.baseClassName,d=l.maybePostfixModifierPosition,p=r(d?f.substring(0,d):f),y=!!d;if(!p){if(!d)return{isTailwindClass:!1,originalClassName:i};if(p=r(f),!p)return{isTailwindClass:!1,originalClassName:i};y=!1}var j=hb(s).join(":"),S=u?j+th:j;return{isTailwindClass:!0,modifierId:S,classGroupId:p,originalClassName:i,hasPostfixModifier:y}}).reverse().filter(function(i){if(!i.isTailwindClass)return!0;var l=i.modifierId,s=i.classGroupId,u=i.hasPostfixModifier,f=l+s;return a.has(f)?!1:(a.add(f),o(s,u).forEach(function(d){return a.add(l+d)}),!0)}).reverse().map(function(i){return i.originalClassName}).join(" ")}function yb(){for(var e=arguments.length,t=new Array(e),n=0;nm.jsx("div",{className:so("flex flex-col justify-center items-center cursor-pointer p-6 dark:bg-gray-900/25 bg-gray-100/20 border border-gray-700/25 rounded-lg hover:border-gray-600/25 hover:bg-green-900/5 transition ease-in max-w-[200px] ",t),...n,children:e}),Mb=({dir:e,setDir:t,configMutate:n,loading:r,setLoading:o})=>{const[a,i]=ne.useState(!1);return m.jsxs("div",{className:"mt-10 w-full flex relative",children:[m.jsx("input",{type:"text",placeholder:"/users/username/projects",className:so("absolute w-full rounded-full h-14 border dark:border-blue-200/20 border-gray-200 bg-transparent pl-5 pr-10",a?"border-red-500 dark:border-red-500":""),onChange:l=>{const s=l.target.value;t(s),!/^\/(?:[\w.-]+\/)*[\w.-]+$/.test(s)&&s!==""?i(!0):i(!1)}}),m.jsx("button",{disabled:r||a,className:so("absolute right-2 top-2 bg-[#3eaf7c] hover:bg-[#3eaf7c]/75 ease-in-out py-3 px-4 rounded-full w-10 h-10 text-white outline-none focus:bg-green-500",r?"cursor-not-allowed":"",a?"bg-red-500 hover:bg-red-600 cursor-not-allowed":""),onClick:async()=>{o(!0),fetch("http://localhost:5500/server.php?action=setConfig",{method:"POST",body:JSON.stringify({data:{dir:e}})}).then(()=>{n()}).catch(l=>{console.log("An error occurred",l)}).finally(()=>{o(!1)})},children:r?m.jsx("div",{className:"animate-ping",children:"..."}):m.jsx(m.Fragment,{children:a?m.jsx(J0,{size:10}):m.jsx(Q0,{size:10})})})]})},cd=()=>{var u,f,d;const[,e]=un("screen"),[t,n]=ne.useState(""),[r,o]=ne.useState(!1),{data:a}=Oi("https://repo.packagist.org/p2/leafs/leaf.json"),{data:i,mutate:l}=Oi("http://localhost:5500/server.php?action=getConfig"),s=a==null?void 0:a.packages["leafs/leaf"];return m.jsxs(H0,{className:"flex flex-col justify-center items-center w-screen h-screen bg-white dark:bg-transparent",children:[m.jsxs("div",{className:"flex items-center mb-10",children:[m.jsx("img",{src:"https://leafphp.dev/logo-circle.png",className:"w-16 h-16 mr-4",alt:"logo"}),m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center",children:[m.jsx("h1",{className:"text-4xl font-bold dark:text-white text-gray-900",children:"Leaf CLI {ui}"}),m.jsx("span",{className:"bg-green-100 text-green-800 text-xs font-medium mr-2 mb-2 ml-1 px-2 py-0.5 rounded dark:bg-green-900 dark:text-green-300",children:"Beta"})]}),m.jsx("p",{className:"dark:text-gray-300 text-gray-600",children:"v0.0.2 - 4 Oct, 2023"})]})]}),(u=i==null?void 0:i.data)!=null&&u.dir?m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 justify-center gap-3",children:[m.jsxs(nt,{className:"text-gray-900 dark:text-white",children:[m.jsx(C1,{}),m.jsx("h6",{className:"mt-2 font-bold tracking-tight",children:(f=s==null?void 0:s[0])==null?void 0:f.version}),m.jsx("p",{className:"font-normal text-xs text-gray-500",children:"Latest Leaf Version"})]}),m.jsxs(nt,{className:"text-gray-900 dark:text-white",onClick:()=>e("Create"),children:[m.jsx(X0,{}),m.jsx("h6",{className:"mt-2 font-bold tracking-tight",children:"Create"}),m.jsx("p",{className:"font-normal text-xs text-gray-500",children:"Setup a new Leaf app"})]}),m.jsxs(nt,{className:"text-gray-900 dark:text-white bg-green-900/5 border-green-900/5",children:[m.jsx(Y0,{}),m.jsx("h6",{className:"mt-2 font-bold tracking-tight",children:"Apps"}),m.jsx("p",{className:"bg-green-100 text-green-800 text-xs font-medium mr-2 mb-2 ml-1 px-2 py-0.5 rounded dark:bg-green-900 dark:text-green-300",children:"Coming Soon"})]})]}):m.jsx("div",{className:"flex flex-col justify-center items-center",children:m.jsxs("div",{className:"text-gray-900 dark:text-white flex flex-col justify-center items-center my-10 max-w-[650px] px-10",children:[m.jsx("p",{className:"text-center",children:"We noticed this is your first time using the UI. To get started, you need to configure a directory where Leaf will save all of the projects you create using the UI. You can always update the folder you select."}),m.jsx(Mb,{dir:t,setDir:n,loading:r,setLoading:o,configMutate:l})]})}),((d=i==null?void 0:i.data)==null?void 0:d.dir)&&m.jsxs("div",{className:"flex gap-8 mt-16",children:[m.jsxs("a",{href:"https://github.com/leafsphp/cli",className:"flex items-center dark:text-gray-400 text-gray-600 hover:text-gray-300 transition-all ease-in-out",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(J1,{className:"mr-1",size:15})," Star on GitHub"]}),m.jsxs("a",{href:"http://github.com/leafsphp",className:"flex items-center dark:text-gray-400 text-gray-600 hover:text-gray-300 transition-all ease-in-out",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(D1,{className:"mr-1",size:15})," Leaf on GitHub"]}),m.jsxs("a",{href:"http://leafphp.dev",className:"flex items-center dark:text-gray-400 text-gray-600 hover:text-gray-300 transition-all ease-in-out",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(k1,{className:"mr-1",size:15})," Leaf Docs"]})]})]})},fd=({children:e,type:t})=>m.jsx("div",{className:"console-card px-4 py-1 border-b border-blue-200/10"+(t==="warn"?" bg-yellow-700/[0.5] text-amber-400":t==="error"?" bg-[#300f0f] text-[#f44336]":" text-blue-50"),children:e}),el=({children:e,className:t})=>{const[,n]=un("screen");return m.jsxs("div",{className:so("h-screen w-screen flex flex-col justify-start items-center overflow-x-hidden",t),children:[m.jsx(rb,{size:30,className:"fixed right-10 top-10 text-gray-700 dark:text-gray-200 cursor-pointer",onClick:()=>n("home")}),m.jsx(H0,{className:"w-full h-full pt-20 max-w-[650px]",children:e})]})},Tb=()=>{const[e,t]=un("data"),[n]=un("url"),{data:r,error:o}=Oi(`${n}/leafDevToolsEventHook`),a=e==null?void 0:e.console;ne.useEffect(()=>{r&&t(r)},[r,o]);const i=()=>{fetch(`${n}/leafDevToolsEventHook?action=clearLogs`).then(l=>{l.ok?t(l.json()):console.error("Could not clear console logs.")})};return m.jsxs(el,{children:[m.jsxs("div",{className:"px-5 lg:px-10",children:[m.jsxs("div",{className:"flex items-center",children:[m.jsx(X0,{size:32,className:"mr-3"}),m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"DevTools Console"}),m.jsxs("div",{className:"text-gray-400",children:[a==null?void 0:a.length," Server Log",(a==null?void 0:a.length)!==1&&"s"]})]})]}),m.jsxs("p",{className:"text-gray-300 text-xs flex items-center mt-5 bg-green-900/50 py-2 px-3 rounded-md",children:[m.jsx(kc,{size:12,className:"mr-1"})," The devtools console provides a simple way to log out data for quick and easy debugging, just as you would do with console.log in JavaScript."]})]}),m.jsxs("div",{className:"console-section mt-6 border-t border-blue-200/10",children:[m.jsx(fd,{type:"log",children:(a==null?void 0:a.length)>0?m.jsx("button",{onClick:i,className:"bg-black/25 hover:bg-black/40 py-2 px-4 rounded",children:"Clear Console"}):m.jsxs("div",{className:"flex flex-col justify-center items-center py-5",children:[m.jsx("div",{children:"There's no console data to show."}),m.jsx("div",{children:"You can log items out using the Leaf\\DevTools::console() method."}),m.jsx("pre",{className:"mt-4 text-left",lang:"php",children:m.jsx("code",{children:"Leaf\\DevTools::console('console.log this data');"})})]})}),a==null?void 0:a.map((l,s)=>m.jsx(fd,{type:l[0],children:typeof l[1]=="string"?l[1]:JSON.stringify(l[1])},s))]})]})},zb=({value:e,setValue:t,onSubmit:n,placeholder:r=""})=>{const[o,a]=ne.useState(!1),[i,l]=ne.useState(!1);return m.jsxs("div",{className:"mt-10 w-full flex relative",children:[m.jsx("input",{type:"text",value:e,placeholder:r,className:so("absolute w-full rounded-full h-14 border dark:border-blue-200/20 border-gray-200 bg-transparent pl-5 pr-10",i?"border-red-500 dark:border-red-500":""),onKeyDown:s=>{s.key==="Enter"&&n()},onChange:s=>{const u=s.target.value;t(u),l(u===""?"Please enter a value":!1)}}),m.jsx("button",{disabled:o||!!i,className:so("absolute right-2 top-2 bg-[#3eaf7c] hover:bg-[#3eaf7c]/75 ease-in-out py-3 px-4 rounded-full w-10 h-10 text-white outline-none focus:bg-green-500",o?"cursor-not-allowed":"",i?"bg-red-500 hover:bg-red-600 cursor-not-allowed":""),onClick:async()=>{a(!0);try{n()}finally{a(!1)}},children:o?m.jsx("div",{className:"animate-ping",children:"..."}):m.jsx(m.Fragment,{children:i?m.jsx(J0,{size:10}):m.jsx(Q0,{size:10})})})]})},Ib=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Create Application"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"What would you like to name your application?"})]})}),m.jsx("div",{className:"py-5 px-5 lg:px-10",children:m.jsx(zb,{value:(e==null?void 0:e.name)??"",setValue:r=>n({...e,name:r}),placeholder:"Application Name",onSubmit:()=>{t("type")}})})]}),oh=[{key:"leaf",icon:P1,name:"BASIC LEAF THEME",description:"A basic Leaf app with a single index.php file, the simplest and fastest way to get started with Leaf. You can further customize this theme to add some extra features."},{key:"mvc",icon:M1,name:"LEAF MVC THEME",description:"Leaf MVC is a simple MVC framework for Leaf. It provides a solid base for building complex web apps quickly. It is designed to be simple, lightweight and easy to learn."},{key:"api",icon:I1,name:"LEAF API THEME",description:"Leaf API is a simple MVC framework for Leaf specially crafted for building APIs. It provides a solid base for building complex APIs quickly."}],ah=[{key:"vite",icon:m.jsx("img",{src:"https://vitejs.dev/logo.svg",className:"w-5 h-5"}),name:"Leaf + Vite",description:"Bundle your app assets with Vite."},{key:"tailwind",icon:m.jsx("img",{src:"https://tailwindcss.com/_next/static/media/tailwindcss-mark.3c5441fc7a190fb1800d4a5c7f07ba4b1345a9c8.svg",className:"w-5 h-5"}),name:"Tailwind CSS",description:"Set up Tailwind in your Leaf app."}],ni=[{key:"none",icon:m.jsx("img",{src:"https://leafphp.dev/assets/leaf3-logo-circle.5b8e60e2.png",className:"w-5 h-5"}),name:"No Container",description:"Skip containerization. You can always add it later."},{key:"docker",icon:m.jsx("img",{src:"https://www.docker.com/wp-content/uploads/2023/04/cropped-Docker-favicon-192x192.png",className:"w-5 h-5"}),name:"Docker",description:"Create a Docker container for your app."}],ih=[{key:"none",icon:m.jsx("img",{src:"https://leafphp.dev/assets/leaf3-logo-circle.5b8e60e2.png",className:"w-5 h-5"}),name:"Use template engine",description:"Render UIs on the server using your selected templating engine"},{key:"react",icon:m.jsx("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0xMS41IC0xMC4yMzE3NCAyMyAyMC40NjM0OCI+CiAgPHRpdGxlPlJlYWN0IExvZ288L3RpdGxlPgogIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIyLjA1IiBmaWxsPSIjNjFkYWZiIi8+CiAgPGcgc3Ryb2tlPSIjNjFkYWZiIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIi8+CiAgICA8ZWxsaXBzZSByeD0iMTEiIHJ5PSI0LjIiIHRyYW5zZm9ybT0icm90YXRlKDYwKSIvPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIiB0cmFuc2Zvcm09InJvdGF0ZSgxMjApIi8+CiAgPC9nPgo8L3N2Zz4K",className:"w-5 h-5"}),name:"React JS",description:"The library for web and native user interfaces"},{key:"vue",icon:m.jsx("img",{src:"https://vuejs.org/logo.svg",className:"w-5 h-5"}),name:"Vue JS",description:"The Progressive JavaScript Framework"}],lh=[{key:"none",name:"None",description:"Add no extra modules to your app."},{key:"db",name:"Database",description:"Install Leaf DB in your app."},{key:"auth",name:"Authentication",description:"Install Leaf Auth in your app."},{key:"session",name:"Session",description:"Install Leaf Session in your app."},{key:"cookie",name:"Cookie",description:"Install Leaf Cookie in your app."},{key:"cors",name:"Cors",description:"Install Leaf Cors in your app."},{key:"date",name:"Date",description:"Install Leaf Date in your app."}],sh=[{key:"bare-ui",icon:m.jsx("img",{src:"https://leafphp.dev/assets/leaf3-logo-circle.5b8e60e2.png",className:"w-5 h-5"}),name:"Bare UI",description:"Barebones templating engine built for speed and efficiency."},{key:"blade",icon:m.jsx("img",{src:"https://laravel.com/img/logomark.min.svg",className:"w-5 h-5"}),name:"Laravel Blade",description:"Laravel's powerful and flexible templating engine."}],uh=[{key:"none",icon:m.jsx("img",{src:"https://leafphp.dev/assets/leaf3-logo-circle.5b8e60e2.png",className:"w-5 h-5"}),name:"No Tests",description:"Exclude testing from your app. You can always add it later."},{key:"pest",icon:m.jsx("img",{src:"https://pestphp.com/www/assets/logo.svg",className:"w-5 h-5"}),name:"Pest PHP",description:"The elegant PHP testing framework."},{key:"phpunit",icon:m.jsx("img",{src:"https://phpunit.de/img/phpunit.svg",className:"w-5 h-5"}),name:"PHPUnit",description:"The PHP Testing Framework."}],Ab=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Choose a starter kit"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"What kind of Leaf app do you want to create?"})]})}),m.jsx("div",{className:"console-section mt-6 py-5 px-5 lg:px-10",children:oh.map(({icon:r,key:o,name:a,description:i})=>m.jsxs(nt,{className:`w-100 max-w-none items-start mb-5 ${o===e.type?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{n({...e,type:o}),t(o==="api"?"testing":"templateEngine")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[m.jsx(r,{size:16})," ",a]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:i})]},o))})]}),Fb=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Choose a UI Engine"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"This is the engine that will be used to render your UI."})]})}),m.jsx("div",{className:"mt-6 py-2 px-5 lg:px-10",children:sh.map(({icon:r,key:o,name:a,description:i})=>m.jsxs(nt,{className:`w-100 max-w-none items-start mb-5 ${o===e.templateEngine?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{n({...e,templateEngine:o}),t("frontendFramework")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[r," ",a]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:i})]},o))})]}),Db=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Choose a Frontend Framework"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"Leaf will use this framework to render your UI."})]})}),m.jsx("div",{className:"mt-6 py-2 px-5 lg:px-10",children:ih.map(({icon:r,key:o,name:a,description:i})=>m.jsxs(nt,{className:`w-100 max-w-none items-start mb-5 ${o===e.frontendFramework?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{o!=="none"&&n({...e,frontendFramework:o}),t("additionalFrontendOptions")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[r," ",a]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:i})]},o))})]}),$b=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Choose Frontend Add-ons"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"Leaf will automatically install and configure selected packages"})]})}),m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[ah.filter(({key:r})=>e.type==="mvc"?r!=="vite":!0).map(({icon:r,key:o,name:a,description:i})=>{var l;return m.jsxs(nt,{className:`w-100 max-w-none items-start mb-5 ${(l=e.additionalFrontendOptions)!=null&&l.includes(o)?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{var s,u;(s=e.additionalFrontendOptions)!=null&&s.includes(o)?n({...e,additionalFrontendOptions:(u=e.additionalFrontendOptions)==null?void 0:u.filter(f=>f!==o)}):n({...e,additionalFrontendOptions:[...e.additionalFrontendOptions??[],o]})},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[r," ",a]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:i})]},o)}),m.jsx("button",{className:"mt-20 bg-green-800 px-5 py-2 rounded-md text-white",onClick:()=>t(e.type==="leaf"?"modules":"testing"),children:"Next"})]})]}),Wb=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Add leaf modules"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"Select modules to add to your leaf app"})]})}),m.jsx("div",{className:"mt-6 py-2 px-5 lg:px-10 grid grid-cols-1 md:grid-cols-2 gap-2",children:lh.map(({key:r,name:o,description:a})=>{var i;return m.jsxs(nt,{className:`w-100 max-w-none items-start ${(i=e.modules)!=null&&i.includes(r)?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{var l,s,u;r==="none"?n({...e,modules:["none"]}):(l=e.modules)!=null&&l.includes(r)?n({...e,modules:(s=e.modules)==null?void 0:s.filter(f=>f!==r&&f!=="none")}):n({...e,modules:[...((u=e.modules)==null?void 0:u.filter(f=>f!=="none"))??[],r]})},children:[m.jsx("h3",{className:"font-bold mb-1 flex items-center gap-1",children:o}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:a})]},r)})}),m.jsx("div",{className:"px-5 lg:px-10 mt-20",children:m.jsx("button",{className:"bg-green-800 px-5 py-2 rounded-md text-white",onClick:()=>t("testing"),children:"Next"})})]}),Vb=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Choose a Testing Framework"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"Leaf will use this framework to create and run tests"})]})}),m.jsx("div",{className:"mt-6 py-2 px-5 lg:px-10",children:uh.map(({icon:r,key:o,name:a,description:i})=>m.jsxs(nt,{className:`w-100 max-w-none items-start mb-5 ${o===e.frontendFramework?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{o!=="none"&&n({...e,testing:o}),t("docker")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[r," ",a]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:i})]},o))})]}),Bb=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Choose a Container Solution"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"This option allows you to containerize your app with"})]})}),m.jsx("div",{className:"mt-6 py-2 px-5 lg:px-10",children:ni.map(({icon:r,key:o,name:a,description:i})=>m.jsxs(nt,{className:`w-100 max-w-none items-start mb-5 ${o===e.frontendFramework?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{o==="docker"&&n({...e,docker:!0}),t("review")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[r," ",a]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:i})]},o))})]}),Ub=({values:e,navigate:t,setValues:n})=>{var p,y,j;const[r,o]=ne.useState(!1),[a,i]=ne.useState(!1),l=oh.find(S=>S.key===e.type),s=sh.find(S=>S.key===e.templateEngine),u=ih.find(S=>S.key===e.frontendFramework),f=uh.find(S=>S.key===e.testing),d=()=>{var O,w,v;o(!0);const S={...e,name:(O=e==null?void 0:e.name)==null?void 0:O.trim().replace(/\s+/g,"-").toLowerCase()};(S.frontendFramework||(w=S.additionalFrontendOptions)!=null&&w.includes("tailwind"))&&(S.additionalFrontendOptions=(v=S.additionalFrontendOptions)==null?void 0:v.filter(_=>_!=="vite")),fetch("http://localhost:5500/server.php?action=createApp",{method:"POST",body:JSON.stringify({data:JSON.stringify(S)})}).then(_=>{if(_.ok)return _.json()}).then(_=>{n({...e,..._==null?void 0:_.data}),i(!0)}).catch(_=>{console.log("An error occurred",_)}).finally(()=>{o(!1)})};return r?m.jsx(Hb,{}):a?m.jsx(Gb,{values:e,setValues:n,navigate:t}):m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Review your app config"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"Make sure everything looks good before creating your app."})]})}),m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Your application type"}),l&&m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("type")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[m.jsx(l.icon,{size:16})," ",l.name]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:l.description})]},l.key)]}),e.type!=="api"&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Your template engine"}),s&&m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("templateEngine")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[s.icon," ",s.name]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:s.description})]},s.key)]}),e.frontendFramework&&m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Your frontend framework"}),u&&m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("frontendFramework")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[u.icon," ",u.name]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:u.description})]},u.key)]}),(((p=e.additionalFrontendOptions)==null?void 0:p.length)??0)>0&&m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Additional Frontend Options"}),(y=e.additionalFrontendOptions)==null?void 0:y.map(S=>{const O=ah.find(w=>w.key===S);return O?m.jsxs(nt,{className:"w-100 max-w-none items-start mb-2",onClick:()=>{t("additionalFrontendOptions")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[O.icon," ",O.name]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:O.description})]},O.key):m.jsx(m.Fragment,{})})]}),e.type==="leaf"&&e.modules&&m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Selected Modules"}),(j=e.modules)==null?void 0:j.map(S=>{const O=lh.find(w=>w.key===S);return O?m.jsxs(nt,{className:"w-100 max-w-none items-start mb-2",onClick:()=>{t("modules")},children:[m.jsx("h3",{className:"font-bold mb-1 flex items-center gap-1",children:O.name}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:O.description})]},O.key):m.jsx(m.Fragment,{})})]})]}),e.testing&&m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Your testing framework"}),f?m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("testing")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[f.icon," ",f.name]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:f.description})]},f.key):m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("testing")},children:[m.jsx("h3",{className:"font-bold mb-1 flex items-center gap-1",children:"None"}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:"You can always add a testing framework later."})]},"none")]}),m.jsxs("div",{className:"mt-6 pt-2 pb-12 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Selected container solution"}),!e.docker&&m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("docker")},children:[m.jsx("h3",{className:"font-bold mb-1 flex items-center gap-1",children:"None"}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:"You can always add a container solution later."})]},"none"),ni==null?void 0:ni.filter(S=>S.key==="docker"&&e.docker).map(({icon:S,key:O,name:w,description:v})=>m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("docker")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[S," ",w]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:v})]},O))]}),m.jsx("div",{className:"px-5 lg:px-10 pb-10",children:m.jsx("button",{className:"bg-green-800 px-5 py-2 rounded-md text-white",onClick:d,children:"Create app"})})]})},Hb=()=>m.jsxs("div",{className:"px-5 lg:px-10 h-[80vh] flex flex-col justify-center items-center",children:[m.jsx("h2",{className:"mb-3 text-center text-2xl",children:"Creating your Leaf app"}),m.jsxs("div",{className:"flex text-4xl",children:[m.jsx("div",{className:"animate-bounce",children:"."}),m.jsx("div",{className:"animate-bounce [animation-delay:75ms]",children:"."}),m.jsx("div",{className:"animate-bounce",children:"."})]})]}),Gb=({values:e})=>{const[,t]=un("screen");return m.jsxs("div",{className:"px-5 lg:px-10 h-[80vh] flex flex-col justify-center items-center",children:[m.jsxs("div",{className:"mb-8 text-center ",children:[m.jsxs("h2",{className:"text-2xl",children:["Your ",e.type," app has been created!"]}),m.jsx("p",{className:"text-gray-500",children:"To get started, you can follow these steps:"})]}),m.jsxs("pre",{className:"flex flex-col gap-4 w-full bg-gray-100 rounded-lg p-5",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{children:"$"}),m.jsxs("div",{children:["cd"," ",e!=null&&e.directory?`${e==null?void 0:e.directory}/${e==null?void 0:e.name}`:e.name]})]}),!!(e!=null&&e.additionalFrontendOptions||e!=null&&e.frontendFramework)&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{children:"$"}),m.jsx("div",{children:"leaf view:dev"})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{children:"$"}),m.jsx("div",{children:"leaf serve"})]})]}),m.jsx("div",{className:"mt-8",children:m.jsx("button",{className:"bg-green-800 px-5 py-2 rounded-md text-white",onClick:()=>{t("home")},children:"Go Home"})})]})},Kb=()=>{const[e,t]=ne.useState("name"),[n,r]=ne.useState({name:""});return m.jsxs(el,{className:"bg-white dark:bg-transparent text-gray-900 dark:text-white",children:[e==="name"&&m.jsx(Ib,{values:n,setValues:r,navigate:t}),e==="type"&&m.jsx(Ab,{values:n,setValues:r,navigate:t}),e==="templateEngine"&&m.jsx(Fb,{values:n,setValues:r,navigate:t}),e==="frontendFramework"&&m.jsx(Db,{values:n,setValues:r,navigate:t}),e==="additionalFrontendOptions"&&m.jsx($b,{values:n,setValues:r,navigate:t}),e==="modules"&&m.jsx(Wb,{values:n,setValues:r,navigate:t}),e==="testing"&&m.jsx(Vb,{values:n,setValues:r,navigate:t}),e==="docker"&&m.jsx(Bb,{values:n,setValues:r,navigate:t}),e==="review"&&m.jsx(Ub,{values:n,setValues:r,navigate:t})]})};var ch={exports:{}};(function(e,t){(function(n,r){e.exports=r(ne)})(ue,function(n){return function(r){var o={};function a(i){if(o[i])return o[i].exports;var l=o[i]={i,l:!1,exports:{}};return r[i].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=r,a.c=o,a.d=function(i,l,s){a.o(i,l)||Object.defineProperty(i,l,{enumerable:!0,get:s})},a.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},a.t=function(i,l){if(1&l&&(i=a(i)),8&l||4&l&&typeof i=="object"&&i&&i.__esModule)return i;var s=Object.create(null);if(a.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:i}),2&l&&typeof i!="string")for(var u in i)a.d(s,u,function(f){return i[f]}.bind(null,u));return s},a.n=function(i){var l=i&&i.__esModule?function(){return i.default}:function(){return i};return a.d(l,"a",l),l},a.o=function(i,l){return Object.prototype.hasOwnProperty.call(i,l)},a.p="",a(a.s=48)}([function(r,o){r.exports=n},function(r,o){var a=r.exports={version:"2.6.12"};typeof __e=="number"&&(__e=a)},function(r,o,a){var i=a(26)("wks"),l=a(17),s=a(3).Symbol,u=typeof s=="function";(r.exports=function(f){return i[f]||(i[f]=u&&s[f]||(u?s:l)("Symbol."+f))}).store=i},function(r,o){var a=r.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=a)},function(r,o,a){r.exports=!a(8)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(r,o){var a={}.hasOwnProperty;r.exports=function(i,l){return a.call(i,l)}},function(r,o,a){var i=a(7),l=a(16);r.exports=a(4)?function(s,u,f){return i.f(s,u,l(1,f))}:function(s,u,f){return s[u]=f,s}},function(r,o,a){var i=a(10),l=a(35),s=a(23),u=Object.defineProperty;o.f=a(4)?Object.defineProperty:function(f,d,p){if(i(f),d=s(d,!0),i(p),l)try{return u(f,d,p)}catch{}if("get"in p||"set"in p)throw TypeError("Accessors not supported!");return"value"in p&&(f[d]=p.value),f}},function(r,o){r.exports=function(a){try{return!!a()}catch{return!0}}},function(r,o,a){var i=a(40),l=a(22);r.exports=function(s){return i(l(s))}},function(r,o,a){var i=a(11);r.exports=function(l){if(!i(l))throw TypeError(l+" is not an object!");return l}},function(r,o){r.exports=function(a){return typeof a=="object"?a!==null:typeof a=="function"}},function(r,o){r.exports={}},function(r,o,a){var i=a(39),l=a(27);r.exports=Object.keys||function(s){return i(s,l)}},function(r,o){r.exports=!0},function(r,o,a){var i=a(3),l=a(1),s=a(53),u=a(6),f=a(5),d=function(p,y,j){var S,O,w,v=p&d.F,_=p&d.G,c=p&d.S,M=p&d.P,z=p&d.B,A=p&d.W,V=_?l:l[y]||(l[y]={}),C=V.prototype,N=_?i:c?i[y]:(i[y]||{}).prototype;for(S in _&&(j=y),j)(O=!v&&N&&N[S]!==void 0)&&f(V,S)||(w=O?N[S]:j[S],V[S]=_&&typeof N[S]!="function"?j[S]:z&&O?s(w,i):A&&N[S]==w?function(U){var Q=function(L,oe,Z){if(this instanceof U){switch(arguments.length){case 0:return new U;case 1:return new U(L);case 2:return new U(L,oe)}return new U(L,oe,Z)}return U.apply(this,arguments)};return Q.prototype=U.prototype,Q}(w):M&&typeof w=="function"?s(Function.call,w):w,M&&((V.virtual||(V.virtual={}))[S]=w,p&d.R&&C&&!C[S]&&u(C,S,w)))};d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,r.exports=d},function(r,o){r.exports=function(a,i){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:i}}},function(r,o){var a=0,i=Math.random();r.exports=function(l){return"Symbol(".concat(l===void 0?"":l,")_",(++a+i).toString(36))}},function(r,o,a){var i=a(22);r.exports=function(l){return Object(i(l))}},function(r,o){o.f={}.propertyIsEnumerable},function(r,o,a){var i=a(52)(!0);a(34)(String,"String",function(l){this._t=String(l),this._i=0},function(){var l,s=this._t,u=this._i;return u>=s.length?{value:void 0,done:!0}:(l=i(s,u),this._i+=l.length,{value:l,done:!1})})},function(r,o){var a=Math.ceil,i=Math.floor;r.exports=function(l){return isNaN(l=+l)?0:(l>0?i:a)(l)}},function(r,o){r.exports=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a}},function(r,o,a){var i=a(11);r.exports=function(l,s){if(!i(l))return l;var u,f;if(s&&typeof(u=l.toString)=="function"&&!i(f=u.call(l))||typeof(u=l.valueOf)=="function"&&!i(f=u.call(l))||!s&&typeof(u=l.toString)=="function"&&!i(f=u.call(l)))return f;throw TypeError("Can't convert object to primitive value")}},function(r,o){var a={}.toString;r.exports=function(i){return a.call(i).slice(8,-1)}},function(r,o,a){var i=a(26)("keys"),l=a(17);r.exports=function(s){return i[s]||(i[s]=l(s))}},function(r,o,a){var i=a(1),l=a(3),s=l["__core-js_shared__"]||(l["__core-js_shared__"]={});(r.exports=function(u,f){return s[u]||(s[u]=f!==void 0?f:{})})("versions",[]).push({version:i.version,mode:a(14)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(r,o){r.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(r,o,a){var i=a(7).f,l=a(5),s=a(2)("toStringTag");r.exports=function(u,f,d){u&&!l(u=d?u:u.prototype,s)&&i(u,s,{configurable:!0,value:f})}},function(r,o,a){a(62);for(var i=a(3),l=a(6),s=a(12),u=a(2)("toStringTag"),f="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),d=0;ddocument.F=Object<\/script>"),p.close(),d=p.F;j--;)delete d.prototype[s[j]];return d()};r.exports=Object.create||function(p,y){var j;return p!==null?(f.prototype=i(p),j=new f,f.prototype=null,j[u]=p):j=d(),y===void 0?j:l(j,y)}},function(r,o,a){var i=a(5),l=a(9),s=a(57)(!1),u=a(25)("IE_PROTO");r.exports=function(f,d){var p,y=l(f),j=0,S=[];for(p in y)p!=u&&i(y,p)&&S.push(p);for(;d.length>j;)i(y,p=d[j++])&&(~s(S,p)||S.push(p));return S}},function(r,o,a){var i=a(24);r.exports=Object("z").propertyIsEnumerable(0)?Object:function(l){return i(l)=="String"?l.split(""):Object(l)}},function(r,o,a){var i=a(39),l=a(27).concat("length","prototype");o.f=Object.getOwnPropertyNames||function(s){return i(s,l)}},function(r,o,a){var i=a(24),l=a(2)("toStringTag"),s=i(function(){return arguments}())=="Arguments";r.exports=function(u){var f,d,p;return u===void 0?"Undefined":u===null?"Null":typeof(d=function(y,j){try{return y[j]}catch{}}(f=Object(u),l))=="string"?d:s?i(f):(p=i(f))=="Object"&&typeof f.callee=="function"?"Arguments":p}},function(r,o){var a;a=function(){return this}();try{a=a||new Function("return this")()}catch{typeof window=="object"&&(a=window)}r.exports=a},function(r,o){var a=/-?\d+(\.\d+)?%?/g;r.exports=function(i){return i.match(a)}},function(r,o,a){Object.defineProperty(o,"__esModule",{value:!0}),o.getBase16Theme=o.createStyling=o.invertTheme=void 0;var i=O(a(49)),l=O(a(76)),s=O(a(81)),u=O(a(89)),f=O(a(93)),d=function(C){if(C&&C.__esModule)return C;var N={};if(C!=null)for(var U in C)Object.prototype.hasOwnProperty.call(C,U)&&(N[U]=C[U]);return N.default=C,N}(a(94)),p=O(a(132)),y=O(a(133)),j=O(a(138)),S=a(139);function O(C){return C&&C.__esModule?C:{default:C}}var w=d.default,v=(0,u.default)(w),_=(0,j.default)(y.default,S.rgb2yuv,function(C){var N,U=(0,s.default)(C,3),Q=U[0],L=U[1],oe=U[2];return[(N=Q,N<.25?1:N<.5?.9-N:1.1-N),L,oe]},S.yuv2rgb,p.default),c=function(C){return function(N){return{className:[N.className,C.className].filter(Boolean).join(" "),style:(0,l.default)({},N.style||{},C.style||{})}}},M=function(C,N){var U=(0,u.default)(N);for(var Q in C)U.indexOf(Q)===-1&&U.push(Q);return U.reduce(function(L,oe){return L[oe]=function(Z,$){if(Z===void 0)return $;if($===void 0)return Z;var ee=Z===void 0?"undefined":(0,i.default)(Z),E=$===void 0?"undefined":(0,i.default)($);switch(ee){case"string":switch(E){case"string":return[$,Z].filter(Boolean).join(" ");case"object":return c({className:Z,style:$});case"function":return function(P){for(var T=arguments.length,q=Array(T>1?T-1:0),H=1;H1?T-1:0),H=1;H1?T-1:0),H=1;H1?T-1:0),H=1;H1?T-1:0),H=1;H2?U-2:0),L=2;L3?N-3:0),Q=3;Q1&&arguments[1]!==void 0?arguments[1]:{},oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Z=L.defaultBase16,$=Z===void 0?w:Z,ee=L.base16Themes,E=ee===void 0?null:ee,P=V(oe,E);P&&(oe=(0,l.default)({},P,oe));var T=v.reduce(function(ce,ye){return ce[ye]=oe[ye]||$[ye],ce},{}),q=(0,u.default)(oe).reduce(function(ce,ye){return v.indexOf(ye)===-1&&(ce[ye]=oe[ye]),ce},{}),H=C(T),re=M(q,H);return(0,f.default)(z,2).apply(void 0,[re].concat(U))},3),o.getBase16Theme=function(C,N){if(C&&C.extend&&(C=C.extend),typeof C=="string"){var U=C.split(":"),Q=(0,s.default)(U,2),L=Q[0],oe=Q[1];C=(N||{})[L]||d[L],oe==="inverted"&&(C=A(C))}return C&&C.hasOwnProperty("base00")?C:void 0})},function(r,o,a){var i,l=typeof Reflect=="object"?Reflect:null,s=l&&typeof l.apply=="function"?l.apply:function(c,M,z){return Function.prototype.apply.call(c,M,z)};i=l&&typeof l.ownKeys=="function"?l.ownKeys:Object.getOwnPropertySymbols?function(c){return Object.getOwnPropertyNames(c).concat(Object.getOwnPropertySymbols(c))}:function(c){return Object.getOwnPropertyNames(c)};var u=Number.isNaN||function(c){return c!=c};function f(){f.init.call(this)}r.exports=f,r.exports.once=function(c,M){return new Promise(function(z,A){function V(){C!==void 0&&c.removeListener("error",C),z([].slice.call(arguments))}var C;M!=="error"&&(C=function(N){c.removeListener(M,V),A(N)},c.once("error",C)),c.once(M,V)})},f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var d=10;function p(c){if(typeof c!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof c)}function y(c){return c._maxListeners===void 0?f.defaultMaxListeners:c._maxListeners}function j(c,M,z,A){var V,C,N,U;if(p(z),(C=c._events)===void 0?(C=c._events=Object.create(null),c._eventsCount=0):(C.newListener!==void 0&&(c.emit("newListener",M,z.listener?z.listener:z),C=c._events),N=C[M]),N===void 0)N=C[M]=z,++c._eventsCount;else if(typeof N=="function"?N=C[M]=A?[z,N]:[N,z]:A?N.unshift(z):N.push(z),(V=y(c))>0&&N.length>V&&!N.warned){N.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=c,Q.type=M,Q.count=N.length,U=Q,console&&console.warn&&console.warn(U)}return c}function S(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function O(c,M,z){var A={fired:!1,wrapFn:void 0,target:c,type:M,listener:z},V=S.bind(A);return V.listener=z,A.wrapFn=V,V}function w(c,M,z){var A=c._events;if(A===void 0)return[];var V=A[M];return V===void 0?[]:typeof V=="function"?z?[V.listener||V]:[V]:z?function(C){for(var N=new Array(C.length),U=0;U0&&(C=M[0]),C instanceof Error)throw C;var N=new Error("Unhandled error."+(C?" ("+C.message+")":""));throw N.context=C,N}var U=V[c];if(U===void 0)return!1;if(typeof U=="function")s(U,this,M);else{var Q=U.length,L=_(U,Q);for(z=0;z=0;C--)if(z[C]===M||z[C].listener===M){N=z[C].listener,V=C;break}if(V<0)return this;V===0?z.shift():function(U,Q){for(;Q+1=0;A--)this.removeListener(c,M[A]);return this},f.prototype.listeners=function(c){return w(this,c,!0)},f.prototype.rawListeners=function(c){return w(this,c,!1)},f.listenerCount=function(c,M){return typeof c.listenerCount=="function"?c.listenerCount(M):v.call(c,M)},f.prototype.listenerCount=v,f.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(r,o,a){r.exports.Dispatcher=a(140)},function(r,o,a){r.exports=a(142)},function(r,o,a){o.__esModule=!0;var i=u(a(50)),l=u(a(65)),s=typeof l.default=="function"&&typeof i.default=="symbol"?function(f){return typeof f}:function(f){return f&&typeof l.default=="function"&&f.constructor===l.default&&f!==l.default.prototype?"symbol":typeof f};function u(f){return f&&f.__esModule?f:{default:f}}o.default=typeof l.default=="function"&&s(i.default)==="symbol"?function(f){return f===void 0?"undefined":s(f)}:function(f){return f&&typeof l.default=="function"&&f.constructor===l.default&&f!==l.default.prototype?"symbol":f===void 0?"undefined":s(f)}},function(r,o,a){r.exports={default:a(51),__esModule:!0}},function(r,o,a){a(20),a(29),r.exports=a(30).f("iterator")},function(r,o,a){var i=a(21),l=a(22);r.exports=function(s){return function(u,f){var d,p,y=String(l(u)),j=i(f),S=y.length;return j<0||j>=S?s?"":void 0:(d=y.charCodeAt(j))<55296||d>56319||j+1===S||(p=y.charCodeAt(j+1))<56320||p>57343?s?y.charAt(j):d:s?y.slice(j,j+2):p-56320+(d-55296<<10)+65536}}},function(r,o,a){var i=a(54);r.exports=function(l,s,u){if(i(l),s===void 0)return l;switch(u){case 1:return function(f){return l.call(s,f)};case 2:return function(f,d){return l.call(s,f,d)};case 3:return function(f,d,p){return l.call(s,f,d,p)}}return function(){return l.apply(s,arguments)}}},function(r,o){r.exports=function(a){if(typeof a!="function")throw TypeError(a+" is not a function!");return a}},function(r,o,a){var i=a(38),l=a(16),s=a(28),u={};a(6)(u,a(2)("iterator"),function(){return this}),r.exports=function(f,d,p){f.prototype=i(u,{next:l(1,p)}),s(f,d+" Iterator")}},function(r,o,a){var i=a(7),l=a(10),s=a(13);r.exports=a(4)?Object.defineProperties:function(u,f){l(u);for(var d,p=s(f),y=p.length,j=0;y>j;)i.f(u,d=p[j++],f[d]);return u}},function(r,o,a){var i=a(9),l=a(58),s=a(59);r.exports=function(u){return function(f,d,p){var y,j=i(f),S=l(j.length),O=s(p,S);if(u&&d!=d){for(;S>O;)if((y=j[O++])!=y)return!0}else for(;S>O;O++)if((u||O in j)&&j[O]===d)return u||O||0;return!u&&-1}}},function(r,o,a){var i=a(21),l=Math.min;r.exports=function(s){return s>0?l(i(s),9007199254740991):0}},function(r,o,a){var i=a(21),l=Math.max,s=Math.min;r.exports=function(u,f){return(u=i(u))<0?l(u+f,0):s(u,f)}},function(r,o,a){var i=a(3).document;r.exports=i&&i.documentElement},function(r,o,a){var i=a(5),l=a(18),s=a(25)("IE_PROTO"),u=Object.prototype;r.exports=Object.getPrototypeOf||function(f){return f=l(f),i(f,s)?f[s]:typeof f.constructor=="function"&&f instanceof f.constructor?f.constructor.prototype:f instanceof Object?u:null}},function(r,o,a){var i=a(63),l=a(64),s=a(12),u=a(9);r.exports=a(34)(Array,"Array",function(f,d){this._t=u(f),this._i=0,this._k=d},function(){var f=this._t,d=this._k,p=this._i++;return!f||p>=f.length?(this._t=void 0,l(1)):l(0,d=="keys"?p:d=="values"?f[p]:[p,f[p]])},"values"),s.Arguments=s.Array,i("keys"),i("values"),i("entries")},function(r,o){r.exports=function(){}},function(r,o){r.exports=function(a,i){return{value:i,done:!!a}}},function(r,o,a){r.exports={default:a(66),__esModule:!0}},function(r,o,a){a(67),a(73),a(74),a(75),r.exports=a(1).Symbol},function(r,o,a){var i=a(3),l=a(5),s=a(4),u=a(15),f=a(37),d=a(68).KEY,p=a(8),y=a(26),j=a(28),S=a(17),O=a(2),w=a(30),v=a(31),_=a(69),c=a(70),M=a(10),z=a(11),A=a(18),V=a(9),C=a(23),N=a(16),U=a(38),Q=a(71),L=a(72),oe=a(32),Z=a(7),$=a(13),ee=L.f,E=Z.f,P=Q.f,T=i.Symbol,q=i.JSON,H=q&&q.stringify,re=O("_hidden"),ce=O("toPrimitive"),ye={}.propertyIsEnumerable,fe=y("symbol-registry"),pe=y("symbols"),ke=y("op-symbols"),_e=Object.prototype,Ve=typeof T=="function"&&!!oe.f,Se=i.QObject,Re=!Se||!Se.prototype||!Se.prototype.findChild,Ie=s&&p(function(){return U(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a!=7})?function(F,K,J){var ae=ee(_e,K);ae&&delete _e[K],E(F,K,J),ae&&F!==_e&&E(_e,K,ae)}:E,Ce=function(F){var K=pe[F]=U(T.prototype);return K._k=F,K},et=Ve&&typeof T.iterator=="symbol"?function(F){return typeof F=="symbol"}:function(F){return F instanceof T},mt=function(F,K,J){return F===_e&&mt(ke,K,J),M(F),K=C(K,!0),M(J),l(pe,K)?(J.enumerable?(l(F,re)&&F[re][K]&&(F[re][K]=!1),J=U(J,{enumerable:N(0,!1)})):(l(F,re)||E(F,re,N(1,{})),F[re][K]=!0),Ie(F,K,J)):E(F,K,J)},$e=function(F,K){M(F);for(var J,ae=_(K=V(K)),ve=0,he=ae.length;he>ve;)mt(F,J=ae[ve++],K[J]);return F},qe=function(F){var K=ye.call(this,F=C(F,!0));return!(this===_e&&l(pe,F)&&!l(ke,F))&&(!(K||!l(this,F)||!l(pe,F)||l(this,re)&&this[re][F])||K)},at=function(F,K){if(F=V(F),K=C(K,!0),F!==_e||!l(pe,K)||l(ke,K)){var J=ee(F,K);return!J||!l(pe,K)||l(F,re)&&F[re][K]||(J.enumerable=!0),J}},xn=function(F){for(var K,J=P(V(F)),ae=[],ve=0;J.length>ve;)l(pe,K=J[ve++])||K==re||K==d||ae.push(K);return ae},Ut=function(F){for(var K,J=F===_e,ae=P(J?ke:V(F)),ve=[],he=0;ae.length>he;)!l(pe,K=ae[he++])||J&&!l(_e,K)||ve.push(pe[K]);return ve};Ve||(f((T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var F=S(arguments.length>0?arguments[0]:void 0),K=function(J){this===_e&&K.call(ke,J),l(this,re)&&l(this[re],F)&&(this[re][F]=!1),Ie(this,F,N(1,J))};return s&&Re&&Ie(_e,F,{configurable:!0,set:K}),Ce(F)}).prototype,"toString",function(){return this._k}),L.f=at,Z.f=mt,a(41).f=Q.f=xn,a(19).f=qe,oe.f=Ut,s&&!a(14)&&f(_e,"propertyIsEnumerable",qe,!0),w.f=function(F){return Ce(O(F))}),u(u.G+u.W+u.F*!Ve,{Symbol:T});for(var kt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Oe=0;kt.length>Oe;)O(kt[Oe++]);for(var it=$(O.store),G=0;it.length>G;)v(it[G++]);u(u.S+u.F*!Ve,"Symbol",{for:function(F){return l(fe,F+="")?fe[F]:fe[F]=T(F)},keyFor:function(F){if(!et(F))throw TypeError(F+" is not a symbol!");for(var K in fe)if(fe[K]===F)return K},useSetter:function(){Re=!0},useSimple:function(){Re=!1}}),u(u.S+u.F*!Ve,"Object",{create:function(F,K){return K===void 0?U(F):$e(U(F),K)},defineProperty:mt,defineProperties:$e,getOwnPropertyDescriptor:at,getOwnPropertyNames:xn,getOwnPropertySymbols:Ut});var D=p(function(){oe.f(1)});u(u.S+u.F*D,"Object",{getOwnPropertySymbols:function(F){return oe.f(A(F))}}),q&&u(u.S+u.F*(!Ve||p(function(){var F=T();return H([F])!="[null]"||H({a:F})!="{}"||H(Object(F))!="{}"})),"JSON",{stringify:function(F){for(var K,J,ae=[F],ve=1;arguments.length>ve;)ae.push(arguments[ve++]);if(J=K=ae[1],(z(K)||F!==void 0)&&!et(F))return c(K)||(K=function(he,Le){if(typeof J=="function"&&(Le=J.call(this,he,Le)),!et(Le))return Le}),ae[1]=K,H.apply(q,ae)}}),T.prototype[ce]||a(6)(T.prototype,ce,T.prototype.valueOf),j(T,"Symbol"),j(Math,"Math",!0),j(i.JSON,"JSON",!0)},function(r,o,a){var i=a(17)("meta"),l=a(11),s=a(5),u=a(7).f,f=0,d=Object.isExtensible||function(){return!0},p=!a(8)(function(){return d(Object.preventExtensions({}))}),y=function(S){u(S,i,{value:{i:"O"+ ++f,w:{}}})},j=r.exports={KEY:i,NEED:!1,fastKey:function(S,O){if(!l(S))return typeof S=="symbol"?S:(typeof S=="string"?"S":"P")+S;if(!s(S,i)){if(!d(S))return"F";if(!O)return"E";y(S)}return S[i].i},getWeak:function(S,O){if(!s(S,i)){if(!d(S))return!0;if(!O)return!1;y(S)}return S[i].w},onFreeze:function(S){return p&&j.NEED&&d(S)&&!s(S,i)&&y(S),S}}},function(r,o,a){var i=a(13),l=a(32),s=a(19);r.exports=function(u){var f=i(u),d=l.f;if(d)for(var p,y=d(u),j=s.f,S=0;y.length>S;)j.call(u,p=y[S++])&&f.push(p);return f}},function(r,o,a){var i=a(24);r.exports=Array.isArray||function(l){return i(l)=="Array"}},function(r,o,a){var i=a(9),l=a(41).f,s={}.toString,u=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];r.exports.f=function(f){return u&&s.call(f)=="[object Window]"?function(d){try{return l(d)}catch{return u.slice()}}(f):l(i(f))}},function(r,o,a){var i=a(19),l=a(16),s=a(9),u=a(23),f=a(5),d=a(35),p=Object.getOwnPropertyDescriptor;o.f=a(4)?p:function(y,j){if(y=s(y),j=u(j,!0),d)try{return p(y,j)}catch{}if(f(y,j))return l(!i.f.call(y,j),y[j])}},function(r,o){},function(r,o,a){a(31)("asyncIterator")},function(r,o,a){a(31)("observable")},function(r,o,a){o.__esModule=!0;var i,l=a(77),s=(i=l)&&i.__esModule?i:{default:i};o.default=s.default||function(u){for(var f=1;fw;)for(var c,M=d(arguments[w++]),z=v?l(M).concat(v(M)):l(M),A=z.length,V=0;A>V;)c=z[V++],i&&!_.call(M,c)||(S[c]=M[c]);return S}:p},function(r,o,a){o.__esModule=!0;var i=s(a(82)),l=s(a(85));function s(u){return u&&u.__esModule?u:{default:u}}o.default=function(u,f){if(Array.isArray(u))return u;if((0,i.default)(Object(u)))return function(d,p){var y=[],j=!0,S=!1,O=void 0;try{for(var w,v=(0,l.default)(d);!(j=(w=v.next()).done)&&(y.push(w.value),!p||y.length!==p);j=!0);}catch(_){S=!0,O=_}finally{try{!j&&v.return&&v.return()}finally{if(S)throw O}}return y}(u,f);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(r,o,a){r.exports={default:a(83),__esModule:!0}},function(r,o,a){a(29),a(20),r.exports=a(84)},function(r,o,a){var i=a(42),l=a(2)("iterator"),s=a(12);r.exports=a(1).isIterable=function(u){var f=Object(u);return f[l]!==void 0||"@@iterator"in f||s.hasOwnProperty(i(f))}},function(r,o,a){r.exports={default:a(86),__esModule:!0}},function(r,o,a){a(29),a(20),r.exports=a(87)},function(r,o,a){var i=a(10),l=a(88);r.exports=a(1).getIterator=function(s){var u=l(s);if(typeof u!="function")throw TypeError(s+" is not iterable!");return i(u.call(s))}},function(r,o,a){var i=a(42),l=a(2)("iterator"),s=a(12);r.exports=a(1).getIteratorMethod=function(u){if(u!=null)return u[l]||u["@@iterator"]||s[i(u)]}},function(r,o,a){r.exports={default:a(90),__esModule:!0}},function(r,o,a){a(91),r.exports=a(1).Object.keys},function(r,o,a){var i=a(18),l=a(13);a(92)("keys",function(){return function(s){return l(i(s))}})},function(r,o,a){var i=a(15),l=a(1),s=a(8);r.exports=function(u,f){var d=(l.Object||{})[u]||Object[u],p={};p[u]=f(d),i(i.S+i.F*s(function(){d(1)}),"Object",p)}},function(r,o,a){(function(i){var l=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],s=/^\s+|\s+$/g,u=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,f=/\{\n\/\* \[wrapped with (.+)\] \*/,d=/,? & /,p=/^[-+]0x[0-9a-f]+$/i,y=/^0b[01]+$/i,j=/^\[object .+?Constructor\]$/,S=/^0o[0-7]+$/i,O=/^(?:0|[1-9]\d*)$/,w=parseInt,v=typeof i=="object"&&i&&i.Object===Object&&i,_=typeof self=="object"&&self&&self.Object===Object&&self,c=v||_||Function("return this")();function M(G,D,F){switch(F.length){case 0:return G.call(D);case 1:return G.call(D,F[0]);case 2:return G.call(D,F[0],F[1]);case 3:return G.call(D,F[0],F[1],F[2])}return G.apply(D,F)}function z(G,D){return!!(G&&G.length)&&function(F,K,J){if(K!=K)return function(he,Le,Ye,Be){for(var ct=he.length,Ue=Ye+(Be?1:-1);Be?Ue--:++Ue-1}function A(G){return G!=G}function V(G,D){for(var F=G.length,K=0;F--;)G[F]===D&&K++;return K}function C(G,D){for(var F=-1,K=G.length,J=0,ae=[];++F2?U:void 0);function ye(G){return kt(G)?q(G):{}}function fe(G){return!(!kt(G)||function(D){return!!$&&$ in D}(G))&&(function(D){var F=kt(D)?P.call(D):"";return F=="[object Function]"||F=="[object GeneratorFunction]"}(G)||function(D){var F=!1;if(D!=null&&typeof D.toString!="function")try{F=!!(D+"")}catch{}return F}(G)?T:j).test(function(D){if(D!=null){try{return ee.call(D)}catch{}try{return D+""}catch{}}return""}(G))}function pe(G,D,F,K){for(var J=-1,ae=G.length,ve=F.length,he=-1,Le=D.length,Ye=H(ae-ve,0),Be=Array(Le+Ye),ct=!K;++he1&&we.reverse(),Be&&Le1?"& ":"")+D[K],D=D.join(F>2?", ":" "),G.replace(u,`{ + */var lo=ne;function Py(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ry=typeof Object.is=="function"?Object.is:Py,Ly=lo.useState,My=lo.useEffect,Ty=lo.useLayoutEffect,zy=lo.useDebugValue;function Iy(e,t){var n=t(),r=Ly({inst:{value:n,getSnapshot:t}}),o=r[0].inst,a=r[1];return Ty(function(){o.value=n,o.getSnapshot=t,Tl(o)&&a({inst:o})},[e,n,t]),My(function(){return Tl(o)&&a({inst:o}),e(function(){Tl(o)&&a({inst:o})})},[e]),zy(n),n}function Tl(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ry(e,n)}catch{return!0}}function Ay(e,t){return t()}var Fy=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ay:Iy;T0.useSyncExternalStore=lo.useSyncExternalStore!==void 0?lo.useSyncExternalStore:Fy;M0.exports=T0;var Dy=M0.exports;const Sn=new WeakMap,zl={},Da={},Gn=()=>{},qt=Gn(),ei=Object,Ne=e=>e===qt,gn=e=>typeof e=="function",Mn=(e,t)=>({...e,...t}),cc="undefined",Zi=typeof window!=cc,Ls=typeof document!=cc,$y=()=>Zi&&typeof window.requestAnimationFrame!=cc,z0=(e,t)=>{const n=Sn.get(e);return[()=>!Ne(t)&&e.get(t)||zl,r=>{if(!Ne(t)){const o=e.get(t);t in Da||(Da[t]=o),n[5](t,Mn(o,r),o||zl)}},n[6],()=>!Ne(t)&&t in Da?Da[t]:!Ne(t)&&e.get(t)||zl]},$a=new WeakMap;let Wy=0;const ia=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,a;if(ei(e)===e&&!r&&n!=RegExp){if(o=$a.get(e),o)return o;if(o=++Wy+"~",$a.set(e,o),n==Array){for(o="@",a=0;aMs,[Ts,zs]=Zi&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Gn,Gn],By=()=>{const e=Ls&&document.visibilityState;return Ne(e)||e!=="hidden"},Uy=e=>(Ls&&document.addEventListener("visibilitychange",e),Ts("focus",e),()=>{Ls&&document.removeEventListener("visibilitychange",e),zs("focus",e)}),Hy=e=>{const t=()=>{Ms=!0,e()},n=()=>{Ms=!1};return Ts("online",t),Ts("offline",n),()=>{zs("online",t),zs("offline",n)}},Gy={isOnline:Vy,isVisible:By},Ky={initFocus:Uy,initReconnect:Hy},od=!se.useId,la=!Zi||"Deno"in window,qy=e=>$y()?window.requestAnimationFrame(e):setTimeout(e,1),ti=la?ne.useEffect:ne.useLayoutEffect,Il=typeof navigator<"u"&&navigator.connection,ad=!la&&Il&&(["slow-2g","2g"].includes(Il.effectiveType)||Il.saveData),fc=e=>{if(gn(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?ia(e):"",[e,t]};let Qy=0;const Is=()=>++Qy,I0=0,A0=1,F0=2,Yy=3;var Co={__proto__:null,ERROR_REVALIDATE_EVENT:Yy,FOCUS_EVENT:I0,MUTATE_EVENT:F0,RECONNECT_EVENT:A0};async function D0(...e){const[t,n,r,o]=e,a=Mn({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let i=a.populateCache;const l=a.rollbackOnError;let s=a.optimisticData;const u=a.revalidate!==!1,f=y=>typeof l=="function"?l(y):l!==!1,d=a.throwOnError;if(gn(n)){const y=n,j=[],S=t.keys();for(let O=S.next();!O.done;O=S.next()){const w=O.value;!/^\$(inf|sub)\$/.test(w)&&y(t.get(w)._k)&&j.push(w)}return Promise.all(j.map(p))}return p(n);async function p(y){const[j]=fc(y);if(!j)return;const[S,O]=z0(t,j),[w,v,_]=Sn.get(t),c=w[j],M=()=>u&&(delete _[j],c&&c[0])?c[0](F0).then(()=>S().data):S().data;if(e.length<3)return M();let z=r,A;const V=Is();v[j]=[V,0];const C=!Ne(s),N=S(),U=N.data,Q=N._c,L=Ne(Q)?U:Q;if(C&&(s=gn(s)?s(L):s,O({data:s,_c:L})),gn(z))try{z=z(L)}catch(Z){A=Z}if(z&&gn(z.then))if(z=await z.catch(Z=>{A=Z}),V!==v[j][0]){if(A)throw A;return z}else A&&C&&f(A)&&(i=!0,z=L,O({data:z,_c:qt}));i&&(A||(gn(i)&&(z=i(z,L)),O({data:z,_c:qt}))),v[j][1]=Is();const oe=await M();if(O({_c:qt}),A){if(d)throw A;return}return i?oe:z}}const id=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},$0=(e,t)=>{if(!Sn.has(e)){const n=Mn(Ky,t),r={},o=D0.bind(qt,e);let a=Gn;const i={},l=(f,d)=>{const p=i[f]||[];return i[f]=p,p.push(d),()=>p.splice(p.indexOf(d),1)},s=(f,d,p)=>{e.set(f,d);const y=i[f];if(y)for(const j of y)j(d,p)},u=()=>{if(!Sn.has(e)&&(Sn.set(e,[r,{},{},{},o,s,l]),!la)){const f=n.initFocus(setTimeout.bind(qt,id.bind(qt,r,I0))),d=n.initReconnect(setTimeout.bind(qt,id.bind(qt,r,A0)));a=()=>{f&&f(),d&&d(),Sn.delete(e)}}};return u(),[e,o,u,a]}return[e,Sn.get(e)[4]]},Xy=(e,t,n,r,o)=>{const a=n.errorRetryCount,i=o.retryCount,l=~~((Math.random()+.5)*(1<<(i<8?i:8)))*n.errorRetryInterval;!Ne(a)&&i>a||setTimeout(r,l,o)},Jy=(e,t)=>ia(e)==ia(t),[dc,Zy]=$0(new Map),W0=Mn({onLoadingSlow:Gn,onSuccess:Gn,onError:Gn,onErrorRetry:Xy,onDiscarded:Gn,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ad?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:ad?5e3:3e3,compare:Jy,isPaused:()=>!1,cache:dc,mutate:Zy,fallback:{}},Gy),V0=(e,t)=>{const n=Mn(e,t);if(t){const{use:r,fallback:o}=e,{use:a,fallback:i}=t;r&&a&&(n.use=r.concat(a)),o&&i&&(n.fallback=Mn(o,i))}return n},As=ne.createContext({}),e1=e=>{const{value:t}=e,n=ne.useContext(As),r=gn(t),o=ne.useMemo(()=>r?t(n):t,[r,n,t]),a=ne.useMemo(()=>r?o:V0(n,o),[r,n,o]),i=o&&o.provider,l=ne.useRef(qt);i&&!l.current&&(l.current=$0(i(a.cache||dc),o));const s=l.current;return s&&(a.cache=s[0],a.mutate=s[1]),ti(()=>{if(s)return s[2]&&s[2](),s[3]},[]),ne.createElement(As.Provider,Mn(e,{value:a}))},B0=Zi&&window.__SWR_DEVTOOLS_USE__,t1=B0?window.__SWR_DEVTOOLS_USE__:[],n1=()=>{B0&&(window.__SWR_DEVTOOLS_REACT__=se)},r1=e=>gn(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],o1=()=>Mn(W0,ne.useContext(As)),a1=e=>(t,n,r)=>e(t,n&&((...a)=>{const[i]=fc(t),[,,,l]=Sn.get(dc),s=l[i];return s?(delete l[i],s):n(...a)}),r),i1=t1.concat(a1),l1=e=>function(...n){const r=o1(),[o,a,i]=r1(n),l=V0(r,i);let s=e;const{use:u}=l,f=(u||[]).concat(i1);for(let d=f.length;d--;)s=f[d](s);return s(o,a||l.fetcher||null,l)},s1=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}};n1();const Al={dedupe:!0},u1=(e,t,n)=>{const{cache:r,compare:o,suspense:a,fallbackData:i,revalidateOnMount:l,revalidateIfStale:s,refreshInterval:u,refreshWhenHidden:f,refreshWhenOffline:d,keepPreviousData:p}=n,[y,j,S]=Sn.get(r),[O,w]=fc(e),v=ne.useRef(!1),_=ne.useRef(!1),c=ne.useRef(O),M=ne.useRef(t),z=ne.useRef(n),A=()=>z.current,V=()=>A().isVisible()&&A().isOnline(),[C,N,U,Q]=z0(r,O),L=ne.useRef({}).current,oe=Ne(i)?n.fallback[O]:i,Z=(Se,Re)=>{for(const Ie in L){const Ce=Ie;if(Ce==="data"){if(!o(Se[Ce],Re[Ce])&&(!Ne(Se[Ce])||!o(ce,Re[Ce])))return!1}else if(Re[Ce]!==Se[Ce])return!1}return!0},$=ne.useMemo(()=>{const Se=(()=>!O||!t?!1:Ne(l)?A().isPaused()||a?!1:Ne(s)?!0:s:l)(),Re=qe=>{const at=Mn(qe);return delete at._k,Se?{isValidating:!0,isLoading:!0,...at}:at},Ie=C(),Ce=Q(),et=Re(Ie),mt=Ie===Ce?et:Re(Ce);let $e=et;return[()=>{const qe=Re(C());return Z(qe,$e)?($e.data=qe.data,$e.isLoading=qe.isLoading,$e.isValidating=qe.isValidating,$e.error=qe.error,$e):($e=qe,qe)},()=>mt]},[r,O]),ee=Dy.useSyncExternalStore(ne.useCallback(Se=>U(O,(Re,Ie)=>{Z(Ie,Re)||Se()}),[r,O]),$[0],$[1]),E=!v.current,P=y[O]&&y[O].length>0,T=ee.data,q=Ne(T)?oe:T,H=ee.error,re=ne.useRef(q),ce=p?Ne(T)?re.current:T:q,ye=(()=>P&&!Ne(H)?!1:E&&!Ne(l)?l:A().isPaused()?!1:a?Ne(q)?!1:s:Ne(q)||s)(),fe=!!(O&&t&&E&&ye),pe=Ne(ee.isValidating)?fe:ee.isValidating,ke=Ne(ee.isLoading)?fe:ee.isLoading,_e=ne.useCallback(async Se=>{const Re=M.current;if(!O||!Re||_.current||A().isPaused())return!1;let Ie,Ce,et=!0;const mt=Se||{},$e=!S[O]||!mt.dedupe,qe=()=>od?!_.current&&O===c.current&&v.current:O===c.current,at={isValidating:!1,isLoading:!1},xn=()=>{N(at)},Ut=()=>{const Oe=S[O];Oe&&Oe[1]===Ce&&delete S[O]},kt={isValidating:!0};Ne(C().data)&&(kt.isLoading=!0);try{if($e&&(N(kt),n.loadingTimeout&&Ne(C().data)&&setTimeout(()=>{et&&qe()&&A().onLoadingSlow(O,n)},n.loadingTimeout),S[O]=[Re(w),Is()]),[Ie,Ce]=S[O],Ie=await Ie,$e&&setTimeout(Ut,n.dedupingInterval),!S[O]||S[O][1]!==Ce)return $e&&qe()&&A().onDiscarded(O),!1;at.error=qt;const Oe=j[O];if(!Ne(Oe)&&(Ce<=Oe[0]||Ce<=Oe[1]||Oe[1]===0))return xn(),$e&&qe()&&A().onDiscarded(O),!1;const it=C().data;at.data=o(it,Ie)?it:Ie,$e&&qe()&&A().onSuccess(Ie,O,n)}catch(Oe){Ut();const it=A(),{shouldRetryOnError:G}=it;it.isPaused()||(at.error=Oe,$e&&qe()&&(it.onError(Oe,O,it),(G===!0||gn(G)&&G(Oe))&&V()&&it.onErrorRetry(Oe,O,it,D=>{const F=y[O];F&&F[0]&&F[0](Co.ERROR_REVALIDATE_EVENT,D)},{retryCount:(mt.retryCount||0)+1,dedupe:!0})))}return et=!1,xn(),!0},[O,r]),Ve=ne.useCallback((...Se)=>D0(r,c.current,...Se),[]);if(ti(()=>{M.current=t,z.current=n,Ne(T)||(re.current=T)}),ti(()=>{if(!O)return;const Se=_e.bind(qt,Al);let Re=0;const Ce=s1(O,y,(et,mt={})=>{if(et==Co.FOCUS_EVENT){const $e=Date.now();A().revalidateOnFocus&&$e>Re&&V()&&(Re=$e+A().focusThrottleInterval,Se())}else if(et==Co.RECONNECT_EVENT)A().revalidateOnReconnect&&V()&&Se();else{if(et==Co.MUTATE_EVENT)return _e();if(et==Co.ERROR_REVALIDATE_EVENT)return _e(mt)}});return _.current=!1,c.current=O,v.current=!0,N({_k:w}),ye&&(Ne(q)||la?Se():qy(Se)),()=>{_.current=!0,Ce()}},[O]),ti(()=>{let Se;function Re(){const Ce=gn(u)?u(C().data):u;Ce&&Se!==-1&&(Se=setTimeout(Ie,Ce))}function Ie(){!C().error&&(f||A().isVisible())&&(d||A().isOnline())?_e(Al).then(Re):Re()}return Re(),()=>{Se&&(clearTimeout(Se),Se=-1)}},[u,f,d,O]),ne.useDebugValue(ce),a&&Ne(q)&&O)throw!od&&la?new Error("Fallback data is required when using suspense in SSR."):(M.current=t,z.current=n,_.current=!1,Ne(H)?_e(Al):H);return{mutate:Ve,get data(){return L.data=!0,ce},get error(){return L.error=!0,H},get isValidating(){return L.isValidating=!0,pe},get isLoading(){return L.isLoading=!0,ke}}},c1=ei.defineProperty(e1,"defaultValue",{value:W0}),Oi=l1(u1);var U0={},pc={},f1=ue&&ue.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),d1=ue&&ue.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),p1=ue&&ue.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&f1(t,e,n);return d1(t,e),t};Object.defineProperty(pc,"__esModule",{value:!0});var sr=p1(ne);function h1(e){var t=sr.useState(0),n=t[0],r=t[1],o=e.transitionDuration||400,a=e.delay||50,i=e.wrapperTag||"div",l=e.childTag||"div",s=typeof e.visible>"u"?!0:e.visible;return sr.useEffect(function(){var u=sr.default.Children.count(e.children);if(s||(u=0),u==n){var f=setTimeout(function(){e.onComplete&&e.onComplete()},o);return function(){return clearTimeout(f)}}var d=u>n?1:-1,p=setTimeout(function(){r(n+d)},a);return function(){return clearTimeout(p)}},[sr.default.Children.count(e.children),a,n,s,o]),sr.default.createElement(i,{className:e.className},sr.default.Children.map(e.children,function(u,f){return sr.default.createElement(l,{className:e.childClassName,style:{transition:"opacity "+o+"ms, transform "+o+"ms",transform:n>f?"none":"translateY(20px)",opacity:n>f?1:0}},u)}))}pc.default=h1;(function(e){var t=ue&&ue.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=pc;Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t(n).default}})})(U0);const H0=Ni(U0);var G0={exports:{}},m1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",v1=m1,g1=v1;function K0(){}function q0(){}q0.resetWarningCache=K0;var y1=function(){function e(r,o,a,i,l,s){if(s!==g1){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:q0,resetWarningCache:K0};return n.PropTypes=n,n};G0.exports=y1();var b1=G0.exports;const le=Ni(b1);function Fs(){return Fs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function w1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var hc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=x1(e,["color","size"]);return se.createElement("svg",Fs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"}),se.createElement("path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"}))});hc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};hc.displayName="BookOpen";const k1=hc;function Ds(){return Ds=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function j1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var mc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=_1(e,["color","size"]);return se.createElement("svg",Ds({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("polyline",{points:"20 6 9 17 4 12"}))});mc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};mc.displayName="Check";const Q0=mc;function $s(){return $s=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function E1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var vc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=S1(e,["color","size"]);return se.createElement("svg",$s({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("polyline",{points:"8 17 12 21 16 17"}),se.createElement("line",{x1:"12",y1:"12",x2:"12",y2:"21"}),se.createElement("path",{d:"M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"}))});vc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};vc.displayName="DownloadCloud";const C1=vc;function Ws(){return Ws=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function N1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var gc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=O1(e,["color","size"]);return se.createElement("svg",Ws({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),se.createElement("polyline",{points:"14 2 14 8 20 8"}),se.createElement("line",{x1:"9",y1:"15",x2:"15",y2:"15"}))});gc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};gc.displayName="FileMinus";const P1=gc;function Vs(){return Vs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function L1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var yc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=R1(e,["color","size"]);return se.createElement("svg",Vs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"}),se.createElement("line",{x1:"12",y1:"11",x2:"12",y2:"17"}),se.createElement("line",{x1:"9",y1:"14",x2:"15",y2:"14"}))});yc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};yc.displayName="FolderPlus";const M1=yc;function Bs(){return Bs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function z1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var bc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=T1(e,["color","size"]);return se.createElement("svg",Bs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"}))});bc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};bc.displayName="Folder";const I1=bc;function Us(){return Us=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function F1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var xc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=A1(e,["color","size"]);return se.createElement("svg",Us({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"}))});xc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};xc.displayName="GitHub";const D1=xc;function Hs(){return Hs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function W1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var wc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=$1(e,["color","size"]);return se.createElement("svg",Hs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("circle",{cx:"12",cy:"12",r:"10"}),se.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),se.createElement("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))});wc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};wc.displayName="Info";const kc=wc;function Gs(){return Gs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function B1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var _c=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=V1(e,["color","size"]);return se.createElement("svg",Gs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("polygon",{points:"12 2 2 7 12 12 22 7 12 2"}),se.createElement("polyline",{points:"2 17 12 22 22 17"}),se.createElement("polyline",{points:"2 12 12 17 22 12"}))});_c.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};_c.displayName="Layers";const Y0=_c;function Ks(){return Ks=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function H1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var jc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=U1(e,["color","size"]);return se.createElement("svg",Ks({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("line",{x1:"12",y1:"2",x2:"12",y2:"6"}),se.createElement("line",{x1:"12",y1:"18",x2:"12",y2:"22"}),se.createElement("line",{x1:"4.93",y1:"4.93",x2:"7.76",y2:"7.76"}),se.createElement("line",{x1:"16.24",y1:"16.24",x2:"19.07",y2:"19.07"}),se.createElement("line",{x1:"2",y1:"12",x2:"6",y2:"12"}),se.createElement("line",{x1:"18",y1:"12",x2:"22",y2:"12"}),se.createElement("line",{x1:"4.93",y1:"19.07",x2:"7.76",y2:"16.24"}),se.createElement("line",{x1:"16.24",y1:"7.76",x2:"19.07",y2:"4.93"}))});jc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};jc.displayName="Loader";const G1=jc;function qs(){return qs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function q1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var Sc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=K1(e,["color","size"]);return se.createElement("svg",qs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("line",{x1:"16.5",y1:"9.4",x2:"7.5",y2:"4.21"}),se.createElement("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),se.createElement("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),se.createElement("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"}))});Sc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};Sc.displayName="Package";const Q1=Sc;function Qs(){return Qs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function X1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var Ec=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=Y1(e,["color","size"]);return se.createElement("svg",Qs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"}))});Ec.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};Ec.displayName="Star";const J1=Ec;function Ys(){return Ys=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eb(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var Cc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=Z1(e,["color","size"]);return se.createElement("svg",Ys({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("polyline",{points:"4 17 10 11 4 5"}),se.createElement("line",{x1:"12",y1:"19",x2:"20",y2:"19"}))});Cc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};Cc.displayName="Terminal";const X0=Cc;function Xs(){return Xs=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nb(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var Oc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=tb(e,["color","size"]);return se.createElement("svg",Xs({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("circle",{cx:"12",cy:"12",r:"10"}),se.createElement("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),se.createElement("line",{x1:"9",y1:"9",x2:"15",y2:"15"}))});Oc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};Oc.displayName="XCircle";const rb=Oc;function Js(){return Js=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ab(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var Nc=ne.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,i=ob(e,["color","size"]);return se.createElement("svg",Js({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),se.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),se.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});Nc.propTypes={color:le.string,size:le.oneOfType([le.string,le.number])};Nc.displayName="X";const J0=Nc;function ib(){for(var e=0,t,n,r="";ee&&(t=0,r=n,n=new Map)}return{get:function(i){var l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set:function(i,l){n.has(i)?n.set(i,l):o(i,l)}}}var th="!";function pb(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(i){for(var l=[],s=0,u=0,f,d=0;du?f-u:void 0;return{modifiers:l,hasImportantModifier:j,baseClassName:S,maybePostfixModifierPosition:O}}}function hb(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var o=r[0]==="[";o?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function mb(e){return{cache:db(e.cacheSize),splitModifiers:pb(e),...lb(e)}}var vb=/\s+/;function gb(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,a=new Set;return e.trim().split(vb).map(function(i){var l=n(i),s=l.modifiers,u=l.hasImportantModifier,f=l.baseClassName,d=l.maybePostfixModifierPosition,p=r(d?f.substring(0,d):f),y=!!d;if(!p){if(!d)return{isTailwindClass:!1,originalClassName:i};if(p=r(f),!p)return{isTailwindClass:!1,originalClassName:i};y=!1}var j=hb(s).join(":"),S=u?j+th:j;return{isTailwindClass:!0,modifierId:S,classGroupId:p,originalClassName:i,hasPostfixModifier:y}}).reverse().filter(function(i){if(!i.isTailwindClass)return!0;var l=i.modifierId,s=i.classGroupId,u=i.hasPostfixModifier,f=l+s;return a.has(f)?!1:(a.add(f),o(s,u).forEach(function(d){return a.add(l+d)}),!0)}).reverse().map(function(i){return i.originalClassName}).join(" ")}function yb(){for(var e=arguments.length,t=new Array(e),n=0;nm.jsx("div",{className:so("flex flex-col justify-center items-center cursor-pointer p-6 dark:bg-gray-900/25 bg-gray-100/20 border border-gray-700/25 rounded-lg hover:border-gray-600/25 hover:bg-green-900/5 transition ease-in max-w-[200px] ",t),...n,children:e}),Mb=({dir:e,setDir:t,configMutate:n,loading:r,setLoading:o})=>{const[a,i]=ne.useState(!1);return m.jsxs("div",{className:"mt-10 w-full flex relative",children:[m.jsx("input",{type:"text",placeholder:"/users/username/projects",className:so("absolute w-full rounded-full h-14 border dark:border-blue-200/20 border-gray-200 bg-transparent pl-5 pr-10",a?"border-red-500 dark:border-red-500":""),onChange:l=>{const s=l.target.value;t(s),!/^\/(?:[\w.-]+\/)*[\w.-]+$/.test(s)&&s!==""?i(!0):i(!1)}}),m.jsx("button",{disabled:r||a,className:so("absolute right-2 top-2 bg-[#3eaf7c] hover:bg-[#3eaf7c]/75 ease-in-out py-3 px-4 rounded-full w-10 h-10 text-white outline-none focus:bg-green-500",r?"cursor-not-allowed":"",a?"bg-red-500 hover:bg-red-600 cursor-not-allowed":""),onClick:async()=>{o(!0),fetch("http://localhost:5500/server.php?action=setConfig",{method:"POST",body:JSON.stringify({data:{dir:e}})}).then(()=>{n()}).catch(l=>{console.log("An error occurred",l)}).finally(()=>{o(!1)})},children:r?m.jsx("div",{className:"animate-ping",children:"..."}):m.jsx(m.Fragment,{children:a?m.jsx(J0,{size:10}):m.jsx(Q0,{size:10})})})]})},cd=()=>{var u,f,d;const[,e]=un("screen"),[t,n]=ne.useState(""),[r,o]=ne.useState(!1),{data:a}=Oi("https://repo.packagist.org/p2/leafs/leaf.json"),{data:i,mutate:l}=Oi("http://localhost:5500/server.php?action=getConfig"),s=a==null?void 0:a.packages["leafs/leaf"];return m.jsxs(H0,{className:"flex flex-col justify-center items-center w-screen h-screen bg-white dark:bg-transparent",children:[m.jsxs("div",{className:"flex items-center mb-10",children:[m.jsx("img",{src:"https://leafphp.dev/logo-circle.png",className:"w-16 h-16 mr-4",alt:"logo"}),m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center",children:[m.jsx("h1",{className:"text-4xl font-bold dark:text-white text-gray-900",children:"Leaf CLI {ui}"}),m.jsx("span",{className:"bg-green-100 text-green-800 text-xs font-medium mr-2 mb-2 ml-1 px-2 py-0.5 rounded dark:bg-green-900 dark:text-green-300",children:"Beta"})]}),m.jsx("p",{className:"dark:text-gray-300 text-gray-600",children:"v0.0.3 - 4 Oct, 2023"})]})]}),(u=i==null?void 0:i.data)!=null&&u.dir?m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 justify-center gap-3",children:[m.jsxs(nt,{className:"text-gray-900 dark:text-white",children:[m.jsx(C1,{}),m.jsx("h6",{className:"mt-2 font-bold tracking-tight",children:(f=s==null?void 0:s[0])==null?void 0:f.version}),m.jsx("p",{className:"font-normal text-xs text-gray-500",children:"Latest Leaf Version"})]}),m.jsxs(nt,{className:"text-gray-900 dark:text-white",onClick:()=>e("Create"),children:[m.jsx(X0,{}),m.jsx("h6",{className:"mt-2 font-bold tracking-tight",children:"Create"}),m.jsx("p",{className:"font-normal text-xs text-gray-500",children:"Setup a new Leaf app"})]}),m.jsxs(nt,{className:"text-gray-900 dark:text-white bg-green-900/5 border-green-900/5",children:[m.jsx(Y0,{}),m.jsx("h6",{className:"mt-2 font-bold tracking-tight",children:"Apps"}),m.jsx("p",{className:"bg-green-100 text-green-800 text-xs font-medium mr-2 mb-2 ml-1 px-2 py-0.5 rounded dark:bg-green-900 dark:text-green-300",children:"Coming Soon"})]})]}):m.jsx("div",{className:"flex flex-col justify-center items-center",children:m.jsxs("div",{className:"text-gray-900 dark:text-white flex flex-col justify-center items-center my-10 max-w-[650px] px-10",children:[m.jsx("p",{className:"text-center",children:"We noticed this is your first time using the UI. To get started, you need to configure a directory where Leaf will save all of the projects you create using the UI. You can always update the folder you select."}),m.jsx(Mb,{dir:t,setDir:n,loading:r,setLoading:o,configMutate:l})]})}),((d=i==null?void 0:i.data)==null?void 0:d.dir)&&m.jsxs("div",{className:"flex gap-8 mt-16",children:[m.jsxs("a",{href:"https://github.com/leafsphp/cli",className:"flex items-center dark:text-gray-400 text-gray-600 hover:text-gray-300 transition-all ease-in-out",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(J1,{className:"mr-1",size:15})," Star on GitHub"]}),m.jsxs("a",{href:"http://github.com/leafsphp",className:"flex items-center dark:text-gray-400 text-gray-600 hover:text-gray-300 transition-all ease-in-out",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(D1,{className:"mr-1",size:15})," Leaf on GitHub"]}),m.jsxs("a",{href:"http://leafphp.dev",className:"flex items-center dark:text-gray-400 text-gray-600 hover:text-gray-300 transition-all ease-in-out",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(k1,{className:"mr-1",size:15})," Leaf Docs"]})]})]})},fd=({children:e,type:t})=>m.jsx("div",{className:"console-card px-4 py-1 border-b border-blue-200/10"+(t==="warn"?" bg-yellow-700/[0.5] text-amber-400":t==="error"?" bg-[#300f0f] text-[#f44336]":" text-blue-50"),children:e}),el=({children:e,className:t})=>{const[,n]=un("screen");return m.jsxs("div",{className:so("h-screen w-screen flex flex-col justify-start items-center overflow-x-hidden",t),children:[m.jsx(rb,{size:30,className:"fixed right-10 top-10 text-gray-700 dark:text-gray-200 cursor-pointer",onClick:()=>n("home")}),m.jsx(H0,{className:"w-full h-full pt-20 max-w-[650px]",children:e})]})},Tb=()=>{const[e,t]=un("data"),[n]=un("url"),{data:r,error:o}=Oi(`${n}/leafDevToolsEventHook`),a=e==null?void 0:e.console;ne.useEffect(()=>{r&&t(r)},[r,o]);const i=()=>{fetch(`${n}/leafDevToolsEventHook?action=clearLogs`).then(l=>{l.ok?t(l.json()):console.error("Could not clear console logs.")})};return m.jsxs(el,{children:[m.jsxs("div",{className:"px-5 lg:px-10",children:[m.jsxs("div",{className:"flex items-center",children:[m.jsx(X0,{size:32,className:"mr-3"}),m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"DevTools Console"}),m.jsxs("div",{className:"text-gray-400",children:[a==null?void 0:a.length," Server Log",(a==null?void 0:a.length)!==1&&"s"]})]})]}),m.jsxs("p",{className:"text-gray-300 text-xs flex items-center mt-5 bg-green-900/50 py-2 px-3 rounded-md",children:[m.jsx(kc,{size:12,className:"mr-1"})," The devtools console provides a simple way to log out data for quick and easy debugging, just as you would do with console.log in JavaScript."]})]}),m.jsxs("div",{className:"console-section mt-6 border-t border-blue-200/10",children:[m.jsx(fd,{type:"log",children:(a==null?void 0:a.length)>0?m.jsx("button",{onClick:i,className:"bg-black/25 hover:bg-black/40 py-2 px-4 rounded",children:"Clear Console"}):m.jsxs("div",{className:"flex flex-col justify-center items-center py-5",children:[m.jsx("div",{children:"There's no console data to show."}),m.jsx("div",{children:"You can log items out using the Leaf\\DevTools::console() method."}),m.jsx("pre",{className:"mt-4 text-left",lang:"php",children:m.jsx("code",{children:"Leaf\\DevTools::console('console.log this data');"})})]})}),a==null?void 0:a.map((l,s)=>m.jsx(fd,{type:l[0],children:typeof l[1]=="string"?l[1]:JSON.stringify(l[1])},s))]})]})},zb=({value:e,setValue:t,onSubmit:n,placeholder:r=""})=>{const[o,a]=ne.useState(!1),[i,l]=ne.useState(!1);return m.jsxs("div",{className:"mt-10 w-full flex relative",children:[m.jsx("input",{type:"text",value:e,placeholder:r,className:so("absolute w-full rounded-full h-14 border dark:border-blue-200/20 border-gray-200 bg-transparent pl-5 pr-10",i?"border-red-500 dark:border-red-500":""),onKeyDown:s=>{s.key==="Enter"&&n()},onChange:s=>{const u=s.target.value;t(u),l(u===""?"Please enter a value":!1)}}),m.jsx("button",{disabled:o||!!i,className:so("absolute right-2 top-2 bg-[#3eaf7c] hover:bg-[#3eaf7c]/75 ease-in-out py-3 px-4 rounded-full w-10 h-10 text-white outline-none focus:bg-green-500",o?"cursor-not-allowed":"",i?"bg-red-500 hover:bg-red-600 cursor-not-allowed":""),onClick:async()=>{a(!0);try{n()}finally{a(!1)}},children:o?m.jsx("div",{className:"animate-ping",children:"..."}):m.jsx(m.Fragment,{children:i?m.jsx(J0,{size:10}):m.jsx(Q0,{size:10})})})]})},Ib=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Create Application"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"What would you like to name your application?"})]})}),m.jsx("div",{className:"py-5 px-5 lg:px-10",children:m.jsx(zb,{value:(e==null?void 0:e.name)??"",setValue:r=>n({...e,name:r}),placeholder:"Application Name",onSubmit:()=>{t("type")}})})]}),oh=[{key:"leaf",icon:P1,name:"BASIC LEAF THEME",description:"A basic Leaf app with a single index.php file, the simplest and fastest way to get started with Leaf. You can further customize this theme to add some extra features."},{key:"mvc",icon:M1,name:"LEAF MVC THEME",description:"Leaf MVC is a simple MVC framework for Leaf. It provides a solid base for building complex web apps quickly. It is designed to be simple, lightweight and easy to learn."},{key:"api",icon:I1,name:"LEAF API THEME",description:"Leaf API is a simple MVC framework for Leaf specially crafted for building APIs. It provides a solid base for building complex APIs quickly."}],ah=[{key:"vite",icon:m.jsx("img",{src:"https://vitejs.dev/logo.svg",className:"w-5 h-5"}),name:"Leaf + Vite",description:"Bundle your app assets with Vite."},{key:"tailwind",icon:m.jsx("img",{src:"https://tailwindcss.com/_next/static/media/tailwindcss-mark.3c5441fc7a190fb1800d4a5c7f07ba4b1345a9c8.svg",className:"w-5 h-5"}),name:"Tailwind CSS",description:"Set up Tailwind in your Leaf app."}],ni=[{key:"none",icon:m.jsx("img",{src:"https://leafphp.dev/assets/leaf3-logo-circle.5b8e60e2.png",className:"w-5 h-5"}),name:"No Container",description:"Skip containerization. You can always add it later."},{key:"docker",icon:m.jsx("img",{src:"https://www.docker.com/wp-content/uploads/2023/04/cropped-Docker-favicon-192x192.png",className:"w-5 h-5"}),name:"Docker",description:"Create a Docker container for your app."}],ih=[{key:"none",icon:m.jsx("img",{src:"https://leafphp.dev/assets/leaf3-logo-circle.5b8e60e2.png",className:"w-5 h-5"}),name:"Use template engine",description:"Render UIs on the server using your selected templating engine"},{key:"react",icon:m.jsx("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0xMS41IC0xMC4yMzE3NCAyMyAyMC40NjM0OCI+CiAgPHRpdGxlPlJlYWN0IExvZ288L3RpdGxlPgogIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIyLjA1IiBmaWxsPSIjNjFkYWZiIi8+CiAgPGcgc3Ryb2tlPSIjNjFkYWZiIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIi8+CiAgICA8ZWxsaXBzZSByeD0iMTEiIHJ5PSI0LjIiIHRyYW5zZm9ybT0icm90YXRlKDYwKSIvPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIiB0cmFuc2Zvcm09InJvdGF0ZSgxMjApIi8+CiAgPC9nPgo8L3N2Zz4K",className:"w-5 h-5"}),name:"React JS",description:"The library for web and native user interfaces"},{key:"vue",icon:m.jsx("img",{src:"https://vuejs.org/logo.svg",className:"w-5 h-5"}),name:"Vue JS",description:"The Progressive JavaScript Framework"}],lh=[{key:"none",name:"None",description:"Add no extra modules to your app."},{key:"db",name:"Database",description:"Install Leaf DB in your app."},{key:"auth",name:"Authentication",description:"Install Leaf Auth in your app."},{key:"session",name:"Session",description:"Install Leaf Session in your app."},{key:"cookie",name:"Cookie",description:"Install Leaf Cookie in your app."},{key:"cors",name:"Cors",description:"Install Leaf Cors in your app."},{key:"date",name:"Date",description:"Install Leaf Date in your app."}],sh=[{key:"bare-ui",icon:m.jsx("img",{src:"https://leafphp.dev/assets/leaf3-logo-circle.5b8e60e2.png",className:"w-5 h-5"}),name:"Bare UI",description:"Barebones templating engine built for speed and efficiency."},{key:"blade",icon:m.jsx("img",{src:"https://laravel.com/img/logomark.min.svg",className:"w-5 h-5"}),name:"Laravel Blade",description:"Laravel's powerful and flexible templating engine."}],uh=[{key:"none",icon:m.jsx("img",{src:"https://leafphp.dev/assets/leaf3-logo-circle.5b8e60e2.png",className:"w-5 h-5"}),name:"No Tests",description:"Exclude testing from your app. You can always add it later."},{key:"pest",icon:m.jsx("img",{src:"https://pestphp.com/www/assets/logo.svg",className:"w-5 h-5"}),name:"Pest PHP",description:"The elegant PHP testing framework."},{key:"phpunit",icon:m.jsx("img",{src:"https://phpunit.de/img/phpunit.svg",className:"w-5 h-5"}),name:"PHPUnit",description:"The PHP Testing Framework."}],Ab=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Choose a starter kit"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"What kind of Leaf app do you want to create?"})]})}),m.jsx("div",{className:"console-section mt-6 py-5 px-5 lg:px-10",children:oh.map(({icon:r,key:o,name:a,description:i})=>m.jsxs(nt,{className:`w-100 max-w-none items-start mb-5 ${o===e.type?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{n({...e,type:o}),t(o==="api"?"testing":"templateEngine")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[m.jsx(r,{size:16})," ",a]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:i})]},o))})]}),Fb=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Choose a UI Engine"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"This is the engine that will be used to render your UI."})]})}),m.jsx("div",{className:"mt-6 py-2 px-5 lg:px-10",children:sh.map(({icon:r,key:o,name:a,description:i})=>m.jsxs(nt,{className:`w-100 max-w-none items-start mb-5 ${o===e.templateEngine?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{n({...e,templateEngine:o}),t("frontendFramework")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[r," ",a]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:i})]},o))})]}),Db=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Choose a Frontend Framework"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"Leaf will use this framework to render your UI."})]})}),m.jsx("div",{className:"mt-6 py-2 px-5 lg:px-10",children:ih.map(({icon:r,key:o,name:a,description:i})=>m.jsxs(nt,{className:`w-100 max-w-none items-start mb-5 ${o===e.frontendFramework?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{o!=="none"&&n({...e,frontendFramework:o}),t("additionalFrontendOptions")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[r," ",a]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:i})]},o))})]}),$b=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Choose Frontend Add-ons"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"Leaf will automatically install and configure selected packages"})]})}),m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[ah.filter(({key:r})=>e.type==="mvc"?r!=="vite":!0).map(({icon:r,key:o,name:a,description:i})=>{var l;return m.jsxs(nt,{className:`w-100 max-w-none items-start mb-5 ${(l=e.additionalFrontendOptions)!=null&&l.includes(o)?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{var s,u;(s=e.additionalFrontendOptions)!=null&&s.includes(o)?n({...e,additionalFrontendOptions:(u=e.additionalFrontendOptions)==null?void 0:u.filter(f=>f!==o)}):n({...e,additionalFrontendOptions:[...e.additionalFrontendOptions??[],o]})},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[r," ",a]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:i})]},o)}),m.jsx("button",{className:"mt-20 bg-green-800 px-5 py-2 rounded-md text-white",onClick:()=>t(e.type==="leaf"?"modules":"testing"),children:"Next"})]})]}),Wb=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Add leaf modules"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"Select modules to add to your leaf app"})]})}),m.jsx("div",{className:"mt-6 py-2 px-5 lg:px-10 grid grid-cols-1 md:grid-cols-2 gap-2",children:lh.map(({key:r,name:o,description:a})=>{var i;return m.jsxs(nt,{className:`w-100 max-w-none items-start ${(i=e.modules)!=null&&i.includes(r)?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{var l,s,u;r==="none"?n({...e,modules:["none"]}):(l=e.modules)!=null&&l.includes(r)?n({...e,modules:(s=e.modules)==null?void 0:s.filter(f=>f!==r&&f!=="none")}):n({...e,modules:[...((u=e.modules)==null?void 0:u.filter(f=>f!=="none"))??[],r]})},children:[m.jsx("h3",{className:"font-bold mb-1 flex items-center gap-1",children:o}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:a})]},r)})}),m.jsx("div",{className:"px-5 lg:px-10 mt-20",children:m.jsx("button",{className:"bg-green-800 px-5 py-2 rounded-md text-white",onClick:()=>t("testing"),children:"Next"})})]}),Vb=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Choose a Testing Framework"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"Leaf will use this framework to create and run tests"})]})}),m.jsx("div",{className:"mt-6 py-2 px-5 lg:px-10",children:uh.map(({icon:r,key:o,name:a,description:i})=>m.jsxs(nt,{className:`w-100 max-w-none items-start mb-5 ${o===e.frontendFramework?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{o!=="none"&&n({...e,testing:o}),t("docker")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[r," ",a]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:i})]},o))})]}),Bb=({values:e,navigate:t,setValues:n})=>m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Choose a Container Solution"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"This option allows you to containerize your app with"})]})}),m.jsx("div",{className:"mt-6 py-2 px-5 lg:px-10",children:ni.map(({icon:r,key:o,name:a,description:i})=>m.jsxs(nt,{className:`w-100 max-w-none items-start mb-5 ${o===e.frontendFramework?"border-green-600 dark:border-green-600 hover:border-green-600":""}`,onClick:()=>{o==="docker"&&n({...e,docker:!0}),t("review")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[r," ",a]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:i})]},o))})]}),Ub=({values:e,navigate:t,setValues:n})=>{var p,y,j;const[r,o]=ne.useState(!1),[a,i]=ne.useState(!1),l=oh.find(S=>S.key===e.type),s=sh.find(S=>S.key===e.templateEngine),u=ih.find(S=>S.key===e.frontendFramework),f=uh.find(S=>S.key===e.testing),d=()=>{var O,w,v;o(!0);const S={...e,name:(O=e==null?void 0:e.name)==null?void 0:O.trim().replace(/\s+/g,"-").toLowerCase()};(S.frontendFramework||(w=S.additionalFrontendOptions)!=null&&w.includes("tailwind"))&&(S.additionalFrontendOptions=(v=S.additionalFrontendOptions)==null?void 0:v.filter(_=>_!=="vite")),fetch("http://localhost:5500/server.php?action=createApp",{method:"POST",body:JSON.stringify({data:JSON.stringify(S)})}).then(_=>{if(_.ok)return _.json()}).then(_=>{n({...e,..._==null?void 0:_.data}),i(!0)}).catch(_=>{console.log("An error occurred",_)}).finally(()=>{o(!1)})};return r?m.jsx(Hb,{}):a?m.jsx(Gb,{values:e,setValues:n,navigate:t}):m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"px-5 lg:px-10",children:m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Review your app config"}),m.jsx("div",{className:"dark:text-gray-400 text-gray-600",children:"Make sure everything looks good before creating your app."})]})}),m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Your application type"}),l&&m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("type")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[m.jsx(l.icon,{size:16})," ",l.name]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:l.description})]},l.key)]}),e.type!=="api"&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Your template engine"}),s&&m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("templateEngine")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[s.icon," ",s.name]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:s.description})]},s.key)]}),e.frontendFramework&&m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Your frontend framework"}),u&&m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("frontendFramework")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[u.icon," ",u.name]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:u.description})]},u.key)]}),(((p=e.additionalFrontendOptions)==null?void 0:p.length)??0)>0&&m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Additional Frontend Options"}),(y=e.additionalFrontendOptions)==null?void 0:y.map(S=>{const O=ah.find(w=>w.key===S);return O?m.jsxs(nt,{className:"w-100 max-w-none items-start mb-2",onClick:()=>{t("additionalFrontendOptions")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[O.icon," ",O.name]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:O.description})]},O.key):m.jsx(m.Fragment,{})})]}),e.type==="leaf"&&e.modules&&m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Selected Modules"}),(j=e.modules)==null?void 0:j.map(S=>{const O=lh.find(w=>w.key===S);return O?m.jsxs(nt,{className:"w-100 max-w-none items-start mb-2",onClick:()=>{t("modules")},children:[m.jsx("h3",{className:"font-bold mb-1 flex items-center gap-1",children:O.name}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:O.description})]},O.key):m.jsx(m.Fragment,{})})]})]}),e.testing&&m.jsxs("div",{className:"mt-6 py-2 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Your testing framework"}),f?m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("testing")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[f.icon," ",f.name]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:f.description})]},f.key):m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("testing")},children:[m.jsx("h3",{className:"font-bold mb-1 flex items-center gap-1",children:"None"}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:"You can always add a testing framework later."})]},"none")]}),m.jsxs("div",{className:"mt-6 pt-2 pb-12 px-5 lg:px-10",children:[m.jsx("h2",{className:"font-bold mb-2",children:"Selected container solution"}),!e.docker&&m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("docker")},children:[m.jsx("h3",{className:"font-bold mb-1 flex items-center gap-1",children:"None"}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:"You can always add a container solution later."})]},"none"),ni==null?void 0:ni.filter(S=>S.key==="docker"&&e.docker).map(({icon:S,key:O,name:w,description:v})=>m.jsxs(nt,{className:"w-100 max-w-none items-start",onClick:()=>{t("docker")},children:[m.jsxs("h3",{className:"font-bold mb-1 flex items-center gap-1",children:[S," ",w]}),m.jsx("p",{className:"dark:text-gray-400 text-gray-600",children:v})]},O))]}),m.jsx("div",{className:"px-5 lg:px-10 pb-10",children:m.jsx("button",{className:"bg-green-800 px-5 py-2 rounded-md text-white",onClick:d,children:"Create app"})})]})},Hb=()=>m.jsxs("div",{className:"px-5 lg:px-10 h-[80vh] flex flex-col justify-center items-center",children:[m.jsx("h2",{className:"mb-3 text-center text-2xl",children:"Creating your Leaf app"}),m.jsxs("div",{className:"flex text-4xl",children:[m.jsx("div",{className:"animate-bounce",children:"."}),m.jsx("div",{className:"animate-bounce [animation-delay:75ms]",children:"."}),m.jsx("div",{className:"animate-bounce",children:"."})]})]}),Gb=({values:e})=>{const[,t]=un("screen");return m.jsxs("div",{className:"px-5 lg:px-10 h-[80vh] flex flex-col justify-center items-center",children:[m.jsxs("div",{className:"mb-8 text-center ",children:[m.jsxs("h2",{className:"text-2xl",children:["Your ",e.type," app has been created!"]}),m.jsx("p",{className:"text-gray-500",children:"To get started, you can follow these steps:"})]}),m.jsxs("pre",{className:"flex flex-col gap-4 w-full bg-gray-100 rounded-lg p-5",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{children:"$"}),m.jsxs("div",{children:["cd"," ",e!=null&&e.directory?`${e==null?void 0:e.directory}/${e==null?void 0:e.name}`:e.name]})]}),!!(e!=null&&e.additionalFrontendOptions||e!=null&&e.frontendFramework)&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{children:"$"}),m.jsx("div",{children:"leaf view:dev"})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{children:"$"}),m.jsx("div",{children:"leaf serve"})]})]}),m.jsx("div",{className:"mt-8",children:m.jsx("button",{className:"bg-green-800 px-5 py-2 rounded-md text-white",onClick:()=>{t("home")},children:"Go Home"})})]})},Kb=()=>{const[e,t]=ne.useState("name"),[n,r]=ne.useState({name:""});return m.jsxs(el,{className:"bg-white dark:bg-transparent text-gray-900 dark:text-white",children:[e==="name"&&m.jsx(Ib,{values:n,setValues:r,navigate:t}),e==="type"&&m.jsx(Ab,{values:n,setValues:r,navigate:t}),e==="templateEngine"&&m.jsx(Fb,{values:n,setValues:r,navigate:t}),e==="frontendFramework"&&m.jsx(Db,{values:n,setValues:r,navigate:t}),e==="additionalFrontendOptions"&&m.jsx($b,{values:n,setValues:r,navigate:t}),e==="modules"&&m.jsx(Wb,{values:n,setValues:r,navigate:t}),e==="testing"&&m.jsx(Vb,{values:n,setValues:r,navigate:t}),e==="docker"&&m.jsx(Bb,{values:n,setValues:r,navigate:t}),e==="review"&&m.jsx(Ub,{values:n,setValues:r,navigate:t})]})};var ch={exports:{}};(function(e,t){(function(n,r){e.exports=r(ne)})(ue,function(n){return function(r){var o={};function a(i){if(o[i])return o[i].exports;var l=o[i]={i,l:!1,exports:{}};return r[i].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=r,a.c=o,a.d=function(i,l,s){a.o(i,l)||Object.defineProperty(i,l,{enumerable:!0,get:s})},a.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},a.t=function(i,l){if(1&l&&(i=a(i)),8&l||4&l&&typeof i=="object"&&i&&i.__esModule)return i;var s=Object.create(null);if(a.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:i}),2&l&&typeof i!="string")for(var u in i)a.d(s,u,function(f){return i[f]}.bind(null,u));return s},a.n=function(i){var l=i&&i.__esModule?function(){return i.default}:function(){return i};return a.d(l,"a",l),l},a.o=function(i,l){return Object.prototype.hasOwnProperty.call(i,l)},a.p="",a(a.s=48)}([function(r,o){r.exports=n},function(r,o){var a=r.exports={version:"2.6.12"};typeof __e=="number"&&(__e=a)},function(r,o,a){var i=a(26)("wks"),l=a(17),s=a(3).Symbol,u=typeof s=="function";(r.exports=function(f){return i[f]||(i[f]=u&&s[f]||(u?s:l)("Symbol."+f))}).store=i},function(r,o){var a=r.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=a)},function(r,o,a){r.exports=!a(8)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(r,o){var a={}.hasOwnProperty;r.exports=function(i,l){return a.call(i,l)}},function(r,o,a){var i=a(7),l=a(16);r.exports=a(4)?function(s,u,f){return i.f(s,u,l(1,f))}:function(s,u,f){return s[u]=f,s}},function(r,o,a){var i=a(10),l=a(35),s=a(23),u=Object.defineProperty;o.f=a(4)?Object.defineProperty:function(f,d,p){if(i(f),d=s(d,!0),i(p),l)try{return u(f,d,p)}catch{}if("get"in p||"set"in p)throw TypeError("Accessors not supported!");return"value"in p&&(f[d]=p.value),f}},function(r,o){r.exports=function(a){try{return!!a()}catch{return!0}}},function(r,o,a){var i=a(40),l=a(22);r.exports=function(s){return i(l(s))}},function(r,o,a){var i=a(11);r.exports=function(l){if(!i(l))throw TypeError(l+" is not an object!");return l}},function(r,o){r.exports=function(a){return typeof a=="object"?a!==null:typeof a=="function"}},function(r,o){r.exports={}},function(r,o,a){var i=a(39),l=a(27);r.exports=Object.keys||function(s){return i(s,l)}},function(r,o){r.exports=!0},function(r,o,a){var i=a(3),l=a(1),s=a(53),u=a(6),f=a(5),d=function(p,y,j){var S,O,w,v=p&d.F,_=p&d.G,c=p&d.S,M=p&d.P,z=p&d.B,A=p&d.W,V=_?l:l[y]||(l[y]={}),C=V.prototype,N=_?i:c?i[y]:(i[y]||{}).prototype;for(S in _&&(j=y),j)(O=!v&&N&&N[S]!==void 0)&&f(V,S)||(w=O?N[S]:j[S],V[S]=_&&typeof N[S]!="function"?j[S]:z&&O?s(w,i):A&&N[S]==w?function(U){var Q=function(L,oe,Z){if(this instanceof U){switch(arguments.length){case 0:return new U;case 1:return new U(L);case 2:return new U(L,oe)}return new U(L,oe,Z)}return U.apply(this,arguments)};return Q.prototype=U.prototype,Q}(w):M&&typeof w=="function"?s(Function.call,w):w,M&&((V.virtual||(V.virtual={}))[S]=w,p&d.R&&C&&!C[S]&&u(C,S,w)))};d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,r.exports=d},function(r,o){r.exports=function(a,i){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:i}}},function(r,o){var a=0,i=Math.random();r.exports=function(l){return"Symbol(".concat(l===void 0?"":l,")_",(++a+i).toString(36))}},function(r,o,a){var i=a(22);r.exports=function(l){return Object(i(l))}},function(r,o){o.f={}.propertyIsEnumerable},function(r,o,a){var i=a(52)(!0);a(34)(String,"String",function(l){this._t=String(l),this._i=0},function(){var l,s=this._t,u=this._i;return u>=s.length?{value:void 0,done:!0}:(l=i(s,u),this._i+=l.length,{value:l,done:!1})})},function(r,o){var a=Math.ceil,i=Math.floor;r.exports=function(l){return isNaN(l=+l)?0:(l>0?i:a)(l)}},function(r,o){r.exports=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a}},function(r,o,a){var i=a(11);r.exports=function(l,s){if(!i(l))return l;var u,f;if(s&&typeof(u=l.toString)=="function"&&!i(f=u.call(l))||typeof(u=l.valueOf)=="function"&&!i(f=u.call(l))||!s&&typeof(u=l.toString)=="function"&&!i(f=u.call(l)))return f;throw TypeError("Can't convert object to primitive value")}},function(r,o){var a={}.toString;r.exports=function(i){return a.call(i).slice(8,-1)}},function(r,o,a){var i=a(26)("keys"),l=a(17);r.exports=function(s){return i[s]||(i[s]=l(s))}},function(r,o,a){var i=a(1),l=a(3),s=l["__core-js_shared__"]||(l["__core-js_shared__"]={});(r.exports=function(u,f){return s[u]||(s[u]=f!==void 0?f:{})})("versions",[]).push({version:i.version,mode:a(14)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(r,o){r.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(r,o,a){var i=a(7).f,l=a(5),s=a(2)("toStringTag");r.exports=function(u,f,d){u&&!l(u=d?u:u.prototype,s)&&i(u,s,{configurable:!0,value:f})}},function(r,o,a){a(62);for(var i=a(3),l=a(6),s=a(12),u=a(2)("toStringTag"),f="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),d=0;ddocument.F=Object<\/script>"),p.close(),d=p.F;j--;)delete d.prototype[s[j]];return d()};r.exports=Object.create||function(p,y){var j;return p!==null?(f.prototype=i(p),j=new f,f.prototype=null,j[u]=p):j=d(),y===void 0?j:l(j,y)}},function(r,o,a){var i=a(5),l=a(9),s=a(57)(!1),u=a(25)("IE_PROTO");r.exports=function(f,d){var p,y=l(f),j=0,S=[];for(p in y)p!=u&&i(y,p)&&S.push(p);for(;d.length>j;)i(y,p=d[j++])&&(~s(S,p)||S.push(p));return S}},function(r,o,a){var i=a(24);r.exports=Object("z").propertyIsEnumerable(0)?Object:function(l){return i(l)=="String"?l.split(""):Object(l)}},function(r,o,a){var i=a(39),l=a(27).concat("length","prototype");o.f=Object.getOwnPropertyNames||function(s){return i(s,l)}},function(r,o,a){var i=a(24),l=a(2)("toStringTag"),s=i(function(){return arguments}())=="Arguments";r.exports=function(u){var f,d,p;return u===void 0?"Undefined":u===null?"Null":typeof(d=function(y,j){try{return y[j]}catch{}}(f=Object(u),l))=="string"?d:s?i(f):(p=i(f))=="Object"&&typeof f.callee=="function"?"Arguments":p}},function(r,o){var a;a=function(){return this}();try{a=a||new Function("return this")()}catch{typeof window=="object"&&(a=window)}r.exports=a},function(r,o){var a=/-?\d+(\.\d+)?%?/g;r.exports=function(i){return i.match(a)}},function(r,o,a){Object.defineProperty(o,"__esModule",{value:!0}),o.getBase16Theme=o.createStyling=o.invertTheme=void 0;var i=O(a(49)),l=O(a(76)),s=O(a(81)),u=O(a(89)),f=O(a(93)),d=function(C){if(C&&C.__esModule)return C;var N={};if(C!=null)for(var U in C)Object.prototype.hasOwnProperty.call(C,U)&&(N[U]=C[U]);return N.default=C,N}(a(94)),p=O(a(132)),y=O(a(133)),j=O(a(138)),S=a(139);function O(C){return C&&C.__esModule?C:{default:C}}var w=d.default,v=(0,u.default)(w),_=(0,j.default)(y.default,S.rgb2yuv,function(C){var N,U=(0,s.default)(C,3),Q=U[0],L=U[1],oe=U[2];return[(N=Q,N<.25?1:N<.5?.9-N:1.1-N),L,oe]},S.yuv2rgb,p.default),c=function(C){return function(N){return{className:[N.className,C.className].filter(Boolean).join(" "),style:(0,l.default)({},N.style||{},C.style||{})}}},M=function(C,N){var U=(0,u.default)(N);for(var Q in C)U.indexOf(Q)===-1&&U.push(Q);return U.reduce(function(L,oe){return L[oe]=function(Z,$){if(Z===void 0)return $;if($===void 0)return Z;var ee=Z===void 0?"undefined":(0,i.default)(Z),E=$===void 0?"undefined":(0,i.default)($);switch(ee){case"string":switch(E){case"string":return[$,Z].filter(Boolean).join(" ");case"object":return c({className:Z,style:$});case"function":return function(P){for(var T=arguments.length,q=Array(T>1?T-1:0),H=1;H1?T-1:0),H=1;H1?T-1:0),H=1;H1?T-1:0),H=1;H1?T-1:0),H=1;H2?U-2:0),L=2;L3?N-3:0),Q=3;Q1&&arguments[1]!==void 0?arguments[1]:{},oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Z=L.defaultBase16,$=Z===void 0?w:Z,ee=L.base16Themes,E=ee===void 0?null:ee,P=V(oe,E);P&&(oe=(0,l.default)({},P,oe));var T=v.reduce(function(ce,ye){return ce[ye]=oe[ye]||$[ye],ce},{}),q=(0,u.default)(oe).reduce(function(ce,ye){return v.indexOf(ye)===-1&&(ce[ye]=oe[ye]),ce},{}),H=C(T),re=M(q,H);return(0,f.default)(z,2).apply(void 0,[re].concat(U))},3),o.getBase16Theme=function(C,N){if(C&&C.extend&&(C=C.extend),typeof C=="string"){var U=C.split(":"),Q=(0,s.default)(U,2),L=Q[0],oe=Q[1];C=(N||{})[L]||d[L],oe==="inverted"&&(C=A(C))}return C&&C.hasOwnProperty("base00")?C:void 0})},function(r,o,a){var i,l=typeof Reflect=="object"?Reflect:null,s=l&&typeof l.apply=="function"?l.apply:function(c,M,z){return Function.prototype.apply.call(c,M,z)};i=l&&typeof l.ownKeys=="function"?l.ownKeys:Object.getOwnPropertySymbols?function(c){return Object.getOwnPropertyNames(c).concat(Object.getOwnPropertySymbols(c))}:function(c){return Object.getOwnPropertyNames(c)};var u=Number.isNaN||function(c){return c!=c};function f(){f.init.call(this)}r.exports=f,r.exports.once=function(c,M){return new Promise(function(z,A){function V(){C!==void 0&&c.removeListener("error",C),z([].slice.call(arguments))}var C;M!=="error"&&(C=function(N){c.removeListener(M,V),A(N)},c.once("error",C)),c.once(M,V)})},f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var d=10;function p(c){if(typeof c!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof c)}function y(c){return c._maxListeners===void 0?f.defaultMaxListeners:c._maxListeners}function j(c,M,z,A){var V,C,N,U;if(p(z),(C=c._events)===void 0?(C=c._events=Object.create(null),c._eventsCount=0):(C.newListener!==void 0&&(c.emit("newListener",M,z.listener?z.listener:z),C=c._events),N=C[M]),N===void 0)N=C[M]=z,++c._eventsCount;else if(typeof N=="function"?N=C[M]=A?[z,N]:[N,z]:A?N.unshift(z):N.push(z),(V=y(c))>0&&N.length>V&&!N.warned){N.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=c,Q.type=M,Q.count=N.length,U=Q,console&&console.warn&&console.warn(U)}return c}function S(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function O(c,M,z){var A={fired:!1,wrapFn:void 0,target:c,type:M,listener:z},V=S.bind(A);return V.listener=z,A.wrapFn=V,V}function w(c,M,z){var A=c._events;if(A===void 0)return[];var V=A[M];return V===void 0?[]:typeof V=="function"?z?[V.listener||V]:[V]:z?function(C){for(var N=new Array(C.length),U=0;U0&&(C=M[0]),C instanceof Error)throw C;var N=new Error("Unhandled error."+(C?" ("+C.message+")":""));throw N.context=C,N}var U=V[c];if(U===void 0)return!1;if(typeof U=="function")s(U,this,M);else{var Q=U.length,L=_(U,Q);for(z=0;z=0;C--)if(z[C]===M||z[C].listener===M){N=z[C].listener,V=C;break}if(V<0)return this;V===0?z.shift():function(U,Q){for(;Q+1=0;A--)this.removeListener(c,M[A]);return this},f.prototype.listeners=function(c){return w(this,c,!0)},f.prototype.rawListeners=function(c){return w(this,c,!1)},f.listenerCount=function(c,M){return typeof c.listenerCount=="function"?c.listenerCount(M):v.call(c,M)},f.prototype.listenerCount=v,f.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(r,o,a){r.exports.Dispatcher=a(140)},function(r,o,a){r.exports=a(142)},function(r,o,a){o.__esModule=!0;var i=u(a(50)),l=u(a(65)),s=typeof l.default=="function"&&typeof i.default=="symbol"?function(f){return typeof f}:function(f){return f&&typeof l.default=="function"&&f.constructor===l.default&&f!==l.default.prototype?"symbol":typeof f};function u(f){return f&&f.__esModule?f:{default:f}}o.default=typeof l.default=="function"&&s(i.default)==="symbol"?function(f){return f===void 0?"undefined":s(f)}:function(f){return f&&typeof l.default=="function"&&f.constructor===l.default&&f!==l.default.prototype?"symbol":f===void 0?"undefined":s(f)}},function(r,o,a){r.exports={default:a(51),__esModule:!0}},function(r,o,a){a(20),a(29),r.exports=a(30).f("iterator")},function(r,o,a){var i=a(21),l=a(22);r.exports=function(s){return function(u,f){var d,p,y=String(l(u)),j=i(f),S=y.length;return j<0||j>=S?s?"":void 0:(d=y.charCodeAt(j))<55296||d>56319||j+1===S||(p=y.charCodeAt(j+1))<56320||p>57343?s?y.charAt(j):d:s?y.slice(j,j+2):p-56320+(d-55296<<10)+65536}}},function(r,o,a){var i=a(54);r.exports=function(l,s,u){if(i(l),s===void 0)return l;switch(u){case 1:return function(f){return l.call(s,f)};case 2:return function(f,d){return l.call(s,f,d)};case 3:return function(f,d,p){return l.call(s,f,d,p)}}return function(){return l.apply(s,arguments)}}},function(r,o){r.exports=function(a){if(typeof a!="function")throw TypeError(a+" is not a function!");return a}},function(r,o,a){var i=a(38),l=a(16),s=a(28),u={};a(6)(u,a(2)("iterator"),function(){return this}),r.exports=function(f,d,p){f.prototype=i(u,{next:l(1,p)}),s(f,d+" Iterator")}},function(r,o,a){var i=a(7),l=a(10),s=a(13);r.exports=a(4)?Object.defineProperties:function(u,f){l(u);for(var d,p=s(f),y=p.length,j=0;y>j;)i.f(u,d=p[j++],f[d]);return u}},function(r,o,a){var i=a(9),l=a(58),s=a(59);r.exports=function(u){return function(f,d,p){var y,j=i(f),S=l(j.length),O=s(p,S);if(u&&d!=d){for(;S>O;)if((y=j[O++])!=y)return!0}else for(;S>O;O++)if((u||O in j)&&j[O]===d)return u||O||0;return!u&&-1}}},function(r,o,a){var i=a(21),l=Math.min;r.exports=function(s){return s>0?l(i(s),9007199254740991):0}},function(r,o,a){var i=a(21),l=Math.max,s=Math.min;r.exports=function(u,f){return(u=i(u))<0?l(u+f,0):s(u,f)}},function(r,o,a){var i=a(3).document;r.exports=i&&i.documentElement},function(r,o,a){var i=a(5),l=a(18),s=a(25)("IE_PROTO"),u=Object.prototype;r.exports=Object.getPrototypeOf||function(f){return f=l(f),i(f,s)?f[s]:typeof f.constructor=="function"&&f instanceof f.constructor?f.constructor.prototype:f instanceof Object?u:null}},function(r,o,a){var i=a(63),l=a(64),s=a(12),u=a(9);r.exports=a(34)(Array,"Array",function(f,d){this._t=u(f),this._i=0,this._k=d},function(){var f=this._t,d=this._k,p=this._i++;return!f||p>=f.length?(this._t=void 0,l(1)):l(0,d=="keys"?p:d=="values"?f[p]:[p,f[p]])},"values"),s.Arguments=s.Array,i("keys"),i("values"),i("entries")},function(r,o){r.exports=function(){}},function(r,o){r.exports=function(a,i){return{value:i,done:!!a}}},function(r,o,a){r.exports={default:a(66),__esModule:!0}},function(r,o,a){a(67),a(73),a(74),a(75),r.exports=a(1).Symbol},function(r,o,a){var i=a(3),l=a(5),s=a(4),u=a(15),f=a(37),d=a(68).KEY,p=a(8),y=a(26),j=a(28),S=a(17),O=a(2),w=a(30),v=a(31),_=a(69),c=a(70),M=a(10),z=a(11),A=a(18),V=a(9),C=a(23),N=a(16),U=a(38),Q=a(71),L=a(72),oe=a(32),Z=a(7),$=a(13),ee=L.f,E=Z.f,P=Q.f,T=i.Symbol,q=i.JSON,H=q&&q.stringify,re=O("_hidden"),ce=O("toPrimitive"),ye={}.propertyIsEnumerable,fe=y("symbol-registry"),pe=y("symbols"),ke=y("op-symbols"),_e=Object.prototype,Ve=typeof T=="function"&&!!oe.f,Se=i.QObject,Re=!Se||!Se.prototype||!Se.prototype.findChild,Ie=s&&p(function(){return U(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a!=7})?function(F,K,J){var ae=ee(_e,K);ae&&delete _e[K],E(F,K,J),ae&&F!==_e&&E(_e,K,ae)}:E,Ce=function(F){var K=pe[F]=U(T.prototype);return K._k=F,K},et=Ve&&typeof T.iterator=="symbol"?function(F){return typeof F=="symbol"}:function(F){return F instanceof T},mt=function(F,K,J){return F===_e&&mt(ke,K,J),M(F),K=C(K,!0),M(J),l(pe,K)?(J.enumerable?(l(F,re)&&F[re][K]&&(F[re][K]=!1),J=U(J,{enumerable:N(0,!1)})):(l(F,re)||E(F,re,N(1,{})),F[re][K]=!0),Ie(F,K,J)):E(F,K,J)},$e=function(F,K){M(F);for(var J,ae=_(K=V(K)),ve=0,he=ae.length;he>ve;)mt(F,J=ae[ve++],K[J]);return F},qe=function(F){var K=ye.call(this,F=C(F,!0));return!(this===_e&&l(pe,F)&&!l(ke,F))&&(!(K||!l(this,F)||!l(pe,F)||l(this,re)&&this[re][F])||K)},at=function(F,K){if(F=V(F),K=C(K,!0),F!==_e||!l(pe,K)||l(ke,K)){var J=ee(F,K);return!J||!l(pe,K)||l(F,re)&&F[re][K]||(J.enumerable=!0),J}},xn=function(F){for(var K,J=P(V(F)),ae=[],ve=0;J.length>ve;)l(pe,K=J[ve++])||K==re||K==d||ae.push(K);return ae},Ut=function(F){for(var K,J=F===_e,ae=P(J?ke:V(F)),ve=[],he=0;ae.length>he;)!l(pe,K=ae[he++])||J&&!l(_e,K)||ve.push(pe[K]);return ve};Ve||(f((T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var F=S(arguments.length>0?arguments[0]:void 0),K=function(J){this===_e&&K.call(ke,J),l(this,re)&&l(this[re],F)&&(this[re][F]=!1),Ie(this,F,N(1,J))};return s&&Re&&Ie(_e,F,{configurable:!0,set:K}),Ce(F)}).prototype,"toString",function(){return this._k}),L.f=at,Z.f=mt,a(41).f=Q.f=xn,a(19).f=qe,oe.f=Ut,s&&!a(14)&&f(_e,"propertyIsEnumerable",qe,!0),w.f=function(F){return Ce(O(F))}),u(u.G+u.W+u.F*!Ve,{Symbol:T});for(var kt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Oe=0;kt.length>Oe;)O(kt[Oe++]);for(var it=$(O.store),G=0;it.length>G;)v(it[G++]);u(u.S+u.F*!Ve,"Symbol",{for:function(F){return l(fe,F+="")?fe[F]:fe[F]=T(F)},keyFor:function(F){if(!et(F))throw TypeError(F+" is not a symbol!");for(var K in fe)if(fe[K]===F)return K},useSetter:function(){Re=!0},useSimple:function(){Re=!1}}),u(u.S+u.F*!Ve,"Object",{create:function(F,K){return K===void 0?U(F):$e(U(F),K)},defineProperty:mt,defineProperties:$e,getOwnPropertyDescriptor:at,getOwnPropertyNames:xn,getOwnPropertySymbols:Ut});var D=p(function(){oe.f(1)});u(u.S+u.F*D,"Object",{getOwnPropertySymbols:function(F){return oe.f(A(F))}}),q&&u(u.S+u.F*(!Ve||p(function(){var F=T();return H([F])!="[null]"||H({a:F})!="{}"||H(Object(F))!="{}"})),"JSON",{stringify:function(F){for(var K,J,ae=[F],ve=1;arguments.length>ve;)ae.push(arguments[ve++]);if(J=K=ae[1],(z(K)||F!==void 0)&&!et(F))return c(K)||(K=function(he,Le){if(typeof J=="function"&&(Le=J.call(this,he,Le)),!et(Le))return Le}),ae[1]=K,H.apply(q,ae)}}),T.prototype[ce]||a(6)(T.prototype,ce,T.prototype.valueOf),j(T,"Symbol"),j(Math,"Math",!0),j(i.JSON,"JSON",!0)},function(r,o,a){var i=a(17)("meta"),l=a(11),s=a(5),u=a(7).f,f=0,d=Object.isExtensible||function(){return!0},p=!a(8)(function(){return d(Object.preventExtensions({}))}),y=function(S){u(S,i,{value:{i:"O"+ ++f,w:{}}})},j=r.exports={KEY:i,NEED:!1,fastKey:function(S,O){if(!l(S))return typeof S=="symbol"?S:(typeof S=="string"?"S":"P")+S;if(!s(S,i)){if(!d(S))return"F";if(!O)return"E";y(S)}return S[i].i},getWeak:function(S,O){if(!s(S,i)){if(!d(S))return!0;if(!O)return!1;y(S)}return S[i].w},onFreeze:function(S){return p&&j.NEED&&d(S)&&!s(S,i)&&y(S),S}}},function(r,o,a){var i=a(13),l=a(32),s=a(19);r.exports=function(u){var f=i(u),d=l.f;if(d)for(var p,y=d(u),j=s.f,S=0;y.length>S;)j.call(u,p=y[S++])&&f.push(p);return f}},function(r,o,a){var i=a(24);r.exports=Array.isArray||function(l){return i(l)=="Array"}},function(r,o,a){var i=a(9),l=a(41).f,s={}.toString,u=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];r.exports.f=function(f){return u&&s.call(f)=="[object Window]"?function(d){try{return l(d)}catch{return u.slice()}}(f):l(i(f))}},function(r,o,a){var i=a(19),l=a(16),s=a(9),u=a(23),f=a(5),d=a(35),p=Object.getOwnPropertyDescriptor;o.f=a(4)?p:function(y,j){if(y=s(y),j=u(j,!0),d)try{return p(y,j)}catch{}if(f(y,j))return l(!i.f.call(y,j),y[j])}},function(r,o){},function(r,o,a){a(31)("asyncIterator")},function(r,o,a){a(31)("observable")},function(r,o,a){o.__esModule=!0;var i,l=a(77),s=(i=l)&&i.__esModule?i:{default:i};o.default=s.default||function(u){for(var f=1;fw;)for(var c,M=d(arguments[w++]),z=v?l(M).concat(v(M)):l(M),A=z.length,V=0;A>V;)c=z[V++],i&&!_.call(M,c)||(S[c]=M[c]);return S}:p},function(r,o,a){o.__esModule=!0;var i=s(a(82)),l=s(a(85));function s(u){return u&&u.__esModule?u:{default:u}}o.default=function(u,f){if(Array.isArray(u))return u;if((0,i.default)(Object(u)))return function(d,p){var y=[],j=!0,S=!1,O=void 0;try{for(var w,v=(0,l.default)(d);!(j=(w=v.next()).done)&&(y.push(w.value),!p||y.length!==p);j=!0);}catch(_){S=!0,O=_}finally{try{!j&&v.return&&v.return()}finally{if(S)throw O}}return y}(u,f);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(r,o,a){r.exports={default:a(83),__esModule:!0}},function(r,o,a){a(29),a(20),r.exports=a(84)},function(r,o,a){var i=a(42),l=a(2)("iterator"),s=a(12);r.exports=a(1).isIterable=function(u){var f=Object(u);return f[l]!==void 0||"@@iterator"in f||s.hasOwnProperty(i(f))}},function(r,o,a){r.exports={default:a(86),__esModule:!0}},function(r,o,a){a(29),a(20),r.exports=a(87)},function(r,o,a){var i=a(10),l=a(88);r.exports=a(1).getIterator=function(s){var u=l(s);if(typeof u!="function")throw TypeError(s+" is not iterable!");return i(u.call(s))}},function(r,o,a){var i=a(42),l=a(2)("iterator"),s=a(12);r.exports=a(1).getIteratorMethod=function(u){if(u!=null)return u[l]||u["@@iterator"]||s[i(u)]}},function(r,o,a){r.exports={default:a(90),__esModule:!0}},function(r,o,a){a(91),r.exports=a(1).Object.keys},function(r,o,a){var i=a(18),l=a(13);a(92)("keys",function(){return function(s){return l(i(s))}})},function(r,o,a){var i=a(15),l=a(1),s=a(8);r.exports=function(u,f){var d=(l.Object||{})[u]||Object[u],p={};p[u]=f(d),i(i.S+i.F*s(function(){d(1)}),"Object",p)}},function(r,o,a){(function(i){var l=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],s=/^\s+|\s+$/g,u=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,f=/\{\n\/\* \[wrapped with (.+)\] \*/,d=/,? & /,p=/^[-+]0x[0-9a-f]+$/i,y=/^0b[01]+$/i,j=/^\[object .+?Constructor\]$/,S=/^0o[0-7]+$/i,O=/^(?:0|[1-9]\d*)$/,w=parseInt,v=typeof i=="object"&&i&&i.Object===Object&&i,_=typeof self=="object"&&self&&self.Object===Object&&self,c=v||_||Function("return this")();function M(G,D,F){switch(F.length){case 0:return G.call(D);case 1:return G.call(D,F[0]);case 2:return G.call(D,F[0],F[1]);case 3:return G.call(D,F[0],F[1],F[2])}return G.apply(D,F)}function z(G,D){return!!(G&&G.length)&&function(F,K,J){if(K!=K)return function(he,Le,Ye,Be){for(var ct=he.length,Ue=Ye+(Be?1:-1);Be?Ue--:++Ue-1}function A(G){return G!=G}function V(G,D){for(var F=G.length,K=0;F--;)G[F]===D&&K++;return K}function C(G,D){for(var F=-1,K=G.length,J=0,ae=[];++F2?U:void 0);function ye(G){return kt(G)?q(G):{}}function fe(G){return!(!kt(G)||function(D){return!!$&&$ in D}(G))&&(function(D){var F=kt(D)?P.call(D):"";return F=="[object Function]"||F=="[object GeneratorFunction]"}(G)||function(D){var F=!1;if(D!=null&&typeof D.toString!="function")try{F=!!(D+"")}catch{}return F}(G)?T:j).test(function(D){if(D!=null){try{return ee.call(D)}catch{}try{return D+""}catch{}}return""}(G))}function pe(G,D,F,K){for(var J=-1,ae=G.length,ve=F.length,he=-1,Le=D.length,Ye=H(ae-ve,0),Be=Array(Le+Ye),ct=!K;++he1&&we.reverse(),Be&&Le1?"& ":"")+D[K],D=D.join(F>2?", ":" "),G.replace(u,`{ /* [wrapped with `+D+`] */ `)}function $e(G,D){return!!(D=D??9007199254740991)&&(typeof G=="number"||O.test(G))&&G>-1&&G%1==0&&G1&&s--,f=6*s<1?i+6*(l-i)*s:2*s<1?l:3*s<2?i+(l-i)*(2/3-s)*6:i,u[j]=255*f;return u}},function(r,o,a){(function(i){var l=typeof i=="object"&&i&&i.Object===Object&&i,s=typeof self=="object"&&self&&self.Object===Object&&self,u=l||s||Function("return this")();function f(C,N,U){switch(U.length){case 0:return C.call(N);case 1:return C.call(N,U[0]);case 2:return C.call(N,U[0],U[1]);case 3:return C.call(N,U[0],U[1],U[2])}return C.apply(N,U)}function d(C,N){for(var U=-1,Q=N.length,L=C.length;++U-1&&L%1==0&&L<=9007199254740991}(Q.length)&&!function(L){var oe=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")}(L)?j.call(L):"";return oe=="[object Function]"||oe=="[object GeneratorFunction]"}(Q)}(U)}(N)&&y.call(N,"callee")&&(!O.call(N,"callee")||j.call(N)=="[object Arguments]")}(C)||!!(w&&C&&C[w])}var c=Array.isArray,M,z,A,V=(z=function(C){var N=(C=function Q(L,oe,Z,$,ee){var E=-1,P=L.length;for(Z||(Z=_),ee||(ee=[]);++E0&&Z(T)?oe>1?Q(T,oe-1,Z,$,ee):d(ee,T):$||(ee[ee.length]=T)}return ee}(C,1)).length,U=N;for(M;U--;)if(typeof C[U]!="function")throw new TypeError("Expected a function");return function(){for(var Q=0,L=N?C[Q].apply(this,arguments):arguments[0];++Q2?s-2:0),f=2;f"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var h,g=j(x);if(k){var b=j(this).constructor;h=Reflect.construct(g,arguments,b)}else h=g.apply(this,arguments);return w(this,h)}}a.r(o);var _=a(0),c=a.n(_);function M(){var x=this.constructor.getDerivedStateFromProps(this.props,this.state);x!=null&&this.setState(x)}function z(x){this.setState(function(k){var h=this.constructor.getDerivedStateFromProps(x,k);return h??null}.bind(this))}function A(x,k){try{var h=this.props,g=this.state;this.props=x,this.state=k,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(h,g)}finally{this.props=h,this.state=g}}function V(x){var k=x.prototype;if(!k||!k.isReactComponent)throw new Error("Can only polyfill class components");if(typeof x.getDerivedStateFromProps!="function"&&typeof k.getSnapshotBeforeUpdate!="function")return x;var h=null,g=null,b=null;if(typeof k.componentWillMount=="function"?h="componentWillMount":typeof k.UNSAFE_componentWillMount=="function"&&(h="UNSAFE_componentWillMount"),typeof k.componentWillReceiveProps=="function"?g="componentWillReceiveProps":typeof k.UNSAFE_componentWillReceiveProps=="function"&&(g="UNSAFE_componentWillReceiveProps"),typeof k.componentWillUpdate=="function"?b="componentWillUpdate":typeof k.UNSAFE_componentWillUpdate=="function"&&(b="UNSAFE_componentWillUpdate"),h!==null||g!==null||b!==null){var I=x.displayName||x.name,B=typeof x.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. diff --git a/src/ui/dist/server.php b/src/ui/dist/server.php index 5cd0e8b..4a0cc72 100644 --- a/src/ui/dist/server.php +++ b/src/ui/dist/server.php @@ -6,7 +6,7 @@ header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Headers: *'); -if (file_exists(dirname(__DIR__, 3) . '/autoload.php')) { +if (file_exists(dirname(__DIR__, 5) . '/autoload.php')) { require dirname(__DIR__, 5) . '/autoload.php'; } else { require dirname(__DIR__, 3) . '/vendor/autoload.php'; diff --git a/src/ui/src/pages/HomeScreen.tsx b/src/ui/src/pages/HomeScreen.tsx index 41a34c7..d14ed27 100644 --- a/src/ui/src/pages/HomeScreen.tsx +++ b/src/ui/src/pages/HomeScreen.tsx @@ -39,7 +39,7 @@ const HomeScreen = () => {

- v0.0.2 - 4 Oct, 2023 + v0.0.3 - 4 Oct, 2023