@emintech/core 0.8.5 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2GVRXCFU.js +1 -0
- package/dist/{chunk-4RDKXBJX.js → chunk-37TRFDA4.js} +1 -1
- package/dist/{chunk-PWQOU5TI.js → chunk-3MGLNOJ3.js} +1 -1
- package/dist/chunk-3QPHFHMI.js +1 -0
- package/dist/chunk-7UAWAQIK.js +1 -0
- package/dist/{chunk-REOTH2BZ.js → chunk-7VMEGPPO.js} +1 -1
- package/dist/{chunk-HO7QF2B5.js → chunk-B22UA2KA.js} +1 -1
- package/dist/chunk-EM2YQHLL.js +1 -0
- package/dist/chunk-FATDDXFE.js +1 -0
- package/dist/chunk-G4NK34VB.js +1 -0
- package/dist/{chunk-YMWCFYSC.js → chunk-H46XE7EE.js} +1 -1
- package/dist/{chunk-HRYICBPV.js → chunk-JN47FIUF.js} +1 -1
- package/dist/{chunk-TPYDXV4B.js → chunk-JW53YYMS.js} +1 -1
- package/dist/chunk-KTO3FKGZ.js +1 -0
- package/dist/chunk-L4TSYLY2.js +1 -0
- package/dist/{chunk-7IMZZ3VV.js → chunk-MFPLHKIJ.js} +1 -1
- package/dist/{chunk-P53KMAZ4.js → chunk-QEQYOW5R.js} +1 -1
- package/dist/chunk-QL2STABI.js +1 -0
- package/dist/chunk-R7O5BURF.js +1 -0
- package/dist/{chunk-O7HG7UWR.js → chunk-UUF3H3EU.js} +1 -1
- package/dist/{chunk-PZIHWOWA.js → chunk-WD7FUMEI.js} +1 -1
- package/dist/chunk-YU4IH7J6.js +1 -0
- package/dist/emincore.register.js +1 -1
- package/dist/features/account/change-password/components/PasswordForm.js +1 -1
- package/dist/features/account/change-password/index.js +1 -1
- package/dist/features/account/change-password/pages/index.js +1 -1
- package/dist/features/account/delete-account/components/DeleteAccountForm.js +1 -1
- package/dist/features/account/delete-account/index.js +1 -1
- package/dist/features/account/delete-account/pages/index.js +1 -1
- package/dist/features/account/index.js +1 -1
- package/dist/features/account/preferences/pages/index.js +1 -1
- package/dist/features/account/profile/components/Profile.js +1 -1
- package/dist/features/account/profile/components/ProfileForm.js +1 -1
- package/dist/features/account/profile/index.js +1 -1
- package/dist/features/account/profile/pages/EditProfilePage.js +1 -1
- package/dist/features/account/profile/pages/IndexProfilePage.js +1 -1
- package/dist/features/account/shared/components/MyAccountHeader.js +1 -1
- package/dist/features/account/shared/components/UserLabel.js +1 -1
- package/dist/features/account/shared/components/UserMenu.js +1 -1
- package/dist/features/account/shared/components/index.js +1 -1
- package/dist/features/account/shared/index.js +1 -1
- package/dist/features/account/shared/layouts/MyAccountLayout.js +1 -1
- package/dist/features/app/components/AppHeader.js +1 -1
- package/dist/features/app/components/AppLogo.js +1 -1
- package/dist/features/app/index.js +1 -1
- package/dist/features/app/layout/AppLayout.js +1 -1
- package/dist/features/appearance/components/AppearanceButton.js +1 -1
- package/dist/features/appearance/components/AppearanceDropdown.js +1 -1
- package/dist/features/appearance/components/AppearanceToggle.js +1 -1
- package/dist/features/appearance/hooks/use-appearance.js +1 -1
- package/dist/features/appearance/index.js +1 -1
- package/dist/features/appearance/lib/appearance-service.js +1 -1
- package/dist/features/auth/index.js +1 -1
- package/dist/features/auth/login/components/Login.js +1 -1
- package/dist/features/auth/login/hooks/use-login-form.js +1 -1
- package/dist/features/auth/login/index.js +1 -1
- package/dist/features/auth/password/confirmation/components/PasswordConfirmation.js +1 -1
- package/dist/features/auth/password/confirmation/index.js +1 -1
- package/dist/features/auth/password/forgot/components/PasswordForgot.js +1 -1
- package/dist/features/auth/password/forgot/index.js +1 -1
- package/dist/features/auth/password/index.js +1 -1
- package/dist/features/auth/password/reset/components/PasswordReset.js +1 -1
- package/dist/features/auth/password/reset/index.js +1 -1
- package/dist/features/auth/register/components/Register.js +1 -1
- package/dist/features/auth/register/index.js +1 -1
- package/dist/features/auth/shared/components/PasswordInput.js +1 -1
- package/dist/features/auth/shared/index.js +1 -1
- package/dist/features/auth/shared/layouts/AuthLayout.js +1 -1
- package/dist/features/auth/verify/email/components/EmailVerify.js +1 -1
- package/dist/features/auth/verify/email/index.js +1 -1
- package/dist/features/auth/verify/index.js +1 -1
- package/dist/features/dashboard/components/DashboardSidebar.js +1 -1
- package/dist/features/dashboard/components/DashboardTopbar.js +1 -1
- package/dist/features/dashboard/index.js +1 -1
- package/dist/features/dashboard/layouts/DashboardLayout.js +1 -1
- package/dist/features/emin-jobs/components/EminJobsComponents.js +1 -1
- package/dist/features/emin-jobs/hooks/use-emin-jobs.js +1 -1
- package/dist/features/emin-jobs/index.js +1 -1
- package/dist/features/marketplace/components/MarketplaceComponents.js +1 -1
- package/dist/features/marketplace/context/MarketplaceContext.js +1 -1
- package/dist/features/marketplace/index.js +1 -1
- package/dist/features/marketplace/pages/IndexMarketplacePage.js +1 -1
- package/dist/features/notifications/components/EminNotification.js +1 -1
- package/dist/features/notifications/context/NotificationsContext.js +1 -1
- package/dist/features/notifications/index.js +1 -1
- package/dist/features/notifications/pages/UserNotificationsPage.js +1 -1
- package/dist/features/package-manager/index.js +1 -1
- package/dist/features/package-manager/installer/index.js +1 -1
- package/dist/features/package-manager/installer/lib/installer-formatter.js +1 -1
- package/dist/features/package-manager/shared/api/package-manager.api.js +1 -1
- package/dist/features/package-manager/shared/components/PackageManagerModal.js +1 -1
- package/dist/features/package-manager/shared/context/PackageManagerContext.js +1 -1
- package/dist/features/package-manager/shared/index.js +1 -1
- package/dist/features/package-manager/shared/lib/package-manager-formatter.js +1 -1
- package/dist/features/package-manager/shared/lib/package-manager-services.js +1 -1
- package/dist/features/package-manager/updater/index.js +1 -1
- package/dist/features/package-manager/updater/lib/updater-formatter.js +1 -1
- package/dist/features/packages/components/Packages.js +1 -1
- package/dist/features/packages/components/PackagesTable.js +1 -1
- package/dist/features/packages/context/PackagesContext.js +1 -1
- package/dist/features/packages/index.js +1 -1
- package/dist/features/packages/lib/packages-formatter.js +1 -1
- package/dist/features/packages/pages/IndexPackagesPage.js +1 -1
- package/dist/features/platform/components/PlatformComponents.js +1 -1
- package/dist/features/platform/components/PlatformPageComponents.js +1 -1
- package/dist/features/platform/index.js +1 -1
- package/dist/features/platform/lib/platform-formatter.js +1 -1
- package/dist/features/platform/pages/IndexPlatformPage.js +1 -1
- package/dist/features/settings/api/settings.api.js +1 -1
- package/dist/features/settings/context/SettingsContext.js +1 -1
- package/dist/features/settings/index.js +1 -1
- package/dist/features/settings/layouts/SettingsLayout.js +1 -1
- package/dist/features/settings/lib/settings-formatter.js +1 -1
- package/dist/features/settings/pages/DesignSettingsPage.js +1 -1
- package/dist/features/settings/pages/GeneralSettingsPage.js +1 -1
- package/dist/features/settings/pages/MailSettingsPage.js +1 -1
- package/dist/features/settings/pages/NavPage.js +1 -1
- package/dist/features/slugs/components/slugs.js +1 -1
- package/dist/features/slugs/context/SlugsContext.js +1 -1
- package/dist/features/slugs/index.js +1 -1
- package/dist/features/users/components/UserModal.js +1 -1
- package/dist/features/users/components/UsersPage.js +1 -1
- package/dist/features/users/components/UsersStatistics.js +1 -1
- package/dist/features/users/components/UsersTable.js +1 -1
- package/dist/features/users/index.js +1 -1
- package/dist/features/users/lib/users-formatter.js +1 -1
- package/dist/features/users/widgets/UserStatisticsWidget.js +1 -1
- package/dist/features/widgets/components/WidgetMenu.js +1 -1
- package/dist/features/widgets/components/WidgetProfileMenu.js +1 -1
- package/dist/features/widgets/components/WidgetsComponents.d.ts +2 -1
- package/dist/features/widgets/components/WidgetsComponents.js +1 -1
- package/dist/features/widgets/components/WidgetsScreen.js +1 -1
- package/dist/features/widgets/index.js +1 -1
- package/dist/features/widgets/lib/widgets-utils.d.ts +3 -1
- package/dist/features/widgets/lib/widgets-utils.js +1 -1
- package/dist/features/widgets/types/widgets.types.d.ts +3 -2
- package/dist/integrations/emincore/page.registry.js +1 -1
- package/dist/integrations/emincore/provider.registry.js +1 -1
- package/dist/integrations/emincore/widget.registry.js +1 -1
- package/dist/pages/auth/login.js +1 -1
- package/dist/pages/auth/password-confirm.js +1 -1
- package/dist/pages/auth/password-forgot.js +1 -1
- package/dist/pages/auth/password-reset.js +1 -1
- package/dist/pages/auth/register.js +1 -1
- package/dist/pages/auth/verify-email.js +1 -1
- package/dist/pages/dashboard/index.js +1 -1
- package/dist/pages/dashboard/marketplace/index.js +1 -1
- package/dist/pages/dashboard/packages/index.js +1 -1
- package/dist/pages/dashboard/platform/index.js +1 -1
- package/dist/pages/dashboard/settings/index.js +1 -1
- package/dist/pages/dashboard/settings/slugs/index.js +1 -1
- package/dist/pages/dashboard/users/index.js +1 -1
- package/dist/pages/my-account/notifications/index.js +1 -1
- package/dist/pages/my-account/profile/edit-password.js +1 -1
- package/dist/pages/my-account/profile/edit.js +1 -1
- package/dist/pages/my-account/profile/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/registry/index.js +1 -1
- package/dist/registry/page-registry.d.ts +2 -2
- package/dist/registry/widget-registry.d.ts +7 -2
- package/dist/registry/widget-registry.js +1 -1
- package/dist/shared/components/composite/AlertModal.js +1 -1
- package/dist/shared/components/composite/EminEditable.js +1 -1
- package/dist/shared/components/composite/EminFormButton.js +1 -1
- package/dist/shared/components/composite/EminInput.js +1 -1
- package/dist/shared/components/composite/EminPreference.js +1 -1
- package/dist/shared/components/composite/EminPreloader.js +1 -1
- package/dist/shared/components/composite/Menu/EminMenu.js +1 -1
- package/dist/shared/components/composite/Menu/EminSidebarMenu.js +1 -1
- package/dist/shared/components/composite/Menu/index.js +1 -1
- package/dist/shared/components/composite/QuickMenu/QuickMenu.js +1 -1
- package/dist/shared/components/composite/QuickMenu/index.js +1 -1
- package/dist/shared/components/composite/RoleBadge.js +1 -1
- package/dist/shared/components/composite/SectionCard.js +1 -1
- package/dist/shared/components/composite/StatisticCards.js +1 -1
- package/dist/shared/components/composite/index.js +1 -1
- package/dist/shared/components/index.js +1 -1
- package/dist/shared/components/ui/avatar.js +1 -1
- package/dist/shared/components/ui/breadcrumbs.js +1 -1
- package/dist/shared/components/ui/chart.js +1 -1
- package/dist/shared/components/ui/sidebar.js +1 -1
- package/dist/shared/components/ui/slider.js +1 -1
- package/dist/shared/components/ui/team-switcher.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/modules/emin-table/components/EminTable.js +1 -1
- package/dist/shared/modules/emin-table/components/EminTableContent.js +1 -1
- package/dist/shared/modules/emin-table/components/EminTablePagination.js +1 -1
- package/dist/shared/modules/emin-table/components/EminTableToolbar.js +1 -1
- package/dist/shared/modules/emin-table/context/EminTableContext.js +1 -1
- package/dist/shared/modules/emin-table/index.js +1 -1
- package/dist/shared/modules/index.js +1 -1
- package/dist/shared/modules/world-map/components/WorldMap2D.js +1 -1
- package/dist/shared/modules/world-map/context/WorldMapContext.js +1 -1
- package/dist/shared/modules/world-map/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2QTWMGKG.js +0 -1
- package/dist/chunk-4O4DCA5C.js +0 -1
- package/dist/chunk-6CHLCSIV.js +0 -1
- package/dist/chunk-CG3NYMP4.js +0 -1
- package/dist/chunk-FFWOZWIY.js +0 -1
- package/dist/chunk-GMW5FHFT.js +0 -1
- package/dist/chunk-GSKQ3AUZ.js +0 -1
- package/dist/chunk-LI5U5EXU.js +0 -1
- package/dist/chunk-MIYCPZAM.js +0 -1
- package/dist/chunk-SRQYVMHH.js +0 -1
- package/dist/chunk-T2W4R2CY.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as No}from"./chunk-ZYAM2VUN.js";import{a as yo}from"./chunk-V2NMVGDZ.js";import{a as Co}from"./chunk-FLR2KO5I.js";import{a as ho,b as fr,c as vr}from"./chunk-UB5QQGPD.js";import{a as xo}from"./chunk-LMJAV6MI.js";import{a as mt}from"./chunk-E2ZUBHVJ.js";import{a as or,c as ar}from"./chunk-6POIVEDA.js";import{a as Gt,b as vo}from"./chunk-PZEX7JNQ.js";import{a as wo}from"./chunk-GVFPSY2S.js";import{b as Ja,c as er}from"./chunk-X2FAUFZV.js";import{a as Ga,b as Za}from"./chunk-U7CCM2TG.js";import{a as Da}from"./chunk-TGINGSSX.js";import{a as Ta}from"./chunk-7NKFSFMC.js";import{a as dr,b as pr,c as ur,e as Zt,f as gr,g as bo}from"./chunk-A6BBNBOV.js";import{a as Te}from"./chunk-OFK4F5KR.js";import{a as Ht,b as Ot}from"./chunk-OTBFBEQW.js";import{a as Sa,c as Ma,d as Pa,e as Ia,g as Ea}from"./chunk-WNFQKV4B.js";import{a as ma,b as da,i as pa,k as ua,l as ga,m as Bt,p as _t,q as Ct,r as Ze,v as mo,w as fa,x as po}from"./chunk-PWQOU5TI.js";import{a as sa,b as ia,c as la,d as ca}from"./chunk-2UOSQSPQ.js";import{a as ea}from"./chunk-CZM7FKLS.js";import{a as ta,b as oa,d as aa,e as ra,g as na}from"./chunk-AW6EOFKV.js";import{a as tr}from"./chunk-EEYT23VU.js";import{a as k}from"./chunk-DSY4KVMF.js";import{a as D}from"./chunk-QKGQOXDM.js";import{a as x}from"./chunk-XEBYLJU7.js";import{a as La,b as Ra,c as uo,e as Fa,f as Ba}from"./chunk-OTSYJWIO.js";import{a as zt}from"./chunk-M5QT5SFN.js";import{a as io,b as lo,c as co}from"./chunk-EV4GZ2HL.js";import{b as rr,c as nr,d as sr,e as ir,f as lr,h as cr,i as mr}from"./chunk-GBXDCZP6.js";import{a as Ne,b as dt,d as Ka,f as ye,g as Qa,h as $t,i as Xa,j as Ya}from"./chunk-QFUZ6MVT.js";import{a as Ie,c as Ee,d as De,e as _a,f as We,g as Ut,j as za,k as go}from"./chunk-AYYFGDAO.js";import{a as ja}from"./chunk-566X7DTI.js";import{a as va,b as ba,e as ha,f as xa,g as Na,h as ya,i as wa,j as Ca,k as ka}from"./chunk-S46ZLDUA.js";import{b as Ue}from"./chunk-YLI3WTOQ.js";import{a as Ha,b as Oa,c as Ua,e as Va,f as $a}from"./chunk-3H6NZAII.js";import{b as m}from"./chunk-TVCWAJFT.js";import{a as V,b as q,c as qe,d as Vt,e as Wa,f as K,g as qa}from"./chunk-3DBYUBWW.js";import{a as ie,b as Oe,c as le,d as ce}from"./chunk-PRCYNFKC.js";import{a as ge}from"./chunk-65LRDGYI.js";import{a as i}from"./chunk-G4EEZUTC.js";import{a as Aa}from"./chunk-SO7A4MJT.js";import{b as kt,c as fo}from"./chunk-ZYEQMWUG.js";import{a as g,b as xe,c as Jo,d as Pe,e as R}from"./chunk-GND5KQRZ.js";import{a as br}from"./chunk-P5HBVZKY.js";import{a as jo}from"./chunk-5RKCSYZG.js";import{useEffect as pl,useRef as ul}from"react";import{Link as yn,usePage as gl}from"@inertiajs/react";import{jsx as Ae,jsxs as Le}from"react/jsx-runtime";var hr=({icon:e=Ae(i,{iconName:"IconAlertCircleFilled",className:"opacity-80"}),title:t="Confirm",content:a="Are you sure?",onConfirm:o=()=>{},confirmText:n=Le("div",{className:"flex items-center gap-1",children:[Ae(i,{iconName:"IconCircleCheck"}),"Confirm"]}),onCancel:s=()=>{},cancelText:r=Le("div",{className:"flex items-center gap-1",children:[Ae(i,{iconName:"IconCircleX"}),"Cancel"]}),children:l})=>Le(va,{children:[Ae(ba,{asChild:!0,children:l}),Le(ha,{children:[Le("div",{className:"flex flex-col items-center gap-2",children:[Ae("div",{className:"flex size-auto p-2.5 shrink-0 items-center justify-center rounded-full border","aria-hidden":"true",children:e}),Le(xa,{children:[Ae(ya,{className:"text-center",children:t}),Ae(wa,{children:a})]})]}),Le(Na,{children:[Le(ka,{className:"flex-1",onClick:s,children:[typeof r=="string"&&Ae(i,{iconName:"IconX"}),r]}),Le(Ca,{className:"flex-1",onClick:o,children:[typeof n=="string"&&Ae(i,{iconName:"IconCheck"}),n]})]})]})]});import{useEffect as zn,useState as So}from"react";import{jsx as H,jsxs as Ke}from"react/jsx-runtime";var Hn=({item:e,onChange:t,children:a})=>e.editable!==!1?Ke(ie,{trigger:"click",isActive:e.editable,children:[H(le,{children:a}),Ke(ce,{children:[H(Oe,{children:e.label}),H(On,{item:e,onChange:t})]})]}):a,On=({item:e,onChange:t,...a})=>{let o=e?.type,[n,s]=So(e.value),[r,l]=So(e.value);zn(()=>{s(e.value),l(e.value)},[e.value]);let[c,p]=So(""),N=async b=>{if(!(e.editable===!1||!t)){console.log(e.options);try{if(!u(b))return;await t(e.key,b??n)&&s(b)}catch(F){s(e.value),p(F.message)}}},u=b=>!0,C=()=>r!==n&&N(n),v;switch(o){case"number":case"text":case"email":case"password":case"tel":case"url":v=H(D,{type:o,value:n,onBlur:C,onChange:b=>s(b.target.value),"aria-invalid":c?"true":"false"},e.key);break;case"textarea":v=H(Da,{value:n,onBlur:C,onChange:b=>s(b.target.value),"aria-invalid":c?"true":"false"},e.key);break;case"select":v=Ke(Sa,{value:n,onValueChange:b=>N(b),children:[H(Ia,{children:e?.options&&e.options.length>0&&e.options.map(b=>H(Ea,{value:b.value,className:"capitalize",children:b.label},b.value))}),H(Pa,{size:"sm",className:"capitalize w-full",children:H(Ma,{placeholder:"Select an option",children:e?.options?.find(b=>b.value===r)?.label??typeof n},n)})]},e.key);break;case"checkbox":v=H("div",{className:"flex items-center gap-2",children:Ke(x,{children:[H(zt,{checked:n,onCheckedChange:b=>N(b)},e.key),e.label]})});break;case"switch":v=H("div",{className:"flex items-center gap-2",children:Ke(x,{children:[H(Ta,{checked:n,onCheckedChange:b=>N(b)},e.key),e.label]})});break;case"radio":case"file":return null}return Ke("div",{className:"grid gap-1 w-full",children:[v,c&&H("p",{className:"text-red-500 text-sm",children:c})]})},zl=({items:e,onChange:t})=>e.map(a=>Ke("div",{className:g("flex flex-col items-start justify-start",a.value?.toString()?.length>30?"col-span-2":""),children:[H("p",{className:"text-sm text-muted-foreground capitalize",children:a?.label}),H(Hn,{item:a,onChange:a?.onChange??t,children:H("span",{className:"text-sm",children:a?.value??"-"})},a.key)]},a.key));import{jsx as O,jsxs as Qe}from"react/jsx-runtime";var xr=[{color:"default",labelSelected:"border-primary/75 bg-primary/5",label:"hover:border-primary/50",iconSelected:"bg-primary/20",textSelected:"text-primary"},{color:"cyan",labelSelected:"border-cyan-500 bg-cyan-50 dark:bg-cyan-900/10",label:"hover:border-cyan-300",iconSelected:"bg-cyan-100 dark:bg-cyan-900/30",textSelected:"text-cyan-600 dark:text-cyan-400"},{color:"blue",labelSelected:"border-blue-500 bg-blue-50 dark:bg-blue-900/10",label:"hover:border-blue-300",iconSelected:"bg-blue-100 dark:bg-blue-900/30",textSelected:"text-blue-600 dark:text-blue-400"},{color:"green",labelSelected:"border-green-500 bg-green-50 dark:bg-green-900/10",label:"hover:border-green-300",iconSelected:"bg-green-100 dark:bg-green-900/30",textSelected:"text-green-600 dark:text-green-400"},{color:"red",labelSelected:"border-red-500 bg-red-50 dark:bg-red-900/10",label:"hover:border-red-300",iconSelected:"bg-red-100 dark:bg-red-900/30",textSelected:"text-red-600 dark:text-red-400"},{color:"orange",labelSelected:"border-orange-500 bg-orange-50 dark:bg-orange-900/10",label:"hover:border-orange-300",iconSelected:"bg-orange-100 dark:bg-orange-900/30",textSelected:"text-orange-600 dark:text-orange-400"},{color:"yellow",labelSelected:"border-yellow-500 bg-yellow-50 dark:bg-yellow-900/10",label:"hover:border-yellow-300",iconSelected:"bg-yellow-100 dark:bg-yellow-900/30",textSelected:"text-yellow-600 dark:text-yellow-400"}],Gl=({section:e})=>{let t=e.type==="checkbox",a=t?Array.isArray(e.value)?e.value:[]:[e.value],o=r=>{if(!t){e.onSave({key:e.key,value:r});return}let l=a.includes(r)?a.filter(c=>c!==r):[...a,r];e.onSave({key:e.key,value:l})},n=t?"div":Ht,s=t?{className:`grid grid-cols-1 md:grid-cols-${e.options.length} gap-4`}:{className:`grid grid-cols-1 md:grid-cols-${e.options.length} gap-4`,value:e.value??null,onValueChange:r=>e.onSave({key:e.key,value:r})};return Qe("div",{className:"space-y-6",children:[O(ge,{icon:typeof e.icon=="string"?O(i,{iconName:e.icon,size:24}):e.icon,title:e.title,description:e.description}),O(n,{...s,value:t?void 0:String(e.value??""),children:e.options.map((r,l)=>{let c=r.color??"default",p=xr.find(u=>u.color===c)||xr[0],N=t?r.key&&a.includes(r.key):e.value===r.value;return Qe("div",{children:[!t&&O(Ot,{id:`${e.key}:${r.value}`,value:String(r.value),className:"sr-only"}),O(x,{htmlFor:t?void 0:`${e.key}:${r.value}`,onClick:()=>t&&r.key&&o(r.key),className:`cursor-pointer border-2 rounded-lg p-4 flex items-center justify-center transition-all shadow-sm hover:shadow-md border-border ${N?p.labelSelected:p.label}`,children:Qe("div",{className:"flex flex-col items-center text-center space-y-3",children:[r.icon&&O("div",{className:`p-3 rounded-full ${N?g(p.iconSelected,p.textSelected):"bg-muted text-muted-foreground"}`,children:typeof r.icon=="string"?O(i,{iconName:r.icon,size:24}):r.icon}),Qe("div",{children:[Qe("div",{className:"flex items-center justify-center gap-1 font-medium",children:[r.title&&O("span",{children:r.title}),r.help_text&&Qe(ie,{trigger:"hover",children:[O(le,{children:O(i,{iconName:"IconHelpCircle",size:16,className:"mt-[1px] text-muted-foreground"})}),Qe(ce,{className:"w-auto",children:[O(Oe,{children:"What is this?"}),O("div",{className:"p-2 my-2 mx-3 text-sm break-all",children:r.help_text})]})]})]}),r.description&&O("p",{className:"text-xs text-muted-foreground mt-1",children:r.description})]}),O("div",{className:"w-5 h-5",onClick:u=>{u.stopPropagation(),t&&r.key&&o(r.key)},children:N?O("div",{className:`border border-primary/20 ${t?"rounded-sm":"rounded-full"} bg-muted flex h-5 w-5 my-auto flex-shrink-0 items-center justify-center`,children:O(i,{iconName:"IconCheck",className:"w-3 h-3"})}):O("span",{className:`border border-primary/20 ${t?"rounded-sm":"rounded-full"} flex h-5 w-5 my-auto flex-shrink-0`})})]})})]},l)})}),e.extra?typeof e.extra=="function"?e.extra():e.extra:null]},e.key)};import{Transition as Un}from"@headlessui/react";import{IconCircleCheck as Vn,IconLoader2 as $n}from"@tabler/icons-react";import{Fragment as Gn,jsx as pt,jsxs as Nr}from"react/jsx-runtime";var Wt=({processing:e,recentlySuccessful:t,processingText:a="Saving...",successText:o="Saved!",children:n,className:s,...r})=>pt(m,{disabled:e||t,className:g("flex items-center gap-2",s),variant:"outline",...r,children:t?pt(Un,{show:t,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:Nr("div",{className:"flex items-center text-sm text-center text-muted-foreground mx-auto",children:[pt(Vn,{}),pt("span",{className:"ml-2",children:o})]})}):e?Nr(Gn,{children:[pt($n,{className:"animate-spin"}),pt("span",{children:a})]}):n});import{usePage as Li}from"@inertiajs/react";import{Link as Dt,usePage as on}from"@inertiajs/react";import{Link as Zn}from"@inertiajs/react";import{IconChevronRight as Wn}from"@tabler/icons-react";import{jsx as L,jsxs as ut}from"react/jsx-runtime";var yr=({item:e})=>L(uo,{className:"list-none",children:L(Zn,{href:route(e.route_name,e.payload??{}),legacyBehavior:!0,passHref:!0,children:ut(m,{variant:"ghost",className:g("w-full justify-start font-normal",e.isActive&&"bg-accent text-accent-foreground"),children:[e.icon&&L(i,{iconName:e.icon,className:"h-4 w-4"}),L("span",{children:e.title})]})})}),qn=({item:e})=>ut("li",{className:"relative list-none [&:hover>div.flyout-menu]:block",children:[ut(m,{variant:"ghost",className:g("flex w-full cursor-pointer items-center justify-between font-normal transition-colors hover:bg-accent hover:text-accent-foreground",e.isActive&&"bg-accent text-accent-foreground"),children:[ut("div",{className:"flex items-center gap-2",children:[e.icon&&L(i,{iconName:e.icon,className:"h-4 w-4"}),L("span",{children:e.title})]}),L(Wn,{className:"h-4 w-4 text-muted-foreground"})]}),L("div",{className:"flyout-menu absolute left-full top-0 z-50 hidden pl-1",children:L("ul",{className:"flex w-auto flex-col gap-1 rounded-md border bg-popover p-2 text-popover-foreground shadow-md animate-in fade-in zoom-in-95",children:e.items?.map(t=>L("li",{children:L(wr,{item:t})},t.title))})})]}),wr=({item:e})=>e?.items&&e?.items?.length>0?L(qn,{item:e}):L(yr,{item:e}),Cr=({menuItems:e})=>e?L(La,{viewport:!1,delayDuration:0,children:L(Ra,{className:"flex items-center",children:e.map(t=>t.items&&t.items.length>0?ut(uo,{children:[ut(Fa,{className:g("flex items-center gap-2",t.isActive&&"bg-accent text-accent-foreground"),children:[t.icon&&L(i,{iconName:t.icon,className:"h-4 w-4"}),L("span",{children:t.title})]}),L(Ba,{className:"!overflow-visible min-w-[200px]",children:L("ul",{className:"flex w-auto flex-col gap-1 p-2",children:t.items.map(a=>L("li",{children:L(wr,{item:a})},a.title))})})]},t.title):L(yr,{item:t}))})}):null;import{jsx as Mo,jsxs as Kn}from"react/jsx-runtime";var kr=({className:e,...t})=>{let{appearance:a,updateAppearance:o}=Xe(),n=xe();return Kn(m,{variant:"ghost",size:"icon",onClick:()=>{R("click",n),o(a==="dark"?"light":"dark")},className:g("group cursor-pointer",e),...t,children:[Mo(i,{iconName:"IconSun",className:"opacity-80 group-hover:opacity-100 !size-5 h-9 w-9 rotate-0 scale-100 transition-all dark:rotate-90 dark:scale-0"}),Mo(i,{iconName:"IconMoon",className:"opacity-80 group-hover:opacity-100 !size-5 absolute h-9 w-9 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),Mo("span",{className:"sr-only",children:"Temay\u0131 de\u011Fi\u015Ftir"})]})};import{jsx as me,jsxs as gt}from"react/jsx-runtime";function Qn({className:e="",...t}){let{appearance:a,updateAppearance:o}=Xe();return me("div",{className:e,...t,children:gt(Ie,{children:[me(Ee,{asChild:!0,children:gt(m,{variant:"ghost",size:"icon",className:"h-9 w-9 rounded-md",children:[(()=>{switch(a){case"dark":return me(i,{iconName:"IconMoon",className:"h-5 w-5"});case"light":return me(i,{iconName:"IconSun",className:"h-5 w-5"});default:return me(i,{iconName:"IconDeviceDesktop",className:"h-5 w-5"})}})(),me("span",{className:"sr-only",children:"Toggle theme"})]})}),gt(De,{align:"end",children:[me(We,{onClick:()=>o("light"),children:gt("span",{className:"flex items-center gap-2",children:[me(i,{iconName:"IconSun",className:"h-5 w-5"}),"Light"]})}),me(We,{onClick:()=>o("dark"),children:gt("span",{className:"flex items-center gap-2",children:[me(i,{iconName:"IconMoon",className:"h-5 w-5"}),"Dark"]})}),me(We,{onClick:()=>o("system"),children:gt("span",{className:"flex items-center gap-2",children:[me(i,{iconName:"IconDeviceDesktop",className:"h-5 w-5"}),"System"]})})]})]})})}import{jsx as Po,jsxs as Xn}from"react/jsx-runtime";var Cc=({className:e="",...t})=>{let{appearance:a,updateAppearance:o}=Xe(),n=[{value:"light",icon:"IconSun",label:"Light"},{value:"dark",icon:"IconMoon",label:"Dark"},{value:"system",icon:"IconDeviceDesktop",label:"System"}];return Po("div",{className:g("inline-flex gap-1 rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800",e),...t,children:n.map(({value:s,icon:r,label:l})=>Xn("button",{onClick:()=>o(s),className:g("flex items-center rounded-md px-3.5 py-1.5 transition-colors",a===s?"bg-white shadow-xs dark:bg-neutral-700 dark:text-neutral-100":"text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60"),children:[Po(i,{iconName:r,className:"-ml-1 h-4 w-4"}),Po("span",{className:"ml-1.5 text-sm",children:l})]},s))})};import{useCallback as Yn,useEffect as jn,useState as Jn}from"react";function Xe(){let[e,t]=Jn("system"),a=Yn(o=>{t(o),localStorage.setItem("appearance",o),Jo("appearance",o),qt(o),kt()},[]);return jn(()=>{let o=localStorage.getItem("appearance");return a(o||"system"),()=>Io()?.removeEventListener("change",Eo)},[a]),{appearance:e,updateAppearance:a}}var es=()=>typeof window>"u"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,qt=e=>{let t=e==="dark"||e==="system"&&es();document.documentElement.classList.toggle("dark",t)},Io=()=>typeof window>"u"?null:window.matchMedia("(prefers-color-scheme: dark)"),Eo=()=>{let e=localStorage.getItem("appearance");qt(e||"system"),kt()};function Lc(){let e=localStorage.getItem("appearance")||"system";qt(e),Io()?.addEventListener("change",Eo)}import{Root as ts,Image as os,Fallback as as}from"@radix-ui/react-avatar";import{jsx as To}from"react/jsx-runtime";function Sr({className:e,...t}){return To(ts,{"data-slot":"avatar",className:g("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function Mr({className:e,...t}){return To(os,{"data-slot":"avatar-image",className:g("aspect-square size-full",e),...t})}function Do({className:e,...t}){return To(as,{"data-slot":"avatar-fallback",className:g("bg-muted flex size-full items-center justify-center rounded-[inherit] text-xs",e),...t})}import{Fragment as rs,jsx as B,jsxs as Re}from"react/jsx-runtime";var ft=({user:e,type:t="circle",className:a,...o})=>{let n=Ga(e);return Re("div",{className:g("relative",a),children:[B(Sr,{className:g(t==="circle"?"rounded-full":"rounded-sm",a),...o,children:e?e.avatar?B(Mr,{src:Pe(e.avatar),alt:e?.name,title:"Last seen at "+new Date(e?.last_seen_at??"").toLocaleString()}):B(Do,{className:"capitalize bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white",children:e?.name?.slice(0,1)}):B(Do,{className:"capitalize bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white",children:Re(ie,{trigger:"hover",children:[B(le,{children:B(i,{iconName:"IconSpy",className:"w-4 h-4",stroke:"1.5"})}),Re(ce,{className:"w-auto",children:[B(Oe,{children:"What does it mean?"}),B("div",{className:"p-2 my-2 mx-3 text-sm break-all",children:"User is not available (Guest)"})]})]})})}),B("span",{className:`border-background absolute rounded-full -end-0.5 -bottom-0.5 size-3 border-2 ${Za(n)}`,children:B("span",{className:"sr-only",children:n})})]})},Kt=({user:e,settings:t,className:a,...o})=>Re("div",{className:g("grid gap-1",a),...o,children:[Re("span",{className:"block text-sm font-medium text-foreground capitalize flex items-center gap-1",children:[Re("div",{className:"flex items-center gap-1",children:[t?.showName!==!1&&B("span",{style:{textTransform:"lowercase"},children:e?.name}),t?.showId!==!1&&Re("span",{className:"text-muted-foreground text-xs",children:["#",e?.id]})]}),t?.showRole!==!1&&B("div",{className:"flex h-4"})]}),t?.showEmail!==!1&&B("span",{className:"block text-xs text-foreground/50",children:e?.email})]}),Yc=({user:e,settings:t,...a})=>B(rs,{children:Re(ie,{trigger:"hover",isActive:t?.showPopover!==!1,children:[B(le,{children:t?.showAvatar!==!1&&B(ft,{user:e,type:"circle"})}),B(ce,{className:"w-auto max-w-[250px] break-all",children:B("div",{className:"text-sm break-all",children:Re("div",{className:"flex items-center gap-2",children:[t?.showAvatar!==!1&&B(ft,{user:e,type:"square"}),B(Kt,{user:e,settings:t})]})})})]})});import{Link as Pr,usePage as Ao}from"@inertiajs/react";import{Fragment as ns,jsx as T,jsxs as Fe}from"react/jsx-runtime";var Ir=({settings:e})=>{let{user:t}=Ao().props.auth,a=br();return Fe(ns,{children:[T(za,{className:"p-0 font-normal",children:Fe("div",{className:"flex items-center gap-2 px-1 text-left text-sm",children:[T(ft,{user:t,type:"square"}),T(Kt,{settings:e,className:"py-2",user:t})]})}),T(go,{}),T(_a,{children:T(We,{asChild:!0,children:Fe(Pr,{className:"block w-full",href:route("user"),as:"button",prefetch:!0,onClick:a,children:[T(i,{iconName:"IconUserSquare",className:"mr-2"}),"My Account"]})})}),T(go,{}),T(We,{asChild:!0,children:Fe(Pr,{className:"block w-full",method:"post",href:route("logout"),as:"button",onClick:a,children:[T(i,{iconName:"IconLogout",className:"mr-2"}),"Log out"]})})]})},Er=({showName:e=!0})=>{let{user:t}=Ao().props.auth;return Fe(Ie,{children:[T(Ee,{asChild:!0,children:Fe("div",{className:"flex items-center gap-3 cursor-pointer",children:[Fe("span",{className:"text-sm",children:["Hello ",T("span",{className:"font-bold",children:t.name})]}),T(m,{variant:"ghost",className:"size-8 rounded-full",children:T(ft,{user:t,type:"circle"})})]})}),T(De,{className:"w-56",children:T(Ir,{})})]})},lm=()=>{let{user:e}=Ao().props.auth,{isMobile:t}=ma();return T(_t,{children:T(Ct,{children:Fe(Ie,{children:[T(Ee,{asChild:!0,children:Fe(Ze,{size:"lg",className:"data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",children:[T(ft,{user:e,type:"square"}),T(Kt,{settings:{showRole:!1,showId:!1},user:e,className:"py-2"}),T(i,{iconName:"IconDotsVertical",className:"ml-auto size-4"})]})}),T(De,{className:"w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",side:t?"bottom":"right",sideOffset:4,children:T(Ir,{settings:{showRole:!1,showId:!1}})})]})})})};import{usePage as ss}from"@inertiajs/react";import{jsx as is}from"react/jsx-runtime";var Dr=()=>{let{url:e}=ss(),t=[],a=[];t.push({title:"My Account",icon:"IconUserSquare",route_name:"user"}),a.push({title:"Dashboard",route_name:"dashboard",icon:"IconBrandTabler"});let n=mt([{title:"Main Menu",items:t}],e)[0];return is(St,{rightNavItems:a,mainMenu:n})};import{Link as ls}from"@inertiajs/react";import{Fragment as cs}from"react";import{Fragment as ms,jsx as Ye,jsxs as Tr}from"react/jsx-runtime";function Ar({breadcrumbs:e}){return Ye(ms,{children:e.length>0&&Ye(Ha,{children:Ye(Oa,{children:e.map((t,a)=>{let o=a===e.length-1;return Tr(cs,{children:[Tr(Ua,{className:"flex items-center gap-2",children:[t.icon&&Ye(i,{iconName:t.icon,size:16,className:o?"text-primary":"text-muted-foreground"}),o?Ye(Va,{children:t.title}):Ye(ls,{href:t.href??"#",children:t.title})]}),!o&&Ye($a,{})]},a)})})})})}import{jsx as je,jsxs as Lr}from"react/jsx-runtime";var vt=({children:e,breadcrumbs:t,...a})=>{if(typeof window>"u")return je(Rr,{});let o=[{title:"My Account",href:route("user"),icon:"IconUserSquare"},...t||[]];return Lr(Mt,{className:"mt-17",children:[je(Dr,{}),Lr("main",{className:"mx-auto flex h-full w-full max-w-7xl space-y-8 flex-1 flex-col gap-1 rounded-xl",...a,children:[o.length>0?je("div",{className:"border-sidebar-border/70 flex w-full border-b",children:je("div",{className:"mx-auto flex h-12 w-full items-center justify-center px-4 text-neutral-500 md:max-w-7xl",children:je(Ar,{breadcrumbs:o})})}):je("div",{className:"h-12"}),je("div",{className:"@container/main px-7",children:e})]})]})};import{useForm as qs}from"@inertiajs/react";import{useRef as Vr}from"react";import{toast as Ks}from"sonner";import{useForm as ds,usePage as ps}from"@inertiajs/react";import{toast as us}from"sonner";var Fr=()=>{let t=ps().props.app.media_base_path,{data:a,setData:o,post:n,processing:s,errors:r,reset:l}=ds({email:"",password:"",remember:!1});return{data:a,setData:o,post:n,processing:s,errors:r,reset:l,submit:p=>{p.preventDefault(),us.promise(new Promise((N,u)=>{n(route("login"),{onSuccess:()=>R("intro",t),onFinish:()=>{l("password"),N(!0)},onError:()=>{R("soft-alert",t),u(!1)}})}),{loading:"Logging in...",success:"Login successful!",error:"Login failed!"})}}};import{useState as gs}from"react";import{Head as fs}from"@inertiajs/react";import{Fragment as bs,jsx as _,jsxs as de}from"react/jsx-runtime";var Br=({status:e,canResetPassword:t})=>{let{data:a,setData:o,post:n,processing:s,errors:r,reset:l,submit:c}=Fr();return de(bs,{children:[de("form",{className:"flex flex-col gap-6",onSubmit:c,children:[de("div",{className:"grid gap-6",children:[de("div",{className:"grid gap-2",children:[_(x,{htmlFor:"email",children:"Email address"}),de("div",{className:"group relative",children:[_(D,{id:"email",type:"email",required:!0,autoFocus:!0,tabIndex:1,autoComplete:"email",value:a.email,onChange:p=>o("email",p.target.value),placeholder:"email@example.com",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1","aria-invalid":!!r.email}),_("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:_(i,{iconName:"IconMail",size:16})})]}),_(k,{message:r.email})]}),de("div",{className:"grid gap-2",children:[de("div",{className:"flex items-center",children:[_(x,{htmlFor:"password",children:"Password"}),t&&_(Te,{href:route("password.request"),className:"ml-auto text-sm",tabIndex:5,children:"Forgot password?"})]}),_(Q,{id:"password",type:"password",required:!0,tabIndex:2,autoComplete:"current-password",value:a.password,onChange:p=>o("password",p.target.value),placeholder:"Password",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),_(k,{message:r.password})]}),de("div",{className:"flex items-center space-x-3",children:[_(zt,{id:"remember",name:"remember",checked:a.remember,onClick:()=>o("remember",!a.remember),tabIndex:3}),_(x,{htmlFor:"remember",children:"Remember me"})]}),de(m,{type:"submit",className:"mt-4 w-full",tabIndex:4,disabled:s,children:[s&&_(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Log in"]})]}),de("div",{className:"text-muted-foreground text-center text-sm",children:["Don't have an account?"," ",_(Te,{href:route("register"),tabIndex:5,children:"Sign up"})]})]}),e&&_("div",{className:"mb-4 text-center text-sm font-medium text-green-600",children:e})]})},ad=({trigger:e,status:t,canResetPassword:a})=>{let[o,n]=gs(!1);return de(Ne,{open:o,onOpenChange:n,children:[_(ye,{children:_(Br,{status:t,canResetPassword:a})}),_(dt,{children:e})]})},vs=({status:e,canResetPassword:t})=>_(Br,{status:e,canResetPassword:t}),rd=({status:e,canResetPassword:t})=>de(oe,{title:"Log in to your account",description:"Enter your email and password below to log in",children:[_(fs,{title:"Log in"}),_(vs,{status:e,canResetPassword:t})]});import{Head as hs}from"@inertiajs/react";import{useState as xs}from"react";import{jsx as pe,jsxs as Pt}from"react/jsx-runtime";var Lo=({callback:e})=>{let{data:t,setData:a,submit:o,processing:n,errors:s}=xo(e);return pe("form",{onSubmit:o,children:Pt("div",{className:"space-y-6",children:[Pt("div",{className:"grid gap-2",children:[pe(x,{htmlFor:"password",children:"Password"}),pe(Q,{id:"password",type:"password",name:"password",placeholder:"Password",autoComplete:"current-password",value:t.password,autoFocus:!0,onChange:r=>a("password",r.target.value),className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),pe(k,{message:s.password})]}),pe("div",{className:"flex items-center",children:Pt(m,{className:"w-full",disabled:n,children:[n&&pe(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Confirm password"]})})]})})},Ns=({trigger:e,callback:t})=>{let[a,o]=xs(!1);return Pt(Ne,{open:a,onOpenChange:o,children:[pe(ye,{children:pe(Lo,{callback:s=>{t&&(t(s),o(!1))}})}),pe(dt,{children:e})]})},_r=()=>pe(Lo,{}),ys=()=>Pt(oe,{title:"Confirm your password",description:"This is a secure area of the application. Please confirm your password before continuing.",children:[pe(hs,{title:"Confirm password"}),pe(_r,{})]});import{Head as ws}from"@inertiajs/react";import{Fragment as Ss,jsx as ae,jsxs as Ve}from"react/jsx-runtime";var Ro=({status:e})=>{let{data:t,setData:a,submit:o,post:n,processing:s,errors:r}=No();return Ve(Ss,{children:[e&&ae("div",{className:"mb-4 text-center text-sm font-medium text-green-600",children:e}),Ve("div",{className:"space-y-6",children:[Ve("form",{onSubmit:o,children:[Ve("div",{className:"grid gap-2",children:[ae(x,{htmlFor:"email",children:"Email address"}),Ve("div",{className:"group relative",children:[ae(D,{id:"email",type:"email",name:"email",autoComplete:"off",value:t.email,autoFocus:!0,onChange:l=>a("email",l.target.value),placeholder:"email@example.com","aria-invalid":!!r.email,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),ae("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:ae(i,{iconName:"IconMail",size:16})})]}),ae(k,{message:r.email})]}),ae("div",{className:"my-6 flex items-center justify-start",children:Ve(m,{className:"w-full",disabled:s,children:[s&&ae(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Email password reset link"]})})]}),Ve("div",{className:"text-muted-foreground space-x-1 text-center text-sm",children:[ae("span",{children:"Or, return to"}),ae(Te,{href:route("login"),children:"log in"})]})]})]})},Cs=({status:e})=>ae(Ro,{status:e}),ks=({status:e})=>Ve(oe,{title:"Forgot password",description:"Enter your email to receive a password reset link",children:[ae(ws,{title:"Forgot password"}),ae(Ro,{status:e})]});import{Head as Ms}from"@inertiajs/react";import{jsx as X,jsxs as bt}from"react/jsx-runtime";var zr=({token:e,email:t})=>{let{data:a,setData:o,submit:n,post:s,processing:r,errors:l}=yo({token:e,email:t});return X("form",{onSubmit:n,children:bt("div",{className:"grid gap-6",children:[bt("div",{className:"grid gap-2",children:[X(x,{htmlFor:"email",children:"Email"}),X(D,{id:"email",type:"email",name:"email",autoComplete:"email",value:a.email,className:"mt-1 block w-full",readOnly:!0,onChange:c=>o("email",c.target.value)}),X(k,{message:l.email,className:"mt-2"})]}),bt("div",{className:"grid gap-2",children:[X(x,{htmlFor:"password",children:"Password"}),X(Q,{id:"password",type:"password",name:"password",autoComplete:"new-password",value:a.password,className:"mt-1 block w-full",autoFocus:!0,onChange:c=>o("password",c.target.value),placeholder:"Password"}),X(k,{message:l.password})]}),bt("div",{className:"grid gap-2",children:[X(x,{htmlFor:"password_confirmation",children:"Confirm password"}),X(Q,{id:"password_confirmation",type:"password",name:"password_confirmation",autoComplete:"new-password",value:a.password_confirmation,className:"mt-1 block w-full",onChange:c=>o("password_confirmation",c.target.value),placeholder:"Confirm password"}),X(k,{message:l.password_confirmation,className:"mt-2"})]}),bt(m,{type:"submit",className:"mt-4 w-full",disabled:r,children:[r&&X(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Reset password"]})]})})},Hr=({token:e,email:t})=>X(zr,{token:e,email:t}),Ps=({token:e,email:t})=>bt(oe,{title:"Reset password",description:"Please enter your new password below",children:[X(Ms,{title:"Reset password"}),X(Hr,{token:e,email:t})]});import{useState as Is}from"react";import{Head as Es}from"@inertiajs/react";import{IconLoader2 as Ds,IconMail as Ts,IconUserCircle as As}from"@tabler/icons-react";import{jsx as A,jsxs as fe}from"react/jsx-runtime";var Qt=()=>{let{data:e,setData:t,submit:a,processing:o,errors:n}=wo();return fe("form",{className:"flex flex-col gap-6",onSubmit:a,children:[fe("div",{className:"grid gap-6",children:[fe("div",{className:"grid gap-2",children:[A(x,{htmlFor:"name",children:"Name"}),fe("div",{className:"group relative",children:[A(D,{id:"name",type:"text",required:!0,autoFocus:!0,tabIndex:1,autoComplete:"name",value:e.name,onChange:s=>t("name",s.target.value),disabled:o,placeholder:"Full name","aria-invalid":!!n.name,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),A("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:A(As,{size:16})})]}),A(k,{message:n.name,className:"mt-2"})]}),fe("div",{className:"grid gap-2",children:[A(x,{htmlFor:"email",children:"Email address"}),fe("div",{className:"group relative",children:[A(D,{id:"email",type:"email",required:!0,tabIndex:2,autoComplete:"email",value:e.email,onChange:s=>t("email",s.target.value),disabled:o,placeholder:"email@example.com","aria-invalid":!!n.email,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),A("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:A(Ts,{size:16})})]}),A(k,{message:n.email})]}),fe("div",{className:"grid gap-2",children:[A(x,{htmlFor:"password",children:"Password"}),A(Q,{id:"password",type:"password",required:!0,tabIndex:3,autoComplete:"new-password",value:e.password,onChange:s=>t("password",s.target.value),disabled:o,placeholder:"Password","aria-invalid":!!n.password,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),A(k,{message:n.password})]}),fe("div",{className:"grid gap-2",children:[A(x,{htmlFor:"password_confirmation",children:"Confirm password"}),A(Q,{id:"password_confirmation",type:"password",required:!0,tabIndex:4,autoComplete:"new-password",value:e.password_confirmation,onChange:s=>t("password_confirmation",s.target.value),disabled:o,placeholder:"Confirm password","aria-invalid":!!n.password_confirmation,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),A(k,{message:n.password_confirmation})]}),fe(m,{type:"submit",className:"mt-2 w-full",tabIndex:5,disabled:o,children:[o&&A(Ds,{className:"h-4 w-4 animate-spin"}),"Create account"]})]}),fe("div",{className:"text-muted-foreground text-center text-sm",children:["Already have an account?"," ",A(Te,{href:route("login"),tabIndex:6,children:"Log in"})]})]})},Ls=()=>{let[e,t]=Is(!1);return A(Ne,{open:e,onOpenChange:t,children:A(ye,{children:A(Qt,{})})})},Rs=()=>A(Qt,{}),Fs=()=>fe(oe,{title:"Create an account",description:"Enter your details below to create your account",children:[A(Es,{title:"Register"}),A(Qt,{})]});import{IconEye as Bs,IconEyeOff as _s}from"@tabler/icons-react";import{useState as zs}from"react";import{jsx as ht,jsxs as Hs}from"react/jsx-runtime";var Q=({className:e,type:t,...a})=>{let[o,n]=zs(!0);return Hs("div",{className:"group relative",children:[ht(D,{id:"password",type:o?"password":"text",name:"password",placeholder:"Password",autoComplete:"current-password",autoFocus:!0,className:e,...a}),ht("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3 shrink-0",children:ht(i,{iconName:"IconLockCode",size:16})}),ht("div",{className:"text-muted-foreground hover:text-primary absolute inset-y-0 end-0 flex items-center justify-center pr-3 shrink-0 cursor-pointer",onClick:()=>n(s=>!s),children:o?ht(Bs,{size:18}):ht(_s,{size:18})})]})};import{Link as Xt,usePage as Os}from"@inertiajs/react";import{jsx as M,jsxs as re}from"react/jsx-runtime";var oe=({children:e,title:t,description:a,variant:o="simple",...n})=>re(Mt,{children:[M(St,{}),o==="simple"?M(Vs,{children:e,title:t,description:a,...n}):o==="card"?M(Us,{children:e,title:t,description:a,...n}):o==="split"?M($s,{children:e,title:t,description:a,...n}):null]}),Us=({children:e,title:t,description:a})=>M("div",{className:"bg-muted flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10",children:re("div",{className:"flex w-full max-w-md flex-col gap-6",children:[M(Xt,{href:route("home"),className:"flex items-center gap-2 self-center font-medium",children:M("div",{className:"mb-1 flex lg:w-[200px] w-[150px] items-center justify-center rounded-md",children:M(ve,{})})}),M("div",{className:"flex flex-col gap-6",children:re(V,{className:"rounded-xl",children:[re(q,{className:"px-10 pt-8 pb-0 text-center",children:[M(qe,{className:"text-xl",children:t}),M(Vt,{children:a})]}),M(K,{className:"px-10 py-8",children:e})]})})]})}),Vs=({children:e,title:t,description:a})=>M("div",{className:"bg-background flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10",children:M("div",{className:"w-full max-w-sm",children:re("div",{className:"flex flex-col gap-8",children:[re("div",{className:"flex flex-col items-center gap-4",children:[re(Xt,{href:route("home"),className:"flex flex-col items-center gap-2 font-medium",children:[M("div",{className:"mb-1 flex lg:w-[200px] w-[150px] items-center justify-center rounded-md",children:M(ve,{})}),M("span",{className:"sr-only",children:t})]}),re("div",{className:"space-y-2 text-center",children:[M("h1",{className:"text-xl font-medium",children:t}),M("p",{className:"text-muted-foreground text-center text-sm",children:a})]})]}),e]})})}),$s=({children:e,title:t,description:a})=>{let{name:o}=Os().props;return re("div",{className:"relative grid h-dvh flex-col items-center justify-center px-8 sm:px-0 lg:max-w-none lg:grid-cols-2 lg:px-0",children:[re("div",{className:"bg-muted relative hidden h-full flex-col p-10 text-white lg:flex dark:border-r",children:[M("div",{className:"absolute inset-0 bg-zinc-900"}),re(Xt,{href:route("home"),className:"relative z-20 flex items-center text-lg font-medium",children:[M(ve,{className:"mr-2 size-8 fill-current text-white"}),o]})]}),M("div",{className:"w-full lg:p-8",children:re("div",{className:"mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]",children:[M(Xt,{href:route("home"),className:"relative z-20 flex items-center justify-center lg:hidden",children:M(ve,{className:"h-10 fill-current text-black sm:h-12"})}),re("div",{className:"flex flex-col items-start gap-2 text-left sm:items-center sm:text-center",children:[M("h1",{className:"text-xl font-medium",children:t}),M("p",{className:"text-muted-foreground text-sm text-balance",children:a})]}),e]})})]})};import{Head as Gs}from"@inertiajs/react";import{Fragment as Ws,jsx as xt,jsxs as Yt}from"react/jsx-runtime";var Or=({status:e})=>{let{submit:t,processing:a}=Co();return Yt(Ws,{children:[e==="verification-link-sent"&&xt("div",{className:"mb-4 text-center text-sm font-medium text-green-600",children:"A new verification link has been sent to the email address you provided during registration."}),Yt("form",{onSubmit:t,className:"space-y-6 text-center",children:[Yt(m,{disabled:a,variant:"secondary",children:[a&&xt(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Resend verification email"]}),xt(Te,{href:route("logout"),method:"post",className:"mx-auto block text-sm",children:"Log out"})]})]})},Ur=({status:e})=>xt(Or,{status:e}),Zs=({status:e})=>Yt(oe,{title:"Verify email",description:"Please verify your email address by clicking on the link we just emailed to you.",children:[xt(Gs,{title:"Email verification"}),xt(Ur,{status:e})]});import{jsx as ue,jsxs as It}from"react/jsx-runtime";var $r=()=>{let e=xe(),t=Vr(null),a=Vr(null),{data:o,setData:n,errors:s,put:r,reset:l,processing:c,recentlySuccessful:p}=qs({current_password:"",password:"",password_confirmation:""});return It("form",{onSubmit:u=>{u.preventDefault(),r(route("user.password.update"),{preserveScroll:!0,onSuccess:()=>{R("success",e),l()},onError:C=>{R("error",e),C.password&&(Ks.error(C.password),l("password","password_confirmation"),t.current?.focus()),C.current_password&&(l("current_password"),a.current?.focus())}})},className:"space-y-6",children:[It("div",{className:"grid gap-2",children:[ue(x,{htmlFor:"current_password",children:"Current Password"}),ue(Q,{id:"current_password",type:"password",required:!0,value:o.current_password,onChange:u=>n("current_password",u.target.value),placeholder:"Current password",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),ue(k,{className:"mt-2",message:s.current_password})]}),It("div",{className:"grid gap-2",children:[ue(x,{htmlFor:"password",children:"New Password"}),ue(Q,{id:"password",type:"password",required:!0,value:o.password,onChange:u=>n("password",u.target.value),placeholder:"New password",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),ue(k,{className:"mt-2",message:s.password})]}),It("div",{className:"grid gap-2",children:[ue(x,{htmlFor:"password_confirmation",children:"Confirm Password"}),ue(Q,{id:"password_confirmation",type:"password",required:!0,value:o.password_confirmation,onChange:u=>n("password_confirmation",u.target.value),placeholder:"Confirm password",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),ue(k,{className:"mt-2",message:s.password_confirmation})]}),ue("div",{className:"grid gap-4",children:It(Wt,{processing:c,recentlySuccessful:p,successText:"Password saved!",children:[ue(i,{iconName:"IconDeviceFloppy"}),ue("span",{children:"Save Password"})]})})]})};import{Head as Qs}from"@inertiajs/react";import{jsx as Je,jsxs as Fo}from"react/jsx-runtime";var pu=()=>Fo(vt,{breadcrumbs:[{title:"Edit Password",href:route("user.password.edit"),icon:"IconKey"}],children:[Je(Qs,{title:"Edit Password"}),Fo("div",{className:"grid grid-cols-[2fr_4fr] gap-12",children:[Je(Bo,{}),Fo(V,{children:[Je(q,{children:Je(ge,{icon:Je(i,{iconName:"IconLock"}),title:"Edit Password",description:"Update your password to keep your account secure"})}),Je(K,{children:Je($r,{})})]})]})]});import{useForm as Xs}from"@inertiajs/react";import{useRef as Ys}from"react";import{toast as js}from"sonner";import{jsx as Y,jsxs as $e}from"react/jsx-runtime";var Gr=()=>{let e=xe(),t=Ys(null),{data:a,setData:o,delete:n,processing:s,reset:r,errors:l,clearErrors:c}=Xs({password:""}),p=u=>{u.preventDefault(),js.promise(new Promise((C,v)=>{n(route("profile.destroy"),{preserveScroll:!0,onSuccess:()=>(C(!0),N(),R("success",e)),onError:()=>(v(!1),t.current?.focus(),R("error",e)),onFinish:()=>r()})}))},N=()=>{c(),r()};return $e("div",{className:"space-y-6",children:[Y(ja,{title:"Delete account",description:"Delete your account and all of its resources"}),$e("div",{className:"space-y-4 rounded-lg border border-red-100 bg-red-50 p-4 dark:border-red-200/10 dark:bg-red-700/10",children:[$e("div",{className:"relative space-y-0.5 text-red-600 dark:text-red-100",children:[Y("p",{className:"font-medium",children:"Warning"}),Y("p",{className:"text-sm",children:"Please proceed with caution, this cannot be undone."})]}),$e(Ne,{children:[Y(dt,{asChild:!0,children:Y(m,{variant:"destructive",children:"Delete account"})}),$e(ye,{children:[Y(Xa,{children:"Are you sure you want to delete your account?"}),Y(Ya,{children:"Once your account is deleted, all of its resources and data will also be permanently deleted. Please enter your password to confirm you would like to permanently delete your account."}),$e("form",{className:"space-y-6",onSubmit:p,children:[$e("div",{className:"grid gap-2",children:[Y(x,{htmlFor:"password",className:"sr-only",children:"Password"}),Y(D,{id:"password",type:"password",name:"password",ref:t,value:a.password,onChange:u=>o("password",u.target.value),placeholder:"Password",autoComplete:"current-password"}),Y(k,{message:l.password})]}),$e($t,{className:"gap-2",children:[Y(Ka,{asChild:!0,children:Y(m,{variant:"secondary",onClick:N,children:"Cancel"})}),Y(m,{variant:"destructive",disabled:s,asChild:!0,children:Y("button",{type:"submit",children:"Delete account"})})]})]})]})]})]})]})};import{Head as Js}from"@inertiajs/react";import{jsx as et,jsxs as Zr}from"react/jsx-runtime";var Fu=()=>Zr(vt,{children:[et(Js,{title:"Delete Account"}),et("div",{className:"max-w-7xl mx-auto space-y-8 my-8",children:Zr(V,{children:[et(q,{children:et(ge,{icon:et(i,{iconName:"IconDelete"}),title:"Delete Account",description:"Permanently delete your account and all associated data"})}),et(K,{children:et(Gr,{})})]})})]});import{Link as Wr,router as ei,usePage as qr}from"@inertiajs/react";import{useEffect as ti,useState as Nt}from"react";import oi from"react-easy-crop";import{toast as ai}from"sonner";import{Fragment as Et,jsx as f,jsxs as U}from"react/jsx-runtime";var ri=({image:e,isOpen:t,setIsOpen:a,onSave:o})=>{let[n,s]=Nt({x:0,y:0}),[r,l]=Nt(1),[c,p]=Nt(e),[N,u]=Nt(null);return ti(()=>{p(e),s({x:0,y:0}),l(1),u(null)},[e,t]),f(Ne,{open:t,onOpenChange:a,children:U(ye,{className:"max-h-[75vh] sm:max-w-[50vw] xl:max-w-[50vw] min-h-[50vh] grid !gap-4 overflow-auto",children:[U(Qa,{className:"flex items-center gap-2",children:[f(i,{iconName:"IconCrop"}),f("span",{className:"text-lg",children:"Crop Avatar"})]}),f("div",{className:"grid",children:f("div",{className:"relative flex-1 bg-neutral-900 aspect-square w-full h-auto border max-h-[60vh] min-h-[200px] sm:min-h-[400px] ",children:f(oi,{image:c,crop:n,zoom:r,aspect:1,zoomSpeed:.1,onCropChange:s,onZoomChange:l,onCropComplete:(v,b)=>u(b)})})}),U($t,{children:[f(m,{variant:"outline",onClick:()=>a(!1),children:"Cancel"}),f(m,{onClick:async()=>{if(!c||!N)return;let v=await Ja(c,N);o(v),a(!1)},disabled:!N,children:"Save"})]})]})})},Bo=({className:e})=>{let{auth:t}=qr().props,[a,o]=Nt(t?.user?.avatar||""),[n,s]=Nt(!1),r=xe(),l=new Date().getHours();return f(Et,{children:f(V,{className:g("",e),children:U(K,{className:"grid grid-cols-1 gap-7",children:[f("div",{className:"text-xl text-center",children:l>=5&&l<11?U(Et,{children:["\u{1F304} Good morning ",f("span",{className:"font-bold",children:t.user.name}),"!"]}):l>=11&&l<17?U(Et,{children:["\u2600\uFE0F Good afternoon ",f("span",{className:"font-bold",children:t.user.name}),"!"]}):l>=17&&l<21?U(Et,{children:["\u{1F307} Good evening ",f("span",{className:"font-bold",children:t.user.name}),"!"]}):U(Et,{children:["\u{1F319} Good night ",f("span",{className:"font-bold",children:t.user.name}),"!"]})}),f("div",{className:g("mx-auto max-w-[250px] w-full h-auto aspect-[1/1] flex items-center cursor-pointer object-fit transition-all hover:scale-105 duration-300 bg-accent/25 rounded-md border",t.user.avatar?"":"border-[1.5px] border-dashed rounded-md"),onClick:()=>{document.querySelector("#user-avatar")?.click()},style:t.user.avatar?{backgroundImage:`url(${Pe(t.user.avatar)})`,backgroundSize:"cover"}:{},children:!t.user.avatar&&f(i,{className:"mx-auto h-8 w-8",iconName:"IconUpload"})}),U("div",{className:"grid text-center",children:[f("div",{className:"mx-auto flex items-center gap-2",children:f("span",{className:"text-xl font-bold truncate",children:t.user.name+(t.user?.surname?" "+t.user.surname:"")})}),f("span",{className:"text-sm text-muted-foreground",children:t.user.email})]}),f("input",{id:"user-avatar",hidden:!0,type:"file",accept:"image/*",onChange:c=>{let p=c.target.files?.[0];if(!p){c.currentTarget.value="";return}o(URL.createObjectURL(p)),s(!0),c.currentTarget.value=""}}),f(ri,{image:a,isOpen:n,setIsOpen:s,onSave:c=>{ai.promise(new Promise((p,N)=>{ei.patch(route("user.profile.update"),{avatar:er(c,"avatar.jpg")},{onSuccess:u=>{R("success",r),p(u)},onError:u=>{R("error",r),N(u)}})}),{loading:"Avatar Updating...",success:"Avatar Updated",error:"Avatar Update Failed"})}})]})})})},ni=({className:e})=>{let{auth:t}=qr().props,a=[{icon:"IconUser",title:"Name-Surname",value:t.user.name+" "+(t.user?.surname??"")},{icon:"IconMail",title:"Email",value:t.user.email},{icon:"IconPhone",title:"Phone",value:t.user.phone},{icon:"IconUserKey",title:"User Role",value:t.user.role_code},{icon:"IconCalendar",title:"Registered At",value:new Date(t.user.created_at).toLocaleString()},{icon:"IconCalendar",title:"Last Seen At",value:t.user?.last_seen_at?new Date(t.user?.last_seen_at??"").toLocaleString():"Never"}];return U(V,{className:g("",e),children:[U(q,{children:[f(ge,{icon:f(i,{iconName:"IconUser"}),title:"Account Overview",description:"Manage your personal information and account settings"}),f("hr",{className:"mt-2"})]}),U(K,{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:[a.map(o=>f(V,{className:"bg-accent/15 transition-all hover:translate-y-[-5px] hover:scale-105 duration-300 cursor-pointer",children:U(K,{className:"flex items-center gap-2",children:[f(i,{iconName:o.icon,className:"w-6 h-6 shrink-0"}),U("div",{className:"grid",children:[f("span",{className:"text-sm font-bold truncate",children:o.title}),f("span",{className:"text-xs truncate",children:o.value})]})]})})),f(Wr,{className:"col-span-full w-full",href:route("user.profile.edit"),children:U(m,{variant:"outline",className:"w-full flex items-center gap-2",size:"sm",children:[f(i,{iconName:"IconEdit"}),"Edit Details"]})})]})]})},si=({className:e})=>f(V,{className:g("",e),children:f(q,{children:f(ge,{icon:f(i,{iconName:"IconLock"}),title:"Account Security",description:"Manage your account security settings",buttons:f(Wr,{href:route("user.password.edit"),className:"w-full md:w-auto",children:U(m,{variant:"outline",className:"flex items-center gap-2 w-full md:w-auto",children:[f(i,{iconName:"IconKey"}),"Change Password"]})})})})}),Yu=()=>U("div",{className:"grid lg:grid-cols-[2fr_4fr] gap-12",children:[f(Bo,{}),f(ni,{}),f(si,{className:"col-span-full"})]});import{Link as ii,useForm as li,usePage as ci}from"@inertiajs/react";import{jsx as I,jsxs as ne}from"react/jsx-runtime";var ng=({mustVerifyEmail:e,status:t})=>{let a=xe(),{auth:o}=ci().props,{data:n,setData:s,patch:r,errors:l,processing:c,recentlySuccessful:p}=li({name:o.user.name,surname:o.user.surname,email:o.user.email,phone:o.user.phone});return ne("form",{onSubmit:u=>{u.preventDefault(),r(route("user.profile.update"),{preserveScroll:!0,onSuccess:()=>R("success",a),onError:()=>R("error",a)})},className:"space-y-6",children:[ne("div",{className:"grid md:grid-cols-2 gap-2",children:[ne("div",{className:"grid gap-2",children:[I(x,{htmlFor:"name",children:"Name"}),ne("div",{className:"group relative",children:[I(D,{id:"name",type:"text",required:!0,value:n.name,onChange:u=>s("name",u.target.value),placeholder:"Full name",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),I("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:I(i,{iconName:"IconUser",size:16})})]}),I(k,{className:"mt-2",message:l.name})]}),ne("div",{className:"grid gap-2",children:[I(x,{htmlFor:"surname",children:"Surname"}),ne("div",{className:"group relative",children:[I(D,{id:"surname",type:"text",value:n.surname,onChange:u=>s("surname",u.target.value),placeholder:"Surname",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),I("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:I(i,{iconName:"IconUser",size:16})})]}),I(k,{className:"mt-2",message:l.surname})]})]}),ne("div",{className:"grid gap-2",children:[I(x,{htmlFor:"email",children:"Email address"}),ne("div",{className:"group relative",children:[I(D,{id:"email",type:"email",required:!0,value:n.email,onChange:u=>s("email",u.target.value),placeholder:"Email address",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"username"}),I("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:I(i,{iconName:"IconMail",size:16})})]}),I(k,{className:"mt-2",message:l.email})]}),ne("div",{className:"grid gap-2",children:[I(x,{htmlFor:"phone",children:"Phone"}),ne("div",{className:"group relative",children:[I(D,{id:"phone",type:"tel",value:n.phone,onChange:u=>s("phone",u.target.value),placeholder:"Phone number",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),I("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:I(i,{iconName:"IconPhone",size:16})})]}),I(k,{className:"mt-2",message:l.phone})]}),e&&o.user.email_verified_at===null&&ne("div",{children:[ne("p",{className:"text-muted-foreground -mt-4 text-sm",children:["Your email address is unverified."," ",I(ii,{href:route("verification.send"),method:"post",as:"button",className:"text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500",children:"Click here to resend the verification email."})]}),t==="verification-link-sent"&&I("div",{className:"mt-2 text-sm font-medium text-green-600",children:"A new verification link has been sent to your email address."})]}),I("div",{className:"grid gap-4",children:ne(Wt,{processing:c,recentlySuccessful:p,children:[I(i,{iconName:"IconDeviceFloppy"}),I("span",{children:"Save Profile"})]})})]})};import{Link as Qr}from"@inertiajs/react";import{IconEye as mi,IconEyeClosed as di}from"@tabler/icons-react";import{Fragment as Kr,jsx as y,jsxs as we}from"react/jsx-runtime";var Xr=({notifications:e})=>y(jt,{notifications:e??[],meta:{per_page:5},children:we(ie,{trigger:"click",children:[y(le,{children:y(ui,{})}),y(ce,{className:"w-[400px] min-h-[150px] flex-row gap-5",children:y(pi,{})})]})}),pi=()=>{let{notifications:e}=yt();return we(Kr,{children:[we(Oe,{className:"flex mx-auto items-center gap-2",children:[y(i,{iconName:"IconBell",size:16}),y("span",{children:"Notifications"})]}),e?.length>0?y(Kr,{children:we("div",{className:"grid gap-3 ",children:[e.slice(0,5).map(t=>{let a=new Date(t?.read_at??"").getTime()>0;return y(_o,{notification:t,children:y("div",{className:g("p-3 py-2 rounded-md hover:scale-103 shadow-sm dark:shadow-accent cursor-pointer animate-in fade-in duration-400",a?"text-muted-foreground":"dark:bg-accent/20 bg-accent"),children:we("div",{className:"flex items-center gap-3 ",children:[y("div",{className:g("flex h-[5px] w-[5px] rounded-full shrink-0",a?"bg-muted-foreground":"bg-green-500")}),y(zo,{notification:t}),we("div",{className:"grid gap-1",children:[y("span",{className:"capitalize font-bold truncate",children:t.data.title}),y("p",{className:"text-sm capitalize truncate",children:t.data.message}),y("p",{className:"text-xs text-muted-foreground",children:new Date(t.created_at).toLocaleString()})]}),y(Oo,{notification:t,className:"ml-auto w-5 h-5"})]})})},t.id)}),y(Qr,{href:route("user.notifications.index"),children:we(m,{variant:"ghost",className:"w-full flex items-center justify-center",size:"sm",children:[y(i,{iconName:"IconEye",size:20}),y("span",{className:"text-sm",children:"View all"})]})})]})}):y(Ho,{})]})},_o=({notification:e,children:t})=>{let a=e.data.route_name?route(e.data.route_name,e.data?.payload??[]):"#";return y(Qr,{href:a,target:"_blank",children:t},e.id)},zo=({notification:e})=>y(i,{iconName:e.data.icon??"IconBell",className:"shrink-0",size:25}),Ho=({className:e})=>y("div",{className:g("min-h-[150px] content-center",e),children:we("div",{className:"text-center text-muted-foreground content-center gap-2",children:[y(i,{iconName:"IconBell",className:"mx-auto mb-2 w-8 h-8"}),y("span",{children:"No new notifications"})]})}),Oo=({notification:e,className:t})=>{let a=new Date(e?.read_at??"").getTime()>0,{markAsRead:o}=yt();return y("div",{className:g("shrink-0",t),onClick:n=>{n.preventDefault(),o(!a,[e.id])},children:we(ie,{children:[y(le,{children:a?y(di,{className:"text-muted-foreground hover:text-primary w-full h-full"}):y(mi,{className:"text-primary w-full h-full"})}),y(ce,{children:a?"Mark as unread":"Mark as read"})]})})},ui=()=>{let{notifications:e}=yt(),t=e?.filter(a=>!a.read_at).length||0;return we(m,{variant:t>0?"outline":"ghost",size:"sm",className:"group hidden sm:flex cursor-pointer flex items-center",children:[y(i,{iconName:"IconBell",className:"!w-[20px] !h-[20px] opacity-80 group-hover:opacity-100"}),t>0&&(t>9?`${t}+`:t)]})};import{createContext as gi,useContext as fi,useEffect as Yr,useState as jr}from"react";import{router as Uo,usePage as vi}from"@inertiajs/react";import{toast as Jr}from"sonner";import{jsx as tt,jsxs as en}from"react/jsx-runtime";var tn=gi({}),jt=({notifications:e,meta:t,children:a})=>{let[o,n]=jr(e??[]),[s,r]=jr(t??{}),{auth:l,app:c}=vi().props;Yr(()=>{r(t??{})},[t]),Yr(()=>!window?.Echo||!l.user?void 0:((window?.Echo?.private(`App.Models.User.${l.user.id}`)).notification(v=>{Jr.custom(()=>(R(v.data?.kind??"ntf-general",c.media_base_path),en("div",{className:"flex items-center gap-3 w-[400px] rounded-lg border bg-background/50 p-3 px-5 shadow-lg",children:[tt(i,{iconName:v.data?.icon??"IconBell",className:"shrink-0"}),en("div",{className:"grid w-full",children:[tt("p",{className:"font-semibold",children:v.data.title}),tt("p",{className:"text-sm text-muted-foreground",children:v.data.message}),tt("p",{className:"text-xs text-muted-foreground",children:new Date(v.created_at??null).toLocaleString()})]}),v.data?.route_name&&tt(m,{variant:"outline",className:"ml-auto",size:"sm",onClick:()=>{Uo.visit(route(v.data.route_name,v.data.payload??void 0))},children:tt(i,{iconName:"IconArrowRight"})})]})),{id:v.id,duration:5e3,closeButton:!0,richColors:!0}),n(b=>{if(!b)return[v];let F=[v,...b];return s.per_page?F.slice(0,s.per_page):F})}),()=>window?.Echo?.leave(`App.Models.User.${l.user.id}`)),[l?.user?.id,s?.per_page]);let u={notifications:o,setNotifications:n,meta:s,setMeta:r,markAsRead:(C,v)=>{R("click",c.media_base_path);let b=new Promise((F,J)=>{Uo.post(route("user.notifications.update"),{notification_ids:v==="all"?"all":v,all:v==="all",has_read:C},{replace:!0,preserveScroll:!0,preserveState:!0,onSuccess:ee=>{n(te=>{let He=new Date().toISOString();return v==="all"?te.map($=>({...$,read_at:C?He:""})):te.map($=>v.includes($.id)?{...$,read_at:C?He:""}:$)}),F(!0)},onError:ee=>{R("alert",c.media_base_path),J(ee)}})});Jr.promise(b,{loading:C?"Marking as read...":"Marking as unread...",success:C?"Marked as read":"Marked as unread",error:C?"Failed to mark as read":"Failed to mark as unread"})},loadMore:async C=>new Promise((v,b)=>{Uo.get(route("user.notifications.index"),{next_cursor:C??s.next_cursor,feed:1,filter:s.filter},{onSuccess:F=>{n(J=>[...J,...F.props.notifications]),r(F.props.meta),v(!0)},only:["notifications","meta"],onError:F=>b(F),preserveScroll:!0,preserveState:!0,preserveUrl:!0,replace:!1})})};return tt(tn.Provider,{value:u,children:a})},yt=()=>{let e=fi(tn);if(!e)throw new Error("useNotifications must be used within a NotificationsProvider");return e};import{toast as bi}from"sonner";import{Head as hi,router as xi}from"@inertiajs/react";import{IconEye as Ni,IconFilter as yi}from"@tabler/icons-react";import{Fragment as ki,jsx as E,jsxs as Be}from"react/jsx-runtime";var Kg=({notifications:e,meta:t})=>Be(vt,{breadcrumbs:[{icon:"IconBell",title:"Notifications",href:"#"}],children:[E(hi,{title:"Notifications",children:E("meta",{name:"emincore_key",content:"test"})}),E(jt,{notifications:e??[],meta:t,children:E(wi,{})})]}),wi=()=>{let{notifications:e,setNotifications:t,meta:a,setMeta:o,markAsRead:n,loadMore:s}=yt(),r=e.filter(l=>!l.read_at).length??0;return Be(Aa,{className:"container mx-auto grid gap-4 mb-10",meta:a,onLoad:l=>s(l),noMoreContent:Be("div",{className:"h-8 w-full grid justify-center gap-2 my-5 text-muted-foreground",children:[E(i,{iconName:"IconBell",className:"mx-auto"}),E("span",{children:"No more notifications"})]}),children:[E(ge,{className:"mb-3",icon:E(i,{iconName:"IconBell"}),title:"Your Notifications",description:`You have ${a.total} notifications totally. ${r>0?`${r} unread notifications`:""}`,buttons:Be(ki,{children:[Be(m,{variant:"ghost",size:"sm",className:"flex justify-start text-sm items-center gap-2",onClick:()=>n(!0,"all"),children:[E(Ni,{}),"Mark all as read"]}),Be(ie,{trigger:"click",children:[E(le,{children:E(m,{variant:a.filter?"default":"outline",children:E(yi,{})})}),E(ce,{children:E(Ht,{value:a?.filter??"all",onChange:()=>bi.info("test"),children:["all","read","unread"].map(l=>Be(x,{className:"capitalize",onClick:()=>xi.get(route("user.notifications.index"),{filter:l},{replace:!0,preserveScroll:!0,preserveState:!0,onSuccess:c=>{t(c.props.notifications),o(c.props.meta)},only:["notifications","meta"]}),children:[E(Ot,{value:l}),l]}))})})]})]})}),e.length>0?e?.map(l=>E(Ci,{notification:l},l.id)):E(Ho,{})]})},Ci=({notification:e,className:t,...a})=>{let o=new Date(e?.read_at??"").getTime()>0;return E(_o,{notification:e,...a,children:E("div",{className:g("p-5 rounded-md hover:scale-103 shadow-sm dark:shadow-accent cursor-pointer animate-in fade-in duration-400",o?"text-muted-foreground":"dark:bg-accent/20 bg-accent",t),children:Be("div",{className:"flex items-center gap-3 ",children:[E("div",{className:g("flex h-[5px] w-[5px] rounded-full shrink-0",o?"bg-muted-foreground":"bg-green-500")}),E(zo,{notification:e}),Be("div",{className:"grid gap-1 px-5",children:[E("span",{className:"capitalize font-bold truncate",children:e.data.title}),E("p",{className:"text-sm capitalize truncate",children:e.data.message}),E("p",{className:"text-xs text-muted-foreground",children:new Date(e.created_at).toLocaleString()})]}),E(Oo,{notification:e,className:"ml-auto"})]})})})};import{Fragment as Si,jsx as h,jsxs as be}from"react/jsx-runtime";var St=({mainMenu:e,rightNavItems:t})=>{let a=on().props,{url:o}=on(),n=a.auth?.user,s=a.auth?.notifications??[];return h(Si,{children:h("div",{className:"fixed top-0 left-0 right-0 z-10 backdrop-blur-sm border-sidebar-border/100 border-b",children:be("div",{className:"mx-auto flex h-16 items-center px-4 md:max-w-7xl",children:[h("div",{className:"lg:hidden",children:be(ta,{children:[h(oa,{asChild:!0,children:h(m,{variant:"ghost",size:"icon",className:"mr-2 h-[34px] w-[34px]",children:h(i,{iconName:"IconMenu2",className:"h-5 w-5"})})}),be(aa,{side:"left",className:"bg-sidebar flex h-full w-64 flex-col items-stretch justify-between",children:[h(na,{className:"sr-only",children:"Navigation Menu"}),h(ra,{className:"flex justify-start text-left",children:h(ve,{className:"w-[90%]"})}),h(da,{children:be(ua,{children:[e&&h(ko,{sidebarMenu:mt(e,o)}),be(pa,{className:"max-w-full gap-0",children:[h(Bt,{children:"Quick"}),t?.map(r=>h(Ze,{children:be(Dt,{href:r.route_name?route(r.route_name,r.payload??{}):"#",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[r.icon&&h(i,{iconName:r.icon,size:16}),h("span",{children:r.title})]},r.title)}))]})]})})]})]})}),h(Dt,{href:"/",prefetch:!0,className:"flex items-center",children:h(ve,{className:"lg:w-[150px] w-[100px]"})}),e&&be("div",{className:"ml-6 hidden h-full items-center space-x-6 lg:flex",children:[h(ea,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),h(Cr,{menuItems:e.items||[]})]}),be("div",{className:"ml-auto flex items-center space-x-2",children:[h("div",{className:"relative flex items-center space-x-1",children:h("div",{className:"hidden lg:flex",children:t?.map(r=>h(sa,{delayDuration:0,children:be(ia,{children:[h(la,{children:be(Dt,{href:r.route_name?route(r.route_name):"#",target:"_blank",rel:"noopener noreferrer",className:"group text-accent-foreground ring-offset-background hover:bg-accent hover:text-accent-foreground focus-visible:ring-ring ml-1 inline-flex h-9 w-9 items-center justify-center rounded-md bg-transparent p-0 text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",children:[r.title&&h("span",{className:"sr-only",children:r.title}),r.icon&&h(i,{iconName:r.icon,className:"size-5 opacity-80 group-hover:opacity-100"})]})}),h(ca,{children:h("p",{children:r.title})})]})},r.title))})}),n&&h(Xr,{notifications:s??[]}),e&&h(Gt,{placeholder:"Type a command or search...",menu:mt(e,o),children:h(Vo,{})}),n?h(Er,{}):be("div",{className:"flex items-center gap-2",children:[h(m,{asChild:!0,variant:"ghost",size:"sm",className:"text-sm",children:h(Dt,{href:"/login",children:"Sign In"})}),h(m,{asChild:!0,size:"sm",className:"text-sm",children:h(Dt,{href:"/register",children:"Get Started"})})]}),h(kr,{className:"w-9 h-9"})]})]})})})};import{Link as Mi,usePage as Pi}from"@inertiajs/react";import{jsx as Jt,jsxs as Ii}from"react/jsx-runtime";var ve=({className:e,link:t,...a})=>{let n=Pi().props?.app?.logos??[];return Ii(({children:r,className:l,...c})=>t?Jt(Mi,{href:t,className:l,...c,children:r}):Jt("div",{className:l,...c,children:r}),{className:g("p-2 grid flex-1 text-left text-sm lg:w-[150px] w-[100px]",e),...a,children:[Jt("img",{src:Pe(n?.dark_logo),alt:"Logo",className:"w-full h-full hidden dark:block"}),Jt("img",{src:Pe(n?.light_logo),alt:"Logo",className:"w-full h-full dark:hidden"})]})};import{Head as Ei,usePage as Di}from"@inertiajs/react";import{toast as $o}from"sonner";import{useEffect as eo}from"react";import{jsx as Ce,jsxs as Ai}from"react/jsx-runtime";var Mt=({children:e,className:t,...a})=>{let o=Di().props;return eo(()=>{o?.flash?.success&&$o.success(o?.flash?.success),o?.flash?.error&&$o.error(o?.flash?.error)},[o.flash]),eo(()=>{o.errors&&Object.values(o.errors).map(n=>{console.log(o.errors),$o.error(n)})},[o.errors]),eo(()=>{o.ziggy&&Object.assign(Ziggy,o.ziggy)},[o.ziggy]),eo(()=>{if(o.app?.logos?.favicon){let n=document.querySelector("link[rel*='icon']")||document.createElement("link");n.type="image/x-icon",n.rel="shortcut icon",n.href=Pe(o.app.logos.favicon,o.app.media_base_path),document.getElementsByTagName("head")[0].appendChild(n)}},[o.app.logos?.favicon]),Ai("div",{className:t,...a,children:[Ce(Ei,{children:Ce("meta",{name:"EMIN_CORE_PLATFORM_VERIFICATION_CODE",content:import.meta.env.VITE_EMIN_CORE_PLATFORM_VERIFICATION_CODE})}),Ce(Ti,{}),e,Ce(tr,{style:{pointerEvents:"auto"},richColors:!0,icons:{success:Ce(i,{iconName:"IconCircleCheckFilled",className:"h-5 w-5"}),error:Ce(i,{iconName:"IconCircleXFilled",className:"animate-shake h-5 w-5"}),warning:Ce(i,{iconName:"IconAlertCircleFilled",className:"animate-bounce h-5 w-5"}),info:Ce(i,{iconName:"IconInfoCircleFilled",className:"animate-pulse h-5 w-5"}),loading:Ce(i,{iconName:"IconLoader2",className:"animate-spin h-5 w-5"})}})]})},Ti=()=>jo.all().map((t,a)=>Ce(t,{},a));import{IconLoader2 as Ri}from"@tabler/icons-react";import{jsx as Go,jsxs as Fi}from"react/jsx-runtime";var Rr=()=>{let e=Li().props;return Go("div",{className:"w-full h-[100vh] justify-center items-center grid",children:Fi("div",{children:[Go(ve,{className:"lg:w-[250px] mx-auto mb-5"}),Go(Ri,{className:"animate-spin mx-auto w-8 h-8"})]})})};import{useEffect as an}from"react";import{jsx as ke,jsxs as wt}from"react/jsx-runtime";var Gf=({placeholder:e,menu:t,openShortcutKey:a="q"})=>wt(Gt,{placeholder:e,menu:t,openShortcutKey:a,children:[ke(Bi,{}),ke(Vo,{})]}),Vo=()=>{let{isCommandModalOpen:e,setIsCommandModalOpen:t,placeholder:a,menu:o,openShortcutKey:n}=vo(),s=l=>{t(!1),l&&setTimeout(()=>{l()},100)};if(an(()=>{let l=c=>{(c.metaKey||c.ctrlKey)&&c.key.toLowerCase()===n.toLowerCase()&&(c.preventDefault(),t(p=>!p))};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[n,t]),an(()=>{if(!o||!Array.isArray(o)||o.length===0)return;let l=c=>ar(c,o);return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[o]),!o||!Array.isArray(o)||o.length===0)return null;let r=or(o);return wt(rr,{open:e,onOpenChange:t,children:[ke(nr,{placeholder:a}),wt(sr,{children:[ke(ir,{children:"No results found."}),Object.entries(r).map(([l,c])=>ke(lr,{heading:l,children:c.map((p,N)=>p.action&&wt(cr,{onSelect:()=>typeof p?.action=="function"&&s(p.action),children:[p.icon&&ke(i,{iconName:p.icon}),ke("span",{children:p?.title||"Item"}),p?.shortcutLabel&&ke(mr,{children:String(p.shortcutLabel)})]},`${l}-${p?.title||N}`))},l))]})]})},Bi=()=>{let{setIsCommandModalOpen:e,openShortcutKey:t}=vo();return ke(m,{variant:"outline",asChild:!0,size:"sm",className:"hidden sm:flex cursor-pointer",onClick:()=>e(!0),children:wt("p",{className:"text-sm text-muted-foreground",children:["Quick Action",ke("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:wt("span",{className:"text-xs",children:["\u2318 + ",t.toUpperCase()]})})]})})};import{jsx as Se,jsxs as rn}from"react/jsx-runtime";var Jf=({data:{title:e="Role Title",icon:t=null,color:a="#6a1717ff",badge_type:o="default",size:n=12}})=>o=="default"?rn(Ue,{variant:"default",color:a??"default",className:"gap-1",style:{backgroundColor:a??"default"},children:[t&&Se(i,{iconName:t,className:"text-white"}),Se("span",{className:"text-white",children:e})]}):o=="outline"?rn(Ue,{variant:"outline",color:a??"default",className:"gap-1",children:[t&&Se(i,{iconName:t,color:a??"default"}),Se("span",{children:e})]}):o=="icon"?Se(Ue,{variant:"outline",color:a??"default",className:"aspect-1/1 rounded-full p-1",style:{backgroundColor:a??"default"},children:t&&Se(i,{iconName:t,className:"text-white"})}):o=="icon2"?Se(Ue,{variant:"outline",color:a??"default",className:"aspect-1/1 rounded-full p-1",children:t&&Se(i,{iconName:t,color:a??"default"})}):o=="icon3"?Se(Ue,{variant:"outline",color:a??"default",className:"aspect-1/1 rounded-full p-1",children:t&&Se(i,{iconName:t,color:a??"default"})}):null;import{jsx as to,jsxs as nn}from"react/jsx-runtime";var rv=({title:e,icon:t,children:a})=>nn(V,{children:[to(q,{children:nn(qe,{className:"flex items-center",children:[t&&(typeof t=="string"?to(i,{iconName:t,className:"h-4 w-4 mr-2 text-muted-foreground"}):t),e&&typeof e=="string"?to("span",{className:"text-xl",children:e}):e]})}),to(K,{children:a})]});import{jsx as Me,jsxs as ot}from"react/jsx-runtime";var mv=(e,...t)=>ot(V,{className:"gap-2",...t,children:[ot(q,{className:"flex items-center gap-2 pb-2",children:[typeof e.icon=="string"?Me(i,{iconName:e.icon,className:"shrink-0 w-5 h-5 text-muted-foreground"}):e.icon,Me(qe,{className:"text-sm font-medium truncate",children:e.title})]}),ot(K,{children:[Me("div",{className:"text-2xl font-bold",children:e.value}),e.subtext&&Me("p",{className:"text-xs text-muted-foreground",children:e.subtext})]})]}),dv=(e,...t)=>ot(V,{className:"gap-2",...t,children:[ot(q,{children:[Me(Vt,{children:e.title}),Me(qe,{className:"text-2xl font-semibold tabular-nums @[250px]/card:text-3xl",children:e.value}),Me(Wa,{children:ot(Ue,{variant:"outline",children:[Me(i,{iconName:Number(e.percentage)>0?"IconTrendingDown":"IconTrendingUp",className:"shrink-0"}),Number(e.percentage)>0?`-${e.percentage}%`:`${e.percentage}%`]})})]}),ot(qa,{className:"flex-col items-start gap-1.5 text-sm",children:[Me("div",{className:"line-clamp-1 flex gap-2 font-medium",children:e.description}),Me("div",{className:"text-muted-foreground",children:e.subdescription})]})]});import{jsx as Zo,jsxs as _i}from"react/jsx-runtime";var Rv=({data:e,columns:t,meta:a,bulkActions:o=[],handleRequest:n,deletedIds:s=[],newIds:r=[],updatedIds:l=[],rowIdField:c="id"})=>_i(mn,{data:e,columns:t,meta:a,bulkActions:o,handleRequest:n,deletedIds:s,newIds:r,updatedIds:l,rowIdField:c,children:[Zo(cn,{}),Zo(sn,{}),Zo(ln,{})]});import{flexRender as dn}from"@tanstack/react-table";import{jsx as _e,jsxs as pn}from"react/jsx-runtime";var sn=()=>{let{columns:e,table:t,handleCheckboxClick:a,isRowHidden:o,animatingRows:n}=he();return pn(dr,{className:"rounded-md border",children:[_e(pr,{children:t.getHeaderGroups().map(s=>_e(Zt,{children:s.headers.map(r=>_e(gr,{className:`py-3 px-4 ${r.column.getCanSort()?"cursor-pointer select-none":""}`,style:{textAlign:"left"},onClick:r.column.getCanSort()?r.column.getToggleSortingHandler():void 0,children:pn("div",{className:"flex items-center",children:[r.isPlaceholder?null:dn(r.column.columnDef.header,r.getContext()),r.column.getCanSort()&&_e("span",{className:"ml-1",children:{asc:"\u2191",desc:"\u2193"}[r.column.getIsSorted()]??""})]})},r.id))},s.id))}),_e(ur,{children:t.getRowModel().rows?.length?t.getRowModel().rows.filter(s=>!o(s.original)).map(s=>{let r=s.original.id&&fr(n[s.original.id]);return _e(Zt,{id:s.id,"data-state":s.getIsSelected()&&"selected",className:`${s.getIsSelected()?"bg-muted/50":""} ${r} transition-all duration-500 ease-in-out`,children:s.getVisibleCells().map(l=>_e(bo,{className:"py-3 px-4",style:{textAlign:"left"},onClick:l.column.id==="select"?c=>a(c,s.id):void 0,children:dn(l.column.columnDef.cell,l.getContext())},l.id))},s.id)}):_e(Zt,{children:_e(bo,{colSpan:e.length,className:"h-24 text-center",children:"There is no result."})})})]})};import{jsx as j,jsxs as at}from"react/jsx-runtime";var ln=()=>{let{table:e,meta:t}=he();return at("div",{className:"flex items-center justify-end space-x-2 py-4",children:[at("div",{className:"flex-1 text-sm text-muted-foreground",children:[e.getFilteredSelectedRowModel().rows.length," / "," ",e.getFilteredRowModel().rows.length," row(s) selected."]}),j(Hi,{}),at("div",{className:"flex items-center space-x-2",children:[j(m,{variant:"outline",size:"sm",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:"Previous"}),j("div",{className:"flex items-center gap-1",children:j(zi,{})}),j(m,{variant:"outline",size:"sm",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:"Next"})]})]})},zi=()=>{let{table:e,meta:t}=he(),a=e.getState().pagination.pageIndex+1,o=t?.last_page??e.getPageCount(),n=Math.min(5,o),s=1;return o>5&&(a<=3?s=1:a>=o-2?s=o-4:s=a-2),Array.from({length:n},(r,l)=>{let c=s+l;return j(m,{variant:c===a?"default":"outline",size:"sm",onClick:()=>c!==a?e.setPageIndex(c-1):null,className:"h-8 w-8 p-0",children:c},c)})},Hi=()=>{let{table:e,customPageSize:t,setCustomPageSize:a}=he();return at("div",{className:"flex items-center space-x-2",children:[j("span",{className:"text-sm text-muted-foreground",children:"Per Page"}),at(Ie,{children:[j(Ee,{asChild:!0,children:at(m,{variant:"outline",className:"h-8 w-[70px]",children:[e.getState().pagination.pageSize.toString(),j(i,{iconName:"IconChevronDown",className:"ml-2 h-4 w-4"})]})}),at(De,{align:"start",children:[[10,20,30,50,100].map(o=>j(Ut,{className:"py-2 pl-8",checked:Number(e.getState().pagination.pageSize)===o,onCheckedChange:()=>e.setPageSize(o),children:j("span",{className:"pl-0",children:o})},o)),j("hr",{}),j("p",{className:"text-muted-foreground text-xs mt-1 px-2",children:"Custom Page Size:"}),j(D,{type:"number",placeholder:"Custom Page Size",value:t,onChange:o=>a(Number(o.target.value)),onKeyDown:o=>o.stopPropagation(),onBlur:o=>{Number(o.target.value)!==e.getState().pagination.pageSize&&e.setPageSize(Number(o.target.value))},className:"px-2 text-sm w-full focus-visible:ring-0 border-none",max:100,min:1})]})]})]})};import{IconLoader2 as Oi,IconSearch as Ui,IconX as Vi}from"@tabler/icons-react";import{jsx as z,jsxs as rt}from"react/jsx-runtime";var cn=()=>{let{meta:e,handleResetTable:t,rowIdField:a,table:o}=he();return rt("div",{className:"flex justify-between items-center pb-4 gap-2",children:[z(Gi,{}),rt("div",{className:"flex-1 flex justify-end space-x-2",children:[z(Zi,{}),z($i,{}),vr({meta:e,rowIdField:a})&&z(m,{variant:"outline",onClick:t,title:"Click to reset search",children:z(i,{iconName:"IconX"})})]})]})},$i=()=>{let{table:e}=he();return rt(Ie,{children:[z(Ee,{asChild:!0,children:rt(m,{variant:"outline",children:[z(i,{iconName:"IconList",className:"h-4 w-4"})," Rows"]})}),z(De,{align:"end",children:e.getAllColumns().filter(t=>t.getCanHide()).map(t=>z(Ut,{className:"capitalize",checked:t.getIsVisible(),onCheckedChange:a=>t.toggleVisibility(!!a),children:t.id},t.id))})]})},Gi=()=>{let{searchValue:e,handleInputOnChange:t,handleKeyDown:a,globalFilter:o,isSearching:n,advancedTable:s,setSearchValue:r,handleGlobalFilterChange:l,handleSearch:c}=he();return rt("div",{className:"relative w-full flex",children:[z(D,{placeholder:"Write and press enter to search \u21B5",value:e,onChange:t,onKeyDown:p=>a(p),className:g("pr-10 focus-visible:ring-0",o?"border-gray-400":"")}),o?n&&s?z(m,{variant:"link",size:"sm",className:"absolute right-0 top-0 h-full px-3",disabled:!0,title:"Loading",children:z(Oi,{className:"animate-spin"})}):z(m,{variant:"link",size:"sm",className:"absolute right-0 top-0 h-full px-3",onClick:()=>(r(""),l("")),title:"Click to reset search",children:z(Vi,{})}):z(m,{variant:"link",size:"sm",className:"absolute right-0 top-0 h-full px-3",onClick:c,title:"Aramak i\xE7in Enter tu\u015Funa basabilirsiniz",children:z(Ui,{})})]})},Zi=()=>{let{bulkActions:e,table:t,resetSelection:a}=he();return e&&e?.length>0&&(t?.getFilteredSelectedRowModel()?.rows?.length||0)>0&&z("div",{className:"flex items-center gap-2",children:e.map((o,n)=>o.confirm?z(hr,{...o.confirmIcon!==void 0&&{icon:o.confirmIcon},...o.confirmTitle!==void 0&&{title:o.confirmTitle},...o.confirmContent!==void 0&&{content:o.confirmContent},...o.confirmText!==void 0&&{confirmText:o.confirmText},...o.cancelText!==void 0&&{cancelText:o.cancelText},onConfirm:()=>o.action(t.getFilteredSelectedRowModel().rows,a),...o.cancel!==void 0&&{onCancel:o.cancel},children:rt(m,{variant:o.variant||"outline",children:[o.icon&&o.icon,o.label," (",t.getFilteredSelectedRowModel().rows.length,")"]},n)}):rt(m,{variant:o.variant||"outline",onClick:()=>o.action(t.getFilteredSelectedRowModel().rows,a),className:"flex items-center",children:[o.icon&&o.icon,o.label," (",t.getFilteredSelectedRowModel().rows.length,")"]},n))})};import{getCoreRowModel as Wi,getFilteredRowModel as qi,getPaginationRowModel as Ki,getSortedRowModel as Qi,useReactTable as Xi}from"@tanstack/react-table";import{createContext as Yi,useContext as ji,useEffect as nt,useRef as un,useState as G}from"react";import{jsx as Ji}from"react/jsx-runtime";var gn=Yi({}),mn=({children:e,data:t,columns:a,meta:o,bulkActions:n,handleRequest:s,rowIdField:r})=>{let l=typeof s<"u",c=un(!1),[p,N]=G(o?.per_page?Number(o?.per_page):10),[u,C]=G(o?.sort?[{id:o.sort,desc:o.order==="desc"}]:[]),[v,b]=G([]),[F,J]=G({}),[ee,te]=G({}),[He,$]=G({pageIndex:o?.current_page?Number(o?.current_page)-1:0,pageSize:o?.per_page?Number(o?.per_page):10}),[P,it]=G(o?.search?o?.search:null),[Tt,lt]=G(o?.search?o?.search:""),[Sn,At]=G(!1),[Ko,Mn]=G(null);nt(()=>{o&&(C(o.sort?[{id:o.sort,desc:o.order==="desc"}]:[]),$({pageIndex:o.current_page?Number(o.current_page)-1:0,pageSize:o.per_page?Number(o.per_page):10}),N(o.per_page?Number(o.per_page):10),it(o.search||null),lt(o.search||""))},[o?.current_page,o?.per_page,o?.sort,o?.order,o?.search]),nt(()=>{setTimeout(()=>c.current=!0,500)},[]),nt(()=>At(!1),[t]);let[Lt,ct]=G({}),[oo,fl]=G([]),[ao,vl]=G([]),[ro,bl]=G([]),[Pn,In]=G(new Set),Rt=un({});nt(()=>{if(ro.length<1)return;let d={...Lt};ro.forEach(S=>{d[String(S)]="deleted",Rt.current[String(S)]=setTimeout(()=>{In(se=>new Set([...se,S])),ct(se=>{let Z={...se};return delete Z[String(S)],Z})},500)}),ct(d)},[ro]),nt(()=>{if(oo.length<1)return;let d={...Lt};oo.forEach(S=>{d[String(S)]="new",Rt.current[String(S)]=setTimeout(()=>{ct(se=>{let Z={...se};return delete Z[String(S)],Z})},500)}),ct(d)},[oo]),nt(()=>{if(ao.length<1)return;let d={...Lt};ao.forEach(S=>{d[String(S)]="updated",Rt.current[String(S)]=setTimeout(()=>{ct(se=>{let Z={...se};return delete Z[String(S)],Z})},1e3)}),ct(d)},[ao]),nt(()=>()=>Object.values(Rt.current).forEach(d=>clearTimeout(d)),[]);let En=d=>{if(!(!c.current||!l))return s({...o,current_page:d.pageIndex+1,per_page:d.pageSize})},Dn=d=>{if(!c.current||!l||d.length===0)return;let S={id:d[0].id,desc:d[0].desc};return s({...o,sort:S.id,order:S.desc?"desc":"asc"})},Tn=d=>!c.current||!l||(d=d.trim(),d===o?.search||d===""&&o?.search==null)?!1:(console.log(o),s({...o,search:d})),An=(d,S)=>{let se=no.getRowModel().rows.filter(W=>!Qo(W.original)),Z=se.findIndex(W=>W.id===d),Ge=se.findIndex(W=>W.id===S);if(Z===-1||Ge===-1)return[];let Yo=Math.min(Z,Ge),so=Math.max(Z,Ge);return se.slice(Yo,so+1).map(W=>W.id)},Ln=a.some(d=>d.id==="select"),Rn=(d,S)=>{if(d.shiftKey&&Ko&&Ln){d.preventDefault();let{rows:se,rowsById:Z}=no.getRowModel(),Ge=An(Ko,S).map(W=>Z[W]).filter(Boolean),so=Ge.filter(W=>W?.getIsSelected()).length<Ge.length/2;Ge.forEach(W=>W&&W.toggleSelected(so))}Mn(S)},Qo=d=>Pn.has(d[r??d.id]),Fn=d=>{let S=typeof d=="function"?d(u):d;C(S),l&&Dn(S)},Bn=d=>{let S=typeof d=="function"?d(He):d;$(S),l&&En(S)},Ft=d=>{it(d),l&&Tn(d)===!1&&At(!1)},no=Xi({data:t,columns:a,filterFns:{fuzzy:ho},onGlobalFilterChange:Ft,globalFilterFn:ho,onSortingChange:Fn,onColumnFiltersChange:b,getCoreRowModel:Wi(),getPaginationRowModel:l?void 0:Ki(),getSortedRowModel:l?void 0:Qi(),getFilteredRowModel:l?void 0:qi(),onColumnVisibilityChange:J,onRowSelectionChange:te,onPaginationChange:Bn,manualPagination:l,manualSorting:l,manualFiltering:l,pageCount:o?.last_page??void 0,state:{sorting:u,columnFilters:v,columnVisibility:F,rowSelection:ee,pagination:He,globalFilter:P}}),Xo=()=>(At(!0),Ft(Tt)),_n={data:t,meta:o,columns:a,bulkActions:n,table:no,resetSelection:()=>te({}),rowIdField:r,advancedTable:l,searchValue:Tt,setSearchValue:lt,handleSearch:Xo,isSearching:Sn,setIsSearching:At,globalFilter:P,handleGlobalFilterChange:Ft,handleInputOnChange:d=>{lt(d.target.value),!l&&Ft(d.target.value)},handleResetTable:()=>{lt(""),it(null),C([{id:r??"id",desc:!0}]),$({pageIndex:0,pageSize:o?.per_page?Number(o?.per_page):10}),b([]),te({}),typeof s<"u"&&s({current_page:1,per_page:10,sort:r||"id",order:"desc",search:""})},handleKeyDown:d=>d.key==="Enter"&&Xo(),handleCheckboxClick:Rn,isRowHidden:Qo,animatingRows:Lt,customPageSize:p,setCustomPageSize:N};return Ji(gn.Provider,{value:_n,children:e})},he=()=>{let e=ji(gn);if(!e)throw new Error("useEminTable must be used within a EminTableProvider");return e};import{useEffect as fn,useMemo as vn,useRef as el,useState as bn}from"react";import tl from"supercluster";import{Map as ol,Marker as hn,NavigationControl as al}from"react-map-gl/maplibre";import"maplibre-gl/dist/maplibre-gl.css";import{jsx as ze,jsxs as il}from"react/jsx-runtime";var Bb=({markers:e,cluster:t,mapStyleUrl:a,initialView:o,...n})=>ze(xn,{markers:e,cluster:t,mapStyleUrl:a,initialView:o,...n,children:ze(rl,{})}),rl=()=>{let e=Wo(),{markers:t,cluster:a,initialView:o,DEFAULT_MIN_ZOOM:n,MAP_MIN_BOUND:s,MAP_MAX_BOUND:r}=e,l=P=>Math.max(s,Math.min(r,P)),c=P=>P?.properties?.cluster===!0,p=()=>{if(!J.current)return;if(!a){F([]);return}let P=J.current.getBounds();if(!P)return;let it=[P.getWest(),P.getSouth(),P.getEast(),P.getNorth()],Tt=Math.round(l(J.current.getZoom()??n)),lt=$.getClusters(it,Tt);F(lt)},N=({viewState:P})=>{if(v(P),typeof e?.onMove=="function")try{e?.onMove({viewState:P})}catch{}p()},u={...o,zoom:l(typeof o?.zoom=="number"?o?.zoom:n)},[C,v]=bn(u),[b,F]=bn([]),J=el(null),ee=typeof e?.minZoom=="number"?l(e?.minZoom):n,te=typeof e?.maxZoom=="number"?l(e?.maxZoom):r;if(ee>te){let P=ee;ee=te,te=P}let He=vn(()=>t&&t.map(P=>({type:"Feature",properties:{id:P.id},geometry:{type:"Point",coordinates:[P.lng,P.lat]}})),[t]),$=vn(()=>new tl({radius:e?.radius??40,maxZoom:te,minZoom:ee}),[]);return fn(()=>{a&&$.load(He)},[$,He,a]),fn(()=>{p()},[$,C,e.cluster]),il(ol,{ref:J,mapStyle:e?.mapStyleUrl,initialViewState:u,...e,minZoom:ee,maxZoom:te,style:{width:"100%",height:"100%"},onMove:N,onLoad:p,children:[ze(al,{position:"top-left"}),(a?b:t||[]).map(P=>a&&c(P)?ze(sl,{item:P,index:$,mapRef:J,effectiveMaxZoom:te}):ze(nl,{item:P}))]})},nl=({item:e})=>{let{cluster:t,markers:a}=Wo(),o=t?e.properties?.id:e.id,n=t?e.geometry.coordinates[0]:e.lng,s=t?e.geometry.coordinates[1]:e.lat,r=t?a?.find(l=>l.id===o)??{id:o,lat:s,lng:n}:e;return ze(hn,{longitude:n,latitude:s,anchor:"center",children:r?.component??ze("div",{className:"w-3 h-3 rounded-full border-2 border-white shadow-md bg-blue-600 dark:bg-blue-500",title:"Marker"})},`p-${o}`)},sl=({item:e,index:t,mapRef:a,effectiveMaxZoom:o})=>{let[n,s]=e.geometry.coordinates,r=e.properties.point_count;return ze(hn,{longitude:n,latitude:s,anchor:"center",children:ze("div",{onClick:()=>{let c=Math.min(t.getClusterExpansionZoom(e.properties.cluster_id),o);a.current&&a.current.flyTo({center:[n,s],zoom:c,duration:500})},title:`${r}`,className:"cursor-pointer select-none flex items-center justify-center w-9 h-9 rounded-full border-2 shadow-md border-gray-500 bg-gray-900 text-white dark:bg-gray-800 dark:text-gray-200 font-bold text-xs",children:r})},`c-${e.properties.cluster_id}`)};import{createContext as ll,useContext as cl,useEffect as ml,useState as qo}from"react";import{jsx as dl}from"react/jsx-runtime";var Nn=ll({}),xn=({children:e,markers:t,mapStyleUrl:a,initialView:o,...n})=>{let s="https://demotiles.maplibre.org/style.json",[N,u]=qo(t),[C,v]=qo(!0),[b,F]=qo(a||s),J={DEFAULT_STYLE:s,DEFAULT_MIN_ZOOM:1,DEFAULT_MAX_ZOOM:16,MAP_MIN_BOUND:0,MAP_MAX_BOUND:22,markers:N,setMarkers:u,cluster:C,setCluster:v,mapStyleUrl:b,setMapStyleUrl:F,initialView:o||{longitude:0,latitude:0,zoom:1},...n},ee=fo();return ml(()=>{F(ee==="dark"?"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json":"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json")},[ee]),dl(Nn.Provider,{value:J,children:e})},Wo=()=>{let e=cl(Nn);if(!e)throw new Error("useWorldMap must be used within a WorldMapProvider");return e};import{IconChevronRight as wn}from"@tabler/icons-react";import{Fragment as Cn,jsx as w,jsxs as st}from"react/jsx-runtime";var kn=({items:e})=>w(Cn,{children:e.map(t=>t.items&&t.items.length>0?w(io,{asChild:!0,defaultOpen:!!(t.isActive||t.hasActiveChild),className:"group/collapsible",children:st(Ct,{children:[w(lo,{asChild:!0,className:"cursor-pointer",children:st(Ze,{tooltip:t.title,children:[t.icon&&w(i,{iconName:t.icon}),w("span",{children:t.title}),w(wn,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),w(co,{children:w(mo,{children:t.items.map(a=>w(fa,{children:a.items&&a.items.length>0?w(io,{asChild:!0,defaultOpen:!!(a.isActive||a.hasActiveChild),className:"group/collapsible",children:st(Cn,{children:[w(lo,{asChild:!0,className:"cursor-pointer",children:st(po,{className:g(a.isActive&&"bg-muted font-medium text-foreground dark:bg-muted/50"),children:[a.icon&&w(i,{iconName:a.icon}),w("span",{children:a.title}),w(wn,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),w(co,{children:w(mo,{children:w(kn,{items:a.items})})})]})}):w(po,{asChild:!0,className:g(a.isActive&&"bg-muted font-medium text-foreground dark:bg-muted/50"),children:st(yn,{href:a.route_name?route(a.route_name,a.payload??{}):"#",children:[a.icon&&w(i,{iconName:a.icon}),w("span",{children:a.title})]})})},a.title))})})]})},t.title):w(Ct,{children:w(Ze,{asChild:!0,tooltip:t.title,className:g(t.isActive&&"bg-muted font-medium text-foreground dark:bg-muted/50"),children:st(yn,{href:t.route_name?route(t.route_name,t.payload??{}):"#",children:[t.icon&&w(i,{iconName:t.icon}),w("span",{children:t.title})]})})},t.title))}),ko=({sidebarMenu:e})=>{let t=ul(null),a=gl(),o=()=>{if(t.current&&a?.props){let s=`nav-scroll-${window.location.pathname}`;localStorage.setItem(s,t.current.scrollTop.toString())}},n=()=>{if(t.current&&a?.props){let s=`nav-scroll-${window.location.pathname}`,r=localStorage.getItem(s);r&&(t.current.scrollTop=parseInt(r,10))}};return pl(()=>{let s=setTimeout(()=>{n()},100);return()=>clearTimeout(s)},[]),w("div",{ref:t,onScroll:o,children:e.map((s,r)=>st(ga,{children:[s.title&&w(Bt,{children:s.title}),w(_t,{className:"!flex ",children:w(kn,{items:s.items})})]},s.title||`section-${r}`))})};export{ko as a,hr as b,Hn as c,On as d,zl as e,Gl as f,Wt as g,Cr as h,kr as i,Qn as j,Cc as k,Xe as l,qt as m,Io as n,Eo as o,Lc as p,Sr as q,Mr as r,Do as s,ft as t,Kt as u,Yc as v,Ir as w,Er as x,lm as y,Dr as z,Ar as A,vt as B,$r as C,pu as D,Gr as E,Fu as F,ri as G,Bo as H,ni as I,si as J,Yu as K,ng as L,Xr as M,pi as N,_o as O,zo as P,Ho as Q,Oo as R,ui as S,jt as T,yt as U,Kg as V,wi as W,St as X,ve as Y,Mt as Z,Rr as _,Gf as $,Vo as aa,Bi as ba,Jf as ca,rv as da,mv as ea,dv as fa,Rv as ga,sn as ha,ln as ia,cn as ja,mn as ka,he as la,Bb as ma,xn as na,Wo as oa,Fr as pa,Br as qa,ad as ra,vs as sa,rd as ta,Lo as ua,Ns as va,_r as wa,ys as xa,Ro as ya,Cs as za,ks as Aa,zr as Ba,Hr as Ca,Ps as Da,Qt as Ea,Ls as Fa,Rs as Ga,Fs as Ha,Q as Ia,oe as Ja,Or as Ka,Ur as La,Zs as Ma};
|
|
1
|
+
import{a as vo}from"./chunk-LMJAV6MI.js";import{a as ho}from"./chunk-V2NMVGDZ.js";import{a as No}from"./chunk-FLR2KO5I.js";import{a as Co,b as fr,c as vr}from"./chunk-UB5QQGPD.js";import{a as bo}from"./chunk-ZYAM2VUN.js";import{a as or,c as ar}from"./chunk-6POIVEDA.js";import{a as Gt,b as yo}from"./chunk-PZEX7JNQ.js";import{a as mt}from"./chunk-E2ZUBHVJ.js";import{a as xo}from"./chunk-GVFPSY2S.js";import{a as Ga,b as Za}from"./chunk-U7CCM2TG.js";import{b as Ja,c as er}from"./chunk-X2FAUFZV.js";import{a as Te}from"./chunk-OFK4F5KR.js";import{a as Da}from"./chunk-TGINGSSX.js";import{a as ma,b as da,i as pa,k as ua,l as ga,m as Bt,p as _t,q as Ct,r as Ze,v as mo,w as fa,x as po}from"./chunk-3MGLNOJ3.js";import{a as sa,b as ia,c as la,d as ca}from"./chunk-2UOSQSPQ.js";import{a as ta,b as oa,d as aa,e as ra,g as na}from"./chunk-AW6EOFKV.js";import{a as tr}from"./chunk-EEYT23VU.js";import{a as Ta}from"./chunk-7NKFSFMC.js";import{a as dr,b as pr,c as ur,e as Zt,f as gr,g as wo}from"./chunk-A6BBNBOV.js";import{a as x}from"./chunk-XEBYLJU7.js";import{a as La,b as Ra,c as uo,e as Fa,f as Ba}from"./chunk-OTSYJWIO.js";import{a as Ht,b as Ot}from"./chunk-OTBFBEQW.js";import{a as Sa,c as Ma,d as Pa,e as Ia,g as Ea}from"./chunk-WNFQKV4B.js";import{a as ea}from"./chunk-CZM7FKLS.js";import{b as rr,c as nr,d as sr,e as ir,f as lr,h as cr,i as mr}from"./chunk-GBXDCZP6.js";import{a as Ne,b as dt,d as Wa,f as ye,g as qa,h as Vt,i as Ka,j as Qa}from"./chunk-QFUZ6MVT.js";import{a as Ie,c as Ee,d as De,e as _a,f as We,g as Ut,j as za,k as go}from"./chunk-AYYFGDAO.js";import{a as ja}from"./chunk-566X7DTI.js";import{a as k}from"./chunk-DSY4KVMF.js";import{a as D}from"./chunk-QKGQOXDM.js";import{a as Ha,b as Oa,c as Ua,e as Va,f as $a}from"./chunk-3H6NZAII.js";import{a as V,b as q,c as qe,d as $t,e as Xa,f as K,g as Ya}from"./chunk-3DBYUBWW.js";import{a as zt}from"./chunk-M5QT5SFN.js";import{a as io,b as lo,c as co}from"./chunk-EV4GZ2HL.js";import{a as ge}from"./chunk-65LRDGYI.js";import{a as va,b as ba,e as ha,f as xa,g as Na,h as ya,i as wa,j as Ca,k as ka}from"./chunk-S46ZLDUA.js";import{b as m}from"./chunk-TVCWAJFT.js";import{b as Ue}from"./chunk-YLI3WTOQ.js";import{a as Aa}from"./chunk-SO7A4MJT.js";import{a as ie,b as Oe,c as le,d as ce}from"./chunk-PRCYNFKC.js";import{a as i}from"./chunk-G4EEZUTC.js";import{b as kt,c as fo}from"./chunk-ZYEQMWUG.js";import{a as g,b as xe,c as Jo,d as Pe,e as R}from"./chunk-GND5KQRZ.js";import{a as br}from"./chunk-P5HBVZKY.js";import{a as jo}from"./chunk-5RKCSYZG.js";import{useEffect as pl,useRef as ul}from"react";import{Link as yn,usePage as gl}from"@inertiajs/react";import{jsx as Ae,jsxs as Le}from"react/jsx-runtime";var hr=({icon:e=Ae(i,{iconName:"IconAlertCircleFilled",className:"opacity-80"}),title:t="Confirm",content:a="Are you sure?",onConfirm:o=()=>{},confirmText:n=Le("div",{className:"flex items-center gap-1",children:[Ae(i,{iconName:"IconCircleCheck"}),"Confirm"]}),onCancel:s=()=>{},cancelText:r=Le("div",{className:"flex items-center gap-1",children:[Ae(i,{iconName:"IconCircleX"}),"Cancel"]}),children:l})=>Le(va,{children:[Ae(ba,{asChild:!0,children:l}),Le(ha,{children:[Le("div",{className:"flex flex-col items-center gap-2",children:[Ae("div",{className:"flex size-auto p-2.5 shrink-0 items-center justify-center rounded-full border","aria-hidden":"true",children:e}),Le(xa,{children:[Ae(ya,{className:"text-center",children:t}),Ae(wa,{children:a})]})]}),Le(Na,{children:[Le(ka,{className:"flex-1",onClick:s,children:[typeof r=="string"&&Ae(i,{iconName:"IconX"}),r]}),Le(Ca,{className:"flex-1",onClick:o,children:[typeof n=="string"&&Ae(i,{iconName:"IconCheck"}),n]})]})]})]});import{useEffect as zn,useState as So}from"react";import{jsx as H,jsxs as Ke}from"react/jsx-runtime";var Hn=({item:e,onChange:t,children:a})=>e.editable!==!1?Ke(ie,{trigger:"click",isActive:e.editable,children:[H(le,{children:a}),Ke(ce,{children:[H(Oe,{children:e.label}),H(On,{item:e,onChange:t})]})]}):a,On=({item:e,onChange:t,...a})=>{let o=e?.type,[n,s]=So(e.value),[r,l]=So(e.value);zn(()=>{s(e.value),l(e.value)},[e.value]);let[c,p]=So(""),N=async b=>{if(!(e.editable===!1||!t)){console.log(e.options);try{if(!u(b))return;await t(e.key,b??n)&&s(b)}catch(F){s(e.value),p(F.message)}}},u=b=>!0,C=()=>r!==n&&N(n),v;switch(o){case"number":case"text":case"email":case"password":case"tel":case"url":v=H(D,{type:o,value:n,onBlur:C,onChange:b=>s(b.target.value),"aria-invalid":c?"true":"false"},e.key);break;case"textarea":v=H(Da,{value:n,onBlur:C,onChange:b=>s(b.target.value),"aria-invalid":c?"true":"false"},e.key);break;case"select":v=Ke(Sa,{value:n,onValueChange:b=>N(b),children:[H(Ia,{children:e?.options&&e.options.length>0&&e.options.map(b=>H(Ea,{value:b.value,className:"capitalize",children:b.label},b.value))}),H(Pa,{size:"sm",className:"capitalize w-full",children:H(Ma,{placeholder:"Select an option",children:e?.options?.find(b=>b.value===r)?.label??typeof n},n)})]},e.key);break;case"checkbox":v=H("div",{className:"flex items-center gap-2",children:Ke(x,{children:[H(zt,{checked:n,onCheckedChange:b=>N(b)},e.key),e.label]})});break;case"switch":v=H("div",{className:"flex items-center gap-2",children:Ke(x,{children:[H(Ta,{checked:n,onCheckedChange:b=>N(b)},e.key),e.label]})});break;case"radio":case"file":return null}return Ke("div",{className:"grid gap-1 w-full",children:[v,c&&H("p",{className:"text-red-500 text-sm",children:c})]})},zl=({items:e,onChange:t})=>e.map(a=>Ke("div",{className:g("flex flex-col items-start justify-start",a.value?.toString()?.length>30?"col-span-2":""),children:[H("p",{className:"text-sm text-muted-foreground capitalize",children:a?.label}),H(Hn,{item:a,onChange:a?.onChange??t,children:H("span",{className:"text-sm",children:a?.value??"-"})},a.key)]},a.key));import{jsx as O,jsxs as Qe}from"react/jsx-runtime";var xr=[{color:"default",labelSelected:"border-primary/75 bg-primary/5",label:"hover:border-primary/50",iconSelected:"bg-primary/20",textSelected:"text-primary"},{color:"cyan",labelSelected:"border-cyan-500 bg-cyan-50 dark:bg-cyan-900/10",label:"hover:border-cyan-300",iconSelected:"bg-cyan-100 dark:bg-cyan-900/30",textSelected:"text-cyan-600 dark:text-cyan-400"},{color:"blue",labelSelected:"border-blue-500 bg-blue-50 dark:bg-blue-900/10",label:"hover:border-blue-300",iconSelected:"bg-blue-100 dark:bg-blue-900/30",textSelected:"text-blue-600 dark:text-blue-400"},{color:"green",labelSelected:"border-green-500 bg-green-50 dark:bg-green-900/10",label:"hover:border-green-300",iconSelected:"bg-green-100 dark:bg-green-900/30",textSelected:"text-green-600 dark:text-green-400"},{color:"red",labelSelected:"border-red-500 bg-red-50 dark:bg-red-900/10",label:"hover:border-red-300",iconSelected:"bg-red-100 dark:bg-red-900/30",textSelected:"text-red-600 dark:text-red-400"},{color:"orange",labelSelected:"border-orange-500 bg-orange-50 dark:bg-orange-900/10",label:"hover:border-orange-300",iconSelected:"bg-orange-100 dark:bg-orange-900/30",textSelected:"text-orange-600 dark:text-orange-400"},{color:"yellow",labelSelected:"border-yellow-500 bg-yellow-50 dark:bg-yellow-900/10",label:"hover:border-yellow-300",iconSelected:"bg-yellow-100 dark:bg-yellow-900/30",textSelected:"text-yellow-600 dark:text-yellow-400"}],Gl=({section:e})=>{let t=e.type==="checkbox",a=t?Array.isArray(e.value)?e.value:[]:[e.value],o=r=>{if(!t){e.onSave({key:e.key,value:r});return}let l=a.includes(r)?a.filter(c=>c!==r):[...a,r];e.onSave({key:e.key,value:l})},n=t?"div":Ht,s=t?{className:`grid grid-cols-1 md:grid-cols-${e.options.length} gap-4`}:{className:`grid grid-cols-1 md:grid-cols-${e.options.length} gap-4`,value:e.value??null,onValueChange:r=>e.onSave({key:e.key,value:r})};return Qe("div",{className:"space-y-6",children:[O(ge,{icon:typeof e.icon=="string"?O(i,{iconName:e.icon,size:24}):e.icon,title:e.title,description:e.description}),O(n,{...s,value:t?void 0:String(e.value??""),children:e.options.map((r,l)=>{let c=r.color??"default",p=xr.find(u=>u.color===c)||xr[0],N=t?r.key&&a.includes(r.key):e.value===r.value;return Qe("div",{children:[!t&&O(Ot,{id:`${e.key}:${r.value}`,value:String(r.value),className:"sr-only"}),O(x,{htmlFor:t?void 0:`${e.key}:${r.value}`,onClick:()=>t&&r.key&&o(r.key),className:`cursor-pointer border-2 rounded-lg p-4 flex items-center justify-center transition-all shadow-sm hover:shadow-md border-border ${N?p.labelSelected:p.label}`,children:Qe("div",{className:"flex flex-col items-center text-center space-y-3",children:[r.icon&&O("div",{className:`p-3 rounded-full ${N?g(p.iconSelected,p.textSelected):"bg-muted text-muted-foreground"}`,children:typeof r.icon=="string"?O(i,{iconName:r.icon,size:24}):r.icon}),Qe("div",{children:[Qe("div",{className:"flex items-center justify-center gap-1 font-medium",children:[r.title&&O("span",{children:r.title}),r.help_text&&Qe(ie,{trigger:"hover",children:[O(le,{children:O(i,{iconName:"IconHelpCircle",size:16,className:"mt-[1px] text-muted-foreground"})}),Qe(ce,{className:"w-auto",children:[O(Oe,{children:"What is this?"}),O("div",{className:"p-2 my-2 mx-3 text-sm break-all",children:r.help_text})]})]})]}),r.description&&O("p",{className:"text-xs text-muted-foreground mt-1",children:r.description})]}),O("div",{className:"w-5 h-5",onClick:u=>{u.stopPropagation(),t&&r.key&&o(r.key)},children:N?O("div",{className:`border border-primary/20 ${t?"rounded-sm":"rounded-full"} bg-muted flex h-5 w-5 my-auto flex-shrink-0 items-center justify-center`,children:O(i,{iconName:"IconCheck",className:"w-3 h-3"})}):O("span",{className:`border border-primary/20 ${t?"rounded-sm":"rounded-full"} flex h-5 w-5 my-auto flex-shrink-0`})})]})})]},l)})}),e.extra?typeof e.extra=="function"?e.extra():e.extra:null]},e.key)};import{Transition as Un}from"@headlessui/react";import{IconCircleCheck as Vn,IconLoader2 as $n}from"@tabler/icons-react";import{Fragment as Gn,jsx as pt,jsxs as Nr}from"react/jsx-runtime";var Wt=({processing:e,recentlySuccessful:t,processingText:a="Saving...",successText:o="Saved!",children:n,className:s,...r})=>pt(m,{disabled:e||t,className:g("flex items-center gap-2",s),variant:"outline",...r,children:t?pt(Un,{show:t,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:Nr("div",{className:"flex items-center text-sm text-center text-muted-foreground mx-auto",children:[pt(Vn,{}),pt("span",{className:"ml-2",children:o})]})}):e?Nr(Gn,{children:[pt($n,{className:"animate-spin"}),pt("span",{children:a})]}):n});import{usePage as Li}from"@inertiajs/react";import{Link as Dt,usePage as on}from"@inertiajs/react";import{Link as Zn}from"@inertiajs/react";import{IconChevronRight as Wn}from"@tabler/icons-react";import{jsx as L,jsxs as ut}from"react/jsx-runtime";var yr=({item:e})=>L(uo,{className:"list-none",children:L(Zn,{href:route(e.route_name,e.payload??{}),legacyBehavior:!0,passHref:!0,children:ut(m,{variant:"ghost",className:g("w-full justify-start font-normal",e.isActive&&"bg-accent text-accent-foreground"),children:[e.icon&&L(i,{iconName:e.icon,className:"h-4 w-4"}),L("span",{children:e.title})]})})}),qn=({item:e})=>ut("li",{className:"relative list-none [&:hover>div.flyout-menu]:block",children:[ut(m,{variant:"ghost",className:g("flex w-full cursor-pointer items-center justify-between font-normal transition-colors hover:bg-accent hover:text-accent-foreground",e.isActive&&"bg-accent text-accent-foreground"),children:[ut("div",{className:"flex items-center gap-2",children:[e.icon&&L(i,{iconName:e.icon,className:"h-4 w-4"}),L("span",{children:e.title})]}),L(Wn,{className:"h-4 w-4 text-muted-foreground"})]}),L("div",{className:"flyout-menu absolute left-full top-0 z-50 hidden pl-1",children:L("ul",{className:"flex w-auto flex-col gap-1 rounded-md border bg-popover p-2 text-popover-foreground shadow-md animate-in fade-in zoom-in-95",children:e.items?.map(t=>L("li",{children:L(wr,{item:t})},t.title))})})]}),wr=({item:e})=>e?.items&&e?.items?.length>0?L(qn,{item:e}):L(yr,{item:e}),Cr=({menuItems:e})=>e?L(La,{viewport:!1,delayDuration:0,children:L(Ra,{className:"flex items-center",children:e.map(t=>t.items&&t.items.length>0?ut(uo,{children:[ut(Fa,{className:g("flex items-center gap-2",t.isActive&&"bg-accent text-accent-foreground"),children:[t.icon&&L(i,{iconName:t.icon,className:"h-4 w-4"}),L("span",{children:t.title})]}),L(Ba,{className:"!overflow-visible min-w-[200px]",children:L("ul",{className:"flex w-auto flex-col gap-1 p-2",children:t.items.map(a=>L("li",{children:L(wr,{item:a})},a.title))})})]},t.title):L(yr,{item:t}))})}):null;import{jsx as Mo,jsxs as Kn}from"react/jsx-runtime";var kr=({className:e,...t})=>{let{appearance:a,updateAppearance:o}=Xe(),n=xe();return Kn(m,{variant:"ghost",size:"icon",onClick:()=>{R("click",n),o(a==="dark"?"light":"dark")},className:g("group cursor-pointer",e),...t,children:[Mo(i,{iconName:"IconSun",className:"opacity-80 group-hover:opacity-100 !size-5 h-9 w-9 rotate-0 scale-100 transition-all dark:rotate-90 dark:scale-0"}),Mo(i,{iconName:"IconMoon",className:"opacity-80 group-hover:opacity-100 !size-5 absolute h-9 w-9 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),Mo("span",{className:"sr-only",children:"Temay\u0131 de\u011Fi\u015Ftir"})]})};import{jsx as me,jsxs as gt}from"react/jsx-runtime";function Qn({className:e="",...t}){let{appearance:a,updateAppearance:o}=Xe();return me("div",{className:e,...t,children:gt(Ie,{children:[me(Ee,{asChild:!0,children:gt(m,{variant:"ghost",size:"icon",className:"h-9 w-9 rounded-md",children:[(()=>{switch(a){case"dark":return me(i,{iconName:"IconMoon",className:"h-5 w-5"});case"light":return me(i,{iconName:"IconSun",className:"h-5 w-5"});default:return me(i,{iconName:"IconDeviceDesktop",className:"h-5 w-5"})}})(),me("span",{className:"sr-only",children:"Toggle theme"})]})}),gt(De,{align:"end",children:[me(We,{onClick:()=>o("light"),children:gt("span",{className:"flex items-center gap-2",children:[me(i,{iconName:"IconSun",className:"h-5 w-5"}),"Light"]})}),me(We,{onClick:()=>o("dark"),children:gt("span",{className:"flex items-center gap-2",children:[me(i,{iconName:"IconMoon",className:"h-5 w-5"}),"Dark"]})}),me(We,{onClick:()=>o("system"),children:gt("span",{className:"flex items-center gap-2",children:[me(i,{iconName:"IconDeviceDesktop",className:"h-5 w-5"}),"System"]})})]})]})})}import{jsx as Po,jsxs as Xn}from"react/jsx-runtime";var Cc=({className:e="",...t})=>{let{appearance:a,updateAppearance:o}=Xe(),n=[{value:"light",icon:"IconSun",label:"Light"},{value:"dark",icon:"IconMoon",label:"Dark"},{value:"system",icon:"IconDeviceDesktop",label:"System"}];return Po("div",{className:g("inline-flex gap-1 rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800",e),...t,children:n.map(({value:s,icon:r,label:l})=>Xn("button",{onClick:()=>o(s),className:g("flex items-center rounded-md px-3.5 py-1.5 transition-colors",a===s?"bg-white shadow-xs dark:bg-neutral-700 dark:text-neutral-100":"text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60"),children:[Po(i,{iconName:r,className:"-ml-1 h-4 w-4"}),Po("span",{className:"ml-1.5 text-sm",children:l})]},s))})};import{useCallback as Yn,useEffect as jn,useState as Jn}from"react";function Xe(){let[e,t]=Jn("system"),a=Yn(o=>{t(o),localStorage.setItem("appearance",o),Jo("appearance",o),qt(o),kt()},[]);return jn(()=>{let o=localStorage.getItem("appearance");return a(o||"system"),()=>Io()?.removeEventListener("change",Eo)},[a]),{appearance:e,updateAppearance:a}}var es=()=>typeof window>"u"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,qt=e=>{let t=e==="dark"||e==="system"&&es();document.documentElement.classList.toggle("dark",t)},Io=()=>typeof window>"u"?null:window.matchMedia("(prefers-color-scheme: dark)"),Eo=()=>{let e=localStorage.getItem("appearance");qt(e||"system"),kt()};function Lc(){let e=localStorage.getItem("appearance")||"system";qt(e),Io()?.addEventListener("change",Eo)}import{Root as ts,Image as os,Fallback as as}from"@radix-ui/react-avatar";import{jsx as To}from"react/jsx-runtime";function Sr({className:e,...t}){return To(ts,{"data-slot":"avatar",className:g("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function Mr({className:e,...t}){return To(os,{"data-slot":"avatar-image",className:g("aspect-square size-full",e),...t})}function Do({className:e,...t}){return To(as,{"data-slot":"avatar-fallback",className:g("bg-muted flex size-full items-center justify-center rounded-[inherit] text-xs",e),...t})}import{Fragment as rs,jsx as B,jsxs as Re}from"react/jsx-runtime";var ft=({user:e,type:t="circle",className:a,...o})=>{let n=Ga(e);return Re("div",{className:g("relative",a),children:[B(Sr,{className:g(t==="circle"?"rounded-full":"rounded-sm",a),...o,children:e?e.avatar?B(Mr,{src:Pe(e.avatar),alt:e?.name,title:"Last seen at "+new Date(e?.last_seen_at??"").toLocaleString()}):B(Do,{className:"capitalize bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white",children:e?.name?.slice(0,1)}):B(Do,{className:"capitalize bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white",children:Re(ie,{trigger:"hover",children:[B(le,{children:B(i,{iconName:"IconSpy",className:"w-4 h-4",stroke:"1.5"})}),Re(ce,{className:"w-auto",children:[B(Oe,{children:"What does it mean?"}),B("div",{className:"p-2 my-2 mx-3 text-sm break-all",children:"User is not available (Guest)"})]})]})})}),B("span",{className:`border-background absolute rounded-full -end-0.5 -bottom-0.5 size-3 border-2 ${Za(n)}`,children:B("span",{className:"sr-only",children:n})})]})},Kt=({user:e,settings:t,className:a,...o})=>Re("div",{className:g("grid gap-1",a),...o,children:[Re("span",{className:"block text-sm font-medium text-foreground capitalize flex items-center gap-1",children:[Re("div",{className:"flex items-center gap-1",children:[t?.showName!==!1&&B("span",{style:{textTransform:"lowercase"},children:e?.name}),t?.showId!==!1&&Re("span",{className:"text-muted-foreground text-xs",children:["#",e?.id]})]}),t?.showRole!==!1&&B("div",{className:"flex h-4"})]}),t?.showEmail!==!1&&B("span",{className:"block text-xs text-foreground/50",children:e?.email})]}),Yc=({user:e,settings:t,...a})=>B(rs,{children:Re(ie,{trigger:"hover",isActive:t?.showPopover!==!1,children:[B(le,{children:t?.showAvatar!==!1&&B(ft,{user:e,type:"circle"})}),B(ce,{className:"w-auto max-w-[250px] break-all",children:B("div",{className:"text-sm break-all",children:Re("div",{className:"flex items-center gap-2",children:[t?.showAvatar!==!1&&B(ft,{user:e,type:"square"}),B(Kt,{user:e,settings:t})]})})})]})});import{Link as Pr,usePage as Ao}from"@inertiajs/react";import{Fragment as ns,jsx as T,jsxs as Fe}from"react/jsx-runtime";var Ir=({settings:e})=>{let{user:t}=Ao().props.auth,a=br();return Fe(ns,{children:[T(za,{className:"p-0 font-normal",children:Fe("div",{className:"flex items-center gap-2 px-1 text-left text-sm",children:[T(ft,{user:t,type:"square"}),T(Kt,{settings:e,className:"py-2",user:t})]})}),T(go,{}),T(_a,{children:T(We,{asChild:!0,children:Fe(Pr,{className:"block w-full",href:route("user"),as:"button",prefetch:!0,onClick:a,children:[T(i,{iconName:"IconUserSquare",className:"mr-2"}),"My Account"]})})}),T(go,{}),T(We,{asChild:!0,children:Fe(Pr,{className:"block w-full",method:"post",href:route("logout"),as:"button",onClick:a,children:[T(i,{iconName:"IconLogout",className:"mr-2"}),"Log out"]})})]})},Er=({showName:e=!0})=>{let{user:t}=Ao().props.auth;return Fe(Ie,{children:[T(Ee,{asChild:!0,children:Fe("div",{className:"flex items-center gap-3 cursor-pointer",children:[Fe("span",{className:"text-sm",children:["Hello ",T("span",{className:"font-bold",children:t.name})]}),T(m,{variant:"ghost",className:"size-8 rounded-full",children:T(ft,{user:t,type:"circle"})})]})}),T(De,{className:"w-56",children:T(Ir,{})})]})},lm=()=>{let{user:e}=Ao().props.auth,{isMobile:t}=ma();return T(_t,{children:T(Ct,{children:Fe(Ie,{children:[T(Ee,{asChild:!0,children:Fe(Ze,{size:"lg",className:"data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",children:[T(ft,{user:e,type:"square"}),T(Kt,{settings:{showRole:!1,showId:!1},user:e,className:"py-2"}),T(i,{iconName:"IconDotsVertical",className:"ml-auto size-4"})]})}),T(De,{className:"w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",side:t?"bottom":"right",sideOffset:4,children:T(Ir,{settings:{showRole:!1,showId:!1}})})]})})})};import{usePage as ss}from"@inertiajs/react";import{jsx as is}from"react/jsx-runtime";var Dr=()=>{let{url:e}=ss(),t=[],a=[];t.push({title:"My Account",icon:"IconUserSquare",route_name:"user"}),a.push({title:"Dashboard",route_name:"dashboard",icon:"IconBrandTabler"});let n=mt([{title:"Main Menu",items:t}],e)[0];return is(St,{rightNavItems:a,mainMenu:n})};import{Link as ls}from"@inertiajs/react";import{Fragment as cs}from"react";import{Fragment as ms,jsx as Ye,jsxs as Tr}from"react/jsx-runtime";function Ar({breadcrumbs:e}){return Ye(ms,{children:e.length>0&&Ye(Ha,{children:Ye(Oa,{children:e.map((t,a)=>{let o=a===e.length-1;return Tr(cs,{children:[Tr(Ua,{className:"flex items-center gap-2",children:[t.icon&&Ye(i,{iconName:t.icon,size:16,className:o?"text-primary":"text-muted-foreground"}),o?Ye(Va,{children:t.title}):Ye(ls,{href:t.href??"#",children:t.title})]}),!o&&Ye($a,{})]},a)})})})})}import{jsx as je,jsxs as Lr}from"react/jsx-runtime";var vt=({children:e,breadcrumbs:t,...a})=>{if(typeof window>"u")return je(Rr,{});let o=[{title:"My Account",href:route("user"),icon:"IconUserSquare"},...t||[]];return Lr(Mt,{className:"mt-17",children:[je(Dr,{}),Lr("main",{className:"mx-auto flex h-full w-full max-w-7xl space-y-8 flex-1 flex-col gap-1 rounded-xl",...a,children:[o.length>0?je("div",{className:"border-sidebar-border/70 flex w-full border-b",children:je("div",{className:"mx-auto flex h-12 w-full items-center justify-center px-4 text-neutral-500 md:max-w-7xl",children:je(Ar,{breadcrumbs:o})})}):je("div",{className:"h-12"}),je("div",{className:"@container/main px-7",children:e})]})]})};import{useForm as qs}from"@inertiajs/react";import{useRef as Vr}from"react";import{toast as Ks}from"sonner";import{useForm as ds,usePage as ps}from"@inertiajs/react";import{toast as us}from"sonner";var Fr=()=>{let t=ps().props.app.media_base_path,{data:a,setData:o,post:n,processing:s,errors:r,reset:l}=ds({email:"",password:"",remember:!1});return{data:a,setData:o,post:n,processing:s,errors:r,reset:l,submit:p=>{p.preventDefault(),us.promise(new Promise((N,u)=>{n(route("login"),{onSuccess:()=>R("intro",t),onFinish:()=>{l("password"),N(!0)},onError:()=>{R("soft-alert",t),u(!1)}})}),{loading:"Logging in...",success:"Login successful!",error:"Login failed!"})}}};import{useState as gs}from"react";import{Head as fs}from"@inertiajs/react";import{Fragment as bs,jsx as _,jsxs as de}from"react/jsx-runtime";var Br=({status:e,canResetPassword:t})=>{let{data:a,setData:o,post:n,processing:s,errors:r,reset:l,submit:c}=Fr();return de(bs,{children:[de("form",{className:"flex flex-col gap-6",onSubmit:c,children:[de("div",{className:"grid gap-6",children:[de("div",{className:"grid gap-2",children:[_(x,{htmlFor:"email",children:"Email address"}),de("div",{className:"group relative",children:[_(D,{id:"email",type:"email",required:!0,autoFocus:!0,tabIndex:1,autoComplete:"email",value:a.email,onChange:p=>o("email",p.target.value),placeholder:"email@example.com",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1","aria-invalid":!!r.email}),_("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:_(i,{iconName:"IconMail",size:16})})]}),_(k,{message:r.email})]}),de("div",{className:"grid gap-2",children:[de("div",{className:"flex items-center",children:[_(x,{htmlFor:"password",children:"Password"}),t&&_(Te,{href:route("password.request"),className:"ml-auto text-sm",tabIndex:5,children:"Forgot password?"})]}),_(Q,{id:"password",type:"password",required:!0,tabIndex:2,autoComplete:"current-password",value:a.password,onChange:p=>o("password",p.target.value),placeholder:"Password",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),_(k,{message:r.password})]}),de("div",{className:"flex items-center space-x-3",children:[_(zt,{id:"remember",name:"remember",checked:a.remember,onClick:()=>o("remember",!a.remember),tabIndex:3}),_(x,{htmlFor:"remember",children:"Remember me"})]}),de(m,{type:"submit",className:"mt-4 w-full",tabIndex:4,disabled:s,children:[s&&_(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Log in"]})]}),de("div",{className:"text-muted-foreground text-center text-sm",children:["Don't have an account?"," ",_(Te,{href:route("register"),tabIndex:5,children:"Sign up"})]})]}),e&&_("div",{className:"mb-4 text-center text-sm font-medium text-green-600",children:e})]})},ad=({trigger:e,status:t,canResetPassword:a})=>{let[o,n]=gs(!1);return de(Ne,{open:o,onOpenChange:n,children:[_(ye,{children:_(Br,{status:t,canResetPassword:a})}),_(dt,{children:e})]})},vs=({status:e,canResetPassword:t})=>_(Br,{status:e,canResetPassword:t}),rd=({status:e,canResetPassword:t})=>de(oe,{title:"Log in to your account",description:"Enter your email and password below to log in",children:[_(fs,{title:"Log in"}),_(vs,{status:e,canResetPassword:t})]});import{Head as hs}from"@inertiajs/react";import{useState as xs}from"react";import{jsx as pe,jsxs as Pt}from"react/jsx-runtime";var Lo=({callback:e})=>{let{data:t,setData:a,submit:o,processing:n,errors:s}=vo(e);return pe("form",{onSubmit:o,children:Pt("div",{className:"space-y-6",children:[Pt("div",{className:"grid gap-2",children:[pe(x,{htmlFor:"password",children:"Password"}),pe(Q,{id:"password",type:"password",name:"password",placeholder:"Password",autoComplete:"current-password",value:t.password,autoFocus:!0,onChange:r=>a("password",r.target.value),className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),pe(k,{message:s.password})]}),pe("div",{className:"flex items-center",children:Pt(m,{className:"w-full",disabled:n,children:[n&&pe(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Confirm password"]})})]})})},Ns=({trigger:e,callback:t})=>{let[a,o]=xs(!1);return Pt(Ne,{open:a,onOpenChange:o,children:[pe(ye,{children:pe(Lo,{callback:s=>{t&&(t(s),o(!1))}})}),pe(dt,{children:e})]})},_r=()=>pe(Lo,{}),ys=()=>Pt(oe,{title:"Confirm your password",description:"This is a secure area of the application. Please confirm your password before continuing.",children:[pe(hs,{title:"Confirm password"}),pe(_r,{})]});import{Head as ws}from"@inertiajs/react";import{Fragment as Ss,jsx as ae,jsxs as Ve}from"react/jsx-runtime";var Ro=({status:e})=>{let{data:t,setData:a,submit:o,post:n,processing:s,errors:r}=bo();return Ve(Ss,{children:[e&&ae("div",{className:"mb-4 text-center text-sm font-medium text-green-600",children:e}),Ve("div",{className:"space-y-6",children:[Ve("form",{onSubmit:o,children:[Ve("div",{className:"grid gap-2",children:[ae(x,{htmlFor:"email",children:"Email address"}),Ve("div",{className:"group relative",children:[ae(D,{id:"email",type:"email",name:"email",autoComplete:"off",value:t.email,autoFocus:!0,onChange:l=>a("email",l.target.value),placeholder:"email@example.com","aria-invalid":!!r.email,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),ae("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:ae(i,{iconName:"IconMail",size:16})})]}),ae(k,{message:r.email})]}),ae("div",{className:"my-6 flex items-center justify-start",children:Ve(m,{className:"w-full",disabled:s,children:[s&&ae(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Email password reset link"]})})]}),Ve("div",{className:"text-muted-foreground space-x-1 text-center text-sm",children:[ae("span",{children:"Or, return to"}),ae(Te,{href:route("login"),children:"log in"})]})]})]})},Cs=({status:e})=>ae(Ro,{status:e}),ks=({status:e})=>Ve(oe,{title:"Forgot password",description:"Enter your email to receive a password reset link",children:[ae(ws,{title:"Forgot password"}),ae(Ro,{status:e})]});import{Head as Ms}from"@inertiajs/react";import{jsx as X,jsxs as bt}from"react/jsx-runtime";var zr=({token:e,email:t})=>{let{data:a,setData:o,submit:n,post:s,processing:r,errors:l}=ho({token:e,email:t});return X("form",{onSubmit:n,children:bt("div",{className:"grid gap-6",children:[bt("div",{className:"grid gap-2",children:[X(x,{htmlFor:"email",children:"Email"}),X(D,{id:"email",type:"email",name:"email",autoComplete:"email",value:a.email,className:"mt-1 block w-full",readOnly:!0,onChange:c=>o("email",c.target.value)}),X(k,{message:l.email,className:"mt-2"})]}),bt("div",{className:"grid gap-2",children:[X(x,{htmlFor:"password",children:"Password"}),X(Q,{id:"password",type:"password",name:"password",autoComplete:"new-password",value:a.password,className:"mt-1 block w-full",autoFocus:!0,onChange:c=>o("password",c.target.value),placeholder:"Password"}),X(k,{message:l.password})]}),bt("div",{className:"grid gap-2",children:[X(x,{htmlFor:"password_confirmation",children:"Confirm password"}),X(Q,{id:"password_confirmation",type:"password",name:"password_confirmation",autoComplete:"new-password",value:a.password_confirmation,className:"mt-1 block w-full",onChange:c=>o("password_confirmation",c.target.value),placeholder:"Confirm password"}),X(k,{message:l.password_confirmation,className:"mt-2"})]}),bt(m,{type:"submit",className:"mt-4 w-full",disabled:r,children:[r&&X(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Reset password"]})]})})},Hr=({token:e,email:t})=>X(zr,{token:e,email:t}),Ps=({token:e,email:t})=>bt(oe,{title:"Reset password",description:"Please enter your new password below",children:[X(Ms,{title:"Reset password"}),X(Hr,{token:e,email:t})]});import{useState as Is}from"react";import{Head as Es}from"@inertiajs/react";import{IconLoader2 as Ds,IconMail as Ts,IconUserCircle as As}from"@tabler/icons-react";import{jsx as A,jsxs as fe}from"react/jsx-runtime";var Qt=()=>{let{data:e,setData:t,submit:a,processing:o,errors:n}=xo();return fe("form",{className:"flex flex-col gap-6",onSubmit:a,children:[fe("div",{className:"grid gap-6",children:[fe("div",{className:"grid gap-2",children:[A(x,{htmlFor:"name",children:"Name"}),fe("div",{className:"group relative",children:[A(D,{id:"name",type:"text",required:!0,autoFocus:!0,tabIndex:1,autoComplete:"name",value:e.name,onChange:s=>t("name",s.target.value),disabled:o,placeholder:"Full name","aria-invalid":!!n.name,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),A("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:A(As,{size:16})})]}),A(k,{message:n.name,className:"mt-2"})]}),fe("div",{className:"grid gap-2",children:[A(x,{htmlFor:"email",children:"Email address"}),fe("div",{className:"group relative",children:[A(D,{id:"email",type:"email",required:!0,tabIndex:2,autoComplete:"email",value:e.email,onChange:s=>t("email",s.target.value),disabled:o,placeholder:"email@example.com","aria-invalid":!!n.email,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),A("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:A(Ts,{size:16})})]}),A(k,{message:n.email})]}),fe("div",{className:"grid gap-2",children:[A(x,{htmlFor:"password",children:"Password"}),A(Q,{id:"password",type:"password",required:!0,tabIndex:3,autoComplete:"new-password",value:e.password,onChange:s=>t("password",s.target.value),disabled:o,placeholder:"Password","aria-invalid":!!n.password,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),A(k,{message:n.password})]}),fe("div",{className:"grid gap-2",children:[A(x,{htmlFor:"password_confirmation",children:"Confirm password"}),A(Q,{id:"password_confirmation",type:"password",required:!0,tabIndex:4,autoComplete:"new-password",value:e.password_confirmation,onChange:s=>t("password_confirmation",s.target.value),disabled:o,placeholder:"Confirm password","aria-invalid":!!n.password_confirmation,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),A(k,{message:n.password_confirmation})]}),fe(m,{type:"submit",className:"mt-2 w-full",tabIndex:5,disabled:o,children:[o&&A(Ds,{className:"h-4 w-4 animate-spin"}),"Create account"]})]}),fe("div",{className:"text-muted-foreground text-center text-sm",children:["Already have an account?"," ",A(Te,{href:route("login"),tabIndex:6,children:"Log in"})]})]})},Ls=()=>{let[e,t]=Is(!1);return A(Ne,{open:e,onOpenChange:t,children:A(ye,{children:A(Qt,{})})})},Rs=()=>A(Qt,{}),Fs=()=>fe(oe,{title:"Create an account",description:"Enter your details below to create your account",children:[A(Es,{title:"Register"}),A(Qt,{})]});import{IconEye as Bs,IconEyeOff as _s}from"@tabler/icons-react";import{useState as zs}from"react";import{jsx as ht,jsxs as Hs}from"react/jsx-runtime";var Q=({className:e,type:t,...a})=>{let[o,n]=zs(!0);return Hs("div",{className:"group relative",children:[ht(D,{id:"password",type:o?"password":"text",name:"password",placeholder:"Password",autoComplete:"current-password",autoFocus:!0,className:e,...a}),ht("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3 shrink-0",children:ht(i,{iconName:"IconLockCode",size:16})}),ht("div",{className:"text-muted-foreground hover:text-primary absolute inset-y-0 end-0 flex items-center justify-center pr-3 shrink-0 cursor-pointer",onClick:()=>n(s=>!s),children:o?ht(Bs,{size:18}):ht(_s,{size:18})})]})};import{Link as Xt,usePage as Os}from"@inertiajs/react";import{jsx as M,jsxs as re}from"react/jsx-runtime";var oe=({children:e,title:t,description:a,variant:o="simple",...n})=>re(Mt,{children:[M(St,{}),o==="simple"?M(Vs,{children:e,title:t,description:a,...n}):o==="card"?M(Us,{children:e,title:t,description:a,...n}):o==="split"?M($s,{children:e,title:t,description:a,...n}):null]}),Us=({children:e,title:t,description:a})=>M("div",{className:"bg-muted flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10",children:re("div",{className:"flex w-full max-w-md flex-col gap-6",children:[M(Xt,{href:route("home"),className:"flex items-center gap-2 self-center font-medium",children:M("div",{className:"mb-1 flex lg:w-[200px] w-[150px] items-center justify-center rounded-md",children:M(ve,{})})}),M("div",{className:"flex flex-col gap-6",children:re(V,{className:"rounded-xl",children:[re(q,{className:"px-10 pt-8 pb-0 text-center",children:[M(qe,{className:"text-xl",children:t}),M($t,{children:a})]}),M(K,{className:"px-10 py-8",children:e})]})})]})}),Vs=({children:e,title:t,description:a})=>M("div",{className:"bg-background flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10",children:M("div",{className:"w-full max-w-sm",children:re("div",{className:"flex flex-col gap-8",children:[re("div",{className:"flex flex-col items-center gap-4",children:[re(Xt,{href:route("home"),className:"flex flex-col items-center gap-2 font-medium",children:[M("div",{className:"mb-1 flex lg:w-[200px] w-[150px] items-center justify-center rounded-md",children:M(ve,{})}),M("span",{className:"sr-only",children:t})]}),re("div",{className:"space-y-2 text-center",children:[M("h1",{className:"text-xl font-medium",children:t}),M("p",{className:"text-muted-foreground text-center text-sm",children:a})]})]}),e]})})}),$s=({children:e,title:t,description:a})=>{let{name:o}=Os().props;return re("div",{className:"relative grid h-dvh flex-col items-center justify-center px-8 sm:px-0 lg:max-w-none lg:grid-cols-2 lg:px-0",children:[re("div",{className:"bg-muted relative hidden h-full flex-col p-10 text-white lg:flex dark:border-r",children:[M("div",{className:"absolute inset-0 bg-zinc-900"}),re(Xt,{href:route("home"),className:"relative z-20 flex items-center text-lg font-medium",children:[M(ve,{className:"mr-2 size-8 fill-current text-white"}),o]})]}),M("div",{className:"w-full lg:p-8",children:re("div",{className:"mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]",children:[M(Xt,{href:route("home"),className:"relative z-20 flex items-center justify-center lg:hidden",children:M(ve,{className:"h-10 fill-current text-black sm:h-12"})}),re("div",{className:"flex flex-col items-start gap-2 text-left sm:items-center sm:text-center",children:[M("h1",{className:"text-xl font-medium",children:t}),M("p",{className:"text-muted-foreground text-sm text-balance",children:a})]}),e]})})]})};import{Head as Gs}from"@inertiajs/react";import{Fragment as Ws,jsx as xt,jsxs as Yt}from"react/jsx-runtime";var Or=({status:e})=>{let{submit:t,processing:a}=No();return Yt(Ws,{children:[e==="verification-link-sent"&&xt("div",{className:"mb-4 text-center text-sm font-medium text-green-600",children:"A new verification link has been sent to the email address you provided during registration."}),Yt("form",{onSubmit:t,className:"space-y-6 text-center",children:[Yt(m,{disabled:a,variant:"secondary",children:[a&&xt(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Resend verification email"]}),xt(Te,{href:route("logout"),method:"post",className:"mx-auto block text-sm",children:"Log out"})]})]})},Ur=({status:e})=>xt(Or,{status:e}),Zs=({status:e})=>Yt(oe,{title:"Verify email",description:"Please verify your email address by clicking on the link we just emailed to you.",children:[xt(Gs,{title:"Email verification"}),xt(Ur,{status:e})]});import{jsx as ue,jsxs as It}from"react/jsx-runtime";var $r=()=>{let e=xe(),t=Vr(null),a=Vr(null),{data:o,setData:n,errors:s,put:r,reset:l,processing:c,recentlySuccessful:p}=qs({current_password:"",password:"",password_confirmation:""});return It("form",{onSubmit:u=>{u.preventDefault(),r(route("user.password.update"),{preserveScroll:!0,onSuccess:()=>{R("success",e),l()},onError:C=>{R("error",e),C.password&&(Ks.error(C.password),l("password","password_confirmation"),t.current?.focus()),C.current_password&&(l("current_password"),a.current?.focus())}})},className:"space-y-6",children:[It("div",{className:"grid gap-2",children:[ue(x,{htmlFor:"current_password",children:"Current Password"}),ue(Q,{id:"current_password",type:"password",required:!0,value:o.current_password,onChange:u=>n("current_password",u.target.value),placeholder:"Current password",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),ue(k,{className:"mt-2",message:s.current_password})]}),It("div",{className:"grid gap-2",children:[ue(x,{htmlFor:"password",children:"New Password"}),ue(Q,{id:"password",type:"password",required:!0,value:o.password,onChange:u=>n("password",u.target.value),placeholder:"New password",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),ue(k,{className:"mt-2",message:s.password})]}),It("div",{className:"grid gap-2",children:[ue(x,{htmlFor:"password_confirmation",children:"Confirm Password"}),ue(Q,{id:"password_confirmation",type:"password",required:!0,value:o.password_confirmation,onChange:u=>n("password_confirmation",u.target.value),placeholder:"Confirm password",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),ue(k,{className:"mt-2",message:s.password_confirmation})]}),ue("div",{className:"grid gap-4",children:It(Wt,{processing:c,recentlySuccessful:p,successText:"Password saved!",children:[ue(i,{iconName:"IconDeviceFloppy"}),ue("span",{children:"Save Password"})]})})]})};import{Head as Qs}from"@inertiajs/react";import{jsx as Je,jsxs as Fo}from"react/jsx-runtime";var pu=()=>Fo(vt,{breadcrumbs:[{title:"Edit Password",href:route("user.password.edit"),icon:"IconKey"}],children:[Je(Qs,{title:"Edit Password"}),Fo("div",{className:"grid grid-cols-[2fr_4fr] gap-12",children:[Je(Bo,{}),Fo(V,{children:[Je(q,{children:Je(ge,{icon:Je(i,{iconName:"IconLock"}),title:"Edit Password",description:"Update your password to keep your account secure"})}),Je(K,{children:Je($r,{})})]})]})]});import{useForm as Xs}from"@inertiajs/react";import{useRef as Ys}from"react";import{toast as js}from"sonner";import{jsx as Y,jsxs as $e}from"react/jsx-runtime";var Gr=()=>{let e=xe(),t=Ys(null),{data:a,setData:o,delete:n,processing:s,reset:r,errors:l,clearErrors:c}=Xs({password:""}),p=u=>{u.preventDefault(),js.promise(new Promise((C,v)=>{n(route("profile.destroy"),{preserveScroll:!0,onSuccess:()=>(C(!0),N(),R("success",e)),onError:()=>(v(!1),t.current?.focus(),R("error",e)),onFinish:()=>r()})}))},N=()=>{c(),r()};return $e("div",{className:"space-y-6",children:[Y(ja,{title:"Delete account",description:"Delete your account and all of its resources"}),$e("div",{className:"space-y-4 rounded-lg border border-red-100 bg-red-50 p-4 dark:border-red-200/10 dark:bg-red-700/10",children:[$e("div",{className:"relative space-y-0.5 text-red-600 dark:text-red-100",children:[Y("p",{className:"font-medium",children:"Warning"}),Y("p",{className:"text-sm",children:"Please proceed with caution, this cannot be undone."})]}),$e(Ne,{children:[Y(dt,{asChild:!0,children:Y(m,{variant:"destructive",children:"Delete account"})}),$e(ye,{children:[Y(Ka,{children:"Are you sure you want to delete your account?"}),Y(Qa,{children:"Once your account is deleted, all of its resources and data will also be permanently deleted. Please enter your password to confirm you would like to permanently delete your account."}),$e("form",{className:"space-y-6",onSubmit:p,children:[$e("div",{className:"grid gap-2",children:[Y(x,{htmlFor:"password",className:"sr-only",children:"Password"}),Y(D,{id:"password",type:"password",name:"password",ref:t,value:a.password,onChange:u=>o("password",u.target.value),placeholder:"Password",autoComplete:"current-password"}),Y(k,{message:l.password})]}),$e(Vt,{className:"gap-2",children:[Y(Wa,{asChild:!0,children:Y(m,{variant:"secondary",onClick:N,children:"Cancel"})}),Y(m,{variant:"destructive",disabled:s,asChild:!0,children:Y("button",{type:"submit",children:"Delete account"})})]})]})]})]})]})]})};import{Head as Js}from"@inertiajs/react";import{jsx as et,jsxs as Zr}from"react/jsx-runtime";var Fu=()=>Zr(vt,{children:[et(Js,{title:"Delete Account"}),et("div",{className:"max-w-7xl mx-auto space-y-8 my-8",children:Zr(V,{children:[et(q,{children:et(ge,{icon:et(i,{iconName:"IconDelete"}),title:"Delete Account",description:"Permanently delete your account and all associated data"})}),et(K,{children:et(Gr,{})})]})})]});import{Link as Wr,router as ei,usePage as qr}from"@inertiajs/react";import{useEffect as ti,useState as Nt}from"react";import oi from"react-easy-crop";import{toast as ai}from"sonner";import{Fragment as Et,jsx as f,jsxs as U}from"react/jsx-runtime";var ri=({image:e,isOpen:t,setIsOpen:a,onSave:o})=>{let[n,s]=Nt({x:0,y:0}),[r,l]=Nt(1),[c,p]=Nt(e),[N,u]=Nt(null);return ti(()=>{p(e),s({x:0,y:0}),l(1),u(null)},[e,t]),f(Ne,{open:t,onOpenChange:a,children:U(ye,{className:"max-h-[75vh] sm:max-w-[50vw] xl:max-w-[50vw] min-h-[50vh] grid !gap-4 overflow-auto",children:[U(qa,{className:"flex items-center gap-2",children:[f(i,{iconName:"IconCrop"}),f("span",{className:"text-lg",children:"Crop Avatar"})]}),f("div",{className:"grid",children:f("div",{className:"relative flex-1 bg-neutral-900 aspect-square w-full h-auto border max-h-[60vh] min-h-[200px] sm:min-h-[400px] ",children:f(oi,{image:c,crop:n,zoom:r,aspect:1,zoomSpeed:.1,onCropChange:s,onZoomChange:l,onCropComplete:(v,b)=>u(b)})})}),U(Vt,{children:[f(m,{variant:"outline",onClick:()=>a(!1),children:"Cancel"}),f(m,{onClick:async()=>{if(!c||!N)return;let v=await Ja(c,N);o(v),a(!1)},disabled:!N,children:"Save"})]})]})})},Bo=({className:e})=>{let{auth:t}=qr().props,[a,o]=Nt(t?.user?.avatar||""),[n,s]=Nt(!1),r=xe(),l=new Date().getHours();return f(Et,{children:f(V,{className:g("",e),children:U(K,{className:"grid grid-cols-1 gap-7",children:[f("div",{className:"text-xl text-center",children:l>=5&&l<11?U(Et,{children:["\u{1F304} Good morning ",f("span",{className:"font-bold",children:t.user.name}),"!"]}):l>=11&&l<17?U(Et,{children:["\u2600\uFE0F Good afternoon ",f("span",{className:"font-bold",children:t.user.name}),"!"]}):l>=17&&l<21?U(Et,{children:["\u{1F307} Good evening ",f("span",{className:"font-bold",children:t.user.name}),"!"]}):U(Et,{children:["\u{1F319} Good night ",f("span",{className:"font-bold",children:t.user.name}),"!"]})}),f("div",{className:g("mx-auto max-w-[250px] w-full h-auto aspect-[1/1] flex items-center cursor-pointer object-fit transition-all hover:scale-105 duration-300 bg-accent/25 rounded-md border",t.user.avatar?"":"border-[1.5px] border-dashed rounded-md"),onClick:()=>{document.querySelector("#user-avatar")?.click()},style:t.user.avatar?{backgroundImage:`url(${Pe(t.user.avatar)})`,backgroundSize:"cover"}:{},children:!t.user.avatar&&f(i,{className:"mx-auto h-8 w-8",iconName:"IconUpload"})}),U("div",{className:"grid text-center",children:[f("div",{className:"mx-auto flex items-center gap-2",children:f("span",{className:"text-xl font-bold truncate",children:t.user.name+(t.user?.surname?" "+t.user.surname:"")})}),f("span",{className:"text-sm text-muted-foreground",children:t.user.email})]}),f("input",{id:"user-avatar",hidden:!0,type:"file",accept:"image/*",onChange:c=>{let p=c.target.files?.[0];if(!p){c.currentTarget.value="";return}o(URL.createObjectURL(p)),s(!0),c.currentTarget.value=""}}),f(ri,{image:a,isOpen:n,setIsOpen:s,onSave:c=>{ai.promise(new Promise((p,N)=>{ei.patch(route("user.profile.update"),{avatar:er(c,"avatar.jpg")},{onSuccess:u=>{R("success",r),p(u)},onError:u=>{R("error",r),N(u)}})}),{loading:"Avatar Updating...",success:"Avatar Updated",error:"Avatar Update Failed"})}})]})})})},ni=({className:e})=>{let{auth:t}=qr().props,a=[{icon:"IconUser",title:"Name-Surname",value:t.user.name+" "+(t.user?.surname??"")},{icon:"IconMail",title:"Email",value:t.user.email},{icon:"IconPhone",title:"Phone",value:t.user.phone},{icon:"IconUserKey",title:"User Role",value:t.user.role_code},{icon:"IconCalendar",title:"Registered At",value:new Date(t.user.created_at).toLocaleString()},{icon:"IconCalendar",title:"Last Seen At",value:t.user?.last_seen_at?new Date(t.user?.last_seen_at??"").toLocaleString():"Never"}];return U(V,{className:g("",e),children:[U(q,{children:[f(ge,{icon:f(i,{iconName:"IconUser"}),title:"Account Overview",description:"Manage your personal information and account settings"}),f("hr",{className:"mt-2"})]}),U(K,{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:[a.map(o=>f(V,{className:"bg-accent/15 transition-all hover:translate-y-[-5px] hover:scale-105 duration-300 cursor-pointer",children:U(K,{className:"flex items-center gap-2",children:[f(i,{iconName:o.icon,className:"w-6 h-6 shrink-0"}),U("div",{className:"grid",children:[f("span",{className:"text-sm font-bold truncate",children:o.title}),f("span",{className:"text-xs truncate",children:o.value})]})]})})),f(Wr,{className:"col-span-full w-full",href:route("user.profile.edit"),children:U(m,{variant:"outline",className:"w-full flex items-center gap-2",size:"sm",children:[f(i,{iconName:"IconEdit"}),"Edit Details"]})})]})]})},si=({className:e})=>f(V,{className:g("",e),children:f(q,{children:f(ge,{icon:f(i,{iconName:"IconLock"}),title:"Account Security",description:"Manage your account security settings",buttons:f(Wr,{href:route("user.password.edit"),className:"w-full md:w-auto",children:U(m,{variant:"outline",className:"flex items-center gap-2 w-full md:w-auto",children:[f(i,{iconName:"IconKey"}),"Change Password"]})})})})}),Yu=()=>U("div",{className:"grid lg:grid-cols-[2fr_4fr] gap-12",children:[f(Bo,{}),f(ni,{}),f(si,{className:"col-span-full"})]});import{Link as ii,useForm as li,usePage as ci}from"@inertiajs/react";import{jsx as I,jsxs as ne}from"react/jsx-runtime";var ng=({mustVerifyEmail:e,status:t})=>{let a=xe(),{auth:o}=ci().props,{data:n,setData:s,patch:r,errors:l,processing:c,recentlySuccessful:p}=li({name:o.user.name,surname:o.user.surname,email:o.user.email,phone:o.user.phone});return ne("form",{onSubmit:u=>{u.preventDefault(),r(route("user.profile.update"),{preserveScroll:!0,onSuccess:()=>R("success",a),onError:()=>R("error",a)})},className:"space-y-6",children:[ne("div",{className:"grid md:grid-cols-2 gap-2",children:[ne("div",{className:"grid gap-2",children:[I(x,{htmlFor:"name",children:"Name"}),ne("div",{className:"group relative",children:[I(D,{id:"name",type:"text",required:!0,value:n.name,onChange:u=>s("name",u.target.value),placeholder:"Full name",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),I("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:I(i,{iconName:"IconUser",size:16})})]}),I(k,{className:"mt-2",message:l.name})]}),ne("div",{className:"grid gap-2",children:[I(x,{htmlFor:"surname",children:"Surname"}),ne("div",{className:"group relative",children:[I(D,{id:"surname",type:"text",value:n.surname,onChange:u=>s("surname",u.target.value),placeholder:"Surname",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),I("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:I(i,{iconName:"IconUser",size:16})})]}),I(k,{className:"mt-2",message:l.surname})]})]}),ne("div",{className:"grid gap-2",children:[I(x,{htmlFor:"email",children:"Email address"}),ne("div",{className:"group relative",children:[I(D,{id:"email",type:"email",required:!0,value:n.email,onChange:u=>s("email",u.target.value),placeholder:"Email address",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"username"}),I("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:I(i,{iconName:"IconMail",size:16})})]}),I(k,{className:"mt-2",message:l.email})]}),ne("div",{className:"grid gap-2",children:[I(x,{htmlFor:"phone",children:"Phone"}),ne("div",{className:"group relative",children:[I(D,{id:"phone",type:"tel",value:n.phone,onChange:u=>s("phone",u.target.value),placeholder:"Phone number",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),I("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:I(i,{iconName:"IconPhone",size:16})})]}),I(k,{className:"mt-2",message:l.phone})]}),e&&o.user.email_verified_at===null&&ne("div",{children:[ne("p",{className:"text-muted-foreground -mt-4 text-sm",children:["Your email address is unverified."," ",I(ii,{href:route("verification.send"),method:"post",as:"button",className:"text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500",children:"Click here to resend the verification email."})]}),t==="verification-link-sent"&&I("div",{className:"mt-2 text-sm font-medium text-green-600",children:"A new verification link has been sent to your email address."})]}),I("div",{className:"grid gap-4",children:ne(Wt,{processing:c,recentlySuccessful:p,children:[I(i,{iconName:"IconDeviceFloppy"}),I("span",{children:"Save Profile"})]})})]})};import{Link as Qr}from"@inertiajs/react";import{IconEye as mi,IconEyeClosed as di}from"@tabler/icons-react";import{Fragment as Kr,jsx as y,jsxs as we}from"react/jsx-runtime";var Xr=({notifications:e})=>y(jt,{notifications:e??[],meta:{per_page:5},children:we(ie,{trigger:"click",children:[y(le,{children:y(ui,{})}),y(ce,{className:"w-[400px] min-h-[150px] flex-row gap-5",children:y(pi,{})})]})}),pi=()=>{let{notifications:e}=yt();return we(Kr,{children:[we(Oe,{className:"flex mx-auto items-center gap-2",children:[y(i,{iconName:"IconBell",size:16}),y("span",{children:"Notifications"})]}),e?.length>0?y(Kr,{children:we("div",{className:"grid gap-3 ",children:[e.slice(0,5).map(t=>{let a=new Date(t?.read_at??"").getTime()>0;return y(_o,{notification:t,children:y("div",{className:g("p-3 py-2 rounded-md hover:scale-103 shadow-sm dark:shadow-accent cursor-pointer animate-in fade-in duration-400",a?"text-muted-foreground":"dark:bg-accent/20 bg-accent"),children:we("div",{className:"flex items-center gap-3 ",children:[y("div",{className:g("flex h-[5px] w-[5px] rounded-full shrink-0",a?"bg-muted-foreground":"bg-green-500")}),y(zo,{notification:t}),we("div",{className:"grid gap-1",children:[y("span",{className:"capitalize font-bold truncate",children:t.data.title}),y("p",{className:"text-sm capitalize truncate",children:t.data.message}),y("p",{className:"text-xs text-muted-foreground",children:new Date(t.created_at).toLocaleString()})]}),y(Oo,{notification:t,className:"ml-auto w-5 h-5"})]})})},t.id)}),y(Qr,{href:route("user.notifications.index"),children:we(m,{variant:"ghost",className:"w-full flex items-center justify-center",size:"sm",children:[y(i,{iconName:"IconEye",size:20}),y("span",{className:"text-sm",children:"View all"})]})})]})}):y(Ho,{})]})},_o=({notification:e,children:t})=>{let a=e.data.route_name?route(e.data.route_name,e.data?.payload??[]):"#";return y(Qr,{href:a,target:"_blank",children:t},e.id)},zo=({notification:e})=>y(i,{iconName:e.data.icon??"IconBell",className:"shrink-0",size:25}),Ho=({className:e})=>y("div",{className:g("min-h-[150px] content-center",e),children:we("div",{className:"text-center text-muted-foreground content-center gap-2",children:[y(i,{iconName:"IconBell",className:"mx-auto mb-2 w-8 h-8"}),y("span",{children:"No new notifications"})]})}),Oo=({notification:e,className:t})=>{let a=new Date(e?.read_at??"").getTime()>0,{markAsRead:o}=yt();return y("div",{className:g("shrink-0",t),onClick:n=>{n.preventDefault(),o(!a,[e.id])},children:we(ie,{children:[y(le,{children:a?y(di,{className:"text-muted-foreground hover:text-primary w-full h-full"}):y(mi,{className:"text-primary w-full h-full"})}),y(ce,{children:a?"Mark as unread":"Mark as read"})]})})},ui=()=>{let{notifications:e}=yt(),t=e?.filter(a=>!a.read_at).length||0;return we(m,{variant:t>0?"outline":"ghost",size:"sm",className:"group hidden sm:flex cursor-pointer flex items-center",children:[y(i,{iconName:"IconBell",className:"!w-[20px] !h-[20px] opacity-80 group-hover:opacity-100"}),t>0&&(t>9?`${t}+`:t)]})};import{createContext as gi,useContext as fi,useEffect as Yr,useState as jr}from"react";import{router as Uo,usePage as vi}from"@inertiajs/react";import{toast as Jr}from"sonner";import{jsx as tt,jsxs as en}from"react/jsx-runtime";var tn=gi({}),jt=({notifications:e,meta:t,children:a})=>{let[o,n]=jr(e??[]),[s,r]=jr(t??{}),{auth:l,app:c}=vi().props;Yr(()=>{r(t??{})},[t]),Yr(()=>!window?.Echo||!l.user?void 0:((window?.Echo?.private(`App.Models.User.${l.user.id}`)).notification(v=>{Jr.custom(()=>(R(v.data?.kind??"ntf-general",c.media_base_path),en("div",{className:"flex items-center gap-3 w-[400px] rounded-lg border bg-background/50 p-3 px-5 shadow-lg",children:[tt(i,{iconName:v.data?.icon??"IconBell",className:"shrink-0"}),en("div",{className:"grid w-full",children:[tt("p",{className:"font-semibold",children:v.data.title}),tt("p",{className:"text-sm text-muted-foreground",children:v.data.message}),tt("p",{className:"text-xs text-muted-foreground",children:new Date(v.created_at??null).toLocaleString()})]}),v.data?.route_name&&tt(m,{variant:"outline",className:"ml-auto",size:"sm",onClick:()=>{Uo.visit(route(v.data.route_name,v.data.payload??void 0))},children:tt(i,{iconName:"IconArrowRight"})})]})),{id:v.id,duration:5e3,closeButton:!0,richColors:!0}),n(b=>{if(!b)return[v];let F=[v,...b];return s.per_page?F.slice(0,s.per_page):F})}),()=>window?.Echo?.leave(`App.Models.User.${l.user.id}`)),[l?.user?.id,s?.per_page]);let u={notifications:o,setNotifications:n,meta:s,setMeta:r,markAsRead:(C,v)=>{R("click",c.media_base_path);let b=new Promise((F,J)=>{Uo.post(route("user.notifications.update"),{notification_ids:v==="all"?"all":v,all:v==="all",has_read:C},{replace:!0,preserveScroll:!0,preserveState:!0,onSuccess:ee=>{n(te=>{let He=new Date().toISOString();return v==="all"?te.map($=>({...$,read_at:C?He:""})):te.map($=>v.includes($.id)?{...$,read_at:C?He:""}:$)}),F(!0)},onError:ee=>{R("alert",c.media_base_path),J(ee)}})});Jr.promise(b,{loading:C?"Marking as read...":"Marking as unread...",success:C?"Marked as read":"Marked as unread",error:C?"Failed to mark as read":"Failed to mark as unread"})},loadMore:async C=>new Promise((v,b)=>{Uo.get(route("user.notifications.index"),{next_cursor:C??s.next_cursor,feed:1,filter:s.filter},{onSuccess:F=>{n(J=>[...J,...F.props.notifications]),r(F.props.meta),v(!0)},only:["notifications","meta"],onError:F=>b(F),preserveScroll:!0,preserveState:!0,preserveUrl:!0,replace:!1})})};return tt(tn.Provider,{value:u,children:a})},yt=()=>{let e=fi(tn);if(!e)throw new Error("useNotifications must be used within a NotificationsProvider");return e};import{toast as bi}from"sonner";import{Head as hi,router as xi}from"@inertiajs/react";import{IconEye as Ni,IconFilter as yi}from"@tabler/icons-react";import{Fragment as ki,jsx as E,jsxs as Be}from"react/jsx-runtime";var Kg=({notifications:e,meta:t})=>Be(vt,{breadcrumbs:[{icon:"IconBell",title:"Notifications",href:"#"}],children:[E(hi,{title:"Notifications",children:E("meta",{name:"emincore_key",content:"test"})}),E(jt,{notifications:e??[],meta:t,children:E(wi,{})})]}),wi=()=>{let{notifications:e,setNotifications:t,meta:a,setMeta:o,markAsRead:n,loadMore:s}=yt(),r=e.filter(l=>!l.read_at).length??0;return Be(Aa,{className:"container mx-auto grid gap-4 mb-10",meta:a,onLoad:l=>s(l),noMoreContent:Be("div",{className:"h-8 w-full grid justify-center gap-2 my-5 text-muted-foreground",children:[E(i,{iconName:"IconBell",className:"mx-auto"}),E("span",{children:"No more notifications"})]}),children:[E(ge,{className:"mb-3",icon:E(i,{iconName:"IconBell"}),title:"Your Notifications",description:`You have ${a.total} notifications totally. ${r>0?`${r} unread notifications`:""}`,buttons:Be(ki,{children:[Be(m,{variant:"ghost",size:"sm",className:"flex justify-start text-sm items-center gap-2",onClick:()=>n(!0,"all"),children:[E(Ni,{}),"Mark all as read"]}),Be(ie,{trigger:"click",children:[E(le,{children:E(m,{variant:a.filter?"default":"outline",children:E(yi,{})})}),E(ce,{children:E(Ht,{value:a?.filter??"all",onChange:()=>bi.info("test"),children:["all","read","unread"].map(l=>Be(x,{className:"capitalize",onClick:()=>xi.get(route("user.notifications.index"),{filter:l},{replace:!0,preserveScroll:!0,preserveState:!0,onSuccess:c=>{t(c.props.notifications),o(c.props.meta)},only:["notifications","meta"]}),children:[E(Ot,{value:l}),l]}))})})]})]})}),e.length>0?e?.map(l=>E(Ci,{notification:l},l.id)):E(Ho,{})]})},Ci=({notification:e,className:t,...a})=>{let o=new Date(e?.read_at??"").getTime()>0;return E(_o,{notification:e,...a,children:E("div",{className:g("p-5 rounded-md hover:scale-103 shadow-sm dark:shadow-accent cursor-pointer animate-in fade-in duration-400",o?"text-muted-foreground":"dark:bg-accent/20 bg-accent",t),children:Be("div",{className:"flex items-center gap-3 ",children:[E("div",{className:g("flex h-[5px] w-[5px] rounded-full shrink-0",o?"bg-muted-foreground":"bg-green-500")}),E(zo,{notification:e}),Be("div",{className:"grid gap-1 px-5",children:[E("span",{className:"capitalize font-bold truncate",children:e.data.title}),E("p",{className:"text-sm capitalize truncate",children:e.data.message}),E("p",{className:"text-xs text-muted-foreground",children:new Date(e.created_at).toLocaleString()})]}),E(Oo,{notification:e,className:"ml-auto"})]})})})};import{Fragment as Si,jsx as h,jsxs as be}from"react/jsx-runtime";var St=({mainMenu:e,rightNavItems:t})=>{let a=on().props,{url:o}=on(),n=a.auth?.user,s=a.auth?.notifications??[];return h(Si,{children:h("div",{className:"fixed top-0 left-0 right-0 z-10 backdrop-blur-sm border-sidebar-border/100 border-b",children:be("div",{className:"mx-auto flex h-16 items-center px-4 md:max-w-7xl",children:[h("div",{className:"lg:hidden",children:be(ta,{children:[h(oa,{asChild:!0,children:h(m,{variant:"ghost",size:"icon",className:"mr-2 h-[34px] w-[34px]",children:h(i,{iconName:"IconMenu2",className:"h-5 w-5"})})}),be(aa,{side:"left",className:"bg-sidebar flex h-full w-64 flex-col items-stretch justify-between",children:[h(na,{className:"sr-only",children:"Navigation Menu"}),h(ra,{className:"flex justify-start text-left",children:h(ve,{className:"w-[90%]"})}),h(da,{children:be(ua,{children:[e&&h(ko,{sidebarMenu:mt(e,o)}),be(pa,{className:"max-w-full gap-0",children:[h(Bt,{children:"Quick"}),t?.map(r=>h(Ze,{children:be(Dt,{href:r.route_name?route(r.route_name,r.payload??{}):"#",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[r.icon&&h(i,{iconName:r.icon,size:16}),h("span",{children:r.title})]},r.title)}))]})]})})]})]})}),h(Dt,{href:"/",prefetch:!0,className:"flex items-center",children:h(ve,{className:"lg:w-[150px] w-[100px]"})}),e&&be("div",{className:"ml-6 hidden h-full items-center space-x-6 lg:flex",children:[h(ea,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),h(Cr,{menuItems:e.items||[]})]}),be("div",{className:"ml-auto flex items-center space-x-2",children:[h("div",{className:"relative flex items-center space-x-1",children:h("div",{className:"hidden lg:flex",children:t?.map(r=>h(sa,{delayDuration:0,children:be(ia,{children:[h(la,{children:be(Dt,{href:r.route_name?route(r.route_name):"#",target:"_blank",rel:"noopener noreferrer",className:"group text-accent-foreground ring-offset-background hover:bg-accent hover:text-accent-foreground focus-visible:ring-ring ml-1 inline-flex h-9 w-9 items-center justify-center rounded-md bg-transparent p-0 text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",children:[r.title&&h("span",{className:"sr-only",children:r.title}),r.icon&&h(i,{iconName:r.icon,className:"size-5 opacity-80 group-hover:opacity-100"})]})}),h(ca,{children:h("p",{children:r.title})})]})},r.title))})}),n&&h(Xr,{notifications:s??[]}),e&&h(Gt,{placeholder:"Type a command or search...",menu:mt(e,o),children:h(Vo,{})}),n?h(Er,{}):be("div",{className:"flex items-center gap-2",children:[h(m,{asChild:!0,variant:"ghost",size:"sm",className:"text-sm",children:h(Dt,{href:"/login",children:"Sign In"})}),h(m,{asChild:!0,size:"sm",className:"text-sm",children:h(Dt,{href:"/register",children:"Get Started"})})]}),h(kr,{className:"w-9 h-9"})]})]})})})};import{Link as Mi,usePage as Pi}from"@inertiajs/react";import{jsx as Jt,jsxs as Ii}from"react/jsx-runtime";var ve=({className:e,link:t,...a})=>{let n=Pi().props?.app?.logos??[];return Ii(({children:r,className:l,...c})=>t?Jt(Mi,{href:t,className:l,...c,children:r}):Jt("div",{className:l,...c,children:r}),{className:g("p-2 grid flex-1 text-left text-sm lg:w-[150px] w-[100px]",e),...a,children:[Jt("img",{src:Pe(n?.dark_logo),alt:"Logo",className:"w-full h-full hidden dark:block"}),Jt("img",{src:Pe(n?.light_logo),alt:"Logo",className:"w-full h-full dark:hidden"})]})};import{Head as Ei,usePage as Di}from"@inertiajs/react";import{toast as $o}from"sonner";import{useEffect as eo}from"react";import{jsx as Ce,jsxs as Ai}from"react/jsx-runtime";var Mt=({children:e,className:t,...a})=>{let o=Di().props;return eo(()=>{o?.flash?.success&&$o.success(o?.flash?.success),o?.flash?.error&&$o.error(o?.flash?.error)},[o.flash]),eo(()=>{o.errors&&Object.values(o.errors).map(n=>{console.log(o.errors),$o.error(n)})},[o.errors]),eo(()=>{o.ziggy&&Object.assign(Ziggy,o.ziggy)},[o.ziggy]),eo(()=>{if(o.app?.logos?.favicon){let n=document.querySelector("link[rel*='icon']")||document.createElement("link");n.type="image/x-icon",n.rel="shortcut icon",n.href=Pe(o.app.logos.favicon,o.app.media_base_path),document.getElementsByTagName("head")[0].appendChild(n)}},[o.app.logos?.favicon]),Ai("div",{className:t,...a,children:[Ce(Ei,{children:Ce("meta",{name:"EMIN_CORE_PLATFORM_VERIFICATION_CODE",content:import.meta.env.VITE_EMIN_CORE_PLATFORM_VERIFICATION_CODE})}),Ce(Ti,{}),e,Ce(tr,{style:{pointerEvents:"auto"},richColors:!0,icons:{success:Ce(i,{iconName:"IconCircleCheckFilled",className:"h-5 w-5"}),error:Ce(i,{iconName:"IconCircleXFilled",className:"animate-shake h-5 w-5"}),warning:Ce(i,{iconName:"IconAlertCircleFilled",className:"animate-bounce h-5 w-5"}),info:Ce(i,{iconName:"IconInfoCircleFilled",className:"animate-pulse h-5 w-5"}),loading:Ce(i,{iconName:"IconLoader2",className:"animate-spin h-5 w-5"})}})]})},Ti=()=>jo.all().map((t,a)=>Ce(t,{},a));import{IconLoader2 as Ri}from"@tabler/icons-react";import{jsx as Go,jsxs as Fi}from"react/jsx-runtime";var Rr=()=>{let e=Li().props;return Go("div",{className:"w-full h-[100vh] justify-center items-center grid",children:Fi("div",{children:[Go(ve,{className:"lg:w-[250px] mx-auto mb-5"}),Go(Ri,{className:"animate-spin mx-auto w-8 h-8"})]})})};import{useEffect as an}from"react";import{jsx as ke,jsxs as wt}from"react/jsx-runtime";var Gf=({placeholder:e,menu:t,openShortcutKey:a="q"})=>wt(Gt,{placeholder:e,menu:t,openShortcutKey:a,children:[ke(Bi,{}),ke(Vo,{})]}),Vo=()=>{let{isCommandModalOpen:e,setIsCommandModalOpen:t,placeholder:a,menu:o,openShortcutKey:n}=yo(),s=l=>{t(!1),l&&setTimeout(()=>{l()},100)};if(an(()=>{let l=c=>{(c.metaKey||c.ctrlKey)&&c.key.toLowerCase()===n.toLowerCase()&&(c.preventDefault(),t(p=>!p))};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[n,t]),an(()=>{if(!o||!Array.isArray(o)||o.length===0)return;let l=c=>ar(c,o);return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[o]),!o||!Array.isArray(o)||o.length===0)return null;let r=or(o);return wt(rr,{open:e,onOpenChange:t,children:[ke(nr,{placeholder:a}),wt(sr,{children:[ke(ir,{children:"No results found."}),Object.entries(r).map(([l,c])=>ke(lr,{heading:l,children:c.map((p,N)=>p.action&&wt(cr,{onSelect:()=>typeof p?.action=="function"&&s(p.action),children:[p.icon&&ke(i,{iconName:p.icon}),ke("span",{children:p?.title||"Item"}),p?.shortcutLabel&&ke(mr,{children:String(p.shortcutLabel)})]},`${l}-${p?.title||N}`))},l))]})]})},Bi=()=>{let{setIsCommandModalOpen:e,openShortcutKey:t}=yo();return ke(m,{variant:"outline",asChild:!0,size:"sm",className:"hidden sm:flex cursor-pointer",onClick:()=>e(!0),children:wt("p",{className:"text-sm text-muted-foreground",children:["Quick Action",ke("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:wt("span",{className:"text-xs",children:["\u2318 + ",t.toUpperCase()]})})]})})};import{jsx as Se,jsxs as rn}from"react/jsx-runtime";var Jf=({data:{title:e="Role Title",icon:t=null,color:a="#6a1717ff",badge_type:o="default",size:n=12}})=>o=="default"?rn(Ue,{variant:"default",color:a??"default",className:"gap-1",style:{backgroundColor:a??"default"},children:[t&&Se(i,{iconName:t,className:"text-white"}),Se("span",{className:"text-white",children:e})]}):o=="outline"?rn(Ue,{variant:"outline",color:a??"default",className:"gap-1",children:[t&&Se(i,{iconName:t,color:a??"default"}),Se("span",{children:e})]}):o=="icon"?Se(Ue,{variant:"outline",color:a??"default",className:"aspect-1/1 rounded-full p-1",style:{backgroundColor:a??"default"},children:t&&Se(i,{iconName:t,className:"text-white"})}):o=="icon2"?Se(Ue,{variant:"outline",color:a??"default",className:"aspect-1/1 rounded-full p-1",children:t&&Se(i,{iconName:t,color:a??"default"})}):o=="icon3"?Se(Ue,{variant:"outline",color:a??"default",className:"aspect-1/1 rounded-full p-1",children:t&&Se(i,{iconName:t,color:a??"default"})}):null;import{jsx as to,jsxs as nn}from"react/jsx-runtime";var rv=({title:e,icon:t,children:a})=>nn(V,{children:[to(q,{children:nn(qe,{className:"flex items-center",children:[t&&(typeof t=="string"?to(i,{iconName:t,className:"h-4 w-4 mr-2 text-muted-foreground"}):t),e&&typeof e=="string"?to("span",{className:"text-xl",children:e}):e]})}),to(K,{children:a})]});import{jsx as Me,jsxs as ot}from"react/jsx-runtime";var mv=(e,...t)=>ot(V,{className:"gap-2",...t,children:[ot(q,{className:"flex items-center gap-2 pb-2",children:[typeof e.icon=="string"?Me(i,{iconName:e.icon,className:"shrink-0 w-5 h-5 text-muted-foreground"}):e.icon,Me(qe,{className:"text-sm font-medium truncate",children:e.title})]}),ot(K,{children:[Me("div",{className:"text-2xl font-bold",children:e.value}),e.subtext&&Me("p",{className:"text-xs text-muted-foreground",children:e.subtext})]})]}),dv=(e,...t)=>ot(V,{className:"gap-2",...t,children:[ot(q,{children:[Me($t,{children:e.title}),Me(qe,{className:"text-2xl font-semibold tabular-nums @[250px]/card:text-3xl",children:e.value}),Me(Xa,{children:ot(Ue,{variant:"outline",children:[Me(i,{iconName:Number(e.percentage)>0?"IconTrendingDown":"IconTrendingUp",className:"shrink-0"}),Number(e.percentage)>0?`-${e.percentage}%`:`${e.percentage}%`]})})]}),ot(Ya,{className:"flex-col items-start gap-1.5 text-sm",children:[Me("div",{className:"line-clamp-1 flex gap-2 font-medium",children:e.description}),Me("div",{className:"text-muted-foreground",children:e.subdescription})]})]});import{jsx as Zo,jsxs as _i}from"react/jsx-runtime";var Rv=({data:e,columns:t,meta:a,bulkActions:o=[],handleRequest:n,deletedIds:s=[],newIds:r=[],updatedIds:l=[],rowIdField:c="id"})=>_i(mn,{data:e,columns:t,meta:a,bulkActions:o,handleRequest:n,deletedIds:s,newIds:r,updatedIds:l,rowIdField:c,children:[Zo(cn,{}),Zo(sn,{}),Zo(ln,{})]});import{flexRender as dn}from"@tanstack/react-table";import{jsx as _e,jsxs as pn}from"react/jsx-runtime";var sn=()=>{let{columns:e,table:t,handleCheckboxClick:a,isRowHidden:o,animatingRows:n}=he();return pn(dr,{className:"rounded-md border",children:[_e(pr,{children:t.getHeaderGroups().map(s=>_e(Zt,{children:s.headers.map(r=>_e(gr,{className:`py-3 px-4 ${r.column.getCanSort()?"cursor-pointer select-none":""}`,style:{textAlign:"left"},onClick:r.column.getCanSort()?r.column.getToggleSortingHandler():void 0,children:pn("div",{className:"flex items-center",children:[r.isPlaceholder?null:dn(r.column.columnDef.header,r.getContext()),r.column.getCanSort()&&_e("span",{className:"ml-1",children:{asc:"\u2191",desc:"\u2193"}[r.column.getIsSorted()]??""})]})},r.id))},s.id))}),_e(ur,{children:t.getRowModel().rows?.length?t.getRowModel().rows.filter(s=>!o(s.original)).map(s=>{let r=s.original.id&&fr(n[s.original.id]);return _e(Zt,{id:s.id,"data-state":s.getIsSelected()&&"selected",className:`${s.getIsSelected()?"bg-muted/50":""} ${r} transition-all duration-500 ease-in-out`,children:s.getVisibleCells().map(l=>_e(wo,{className:"py-3 px-4",style:{textAlign:"left"},onClick:l.column.id==="select"?c=>a(c,s.id):void 0,children:dn(l.column.columnDef.cell,l.getContext())},l.id))},s.id)}):_e(Zt,{children:_e(wo,{colSpan:e.length,className:"h-24 text-center",children:"There is no result."})})})]})};import{jsx as j,jsxs as at}from"react/jsx-runtime";var ln=()=>{let{table:e,meta:t}=he();return at("div",{className:"flex items-center justify-end space-x-2 py-4",children:[at("div",{className:"flex-1 text-sm text-muted-foreground",children:[e.getFilteredSelectedRowModel().rows.length," / "," ",e.getFilteredRowModel().rows.length," row(s) selected."]}),j(Hi,{}),at("div",{className:"flex items-center space-x-2",children:[j(m,{variant:"outline",size:"sm",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:"Previous"}),j("div",{className:"flex items-center gap-1",children:j(zi,{})}),j(m,{variant:"outline",size:"sm",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:"Next"})]})]})},zi=()=>{let{table:e,meta:t}=he(),a=e.getState().pagination.pageIndex+1,o=t?.last_page??e.getPageCount(),n=Math.min(5,o),s=1;return o>5&&(a<=3?s=1:a>=o-2?s=o-4:s=a-2),Array.from({length:n},(r,l)=>{let c=s+l;return j(m,{variant:c===a?"default":"outline",size:"sm",onClick:()=>c!==a?e.setPageIndex(c-1):null,className:"h-8 w-8 p-0",children:c},c)})},Hi=()=>{let{table:e,customPageSize:t,setCustomPageSize:a}=he();return at("div",{className:"flex items-center space-x-2",children:[j("span",{className:"text-sm text-muted-foreground",children:"Per Page"}),at(Ie,{children:[j(Ee,{asChild:!0,children:at(m,{variant:"outline",className:"h-8 w-[70px]",children:[e.getState().pagination.pageSize.toString(),j(i,{iconName:"IconChevronDown",className:"ml-2 h-4 w-4"})]})}),at(De,{align:"start",children:[[10,20,30,50,100].map(o=>j(Ut,{className:"py-2 pl-8",checked:Number(e.getState().pagination.pageSize)===o,onCheckedChange:()=>e.setPageSize(o),children:j("span",{className:"pl-0",children:o})},o)),j("hr",{}),j("p",{className:"text-muted-foreground text-xs mt-1 px-2",children:"Custom Page Size:"}),j(D,{type:"number",placeholder:"Custom Page Size",value:t,onChange:o=>a(Number(o.target.value)),onKeyDown:o=>o.stopPropagation(),onBlur:o=>{Number(o.target.value)!==e.getState().pagination.pageSize&&e.setPageSize(Number(o.target.value))},className:"px-2 text-sm w-full focus-visible:ring-0 border-none",max:100,min:1})]})]})]})};import{IconLoader2 as Oi,IconSearch as Ui,IconX as Vi}from"@tabler/icons-react";import{jsx as z,jsxs as rt}from"react/jsx-runtime";var cn=()=>{let{meta:e,handleResetTable:t,rowIdField:a,table:o}=he();return rt("div",{className:"flex justify-between items-center pb-4 gap-2",children:[z(Gi,{}),rt("div",{className:"flex-1 flex justify-end space-x-2",children:[z(Zi,{}),z($i,{}),vr({meta:e,rowIdField:a})&&z(m,{variant:"outline",onClick:t,title:"Click to reset search",children:z(i,{iconName:"IconX"})})]})]})},$i=()=>{let{table:e}=he();return rt(Ie,{children:[z(Ee,{asChild:!0,children:rt(m,{variant:"outline",children:[z(i,{iconName:"IconList",className:"h-4 w-4"})," Rows"]})}),z(De,{align:"end",children:e.getAllColumns().filter(t=>t.getCanHide()).map(t=>z(Ut,{className:"capitalize",checked:t.getIsVisible(),onCheckedChange:a=>t.toggleVisibility(!!a),children:t.id},t.id))})]})},Gi=()=>{let{searchValue:e,handleInputOnChange:t,handleKeyDown:a,globalFilter:o,isSearching:n,advancedTable:s,setSearchValue:r,handleGlobalFilterChange:l,handleSearch:c}=he();return rt("div",{className:"relative w-full flex",children:[z(D,{placeholder:"Write and press enter to search \u21B5",value:e,onChange:t,onKeyDown:p=>a(p),className:g("pr-10 focus-visible:ring-0",o?"border-gray-400":"")}),o?n&&s?z(m,{variant:"link",size:"sm",className:"absolute right-0 top-0 h-full px-3",disabled:!0,title:"Loading",children:z(Oi,{className:"animate-spin"})}):z(m,{variant:"link",size:"sm",className:"absolute right-0 top-0 h-full px-3",onClick:()=>(r(""),l("")),title:"Click to reset search",children:z(Vi,{})}):z(m,{variant:"link",size:"sm",className:"absolute right-0 top-0 h-full px-3",onClick:c,title:"Aramak i\xE7in Enter tu\u015Funa basabilirsiniz",children:z(Ui,{})})]})},Zi=()=>{let{bulkActions:e,table:t,resetSelection:a}=he();return e&&e?.length>0&&(t?.getFilteredSelectedRowModel()?.rows?.length||0)>0&&z("div",{className:"flex items-center gap-2",children:e.map((o,n)=>o.confirm?z(hr,{...o.confirmIcon!==void 0&&{icon:o.confirmIcon},...o.confirmTitle!==void 0&&{title:o.confirmTitle},...o.confirmContent!==void 0&&{content:o.confirmContent},...o.confirmText!==void 0&&{confirmText:o.confirmText},...o.cancelText!==void 0&&{cancelText:o.cancelText},onConfirm:()=>o.action(t.getFilteredSelectedRowModel().rows,a),...o.cancel!==void 0&&{onCancel:o.cancel},children:rt(m,{variant:o.variant||"outline",children:[o.icon&&o.icon,o.label," (",t.getFilteredSelectedRowModel().rows.length,")"]},n)}):rt(m,{variant:o.variant||"outline",onClick:()=>o.action(t.getFilteredSelectedRowModel().rows,a),className:"flex items-center",children:[o.icon&&o.icon,o.label," (",t.getFilteredSelectedRowModel().rows.length,")"]},n))})};import{getCoreRowModel as Wi,getFilteredRowModel as qi,getPaginationRowModel as Ki,getSortedRowModel as Qi,useReactTable as Xi}from"@tanstack/react-table";import{createContext as Yi,useContext as ji,useEffect as nt,useRef as un,useState as G}from"react";import{jsx as Ji}from"react/jsx-runtime";var gn=Yi({}),mn=({children:e,data:t,columns:a,meta:o,bulkActions:n,handleRequest:s,rowIdField:r})=>{let l=typeof s<"u",c=un(!1),[p,N]=G(o?.per_page?Number(o?.per_page):10),[u,C]=G(o?.sort?[{id:o.sort,desc:o.order==="desc"}]:[]),[v,b]=G([]),[F,J]=G({}),[ee,te]=G({}),[He,$]=G({pageIndex:o?.current_page?Number(o?.current_page)-1:0,pageSize:o?.per_page?Number(o?.per_page):10}),[P,it]=G(o?.search?o?.search:null),[Tt,lt]=G(o?.search?o?.search:""),[Sn,At]=G(!1),[Ko,Mn]=G(null);nt(()=>{o&&(C(o.sort?[{id:o.sort,desc:o.order==="desc"}]:[]),$({pageIndex:o.current_page?Number(o.current_page)-1:0,pageSize:o.per_page?Number(o.per_page):10}),N(o.per_page?Number(o.per_page):10),it(o.search||null),lt(o.search||""))},[o?.current_page,o?.per_page,o?.sort,o?.order,o?.search]),nt(()=>{setTimeout(()=>c.current=!0,500)},[]),nt(()=>At(!1),[t]);let[Lt,ct]=G({}),[oo,fl]=G([]),[ao,vl]=G([]),[ro,bl]=G([]),[Pn,In]=G(new Set),Rt=un({});nt(()=>{if(ro.length<1)return;let d={...Lt};ro.forEach(S=>{d[String(S)]="deleted",Rt.current[String(S)]=setTimeout(()=>{In(se=>new Set([...se,S])),ct(se=>{let Z={...se};return delete Z[String(S)],Z})},500)}),ct(d)},[ro]),nt(()=>{if(oo.length<1)return;let d={...Lt};oo.forEach(S=>{d[String(S)]="new",Rt.current[String(S)]=setTimeout(()=>{ct(se=>{let Z={...se};return delete Z[String(S)],Z})},500)}),ct(d)},[oo]),nt(()=>{if(ao.length<1)return;let d={...Lt};ao.forEach(S=>{d[String(S)]="updated",Rt.current[String(S)]=setTimeout(()=>{ct(se=>{let Z={...se};return delete Z[String(S)],Z})},1e3)}),ct(d)},[ao]),nt(()=>()=>Object.values(Rt.current).forEach(d=>clearTimeout(d)),[]);let En=d=>{if(!(!c.current||!l))return s({...o,current_page:d.pageIndex+1,per_page:d.pageSize})},Dn=d=>{if(!c.current||!l||d.length===0)return;let S={id:d[0].id,desc:d[0].desc};return s({...o,sort:S.id,order:S.desc?"desc":"asc"})},Tn=d=>!c.current||!l||(d=d.trim(),d===o?.search||d===""&&o?.search==null)?!1:(console.log(o),s({...o,search:d})),An=(d,S)=>{let se=no.getRowModel().rows.filter(W=>!Qo(W.original)),Z=se.findIndex(W=>W.id===d),Ge=se.findIndex(W=>W.id===S);if(Z===-1||Ge===-1)return[];let Yo=Math.min(Z,Ge),so=Math.max(Z,Ge);return se.slice(Yo,so+1).map(W=>W.id)},Ln=a.some(d=>d.id==="select"),Rn=(d,S)=>{if(d.shiftKey&&Ko&&Ln){d.preventDefault();let{rows:se,rowsById:Z}=no.getRowModel(),Ge=An(Ko,S).map(W=>Z[W]).filter(Boolean),so=Ge.filter(W=>W?.getIsSelected()).length<Ge.length/2;Ge.forEach(W=>W&&W.toggleSelected(so))}Mn(S)},Qo=d=>Pn.has(d[r??d.id]),Fn=d=>{let S=typeof d=="function"?d(u):d;C(S),l&&Dn(S)},Bn=d=>{let S=typeof d=="function"?d(He):d;$(S),l&&En(S)},Ft=d=>{it(d),l&&Tn(d)===!1&&At(!1)},no=Xi({data:t,columns:a,filterFns:{fuzzy:Co},onGlobalFilterChange:Ft,globalFilterFn:Co,onSortingChange:Fn,onColumnFiltersChange:b,getCoreRowModel:Wi(),getPaginationRowModel:l?void 0:Ki(),getSortedRowModel:l?void 0:Qi(),getFilteredRowModel:l?void 0:qi(),onColumnVisibilityChange:J,onRowSelectionChange:te,onPaginationChange:Bn,manualPagination:l,manualSorting:l,manualFiltering:l,pageCount:o?.last_page??void 0,state:{sorting:u,columnFilters:v,columnVisibility:F,rowSelection:ee,pagination:He,globalFilter:P}}),Xo=()=>(At(!0),Ft(Tt)),_n={data:t,meta:o,columns:a,bulkActions:n,table:no,resetSelection:()=>te({}),rowIdField:r,advancedTable:l,searchValue:Tt,setSearchValue:lt,handleSearch:Xo,isSearching:Sn,setIsSearching:At,globalFilter:P,handleGlobalFilterChange:Ft,handleInputOnChange:d=>{lt(d.target.value),!l&&Ft(d.target.value)},handleResetTable:()=>{lt(""),it(null),C([{id:r??"id",desc:!0}]),$({pageIndex:0,pageSize:o?.per_page?Number(o?.per_page):10}),b([]),te({}),typeof s<"u"&&s({current_page:1,per_page:10,sort:r||"id",order:"desc",search:""})},handleKeyDown:d=>d.key==="Enter"&&Xo(),handleCheckboxClick:Rn,isRowHidden:Qo,animatingRows:Lt,customPageSize:p,setCustomPageSize:N};return Ji(gn.Provider,{value:_n,children:e})},he=()=>{let e=ji(gn);if(!e)throw new Error("useEminTable must be used within a EminTableProvider");return e};import{useEffect as fn,useMemo as vn,useRef as el,useState as bn}from"react";import tl from"supercluster";import{Map as ol,Marker as hn,NavigationControl as al}from"react-map-gl/maplibre";import"maplibre-gl/dist/maplibre-gl.css";import{jsx as ze,jsxs as il}from"react/jsx-runtime";var Bb=({markers:e,cluster:t,mapStyleUrl:a,initialView:o,...n})=>ze(xn,{markers:e,cluster:t,mapStyleUrl:a,initialView:o,...n,children:ze(rl,{})}),rl=()=>{let e=Wo(),{markers:t,cluster:a,initialView:o,DEFAULT_MIN_ZOOM:n,MAP_MIN_BOUND:s,MAP_MAX_BOUND:r}=e,l=P=>Math.max(s,Math.min(r,P)),c=P=>P?.properties?.cluster===!0,p=()=>{if(!J.current)return;if(!a){F([]);return}let P=J.current.getBounds();if(!P)return;let it=[P.getWest(),P.getSouth(),P.getEast(),P.getNorth()],Tt=Math.round(l(J.current.getZoom()??n)),lt=$.getClusters(it,Tt);F(lt)},N=({viewState:P})=>{if(v(P),typeof e?.onMove=="function")try{e?.onMove({viewState:P})}catch{}p()},u={...o,zoom:l(typeof o?.zoom=="number"?o?.zoom:n)},[C,v]=bn(u),[b,F]=bn([]),J=el(null),ee=typeof e?.minZoom=="number"?l(e?.minZoom):n,te=typeof e?.maxZoom=="number"?l(e?.maxZoom):r;if(ee>te){let P=ee;ee=te,te=P}let He=vn(()=>t&&t.map(P=>({type:"Feature",properties:{id:P.id},geometry:{type:"Point",coordinates:[P.lng,P.lat]}})),[t]),$=vn(()=>new tl({radius:e?.radius??40,maxZoom:te,minZoom:ee}),[]);return fn(()=>{a&&$.load(He)},[$,He,a]),fn(()=>{p()},[$,C,e.cluster]),il(ol,{ref:J,mapStyle:e?.mapStyleUrl,initialViewState:u,...e,minZoom:ee,maxZoom:te,style:{width:"100%",height:"100%"},onMove:N,onLoad:p,children:[ze(al,{position:"top-left"}),(a?b:t||[]).map(P=>a&&c(P)?ze(sl,{item:P,index:$,mapRef:J,effectiveMaxZoom:te}):ze(nl,{item:P}))]})},nl=({item:e})=>{let{cluster:t,markers:a}=Wo(),o=t?e.properties?.id:e.id,n=t?e.geometry.coordinates[0]:e.lng,s=t?e.geometry.coordinates[1]:e.lat,r=t?a?.find(l=>l.id===o)??{id:o,lat:s,lng:n}:e;return ze(hn,{longitude:n,latitude:s,anchor:"center",children:r?.component??ze("div",{className:"w-3 h-3 rounded-full border-2 border-white shadow-md bg-blue-600 dark:bg-blue-500",title:"Marker"})},`p-${o}`)},sl=({item:e,index:t,mapRef:a,effectiveMaxZoom:o})=>{let[n,s]=e.geometry.coordinates,r=e.properties.point_count;return ze(hn,{longitude:n,latitude:s,anchor:"center",children:ze("div",{onClick:()=>{let c=Math.min(t.getClusterExpansionZoom(e.properties.cluster_id),o);a.current&&a.current.flyTo({center:[n,s],zoom:c,duration:500})},title:`${r}`,className:"cursor-pointer select-none flex items-center justify-center w-9 h-9 rounded-full border-2 shadow-md border-gray-500 bg-gray-900 text-white dark:bg-gray-800 dark:text-gray-200 font-bold text-xs",children:r})},`c-${e.properties.cluster_id}`)};import{createContext as ll,useContext as cl,useEffect as ml,useState as qo}from"react";import{jsx as dl}from"react/jsx-runtime";var Nn=ll({}),xn=({children:e,markers:t,mapStyleUrl:a,initialView:o,...n})=>{let s="https://demotiles.maplibre.org/style.json",[N,u]=qo(t),[C,v]=qo(!0),[b,F]=qo(a||s),J={DEFAULT_STYLE:s,DEFAULT_MIN_ZOOM:1,DEFAULT_MAX_ZOOM:16,MAP_MIN_BOUND:0,MAP_MAX_BOUND:22,markers:N,setMarkers:u,cluster:C,setCluster:v,mapStyleUrl:b,setMapStyleUrl:F,initialView:o||{longitude:0,latitude:0,zoom:1},...n},ee=fo();return ml(()=>{F(ee==="dark"?"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json":"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json")},[ee]),dl(Nn.Provider,{value:J,children:e})},Wo=()=>{let e=cl(Nn);if(!e)throw new Error("useWorldMap must be used within a WorldMapProvider");return e};import{IconChevronRight as wn}from"@tabler/icons-react";import{Fragment as Cn,jsx as w,jsxs as st}from"react/jsx-runtime";var kn=({items:e})=>w(Cn,{children:e.map(t=>t.items&&t.items.length>0?w(io,{asChild:!0,defaultOpen:!!(t.isActive||t.hasActiveChild),className:"group/collapsible",children:st(Ct,{children:[w(lo,{asChild:!0,className:"cursor-pointer",children:st(Ze,{tooltip:t.title,children:[t.icon&&w(i,{iconName:t.icon}),w("span",{children:t.title}),w(wn,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),w(co,{children:w(mo,{children:t.items.map(a=>w(fa,{children:a.items&&a.items.length>0?w(io,{asChild:!0,defaultOpen:!!(a.isActive||a.hasActiveChild),className:"group/collapsible",children:st(Cn,{children:[w(lo,{asChild:!0,className:"cursor-pointer",children:st(po,{className:g(a.isActive&&"bg-muted font-medium text-foreground dark:bg-muted/50"),children:[a.icon&&w(i,{iconName:a.icon}),w("span",{children:a.title}),w(wn,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),w(co,{children:w(mo,{children:w(kn,{items:a.items})})})]})}):w(po,{asChild:!0,className:g(a.isActive&&"bg-muted font-medium text-foreground dark:bg-muted/50"),children:st(yn,{href:a.route_name?route(a.route_name,a.payload??{}):"#",children:[a.icon&&w(i,{iconName:a.icon}),w("span",{children:a.title})]})})},a.title))})})]})},t.title):w(Ct,{children:w(Ze,{asChild:!0,tooltip:t.title,className:g(t.isActive&&"bg-muted font-medium text-foreground dark:bg-muted/50"),children:st(yn,{href:t.route_name?route(t.route_name,t.payload??{}):"#",children:[t.icon&&w(i,{iconName:t.icon}),w("span",{children:t.title})]})})},t.title))}),ko=({sidebarMenu:e})=>{let t=ul(null),a=gl(),o=()=>{if(t.current&&a?.props){let s=`nav-scroll-${window.location.pathname}`;localStorage.setItem(s,t.current.scrollTop.toString())}},n=()=>{if(t.current&&a?.props){let s=`nav-scroll-${window.location.pathname}`,r=localStorage.getItem(s);r&&(t.current.scrollTop=parseInt(r,10))}};return pl(()=>{let s=setTimeout(()=>{n()},100);return()=>clearTimeout(s)},[]),w("div",{ref:t,onScroll:o,children:e.map((s,r)=>st(ga,{children:[s.title&&w(Bt,{children:s.title}),w(_t,{className:"!flex ",children:w(kn,{items:s.items})})]},s.title||`section-${r}`))})};export{ko as a,hr as b,Hn as c,On as d,zl as e,Gl as f,Wt as g,Cr as h,kr as i,Qn as j,Cc as k,Xe as l,qt as m,Io as n,Eo as o,Lc as p,Sr as q,Mr as r,Do as s,ft as t,Kt as u,Yc as v,Ir as w,Er as x,lm as y,Dr as z,Ar as A,vt as B,Fr as C,Br as D,ad as E,vs as F,rd as G,Lo as H,Ns as I,_r as J,ys as K,Ro as L,Cs as M,ks as N,zr as O,Hr as P,Ps as Q,Qt as R,Ls as S,Rs as T,Fs as U,Q as V,oe as W,Or as X,Ur as Y,Zs as Z,$r as _,pu as $,Gr as aa,Fu as ba,ri as ca,Bo as da,ni as ea,si as fa,Yu as ga,ng as ha,Xr as ia,pi as ja,_o as ka,zo as la,Ho as ma,Oo as na,ui as oa,jt as pa,yt as qa,Kg as ra,wi as sa,St as ta,ve as ua,Mt as va,Rr as wa,Gf as xa,Vo as ya,Bi as za,Jf as Aa,rv as Ba,mv as Ca,dv as Da,Rv as Ea,sn as Fa,ln as Ga,cn as Ha,mn as Ia,he as Ja,Bb as Ka,xn as La,Wo as Ma};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R,b as B,c as H,d as O}from"./chunk-
|
|
1
|
+
import{a as R,b as B,c as H,d as O}from"./chunk-MFPLHKIJ.js";import{c as M}from"./chunk-UUF3H3EU.js";import{a as V}from"./chunk-KND3PUAR.js";import{a as E}from"./chunk-4DHRTWA7.js";import{a as F}from"./chunk-R7O5BURF.js";import{g as C}from"./chunk-7VMEGPPO.js";import{a as h,b as P,f as D,g as b,i as I,j as k}from"./chunk-QFUZ6MVT.js";import{a as w}from"./chunk-DSY4KVMF.js";import{b as N}from"./chunk-TVCWAJFT.js";import{a as n}from"./chunk-G4EEZUTC.js";import{a as A}from"./chunk-DWAU5VTB.js";import{useState as z}from"react";import{useForm as G,usePage as j}from"@inertiajs/react";import{IconAlertCircle as Y}from"@tabler/icons-react";import{Fragment as c,jsx as r,jsxs as u}from"react/jsx-runtime";var K=o=>[{step:u(c,{children:["Sign up at ",r("strong",{children:"emincore.io"})]})},{step:u(c,{children:["Create an application for ",r("strong",{children:o.app.url})]})},{step:u(c,{children:["Copy your ",r("strong",{children:"verification key"})]})},{step:r(c,{children:"Submit and verify your application"})}],L=o=>[{step:u(c,{children:["Log in to ",r("strong",{children:"emincore.io"})]})},{step:u(c,{children:["Select the application for ",r("strong",{children:o.app.url})]})},{step:r(c,{children:"Generate or regenerate an API Secret key and fill it in the form below."})},{step:r(c,{children:"Submit and complete the connection process."})}],X=o=>{switch(o){case"invalid_api_secret":return{icon:r(Y,{className:"text-red-500 mx-auto h-15 w-15"}),title:"Invalid API Secret Key",message:"Please check your API Secret key to access all ecosystem features.",content:r(S,{})};case"get_api_secret":return{icon:"IconPackages",title:"Connect to EminCore Platform",message:"Connect your application to the EminCore platform with your API Secret key to access all ecosystem features.",content:r(S,{})};case"verify_app":return{icon:"IconProgressCheck",title:"Verify your application",message:"Verify your application on the EminCore platform to access marketplace.",content:r(T,{})};case"403":return{icon:"IconBan",title:"403 Forbidden",message:"You do not have permission to access this resource."};default:return null}};import{Head as $}from"@inertiajs/react";import{Fragment as J,jsx as s,jsxs as _}from"react/jsx-runtime";var ce=({packages:o,requirements:m,account:l,error:g})=>{let p=[{title:"WM Dashboard",href:route("dashboard")},{title:"Platform"}],d=o.find(f=>f.code==A);return _(J,{children:[s($,{title:"Platform"}),s(F,{breadcrumbs:p,children:s(M,{packages:o,children:_("div",{className:"container mx-auto",children:[s(V,{title:"Platform",description:"Platform overview",icon:s(n,{iconName:"IconCloudCog"})}),_("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[s(R,{account:l}),s(B,{eminCore:d}),s(H,{requirements:m}),s(O,{})]})]})})})]})};import{toast as q}from"sonner";import{jsx as e,jsxs as t}from"react/jsx-runtime";var _e=({icon:o,title:m,message:l,content:g,className:p})=>t("div",{className:`grid gap-4 mt-15 mb-25 ${p}`,children:[o&&(typeof o=="string"?e(n,{iconName:o,className:"mx-auto h-15 w-15"}):o),t("div",{className:"grid gap-2 text-center",children:[e("h2",{className:"text-2xl font-bold",children:m}),e("span",{className:"text-sm text-muted-foreground",children:l}),g]})]}),S=()=>{let[o,m]=z(!1),l=j().props,{data:g,setData:p,post:d,processing:f,recentlySuccessful:v,errors:y}=G({api_secret_key:""});return t(h,{open:o,onOpenChange:m,children:[e(P,{children:t(N,{variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconPlug"}),e("span",{children:"Connect"})]})}),t(D,{children:[t(b,{children:[t(I,{className:"grid text-center mx-auto gap-2",children:[e(n,{iconName:"IconPlug",className:"mx-auto h-10 w-10"}),e("span",{children:"Connect to EminCore Platform"})]}),e(k,{className:"text-center",children:"Please provide valid API Secret Key to connect your application to the EminCore platform."})]}),e("div",{className:"grid gap-3",children:t("form",{onSubmit:a=>{a.preventDefault();let i=new Promise(x=>d(route("dashboard.settings.platform.connect"),{onFinish:x}));q.promise(i,{loading:"Connecting to EminCore Platform..."})},children:[t("div",{className:"grid gap-4 text-left max-w-md mx-auto text-center justify-center border-y py-4 my-4",children:[e("strong",{className:"text-center text-sm",children:"How to get API & Verification key"}),L(l).map((a,i)=>t("div",{className:"grid text-center gap-3",children:[e("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-bold mx-auto",children:i+1}),e("span",{className:"text-sm text-muted-foreground",children:a.step})]},i))]}),t("div",{className:"grid gap-4 text-center",children:[e(E,{placeholder:"Enter your API secret key",icon:"IconKey",value:g.api_secret_key,onChange:a=>p({api_secret_key:a.target.value}),error:y.api_secret_key}),t(C,{recentlySuccessful:v,processing:f,variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconPlug"}),e("span",{children:"Connect"})]})]})]})})]})]})},T=()=>{let[o,m]=z(!1),l=j().props,{data:g,setData:p,post:d,processing:f,recentlySuccessful:v,errors:y}=G({verification_code:""});return t(h,{open:o,onOpenChange:m,children:[e(P,{children:t(N,{variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconCheck"}),e("span",{children:"Verify"})]})}),t(D,{children:[t(b,{children:[t(I,{className:"grid text-center mx-auto gap-2",children:[e(n,{iconName:"IconProgressCheck",className:"mx-auto h-10 w-10"}),e("span",{children:"Verify your application on EminCore Platform"})]}),e(k,{className:"text-center",children:"Please follow the steps below to verify your application on the EminCore platform."})]}),e("div",{className:"grid gap-3",children:t("form",{onSubmit:a=>{a.preventDefault();let i=new Promise(x=>d(route("dashboard.settings.platform.verify"),{onFinish:x}));q.promise(i,{loading:"Verifying your application..."})},children:[e("div",{className:"grid gap-4 text-left max-w-md mx-auto text-center justify-center border-y py-4 my-4",children:K(l).map((a,i)=>t("div",{className:"grid text-center gap-3",children:[e("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-bold mx-auto",children:i+1}),e("span",{className:"text-sm text-muted-foreground",children:a.step})]},i))}),t("div",{className:"grid gap-4 text-center",children:[e(E,{placeholder:"Enter your verification code",icon:"IconKey",value:g.verification_code,onChange:a=>p({verification_code:a.target.value}),error:y.verification_code}),t(C,{processing:f,recentlySuccessful:v,className:"mt-2",children:[e(n,{iconName:"IconCheck"}),e("span",{children:"Verify"})]}),e(w,{message:y?.verification_code})]})]})})]})]})};export{_e as a,S as b,T as c,K as d,L as e,X as f,ce as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as d,da as m,ha as l,k as n}from"./chunk-7VMEGPPO.js";import{a as o,b as c,f as t}from"./chunk-3DBYUBWW.js";import{a as i}from"./chunk-65LRDGYI.js";import{a}from"./chunk-G4EEZUTC.js";import{Head as p}from"@inertiajs/react";import{jsx as e,jsxs as r}from"react/jsx-runtime";var A=({mustVerifyEmail:s,status:f})=>r(d,{breadcrumbs:[{title:"Edit Profile",href:route("user.profile.edit"),icon:"IconEdit"}],children:[e(p,{title:"Account Settings"}),r("div",{className:"grid md:grid-cols-[2fr_4fr] gap-12",children:[e(m,{}),r(o,{children:[e(c,{children:e(i,{icon:e(a,{iconName:"IconUser"}),title:"Profile Information",description:"Update your name and email address"})}),e(t,{children:e(l,{mustVerifyEmail:s,status:f})})]}),e(o,{className:"col-span-full",children:r(t,{className:"grid gap-8 md:flex md:items-center",children:[e(i,{icon:e(a,{iconName:"IconPalette"}),title:"Appearance",description:"Change your account appearance"}),e(n,{className:"md:ml-auto"})]})})]})]});export{A as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l,ua as v,y as h}from"./chunk-7VMEGPPO.js";import{a as u}from"./chunk-E2ZUBHVJ.js";import{a as n,c as s,e as d,h as p,i as c,k as m}from"./chunk-3MGLNOJ3.js";import{b as t}from"./chunk-TVCWAJFT.js";import{a as b}from"./chunk-G4EEZUTC.js";import{d as i}from"./chunk-GND5KQRZ.js";import{usePage as S}from"@inertiajs/react";import{Transition as f}from"@headlessui/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var E=({...y})=>{let{url:T}=S(),a=S().props,{dashboard:g}=a?.emin_core_menus,x=a?.app?.logos??[],{state:r}=n(),F=u(g,T);return o(s,{collapsible:"icon",...y,children:[o(p,{children:[o("div",{className:"relative items-center !h-[50px]",children:[e(f,{show:r=="collapsed",enter:"duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("img",{className:"absolute !max-w-[35px] !max-h-[35px]",src:i(x?.favicon)})}),e(f,{show:r=="expanded",enter:"duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("div",{children:e(v,{link:route("dashboard")})})})]}),e("hr",{className:"w-full"}),e(h,{})]}),e("hr",{}),e(m,{children:e(l,{sidebarMenu:F})}),e(c,{children:o(t,{variant:"outline",className:"flex items-center",children:[e(b,{iconName:"IconHelp"}),e("span",{className:"group-data-[collapsible=icon]:hidden",children:"Get Help"})]})}),e(d,{})]})};export{E as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-DWAU5VTB.js";import{a as d}from"./chunk-SLZ26UCQ.js";var o=e=>`${r}.${e}`,t=[{code:o("auth.login"),loader:()=>import("./pages/auth/login.js")},{code:o("auth.password-reset"),loader:()=>import("./pages/auth/password-reset.js")},{code:o("auth.password-confirm"),loader:()=>import("./pages/auth/password-confirm.js")},{code:o("auth.password-forgot"),loader:()=>import("./pages/auth/password-forgot.js")},{code:o("auth.register"),loader:()=>import("./pages/auth/register.js")},{code:o("auth.verify-email"),loader:()=>import("./pages/auth/verify-email.js")}],i=[{code:o("dashboard.marketplace.index"),loader:()=>import("./pages/dashboard/marketplace/index.js")},{code:o("dashboard.packages.index"),loader:()=>import("./pages/dashboard/packages/index.js")},{code:o("dashboard.platform.index"),loader:()=>import("./pages/dashboard/platform/index.js")},{code:o("dashboard.settings.slugs.index"),loader:()=>import("./pages/dashboard/settings/slugs/index.js")},{code:o("dashboard.settings.index"),loader:()=>import("./pages/dashboard/settings/index.js")},{code:o("dashboard.users.index"),loader:()=>import("./pages/dashboard/users/index.js")},{code:o("dashboard.index"),loader:()=>import("./pages/dashboard/index.js")}],s=[{code:o("my-account.notifications.index"),loader:()=>import("./pages/my-account/notifications/index.js")},{code:o("my-account.profile.index"),loader:()=>import("./pages/my-account/profile/index.js")},{code:o("my-account.profile.edit"),loader:()=>import("./pages/my-account/profile/edit.js")},{code:o("my-account.profile.edit-password"),loader:()=>import("./pages/my-account/profile/edit-password.js")}],c=[...t,...i,...s];c.map(({code:e,loader:a})=>d.register(e,a));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ca as r}from"./chunk-7VMEGPPO.js";import{useEffect as n,useState as a}from"react";import{jsx as i}from"react/jsx-runtime";var g=({statistics:t})=>{let[s,c]=a(t);n(()=>{c(t)},[t]);let o=[{title:"Total Users",value:String(s.total_users),icon:"IconUsers"},{title:"Active Users",value:String(s.active_users),icon:"IconUserCheck"},{title:"Pending Users",value:String(s.pending_users),icon:"IconUserSearch"},{title:"Inactive Users",value:String(s.inactive_users),icon:"IconUserX"},{title:"Blocked Users",value:String(s.blocked_users),icon:"IconUserCancel"}];return i("div",{className:"grid grid-cols-1 md:grid-cols-5 lg:grid-cols-5 gap-5",children:o.map(e=>i(r,{...e},e.title?.toString()))})};export{g as a};
|