cortex-react-components 2.4.0 → 2.4.1
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-N3B3XNV3.mjs → chunk-2BRDNDUB.mjs} +1 -1
- package/dist/{chunk-M7NV6EFH.mjs → chunk-3HNU2NYP.mjs} +1 -1
- package/dist/{chunk-FKU4VQR6.mjs → chunk-3NRXQBBS.mjs} +1 -1
- package/dist/{chunk-PK3OBSCB.mjs → chunk-5MWZTJYP.mjs} +1 -1
- package/dist/{chunk-B7AXSCTN.mjs → chunk-6MSM3CZ6.mjs} +1 -1
- package/dist/{chunk-5SHZBJ5R.mjs → chunk-75F3LJMX.mjs} +1 -1
- package/dist/{chunk-7BCUACIY.mjs → chunk-7HR6FNWF.mjs} +1 -1
- package/dist/{chunk-MXCW6SOT.mjs → chunk-7R47MHQE.mjs} +1 -1
- package/dist/{chunk-LJQPLE4S.mjs → chunk-AJQHGVZ5.mjs} +1 -1
- package/dist/{chunk-5MU4KV3B.mjs → chunk-AQZEZ3UR.mjs} +1 -1
- package/dist/{chunk-GS2VFNHY.mjs → chunk-B3F6F2S4.mjs} +1 -1
- package/dist/{chunk-U3F45KVI.mjs → chunk-BKR3FRMQ.mjs} +1 -1
- package/dist/{chunk-YKG4FNS4.mjs → chunk-C4RWEPVF.mjs} +1 -1
- package/dist/{chunk-7GMAMIHM.mjs → chunk-CXOVEABI.mjs} +1 -1
- package/dist/{chunk-O4NH5Z6F.mjs → chunk-DKVCSRUJ.mjs} +1 -1
- package/dist/{chunk-IF3425JX.mjs → chunk-FE7ZGUPU.mjs} +1 -1
- package/dist/{chunk-H3CJOE6S.mjs → chunk-GHOL5L32.mjs} +1 -1
- package/dist/{chunk-2RQDJ5XT.mjs → chunk-GTZJWMZR.mjs} +1 -1
- package/dist/{chunk-YOETYY5S.mjs → chunk-IPIDKLAW.mjs} +1 -1
- package/dist/{chunk-I2GNNRFH.mjs → chunk-KWYJ3XZI.mjs} +1 -1
- package/dist/{chunk-ITJH72Z2.mjs → chunk-LAQ3QAUW.mjs} +1 -1
- package/dist/chunk-LYPWYO4W.mjs +1 -0
- package/dist/{chunk-FTZRG54P.mjs → chunk-M4UVNIK2.mjs} +1 -1
- package/dist/{chunk-7EXAS7HK.mjs → chunk-MAAKU7PN.mjs} +1 -1
- package/dist/{chunk-HKGW6JI2.mjs → chunk-NINFDOV5.mjs} +1 -1
- package/dist/{chunk-SW7RYGO6.mjs → chunk-OQYER4E7.mjs} +1 -1
- package/dist/chunk-PC6TVU7J.mjs +1 -0
- package/dist/{chunk-FO3BUEXC.mjs → chunk-R75OR5VS.mjs} +1 -1
- package/dist/{chunk-255P6K5W.mjs → chunk-RGOKBIQ5.mjs} +1 -1
- package/dist/{chunk-67QPOSVV.mjs → chunk-RJGYVDOU.mjs} +1 -1
- package/dist/{chunk-5B6FLVPH.mjs → chunk-RVHCTANZ.mjs} +1 -1
- package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
- package/dist/{chunk-A3SDGX4K.mjs → chunk-UJSXVIXW.mjs} +1 -1
- package/dist/{chunk-5SIP7DC5.mjs → chunk-VR5WOPRD.mjs} +1 -1
- package/dist/{chunk-OTFILQXI.mjs → chunk-VWLPVN4M.mjs} +1 -1
- package/dist/{chunk-ERJXTG6X.mjs → chunk-WIRQ5IRT.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Holidays/HolidayGrid.js +1 -1
- package/dist/components/Holidays/HolidayGrid.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.js +1 -1
- package/dist/components/Holidays/HolidayTracker.mjs +1 -1
- package/dist/components/Holidays/RequestLeave.js +1 -1
- package/dist/components/Holidays/RequestLeave.mjs +1 -1
- package/dist/components/Holidays/index.js +1 -1
- package/dist/components/Holidays/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/dist/utils/BankHolidays.d.ts +1 -4
- package/dist/utils/BankHolidays.js +1 -1
- package/dist/utils/BankHolidays.mjs +1 -1
- package/dist/utils/DaysUtil.js +1 -1
- package/dist/utils/DaysUtil.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-A24EPYUY.mjs +0 -1
- package/dist/chunk-QKGEV7LG.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-C4RWEPVF.mjs";import"../../../chunk-2BRDNDUB.mjs";import"../../../chunk-O5BAW5XQ.mjs";import"../../../chunk-2QZUKVBA.mjs";import"../../../chunk-TXVA6XJT.mjs";import"../../../chunk-JYL3XIJX.mjs";import"../../../chunk-4CU7D3X2.mjs";import"../../../chunk-LVK4QE5D.mjs";import"../../../chunk-LKGCU7H6.mjs";import"../../../chunk-5WV5ZFEP.mjs";import"../../../chunk-KX2NCNCS.mjs";import"../../../chunk-LEC6GEWS.mjs";import"../../../chunk-NSMXJCXE.mjs";import"../../../chunk-XGIYNUGC.mjs";import"../../../chunk-X3JZSN3W.mjs";import"../../../chunk-2BR55L74.mjs";import"../../../chunk-TEB67NCD.mjs";import"../../../chunk-KFCSVEI6.mjs";import"../../../chunk-LXZAOORS.mjs";import"../../../chunk-MGYV46AJ.mjs";import"../../../chunk-CGDLOY7W.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-AZ4VR5JX.mjs";import"../../../chunk-BG7QXNV5.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-WISCWNL2.mjs";import"../../../chunk-FVM5SQT2.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as MediumImpactHero};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-6MSM3CZ6.mjs";import"../../chunk-MZP7RIQZ.mjs";import"../../chunk-RGOKBIQ5.mjs";import"../../chunk-NINFDOV5.mjs";import"../../chunk-C4RWEPVF.mjs";import"../../chunk-2BRDNDUB.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.mjs";import"../../chunk-LVK4QE5D.mjs";import"../../chunk-LKGCU7H6.mjs";import"../../chunk-5WV5ZFEP.mjs";import"../../chunk-KX2NCNCS.mjs";import"../../chunk-LEC6GEWS.mjs";import"../../chunk-NSMXJCXE.mjs";import"../../chunk-XGIYNUGC.mjs";import"../../chunk-X3JZSN3W.mjs";import"../../chunk-2BR55L74.mjs";import"../../chunk-TEB67NCD.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-LXZAOORS.mjs";import"../../chunk-MGYV46AJ.mjs";import"../../chunk-CGDLOY7W.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-AZ4VR5JX.mjs";import"../../chunk-BG7QXNV5.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{b as Breadcrumbs,a as RenderHero};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"../../chunk-2NMVE5M4.mjs";import{a as f,b as g}from"../../chunk-
|
|
1
|
+
import{a as h}from"../../chunk-2NMVE5M4.mjs";import{a as f,b as g}from"../../chunk-6MSM3CZ6.mjs";import{a as e}from"../../chunk-MZP7RIQZ.mjs";import{a}from"../../chunk-RGOKBIQ5.mjs";import{a as c}from"../../chunk-NINFDOV5.mjs";import{a as b}from"../../chunk-C4RWEPVF.mjs";import{a as d}from"../../chunk-F5N6KQA2.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-YNNW2C2U.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-2BRDNDUB.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.mjs";import"../../chunk-LVK4QE5D.mjs";import"../../chunk-LKGCU7H6.mjs";import"../../chunk-5WV5ZFEP.mjs";import"../../chunk-KX2NCNCS.mjs";import"../../chunk-LEC6GEWS.mjs";import"../../chunk-NSMXJCXE.mjs";import"../../chunk-XGIYNUGC.mjs";import"../../chunk-X3JZSN3W.mjs";import"../../chunk-2BR55L74.mjs";import"../../chunk-TEB67NCD.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-LXZAOORS.mjs";import"../../chunk-MGYV46AJ.mjs";import"../../chunk-CGDLOY7W.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-O5P35LEY.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-AZ4VR5JX.mjs";import"../../chunk-BG7QXNV5.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{g as Breadcrumbs,h as DashboardHero,a as HighImpactHero,c as LowImpactHero,b as MediumImpactHero,d as PostHero,f as RenderHero,e as SectionHero};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
"use strict";var Ae=Object.create;var j=Object.defineProperty;var ze=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Se=(e,t)=>{for(var r in t)j(e,r,{get:t[r],enumerable:!0})},ce=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Pe(t))!Me.call(e,a)&&a!==r&&j(e,a,{get:()=>t[a],enumerable:!(o=ze(t,a))||o.enumerable});return e};var q=(e,t,r)=>(r=e!=null?Ae(Re(e)):{},ce(t||!e||!e.__esModule?j(r,"default",{value:e,enumerable:!0}):r,e)),Ie=e=>ce(j({},"__esModule",{value:!0}),e);var pt={};Se(pt,{HolidayGrid:()=>dt});module.exports=Ie(pt);var _=require("lucide-react");var ye=require("clsx");var X="-",Ge=e=>{let t=Te(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let s=l.split(X);return s[0]===""&&s.length!==1&&s.shift(),ue(s,t)||De(l)},getConflictingClassGroupIds:(l,s)=>{let m=r[l]||[];return s&&o[l]?[...m,...o[l]]:m}}},ue=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),a=o?ue(e.slice(1),o):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(X);return t.validators.find(({validator:l})=>l(n))?.classGroupId},de=/^\[(.+)\]$/,De=e=>{if(de.test(e)){let t=de.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Te=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Be(Object.entries(e.classGroups),r).forEach(([n,l])=>{K(l,o,n,t)}),o},K=(e,t,r,o)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:pe(t,a);n.classGroupId=r;return}if(typeof a=="function"){if(Ee(a)){K(a(o),t,r,o);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([n,l])=>{K(l,pe(t,n),r,o)})})},pe=(e,t)=>{let r=e;return t.split(X).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ee=e=>e.isThemeGetter,Be=(e,t)=>t?e.map(([r,o])=>{let a=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,s])=>[t+l,s])):n);return[r,a]}):e,Fe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,a=(n,l)=>{r.set(n,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let l=r.get(n);if(l!==void 0)return l;if((l=o.get(n))!==void 0)return a(n,l),l},set(n,l){r.has(n)?r.set(n,l):a(n,l)}}},me="!",Le=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,a=t[0],n=t.length,l=s=>{let m=[],d=0,b=0,y;for(let h=0;h<s.length;h++){let v=s[h];if(d===0){if(v===a&&(o||s.slice(h,h+n)===t)){m.push(s.slice(b,h)),b=h+n;continue}if(v==="/"){y=h;continue}}v==="["?d++:v==="]"&&d--}let x=m.length===0?s:s.substring(b),w=x.startsWith(me),f=w?x.substring(1):x,g=y&&y>b?y-b:void 0;return{modifiers:m,hasImportantModifier:w,baseClassName:f,maybePostfixModifierPosition:g}};return r?s=>r({className:s,parseClassName:l}):l},$e=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},je=e=>({cache:Fe(e.cacheSize),parseClassName:Le(e),...Ge(e)}),Ve=/\s+/,We=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:a}=t,n=[],l=e.trim().split(Ve),s="";for(let m=l.length-1;m>=0;m-=1){let d=l[m],{modifiers:b,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:w}=r(d),f=!!w,g=o(f?x.substring(0,w):x);if(!g){if(!f){s=d+(s.length>0?" "+s:s);continue}if(g=o(x),!g){s=d+(s.length>0?" "+s:s);continue}f=!1}let h=$e(b).join(":"),v=y?h+me:h,k=v+g;if(n.includes(k))continue;n.push(k);let G=a(g,f);for(let R=0;R<G.length;++R){let F=G[R];n.push(v+F)}s=d+(s.length>0?" "+s:s)}return s};function _e(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=be(t))&&(o&&(o+=" "),o+=r);return o}var be=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=be(e[o]))&&(r&&(r+=" "),r+=t);return r};function He(e,...t){let r,o,a,n=l;function l(m){let d=t.reduce((b,y)=>y(b),e());return r=je(d),o=r.cache.get,a=r.cache.set,n=s,s(m)}function s(m){let d=o(m);if(d)return d;let b=We(m,r);return a(m,b),b}return function(){return n(_e.apply(null,arguments))}}var p=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},fe=/^\[(?:([a-z-]+):)?(.+)\]$/i,Oe=/^\d+\/\d+$/,Ue=new Set(["px","full","screen"]),Ye=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Je=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ke=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,N=e=>S(e)||Ue.has(e)||Oe.test(e),z=e=>I(e,"length",at),S=e=>!!e&&!Number.isNaN(Number(e)),J=e=>I(e,"number",S),T=e=>!!e&&Number.isInteger(Number(e)),Ze=e=>e.endsWith("%")&&S(e.slice(0,-1)),i=e=>fe.test(e),P=e=>Ye.test(e),Qe=new Set(["length","size","percentage"]),et=e=>I(e,Qe,ge),tt=e=>I(e,"position",ge),rt=new Set(["image","url"]),ot=e=>I(e,rt,it),nt=e=>I(e,"",st),E=()=>!0,I=(e,t,r)=>{let o=fe.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},at=e=>qe.test(e)&&!Je.test(e),ge=()=>!1,st=e=>Ke.test(e),it=e=>Xe.test(e);var lt=()=>{let e=p("colors"),t=p("spacing"),r=p("blur"),o=p("brightness"),a=p("borderColor"),n=p("borderRadius"),l=p("borderSpacing"),s=p("borderWidth"),m=p("contrast"),d=p("grayscale"),b=p("hueRotate"),y=p("invert"),x=p("gap"),w=p("gradientColorStops"),f=p("gradientColorStopPositions"),g=p("inset"),h=p("margin"),v=p("opacity"),k=p("padding"),G=p("saturate"),R=p("scale"),F=p("sepia"),re=p("skew"),oe=p("space"),ne=p("translate"),H=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",i,t],u=()=>[i,t],ae=()=>["",N,z],L=()=>["auto",S,i],se=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",i],le=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>[S,i];return{cacheSize:500,separator:":",theme:{colors:[E],spacing:[N,z],blur:["none","",P,i],brightness:C(),borderColor:[e],borderRadius:["none","","full",P,i],borderSpacing:u(),borderWidth:ae(),contrast:C(),grayscale:D(),hueRotate:C(),invert:D(),gap:u(),gradientColorStops:[e],gradientColorStopPositions:[Ze,z],inset:U(),margin:U(),opacity:C(),padding:u(),saturate:C(),scale:C(),sepia:D(),skew:C(),space:u(),translate:u()},classGroups:{aspect:[{aspect:["auto","square","video",i]}],container:["container"],columns:[{columns:[P]}],"break-after":[{"break-after":le()}],"break-before":[{"break-before":le()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...se(),i]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",T,i]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",i]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",T,i]}],"grid-cols":[{"grid-cols":[E]}],"col-start-end":[{col:["auto",{span:["full",T,i]},i]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[E]}],"row-start-end":[{row:["auto",{span:[T,i]},i]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",i]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",i]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[oe]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[oe]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",i,t]}],"min-w":[{"min-w":[i,t,"min","max","fit"]}],"max-w":[{"max-w":[i,t,"none","full","min","max","fit","prose",{screen:[P]},P]}],h:[{h:[i,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[i,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[i,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[i,t,"auto","min","max","fit"]}],"font-size":[{text:["base",P,z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",J]}],"font-family":[{font:[E]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",i]}],"line-clamp":[{"line-clamp":["none",S,J]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",N,i]}],"list-image":[{"list-image":["none",i]}],"list-style-type":[{list:["none","disc","decimal",i]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",N,z]}],"underline-offset":[{"underline-offset":["auto",N,i]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:u()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",i]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",i]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...se(),tt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",et]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ot]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:$()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[N,i]}],"outline-w":[{outline:[N,z]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[N,z]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",P,nt]}],"shadow-color":[{shadow:[E]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",P,i]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[y]}],saturate:[{saturate:[G]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[G]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",i]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",i]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",i]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[T,i]}],"translate-x":[{"translate-x":[ne]}],"translate-y":[{"translate-y":[ne]}],"skew-x":[{"skew-x":[re]}],"skew-y":[{"skew-y":[re]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",i]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",i]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":u()}],"scroll-mx":[{"scroll-mx":u()}],"scroll-my":[{"scroll-my":u()}],"scroll-ms":[{"scroll-ms":u()}],"scroll-me":[{"scroll-me":u()}],"scroll-mt":[{"scroll-mt":u()}],"scroll-mr":[{"scroll-mr":u()}],"scroll-mb":[{"scroll-mb":u()}],"scroll-ml":[{"scroll-ml":u()}],"scroll-p":[{"scroll-p":u()}],"scroll-px":[{"scroll-px":u()}],"scroll-py":[{"scroll-py":u()}],"scroll-ps":[{"scroll-ps":u()}],"scroll-pe":[{"scroll-pe":u()}],"scroll-pt":[{"scroll-pt":u()}],"scroll-pr":[{"scroll-pr":u()}],"scroll-pb":[{"scroll-pb":u()}],"scroll-pl":[{"scroll-pl":u()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",i]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[N,z,J]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var he=He(lt);function M(...e){return he((0,ye.clsx)(e))}var ve=require("@radix-ui/react-slot"),xe=require("class-variance-authority"),we=q(require("react")),ke=require("react/jsx-runtime"),ct=(0,xe.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),B=we.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...a},n)=>(0,ke.jsx)(e?ve.Slot:"button",{className:M(ct({className:t,size:r,variant:o})),ref:n,...a}));B.displayName="Button";var V=q(require("react")),A=q(require("@radix-ui/react-avatar"));var Z=V.forwardRef(({className:e,...t},r)=>(0,ke.jsx)(A.Root,{ref:r,className:M("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Z.displayName=A.Root.displayName;var Q=V.forwardRef(({className:e,...t},r)=>(0,ke.jsx)(A.Image,{ref:r,className:M("aspect-square h-full w-full",e),...t}));Q.displayName=A.Image.displayName;var ee=V.forwardRef(({className:e,...t},r)=>(0,ke.jsx)(A.Fallback,{ref:r,className:M("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ee.displayName=A.Fallback.displayName;var Ce=[{date:new Date(2025,3,18),name:"Good Friday"},{date:new Date(2025,3,21),name:"Easter Monday"},{date:new Date(2025,4,5),name:"Early May bank holiday"},{date:new Date(2025,5,26),name:"Spring bank holiday"},{date:new Date(2025,7,25),name:"Summer bank holiday"},{date:new Date(2025,11,25),name:"Christmas Day"},{date:new Date(2025,11,26),name:"Boxing Day"}];var te=e=>{let t=e.getDay()===0,r=e.getDay()===6,o=Ce.some(a=>a.date.toISOString()===e.toISOString());return t||r||o};function Ne(...e){return e.filter(Boolean).join(" ")}function dt({currentDate:e,setCurrentDate:t,holidays:r,employees:o}){let a=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),n=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},s=()=>{t(new Date)},m=d=>d.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,ke.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,ke.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,ke.jsxs)("div",{className:"sm:flex-auto",children:[(0,ke.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,ke.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,ke.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,ke.jsxs)(B,{onClick:n,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,ke.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,ke.jsx)(_.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,ke.jsx)(B,{variant:"outline",onClick:s,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,ke.jsxs)(B,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,ke.jsx)("span",{className:"sr-only",children:"Next month"}),(0,ke.jsx)(_.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,ke.jsx)("div",{className:"mt-8 flow-root",children:(0,ke.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,ke.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,ke.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,ke.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,ke.jsxs)("tr",{children:[(0,ke.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(a)].map((d,b)=>{let y=new Date(e.getFullYear(),e.getMonth(),b+1);return(0,ke.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${te(y)?"bg-gray-200":""}`,children:[(0,ke.jsx)("div",{children:m(y)}),(0,ke.jsx)("div",{children:b+1})]},b)})]})}),(0,ke.jsx)("tbody",{children:o.map((d,b)=>(0,ke.jsxs)("tr",{children:[(0,ke.jsx)("td",{className:Ne(b!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,ke.jsxs)("div",{className:"flex items-center",children:[(0,ke.jsxs)(Z,{className:"h-11 w-11",children:[(0,ke.jsx)(Q,{src:d.image,alt:d.name}),(0,ke.jsx)(ee,{children:d.name.split(" ").map(y=>y[0]).join("")})]}),(0,ke.jsx)("div",{className:"ml-4",children:(0,ke.jsx)("div",{className:"font-medium text-accent",children:d.name})})]})}),[...Array(a)].map((y,x)=>{let w=new Date(e.getFullYear(),e.getMonth(),x+1),f=r.find(g=>g.userId===d.id&&new Date(g.startDate)<=w&&new Date(g.endDate)>=w);return(0,ke.jsx)("td",{className:Ne(b!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",te(w)?"bg-gray-200":"bg-white"),children:(0,ke.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${f?f.status==="approved"?"bg-green-500":f.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:f?`${d.name}: ${f.status} (${f.startDate} - ${f.endDate}) - ${f.leaveType}`:"",children:f&&f.leaveType!=="Full Day"&&(0,ke.jsx)("div",{className:`h-3 w-6 ${f.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${d.id}-${x}`)})]},d.id))})]})})})})]})}0&&(module.exports={HolidayGrid});
|
|
4
|
+
"use strict";var Ae=Object.create;var j=Object.defineProperty;var ze=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Se=(e,t)=>{for(var r in t)j(e,r,{get:t[r],enumerable:!0})},ce=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Pe(t))!Me.call(e,s)&&s!==r&&j(e,s,{get:()=>t[s],enumerable:!(o=ze(t,s))||o.enumerable});return e};var q=(e,t,r)=>(r=e!=null?Ae(Re(e)):{},ce(t||!e||!e.__esModule?j(r,"default",{value:e,enumerable:!0}):r,e)),De=e=>ce(j({},"__esModule",{value:!0}),e);var pt={};Se(pt,{HolidayGrid:()=>dt});module.exports=De(pt);var _=require("lucide-react");var ye=require("clsx");var X="-",Ie=e=>{let t=Te(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let a=l.split(X);return a[0]===""&&a.length!==1&&a.shift(),ue(a,t)||Ge(l)},getConflictingClassGroupIds:(l,a)=>{let m=r[l]||[];return a&&o[l]?[...m,...o[l]]:m}}},ue=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?ue(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(X);return t.validators.find(({validator:l})=>l(n))?.classGroupId},de=/^\[(.+)\]$/,Ge=e=>{if(de.test(e)){let t=de.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Te=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Be(Object.entries(e.classGroups),r).forEach(([n,l])=>{K(l,o,n,t)}),o},K=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:pe(t,s);n.classGroupId=r;return}if(typeof s=="function"){if(Ee(s)){K(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([n,l])=>{K(l,pe(t,n),r,o)})})},pe=(e,t)=>{let r=e;return t.split(X).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ee=e=>e.isThemeGetter,Be=(e,t)=>t?e.map(([r,o])=>{let s=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,a])=>[t+l,a])):n);return[r,s]}):e,Le=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(n,l)=>{r.set(n,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let l=r.get(n);if(l!==void 0)return l;if((l=o.get(n))!==void 0)return s(n,l),l},set(n,l){r.has(n)?r.set(n,l):s(n,l)}}},me="!",Fe=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],n=t.length,l=a=>{let m=[],d=0,b=0,y;for(let h=0;h<a.length;h++){let v=a[h];if(d===0){if(v===s&&(o||a.slice(h,h+n)===t)){m.push(a.slice(b,h)),b=h+n;continue}if(v==="/"){y=h;continue}}v==="["?d++:v==="]"&&d--}let x=m.length===0?a:a.substring(b),w=x.startsWith(me),f=w?x.substring(1):x,g=y&&y>b?y-b:void 0;return{modifiers:m,hasImportantModifier:w,baseClassName:f,maybePostfixModifierPosition:g}};return r?a=>r({className:a,parseClassName:l}):l},$e=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},je=e=>({cache:Le(e.cacheSize),parseClassName:Fe(e),...Ie(e)}),Ve=/\s+/,We=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,n=[],l=e.trim().split(Ve),a="";for(let m=l.length-1;m>=0;m-=1){let d=l[m],{modifiers:b,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:w}=r(d),f=!!w,g=o(f?x.substring(0,w):x);if(!g){if(!f){a=d+(a.length>0?" "+a:a);continue}if(g=o(x),!g){a=d+(a.length>0?" "+a:a);continue}f=!1}let h=$e(b).join(":"),v=y?h+me:h,k=v+g;if(n.includes(k))continue;n.push(k);let I=s(g,f);for(let R=0;R<I.length;++R){let L=I[R];n.push(v+L)}a=d+(a.length>0?" "+a:a)}return a};function _e(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=be(t))&&(o&&(o+=" "),o+=r);return o}var be=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=be(e[o]))&&(r&&(r+=" "),r+=t);return r};function He(e,...t){let r,o,s,n=l;function l(m){let d=t.reduce((b,y)=>y(b),e());return r=je(d),o=r.cache.get,s=r.cache.set,n=a,a(m)}function a(m){let d=o(m);if(d)return d;let b=We(m,r);return s(m,b),b}return function(){return n(_e.apply(null,arguments))}}var p=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},fe=/^\[(?:([a-z-]+):)?(.+)\]$/i,Oe=/^\d+\/\d+$/,Ue=new Set(["px","full","screen"]),Ye=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Je=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ke=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,N=e=>S(e)||Ue.has(e)||Oe.test(e),z=e=>D(e,"length",st),S=e=>!!e&&!Number.isNaN(Number(e)),J=e=>D(e,"number",S),T=e=>!!e&&Number.isInteger(Number(e)),Ze=e=>e.endsWith("%")&&S(e.slice(0,-1)),i=e=>fe.test(e),P=e=>Ye.test(e),Qe=new Set(["length","size","percentage"]),et=e=>D(e,Qe,ge),tt=e=>D(e,"position",ge),rt=new Set(["image","url"]),ot=e=>D(e,rt,it),nt=e=>D(e,"",at),E=()=>!0,D=(e,t,r)=>{let o=fe.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},st=e=>qe.test(e)&&!Je.test(e),ge=()=>!1,at=e=>Ke.test(e),it=e=>Xe.test(e);var lt=()=>{let e=p("colors"),t=p("spacing"),r=p("blur"),o=p("brightness"),s=p("borderColor"),n=p("borderRadius"),l=p("borderSpacing"),a=p("borderWidth"),m=p("contrast"),d=p("grayscale"),b=p("hueRotate"),y=p("invert"),x=p("gap"),w=p("gradientColorStops"),f=p("gradientColorStopPositions"),g=p("inset"),h=p("margin"),v=p("opacity"),k=p("padding"),I=p("saturate"),R=p("scale"),L=p("sepia"),re=p("skew"),oe=p("space"),ne=p("translate"),H=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",i,t],u=()=>[i,t],se=()=>["",N,z],F=()=>["auto",S,i],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],G=()=>["","0",i],le=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>[S,i];return{cacheSize:500,separator:":",theme:{colors:[E],spacing:[N,z],blur:["none","",P,i],brightness:C(),borderColor:[e],borderRadius:["none","","full",P,i],borderSpacing:u(),borderWidth:se(),contrast:C(),grayscale:G(),hueRotate:C(),invert:G(),gap:u(),gradientColorStops:[e],gradientColorStopPositions:[Ze,z],inset:U(),margin:U(),opacity:C(),padding:u(),saturate:C(),scale:C(),sepia:G(),skew:C(),space:u(),translate:u()},classGroups:{aspect:[{aspect:["auto","square","video",i]}],container:["container"],columns:[{columns:[P]}],"break-after":[{"break-after":le()}],"break-before":[{"break-before":le()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ae(),i]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",T,i]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",i]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",T,i]}],"grid-cols":[{"grid-cols":[E]}],"col-start-end":[{col:["auto",{span:["full",T,i]},i]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[E]}],"row-start-end":[{row:["auto",{span:[T,i]},i]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",i]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",i]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[oe]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[oe]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",i,t]}],"min-w":[{"min-w":[i,t,"min","max","fit"]}],"max-w":[{"max-w":[i,t,"none","full","min","max","fit","prose",{screen:[P]},P]}],h:[{h:[i,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[i,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[i,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[i,t,"auto","min","max","fit"]}],"font-size":[{text:["base",P,z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",J]}],"font-family":[{font:[E]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",i]}],"line-clamp":[{"line-clamp":["none",S,J]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",N,i]}],"list-image":[{"list-image":["none",i]}],"list-style-type":[{list:["none","disc","decimal",i]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",N,z]}],"underline-offset":[{"underline-offset":["auto",N,i]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:u()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",i]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",i]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),tt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",et]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ot]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:$()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[N,i]}],"outline-w":[{outline:[N,z]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[N,z]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",P,nt]}],"shadow-color":[{shadow:[E]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",P,i]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[y]}],saturate:[{saturate:[I]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",i]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",i]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",i]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[T,i]}],"translate-x":[{"translate-x":[ne]}],"translate-y":[{"translate-y":[ne]}],"skew-x":[{"skew-x":[re]}],"skew-y":[{"skew-y":[re]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",i]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",i]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":u()}],"scroll-mx":[{"scroll-mx":u()}],"scroll-my":[{"scroll-my":u()}],"scroll-ms":[{"scroll-ms":u()}],"scroll-me":[{"scroll-me":u()}],"scroll-mt":[{"scroll-mt":u()}],"scroll-mr":[{"scroll-mr":u()}],"scroll-mb":[{"scroll-mb":u()}],"scroll-ml":[{"scroll-ml":u()}],"scroll-p":[{"scroll-p":u()}],"scroll-px":[{"scroll-px":u()}],"scroll-py":[{"scroll-py":u()}],"scroll-ps":[{"scroll-ps":u()}],"scroll-pe":[{"scroll-pe":u()}],"scroll-pt":[{"scroll-pt":u()}],"scroll-pr":[{"scroll-pr":u()}],"scroll-pb":[{"scroll-pb":u()}],"scroll-pl":[{"scroll-pl":u()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",i]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[N,z,J]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var he=He(lt);function M(...e){return he((0,ye.clsx)(e))}var ve=require("@radix-ui/react-slot"),xe=require("class-variance-authority"),we=q(require("react")),ke=require("react/jsx-runtime"),ct=(0,xe.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),B=we.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...s},n)=>(0,ke.jsx)(e?ve.Slot:"button",{className:M(ct({className:t,size:r,variant:o})),ref:n,...s}));B.displayName="Button";var V=q(require("react")),A=q(require("@radix-ui/react-avatar"));var Z=V.forwardRef(({className:e,...t},r)=>(0,ke.jsx)(A.Root,{ref:r,className:M("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Z.displayName=A.Root.displayName;var Q=V.forwardRef(({className:e,...t},r)=>(0,ke.jsx)(A.Image,{ref:r,className:M("aspect-square h-full w-full",e),...t}));Q.displayName=A.Image.displayName;var ee=V.forwardRef(({className:e,...t},r)=>(0,ke.jsx)(A.Fallback,{ref:r,className:M("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ee.displayName=A.Fallback.displayName;var Ce=[new Date(2025,0,1),new Date(2025,3,18),new Date(2025,3,21),new Date(2025,4,5),new Date(2025,4,26),new Date(2025,7,25),new Date(2025,11,25),new Date(2025,11,26),new Date(2026,0,1),new Date(2026,3,3),new Date(2026,3,6),new Date(2026,4,4),new Date(2026,4,25),new Date(2026,7,31),new Date(2026,11,25),new Date(2026,11,28)];var te=e=>{let t=e.getDay()===0,r=e.getDay()===6,o=Ce.some(s=>s.toISOString()===e.toISOString());return t||r||o};function Ne(...e){return e.filter(Boolean).join(" ")}function dt({currentDate:e,setCurrentDate:t,holidays:r,employees:o}){let s=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),n=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},a=()=>{t(new Date)},m=d=>d.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,ke.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,ke.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,ke.jsxs)("div",{className:"sm:flex-auto",children:[(0,ke.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,ke.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,ke.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,ke.jsxs)(B,{onClick:n,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,ke.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,ke.jsx)(_.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,ke.jsx)(B,{variant:"outline",onClick:a,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,ke.jsxs)(B,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,ke.jsx)("span",{className:"sr-only",children:"Next month"}),(0,ke.jsx)(_.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,ke.jsx)("div",{className:"mt-8 flow-root",children:(0,ke.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,ke.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,ke.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,ke.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,ke.jsxs)("tr",{children:[(0,ke.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(s)].map((d,b)=>{let y=new Date(e.getFullYear(),e.getMonth(),b+1);return(0,ke.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${te(y)?"bg-gray-200":""}`,children:[(0,ke.jsx)("div",{children:m(y)}),(0,ke.jsx)("div",{children:b+1})]},b)})]})}),(0,ke.jsx)("tbody",{children:o.map((d,b)=>(0,ke.jsxs)("tr",{children:[(0,ke.jsx)("td",{className:Ne(b!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,ke.jsxs)("div",{className:"flex items-center",children:[(0,ke.jsxs)(Z,{className:"h-11 w-11",children:[(0,ke.jsx)(Q,{src:d.image,alt:d.name}),(0,ke.jsx)(ee,{children:d.name.split(" ").map(y=>y[0]).join("")})]}),(0,ke.jsx)("div",{className:"ml-4",children:(0,ke.jsx)("div",{className:"font-medium text-accent",children:d.name})})]})}),[...Array(s)].map((y,x)=>{let w=new Date(e.getFullYear(),e.getMonth(),x+1),f=r.find(g=>g.userId===d.id&&new Date(g.startDate)<=w&&new Date(g.endDate)>=w);return(0,ke.jsx)("td",{className:Ne(b!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",te(w)?"bg-gray-200":"bg-white"),children:(0,ke.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${f?f.status==="approved"?"bg-green-500":f.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:f?`${d.name}: ${f.status} (${f.startDate} - ${f.endDate}) - ${f.leaveType}`:"",children:f&&f.leaveType!=="Full Day"&&(0,ke.jsx)("div",{className:`h-3 w-6 ${f.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${d.id}-${x}`)})]},d.id))})]})})})})]})}0&&(module.exports={HolidayGrid});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-B3F6F2S4.mjs";import"../../chunk-PC6TVU7J.mjs";import"../../chunk-LYPWYO4W.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as HolidayGrid};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
"use strict";"use client";var xt=Object.create;var re=Object.defineProperty;var wt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var Pt=Object.getPrototypeOf,kt=Object.prototype.hasOwnProperty;var Ct=(e,t)=>{for(var r in t)re(e,r,{get:t[r],enumerable:!0})},ze=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Nt(t))!kt.call(e,s)&&s!==r&&re(e,s,{get:()=>t[s],enumerable:!(o=wt(t,s))||o.enumerable});return e};var L=(e,t,r)=>(r=e!=null?xt(Pt(e)):{},ze(t||!e||!e.__esModule?re(r,"default",{value:e,enumerable:!0}):r,e)),Rt=e=>ze(re({},"__esModule",{value:!0}),e);var cr={};Ct(cr,{HolidayTracker:()=>lr});module.exports=Rt(cr);var vt=require("react"),ht=require("lucide-react"),E=require("lucide-react");var je=require("clsx");var ye="-",Dt=e=>{let t=At(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let l=c.split(ye);return l[0]===""&&l.length!==1&&l.shift(),Fe(l,t)||St(c)},getConflictingClassGroupIds:(c,l)=>{let p=r[c]||[];return l&&o[c]?[...p,...o[c]]:p}}},Fe=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?Fe(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(ye);return t.validators.find(({validator:c})=>c(n))?.classGroupId},Ie=/^\[(.+)\]$/,St=e=>{if(Ie.test(e)){let t=Ie.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},At=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Lt(Object.entries(e.classGroups),r).forEach(([n,c])=>{he(c,o,n,t)}),o},he=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:Be(t,s);n.classGroupId=r;return}if(typeof s=="function"){if(Mt(s)){he(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([n,c])=>{he(c,Be(t,n),r,o)})})},Be=(e,t)=>{let r=e;return t.split(ye).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Mt=e=>e.isThemeGetter,Lt=(e,t)=>t?e.map(([r,o])=>{let s=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,l])=>[t+c,l])):n);return[r,s]}):e,Tt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(n,c)=>{r.set(n,c),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let c=r.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return s(n,c),c},set(n,c){r.has(n)?r.set(n,c):s(n,c)}}},Ee="!",zt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],n=t.length,c=l=>{let p=[],u=0,a=0,f;for(let h=0;h<l.length;h++){let k=l[h];if(u===0){if(k===s&&(o||l.slice(h,h+n)===t)){p.push(l.slice(a,h)),a=h+n;continue}if(k==="/"){f=h;continue}}k==="["?u++:k==="]"&&u--}let x=p.length===0?l:l.substring(a),C=x.startsWith(Ee),w=C?x.substring(1):x,i=f&&f>a?f-a:void 0;return{modifiers:p,hasImportantModifier:C,baseClassName:w,maybePostfixModifierPosition:i}};return r?l=>r({className:l,parseClassName:c}):c},It=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Bt=e=>({cache:Tt(e.cacheSize),parseClassName:zt(e),...Dt(e)}),Ft=/\s+/,Et=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,n=[],c=e.trim().split(Ft),l="";for(let p=c.length-1;p>=0;p-=1){let u=c[p],{modifiers:a,hasImportantModifier:f,baseClassName:x,maybePostfixModifierPosition:C}=r(u),w=!!C,i=o(w?x.substring(0,C):x);if(!i){if(!w){l=u+(l.length>0?" "+l:l);continue}if(i=o(x),!i){l=u+(l.length>0?" "+l:l);continue}w=!1}let h=It(a).join(":"),k=f?h+Ee:h,S=k+i;if(n.includes(S))continue;n.push(S);let H=s(i,w);for(let G=0;G<H.length;++G){let Q=H[G];n.push(k+Q)}l=u+(l.length>0?" "+l:l)}return l};function Gt(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ge(t))&&(o&&(o+=" "),o+=r);return o}var Ge=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Ge(e[o]))&&(r&&(r+=" "),r+=t);return r};function Vt(e,...t){let r,o,s,n=c;function c(p){let u=t.reduce((a,f)=>f(a),e());return r=Bt(u),o=r.cache.get,s=r.cache.set,n=l,l(p)}function l(p){let u=o(p);if(u)return u;let a=Et(p,r);return s(p,a),a}return function(){return n(Gt.apply(null,arguments))}}var N=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ve=/^\[(?:([a-z-]+):)?(.+)\]$/i,_t=/^\Ye+\/\Ye+$/,$t=new Set(["px","full","screen"]),jt=/^(\Ye+(\.\Ye+)?)?(xs|sm|md|lg|xl)$/,Ht=/\Ye+(%|px|r?em|[sdl]?Ye([hwib]|min|max)|Ye|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|Ye|min|max))|\Ye(calc|min|max|clamp)\(.+\)|^0$/,Ot=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wt=/^(inset_)?-?((\Ye+)?\.?(\Ye+)[a-z]+|0)V-?((\Ye+)?\.?(\Ye+)[a-z]+|0)/,Yt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,T=e=>$(e)||$t.has(e)||_t.test(e),B=e=>j(e,"length",er),$=e=>!!e&&!Number.isNaN(Number(e)),ve=e=>j(e,"number",$),W=e=>!!e&&Number.isInteger(Number(e)),qt=e=>e.endsWith("%")&&$(e.slice(0,-1)),m=e=>Ve.test(e),F=e=>jt.test(e),Jt=new Set(["length","size","percentage"]),Kt=e=>j(e,Jt,_e),Ut=e=>j(e,"position",_e),Xt=new Set(["image","url"]),Zt=e=>j(e,Xt,rr),Qt=e=>j(e,"",tr),Y=()=>!0,j=(e,t,r)=>{let o=Ve.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},er=e=>Ht.test(e)&&!Ot.test(e),_e=()=>!1,tr=e=>Wt.test(e),rr=e=>Yt.test(e);var or=()=>{let e=N("colors"),t=N("spacing"),r=N("blur"),o=N("brightness"),s=N("borderColor"),n=N("borderRadius"),c=N("borderSpacing"),l=N("borderWidth"),p=N("contrast"),u=N("grayscale"),a=N("hueRotate"),f=N("invert"),x=N("gap"),C=N("gradientColorStops"),w=N("gradientColorStopPositions"),i=N("inset"),h=N("margin"),k=N("opacity"),S=N("padding"),H=N("saturate"),G=N("scale"),Q=N("sepia"),Re=N("skew"),De=N("space"),Se=N("translate"),ue=()=>["auto","contain","none"],fe=()=>["auto","hidden","clip","visible","scroll"],ge=()=>["auto",m,t],P=()=>[m,t],Ae=()=>["",T,B],ee=()=>["auto",$,m],Me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],Le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",m],Te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[$,m];return{cacheSize:500,separator:":",theme:{colors:[Y],spacing:[T,B],blur:["none","",F,m],brightness:M(),borderColor:[e],borderRadius:["none","","full",F,m],borderSpacing:P(),borderWidth:Ae(),contrast:M(),grayscale:O(),hueRotate:M(),invert:O(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[qt,B],inset:ge(),margin:ge(),opacity:M(),padding:P(),saturate:M(),scale:M(),sepia:O(),skew:M(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[F]}],"break-after":[{"break-after":Te()}],"break-before":[{"break-before":Te()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Me(),m]}],overflow:[{overflow:fe()}],"overflow-x":[{"overflow-x":fe()}],"overflow-y":[{"overflow-y":fe()}],overscroll:[{overscroll:ue()}],"overscroll-x":[{"overscroll-x":ue()}],"overscroll-y":[{"overscroll-y":ue()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[i]}],"inset-x":[{"inset-x":[i]}],"inset-y":[{"inset-y":[i]}],start:[{start:[i]}],end:[{end:[i]}],top:[{top:[i]}],right:[{right:[i]}],bottom:[{bottom:[i]}],left:[{left:[i]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",W,m]}],basis:[{basis:ge()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",m]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",W,m]}],"grid-cols":[{"grid-cols":[Y]}],"col-start-end":[{col:["auto",{span:["full",W,m]},m]}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":[Y]}],"row-start-end":[{row:["auto",{span:[W,m]},m]}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",m]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...be()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...be(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...be(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],ke:[{ke:[S]}],Ye:[{Ye:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[De]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[De]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m,t]}],"min-w":[{"min-w":[m,t,"min","max","fit"]}],"max-w":[{"max-w":[m,t,"none","full","min","max","fit","prose",{screen:[F]},F]}],h:[{h:[m,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m,t,"auto","min","max","fit"]}],"font-size":[{text:["base",F,B]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ve]}],"font-family":[{font:[Y]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",m]}],"line-clamp":[{"line-clamp":["none",$,ve]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",T,m]}],"list-image":[{"list-image":["none",m]}],"list-style-type":[{list:["none","disc","decimal",m]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",T,B]}],"underline-offset":[{"underline-offset":["auto",T,m]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Me(),Ut]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Kt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","Ye","bl","l","tl"]},Zt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-Ye":[{"rounded-Ye":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-Ye":[{"rounded-Ye":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-Ye":[{"border-Ye":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...te(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:te()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-Ye":[{"border-Ye":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...te()]}],"outline-offset":[{"outline-offset":[T,m]}],"outline-w":[{outline:[T,B]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[T,B]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",F,Qt]}],"shadow-color":[{shadow:[Y]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...Le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Le()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",F,m]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[a]}],invert:[{invert:[f]}],saturate:[{saturate:[H]}],sepia:[{sepia:[Q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[a]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[H]}],"backdrop-sepia":[{"backdrop-sepia":[Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[G]}],"scale-x":[{"scale-x":[G]}],"scale-y":[{"scale-y":[G]}],rotate:[{rotate:[W,m]}],"translate-x":[{"translate-x":[Se]}],"translate-y":[{"translate-y":[Se]}],"skew-x":[{"skew-x":[Re]}],"skew-y":[{"skew-y":[Re]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ht-resize","nw-resize","Ye-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",m]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-ke":[{"scroll-ke":P()}],"scroll-Ye":[{"scroll-Ye":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",m]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[T,B,ve]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","ke","Ye","pr","pb","pl"],px:["pr","pl"],py:["Ye","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-Ye","rounded-l","rounded-ss","rounded-Ye","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Ye","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-Ye":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-Ye","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-Ye"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-Ye","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-Ye"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-ke","scroll-Ye","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-Ye","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var $e=Vt(or);function y(...e){return $e((0,je.clsx)(e))}var He=require("@radix-ui/react-slot"),Oe=require("class-variance-authority"),We=L(require("react")),Ye=require("react/jsx-runtime"),oe=(0,Oe.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),D=We.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...s},n)=>(0,Ye.jsx)(e?He.Slot:"button",{className:y(oe({className:t,size:r,variant:o})),ref:n,...s}));D.displayName="Button";var ae=L(require("react")),z=L(require("@radix-ui/react-avatar"));var q=ae.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(z.Root,{ref:r,className:y("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));q.displayName=z.Root.displayName;var J=ae.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(z.Image,{ref:r,className:y("aspect-square h-full w-full",e),...t}));J.displayName=z.Image.displayName;var K=ae.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(z.Fallback,{ref:r,className:y("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));K.displayName=z.Fallback.displayName;var qe=[{date:new Date(2025,3,18),name:"Good Friday"},{date:new Date(2025,3,21),name:"Easter Monday"},{date:new Date(2025,4,5),name:"Early May bank holiday"},{date:new Date(2025,5,26),name:"Spring bank holiday"},{date:new Date(2025,7,25),name:"Summer bank holiday"},{date:new Date(2025,11,25),name:"Christmas Day"},{date:new Date(2025,11,26),name:"Boxing Day"}];var U=e=>{let t=e.getDay()===0,r=e.getDay()===6,o=qe.some(s=>s.date.toISOString()===e.toISOString());return t||r||o},Je=(e,t,r=!1)=>{let o=new Date(e),s=new Date(t),n=0;if(r&&!U(o))return .5;for(;o<=s;)U(o)||n++,o.setDate(o.getDate()+1);return n},Ke=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();function Ue(...e){return e.filter(Boolean).join(" ")}function Xe({currentDate:e,setCurrentDate:t,holidays:r,employees:o}){let s=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),n=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},c=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},l=()=>{t(new Date)},p=u=>u.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,Ye.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Ye.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Ye.jsxs)("div",{className:"sm:flex-auto",children:[(0,Ye.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Ye.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Ye.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Ye.jsxs)(D,{onClick:n,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Ye.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Ye.jsx)(ht.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Ye.jsx)(D,{variant:"outline",onClick:l,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,Ye.jsxs)(D,{onClick:c,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Ye.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Ye.jsx)(ht.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,Ye.jsx)("div",{className:"mt-8 flow-root",children:(0,Ye.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,Ye.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,Ye.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,Ye.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,Ye.jsxs)("tr",{children:[(0,Ye.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-Ye border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(s)].map((u,a)=>{let f=new Date(e.getFullYear(),e.getMonth(),a+1);return(0,Ye.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-Ye border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${U(f)?"bg-gray-200":""}`,children:[(0,Ye.jsx)("div",{children:p(f)}),(0,Ye.jsx)("div",{children:a+1})]},a)})]})}),(0,Ye.jsx)("tbody",{children:o.map((u,a)=>(0,Ye.jsxs)("tr",{children:[(0,Ye.jsx)("td",{className:Ue(a!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,Ye.jsxs)("div",{className:"flex items-center",children:[(0,Ye.jsxs)(q,{className:"h-11 w-11",children:[(0,Ye.jsx)(J,{src:u.image,alt:u.name}),(0,Ye.jsx)(K,{children:u.name.split(" ").map(f=>f[0]).join("")})]}),(0,Ye.jsx)("div",{className:"ml-4",children:(0,Ye.jsx)("div",{className:"font-medium text-accent",children:u.name})})]})}),[...Array(s)].map((f,x)=>{let C=new Date(e.getFullYear(),e.getMonth(),x+1),w=r.find(i=>i.userId===u.id&&new Date(i.startDate)<=C&&new Date(i.endDate)>=C);return(0,Ye.jsx)("td",{className:Ue(a!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",U(C)?"bg-gray-200":"bg-white"),children:(0,Ye.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${w?w.status==="approved"?"bg-green-500":w.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:w?`${u.name}: ${w.status} (${w.startDate} - ${w.endDate}) - ${w.leaveType}`:"",children:w&&w.leaveType!=="Full Day"&&(0,Ye.jsx)("div",{className:`h-3 w-6 ${w.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${u.id}-${x}`)})]},u.id))})]})})})})]})}function Qe({currentDate:e,setCurrentDate:t,holidays:r}){let[o,s]=(0,vt.useState)(null),n=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,c=Array.from({length:42},(a,f)=>{let x=new Date(e.getFullYear(),e.getMonth(),f-n+1);return{date:x,isCurrentMonth:x.getMonth()===e.getMonth(),isToday:x.toDateString()===new Date().toDateString(),holidays:r.filter(C=>new Date(C.startDate)<=x&&new Date(C.endDate)>=x)}}),l=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},p=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},u=()=>{t(new Date)};return(0,Ye.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,Ye.jsxs)("header",{className:"flex items-center justify-between border-Ye border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Ye.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Ye.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Ye.jsx)("div",{className:"flex items-center",children:(0,Ye.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Ye.jsxs)(D,{onClick:l,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Ye.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Ye.jsx)(ht.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Ye.jsx)(D,{variant:"outline",onClick:u,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,Ye.jsxs)(D,{onClick:p,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Ye.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Ye.jsx)(ht.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,Ye.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Ye.jsxs)("div",{className:"grid grid-cols-7 gap-px border-Ye border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["M",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ue"})]}),(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["W",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["F",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Ye"})]}),(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,Ye.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,Ye.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:c.map(a=>(0,Ye.jsxs)("div",{className:y(a.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,Ye.jsx)("time",{dateTime:a.date.toISOString(),className:y("flex h-6 w-6 items-center justify-center rounded-full",a.isToday&&"bg-indigo-600 font-semibold text-white"),children:a.date.getDate()}),a.holidays.length>0&&(0,Ye.jsx)("ol",{className:"mt-2 space-y-1 overflow-visible",children:a.holidays.map(f=>(0,Ye.jsx)("li",{className:"overflow-visible",children:(0,Ye.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${f.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:f.userName})},f.id))})]},a.date.toISOString()))}),(0,Ye.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:c.map(a=>(0,Ye.jsxs)("button",{type:"button",className:y(a.isCurrentMonth?"bg-white":"bg-gray-50",(a.date===o||a.isToday)&&"font-semibold",a.date===o&&"text-white",!a.date&&a.isToday&&"text-indigo-600",a.date!==o&&a.isCurrentMonth&&!a.isToday&&"text-gray-900",a.date!==o&&!a.isCurrentMonth&&!a.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,Ye.jsx)("time",{dateTime:a.date.toISOString(),className:y("ml-auto",a.date===o&&a.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",a.date===o&&!a.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:a.date.getDate()}),(0,Ye.jsxs)("span",{className:"sr-only",children:[a.holidays.length," holidays"]}),a.holidays.length>0&&(0,Ye.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:a.holidays.map(f=>(0,Ye.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${f.status==="approved"?"bg-green-500":"bg-gray-500"}`},f.id))})]},a.date.toISOString()))})]})]})]})}var et=L(require("react")),xe=L(require("@radix-ui/react-label"));var ar=(0,Oe.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),X=et.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(xe.Root,{ref:r,className:y(ar(),e),...t}));X.displayName=xe.Root.displayName;var ot=require("react-day-picker");function le({className:e,classNames:t,showOutsideDays:r=!0,...o}){return(0,Ye.jsx)(ot.DayPicker,{showOutsideDays:r,weekStartsOn:1,className:y("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center Ye-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:y(oe({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(oe({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}le.displayName="Calendar";var st=L(require("react")),A=L(require("@radix-ui/react-popover"));var Ne=A.Root,Pe=A.Trigger;var ce=st.forwardRef(({className:e,align:t="center",sideOffset:r=4,...o},s)=>(0,Ye.jsx)(A.Portal,{children:(0,Ye.jsx)(A.Content,{ref:s,align:t,sideOffset:r,className:y("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));ce.displayName=A.Content.displayName;var ke=require("date-fns"),nt=require("next/navigation"),V=require("sonner");var sr=({options:e,value:t,onChange:r,disabled:o=[]})=>(0,Ye.jsx)("div",{className:"flex space-x-2",children:e.map((s,n)=>(0,Ye.jsx)(D,{type:"button",variant:t===s?"default":"outline",onClick:()=>r(s),disabled:o[n],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:s},s))});function it({remainingDays:e,submitLeaveRequest:t}){let[r,o]=(0,vt.useState)(new Date),[s,n]=(0,vt.useState)(new Date),[c,l]=(0,vt.useState)("Full Day"),[p,u]=(0,vt.useState)(!1),[a,f]=(0,vt.useState)(1),x=(0,nt.useRouter)();(0,vt.useEffect)(()=>{let i=Ke(r,s);u(i),i&&l("Full Day")},[r,s]),(0,vt.useEffect)(()=>{if(!r||!s){f(0);return}let i=Je(r,s,c!=="Full Day");f(i)},[r,s,c]);let C=i=>{l(i)};return(0,Ye.jsxs)("div",{className:"max-w-2xl",children:[(0,Ye.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,Ye.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,Ye.jsxs)("form",{onSubmit:async i=>{if(i.preventDefault(),!r||!s){V.toast.error("Please select both start and end dates");return}if(a>e){V.toast.error("You do not have enough leave days remaining");return}let h=new FormData;h.append("startDate",r.toISOString()),h.append("endDate",s.toISOString()),h.append("leaveType",c),h.append("duration",a.toString());let k=await(t||nr)(h);k.success?(V.toast.success(k.message),o(void 0),n(void 0),l("Full Day"),x.refresh()):V.toast.error(`Error: ${k.message}`)},className:"space-y-4",children:[(0,Ye.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ye.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Ye.jsx)(X,{htmlFor:"startDate",children:"Start Date"}),(0,Ye.jsxs)(Ne,{children:[(0,Ye.jsx)(Pe,{asChild:!0,children:(0,Ye.jsxs)(D,{variant:"outline",className:y("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,Ye.jsx)(ht.CalendarIcon,{className:"mr-2 h-4 w-4"}),r?(0,ke.format)(r,"PPP"):(0,Ye.jsx)("span",{children:"Pick a date"})]})}),(0,Ye.jsx)(ce,{className:"w-auto p-0",align:"start",children:(0,Ye.jsx)(le,{mode:"single",selected:r,onSelect:i=>{o(i),i&&(!s||i>s)&&n(i)},initialFocus:!0})})]})]}),(0,Ye.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Ye.jsx)(X,{htmlFor:"endDate",children:"End Date"}),(0,Ye.jsxs)(Ne,{children:[(0,Ye.jsx)(Pe,{asChild:!0,children:(0,Ye.jsxs)(D,{variant:"outline",className:y("w-full justify-start text-left font-normal",!s&&"text-muted-foreground"),children:[(0,Ye.jsx)(ht.CalendarIcon,{className:"mr-2 h-4 w-4"}),s?(0,ke.format)(s,"PPP"):(0,Ye.jsx)("span",{children:"Pick a date"})]})}),(0,Ye.jsx)(ce,{className:"w-auto p-0",align:"start",children:(0,Ye.jsx)(le,{mode:"single",selected:s,onSelect:n,disabled:i=>r?i<r:!1,initialFocus:!0})})]})]})]}),(0,Ye.jsxs)("div",{className:"space-y-2",children:[(0,Ye.jsx)(X,{children:"Leave Type"}),(0,Ye.jsx)(sr,{options:["Full Day","Morning","Afternoon"],value:c,onChange:C,disabled:[!1,p,p]})]}),(0,Ye.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",a]}),(0,Ye.jsx)(D,{disabled:a<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,Ye.jsx)(V.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var nr=async e=>{let t={};return e.forEach((r,o)=>{t[o]=r}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};var Z=L(require("@radix-ui/react-checkbox")),ct=L(require("react")),me=ct.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(Z.Root,{className:y("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,Ye.jsx)(Z.Indicator,{className:y("flex items-center justify-center text-current"),children:(0,Ye.jsx)(ht.Check,{className:"h-4 w-4"})})}));me.displayName=Z.Root.displayName;var ir=(0,Oe.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function mt({className:e,variant:t,...r}){return(0,Ye.jsx)("div",{className:y(ir({variant:t}),e),...r})}function gt({leaveRequests:e,onApprove:t,onReject:r}){let[o,s]=(0,vt.useState)([]),n=(0,nt.useRouter)(),c=()=>{o.length===e.length?s([]):s(e.map(a=>a.id))},l=a=>{s(f=>f.includes(a)?f.filter(x=>x!==a):[...f,a])},p=async()=>{let a=await t(o);a.success?(V.toast.success(a.message),n.refresh()):V.toast.error(`Error: ${a.message}`),s([])},u=async()=>{let a=await r(o);a.success?(V.toast.success(a.message),n.refresh()):V.toast.error(`Error: ${a.message}`),s([])};return(0,Ye.jsxs)("div",{className:"space-y-4",children:[(0,Ye.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Ye.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Ye.jsxs)("div",{className:"space-x-2",children:[(0,Ye.jsx)(D,{onClick:p,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Ye.jsx)(D,{onClick:u,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Ye.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,Ye.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,Ye.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,Ye.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ye.jsxs)("div",{className:"flex items-center",children:[(0,Ye.jsx)(me,{id:"select-all",checked:o.length===e.length,onCheckedChange:c,className:"border-accent"}),(0,Ye.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Ye.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(a=>(0,Ye.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Ye.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ye.jsxs)("div",{className:"flex items-center",children:[(0,Ye.jsx)(me,{id:`select-${a.id}`,checked:o.includes(a.id),onCheckedChange:()=>l(a.id),className:"border-accent"}),(0,Ye.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Ye.jsxs)(q,{className:"h-10 w-10",children:[(0,Ye.jsx)(J,{src:a.userImage,alt:a.userName}),(0,Ye.jsx)(K,{children:a.userName.split(" ").map(f=>f[0]).join("")})]}),(0,Ye.jsx)("div",{className:"ml-3",children:(0,Ye.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:a.userName})})]})]}),(0,Ye.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ye.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(a.startDate).toLocaleDateString(),a.startDate!==a.endDate&&` - ${new Date(a.endDate).toLocaleDateString()}`,a.leaveType!="Full Day"&&` (${a.leaveType})`,` - ${a.totalDays} day${a.totalDays!==1?"s":""}`]}),(0,Ye.jsx)(mt,{variant:a.status==="approved"?"default":a.status==="rejected"?"destructive":"secondary",children:a.status})]})]})},a.id))]})}),(0,Ye.jsx)(V.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}function bt(...e){return e.filter(Boolean).join(" ")}function lr({holidays:e,currentUser:t,currentDate:r,leaveApprovals:o,employees:s,submitLeaveRequest:n,approveLeave:c,rejectLeave:l}){let[p,u]=(0,vt.useState)("Calendar View"),a=(0,nt.useRouter)(),f=!1,x=(0,ke.parseISO)(r),C=async i=>{let h=(0,ke.format)(i,"dd-MM-yyyy"),k=new URL(window.location.href);return k.searchParams.set("date",h),a.push(k.toString()),{success:!0}};if(f)return(0,Ye.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,Ye.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-Ye-2 border-gray-900"})});let w=[{name:"Grid View",icon:E.Grid,current:p==="Grid View"},{name:"Calendar View",icon:E.CalendarDays,current:p==="Calendar View"},{name:"Request Leave",icon:E.PlusCircle,current:p==="Request Leave"},{name:"Approve Leave",icon:E.CheckSquare,current:p==="Approve Leave"}];return(0,Ye.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,Ye.jsxs)("div",{className:"mb-8",children:[(0,Ye.jsxs)("div",{className:"sm:hidden",children:[(0,Ye.jsx)("select",{value:p,onChange:i=>u(i.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:w.map(i=>(0,Ye.jsx)("option",{children:i.name},i.name))}),(0,Ye.jsx)(ht.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,Ye.jsx)("div",{className:"hidden sm:block",children:(0,Ye.jsx)("div",{className:"border-Ye border-gray-200",children:(0,Ye.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:w.map(i=>(0,Ye.jsxs)("a",{onClick:()=>{(i.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&u(i.name)},className:bt(i.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",i.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-Ye-2 py-4 px-1 text-sm font-medium"),"aria-current":i.current?"page":void 0,children:[(0,Ye.jsx)(i.icon,{className:bt(i.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),(0,Ye.jsx)("span",{children:i.name})]},i.name))})})})]}),p==="Grid View"&&(0,Ye.jsx)(Xe,{currentDate:x,setCurrentDate:C,holidays:e,employees:s}),p==="Calendar View"&&(0,Ye.jsx)(Qe,{currentDate:x,setCurrentDate:C,holidays:e}),p==="Request Leave"&&(0,Ye.jsx)(it,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:i=>n?n(i):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),p==="Approve Leave"&&(0,Ye.jsx)(gt,{leaveRequests:o,onApprove:i=>c?c(i):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:i=>l?l(i):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}0&&(module.exports={HolidayTracker});
|
|
4
|
+
"use strict";"use client";var xt=Object.create;var re=Object.defineProperty;var wt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var Pt=Object.getPrototypeOf,kt=Object.prototype.hasOwnProperty;var Ct=(e,t)=>{for(var r in t)re(e,r,{get:t[r],enumerable:!0})},ze=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Nt(t))!kt.call(e,s)&&s!==r&&re(e,s,{get:()=>t[s],enumerable:!(o=wt(t,s))||o.enumerable});return e};var L=(e,t,r)=>(r=e!=null?xt(Pt(e)):{},ze(t||!e||!e.__esModule?re(r,"default",{value:e,enumerable:!0}):r,e)),Rt=e=>ze(re({},"__esModule",{value:!0}),e);var cr={};Ct(cr,{HolidayTracker:()=>lr});module.exports=Rt(cr);var vt=require("react"),ht=require("lucide-react"),E=require("lucide-react");var je=require("clsx");var ye="-",Dt=e=>{let t=At(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let l=c.split(ye);return l[0]===""&&l.length!==1&&l.shift(),Fe(l,t)||St(c)},getConflictingClassGroupIds:(c,l)=>{let p=r[c]||[];return l&&o[c]?[...p,...o[c]]:p}}},Fe=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?Fe(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(ye);return t.validators.find(({validator:c})=>c(n))?.classGroupId},Ie=/^\[(.+)\]$/,St=e=>{if(Ie.test(e)){let t=Ie.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},At=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Lt(Object.entries(e.classGroups),r).forEach(([n,c])=>{he(c,o,n,t)}),o},he=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:Be(t,s);n.classGroupId=r;return}if(typeof s=="function"){if(Mt(s)){he(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([n,c])=>{he(c,Be(t,n),r,o)})})},Be=(e,t)=>{let r=e;return t.split(ye).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Mt=e=>e.isThemeGetter,Lt=(e,t)=>t?e.map(([r,o])=>{let s=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,l])=>[t+c,l])):n);return[r,s]}):e,Tt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(n,c)=>{r.set(n,c),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let c=r.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return s(n,c),c},set(n,c){r.has(n)?r.set(n,c):s(n,c)}}},Ee="!",zt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],n=t.length,c=l=>{let p=[],u=0,a=0,f;for(let h=0;h<l.length;h++){let k=l[h];if(u===0){if(k===s&&(o||l.slice(h,h+n)===t)){p.push(l.slice(a,h)),a=h+n;continue}if(k==="/"){f=h;continue}}k==="["?u++:k==="]"&&u--}let x=p.length===0?l:l.substring(a),C=x.startsWith(Ee),w=C?x.substring(1):x,i=f&&f>a?f-a:void 0;return{modifiers:p,hasImportantModifier:C,baseClassName:w,maybePostfixModifierPosition:i}};return r?l=>r({className:l,parseClassName:c}):c},It=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Bt=e=>({cache:Tt(e.cacheSize),parseClassName:zt(e),...Dt(e)}),Ft=/\s+/,Et=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,n=[],c=e.trim().split(Ft),l="";for(let p=c.length-1;p>=0;p-=1){let u=c[p],{modifiers:a,hasImportantModifier:f,baseClassName:x,maybePostfixModifierPosition:C}=r(u),w=!!C,i=o(w?x.substring(0,C):x);if(!i){if(!w){l=u+(l.length>0?" "+l:l);continue}if(i=o(x),!i){l=u+(l.length>0?" "+l:l);continue}w=!1}let h=It(a).join(":"),k=f?h+Ee:h,S=k+i;if(n.includes(S))continue;n.push(S);let H=s(i,w);for(let G=0;G<H.length;++G){let Q=H[G];n.push(k+Q)}l=u+(l.length>0?" "+l:l)}return l};function Gt(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ge(t))&&(o&&(o+=" "),o+=r);return o}var Ge=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Ge(e[o]))&&(r&&(r+=" "),r+=t);return r};function Vt(e,...t){let r,o,s,n=c;function c(p){let u=t.reduce((a,f)=>f(a),e());return r=Bt(u),o=r.cache.get,s=r.cache.set,n=l,l(p)}function l(p){let u=o(p);if(u)return u;let a=Et(p,r);return s(p,a),a}return function(){return n(Gt.apply(null,arguments))}}var N=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ve=/^\[(?:([a-z-]+):)?(.+)\]$/i,_t=/^\Ye+\/\Ye+$/,$t=new Set(["px","full","screen"]),jt=/^(\Ye+(\.\Ye+)?)?(xs|sm|md|lg|xl)$/,Ht=/\Ye+(%|px|r?em|[sdl]?Ye([hwib]|min|max)|Ye|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|Ye|min|max))|\Ye(calc|min|max|clamp)\(.+\)|^0$/,Ot=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wt=/^(inset_)?-?((\Ye+)?\.?(\Ye+)[a-z]+|0)V-?((\Ye+)?\.?(\Ye+)[a-z]+|0)/,Yt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,T=e=>$(e)||$t.has(e)||_t.test(e),B=e=>j(e,"length",er),$=e=>!!e&&!Number.isNaN(Number(e)),ve=e=>j(e,"number",$),W=e=>!!e&&Number.isInteger(Number(e)),qt=e=>e.endsWith("%")&&$(e.slice(0,-1)),m=e=>Ve.test(e),F=e=>jt.test(e),Jt=new Set(["length","size","percentage"]),Kt=e=>j(e,Jt,_e),Ut=e=>j(e,"position",_e),Xt=new Set(["image","url"]),Zt=e=>j(e,Xt,rr),Qt=e=>j(e,"",tr),Y=()=>!0,j=(e,t,r)=>{let o=Ve.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},er=e=>Ht.test(e)&&!Ot.test(e),_e=()=>!1,tr=e=>Wt.test(e),rr=e=>Yt.test(e);var or=()=>{let e=N("colors"),t=N("spacing"),r=N("blur"),o=N("brightness"),s=N("borderColor"),n=N("borderRadius"),c=N("borderSpacing"),l=N("borderWidth"),p=N("contrast"),u=N("grayscale"),a=N("hueRotate"),f=N("invert"),x=N("gap"),C=N("gradientColorStops"),w=N("gradientColorStopPositions"),i=N("inset"),h=N("margin"),k=N("opacity"),S=N("padding"),H=N("saturate"),G=N("scale"),Q=N("sepia"),Re=N("skew"),De=N("space"),Se=N("translate"),ue=()=>["auto","contain","none"],fe=()=>["auto","hidden","clip","visible","scroll"],ge=()=>["auto",m,t],P=()=>[m,t],Ae=()=>["",T,B],ee=()=>["auto",$,m],Me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],Le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",m],Te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[$,m];return{cacheSize:500,separator:":",theme:{colors:[Y],spacing:[T,B],blur:["none","",F,m],brightness:M(),borderColor:[e],borderRadius:["none","","full",F,m],borderSpacing:P(),borderWidth:Ae(),contrast:M(),grayscale:O(),hueRotate:M(),invert:O(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[qt,B],inset:ge(),margin:ge(),opacity:M(),padding:P(),saturate:M(),scale:M(),sepia:O(),skew:M(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[F]}],"break-after":[{"break-after":Te()}],"break-before":[{"break-before":Te()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Me(),m]}],overflow:[{overflow:fe()}],"overflow-x":[{"overflow-x":fe()}],"overflow-y":[{"overflow-y":fe()}],overscroll:[{overscroll:ue()}],"overscroll-x":[{"overscroll-x":ue()}],"overscroll-y":[{"overscroll-y":ue()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[i]}],"inset-x":[{"inset-x":[i]}],"inset-y":[{"inset-y":[i]}],start:[{start:[i]}],end:[{end:[i]}],top:[{top:[i]}],right:[{right:[i]}],bottom:[{bottom:[i]}],left:[{left:[i]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",W,m]}],basis:[{basis:ge()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",m]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",W,m]}],"grid-cols":[{"grid-cols":[Y]}],"col-start-end":[{col:["auto",{span:["full",W,m]},m]}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":[Y]}],"row-start-end":[{row:["auto",{span:[W,m]},m]}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",m]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...be()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...be(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...be(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],ke:[{ke:[S]}],Ye:[{Ye:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[De]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[De]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m,t]}],"min-w":[{"min-w":[m,t,"min","max","fit"]}],"max-w":[{"max-w":[m,t,"none","full","min","max","fit","prose",{screen:[F]},F]}],h:[{h:[m,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[m,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m,t,"auto","min","max","fit"]}],"font-size":[{text:["base",F,B]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ve]}],"font-family":[{font:[Y]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",m]}],"line-clamp":[{"line-clamp":["none",$,ve]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",T,m]}],"list-image":[{"list-image":["none",m]}],"list-style-type":[{list:["none","disc","decimal",m]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",T,B]}],"underline-offset":[{"underline-offset":["auto",T,m]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Me(),Ut]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Kt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","Ye","bl","l","tl"]},Zt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-Ye":[{"rounded-Ye":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-Ye":[{"rounded-Ye":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-Ye":[{"border-Ye":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...te(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:te()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-Ye":[{"border-Ye":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...te()]}],"outline-offset":[{"outline-offset":[T,m]}],"outline-w":[{outline:[T,B]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[T,B]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",F,Qt]}],"shadow-color":[{shadow:[Y]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...Le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Le()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",F,m]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[a]}],invert:[{invert:[f]}],saturate:[{saturate:[H]}],sepia:[{sepia:[Q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[a]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[H]}],"backdrop-sepia":[{"backdrop-sepia":[Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[G]}],"scale-x":[{"scale-x":[G]}],"scale-y":[{"scale-y":[G]}],rotate:[{rotate:[W,m]}],"translate-x":[{"translate-x":[Se]}],"translate-y":[{"translate-y":[Se]}],"skew-x":[{"skew-x":[Re]}],"skew-y":[{"skew-y":[Re]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ht-resize","nw-resize","Ye-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",m]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-ke":[{"scroll-ke":P()}],"scroll-Ye":[{"scroll-Ye":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",m]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[T,B,ve]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","ke","Ye","pr","pb","pl"],px:["pr","pl"],py:["Ye","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-Ye","rounded-l","rounded-ss","rounded-Ye","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Ye","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-Ye":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-Ye","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-Ye"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-Ye","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-Ye"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-ke","scroll-Ye","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-Ye","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var $e=Vt(or);function y(...e){return $e((0,je.clsx)(e))}var He=require("@radix-ui/react-slot"),Oe=require("class-variance-authority"),We=L(require("react")),Ye=require("react/jsx-runtime"),oe=(0,Oe.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),D=We.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...s},n)=>(0,Ye.jsx)(e?He.Slot:"button",{className:y(oe({className:t,size:r,variant:o})),ref:n,...s}));D.displayName="Button";var ae=L(require("react")),z=L(require("@radix-ui/react-avatar"));var q=ae.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(z.Root,{ref:r,className:y("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));q.displayName=z.Root.displayName;var J=ae.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(z.Image,{ref:r,className:y("aspect-square h-full w-full",e),...t}));J.displayName=z.Image.displayName;var K=ae.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(z.Fallback,{ref:r,className:y("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));K.displayName=z.Fallback.displayName;var qe=[new Date(2025,0,1),new Date(2025,3,18),new Date(2025,3,21),new Date(2025,4,5),new Date(2025,4,26),new Date(2025,7,25),new Date(2025,11,25),new Date(2025,11,26),new Date(2026,0,1),new Date(2026,3,3),new Date(2026,3,6),new Date(2026,4,4),new Date(2026,4,25),new Date(2026,7,31),new Date(2026,11,25),new Date(2026,11,28)];var U=e=>{let t=e.getDay()===0,r=e.getDay()===6,o=qe.some(s=>s.toISOString()===e.toISOString());return t||r||o},Je=(e,t,r=!1)=>{let o=new Date(e),s=new Date(t),n=0;if(r&&!U(o))return .5;for(;o<=s;)U(o)||n++,o.setDate(o.getDate()+1);return n},Ke=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();function Ue(...e){return e.filter(Boolean).join(" ")}function Xe({currentDate:e,setCurrentDate:t,holidays:r,employees:o}){let s=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),n=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},c=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},l=()=>{t(new Date)},p=u=>u.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,Ye.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,Ye.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,Ye.jsxs)("div",{className:"sm:flex-auto",children:[(0,Ye.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,Ye.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,Ye.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Ye.jsxs)(D,{onClick:n,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Ye.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Ye.jsx)(ht.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Ye.jsx)(D,{variant:"outline",onClick:l,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,Ye.jsxs)(D,{onClick:c,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Ye.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Ye.jsx)(ht.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,Ye.jsx)("div",{className:"mt-8 flow-root",children:(0,Ye.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,Ye.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:(0,Ye.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,Ye.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,Ye.jsxs)("tr",{children:[(0,Ye.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-Ye border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(s)].map((u,a)=>{let f=new Date(e.getFullYear(),e.getMonth(),a+1);return(0,Ye.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-Ye border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${U(f)?"bg-gray-200":""}`,children:[(0,Ye.jsx)("div",{children:p(f)}),(0,Ye.jsx)("div",{children:a+1})]},a)})]})}),(0,Ye.jsx)("tbody",{children:o.map((u,a)=>(0,Ye.jsxs)("tr",{children:[(0,Ye.jsx)("td",{className:Ue(a!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,Ye.jsxs)("div",{className:"flex items-center",children:[(0,Ye.jsxs)(q,{className:"h-11 w-11",children:[(0,Ye.jsx)(J,{src:u.image,alt:u.name}),(0,Ye.jsx)(K,{children:u.name.split(" ").map(f=>f[0]).join("")})]}),(0,Ye.jsx)("div",{className:"ml-4",children:(0,Ye.jsx)("div",{className:"font-medium text-accent",children:u.name})})]})}),[...Array(s)].map((f,x)=>{let C=new Date(e.getFullYear(),e.getMonth(),x+1),w=r.find(i=>i.userId===u.id&&new Date(i.startDate)<=C&&new Date(i.endDate)>=C);return(0,Ye.jsx)("td",{className:Ue(a!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",U(C)?"bg-gray-200":"bg-white"),children:(0,Ye.jsx)("div",{className:`h-6 w-6 mx-auto rounded-full overflow-hidden ${w?w.status==="approved"?"bg-green-500":w.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:w?`${u.name}: ${w.status} (${w.startDate} - ${w.endDate}) - ${w.leaveType}`:"",children:w&&w.leaveType!=="Full Day"&&(0,Ye.jsx)("div",{className:`h-3 w-6 ${w.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${u.id}-${x}`)})]},u.id))})]})})})})]})}function Qe({currentDate:e,setCurrentDate:t,holidays:r}){let[o,s]=(0,vt.useState)(null),n=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,c=Array.from({length:42},(a,f)=>{let x=new Date(e.getFullYear(),e.getMonth(),f-n+1);return{date:x,isCurrentMonth:x.getMonth()===e.getMonth(),isToday:x.toDateString()===new Date().toDateString(),holidays:r.filter(C=>new Date(C.startDate)<=x&&new Date(C.endDate)>=x)}}),l=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},p=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},u=()=>{t(new Date)};return(0,Ye.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,Ye.jsxs)("header",{className:"flex items-center justify-between border-Ye border-gray-200 px-6 py-4 lg:flex-none",children:[(0,Ye.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,Ye.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,Ye.jsx)("div",{className:"flex items-center",children:(0,Ye.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,Ye.jsxs)(D,{onClick:l,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,Ye.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,Ye.jsx)(ht.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,Ye.jsx)(D,{variant:"outline",onClick:u,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,Ye.jsxs)(D,{onClick:p,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,Ye.jsx)("span",{className:"sr-only",children:"Next month"}),(0,Ye.jsx)(ht.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,Ye.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,Ye.jsxs)("div",{className:"grid grid-cols-7 gap-px border-Ye border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["M",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ue"})]}),(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["W",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["T",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["F",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"Ye"})]}),(0,Ye.jsxs)("div",{className:"bg-white py-2",children:["S",(0,Ye.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,Ye.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,Ye.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:c.map(a=>(0,Ye.jsxs)("div",{className:y(a.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,Ye.jsx)("time",{dateTime:a.date.toISOString(),className:y("flex h-6 w-6 items-center justify-center rounded-full",a.isToday&&"bg-indigo-600 font-semibold text-white"),children:a.date.getDate()}),a.holidays.length>0&&(0,Ye.jsx)("ol",{className:"mt-2 space-y-1 overflow-visible",children:a.holidays.map(f=>(0,Ye.jsx)("li",{className:"overflow-visible",children:(0,Ye.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${f.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:f.userName})},f.id))})]},a.date.toISOString()))}),(0,Ye.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:c.map(a=>(0,Ye.jsxs)("button",{type:"button",className:y(a.isCurrentMonth?"bg-white":"bg-gray-50",(a.date===o||a.isToday)&&"font-semibold",a.date===o&&"text-white",!a.date&&a.isToday&&"text-indigo-600",a.date!==o&&a.isCurrentMonth&&!a.isToday&&"text-gray-900",a.date!==o&&!a.isCurrentMonth&&!a.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,Ye.jsx)("time",{dateTime:a.date.toISOString(),className:y("ml-auto",a.date===o&&a.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",a.date===o&&!a.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:a.date.getDate()}),(0,Ye.jsxs)("span",{className:"sr-only",children:[a.holidays.length," holidays"]}),a.holidays.length>0&&(0,Ye.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:a.holidays.map(f=>(0,Ye.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${f.status==="approved"?"bg-green-500":"bg-gray-500"}`},f.id))})]},a.date.toISOString()))})]})]})]})}var et=L(require("react")),xe=L(require("@radix-ui/react-label"));var ar=(0,Oe.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),X=et.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(xe.Root,{ref:r,className:y(ar(),e),...t}));X.displayName=xe.Root.displayName;var ot=require("react-day-picker");function le({className:e,classNames:t,showOutsideDays:r=!0,...o}){return(0,Ye.jsx)(ot.DayPicker,{showOutsideDays:r,weekStartsOn:1,className:y("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center Ye-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:y(oe({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(oe({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}le.displayName="Calendar";var st=L(require("react")),A=L(require("@radix-ui/react-popover"));var Ne=A.Root,Pe=A.Trigger;var ce=st.forwardRef(({className:e,align:t="center",sideOffset:r=4,...o},s)=>(0,Ye.jsx)(A.Portal,{children:(0,Ye.jsx)(A.Content,{ref:s,align:t,sideOffset:r,className:y("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));ce.displayName=A.Content.displayName;var ke=require("date-fns"),nt=require("next/navigation"),V=require("sonner");var sr=({options:e,value:t,onChange:r,disabled:o=[]})=>(0,Ye.jsx)("div",{className:"flex space-x-2",children:e.map((s,n)=>(0,Ye.jsx)(D,{type:"button",variant:t===s?"default":"outline",onClick:()=>r(s),disabled:o[n],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:s},s))});function it({remainingDays:e,submitLeaveRequest:t}){let[r,o]=(0,vt.useState)(new Date),[s,n]=(0,vt.useState)(new Date),[c,l]=(0,vt.useState)("Full Day"),[p,u]=(0,vt.useState)(!1),[a,f]=(0,vt.useState)(1),x=(0,nt.useRouter)();(0,vt.useEffect)(()=>{let i=Ke(r,s);u(i),i&&l("Full Day")},[r,s]),(0,vt.useEffect)(()=>{if(!r||!s){f(0);return}let i=Je(r,s,c!=="Full Day");f(i)},[r,s,c]);let C=i=>{l(i)};return(0,Ye.jsxs)("div",{className:"max-w-2xl",children:[(0,Ye.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,Ye.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,Ye.jsxs)("form",{onSubmit:async i=>{if(i.preventDefault(),!r||!s){V.toast.error("Please select both start and end dates");return}if(a>e){V.toast.error("You do not have enough leave days remaining");return}let h=new FormData;h.append("startDate",r.toISOString()),h.append("endDate",s.toISOString()),h.append("leaveType",c),h.append("duration",a.toString());let k=await(t||nr)(h);k.success?(V.toast.success(k.message),o(void 0),n(void 0),l("Full Day"),x.refresh()):V.toast.error(`Error: ${k.message}`)},className:"space-y-4",children:[(0,Ye.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Ye.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Ye.jsx)(X,{htmlFor:"startDate",children:"Start Date"}),(0,Ye.jsxs)(Ne,{children:[(0,Ye.jsx)(Pe,{asChild:!0,children:(0,Ye.jsxs)(D,{variant:"outline",className:y("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,Ye.jsx)(ht.CalendarIcon,{className:"mr-2 h-4 w-4"}),r?(0,ke.format)(r,"PPP"):(0,Ye.jsx)("span",{children:"Pick a date"})]})}),(0,Ye.jsx)(ce,{className:"w-auto p-0",align:"start",children:(0,Ye.jsx)(le,{mode:"single",selected:r,onSelect:i=>{o(i),i&&(!s||i>s)&&n(i)},initialFocus:!0})})]})]}),(0,Ye.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,Ye.jsx)(X,{htmlFor:"endDate",children:"End Date"}),(0,Ye.jsxs)(Ne,{children:[(0,Ye.jsx)(Pe,{asChild:!0,children:(0,Ye.jsxs)(D,{variant:"outline",className:y("w-full justify-start text-left font-normal",!s&&"text-muted-foreground"),children:[(0,Ye.jsx)(ht.CalendarIcon,{className:"mr-2 h-4 w-4"}),s?(0,ke.format)(s,"PPP"):(0,Ye.jsx)("span",{children:"Pick a date"})]})}),(0,Ye.jsx)(ce,{className:"w-auto p-0",align:"start",children:(0,Ye.jsx)(le,{mode:"single",selected:s,onSelect:n,disabled:i=>r?i<r:!1,initialFocus:!0})})]})]})]}),(0,Ye.jsxs)("div",{className:"space-y-2",children:[(0,Ye.jsx)(X,{children:"Leave Type"}),(0,Ye.jsx)(sr,{options:["Full Day","Morning","Afternoon"],value:c,onChange:C,disabled:[!1,p,p]})]}),(0,Ye.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",a]}),(0,Ye.jsx)(D,{disabled:a<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,Ye.jsx)(V.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var nr=async e=>{let t={};return e.forEach((r,o)=>{t[o]=r}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};var Z=L(require("@radix-ui/react-checkbox")),ct=L(require("react")),me=ct.forwardRef(({className:e,...t},r)=>(0,Ye.jsx)(Z.Root,{className:y("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,Ye.jsx)(Z.Indicator,{className:y("flex items-center justify-center text-current"),children:(0,Ye.jsx)(ht.Check,{className:"h-4 w-4"})})}));me.displayName=Z.Root.displayName;var ir=(0,Oe.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function mt({className:e,variant:t,...r}){return(0,Ye.jsx)("div",{className:y(ir({variant:t}),e),...r})}function gt({leaveRequests:e,onApprove:t,onReject:r}){let[o,s]=(0,vt.useState)([]),n=(0,nt.useRouter)(),c=()=>{o.length===e.length?s([]):s(e.map(a=>a.id))},l=a=>{s(f=>f.includes(a)?f.filter(x=>x!==a):[...f,a])},p=async()=>{let a=await t(o);a.success?(V.toast.success(a.message),n.refresh()):V.toast.error(`Error: ${a.message}`),s([])},u=async()=>{let a=await r(o);a.success?(V.toast.success(a.message),n.refresh()):V.toast.error(`Error: ${a.message}`),s([])};return(0,Ye.jsxs)("div",{className:"space-y-4",children:[(0,Ye.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Ye.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,Ye.jsxs)("div",{className:"space-x-2",children:[(0,Ye.jsx)(D,{onClick:p,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,Ye.jsx)(D,{onClick:u,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,Ye.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,Ye.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,Ye.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,Ye.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ye.jsxs)("div",{className:"flex items-center",children:[(0,Ye.jsx)(me,{id:"select-all",checked:o.length===e.length,onCheckedChange:c,className:"border-accent"}),(0,Ye.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,Ye.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(a=>(0,Ye.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,Ye.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ye.jsxs)("div",{className:"flex items-center",children:[(0,Ye.jsx)(me,{id:`select-${a.id}`,checked:o.includes(a.id),onCheckedChange:()=>l(a.id),className:"border-accent"}),(0,Ye.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,Ye.jsxs)(q,{className:"h-10 w-10",children:[(0,Ye.jsx)(J,{src:a.userImage,alt:a.userName}),(0,Ye.jsx)(K,{children:a.userName.split(" ").map(f=>f[0]).join("")})]}),(0,Ye.jsx)("div",{className:"ml-3",children:(0,Ye.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:a.userName})})]})]}),(0,Ye.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ye.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(a.startDate).toLocaleDateString(),a.startDate!==a.endDate&&` - ${new Date(a.endDate).toLocaleDateString()}`,a.leaveType!="Full Day"&&` (${a.leaveType})`,` - ${a.totalDays} day${a.totalDays!==1?"s":""}`]}),(0,Ye.jsx)(mt,{variant:a.status==="approved"?"default":a.status==="rejected"?"destructive":"secondary",children:a.status})]})]})},a.id))]})}),(0,Ye.jsx)(V.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}function bt(...e){return e.filter(Boolean).join(" ")}function lr({holidays:e,currentUser:t,currentDate:r,leaveApprovals:o,employees:s,submitLeaveRequest:n,approveLeave:c,rejectLeave:l}){let[p,u]=(0,vt.useState)("Calendar View"),a=(0,nt.useRouter)(),f=!1,x=(0,ke.parseISO)(r),C=async i=>{let h=(0,ke.format)(i,"dd-MM-yyyy"),k=new URL(window.location.href);return k.searchParams.set("date",h),a.push(k.toString()),{success:!0}};if(f)return(0,Ye.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,Ye.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-Ye-2 border-gray-900"})});let w=[{name:"Grid View",icon:E.Grid,current:p==="Grid View"},{name:"Calendar View",icon:E.CalendarDays,current:p==="Calendar View"},{name:"Request Leave",icon:E.PlusCircle,current:p==="Request Leave"},{name:"Approve Leave",icon:E.CheckSquare,current:p==="Approve Leave"}];return(0,Ye.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,Ye.jsxs)("div",{className:"mb-8",children:[(0,Ye.jsxs)("div",{className:"sm:hidden",children:[(0,Ye.jsx)("select",{value:p,onChange:i=>u(i.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:w.map(i=>(0,Ye.jsx)("option",{children:i.name},i.name))}),(0,Ye.jsx)(ht.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,Ye.jsx)("div",{className:"hidden sm:block",children:(0,Ye.jsx)("div",{className:"border-Ye border-gray-200",children:(0,Ye.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:w.map(i=>(0,Ye.jsxs)("a",{onClick:()=>{(i.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&u(i.name)},className:bt(i.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",i.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-Ye-2 py-4 px-1 text-sm font-medium"),"aria-current":i.current?"page":void 0,children:[(0,Ye.jsx)(i.icon,{className:bt(i.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),(0,Ye.jsx)("span",{children:i.name})]},i.name))})})})]}),p==="Grid View"&&(0,Ye.jsx)(Xe,{currentDate:x,setCurrentDate:C,holidays:e,employees:s}),p==="Calendar View"&&(0,Ye.jsx)(Qe,{currentDate:x,setCurrentDate:C,holidays:e}),p==="Request Leave"&&(0,Ye.jsx)(it,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:i=>n?n(i):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),p==="Approve Leave"&&(0,Ye.jsx)(gt,{leaveRequests:o,onApprove:i=>c?c(i):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:i=>l?l(i):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}0&&(module.exports={HolidayTracker});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a}from"../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../chunk-RVHCTANZ.mjs";import"../../chunk-TZKQXT7Y.mjs";import"../../chunk-5AWZJAK3.mjs";import"../../chunk-B3F6F2S4.mjs";import"../../chunk-MAAKU7PN.mjs";import"../../chunk-PC6TVU7J.mjs";import"../../chunk-LYPWYO4W.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as HolidayTracker};
|